Commit graph

1,427,869 commits

Author SHA1 Message Date
Arnd Bergmann
6f3f1d83e5 MediaTek defconfig updates
This adds a single change, enabling to compile the
 MediaTek HDMIv2 driver as module.
 -----BEGIN PGP SIGNATURE-----
 
 iLoEABYKAGIWIQQn3Xxr56ypAcSHzXSaNgTPrZeEeAUCaXNXxBsUgAAAAAAEAA5t
 YW51MiwyLjUrMS4xMSwyLDIoHGFuZ2Vsb2dpb2FjY2hpbm8uZGVscmVnbm9AY29s
 bGFib3JhLmNvbQAKCRCaNgTPrZeEeHy4AP49d82SuocGcFFLzdBTW57mAtQ5TBAc
 90pCAGuE7K8Q+QEA4kwwSpb1Uh3IqiOEDa9kmsZsAwgFSh5aiWzrr7GFJgM=
 =SSM5
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7GuwACgkQmmx57+YA
 GNlbRhAAkttWB37ksyZQ2RtoBRBSDWIhTn0o2GI0ma+RBMW9coPnMqhMSsCMue1q
 gAl0dJF0Bp+WF4C04Ajg/TE45Z1So5f/sZrncwLeZJOk/DtLLzLWqDG1vJact+Ba
 G4NB7WaYb2BQzPwoK9cmJDf2Hw7N4sugzK3BjP8/kDFsA1hMVsLVfd4NdDiZwRQP
 dLDsSa93oCIjr3TSwWzd1dmAOK174aX9nJS+YhHIg3Ig6aQbAd0M6flpV3D5D22x
 gvVhkQNXTFu9snzv4GfUNBMeCQmeZlMPBl7lc2y+35gR5+0J/hZbzQIVUtqwHrxS
 YvUWo+I6LckA/BRMFWO45RwRct0X+pt3Wtcvb6q1GpPlhuEvvfSvWBeWwGilfg0S
 Ts8juDzVBrfN0+XuFzGnuJA3eZz3wiZDnl1H9Vn/ePIqqsd9lBHOJlmDQ7nYAp0M
 Xoc8I4ZaYzhwg6rKbC3BtBN44xp+7AHeiAyzaplolLR2n8sFWmDvZWnA2kWSNVw/
 kIdfs+Tj1bTZa/nrxe+3+IbS9i3RlJv7vSZ00DOS8mE72h+6tRYHFYyWYkmLg8fm
 Ihe5EE92TfOd/LHUidVcIathRAz48gOL3eHDMove/VXG8mtUaAoGJiRIsaMEsFt0
 XivJFooXxipLMtDaia4r1xrnhGtPDUj42dVg7V0JpVw9MKFXw90=
 =mxBQ
 -----END PGP SIGNATURE-----

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

MediaTek defconfig updates

This adds a single change, enabling to compile the
MediaTek HDMIv2 driver as module.

* tag 'mtk-defconfig-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/mediatek/linux:
  arm64: defconfig: Enable Mediatek HDMIv2 driver

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:31:18 +01:00
Prathamesh Shete
af9b4a56f0 gpio: tegra186: Add support for Tegra264
Extend the existing Tegra186 GPIO controller driver with support for the
GPIO controller found on Tegra264.

Use the "wakeup-parent" phandle from the GPIO device tree node to
ensure the GPIO driver associates with the intended PMC device.
Relying only on compatible-based lookup can select an unexpected
PMC node, so fall back to compatible-based lookup when the phandle
is not present.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://patch.msgid.link/20260128085114.1137725-2-pshete@nvidia.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-01-29 09:31:04 +01:00
Prathamesh Shete
b565717e1d dt-bindings: gpio: Add Tegra264 support
Extend the existing Tegra186 GPIO controller device tree bindings with
support for the GPIO controller found on Tegra264. The number of pins
is slightly different, but the programming model remains the same.

Add a new header, include/dt-bindings/gpio/nvidia,tegra264-gpio.h,
that defines port IDs as well as the TEGRA264_MAIN_GPIO() helper,
both of which are used in conjunction to create a unique specifier
for each pin.

On Tegra, GPIO wake events are latched and routed via the PMC.
Document the standard DT property, wakeup-parent, which is a phandle to
the PMC interrupt controller that provides the parent wake interrupt
domain for the GPIO controller. If the property is absent the driver
falls back to a compatible-based lookup.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://patch.msgid.link/20260128085114.1137725-1-pshete@nvidia.com
[Bartosz: fixed whitespace errors]
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-01-29 09:30:54 +01:00
Vlastimil Babka
6f1912181d mm/slub: cleanup and repurpose some stat items
A number of stat items related to cpu slabs became unused, remove them.

Two of those were ALLOC_FASTPATH and FREE_FASTPATH. But instead of
removing those, use them instead of ALLOC_PCS and FREE_PCS, since
sheaves are the new (and only) fastpaths, Remove the recently added
_PCS variants instead.

Change where FREE_SLOWPATH is counted so that it only counts freeing of
objects by slab users that (for whatever reason) do not go to a percpu
sheaf, and not all (including internal) callers of __slab_free(). Thus
sheaf flushing (already counted by SHEAF_FLUSH) does not affect
FREE_SLOWPATH anymore. This matches how ALLOC_SLOWPATH doesn't count
sheaf refills (counted by SHEAF_REFILL).

Reviewed-by: Hao Li <hao.li@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:51 +01:00
Yixun Lan
574dc9ae4f
riscv: defconfig: spacemit: k3: enable clock support
Enable the clock driver support for SpacemiT K3 SoC, configure it as
built-in by default, but users should be able to change it as kernel
module if needed.

Signed-off-by: Yixun Lan <dlan@kernel.org>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20260128-sitter-crazily-184c1a7606db@spud
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:29:50 +01:00
Vlastimil Babka
fb016a5ec7 mm/slub: remove DEACTIVATE_TO_* stat items
The cpu slabs and their deactivations were removed, so remove the unused
stat items. Weirdly enough the values were also used to control
__add_partial() adding to head or tail of the list, so replace that with
a new enum add_mode, which is cleaner.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:41 +01:00
Vlastimil Babka
b16af1c812 slab: remove frozen slab checks from __slab_free()
Currently slabs are only frozen after consistency checks failed. This
can happen only in caches with debugging enabled, and those use
free_to_partial_list() for freeing. The non-debug operation of
__slab_free() can thus stop considering the frozen field, and we can
remove the FREE_FROZEN stat.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
0f7075bea8 slab: update overview comments
The changes related to sheaves made the description of locking and other
details outdated. Update it to reflect current state.

Also add a new copyright line due to major changes.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
46dea17444 slab: refill sheaves from all nodes
__refill_objects() currently only attempts to get partial slabs from the
local node and then allocates new slab(s). Expand it to trying also
other nodes while observing the remote node defrag ratio, similarly to
get_any_partial().

This will prevent allocating new slabs on a node while other nodes have
many free slabs. It does mean sheaves will contain non-local objects in
that case. Allocations that care about specific node will still be
served appropriately, but might get a slowpath allocation.

Like get_any_partial() we do observe cpuset_zone_allowed(), although we
might be refilling a sheaf that will be then used from a different
allocation context.

We can also use the resulting refill_objects() in
__kmem_cache_alloc_bulk() for non-debug caches. This means
kmem_cache_alloc_bulk() will get better performance when sheaves are
exhausted. kmem_cache_alloc_bulk() cannot indicate a preferred node so
it's compatible with sheaves refill in preferring the local node.
Its users also have gfp flags that allow spinning, so document that
as a requirement.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
6c2f307f30 slab: remove unused PREEMPT_RT specific macros
The macros slub_get_cpu_ptr()/slub_put_cpu_ptr() are now unused, remove
them. USE_LOCKLESS_FAST_PATH() has lost its true meaning with the code
being removed. The only remaining usage is in fact testing whether we
can assert irqs disabled, because spin_lock_irqsave() only does that on
!RT. Test for CONFIG_PREEMPT_RT instead.

Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
32c894c727 slab: remove struct kmem_cache_cpu
The cpu slab is not used anymore for allocation or freeing, the
remaining code is for flushing, but it's effectively dead.  Remove the
whole struct kmem_cache_cpu, the flushing code and other orphaned
functions.

The remaining used field of kmem_cache_cpu is the stat array with
CONFIG_SLUB_STATS. Put it instead in a new struct kmem_cache_stats.
In struct kmem_cache, the field is cpu_stats and placed near the
end of the struct.

Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
073d5f1562 slab: simplify kmalloc_nolock()
The kmalloc_nolock() implementation has several complications and
restrictions due to SLUB's cpu slab locking, lockless fastpath and
PREEMPT_RT differences. With cpu slab usage removed, we can simplify
things:

- relax the PREEMPT_RT context checks as they were before commit
  99a3e3a1cf ("slab: fix kmalloc_nolock() context check for
  PREEMPT_RT") and also reference the explanation comment in the page
  allocator

- the local_lock_cpu_slab() macros became unused, remove them

- we no longer need to set up lockdep classes on PREEMPT_RT

- we no longer need to annotate ___slab_alloc as NOKPROBE_SYMBOL
  since there's no lockless cpu freelist manipulation anymore

- __slab_alloc_node() can be called from kmalloc_nolock_noprof()
  unconditionally. It can also no longer return EBUSY. But trylock
  failures can still happen so retry with the larger bucket if the
  allocation fails for any reason.

Note that we still need __CMPXCHG_DOUBLE, because while it was removed
we don't use cmpxchg16b on cpu freelist anymore, we still use it on
slab freelist, and the alternative is slab_lock() which can be
interrupted by a nmi. Clarify the comment to mention it specifically.

Acked-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
ab2f752ac3 slab: remove defer_deactivate_slab()
There are no more cpu slabs so we don't need their deferred
deactivation. The function is now only used from places where we
allocate a new slab but then can't spin on node list_lock to put it on
the partial list. Instead of the deferred action we can free it directly
via __free_slab(), we just need to tell it to use _nolock() freeing of
the underlying pages and take care of the accounting.

Since free_frozen_pages_nolock() variant does not yet exist for code
outside of the page allocator, create it as a trivial wrapper for
__free_frozen_pages(..., FPI_TRYLOCK).

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:27 +01:00
Vlastimil Babka
bdc9282f78 slab: remove the do_slab_free() fastpath
We have removed cpu slab usage from allocation paths. Now remove
do_slab_free() which was freeing objects to the cpu slab when
the object belonged to it. Instead call __slab_free() directly,
which was previously the fallback.

This simplifies kfree_nolock() - when freeing to percpu sheaf
fails, we can call defer_free() directly.

Also remove functions that became unused.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:26 +01:00
Vlastimil Babka
e323b52cf0 slab: remove SLUB_CPU_PARTIAL
We have removed the partial slab usage from allocation paths. Now remove
the whole config option and associated code.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:26 +01:00
Vlastimil Babka
17c38c8829 slab: remove cpu (partial) slabs usage from allocation paths
We now rely on sheaves as the percpu caching layer and can refill them
directly from partial or newly allocated slabs. Start removing the cpu
(partial) slabs code, first from allocation paths.

This means that any allocation not satisfied from percpu sheaves will
end up in ___slab_alloc(), where we remove the usage of cpu (partial)
slabs, so it will only perform get_partial() or new_slab(). In the
latter case we reuse alloc_from_new_slab() (when we don't use
the debug/tiny alloc_single_from_new_slab() variant).

In get_partial_node() we used to return a slab for freezing as the cpu
slab and to refill the partial slab. Now we only want to return a single
object and leave the slab on the list (unless it became full). We can't
simply reuse alloc_single_from_partial() as that assumes freeing uses
free_to_partial_list(). Instead we need to use __slab_update_freelist()
to work properly against a racing __slab_free().

To reflect the new purpose of get_partial() functions, rename them to
get_from_partial(), get_from_partial_node(), and get_from_any_partial().

The rest of the changes is removing functions that no longer have any
callers.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:29:26 +01:00
Arnd Bergmann
e0d53332ae TI K3 defconfig updates for v6.20
- Enable configurations for Kontron SMARC-sAM67 module support
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEE+KKGk1TrgjIXoxo03bWEnRc2JJ0FAmlvjEEACgkQ3bWEnRc2
 JJ1yLxAAp2W7KVeoCJ0R2Pr1JsOmfQfSVYztL1sIBl2wK24O7SX3mWO6LxPVV101
 1O6mtyac8PLBxaDARqm/GuxVUy9GZ7nj0ajQnanR2xeLvxjDdyKvEom19r1giOdK
 t2lzOZe7cq2B3H27CNeZJQ5gatkrfRCsnOV0ImraVSkSoMbkXs2xFCDMh54BQnAO
 5dv1JgUte+wTa0E4dtWc1he4p9JybnikjD6nTApxSt3dkDnAE2Ws+EJvTVU3liUH
 sgPWXIrkvLJBDfTLNMgNaAXzshc8ohptvd+bMQ2n1fnF7gWHZvVgB/NUN/MforXI
 KXaKume2j6EhWukQdgXKyx+uFnaTCCR6cP0mPPqeUYgFMtEy0mgx1TniXYb8w3Tl
 mDhHVqKoYKzKJjwHn/3VExG/55Ga3x4BKdIWgt8uZk7nZ8jgXPOee8Pz+ockU61W
 t1D+P8XkZBMMQeFTazYOwi/1EGOBkmoD+RNlcGRxCyp4+PRNfqz9WUQ5FU/hRYH/
 2wxT9zB71ZFty1A2xeszfNppmL9cVREGulLK+WR26MqVu1psHQo+2EPD+NKOwyGj
 8EL30vgIqynRzgW53VYDHlCdddoQy51FdFJN/skutsNQgigXgxNCfmCbQQWCFANj
 MLQfQwI6BQPs72vQ4OQGPhWpXn9O6xk63COT+cBYAUSZ9MoL6NU=
 =YvpR
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7GjAACgkQmmx57+YA
 GNkVKQ//UE4G+1qjFT0iBd7dwjFvzbM0x2/VtN7fj4oOmXWb+F+PZxv4HTSiC8qD
 K+i4d0dj5tT+pD52n2X9u+j9ryCdQqXUDt6y+oehUXTkn0+o1lheGDuMeG1oeWR+
 h0PaKO5Z2SWxnzDQbc+ITznZeCIU//VKCWnUFiHU7CA5OjD97N9swtiYSYriykWn
 dvAVPaDt8LhkDUqvFGJ9+7kCCKMx5hFpzHLfb/9zo0LAmHKRbINNlR/7aaYVk6Ae
 LwSxBdcjd1AIB+we2LZ87xPYpNLJU3KslJp0oP1XZOhGzCrGjC97KzeATZTy8EoR
 SV0xO3n3H2IgKvJHHIIt6nQ3Zt2RN0nwk8p3M2tD9VD6E/GMs8CHngA6TM2ZesSx
 oDhJikJloY8TFvmv5kuPnGMHYGYMaFdZvI1mO8VGMwOOLJNLfCMIJzksXb9RDmlp
 QMPrKAIzAJAwePypvxxRN3+JOubqTyGGTB28g1c1ED0hW26Y9rlIMaF2lXDn8V7/
 IiZ2zG0H039rN1N4MBj6eQsBv2Z7FKDQ0CZPfxnr2HSqelsCcDxY5iPp1Gay8orz
 QvNXMC5Ri+/0hb75oqcXU/R0LP9qEn1A7KRlE+XyUkmybPq1uj0nLH775x1OS7R1
 K6J4GN06JtuDqX6EP3E9PRq4ntIZke4UTO1IwdMpIhrVsOUurLU=
 =zJEW
 -----END PGP SIGNATURE-----

Merge tag 'ti-k3-config-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux into soc/defconfig

TI K3 defconfig updates for v6.20

- Enable configurations for Kontron SMARC-sAM67 module support

* tag 'ti-k3-config-for-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux:
  arm64: defconfig: Enable configurations for Kontron SMARC-sAM67

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:28:31 +01:00
Vlastimil Babka
ed30c4adfc slab: add optimized sheaf refill from partial list
At this point we have sheaves enabled for all caches, but their refill
is done via __kmem_cache_alloc_bulk() which relies on cpu (partial)
slabs - now a redundant caching layer that we are about to remove.

The refill will thus be done from slabs on the node partial list.
Introduce new functions that can do that in an optimized way as it's
easier than modifying the __kmem_cache_alloc_bulk() call chain.

Introduce struct partial_bulk_context, a variant of struct
partial_context that can return a list of slabs from the partial list
with the sum of free objects in them within the requested min and max.

Introduce get_partial_node_bulk() that removes the slabs from freelist
and returns them in the list. There is a racy read of slab->counters
so make sure the non-atomic write in __update_freelist_slow() is not
tearing.

Introduce get_freelist_nofreeze() which grabs the freelist without
freezing the slab.

Introduce alloc_from_new_slab() which can allocate multiple objects from
a newly allocated slab where we don't need to synchronize with freeing.
In some aspects it's similar to alloc_single_from_new_slab() but assumes
the cache is a non-debug one so it can avoid some actions. It supports
the allow_spin parameter, which we always set true here, but the
followup change will reuse the function in a context where it may be
false.

Introduce __refill_objects() that uses the functions above to fill an
array of objects. It has to handle the possibility that the slabs will
contain more objects that were requested, due to concurrent freeing of
objects to those slabs. When no more slabs on partial lists are
available, it will allocate new slabs. It is intended to be only used
in context where spinning is allowed, so add a WARN_ON_ONCE check there.

Finally, switch refill_sheaf() to use __refill_objects(). Sheaves are
only refilled from contexts that allow spinning, or even blocking.

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:27:51 +01:00
Vlastimil Babka
913ffd3a1b slab: handle kmalloc sheaves bootstrap
Enable sheaves for kmalloc caches. For other types than KMALLOC_NORMAL,
we can simply allow them in calculate_sizes() as they are created later
than KMALLOC_NORMAL caches and can allocate sheaves and barns from
those.

For KMALLOC_NORMAL caches we perform additional step after first
creating them without sheaves. Then bootstrap_cache_sheaves() simply
allocates and initializes barns and sheaves and finally sets
s->sheaf_capacity to make them actually used.

Afterwards the only caches left without sheaves (unless SLUB_TINY or
debugging is enabled) are kmem_cache and kmem_cache_node. These are only
used when creating or destroying other kmem_caches. Thus they are not
performance critical and we can simply leave it that way.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:22:38 +01:00
Vlastimil Babka
f1427a1d64 slab: make percpu sheaves compatible with kmalloc_nolock()/kfree_nolock()
Before we enable percpu sheaves for kmalloc caches, we need to make sure
kmalloc_nolock() and kfree_nolock() will continue working properly and
not spin when not allowed to.

Percpu sheaves themselves use local_trylock() so they are already
compatible. We just need to be careful with the barn->lock spin_lock.
Pass a new allow_spin parameter where necessary to use
spin_trylock_irqsave().

In kmalloc_nolock_noprof() we can now attempt alloc_from_pcs() safely,
for now it will always fail until we enable sheaves for kmalloc caches
next. Similarly in kfree_nolock() we can attempt free_to_pcs().

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:22:00 +01:00
Vlastimil Babka
f3421f8d15 slab: introduce percpu sheaves bootstrap
Until now, kmem_cache->cpu_sheaves was !NULL only for caches with
sheaves enabled. Since we want to enable them for almost all caches,
it's suboptimal to test the pointer in the fast paths, so instead
allocate it for all caches in do_kmem_cache_create(). Instead of testing
the cpu_sheaves pointer to recognize caches (yet) without sheaves, test
kmem_cache->sheaf_capacity for being 0, where needed, using a new
cache_has_sheaves() helper.

However, for the fast paths sake we also assume that the main sheaf
always exists (pcs->main is !NULL), and during bootstrap we cannot
allocate sheaves yet.

Solve this by introducing a single static bootstrap_sheaf that's
assigned as pcs->main during bootstrap. It has a size of 0, so during
allocations, the fast path will find it's empty. Since the size of 0
matches sheaf_capacity of 0, the freeing fast paths will find it's
"full". In the slow path handlers, we use cache_has_sheaves() to
recognize that the cache doesn't (yet) have real sheaves, and fall back.
Thus sharing the single bootstrap sheaf like this for multiple caches
and cpus is safe.

Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:21:38 +01:00
Vlastimil Babka
e47c897a29 slab: add sheaves to most caches
In the first step to replace cpu (partial) slabs with sheaves, enable
sheaves for almost all caches. Treat args->sheaf_capacity as a minimum,
and calculate sheaf capacity with a formula that roughly follows the
formula for number of objects in cpu partial slabs in set_cpu_partial().

This should achieve roughly similar contention on the barn spin lock as
there's currently for node list_lock without sheaves, to make
benchmarking results comparable. It can be further tuned later.

Don't enable sheaves for bootstrap caches as that wouldn't work. In
order to recognize them by SLAB_NO_OBJ_EXT, make sure the flag exists
even for !CONFIG_SLAB_OBJ_EXT.

This limitation will be lifted for kmalloc caches after the necessary
bootstrapping changes.

Also do not enable sheaves for SLAB_NOLEAKTRACE caches to avoid
recursion with kmemleak tracking (thanks to Breno Leitao).

Reviewed-by: Suren Baghdasaryan <surenb@google.com>
Reviewed-by: Harry Yoo <harry.yoo@oracle.com>
Reviewed-by: Hao Li <hao.li@linux.dev>
Tested-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
2026-01-29 09:17:28 +01:00
Arnd Bergmann
b8b10118e9 i.MX defconfig changes for 6.20:
- A couple of changes from Alexander Stein and Andreas Kemnade to enable
   SND_SOC_FSL_ASOC_CARD and REGULATOR_FP9931 in imx_v6_v7_defconfig
 - A change from Dmitry Baryshkov to enable DA9052 and MC13XXX in
   multi_v7_defconfig
 - A change from Josua Mayer to refresh imx_v4_v5_defconfig by removing
   stale options and adding missing ones
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEFmJXigPl4LoGSz08UFdYWoewfM4FAmlu1RQACgkQUFdYWoew
 fM7G3AgAocoryQrAMAXOl8Ciy4KlWhdI8H76L4nwMwfuyNEZ0KjwAuKzQt1dMAp5
 K54qN3S0w9Xc9YTS6j7aylgurSHPl4P4fQU4aFiysP1LaeFpgcguxT9M9YYzr29K
 NkXlCIi9H13jMVBnm7IOUgnVNGQrYITG3dulWcroEtcx4ALZGZmAPks7a6B0Vy12
 1azvvUCIjHkCqRM+gtDnJrKRDhZOPXHiq3jQvrq6/sp9W8Gq+t43NVxos6uNFZjy
 jFIk3RpHydexD4ET7EH2VwO5PkWnQYtu6w2xUZ9OJR30xFJd4gRzSfGTcXlJxUjQ
 NH+rOwqGIMPZuzfhSKnPTAOBbCj9iA==
 =YNAQ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7F1oACgkQmmx57+YA
 GNkZGw//Q2pdjE+fFA2SJa3kR9U7RW+kkDD9SnuXjJ5QeXyiitva0FqSDmP6wMhK
 B6w0CgaoCAYU/L4wtR7BjhmHHHUjn6/JqAsJYY2AwPrZts5yaoAJOkqisb77XbAw
 U540FXOUn5YwWSQjFONcZQuqKzzE34mJRERXr5rNE1rOi+n1e0VyoGsGr8onsxPi
 4IOHd0yHdd2sEfZ5+pGorHkrCVfbBdclQWxXfeskTSWLce7vcbxwjtem0PlAOvij
 bF2Gmg7wm5oOE3JKhktkVsJmq3jOJdZZuuwl8CM3IVsV45FNioOT5Ke3a52VB6Xr
 WYe+gUujSVVNom6NRTYqncoeqCTv41ggWFRnqifZpV1sD8hbzI75tVB1sNdMKx7w
 VVpSMXpf3HBi8zbsaeoINxea3Ri96Gkex6U3vtkrILd+5Wb/Tklthc3tkTT1kHi6
 64cHsN2J5huE9EzpSTtmVtoxDQvKc3Yif8PKyb9+0VSPKP2Tkw/gyPRdnB3tqdC7
 Ak+WxW2bSMQQKfPs/RiYM2DtooiVolGA5vk6uHhb0LUbRw5URgcbhjFZaffPl/TG
 /CQFo21dCRKfmuff0RqTCyT04QA1frdRZv/OYAJ4NfC7d2faNn0xrwHokKH8WRgB
 LM/3Tr2Y9PAmyGS6Sam1iQWaLGlCPo9cJjAw1g9ERf0Y++QbpmI=
 =+JWN
 -----END PGP SIGNATURE-----

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

i.MX defconfig changes for 6.20:

- A couple of changes from Alexander Stein and Andreas Kemnade to enable
  SND_SOC_FSL_ASOC_CARD and REGULATOR_FP9931 in imx_v6_v7_defconfig
- A change from Dmitry Baryshkov to enable DA9052 and MC13XXX in
  multi_v7_defconfig
- A change from Josua Mayer to refresh imx_v4_v5_defconfig by removing
  stale options and adding missing ones

* tag 'imx-defconfig-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
  ARM: imx_v4_v5_defconfig: update for v6.19-rc1
  ARM: imx_v6_v7_defconfig: enable EPD regulator needed for Kobo Clara 2e
  ARM: imx_v6_v7_defconfig: Configure CONFIG_SND_SOC_FSL_ASOC_CARD as module
  ARM: multi_v7_defconfig: enable DA9052 and MC13XXX

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:16:24 +01:00
Arnd Bergmann
7c3ac7c10c Qualcomm Arm64 defconfig update for v6.20
Enable drivers needed to boot the Kaanapali and Milos platforms.
 
 Enable EC-drivers found on various Qualcomm-based laptops.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmluY8EACgkQCx85Pw2Z
 rcX6ZRAAj6iJcQ3ZFpP80aKALgmGnK8S5EvoIdp5O9i+zU1a8NiV3NklbCj2C8V3
 ocxjYpx4/+IIi5eqiDLftxrvbAOf/JrOqzi+bwT13zT/1ubhTvD06PHz2DnODcWK
 rM8Nxm5tD1hjclMc53wU5ideH9OndUOGHQy+Nz+GhluUOvgLNLRJ5Zw0uElpJaEA
 bgpJ+wzXmK6ipYJgGCXJbt8dS9qrOu+ls5ZT90XCQ/ZNBOo2J/ioGh9/9+tjZhxQ
 GRH2W+EoFM9Te3WFbTB6xTIK5OQJBm/1wTTWtT20oZ+VVaKAqSHFaGtMEbpMufLB
 YH6sUzYBxe6ppzaC29uOfHmOEdQcfVZf+UiBPmyaODtLDG27RwGVqHGVRbexSlyH
 +bpxX13tnyQoST0D9DoHAx7Pbf9k2OIvxpZReuSpvxWSbecIaDkaC7rm/reZqVEv
 ptGryewS7GGVRjNc0L6E5uOpYfv1G6+sHhRAhPOPN3PLHoNGUzdvoKX1u2aQWVOA
 TzT3dHeEPJjUkCkREvKK236j/k4BjH+P9SjKNmEDNFPp7ENWOsbrm3pVUmGsNm15
 0C340VTMH3hbeHjBN6VmVOe+xo8e5g8vbx5wD5TGcS3b93y92bVBg6qAIxCmFAIl
 ILaqBtA06sI/5aRnQDic9mzp5n3X2HACrn3QD2RcZDl7bEIO884=
 =gV5I
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7FzwACgkQmmx57+YA
 GNkkvBAAqRSy2HfNclUpkSOO9oQ0bDxMiwNx4F12aAXWH8jshKh+FvhnYn+Ccxvv
 /igdHi/CSePehyKYJQGAA+4dA/XoL6FhfA6WYPdKK/mwjhENjUSKOhUgkFyqTTtf
 AV2+N1s4rxKpT5llIAgaxwcZ9+Af2bRiM24czEc9ubjTXyNAlz7QrzyFXGmnxsmc
 0xCuYcxgWogiScMUqslVrtXXmap5mbXwA2w53s+sInSyaJdb7DWsDW1Ks3rAYhZu
 g2tJI3IykJB3Gh16bk1pfo3YK0yD/8xGcIVV3uRUlB6UV5+heNkaXV8UKXaZoO5C
 xwnyairHKm+XE1avXsUpUnf1iVetldpEyXG6D3xlzdFMB4uVFJF0l6c2ZQcI7OYx
 ukimG6F0sFFDkGfhfJAqwiwWR8BBxRqAhMCwwOs41ky+6Qa9ixO9ugc+CDxCtyqr
 iI9p21RQM5wsdLRxJr0mebQdyvBJS292BuokF1FoX42VQGYFXiSATxoGGGvolSd4
 saB3tVD/dXrtu8+b8WOWx9SwdJ1/dCRn7B30n6CA4gPWOVycqkZRbOTDLcFkpWrT
 x78LTtvqaE23OizxuxYRjD0mKzT7AGAClcpI1SYgRcFOgK71UaS+3CHp0Ozz7o8b
 mjbykw3yFM1E5mS+x1+tOJPSaPJzB2ONnpnzJ3ugkAtQZNvniKc=
 =IAUh
 -----END PGP SIGNATURE-----

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

Qualcomm Arm64 defconfig update for v6.20

Enable drivers needed to boot the Kaanapali and Milos platforms.

Enable EC-drivers found on various Qualcomm-based laptops.

* tag 'qcom-arm64-defconfig-for-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  arm64: defconfig: Enable EC drivers for Qualcomm-based laptops
  arm64: defconfig: Enable options for Qualcomm Milos SoC
  arm64: defconfig: enable clocks, interconnect and pinctrl for Qualcomm Kaanapali

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:15:55 +01:00
Arnd Bergmann
3b03f89dd2 arm64: Xilinx defconfig changes for 6.20
- Enable missing drivers by default
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQSXAixArPbWpRanWW+rB/7wTvUR9QUCaW3wUwAKCRCrB/7wTvUR
 9QiuAQCZASXOtGknGxGgGf8VDizQfTVvpqsLZg4d3OMRilTLowD8D+3Ux2VotXRj
 UGb1CgMG8iWOzyHG4qj9569K8C2IMAg=
 =hMF/
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7FosACgkQmmx57+YA
 GNkNCA/9GJwCR127i6vpjh1Yz4Aj1xcevBC8HrBc4ieh61Ik1j0Lwak8ypEGTdLE
 fob518NERR9iFGbOL1D19spRo9rz30vVLJIIM9A07WQa0ZlODU5ill3tHHhxwmo9
 8OMMPBIKa31rAW6zoN+GP9rqsFFbYJlv3rOZvmNrLEkAnWr63iqiKSvv8vPCpfTm
 tFSQUiafx5emwIzL2HsUH2m8Gf+ozluwowT38IE6i7uFKTZUsx76Uhd+Tu/LyVAE
 kfkP2E0mexy7JVHNNV+G64TLJI8cTvOKn3LzjJof4VUs7U9p4YXz3h27mZAEFxI9
 x0+IB6CINbWnfs1abSikiTrT+jtST45Q04DNlvtd9cOBo3l/YFclkXY5YqMx0MBT
 3Wan6v2Mms/l7TqSPHQVECcM5OBYcLgmY91kwJqU6LYgyWObdtDFRwC8m4Q9eEV0
 bLFY0tztj6/xWftr06o8CQAjr+KaJKZqLky/HEGKQ9wPdDxVPQax9T2umqDBgdWe
 kWxSXKWRcrg7G/OMFs25rQstyhWgxt6qyxCNdcdnhuBobXMJm2c18X5F3NaE9eEZ
 927og32v3zexFr0lgICaoScU1f4fAakfzKGWJBzWE2mNR2ldpc4SqfvzrOs2DvU3
 oL0TJz9OqHkA3rh+nvVfxeYdAiIgZiCSMFPoDyhD76xAf7NGD4I=
 =CLDr
 -----END PGP SIGNATURE-----

Merge tag 'xilinx-defconfig-for-6.20' of https://github.com/Xilinx/linux-xlnx into soc/defconfig

arm64: Xilinx defconfig changes for 6.20

- Enable missing drivers by default

* tag 'xilinx-defconfig-for-6.20' of https://github.com/Xilinx/linux-xlnx:
  arm64: defconfig: Drop duplicate CONFIG_OMAP_USB2 entry
  arm64: defconfig: Enable missing AMD/Xilinx drivers

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:09:27 +01:00
Arnd Bergmann
ca36ef1bb4 Apple SoC defconfig update for 6.20
- Enable most drivers required for Apple Silicon as module inside
   defconfig
 - Enable the power-domain driver when ARCH_APPLE and PM is selected
   since it's critical for booting these systems
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQS3vz815OHsEaWy0u9EEX0kKnUe6QUCaW0y1QAKCRBEEX0kKnUe
 6dr9APsG8qielrxskzqZ5YQVdQoEo9KHfGWWgO3mjJzYiTCZjwD/YH7E6tkEO18b
 8S5F+6g7CKOX2I2o1RpCC6RPaTzYywU=
 =CIeV
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7FVAACgkQmmx57+YA
 GNkQ+Q//RR+fsnsBILc8yoYEp+eK2DYhX+uZPfqbYUbGy0FR69qQbFoI/n31FmAm
 i4brWnutZtVXT1wrdH5GaFbpoLstvODWgUJ/yk39S8sJEiBwAJ/Agz2lCX2LcYhS
 wPVe4Yd0CZjQeHa+96e8Ndizu8ZdlUMvnIp3fowpt29nJBtiRa4Ne40c5yFkUSrm
 scfQz9HR8YDo+sx/C9DJcR5BxxjlTBpIPWDYNnHrbbjLl1FlbntjoFaojMPG+FIL
 +ZEb0ZTTSkQFXQSYkIK7JLfo79GM7Chu00ui7/q6r9S7bpckNXB71jM4YmshoNzf
 /iPD3c5nTTEB51Ztprl2/EH+42vL1pjWQGSLz0AodBZbP2wdn6B5S+yf79itOc/n
 +Pf/uy/Q4WWz+MneilUmYAaA4xff53b20eTNWbNQagkR25WCZ5YBM5x4zbGerKWU
 nIG+4STBXtYBxuayDeXYu/mslzgPi5y/MVbbDyCN7+2whuFmCCIxZ+YSU+LtPvp8
 VQvwjoqDu4V1MatgvTiI8U1Vt/9rCu4FBupkMIfuCaFh6LeDXMQatSaSrqXZuM4V
 39HXv4hfzhNwC+mkrrB+yQb3+93Sf3MLs7h4x52TRwO/WBEMpJg5gLNKpgnmqMJK
 yPR0a55zHOJuSpMIo/J2h3xNeTwSmcnzW9L5d5YrFBg9VGpHagA=
 =Plgq
 -----END PGP SIGNATURE-----

Merge tag 'apple-soc-defconfig-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux into soc/defconfig

Apple SoC defconfig update for 6.20

- Enable most drivers required for Apple Silicon as module inside
  defconfig
- Enable the power-domain driver when ARCH_APPLE and PM is selected
  since it's critical for booting these systems

* tag 'apple-soc-defconfig-6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/sven/linux:
  arm64: defconfig: Enable Apple Silicon drivers
  arm64: select APPLE_PMGR_PWRSTATE for ARCH_APPLE

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:07:41 +01:00
Arnd Bergmann
c741fc9557 Renesas ARM defconfig updates for v6.20
- Enable support for the Renesas RZ/G3E USB3 PHY and RZ/G3S PCIe
     drivers in the ARM64 defconfig,
   - Refresh the ARM SH-Mobile defconfig for v6.19-rc1.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQ9qaHoIs/1I4cXmEiKwlD9ZEnxcAUCaVu/gwAKCRCKwlD9ZEnx
 cAokAQC4fxljYGQm8XAuc32tc+Bhq/cBFfGTYC1bjsULC+Dd0AD/RKUUpgFxqT4e
 nETMXaxNGSJh/6iy1rQQUFMp/Ak1/AU=
 =wgnz
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEo6/YBQwIrVS28WGKmmx57+YAGNkFAml7FNgACgkQmmx57+YA
 GNlq8Q//XX8advk2vyBl7Wb1lIny33x3FQoyfnOr11HMg0O3kbb5e4Y85JySmRrl
 4VzOpgbKDvvb/So3/OkdNvlFlL2Q9Nq3WwyQfc+dDCoAU/X+2HhtkAA/8ilm91hG
 K0MLvdzHDxwWPMIgZAUZcbzK46xqcdhij4zz2d74agLUIOGXiShNfJvAFdl579rV
 ZGJdGI8LOvoRiGMkuiXX3hMUn12DhYVA7vIwBOCR1HXav69rzVM5fCTGV/0iijy7
 mpgxecYHjdq4rJJKB6OMM125AeEuOMZbUn19DFfKQ9rHU/3wtRMewrhmngHSSKF7
 IXwzu4iEhOiYm+LeXZWRMw9OFtnlTc9xrCwDeylY9P7vFUPTZoCv+0ZPC6RDwRpE
 77md8yTRflNPnHJYYPtBuF6tupH16BBBZXr8Xq8qJ8Cn3PlT1Gzs++6dUyO7Gjkq
 ievjMbwd/IPT3Dt6a8T7nMO7TF32uVUYfbz6NvjmfbdqxkVLv/WLnbjUe8XzJtS+
 3kdoLGHZ7vVFEIPk9pZ7TMov5LjjHLrXPZRQ8/+eO7fkstZfFJDcUKrNyLbOKEfw
 jdRUamu07ZTUMQ7NEhBuSPbQvJKfaePfXdjTgmYoDR9hCi+06DFYcH6OScAj2cEm
 DyCk5lT0ZtyZKrbsAP7RdXu3aSOGX4fY3yxEngNbxGmAGFkQDpE=
 =4PUu
 -----END PGP SIGNATURE-----

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

Renesas ARM defconfig updates for v6.20

  - Enable support for the Renesas RZ/G3E USB3 PHY and RZ/G3S PCIe
    drivers in the ARM64 defconfig,
  - Refresh the ARM SH-Mobile defconfig for v6.19-rc1.

* tag 'renesas-arm-defconfig-for-v6.20-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel:
  ARM: shmobile: defconfig: Refresh for v6.19-rc1
  arm64: defconfig: Enable PCIe for the Renesas RZ/G3S SoC
  arm64: defconfig: Enable RZ/G3E USB3 PHY driver

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 09:05:36 +01:00
Han Gao
0ea05c4f75 riscv: compat: fix COMPAT_UTS_MACHINE definition
The COMPAT_UTS_MACHINE for riscv was incorrectly defined as "riscv".
Change it to "riscv32" to reflect the correct 32-bit compat name.

Fixes: 06d0e37236 ("riscv: compat: Add basic compat data type implementation")
Cc: stable@vger.kernel.org
Signed-off-by: Han Gao <gaohan@iscas.ac.cn>
Reviewed-by: Guo Ren (Alibaba Damo Academy) <guoren@kernel.org>
Link: https://patch.msgid.link/20260127190711.2264664-1-gaohan@iscas.ac.cn
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-01-29 00:59:17 -07:00
Arnd Bergmann
6d925df981
ARM: defconfig: turn off CONFIG_EXPERT
Since multi_v7_defconfig is meant to be the generic defconfig, many
users are not going to be experts and it is counterintuitive to have
CONFIG_EXPERT enabled.

This change has a couple of side-effects:

 - CONFIG_NAMESPACES is enabled by default. This adds about 0.2% of
  .text, but is already enabled in many board specific configs, and
   apparently a requirement for systemd, so this seems like a useful
   change.

 - CONFIG_DEBUG_MEMORY_INIT is enabled now, adding a tiny bit
   of code in the inittext section

 - CONFIG_RFKILL, CONFIG_MEDIA_SUPPORT_FILTER and various CONFIG_HID
   driver defaults change, so these have to be listed explicitly to
   maintain the previous behavior

 - CONFIG_SERIAL_SH_SCI_NR_UARTS=20 changes to the default value
   of 18, which I understand to be sufficient for any buard, even
   if all UARTS are enabled at the same time

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20260112153255.795553-2-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 08:56:07 +01:00
Arnd Bergmann
ee1ab82ee0
ARM: defconfig: move entries
Some Kconfig files got rearranged, so change the defconfig file
to put everything back in the order used by 'make savedefconfig'.

Link: https://lore.kernel.org/r/20260112153255.795553-1-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2026-01-29 08:55:58 +01:00
Remi Pommarel
51ffeabe83 9p: Track 9P RPC waiting time as IO
Use io_wait_event_killable() to ensure that time spent waiting for 9P
RPC transactions is accounted as IO wait time.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Message-ID: <b8601271263011203fa34eada2e8ac21d9f679e5.1769179462.git.repk@triplefau.lt>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
2026-01-29 07:33:36 +00:00
Remi Pommarel
ca136b2553 wait: Introduce io_wait_event_killable()
Add io_wait_event_killable(), a variant of wait_event_killable() that
uses io_schedule() instead of schedule(). This is to be used in
situation where waiting time is to be accounted as IO wait time.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Message-ID: <1b2870001ecd34fe6c05be2ddfefb3c798b11701.1769179462.git.repk@triplefau.lt>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
2026-01-29 07:33:35 +00:00
Jakub Kicinski
df8b9be3d4 Merge branch 'mptcp-avoid-dup-nl-events-and-propagate-error'
Matthieu Baerts says:

====================
mptcp: avoid dup NL events and propagate error

Here are two fixes affecting the MPTCP Netlink events with their tests:

- Patches 1 & 2: a subflow closed NL event was visible multiple times in
  some specific conditions. A fix for v5.12.

- Patches 3 & 4: subflow closed NL events never contained the error
  code, even when expected. A fix for v5.11.

Plus an extra fix:

- Patch 5: fix a false positive with the "signal addresses race test"
  subtest when validating the MPTCP Join selftest on a v5.15.y stable
  kernel.
====================

Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-0-7f71e1bc4feb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:59:10 -08:00
Matthieu Baerts (NGI0)
c5d5ecf21f selftests: mptcp: join: fix local endp not being tracked
When running this mptcp_join.sh selftest on older kernel versions not
supporting local endpoints tracking, this test fails because 3 MP_JOIN
ACKs have been received, while only 2 were expected.

It is not clear why only 2 MP_JOIN ACKs were expected on old kernel
versions, while 3 MP_JOIN SYN and SYN+ACK were expected. When testing on
the v5.15.197 kernel, 3 MP_JOIN ACKs are seen, which is also what is
expected in the selftests included in this kernel version, see commit
f4480eaad4 ("selftests: mptcp: add missing join check").

Switch the expected MP_JOIN ACKs to 3. While at it, move this
chk_join_nr helper out of the special condition for older kernel
versions as it is now the same as with more recent ones. Also, invert
the condition to be more logical: what's expected on newer kernel
versions having such helper first.

Fixes: d4c81bbb86 ("selftests: mptcp: join: support local endpoint being tracked or not")
Cc: stable@vger.kernel.org
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-5-7f71e1bc4feb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:58:51 -08:00
Matthieu Baerts (NGI0)
2ef9e3a384 selftests: mptcp: check subflow errors in close events
This validates the previous commit: subflow closed events should contain
an error field when a subflow got closed with an error, e.g. reset or
timeout.

For this test, the chk_evt_nr helper has been extended to check
attributes in the matched events.

In this test, the 2 subflow closed events should have an error.

The 'Fixes' tag here below is the same as the one from the previous
commit: this patch here is not fixing anything wrong in the selftests,
but it validates the previous fix for an issue introduced by this commit
ID.

Fixes: 15cc104533 ("mptcp: deliver ssk errors to msk")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-4-7f71e1bc4feb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:58:50 -08:00
Matthieu Baerts (NGI0)
dccf46179d mptcp: only reset subflow errors when propagated
Some subflow socket errors need to be reported to the MPTCP socket: the
initial subflow connect (MP_CAPABLE), and the ones from the fallback
sockets. The others are not propagated.

The issue is that sock_error() was used to retrieve the error, which was
also resetting the sk_err field. Because of that, when notifying the
userspace about subflow close events later on from the MPTCP worker, the
ssk->sk_err field was always 0.

Now, the error (sk_err) is only reset when propagating it to the msk.

Fixes: 15cc104533 ("mptcp: deliver ssk errors to msk")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-3-7f71e1bc4feb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:58:50 -08:00
Matthieu Baerts (NGI0)
8467458dfa selftests: mptcp: check no dup close events after error
This validates the previous commit: subflow closed events are re-sent
with less info when the initial subflow is disconnected after an error
and each time a subflow is closed after that.

In this new test, the userspace PM is involved because that's how it was
discovered, but it is not specific to it. The initial subflow is
terminated with a RESET, and that will cause the subflow disconnect.
Then, a new subflow is initiated, but also got rejected, which cause a
second subflow closed event, but not a third one.

While at it, in case of failure to get the expected amount of events,
the events are printed.

The 'Fixes' tag here below is the same as the one from the previous
commit: this patch here is not fixing anything wrong in the selftests,
but it validates the previous fix for an issue introduced by this commit
ID.

Fixes: d82809b6c5 ("mptcp: avoid duplicated SUB_CLOSED events")
Cc: stable@vger.kernel.org
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-2-7f71e1bc4feb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:58:50 -08:00
Matthieu Baerts (NGI0)
280d654324 mptcp: avoid dup SUB_CLOSED events after disconnect
In case of subflow disconnect(), which can also happen with the first
subflow in case of errors like timeout or reset, mptcp_subflow_ctx_reset
will reset most fields from the mptcp_subflow_context structure,
including close_event_done. Then, when another subflow is closed, yet
another SUB_CLOSED event for the disconnected initial subflow is sent.
Because of the previous reset, there are no source address and
destination port.

A solution is then to also check the subflow's local id: it shouldn't be
negative anyway.

Another solution would be not to reset subflow->close_event_done at
disconnect time, but when reused. But then, probably the whole reset
could be done when being reused. Let's not change this logic, similar
to TCP with tcp_disconnect().

Fixes: d82809b6c5 ("mptcp: avoid duplicated SUB_CLOSED events")
Cc: stable@vger.kernel.org
Reported-by: Marco Angaroni <marco.angaroni@italtel.com>
Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/603
Reviewed-by: Geliang Tang <geliang@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260127-net-mptcp-dup-nl-events-v1-1-7f71e1bc4feb@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:58:50 -08:00
Jakub Kicinski
95f82b2b39 Merge branch 'mlx5-misc-fixes-2026-01-27'
Tariq Toukan says:

====================
mlx5 misc fixes 2026-01-27 [part]

This patchset provides misc bug fixes from the team
to the mlx5 core and Eth drivers.
====================

Link: https://patch.msgid.link/1769503961-124173-1-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:51:45 -08:00
Jianbo Liu
011be342dd net/mlx5e: Skip ESN replay window setup for IPsec crypto offload
Commit a5e400a985 ("net/mlx5e: Honor user choice of IPsec replay
window size") introduced logic to setup the ESN replay window size.
This logic is only valid for packet offload.

However, the check to skip this block only covered outbound offloads.
It was not skipped for crypto offload, causing it to fall through to
the new switch statement and trigger its WARN_ON default case (for
instance, if a window larger than 256 bits was configured).

Fix this by amending the condition to also skip the replay window
setup if the offload type is not XFRM_DEV_OFFLOAD_PACKET.

Fixes: a5e400a985 ("net/mlx5e: Honor user choice of IPsec replay window size")
Signed-off-by: Jianbo Liu <jianbol@nvidia.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1769503961-124173-5-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:51:29 -08:00
Parav Pandit
a8f930b7be net/mlx5: Fix vhca_id access call trace use before alloc
HCA CAP structure is allocated in mlx5_hca_caps_alloc().
mlx5_mdev_init()
  mlx5_hca_caps_alloc()

And HCA CAP is read from the device in mlx5_init_one().

The vhca_id's debugfs file is published even before above two
operations are done.
Due to this when user reads the vhca id before the initialization,
following call trace is observed.

Fix this by deferring debugfs publication until the HCA CAP is
allocated and read from the device.

BUG: kernel NULL pointer dereference, address: 0000000000000004
PGD 0 P4D 0
Oops: Oops: 0000 [#1] SMP PTI
CPU: 23 UID: 0 PID: 6605 Comm: cat Kdump: loaded Not tainted 6.18.0-rc7-sf+ #110 PREEMPT(full)
Hardware name: Supermicro SYS-6028U-TR4+/X10DRU-i+, BIOS 2.0b 08/09/2016
RIP: 0010:vhca_id_show+0x17/0x30 [mlx5_core]
Code: cb 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 48 8b 47 70 48 c7 c6 45 f0 12 c1 48 8b 80 70 03 00 00 <8b> 50 04 0f ca 0f b7 d2 e8 8c 82 47 cb 31 c0 c3 cc cc cc cc 0f 1f
RSP: 0018:ffffd37f4f337d40 EFLAGS: 00010203
RAX: 0000000000000000 RBX: ffff8f18445c9b40 RCX: 0000000000000001
RDX: ffff8f1109825180 RSI: ffffffffc112f045 RDI: ffff8f18445c9b40
RBP: 0000000000000000 R08: 0000645eac0d2928 R09: 0000000000000006
R10: ffffd37f4f337d48 R11: 0000000000000000 R12: ffffd37f4f337dd8
R13: ffffd37f4f337db0 R14: ffff8f18445c9b68 R15: 0000000000000001
FS:  00007f3eea099580(0000) GS:ffff8f2090f1f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000004 CR3: 00000008b64e4006 CR4: 00000000003726f0
Call Trace:
 <TASK>
 seq_read_iter+0x11f/0x4f0
 ? _raw_spin_unlock+0x15/0x30
 ? do_anonymous_page+0x104/0x810
 seq_read+0xf6/0x120
 ? srso_alias_untrain_ret+0x1/0x10
 full_proxy_read+0x5c/0x90
 vfs_read+0xad/0x320
 ? handle_mm_fault+0x1ab/0x290
 ksys_read+0x52/0xd0
 do_syscall_64+0x61/0x11e0
 entry_SYSCALL_64_after_hwframe+0x76/0x7e

Fixes: dd3dd7263c ("net/mlx5: Expose vhca_id to debugfs")
Signed-off-by: Parav Pandit <parav@nvidia.com>
Reviewed-by: Shay Drori <shayd@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1769503961-124173-4-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:51:29 -08:00
Shay Drory
2610a3d656 net/mlx5: fs, Fix inverted cap check in tx flow table root disconnect
The capability check for reset_root_to_default was inverted, causing
the function to return -EOPNOTSUPP when the capability IS supported,
rather than when it is NOT supported.

Fix the capability check condition.

Fixes: 3c9c34c32b ("net/mlx5: fs, Command to control TX flow table root")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/1769503961-124173-2-git-send-email-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:36:05 -08:00
Wei Fang
2aa1545ba8 net: phy: micrel: fix clk warning when removing the driver
Since the commit 25c6a5ab15 ("net: phy: micrel: Dynamically control
external clock of KSZ PHY"), the clock of Micrel PHY has been enabled
by phy_driver::resume() and disabled by phy_driver::suspend(). However,
devm_clk_get_optional_enabled() is used in kszphy_probe(), so the clock
will automatically be disabled when the device is unbound from the bus.
Therefore, this could cause the clock to be disabled twice, resulting
in clk driver warnings.

For example, this issue can be reproduced on i.MX6ULL platform, and we
can see the following logs when removing the FEC MAC drivers.

$ echo 2188000.ethernet > /sys/bus/platform/drivers/fec/unbind
$ echo 20b4000.ethernet > /sys/bus/platform/drivers/fec/unbind
[  109.758207] ------------[ cut here ]------------
[  109.758240] WARNING: drivers/clk/clk.c:1188 at clk_core_disable+0xb4/0xd0, CPU#0: sh/639
[  109.771011] enet2_ref already disabled
[  109.793359] Call trace:
[  109.822006]  clk_core_disable from clk_disable+0x28/0x34
[  109.827340]  clk_disable from clk_disable_unprepare+0xc/0x18
[  109.833029]  clk_disable_unprepare from devm_clk_release+0x1c/0x28
[  109.839241]  devm_clk_release from devres_release_all+0x98/0x100
[  109.845278]  devres_release_all from device_unbind_cleanup+0xc/0x70
[  109.851571]  device_unbind_cleanup from device_release_driver_internal+0x1a4/0x1f4
[  109.859170]  device_release_driver_internal from bus_remove_device+0xbc/0xe4
[  109.866243]  bus_remove_device from device_del+0x140/0x458
[  109.871757]  device_del from phy_mdio_device_remove+0xc/0x24
[  109.877452]  phy_mdio_device_remove from mdiobus_unregister+0x40/0xac
[  109.883918]  mdiobus_unregister from fec_enet_mii_remove+0x40/0x78
[  109.890125]  fec_enet_mii_remove from fec_drv_remove+0x4c/0x158
[  109.896076]  fec_drv_remove from device_release_driver_internal+0x17c/0x1f4
[  109.962748] WARNING: drivers/clk/clk.c:1047 at clk_core_unprepare+0xfc/0x13c, CPU#0: sh/639
[  109.975805] enet2_ref already unprepared
[  110.002866] Call trace:
[  110.031758]  clk_core_unprepare from clk_unprepare+0x24/0x2c
[  110.037440]  clk_unprepare from devm_clk_release+0x1c/0x28
[  110.042957]  devm_clk_release from devres_release_all+0x98/0x100
[  110.048989]  devres_release_all from device_unbind_cleanup+0xc/0x70
[  110.055280]  device_unbind_cleanup from device_release_driver_internal+0x1a4/0x1f4
[  110.062877]  device_release_driver_internal from bus_remove_device+0xbc/0xe4
[  110.069950]  bus_remove_device from device_del+0x140/0x458
[  110.075469]  device_del from phy_mdio_device_remove+0xc/0x24
[  110.081165]  phy_mdio_device_remove from mdiobus_unregister+0x40/0xac
[  110.087632]  mdiobus_unregister from fec_enet_mii_remove+0x40/0x78
[  110.093836]  fec_enet_mii_remove from fec_drv_remove+0x4c/0x158
[  110.099782]  fec_drv_remove from device_release_driver_internal+0x17c/0x1f4

After analyzing the process of removing the FEC driver, as shown below,
it can be seen that the clock was disabled twice by the PHY driver.

fec_drv_remove()
  --> fec_enet_close()
    --> phy_stop()
      --> phy_suspend()
        --> kszphy_suspend() #1 The clock is disabled
  --> fec_enet_mii_remove()
    --> mdiobus_unregister()
      --> phy_mdio_device_remove()
        --> device_del()
          --> devm_clk_release() #2 The clock is disabled again

Therefore, devm_clk_get_optional() is used to fix the above issue. And
to avoid the issue mentioned by the commit 9853294627 ("net: phy:
micrel: use devm_clk_get_optional_enabled for the rmii-ref clock"), the
clock is enabled by clk_prepare_enable() to get the correct clock rate.

Fixes: 25c6a5ab15 ("net: phy: micrel: Dynamically control external clock of KSZ PHY")
Signed-off-by: Wei Fang <wei.fang@nxp.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20260126081544.983517-1-wei.fang@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:10:39 -08:00
Ethan Nelson-Moore
aba0138eb7 net: ethernet: neterion: s2io: remove unused driver
The s2io driver supports Exar (formerly Neterion and S2io) PCI-X 10
Gigabit Ethernet cards. Hardware supporting PCI-X has not been
manufactured in years. On x86, it was quickly replaced by PCIe. While
it stuck around longer on POWER hardware, the last POWER hardware to
support it was POWER7, which is not supported by ppc64le Linux
distributions. The last supported mainstream ppc64 Linux distribution
was RHEL 7; while it is still supported under ELS, ELS is only
available for x86 and IBM Z. It is possible to use many PCI-X cards in
standard PCI slots (which are still available on new motherboards), but
it does not make sense to do so for 10 Gigabit Ethernet because the
maximum bandwidth of standard PCI is only 1067 Mbps. It is therefore
highly unlikely that this driver is still being used. Remove the
driver, and move the former maintainer to the CREDITS file (restoring
credit for the vxge driver, which was removed in commit f05643a0f6
("eth: remove neterion/vxge").

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Link: https://patch.msgid.link/20260126031352.22997-1-enelsonmoore@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:08:07 -08:00
Daniel Zahka
a62f7d62d2 net/mlx5e: don't assume psp tx skbs are ipv6 csum handling
mlx5e_psp_handle_tx_skb() assumes skbs are ipv6 when doing a partial
TCP checksum with tso. Make correctly mlx5e_psp_handle_tx_skb() handle
ipv4 packets.

Fixes: e5a1861a29 ("net/mlx5e: Implement PSP Tx data path")
Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Link: https://patch.msgid.link/20260126-dzahka-fix-tx-csum-partial-v2-1-0a905590ea5f@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 20:07:40 -08:00
Jakub Kicinski
2b73e75438 Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2026-01-27 (ixgbe, ice)

For ixgbe:
Kohei Enju adjusts the cleanup path on firmware error to resolve some
memory leaks and removes an instance of double init, free on ACI mutex.

For ice:
Aaron Ma adds NULL checks for q_vectors to avoid NULL pointer
dereference.

Jesse Brandeburg removes UDP checksum mismatch from being counted in Rx
errors.

* '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  ice: stop counting UDP csum mismatch as rx_errors
  ice: Fix NULL pointer dereference in ice_vsi_set_napi_queues
  ixgbe: don't initialize aci lock in ixgbe_recovery_probe()
  ixgbe: fix memory leaks in the ixgbe_recovery_probe() path
====================

Link: https://patch.msgid.link/20260127223047.3979404-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 19:40:54 -08:00
Eric Dumazet
2f80b2797a ipv6: remove __inet6_csk_dst_check()
__inet6_csk_dst_check() is a very simple wrapper with no value,
it is used only once.

Directly use __sk_dst_check().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260127211203.1524339-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 19:37:45 -08:00
Eric Dumazet
5fc90003de selftests: drv-net: toeplitz: accept bigger rss keys
/proc/sys/net/core/netdev_rss_key got bigger (256 bytes instead of 52)

Fixes: 37b0ea8fef ("net: expand NETDEV_RSS_KEY_LEN to 256 bytes")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260127174806.886561-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 19:37:14 -08:00
Daniel Zahka
70de46740b selftests: drv-net: psp: fix test flakes from racy connection close
There is a bug in assoc_sk_only_mismatch() and
assoc_sk_only_mismatch_tx() that creates a race condition which
triggers test flakes in later test cases e.g. data_send_bad_key().

The problem is that the client uses the "conn clr" rpc to setup a data
connection with psp_responder, but never uses a matching "data close"
rpc. This creates a race condition where if the client can queue
another data sock request, like in data_send_bad_key(), before the
server can accept the old connection from the backlog we end up in a
situation where we have two connections in the backlog: one for the
closed connection we have received a FIN for, and one for the new PSP
connection which is expecting to do key exchange.

From there the server pops the closed connection from the backlog, but
the data_send_bad_key() test case in psp.py hangs waiting to perform
key exchange.

The fix is to properly use _conn_close, which fill force the server to
remove the closed connection from the backlog before sending the RPC
ack to the client.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20260127-psp-flaky-test-v1-1-13403e390af3@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 19:36:58 -08:00
Sebastian Andrzej Siewior
701b40f8bd declance: Remove IRQF_ONESHOT
Passing IRQF_ONESHOT ensures that the interrupt source is masked until
the secondary (threaded) handler is done. If only a primary handler is
used then the flag makes no sense because the interrupt can not fire
(again) while its handler is running.
The flag also disallows force-threading of the primary handler and the
irq-core will warn about this as of commit aef30c8d56 ("genirq: Warn
about using IRQF_ONESHOT without a threaded handler").

The IRQF_ONESHOT flag was added in commit 0fabe1021f ("MIPS:
DECstation I/O ASIC DMA interrupt classes"). It moved
clear_ioasic_dma_irq() from the driver into the irq-chip.
For EOI interrupts the clear_ioasic_dma_irq() callback is now invoked as
->irq_eoi() which is invoked after the IRQ was handled while the
interrupt is masked due to IRQF_ONESHOT. Without IRQF_ONESHOT it would
be invoked while interrupt is unmasked (but interrupts are disabled).

If it is *required* to invoke EOI-ack while the interrupt is masked (and
not a misunderstanding) due to irq-chip cascading/ hierarchical reasons
then using handle_fasteoi_mask_irq() as flow-handler would be the right
way to do so.

Remove IRQF_ONESHOT to irqflags.

Cc: Andrew Lunn <andrew+netdev@lunn.ch>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Maciej W. Rozycki <macro@orcam.me.uk>
Link: https://patch.msgid.link/20260127135334.qUEaYP9G@linutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-01-28 19:36:23 -08:00