Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251823
b: refs/heads/master
c: 7ef71d7
h: refs/heads/master
i:
  251821: 1a8a466
  251819: 79453cf
  251815: 1b6dcb9
  251807: 036ffe8
v: v3
  • Loading branch information
Milton Miller authored and Benjamin Herrenschmidt committed May 26, 2011
1 parent 51e3aec commit 5d72b7e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 36 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: ce2a40458ebf9c2e47fa0806fec31f845bfcb9d5
refs/heads/master: 7ef71d753ea0286bfeb4251b9ba592716ebdd9e8
2 changes: 0 additions & 2 deletions trunk/arch/powerpc/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ extern unsigned long __secondary_hold_spinloop;
extern unsigned long __secondary_hold_acknowledge;
extern char __secondary_hold;

extern irqreturn_t debug_ipi_action(int irq, void *data);

#endif /* __ASSEMBLY__ */

#endif /* __KERNEL__ */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static irqreturn_t call_function_single_action(int irq, void *data)
return IRQ_HANDLED;
}

irqreturn_t debug_ipi_action(int irq, void *data)
static irqreturn_t debug_ipi_action(int irq, void *data)
{
if (crash_ipi_function_ptr) {
crash_ipi_function_ptr(get_irq_regs());
Expand Down
45 changes: 13 additions & 32 deletions trunk/arch/powerpc/platforms/cell/interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,50 +192,31 @@ struct irq_host *iic_get_irq_host(int node)
}
EXPORT_SYMBOL_GPL(iic_get_irq_host);

static irqreturn_t iic_ipi_action(int irq, void *dev_id)
{
int ipi = (int)(long)dev_id;

switch(ipi) {
case PPC_MSG_CALL_FUNCTION:
generic_smp_call_function_interrupt();
break;
case PPC_MSG_RESCHEDULE:
scheduler_ipi();
break;
case PPC_MSG_CALL_FUNC_SINGLE:
generic_smp_call_function_single_interrupt();
break;
case PPC_MSG_DEBUGGER_BREAK:
debug_ipi_action(0, NULL);
break;
}
return IRQ_HANDLED;
}
static void iic_request_ipi(int ipi, const char *name)
static void iic_request_ipi(int ipi)
{
int virq;

virq = irq_create_mapping(iic_host, iic_ipi_to_irq(ipi));
if (virq == NO_IRQ) {
printk(KERN_ERR
"iic: failed to map IPI %s\n", name);
"iic: failed to map IPI %s\n", smp_ipi_name[ipi]);
return;
}
if (request_irq(virq, iic_ipi_action, IRQF_DISABLED, name,
(void *)(long)ipi))
printk(KERN_ERR
"iic: failed to request IPI %s\n", name);

/*
* If smp_request_message_ipi encounters an error it will notify
* the error. If a message is not needed it will return non-zero.
*/
if (smp_request_message_ipi(virq, ipi))
irq_dispose_mapping(virq);
}

void iic_request_IPIs(void)
{
iic_request_ipi(PPC_MSG_CALL_FUNCTION, "IPI-call");
iic_request_ipi(PPC_MSG_RESCHEDULE, "IPI-resched");
iic_request_ipi(PPC_MSG_CALL_FUNC_SINGLE, "IPI-call-single");
#ifdef CONFIG_DEBUGGER
iic_request_ipi(PPC_MSG_DEBUGGER_BREAK, "IPI-debug");
#endif /* CONFIG_DEBUGGER */
iic_request_ipi(PPC_MSG_CALL_FUNCTION);
iic_request_ipi(PPC_MSG_RESCHEDULE);
iic_request_ipi(PPC_MSG_CALL_FUNC_SINGLE);
iic_request_ipi(PPC_MSG_DEBUGGER_BREAK);
}

#endif /* CONFIG_SMP */
Expand Down

0 comments on commit 5d72b7e

Please sign in to comment.