linux/arch/sparc
Sam Ravnborg 98937707fe sparc64: Fix number of online CPUs
Nick Bowler reported:
    When using newer kernels on my Ultra 60 with dual 450MHz UltraSPARC-II
    CPUs, I noticed that only CPU 0 comes up, while older kernels (including
    4.7) are working fine with both CPUs.

      I bisected the failure to this commit:

      9b2f753ec2 is the first bad commit
      commit 9b2f753ec2
      Author: Atish Patra <atish.patra@oracle.com>
      Date:   Thu Sep 15 14:54:40 2016 -0600

      sparc64: Fix cpu_possible_mask if nr_cpus is set

    This is a small change that reverts very easily on top of 5.18: there is
    just one trivial conflict.  Once reverted, both CPUs work again.

    Maybe this is related to the fact that the CPUs on this system are
    numbered CPU0 and CPU2 (there is no CPU1)?

The current code that adjust cpu_possible based on nr_cpu_ids do not
take into account that CPU's may not come one after each other.
Move the chech to the function that setup the cpu_possible mask
so there is no need to adjust it later.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Fixes: 9b2f753ec2 ("sparc64: Fix cpu_possible_mask if nr_cpus is set")
Reported-by: Nick Bowler <nbowler@draconx.ca>
Tested-by: Nick Bowler <nbowler@draconx.ca>
Link: https://lore.kernel.org/sparclinux/20201009161924.c8f031c079dd852941307870@gmx.de/
Link: https://lore.kernel.org/all/CADyTPEwt=ZNams+1bpMB1F9w_vUdPsGCt92DBQxxq_VtaLoTdw@mail.gmail.com/
Cc: stable@vger.kernel.org # v4.8+
Cc: Andreas Larsson <andreas@gaisler.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Atish Patra <atish.patra@oracle.com>
Cc: Bob Picco <bob.picco@oracle.com>
Cc: Vijay Kumar <vijay.ac.kumar@oracle.com>
Cc: David S. Miller <davem@davemloft.net>
Reviewed-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20240330-sparc64-warnings-v1-9-37201023ee2f@ravnborg.org
Signed-off-by: Andreas Larsson <andreas@gaisler.com>
2024-04-22 15:33:07 +02:00
..
boot sparc: Use $(kecho) to announce kernel images being ready 2023-12-04 13:28:06 +01:00
configs arch/*/configs/*defconfig: Replace AUTOFS4_FS by AUTOFS_FS 2023-07-29 14:08:22 -07:00
crypto crypto: sparc/crc32c - stop using the shash alignmask 2023-10-27 18:04:24 +08:00
include sparc64: Fix number of online CPUs 2024-04-22 15:33:07 +02:00
kernel sparc64: Fix number of online CPUs 2024-04-22 15:33:07 +02:00
lib sparc32: Use generic cmpdi2/ucmpdi2 variants 2024-03-08 21:20:23 +01:00
math-emu
mm sparc64: Fix prototype warning for vmemmap_free 2024-04-22 15:33:06 +02:00
net sparc: Fix typos 2024-02-16 16:50:25 +01:00
power
prom arch: turn off -Werror for architectures with known warnings 2023-12-10 17:21:33 -08:00
vdso sparc64: Fix prototype warning for init_vdso_image 2024-04-22 15:33:06 +02:00
video sparc: Fix undefined reference to fb_is_primary_device 2024-02-21 14:08:41 +01:00
Kbuild kbuild: use more subdir- for visiting subdirectories while cleaning 2021-10-24 13:49:46 +09:00
Kconfig This includes the following changes related to sparc for v6.9: 2024-03-15 12:47:21 -07:00
Kconfig.debug sparc: select FRAME_POINTER instead of redefining it 2024-02-16 16:50:26 +01:00
Makefile sparc: Fix undefined reference to fb_is_primary_device 2024-02-21 14:08:41 +01:00