From 1aceb6127f38c325037b4dbe0951f6c292cf2857 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 1 Jan 2009 10:12:15 +1030 Subject: [PATCH] --- yaml --- r: 125680 b: refs/heads/master c: 4f4b6c1a94a8735bbdc030a2911cf395495645b6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/kexec.c | 2 +- trunk/kernel/smp.c | 2 +- trunk/security/selinux/selinuxfs.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 7eaa64ea309e..2d8b88718f98 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9e2f913df70b378379a358a44e7d286f7b765e8e +refs/heads/master: 4f4b6c1a94a8735bbdc030a2911cf395495645b6 diff --git a/trunk/kernel/kexec.c b/trunk/kernel/kexec.c index ac0fde7b54d0..3fb855ad6aa0 100644 --- a/trunk/kernel/kexec.c +++ b/trunk/kernel/kexec.c @@ -1116,7 +1116,7 @@ void crash_save_cpu(struct pt_regs *regs, int cpu) struct elf_prstatus prstatus; u32 *buf; - if ((cpu < 0) || (cpu >= NR_CPUS)) + if ((cpu < 0) || (cpu >= nr_cpu_ids)) return; /* Using ELF notes here is opportunistic. diff --git a/trunk/kernel/smp.c b/trunk/kernel/smp.c index 172b18268909..5cfa0e5e3e88 100644 --- a/trunk/kernel/smp.c +++ b/trunk/kernel/smp.c @@ -223,7 +223,7 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, local_irq_save(flags); func(info); local_irq_restore(flags); - } else if ((unsigned)cpu < NR_CPUS && cpu_online(cpu)) { + } else if ((unsigned)cpu < nr_cpu_ids && cpu_online(cpu)) { struct call_single_data *data = NULL; if (!wait) { diff --git a/trunk/security/selinux/selinuxfs.c b/trunk/security/selinux/selinuxfs.c index c86303638235..e5520996a75b 100644 --- a/trunk/security/selinux/selinuxfs.c +++ b/trunk/security/selinux/selinuxfs.c @@ -1211,7 +1211,7 @@ static struct avc_cache_stats *sel_avc_get_stat_idx(loff_t *idx) { int cpu; - for (cpu = *idx; cpu < NR_CPUS; ++cpu) { + for (cpu = *idx; cpu < nr_cpu_ids; ++cpu) { if (!cpu_possible(cpu)) continue; *idx = cpu + 1;