Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
Linus Torvalds [Thu, 28 Oct 2010 16:24:14 +0000 (09:24 -0700)]
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
  parisc: add tty driver to PDC console
  drivers/parisc/iosapic.c: Remove unnecessary kzalloc cast
  parisc: remove homegrown L1_CACHE_ALIGN macro
  arch/parisc: Removing undead ifdef CONFIG_PA20
  parisc: unwind - optimise linked-list searches for modules
  parisc: change to new flag variable
  drivers/char/agp/parisc-agp.c: eliminate memory leak
  parisc: kill __do_IRQ
  parisc: convert eisa interrupts to flow handlers
  parisc: convert gsc and dino pci interrupts to flow handlers
  parisc: convert suckyio interrupts to flow handlers
  parisc: convert iosapic interrupts to proper flow handlers
  parisc: convert cpu interrupts to proper flow handlers
  parisc: lay groundwork for killing __do_IRQ
  parisc: add prlimit64 syscall
  parisc: squelch warning when using dev_get_stats

17 files changed:
arch/parisc/Kconfig
arch/parisc/include/asm/cache.h
arch/parisc/include/asm/irq.h
arch/parisc/include/asm/unistd.h
arch/parisc/kernel/irq.c
arch/parisc/kernel/pdc_cons.c
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/unaligned.c
arch/parisc/kernel/unwind.c
arch/parisc/math-emu/Makefile
drivers/char/agp/parisc-agp.c
drivers/parisc/dino.c
drivers/parisc/eisa.c
drivers/parisc/gsc.c
drivers/parisc/iosapic.c
drivers/parisc/led.c
drivers/parisc/superio.c

index 79a04a9..abde955 100644 (file)
@@ -19,6 +19,7 @@ config PARISC
        select HAVE_IRQ_WORK
        select HAVE_PERF_EVENTS
        select GENERIC_ATOMIC64 if !64BIT
+       select GENERIC_HARDIRQS_NO__DO_IRQ
        help
          The PA-RISC microprocessor is designed by Hewlett-Packard and used
          in many of their workstations & servers (HP9000 700 and 800 series,
@@ -85,6 +86,9 @@ config IRQ_PER_CPU
        bool
        default y
 
+config GENERIC_HARDIRQS_NO__DO_IRQ
+       def_bool y
+
 # unless you want to implement ACPI on PA-RISC ... ;-)
 config PM
        bool
index 039880e..47f11c7 100644 (file)
@@ -24,8 +24,6 @@
 
 #ifndef __ASSEMBLY__
 
-#define L1_CACHE_ALIGN(x)       (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
-
 #define SMP_CACHE_BYTES L1_CACHE_BYTES
 
 #define ARCH_DMA_MINALIGN      L1_CACHE_BYTES
index dfa26b6..c67dccf 100644 (file)
@@ -40,7 +40,7 @@ struct irq_chip;
 void no_ack_irq(unsigned int irq);
 void no_end_irq(unsigned int irq);
 void cpu_ack_irq(unsigned int irq);
-void cpu_end_irq(unsigned int irq);
+void cpu_eoi_irq(unsigned int irq);
 
 extern int txn_alloc_irq(unsigned int nbits);
 extern int txn_claim_irq(int);
index 1ce7d28..3eb82c2 100644 (file)
 #define __NR_perf_event_open   (__NR_Linux + 318)
 #define __NR_recvmmsg          (__NR_Linux + 319)
 #define __NR_accept4           (__NR_Linux + 320)
+#define __NR_prlimit64         (__NR_Linux + 321)
 
-#define __NR_Linux_syscalls    (__NR_accept4 + 1)
+#define __NR_Linux_syscalls    (__NR_prlimit64 + 1)
 
 
 #define __IGNORE_select                /* newselect */
index efbcee5..5024f64 100644 (file)
@@ -52,7 +52,7 @@ static volatile unsigned long cpu_eiem = 0;
 */
 static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
 
-static void cpu_disable_irq(unsigned int irq)
+static void cpu_mask_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -63,7 +63,7 @@ static void cpu_disable_irq(unsigned int irq)
         * then gets disabled */
 }
 
-static void cpu_enable_irq(unsigned int irq)
+static void cpu_unmask_irq(unsigned int irq)
 {
        unsigned long eirr_bit = EIEM_MASK(irq);
 
@@ -75,12 +75,6 @@ static void cpu_enable_irq(unsigned int irq)
        smp_send_all_nop();
 }
 
-static unsigned int cpu_startup_irq(unsigned int irq)
-{
-       cpu_enable_irq(irq);
-       return 0;
-}
-
 void no_ack_irq(unsigned int irq) { }
 void no_end_irq(unsigned int irq) { }
 
@@ -99,7 +93,7 @@ void cpu_ack_irq(unsigned int irq)
        mtctl(mask, 23);
 }
 
-void cpu_end_irq(unsigned int irq)
+void cpu_eoi_irq(unsigned int irq)
 {
        unsigned long mask = EIEM_MASK(irq);
        int cpu = smp_processor_id();
@@ -146,12 +140,10 @@ static int cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest)
 
 static struct irq_chip cpu_interrupt_type = {
        .name           = "CPU",
-       .startup        = cpu_startup_irq,
-       .shutdown       = cpu_disable_irq,
-       .enable         = cpu_enable_irq,
-       .disable        = cpu_disable_irq,
+       .mask           = cpu_mask_irq,
+       .unmask         = cpu_unmask_irq,
        .ack            = cpu_ack_irq,
-       .end            = cpu_end_irq,
+       .eoi            = cpu_eoi_irq,
 #ifdef CONFIG_SMP
        .set_affinity   = cpu_set_affinity_irq,
 #endif
@@ -247,10 +239,11 @@ int cpu_claim_irq(unsigned int irq, struct irq_chip *type, void *data)
        if (irq_desc[irq].chip != &cpu_interrupt_type)
                return -EBUSY;
 
+       /* for iosapic interrupts */
        if (type) {
-               irq_desc[irq].chip = type;
-               irq_desc[irq].chip_data = data;
-               cpu_interrupt_type.enable(irq);
+               set_irq_chip_and_handler(irq, type, handle_level_irq);
+               set_irq_chip_data(irq, data);
+               cpu_unmask_irq(irq);
        }
        return 0;
 }
@@ -368,7 +361,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
                goto set_out;
        }
 #endif
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
 
  out:
        irq_exit();
@@ -398,14 +391,15 @@ static void claim_cpu_irqs(void)
 {
        int i;
        for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
-               irq_desc[i].chip = &cpu_interrupt_type;
+               set_irq_chip_and_handler(i, &cpu_interrupt_type,
+                       handle_level_irq);
        }
 
-       irq_desc[TIMER_IRQ].action = &timer_action;
-       irq_desc[TIMER_IRQ].status = IRQ_PER_CPU;
+       set_irq_handler(TIMER_IRQ, handle_percpu_irq);
+       setup_irq(TIMER_IRQ, &timer_action);
 #ifdef CONFIG_SMP
-       irq_desc[IPI_IRQ].action = &ipi_action;
-       irq_desc[IPI_IRQ].status = IRQ_PER_CPU;
+       set_irq_handler(IPI_IRQ, handle_percpu_irq);
+       setup_irq(IPI_IRQ, &ipi_action);
 #endif
 }
 
@@ -423,3 +417,4 @@ void __init init_IRQ(void)
         set_eiem(cpu_eiem);    /* EIEM : enable all external intr */
 
 }
+
index 1ff366c..66d1f17 100644 (file)
@@ -12,6 +12,7 @@
  *    Copyright (C) 2001 Helge Deller <deller at parisc-linux.org>
  *    Copyright (C) 2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
  *    Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
+ *    Copyright (C) 2010 Guy Martin <gmsoft at tuxicoman.be>
  *
  *
  *    This program is free software; you can redistribute it and/or modify
 
 /*
  *  The PDC console is a simple console, which can be used for debugging 
- *  boot related problems on HP PA-RISC machines.
+ *  boot related problems on HP PA-RISC machines. It is also useful when no
+ *  other console works.
  *
  *  This code uses the ROM (=PDC) based functions to read and write characters
  *  from and to PDC's boot path.
- *  Since all character read from that path must be polled, this code never
- *  can or will be a fully functional linux console.
  */
 
 /* Define EARLY_BOOTUP_DEBUG to debug kernel related boot problems. 
@@ -53,6 +53,7 @@
 #include <asm/pdc.h>           /* for iodc_call() proto and friends */
 
 static DEFINE_SPINLOCK(pdc_console_lock);
+static struct console pdc_cons;
 
 static void pdc_console_write(struct console *co, const char *s, unsigned count)
 {
@@ -85,12 +86,138 @@ static int pdc_console_setup(struct console *co, char *options)
 
 #if defined(CONFIG_PDC_CONSOLE)
 #include <linux/vt_kern.h>
+#include <linux/tty_flip.h>
+
+#define PDC_CONS_POLL_DELAY (30 * HZ / 1000)
+
+static struct timer_list pdc_console_timer;
+
+extern struct console * console_drivers;
+
+static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
+{
+
+       mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
+
+       return 0;
+}
+
+static void pdc_console_tty_close(struct tty_struct *tty, struct file *filp)
+{
+       if (!tty->count)
+               del_timer(&pdc_console_timer);
+}
+
+static int pdc_console_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
+{
+       pdc_console_write(NULL, buf, count);
+       return count;
+}
+
+static int pdc_console_tty_write_room(struct tty_struct *tty)
+{
+       return 32768; /* no limit, no buffer used */
+}
+
+static int pdc_console_tty_chars_in_buffer(struct tty_struct *tty)
+{
+       return 0; /* no buffer */
+}
+
+static struct tty_driver *pdc_console_tty_driver;
+
+static const struct tty_operations pdc_console_tty_ops = {
+       .open = pdc_console_tty_open,
+       .close = pdc_console_tty_close,
+       .write = pdc_console_tty_write,
+       .write_room = pdc_console_tty_write_room,
+       .chars_in_buffer = pdc_console_tty_chars_in_buffer,
+};
+
+static void pdc_console_poll(unsigned long unused)
+{
+
+       int data, count = 0;
+
+       struct tty_struct *tty = pdc_console_tty_driver->ttys[0];
+
+       if (!tty)
+               return;
+
+       while (1) {
+               data = pdc_console_poll_key(NULL);
+               if (data == -1)
+                       break;
+               tty_insert_flip_char(tty, data & 0xFF, TTY_NORMAL);
+               count ++;
+       }
+
+       if (count)
+               tty_flip_buffer_push(tty);
+
+       if (tty->count && (pdc_cons.flags & CON_ENABLED))
+               mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
+}
+
+static int __init pdc_console_tty_driver_init(void)
+{
+
+       int err;
+       struct tty_driver *drv;
+
+       /* Check if the console driver is still registered.
+        * It is unregistered if the pdc console was not selected as the
+        * primary console. */
+
+       struct console *tmp = console_drivers;
+
+       for (tmp = console_drivers; tmp; tmp = tmp->next)
+               if (tmp == &pdc_cons)
+                       break;
+
+       if (!tmp) {
+               printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name);
+               return -ENODEV;
+       }
+
+       printk(KERN_INFO "The PDC console driver is still registered, removing CON_BOOT flag\n");
+       pdc_cons.flags &= ~CON_BOOT;
+
+       drv = alloc_tty_driver(1);
+
+       if (!drv)
+               return -ENOMEM;
+
+       drv->driver_name = "pdc_cons";
+       drv->name = "ttyB";
+       drv->major = MUX_MAJOR;
+       drv->minor_start = 0;
+       drv->type = TTY_DRIVER_TYPE_SYSTEM;
+       drv->init_termios = tty_std_termios;
+       drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
+       tty_set_operations(drv, &pdc_console_tty_ops);
+
+       err = tty_register_driver(drv);
+       if (err) {
+               printk(KERN_ERR "Unable to register the PDC console TTY driver\n");
+               return err;
+       }
+
+       pdc_console_tty_driver = drv;
+
+       /* No need to initialize the pdc_console_timer if tty isn't allocated */
+       init_timer(&pdc_console_timer);
+       pdc_console_timer.function = pdc_console_poll;
+
+       return 0;
+}
+
+module_init(pdc_console_tty_driver_init);
 
 static struct tty_driver * pdc_console_device (struct console *c, int *index)
 {
-       extern struct tty_driver console_driver;
-       *index = c->index ? c->index-1 : fg_console;
-       return &console_driver;
+       *index = c->index;
+       return pdc_console_tty_driver;
 }
 #else
 #define pdc_console_device NULL
@@ -101,7 +228,7 @@ static struct console pdc_cons = {
        .write =        pdc_console_write,
        .device =       pdc_console_device,
        .setup =        pdc_console_setup,
-       .flags =        CON_BOOT | CON_PRINTBUFFER | CON_ENABLED,
+       .flags =        CON_BOOT | CON_PRINTBUFFER,
        .index =        -1,
 };
 
index 3d52c97..74867df 100644 (file)
        ENTRY_SAME(perf_event_open)
        ENTRY_COMP(recvmmsg)
        ENTRY_SAME(accept4)             /* 320 */
+       ENTRY_SAME(prlimit64)
 
        /* Nothing yet */
 
index 92d977b..234e368 100644 (file)
@@ -619,15 +619,12 @@ void handle_unaligned(struct pt_regs *regs)
                flop=1;
                ret = emulate_std(regs, R2(regs->iir),1);
                break;
-
-#ifdef CONFIG_PA20
        case OPCODE_LDD_L:
                ret = emulate_ldd(regs, R2(regs->iir),0);
                break;
        case OPCODE_STD_L:
                ret = emulate_std(regs, R2(regs->iir),0);
                break;
-#endif
        }
 #endif
        switch (regs->iir & OPCODE3_MASK)
index d58eac1..76ed62e 100644 (file)
@@ -80,8 +80,11 @@ find_unwind_entry(unsigned long addr)
                        if (addr >= table->start && 
                            addr <= table->end)
                                e = find_unwind_entry_in_table(table, addr);
-                       if (e)
+                       if (e) {
+                               /* Move-to-front to exploit common traces */
+                               list_move(&table->list, &unwind_tables);
                                break;
+                       }
                }
 
        return e;
index 1f3f225..0bd63b0 100644 (file)
@@ -3,7 +3,7 @@
 #
 
 # See arch/parisc/math-emu/README
-EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
+ccflags-y := -Wno-parentheses -Wno-implicit-function-declaration \
        -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \
        -Wno-implicit-int
 
index 1c12921..17e380f 100644 (file)
@@ -358,8 +358,12 @@ parisc_agp_setup(void __iomem *ioc_hpa, void __iomem *lba_hpa)
        bridge->dev = fake_bridge_dev;
 
        error = agp_add_bridge(bridge);
+       if (error)
+               goto fail;
+       return 0;
 
 fail:
+       kfree(fake_bridge_dev);
        return error;
 }
 
index c542c7b..d9f5148 100644 (file)
@@ -296,10 +296,9 @@ static struct pci_port_ops dino_port_ops = {
        .outl   = dino_out32
 };
 
-static void dino_disable_irq(unsigned int irq)
+static void dino_mask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct dino_device *dino_dev = desc->chip_data;
+       struct dino_device *dino_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
 
        DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
@@ -309,10 +308,9 @@ static void dino_disable_irq(unsigned int irq)
        __raw_writel(dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR);
 }
 
-static void dino_enable_irq(unsigned int irq)
+static void dino_unmask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct dino_device *dino_dev = desc->chip_data;
+       struct dino_device *dino_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
        u32 tmp;
 
@@ -347,20 +345,11 @@ static void dino_enable_irq(unsigned int irq)
        }
 }
 
-static unsigned int dino_startup_irq(unsigned int irq)
-{
-       dino_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip dino_interrupt_type = {
-       .name           = "GSC-PCI",
-       .startup        = dino_startup_irq,
-       .shutdown       = dino_disable_irq,
-       .enable         = dino_enable_irq, 
-       .disable        = dino_disable_irq,
-       .ack            = no_ack_irq,
-       .end            = no_end_irq,
+       .name   = "GSC-PCI",
+       .unmask = dino_unmask_irq,
+       .mask   = dino_mask_irq,
+       .ack    = no_ack_irq,
 };
 
 
@@ -391,7 +380,7 @@ ilr_again:
                int irq = dino_dev->global_irq[local_irq];
                DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n",
                        __func__, irq, intr_dev, mask);
-               __do_IRQ(irq);
+               generic_handle_irq(irq);
                mask &= ~(1 << local_irq);
        } while (mask);
 
index 46f503f..1211974 100644 (file)
@@ -144,7 +144,7 @@ static unsigned int eisa_irq_level __read_mostly; /* default to edge triggered *
 
 
 /* called by free irq */
-static void eisa_disable_irq(unsigned int irq)
+static void eisa_mask_irq(unsigned int irq)
 {
        unsigned long flags;
 
@@ -164,7 +164,7 @@ static void eisa_disable_irq(unsigned int irq)
 }
 
 /* called by request irq */
-static void eisa_enable_irq(unsigned int irq)
+static void eisa_unmask_irq(unsigned int irq)
 {
        unsigned long flags;
        EISA_DBG("enable irq %d\n", irq);
@@ -182,20 +182,11 @@ static void eisa_enable_irq(unsigned int irq)
        EISA_DBG("pic1 mask %02x\n", eisa_in8(0xa1));
 }
 
-static unsigned int eisa_startup_irq(unsigned int irq)
-{
-       eisa_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip eisa_interrupt_type = {
-       .name    =      "EISA",
-       .startup =      eisa_startup_irq,
-       .shutdown =     eisa_disable_irq,
-       .enable =       eisa_enable_irq,
-       .disable =      eisa_disable_irq,
-       .ack =          no_ack_irq,
-       .end =          no_end_irq,
+       .name   =       "EISA",
+       .unmask =       eisa_unmask_irq,
+       .mask   =       eisa_mask_irq,
+       .ack    =       no_ack_irq,
 };
 
 static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
@@ -233,7 +224,7 @@ static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
        }
        spin_unlock_irqrestore(&eisa_irq_lock, flags);
 
-       __do_IRQ(irq);
+       generic_handle_irq(irq);
    
        spin_lock_irqsave(&eisa_irq_lock, flags);
        /* unmask */
@@ -346,10 +337,10 @@ static int __init eisa_probe(struct parisc_device *dev)
        }
        
        /* Reserve IRQ2 */
-       irq_to_desc(2)->action = &irq2_action;
-       
+       setup_irq(2, &irq2_action);
        for (i = 0; i < 16; i++) {
-               irq_to_desc(i)->chip = &eisa_interrupt_type;
+               set_irq_chip_and_handler(i, &eisa_interrupt_type,
+                       handle_level_irq);
        }
        
        EISA_bus = 1;
index 20a1bce..e605298 100644 (file)
@@ -86,7 +86,7 @@ irqreturn_t gsc_asic_intr(int gsc_asic_irq, void *dev)
        do {
                int local_irq = __ffs(irr);
                unsigned int irq = gsc_asic->global_irq[local_irq];
-               __do_IRQ(irq);
+               generic_handle_irq(irq);
                irr &= ~(1 << local_irq);
        } while (irr);
 
@@ -105,10 +105,9 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
        return NO_IRQ;
 }
 
-static void gsc_asic_disable_irq(unsigned int irq)
+static void gsc_asic_mask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct gsc_asic *irq_dev = desc->chip_data;
+       struct gsc_asic *irq_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
        u32 imr;
 
@@ -121,10 +120,9 @@ static void gsc_asic_disable_irq(unsigned int irq)
        gsc_writel(imr, irq_dev->hpa + OFFSET_IMR);
 }
 
-static void gsc_asic_enable_irq(unsigned int irq)
+static void gsc_asic_unmask_irq(unsigned int irq)
 {
-       struct irq_desc *desc = irq_to_desc(irq);
-       struct gsc_asic *irq_dev = desc->chip_data;
+       struct gsc_asic *irq_dev = get_irq_chip_data(irq);
        int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
        u32 imr;
 
@@ -141,33 +139,23 @@ static void gsc_asic_enable_irq(unsigned int irq)
         */
 }
 
-static unsigned int gsc_asic_startup_irq(unsigned int irq)
-{
-       gsc_asic_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip gsc_asic_interrupt_type = {
-       .name    =      "GSC-ASIC",
-       .startup =      gsc_asic_startup_irq,
-       .shutdown =     gsc_asic_disable_irq,
-       .enable =       gsc_asic_enable_irq,
-       .disable =      gsc_asic_disable_irq,
-       .ack =          no_ack_irq,
-       .end =          no_end_irq,
+       .name   =       "GSC-ASIC",
+       .unmask =       gsc_asic_unmask_irq,
+       .mask   =       gsc_asic_mask_irq,
+       .ack    =       no_ack_irq,
 };
 
 int gsc_assign_irq(struct irq_chip *type, void *data)
 {
        static int irq = GSC_IRQ_BASE;
-       struct irq_desc *desc;
 
        if (irq > GSC_IRQ_MAX)
                return NO_IRQ;
 
-       desc = irq_to_desc(irq);
-       desc->chip = type;
-       desc->chip_data = data;
+       set_irq_chip_and_handler(irq, type, handle_level_irq);
+       set_irq_chip_data(irq, data);
+
        return irq++;
 }
 
index c768367..a3120a0 100644 (file)
@@ -615,17 +615,10 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
 }
 
 
-static struct vector_info *iosapic_get_vector(unsigned int irq)
-{
-       struct irq_desc *desc = irq_to_desc(irq);
-
-       return desc->chip_data;
-}
-
-static void iosapic_disable_irq(unsigned int irq)
+static void iosapic_mask_irq(unsigned int irq)
 {
        unsigned long flags;
-       struct vector_info *vi = iosapic_get_vector(irq);
+       struct vector_info *vi = get_irq_chip_data(irq);
        u32 d0, d1;
 
        spin_lock_irqsave(&iosapic_lock, flags);
@@ -635,9 +628,9 @@ static void iosapic_disable_irq(unsigned int irq)
        spin_unlock_irqrestore(&iosapic_lock, flags);
 }
 
-static void iosapic_enable_irq(unsigned int irq)
+static void iosapic_unmask_irq(unsigned int irq)
 {
-       struct vector_info *vi = iosapic_get_vector(irq);
+       struct vector_info *vi = get_irq_chip_data(irq);
        u32 d0, d1;
 
        /* data is initialized by fixup_irq */
@@ -676,36 +669,14 @@ printk("\n");
        DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq,
                        vi->eoi_addr, vi->eoi_data);
        iosapic_eoi(vi->eoi_addr, vi->eoi_data);
-}
-
-/*
- * PARISC only supports PCI devices below I/O SAPIC.
- * PCI only supports level triggered in order to share IRQ lines.
- * ergo I/O SAPIC must always issue EOI on parisc.
- *
- * i386/ia64 support ISA devices and have to deal with
- * edge-triggered interrupts too.
- */
-static void iosapic_end_irq(unsigned int irq)
-{
-       struct vector_info *vi = iosapic_get_vector(irq);
-       DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq,
-                       vi->eoi_addr, vi->eoi_data);
-       iosapic_eoi(vi->eoi_addr, vi->eoi_data);
-       cpu_end_irq(irq);
-}
-
-static unsigned int iosapic_startup_irq(unsigned int irq)
-{
-       iosapic_enable_irq(irq);
-       return 0;
+       cpu_eoi_irq(irq);
 }
 
 #ifdef CONFIG_SMP
 static int iosapic_set_affinity_irq(unsigned int irq,
                                     const struct cpumask *dest)
 {
-       struct vector_info *vi = iosapic_get_vector(irq);
+       struct vector_info *vi = get_irq_chip_data(irq);
        u32 d0, d1, dummy_d0;
        unsigned long flags;
        int dest_cpu;
@@ -730,13 +701,10 @@ static int iosapic_set_affinity_irq(unsigned int irq,
 #endif
 
 static struct irq_chip iosapic_interrupt_type = {
-       .name    =      "IO-SAPIC-level",
-       .startup =      iosapic_startup_irq,
-       .shutdown =     iosapic_disable_irq,
-       .enable =       iosapic_enable_irq,
-       .disable =      iosapic_disable_irq,
-       .ack =          cpu_ack_irq,
-       .end =          iosapic_end_irq,
+       .name   =       "IO-SAPIC-level",
+       .unmask =       iosapic_unmask_irq,
+       .mask   =       iosapic_mask_irq,
+       .ack    =       cpu_ack_irq,
 #ifdef CONFIG_SMP
        .set_affinity = iosapic_set_affinity_irq,
 #endif
@@ -891,8 +859,8 @@ void *iosapic_register(unsigned long hpa)
        isi->isi_version = iosapic_rd_version(isi);
        isi->isi_num_vectors = IOSAPIC_IRDT_MAX_ENTRY(isi->isi_version) + 1;
 
-       vip = isi->isi_vector = (struct vector_info *)
-               kzalloc(sizeof(struct vector_info) * isi->isi_num_vectors, GFP_KERNEL);
+       vip = isi->isi_vector = kcalloc(isi->isi_num_vectors,
+                                       sizeof(struct vector_info), GFP_KERNEL);
        if (vip == NULL) {
                kfree(isi);
                return NULL;
index c5c14dd..2350e8a 100644 (file)
@@ -346,8 +346,8 @@ static __inline__ int led_get_net_activity(void)
 #ifndef CONFIG_NET
        return 0;
 #else
-       static unsigned long rx_total_last, tx_total_last;
-       unsigned long rx_total, tx_total;
+       static u64 rx_total_last, tx_total_last;
+       u64 rx_total, tx_total;
        struct net_device *dev;
        int retval;
 
@@ -356,7 +356,7 @@ static __inline__ int led_get_net_activity(void)
        /* we are running as a workqueue task, so we can use an RCU lookup */
        rcu_read_lock();
        for_each_netdev_rcu(&init_net, dev) {
-           const struct net_device_stats *stats;
+           const struct rtnl_link_stats64 *stats;
            struct rtnl_link_stats64 temp;
            struct in_device *in_dev = __in_dev_get_rcu(dev);
            if (!in_dev || !in_dev->ifa_list)
index f7806d8..0846daf 100644 (file)
@@ -139,7 +139,7 @@ superio_interrupt(int parent_irq, void *devp)
        }
 
        /* Call the appropriate device's interrupt */
-       __do_IRQ(local_irq);
+       generic_handle_irq(local_irq);
 
        /* set EOI - forces a new interrupt if a lower priority device
         * still needs service.
@@ -286,7 +286,7 @@ superio_init(struct pci_dev *pcidev)
 }
 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO, superio_init);
 
-static void superio_disable_irq(unsigned int irq)
+static void superio_mask_irq(unsigned int irq)
 {
        u8 r8;
 
@@ -303,7 +303,7 @@ static void superio_disable_irq(unsigned int irq)
        outb (r8,IC_PIC1+1);
 }
 
-static void superio_enable_irq(unsigned int irq)
+static void superio_unmask_irq(unsigned int irq)
 {
        u8 r8;
 
@@ -319,20 +319,11 @@ static void superio_enable_irq(unsigned int irq)
        outb (r8,IC_PIC1+1);
 }
 
-static unsigned int superio_startup_irq(unsigned int irq)
-{
-       superio_enable_irq(irq);
-       return 0;
-}
-
 static struct irq_chip superio_interrupt_type = {
-       .name    =      SUPERIO,
-       .startup =      superio_startup_irq,
-       .shutdown =     superio_disable_irq,
-       .enable =       superio_enable_irq,
-       .disable =      superio_disable_irq,
+       .name   =       SUPERIO,
+       .unmask =       superio_unmask_irq,
+       .mask   =       superio_mask_irq,
        .ack =          no_ack_irq,
-       .end =          no_end_irq,
 };
 
 #ifdef DEBUG_SUPERIO_INIT
@@ -363,9 +354,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
 #endif
 
        for (i = 0; i < 16; i++) {
-               struct irq_desc *desc = irq_to_desc(i);
-
-               desc->chip = &superio_interrupt_type;
+               set_irq_chip_and_handler(i, &superio_interrupt_type, handle_level_irq);
        }
 
        /*