Commit graph

1,233,488 commits

Author SHA1 Message Date
Darrick J. Wong
68db60bf01 xfs: create a helper to compute leftovers of realtime extents
Create a helper to compute the misalignment between a file extent
(xfs_extlen_t) and a realtime extent.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:24:22 -07:00
Darrick J. Wong
03f4de332e xfs: convert rt bitmap/summary block numbers to xfs_fileoff_t
We should use xfs_fileoff_t to store the file block offset of any
location within the realtime bitmap or summary files.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:24:22 -07:00
Darrick J. Wong
fa5a387230 xfs: create a helper to convert rtextents to rtblocks
Create a helper to convert a realtime extent to a realtime block.  Later
on we'll change the helper to use bit shifts when possible.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:24:22 -07:00
Darrick J. Wong
a684c538bc xfs: convert xfs_extlen_t to xfs_rtxlen_t in the rt allocator
In most of the filesystem, we use xfs_extlen_t to store the length of a
file (or AG) space mapping in units of fs blocks.  Unfortunately, the
realtime allocator also uses it to store the length of a rt space
mapping in units of rt extents.  This is confusing, since one rt extent
can consist of many fs blocks.

Separate the two by introducing a new type (xfs_rtxlen_t) to store the
length of a space mapping (in units of realtime extents) that would be
found in a file.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:24:22 -07:00
Darrick J. Wong
13928113fc xfs: move the xfs_rtbitmap.c declarations to xfs_rtbitmap.h
Move all the declarations for functionality in xfs_rtbitmap.c into a
separate xfs_rtbitmap.h header file.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:24:22 -07:00
Darrick J. Wong
f6a2dae2a1 xfs: make sure maxlen is still congruent with prod when rounding down
In commit 2a6ca4baed, we tried to fix an overflow problem in the
realtime allocator that was caused by an overly large maxlen value
causing xfs_rtcheck_range to run off the end of the realtime bitmap.
Unfortunately, there is a subtle bug here -- maxlen (and minlen) both
have to be aligned with @prod, but @prod can be larger than 1 if the
user has set an extent size hint on the file, and that extent size hint
is larger than the realtime extent size.

If the rt free space extents are not aligned to this file's extszhint
because other files without extent size hints allocated space (or the
number of rt extents is similarly not aligned), then it's possible that
maxlen after clamping to sb_rextents will no longer be aligned to prod.
The allocation will succeed just fine, but we still trip the assertion.

Fix the problem by reducing maxlen by any misalignment with prod.  While
we're at it, split the assertions into two so that we can tell which
value had the bad alignment.

Fixes: 2a6ca4baed ("xfs: make sure the rt allocator doesn't run off the end")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:24:22 -07:00
Darrick J. Wong
ddd98076d5 xfs: fix units conversion error in xfs_bmap_del_extent_delay
The unit conversions in this function do not make sense.  First we
convert a block count to bytes, then divide that bytes value by
rextsize, which is in blocks, to get an rt extent count.  You can't
divide bytes by blocks to get a (possibly multiblock) extent value.

Fortunately nobody uses delalloc on the rt volume so this hasn't
mattered.

Fixes: fa5c836ca8 ("xfs: refactor xfs_bunmapi_cow")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:23:49 -07:00
Darrick J. Wong
c2988eb5cf xfs: rt stubs should return negative errnos when rt disabled
When realtime support is not compiled into the kernel, these functions
should return negative errnos, not positive errnos.  While we're at it,
fix a broken macro declaration.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:22:40 -07:00
Darrick J. Wong
b73494fa9a xfs: prevent rt growfs when quota is enabled
Quotas aren't (yet) supported with realtime, so we shouldn't allow
userspace to set up a realtime section when quotas are enabled, even if
they attached one via mount options.  IOWS, you shouldn't be able to do:

# mkfs.xfs -f /dev/sda
# mount /dev/sda /mnt -o rtdev=/dev/sdb,usrquota
# xfs_growfs -r /mnt

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
2023-10-17 16:22:40 -07:00
Rob Herring
0e533cba38 dt-bindings: ata: tegra: Disallow undefined properties
Device specific bindings should not allow undefined properties. This is
accomplished in json-schema with 'additionalProperties: false'.

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
2023-10-18 08:07:30 +09:00
Michael Ellerman
20045f0155 powerpc/64s/radix: Don't warn on copros in radix__tlb_flush()
Sachin reported a warning when running the inject-ra-err selftest:

  # selftests: powerpc/mce: inject-ra-err
  Disabling lock debugging due to kernel taint
  MCE: CPU19: machine check (Severe)  Real address Load/Store (foreign/control memory) [Not recovered]
  MCE: CPU19: PID: 5254 Comm: inject-ra-err NIP: [0000000010000e48]
  MCE: CPU19: Initiator CPU
  MCE: CPU19: Unknown
  ------------[ cut here ]------------
  WARNING: CPU: 19 PID: 5254 at arch/powerpc/mm/book3s64/radix_tlb.c:1221 radix__tlb_flush+0x160/0x180
  CPU: 19 PID: 5254 Comm: inject-ra-err Kdump: loaded Tainted: G   M        E      6.6.0-rc3-00055-g9ed22ae6be81 #4
  Hardware name: IBM,9080-HEX POWER10 (raw) 0x800200 0xf000006 of:IBM,FW1030.20 (NH1030_058) hv:phyp pSeries
  ...
  NIP radix__tlb_flush+0x160/0x180
  LR  radix__tlb_flush+0x104/0x180
  Call Trace:
    radix__tlb_flush+0xf4/0x180 (unreliable)
    tlb_finish_mmu+0x15c/0x1e0
    exit_mmap+0x1a0/0x510
    __mmput+0x60/0x1e0
    exit_mm+0xdc/0x170
    do_exit+0x2bc/0x5a0
    do_group_exit+0x4c/0xc0
    sys_exit_group+0x28/0x30
    system_call_exception+0x138/0x330
    system_call_vectored_common+0x15c/0x2ec

And bisected it to commit e43c0a0c3c ("powerpc/64s/radix: combine
final TLB flush and lazy tlb mm shootdown IPIs"), which added a warning
in radix__tlb_flush() if mm->context.copros is still elevated.

However it's possible for the copros count to be elevated if a process
exits without first closing file descriptors that are associated with a
copro, eg. VAS.

If the process exits with a VAS file still open, the release callback
is queued up for exit_task_work() via:
  exit_files()
    put_files_struct()
      close_files()
        filp_close()
          fput()

And called via:
  exit_task_work()
    ____fput()
      __fput()
        file->f_op->release(inode, file)
          coproc_release()
            vas_user_win_ops->close_win()
              vas_deallocate_window()
                mm_context_remove_vas_window()
                  mm_context_remove_copro()

But that is after exit_mm() has been called from do_exit() and triggered
the warning.

Fix it by dropping the warning, and always calling __flush_all_mm().

In the normal case of no copros, that will result in a call to
_tlbiel_pid(mm->context.id, RIC_FLUSH_ALL) just as the current code
does.

If the copros count is elevated then it will cause a global flush, which
should flush translations from any copros. Note that the process table
entry was cleared in arch_exit_mmap(), so copros should not be able to
fetch any new translations.

Fixes: e43c0a0c3c ("powerpc/64s/radix: combine final TLB flush and lazy tlb mm shootdown IPIs")
Reported-by: Sachin Sant <sachinp@linux.ibm.com>
Closes: https://lore.kernel.org/all/A8E52547-4BF1-47CE-8AEA-BC5A9D7E3567@linux.ibm.com/
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Tested-by: Sachin Sant <sachinp@linux.ibm.com>
Link: https://msgid.link/20231017121527.1574104-1-mpe@ellerman.id.au
2023-10-18 09:45:52 +11:00
Srinivas Pandruvada
a590ed6226 tools/power/x86/intel-speed-select: v1.18 release
This version addresses issues with:
- When CPU 0 hotplug is not possible, try cgroup v2 isolation
without any user input
- Fix turbo mode enable/disable swapped
- Sanitize command line integer and hex arguments
- Add more error messages
- Increase CPU count in one request

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
2023-10-17 14:54:44 -07:00
Paolo Bonzini
2e9064facc x86/microcode/amd: Fix snprintf() format string warning in W=1 build
Building with GCC 11.x results in the following warning:

  arch/x86/kernel/cpu/microcode/amd.c: In function ‘find_blobs_in_containers’:
  arch/x86/kernel/cpu/microcode/amd.c:504:58: error: ‘h.bin’ directive output may be truncated writing 5 bytes into a region of size between 1 and 7 [-Werror=format-truncation=]
  arch/x86/kernel/cpu/microcode/amd.c:503:17: note: ‘snprintf’ output between 35 and 41 bytes into a destination of size 36

The issue is that GCC does not know that the family can only be a byte
(it ultimately comes from CPUID).  Suggest the right size to the compiler
by marking the argument as char-size ("hh").  While at it, instead of
using the slightly more obscure precision specifier use the width with
zero padding (over 23000 occurrences in kernel sources, vs 500 for
the idiom using the precision).

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Closes: https://lore.kernel.org/oe-kbuild-all/202308252255.2HPJ6x5Q-lkp@intel.com/
Link: https://lore.kernel.org/r/20231016224858.2829248-1-pbonzini@redhat.com
2023-10-17 23:51:58 +02:00
Jens Axboe
5bc8f147dc nvme updates for Linux 6.7
- nvme-auth updates (Mark)
  - nvme-tcp tls (Hannes)
  - nvme-fc annotaions (Kees)
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE3Fbyvv+648XNRdHTPe3zGtjzRgkFAmUu9cgACgkQPe3zGtjz
 RglG7hAA0BT8DvAXH2Zdm5RQe3Anasnhs6xxpV4gYxGSJtucJb1qdUZwnANfLCqZ
 gIBPM0MtLfNfLfwuU9jmZNPlWeICZuEliM4P0wEQSrC07nHedY9PdYYVLwoVhz+8
 OwwQUs0Sglb/7+2Vu5WnRET03RQ4q0fasIJdA/N107t9uxSiFSLktiXo5oTyg4u1
 vcSmOZyrpZlnlVx1qicvcAk9nIxRJ90NPBl+hSKNPiNJ9nLiexQL+Xg8TPt/KBkR
 XSJD+5B0Hc1CLCwbsyAmKsQb/P0VronQYppqVQN6Uowds92Jqc0YLuGvZu6JRcuf
 8pbzjBKWIKkGHUr5mIJi2Lanx/z7wE0m+c2unESy0BBzHMw1BjMvMOmZE4rVY+qt
 DtKKQFMbMWO8xivE/JbgFAOjdVykBxb2LEeo4lCt6czcUZ8vwYkiJv1DSOAxxIq4
 GCtYjBKa1Dm0Zf3bFO5KcqUUX8czM+LSEudQCozMPVJSklIp8ZIRKgJXVeqH1a+S
 vCr5XfQ7mr+JLplQEse1kDy5XLApF4PDrQuqtm4XITCC8f0Yit5AcGMzzEjIyQDC
 L1fzxybiXUKDfRKla0AIvagGhpUItafAdJP9UscWHDvGMsxw4HaxWD18PpE/DwK4
 MNytlK9uCRRdx2zLlL5RIC4GJ0/xnTcJbhXjrZjyuuG3HsVZ9gA=
 =8yD7
 -----END PGP SIGNATURE-----

Merge tag 'nvme-6.7-2023-10-17' of git://git.infradead.org/nvme into for-6.7/block

Pull NVMe updates from Keith:

"nvme updates for Linux 6.7

 - nvme-auth updates (Mark)
 - nvme-tcp tls (Hannes)
 - nvme-fc annotaions (Kees)"

* tag 'nvme-6.7-2023-10-17' of git://git.infradead.org/nvme: (24 commits)
  nvme-auth: allow mixing of secret and hash lengths
  nvme-auth: use transformed key size to create resp
  nvme-auth: alloc nvme_dhchap_key as single buffer
  nvmet-tcp: use 'spin_lock_bh' for state_lock()
  nvme: rework NVME_AUTH Kconfig selection
  nvmet-tcp: peek icreq before starting TLS
  nvmet-tcp: control messages for recvmsg()
  nvmet-tcp: enable TLS handshake upcall
  nvmet: Set 'TREQ' to 'required' when TLS is enabled
  nvmet-tcp: allocate socket file
  nvmet-tcp: make nvmet_tcp_alloc_queue() a void function
  nvmet: make TCP sectype settable via configfs
  nvme-fabrics: parse options 'keyring' and 'tls_key'
  nvme-tcp: improve icreq/icresp logging
  nvme-tcp: control message handling for recvmsg()
  nvme-tcp: enable TLS handshake upcall
  nvme-tcp: allocate socket file
  security/keys: export key_lookup()
  nvme-keyring: implement nvme_tls_psk_default()
  nvme-tcp: add definitions for TLS cipher suites
  ...
2023-10-17 15:20:14 -06:00
Arnd Bergmann
40fa0489a2 Amlogic defconfig changes for v6.7:
- add various drivers for Amlogic based boards
   - KEYBOARD_GPIO_POLLED=m used to support buttons on pre-G12A boards
   - KHADAS_MCU_FAN_THERMAL=m & MFD_KHADAS_MCU=m to control FAN over the MCU on Khadas VIM boards
   - MEDIA_CEC_SUPPORT=y & CEC_MESON_G12A_AO=m to enable the CEC bus
   - RTC_DRV_PCF8563=m to enable support for RTC on most SBC boards
   - VIDEO_MESON_VDEC=m to enable HW Video Decoder
   - MESON_DDR_PMU=m to enable DDR PMU perf driver on G12A & SM1 SoCs
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEPVPGJshWBf4d9CyLd9zb2sjISdEFAmUs9FsACgkQd9zb2sjI
 SdHDtw//dmJ/uEinGJdn1Ub081qgIzaDQ4qhOtnFXBnt/NtNplMMVVqgEcrdzkjq
 c5H03X//51yxdBEm7R1oNXXjvHTIZ5G9WQptLpikw62Qr1aLKA3KnhpVVKYo3ELd
 5rSmkfEcLtp40heiSHaikx+Uj6zJQRFGORMsRCYaWKaedkMcNRItg37SNlZGywOf
 pFB+eSqNQw2k4UjYz2qO88WlUv77kUYkG/WzVr+9K1c3K1VWt9iwFFlUZhnK9dVn
 Vh99/Ma7JO3ZSDdbriVT3h4hDgKOJBC9Zwt7io30P4WkVB+MY0PnrT+0UFnGn558
 RMisSYnf9mxRw6krGW4rKcF9eigWylJfler/xAK+h6jg/i7/cdO0o7LHzBxcRUFC
 P7mLBJUTUKYCn3RRKNE16wq0S/3lM1gEszzTBctoFyLwMbnzhUxox4+r8gnPZlZl
 8cHL9L6NXZ/2kGBJBWj1lHypkgLQgQYxxXfXjqK+1qpDlyR6lz94Wgk+gdMKmaLY
 BW/5ZG76odgKZDxb4nyioNSV1YlcxPE6zvqi5gIa2t5o752X3UZLnbZ4YRPIWjD0
 hC7ihyeXCy6vlEDOr4KUBGZS0nNaZorU2CWHr5n27dImBZ7KKQnrvDjgmHTfdHGo
 5GgUoQC6H57WAlJS+wx6+MNGhhXUo2Y1dPMHcvMUCxSqXD0/GYM=
 =dyV8
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu+oAACgkQYKtH/8kJ
 UiehghAAlGTAQXqStNS4kFuXwDKkDgHErTmwS995YK9QH9h9CSH3I6tjohpYc5gp
 zopY7o/rpXzCRLBHaRUn9efbI7wjXZwFSLkW3jJbwDVUM7/SVitUBEA9PXstplV8
 VVze/9nlcyiqI5yXR8KIoUnrsL9ImFpmbXK/NJFKAHoJM7S7nuqir4uFCe8lrGRo
 hLEeCe5clGxaM+dwQzJucVNCDIUEFEfXPYo8IdKF42jk+s3zjUSVamXMfGSfJZJb
 2OFA2FIEtfmoR9FWQC/0Z7wQBHYbhHK42vQyRN2iSnIhQLwmw6QdYGjBxlmvD12N
 vhMGUcBRof4MSKV89JrFFQ+6xMPK9nwPC0JbVcN/yq+IQCcLW4puSz9HScFaBj7g
 HdRTvMsx4z1Dq2V+G7ICbMKqRh7HGOVRnbIj67JY/nxYI5pgODUAYtVgB64jBkW7
 dVxz2WX82NGxSnfLOytJprJjEU5Uz+Y4KSEic1WL6/yqrAqfF+rIdRy0Zx29bAmU
 wEWhH/5k8lWTg2siseLojQ4DFbJShRHEED1WeTBh6iUgEyFpM3RVpo7aDUln0ujT
 R8SnlX4nqaQu4Esh5xK8oGZFJjdL5HMQCIbfuaiP5HbbbFP8fdixtcj07C2E3lsJ
 sg9rZu3x0/anUCyS7hVlYwzshvmRksoRP+rnsw+8IC9n6spm0AI=
 =1hSh
 -----END PGP SIGNATURE-----

Merge tag 'amlogic-defconfig-for-v6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux into soc/defconfig

Amlogic defconfig changes for v6.7:
- add various drivers for Amlogic based boards
  - KEYBOARD_GPIO_POLLED=m used to support buttons on pre-G12A boards
  - KHADAS_MCU_FAN_THERMAL=m & MFD_KHADAS_MCU=m to control FAN over the MCU on Khadas VIM boards
  - MEDIA_CEC_SUPPORT=y & CEC_MESON_G12A_AO=m to enable the CEC bus
  - RTC_DRV_PCF8563=m to enable support for RTC on most SBC boards
  - VIDEO_MESON_VDEC=m to enable HW Video Decoder
  - MESON_DDR_PMU=m to enable DDR PMU perf driver on G12A & SM1 SoCs

* tag 'amlogic-defconfig-for-v6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux:
  arm64: defconfig: add various drivers for Amlogic based boards

Link: https://lore.kernel.org/r/2e08bd06-09e0-4352-8207-bc3b5d26fba4@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 23:20:00 +02:00
Arnd Bergmann
0c74ef26c5 Samsung defconfig changes for v6.7
Enable several drivers for boards with Samsung Exynos ARM SoCs in
 exynos_defconfig and multi_v7_defconfig: display PHYs, AHCI DWC, TM2
 touchkey (used on ARM and ARM64 Exynos-based boards), Samsung camera
 sensors and Intersil 29018 light sensor.
 
 Enable also IIO in s5pv210_defconfig used by MAX17040 fuel gauge driver.
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEE3dJiKD0RGyM7briowTdm5oaLg9cFAmUs5ekQHGtyemtAa2Vy
 bmVsLm9yZwAKCRDBN2bmhouD14ZCD/4xfhz0I89lqfAvn38PfSZ/DbTacubF329v
 5fA57vvEAr4YPYcSOC9DfNJoAoYST1kup85DEfXltF0fOH5yWc3/JabcrgWyzCiq
 TARq+C9ImtqzINNIzG3y5xzeD/1h5fZr5JtTuqNIoDG32yByQeemM1pTBSgiz4I4
 93H642P63mXvdify2pPfNmIAp4YSqcPWdkyfsB7CRfyFa5MsdS9GhdXSfsyJMyzO
 WbteXGyzu/sA962A2XEOLo+FtvWLyFNoxVizK6YO4y6p9J7v687u2PfUDYZBj4SM
 GvbqEShAFPIy9V8xseX43RsDdx/FFjIkiyl1qELn9r3B7bmiDXj1iSf1S2XGYtjV
 3CeL4tvlSnhVpmDboOdsxnCbkDagp2v6bt5FL/BiT1cEK9Re+5HdmfCODlrjmqoz
 oXQJ5lXEaE3aRZArD866JLn+WVaszp64lUIRuQ7+uyd+BVI2jeTkuGa2sETsDTi/
 Cvc85dOAuFJ15SsiGRfurhNZhOzO0upXtBb9gKqG0DsrcDhJ+x8WeOhriHDmP3TJ
 C6KLbUoHSAb1pr8nd09f8mpkYA0emJxofmXblFXY8YDEW8HsEQf7aldHehJ+hESm
 SiKwwr59whdcV4A+N6BeZ/UG6znkT6Azld9j/3nT2VueZ6k39+hC5ygjrbAPk+Yg
 tKA3B0eS/A==
 =5Fqw
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu+jwACgkQYKtH/8kJ
 Uicz6BAAq8mhoQA7vBJqz6CA8ZITMpqEKxVTHn4ThduP34WIG8tOh1R0ftkdY2OX
 5Zk0PZTPNrt1SN8mX0UBbYjJEn/a7yBLq9u8Aj7EWA+0Mt08zQ5x2JX5cnE0Sdcy
 SPbTe3LwjYew5v6K/a/N4ic0UoCSYxUGKz10hQu8NIn0rX/oj8i6X9okcg+klxt+
 A3jzKRPawmssE5n74SUNfYGkT2xHmF3RSKq1Nm4/Y20mxvk581IX3ArDuczhEjh5
 nf6yrP0m+4mDyjo3AYjnWvW7g9vth05kYTXGWU32EPVKVuYw5XbagvH/C9MG1oy5
 r0/zz72+/rkPC9SlaZnQMOAcqNRHPVSO/2QBaykEkfbrgnXAoatzG59E6TcJy8nQ
 k5wGxC/LjytrFCVp23fgqrog777m5l3qlHA+d7QlvusKAmY3QmACVECpPAJTaZMy
 km1C1UVc7KcVYA88UZCYP0SeKirzzUnT/ddT5fshUNebNPfsjQCSuOvW8oAOnvWn
 ewXlwjI3H6hgtSBl7cXZj1ZlutazdhRqZtFRO0lMXh56xGxG44twkVg3vw00oB2f
 A8aj6bYY5J1ZDlQWIHuHxh9oZDQZZkXANwYEwC43O8d1VT8yIFwSSQVyzuNoqKyW
 EBbsTWztGrFJOdOqY9Euuzol7kswJrqlJMqtJRdQGB5QzbPXv6Q=
 =esbI
 -----END PGP SIGNATURE-----

Merge tag 'samsung-defconfig-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into soc/defconfig

Samsung defconfig changes for v6.7

Enable several drivers for boards with Samsung Exynos ARM SoCs in
exynos_defconfig and multi_v7_defconfig: display PHYs, AHCI DWC, TM2
touchkey (used on ARM and ARM64 Exynos-based boards), Samsung camera
sensors and Intersil 29018 light sensor.

Enable also IIO in s5pv210_defconfig used by MAX17040 fuel gauge driver.

* tag 'samsung-defconfig-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux:
  ARM: exynos_defconfig: add driver for ISL29018
  ARM: multi_v7_defconfig: add drivers for S5C73M3 & S5K6A3 camera sensors
  ARM: multi_v7_defconfig: add tm2-touchkey driver
  ARM: exynos_defconfig: replace SATA_AHCI_PLATFORM with AHCI_DWC driver
  ARM: multi_v7_defconfig: add AHCI_DWC driver
  ARM: multi_v7_defconfig: make Exynos related PHYs modules
  ARM: s5pv210_defconfig: enable IIO required by MAX17040

Link: https://lore.kernel.org/r/20231016072911.27148-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 23:18:52 +02:00
Arnd Bergmann
8788f221b1 ASPEED defconfig updates for 6.7
* Enable SMPro and FSI drivers, the BMC to host interfaces for Ampere
    and IBM's server processors
  * Enable IPMI SSIF, the smbus transport for IPMI
  * Disable FIRMWARE_MEMMAP, an x86 only thing
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRz6FSYRMHvZ436fLaBQBa54y6+yAUCZSyOLwAKCRCBQBa54y6+
 yEZdAQCgsBEL7Mvs0hELciXKx84XR9wKDDz+fGKiaY6DSS0hFAEAwXEF00omm6qe
 eYyJ9vtyWR7A6C7rTPxI4NUcVVagIwU=
 =RX7n
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu+gUACgkQYKtH/8kJ
 UidUCxAA4jxACgMvmllyppjFRD9dXxlyCtTDpnwLGrc9DWQ7IvMad0G4+7VbUvGQ
 Z00W6GBmSBw9+VLt2BpV3M2SOsaLA+whqUUs2CVuy6as9Qilpxh4yDvXD5o5uMY+
 ZmvpevxGsV8yVnc+TrBXaw1gt9j75VVlB0nBNaBjlLpNsNGWK9kTDlEtKlfIeZq2
 xNsbuUcv1SsKeDW2nQ6yl9vnj3jq9hBCCJ0PrS/erQgf3gRYRVy9WVO1nfUF0KSH
 mLSQu6m3Is6JBgqhfVNsz9Yml5c34o29yaOIx8cJPiGNoULk2Il24RAx6wArneNy
 wy0tPbE7vNbLRFyZSjeI0qXhzTkmZ3fWXfcIm273vvnsPR0T0KjHdbBTpsLSuQ8J
 EShuaDb2wuidlq9cePoh+7z3Jy2c2URW+2D8SDDjxyU066JCBX3eVvlj7wO36hY2
 pUe5AbsRKNPNgNVhjfAqvyyxR3wvco0q1S9lRKpe18ocTj8l1gHeZjc3lGovPF95
 zC4G3XvzwRwXQhL1qx+wr5P4sKieZ5/o0u6vL7T2PkQsfCk8nQVXB6ennl8uMUVw
 Giao+Cz8aazrioXeLHAN+aL8oWI4fSApkmxe9Nih+e9nqYmZiJWho7tDgA9cGaR5
 ICXC1Ns3/yBCoBQwx7puHjkCSWjFhRsr5STyiN8vFrnUobjbqIk=
 =lfPg
 -----END PGP SIGNATURE-----

Merge tag 'aspeed-6.7-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc into soc/defconfig

ASPEED defconfig updates for 6.7

 * Enable SMPro and FSI drivers, the BMC to host interfaces for Ampere
   and IBM's server processors
 * Enable IPMI SSIF, the smbus transport for IPMI
 * Disable FIRMWARE_MEMMAP, an x86 only thing

* tag 'aspeed-6.7-defconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/joel/bmc:
  ARM: config: aspeed: Remove FIRMWARE_MEMMAP
  ARM: config: aspeed_g5: Enable SSIF BMC driver
  ARM: config: aspeed: Add Ampere SMPro drivers
  ARM: config: aspeed: Add new FSI drivers

Link: https://lore.kernel.org/r/CACPK8XezpL-4bx0S-9t999_qde5Hik9BnuUZHcnmDHTd0KWBLA@mail.gmail.com
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 23:17:57 +02:00
Arnd Bergmann
d9195144e7 Qualcomm ARM64 defconfig updates for v6.7
This enables the NB7VPQ904M SuperSpeed redriver driver, used in SM8550,
 the LPASS pinctrl driver for SM6115 and SM8350 and the M31 USB phy
 driver found in IPQ5332.
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCAAzFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmUsSOIVHGFuZGVyc3Nv
 bkBrZXJuZWwub3JnAAoJEAsfOT8Nma3FdX0P/jd12xVPwiiP6juBqQeTVLWy0doN
 1Ir+4UdO3v9VEvMU3Cs6QnQC8dgLRi8V1qUzne7ec/KNT0Ulqw5X5j22js52Q4i9
 6i5fz9488YmWdav38JzfP3s7MAkVbs5EueKPBysfGLWmt1s4ZRT9vo93ZliGpQBo
 FT7M/ovcP/c7cF9SaCT6gXxdyNrTbPlSwEQ/jJEIOODmp0Y5Ewq4aEy+KLpOxZo/
 qU2iD58j7Wts1hDWMaZwViYUOyKG4rEfrV0RFSkJLppp8+EECf5nfKv6chMU/XQJ
 OcKoekcHBbAp2kDBCsrERLWKXw0WfcpjWTsFHDtr/XAToi+eKR/f9PbiGFWzZRTP
 SW04T+0NlpulIXJuFjvrzC0GwnIrQtR/sFFSh1K27PvlF7FMy/d/3Dcl6AtflPEq
 nwuxr4LMCXiNMQHREgtxHMABwT1F4TBgYVMqy1ep0oBr1XvFo2hPoknCZqQ57Rxb
 OWGh7wbthoguGY3fCLWOcaVRjGmkMYmsEM+aO9y8UBCNJzfw14aOe8C9jsaiKB8q
 B8kmBYn8+xbR0J25JCBMVWKWNoHzASo9X85r8MYRibYVowwRFYYVeSeeJB2iIQTy
 2HD9bezwTb3JhpqVifOmYr/AR4VENABTiAqbtVAgvoFzCw+ebJ8LBmyb94lElAVY
 unrGsyYlwPzR5wzX
 =76AT
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu+dYACgkQYKtH/8kJ
 UiezzRAAj+i9QxhL4ZO80PbNTYh58PF4PHVnk7DUUxGkPqjQp9XFG6o39iVENH+n
 JdriN5roQwCq1yXFoR7sMjmwh/oXK5BAmDIiExDDtymzzdHYqnRJqeWjlWDXKBMB
 fSrkNqcQOxiHJqYtSbgDhzSzbXCnUCxCNP9iWY9sVQIp1ktkv1kkfCkdvAw3uXHN
 8TMj8TdTxEjGILyQewSFsYzPrPai3RYSVlNfifbk1s303YYqdN6WI5RZZJowyjx9
 DMNlTnrAj40pvuEKg7OtS9M2jDqZTfbLLM0vQVGqBa+kqtK82iyIZV/ECfOYt5ps
 cxONxUS5mIhzlbPkbho298MIlEsXXZK99Cbgz4FXIEhLZWLQKTJxNxBSkcdUK3F3
 pef1kq83lOfUQRrvt5XEP5TR+YWKpIyJrdUIJT+ok/lFJdHoNq9qZYmUvsuQbXa8
 hAyvcOGNs1q8YUfoFyFJGJyCTj6QUPvSweeGj0T5xQfpoFHhTdM6tm81a6Jiov+e
 1Cil1XUtN2fR5Qu41Ui4H7kKcgIMrko37CdENkrUbmjBu9gDDuU6VdyYRXJUTu7y
 2jGfPeurS/ynX5LYubeDoQ4qRvXh2K1DkgQlH2AtoTXnOHB81uej3WZ9d8/XNlHW
 ZzJT11kLZu2Sl43XNWPqq0Kum9IPsu2D/IH/sosZIa3EbsbYSnw=
 =3jl/
 -----END PGP SIGNATURE-----

Merge tag 'qcom-arm64-defconfig-for-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/defconfig

Qualcomm ARM64 defconfig updates for v6.7

This enables the NB7VPQ904M SuperSpeed redriver driver, used in SM8550,
the LPASS pinctrl driver for SM6115 and SM8350 and the M31 USB phy
driver found in IPQ5332.

* tag 'qcom-arm64-defconfig-for-6.7' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: Enable M31 USB phy driver
  arm64: defconfig: enable Qualcomm SM6115 LPASS pinctrl
  arm64: defconfig: enable Qualcomm SM8350 LPASS pinctrl
  arm64: defconfig: enable NB7VPQ904M driver as module

Link: https://lore.kernel.org/r/20231015201812.855218-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 23:17:10 +02:00
Arnd Bergmann
9b9a5546b3 i.MX defconfig changes for 6.7:
- Enable Samsung DSIM DRM bridge driver and USB mass storage support
   in arm64 defconfig
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCgAyFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmUr5lUUHHNoYXduZ3Vv
 QGtlcm5lbC5vcmcACgkQUFdYWoewfM4oPQf/ZHGJV5jtL1BCuEmVX1lufzst63z5
 3DA353+nfDeGelyOjZmntbD+IV4MjTsD+NBWxA5hYGKtUZ4i9a2hoiIGA7Y6cdgs
 dVAmujRUm30QvUxfoIRkBrWnAkaQ3yOJOnDXDZXOoaOMIjreN+bbJ+jIzN5+WmuU
 ij8UIg2vf+xctYAVARFKAO5AXWIwgOW6xNcUcQzN/v0r0luhR13oTq+YIQpXWSFe
 h9Au29uUw1IkNeu/7wiMqJ/Lt5PQHZA9FsaoqqLtlvN8L74rBgt9JYFF1cOZU9Lc
 wgU+RzB4vnBtPv6/4a/mHxlSSW1I6mpHu/gfUBU7L9qJDEp+duMcmiZ+Zw==
 =Uz3N
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu+Z0ACgkQYKtH/8kJ
 UieDDw//aSuoxamEWkh9wyQq94nOtJaxKll/I9yc5ia2mEL/XbK86DIDA0eTfC+e
 xDJlmPisb0r3fFJxLsS4OBW9hbKQq6F1l30v0GC7DiuvAONVQcE2YC1ljuwMw/y/
 FYoNbjAbzBmOhzz4ZzwQTGIG1e3iI9uqdmy+UuQZ70tVbmxNU3ezzWHOBa+ZAlr6
 M5Ztx402hpEwmkCpGjdaQ9ENxEncPf3TLaP/29uTBBEeDtBgUUziCf6vJLeeknap
 mMrz9yNjMc24Jy8xGyfEnBhbxUq3LmXyEBZixxa8UkuECo8t/eEwaC4ghKCDu68q
 pQH31tsdt6ZnkodSiVeYELFzQhYfHVz8wPk+ZHjDRcLZ3Bj9N6hxwSUSN0S002iL
 2k9spDe832/CIvwgpJS03HUBzTW0yVsNrZ7VGs9WytVoNq4GVfHV5J25fNSq+9Id
 epE3ugPHaddL19J4PxozMF0tzBcMfxtPWh+xxfldKb8BPk9DgaqyoV6pEGmKaklG
 VMwt8VbtjZONZRvGtX1vIC0yKMLJJ3DmorsFKJz2X7WAKp4+pblOQcMfp2quViAh
 phC8y0PDkn098xGnJi453Bmiept3UYE2nx34p8j0JPRF9wu9eD48AYueVMXwQfDh
 arqQO3kqLIIoE19+KT7kFjkD6axix5pm/I3UdeesqZCjQPiKeNs=
 =ALSx
 -----END PGP SIGNATURE-----

Merge tag 'imx-defconfig-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into soc/defconfig

i.MX defconfig changes for 6.7:

- Enable Samsung DSIM DRM bridge driver and USB mass storage support
  in arm64 defconfig

* tag 'imx-defconfig-6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  arm64: defconfig: Enable Samsung DSIM driver
  arm64: defconfig: Enable CONFIG_USB_MASS_STORAGE

Link: https://lore.kernel.org/r/20231015132300.2268016-4-shawnguo@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 23:16:13 +02:00
Arnd Bergmann
ec91108949 Renesas ARM defconfig updates for v6.7 (take two)
- Enable support for the Renesas RZ/G3S (R9A08G045) SoC in the arm64
     defconfig.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZSksrwAKCRCKwlD9ZEnx
 cOKOAQDdFGlhGvTAywacSZ0v8r1xyIThTuv/CFwSwrK7JJf7ewD/QiGaUeEGvFHb
 H1cbGBr6iOyEBshZ2Tn8EQWWIZtxGww=
 =ur1F
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu+XcACgkQYKtH/8kJ
 Uifa8BAAkVs4osjmCk2ZIU5e10NhwnuACs1oLLcIV5WQFv/R7PTXeLnMq7d4rJ7G
 UHBnXAX5yo1A6QgNejSMqmmZA/T8FgO4H3T69nJ7HAavdsQgPAaykb0YlEwb/JJo
 X7338M64g+o9x881KMvx/K4cPlfWTSrj0oNINSK7se7EWG5NJGf/H98oCk4qDBtc
 YTWwi0UbOeWwb5wp4fa+2el5Hz5aj8T2lz+cXsXl5UNLIYXohQF4qfBGqSgXyL+B
 uivaH5Kkvx0qo7TfYLTWWPlUxf1w38xAjfqLzkds5rcDvsORRsr4UeK5KRC8C6Md
 ythhnPDLJC8DRPqNYn4maWvblEadzbLk+WYKUYR/pyA33ZegF56W2O7vFTZPF4jd
 8q6AY48fthqwc7PWLk3eO5QArt7RGgwexocavV33cGH4TFZZyL1jg3628ukCwybv
 r6rNXhHdJZFaDEfj27bhgBrbeW+38Hr0P0Tzqc8phlJIPzf4kg+TwuG51sX53pn8
 2/tlyGULkyhUL9m3ZIIZJpelULmETWqVGhzCtv3w3F7LMKGTtrgBUQdiK4TLcZ/4
 CB7EkGud2zHCa1/R6KzyGRR0sbxHJsED78tu/LaFM45AZpWEh6FD5Tf9R1t2gmjB
 X2L7VpWpikMXAVBdS8mSfIU7/vH4VC1r1kk9hd6bfM9GLV/sS/o=
 =q4B6
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm-defconfig-for-v6.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig

Renesas ARM defconfig updates for v6.7 (take two)

  - Enable support for the Renesas RZ/G3S (R9A08G045) SoC in the arm64
    defconfig.

* tag 'renesas-arm-defconfig-for-v6.7-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  arm64: defconfig: Enable RZ/G3S (R9A08G045) SoC

Link: https://lore.kernel.org/r/cover.1697200119.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 23:15:35 +02:00
Arnd Bergmann
22bf97fc23 Renesas ARM defconfig updates for v6.7
- Refresh shmobile_defconfig for v6.6-rc3.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCZRacWQAKCRCKwlD9ZEnx
 cB+YAQDA7eWxLNl6N7DeDRy4dVgj/w/PshDaUlEu6OJw23ByDgD+JnCUJxPO/gVa
 HbHFEXq6LPxGHFLGY78ukStlWO8EWAs=
 =gnIi
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu+TEACgkQYKtH/8kJ
 UifxqBAAikxsmYDAoj26xyfH8LbRLL2LJ4bhWf9G3r1AygeDVMOJTGkH7p1keZ89
 0GdNRiTnV3oax703dmtped/PZEFqe/ZXxQYtKvTRwhOi2RP3cLqdm4MxjL4wIQkh
 cJGhRpfzaRwGDruEjJfwSgc2Tk+mQxFgnW0hkEl/yi4NJ4Zw0SY5ukI/Pxng/Izz
 pjIpUivWie0ACgoiRLIGqULO8DqiBHf2KvUd6bajNft+Mhh5QX6heSEHNf0IURkG
 sgdfPeddyNGyyt/myIaI/oadU5w+gCSx2EB1Yrxva6m3SDQwZzgT0BTLQa1lZoZu
 Am7d/uBhoiNKtNjjl7Dwg0wBU2Jo5oUkKJkI/PY8IuS9vOmZoBeam9uXMK32jA3b
 kjIfRD5iFAQJYzCz7Ol+AhAgVMIgpOzr1lurIDfYvpf2uqLPS+mzYpdpkqfZOTuL
 BlKHcLt38uB3pyBX8OkXuUnG03ZN/I0UgHioM980kuRCVdQgdspzlntYU2mNM1sA
 Zcoi0LdjWKEB1BMO4BnFjRJf16SAYzA4tUA+odZyP9vqOzHkEKWvDRAmxhnSN6Pq
 mj2x/uKPFaC7sjtWC1nzkMelU+zspvb4uF1iH1kDbfUoURomH5Tt0UNtLNHXX+Er
 EAo9wV7Sg5vQXZxThrqp4fWurJDt0ORbc4q2nnBnjQw370BojxI=
 =H6Oo
 -----END PGP SIGNATURE-----

Merge tag 'renesas-arm-defconfig-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into soc/defconfig

Renesas ARM defconfig updates for v6.7

  - Refresh shmobile_defconfig for v6.6-rc3.

* tag 'renesas-arm-defconfig-for-v6.7-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: shmobile: defconfig: Refresh for v6.6-rc3

Link: https://lore.kernel.org/r/cover.1695985420.git.geert+renesas@glider.be
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 23:14:24 +02:00
Beau Belgrave
cf5a103c98 selftests/user_events: Fix abi_test for BE archs
The abi_test currently uses a long sized test value for enablement
checks. On LE this works fine, however, on BE this results in inaccurate
assert checks due to a bit being used and assuming it's value is the
same on both LE and BE.

Use int type for 32-bit values and long type for 64-bit values to ensure
appropriate behavior on both LE and BE.

Fixes: 60b1af8de8 ("tracing/user_events: Add ABI self-test")
Signed-off-by: Beau Belgrave <beaub@linux.microsoft.com>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-10-17 15:07:19 -06:00
Mark O'Donovan
32445526d8 nvme-auth: allow mixing of secret and hash lengths
We can now use any of the secret transformation hashes with a
secret, regardless of the secret size.
e.g. a 32 byte key with the SHA-512(64 byte) hash.

The example secret from the spec should now be permitted with
any of the following:
DHHC-1:00:ia6zGodOr4SEG0Zzaw398rpY0wqipUWj4jWjUh4HWUz6aQ2n:
DHHC-1:01:ia6zGodOr4SEG0Zzaw398rpY0wqipUWj4jWjUh4HWUz6aQ2n:
DHHC-1:02:ia6zGodOr4SEG0Zzaw398rpY0wqipUWj4jWjUh4HWUz6aQ2n:
DHHC-1:03:ia6zGodOr4SEG0Zzaw398rpY0wqipUWj4jWjUh4HWUz6aQ2n:

Note: Secrets are still restricted to 32,48 or 64 bits.

Co-developed-by: Akash Appaiah <Akash.Appaiah@dell.com>
Signed-off-by: Akash Appaiah <Akash.Appaiah@dell.com>
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2023-10-17 13:57:55 -07:00
Mark O'Donovan
f047daed17 nvme-auth: use transformed key size to create resp
This does not change current behaviour as the driver currently
verifies that the secret size is the same size as the length of
the transformation hash.

Co-developed-by: Akash Appaiah <Akash.Appaiah@dell.com>
Signed-off-by: Akash Appaiah <Akash.Appaiah@dell.com>
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2023-10-17 13:57:54 -07:00
Mark O'Donovan
3ebed3749f nvme-auth: alloc nvme_dhchap_key as single buffer
Co-developed-by: Akash Appaiah <Akash.Appaiah@dell.com>
Signed-off-by: Akash Appaiah <Akash.Appaiah@dell.com>
Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2023-10-17 13:57:54 -07:00
Hannes Reinecke
bbacf79201 nvmet-tcp: use 'spin_lock_bh' for state_lock()
nvmet_tcp_schedule_release_queue() is called from socket state
change callbacks, which may be called from an softirq context.
So use 'spin_lock_bh' to avoid a spin lock warning.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
2023-10-17 13:57:54 -07:00
David Matlack
3d30bfcbdc KVM: x86/mmu: Stop kicking vCPUs to sync the dirty log when PML is disabled
Stop kicking vCPUs in kvm_arch_sync_dirty_log() when PML is disabled.
Kicking vCPUs when PML is disabled serves no purpose and could
negatively impact guest performance.

This restores KVM's behavior to prior to 5.12 commit a018eba538 ("KVM:
x86: Move MMU's PML logic to common code"), which replaced a
static_call_cond(kvm_x86_flush_log_dirty) with unconditional calls to
kvm_vcpu_kick().

Fixes: a018eba538 ("KVM: x86: Move MMU's PML logic to common code")
Signed-off-by: David Matlack <dmatlack@google.com>
Link: https://lore.kernel.org/r/20231016221228.1348318-1-dmatlack@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
2023-10-17 13:54:52 -07:00
Arnd Bergmann
5e8a5e895a I2S pinctrl fixes, someone resurrected the rk3128 arm32 and found some
needed fixes and finally some sound fixes for the px30 ringneck som.
 -----BEGIN PGP SIGNATURE-----
 
 iQFEBAABCAAuFiEE7v+35S2Q1vLNA3Lx86Z5yZzRHYEFAmUtpaYQHGhlaWtvQHNu
 dGVjaC5kZQAKCRDzpnnJnNEdgQLWB/9ca9kQHIYW1yemzzxSI0+3Et5KKgpNPR+r
 wXHiLbofSsoWz7jz2KuTli0ghmRsmwm9tQcyjv4g2T9ValqGk0v3mASvCTMO6Net
 FhB/kbmaNToSGpYM/4R1ZC0bxB/PqNcMqkF/fqAtdTx1trRxlwSjChd0dlukU6yK
 +8jnVf3y6/L2qeNj8QhA7YQRA0xN3WRmU3SfDEPHFXNIGkDvjlkbiiH3cSWRZRgC
 JzEf/bN8e4dwj4wNOiFQpYvZ7kHISlkIfDv5G+f1fy/pzDTwmvLx9iRIDbin17hG
 CB/RsWmLhcEiWFtLOAQnF1Rcntg6etEexoG3dkDGOsDYKYBtqabd
 =rcjP
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEiK/NIGsWEZVxh/FrYKtH/8kJUicFAmUu9D8ACgkQYKtH/8kJ
 Uidj0A/9FelTTvPmCx/74GXBdzzE7QYtzFgupVMiEGhbAqqbUUN8LolgmZFszp0u
 CQILBb9GE7bucThY+L92SyuDJhlRnqJ5Xu/ODm274yVLK/V9tAPCHim2nkjR04+o
 qseTIlN6yIzkFa6ijnsd2yXo10rVmaJRBXDV+jBXxnq8W3yeXMy70oGatHebUtQc
 x0H+D0CQ/dvXrBApQ6eKOBGEJlJ7k84H8RfcCytoetaeqg96zk/N55UbaH2k89kn
 rqueJc1Y1HTAyH32Fy9SDqG2swMVMIja6/XOswyfhA3slNQY+D5XdyXRqin4G6mX
 VI8xQIqt5l9jevetKWINt2z5ingnx+qnC7jwTC/LR22wMJNWW4IyNiaGsN3uDfX7
 kRaTcWbWMCqk80wtp5d1Vm3d78eLUEflduAN8TZ/e9HqJGTebgIJRx8qbFBcjfxK
 T67c0d56Ed3oNbHcdYR7YQP91/qEJ97yFtyv4AfSbtRGnWz3guqXrHrp45p4uOGw
 QDr/7ZQl2pGQE99dpVRvib93P7XNYs+QXnJu47CESIhnpG+J3DX/eT/adGzxcW3h
 0z193vD61B4cf9exAwNS4H3lxP9qDATDovS+RWrNkfCWnarPN9eQJ3NwrZ9FkTY1
 GyovQR1EnQgCXLayspjuaOLslaVS3vbk33ibuJq8AuAxANFsd6U=
 =Y+0u
 -----END PGP SIGNATURE-----

Merge tag 'v6.6-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into arm/fixes

I2S pinctrl fixes, someone resurrected the rk3128 arm32 and found some
needed fixes and finally some sound fixes for the px30 ringneck som.

* tag 'v6.6-rockchip-dtsfixes1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  arm64: dts: rockchip: Fix i2s0 pin conflict on ROCK Pi 4 boards
  arm64: dts: rockchip: Add i2s0-2ch-bus-bclk-off pins to RK3399
  ARM: dts: rockchip: Fix timer clocks for RK3128
  ARM: dts: rockchip: Add missing quirk for RK3128's dma engine
  ARM: dts: rockchip: Add missing arm timer interrupt for RK3128
  ARM: dts: rockchip: Fix i2c0 register address for RK3128
  arm64: dts: rockchip: set codec system-clock-fixed on px30-ringneck-haikou
  arm64: dts: rockchip: use codec as clock master on px30-ringneck-haikou

Link: https://lore.kernel.org/r/1965242.usQuhbGJ8B@phil
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2023-10-17 22:53:18 +02:00
Rob Herring
692225015c
spi: stm32: Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Acked-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231017203352.2698326-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17 21:38:51 +01:00
Rob Herring
8f7e17d847
regulator: Use device_get_match_data()
Use preferred device_get_match_data() instead of of_match_device() to
get the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231017203442.2699322-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17 21:38:48 +01:00
Rob Herring
46537a8676
regulator: da9121: Use i2c_get_match_data()
Use preferred i2c_get_match_data() instead of of_match_device() to get
the driver match data. With this, adjust the includes to explicitly
include the correct headers.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231017203429.2699039-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17 21:38:47 +01:00
Rob Herring
a8b4962fbd
regulator: Drop unnecessary of_match_device() calls
If probe is reached, we've already matched the device and in the case of
DT matching, the struct device_node pointer will be set. Therefore, there
is no need to call of_match_device() in probe.

Signed-off-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20231017203507.2699826-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-10-17 21:38:46 +01:00
Rob Herring
47b8fb4aef dt-bindings: usb: ti,tps6598x: Disallow undefined properties
Device specific bindings should not allow undefined properties. This is
accomplished in json-schema with 'additionalProperties: false'. With this,
the 'connector' child node needs to be defined to prevent warnings.

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20231016155527.2973385-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
2023-10-17 15:14:36 -05:00
Daniel Borkmann
24516309e3 selftests/bpf: Add additional mprog query test coverage
Add several new test cases which assert corner cases on the mprog query
mechanism, for example, around passing in a too small or a larger array
than the current count.

  ./test_progs -t tc_opts
  #252     tc_opts_after:OK
  #253     tc_opts_append:OK
  #254     tc_opts_basic:OK
  #255     tc_opts_before:OK
  #256     tc_opts_chain_classic:OK
  #257     tc_opts_chain_mixed:OK
  #258     tc_opts_delete_empty:OK
  #259     tc_opts_demixed:OK
  #260     tc_opts_detach:OK
  #261     tc_opts_detach_after:OK
  #262     tc_opts_detach_before:OK
  #263     tc_opts_dev_cleanup:OK
  #264     tc_opts_invalid:OK
  #265     tc_opts_max:OK
  #266     tc_opts_mixed:OK
  #267     tc_opts_prepend:OK
  #268     tc_opts_query:OK
  #269     tc_opts_query_attach:OK
  #270     tc_opts_replace:OK
  #271     tc_opts_revision:OK
  Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20231017081728.24769-1-daniel@iogearbox.net
2023-10-17 12:57:43 -07:00
Reinette Chatre
41efa43124 PCI/MSI: Provide stubs for IMS functions
The IMS related functions (pci_create_ims_domain(), pci_ims_alloc_irq(),
and pci_ims_free_irq()) are not declared when CONFIG_PCI_MSI is disabled.

Provide definitions of these functions for use when callers are compiled
with CONFIG_PCI_MSI disabled.

Fixes: 0194425af0 ("PCI/MSI: Provide IMS (Interrupt Message Store) support")
Fixes: c9e5bea273 ("PCI/MSI: Provide pci_ims_alloc/free_irq()")
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/14ff656899a3757453f8584c1109d7a9b98fa258.1697564731.git.reinette.chatre@intel.com
2023-10-17 21:46:33 +02:00
Ran Xiaokai
38685e2a04 cpu/hotplug: Don't offline the last non-isolated CPU
If a system has isolated CPUs via the "isolcpus=" command line parameter,
then an attempt to offline the last housekeeping CPU will result in a
WARN_ON() when rebuilding the scheduler domains and a subsequent panic due
to and unhandled empty CPU mas in partition_sched_domains_locked().

cpuset_hotplug_workfn()
  rebuild_sched_domains_locked()
    ndoms = generate_sched_domains(&doms, &attr);
      cpumask_and(doms[0], top_cpuset.effective_cpus, housekeeping_cpumask(HK_FLAG_DOMAIN));

Thus results in an empty CPU mask which triggers the warning and then the
subsequent crash:

WARNING: CPU: 4 PID: 80 at kernel/sched/topology.c:2366 build_sched_domains+0x120c/0x1408
Call trace:
 build_sched_domains+0x120c/0x1408
 partition_sched_domains_locked+0x234/0x880
 rebuild_sched_domains_locked+0x37c/0x798
 rebuild_sched_domains+0x30/0x58
 cpuset_hotplug_workfn+0x2a8/0x930

Unable to handle kernel paging request at virtual address fffe80027ab37080
 partition_sched_domains_locked+0x318/0x880
 rebuild_sched_domains_locked+0x37c/0x798

Aside of the resulting crash, it does not make any sense to offline the last
last housekeeping CPU.

Prevent this by masking out the non-housekeeping CPUs when selecting a
target CPU for initiating the CPU unplug operation via the work queue.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ran Xiaokai <ran.xiaokai@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/202310171709530660462@zte.com.cn
2023-10-17 21:41:33 +02:00
Changbin Du
9a13ee457a perf: script: fix missing ',' for fields option
A comma is missed at the end of line.

Signed-off-by: Changbin Du <changbin.du@huawei.com>
Link: https://lore.kernel.org/r/20231017015524.797065-1-changbin.du@huawei.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
Athira Rajeev
a20fca2c5d perf tests: Fix shellcheck warning in stat_all_metricgroups
Running shellcheck on stat_all_metricgroups.sh reports
below warning:

 In ./tests/shell/stat_all_metricgroups.sh line 7:
 function ParanoidAndNotRoot()
 ^-- SC2112: 'function' keyword is non-standard. Delete it.

As per the format, "function" is a non-standard keyword that
can be used to declare functions. Fix this by removing the
"function" keyword from ParanoidAndNotRoot function

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: kjain@linux.ibm.com
Cc: maddy@linux.ibm.com
Cc: disgoel@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20231013073021.99794-4-atrajeev@linux.vnet.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
Athira Rajeev
eff65ee26e perf tests: Fix shellcheck warning in record_sideband.sh
Running shellcheck on record_sideband.sh throws below
warning:

	In tests/shell/record_sideband.sh line 25:
	  if ! perf record -o ${perfdata} -BN --no-bpf-event -C $1 true 2>&1 >/dev/null
	    ^--^ SC2069: To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify).

This shows shellcheck warning SC2069 where the redirection
order needs to be fixed. Use "cmd > /dev/null 2>&1" to fix
the redirection of perf record output

Fixes: 23b97c7ee9 ("perf test: Add test case for record sideband events")
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: disgoel@linux.vnet.ibm.com
Link: https://lore.kernel.org/r/20231013073021.99794-3-atrajeev@linux.vnet.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
Athira Rajeev
47f5693c4c perf tests: Ignore shellcheck warning in lock_contention
Running shellcheck on lock_contention.sh generates below
warning

	In tests/shell/lock_contention.sh line 36:
	   if [ `nproc` -lt 4 ]; then
		  ^-----^ SC2046: Quote this to prevent word splitting.

Here since nproc will generate a single word output
and there is no possibility of word splitting, this
warning can be ignored. Use exception for this with
"disable" option in shellcheck. This warning is observed
after commit:
"commit 29441ab3a3 ("perf test lock_contention.sh: Skip test
if not enough CPUs")"

Fixes: 29441ab3a3 ("perf test lock_contention.sh: Skip test if not enough CPUs")
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: maddy@linux.ibm.com
Cc: disgoel@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20231013073021.99794-2-atrajeev@linux.vnet.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
Athira Rajeev
f6a66ff98a tools/perf/arch/powerpc: Fix the CPU ID const char* value by adding 0x prefix
Simple expression parser test fails in powerpc as below:

    4: Simple expression parser
    test child forked, pid 170385
    Using CPUID 004e2102
    division by zero
    syntax error
    syntax error
    FAILED tests/expr.c:65 parse test failed
    test child finished with -1
    Simple expression parser: FAILED!

This is observed after commit:
'commit 9d5da30e4a ("perf jevents: Add a new expression builtin strcmp_cpuid_str()")'

With this commit, a new expression builtin strcmp_cpuid_str
got added. This function takes an 'ID' type value, which is
a string. So expression parse for strcmp_cpuid_str expects
const char * as cpuid value type. In case of powerpc, CPU IDs
are numbers. Hence it doesn't get interpreted correctly by
bison parser. Example in case of power9, cpuid string returns
as: 004e2102

cpuid of string type is expected in two cases:
1. char *get_cpuid_str(struct perf_pmu *pmu __maybe_unused);

   Testcase "tests/expr.c" uses "perf_pmu__getcpuid" which calls
   get_cpuid_str to get the cpuid string.

2. cpuid field in  :struct pmu_events_map

   struct pmu_events_map {
           const char *arch;
	   const char *cpuid;

   Here cpuid field is used in "perf_pmu__find_events_table"
   function as "strcmp_cpuid_str(map->cpuid, cpuid)". The
   value for cpuid field is picked from mapfile.csv.

Fix the mapfile.csv and get_cpuid_str function to prefix
cpuid with 0x so that it gets correctly interpreted by
the bison parser

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Tested-by: Disha Goel<disgoel@linux.ibm.com>
Cc: kjain@linux.ibm.com
Cc: maddy@linux.ibm.com
Cc: disgoel@linux.vnet.ibm.com
Cc: linuxppc-dev@lists.ozlabs.org
Link: https://lore.kernel.org/r/20231009050052.64935-1-atrajeev@linux.vnet.ibm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
Leo Yan
78efa7b411 perf cs-etm: Respect timestamp option
When users pass the option '--timestamp' or '-T' in the record command,
all events will set the PERF_SAMPLE_TIME bit in the attribution.  In
this case, the AUX event will record the kernel timestamp, but it
doesn't mean Arm CoreSight enables timestamp packets in its hardware
tracing.

If the option '--timestamp' or '-T' is set, this patch always enables
Arm CoreSight timestamp, as a result, the bit 28 in event's config is to
be set.

Before:

  # perf record -e cs_etm// --per-thread --timestamp -- ls
  # perf script --header-only
  ...
  # event : name = cs_etm//, , id = { 69 }, type = 12, size = 136,
  config = 0, { sample_period, sample_freq } = 1,
  sample_type = IP|TID|TIME|CPU|IDENTIFIER, read_format = ID|LOST,
  disabled = 1, enable_on_exec = 1, sample_id_all = 1, exclude_guest = 1
  ...

After:

  # perf record -e cs_etm// --per-thread --timestamp -- ls
  # perf script --header-only
  ...
  # event : name = cs_etm//, , id = { 49 }, type = 12, size = 136,
  config = 0x10000000, { sample_period, sample_freq } = 1,
  sample_type = IP|TID|TIME|CPU|IDENTIFIER, read_format = ID|LOST,
  disabled = 1, enable_on_exec = 1, sample_id_all = 1, exclude_guest = 1
  ...

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: James Clark <james.clark@arm.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231014074159.1667880-3-leo.yan@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
Leo Yan
f8ccc2d5cc perf cs-etm: Validate timestamp tracing in per-thread mode
So far, it's impossible to validate timestamp trace in Arm CoreSight when
the perf is in the per-thread mode.  E.g. for the command:

  perf record -e cs_etm/timestamp/ --per-thread -- ls

The command enables config 'timestamp' for 'cs_etm' event in the
per-thread mode.  In this case, the function cs_etm_validate_config()
directly bails out and skips validation.

Given profiled process can be scheduled on any CPUs in the per-thread
mode, this patch validates timestamp tracing for all CPUs when detect
the CPU map is empty.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: James Clark <james.clark@arm.com>
Acked-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231014074159.1667880-2-leo.yan@linaro.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:51 -07:00
Ian Rogers
0197da7aff perf pmu: Lazily compute default config
The default config is computed during creation of the PMU and may do
things like scanning sysfs, when the PMU may just be used as part of
scanning. Change default_config to perf_event_attr_init_default, a
callback that is used when a default config needs initializing. This
avoids holding onto the memory for a perf_event_attr and copying.

On a tigerlake laptop running the pmu-scan benchmark:

Before:
Running 'internals/pmu-scan' benchmark:
Computing performance of sysfs PMU event scan for 100 times
  Average core PMU scanning took: 28.780 usec (+- 0.503 usec)
  Average PMU scanning took: 283.480 usec (+- 18.471 usec)
Number of openat syscalls: 30,227

After:
Running 'internals/pmu-scan' benchmark:
Computing performance of sysfs PMU event scan for 100 times
  Average core PMU scanning took: 27.880 usec (+- 0.169 usec)
  Average PMU scanning took: 245.260 usec (+- 15.758 usec)
Number of openat syscalls: 28,914

Over 3 runs it is a nearly 12% reduction in execution time and a 4.3%
of openat calls.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231012175645.1849503-8-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:50 -07:00
Ian Rogers
f20c15d13f perf pmu-events: Remember the perf_events_map for a PMU
strcmp_cpuid_str performs regular expression comparisons and so per
CPUID linear searches over the perf_events_map are expensive. Add a
helper function called map_for_pmu that does the search but also
caches the map specific to a PMU. As the PMU may differ, also cache
the CPUID string so that PMUs with the same CPUID string don't require
the linear search and regular expression comparisons. This speeds
loading PMUs as the search is done once per PMU to find the
appropriate tables.

Signed-off-by: Ian Rogers <irogers@google.com>
Tested-by: Yang Jihong <yangjihong1@huawei.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231012175645.1849503-7-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:50 -07:00
Ian Rogers
63883cb063 perf pmu: Const-ify perf_pmu__config_terms
Add const to related APIs, this is so they can be used to default
initialize a perf_event_attr from a const pmu.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231012175645.1849503-6-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:50 -07:00
Ian Rogers
3a42f4c796 perf pmu: Const-ify file APIs
File APIs don't alter the struct pmu so allow const ones to be passed.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231012175645.1849503-5-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:50 -07:00
Ian Rogers
672bd21390 perf arm-spe: Move PMU initialization from default config code
Avoid setting PMU values in arm_spe_pmu_default_config, move to
perf_pmu__arch_init.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Tested-by: Leo Yan <leo.yan@linaro.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231012175645.1849503-4-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:50 -07:00
Ian Rogers
461e3e636a perf intel-pt: Move PMU initialization from default config code
Avoid setting PMU values in intel_pt_pmu_default_config, move to
perf_pmu__arch_init.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231012175645.1849503-3-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:50 -07:00
Ian Rogers
aa61360155 perf pmu: Rename perf_pmu__get_default_config to perf_pmu__arch_init
Assign default_config as part of the init. perf_pmu__get_default_config
was doing more than just getting the default config and so this is
intended to better align with the code.

Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>
Cc: James Clark <james.clark@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Link: https://lore.kernel.org/r/20231012175645.1849503-2-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2023-10-17 12:40:50 -07:00