]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/ps3/interrupt.c
powerpc/ps3: clear_bit()/set_bit() operate on unsigned longs
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / ps3 / interrupt.c
index 67e32ec9b37e8da948d488ced85d1f757298cd62..3ea6e51a7ffc519214889f46c1cf44d910efd29b 100644 (file)
@@ -60,6 +60,8 @@
  * gives a usable range of plug values of  {NUM_ISA_INTERRUPTS..63}.  Note
  * that there is no constraint on how many in this set an individual thread
  * can acquire.
+ *
+ * The mask is declared as unsigned long so we can use set/clear_bit on it.
  */
 
 #define PS3_BMP_MINALIGN 64
@@ -68,7 +70,7 @@ struct ps3_bmp {
        struct {
                u64 status;
                u64 unused_1[3];
-               u64 mask;
+               unsigned long mask;
                u64 unused_2[3];
        };
        u64 ipi_debug_brk_mask;
@@ -167,8 +169,8 @@ static struct irq_chip ps3_irq_chip = {
  * ps3_private data.
  */
 
-int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
-       unsigned int *virq)
+static int ps3_virq_setup(enum ps3_cpu_binding cpu, unsigned long outlet,
+                         unsigned int *virq)
 {
        int result;
        struct ps3_private *pd;
@@ -217,7 +219,7 @@ fail_create:
  * Clears chip data and calls irq_dispose_mapping() for the virq.
  */
 
-int ps3_virq_destroy(unsigned int virq)
+static int ps3_virq_destroy(unsigned int virq)
 {
        const struct ps3_private *pd = get_irq_chip_data(virq);
 
@@ -322,7 +324,7 @@ EXPORT_SYMBOL_GPL(ps3_irq_plug_destroy);
 int ps3_event_receive_port_setup(enum ps3_cpu_binding cpu, unsigned int *virq)
 {
        int result;
-       unsigned long outlet;
+       u64 outlet;
 
        result = lv1_construct_event_receive_port(&outlet);
 
@@ -468,7 +470,7 @@ int ps3_io_irq_setup(enum ps3_cpu_binding cpu, unsigned int interrupt_id,
        unsigned int *virq)
 {
        int result;
-       unsigned long outlet;
+       u64 outlet;
 
        result = lv1_construct_io_irq_outlet(interrupt_id, &outlet);
 
@@ -525,7 +527,7 @@ int ps3_vuart_irq_setup(enum ps3_cpu_binding cpu, void* virt_addr_bmp,
        unsigned int *virq)
 {
        int result;
-       unsigned long outlet;
+       u64 outlet;
        u64 lpar_addr;
 
        BUG_ON(!is_kernel_addr((u64)virt_addr_bmp));
@@ -581,7 +583,7 @@ int ps3_spe_irq_setup(enum ps3_cpu_binding cpu, unsigned long spe_id,
        unsigned int class, unsigned int *virq)
 {
        int result;
-       unsigned long outlet;
+       u64 outlet;
 
        BUG_ON(class > 2);
 
@@ -673,9 +675,16 @@ static int ps3_host_map(struct irq_host *h, unsigned int virq,
        return 0;
 }
 
+static int ps3_host_match(struct irq_host *h, struct device_node *np)
+{
+       /* Match all */
+       return 1;
+}
+
 static struct irq_host_ops ps3_host_ops = {
        .map = ps3_host_map,
        .unmap = ps3_host_unmap,
+       .match = ps3_host_match,
 };
 
 void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
@@ -702,7 +711,7 @@ static unsigned int ps3_get_irq(void)
        asm volatile("cntlzd %0,%1" : "=r" (plug) : "r" (x));
        plug &= 0x3f;
 
-       if (unlikely(plug) == NO_IRQ) {
+       if (unlikely(plug == NO_IRQ)) {
                pr_debug("%s:%d: no plug found: thread_id %lu\n", __func__,
                        __LINE__, pd->thread_id);
                dump_bmp(&per_cpu(ps3_private, 0));
@@ -726,7 +735,7 @@ void __init ps3_init_IRQ(void)
        unsigned cpu;
        struct irq_host *host;
 
-       host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops,
+       host = irq_alloc_host(NULL, IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops,
                PS3_INVALID_OUTLET);
        irq_set_default_host(host);
        irq_set_virq_count(PS3_PLUG_MAX + 1);