Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139580
b: refs/heads/master
c: 5dd3c99
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell committed Mar 16, 2009
1 parent 0e48258 commit 960a0a8
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40fe697a1759b85f5e06c490599f4f7b03de3be7
refs/heads/master: 5dd3c9949a3e92ea7fd8c75d888031f7aff1f1d0
6 changes: 3 additions & 3 deletions trunk/arch/ia64/kernel/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,9 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu)
buffer.length = ACPI_ALLOCATE_BUFFER;
buffer.pointer = NULL;

cpus_complement(tmp_map, cpu_present_map);
cpu = first_cpu(tmp_map);
if (cpu >= NR_CPUS)
cpumask_complement(&tmp_map, cpu_present_mask);
cpu = cpumask_first(&tmp_map);
if (cpu >= nr_cpu_ids)
return -EINVAL;

acpi_map_cpu2node(handle, cpu, physid);
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/ia64/kernel/mca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1456,9 +1456,9 @@ ia64_mca_cmc_int_caller(int cmc_irq, void *arg)

ia64_mca_cmc_int_handler(cmc_irq, arg);

for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
cpuid = cpumask_next(cpuid+1, cpu_online_mask);

if (cpuid < NR_CPUS) {
if (cpuid < nr_cpu_ids) {
platform_send_ipi(cpuid, IA64_CMCP_VECTOR, IA64_IPI_DM_INT, 0);
} else {
/* If no log record, switch out of polling mode */
Expand Down Expand Up @@ -1525,7 +1525,7 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg)

ia64_mca_cpe_int_handler(cpe_irq, arg);

for (++cpuid ; cpuid < NR_CPUS && !cpu_online(cpuid) ; cpuid++);
cpuid = cpumask_next(cpuid+1, cpu_online_mask);

if (cpuid < NR_CPUS) {
platform_send_ipi(cpuid, IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -5603,7 +5603,7 @@ pfm_interrupt_handler(int irq, void *arg)
* /proc/perfmon interface, for debug only
*/

#define PFM_PROC_SHOW_HEADER ((void *)NR_CPUS+1)
#define PFM_PROC_SHOW_HEADER ((void *)nr_cpu_ids+1)

static void *
pfm_proc_start(struct seq_file *m, loff_t *pos)
Expand All @@ -5612,7 +5612,7 @@ pfm_proc_start(struct seq_file *m, loff_t *pos)
return PFM_PROC_SHOW_HEADER;
}

while (*pos <= NR_CPUS) {
while (*pos <= nr_cpu_ids) {
if (cpu_online(*pos - 1)) {
return (void *)*pos;
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/ia64/kernel/salinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t
}

n = data->cpu_check;
for (i = 0; i < NR_CPUS; i++) {
for (i = 0; i < nr_cpu_ids; i++) {
if (cpu_isset(n, data->cpu_event)) {
if (!cpu_online(n)) {
cpu_clear(n, data->cpu_event);
Expand All @@ -326,7 +326,7 @@ salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t
cpu = n;
break;
}
if (++n == NR_CPUS)
if (++n == nr_cpu_ids)
n = 0;
}

Expand All @@ -337,7 +337,7 @@ salinfo_event_read(struct file *file, char __user *buffer, size_t count, loff_t

/* for next read, start checking at next CPU */
data->cpu_check = cpu;
if (++data->cpu_check == NR_CPUS)
if (++data->cpu_check == nr_cpu_ids)
data->cpu_check = 0;

snprintf(cmd, sizeof(cmd), "read %d\n", cpu);
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/ia64/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,10 +730,10 @@ static void *
c_start (struct seq_file *m, loff_t *pos)
{
#ifdef CONFIG_SMP
while (*pos < NR_CPUS && !cpu_isset(*pos, cpu_online_map))
while (*pos < nr_cpu_ids && !cpu_online(*pos))
++*pos;
#endif
return *pos < NR_CPUS ? cpu_data(*pos) : NULL;
return *pos < nr_cpu_ids ? cpu_data(*pos) : NULL;
}

static void *
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/sn/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ nasid_slice_to_cpuid(int nasid, int slice)
{
long cpu;

for (cpu = 0; cpu < NR_CPUS; cpu++)
for (cpu = 0; cpu < nr_cpu_ids; cpu++)
if (cpuid_to_nasid(cpu) == nasid &&
cpuid_to_slice(cpu) == slice)
return cpu;
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -461,15 +461,15 @@ bool sn_cpu_disable_allowed(int cpu)

static void *sn2_ptc_seq_start(struct seq_file *file, loff_t * offset)
{
if (*offset < NR_CPUS)
if (*offset < nr_cpu_ids)
return offset;
return NULL;
}

static void *sn2_ptc_seq_next(struct seq_file *file, void *data, loff_t * offset)
{
(*offset)++;
if (*offset < NR_CPUS)
if (*offset < nr_cpu_ids)
return offset;
return NULL;
}
Expand All @@ -491,7 +491,7 @@ static int sn2_ptc_seq_show(struct seq_file *file, void *data)
seq_printf(file, "# ptctest %d, flushopt %d\n", sn2_ptctest, sn2_flush_opt);
}

if (cpu < NR_CPUS && cpu_online(cpu)) {
if (cpu < nr_cpu_ids && cpu_online(cpu)) {
stat = &per_cpu(ptcstats, cpu);
seq_printf(file, "cpu %d %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld\n", cpu, stat->ptc_l,
stat->change_rid, stat->shub_ptc_flushes, stat->nodes_flushed,
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/ia64/sn/kernel/sn2/sn_hwperf.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ static int sn_hwperf_op_cpu(struct sn_hwperf_op_info *op_info)
op_info->a->arg &= SN_HWPERF_ARG_OBJID_MASK;

if (cpu != SN_HWPERF_ARG_ANY_CPU) {
if (cpu >= NR_CPUS || !cpu_online(cpu)) {
if (cpu >= nr_cpu_ids || !cpu_online(cpu)) {
r = -EINVAL;
goto out;
}
Expand Down

0 comments on commit 960a0a8

Please sign in to comment.