summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpbios/bioscalls.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-01-01 00:42:14 +0100
committerRusty Russell <rusty@rustcorp.com.au>2009-01-01 00:42:14 +0100
commit6aaa8ce523c7ce954b81b8c0b3e32c8be599af8d (patch)
tree9d0ac33fb20cab7b1a7503b94889d70d69700c84 /drivers/pnp/pnpbios/bioscalls.c
parentcpumask: fix bogus kernel-doc (diff)
downloadlinux-6aaa8ce523c7ce954b81b8c0b3e32c8be599af8d.tar.xz
linux-6aaa8ce523c7ce954b81b8c0b3e32c8be599af8d.zip
percpu: fix percpu accessors to potentially !cpu_possible() cpus: pnpbios
Impact: CPU iterator bugfixes Percpu areas are only allocated for possible cpus. In general, you shouldn't access random cpu's percpu areas. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Mike Travis <travis@sgi.com> Acked-by: Ingo Molnar <mingo@elte.hu> Cc: Adam Belay <ambx1@neo.rr.com>
Diffstat (limited to '')
-rw-r--r--drivers/pnp/pnpbios/bioscalls.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c
index 7ff824496b39..7e6b5a3b3281 100644
--- a/drivers/pnp/pnpbios/bioscalls.c
+++ b/drivers/pnp/pnpbios/bioscalls.c
@@ -481,7 +481,7 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header)
set_base(bad_bios_desc, __va((unsigned long)0x40 << 4));
_set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4));
- for (i = 0; i < NR_CPUS; i++) {
+ for_each_possible_cpu(i) {
struct desc_struct *gdt = get_cpu_gdt_table(i);
if (!gdt)
continue;