alpha: use set_irq_chip and push down __do_IRQ to the machine types
authorKyle McMartin <kyle@redhat.com>
Fri, 15 Oct 2010 02:31:11 +0000 (22:31 -0400)
committerMatt Turner <mattst88@monolith.freenet-rz.de>
Mon, 17 Jan 2011 04:42:11 +0000 (05:42 +0100)
Also kill superfluous IRQ_DISABLED initialization, since that's the
default state of the irq_desc[i].status field.

Tested-by: Michael Cree <mcree@orcon.net.nz>
Signed-off-by: Kyle McMartin <kyle@redhat.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
20 files changed:
arch/alpha/include/asm/irq.h
arch/alpha/kernel/irq.c
arch/alpha/kernel/irq_i8259.c
arch/alpha/kernel/irq_pyxis.c
arch/alpha/kernel/irq_srm.c
arch/alpha/kernel/sys_alcor.c
arch/alpha/kernel/sys_cabriolet.c
arch/alpha/kernel/sys_dp264.c
arch/alpha/kernel/sys_eb64p.c
arch/alpha/kernel/sys_eiger.c
arch/alpha/kernel/sys_jensen.c
arch/alpha/kernel/sys_marvel.c
arch/alpha/kernel/sys_mikasa.c
arch/alpha/kernel/sys_noritake.c
arch/alpha/kernel/sys_rawhide.c
arch/alpha/kernel/sys_rx164.c
arch/alpha/kernel/sys_sable.c
arch/alpha/kernel/sys_takara.c
arch/alpha/kernel/sys_titan.c
arch/alpha/kernel/sys_wildfire.c

index 06377400dc09b4750d54c32a6d433c0224cb3857..4126441c8ef1ea30fe2d0632a1e29956aca8b823 100644 (file)
@@ -88,4 +88,7 @@ static __inline__ int irq_canonicalize(int irq)
 struct pt_regs;
 extern void (*perf_irq)(unsigned long, struct pt_regs *);
 
+struct irq_desc;
+extern void alpha_do_IRQ(unsigned int irq, struct irq_desc *desc);
+
 #endif /* _ALPHA_IRQ_H */
index fe912984d9b1fae21657d36e3b35613525986341..ecfa51eafd7554a7ba092fe60069e49575daf597 100644 (file)
@@ -159,6 +159,11 @@ handle_irq(int irq)
         * at IPL 0.
         */
        local_irq_disable();
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
        irq_exit();
 }
+
+void alpha_do_IRQ(unsigned int irq, struct irq_desc *desc)
+{
+       __do_IRQ(irq);
+}
index 83a9ac2808908cf49e2014bf1960e4cdb95afc95..39299fbb637cca9afa69423fcc359dd1db43a19c 100644 (file)
@@ -107,8 +107,7 @@ init_i8259a_irqs(void)
        outb(0xff, 0xA1);       /* mask all of 8259A-2 */
 
        for (i = 0; i < 16; i++) {
-               irq_desc[i].status = IRQ_DISABLED;
-               irq_desc[i].chip = &i8259a_irq_type;
+               set_irq_chip_and_handler(i, &i8259a_irq_type, alpha_do_IRQ);
        }
 
        setup_irq(2, &cascade);
index 989ce46a0cf3392e22d57f36fe23c8ab1752d5d6..4e1904cd0fc0a3aa76a8fffcad87979a0fa465df 100644 (file)
@@ -119,8 +119,8 @@ init_pyxis_irqs(unsigned long ignore_mask)
        for (i = 16; i < 48; ++i) {
                if ((ignore_mask >> i) & 1)
                        continue;
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &pyxis_irq_type;
+               set_irq_chip_and_handler(i, &pyxis_irq_type, alpha_do_IRQ);
+               irq_desc[i].status |= IRQ_LEVEL;
        }
 
        setup_irq(16+7, &isa_cascade_irqaction);
index d63e93e1e8bf885295a26e4ec154c836a96c3d64..b337cfc9d6bbcc1210c8273e5c9363baea38e6c0 100644 (file)
@@ -68,8 +68,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
        for (i = 16; i < max; ++i) {
                if (i < 64 && ((ignore_mask >> i) & 1))
                        continue;
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &srm_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &srm_irq_type, alpha_do_IRQ);
        }
 }
 
index 20a30b8b96559e888223d16e60dec6bad9347297..d8c918384f2d5c8e26c3a286cd259e6659166785 100644 (file)
@@ -142,8 +142,8 @@ alcor_init_irq(void)
                   on while IRQ probing.  */
                if (i >= 16+20 && i <= 16+30)
                        continue;
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &alcor_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &alcor_irq_type, alpha_do_IRQ);
        }
        i8259a_irq_type.ack = alcor_isa_mask_and_ack_irq;
 
index 14c8898d19ec86fb8d4273dc527e7d860bcb8132..ba38fcd347d61180de6166608bc27affba2aacf0 100644 (file)
@@ -122,8 +122,9 @@ common_init_irq(void (*srm_dev_int)(unsigned long v))
                outb(0xff, 0x806);
 
                for (i = 16; i < 35; ++i) {
-                       irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-                       irq_desc[i].chip = &cabriolet_irq_type;
+                       set_irq_chip_and_handler(i, &cabriolet_irq_type,
+                               alpha_do_IRQ);
+                       irq_desc[i].status |= IRQ_LEVEL;
                }
        }
 
index 4026502ab7077d639b37de28a07dafcc08cb94cd..147154d372e06310ffd4a4d8df2bfdf9587adc96 100644 (file)
@@ -302,8 +302,8 @@ init_tsunami_irqs(struct irq_chip * ops, int imin, int imax)
 {
        long i;
        for (i = imin; i <= imax; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = ops;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, ops, alpha_do_IRQ);
        }
 }
 
index df2090ce5e7f622b4bececed8ee38cfc0e2b558b..cb309a422c018ee86a2780b8290968989ebdd9ca 100644 (file)
@@ -135,8 +135,8 @@ eb64p_init_irq(void)
        init_i8259a_irqs();
 
        for (i = 16; i < 32; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &eb64p_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &eb64p_irq_type, alpha_do_IRQ);
        }               
 
        common_init_isa_dma();
index 3ca1dbcf404477deb345277541df0b93f9776957..16a5483cb753b2ca74418963bde5a91c4ac65688 100644 (file)
@@ -153,8 +153,8 @@ eiger_init_irq(void)
        init_i8259a_irqs();
 
        for (i = 16; i < 128; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &eiger_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &eiger_irq_type, alpha_do_IRQ);
        }
 }
 
index 7a7ae36fff913d22448687188c4c56536f2b96ae..5b64f913bedca40aee1707a87099cbec01bf0ba3 100644 (file)
@@ -206,11 +206,11 @@ jensen_init_irq(void)
 {
        init_i8259a_irqs();
 
-       irq_desc[1].chip = &jensen_local_irq_type;
-       irq_desc[4].chip = &jensen_local_irq_type;
-       irq_desc[3].chip = &jensen_local_irq_type;
-       irq_desc[7].chip = &jensen_local_irq_type;
-       irq_desc[9].chip = &jensen_local_irq_type;
+       set_irq_chip_and_handler(1, &jensen_local_irq_type, alpha_do_IRQ);
+       set_irq_chip_and_handler(4, &jensen_local_irq_type, alpha_do_IRQ);
+       set_irq_chip_and_handler(3, &jensen_local_irq_type, alpha_do_IRQ);
+       set_irq_chip_and_handler(7, &jensen_local_irq_type, alpha_do_IRQ);
+       set_irq_chip_and_handler(9, &jensen_local_irq_type, alpha_do_IRQ);
 
        common_init_isa_dma();
 }
index 0bb3b5c4f69377c3d146237ef50786ee78b56aae..0d0699eef08c363356fa13b1b8dd36e744b0bcb9 100644 (file)
@@ -304,8 +304,8 @@ init_io7_irqs(struct io7 *io7,
 
        /* Set up the lsi irqs.  */
        for (i = 0; i < 128; ++i) {
-               irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[base + i].chip = lsi_ops;
+               irq_desc[base + i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(base + i, lsi_ops, alpha_do_IRQ);
        }
 
        /* Disable the implemented irqs in hardware.  */
@@ -318,8 +318,8 @@ init_io7_irqs(struct io7 *io7,
 
        /* Set up the msi irqs.  */
        for (i = 128; i < (128 + 512); ++i) {
-               irq_desc[base + i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[base + i].chip = msi_ops;
+               irq_desc[base + i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(base + i, msi_ops, alpha_do_IRQ);
        }
 
        for (i = 0; i < 16; ++i)
@@ -336,8 +336,8 @@ marvel_init_irq(void)
 
        /* Reserve the legacy irqs.  */
        for (i = 0; i < 16; ++i) {
-               irq_desc[i].status = IRQ_DISABLED;
-               irq_desc[i].chip = &marvel_legacy_irq_type;
+               set_irq_chip_and_handler(i, &marvel_legacy_irq_type,
+                       alpha_do_IRQ);
        }
 
        /* Init the io7 irqs.  */
index ee88651698110e335dbe644c51ce47601ea3e5f2..a27bc56dddaf96dda201a1e393d16a7764954907 100644 (file)
@@ -115,8 +115,8 @@ mikasa_init_irq(void)
        mikasa_update_irq_hw(0);
 
        for (i = 16; i < 32; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &mikasa_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &mikasa_irq_type, alpha_do_IRQ);
        }
 
        init_i8259a_irqs();
index 86503fe73a8804444d52098d51bb1cd5b787aa85..a4f07d6c9397be35f87a4b370b4ab2c7c6a0ff71 100644 (file)
@@ -144,8 +144,8 @@ noritake_init_irq(void)
        outw(0, 0x54c);
 
        for (i = 16; i < 48; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &noritake_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &noritake_irq_type, alpha_do_IRQ);
        }
 
        init_i8259a_irqs();
index 26c322bf89ee195a81863c8a4b42418991c6513f..a63da5c6eb884c9d24c555705847a21ff76f6209 100644 (file)
@@ -194,8 +194,8 @@ rawhide_init_irq(void)
        }
 
        for (i = 16; i < 128; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &rawhide_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &rawhide_irq_type, alpha_do_IRQ);
        }
 
        init_i8259a_irqs();
index be161129eab996b0225adc4c73bd1d33ac55e794..0465716d343328f1fcc1351a28ff4523e7bbac3f 100644 (file)
@@ -116,8 +116,8 @@ rx164_init_irq(void)
 
        rx164_update_irq_hw(0);
        for (i = 16; i < 40; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &rx164_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &rx164_irq_type, alpha_do_IRQ);
        }
 
        init_i8259a_irqs();
index b2abe27a23cff2ad2164f9827efb938e395ce84f..944b598b80e61f13939a03b4cd535a430e7150d5 100644 (file)
@@ -535,8 +535,9 @@ sable_lynx_init_irq(int nr_of_irqs)
        long i;
 
        for (i = 0; i < nr_of_irqs; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &sable_lynx_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &sable_lynx_irq_type,
+                       alpha_do_IRQ);
        }
 
        common_init_isa_dma();
index 4da596b6adbbb408ee9bb1e918b8891d3b148a29..00df4e7b8d7d5d77d6e5d529845a7539d2efc853 100644 (file)
@@ -153,8 +153,8 @@ takara_init_irq(void)
                takara_update_irq_hw(i, -1);
 
        for (i = 16; i < 128; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = &takara_irq_type;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, &takara_irq_type, alpha_do_IRQ);
        }
 
        common_init_isa_dma();
index 9008d0f20c534dcb4ed20a73e2c5f21581df393a..ffa48e8a27c77d017eb4523045a0c92ef8f54ac5 100644 (file)
@@ -189,8 +189,8 @@ init_titan_irqs(struct irq_chip * ops, int imin, int imax)
 {
        long i;
        for (i = imin; i <= imax; ++i) {
-               irq_desc[i].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i].chip = ops;
+               irq_desc[i].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i, ops, alpha_do_IRQ);
        }
 }
 
index 62fd972e18efcd42156fc3734ce15a2f1edc5819..ea86103f53c3507febf7e9ad00c222a84d5eea50 100644 (file)
@@ -198,15 +198,17 @@ wildfire_init_irq_per_pca(int qbbno, int pcano)
        for (i = 0; i < 16; ++i) {
                if (i == 2)
                        continue;
-               irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i+irq_bias].chip = &wildfire_irq_type;
+               irq_desc[i+irq_bias].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
+                       alpha_do_IRQ);
        }
 
-       irq_desc[36+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
-       irq_desc[36+irq_bias].chip = &wildfire_irq_type;
+       irq_desc[36+irq_bias].status |= IRQ_LEVEL;
+       set_irq_chip_and_handler(36+irq_bias, &wildfire_irq_type, alpha_do_IRQ);
        for (i = 40; i < 64; ++i) {
-               irq_desc[i+irq_bias].status = IRQ_DISABLED | IRQ_LEVEL;
-               irq_desc[i+irq_bias].chip = &wildfire_irq_type;
+               irq_desc[i+irq_bias].status |= IRQ_LEVEL;
+               set_irq_chip_and_handler(i+irq_bias, &wildfire_irq_type,
+                       alpha_do_IRQ);
        }
 
        setup_irq(32+irq_bias, &isa_enable);