kernel-hacking-2024-linux-s.../arch/sparc
Anton Blanchard e5981fd6d7 sparc: cpumask_of_node() should handle -1 as a node
pcibus_to_node can return -1 if we cannot determine which node a pci bus
is on. If passed -1, cpumask_of_node will negatively index the lookup array
and pull in random data:

# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus
00000000,00000003,00000000,00000000
# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist
64-65

Change cpumask_of_node to check for -1 and return cpu_all_mask in this
case:

# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpus
ffffffff,ffffffff,ffffffff,ffffffff
# cat /sys/devices/pci0000:00/0000:00:01.0/local_cpulist
0-127

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-01-20 19:04:42 -08:00
..
boot arch/sparc/boot/*.c: Mark various internal functions static 2009-11-15 15:01:40 -08:00
configs sparc64: Update defconfig. 2010-01-20 16:32:21 -08:00
include/asm sparc: cpumask_of_node() should handle -1 as a node 2010-01-20 19:04:42 -08:00
kernel sparc64: Fully support both performance counters. 2010-01-20 16:23:03 -08:00
lib sparc: Stop trying to be so fancy and use __builtin_{memcpy,memset}() 2009-12-10 23:32:10 -08:00
math-emu sparc: Add alignment and emulation fault perf events. 2009-12-11 01:07:53 -08:00
mm sparc: Add missing SW perf fault events. 2010-01-20 16:23:03 -08:00
oprofile sparc: using HZ needs an include of linux/param.h 2009-10-05 00:46:08 -07:00
prom
Kconfig sparc: convert to arch_gettimeoffset() 2010-01-15 01:34:28 -08:00
Kconfig.debug sparc: Use __builtin_object_size() to validate the buffer size for copy_from_user() 2009-12-10 23:05:23 -08:00
Makefile sparc: Set UTS_MACHINE correctly. 2009-12-05 17:17:55 -08:00