Commit graph

1170612 commits

Author SHA1 Message Date
Pavel Begunkov b8fb5b4fdd io_uring/rsrc: use non-pcpu refcounts for nodes
One problem with the current rsrc infra is that often updates will
generates lots of rsrc nodes, each carry pcpu refs. That takes quite a
lot of memory, especially if there is a stall, and takes lots of CPU
cycles. Only pcpu allocations takes >50 of CPU with a naive benchmark
updating files in a loop.

Replace pcpu refs with normal refcounting. There is already a hot path
avoiding atomics / refs, but following patches will further improve it.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e9ed8a9457b331a26555ff9443afc64cdaab7247.1680576071.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-04 09:30:39 -06:00
Jens Axboe e3ef728ff0 io_uring: cap io_sqring_entries() at SQ ring size
We already do this manually for the !SQPOLL case, do it in general and
we can also dump the ugly min3() in io_submit_sqes().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:15 -06:00
Jens Axboe 2ad57931db io_uring: rename trace_io_uring_submit_sqe() tracepoint
It has nothing to do with the SQE at this point, it's a request
submission. While in there, get rid of the 'force_nonblock' argument
which is also dead, as we only pass in true.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:15 -06:00
Pavel Begunkov a282967c84 io_uring: encapsulate task_work state
For task works we're passing around a bool pointer for whether the
current ring is locked or not, let's wrap it in a structure, that
will make it more opaque preventing abuse and will also help us
to pass more info in the future if needed.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:15 -06:00
Pavel Begunkov 13bfa6f15d io_uring: remove extra tw trylocks
Before cond_resched()'ing in handle_tw_list() we also drop the current
ring context, and so the next loop iteration will need to pick/pin a new
context and do trylock.

The chunk removed by this patch was intended to be an optimisation
covering exactly this case, i.e. retaking the lock after reschedule, but
in reality it's skipped for the first iteration after resched as
described and will keep hammering the lock if it's contended.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:15 -06:00
Jens Axboe 07d99096e1 io_uring/io-wq: drop outdated comment
Since the move to PF_IO_WORKER, we don't juggle memory context manually
anymore. Remove that outdated part of the comment for __io_worker_idle().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:15 -06:00
Pavel Begunkov d322818ef4 io_uring: kill unused notif declarations
There are two leftover structures from the notification registration
mechanism that has never been released, kill them.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/f05f65aebaf8b1b5bf28519a8fdb350e3e7c9ad0.1679924536.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:15 -06:00
Gabriel Krisman Bertazi eb47943f22 io-wq: Drop struct io_wqe
Since commit 0654b05e7e65 ("io_uring: One wqe per wq"), we have just a
single io_wqe instance embedded per io_wq.  Drop the extra structure in
favor of accessing struct io_wq directly, cleaning up quite a bit of
dereferences and backpointers.

No functional changes intended.  Tested with liburing's testsuite
and mmtests performance microbenchmarks.  I didn't observe any
performance regressions.

Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20230322011628.23359-2-krisman@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:15 -06:00
Gabriel Krisman Bertazi dfd63baf89 io-wq: Move wq accounting to io_wq
Since we now have a single io_wqe per io_wq instead of per-node, and in
preparation to its removal, move the accounting into the parent
structure.

Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20230322011628.23359-2-krisman@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:14 -06:00
Jens Axboe fcb46c0ccc io_uring/kbuf: disallow mapping a badly aligned provided ring buffer
On at least parisc, we have strict requirements on how we virtually map
an address that is shared between the application and the kernel. On
these platforms, IOU_PBUF_RING_MMAP should be used when setting up a
shared ring buffer for provided buffers. If the application is mapping
these pages and asking the kernel to pin+map them as well, then we have
no control over what virtual address we get in the kernel.

For that case, do a sanity check if SHM_COLOUR is defined, and disallow
the mapping request. The application must fall back to using
IOU_PBUF_RING_MMAP for this case, and liburing will do that transparently
with the set of helpers that it has.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:14 -06:00
Breno Leitao e1fe7ee885 io_uring: Add KASAN support for alloc_caches
Add support for KASAN in the alloc_caches (apoll and netmsg_cache).
Thus, if something touches the unused caches, it will raise a KASAN
warning/exception.

It poisons the object when the object is put to the cache, and unpoisons
it when the object is gotten or freed.

Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20230223164353.2839177-2-leitao@debian.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:14 -06:00
Breno Leitao efba1a9e65 io_uring: Move from hlist to io_wq_work_node
Having cache entries linked using the hlist format brings no benefit, and
also requires an unnecessary extra pointer address per cache entry.

Use the internal io_wq_work_node single-linked list for the internal
alloc caches (async_msghdr and async_poll)

This is required to be able to use KASAN on cache entries, since we do
not need to touch unused (and poisoned) cache entries when adding more
entries to the list.

Suggested-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/r/20230223164353.2839177-2-leitao@debian.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:16:12 -06:00
Breno Leitao da64d6db3b io_uring: One wqe per wq
Right now io_wq allocates one io_wqe per NUMA node.  As io_wq is now
bound to a task, the task basically uses only the NUMA local io_wqe, and
almost never changes NUMA nodes, thus, the other wqes are mostly
unused.

Allocate just one io_wqe embedded into io_wq, and uses all possible cpus
(cpu_possible_mask) in the io_wqe->cpumask.

Signed-off-by: Breno Leitao <leitao@debian.org>
Link: https://lore.kernel.org/r/20230310201107.4020580-1-leitao@debian.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:21 -06:00
Jens Axboe c56e022c0a io_uring: add support for user mapped provided buffer ring
The ring mapped provided buffer rings rely on the application allocating
the memory for the ring, and then the kernel will map it. This generally
works fine, but runs into issues on some architectures where we need
to be able to ensure that the kernel and application virtual address for
the ring play nicely together. This at least impacts architectures that
set SHM_COLOUR, but potentially also anyone setting SHMLBA.

To use this variant of ring provided buffers, the application need not
allocate any memory for the ring. Instead the kernel will do so, and
the allocation must subsequently call mmap(2) on the ring with the
offset set to:

	IORING_OFF_PBUF_RING | (bgid << IORING_OFF_PBUF_SHIFT)

to get a virtual address for the buffer ring. Normally the application
would allocate a suitable piece of memory (and correctly aligned) and
simply pass that in via io_uring_buf_reg.ring_addr and the kernel would
map it.

Outside of the setup differences, the kernel allocate + user mapped
provided buffer ring works exactly the same.

Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:21 -06:00
Jens Axboe 81cf17cd3a io_uring/kbuf: rename struct io_uring_buf_reg 'pad' to'flags'
In preparation for allowing flags to be set for registration, rename
the padding and use it for that.

Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:21 -06:00
Jens Axboe 25a2c188a0 io_uring/kbuf: add buffer_list->is_mapped member
Rather than rely on checking buffer_list->buf_pages or ->buf_nr_pages,
add a separate member that tracks if this is a ring mapped provided
buffer list or not.

Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:20 -06:00
Jens Axboe ba56b63242 io_uring/kbuf: move pinning of provided buffer ring into helper
In preparation for allowing the kernel to allocate the provided buffer
rings and have the application mmap it instead, abstract out the
current method of pinning and mapping the user allocated ring.

No functional changes intended in this patch.

Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:20 -06:00
Helge Deller d808459b2e io_uring: Adjust mapping wrt architecture aliasing requirements
Some architectures have memory cache aliasing requirements (e.g. parisc)
if memory is shared between userspace and kernel. This patch fixes the
kernel to return an aliased address when asked by userspace via mmap().

Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:20 -06:00
Jens Axboe d4755e1538 io_uring: avoid hashing O_DIRECT writes if the filesystem doesn't need it
io_uring hashes writes to a given file/inode so that it can serialize
them. This is useful if the file system needs exclusive access to the
file to perform the write, as otherwise we end up with a ton of io-wq
threads trying to lock the inode at the same time. This can cause
excessive system time.

But if the file system has flagged that it supports parallel O_DIRECT
writes, then there's no need to serialize the writes. Check for that
through FMODE_DIO_PARALLEL_WRITE and don't hash it if we don't need to.

In a basic test of 8 threads writing to a file on XFS on a gen2 Optane,
with each thread writing in 4k chunks, it improves performance from
~1350K IOPS (or ~5290MiB/sec) to ~1410K IOPS (or ~5500MiB/sec).

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:20 -06:00
Jens Axboe d8aeb44a9a fs: add FMODE_DIO_PARALLEL_WRITE flag
Some filesystems support multiple threads writing to the same file with
O_DIRECT without requiring exclusive access to it. io_uring can use this
hint to avoid serializing dio writes to this inode, instead allowing them
to run in parallel.

XFS and ext4 both fall into this category, so set the flag for both of
them.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-04-03 07:14:20 -06:00
Linus Torvalds 7e364e5629 Linux 6.3-rc5 2023-04-02 14:29:29 -07:00
Linus Torvalds 6ab608fe85 for-6.3-rc4-tag
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE8rQSAMVO+zA4DBdWxWXV+ddtWDsFAmQptV0ACgkQxWXV+ddt
 WDuZ/g/8CAu7WKhj/aLsYB/xRcOcloeoUZXMhb6NUxZC14ZHrSc9rWMPF7S8T4qK
 PwoNfhROdox+laAYX2WcOgo6yZ4Rhd+yDdyqLgQIbc0q3cWfOJ/vzSkeREdNCvNW
 qTicdB59Mka0YT+BOC9em29bsxHLpEMKmg1o5tao8LCdc17jPFyPN6BYgxFfeenQ
 aetKUyosqllEBxlpJHaLG1+gKZrI2VaCyhrCEw66Mbtri5WbwN3cTJOXqNSkySDB
 JKEs3y4yMo3Xiz+UhCaq614EzX1SR15n/WP7ZvjxvlXXJ0iHp4f11zSlUnm2u+jI
 JN5lkfBorSRMowgnLWGDn5zQDKXJOk1aAWv5YgqTqpWKg6X/fHxTdt4wdCSZ08m9
 dwVWqWN2BD7jS0UT45IPsniwGI9bkLRcNUFNgbFtRD9X52U2ie/PSv9qdz9gsDLW
 5FSXv65gD+kWdkpyw7NLRtXO1FPe6wfPm5ZqecEChIQmWUiisOnJwjKlewQUdRsy
 zki4wRGxiqKgSlrxrCLs24r9291EwjR9FcBTZLrYRNbCBf32xIGG2CUhPBapx4kB
 xgMHCn5NdP/cHPxqzQNeq8z8NI4F648qr6Z2KS03rmWZv9/1xsB39NFS4qLjrOM7
 YqpNDtCGVG5HpMWzardbcZ2FdoKj+o1qCCW851y8tDCdimPhSfk=
 =v7ZW
 -----END PGP SIGNATURE-----

Merge tag 'for-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:

 - scan block devices in non-exclusive mode to avoid temporary mkfs
   failures

 - fix race between quota disable and quota assign ioctls

 - fix deadlock when aborting transaction during relocation with scrub

 - ignore fiemap path cache when there are multiple paths for a node

* tag 'for-6.3-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: ignore fiemap path cache when there are multiple paths for a node
  btrfs: fix deadlock when aborting transaction during relocation with scrub
  btrfs: scan device in non-exclusive mode
  btrfs: fix race between quota disable and quota assign ioctls
2023-04-02 10:57:12 -07:00
Javier Martinez Canillas f95b8ea79c Revert "venus: firmware: Correct non-pix start and end addresses"
This reverts commit a837e5161c, which broke probing of the venus
driver, at least on the SC7180 SoC HP X2 Chromebook:

  qcom-venus aa00000.video-codec: Adding to iommu group 11
  qcom-venus aa00000.video-codec: non legacy binding
  qcom-venus aa00000.video-codec: failed to reset venus core
  qcom-venus: probe of aa00000.video-codec failed with error -110

Matthias Kaehlcke also reported that the same change caused a regression
in SC7180 and sc7280, that prevents AOSS from entering sleep mode during
system suspend.  So let's revert this commit for now to fix both issues.

Fixes: a837e5161c ("venus: firmware: Correct non-pix start and end addresses")
Reported-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-04-02 10:47:03 -07:00
Linus Torvalds a10ca0950a Driver core fixes for 6.3-rc5
Here are 3 small changes for 6.3-rc5 semi-related to driver core stuff:
   - documentation update where we move the security_bugs file to a more
     relevant location.
   - mdt/spi-nor debugfs memory leak fix that's been floating around for
     a long time and acked by the maintainer
   - cacheinfo bugfix for a regression in 6.3-rc1
 
 All have been in linux-next with no reported problems.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCZCmVyg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ylq2ACgl6+JkJU4g8mZb1wUel8w8n9u8J8AmQE+DhVz
 ER9zOe+7njI+ZAsyUVZl
 =d5f4
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core fixes from Greg KH:
 "Here are three small changes for 6.3-rc5 semi-related to driver core
  stuff:

   - documentation update where we move the security_bugs file to a more
     relevant location.

   - mdt/spi-nor debugfs memory leak fix that's been floating around for
     a long time and acked by the maintainer

   - cacheinfo bugfix for a regression in 6.3-rc1

  All have been in linux-next with no reported problems"

* tag 'driver-core-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  cacheinfo: Fix LLC is not exported through sysfs
  Documentation/security-bugs: move from admin-guide/ to process/
  mtd: spi-nor: fix memory leak when using debugfs_lookup()
2023-04-02 10:10:16 -07:00
Linus Torvalds 95d0b9d89d powerpc fixes for 6.3 #4
- Fix a false positive warning in __pte_needs_flush() (with DEBUG_VM=y).
  - Fix oops when a PF_IO_WORKER thread tries to core dump.
  - Don't try to reconfigure VAS when it's disabled.
 
 Thanks to: Benjamin Gray, Haren Myneni, Jens Axboe, Nathan Lynch, Russell Currey.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEJFGtCPCthwEv2Y/bUevqPMjhpYAFAmQpT20THG1wZUBlbGxl
 cm1hbi5pZC5hdQAKCRBR6+o8yOGlgBHsD/kB7wxwe+h/Xddx2l9le15HfSTlVOiU
 7CO3jDYs//jt7E4ZEeHE0ppPRWcW5ICEttCrqWyT8WDfwMv7f+iBU80enZ5Rg/a7
 tX5jOel1TmsStj2bfh/myI7CX/+mEwRZ1o3J6/UgaZDlI2OLzLP/gKet3rfSh3zJ
 ilqIZxoj+ARsaYIrxnopFHmSmD5oCAsvVM6COPd3epRnIWmfd7NxtKbZU3V4WdLy
 qL9Q9Dk+RmGDSzJe1j4cRR1fA6jRIFU1WYDFz38HIVX1grFKdsm2Eeta6OXwXWGz
 TZDp82IBka6SvFkPx2RE2bGqaWbjZbA8b1mK59s5hB9trU3qFgZjoRBJoR1hp/zc
 MjfKLTxW7qC/TQAwxBKzFgTm1njRY5H5aMDnV9+6fBBC6esTgBy/la8ZygPmqWJj
 fFulUobDul9xjMg7l0CS+cjyO31Bb68fmFJOH9fmXR3fYlkP9VgJh89demD4xbMQ
 UdtAdpI8xhV98e6pX+vSlfbaeUNqzJQ7UWtr6J08nY17dhcoPxJ9RaAZdsJkZIk3
 IM/jwdhvpG++VM5CbiX+4yQHUJkekIXpfnxZIXqOl+rqv5Z0A8gRQkY469FjqZy7
 EJoYIOBGiZEgiU4oqJRkp0ifMSPMt0I0gMmRq5NxS/64mxFHlwCsJvaiHQ/fd2m8
 3DTDKQd6KOT31A==
 =1Sli
 -----END PGP SIGNATURE-----

Merge tag 'powerpc-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

 - Fix a false positive warning in __pte_needs_flush() (with DEBUG_VM=y)

 - Fix oops when a PF_IO_WORKER thread tries to core dump

 - Don't try to reconfigure VAS when it's disabled

Thanks to Benjamin Gray, Haren Myneni, Jens Axboe, Nathan Lynch, and
Russell Currey.

* tag 'powerpc-6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/pseries/vas: Ignore VAS update for DLPAR if copy/paste is not enabled
  powerpc: Don't try to copy PPR for task with NULL pt_regs
  powerpc/64s: Fix __pte_needs_flush() false positive warning
2023-04-02 10:01:56 -07:00
Linus Torvalds f7772da662 four cifs/smb3 client fixes, including two for stable
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEE6fsu8pdIjtWE/DpLiiy9cAdyT1EFAmQoaaoACgkQiiy9cAdy
 T1FBYwv/VTfy25fwnT06Zcu+gPrfXTNJmTvbf1SP6xoFrr9wTjNRh3fc8/3mbqey
 UaxAFoPOR8Pot0R9bApW2ieOKXJt3ywFxkcMUkzTMAc+LPrmzXRxpOm8MW7s5aX+
 4K1xgtnXH220WqMIDrVK4lc7oqBPSOADtiq8IO/Dy8YurRLxg1GDoAAS7QZqJ7eB
 ODVMRcjVMtQnowtcXtS6KdKROea+ZmwPvctQZGL3H2n/W4ktp+TZ2CPfSPAas5FR
 oQFEIKe31YSPD/88rkUvdxW+s/Gu5DuaGc4JzOAOtnkCxEi0ypI7GTDC/XmKulzN
 cTfrnLDPVKFVdbpgiQiEGBqLCenczqMdgnDJh0S8KIEjl/+XTyY6DlvF+FUjRJL0
 CFagDTeqO8BaQJjV8mvxLX+eH2ex4LHHOObEqKl/zPivaMTx7S0whhhrYjw6r+0T
 HmXdZr49CDIoE+v5RTsnK5Ol1mWVKQvfZJ5Uc6G/HzeV+9XUtkJI/FWH88idHO1L
 VUNqMv64
 =uCV8
 -----END PGP SIGNATURE-----

Merge tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6

Pull cifs client fixes from Steve French:
 "Four cifs/smb3 client (reconnect and DFS related) fixes, including two
  for stable:

   - DFS oops fix

   - DFS reconnect recursion fix

   - An SMB1 parallel reconnect fix

   - Trivial dead code removal in smb2_reconnect"

* tag '6.3-rc4-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
  cifs: get rid of dead check in smb2_reconnect()
  cifs: prevent infinite recursion in CIFSGetDFSRefer()
  cifs: avoid races in parallel reconnects in smb1
  cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL
2023-04-01 14:50:22 -07:00
Linus Torvalds 00c7b5f4dd Input updates for v6.3-rc4
- fixes to ALPS and Focaltech PS/2 drivers dealing with the breakage of
   switching to -funsigned-char
 
 - quirks to i8042 to better handle Lifebook A574/H and TUXEDO devices
 
 - a quirk to Goodix touchscreen driver to handle Yoga Book X90F
 
 - a fix for incorrectly merged patch to xpad game controller driver
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQST2eWILY88ieB2DOtAj56VGEWXnAUCZCiYIwAKCRBAj56VGEWX
 nBdaAP9wVmo8tMNu2pVVOKFsTfqczrHV091tXwY+IKXXaoPqKgD/ZGzBDGS8p/Yq
 /vHD6iDuPR2q7j60t8Qz6bSSMlDUmgA=
 =fFNj
 -----END PGP SIGNATURE-----

Merge tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

 - fixes to ALPS and Focaltech PS/2 drivers dealing with the breakage of
   switching to -funsigned-char

 - quirks to i8042 to better handle Lifebook A574/H and TUXEDO devices

 - a quirk to Goodix touchscreen driver to handle Yoga Book X90F

 - a fix for incorrectly merged patch to xpad game controller driver

* tag 'input-for-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: i8042 - add TUXEDO devices to i8042 quirk tables for partial fix
  Input: alps - fix compatibility with -funsigned-char
  Input: focaltech - use explicitly signed char type
  Input: xpad - fix incorrectly applied patch for MAP_PROFILE_BUTTON
  Input: goodix - add Lenovo Yoga Book X90F to nine_bytes_report DMI table
  Input: i8042 - add quirk for Fujitsu Lifebook A574/H
2023-04-01 14:09:51 -07:00
Linus Torvalds 93e2b01740 Pin control fixes for the v6.3 kernel cycle:
- Fix up the Kconfig options for MediaTek MT7981.
 
 - Fix the irq domain name in the AT91-PIO4 driver.
 
 - Fix some alternative muxing modes in the Ocelot
   driver.
 
 - Allocate the GPIO numbers dynamically in the STM32
   driver.
 
 - Disable and mask interrupts on resume in the AMD
   driver.
 
 - Fix a typo in the Qualcomm SM8550 pin control
   device tree bindings.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEElDRnuGcz/wPCXQWMQRCzN7AZXXMFAmQoWq8ACgkQQRCzN7AZ
 XXOwVA/+NQmVnGB7otNkfmqk+ZB/Wyksapv5z8+skEqLMatWuDZ77AaaX/f1d+Cm
 M3yTSk5A/qhzC0iJCtjujz+flgc6zARWFnnzyYnp+zHk/CECGQuqcw6rWw/9Ci9n
 UN9+8QhT8HkT+/4iRrBlSyFCkQmuKEFFSdCMrQIJoKEyCSlW0ihwoSzTeaBhNIIP
 JJkk1Nc/iPaqS4KmuGYbDZl8YfHgIjlh8im1WHQIAPNZG7Mw45iqkcv3W4yr5thf
 y6MflFdQa1EuPML2yYApmlI6DyWDgYpIGcwGo7svnRNQiKQ0+f3Weqzf/0943Jd/
 sj94RKN2ejeKdl3cdZ5pmbO72rzeM1YQrpQFsSM3WJoV50Y3Xse1gR+xupOKngjU
 DeimMMsKFgUhoyoqVKlsdy3SiT1/ilS0zW5srcqOHkr4tseHENaJhEjl0s9LBn0m
 uwEwbGqjEMb9Sov0F7WpIBRnIFmuq/lndls7u+xbbJromQ2C26EEht2ABomcGP4G
 bmFuESoMdcDvuifMdmsiInS239Wb15tCKWz14D1l5mL0xm0VUCnGVgq0DLOHGvQO
 XvqjL+FwHFm3fY8ML2CtTWnAmvFIK/tUZevG8t0HrSwkVb555PKso86bV9xU73Ay
 kZaV9VD6fQFZWtIVsz4ejtIe82yB2egxkoJBaSNTT/SP5qrhgeg=
 =/F9m
 -----END PGP SIGNATURE-----

Merge tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl

Pull pin control fixes from Linus Walleij:
 "Some pin control fixes for the v6.3 series.

  The most notable and urgent one is probably the AMD fix which affects
  AMD laptops, found by the Chromium people.

  Summary:

   - Fix up the Kconfig options for MediaTek MT7981

   - Fix the irq domain name in the AT91-PIO4 driver

   - Fix some alternative muxing modes in the Ocelot driver

   - Allocate the GPIO numbers dynamically in the STM32 driver

   - Disable and mask interrupts on resume in the AMD driver

   - Fix a typo in the Qualcomm SM8550 pin control device tree bindings"

* tag 'pinctrl-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  dt-bindings: pinctrl: qcom,sm8550-lpass-lpi: allow input-enabled and bias-bus-hold
  pinctrl: amd: Disable and mask interrupts on resume
  pinctrl: stm32: use dynamic allocation of GPIO base
  pinctrl: ocelot: Fix alt mode for ocelot
  pinctrl: at91-pio4: fix domain name assignment
  pinctrl: mediatek: fix naming inconsistency
  pinctrl: mediatek: add missing options to PINCTRL_MT7981
2023-04-01 09:47:08 -07:00
Linus Torvalds ce0c2375ff Kbuild fixes for v6.3 (2nd)
- Fix linux-headers debian package
 
  - Fix a merge_config.sh error due to a misspelled variable
 
  - Fix modversion for 32-bit build machines
 -----BEGIN PGP SIGNATURE-----
 
 iQJJBAABCgAzFiEEbmPs18K1szRHjPqEPYsBB53g2wYFAmQoQMQVHG1hc2FoaXJv
 eUBrZXJuZWwub3JnAAoJED2LAQed4NsGjOQP/iukRxc8pdoDXz7A98HV7KZD5HsR
 mM7HwW6U22bg8o7Z59YPb6YIlxvvVyghWAG3sRedikvPFfcxZ7j9TvStO/YtN/6J
 bMEpRwD52AanLNyVrX4W8NiISiXKF6W+KnkKsrK2Cs5m5TFmdKn+fVehqWCIbcT/
 h0NR+5t0xSi7PlHwPNhJkuyqFxmomVgfJ143UTn3H7ru0UeONGqAhuOl6RqccOen
 CK/Af4PMnlG+Z16zTM4ZW7LO6nJ2cQkXievKGj52XFUdJ0KoeB/QVlbVz111GxfZ
 jK4MqefAFklAeAdHgAJYKbvFYbllxht4c+eAp3L+RCd/JVA+Y1PhYPBELtFcl1YS
 AUOp4o51RpEy7LSCBbHfxM8mgEUgE3+GyN8ieL1dECeoBBEx5PrP5AlmnR9DzqF8
 /8I8sfId1FtYIkSBewFLYM1qM0Cn5iZW/CySJN6Fdmx4/LvUFVpQ+oupeajLkN9f
 5Pz5lWZMoDkClIYTfBi/U+nWXSGLKLIGGVEq+42X7mAR5QNUYKkR7t5JfojGoMHR
 dnMSmMLz1DXbi8Om4kNJN1Qsv7weGpF2NybhKkGRNQ51g1gwTsYYo7ZbVqJbex6x
 0Q9fKSAIn/M0rfZ7DweGGIUwuQVek3y0K6WeuJ62Zt/ltKWO9IBtPNcsnuOV761G
 z5xn5YIKUPP9vS17
 =vZOW
 -----END PGP SIGNATURE-----

Merge tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild

Pull Kbuild fixes from Masahiro Yamada:

 - Fix linux-headers debian package

 - Fix a merge_config.sh error due to a misspelled variable

 - Fix modversion for 32-bit build machines

* tag 'kbuild-fixes-v6.3-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  modpost: Fix processing of CRCs on 32-bit build machines
  scripts: merge_config: Fix typo in variable name.
  kbuild: deb-pkg: set version for linux-headers paths
2023-04-01 09:25:17 -07:00
Linus Torvalds 92367fdf3b IOMMU Fixes for Linux v6.3-rc4
Including:
 
 	- Maintainer update for S390 IOMMU driver
 
 	- A fix for the set_platform_dma_ops() call-back in the
 	  Exynos IOMMU driver
 
 	- Intel VT-d fixes from Lu Baolu:
 	  - Fix a lockdep splat
 	  - Fix a supplement of the specification
 	  - Fix a warning in perfmon code
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEr9jSbILcajRFYWYyK/BELZcBGuMFAmQoKpwACgkQK/BELZcB
 GuM4Aw//cxczRQcuEGF43yot+KRV9C3907yM3lZe8Yii/Ow6v3i/uAhic0vGLXDL
 uCGpcuBEWZdJ4C4/I7MOwuggcPql+kKYDutJ7t8c5cy/iQY9EkTC8XwG8NdePxp2
 T46dTAjlP6fyB/1hvXhjb4s8VpaHhlTfP5SnSfnH0odxGj0ZHTWTcGrrZ/szuWha
 YuIR5DSKIA2eRR/gu8kXUKaEhPZ3DUKB5kU1qQxZqZhz7tiqJOOIqT0H1kFpngNd
 pgfqGFzTLPcReSViGW7lXmKax7mUJY9NBzCrPWdvT6tZoKIgxuPc2HO+9giy70Up
 o2hgyKJXxN7988OseWMm6Xexz/jvfuTHOOfh7m+Zgxu35zcQRo2RbYy6bbuwEmw+
 3kFe9wwmJ8qULI0QdRN0k2FSAuBg2WsHRDZQgvBMXu9Q3pbBNl3Fvl7BiFOQxlqq
 Se6kwmcDUwgdWTp1FqAp/T5ireGsIEfYYDUBTA1ZZV4kXOrNEkUmvc97zqNg9Hln
 MLrLRUY3PmfhrIUSx7ywhSB248mDbDppnTAyf7sUFEArHCfI6MdvOHtKSG5/H9gQ
 1qHEW+iDv0dP8PtImCfKD+Dt7RmpkAFkBhCbZI3WI6AAQI/PD3uABmb0q5NwJxvh
 K7d84q9bi9O4l86mVl6BaCDtEOBRun0kEZ7r2653/s3B1MW+HU4=
 =ndWV
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull iommu fixes from Joerg Roedel:

 - Maintainer update for S390 IOMMU driver

 - A fix for the set_platform_dma_ops() call-back in the Exynos
   IOMMU driver

 - Intel VT-d fixes from Lu Baolu:
    - Fix a lockdep splat
    - Fix a supplement of the specification
    - Fix a warning in perfmon code

* tag 'iommu-fixes-6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug
  iommu/vt-d: Allow zero SAGAW if second-stage not supported
  iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc()
  iommu/exynos: Fix set_platform_dma_ops() callback
  MAINTAINERS: Update s390-iommu driver maintainer information
2023-04-01 09:17:33 -07:00
Arnd Bergmann 7b50567bdc media: i2c: imx290: fix conditional function defintions
The runtime suspend/resume functions are only referenced from the
dev_pm_ops, but they use the old SET_RUNTIME_PM_OPS() helper that
requires a __maybe_unused annotation to avoid a warning:

  drivers/media/i2c/imx290.c:1082:12: error: unused function 'imx290_runtime_resume' [-Werror,-Wunused-function]
  static int imx290_runtime_resume(struct device *dev)
             ^
  drivers/media/i2c/imx290.c:1090:12: error: unused function 'imx290_runtime_suspend' [-Werror,-Wunused-function]
  static int imx290_runtime_suspend(struct device *dev)
             ^

Convert this to the new RUNTIME_PM_OPS() helper that so this is not
required.  To improve this further, also use the pm_ptr() helper that
lets the dev_pm_ops get dropped entirely when CONFIG_PM is disabled.

A related mistake happened in the of_match_ptr() macro here, which like
SET_RUNTIME_PM_OPS() requires the match table to be marked as
__maybe_unused, though I could not reproduce building this without
CONFIG_OF.  Remove the of_match_ptr() here as there is no point in
dropping the match table in configurations without CONFIG_OF.

Fixes: 02852c01f6 ("media: i2c: imx290: Initialize runtime PM before subdev")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-03-31 16:10:04 -07:00
Linus Torvalds a0264d198a More NFS Client Bugfixes for Linux 6.3-rc
Bugfixes:
   * Fix shutdown of NFS TCP client sockets
   * Fix hangs when recovering open state after a server reboot
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEnZ5MQTpR7cLU7KEp18tUv7ClQOsFAmQnOw8ACgkQ18tUv7Cl
 QOvhTBAAhgxWVQkGh9Uh+b7vwBUnMenXCl2LhE9WodDgxCw4+7nQTSgW79iOKmA/
 DGQd7iBT8nksKs3hPtg8aIQLuj42F0MlVexU7mJNOeA3cTSkbLaEwRJuOo3W8eKm
 A3/DMhUmYNue5ufhYmVV/9/j6pHRgib1JaBHgWFjqtr5vmehCxweW5TpfgJer5oF
 aX5YJkPShmMAb5C7yfZ/cjooQbLi1d21wwpkLHkANOIN2JK0QNesJb4ttYFxLxPN
 BNCSY3oe/E2pcbtwZeb0Eq17m4ToHOlwdtU9JvYyrLNdrJdNEgNGzD35dQfnZG+q
 FfP6Pla3Sr8T/06t+Y4mo3EyChLsM1Kq+K6iqPhVElzGA5eFtNT3TsS0Hxa4JfP4
 sW3P4zx6Rl0oU1wPkwRonc66GjHmklHyfaXA6TeBqXpSKOXoZU5BP0tKdQ8TXZmu
 BeO37IzSfh+DZ/etl4xrVZDK1MYOPz/096RUXhMrkBRWobwSTrj5jmQtUlgGoLqv
 M1II1a4btRZ04gTl/o+eMnwR+ULp7F/Yd1hEJq1fkNhuIc8Fh+GzU/21xh2dWmsb
 83jjKURyDglKSIvP6LaqB9i1ilJS5YqnQjRKhZAWxzhHrkS9GnZZ0FV0685efvUH
 aVgctskoVrltJ7jkvn3Z2WSGhkVo/k/qvnyqqqeR8EIRXTE/3J0=
 =S4il
 -----END PGP SIGNATURE-----

Merge tag 'nfs-for-6.3-3' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull NFS client fixes from Anna Schumaker:

 - Fix shutdown of NFS TCP client sockets

 - Fix hangs when recovering open state after a server reboot

* tag 'nfs-for-6.3-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
  SUNRPC: fix shutdown of NFS TCP client socket
  NFSv4: Fix hangs when recovering open state after a server reboot
2023-03-31 13:22:14 -07:00
Linus Torvalds 5a57b48fdf platform-drivers-x86 for v6.3-4
Highlights
  -  Fix a regression in ideapad-laptop which caused the touchpad
     to stop working after a suspend/resume on some models
  -  1 other small fix and 3 hw-id additions
 
 The following is an automated git shortlog grouped by driver:
 
 asus-nb-wmi:
  -  Add quirk_asus_tablet_mode to other ROG Flow X13 models
 
 gigabyte-wmi:
  -  add support for X570S AORUS ELITE
  -  add support for B650 AORUS ELITE AX
 
 ideapad-laptop:
  -  Stop sending KEY_TOUCHPAD_TOGGLE
 
 platform/x86/intel/pmc:
  -  Alder Lake PCH slp_s0_residency fix
 -----BEGIN PGP SIGNATURE-----
 
 iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmQnLVAUHGhkZWdvZWRl
 QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9wyegf+LHKQN84DmSBInG+T21UiiIJIFZBL
 MQcbDaNOprdfSw2b/+aVp9PDsSf8QmvYiYrQeu8XWw99bL/2uUtIIDKmQSRnnzFz
 Q4oF8VxEaWwfFK4+AVd5V2lIyNGPUpkpC1ml88AsV0q5a69qvBHb8iWd4rUSyiuc
 28Q/SqE+q9YpNy1ywoWKi6raO62sdKxoG0kX8Tco6cfq372BH8PhSbj8Wcf8J5FI
 gSf8PzI7UG1koR4SWtvZheNWxAvqxIw2rB6hp+gA6Y2dhncqTQ39pHBbJswzDgRj
 kIPy3g6+HgKHNseK8NLyRZwEGOkfFbgr1XdAbAqHsiH8glm4TF35lsu+Qw==
 =yIN9
 -----END PGP SIGNATURE-----

Merge tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Hans de Goede:

 - Fix a regression in ideapad-laptop which caused the touchpad to stop
   working after a suspend/resume on some models

 - One other small fix and three hw-id additions

* tag 'platform-drivers-x86-v6.3-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
  platform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE
  platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models
  platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
  platform/x86: gigabyte-wmi: add support for B650 AORUS ELITE AX
  platform/x86/intel/pmc: Alder Lake PCH slp_s0_residency fix
2023-03-31 13:11:06 -07:00
Linus Torvalds 916fc60988 pci-v6.3-fixes-1
-----BEGIN PGP SIGNATURE-----
 
 iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAmQnBfIUHGJoZWxnYWFz
 QGdvb2dsZS5jb20ACgkQWYigwDrT+vxhcRAApsCfZxdl4AgJptBZv1SJYAKjNAua
 2klMsmeJVH4JujzyiRhZ0XUXZ5+SBoKG1fJjd8WCLZmSd9f4+eaHWpuBW9bXVo6l
 z92E01yg/couGIgXSlcVYTYSApBqT2WhBKWdrQ+ObzwEgseJCnOhmcmbocfHGrmC
 pe1PhnEeC05RO+4oQ3B2lyiZr4uQb9LNYMJf2PtaJzqmTzFV6WDaIlRt/kElOnwO
 WKYiZ7SxC2LeuE/asUlVdSqQ73JZ+ZkAzwvJxjB9CCBa1zCIdq+lJuGl/D7Hkr2W
 QuMFqE7TahACc3fM8QOMQa8cQh0i2pXYRSP2lOizCy8AMgsKtNwO/iOsqMT8AyVS
 bhns6tBQozk80FakUxOxxNFk+rxBMu87Vb0DlvoGnpNkHuliv2oixFEo7CymMCbX
 wARaJgTEbVfP0bnHGYr0pdNomYYJgqgn5OQKRqLyDKkliMiHawQ7dY4PU2Wa89Cw
 IllvA6kuaoq73grbhyIysqOWbEeH3MrMbIe2RRdzBQERhK4rcbyoureZ/DcftvWF
 nriaomaeLQykXqh5ySjRXwjWjZTe1AKafuxSpm/zeXuUfM7LUo/+1D8PazAYOojV
 Sdx+x6YImI/qYfvmH1bdY/r2Rl1pRUgMM18RSqP/tyV3A8jjHcC4FYESwP0OQoGy
 Aw2LMCRTAcPkvVM=
 =GigZ
 -----END PGP SIGNATURE-----

Merge tag 'pci-v6.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci

Pull PCI fix from Bjorn Helgaas:

 - Fix DesignWare PORT_LINK_CONTROL setup, which was corrupted when the
   DT "snps,enable-cdm-check" property was present (Yoshihiro Shimoda)

* tag 'pci-v6.3-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci:
  PCI: dwc: Fix PORT_LINK_CONTROL update when CDM check enabled
2023-03-31 13:07:01 -07:00
Linus Torvalds 3df82e4201 regulator: Deferred probe fix for v6.3
This fixes a rarely triggered issue where we would treat probe
 deferral for clocks as a fatal error in the fixed regulator,
 causing it to fail to retry when it should.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmQnBfEACgkQJNaLcl1U
 h9Cg6Qf9HaRZlxkNgaNHCFwes47S7w/+oi6B+HNY+qDi4VSNGc9rJBKeSamZyjMZ
 /pYJDmzv3KTrFztSRmQDlvVPgvEfzWWo4Kd5a5kXF0geLwOWbuvd5SRPNvLXgp2w
 PUQb6SwSbH1U6oqDVceglbCw7GZQn3LEItzgcAs8D4zmtXOs+HamQ8U8uZ+uJ78l
 Zng3MTTosh0RyAHms/KmlhYcAtKviU/XDKvX5O2NoElzuANiyEW/uPVXn5lc9O7h
 XgmnL6wPXjavGye9hK9y+3Pc3KutHnbVdi9IrJrl5wAsIADzlEHxQ3jzWbve/wMj
 nVNSI5i+NOHxSkjjaa1uvjuPp4PGpg==
 =dj55
 -----END PGP SIGNATURE-----

Merge tag 'regulator-fix-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "Deferred probe fix for v6.3.

  This fixes a rarely triggered issue where we would treat probe
  deferral for clocks as a fatal error in the fixed regulator, causing
  it to fail to retry when it should"

* tag 'regulator-fix-v6.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Handle deferred clk
2023-03-31 13:02:34 -07:00
Linus Torvalds 81409e5e48 block-6.3-2023-03-30
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmQmRdUQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgplJiEACRXtuvbLoaS1Oh9epgISnIUMJebWkvhM6l
 iNpKbbFnjkrArDZnZzpmL6FAZnRILFJ4cVM0wICiw0rTgryCn+imhJ1UBhUj1vhp
 JbP8wE3pHuHOiEnBO9OQtpWQkn9d+nlAIbuQZiR4ywEHDFiM6WDZXqlqvoqhdExK
 NYhPELrqlWSxCkQwFu4pLk3YXmlCoKeU9z2CFEnSIPqjr1m93T80aEDxKLkR7CrE
 ZWHCabVzLAvkgWifT6WEU/U5tmu8/spce/Zot8vgBYLSAUs37FGQJKc+2jTRT0lJ
 J4BgVShJUdnbU5KaCi0DcJDzQvykBD8OGYAFWmKykOJlMNZ14de8dy3DYmDxvNTl
 5QnfnH4RJBR7cWjKzEovn9lFXH9KYLHjqwrsIUumwDX/C/R3n1Te92ldO4p9nX0M
 HZirM8FKBWEJyLNF6N6XA6xyR6HuW/1w6/DC2ITgydKWuCw9l3gQizAb6G9s75Pa
 K6+qs/f56Xu/Q6Gyxel4zliYcJJCKzzaC+8F5tYLiqJlXHdOf9jCiK8uxUQ+tawz
 IK1cZC3fGw+VISDbXTA5sX35hm3rmkq9LFkXyfshYxMItxzFbo8KKH5KpvLh+i2L
 CihwT3GKw3hNLCnjQNxaL+LUchMU1pd2siX38QC7Vw4RF64s98CUgTCrXISMjJ+M
 eWLZJQAevw==
 =EjQp
 -----END PGP SIGNATURE-----

Merge tag 'block-6.3-2023-03-30' of git://git.kernel.dk/linux

Pull block fixes from Jens Axboe:

 - NVMe pull request via Christoph:
     - Mark Lexar NM760 as IGNORE_DEV_SUBNQN (Juraj Pecigos)
     - Fix a possible UAF when failing to allocate an TCP io queue (Sagi
       Grimberg)

 - MD pull request via Song:
     - Fix a null pointer deference in 6.3-rc (Yu Kuai)

 - uevent partition fix (Alyssa)

* tag 'block-6.3-2023-03-30' of git://git.kernel.dk/linux:
  nvme-tcp: fix a possible UAF when failing to allocate an io queue
  md: fix regression for null-ptr-deference in __md_stop()
  nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN
  loop: LOOP_CONFIGURE: send uevents for partitions
2023-03-31 12:35:03 -07:00
Linus Torvalds f3fa7f026e io_uring-6.3-2023-03-30
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEwPw5LcreJtl1+l5K99NY+ylx4KYFAmQmRYAQHGF4Ym9lQGtl
 cm5lbC5kawAKCRD301j7KXHgpl0vEACPcohqWcbGvxMuOwhrX5yUeRMIk/rBUOY3
 /wmToHo9N7dHZJVyOYzGXcmTvedxXB53ea0iX/SYtTSU98Ku49UnCYDaypyo6Lag
 Qi7jRYsAVRMQBg893cSNwqNpq8IMM8Lu7GDh1W8z3MYmWmyixouNAlsLcrn8r5Yd
 3zBXuk+o5wS9Rz8RHyl3PeqiOACYB8aEYebvdjqcQS8pHokkXc9uQsNh+YFXdoB6
 vg8KeBgASEGNtnjU5bA5iB8E2vcyx1j1qeFFdyIjcRs2mKAjs9qCOENZ35XKXY3i
 J6FiWPg7uq5mk6XBjQ2P9vmeetRgcQgCHmEhaBd/H9VTDAOwK4KnlCQXIbxXdjkC
 6+fIv+msldLLE/i5lF5UnmrffurcvLRS479hpZeC5UFnhVwD0v+gUcm9Y2eWEOqD
 0Vp+YgkHowdo8ZsWXOWrv8maxo3mLyHGP1juXnTbw184hcLRyyiMN8cc2o4BJ1X/
 e60tkIbVhjxNoG8Boifs0Ep6UhGc+2muEv+BnWmtf3wDSsWkye2dsyXuQEWUK+yI
 8PGRPsttG+5X7UWtI/1AV9YV/NaRDpR8LIUPG2nKRkO1QwNUW2+DE098wW2GsCZs
 KA6KrozxiLc4H36ll7JLQjNFFzDy6sjLtDoQV6XA6eFA5bmYxhzI73OC7npLRKgO
 Jnc9Rvh7Zw==
 =5IP9
 -----END PGP SIGNATURE-----

Merge tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux

Pull io_uring fixes from Jens Axboe:

 - Fix a regression with the poll retry, introduced in this merge window
   (me)

 - Fix a regression with the alloc cache not decrementing the member
   count on removal. Also a regression from this merge window (Pavel)

 - Fix race around rsrc node grabbing (Pavel)

* tag 'io_uring-6.3-2023-03-30' of git://git.kernel.dk/linux:
  io_uring: fix poll/netmsg alloc caches
  io_uring/rsrc: fix rogue rsrc node grabbing
  io_uring/poll: clear single/double poll flags on poll arming
2023-03-31 12:30:13 -07:00
Hans de Goede e3271a5917 platform/x86: ideapad-laptop: Stop sending KEY_TOUCHPAD_TOGGLE
Commit 5829f8a897 ("platform/x86: ideapad-laptop: Send
KEY_TOUCHPAD_TOGGLE on some models") made ideapad-laptop send
KEY_TOUCHPAD_TOGGLE when we receive an ACPI notify with VPC event bit 5 set
and the touchpad-state has not been changed by the EC itself already.

This was done under the assumption that this would be good to do to make
the touchpad-toggle hotkey work on newer models where the EC does not
toggle the touchpad on/off itself (because it is not routed through
the PS/2 controller, but uses I2C).

But it turns out that at least some models, e.g. the Yoga 7-15ITL5 the EC
triggers an ACPI notify with VPC event bit 5 set on resume, which would
now cause a spurious KEY_TOUCHPAD_TOGGLE on resume to which the desktop
environment responds by disabling the touchpad in software, breaking
the touchpad (until manually re-enabled) on resume.

It was never confirmed that sending KEY_TOUCHPAD_TOGGLE actually improves
things on new models and at least some new models like the Yoga 7-15ITL5
don't have a touchpad on/off toggle hotkey at all, while still sending
ACPI notify events with VPC event bit 5 set.

So it seems best to revert the change to send KEY_TOUCHPAD_TOGGLE when
receiving an ACPI notify events with VPC event bit 5 and the touchpad
state as reported by the EC has not changed.

Note this is not a full revert the code to cache the last EC touchpad
state is kept to avoid sending spurious KEY_TOUCHPAD_ON / _OFF events
on resume.

Fixes: 5829f8a897 ("platform/x86: ideapad-laptop: Send KEY_TOUCHPAD_TOGGLE on some models")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217234
Cc: stable@vger.kernel.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230330194644.64628-1-hdegoede@redhat.com
2023-03-31 19:37:18 +02:00
weiliang1503 e352d685fd platform/x86: asus-nb-wmi: Add quirk_asus_tablet_mode to other ROG Flow X13 models
Make quirk_asus_tablet_mode apply on other ROG Flow X13 devices,
which only affects the GV301Q model before.

Signed-off-by: weiliang1503 <weiliang1503@gmail.com>
Link: https://lore.kernel.org/r/20230330114943.15057-1-weiliang1503@gmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-03-31 19:36:14 +02:00
Hans de Goede 52f91e5194 platform/x86: gigabyte-wmi: add support for X570S AORUS ELITE
Add "X570S AORUS ELITE" to known working boards

Reported-by: Brandon Nielsen <nielsenb@jetfuse.net>
Link: https://lore.kernel.org/r/20230331014902.7864-1-nielsenb@jetfuse.net
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-03-31 19:31:48 +02:00
Linus Torvalds 2bac7dc169 Thermal control fixes for 6.3-rc5
- Drop two lockdep assertions producing false positive warnings from
    the sysfs-related thermal core code (Rafael Wysocki).
 
  - Fix handling of two recently added module parameters in the Intel
    powerclamp thermal driver (David Arcari).
 
  - Fix one more deadlock in the int340x thermal driver (Srinivas
    Pandruvada).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmQmsB8SHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxtrwP/iCl+ZA65cJJayfxnllw29zTMptlwt3H
 8/ymeQDBuihLEP8fbopWpxzyi7bh309+L2BAkM91GPEK/a4QiRDJsV5xOsG0lv96
 pQSqGezkNi6enOhzfqL+ouK/HCvvvb8sBj633yMkAia0sfhlsUod62kJBj9RYCnQ
 jwyy+sESlLlO3ef+ELjdYGHbK8wxafR83n6+jTZDXHTs7vX4o4C28QO29U33sUFg
 GMsKYSuIBUXiv3zzJ3Oa20b/7aSIAisqrNFWxOmDpIILuWFNYlOzIuYEuSXoHG5v
 VPWRku5Jy5gQCFL4oVrzgTfpwAj+B+Rt3YWH0OZc768eCRsD/NgSa2oO9gEJPeqO
 e3FyOFLKJR4HKM7KDk7TmROQUJDP43pM40V9jxY3BMYJ0PvNN3Ks70hqxjVLbPvu
 /3m87q8sjqAUzjmDnGJcECjmpIRiu2wAU/MYu9O4pftU7UOCGo+nTiBKRrUzECH5
 0i/CdXPWIwc4jMpmj0eZfPTEF8RQ8rnxGA2/pPclOyfzLF673VmHQCmIKsZiZmei
 6i95PvM5F3y/IaJittG/enJyoqN7RbUflZ2kT4LO1dtP4RNurDUqDWXYMOSmnJ+J
 fK6WpPRZVHkvF02Qw7dCKBMc2vomuLaIc8tXgGI1PG49Sm9dY6bsbSA2jQX9zbT6
 PBwLhuMQejR3
 =s833
 -----END PGP SIGNATURE-----

Merge tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull thermal control fixes from Rafael Wysocki:
 "These remove two recently added excessive lockdep assertions from the
  sysfs-related thermal code and fix two issues in Intel thermal
  drivers.

  Specifics:

   - Drop two lockdep assertions producing false positive warnings from
     the sysfs-related thermal core code (Rafael Wysocki)

   - Fix handling of two recently added module parameters in the Intel
     powerclamp thermal driver (David Arcari)

   - Fix one more deadlock in the int340x thermal driver (Srinivas
     Pandruvada)"

* tag 'thermal-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  thermal: intel: powerclamp: Fix cpumask and max_idle module parameters
  thermal: intel: int340x: processor_thermal: Fix additional deadlock
  thermal: core: Drop excessive lockdep_assert_held() calls
2023-03-31 10:23:27 -07:00
Linus Torvalds f964333194 ACPI fix for 6.3-rc5
Fix a recent regression related to the handling of ACPI notifications
 that made it more likely for ACPI driver callbacks to be invoked in an
 unexpected order and NULL pointers can be dereferenced as a result or
 similar.
 
 The fix is to modify the global ACPI notification handler so it does not
 invoke driver callbacks at all and allow the device-level notification
 handlers to receive "system" notifications (for the drivers that want to
 receive them).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmQmsJsSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxUAQP/A18jT8RI0VOrKC9z+fkbH/7xPO+jRri
 csgPO0xsDSTNPkEm7ISSbDtdcdd0d/oNcAmXffEtYO4jsjUrZIEdphJ0/w7+tNPn
 yhYSMMcQ5ev/AmG21MFN9G8NMqLz8oyAq+2FFVA4ZmglJg+Fn6JqftilamxHGCmK
 eGVzZIypCHHWR932wGVb6uo79jMabHXASqIq3tW9uJfXGGTYGUB6qgVIyV67mBEf
 KhugqKJQT0wIDnZyyX0DKpvI4JaWx1fKVQFrZKNzYFIuvLsCFL8hfRQxKCPrXReO
 qf3WSXWx45Ox4DkhWoUmOMpmqJcA0q2uiv2hTkLzn6cGmqHSIgcrArezgHvZpQGo
 j7ZJjNoA3PMKEV2FUE+VDROTxIAXG6nbKl1fS6GwnhyNEkHyQq93bvu1pO73kBWQ
 E26cGWfA0uUgzigrx6QcCRITweKRkc/SFgKB4RW5J69x6qt22KDNt//fH2RvfHhV
 sGee7MLZE1hdwdVx2imrI65CvUErXYDMCEN2Mt2WD32O6pcQGPjQrFUYec1sE8bp
 fOKy65VS2l6ERq8iJWsmR+q1twTIa/c/wJOxt8GCZ+CZUlgeAm2Vu867jbQc6keN
 nGeCHj8JjI8faKSwjm4P7qI532yTofD7siK/cYp0moqyPGA6Mgpn7hyyHBhMyY3G
 bEryoX6zWaWS
 =kTJN
 -----END PGP SIGNATURE-----

Merge tag 'acpi-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Fix a recent regression related to the handling of ACPI notifications
  that made it more likely for ACPI driver callbacks to be invoked in an
  unexpected order and NULL pointers can be dereferenced as a result or
  similar.

  The fix is to modify the global ACPI notification handler so it does
  not invoke driver callbacks at all and allow the device-level
  notification handlers to receive "system" notifications (for the
  drivers that want to receive them)"

* tag 'acpi-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: bus: Rework system-level device notification handling
2023-03-31 10:18:56 -07:00
Linus Torvalds 39f692125c RISC-V Fixes for 6.3-rc5
* A fix for FPU probing in XIP kernels.
 * Always enable the alternative framework for non-XIP kernels.
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmQm9ToTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRAuExnzX7sYib30D/0ccbYz0wflpuRaH1Rx011HaI+PeqA0
 b/yG9Wq0xCS/iIAFgH97sMj8DQMsUb6Gut64kiG0rn7S29jg/t7UMTPHsXWLdhzk
 +deyPYQdmOLl30OIVxCLFRCQGUxv8fS0UAAbS0AbrXqiqym/7NEigPXS1ny46hxJ
 vB1xJxDc3Z78dlANdyuD9jnTrdagtPlQgsdeKqtGkx/EehrgQiR3ap9emjjCaVQp
 jFcRlcDP0G0LSeJusDA58ufZggpjrB77yVeREBD0kZ8ukeGcMtCXsRje1qTH1vkc
 ngYzgr0IVasugZK48ErnPirgjy2dOycEprWH7qixR2Kly0E5xxY3gCO1xEj2skbL
 kA36S6zMvPUv8h9f2313zDv7oZKr+iSnhKB2OWSzctIYQeoHBKNyzeqi0Hb44Sa9
 BtwO6yxQ3KOlX+LUjT8Us2ZoRF+lPIADHvORHJPr5LsJeLR83PoGJc5PZmi++6qA
 CHn0ap1Ob6N9jwH5quBr6O3TQjM78i1r/U4Vh7FR7xXAN/peNJ6MFsXnmJo91adn
 Q+lzR4gcsxjrWHAcS0d7cAoNdwE6oPhEdgcMrADy8d3g2MJw+oX2e2333fw7CLeh
 ZXM/Tq+0CW0QPY4XI/LWvb2aeuUUdGJFiLrASAHCxO+gK0sIhLqjqLk7DJ3+Tz9g
 Z79aVHpliwj11A==
 =rwtl
 -----END PGP SIGNATURE-----

Merge tag 'riscv-for-linus-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux

Pull RISC-V fixes from Palmer Dabbelt:

 - A fix for FPU probing in XIP kernels

 - Always enable the alternative framework for non-XIP kernels

* tag 'riscv-for-linus-6.3-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/riscv/linux:
  RISC-V: always select RISCV_ALTERNATIVE for non-xip kernels
  RISC-V: add non-alternative fallback for riscv_has_extension_[un]likely()
2023-03-31 10:15:17 -07:00
Linus Torvalds 52f1959502 Fix to avoid crash on BCM6358 platforms
-----BEGIN PGP SIGNATURE-----
 
 iQJOBAABCAA4FiEEbt46xwy6kEcDOXoUeZbBVTGwZHAFAmQmmcQaHHRzYm9nZW5k
 QGFscGhhLmZyYW5rZW4uZGUACgkQeZbBVTGwZHCQyA//YQvtXmEvmxPE5u1+hd5N
 AhBJl8tXp9ciOonMdBOaTGXS58lfkqIR15w3jbVslvh7kzOHSSq6CEyzDramNYsT
 8ZxgM/H4Z8Z/jCq+YTJ3AKG8io5VEaIUJNtGHDzwA9e5QYlJeOM/rMZSMXSM5Cvh
 aV3X5O2X+6cyKHIzrYhvHgvD2X6ANgc3aAzno/pmI/+hPJ1i7dXrKp/53uYGynpy
 xFmZh35DJPxFnyJBCEV2evjjqsZPwdPX63R9jNKeg9Bu16FjQpWD+/LdtIdJyFhs
 hwR1TsYM3Z02dJZJoe6LOAvAfkaOVvyZY9mJJ8pBwdEBDKFD0HoIHY1tfVxReyIc
 SAEaOG6lKnfNMa2SBz9yNN02AJmQTw1aLhKNtnM6Wg84WDCR1vzIdAWwetoxaWsX
 7/lvs90fPgvYkc1ACHSKzq1Xg+qLZWej1yJrOi611IvTbI5ut6esbQ1NKBpBqe5Y
 D6FRv90XOVttqeXyW63xFVKg2JiEd/L6iaJBBf5zamRt1wdcQJjEy8/0su3jF9wa
 px4wuBb0ez+B/29c/Gtqe+C/XtwJo9Utg174Vgx8FzrczLlvdJlXkW7rMRRuBqZf
 OlotzWrgFyvmPUzcBXo8HeyzdPvEH9OGACA73lMQzI4qGVyoPozfrBE/ytqKk/+G
 qyP8EBjtr62pdS9xLCEK23Y=
 =SHs/
 -----END PGP SIGNATURE-----

Merge tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux

Pull MIPS fix from Thomas Bogendoerfer:
 "Fix to avoid crash on BCM6358 platforms"

* tag 'mips-fixes_6.3_1' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
  mips: bmips: BCM6358: disable RAC flush for TP1
2023-03-31 10:12:07 -07:00
Rafael J. Wysocki 896c5150ed Merge branch 'thermal-intel-fixes'
Merge Intel thermal driver fixes for 6.3-rc5:

 - Fix handling of two recently added module parameters in the Intel
   powerclamp thermal driver (David Arcari).

 - Fix one more deadlock in the int340x thermal driver (Srinivas
   Pandruvada).

* thermal-intel-fixes:
  thermal: intel: powerclamp: Fix cpumask and max_idle module parameters
  thermal: intel: int340x: processor_thermal: Fix additional deadlock
2023-03-31 12:02:46 +02:00
Kan Liang 16812c9655 iommu/vt-d: Fix an IOMMU perfmon warning when CPU hotplug
A warning can be triggered when hotplug CPU 0.
$ echo 0 > /sys/devices/system/cpu/cpu0/online

 ------------[ cut here ]------------
 Voluntary context switch within RCU read-side critical section!
 WARNING: CPU: 0 PID: 19 at kernel/rcu/tree_plugin.h:318
          rcu_note_context_switch+0x4f4/0x580
 RIP: 0010:rcu_note_context_switch+0x4f4/0x580
 Call Trace:
  <TASK>
  ? perf_event_update_userpage+0x104/0x150
  __schedule+0x8d/0x960
  ? perf_event_set_state.part.82+0x11/0x50
  schedule+0x44/0xb0
  schedule_timeout+0x226/0x310
  ? __perf_event_disable+0x64/0x1a0
  ? _raw_spin_unlock+0x14/0x30
  wait_for_completion+0x94/0x130
  __wait_rcu_gp+0x108/0x130
  synchronize_rcu+0x67/0x70
  ? invoke_rcu_core+0xb0/0xb0
  ? __bpf_trace_rcu_stall_warning+0x10/0x10
  perf_pmu_migrate_context+0x121/0x370
  iommu_pmu_cpu_offline+0x6a/0xa0
  ? iommu_pmu_del+0x1e0/0x1e0
  cpuhp_invoke_callback+0x129/0x510
  cpuhp_thread_fun+0x94/0x150
  smpboot_thread_fn+0x183/0x220
  ? sort_range+0x20/0x20
  kthread+0xe6/0x110
  ? kthread_complete_and_exit+0x20/0x20
  ret_from_fork+0x1f/0x30
  </TASK>
 ---[ end trace 0000000000000000 ]---

The synchronize_rcu() will be invoked in the perf_pmu_migrate_context(),
when migrating a PMU to a new CPU. However, the current for_each_iommu()
is within RCU read-side critical section.

Two methods were considered to fix the issue.
- Use the dmar_global_lock to replace the RCU read lock when going
  through the drhd list. But it triggers a lockdep warning.
- Use the cpuhp_setup_state_multi() to set up a dedicated state for each
  IOMMU PMU. The lock can be avoided.

The latter method is implemented in this patch. Since each IOMMU PMU has
a dedicated state, add cpuhp_node and cpu in struct iommu_pmu to track
the state. The state can be dynamically allocated now. Remove the
CPUHP_AP_PERF_X86_IOMMU_PERF_ONLINE.

Fixes: 46284c6ceb ("iommu/vt-d: Support cpumask for IOMMU perfmon")
Reported-by: Ammy Yi <ammy.yi@intel.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20230328182028.1366416-1-kan.liang@linux.intel.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230329134721.469447-4-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-03-31 10:06:16 +02:00
Lu Baolu bfd3c6b9fa iommu/vt-d: Allow zero SAGAW if second-stage not supported
The VT-d spec states (in section 11.4.2) that hardware implementations
reporting second-stage translation support (SSTS) field as Clear also
report the SAGAW field as 0. Fix an inappropriate check in alloc_iommu().

Fixes: 792fb43ce2 ("iommu/vt-d: Enable Intel IOMMU scalable mode by default")
Suggested-by: Raghunathan Srinivasan <raghunathan.srinivasan@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230318024824.124542-1-baolu.lu@linux.intel.com
Link: https://lore.kernel.org/r/20230329134721.469447-3-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-03-31 10:06:15 +02:00
Lu Baolu c7d624520c iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc()
The global rwsem dmar_global_lock was introduced by commit 3a5670e8ac
("iommu/vt-d: Introduce a rwsem to protect global data structures"). It
is used to protect DMAR related global data from DMAR hotplug operations.

Using dmar_global_lock in intel_irq_remapping_alloc() is unnecessary as
the DMAR global data structures are not touched there. Remove it to avoid
below lockdep warning.

 ======================================================
 WARNING: possible circular locking dependency detected
 6.3.0-rc2 #468 Not tainted
 ------------------------------------------------------
 swapper/0/1 is trying to acquire lock:
 ff1db4cb40178698 (&domain->mutex){+.+.}-{3:3},
   at: __irq_domain_alloc_irqs+0x3b/0xa0

 but task is already holding lock:
 ffffffffa0c1cdf0 (dmar_global_lock){++++}-{3:3},
   at: intel_iommu_init+0x58e/0x880

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -> #1 (dmar_global_lock){++++}-{3:3}:
        lock_acquire+0xd6/0x320
        down_read+0x42/0x180
        intel_irq_remapping_alloc+0xad/0x750
        mp_irqdomain_alloc+0xb8/0x2b0
        irq_domain_alloc_irqs_locked+0x12f/0x2d0
        __irq_domain_alloc_irqs+0x56/0xa0
        alloc_isa_irq_from_domain.isra.7+0xa0/0xe0
        mp_map_pin_to_irq+0x1dc/0x330
        setup_IO_APIC+0x128/0x210
        apic_intr_mode_init+0x67/0x110
        x86_late_time_init+0x24/0x40
        start_kernel+0x41e/0x7e0
        secondary_startup_64_no_verify+0xe0/0xeb

 -> #0 (&domain->mutex){+.+.}-{3:3}:
        check_prevs_add+0x160/0xef0
        __lock_acquire+0x147d/0x1950
        lock_acquire+0xd6/0x320
        __mutex_lock+0x9c/0xfc0
        __irq_domain_alloc_irqs+0x3b/0xa0
        dmar_alloc_hwirq+0x9e/0x120
        iommu_pmu_register+0x11d/0x200
        intel_iommu_init+0x5de/0x880
        pci_iommu_init+0x12/0x40
        do_one_initcall+0x65/0x350
        kernel_init_freeable+0x3ca/0x610
        kernel_init+0x1a/0x140
        ret_from_fork+0x29/0x50

 other info that might help us debug this:

 Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(dmar_global_lock);
                                lock(&domain->mutex);
                                lock(dmar_global_lock);
   lock(&domain->mutex);

                *** DEADLOCK ***

Fixes: 9dbb8e3452 ("irqdomain: Switch to per-domain locking")
Reviewed-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Tested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/20230314051836.23817-1-baolu.lu@linux.intel.com
Link: https://lore.kernel.org/r/20230329134721.469447-2-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2023-03-31 10:06:15 +02:00
Jens Axboe 24ab70d837 Merge tag 'md-fixes-2023-03-29' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md into block-6.3
Pull MD fix from Song.

* tag 'md-fixes-2023-03-29' of https://git.kernel.org/pub/scm/linux/kernel/git/song/md:
  md: fix regression for null-ptr-deference in __md_stop()
2023-03-30 20:29:47 -06:00
Linus Torvalds 62bad54b26 dma-mapping fixes for Linux 6.3
- fix for swiotlb deadlock due to wrong alignment checks (GuoRui.Yu,
    Petr Tesarik)
 -----BEGIN PGP SIGNATURE-----
 
 iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAmQmEEsLHGhjaEBsc3Qu
 ZGUACgkQD55TZVIEUYMfhw//b1pmwO3ESd5mLwQh9sZrvndi6oyYwqwOy5KMyVtx
 0BndOh7/wpJZlYASjj2imNCYDr2g9hsKpm3ZLdN0eY0fQbwQ8ZYjMLhNCylW/nsK
 pr3adV+sZc0VMr3smeB0Jl7p68KU9Tz0vkDEtG/XpllhFfaS52rFSlCqagDbL11t
 NA+Ev39RaVij2/M8z59jrd4cr0X74PqWHgtbNawXjHKQckiRm1un5Sg05O830VV0
 shGQ/msJPbYdCBT9KD7trzRvFViBS+WeMHFx6I/PbsEUt7nPkGjO7eZiORD28AQ0
 NjUqVa03m38RFi9YSXE3IZms0xo4panEGndpTF/eJ0Ly3DcES9FepzI6qHQf3Dq6
 vPk5ok9DmTvZy/tWcmfHDWPIsn3vOStlf4SSADTYiOcSEysUJmzRcHaSgzYGA9Fd
 LQV1UVuYb8ARCa8knZqaxfQstPSzX6PDt1wgHY1k0Ikdvu5OwWskSy7wEMs4Gsd8
 w6lcPAvx7QRpqQ27WwSBSMWYJXrdRLO+hckchBrJ8jnedd2IEqMUwMcImq3fLogx
 Kl6MND8tNEcetyzKxdk9oZ7dyAG5iAQY1diBIwzuu7SIJ/Pm1KmcvfzfULYdpnhP
 hs8HtntEMhuAmQOWSckwxONwzjPSNEUi+SOu0ywLjaQsFpu9J8eI4bNymvx+5WvH
 kqg=
 =MxwN
 -----END PGP SIGNATURE-----

Merge tag 'dma-mapping-6.3-2023-03-31' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fixes from Christoph Hellwig:

 - fix for swiotlb deadlock due to wrong alignment checks (GuoRui.Yu,
   Petr Tesarik)

* tag 'dma-mapping-6.3-2023-03-31' of git://git.infradead.org/users/hch/dma-mapping:
  swiotlb: fix slot alignment checks
  swiotlb: use wrap_area_index() instead of open-coding it
  swiotlb: fix the deadlock in swiotlb_do_find_slots
2023-03-30 16:09:37 -07:00