Commit 861be32c authored by Geoff Levand's avatar Geoff Levand Committed by Paul Mackerras

[POWERPC] ps3: bind interrupt to cpu

Change the PS3 irq allocation routines to take an argument indicating which
cpu (processor thread) the interrupt should be serviced on.

The current system configuration favors device interrupts that are serviced
on cpu0, so that is used as the default.
Signed-off-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
Acked-by: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 9cf9e196
This diff is collapsed.
......@@ -111,7 +111,7 @@ static void __init ps3_smp_setup_cpu(int cpu)
BUILD_BUG_ON(PPC_MSG_DEBUGGER_BREAK != 3);
for (i = 0; i < MSG_COUNT; i++) {
result = ps3_alloc_event_irq(&virqs[i]);
result = ps3_alloc_event_irq(cpu, &virqs[i]);
if (result)
continue;
......
......@@ -267,20 +267,20 @@ static int __init setup_interrupts(struct spu *spu)
{
int result;
result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 0,
&spu->irqs[0]);
result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
0, &spu->irqs[0]);
if (result)
goto fail_alloc_0;
result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 1,
&spu->irqs[1]);
result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
1, &spu->irqs[1]);
if (result)
goto fail_alloc_1;
result = ps3_alloc_spe_irq(spu_pdata(spu)->spe_id, 2,
&spu->irqs[2]);
result = ps3_alloc_spe_irq(PS3_BINDING_CPU_ANY, spu_pdata(spu)->spe_id,
2, &spu->irqs[2]);
if (result)
goto fail_alloc_2;
......
......@@ -783,8 +783,8 @@ static int ps3_vuart_probe(struct device *_dev)
vuart_private.in_use++;
if (vuart_private.in_use == 1) {
result = ps3_alloc_vuart_irq((void*)&vuart_private.bmp.status,
&vuart_private.virq);
result = ps3_alloc_vuart_irq(PS3_BINDING_CPU_ANY,
(void*)&vuart_private.bmp.status, &vuart_private.virq);
if (result) {
dev_dbg(&dev->core,
......
......@@ -140,19 +140,28 @@ unsigned long ps3_mm_phys_to_lpar(unsigned long phys_addr);
/* inrerrupt routines */
int ps3_alloc_io_irq(unsigned int interrupt_id, unsigned int *virq);
enum ps3_cpu_binding {
PS3_BINDING_CPU_ANY = -1,
PS3_BINDING_CPU_0 = 0,
PS3_BINDING_CPU_1 = 1,
};
int ps3_alloc_io_irq(enum ps3_cpu_binding cpu, unsigned int interrupt_id,
unsigned int *virq);
int ps3_free_io_irq(unsigned int virq);
int ps3_alloc_event_irq(unsigned int *virq);
int ps3_alloc_event_irq(enum ps3_cpu_binding cpu, unsigned int *virq);
int ps3_free_event_irq(unsigned int virq);
int ps3_send_event_locally(unsigned int virq);
int ps3_connect_event_irq(const struct ps3_device_id *did,
unsigned int interrupt_id, unsigned int *virq);
int ps3_connect_event_irq(enum ps3_cpu_binding cpu,
const struct ps3_device_id *did, unsigned int interrupt_id,
unsigned int *virq);
int ps3_disconnect_event_irq(const struct ps3_device_id *did,
unsigned int interrupt_id, unsigned int virq);
int ps3_alloc_vuart_irq(void* virt_addr_bmp, unsigned int *virq);
int ps3_free_vuart_irq(unsigned int virq);
int ps3_alloc_spe_irq(unsigned long spe_id, unsigned int class,
int ps3_alloc_vuart_irq(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
unsigned int *virq);
int ps3_free_vuart_irq(unsigned int virq);
int ps3_alloc_spe_irq(enum ps3_cpu_binding cpu, unsigned long spe_id,
unsigned int class, unsigned int *virq);
int ps3_free_spe_irq(unsigned int virq);
/* lv1 result codes */
......
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