]> git.itanic.dy.fi Git - linux-stable/commit
parisc: Use num_present_cpus() in alternative patching code
authorHelge Deller <deller@gmx.de>
Fri, 19 May 2023 10:12:06 +0000 (12:12 +0200)
committerHelge Deller <deller@gmx.de>
Tue, 23 May 2023 16:17:32 +0000 (18:17 +0200)
commitb6405f0829d7b1dd926ba3ca5f691cab835abfaa
treea2e61c72d7173edcb571bf28d4dae6a946c01867
parentd703797380c540bbeac03f104ebcfc364eaf47cc
parisc: Use num_present_cpus() in alternative patching code

When patching the kernel code some alternatives depend on SMP vs. !SMP.
Use the value of num_present_cpus() instead of num_online_cpus() to
decide, otherwise we may run into issues if and additional CPU is
enabled after having loaded a module while only one CPU was enabled.

Signed-off-by: Helge Deller <deller@gmx.de>
Cc: <stable@vger.kernel.org> # v6.1+
arch/parisc/kernel/alternative.c