Commit 7f1c9f57 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] cpumask: remove obsolete cpumask macro uses - other archs

From: Paul Jackson <pj@sgi.com>

Remove by recoding other uses of the obsolete cpumask const, coerce and
promote macros.
Signed-off-by: default avatarPaul Jackson <pj@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9eb0dcc1
...@@ -591,7 +591,7 @@ static inline u32 physmask(u32 cpumask) ...@@ -591,7 +591,7 @@ static inline u32 physmask(u32 cpumask)
void openpic_init_processor(u_int cpumask) void openpic_init_processor(u_int cpumask)
{ {
openpic_write(&OpenPIC->Global.Processor_Initialization, openpic_write(&OpenPIC->Global.Processor_Initialization,
physmask(cpumask & cpus_coerce(cpu_online_map))); physmask(cpumask & cpus_addr(cpu_online_map)[0]));
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
...@@ -625,7 +625,7 @@ void openpic_cause_IPI(u_int ipi, u_int cpumask) ...@@ -625,7 +625,7 @@ void openpic_cause_IPI(u_int ipi, u_int cpumask)
CHECK_THIS_CPU; CHECK_THIS_CPU;
check_arg_ipi(ipi); check_arg_ipi(ipi);
openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi), openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi),
physmask(cpumask & cpus_coerce(cpu_online_map))); physmask(cpumask & cpus_addr(cpu_online_map)[0]));
} }
void openpic_request_IPIs(void) void openpic_request_IPIs(void)
...@@ -711,7 +711,7 @@ static void __init openpic_maptimer(u_int timer, u_int cpumask) ...@@ -711,7 +711,7 @@ static void __init openpic_maptimer(u_int timer, u_int cpumask)
{ {
check_arg_timer(timer); check_arg_timer(timer);
openpic_write(&OpenPIC->Global.Timer[timer].Destination, openpic_write(&OpenPIC->Global.Timer[timer].Destination,
physmask(cpumask & cpus_coerce(cpu_online_map))); physmask(cpumask & cpus_addr(cpu_online_map)[0]));
} }
...@@ -844,7 +844,7 @@ static void openpic_set_affinity(unsigned int irq_nr, cpumask_t cpumask) ...@@ -844,7 +844,7 @@ static void openpic_set_affinity(unsigned int irq_nr, cpumask_t cpumask)
cpumask_t tmp; cpumask_t tmp;
cpus_and(tmp, cpumask, cpu_online_map); cpus_and(tmp, cpumask, cpu_online_map);
openpic_mapirq(irq_nr - open_pic_irq_offset, physmask(cpus_coerce(tmp))); openpic_mapirq(irq_nr - open_pic_irq_offset, physmask(cpus_addr(tmp)[0]));
} }
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
...@@ -415,7 +415,7 @@ static int rtasd(void *unused) ...@@ -415,7 +415,7 @@ static int rtasd(void *unused)
} }
lock_cpu_hotplug(); lock_cpu_hotplug();
cpu = first_cpu_const(mk_cpumask_const(cpu_online_map)); cpu = first_cpu(cpu_online_map);
for (;;) { for (;;) {
set_cpus_allowed(current, cpumask_of_cpu(cpu)); set_cpus_allowed(current, cpumask_of_cpu(cpu));
do_event_scan(event_scan); do_event_scan(event_scan);
...@@ -429,9 +429,9 @@ static int rtasd(void *unused) ...@@ -429,9 +429,9 @@ static int rtasd(void *unused)
schedule_timeout((HZ*60/rtas_event_scan_rate) / 2); schedule_timeout((HZ*60/rtas_event_scan_rate) / 2);
lock_cpu_hotplug(); lock_cpu_hotplug();
cpu = next_cpu_const(cpu, mk_cpumask_const(cpu_online_map)); cpu = next_cpu(cpu, cpu_online_map);
if (cpu == NR_CPUS) if (cpu == NR_CPUS)
cpu = first_cpu_const(mk_cpumask_const(cpu_online_map)); cpu = first_cpu(cpu_online_map);
} }
error: error:
......
...@@ -1384,7 +1384,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask) ...@@ -1384,7 +1384,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
unsigned long flags; unsigned long flags;
unsigned int dest; unsigned int dest;
dest = cpu_mask_to_apicid(mk_cpumask_const(mask)); dest = cpu_mask_to_apicid(mask);
/* /*
* Only the first 8 bits are valid. * Only the first 8 bits are valid.
......
...@@ -148,7 +148,7 @@ static void flush_gart(struct pci_dev *dev) ...@@ -148,7 +148,7 @@ static void flush_gart(struct pci_dev *dev)
{ {
unsigned long flags; unsigned long flags;
int bus = dev ? dev->bus->number : -1; int bus = dev ? dev->bus->number : -1;
cpumask_const_t bus_cpumask = pcibus_to_cpumask(bus); cpumask_t bus_cpumask = pcibus_to_cpumask(bus);
int flushed = 0; int flushed = 0;
int i; int i;
...@@ -158,7 +158,7 @@ static void flush_gart(struct pci_dev *dev) ...@@ -158,7 +158,7 @@ static void flush_gart(struct pci_dev *dev)
u32 w; u32 w;
if (!northbridges[i]) if (!northbridges[i])
continue; continue;
if (bus >= 0 && !(cpu_isset_const(i, bus_cpumask))) if (bus >= 0 && !(cpu_isset(i, bus_cpumask)))
continue; continue;
pci_write_config_dword(northbridges[i], 0x9c, pci_write_config_dword(northbridges[i], 0x9c,
northbridge_flush_word[i] | 1); northbridge_flush_word[i] | 1);
......
...@@ -94,7 +94,7 @@ void send_IPI_self(int vector) ...@@ -94,7 +94,7 @@ void send_IPI_self(int vector)
static inline void send_IPI_mask(cpumask_t cpumask, int vector) static inline void send_IPI_mask(cpumask_t cpumask, int vector)
{ {
unsigned long mask = cpus_coerce(cpumask); unsigned long mask = cpus_addr(cpumask)[0];
unsigned long cfg; unsigned long cfg;
unsigned long flags; unsigned long flags;
......
...@@ -105,7 +105,6 @@ static inline int cpu_present_to_apicid(int mps_cpu) ...@@ -105,7 +105,6 @@ static inline int cpu_present_to_apicid(int mps_cpu)
return BAD_APICID; return BAD_APICID;
} }
#define cpu_online(cpu) cpu_isset(cpu, cpu_online_map)
#endif /* !ASSEMBLY */ #endif /* !ASSEMBLY */
#define NO_PROC_ID 0xFF /* No processor magic marker */ #define NO_PROC_ID 0xFF /* No processor magic marker */
...@@ -115,9 +114,9 @@ static inline int cpu_present_to_apicid(int mps_cpu) ...@@ -115,9 +114,9 @@ static inline int cpu_present_to_apicid(int mps_cpu)
#define TARGET_CPUS 1 #define TARGET_CPUS 1
#ifndef ASSEMBLY #ifndef ASSEMBLY
static inline unsigned int cpu_mask_to_apicid(cpumask_const_t cpumask) static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
{ {
return cpus_coerce_const(cpumask); return cpus_addr(cpumask)[0];
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment