Commit e430426654c6a99fb1977bae71d4844e876c4a52

Authored by Linus Torvalds

Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6

* '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

Showing 17 changed files Side-by-side Diff

... ... @@ -19,6 +19,7 @@
19 19 select HAVE_IRQ_WORK
20 20 select HAVE_PERF_EVENTS
21 21 select GENERIC_ATOMIC64 if !64BIT
  22 + select GENERIC_HARDIRQS_NO__DO_IRQ
22 23 help
23 24 The PA-RISC microprocessor is designed by Hewlett-Packard and used
24 25 in many of their workstations & servers (HP9000 700 and 800 series,
... ... @@ -84,6 +85,9 @@
84 85 config IRQ_PER_CPU
85 86 bool
86 87 default y
  88 +
  89 +config GENERIC_HARDIRQS_NO__DO_IRQ
  90 + def_bool y
87 91  
88 92 # unless you want to implement ACPI on PA-RISC ... ;-)
89 93 config PM
arch/parisc/include/asm/cache.h
... ... @@ -24,8 +24,6 @@
24 24  
25 25 #ifndef __ASSEMBLY__
26 26  
27   -#define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1))
28   -
29 27 #define SMP_CACHE_BYTES L1_CACHE_BYTES
30 28  
31 29 #define ARCH_DMA_MINALIGN L1_CACHE_BYTES
arch/parisc/include/asm/irq.h
... ... @@ -40,7 +40,7 @@
40 40 void no_ack_irq(unsigned int irq);
41 41 void no_end_irq(unsigned int irq);
42 42 void cpu_ack_irq(unsigned int irq);
43   -void cpu_end_irq(unsigned int irq);
  43 +void cpu_eoi_irq(unsigned int irq);
44 44  
45 45 extern int txn_alloc_irq(unsigned int nbits);
46 46 extern int txn_claim_irq(int);
arch/parisc/include/asm/unistd.h
... ... @@ -813,8 +813,9 @@
813 813 #define __NR_perf_event_open (__NR_Linux + 318)
814 814 #define __NR_recvmmsg (__NR_Linux + 319)
815 815 #define __NR_accept4 (__NR_Linux + 320)
  816 +#define __NR_prlimit64 (__NR_Linux + 321)
816 817  
817   -#define __NR_Linux_syscalls (__NR_accept4 + 1)
  818 +#define __NR_Linux_syscalls (__NR_prlimit64 + 1)
818 819  
819 820  
820 821 #define __IGNORE_select /* newselect */
arch/parisc/kernel/irq.c
... ... @@ -52,7 +52,7 @@
52 52 */
53 53 static DEFINE_PER_CPU(unsigned long, local_ack_eiem) = ~0UL;
54 54  
55   -static void cpu_disable_irq(unsigned int irq)
  55 +static void cpu_mask_irq(unsigned int irq)
56 56 {
57 57 unsigned long eirr_bit = EIEM_MASK(irq);
58 58  
... ... @@ -63,7 +63,7 @@
63 63 * then gets disabled */
64 64 }
65 65  
66   -static void cpu_enable_irq(unsigned int irq)
  66 +static void cpu_unmask_irq(unsigned int irq)
67 67 {
68 68 unsigned long eirr_bit = EIEM_MASK(irq);
69 69  
... ... @@ -75,12 +75,6 @@
75 75 smp_send_all_nop();
76 76 }
77 77  
78   -static unsigned int cpu_startup_irq(unsigned int irq)
79   -{
80   - cpu_enable_irq(irq);
81   - return 0;
82   -}
83   -
84 78 void no_ack_irq(unsigned int irq) { }
85 79 void no_end_irq(unsigned int irq) { }
86 80  
... ... @@ -99,7 +93,7 @@
99 93 mtctl(mask, 23);
100 94 }
101 95  
102   -void cpu_end_irq(unsigned int irq)
  96 +void cpu_eoi_irq(unsigned int irq)
103 97 {
104 98 unsigned long mask = EIEM_MASK(irq);
105 99 int cpu = smp_processor_id();
106 100  
... ... @@ -146,12 +140,10 @@
146 140  
147 141 static struct irq_chip cpu_interrupt_type = {
148 142 .name = "CPU",
149   - .startup = cpu_startup_irq,
150   - .shutdown = cpu_disable_irq,
151   - .enable = cpu_enable_irq,
152   - .disable = cpu_disable_irq,
  143 + .mask = cpu_mask_irq,
  144 + .unmask = cpu_unmask_irq,
153 145 .ack = cpu_ack_irq,
154   - .end = cpu_end_irq,
  146 + .eoi = cpu_eoi_irq,
155 147 #ifdef CONFIG_SMP
156 148 .set_affinity = cpu_set_affinity_irq,
157 149 #endif
158 150  
... ... @@ -247,10 +239,11 @@
247 239 if (irq_desc[irq].chip != &cpu_interrupt_type)
248 240 return -EBUSY;
249 241  
  242 + /* for iosapic interrupts */
250 243 if (type) {
251   - irq_desc[irq].chip = type;
252   - irq_desc[irq].chip_data = data;
253   - cpu_interrupt_type.enable(irq);
  244 + set_irq_chip_and_handler(irq, type, handle_level_irq);
  245 + set_irq_chip_data(irq, data);
  246 + cpu_unmask_irq(irq);
254 247 }
255 248 return 0;
256 249 }
... ... @@ -368,7 +361,7 @@
368 361 goto set_out;
369 362 }
370 363 #endif
371   - __do_IRQ(irq);
  364 + generic_handle_irq(irq);
372 365  
373 366 out:
374 367 irq_exit();
375 368  
376 369  
... ... @@ -398,14 +391,15 @@
398 391 {
399 392 int i;
400 393 for (i = CPU_IRQ_BASE; i <= CPU_IRQ_MAX; i++) {
401   - irq_desc[i].chip = &cpu_interrupt_type;
  394 + set_irq_chip_and_handler(i, &cpu_interrupt_type,
  395 + handle_level_irq);
402 396 }
403 397  
404   - irq_desc[TIMER_IRQ].action = &timer_action;
405   - irq_desc[TIMER_IRQ].status = IRQ_PER_CPU;
  398 + set_irq_handler(TIMER_IRQ, handle_percpu_irq);
  399 + setup_irq(TIMER_IRQ, &timer_action);
406 400 #ifdef CONFIG_SMP
407   - irq_desc[IPI_IRQ].action = &ipi_action;
408   - irq_desc[IPI_IRQ].status = IRQ_PER_CPU;
  401 + set_irq_handler(IPI_IRQ, handle_percpu_irq);
  402 + setup_irq(IPI_IRQ, &ipi_action);
409 403 #endif
410 404 }
411 405  
arch/parisc/kernel/pdc_cons.c
... ... @@ -12,6 +12,7 @@
12 12 * Copyright (C) 2001 Helge Deller <deller at parisc-linux.org>
13 13 * Copyright (C) 2001 Thomas Bogendoerfer <tsbogend at parisc-linux.org>
14 14 * Copyright (C) 2002 Randolph Chung <tausq with parisc-linux.org>
  15 + * Copyright (C) 2010 Guy Martin <gmsoft at tuxicoman.be>
15 16 *
16 17 *
17 18 * This program is free software; you can redistribute it and/or modify
18 19  
... ... @@ -31,12 +32,11 @@
31 32  
32 33 /*
33 34 * The PDC console is a simple console, which can be used for debugging
34   - * boot related problems on HP PA-RISC machines.
  35 + * boot related problems on HP PA-RISC machines. It is also useful when no
  36 + * other console works.
35 37 *
36 38 * This code uses the ROM (=PDC) based functions to read and write characters
37 39 * from and to PDC's boot path.
38   - * Since all character read from that path must be polled, this code never
39   - * can or will be a fully functional linux console.
40 40 */
41 41  
42 42 /* Define EARLY_BOOTUP_DEBUG to debug kernel related boot problems.
... ... @@ -53,6 +53,7 @@
53 53 #include <asm/pdc.h> /* for iodc_call() proto and friends */
54 54  
55 55 static DEFINE_SPINLOCK(pdc_console_lock);
  56 +static struct console pdc_cons;
56 57  
57 58 static void pdc_console_write(struct console *co, const char *s, unsigned count)
58 59 {
59 60  
60 61  
... ... @@ -85,12 +86,138 @@
85 86  
86 87 #if defined(CONFIG_PDC_CONSOLE)
87 88 #include <linux/vt_kern.h>
  89 +#include <linux/tty_flip.h>
88 90  
  91 +#define PDC_CONS_POLL_DELAY (30 * HZ / 1000)
  92 +
  93 +static struct timer_list pdc_console_timer;
  94 +
  95 +extern struct console * console_drivers;
  96 +
  97 +static int pdc_console_tty_open(struct tty_struct *tty, struct file *filp)
  98 +{
  99 +
  100 + mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
  101 +
  102 + return 0;
  103 +}
  104 +
  105 +static void pdc_console_tty_close(struct tty_struct *tty, struct file *filp)
  106 +{
  107 + if (!tty->count)
  108 + del_timer(&pdc_console_timer);
  109 +}
  110 +
  111 +static int pdc_console_tty_write(struct tty_struct *tty, const unsigned char *buf, int count)
  112 +{
  113 + pdc_console_write(NULL, buf, count);
  114 + return count;
  115 +}
  116 +
  117 +static int pdc_console_tty_write_room(struct tty_struct *tty)
  118 +{
  119 + return 32768; /* no limit, no buffer used */
  120 +}
  121 +
  122 +static int pdc_console_tty_chars_in_buffer(struct tty_struct *tty)
  123 +{
  124 + return 0; /* no buffer */
  125 +}
  126 +
  127 +static struct tty_driver *pdc_console_tty_driver;
  128 +
  129 +static const struct tty_operations pdc_console_tty_ops = {
  130 + .open = pdc_console_tty_open,
  131 + .close = pdc_console_tty_close,
  132 + .write = pdc_console_tty_write,
  133 + .write_room = pdc_console_tty_write_room,
  134 + .chars_in_buffer = pdc_console_tty_chars_in_buffer,
  135 +};
  136 +
  137 +static void pdc_console_poll(unsigned long unused)
  138 +{
  139 +
  140 + int data, count = 0;
  141 +
  142 + struct tty_struct *tty = pdc_console_tty_driver->ttys[0];
  143 +
  144 + if (!tty)
  145 + return;
  146 +
  147 + while (1) {
  148 + data = pdc_console_poll_key(NULL);
  149 + if (data == -1)
  150 + break;
  151 + tty_insert_flip_char(tty, data & 0xFF, TTY_NORMAL);
  152 + count ++;
  153 + }
  154 +
  155 + if (count)
  156 + tty_flip_buffer_push(tty);
  157 +
  158 + if (tty->count && (pdc_cons.flags & CON_ENABLED))
  159 + mod_timer(&pdc_console_timer, jiffies + PDC_CONS_POLL_DELAY);
  160 +}
  161 +
  162 +static int __init pdc_console_tty_driver_init(void)
  163 +{
  164 +
  165 + int err;
  166 + struct tty_driver *drv;
  167 +
  168 + /* Check if the console driver is still registered.
  169 + * It is unregistered if the pdc console was not selected as the
  170 + * primary console. */
  171 +
  172 + struct console *tmp = console_drivers;
  173 +
  174 + for (tmp = console_drivers; tmp; tmp = tmp->next)
  175 + if (tmp == &pdc_cons)
  176 + break;
  177 +
  178 + if (!tmp) {
  179 + printk(KERN_INFO "PDC console driver not registered anymore, not creating %s\n", pdc_cons.name);
  180 + return -ENODEV;
  181 + }
  182 +
  183 + printk(KERN_INFO "The PDC console driver is still registered, removing CON_BOOT flag\n");
  184 + pdc_cons.flags &= ~CON_BOOT;
  185 +
  186 + drv = alloc_tty_driver(1);
  187 +
  188 + if (!drv)
  189 + return -ENOMEM;
  190 +
  191 + drv->driver_name = "pdc_cons";
  192 + drv->name = "ttyB";
  193 + drv->major = MUX_MAJOR;
  194 + drv->minor_start = 0;
  195 + drv->type = TTY_DRIVER_TYPE_SYSTEM;
  196 + drv->init_termios = tty_std_termios;
  197 + drv->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
  198 + tty_set_operations(drv, &pdc_console_tty_ops);
  199 +
  200 + err = tty_register_driver(drv);
  201 + if (err) {
  202 + printk(KERN_ERR "Unable to register the PDC console TTY driver\n");
  203 + return err;
  204 + }
  205 +
  206 + pdc_console_tty_driver = drv;
  207 +
  208 + /* No need to initialize the pdc_console_timer if tty isn't allocated */
  209 + init_timer(&pdc_console_timer);
  210 + pdc_console_timer.function = pdc_console_poll;
  211 +
  212 + return 0;
  213 +}
  214 +
  215 +module_init(pdc_console_tty_driver_init);
  216 +
89 217 static struct tty_driver * pdc_console_device (struct console *c, int *index)
90 218 {
91   - extern struct tty_driver console_driver;
92   - *index = c->index ? c->index-1 : fg_console;
93   - return &console_driver;
  219 + *index = c->index;
  220 + return pdc_console_tty_driver;
94 221 }
95 222 #else
96 223 #define pdc_console_device NULL
... ... @@ -101,7 +228,7 @@
101 228 .write = pdc_console_write,
102 229 .device = pdc_console_device,
103 230 .setup = pdc_console_setup,
104   - .flags = CON_BOOT | CON_PRINTBUFFER | CON_ENABLED,
  231 + .flags = CON_BOOT | CON_PRINTBUFFER,
105 232 .index = -1,
106 233 };
107 234  
arch/parisc/kernel/syscall_table.S
... ... @@ -419,6 +419,7 @@
419 419 ENTRY_SAME(perf_event_open)
420 420 ENTRY_COMP(recvmmsg)
421 421 ENTRY_SAME(accept4) /* 320 */
  422 + ENTRY_SAME(prlimit64)
422 423  
423 424 /* Nothing yet */
424 425  
arch/parisc/kernel/unaligned.c
... ... @@ -619,15 +619,12 @@
619 619 flop=1;
620 620 ret = emulate_std(regs, R2(regs->iir),1);
621 621 break;
622   -
623   -#ifdef CONFIG_PA20
624 622 case OPCODE_LDD_L:
625 623 ret = emulate_ldd(regs, R2(regs->iir),0);
626 624 break;
627 625 case OPCODE_STD_L:
628 626 ret = emulate_std(regs, R2(regs->iir),0);
629 627 break;
630   -#endif
631 628 }
632 629 #endif
633 630 switch (regs->iir & OPCODE3_MASK)
arch/parisc/kernel/unwind.c
... ... @@ -80,8 +80,11 @@
80 80 if (addr >= table->start &&
81 81 addr <= table->end)
82 82 e = find_unwind_entry_in_table(table, addr);
83   - if (e)
  83 + if (e) {
  84 + /* Move-to-front to exploit common traces */
  85 + list_move(&table->list, &unwind_tables);
84 86 break;
  87 + }
85 88 }
86 89  
87 90 return e;
arch/parisc/math-emu/Makefile
... ... @@ -3,7 +3,7 @@
3 3 #
4 4  
5 5 # See arch/parisc/math-emu/README
6   -EXTRA_CFLAGS += -Wno-parentheses -Wno-implicit-function-declaration \
  6 +ccflags-y := -Wno-parentheses -Wno-implicit-function-declaration \
7 7 -Wno-uninitialized -Wno-strict-prototypes -Wno-return-type \
8 8 -Wno-implicit-int
9 9  
drivers/char/agp/parisc-agp.c
... ... @@ -358,8 +358,12 @@
358 358 bridge->dev = fake_bridge_dev;
359 359  
360 360 error = agp_add_bridge(bridge);
  361 + if (error)
  362 + goto fail;
  363 + return 0;
361 364  
362 365 fail:
  366 + kfree(fake_bridge_dev);
363 367 return error;
364 368 }
365 369  
drivers/parisc/dino.c
... ... @@ -296,10 +296,9 @@
296 296 .outl = dino_out32
297 297 };
298 298  
299   -static void dino_disable_irq(unsigned int irq)
  299 +static void dino_mask_irq(unsigned int irq)
300 300 {
301   - struct irq_desc *desc = irq_to_desc(irq);
302   - struct dino_device *dino_dev = desc->chip_data;
  301 + struct dino_device *dino_dev = get_irq_chip_data(irq);
303 302 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
304 303  
305 304 DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
306 305  
... ... @@ -309,10 +308,9 @@
309 308 __raw_writel(dino_dev->imr, dino_dev->hba.base_addr+DINO_IMR);
310 309 }
311 310  
312   -static void dino_enable_irq(unsigned int irq)
  311 +static void dino_unmask_irq(unsigned int irq)
313 312 {
314   - struct irq_desc *desc = irq_to_desc(irq);
315   - struct dino_device *dino_dev = desc->chip_data;
  313 + struct dino_device *dino_dev = get_irq_chip_data(irq);
316 314 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
317 315 u32 tmp;
318 316  
319 317  
... ... @@ -347,20 +345,11 @@
347 345 }
348 346 }
349 347  
350   -static unsigned int dino_startup_irq(unsigned int irq)
351   -{
352   - dino_enable_irq(irq);
353   - return 0;
354   -}
355   -
356 348 static struct irq_chip dino_interrupt_type = {
357   - .name = "GSC-PCI",
358   - .startup = dino_startup_irq,
359   - .shutdown = dino_disable_irq,
360   - .enable = dino_enable_irq,
361   - .disable = dino_disable_irq,
362   - .ack = no_ack_irq,
363   - .end = no_end_irq,
  349 + .name = "GSC-PCI",
  350 + .unmask = dino_unmask_irq,
  351 + .mask = dino_mask_irq,
  352 + .ack = no_ack_irq,
364 353 };
365 354  
366 355  
... ... @@ -391,7 +380,7 @@
391 380 int irq = dino_dev->global_irq[local_irq];
392 381 DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n",
393 382 __func__, irq, intr_dev, mask);
394   - __do_IRQ(irq);
  383 + generic_handle_irq(irq);
395 384 mask &= ~(1 << local_irq);
396 385 } while (mask);
397 386  
drivers/parisc/eisa.c
... ... @@ -144,7 +144,7 @@
144 144  
145 145  
146 146 /* called by free irq */
147   -static void eisa_disable_irq(unsigned int irq)
  147 +static void eisa_mask_irq(unsigned int irq)
148 148 {
149 149 unsigned long flags;
150 150  
... ... @@ -164,7 +164,7 @@
164 164 }
165 165  
166 166 /* called by request irq */
167   -static void eisa_enable_irq(unsigned int irq)
  167 +static void eisa_unmask_irq(unsigned int irq)
168 168 {
169 169 unsigned long flags;
170 170 EISA_DBG("enable irq %d\n", irq);
171 171  
... ... @@ -182,20 +182,11 @@
182 182 EISA_DBG("pic1 mask %02x\n", eisa_in8(0xa1));
183 183 }
184 184  
185   -static unsigned int eisa_startup_irq(unsigned int irq)
186   -{
187   - eisa_enable_irq(irq);
188   - return 0;
189   -}
190   -
191 185 static struct irq_chip eisa_interrupt_type = {
192   - .name = "EISA",
193   - .startup = eisa_startup_irq,
194   - .shutdown = eisa_disable_irq,
195   - .enable = eisa_enable_irq,
196   - .disable = eisa_disable_irq,
197   - .ack = no_ack_irq,
198   - .end = no_end_irq,
  186 + .name = "EISA",
  187 + .unmask = eisa_unmask_irq,
  188 + .mask = eisa_mask_irq,
  189 + .ack = no_ack_irq,
199 190 };
200 191  
201 192 static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
... ... @@ -233,7 +224,7 @@
233 224 }
234 225 spin_unlock_irqrestore(&eisa_irq_lock, flags);
235 226  
236   - __do_IRQ(irq);
  227 + generic_handle_irq(irq);
237 228  
238 229 spin_lock_irqsave(&eisa_irq_lock, flags);
239 230 /* unmask */
240 231  
... ... @@ -346,10 +337,10 @@
346 337 }
347 338  
348 339 /* Reserve IRQ2 */
349   - irq_to_desc(2)->action = &irq2_action;
350   -
  340 + setup_irq(2, &irq2_action);
351 341 for (i = 0; i < 16; i++) {
352   - irq_to_desc(i)->chip = &eisa_interrupt_type;
  342 + set_irq_chip_and_handler(i, &eisa_interrupt_type,
  343 + handle_level_irq);
353 344 }
354 345  
355 346 EISA_bus = 1;
drivers/parisc/gsc.c
... ... @@ -86,7 +86,7 @@
86 86 do {
87 87 int local_irq = __ffs(irr);
88 88 unsigned int irq = gsc_asic->global_irq[local_irq];
89   - __do_IRQ(irq);
  89 + generic_handle_irq(irq);
90 90 irr &= ~(1 << local_irq);
91 91 } while (irr);
92 92  
93 93  
... ... @@ -105,10 +105,9 @@
105 105 return NO_IRQ;
106 106 }
107 107  
108   -static void gsc_asic_disable_irq(unsigned int irq)
  108 +static void gsc_asic_mask_irq(unsigned int irq)
109 109 {
110   - struct irq_desc *desc = irq_to_desc(irq);
111   - struct gsc_asic *irq_dev = desc->chip_data;
  110 + struct gsc_asic *irq_dev = get_irq_chip_data(irq);
112 111 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
113 112 u32 imr;
114 113  
115 114  
... ... @@ -121,10 +120,9 @@
121 120 gsc_writel(imr, irq_dev->hpa + OFFSET_IMR);
122 121 }
123 122  
124   -static void gsc_asic_enable_irq(unsigned int irq)
  123 +static void gsc_asic_unmask_irq(unsigned int irq)
125 124 {
126   - struct irq_desc *desc = irq_to_desc(irq);
127   - struct gsc_asic *irq_dev = desc->chip_data;
  125 + struct gsc_asic *irq_dev = get_irq_chip_data(irq);
128 126 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
129 127 u32 imr;
130 128  
131 129  
132 130  
133 131  
... ... @@ -141,33 +139,23 @@
141 139 */
142 140 }
143 141  
144   -static unsigned int gsc_asic_startup_irq(unsigned int irq)
145   -{
146   - gsc_asic_enable_irq(irq);
147   - return 0;
148   -}
149   -
150 142 static struct irq_chip gsc_asic_interrupt_type = {
151   - .name = "GSC-ASIC",
152   - .startup = gsc_asic_startup_irq,
153   - .shutdown = gsc_asic_disable_irq,
154   - .enable = gsc_asic_enable_irq,
155   - .disable = gsc_asic_disable_irq,
156   - .ack = no_ack_irq,
157   - .end = no_end_irq,
  143 + .name = "GSC-ASIC",
  144 + .unmask = gsc_asic_unmask_irq,
  145 + .mask = gsc_asic_mask_irq,
  146 + .ack = no_ack_irq,
158 147 };
159 148  
160 149 int gsc_assign_irq(struct irq_chip *type, void *data)
161 150 {
162 151 static int irq = GSC_IRQ_BASE;
163   - struct irq_desc *desc;
164 152  
165 153 if (irq > GSC_IRQ_MAX)
166 154 return NO_IRQ;
167 155  
168   - desc = irq_to_desc(irq);
169   - desc->chip = type;
170   - desc->chip_data = data;
  156 + set_irq_chip_and_handler(irq, type, handle_level_irq);
  157 + set_irq_chip_data(irq, data);
  158 +
171 159 return irq++;
172 160 }
173 161  
drivers/parisc/iosapic.c
... ... @@ -615,17 +615,10 @@
615 615 }
616 616  
617 617  
618   -static struct vector_info *iosapic_get_vector(unsigned int irq)
  618 +static void iosapic_mask_irq(unsigned int irq)
619 619 {
620   - struct irq_desc *desc = irq_to_desc(irq);
621   -
622   - return desc->chip_data;
623   -}
624   -
625   -static void iosapic_disable_irq(unsigned int irq)
626   -{
627 620 unsigned long flags;
628   - struct vector_info *vi = iosapic_get_vector(irq);
  621 + struct vector_info *vi = get_irq_chip_data(irq);
629 622 u32 d0, d1;
630 623  
631 624 spin_lock_irqsave(&iosapic_lock, flags);
632 625  
... ... @@ -635,9 +628,9 @@
635 628 spin_unlock_irqrestore(&iosapic_lock, flags);
636 629 }
637 630  
638   -static void iosapic_enable_irq(unsigned int irq)
  631 +static void iosapic_unmask_irq(unsigned int irq)
639 632 {
640   - struct vector_info *vi = iosapic_get_vector(irq);
  633 + struct vector_info *vi = get_irq_chip_data(irq);
641 634 u32 d0, d1;
642 635  
643 636 /* data is initialized by fixup_irq */
644 637  
645 638  
... ... @@ -676,36 +669,14 @@
676 669 DBG(KERN_DEBUG "enable_irq(%d): eoi(%p, 0x%x)\n", irq,
677 670 vi->eoi_addr, vi->eoi_data);
678 671 iosapic_eoi(vi->eoi_addr, vi->eoi_data);
  672 + cpu_eoi_irq(irq);
679 673 }
680 674  
681   -/*
682   - * PARISC only supports PCI devices below I/O SAPIC.
683   - * PCI only supports level triggered in order to share IRQ lines.
684   - * ergo I/O SAPIC must always issue EOI on parisc.
685   - *
686   - * i386/ia64 support ISA devices and have to deal with
687   - * edge-triggered interrupts too.
688   - */
689   -static void iosapic_end_irq(unsigned int irq)
690   -{
691   - struct vector_info *vi = iosapic_get_vector(irq);
692   - DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq,
693   - vi->eoi_addr, vi->eoi_data);
694   - iosapic_eoi(vi->eoi_addr, vi->eoi_data);
695   - cpu_end_irq(irq);
696   -}
697   -
698   -static unsigned int iosapic_startup_irq(unsigned int irq)
699   -{
700   - iosapic_enable_irq(irq);
701   - return 0;
702   -}
703   -
704 675 #ifdef CONFIG_SMP
705 676 static int iosapic_set_affinity_irq(unsigned int irq,
706 677 const struct cpumask *dest)
707 678 {
708   - struct vector_info *vi = iosapic_get_vector(irq);
  679 + struct vector_info *vi = get_irq_chip_data(irq);
709 680 u32 d0, d1, dummy_d0;
710 681 unsigned long flags;
711 682 int dest_cpu;
... ... @@ -730,13 +701,10 @@
730 701 #endif
731 702  
732 703 static struct irq_chip iosapic_interrupt_type = {
733   - .name = "IO-SAPIC-level",
734   - .startup = iosapic_startup_irq,
735   - .shutdown = iosapic_disable_irq,
736   - .enable = iosapic_enable_irq,
737   - .disable = iosapic_disable_irq,
738   - .ack = cpu_ack_irq,
739   - .end = iosapic_end_irq,
  704 + .name = "IO-SAPIC-level",
  705 + .unmask = iosapic_unmask_irq,
  706 + .mask = iosapic_mask_irq,
  707 + .ack = cpu_ack_irq,
740 708 #ifdef CONFIG_SMP
741 709 .set_affinity = iosapic_set_affinity_irq,
742 710 #endif
... ... @@ -891,8 +859,8 @@
891 859 isi->isi_version = iosapic_rd_version(isi);
892 860 isi->isi_num_vectors = IOSAPIC_IRDT_MAX_ENTRY(isi->isi_version) + 1;
893 861  
894   - vip = isi->isi_vector = (struct vector_info *)
895   - kzalloc(sizeof(struct vector_info) * isi->isi_num_vectors, GFP_KERNEL);
  862 + vip = isi->isi_vector = kcalloc(isi->isi_num_vectors,
  863 + sizeof(struct vector_info), GFP_KERNEL);
896 864 if (vip == NULL) {
897 865 kfree(isi);
898 866 return NULL;
drivers/parisc/led.c
... ... @@ -346,8 +346,8 @@
346 346 #ifndef CONFIG_NET
347 347 return 0;
348 348 #else
349   - static unsigned long rx_total_last, tx_total_last;
350   - unsigned long rx_total, tx_total;
  349 + static u64 rx_total_last, tx_total_last;
  350 + u64 rx_total, tx_total;
351 351 struct net_device *dev;
352 352 int retval;
353 353  
... ... @@ -356,7 +356,7 @@
356 356 /* we are running as a workqueue task, so we can use an RCU lookup */
357 357 rcu_read_lock();
358 358 for_each_netdev_rcu(&init_net, dev) {
359   - const struct net_device_stats *stats;
  359 + const struct rtnl_link_stats64 *stats;
360 360 struct rtnl_link_stats64 temp;
361 361 struct in_device *in_dev = __in_dev_get_rcu(dev);
362 362 if (!in_dev || !in_dev->ifa_list)
drivers/parisc/superio.c
... ... @@ -139,7 +139,7 @@
139 139 }
140 140  
141 141 /* Call the appropriate device's interrupt */
142   - __do_IRQ(local_irq);
  142 + generic_handle_irq(local_irq);
143 143  
144 144 /* set EOI - forces a new interrupt if a lower priority device
145 145 * still needs service.
... ... @@ -286,7 +286,7 @@
286 286 }
287 287 DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87560_LIO, superio_init);
288 288  
289   -static void superio_disable_irq(unsigned int irq)
  289 +static void superio_mask_irq(unsigned int irq)
290 290 {
291 291 u8 r8;
292 292  
... ... @@ -303,7 +303,7 @@
303 303 outb (r8,IC_PIC1+1);
304 304 }
305 305  
306   -static void superio_enable_irq(unsigned int irq)
  306 +static void superio_unmask_irq(unsigned int irq)
307 307 {
308 308 u8 r8;
309 309  
310 310  
311 311  
... ... @@ -319,20 +319,11 @@
319 319 outb (r8,IC_PIC1+1);
320 320 }
321 321  
322   -static unsigned int superio_startup_irq(unsigned int irq)
323   -{
324   - superio_enable_irq(irq);
325   - return 0;
326   -}
327   -
328 322 static struct irq_chip superio_interrupt_type = {
329   - .name = SUPERIO,
330   - .startup = superio_startup_irq,
331   - .shutdown = superio_disable_irq,
332   - .enable = superio_enable_irq,
333   - .disable = superio_disable_irq,
  323 + .name = SUPERIO,
  324 + .unmask = superio_unmask_irq,
  325 + .mask = superio_mask_irq,
334 326 .ack = no_ack_irq,
335   - .end = no_end_irq,
336 327 };
337 328  
338 329 #ifdef DEBUG_SUPERIO_INIT
... ... @@ -363,9 +354,7 @@
363 354 #endif
364 355  
365 356 for (i = 0; i < 16; i++) {
366   - struct irq_desc *desc = irq_to_desc(i);
367   -
368   - desc->chip = &superio_interrupt_type;
  357 + set_irq_chip_and_handler(i, &superio_interrupt_type, handle_level_irq);
369 358 }
370 359  
371 360 /*