]> git.baikalelectronics.ru Git - kernel.git/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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 30 May 2023 13:03:18 +0000 (14:03 +0100)
commit914b577bb3e81ed2555935bb62187bd9696f7301
treec92183820e23dad0a0aa46d9c078424bec7f2d68
parent78d9b7eb97fc90c7469b3111794e2e2105f6626b
parisc: Use num_present_cpus() in alternative patching code

commit b6405f0829d7b1dd926ba3ca5f691cab835abfaa upstream.

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+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/kernel/alternative.c