smp.c (42249094f79422fbf5ed4b54eeb48ff096809b8f) smp.c (310ff2c87e72208e4f04f33687abe9d208ffefe3)
1/*
2 * Copyright (C) 2001,2002,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *

--- 168 unchanged lines hidden (view full) ---

177};
178
179void bcm1480_mailbox_interrupt(void)
180{
181 int cpu = smp_processor_id();
182 int irq = K_BCM1480_INT_MBOX_0_0;
183 unsigned int action;
184
1/*
2 * Copyright (C) 2001,2002,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *

--- 168 unchanged lines hidden (view full) ---

177};
178
179void bcm1480_mailbox_interrupt(void)
180{
181 int cpu = smp_processor_id();
182 int irq = K_BCM1480_INT_MBOX_0_0;
183 unsigned int action;
184
185 kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
185 kstat_incr_irq_this_cpu(irq);
186 /* Load the mailbox register to figure out what we're supposed to do */
187 action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff;
188
189 /* Clear the mailbox to clear the interrupt */
190 __raw_writeq(((u64)action)<<48, mailbox_0_clear_regs[cpu]);
191
192 if (action & SMP_RESCHEDULE_YOURSELF)
193 scheduler_ipi();
194
195 if (action & SMP_CALL_FUNCTION)
196 smp_call_function_interrupt();
197}
186 /* Load the mailbox register to figure out what we're supposed to do */
187 action = (__raw_readq(mailbox_0_regs[cpu]) >> 48) & 0xffff;
188
189 /* Clear the mailbox to clear the interrupt */
190 __raw_writeq(((u64)action)<<48, mailbox_0_clear_regs[cpu]);
191
192 if (action & SMP_RESCHEDULE_YOURSELF)
193 scheduler_ipi();
194
195 if (action & SMP_CALL_FUNCTION)
196 smp_call_function_interrupt();
197}