Commit dd47dfea authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] cpumask updates in open_pic.c (ppc)

	compile fixes in open_pic.c - it missed cpumask conversion in several
places.
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6160174a
...@@ -554,14 +554,16 @@ static void __init openpic_initipi(u_int ipi, u_int pri, u_int vec) ...@@ -554,14 +554,16 @@ static void __init openpic_initipi(u_int ipi, u_int pri, u_int vec)
* Externally called, however, it takes an IPI number (0...OPENPIC_NUM_IPI) * Externally called, however, it takes an IPI number (0...OPENPIC_NUM_IPI)
* and not a system-wide interrupt number * and not a system-wide interrupt number
*/ */
void openpic_cause_IPI(u_int ipi, u_int cpumask) void openpic_cause_IPI(u_int ipi, cpumask_t cpumask)
{ {
cpumask_t phys;
DECL_THIS_CPU; DECL_THIS_CPU;
CHECK_THIS_CPU; CHECK_THIS_CPU;
check_arg_ipi(ipi); check_arg_ipi(ipi);
phys = physmask(cpumask);
openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi), openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi),
physmask(cpumask)); cpus_addr(physmask(cpumask))[0]);
} }
void openpic_request_IPIs(void) void openpic_request_IPIs(void)
...@@ -610,7 +612,7 @@ void __devinit do_openpic_setup_cpu(void) ...@@ -610,7 +612,7 @@ void __devinit do_openpic_setup_cpu(void)
spin_lock(&openpic_setup_lock); spin_lock(&openpic_setup_lock);
#ifdef CONFIG_IRQ_ALL_CPUS #ifdef CONFIG_IRQ_ALL_CPUS
cpu_set(smp_hw_index[smp_processor_id()], mask); cpu_set(smp_hw_index[smp_processor_id()], msk);
/* let the openpic know we want intrs. default affinity /* let the openpic know we want intrs. default affinity
* is 0xffffffff until changed via /proc * is 0xffffffff until changed via /proc
...@@ -872,6 +874,7 @@ openpic_get_irq(struct pt_regs *regs) ...@@ -872,6 +874,7 @@ openpic_get_irq(struct pt_regs *regs)
void void
smp_openpic_message_pass(int target, int msg, unsigned long data, int wait) smp_openpic_message_pass(int target, int msg, unsigned long data, int wait)
{ {
cpumask_t mask = CPU_MASK_ALL;
/* make sure we're sending something that translates to an IPI */ /* make sure we're sending something that translates to an IPI */
if (msg > 0x3) { if (msg > 0x3) {
printk("SMP %d: smp_message_pass: unknown msg %d\n", printk("SMP %d: smp_message_pass: unknown msg %d\n",
...@@ -880,14 +883,14 @@ smp_openpic_message_pass(int target, int msg, unsigned long data, int wait) ...@@ -880,14 +883,14 @@ smp_openpic_message_pass(int target, int msg, unsigned long data, int wait)
} }
switch (target) { switch (target) {
case MSG_ALL: case MSG_ALL:
openpic_cause_IPI(msg, 0xffffffff); openpic_cause_IPI(msg, mask);
break; break;
case MSG_ALL_BUT_SELF: case MSG_ALL_BUT_SELF:
openpic_cause_IPI(msg, cpu_clear(smp_processor_id(), mask);
0xffffffff & ~(1 << smp_processor_id())); openpic_cause_IPI(msg, mask);
break; break;
default: default:
openpic_cause_IPI(msg, 1<<target); openpic_cause_IPI(msg, cpumask_of_cpu(target));
break; break;
} }
} }
......
...@@ -50,7 +50,7 @@ extern void do_openpic_setup_cpu(void); ...@@ -50,7 +50,7 @@ extern void do_openpic_setup_cpu(void);
extern int openpic_get_irq(struct pt_regs *regs); extern int openpic_get_irq(struct pt_regs *regs);
extern void openpic_reset_processor_phys(u_int cpumask); extern void openpic_reset_processor_phys(u_int cpumask);
extern void openpic_setup_ISU(int isu_num, unsigned long addr); extern void openpic_setup_ISU(int isu_num, unsigned long addr);
extern void openpic_cause_IPI(u_int ipi, u_int cpumask); extern void openpic_cause_IPI(u_int ipi, cpumask_t cpumask);
extern void smp_openpic_message_pass(int target, int msg, unsigned long data, extern void smp_openpic_message_pass(int target, int msg, unsigned long data,
int wait); int wait);
extern void openpic_set_k2_cascade(int irq); extern void openpic_set_k2_cascade(int irq);
......
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