aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Kconfig25
-rw-r--r--arch/mips/au1000/common/Makefile1
-rw-r--r--arch/mips/au1000/common/dma.c2
-rw-r--r--arch/mips/au1000/common/irq.c52
-rw-r--r--arch/mips/au1000/common/time.c14
-rw-r--r--arch/mips/au1000/common/usbdev.c1555
-rw-r--r--arch/mips/au1000/db1x00/board_setup.c5
-rw-r--r--arch/mips/au1000/mtx-1/board_setup.c8
-rw-r--r--arch/mips/au1000/pb1000/board_setup.c10
-rw-r--r--arch/mips/au1000/pb1100/board_setup.c6
-rw-r--r--arch/mips/au1000/pb1200/irqmap.c5
-rw-r--r--arch/mips/au1000/pb1500/board_setup.c9
-rw-r--r--arch/mips/basler/excite/excite_dbg_io.c2
-rw-r--r--arch/mips/basler/excite/excite_iodev.c14
-rw-r--r--arch/mips/basler/excite/excite_irq.c18
-rw-r--r--arch/mips/cobalt/irq.c52
-rw-r--r--arch/mips/cobalt/setup.c4
-rw-r--r--arch/mips/configs/jazz_defconfig1404
-rw-r--r--arch/mips/configs/malta_defconfig98
-rw-r--r--arch/mips/configs/pb1100_defconfig1
-rw-r--r--arch/mips/configs/pb1500_defconfig1
-rw-r--r--arch/mips/ddb5xxx/ddb5477/irq.c19
-rw-r--r--arch/mips/dec/ecc-berr.c5
-rw-r--r--arch/mips/dec/int-handler.S13
-rw-r--r--arch/mips/dec/kn01-berr.c4
-rw-r--r--arch/mips/dec/kn02xa-berr.c6
-rw-r--r--arch/mips/dec/reset.c3
-rw-r--r--arch/mips/dec/setup.c2
-rw-r--r--arch/mips/emma2rh/common/irq.c12
-rw-r--r--arch/mips/emma2rh/markeins/irq.c14
-rw-r--r--arch/mips/gt64120/common/time.c8
-rw-r--r--arch/mips/gt64120/ev64120/irq.c14
-rw-r--r--arch/mips/gt64120/ev64120/setup.c1
-rw-r--r--arch/mips/gt64120/momenco_ocelot/irq.c22
-rw-r--r--arch/mips/gt64120/momenco_ocelot/setup.c1
-rw-r--r--arch/mips/gt64120/wrppmc/irq.c10
-rw-r--r--arch/mips/jazz/irq.c30
-rw-r--r--arch/mips/jazz/setup.c29
-rw-r--r--arch/mips/jmr3927/rbhma3100/irq.c106
-rw-r--r--arch/mips/kernel/asm-offsets.c3
-rw-r--r--arch/mips/kernel/cpu-probe.c9
-rw-r--r--arch/mips/kernel/entry.S15
-rw-r--r--arch/mips/kernel/genex.S7
-rw-r--r--arch/mips/kernel/irq-msc01.c13
-rw-r--r--arch/mips/kernel/irq-mv6434x.c9
-rw-r--r--arch/mips/kernel/irq.c6
-rw-r--r--arch/mips/kernel/proc.c12
-rw-r--r--arch/mips/kernel/process.c2
-rw-r--r--arch/mips/kernel/ptrace.c18
-rw-r--r--arch/mips/kernel/ptrace32.c3
-rw-r--r--arch/mips/kernel/rtlx.c6
-rw-r--r--arch/mips/kernel/smp-mt.c16
-rw-r--r--arch/mips/kernel/smp.c14
-rw-r--r--arch/mips/kernel/smtc-asm.S9
-rw-r--r--arch/mips/kernel/smtc.c26
-rw-r--r--arch/mips/kernel/time.c11
-rw-r--r--arch/mips/kernel/traps.c16
-rw-r--r--arch/mips/lasat/interrupt.c6
-rw-r--r--arch/mips/math-emu/cp1emu.c7
-rw-r--r--arch/mips/mips-boards/atlas/atlas_int.c12
-rw-r--r--arch/mips/mips-boards/generic/time.c23
-rw-r--r--arch/mips/mips-boards/malta/malta_int.c38
-rw-r--r--arch/mips/mips-boards/sead/sead_int.c4
-rw-r--r--arch/mips/mips-boards/sim/sim_int.c11
-rw-r--r--arch/mips/mips-boards/sim/sim_time.c15
-rw-r--r--arch/mips/momentum/jaguar_atx/irq.c20
-rw-r--r--arch/mips/momentum/jaguar_atx/setup.c1
-rw-r--r--arch/mips/momentum/ocelot_3/irq.c22
-rw-r--r--arch/mips/momentum/ocelot_3/setup.c1
-rw-r--r--arch/mips/momentum/ocelot_c/cpci-irq.c5
-rw-r--r--arch/mips/momentum/ocelot_c/irq.c24
-rw-r--r--arch/mips/momentum/ocelot_c/setup.c1
-rw-r--r--arch/mips/momentum/ocelot_c/uart-irq.c5
-rw-r--r--arch/mips/momentum/ocelot_g/gt-irq.c5
-rw-r--r--arch/mips/momentum/ocelot_g/irq.c24
-rw-r--r--arch/mips/momentum/ocelot_g/setup.c1
-rw-r--r--arch/mips/oprofile/op_impl.h4
-rw-r--r--arch/mips/oprofile/op_model_mipsxx.c7
-rw-r--r--arch/mips/pci/pci-ip32.c2
-rw-r--r--arch/mips/philips/pnx8550/common/int.c32
-rw-r--r--arch/mips/pmc-sierra/yosemite/irq.c54
-rw-r--r--arch/mips/pmc-sierra/yosemite/setup.c1
-rw-r--r--arch/mips/pmc-sierra/yosemite/smp.c2
-rw-r--r--arch/mips/qemu/q-irq.c6
-rw-r--r--arch/mips/sgi-ip22/ip22-berr.c4
-rw-r--r--arch/mips/sgi-ip22/ip22-eisa.c5
-rw-r--r--arch/mips/sgi-ip22/ip22-int.c32
-rw-r--r--arch/mips/sgi-ip22/ip22-time.c6
-rw-r--r--arch/mips/sgi-ip27/ip27-irq.c27
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c4
-rw-r--r--arch/mips/sgi-ip32/crime.c7
-rw-r--r--arch/mips/sgi-ip32/ip32-irq.c48
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c28
-rw-r--r--arch/mips/sibyte/bcm1480/smp.c2
-rw-r--r--arch/mips/sibyte/bcm1480/time.c9
-rw-r--r--arch/mips/sibyte/sb1250/irq.c29
-rw-r--r--arch/mips/sibyte/sb1250/smp.c2
-rw-r--r--arch/mips/sibyte/sb1250/time.c7
-rw-r--r--arch/mips/sni/irq.c34
-rw-r--r--arch/mips/sni/setup.c1
-rw-r--r--arch/mips/tx4927/common/tx4927_irq.c14
-rw-r--r--arch/mips/tx4927/common/tx4927_setup.c10
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c2
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c7
-rw-r--r--arch/mips/tx4938/common/irq.c47
-rw-r--r--arch/mips/tx4938/common/setup.c19
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/irq.c2
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c3
-rw-r--r--arch/mips/vr41xx/common/icu.c2
-rw-r--r--arch/mips/vr41xx/common/irq.c32
110 files changed, 2136 insertions, 2360 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 8a49884bd5ec..14af6cce2fa2 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1010,11 +1010,6 @@ endchoice
1010config ARC32 1010config ARC32
1011 bool 1011 bool
1012 1012
1013config AU1X00_USB_DEVICE
1014 bool
1015 depends on MIPS_PB1500 || MIPS_PB1100 || MIPS_PB1000
1016 default n
1017
1018config BOOT_ELF32 1013config BOOT_ELF32
1019 bool 1014 bool
1020 1015
@@ -1465,10 +1460,8 @@ config MIPS_MT_DISABLED
1465 the option of an MT-enabled processor this option will be the only 1460 the option of an MT-enabled processor this option will be the only
1466 option in this menu. 1461 option in this menu.
1467 1462
1468config MIPS_MT_SMTC 1463config MIPS_MT_SMP
1469 bool "SMTC: Use all TCs on all VPEs for SMP" 1464 bool "Use 1 TC on each available VPE for SMP"
1470 depends on CPU_MIPS32_R2
1471 #depends on CPU_MIPS64_R2 # once there is hardware ...
1472 depends on SYS_SUPPORTS_MULTITHREADING 1465 depends on SYS_SUPPORTS_MULTITHREADING
1473 select CPU_MIPSR2_IRQ_VI 1466 select CPU_MIPSR2_IRQ_VI
1474 select CPU_MIPSR2_SRS 1467 select CPU_MIPSR2_SRS
@@ -1476,11 +1469,13 @@ config MIPS_MT_SMTC
1476 select SMP 1469 select SMP
1477 select SYS_SUPPORTS_SMP 1470 select SYS_SUPPORTS_SMP
1478 help 1471 help
1479 This is a kernel model which is known a SMTC or lately has been 1472 This is a kernel model which is also known a VSMP or lately
1480 marketesed into SMVP. 1473 has been marketesed into SMVP.
1481 1474
1482config MIPS_MT_SMP 1475config MIPS_MT_SMTC
1483 bool "Use 1 TC on each available VPE for SMP" 1476 bool "SMTC: Use all TCs on all VPEs for SMP"
1477 depends on CPU_MIPS32_R2
1478 #depends on CPU_MIPS64_R2 # once there is hardware ...
1484 depends on SYS_SUPPORTS_MULTITHREADING 1479 depends on SYS_SUPPORTS_MULTITHREADING
1485 select CPU_MIPSR2_IRQ_VI 1480 select CPU_MIPSR2_IRQ_VI
1486 select CPU_MIPSR2_SRS 1481 select CPU_MIPSR2_SRS
@@ -1488,8 +1483,8 @@ config MIPS_MT_SMP
1488 select SMP 1483 select SMP
1489 select SYS_SUPPORTS_SMP 1484 select SYS_SUPPORTS_SMP
1490 help 1485 help
1491 This is a kernel model which is also known a VSMP or lately 1486 This is a kernel model which is known a SMTC or lately has been
1492 has been marketesed into SMVP. 1487 marketesed into SMVP.
1493 1488
1494config MIPS_VPE_LOADER 1489config MIPS_VPE_LOADER
1495 bool "VPE loader support." 1490 bool "VPE loader support."
diff --git a/arch/mips/au1000/common/Makefile b/arch/mips/au1000/common/Makefile
index bf682f50b859..4c35525edb4f 100644
--- a/arch/mips/au1000/common/Makefile
+++ b/arch/mips/au1000/common/Makefile
@@ -10,6 +10,5 @@ obj-y += prom.o irq.o puts.o time.o reset.o \
10 au1xxx_irqmap.o clocks.o platform.o power.o setup.o \ 10 au1xxx_irqmap.o clocks.o platform.o power.o setup.o \
11 sleeper.o cputable.o dma.o dbdma.o gpio.o 11 sleeper.o cputable.o dma.o dbdma.o gpio.o
12 12
13obj-$(CONFIG_AU1X00_USB_DEVICE) += usbdev.o
14obj-$(CONFIG_KGDB) += dbg_io.o 13obj-$(CONFIG_KGDB) += dbg_io.o
15obj-$(CONFIG_PCI) += pci.o 14obj-$(CONFIG_PCI) += pci.o
diff --git a/arch/mips/au1000/common/dma.c b/arch/mips/au1000/common/dma.c
index fb7c47c1585d..c78260d4e837 100644
--- a/arch/mips/au1000/common/dma.c
+++ b/arch/mips/au1000/common/dma.c
@@ -160,7 +160,7 @@ void dump_au1000_dma_channel(unsigned int dmanr)
160 * Requests the DMA done IRQ if irqhandler != NULL. 160 * Requests the DMA done IRQ if irqhandler != NULL.
161 */ 161 */
162int request_au1000_dma(int dev_id, const char *dev_str, 162int request_au1000_dma(int dev_id, const char *dev_str,
163 irqreturn_t (*irqhandler)(int, void *, struct pt_regs *), 163 irq_handler_t irqhandler,
164 unsigned long irqflags, 164 unsigned long irqflags,
165 void *irq_dev_id) 165 void *irq_dev_id)
166{ 166{
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index 316722ee8cf5..2abe132bb07d 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -67,7 +67,7 @@
67 67
68extern void set_debug_traps(void); 68extern void set_debug_traps(void);
69extern irq_cpustat_t irq_stat [NR_CPUS]; 69extern irq_cpustat_t irq_stat [NR_CPUS];
70extern void mips_timer_interrupt(struct pt_regs *regs); 70extern void mips_timer_interrupt(void);
71 71
72static void setup_local_irq(unsigned int irq, int type, int int_req); 72static void setup_local_irq(unsigned int irq, int type, int int_req);
73static unsigned int startup_irq(unsigned int irq); 73static unsigned int startup_irq(unsigned int irq);
@@ -81,10 +81,6 @@ inline void local_disable_irq(unsigned int irq_nr);
81 81
82void (*board_init_irq)(void); 82void (*board_init_irq)(void);
83 83
84#ifdef CONFIG_PM
85extern irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs);
86#endif
87
88static DEFINE_SPINLOCK(irq_lock); 84static DEFINE_SPINLOCK(irq_lock);
89 85
90 86
@@ -292,7 +288,7 @@ static struct irq_chip level_irq_type = {
292}; 288};
293 289
294#ifdef CONFIG_PM 290#ifdef CONFIG_PM
295void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_regs *)) 291void startup_match20_interrupt(irq_handler_t handler)
296{ 292{
297 struct irq_desc *desc = &irq_desc[AU1000_TOY_MATCH2_INT]; 293 struct irq_desc *desc = &irq_desc[AU1000_TOY_MATCH2_INT];
298 294
@@ -501,14 +497,15 @@ void __init arch_init_irq(void)
501 * intcX_reqX_irqdispatch(). 497 * intcX_reqX_irqdispatch().
502 */ 498 */
503 499
504void intc0_req0_irqdispatch(struct pt_regs *regs) 500static void intc0_req0_irqdispatch(void)
505{ 501{
506 int irq = 0; 502 int irq = 0;
507 static unsigned long intc0_req0 = 0; 503 static unsigned long intc0_req0 = 0;
508 504
509 intc0_req0 |= au_readl(IC0_REQ0INT); 505 intc0_req0 |= au_readl(IC0_REQ0INT);
510 506
511 if (!intc0_req0) return; 507 if (!intc0_req0)
508 return;
512#ifdef AU1000_USB_DEV_REQ_INT 509#ifdef AU1000_USB_DEV_REQ_INT
513 /* 510 /*
514 * Because of the tight timing of SETUP token to reply 511 * Because of the tight timing of SETUP token to reply
@@ -517,28 +514,29 @@ void intc0_req0_irqdispatch(struct pt_regs *regs)
517 */ 514 */
518 if ((intc0_req0 & (1<<AU1000_USB_DEV_REQ_INT))) { 515 if ((intc0_req0 & (1<<AU1000_USB_DEV_REQ_INT))) {
519 intc0_req0 &= ~(1<<AU1000_USB_DEV_REQ_INT); 516 intc0_req0 &= ~(1<<AU1000_USB_DEV_REQ_INT);
520 do_IRQ(AU1000_USB_DEV_REQ_INT, regs); 517 do_IRQ(AU1000_USB_DEV_REQ_INT);
521 return; 518 return;
522 } 519 }
523#endif 520#endif
524 irq = au_ffs(intc0_req0) - 1; 521 irq = au_ffs(intc0_req0) - 1;
525 intc0_req0 &= ~(1<<irq); 522 intc0_req0 &= ~(1<<irq);
526 do_IRQ(irq, regs); 523 do_IRQ(irq);
527} 524}
528 525
529 526
530void intc0_req1_irqdispatch(struct pt_regs *regs) 527static void intc0_req1_irqdispatch(void)
531{ 528{
532 int irq = 0; 529 int irq = 0;
533 static unsigned long intc0_req1 = 0; 530 static unsigned long intc0_req1 = 0;
534 531
535 intc0_req1 |= au_readl(IC0_REQ1INT); 532 intc0_req1 |= au_readl(IC0_REQ1INT);
536 533
537 if (!intc0_req1) return; 534 if (!intc0_req1)
535 return;
538 536
539 irq = au_ffs(intc0_req1) - 1; 537 irq = au_ffs(intc0_req1) - 1;
540 intc0_req1 &= ~(1<<irq); 538 intc0_req1 &= ~(1<<irq);
541 do_IRQ(irq, regs); 539 do_IRQ(irq);
542} 540}
543 541
544 542
@@ -546,35 +544,37 @@ void intc0_req1_irqdispatch(struct pt_regs *regs)
546 * Interrupt Controller 1: 544 * Interrupt Controller 1:
547 * interrupts 32 - 63 545 * interrupts 32 - 63
548 */ 546 */
549void intc1_req0_irqdispatch(struct pt_regs *regs) 547static void intc1_req0_irqdispatch(void)
550{ 548{
551 int irq = 0; 549 int irq = 0;
552 static unsigned long intc1_req0 = 0; 550 static unsigned long intc1_req0 = 0;
553 551
554 intc1_req0 |= au_readl(IC1_REQ0INT); 552 intc1_req0 |= au_readl(IC1_REQ0INT);
555 553
556 if (!intc1_req0) return; 554 if (!intc1_req0)
555 return;
557 556
558 irq = au_ffs(intc1_req0) - 1; 557 irq = au_ffs(intc1_req0) - 1;
559 intc1_req0 &= ~(1<<irq); 558 intc1_req0 &= ~(1<<irq);
560 irq += 32; 559 irq += 32;
561 do_IRQ(irq, regs); 560 do_IRQ(irq);
562} 561}
563 562
564 563
565void intc1_req1_irqdispatch(struct pt_regs *regs) 564static void intc1_req1_irqdispatch(void)
566{ 565{
567 int irq = 0; 566 int irq = 0;
568 static unsigned long intc1_req1 = 0; 567 static unsigned long intc1_req1 = 0;
569 568
570 intc1_req1 |= au_readl(IC1_REQ1INT); 569 intc1_req1 |= au_readl(IC1_REQ1INT);
571 570
572 if (!intc1_req1) return; 571 if (!intc1_req1)
572 return;
573 573
574 irq = au_ffs(intc1_req1) - 1; 574 irq = au_ffs(intc1_req1) - 1;
575 intc1_req1 &= ~(1<<irq); 575 intc1_req1 &= ~(1<<irq);
576 irq += 32; 576 irq += 32;
577 do_IRQ(irq, regs); 577 do_IRQ(irq);
578} 578}
579 579
580#ifdef CONFIG_PM 580#ifdef CONFIG_PM
@@ -660,20 +660,20 @@ restore_au1xxx_intctl(void)
660} 660}
661#endif /* CONFIG_PM */ 661#endif /* CONFIG_PM */
662 662
663asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 663asmlinkage void plat_irq_dispatch(void)
664{ 664{
665 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM; 665 unsigned int pending = read_c0_status() & read_c0_cause() & ST0_IM;
666 666
667 if (pending & CAUSEF_IP7) 667 if (pending & CAUSEF_IP7)
668 mips_timer_interrupt(regs); 668 mips_timer_interrupt();
669 else if (pending & CAUSEF_IP2) 669 else if (pending & CAUSEF_IP2)
670 intc0_req0_irqdispatch(regs); 670 intc0_req0_irqdispatch();
671 else if (pending & CAUSEF_IP3) 671 else if (pending & CAUSEF_IP3)
672 intc0_req1_irqdispatch(regs); 672 intc0_req1_irqdispatch();
673 else if (pending & CAUSEF_IP4) 673 else if (pending & CAUSEF_IP4)
674 intc1_req0_irqdispatch(regs); 674 intc1_req0_irqdispatch();
675 else if (pending & CAUSEF_IP5) 675 else if (pending & CAUSEF_IP5)
676 intc1_req1_irqdispatch(regs); 676 intc1_req1_irqdispatch();
677 else 677 else
678 spurious_interrupt(regs); 678 spurious_interrupt();
679} 679}
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c
index 0a067f3113a5..94f09194d63d 100644
--- a/arch/mips/au1000/common/time.c
+++ b/arch/mips/au1000/common/time.c
@@ -41,7 +41,6 @@
41 41
42#include <asm/compiler.h> 42#include <asm/compiler.h>
43#include <asm/mipsregs.h> 43#include <asm/mipsregs.h>
44#include <asm/ptrace.h>
45#include <asm/time.h> 44#include <asm/time.h>
46#include <asm/div64.h> 45#include <asm/div64.h>
47#include <asm/mach-au1x00/au1000.h> 46#include <asm/mach-au1x00/au1000.h>
@@ -62,7 +61,7 @@ static unsigned int timerhi = 0, timerlo = 0;
62#error "unsupported HZ value! Must be in [100,1000]" 61#error "unsupported HZ value! Must be in [100,1000]"
63#endif 62#endif
64#define MATCH20_INC (328*100/HZ) /* magic number 328 is for HZ=100... */ 63#define MATCH20_INC (328*100/HZ) /* magic number 328 is for HZ=100... */
65extern void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 64extern void startup_match20_interrupt(irq_handler_t handler);
66static unsigned long last_pc0, last_match20; 65static unsigned long last_pc0, last_match20;
67#endif 66#endif
68 67
@@ -79,7 +78,8 @@ static inline void ack_r4ktimer(unsigned long newval)
79 * is provably more robust. 78 * is provably more robust.
80 */ 79 */
81unsigned long wtimer; 80unsigned long wtimer;
82void mips_timer_interrupt(struct pt_regs *regs) 81
82void mips_timer_interrupt(void)
83{ 83{
84 int irq = 63; 84 int irq = 63;
85 unsigned long count; 85 unsigned long count;
@@ -98,7 +98,7 @@ void mips_timer_interrupt(struct pt_regs *regs)
98 kstat_this_cpu.irqs[irq]++; 98 kstat_this_cpu.irqs[irq]++;
99 do_timer(1); 99 do_timer(1);
100#ifndef CONFIG_SMP 100#ifndef CONFIG_SMP
101 update_process_times(user_mode(regs)); 101 update_process_times(user_mode(get_irq_regs()));
102#endif 102#endif
103 r4k_cur += r4k_offset; 103 r4k_cur += r4k_offset;
104 ack_r4ktimer(r4k_cur); 104 ack_r4ktimer(r4k_cur);
@@ -115,7 +115,7 @@ null:
115} 115}
116 116
117#ifdef CONFIG_PM 117#ifdef CONFIG_PM
118irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs) 118irqreturn_t counter0_irq(int irq, void *dev_id)
119{ 119{
120 unsigned long pc0; 120 unsigned long pc0;
121 int time_elapsed; 121 int time_elapsed;
@@ -139,7 +139,7 @@ irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs)
139 while (time_elapsed > 0) { 139 while (time_elapsed > 0) {
140 do_timer(1); 140 do_timer(1);
141#ifndef CONFIG_SMP 141#ifndef CONFIG_SMP
142 update_process_times(user_mode(regs)); 142 update_process_times(user_mode(get_irq_regs()));
143#endif 143#endif
144 time_elapsed -= MATCH20_INC; 144 time_elapsed -= MATCH20_INC;
145 last_match20 += MATCH20_INC; 145 last_match20 += MATCH20_INC;
@@ -158,7 +158,7 @@ irqreturn_t counter0_irq(int irq, void *dev_id, struct pt_regs *regs)
158 jiffie_drift -= 999; 158 jiffie_drift -= 999;
159 do_timer(1); /* increment jiffies by one */ 159 do_timer(1); /* increment jiffies by one */
160#ifndef CONFIG_SMP 160#ifndef CONFIG_SMP
161 update_process_times(user_mode(regs)); 161 update_process_times(user_mode(get_irq_regs()));
162#endif 162#endif
163 } 163 }
164 164
diff --git a/arch/mips/au1000/common/usbdev.c b/arch/mips/au1000/common/usbdev.c
deleted file mode 100644
index 63bcb3a95dc7..000000000000
--- a/arch/mips/au1000/common/usbdev.c
+++ /dev/null
@@ -1,1555 +0,0 @@
1/*
2 * BRIEF MODULE DESCRIPTION
3 * Au1000 USB Device-Side (device layer)
4 *
5 * Copyright 2001-2002 MontaVista Software Inc.
6 * Author: MontaVista Software, Inc.
7 * stevel@mvista.com or source@mvista.com
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 *
14 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
15 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
16 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
17 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
20 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
21 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *
25 * You should have received a copy of the GNU General Public License along
26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */
29#include <linux/kernel.h>
30#include <linux/ioport.h>
31#include <linux/sched.h>
32#include <linux/signal.h>
33#include <linux/errno.h>
34#include <linux/poll.h>
35#include <linux/init.h>
36#include <linux/slab.h>
37#include <linux/fcntl.h>
38#include <linux/module.h>
39#include <linux/spinlock.h>
40#include <linux/list.h>
41#include <linux/smp_lock.h>
42#define DEBUG
43#include <linux/usb.h>
44
45#include <asm/io.h>
46#include <asm/uaccess.h>
47#include <asm/irq.h>
48#include <asm/mipsregs.h>
49#include <asm/au1000.h>
50#include <asm/au1000_dma.h>
51#include <asm/au1000_usbdev.h>
52
53#ifdef DEBUG
54#undef VDEBUG
55#ifdef VDEBUG
56#define vdbg(fmt, arg...) printk(KERN_DEBUG __FILE__ ": " fmt "\n" , ## arg)
57#else
58#define vdbg(fmt, arg...) do {} while (0)
59#endif
60#else
61#define vdbg(fmt, arg...) do {} while (0)
62#endif
63
64#define ALLOC_FLAGS (in_interrupt () ? GFP_ATOMIC : GFP_KERNEL)
65
66#define EP_FIFO_DEPTH 8
67
68typedef enum {
69 SETUP_STAGE = 0,
70 DATA_STAGE,
71 STATUS_STAGE
72} ep0_stage_t;
73
74typedef struct {
75 int read_fifo;
76 int write_fifo;
77 int ctrl_stat;
78 int read_fifo_status;
79 int write_fifo_status;
80} endpoint_reg_t;
81
82typedef struct {
83 usbdev_pkt_t *head;
84 usbdev_pkt_t *tail;
85 int count;
86} pkt_list_t;
87
88typedef struct {
89 int active;
90 struct usb_endpoint_descriptor *desc;
91 endpoint_reg_t *reg;
92 /* Only one of these are used, unless this is the control ep */
93 pkt_list_t inlist;
94 pkt_list_t outlist;
95 unsigned int indma, outdma; /* DMA channel numbers for IN, OUT */
96 /* following are extracted from endpoint descriptor for easy access */
97 int max_pkt_size;
98 int type;
99 int direction;
100 /* WE assign endpoint addresses! */
101 int address;
102 spinlock_t lock;
103} endpoint_t;
104
105
106static struct usb_dev {
107 endpoint_t ep[6];
108 ep0_stage_t ep0_stage;
109
110 struct usb_device_descriptor * dev_desc;
111 struct usb_interface_descriptor* if_desc;
112 struct usb_config_descriptor * conf_desc;
113 u8 * full_conf_desc;
114 struct usb_string_descriptor * str_desc[6];
115
116 /* callback to function layer */
117 void (*func_cb)(usbdev_cb_type_t type, unsigned long arg,
118 void *cb_data);
119 void* cb_data;
120
121 usbdev_state_t state; // device state
122 int suspended; // suspended flag
123 int address; // device address
124 int interface;
125 int num_ep;
126 u8 alternate_setting;
127 u8 configuration; // configuration value
128 int remote_wakeup_en;
129} usbdev;
130
131
132static endpoint_reg_t ep_reg[] = {
133 // FIFO's 0 and 1 are EP0 default control
134 {USBD_EP0RD, USBD_EP0WR, USBD_EP0CS, USBD_EP0RDSTAT, USBD_EP0WRSTAT },
135 {0},
136 // FIFO 2 is EP2, IN
137 { -1, USBD_EP2WR, USBD_EP2CS, -1, USBD_EP2WRSTAT },
138 // FIFO 3 is EP3, IN
139 { -1, USBD_EP3WR, USBD_EP3CS, -1, USBD_EP3WRSTAT },
140 // FIFO 4 is EP4, OUT
141 {USBD_EP4RD, -1, USBD_EP4CS, USBD_EP4RDSTAT, -1 },
142 // FIFO 5 is EP5, OUT
143 {USBD_EP5RD, -1, USBD_EP5CS, USBD_EP5RDSTAT, -1 }
144};
145
146static struct {
147 unsigned int id;
148 const char *str;
149} ep_dma_id[] = {
150 { DMA_ID_USBDEV_EP0_TX, "USBDev EP0 IN" },
151 { DMA_ID_USBDEV_EP0_RX, "USBDev EP0 OUT" },
152 { DMA_ID_USBDEV_EP2_TX, "USBDev EP2 IN" },
153 { DMA_ID_USBDEV_EP3_TX, "USBDev EP3 IN" },
154 { DMA_ID_USBDEV_EP4_RX, "USBDev EP4 OUT" },
155 { DMA_ID_USBDEV_EP5_RX, "USBDev EP5 OUT" }
156};
157
158#define DIR_OUT 0
159#define DIR_IN (1<<3)
160
161#define CONTROL_EP USB_ENDPOINT_XFER_CONTROL
162#define BULK_EP USB_ENDPOINT_XFER_BULK
163
164static inline endpoint_t *
165epaddr_to_ep(struct usb_dev* dev, int ep_addr)
166{
167 if (ep_addr >= 0 && ep_addr < 2)
168 return &dev->ep[0];
169 if (ep_addr < 6)
170 return &dev->ep[ep_addr];
171 return NULL;
172}
173
174static const char* std_req_name[] = {
175 "GET_STATUS",
176 "CLEAR_FEATURE",
177 "RESERVED",
178 "SET_FEATURE",
179 "RESERVED",
180 "SET_ADDRESS",
181 "GET_DESCRIPTOR",
182 "SET_DESCRIPTOR",
183 "GET_CONFIGURATION",
184 "SET_CONFIGURATION",
185 "GET_INTERFACE",
186 "SET_INTERFACE",
187 "SYNCH_FRAME"
188};
189
190static inline const char*
191get_std_req_name(int req)
192{
193 return (req >= 0 && req <= 12) ? std_req_name[req] : "UNKNOWN";
194}
195
196#if 0
197static void
198dump_setup(struct usb_ctrlrequest* s)
199{
200 dbg("%s: requesttype=%d", __FUNCTION__, s->requesttype);
201 dbg("%s: request=%d %s", __FUNCTION__, s->request,
202 get_std_req_name(s->request));
203 dbg("%s: value=0x%04x", __FUNCTION__, s->wValue);
204 dbg("%s: index=%d", __FUNCTION__, s->index);
205 dbg("%s: length=%d", __FUNCTION__, s->length);
206}
207#endif
208
209static inline usbdev_pkt_t *
210alloc_packet(endpoint_t * ep, int data_size, void* data)
211{
212 usbdev_pkt_t* pkt = kmalloc(sizeof(usbdev_pkt_t) + data_size,
213 ALLOC_FLAGS);
214 if (!pkt)
215 return NULL;
216 pkt->ep_addr = ep->address;
217 pkt->size = data_size;
218 pkt->status = 0;
219 pkt->next = NULL;
220 if (data)
221 memcpy(pkt->payload, data, data_size);
222
223 return pkt;
224}
225
226
227/*
228 * Link a packet to the tail of the enpoint's packet list.
229 * EP spinlock must be held when calling.
230 */
231static void
232link_tail(endpoint_t * ep, pkt_list_t * list, usbdev_pkt_t * pkt)
233{
234 if (!list->tail) {
235 list->head = list->tail = pkt;
236 list->count = 1;
237 } else {
238 list->tail->next = pkt;
239 list->tail = pkt;
240 list->count++;
241 }
242}
243
244/*
245 * Unlink and return a packet from the head of the given packet
246 * list. It is the responsibility of the caller to free the packet.
247 * EP spinlock must be held when calling.
248 */
249static usbdev_pkt_t *
250unlink_head(pkt_list_t * list)
251{
252 usbdev_pkt_t *pkt;
253
254 pkt = list->head;
255 if (!pkt || !list->count) {
256 return NULL;
257 }
258
259 list->head = pkt->next;
260 if (!list->head) {
261 list->head = list->tail = NULL;
262 list->count = 0;
263 } else
264 list->count--;
265
266 return pkt;
267}
268
269/*
270 * Create and attach a new packet to the tail of the enpoint's
271 * packet list. EP spinlock must be held when calling.
272 */
273static usbdev_pkt_t *
274add_packet(endpoint_t * ep, pkt_list_t * list, int size)
275{
276 usbdev_pkt_t *pkt = alloc_packet(ep, size, NULL);
277 if (!pkt)
278 return NULL;
279
280 link_tail(ep, list, pkt);
281 return pkt;
282}
283
284
285/*
286 * Unlink and free a packet from the head of the enpoint's
287 * packet list. EP spinlock must be held when calling.
288 */
289static inline void
290free_packet(pkt_list_t * list)
291{
292 kfree(unlink_head(list));
293}
294
295/* EP spinlock must be held when calling. */
296static inline void
297flush_pkt_list(pkt_list_t * list)
298{
299 while (list->count)
300 free_packet(list);
301}
302
303/* EP spinlock must be held when calling */
304static inline void
305flush_write_fifo(endpoint_t * ep)
306{
307 if (ep->reg->write_fifo_status >= 0) {
308 au_writel(USBDEV_FSTAT_FLUSH | USBDEV_FSTAT_UF |
309 USBDEV_FSTAT_OF,
310 ep->reg->write_fifo_status);
311 //udelay(100);
312 //au_writel(USBDEV_FSTAT_UF | USBDEV_FSTAT_OF,
313 // ep->reg->write_fifo_status);
314 }
315}
316
317/* EP spinlock must be held when calling */
318static inline void
319flush_read_fifo(endpoint_t * ep)
320{
321 if (ep->reg->read_fifo_status >= 0) {
322 au_writel(USBDEV_FSTAT_FLUSH | USBDEV_FSTAT_UF |
323 USBDEV_FSTAT_OF,
324 ep->reg->read_fifo_status);
325 //udelay(100);
326 //au_writel(USBDEV_FSTAT_UF | USBDEV_FSTAT_OF,
327 // ep->reg->read_fifo_status);
328 }
329}
330
331
332/* EP spinlock must be held when calling. */
333static void
334endpoint_flush(endpoint_t * ep)
335{
336 // First, flush all packets
337 flush_pkt_list(&ep->inlist);
338 flush_pkt_list(&ep->outlist);
339
340 // Now flush the endpoint's h/w FIFO(s)
341 flush_write_fifo(ep);
342 flush_read_fifo(ep);
343}
344
345/* EP spinlock must be held when calling. */
346static void
347endpoint_stall(endpoint_t * ep)
348{
349 u32 cs;
350
351 warn("%s", __FUNCTION__);
352
353 cs = au_readl(ep->reg->ctrl_stat) | USBDEV_CS_STALL;
354 au_writel(cs, ep->reg->ctrl_stat);
355}
356
357/* EP spinlock must be held when calling. */
358static void
359endpoint_unstall(endpoint_t * ep)
360{
361 u32 cs;
362
363 warn("%s", __FUNCTION__);
364
365 cs = au_readl(ep->reg->ctrl_stat) & ~USBDEV_CS_STALL;
366 au_writel(cs, ep->reg->ctrl_stat);
367}
368
369static void
370endpoint_reset_datatoggle(endpoint_t * ep)
371{
372 // FIXME: is this possible?
373}
374
375
376/* EP spinlock must be held when calling. */
377static int
378endpoint_fifo_read(endpoint_t * ep)
379{
380 int read_count = 0;
381 u8 *bufptr;
382 usbdev_pkt_t *pkt = ep->outlist.tail;
383
384 if (!pkt)
385 return -EINVAL;
386
387 bufptr = &pkt->payload[pkt->size];
388 while (au_readl(ep->reg->read_fifo_status) & USBDEV_FSTAT_FCNT_MASK) {
389 *bufptr++ = au_readl(ep->reg->read_fifo) & 0xff;
390 read_count++;
391 pkt->size++;
392 }
393
394 return read_count;
395}
396
397#if 0
398/* EP spinlock must be held when calling. */
399static int
400endpoint_fifo_write(endpoint_t * ep, int index)
401{
402 int write_count = 0;
403 u8 *bufptr;
404 usbdev_pkt_t *pkt = ep->inlist.head;
405
406 if (!pkt)
407 return -EINVAL;
408
409 bufptr = &pkt->payload[index];
410 while ((au_readl(ep->reg->write_fifo_status) &
411 USBDEV_FSTAT_FCNT_MASK) < EP_FIFO_DEPTH) {
412 if (bufptr < pkt->payload + pkt->size) {
413 au_writel(*bufptr++, ep->reg->write_fifo);
414 write_count++;
415 } else {
416 break;
417 }
418 }
419
420 return write_count;
421}
422#endif
423
424/*
425 * This routine is called to restart transmission of a packet.
426 * The endpoint's TSIZE must be set to the new packet's size,
427 * and DMA to the write FIFO needs to be restarted.
428 * EP spinlock must be held when calling.
429 */
430static void
431kickstart_send_packet(endpoint_t * ep)
432{
433 u32 cs;
434 usbdev_pkt_t *pkt = ep->inlist.head;
435
436 vdbg("%s: ep%d, pkt=%p", __FUNCTION__, ep->address, pkt);
437
438 if (!pkt) {
439 err("%s: head=NULL! list->count=%d", __FUNCTION__,
440 ep->inlist.count);
441 return;
442 }
443
444 dma_cache_wback_inv((unsigned long)pkt->payload, pkt->size);
445
446 /*
447 * make sure FIFO is empty
448 */
449 flush_write_fifo(ep);
450
451 cs = au_readl(ep->reg->ctrl_stat) & USBDEV_CS_STALL;
452 cs |= (pkt->size << USBDEV_CS_TSIZE_BIT);
453 au_writel(cs, ep->reg->ctrl_stat);
454
455 if (get_dma_active_buffer(ep->indma) == 1) {
456 set_dma_count1(ep->indma, pkt->size);
457 set_dma_addr1(ep->indma, virt_to_phys(pkt->payload));
458 enable_dma_buffer1(ep->indma); // reenable
459 } else {
460 set_dma_count0(ep->indma, pkt->size);
461 set_dma_addr0(ep->indma, virt_to_phys(pkt->payload));
462 enable_dma_buffer0(ep->indma); // reenable
463 }
464 if (dma_halted(ep->indma))
465 start_dma(ep->indma);
466}
467
468
469/*
470 * This routine is called when a packet in the inlist has been
471 * completed. Frees the completed packet and starts sending the
472 * next. EP spinlock must be held when calling.
473 */
474static usbdev_pkt_t *
475send_packet_complete(endpoint_t * ep)
476{
477 usbdev_pkt_t *pkt = unlink_head(&ep->inlist);
478
479 if (pkt) {
480 pkt->status =
481 (au_readl(ep->reg->ctrl_stat) & USBDEV_CS_NAK) ?
482 PKT_STATUS_NAK : PKT_STATUS_ACK;
483
484 vdbg("%s: ep%d, %s pkt=%p, list count=%d", __FUNCTION__,
485 ep->address, (pkt->status & PKT_STATUS_NAK) ?
486 "NAK" : "ACK", pkt, ep->inlist.count);
487 }
488
489 /*
490 * The write fifo should already be drained if things are
491 * working right, but flush it anyway just in case.
492 */
493 flush_write_fifo(ep);
494
495 // begin transmitting next packet in the inlist
496 if (ep->inlist.count) {
497 kickstart_send_packet(ep);
498 }
499
500 return pkt;
501}
502
503/*
504 * Add a new packet to the tail of the given ep's packet
505 * inlist. The transmit complete interrupt frees packets from
506 * the head of this list. EP spinlock must be held when calling.
507 */
508static int
509send_packet(struct usb_dev* dev, usbdev_pkt_t *pkt, int async)
510{
511 pkt_list_t *list;
512 endpoint_t* ep;
513
514 if (!pkt || !(ep = epaddr_to_ep(dev, pkt->ep_addr)))
515 return -EINVAL;
516
517 if (!pkt->size)
518 return 0;
519
520 list = &ep->inlist;
521
522 if (!async && list->count) {
523 halt_dma(ep->indma);
524 flush_pkt_list(list);
525 }
526
527 link_tail(ep, list, pkt);
528
529 vdbg("%s: ep%d, pkt=%p, size=%d, list count=%d", __FUNCTION__,
530 ep->address, pkt, pkt->size, list->count);
531
532 if (list->count == 1) {
533 /*
534 * if the packet count is one, it means the list was empty,
535 * and no more data will go out this ep until we kick-start
536 * it again.
537 */
538 kickstart_send_packet(ep);
539 }
540
541 return pkt->size;
542}
543
544/*
545 * This routine is called to restart reception of a packet.
546 * EP spinlock must be held when calling.
547 */
548static void
549kickstart_receive_packet(endpoint_t * ep)
550{
551 usbdev_pkt_t *pkt;
552
553 // get and link a new packet for next reception
554 if (!(pkt = add_packet(ep, &ep->outlist, ep->max_pkt_size))) {
555 err("%s: could not alloc new packet", __FUNCTION__);
556 return;
557 }
558
559 if (get_dma_active_buffer(ep->outdma) == 1) {
560 clear_dma_done1(ep->outdma);
561 set_dma_count1(ep->outdma, ep->max_pkt_size);
562 set_dma_count0(ep->outdma, 0);
563 set_dma_addr1(ep->outdma, virt_to_phys(pkt->payload));
564 enable_dma_buffer1(ep->outdma); // reenable
565 } else {
566 clear_dma_done0(ep->outdma);
567 set_dma_count0(ep->outdma, ep->max_pkt_size);
568 set_dma_count1(ep->outdma, 0);
569 set_dma_addr0(ep->outdma, virt_to_phys(pkt->payload));
570 enable_dma_buffer0(ep->outdma); // reenable
571 }
572 if (dma_halted(ep->outdma))
573 start_dma(ep->outdma);
574}
575
576
577/*
578 * This routine is called when a packet in the outlist has been
579 * completed (received) and we need to prepare for a new packet
580 * to be received. Halts DMA and computes the packet size from the
581 * remaining DMA counter. Then prepares a new packet for reception
582 * and restarts DMA. FIXME: what if another packet comes in
583 * on top of the completed packet? Counter would be wrong.
584 * EP spinlock must be held when calling.
585 */
586static usbdev_pkt_t *
587receive_packet_complete(endpoint_t * ep)
588{
589 usbdev_pkt_t *pkt = ep->outlist.tail;
590 u32 cs;
591
592 halt_dma(ep->outdma);
593
594 cs = au_readl(ep->reg->ctrl_stat);
595
596 if (!pkt)
597 return NULL;
598
599 pkt->size = ep->max_pkt_size - get_dma_residue(ep->outdma);
600 if (pkt->size)
601 dma_cache_inv((unsigned long)pkt->payload, pkt->size);
602 /*
603 * need to pull out any remaining bytes in the FIFO.
604 */
605 endpoint_fifo_read(ep);
606 /*
607 * should be drained now, but flush anyway just in case.
608 */
609 flush_read_fifo(ep);
610
611 pkt->status = (cs & USBDEV_CS_NAK) ? PKT_STATUS_NAK : PKT_STATUS_ACK;
612 if (ep->address == 0 && (cs & USBDEV_CS_SU))
613 pkt->status |= PKT_STATUS_SU;
614
615 vdbg("%s: ep%d, %s pkt=%p, size=%d", __FUNCTION__,
616 ep->address, (pkt->status & PKT_STATUS_NAK) ?
617 "NAK" : "ACK", pkt, pkt->size);
618
619 kickstart_receive_packet(ep);
620
621 return pkt;
622}
623
624
625/*
626 ****************************************************************************
627 * Here starts the standard device request handlers. They are
628 * all called by do_setup() via a table of function pointers.
629 ****************************************************************************
630 */
631
632static ep0_stage_t
633do_get_status(struct usb_dev* dev, struct usb_ctrlrequest* setup)
634{
635 switch (setup->bRequestType) {
636 case 0x80: // Device
637 // FIXME: send device status
638 break;
639 case 0x81: // Interface
640 // FIXME: send interface status
641 break;
642 case 0x82: // End Point
643 // FIXME: send endpoint status
644 break;
645 default:
646 // Invalid Command
647 endpoint_stall(&dev->ep[0]); // Stall End Point 0
648 break;
649 }
650
651 return STATUS_STAGE;
652}
653
654static ep0_stage_t
655do_clear_feature(struct usb_dev* dev, struct usb_ctrlrequest* setup)
656{
657 switch (setup->bRequestType) {
658 case 0x00: // Device
659 if ((le16_to_cpu(setup->wValue) & 0xff) == 1)
660 dev->remote_wakeup_en = 0;
661 else
662 endpoint_stall(&dev->ep[0]);
663 break;
664 case 0x02: // End Point
665 if ((le16_to_cpu(setup->wValue) & 0xff) == 0) {
666 endpoint_t *ep =
667 epaddr_to_ep(dev,
668 le16_to_cpu(setup->wIndex) & 0xff);
669
670 endpoint_unstall(ep);
671 endpoint_reset_datatoggle(ep);
672 } else
673 endpoint_stall(&dev->ep[0]);
674 break;
675 }
676
677 return SETUP_STAGE;
678}
679
680static ep0_stage_t
681do_reserved(struct usb_dev* dev, struct usb_ctrlrequest* setup)
682{
683 // Invalid request, stall End Point 0
684 endpoint_stall(&dev->ep[0]);
685 return SETUP_STAGE;
686}
687
688static ep0_stage_t
689do_set_feature(struct usb_dev* dev, struct usb_ctrlrequest* setup)
690{
691 switch (setup->bRequestType) {
692 case 0x00: // Device
693 if ((le16_to_cpu(setup->wValue) & 0xff) == 1)
694 dev->remote_wakeup_en = 1;
695 else
696 endpoint_stall(&dev->ep[0]);
697 break;
698 case 0x02: // End Point
699 if ((le16_to_cpu(setup->wValue) & 0xff) == 0) {
700 endpoint_t *ep =
701 epaddr_to_ep(dev,
702 le16_to_cpu(setup->wIndex) & 0xff);
703
704 endpoint_stall(ep);
705 } else
706 endpoint_stall(&dev->ep[0]);
707 break;
708 }
709
710 return SETUP_STAGE;
711}
712
713static ep0_stage_t
714do_set_address(struct usb_dev* dev, struct usb_ctrlrequest* setup)
715{
716 int new_state = dev->state;
717 int new_addr = le16_to_cpu(setup->wValue);
718
719 dbg("%s: our address=%d", __FUNCTION__, new_addr);
720
721 if (new_addr > 127) {
722 // usb spec doesn't tell us what to do, so just go to
723 // default state
724 new_state = DEFAULT;
725 dev->address = 0;
726 } else if (dev->address != new_addr) {
727 dev->address = new_addr;
728 new_state = ADDRESS;
729 }
730
731 if (dev->state != new_state) {
732 dev->state = new_state;
733 /* inform function layer of usbdev state change */
734 dev->func_cb(CB_NEW_STATE, dev->state, dev->cb_data);
735 }
736
737 return SETUP_STAGE;
738}
739
740static ep0_stage_t
741do_get_descriptor(struct usb_dev* dev, struct usb_ctrlrequest* setup)
742{
743 int strnum, desc_len = le16_to_cpu(setup->wLength);
744
745 switch (le16_to_cpu(setup->wValue) >> 8) {
746 case USB_DT_DEVICE:
747 // send device descriptor!
748 desc_len = desc_len > dev->dev_desc->bLength ?
749 dev->dev_desc->bLength : desc_len;
750 dbg("sending device desc, size=%d", desc_len);
751 send_packet(dev, alloc_packet(&dev->ep[0], desc_len,
752 dev->dev_desc), 0);
753 break;
754 case USB_DT_CONFIG:
755 // If the config descr index in low-byte of
756 // setup->wValue is valid, send config descr,
757 // otherwise stall ep0.
758 if ((le16_to_cpu(setup->wValue) & 0xff) == 0) {
759 // send config descriptor!
760 if (desc_len <= USB_DT_CONFIG_SIZE) {
761 dbg("sending partial config desc, size=%d",
762 desc_len);
763 send_packet(dev,
764 alloc_packet(&dev->ep[0],
765 desc_len,
766 dev->conf_desc),
767 0);
768 } else {
769 int len = le16_to_cpu(dev->conf_desc->wTotalLength);
770 dbg("sending whole config desc,"
771 " size=%d, our size=%d", desc_len, len);
772 desc_len = desc_len > len ? len : desc_len;
773 send_packet(dev,
774 alloc_packet(&dev->ep[0],
775 desc_len,
776 dev->full_conf_desc),
777 0);
778 }
779 } else
780 endpoint_stall(&dev->ep[0]);
781 break;
782 case USB_DT_STRING:
783 // If the string descr index in low-byte of setup->wValue
784 // is valid, send string descr, otherwise stall ep0.
785 strnum = le16_to_cpu(setup->wValue) & 0xff;
786 if (strnum >= 0 && strnum < 6) {
787 struct usb_string_descriptor *desc =
788 dev->str_desc[strnum];
789 desc_len = desc_len > desc->bLength ?
790 desc->bLength : desc_len;
791 dbg("sending string desc %d", strnum);
792 send_packet(dev,
793 alloc_packet(&dev->ep[0], desc_len,
794 desc), 0);
795 } else
796 endpoint_stall(&dev->ep[0]);
797 break;
798 default:
799 // Invalid request
800 err("invalid get desc=%d, stalled",
801 le16_to_cpu(setup->wValue) >> 8);
802 endpoint_stall(&dev->ep[0]); // Stall endpoint 0
803 break;
804 }
805
806 return STATUS_STAGE;
807}
808
809static ep0_stage_t
810do_set_descriptor(struct usb_dev* dev, struct usb_ctrlrequest* setup)
811{
812 // TODO: implement
813 // there will be an OUT data stage (the descriptor to set)
814 return DATA_STAGE;
815}
816
817static ep0_stage_t
818do_get_configuration(struct usb_dev* dev, struct usb_ctrlrequest* setup)
819{
820 // send dev->configuration
821 dbg("sending config");
822 send_packet(dev, alloc_packet(&dev->ep[0], 1, &dev->configuration),
823 0);
824 return STATUS_STAGE;
825}
826
827static ep0_stage_t
828do_set_configuration(struct usb_dev* dev, struct usb_ctrlrequest* setup)
829{
830 // set active config to low-byte of setup->wValue
831 dev->configuration = le16_to_cpu(setup->wValue) & 0xff;
832 dbg("set config, config=%d", dev->configuration);
833 if (!dev->configuration && dev->state > DEFAULT) {
834 dev->state = ADDRESS;
835 /* inform function layer of usbdev state change */
836 dev->func_cb(CB_NEW_STATE, dev->state, dev->cb_data);
837 } else if (dev->configuration == 1) {
838 dev->state = CONFIGURED;
839 /* inform function layer of usbdev state change */
840 dev->func_cb(CB_NEW_STATE, dev->state, dev->cb_data);
841 } else {
842 // FIXME: "respond with request error" - how?
843 }
844
845 return SETUP_STAGE;
846}
847
848static ep0_stage_t
849do_get_interface(struct usb_dev* dev, struct usb_ctrlrequest* setup)
850{
851 // interface must be zero.
852 if ((le16_to_cpu(setup->wIndex) & 0xff) || dev->state == ADDRESS) {
853 // FIXME: respond with "request error". how?
854 } else if (dev->state == CONFIGURED) {
855 // send dev->alternate_setting
856 dbg("sending alt setting");
857 send_packet(dev, alloc_packet(&dev->ep[0], 1,
858 &dev->alternate_setting), 0);
859 }
860
861 return STATUS_STAGE;
862
863}
864
865static ep0_stage_t
866do_set_interface(struct usb_dev* dev, struct usb_ctrlrequest* setup)
867{
868 if (dev->state == ADDRESS) {
869 // FIXME: respond with "request error". how?
870 } else if (dev->state == CONFIGURED) {
871 dev->interface = le16_to_cpu(setup->wIndex) & 0xff;
872 dev->alternate_setting =
873 le16_to_cpu(setup->wValue) & 0xff;
874 // interface and alternate_setting must be zero
875 if (dev->interface || dev->alternate_setting) {
876 // FIXME: respond with "request error". how?
877 }
878 }
879
880 return SETUP_STAGE;
881}
882
883static ep0_stage_t
884do_synch_frame(struct usb_dev* dev, struct usb_ctrlrequest* setup)
885{
886 // TODO
887 return SETUP_STAGE;
888}
889
890typedef ep0_stage_t (*req_method_t)(struct usb_dev* dev,
891 struct usb_ctrlrequest* setup);
892
893
894/* Table of the standard device request handlers */
895static const req_method_t req_method[] = {
896 do_get_status,
897 do_clear_feature,
898 do_reserved,
899 do_set_feature,
900 do_reserved,
901 do_set_address,
902 do_get_descriptor,
903 do_set_descriptor,
904 do_get_configuration,
905 do_set_configuration,
906 do_get_interface,
907 do_set_interface,
908 do_synch_frame
909};
910
911
912// SETUP packet request dispatcher
913static void
914do_setup (struct usb_dev* dev, struct usb_ctrlrequest* setup)
915{
916 req_method_t m;
917
918 dbg("%s: req %d %s", __FUNCTION__, setup->bRequestType,
919 get_std_req_name(setup->bRequestType));
920
921 if ((setup->bRequestType & USB_TYPE_MASK) != USB_TYPE_STANDARD ||
922 (setup->bRequestType & USB_RECIP_MASK) != USB_RECIP_DEVICE) {
923 err("%s: invalid requesttype 0x%02x", __FUNCTION__,
924 setup->bRequestType);
925 return;
926 }
927
928 if ((setup->bRequestType & 0x80) == USB_DIR_OUT && setup->wLength)
929 dbg("%s: OUT phase! length=%d", __FUNCTION__, setup->wLength);
930
931 if (setup->bRequestType < sizeof(req_method)/sizeof(req_method_t))
932 m = req_method[setup->bRequestType];
933 else
934 m = do_reserved;
935
936 dev->ep0_stage = (*m)(dev, setup);
937}
938
939/*
940 * A SETUP, DATA0, or DATA1 packet has been received
941 * on the default control endpoint's fifo.
942 */
943static void
944process_ep0_receive (struct usb_dev* dev)
945{
946 endpoint_t *ep0 = &dev->ep[0];
947 usbdev_pkt_t *pkt;
948
949 spin_lock(&ep0->lock);
950
951 // complete packet and prepare a new packet
952 pkt = receive_packet_complete(ep0);
953 if (!pkt) {
954 // FIXME: should put a warn/err here.
955 spin_unlock(&ep0->lock);
956 return;
957 }
958
959 // unlink immediately from endpoint.
960 unlink_head(&ep0->outlist);
961
962 // override current stage if h/w says it's a setup packet
963 if (pkt->status & PKT_STATUS_SU)
964 dev->ep0_stage = SETUP_STAGE;
965
966 switch (dev->ep0_stage) {
967 case SETUP_STAGE:
968 vdbg("SU bit is %s in setup stage",
969 (pkt->status & PKT_STATUS_SU) ? "set" : "not set");
970
971 if (pkt->size == sizeof(struct usb_ctrlrequest)) {
972#ifdef VDEBUG
973 if (pkt->status & PKT_STATUS_ACK)
974 vdbg("received SETUP");
975 else
976 vdbg("received NAK SETUP");
977#endif
978 do_setup(dev, (struct usb_ctrlrequest*)pkt->payload);
979 } else
980 err("%s: wrong size SETUP received", __FUNCTION__);
981 break;
982 case DATA_STAGE:
983 /*
984 * this setup has an OUT data stage. Of the standard
985 * device requests, only set_descriptor has this stage,
986 * so this packet is that descriptor. TODO: drop it for
987 * now, set_descriptor not implemented.
988 *
989 * Need to place a byte in the write FIFO here, to prepare
990 * to send a zero-length DATA ack packet to the host in the
991 * STATUS stage.
992 */
993 au_writel(0, ep0->reg->write_fifo);
994 dbg("received OUT stage DATAx on EP0, size=%d", pkt->size);
995 dev->ep0_stage = SETUP_STAGE;
996 break;
997 case STATUS_STAGE:
998 // this setup had an IN data stage, and host is ACK'ing
999 // the packet we sent during that stage.
1000 if (pkt->size != 0)
1001 warn("received non-zero ACK on EP0??");
1002#ifdef VDEBUG
1003 else
1004 vdbg("received ACK on EP0");
1005#endif
1006 dev->ep0_stage = SETUP_STAGE;
1007 break;
1008 }
1009
1010 spin_unlock(&ep0->lock);
1011 // we're done processing the packet, free it
1012 kfree(pkt);
1013}
1014
1015
1016/*
1017 * A DATA0/1 packet has been received on one of the OUT endpoints (4 or 5)
1018 */
1019static void
1020process_ep_receive (struct usb_dev* dev, endpoint_t *ep)
1021{
1022 usbdev_pkt_t *pkt;
1023
1024 spin_lock(&ep->lock);
1025 pkt = receive_packet_complete(ep);
1026 spin_unlock(&ep->lock);
1027
1028 dev->func_cb(CB_PKT_COMPLETE, (unsigned long)pkt, dev->cb_data);
1029}
1030
1031
1032
1033/* This ISR handles the receive complete and suspend events */
1034static void
1035req_sus_intr (int irq, void *dev_id, struct pt_regs *regs)
1036{
1037 struct usb_dev *dev = (struct usb_dev *) dev_id;
1038 u32 status;
1039
1040 status = au_readl(USBD_INTSTAT);
1041 au_writel(status, USBD_INTSTAT); // ack'em
1042
1043 if (status & (1<<0))
1044 process_ep0_receive(dev);
1045 if (status & (1<<4))
1046 process_ep_receive(dev, &dev->ep[4]);
1047 if (status & (1<<5))
1048 process_ep_receive(dev, &dev->ep[5]);
1049}
1050
1051
1052/* This ISR handles the DMA done events on EP0 */
1053static void
1054dma_done_ep0_intr(int irq, void *dev_id, struct pt_regs *regs)
1055{
1056 struct usb_dev *dev = (struct usb_dev *) dev_id;
1057 usbdev_pkt_t* pkt;
1058 endpoint_t *ep0 = &dev->ep[0];
1059 u32 cs0, buff_done;
1060
1061 spin_lock(&ep0->lock);
1062 cs0 = au_readl(ep0->reg->ctrl_stat);
1063
1064 // first check packet transmit done
1065 if ((buff_done = get_dma_buffer_done(ep0->indma)) != 0) {
1066 // transmitted a DATAx packet during DATA stage
1067 // on control endpoint 0
1068 // clear DMA done bit
1069 if (buff_done & DMA_D0)
1070 clear_dma_done0(ep0->indma);
1071 if (buff_done & DMA_D1)
1072 clear_dma_done1(ep0->indma);
1073
1074 pkt = send_packet_complete(ep0);
1075 kfree(pkt);
1076 }
1077
1078 /*
1079 * Now check packet receive done. Shouldn't get these,
1080 * the receive packet complete intr should happen
1081 * before the DMA done intr occurs.
1082 */
1083 if ((buff_done = get_dma_buffer_done(ep0->outdma)) != 0) {
1084 // clear DMA done bit
1085 if (buff_done & DMA_D0)
1086 clear_dma_done0(ep0->outdma);
1087 if (buff_done & DMA_D1)
1088 clear_dma_done1(ep0->outdma);
1089
1090 //process_ep0_receive(dev);
1091 }
1092
1093 spin_unlock(&ep0->lock);
1094}
1095
1096/* This ISR handles the DMA done events on endpoints 2,3,4,5 */
1097static void
1098dma_done_ep_intr(int irq, void *dev_id, struct pt_regs *regs)
1099{
1100 struct usb_dev *dev = (struct usb_dev *) dev_id;
1101 int i;
1102
1103 for (i = 2; i < 6; i++) {
1104 u32 buff_done;
1105 usbdev_pkt_t* pkt;
1106 endpoint_t *ep = &dev->ep[i];
1107
1108 if (!ep->active) continue;
1109
1110 spin_lock(&ep->lock);
1111
1112 if (ep->direction == USB_DIR_IN) {
1113 buff_done = get_dma_buffer_done(ep->indma);
1114 if (buff_done != 0) {
1115 // transmitted a DATAx pkt on the IN ep
1116 // clear DMA done bit
1117 if (buff_done & DMA_D0)
1118 clear_dma_done0(ep->indma);
1119 if (buff_done & DMA_D1)
1120 clear_dma_done1(ep->indma);
1121
1122 pkt = send_packet_complete(ep);
1123
1124 spin_unlock(&ep->lock);
1125 dev->func_cb(CB_PKT_COMPLETE,
1126 (unsigned long)pkt,
1127 dev->cb_data);
1128 spin_lock(&ep->lock);
1129 }
1130 } else {
1131 /*
1132 * Check packet receive done (OUT ep). Shouldn't get
1133 * these, the rx packet complete intr should happen
1134 * before the DMA done intr occurs.
1135 */
1136 buff_done = get_dma_buffer_done(ep->outdma);
1137 if (buff_done != 0) {
1138 // received a DATAx pkt on the OUT ep
1139 // clear DMA done bit
1140 if (buff_done & DMA_D0)
1141 clear_dma_done0(ep->outdma);
1142 if (buff_done & DMA_D1)
1143 clear_dma_done1(ep->outdma);
1144
1145 //process_ep_receive(dev, ep);
1146 }
1147 }
1148
1149 spin_unlock(&ep->lock);
1150 }
1151}
1152
1153
1154/***************************************************************************
1155 * Here begins the external interface functions
1156 ***************************************************************************
1157 */
1158
1159/*
1160 * allocate a new packet
1161 */
1162int
1163usbdev_alloc_packet(int ep_addr, int data_size, usbdev_pkt_t** pkt)
1164{
1165 endpoint_t * ep = epaddr_to_ep(&usbdev, ep_addr);
1166 usbdev_pkt_t* lpkt = NULL;
1167
1168 if (!ep || !ep->active || ep->address < 2)
1169 return -ENODEV;
1170 if (data_size > ep->max_pkt_size)
1171 return -EINVAL;
1172
1173 lpkt = *pkt = alloc_packet(ep, data_size, NULL);
1174 if (!lpkt)
1175 return -ENOMEM;
1176 return 0;
1177}
1178
1179
1180/*
1181 * packet send
1182 */
1183int
1184usbdev_send_packet(int ep_addr, usbdev_pkt_t * pkt)
1185{
1186 unsigned long flags;
1187 int count;
1188 endpoint_t * ep;
1189
1190 if (!pkt || !(ep = epaddr_to_ep(&usbdev, pkt->ep_addr)) ||
1191 !ep->active || ep->address < 2)
1192 return -ENODEV;
1193 if (ep->direction != USB_DIR_IN)
1194 return -EINVAL;
1195
1196 spin_lock_irqsave(&ep->lock, flags);
1197 count = send_packet(&usbdev, pkt, 1);
1198 spin_unlock_irqrestore(&ep->lock, flags);
1199
1200 return count;
1201}
1202
1203/*
1204 * packet receive
1205 */
1206int
1207usbdev_receive_packet(int ep_addr, usbdev_pkt_t** pkt)
1208{
1209 unsigned long flags;
1210 usbdev_pkt_t* lpkt = NULL;
1211 endpoint_t *ep = epaddr_to_ep(&usbdev, ep_addr);
1212
1213 if (!ep || !ep->active || ep->address < 2)
1214 return -ENODEV;
1215 if (ep->direction != USB_DIR_OUT)
1216 return -EINVAL;
1217
1218 spin_lock_irqsave(&ep->lock, flags);
1219 if (ep->outlist.count > 1)
1220 lpkt = unlink_head(&ep->outlist);
1221 spin_unlock_irqrestore(&ep->lock, flags);
1222
1223 if (!lpkt) {
1224 /* no packet available */
1225 *pkt = NULL;
1226 return -ENODATA;
1227 }
1228
1229 *pkt = lpkt;
1230
1231 return lpkt->size;
1232}
1233
1234
1235/*
1236 * return total queued byte count on the endpoint.
1237 */
1238int
1239usbdev_get_byte_count(int ep_addr)
1240{
1241 unsigned long flags;
1242 pkt_list_t *list;
1243 usbdev_pkt_t *scan;
1244 int count = 0;
1245 endpoint_t * ep = epaddr_to_ep(&usbdev, ep_addr);
1246
1247 if (!ep || !ep->active || ep->address < 2)
1248 return -ENODEV;
1249
1250 if (ep->direction == USB_DIR_IN) {
1251 list = &ep->inlist;
1252
1253 spin_lock_irqsave(&ep->lock, flags);
1254 for (scan = list->head; scan; scan = scan->next)
1255 count += scan->size;
1256 spin_unlock_irqrestore(&ep->lock, flags);
1257 } else {
1258 list = &ep->outlist;
1259
1260 spin_lock_irqsave(&ep->lock, flags);
1261 if (list->count > 1) {
1262 for (scan = list->head; scan != list->tail;
1263 scan = scan->next)
1264 count += scan->size;
1265 }
1266 spin_unlock_irqrestore(&ep->lock, flags);
1267 }
1268
1269 return count;
1270}
1271
1272
1273void
1274usbdev_exit(void)
1275{
1276 endpoint_t *ep;
1277 int i;
1278
1279 au_writel(0, USBD_INTEN); // disable usb dev ints
1280 au_writel(0, USBD_ENABLE); // disable usb dev
1281
1282 free_irq(AU1000_USB_DEV_REQ_INT, &usbdev);
1283 free_irq(AU1000_USB_DEV_SUS_INT, &usbdev);
1284
1285 // free all control endpoint resources
1286 ep = &usbdev.ep[0];
1287 free_au1000_dma(ep->indma);
1288 free_au1000_dma(ep->outdma);
1289 endpoint_flush(ep);
1290
1291 // free ep resources
1292 for (i = 2; i < 6; i++) {
1293 ep = &usbdev.ep[i];
1294 if (!ep->active) continue;
1295
1296 if (ep->direction == USB_DIR_IN) {
1297 free_au1000_dma(ep->indma);
1298 } else {
1299 free_au1000_dma(ep->outdma);
1300 }
1301 endpoint_flush(ep);
1302 }
1303
1304 kfree(usbdev.full_conf_desc);
1305}
1306
1307int
1308usbdev_init(struct usb_device_descriptor* dev_desc,
1309 struct usb_config_descriptor* config_desc,
1310 struct usb_interface_descriptor* if_desc,
1311 struct usb_endpoint_descriptor* ep_desc,
1312 struct usb_string_descriptor* str_desc[],
1313 void (*cb)(usbdev_cb_type_t, unsigned long, void *),
1314 void* cb_data)
1315{
1316 endpoint_t *ep0;
1317 int i, ret=0;
1318 u8* fcd;
1319
1320 if (dev_desc->bNumConfigurations > 1 ||
1321 config_desc->bNumInterfaces > 1 ||
1322 if_desc->bNumEndpoints > 4) {
1323 err("Only one config, one i/f, and no more "
1324 "than 4 ep's allowed");
1325 ret = -EINVAL;
1326 goto out;
1327 }
1328
1329 if (!cb) {
1330 err("Function-layer callback required");
1331 ret = -EINVAL;
1332 goto out;
1333 }
1334
1335 if (dev_desc->bMaxPacketSize0 != USBDEV_EP0_MAX_PACKET_SIZE) {
1336 warn("EP0 Max Packet size must be %d",
1337 USBDEV_EP0_MAX_PACKET_SIZE);
1338 dev_desc->bMaxPacketSize0 = USBDEV_EP0_MAX_PACKET_SIZE;
1339 }
1340
1341 memset(&usbdev, 0, sizeof(struct usb_dev));
1342
1343 usbdev.state = DEFAULT;
1344 usbdev.dev_desc = dev_desc;
1345 usbdev.if_desc = if_desc;
1346 usbdev.conf_desc = config_desc;
1347 for (i=0; i<6; i++)
1348 usbdev.str_desc[i] = str_desc[i];
1349 usbdev.func_cb = cb;
1350 usbdev.cb_data = cb_data;
1351
1352 /* Initialize default control endpoint */
1353 ep0 = &usbdev.ep[0];
1354 ep0->active = 1;
1355 ep0->type = CONTROL_EP;
1356 ep0->max_pkt_size = USBDEV_EP0_MAX_PACKET_SIZE;
1357 spin_lock_init(&ep0->lock);
1358 ep0->desc = NULL; // ep0 has no descriptor
1359 ep0->address = 0;
1360 ep0->direction = 0;
1361 ep0->reg = &ep_reg[0];
1362
1363 /* Initialize the other requested endpoints */
1364 for (i = 0; i < if_desc->bNumEndpoints; i++) {
1365 struct usb_endpoint_descriptor* epd = &ep_desc[i];
1366 endpoint_t *ep;
1367
1368 if ((epd->bEndpointAddress & 0x80) == USB_DIR_IN) {
1369 ep = &usbdev.ep[2];
1370 ep->address = 2;
1371 if (ep->active) {
1372 ep = &usbdev.ep[3];
1373 ep->address = 3;
1374 if (ep->active) {
1375 err("too many IN ep's requested");
1376 ret = -ENODEV;
1377 goto out;
1378 }
1379 }
1380 } else {
1381 ep = &usbdev.ep[4];
1382 ep->address = 4;
1383 if (ep->active) {
1384 ep = &usbdev.ep[5];
1385 ep->address = 5;
1386 if (ep->active) {
1387 err("too many OUT ep's requested");
1388 ret = -ENODEV;
1389 goto out;
1390 }
1391 }
1392 }
1393
1394 ep->active = 1;
1395 epd->bEndpointAddress &= ~0x0f;
1396 epd->bEndpointAddress |= (u8)ep->address;
1397 ep->direction = epd->bEndpointAddress & 0x80;
1398 ep->type = epd->bmAttributes & 0x03;
1399 ep->max_pkt_size = le16_to_cpu(epd->wMaxPacketSize);
1400 spin_lock_init(&ep->lock);
1401 ep->desc = epd;
1402 ep->reg = &ep_reg[ep->address];
1403 }
1404
1405 /*
1406 * initialize the full config descriptor
1407 */
1408 usbdev.full_conf_desc = fcd = kmalloc(le16_to_cpu(config_desc->wTotalLength),
1409 ALLOC_FLAGS);
1410 if (!fcd) {
1411 err("failed to alloc full config descriptor");
1412 ret = -ENOMEM;
1413 goto out;
1414 }
1415
1416 memcpy(fcd, config_desc, USB_DT_CONFIG_SIZE);
1417 fcd += USB_DT_CONFIG_SIZE;
1418 memcpy(fcd, if_desc, USB_DT_INTERFACE_SIZE);
1419 fcd += USB_DT_INTERFACE_SIZE;
1420 for (i = 0; i < if_desc->bNumEndpoints; i++) {
1421 memcpy(fcd, &ep_desc[i], USB_DT_ENDPOINT_SIZE);
1422 fcd += USB_DT_ENDPOINT_SIZE;
1423 }
1424
1425 /* Now we're ready to enable the controller */
1426 au_writel(0x0002, USBD_ENABLE);
1427 udelay(100);
1428 au_writel(0x0003, USBD_ENABLE);
1429 udelay(100);
1430
1431 /* build and send config table based on ep descriptors */
1432 for (i = 0; i < 6; i++) {
1433 endpoint_t *ep;
1434 if (i == 1)
1435 continue; // skip dummy ep
1436 ep = &usbdev.ep[i];
1437 if (ep->active) {
1438 au_writel((ep->address << 4) | 0x04, USBD_CONFIG);
1439 au_writel(((ep->max_pkt_size & 0x380) >> 7) |
1440 (ep->direction >> 4) | (ep->type << 4),
1441 USBD_CONFIG);
1442 au_writel((ep->max_pkt_size & 0x7f) << 1, USBD_CONFIG);
1443 au_writel(0x00, USBD_CONFIG);
1444 au_writel(ep->address, USBD_CONFIG);
1445 } else {
1446 u8 dir = (i==2 || i==3) ? DIR_IN : DIR_OUT;
1447 au_writel((i << 4) | 0x04, USBD_CONFIG);
1448 au_writel(((16 & 0x380) >> 7) | dir |
1449 (BULK_EP << 4), USBD_CONFIG);
1450 au_writel((16 & 0x7f) << 1, USBD_CONFIG);
1451 au_writel(0x00, USBD_CONFIG);
1452 au_writel(i, USBD_CONFIG);
1453 }
1454 }
1455
1456 /*
1457 * Enable Receive FIFO Complete interrupts only. Transmit
1458 * complete is being handled by the DMA done interrupts.
1459 */
1460 au_writel(0x31, USBD_INTEN);
1461
1462 /*
1463 * Controller is now enabled, request DMA and IRQ
1464 * resources.
1465 */
1466
1467 /* request the USB device transfer complete interrupt */
1468 if (request_irq(AU1000_USB_DEV_REQ_INT, req_sus_intr, IRQF_DISABLED,
1469 "USBdev req", &usbdev)) {
1470 err("Can't get device request intr");
1471 ret = -ENXIO;
1472 goto out;
1473 }
1474 /* request the USB device suspend interrupt */
1475 if (request_irq(AU1000_USB_DEV_SUS_INT, req_sus_intr, IRQF_DISABLED,
1476 "USBdev sus", &usbdev)) {
1477 err("Can't get device suspend intr");
1478 ret = -ENXIO;
1479 goto out;
1480 }
1481
1482 /* Request EP0 DMA and IRQ */
1483 if ((ep0->indma = request_au1000_dma(ep_dma_id[0].id,
1484 ep_dma_id[0].str,
1485 dma_done_ep0_intr,
1486 IRQF_DISABLED,
1487 &usbdev)) < 0) {
1488 err("Can't get %s DMA", ep_dma_id[0].str);
1489 ret = -ENXIO;
1490 goto out;
1491 }
1492 if ((ep0->outdma = request_au1000_dma(ep_dma_id[1].id,
1493 ep_dma_id[1].str,
1494 NULL, 0, NULL)) < 0) {
1495 err("Can't get %s DMA", ep_dma_id[1].str);
1496 ret = -ENXIO;
1497 goto out;
1498 }
1499
1500 // Flush the ep0 buffers and FIFOs
1501 endpoint_flush(ep0);
1502 // start packet reception on ep0
1503 kickstart_receive_packet(ep0);
1504
1505 /* Request DMA and IRQ for the other endpoints */
1506 for (i = 2; i < 6; i++) {
1507 endpoint_t *ep = &usbdev.ep[i];
1508 if (!ep->active)
1509 continue;
1510
1511 // Flush the endpoint buffers and FIFOs
1512 endpoint_flush(ep);
1513
1514 if (ep->direction == USB_DIR_IN) {
1515 ep->indma =
1516 request_au1000_dma(ep_dma_id[ep->address].id,
1517 ep_dma_id[ep->address].str,
1518 dma_done_ep_intr,
1519 IRQF_DISABLED,
1520 &usbdev);
1521 if (ep->indma < 0) {
1522 err("Can't get %s DMA",
1523 ep_dma_id[ep->address].str);
1524 ret = -ENXIO;
1525 goto out;
1526 }
1527 } else {
1528 ep->outdma =
1529 request_au1000_dma(ep_dma_id[ep->address].id,
1530 ep_dma_id[ep->address].str,
1531 NULL, 0, NULL);
1532 if (ep->outdma < 0) {
1533 err("Can't get %s DMA",
1534 ep_dma_id[ep->address].str);
1535 ret = -ENXIO;
1536 goto out;
1537 }
1538
1539 // start packet reception on OUT endpoint
1540 kickstart_receive_packet(ep);
1541 }
1542 }
1543
1544 out:
1545 if (ret)
1546 usbdev_exit();
1547 return ret;
1548}
1549
1550EXPORT_SYMBOL(usbdev_init);
1551EXPORT_SYMBOL(usbdev_exit);
1552EXPORT_SYMBOL(usbdev_alloc_packet);
1553EXPORT_SYMBOL(usbdev_receive_packet);
1554EXPORT_SYMBOL(usbdev_send_packet);
1555EXPORT_SYMBOL(usbdev_get_byte_count);
diff --git a/arch/mips/au1000/db1x00/board_setup.c b/arch/mips/au1000/db1x00/board_setup.c
index 7a79293f8527..8b08edb977be 100644
--- a/arch/mips/au1000/db1x00/board_setup.c
+++ b/arch/mips/au1000/db1x00/board_setup.c
@@ -58,11 +58,6 @@ void __init board_setup(void)
58 58
59 pin_func = 0; 59 pin_func = 0;
60 /* not valid for 1550 */ 60 /* not valid for 1550 */
61#ifdef CONFIG_AU1X00_USB_DEVICE
62 // 2nd USB port is USB device
63 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
64 au_writel(pin_func, SYS_PINFUNC);
65#endif
66 61
67#if defined(CONFIG_IRDA) && (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100)) 62#if defined(CONFIG_IRDA) && (defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1100))
68 /* set IRFIRSEL instead of GPIO15 */ 63 /* set IRFIRSEL instead of GPIO15 */
diff --git a/arch/mips/au1000/mtx-1/board_setup.c b/arch/mips/au1000/mtx-1/board_setup.c
index e917e54fc683..13f9bf5f91a6 100644
--- a/arch/mips/au1000/mtx-1/board_setup.c
+++ b/arch/mips/au1000/mtx-1/board_setup.c
@@ -51,15 +51,11 @@ void board_reset (void)
51 51
52void __init board_setup(void) 52void __init board_setup(void)
53{ 53{
54#if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 54#ifdef CONFIG_USB_OHCI
55#ifdef CONFIG_AU1X00_USB_DEVICE
56 // 2nd USB port is USB device
57 au_writel(au_readl(SYS_PINFUNC) & (u32)(~0x8000), SYS_PINFUNC);
58#endif
59 // enable USB power switch 55 // enable USB power switch
60 au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR ); 56 au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR );
61 au_writel( 0x100000, GPIO2_OUTPUT ); 57 au_writel( 0x100000, GPIO2_OUTPUT );
62#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 58#endif // defined (CONFIG_USB_OHCI)
63 59
64#ifdef CONFIG_PCI 60#ifdef CONFIG_PCI
65#if defined(__MIPSEB__) 61#if defined(__MIPSEB__)
diff --git a/arch/mips/au1000/pb1000/board_setup.c b/arch/mips/au1000/pb1000/board_setup.c
index 1cf18e16ab54..824cfafaff92 100644
--- a/arch/mips/au1000/pb1000/board_setup.c
+++ b/arch/mips/au1000/pb1000/board_setup.c
@@ -54,7 +54,7 @@ void __init board_setup(void)
54 au_writel(0, SYS_PINSTATERD); 54 au_writel(0, SYS_PINSTATERD);
55 udelay(100); 55 udelay(100);
56 56
57#if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 57#ifdef CONFIG_USB_OHCI
58 /* zero and disable FREQ2 */ 58 /* zero and disable FREQ2 */
59 sys_freqctrl = au_readl(SYS_FREQCTRL0); 59 sys_freqctrl = au_readl(SYS_FREQCTRL0);
60 sys_freqctrl &= ~0xFFF00000; 60 sys_freqctrl &= ~0xFFF00000;
@@ -105,22 +105,18 @@ void __init board_setup(void)
105#ifdef CONFIG_USB_OHCI 105#ifdef CONFIG_USB_OHCI
106 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10)); 106 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
107#endif 107#endif
108#ifdef CONFIG_AU1X00_USB_DEVICE
109 sys_clksrc |= ((4<<7) | (0<<6) | (0<<5));
110#endif
111 au_writel(sys_clksrc, SYS_CLKSRC); 108 au_writel(sys_clksrc, SYS_CLKSRC);
112 109
113 // configure pins GPIO[14:9] as GPIO 110 // configure pins GPIO[14:9] as GPIO
114 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8080); 111 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8080);
115 112
116#ifndef CONFIG_AU1X00_USB_DEVICE
117 // 2nd USB port is USB host 113 // 2nd USB port is USB host
118 pin_func |= 0x8000; 114 pin_func |= 0x8000;
119#endif 115
120 au_writel(pin_func, SYS_PINFUNC); 116 au_writel(pin_func, SYS_PINFUNC);
121 au_writel(0x2800, SYS_TRIOUTCLR); 117 au_writel(0x2800, SYS_TRIOUTCLR);
122 au_writel(0x0030, SYS_OUTPUTCLR); 118 au_writel(0x0030, SYS_OUTPUTCLR);
123#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 119#endif // defined (CONFIG_USB_OHCI)
124 120
125 // make gpio 15 an input (for interrupt line) 121 // make gpio 15 an input (for interrupt line)
126 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x100); 122 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x100);
diff --git a/arch/mips/au1000/pb1100/board_setup.c b/arch/mips/au1000/pb1100/board_setup.c
index db27b9331ff3..2d1533f116c0 100644
--- a/arch/mips/au1000/pb1100/board_setup.c
+++ b/arch/mips/au1000/pb1100/board_setup.c
@@ -55,7 +55,7 @@ void __init board_setup(void)
55 au_writel(0, SYS_PININPUTEN); 55 au_writel(0, SYS_PININPUTEN);
56 udelay(100); 56 udelay(100);
57 57
58#if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 58#ifdef CONFIG_USB_OHCI
59 // configure pins GPIO[14:9] as GPIO 59 // configure pins GPIO[14:9] as GPIO
60 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80); 60 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x80);
61 61
@@ -92,12 +92,10 @@ void __init board_setup(void)
92 92
93 // get USB Functionality pin state (device vs host drive pins) 93 // get USB Functionality pin state (device vs host drive pins)
94 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); 94 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
95#ifndef CONFIG_AU1X00_USB_DEVICE
96 // 2nd USB port is USB host 95 // 2nd USB port is USB host
97 pin_func |= 0x8000; 96 pin_func |= 0x8000;
98#endif
99 au_writel(pin_func, SYS_PINFUNC); 97 au_writel(pin_func, SYS_PINFUNC);
100#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 98#endif // defined (CONFIG_USB_OHCI)
101 99
102 /* Enable sys bus clock divider when IDLE state or no bus activity. */ 100 /* Enable sys bus clock divider when IDLE state or no bus activity. */
103 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); 101 au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL);
diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c
index f66779f0d4cd..91983ba407c4 100644
--- a/arch/mips/au1000/pb1200/irqmap.c
+++ b/arch/mips/au1000/pb1200/irqmap.c
@@ -65,7 +65,7 @@ int __initdata au1xxx_nr_irqs = ARRAY_SIZE(au1xxx_irq_map);
65 */ 65 */
66static volatile int pb1200_cascade_en=0; 66static volatile int pb1200_cascade_en=0;
67 67
68irqreturn_t pb1200_cascade_handler( int irq, void *dev_id, struct pt_regs *regs) 68irqreturn_t pb1200_cascade_handler( int irq, void *dev_id)
69{ 69{
70 unsigned short bisr = bcsr->int_status; 70 unsigned short bisr = bcsr->int_status;
71 int extirq_nr = 0; 71 int extirq_nr = 0;
@@ -76,8 +76,9 @@ irqreturn_t pb1200_cascade_handler( int irq, void *dev_id, struct pt_regs *regs)
76 { 76 {
77 extirq_nr = (PB1200_INT_BEGIN-1) + au_ffs(bisr); 77 extirq_nr = (PB1200_INT_BEGIN-1) + au_ffs(bisr);
78 /* Ack and dispatch IRQ */ 78 /* Ack and dispatch IRQ */
79 do_IRQ(extirq_nr,regs); 79 do_IRQ(extirq_nr);
80 } 80 }
81
81 return IRQ_RETVAL(1); 82 return IRQ_RETVAL(1);
82} 83}
83 84
diff --git a/arch/mips/au1000/pb1500/board_setup.c b/arch/mips/au1000/pb1500/board_setup.c
index 1a9a293de6ab..0ffdb4fd575b 100644
--- a/arch/mips/au1000/pb1500/board_setup.c
+++ b/arch/mips/au1000/pb1500/board_setup.c
@@ -56,7 +56,7 @@ void __init board_setup(void)
56 au_writel(0, SYS_PINSTATERD); 56 au_writel(0, SYS_PINSTATERD);
57 udelay(100); 57 udelay(100);
58 58
59#if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 59#ifdef CONFIG_USB_OHCI
60 60
61 /* GPIO201 is input for PCMCIA card detect */ 61 /* GPIO201 is input for PCMCIA card detect */
62 /* GPIO203 is input for PCMCIA interrupt request */ 62 /* GPIO203 is input for PCMCIA interrupt request */
@@ -88,19 +88,14 @@ void __init board_setup(void)
88#ifdef CONFIG_USB_OHCI 88#ifdef CONFIG_USB_OHCI
89 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10)); 89 sys_clksrc |= ((4<<12) | (0<<11) | (0<<10));
90#endif 90#endif
91#ifdef CONFIG_AU1X00_USB_DEVICE
92 sys_clksrc |= ((4<<7) | (0<<6) | (0<<5));
93#endif
94 au_writel(sys_clksrc, SYS_CLKSRC); 91 au_writel(sys_clksrc, SYS_CLKSRC);
95 92
96 93
97 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000); 94 pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
98#ifndef CONFIG_AU1X00_USB_DEVICE
99 // 2nd USB port is USB host 95 // 2nd USB port is USB host
100 pin_func |= 0x8000; 96 pin_func |= 0x8000;
101#endif
102 au_writel(pin_func, SYS_PINFUNC); 97 au_writel(pin_func, SYS_PINFUNC);
103#endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE) 98#endif // defined (CONFIG_USB_OHCI)
104 99
105 100
106 101
diff --git a/arch/mips/basler/excite/excite_dbg_io.c b/arch/mips/basler/excite/excite_dbg_io.c
index c04505afa47f..d289e3a868cf 100644
--- a/arch/mips/basler/excite/excite_dbg_io.c
+++ b/arch/mips/basler/excite/excite_dbg_io.c
@@ -112,7 +112,7 @@ int putDebugChar(int data)
112} 112}
113 113
114/* KGDB interrupt handler */ 114/* KGDB interrupt handler */
115asmlinkage void excite_kgdb_inthdl(struct pt_regs *regs) 115asmlinkage void excite_kgdb_inthdl(void)
116{ 116{
117 if (unlikely( 117 if (unlikely(
118 ((titan_readl(UAIIR) & 0x7) == 4) 118 ((titan_readl(UAIIR) & 0x7) == 4)
diff --git a/arch/mips/basler/excite/excite_iodev.c b/arch/mips/basler/excite/excite_iodev.c
index 10bbb8cfb964..6af0b21ebc32 100644
--- a/arch/mips/basler/excite/excite_iodev.c
+++ b/arch/mips/basler/excite/excite_iodev.c
@@ -38,7 +38,7 @@ static int iodev_open(struct inode *, struct file *);
38static int iodev_release(struct inode *, struct file *); 38static int iodev_release(struct inode *, struct file *);
39static ssize_t iodev_read(struct file *, char __user *, size_t s, loff_t *); 39static ssize_t iodev_read(struct file *, char __user *, size_t s, loff_t *);
40static unsigned int iodev_poll(struct file *, struct poll_table_struct *); 40static unsigned int iodev_poll(struct file *, struct poll_table_struct *);
41static irqreturn_t iodev_irqhdl(int, void *, struct pt_regs *); 41static irqreturn_t iodev_irqhdl(int, void *);
42 42
43 43
44 44
@@ -108,16 +108,12 @@ static int __exit iodev_remove(struct device *dev)
108 return misc_deregister(&miscdev); 108 return misc_deregister(&miscdev);
109} 109}
110 110
111
112
113static int iodev_open(struct inode *i, struct file *f) 111static int iodev_open(struct inode *i, struct file *f)
114{ 112{
115 return request_irq(iodev_irq, iodev_irqhdl, IRQF_DISABLED, 113 return request_irq(iodev_irq, iodev_irqhdl, IRQF_DISABLED,
116 iodev_name, &miscdev); 114 iodev_name, &miscdev);
117} 115}
118 116
119
120
121static int iodev_release(struct inode *i, struct file *f) 117static int iodev_release(struct inode *i, struct file *f)
122{ 118{
123 free_irq(iodev_irq, &miscdev); 119 free_irq(iodev_irq, &miscdev);
@@ -148,17 +144,13 @@ static unsigned int iodev_poll(struct file *f, struct poll_table_struct *p)
148 return POLLOUT | POLLWRNORM; 144 return POLLOUT | POLLWRNORM;
149} 145}
150 146
151 147static irqreturn_t iodev_irqhdl(int irq, void *ctxt)
152
153
154static irqreturn_t iodev_irqhdl(int irq, void *ctxt, struct pt_regs *regs)
155{ 148{
156 wake_up(&wq); 149 wake_up(&wq);
150
157 return IRQ_HANDLED; 151 return IRQ_HANDLED;
158} 152}
159 153
160
161
162static int __init iodev_init_module(void) 154static int __init iodev_init_module(void)
163{ 155{
164 return driver_register(&iodev_driver); 156 return driver_register(&iodev_driver);
diff --git a/arch/mips/basler/excite/excite_irq.c b/arch/mips/basler/excite/excite_irq.c
index 511ad8730f54..2e2061a286c5 100644
--- a/arch/mips/basler/excite/excite_irq.c
+++ b/arch/mips/basler/excite/excite_irq.c
@@ -56,7 +56,7 @@ void __init arch_init_irq(void)
56#endif 56#endif
57} 57}
58 58
59asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 59asmlinkage void plat_irq_dispatch(void)
60{ 60{
61 const u32 61 const u32
62 interrupts = read_c0_cause() >> 8, 62 interrupts = read_c0_cause() >> 8,
@@ -67,7 +67,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
67 67
68 /* process timer interrupt */ 68 /* process timer interrupt */
69 if (pending & (1 << TIMER_IRQ)) { 69 if (pending & (1 << TIMER_IRQ)) {
70 do_IRQ(TIMER_IRQ, regs); 70 do_IRQ(TIMER_IRQ);
71 return; 71 return;
72 } 72 }
73 73
@@ -80,7 +80,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
80#else 80#else
81 if (pending & (1 << USB_IRQ)) { 81 if (pending & (1 << USB_IRQ)) {
82#endif 82#endif
83 do_IRQ(USB_IRQ, regs); 83 do_IRQ(USB_IRQ);
84 return; 84 return;
85 } 85 }
86 86
@@ -91,9 +91,9 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
91 if ((pending & (1 << TITAN_IRQ)) && msgint) { 91 if ((pending & (1 << TITAN_IRQ)) && msgint) {
92 ocd_writel(msgint, INTP0Clear0 + (TITAN_MSGINT / 0x20 * 0x10)); 92 ocd_writel(msgint, INTP0Clear0 + (TITAN_MSGINT / 0x20 * 0x10));
93#if defined(CONFIG_KGDB) 93#if defined(CONFIG_KGDB)
94 excite_kgdb_inthdl(regs); 94 excite_kgdb_inthdl();
95#endif 95#endif
96 do_IRQ(TITAN_IRQ, regs); 96 do_IRQ(TITAN_IRQ);
97 return; 97 return;
98 } 98 }
99 99
@@ -102,7 +102,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
102 msgintmask = ocd_readl(INTP0Mask0 + (FPGA0_MSGINT / 0x20 * 0x10)); 102 msgintmask = ocd_readl(INTP0Mask0 + (FPGA0_MSGINT / 0x20 * 0x10));
103 msgint = msgintflags & msgintmask & (0x1 << (FPGA0_MSGINT % 0x20)); 103 msgint = msgintflags & msgintmask & (0x1 << (FPGA0_MSGINT % 0x20));
104 if ((pending & (1 << FPGA0_IRQ)) && msgint) { 104 if ((pending & (1 << FPGA0_IRQ)) && msgint) {
105 do_IRQ(FPGA0_IRQ, regs); 105 do_IRQ(FPGA0_IRQ);
106 return; 106 return;
107 } 107 }
108 108
@@ -111,7 +111,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
111 msgintmask = ocd_readl(INTP0Mask0 + (FPGA1_MSGINT / 0x20 * 0x10)); 111 msgintmask = ocd_readl(INTP0Mask0 + (FPGA1_MSGINT / 0x20 * 0x10));
112 msgint = msgintflags & msgintmask & (0x1 << (FPGA1_MSGINT % 0x20)); 112 msgint = msgintflags & msgintmask & (0x1 << (FPGA1_MSGINT % 0x20));
113 if ((pending & (1 << FPGA1_IRQ)) && msgint) { 113 if ((pending & (1 << FPGA1_IRQ)) && msgint) {
114 do_IRQ(FPGA1_IRQ, regs); 114 do_IRQ(FPGA1_IRQ);
115 return; 115 return;
116 } 116 }
117 117
@@ -120,10 +120,10 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
120 msgintmask = ocd_readl(INTP0Mask0 + (PHY_MSGINT / 0x20 * 0x10)); 120 msgintmask = ocd_readl(INTP0Mask0 + (PHY_MSGINT / 0x20 * 0x10));
121 msgint = msgintflags & msgintmask & (0x1 << (PHY_MSGINT % 0x20)); 121 msgint = msgintflags & msgintmask & (0x1 << (PHY_MSGINT % 0x20));
122 if ((pending & (1 << PHY_IRQ)) && msgint) { 122 if ((pending & (1 << PHY_IRQ)) && msgint) {
123 do_IRQ(PHY_IRQ, regs); 123 do_IRQ(PHY_IRQ);
124 return; 124 return;
125 } 125 }
126 126
127 /* Process spurious interrupts */ 127 /* Process spurious interrupts */
128 spurious_interrupt(regs); 128 spurious_interrupt();
129} 129}
diff --git a/arch/mips/cobalt/irq.c b/arch/mips/cobalt/irq.c
index 0b75f4fb7195..82e569d5b02c 100644
--- a/arch/mips/cobalt/irq.c
+++ b/arch/mips/cobalt/irq.c
@@ -16,7 +16,6 @@
16#include <asm/i8259.h> 16#include <asm/i8259.h>
17#include <asm/irq_cpu.h> 17#include <asm/irq_cpu.h>
18#include <asm/gt64120.h> 18#include <asm/gt64120.h>
19#include <asm/ptrace.h>
20 19
21#include <asm/mach-cobalt/cobalt.h> 20#include <asm/mach-cobalt/cobalt.h>
22 21
@@ -42,7 +41,7 @@
42 * 15 - IDE1 41 * 15 - IDE1
43 */ 42 */
44 43
45static inline void galileo_irq(struct pt_regs *regs) 44static inline void galileo_irq(void)
46{ 45{
47 unsigned int mask, pending, devfn; 46 unsigned int mask, pending, devfn;
48 47
@@ -52,7 +51,7 @@ static inline void galileo_irq(struct pt_regs *regs)
52 if (pending & GALILEO_INTR_T0EXP) { 51 if (pending & GALILEO_INTR_T0EXP) {
53 52
54 GALILEO_OUTL(~GALILEO_INTR_T0EXP, GT_INTRCAUSE_OFS); 53 GALILEO_OUTL(~GALILEO_INTR_T0EXP, GT_INTRCAUSE_OFS);
55 do_IRQ(COBALT_GALILEO_IRQ, regs); 54 do_IRQ(COBALT_GALILEO_IRQ);
56 55
57 } else if (pending & GALILEO_INTR_RETRY_CTR) { 56 } else if (pending & GALILEO_INTR_RETRY_CTR) {
58 57
@@ -68,44 +67,31 @@ static inline void galileo_irq(struct pt_regs *regs)
68 } 67 }
69} 68}
70 69
71static inline void via_pic_irq(struct pt_regs *regs) 70static inline void via_pic_irq(void)
72{ 71{
73 int irq; 72 int irq;
74 73
75 irq = i8259_irq(); 74 irq = i8259_irq();
76 if (irq >= 0) 75 if (irq >= 0)
77 do_IRQ(irq, regs); 76 do_IRQ(irq);
78} 77}
79 78
80asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 79asmlinkage void plat_irq_dispatch(void)
81{ 80{
82 unsigned pending; 81 unsigned pending = read_c0_status() & read_c0_cause();
83 82
84 pending = read_c0_status() & read_c0_cause(); 83 if (pending & CAUSEF_IP2) /* COBALT_GALILEO_IRQ (18) */
85 84 galileo_irq();
86 if (pending & CAUSEF_IP2) /* COBALT_GALILEO_IRQ (18) */ 85 else if (pending & CAUSEF_IP6) /* COBALT_VIA_IRQ (22) */
87 86 via_pic_irq();
88 galileo_irq(regs); 87 else if (pending & CAUSEF_IP3) /* COBALT_ETH0_IRQ (19) */
89 88 do_IRQ(COBALT_CPU_IRQ + 3);
90 else if (pending & CAUSEF_IP6) /* COBALT_VIA_IRQ (22) */ 89 else if (pending & CAUSEF_IP4) /* COBALT_ETH1_IRQ (20) */
91 90 do_IRQ(COBALT_CPU_IRQ + 4);
92 via_pic_irq(regs); 91 else if (pending & CAUSEF_IP5) /* COBALT_SERIAL_IRQ (21) */
93 92 do_IRQ(COBALT_CPU_IRQ + 5);
94 else if (pending & CAUSEF_IP3) /* COBALT_ETH0_IRQ (19) */ 93 else if (pending & CAUSEF_IP7) /* IRQ 23 */
95 94 do_IRQ(COBALT_CPU_IRQ + 7);
96 do_IRQ(COBALT_CPU_IRQ + 3, regs);
97
98 else if (pending & CAUSEF_IP4) /* COBALT_ETH1_IRQ (20) */
99
100 do_IRQ(COBALT_CPU_IRQ + 4, regs);
101
102 else if (pending & CAUSEF_IP5) /* COBALT_SERIAL_IRQ (21) */
103
104 do_IRQ(COBALT_CPU_IRQ + 5, regs);
105
106 else if (pending & CAUSEF_IP7) /* IRQ 23 */
107
108 do_IRQ(COBALT_CPU_IRQ + 7, regs);
109} 95}
110 96
111static struct irqaction irq_via = { 97static struct irqaction irq_via = {
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c
index 0b347cffc768..bf9dc72b9720 100644
--- a/arch/mips/cobalt/setup.c
+++ b/arch/mips/cobalt/setup.c
@@ -50,8 +50,8 @@ const char *get_system_type(void)
50 50
51void __init plat_timer_setup(struct irqaction *irq) 51void __init plat_timer_setup(struct irqaction *irq)
52{ 52{
53 /* Load timer value for 1KHz (TCLK is 50MHz) */ 53 /* Load timer value for HZ (TCLK is 50MHz) */
54 GALILEO_OUTL(50*1000*1000 / 1000, GT_TC0_OFS); 54 GALILEO_OUTL(50*1000*1000 / HZ, GT_TC0_OFS);
55 55
56 /* Enable timer */ 56 /* Enable timer */
57 GALILEO_OUTL(GALILEO_ENTC0 | GALILEO_SELTC0, GT_TC_CONTROL_OFS); 57 GALILEO_OUTL(GALILEO_ENTC0 | GALILEO_SELTC0, GT_TC_CONTROL_OFS);
diff --git a/arch/mips/configs/jazz_defconfig b/arch/mips/configs/jazz_defconfig
new file mode 100644
index 000000000000..382083ebea0a
--- /dev/null
+++ b/arch/mips/configs/jazz_defconfig
@@ -0,0 +1,1404 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.19-rc1
4# Sun Oct 8 19:03:07 2006
5#
6CONFIG_MIPS=y
7
8#
9# Machine selection
10#
11# CONFIG_MIPS_MTX1 is not set
12# CONFIG_MIPS_BOSPORUS is not set
13# CONFIG_MIPS_PB1000 is not set
14# CONFIG_MIPS_PB1100 is not set
15# CONFIG_MIPS_PB1500 is not set
16# CONFIG_MIPS_PB1550 is not set
17# CONFIG_MIPS_PB1200 is not set
18# CONFIG_MIPS_DB1000 is not set
19# CONFIG_MIPS_DB1100 is not set
20# CONFIG_MIPS_DB1500 is not set
21# CONFIG_MIPS_DB1550 is not set
22# CONFIG_MIPS_DB1200 is not set
23# CONFIG_MIPS_MIRAGE is not set
24# CONFIG_BASLER_EXCITE is not set
25# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set
28CONFIG_MACH_JAZZ=y
29# CONFIG_LASAT is not set
30# CONFIG_MIPS_ATLAS is not set
31# CONFIG_MIPS_MALTA is not set
32# CONFIG_MIPS_SEAD is not set
33# CONFIG_WR_PPMC is not set
34# CONFIG_MIPS_SIM is not set
35# CONFIG_MOMENCO_JAGUAR_ATX is not set
36# CONFIG_MOMENCO_OCELOT is not set
37# CONFIG_MOMENCO_OCELOT_3 is not set
38# CONFIG_MOMENCO_OCELOT_C is not set
39# CONFIG_MOMENCO_OCELOT_G is not set
40# CONFIG_MIPS_XXS1500 is not set
41# CONFIG_PNX8550_V2PCI is not set
42# CONFIG_PNX8550_JBS is not set
43# CONFIG_DDB5477 is not set
44# CONFIG_MACH_VR41XX is not set
45# CONFIG_PMC_YOSEMITE is not set
46# CONFIG_QEMU is not set
47# CONFIG_MARKEINS is not set
48# CONFIG_SGI_IP22 is not set
49# CONFIG_SGI_IP27 is not set
50# CONFIG_SGI_IP32 is not set
51# CONFIG_SIBYTE_BIGSUR is not set
52# CONFIG_SIBYTE_SWARM is not set
53# CONFIG_SIBYTE_SENTOSA is not set
54# CONFIG_SIBYTE_RHONE is not set
55# CONFIG_SIBYTE_CARMEL is not set
56# CONFIG_SIBYTE_PTSWARM is not set
57# CONFIG_SIBYTE_LITTLESUR is not set
58# CONFIG_SIBYTE_CRHINE is not set
59# CONFIG_SIBYTE_CRHONE is not set
60# CONFIG_SNI_RM200_PCI is not set
61# CONFIG_TOSHIBA_JMR3927 is not set
62# CONFIG_TOSHIBA_RBTX4927 is not set
63# CONFIG_TOSHIBA_RBTX4938 is not set
64# CONFIG_ACER_PICA_61 is not set
65# CONFIG_MIPS_MAGNUM_4000 is not set
66CONFIG_OLIVETTI_M700=y
67CONFIG_RWSEM_GENERIC_SPINLOCK=y
68CONFIG_GENERIC_FIND_NEXT_BIT=y
69CONFIG_GENERIC_HWEIGHT=y
70CONFIG_GENERIC_CALIBRATE_DELAY=y
71CONFIG_GENERIC_TIME=y
72CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
73CONFIG_ARC=y
74CONFIG_ARCH_MAY_HAVE_PC_FDC=y
75CONFIG_DMA_NONCOHERENT=y
76CONFIG_DMA_NEED_PCI_MAP_STATE=y
77CONFIG_GENERIC_ISA_DMA=y
78CONFIG_I8259=y
79# CONFIG_CPU_BIG_ENDIAN is not set
80CONFIG_CPU_LITTLE_ENDIAN=y
81CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
82CONFIG_ARC32=y
83CONFIG_MIPS_L1_CACHE_SHIFT=5
84CONFIG_ARC_MEMORY=y
85CONFIG_ARC_PROMLIB=y
86
87#
88# CPU selection
89#
90# CONFIG_CPU_MIPS32_R1 is not set
91# CONFIG_CPU_MIPS32_R2 is not set
92# CONFIG_CPU_MIPS64_R1 is not set
93# CONFIG_CPU_MIPS64_R2 is not set
94# CONFIG_CPU_R3000 is not set
95# CONFIG_CPU_TX39XX is not set
96# CONFIG_CPU_VR41XX is not set
97# CONFIG_CPU_R4300 is not set
98CONFIG_CPU_R4X00=y
99# CONFIG_CPU_TX49XX is not set
100# CONFIG_CPU_R5000 is not set
101# CONFIG_CPU_R5432 is not set
102# CONFIG_CPU_R6000 is not set
103# CONFIG_CPU_NEVADA is not set
104# CONFIG_CPU_R8000 is not set
105# CONFIG_CPU_R10000 is not set
106# CONFIG_CPU_RM7000 is not set
107# CONFIG_CPU_RM9000 is not set
108# CONFIG_CPU_SB1 is not set
109CONFIG_SYS_HAS_CPU_R4X00=y
110CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
111CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
112CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
113CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y
114
115#
116# Kernel type
117#
118CONFIG_32BIT=y
119# CONFIG_64BIT is not set
120CONFIG_PAGE_SIZE_4KB=y
121# CONFIG_PAGE_SIZE_8KB is not set
122# CONFIG_PAGE_SIZE_16KB is not set
123# CONFIG_PAGE_SIZE_64KB is not set
124CONFIG_MIPS_MT_DISABLED=y
125# CONFIG_MIPS_MT_SMP is not set
126# CONFIG_MIPS_MT_SMTC is not set
127# CONFIG_MIPS_VPE_LOADER is not set
128# CONFIG_64BIT_PHYS_ADDR is not set
129CONFIG_CPU_HAS_LLSC=y
130CONFIG_CPU_HAS_SYNC=y
131CONFIG_GENERIC_HARDIRQS=y
132CONFIG_GENERIC_IRQ_PROBE=y
133CONFIG_ARCH_FLATMEM_ENABLE=y
134CONFIG_SELECT_MEMORY_MODEL=y
135CONFIG_FLATMEM_MANUAL=y
136# CONFIG_DISCONTIGMEM_MANUAL is not set
137# CONFIG_SPARSEMEM_MANUAL is not set
138CONFIG_FLATMEM=y
139CONFIG_FLAT_NODE_MEM_MAP=y
140# CONFIG_SPARSEMEM_STATIC is not set
141CONFIG_SPLIT_PTLOCK_CPUS=4
142# CONFIG_RESOURCES_64BIT is not set
143# CONFIG_HZ_48 is not set
144CONFIG_HZ_100=y
145# CONFIG_HZ_128 is not set
146# CONFIG_HZ_250 is not set
147# CONFIG_HZ_256 is not set
148# CONFIG_HZ_1000 is not set
149# CONFIG_HZ_1024 is not set
150CONFIG_SYS_SUPPORTS_100HZ=y
151CONFIG_HZ=100
152# CONFIG_PREEMPT_NONE is not set
153CONFIG_PREEMPT_VOLUNTARY=y
154# CONFIG_PREEMPT is not set
155CONFIG_LOCKDEP_SUPPORT=y
156CONFIG_STACKTRACE_SUPPORT=y
157CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
158
159#
160# Code maturity level options
161#
162CONFIG_EXPERIMENTAL=y
163CONFIG_BROKEN_ON_SMP=y
164CONFIG_INIT_ENV_ARG_LIMIT=32
165
166#
167# General setup
168#
169CONFIG_LOCALVERSION=""
170CONFIG_LOCALVERSION_AUTO=y
171CONFIG_SWAP=y
172CONFIG_SYSVIPC=y
173# CONFIG_IPC_NS is not set
174CONFIG_POSIX_MQUEUE=y
175CONFIG_BSD_PROCESS_ACCT=y
176# CONFIG_BSD_PROCESS_ACCT_V3 is not set
177# CONFIG_TASKSTATS is not set
178# CONFIG_UTS_NS is not set
179# CONFIG_AUDIT is not set
180CONFIG_IKCONFIG=y
181CONFIG_IKCONFIG_PROC=y
182CONFIG_RELAY=y
183CONFIG_INITRAMFS_SOURCE=""
184# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
185CONFIG_SYSCTL=y
186CONFIG_EMBEDDED=y
187# CONFIG_SYSCTL_SYSCALL is not set
188CONFIG_KALLSYMS=y
189# CONFIG_KALLSYMS_EXTRA_PASS is not set
190CONFIG_HOTPLUG=y
191CONFIG_PRINTK=y
192CONFIG_BUG=y
193CONFIG_ELF_CORE=y
194CONFIG_BASE_FULL=y
195CONFIG_FUTEX=y
196CONFIG_EPOLL=y
197CONFIG_SHMEM=y
198CONFIG_SLAB=y
199CONFIG_VM_EVENT_COUNTERS=y
200CONFIG_RT_MUTEXES=y
201# CONFIG_TINY_SHMEM is not set
202CONFIG_BASE_SMALL=0
203# CONFIG_SLOB is not set
204
205#
206# Loadable module support
207#
208CONFIG_MODULES=y
209CONFIG_MODULE_UNLOAD=y
210# CONFIG_MODULE_FORCE_UNLOAD is not set
211CONFIG_MODVERSIONS=y
212# CONFIG_MODULE_SRCVERSION_ALL is not set
213CONFIG_KMOD=y
214
215#
216# Block layer
217#
218CONFIG_BLOCK=y
219# CONFIG_LBD is not set
220# CONFIG_BLK_DEV_IO_TRACE is not set
221# CONFIG_LSF is not set
222
223#
224# IO Schedulers
225#
226CONFIG_IOSCHED_NOOP=y
227CONFIG_IOSCHED_AS=y
228CONFIG_IOSCHED_DEADLINE=y
229CONFIG_IOSCHED_CFQ=y
230CONFIG_DEFAULT_AS=y
231# CONFIG_DEFAULT_DEADLINE is not set
232# CONFIG_DEFAULT_CFQ is not set
233# CONFIG_DEFAULT_NOOP is not set
234CONFIG_DEFAULT_IOSCHED="anticipatory"
235
236#
237# Bus options (PCI, PCMCIA, EISA, ISA, TC)
238#
239CONFIG_ISA=y
240CONFIG_MMU=y
241CONFIG_I8253=y
242
243#
244# PCCARD (PCMCIA/CardBus) support
245#
246# CONFIG_PCCARD is not set
247
248#
249# PCI Hotplug Support
250#
251
252#
253# Executable file formats
254#
255CONFIG_BINFMT_ELF=y
256CONFIG_BINFMT_MISC=m
257CONFIG_TRAD_SIGNALS=y
258
259#
260# Networking
261#
262CONFIG_NET=y
263
264#
265# Networking options
266#
267# CONFIG_NETDEBUG is not set
268CONFIG_PACKET=m
269CONFIG_PACKET_MMAP=y
270CONFIG_UNIX=y
271CONFIG_XFRM=y
272# CONFIG_XFRM_USER is not set
273# CONFIG_XFRM_SUB_POLICY is not set
274CONFIG_NET_KEY=m
275CONFIG_INET=y
276CONFIG_IP_MULTICAST=y
277# CONFIG_IP_ADVANCED_ROUTER is not set
278CONFIG_IP_FIB_HASH=y
279# CONFIG_IP_PNP is not set
280CONFIG_NET_IPIP=m
281CONFIG_NET_IPGRE=m
282CONFIG_NET_IPGRE_BROADCAST=y
283CONFIG_IP_MROUTE=y
284CONFIG_IP_PIMSM_V1=y
285CONFIG_IP_PIMSM_V2=y
286# CONFIG_ARPD is not set
287# CONFIG_SYN_COOKIES is not set
288# CONFIG_INET_AH is not set
289# CONFIG_INET_ESP is not set
290# CONFIG_INET_IPCOMP is not set
291# CONFIG_INET_XFRM_TUNNEL is not set
292CONFIG_INET_TUNNEL=m
293CONFIG_INET_XFRM_MODE_TRANSPORT=m
294CONFIG_INET_XFRM_MODE_TUNNEL=m
295CONFIG_INET_XFRM_MODE_BEET=y
296CONFIG_INET_DIAG=y
297CONFIG_INET_TCP_DIAG=y
298# CONFIG_TCP_CONG_ADVANCED is not set
299CONFIG_TCP_CONG_CUBIC=y
300CONFIG_DEFAULT_TCP_CONG="cubic"
301
302#
303# IP: Virtual Server Configuration
304#
305# CONFIG_IP_VS is not set
306CONFIG_IPV6=m
307CONFIG_IPV6_PRIVACY=y
308CONFIG_IPV6_ROUTER_PREF=y
309CONFIG_IPV6_ROUTE_INFO=y
310CONFIG_INET6_AH=m
311CONFIG_INET6_ESP=m
312CONFIG_INET6_IPCOMP=m
313# CONFIG_IPV6_MIP6 is not set
314CONFIG_INET6_XFRM_TUNNEL=m
315CONFIG_INET6_TUNNEL=m
316CONFIG_INET6_XFRM_MODE_TRANSPORT=m
317CONFIG_INET6_XFRM_MODE_TUNNEL=m
318CONFIG_INET6_XFRM_MODE_BEET=m
319# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
320CONFIG_IPV6_TUNNEL=m
321# CONFIG_IPV6_SUBTREES is not set
322# CONFIG_IPV6_MULTIPLE_TABLES is not set
323CONFIG_NETWORK_SECMARK=y
324CONFIG_NETFILTER=y
325# CONFIG_NETFILTER_DEBUG is not set
326CONFIG_BRIDGE_NETFILTER=y
327
328#
329# Core Netfilter Configuration
330#
331CONFIG_NETFILTER_NETLINK=m
332CONFIG_NETFILTER_NETLINK_QUEUE=m
333CONFIG_NETFILTER_NETLINK_LOG=m
334CONFIG_NETFILTER_XTABLES=m
335CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
336CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
337# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
338CONFIG_NETFILTER_XT_TARGET_MARK=m
339CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
340CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
341CONFIG_NETFILTER_XT_TARGET_SECMARK=m
342# CONFIG_NETFILTER_XT_TARGET_CONNSECMARK is not set
343CONFIG_NETFILTER_XT_MATCH_COMMENT=m
344CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
345CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
346CONFIG_NETFILTER_XT_MATCH_DCCP=m
347# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
348CONFIG_NETFILTER_XT_MATCH_ESP=m
349CONFIG_NETFILTER_XT_MATCH_HELPER=m
350CONFIG_NETFILTER_XT_MATCH_LENGTH=m
351CONFIG_NETFILTER_XT_MATCH_LIMIT=m
352CONFIG_NETFILTER_XT_MATCH_MAC=m
353CONFIG_NETFILTER_XT_MATCH_MARK=m
354CONFIG_NETFILTER_XT_MATCH_POLICY=m
355CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
356CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
357CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
358CONFIG_NETFILTER_XT_MATCH_QUOTA=m
359CONFIG_NETFILTER_XT_MATCH_REALM=m
360CONFIG_NETFILTER_XT_MATCH_SCTP=m
361CONFIG_NETFILTER_XT_MATCH_STATE=m
362CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
363CONFIG_NETFILTER_XT_MATCH_STRING=m
364CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
365
366#
367# IP: Netfilter Configuration
368#
369CONFIG_IP_NF_CONNTRACK=m
370# CONFIG_IP_NF_CT_ACCT is not set
371CONFIG_IP_NF_CONNTRACK_MARK=y
372CONFIG_IP_NF_CONNTRACK_SECMARK=y
373CONFIG_IP_NF_CONNTRACK_EVENTS=y
374CONFIG_IP_NF_CONNTRACK_NETLINK=m
375CONFIG_IP_NF_CT_PROTO_SCTP=m
376CONFIG_IP_NF_FTP=m
377CONFIG_IP_NF_IRC=m
378# CONFIG_IP_NF_NETBIOS_NS is not set
379CONFIG_IP_NF_TFTP=m
380CONFIG_IP_NF_AMANDA=m
381CONFIG_IP_NF_PPTP=m
382CONFIG_IP_NF_H323=m
383CONFIG_IP_NF_SIP=m
384CONFIG_IP_NF_QUEUE=m
385CONFIG_IP_NF_IPTABLES=m
386CONFIG_IP_NF_MATCH_IPRANGE=m
387CONFIG_IP_NF_MATCH_TOS=m
388CONFIG_IP_NF_MATCH_RECENT=m
389CONFIG_IP_NF_MATCH_ECN=m
390CONFIG_IP_NF_MATCH_AH=m
391CONFIG_IP_NF_MATCH_TTL=m
392CONFIG_IP_NF_MATCH_OWNER=m
393CONFIG_IP_NF_MATCH_ADDRTYPE=m
394CONFIG_IP_NF_MATCH_HASHLIMIT=m
395CONFIG_IP_NF_FILTER=m
396CONFIG_IP_NF_TARGET_REJECT=m
397CONFIG_IP_NF_TARGET_LOG=m
398CONFIG_IP_NF_TARGET_ULOG=m
399CONFIG_IP_NF_TARGET_TCPMSS=m
400CONFIG_IP_NF_NAT=m
401CONFIG_IP_NF_NAT_NEEDED=y
402CONFIG_IP_NF_TARGET_MASQUERADE=m
403CONFIG_IP_NF_TARGET_REDIRECT=m
404CONFIG_IP_NF_TARGET_NETMAP=m
405CONFIG_IP_NF_TARGET_SAME=m
406CONFIG_IP_NF_NAT_SNMP_BASIC=m
407CONFIG_IP_NF_NAT_IRC=m
408CONFIG_IP_NF_NAT_FTP=m
409CONFIG_IP_NF_NAT_TFTP=m
410CONFIG_IP_NF_NAT_AMANDA=m
411CONFIG_IP_NF_NAT_PPTP=m
412CONFIG_IP_NF_NAT_H323=m
413CONFIG_IP_NF_NAT_SIP=m
414CONFIG_IP_NF_MANGLE=m
415CONFIG_IP_NF_TARGET_TOS=m
416CONFIG_IP_NF_TARGET_ECN=m
417CONFIG_IP_NF_TARGET_TTL=m
418CONFIG_IP_NF_TARGET_CLUSTERIP=m
419CONFIG_IP_NF_RAW=m
420CONFIG_IP_NF_ARPTABLES=m
421CONFIG_IP_NF_ARPFILTER=m
422CONFIG_IP_NF_ARP_MANGLE=m
423
424#
425# IPv6: Netfilter Configuration (EXPERIMENTAL)
426#
427CONFIG_IP6_NF_QUEUE=m
428CONFIG_IP6_NF_IPTABLES=m
429CONFIG_IP6_NF_MATCH_RT=m
430CONFIG_IP6_NF_MATCH_OPTS=m
431CONFIG_IP6_NF_MATCH_FRAG=m
432CONFIG_IP6_NF_MATCH_HL=m
433CONFIG_IP6_NF_MATCH_OWNER=m
434CONFIG_IP6_NF_MATCH_IPV6HEADER=m
435CONFIG_IP6_NF_MATCH_AH=m
436CONFIG_IP6_NF_MATCH_EUI64=m
437CONFIG_IP6_NF_FILTER=m
438CONFIG_IP6_NF_TARGET_LOG=m
439CONFIG_IP6_NF_TARGET_REJECT=m
440CONFIG_IP6_NF_MANGLE=m
441CONFIG_IP6_NF_TARGET_HL=m
442CONFIG_IP6_NF_RAW=m
443
444#
445# DECnet: Netfilter Configuration
446#
447CONFIG_DECNET_NF_GRABULATOR=m
448
449#
450# Bridge: Netfilter Configuration
451#
452CONFIG_BRIDGE_NF_EBTABLES=m
453CONFIG_BRIDGE_EBT_BROUTE=m
454CONFIG_BRIDGE_EBT_T_FILTER=m
455CONFIG_BRIDGE_EBT_T_NAT=m
456CONFIG_BRIDGE_EBT_802_3=m
457CONFIG_BRIDGE_EBT_AMONG=m
458CONFIG_BRIDGE_EBT_ARP=m
459CONFIG_BRIDGE_EBT_IP=m
460CONFIG_BRIDGE_EBT_LIMIT=m
461CONFIG_BRIDGE_EBT_MARK=m
462CONFIG_BRIDGE_EBT_PKTTYPE=m
463CONFIG_BRIDGE_EBT_STP=m
464CONFIG_BRIDGE_EBT_VLAN=m
465CONFIG_BRIDGE_EBT_ARPREPLY=m
466CONFIG_BRIDGE_EBT_DNAT=m
467CONFIG_BRIDGE_EBT_MARK_T=m
468CONFIG_BRIDGE_EBT_REDIRECT=m
469CONFIG_BRIDGE_EBT_SNAT=m
470CONFIG_BRIDGE_EBT_LOG=m
471CONFIG_BRIDGE_EBT_ULOG=m
472
473#
474# DCCP Configuration (EXPERIMENTAL)
475#
476# CONFIG_IP_DCCP is not set
477
478#
479# SCTP Configuration (EXPERIMENTAL)
480#
481# CONFIG_IP_SCTP is not set
482
483#
484# TIPC Configuration (EXPERIMENTAL)
485#
486# CONFIG_TIPC is not set
487# CONFIG_ATM is not set
488CONFIG_BRIDGE=m
489# CONFIG_VLAN_8021Q is not set
490CONFIG_DECNET=m
491# CONFIG_DECNET_ROUTER is not set
492CONFIG_LLC=m
493# CONFIG_LLC2 is not set
494# CONFIG_IPX is not set
495# CONFIG_ATALK is not set
496# CONFIG_X25 is not set
497# CONFIG_LAPB is not set
498# CONFIG_ECONET is not set
499# CONFIG_WAN_ROUTER is not set
500
501#
502# QoS and/or fair queueing
503#
504CONFIG_NET_SCHED=y
505CONFIG_NET_SCH_CLK_JIFFIES=y
506# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
507# CONFIG_NET_SCH_CLK_CPU is not set
508
509#
510# Queueing/Scheduling
511#
512CONFIG_NET_SCH_CBQ=m
513CONFIG_NET_SCH_HTB=m
514CONFIG_NET_SCH_HFSC=m
515CONFIG_NET_SCH_PRIO=m
516CONFIG_NET_SCH_RED=m
517CONFIG_NET_SCH_SFQ=m
518CONFIG_NET_SCH_TEQL=m
519CONFIG_NET_SCH_TBF=m
520CONFIG_NET_SCH_GRED=m
521CONFIG_NET_SCH_DSMARK=m
522CONFIG_NET_SCH_NETEM=m
523CONFIG_NET_SCH_INGRESS=m
524
525#
526# Classification
527#
528CONFIG_NET_CLS=y
529CONFIG_NET_CLS_BASIC=m
530CONFIG_NET_CLS_TCINDEX=m
531CONFIG_NET_CLS_ROUTE4=m
532CONFIG_NET_CLS_ROUTE=y
533CONFIG_NET_CLS_FW=m
534CONFIG_NET_CLS_U32=m
535# CONFIG_CLS_U32_PERF is not set
536# CONFIG_CLS_U32_MARK is not set
537CONFIG_NET_CLS_RSVP=m
538CONFIG_NET_CLS_RSVP6=m
539# CONFIG_NET_EMATCH is not set
540# CONFIG_NET_CLS_ACT is not set
541CONFIG_NET_CLS_POLICE=y
542# CONFIG_NET_CLS_IND is not set
543CONFIG_NET_ESTIMATOR=y
544
545#
546# Network testing
547#
548# CONFIG_NET_PKTGEN is not set
549CONFIG_HAMRADIO=y
550
551#
552# Packet Radio protocols
553#
554CONFIG_AX25=m
555CONFIG_AX25_DAMA_SLAVE=y
556CONFIG_NETROM=m
557CONFIG_ROSE=m
558
559#
560# AX.25 network device drivers
561#
562CONFIG_MKISS=m
563CONFIG_6PACK=m
564CONFIG_BPQETHER=m
565# CONFIG_BAYCOM_SER_FDX is not set
566# CONFIG_BAYCOM_SER_HDX is not set
567# CONFIG_BAYCOM_PAR is not set
568# CONFIG_BAYCOM_EPP is not set
569# CONFIG_YAM is not set
570# CONFIG_IRDA is not set
571# CONFIG_BT is not set
572CONFIG_IEEE80211=m
573# CONFIG_IEEE80211_DEBUG is not set
574CONFIG_IEEE80211_CRYPT_WEP=m
575CONFIG_IEEE80211_CRYPT_CCMP=m
576CONFIG_IEEE80211_SOFTMAC=m
577# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
578CONFIG_WIRELESS_EXT=y
579
580#
581# Device Drivers
582#
583
584#
585# Generic Driver Options
586#
587CONFIG_STANDALONE=y
588CONFIG_PREVENT_FIRMWARE_BUILD=y
589CONFIG_FW_LOADER=y
590# CONFIG_SYS_HYPERVISOR is not set
591
592#
593# Connector - unified userspace <-> kernelspace linker
594#
595CONFIG_CONNECTOR=m
596
597#
598# Memory Technology Devices (MTD)
599#
600# CONFIG_MTD is not set
601
602#
603# Parallel port support
604#
605CONFIG_PARPORT=m
606CONFIG_PARPORT_PC=m
607# CONFIG_PARPORT_PC_FIFO is not set
608# CONFIG_PARPORT_PC_SUPERIO is not set
609# CONFIG_PARPORT_GSC is not set
610# CONFIG_PARPORT_AX88796 is not set
611CONFIG_PARPORT_1284=y
612
613#
614# Plug and Play support
615#
616# CONFIG_PNP is not set
617
618#
619# Block devices
620#
621CONFIG_BLK_DEV_FD=m
622CONFIG_PARIDE=m
623CONFIG_PARIDE_PARPORT=m
624
625#
626# Parallel IDE high-level drivers
627#
628CONFIG_PARIDE_PD=m
629CONFIG_PARIDE_PCD=m
630CONFIG_PARIDE_PF=m
631CONFIG_PARIDE_PT=m
632CONFIG_PARIDE_PG=m
633
634#
635# Parallel IDE protocol modules
636#
637CONFIG_PARIDE_ATEN=m
638CONFIG_PARIDE_BPCK=m
639CONFIG_PARIDE_BPCK6=m
640CONFIG_PARIDE_COMM=m
641CONFIG_PARIDE_DSTR=m
642CONFIG_PARIDE_FIT2=m
643CONFIG_PARIDE_FIT3=m
644CONFIG_PARIDE_EPAT=m
645# CONFIG_PARIDE_EPATC8 is not set
646CONFIG_PARIDE_EPIA=m
647CONFIG_PARIDE_FRIQ=m
648CONFIG_PARIDE_FRPW=m
649CONFIG_PARIDE_KBIC=m
650CONFIG_PARIDE_KTTI=m
651CONFIG_PARIDE_ON20=m
652CONFIG_PARIDE_ON26=m
653# CONFIG_BLK_DEV_COW_COMMON is not set
654CONFIG_BLK_DEV_LOOP=m
655CONFIG_BLK_DEV_CRYPTOLOOP=m
656CONFIG_BLK_DEV_NBD=m
657CONFIG_BLK_DEV_RAM=m
658CONFIG_BLK_DEV_RAM_COUNT=16
659CONFIG_BLK_DEV_RAM_SIZE=4096
660CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
661# CONFIG_BLK_DEV_INITRD is not set
662CONFIG_CDROM_PKTCDVD=m
663CONFIG_CDROM_PKTCDVD_BUFFERS=8
664# CONFIG_CDROM_PKTCDVD_WCACHE is not set
665CONFIG_ATA_OVER_ETH=m
666
667#
668# ATA/ATAPI/MFM/RLL support
669#
670# CONFIG_IDE is not set
671
672#
673# SCSI device support
674#
675CONFIG_RAID_ATTRS=m
676CONFIG_SCSI=y
677CONFIG_SCSI_NETLINK=y
678CONFIG_SCSI_PROC_FS=y
679
680#
681# SCSI support type (disk, tape, CD-ROM)
682#
683CONFIG_BLK_DEV_SD=y
684CONFIG_CHR_DEV_ST=m
685# CONFIG_CHR_DEV_OSST is not set
686CONFIG_BLK_DEV_SR=m
687CONFIG_BLK_DEV_SR_VENDOR=y
688# CONFIG_CHR_DEV_SG is not set
689# CONFIG_CHR_DEV_SCH is not set
690
691#
692# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
693#
694# CONFIG_SCSI_MULTI_LUN is not set
695CONFIG_SCSI_CONSTANTS=y
696# CONFIG_SCSI_LOGGING is not set
697
698#
699# SCSI Transports
700#
701CONFIG_SCSI_SPI_ATTRS=y
702CONFIG_SCSI_FC_ATTRS=y
703CONFIG_SCSI_ISCSI_ATTRS=m
704CONFIG_SCSI_SAS_ATTRS=m
705# CONFIG_SCSI_SAS_LIBSAS is not set
706
707#
708# SCSI low-level drivers
709#
710CONFIG_ISCSI_TCP=m
711# CONFIG_SCSI_AHA152X is not set
712# CONFIG_SCSI_AIC7XXX_OLD is not set
713# CONFIG_SCSI_IN2000 is not set
714# CONFIG_SCSI_DTC3280 is not set
715# CONFIG_SCSI_FUTURE_DOMAIN is not set
716# CONFIG_SCSI_GENERIC_NCR5380 is not set
717# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
718CONFIG_SCSI_PPA=m
719CONFIG_SCSI_IMM=m
720# CONFIG_SCSI_IZIP_EPP16 is not set
721# CONFIG_SCSI_IZIP_SLOW_CTR is not set
722# CONFIG_SCSI_NCR53C406A is not set
723# CONFIG_SCSI_PAS16 is not set
724# CONFIG_SCSI_PSI240I is not set
725# CONFIG_SCSI_QLOGIC_FAS is not set
726# CONFIG_SCSI_SYM53C416 is not set
727# CONFIG_SCSI_T128 is not set
728# CONFIG_SCSI_DEBUG is not set
729CONFIG_JAZZ_ESP=y
730
731#
732# Serial ATA (prod) and Parallel ATA (experimental) drivers
733#
734# CONFIG_ATA is not set
735
736#
737# Old CD-ROM drivers (not SCSI, not IDE)
738#
739# CONFIG_CD_NO_IDESCSI is not set
740
741#
742# Multi-device support (RAID and LVM)
743#
744CONFIG_MD=y
745CONFIG_BLK_DEV_MD=m
746CONFIG_MD_LINEAR=m
747CONFIG_MD_RAID0=m
748CONFIG_MD_RAID1=m
749CONFIG_MD_RAID10=m
750CONFIG_MD_RAID456=m
751CONFIG_MD_RAID5_RESHAPE=y
752CONFIG_MD_MULTIPATH=m
753CONFIG_MD_FAULTY=m
754CONFIG_BLK_DEV_DM=m
755# CONFIG_DM_DEBUG is not set
756# CONFIG_DM_CRYPT is not set
757CONFIG_DM_SNAPSHOT=m
758CONFIG_DM_MIRROR=m
759CONFIG_DM_ZERO=m
760CONFIG_DM_MULTIPATH=m
761CONFIG_DM_MULTIPATH_EMC=m
762
763#
764# Fusion MPT device support
765#
766# CONFIG_FUSION is not set
767
768#
769# IEEE 1394 (FireWire) support
770#
771
772#
773# I2O device support
774#
775
776#
777# Network device support
778#
779CONFIG_NETDEVICES=y
780CONFIG_DUMMY=m
781CONFIG_BONDING=m
782CONFIG_EQUALIZER=m
783CONFIG_TUN=m
784
785#
786# ARCnet devices
787#
788# CONFIG_ARCNET is not set
789
790#
791# PHY device support
792#
793CONFIG_PHYLIB=m
794
795#
796# MII PHY device drivers
797#
798CONFIG_MARVELL_PHY=m
799CONFIG_DAVICOM_PHY=m
800CONFIG_QSEMI_PHY=m
801CONFIG_LXT_PHY=m
802CONFIG_CICADA_PHY=m
803CONFIG_VITESSE_PHY=m
804CONFIG_SMSC_PHY=m
805# CONFIG_FIXED_PHY is not set
806
807#
808# Ethernet (10 or 100Mbit)
809#
810CONFIG_NET_ETHERNET=y
811CONFIG_MII=y
812CONFIG_MIPS_JAZZ_SONIC=y
813# CONFIG_NET_VENDOR_3COM is not set
814# CONFIG_NET_VENDOR_SMC is not set
815# CONFIG_DM9000 is not set
816# CONFIG_NET_VENDOR_RACAL is not set
817# CONFIG_AT1700 is not set
818# CONFIG_DEPCA is not set
819# CONFIG_HP100 is not set
820CONFIG_NET_ISA=y
821# CONFIG_E2100 is not set
822# CONFIG_EWRK3 is not set
823# CONFIG_EEXPRESS is not set
824# CONFIG_EEXPRESS_PRO is not set
825# CONFIG_HPLAN_PLUS is not set
826# CONFIG_HPLAN is not set
827# CONFIG_LP486E is not set
828# CONFIG_ETH16I is not set
829CONFIG_NE2000=m
830# CONFIG_SEEQ8005 is not set
831CONFIG_NET_PCI=y
832# CONFIG_AC3200 is not set
833# CONFIG_APRICOT is not set
834# CONFIG_CS89x0 is not set
835# CONFIG_LAN_SAA9730 is not set
836# CONFIG_NET_POCKET is not set
837
838#
839# Ethernet (1000 Mbit)
840#
841
842#
843# Ethernet (10000 Mbit)
844#
845
846#
847# Token Ring devices
848#
849# CONFIG_TR is not set
850
851#
852# Wireless LAN (non-hamradio)
853#
854# CONFIG_NET_RADIO is not set
855
856#
857# Wan interfaces
858#
859# CONFIG_WAN is not set
860CONFIG_PLIP=m
861# CONFIG_PPP is not set
862# CONFIG_SLIP is not set
863# CONFIG_SHAPER is not set
864# CONFIG_NETCONSOLE is not set
865# CONFIG_NETPOLL is not set
866# CONFIG_NET_POLL_CONTROLLER is not set
867
868#
869# ISDN subsystem
870#
871# CONFIG_ISDN is not set
872
873#
874# Telephony Support
875#
876# CONFIG_PHONE is not set
877
878#
879# Input device support
880#
881CONFIG_INPUT=y
882CONFIG_INPUT_FF_MEMLESS=m
883
884#
885# Userland interfaces
886#
887CONFIG_INPUT_MOUSEDEV=y
888CONFIG_INPUT_MOUSEDEV_PSAUX=y
889CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
890CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
891# CONFIG_INPUT_JOYDEV is not set
892# CONFIG_INPUT_TSDEV is not set
893# CONFIG_INPUT_EVDEV is not set
894# CONFIG_INPUT_EVBUG is not set
895
896#
897# Input Device Drivers
898#
899CONFIG_INPUT_KEYBOARD=y
900CONFIG_KEYBOARD_ATKBD=y
901# CONFIG_KEYBOARD_SUNKBD is not set
902# CONFIG_KEYBOARD_LKKBD is not set
903# CONFIG_KEYBOARD_XTKBD is not set
904# CONFIG_KEYBOARD_NEWTON is not set
905# CONFIG_KEYBOARD_STOWAWAY is not set
906CONFIG_INPUT_MOUSE=y
907CONFIG_MOUSE_PS2=y
908# CONFIG_MOUSE_SERIAL is not set
909# CONFIG_MOUSE_INPORT is not set
910# CONFIG_MOUSE_LOGIBM is not set
911# CONFIG_MOUSE_PC110PAD is not set
912# CONFIG_MOUSE_VSXXXAA is not set
913# CONFIG_INPUT_JOYSTICK is not set
914# CONFIG_INPUT_TOUCHSCREEN is not set
915# CONFIG_INPUT_MISC is not set
916
917#
918# Hardware I/O ports
919#
920CONFIG_SERIO=y
921CONFIG_SERIO_I8042=y
922CONFIG_SERIO_SERPORT=y
923CONFIG_SERIO_PARKBD=m
924CONFIG_SERIO_LIBPS2=y
925CONFIG_SERIO_RAW=m
926# CONFIG_GAMEPORT is not set
927
928#
929# Character devices
930#
931CONFIG_VT=y
932CONFIG_VT_CONSOLE=y
933CONFIG_HW_CONSOLE=y
934CONFIG_VT_HW_CONSOLE_BINDING=y
935# CONFIG_SERIAL_NONSTANDARD is not set
936
937#
938# Serial drivers
939#
940CONFIG_SERIAL_8250=m
941CONFIG_SERIAL_8250_NR_UARTS=4
942CONFIG_SERIAL_8250_RUNTIME_UARTS=4
943CONFIG_SERIAL_8250_EXTENDED=y
944# CONFIG_SERIAL_8250_MANY_PORTS is not set
945CONFIG_SERIAL_8250_SHARE_IRQ=y
946CONFIG_SERIAL_8250_DETECT_IRQ=y
947CONFIG_SERIAL_8250_RSA=y
948
949#
950# Non-8250 serial port support
951#
952CONFIG_SERIAL_CORE=m
953CONFIG_UNIX98_PTYS=y
954CONFIG_LEGACY_PTYS=y
955CONFIG_LEGACY_PTY_COUNT=256
956CONFIG_PRINTER=m
957# CONFIG_LP_CONSOLE is not set
958CONFIG_PPDEV=m
959CONFIG_TIPAR=m
960
961#
962# IPMI
963#
964# CONFIG_IPMI_HANDLER is not set
965
966#
967# Watchdog Cards
968#
969# CONFIG_WATCHDOG is not set
970# CONFIG_HW_RANDOM is not set
971CONFIG_RTC=m
972# CONFIG_GEN_RTC is not set
973# CONFIG_DTLK is not set
974# CONFIG_R3964 is not set
975
976#
977# Ftape, the floppy tape device driver
978#
979# CONFIG_RAW_DRIVER is not set
980
981#
982# TPM devices
983#
984# CONFIG_TCG_TPM is not set
985# CONFIG_TELCLOCK is not set
986
987#
988# I2C support
989#
990# CONFIG_I2C is not set
991
992#
993# SPI support
994#
995# CONFIG_SPI is not set
996# CONFIG_SPI_MASTER is not set
997
998#
999# Dallas's 1-wire bus
1000#
1001CONFIG_W1=m
1002CONFIG_W1_CON=y
1003
1004#
1005# 1-wire Bus Masters
1006#
1007
1008#
1009# 1-wire Slaves
1010#
1011# CONFIG_W1_SLAVE_THERM is not set
1012# CONFIG_W1_SLAVE_SMEM is not set
1013# CONFIG_W1_SLAVE_DS2433 is not set
1014
1015#
1016# Hardware Monitoring support
1017#
1018# CONFIG_HWMON is not set
1019# CONFIG_HWMON_VID is not set
1020
1021#
1022# Misc devices
1023#
1024# CONFIG_TIFM_CORE is not set
1025
1026#
1027# Multimedia devices
1028#
1029# CONFIG_VIDEO_DEV is not set
1030
1031#
1032# Digital Video Broadcasting Devices
1033#
1034# CONFIG_DVB is not set
1035
1036#
1037# Graphics support
1038#
1039# CONFIG_FIRMWARE_EDID is not set
1040# CONFIG_FB is not set
1041
1042#
1043# Console display driver support
1044#
1045CONFIG_VGA_CONSOLE=y
1046# CONFIG_VGACON_SOFT_SCROLLBACK is not set
1047# CONFIG_MDA_CONSOLE is not set
1048CONFIG_DUMMY_CONSOLE=y
1049# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1050
1051#
1052# Sound
1053#
1054# CONFIG_SOUND is not set
1055
1056#
1057# USB support
1058#
1059# CONFIG_USB_ARCH_HAS_HCD is not set
1060# CONFIG_USB_ARCH_HAS_OHCI is not set
1061# CONFIG_USB_ARCH_HAS_EHCI is not set
1062
1063#
1064# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1065#
1066
1067#
1068# USB Gadget Support
1069#
1070# CONFIG_USB_GADGET is not set
1071
1072#
1073# MMC/SD Card support
1074#
1075# CONFIG_MMC is not set
1076
1077#
1078# LED devices
1079#
1080# CONFIG_NEW_LEDS is not set
1081
1082#
1083# LED drivers
1084#
1085
1086#
1087# LED Triggers
1088#
1089
1090#
1091# InfiniBand support
1092#
1093
1094#
1095# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1096#
1097
1098#
1099# Real Time Clock
1100#
1101# CONFIG_RTC_CLASS is not set
1102
1103#
1104# DMA Engine support
1105#
1106# CONFIG_DMA_ENGINE is not set
1107
1108#
1109# DMA Clients
1110#
1111
1112#
1113# DMA Devices
1114#
1115
1116#
1117# File systems
1118#
1119CONFIG_EXT2_FS=m
1120# CONFIG_EXT2_FS_XATTR is not set
1121# CONFIG_EXT2_FS_XIP is not set
1122CONFIG_EXT3_FS=y
1123CONFIG_EXT3_FS_XATTR=y
1124# CONFIG_EXT3_FS_POSIX_ACL is not set
1125# CONFIG_EXT3_FS_SECURITY is not set
1126CONFIG_JBD=y
1127# CONFIG_JBD_DEBUG is not set
1128CONFIG_FS_MBCACHE=y
1129CONFIG_REISERFS_FS=m
1130# CONFIG_REISERFS_CHECK is not set
1131# CONFIG_REISERFS_PROC_INFO is not set
1132CONFIG_REISERFS_FS_XATTR=y
1133CONFIG_REISERFS_FS_POSIX_ACL=y
1134CONFIG_REISERFS_FS_SECURITY=y
1135# CONFIG_JFS_FS is not set
1136CONFIG_FS_POSIX_ACL=y
1137CONFIG_XFS_FS=m
1138CONFIG_XFS_QUOTA=y
1139CONFIG_XFS_SECURITY=y
1140# CONFIG_XFS_POSIX_ACL is not set
1141# CONFIG_XFS_RT is not set
1142# CONFIG_GFS2_FS is not set
1143# CONFIG_OCFS2_FS is not set
1144CONFIG_MINIX_FS=m
1145CONFIG_ROMFS_FS=m
1146CONFIG_INOTIFY=y
1147CONFIG_INOTIFY_USER=y
1148# CONFIG_QUOTA is not set
1149CONFIG_QUOTACTL=y
1150CONFIG_DNOTIFY=y
1151CONFIG_AUTOFS_FS=m
1152CONFIG_AUTOFS4_FS=m
1153CONFIG_FUSE_FS=m
1154
1155#
1156# CD-ROM/DVD Filesystems
1157#
1158CONFIG_ISO9660_FS=m
1159CONFIG_JOLIET=y
1160CONFIG_ZISOFS=y
1161CONFIG_ZISOFS_FS=m
1162CONFIG_UDF_FS=m
1163CONFIG_UDF_NLS=y
1164
1165#
1166# DOS/FAT/NT Filesystems
1167#
1168CONFIG_FAT_FS=m
1169CONFIG_MSDOS_FS=m
1170CONFIG_VFAT_FS=m
1171CONFIG_FAT_DEFAULT_CODEPAGE=437
1172CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1173CONFIG_NTFS_FS=m
1174# CONFIG_NTFS_DEBUG is not set
1175# CONFIG_NTFS_RW is not set
1176
1177#
1178# Pseudo filesystems
1179#
1180CONFIG_PROC_FS=y
1181CONFIG_PROC_KCORE=y
1182CONFIG_PROC_SYSCTL=y
1183CONFIG_SYSFS=y
1184CONFIG_TMPFS=y
1185# CONFIG_TMPFS_POSIX_ACL is not set
1186# CONFIG_HUGETLB_PAGE is not set
1187CONFIG_RAMFS=y
1188# CONFIG_CONFIGFS_FS is not set
1189
1190#
1191# Miscellaneous filesystems
1192#
1193CONFIG_ADFS_FS=m
1194# CONFIG_ADFS_FS_RW is not set
1195CONFIG_AFFS_FS=m
1196# CONFIG_ECRYPT_FS is not set
1197CONFIG_HFS_FS=m
1198# CONFIG_HFSPLUS_FS is not set
1199CONFIG_BEFS_FS=m
1200# CONFIG_BEFS_DEBUG is not set
1201CONFIG_BFS_FS=m
1202CONFIG_EFS_FS=m
1203CONFIG_CRAMFS=m
1204CONFIG_VXFS_FS=m
1205CONFIG_HPFS_FS=m
1206CONFIG_QNX4FS_FS=m
1207CONFIG_SYSV_FS=m
1208CONFIG_UFS_FS=m
1209# CONFIG_UFS_FS_WRITE is not set
1210# CONFIG_UFS_DEBUG is not set
1211
1212#
1213# Network File Systems
1214#
1215CONFIG_NFS_FS=m
1216CONFIG_NFS_V3=y
1217# CONFIG_NFS_V3_ACL is not set
1218# CONFIG_NFS_V4 is not set
1219# CONFIG_NFS_DIRECTIO is not set
1220CONFIG_NFSD=m
1221CONFIG_NFSD_V3=y
1222# CONFIG_NFSD_V3_ACL is not set
1223# CONFIG_NFSD_V4 is not set
1224CONFIG_NFSD_TCP=y
1225CONFIG_LOCKD=m
1226CONFIG_LOCKD_V4=y
1227CONFIG_EXPORTFS=m
1228CONFIG_NFS_COMMON=y
1229CONFIG_SUNRPC=m
1230CONFIG_SUNRPC_GSS=m
1231CONFIG_RPCSEC_GSS_KRB5=m
1232CONFIG_RPCSEC_GSS_SPKM3=m
1233CONFIG_SMB_FS=m
1234# CONFIG_SMB_NLS_DEFAULT is not set
1235CONFIG_CIFS=m
1236# CONFIG_CIFS_STATS is not set
1237# CONFIG_CIFS_WEAK_PW_HASH is not set
1238# CONFIG_CIFS_XATTR is not set
1239# CONFIG_CIFS_DEBUG2 is not set
1240# CONFIG_CIFS_EXPERIMENTAL is not set
1241CONFIG_NCP_FS=m
1242CONFIG_NCPFS_PACKET_SIGNING=y
1243CONFIG_NCPFS_IOCTL_LOCKING=y
1244CONFIG_NCPFS_STRONG=y
1245CONFIG_NCPFS_NFS_NS=y
1246CONFIG_NCPFS_OS2_NS=y
1247CONFIG_NCPFS_SMALLDOS=y
1248CONFIG_NCPFS_NLS=y
1249CONFIG_NCPFS_EXTRAS=y
1250CONFIG_CODA_FS=m
1251CONFIG_CODA_FS_OLD_API=y
1252CONFIG_AFS_FS=m
1253CONFIG_RXRPC=m
1254# CONFIG_9P_FS is not set
1255
1256#
1257# Partition Types
1258#
1259CONFIG_PARTITION_ADVANCED=y
1260# CONFIG_ACORN_PARTITION is not set
1261# CONFIG_OSF_PARTITION is not set
1262# CONFIG_AMIGA_PARTITION is not set
1263# CONFIG_ATARI_PARTITION is not set
1264# CONFIG_MAC_PARTITION is not set
1265CONFIG_MSDOS_PARTITION=y
1266# CONFIG_BSD_DISKLABEL is not set
1267# CONFIG_MINIX_SUBPARTITION is not set
1268# CONFIG_SOLARIS_X86_PARTITION is not set
1269# CONFIG_UNIXWARE_DISKLABEL is not set
1270# CONFIG_LDM_PARTITION is not set
1271# CONFIG_SGI_PARTITION is not set
1272# CONFIG_ULTRIX_PARTITION is not set
1273# CONFIG_SUN_PARTITION is not set
1274# CONFIG_KARMA_PARTITION is not set
1275# CONFIG_EFI_PARTITION is not set
1276
1277#
1278# Native Language Support
1279#
1280CONFIG_NLS=m
1281CONFIG_NLS_DEFAULT="iso8859-1"
1282CONFIG_NLS_CODEPAGE_437=m
1283CONFIG_NLS_CODEPAGE_737=m
1284CONFIG_NLS_CODEPAGE_775=m
1285CONFIG_NLS_CODEPAGE_850=m
1286CONFIG_NLS_CODEPAGE_852=m
1287CONFIG_NLS_CODEPAGE_855=m
1288CONFIG_NLS_CODEPAGE_857=m
1289CONFIG_NLS_CODEPAGE_860=m
1290CONFIG_NLS_CODEPAGE_861=m
1291CONFIG_NLS_CODEPAGE_862=m
1292CONFIG_NLS_CODEPAGE_863=m
1293CONFIG_NLS_CODEPAGE_864=m
1294CONFIG_NLS_CODEPAGE_865=m
1295CONFIG_NLS_CODEPAGE_866=m
1296CONFIG_NLS_CODEPAGE_869=m
1297CONFIG_NLS_CODEPAGE_936=m
1298CONFIG_NLS_CODEPAGE_950=m
1299CONFIG_NLS_CODEPAGE_932=m
1300CONFIG_NLS_CODEPAGE_949=m
1301CONFIG_NLS_CODEPAGE_874=m
1302CONFIG_NLS_ISO8859_8=m
1303CONFIG_NLS_CODEPAGE_1250=m
1304CONFIG_NLS_CODEPAGE_1251=m
1305CONFIG_NLS_ASCII=m
1306CONFIG_NLS_ISO8859_1=m
1307CONFIG_NLS_ISO8859_2=m
1308CONFIG_NLS_ISO8859_3=m
1309CONFIG_NLS_ISO8859_4=m
1310CONFIG_NLS_ISO8859_5=m
1311CONFIG_NLS_ISO8859_6=m
1312CONFIG_NLS_ISO8859_7=m
1313CONFIG_NLS_ISO8859_9=m
1314CONFIG_NLS_ISO8859_13=m
1315CONFIG_NLS_ISO8859_14=m
1316CONFIG_NLS_ISO8859_15=m
1317CONFIG_NLS_KOI8_R=m
1318CONFIG_NLS_KOI8_U=m
1319CONFIG_NLS_UTF8=m
1320
1321#
1322# Distributed Lock Manager
1323#
1324
1325#
1326# Profiling support
1327#
1328# CONFIG_PROFILING is not set
1329
1330#
1331# Kernel hacking
1332#
1333CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1334# CONFIG_PRINTK_TIME is not set
1335CONFIG_ENABLE_MUST_CHECK=y
1336# CONFIG_MAGIC_SYSRQ is not set
1337# CONFIG_UNUSED_SYMBOLS is not set
1338# CONFIG_DEBUG_KERNEL is not set
1339CONFIG_LOG_BUF_SHIFT=14
1340# CONFIG_DEBUG_FS is not set
1341CONFIG_CROSSCOMPILE=y
1342CONFIG_CMDLINE=""
1343
1344#
1345# Security options
1346#
1347CONFIG_KEYS=y
1348CONFIG_KEYS_DEBUG_PROC_KEYS=y
1349# CONFIG_SECURITY is not set
1350
1351#
1352# Cryptographic options
1353#
1354CONFIG_CRYPTO=y
1355CONFIG_CRYPTO_ALGAPI=y
1356CONFIG_CRYPTO_BLKCIPHER=m
1357CONFIG_CRYPTO_HASH=y
1358CONFIG_CRYPTO_MANAGER=m
1359CONFIG_CRYPTO_HMAC=y
1360CONFIG_CRYPTO_NULL=m
1361CONFIG_CRYPTO_MD4=m
1362CONFIG_CRYPTO_MD5=m
1363CONFIG_CRYPTO_SHA1=m
1364CONFIG_CRYPTO_SHA256=m
1365CONFIG_CRYPTO_SHA512=m
1366CONFIG_CRYPTO_WP512=m
1367CONFIG_CRYPTO_TGR192=m
1368CONFIG_CRYPTO_ECB=m
1369CONFIG_CRYPTO_CBC=m
1370CONFIG_CRYPTO_DES=m
1371CONFIG_CRYPTO_BLOWFISH=m
1372CONFIG_CRYPTO_TWOFISH=m
1373CONFIG_CRYPTO_TWOFISH_COMMON=m
1374CONFIG_CRYPTO_SERPENT=m
1375CONFIG_CRYPTO_AES=m
1376CONFIG_CRYPTO_CAST5=m
1377CONFIG_CRYPTO_CAST6=m
1378CONFIG_CRYPTO_TEA=m
1379CONFIG_CRYPTO_ARC4=m
1380CONFIG_CRYPTO_KHAZAD=m
1381CONFIG_CRYPTO_ANUBIS=m
1382CONFIG_CRYPTO_DEFLATE=m
1383CONFIG_CRYPTO_MICHAEL_MIC=m
1384CONFIG_CRYPTO_CRC32C=m
1385# CONFIG_CRYPTO_TEST is not set
1386
1387#
1388# Hardware crypto devices
1389#
1390
1391#
1392# Library routines
1393#
1394CONFIG_CRC_CCITT=m
1395CONFIG_CRC16=m
1396CONFIG_CRC32=y
1397CONFIG_LIBCRC32C=m
1398CONFIG_ZLIB_INFLATE=m
1399CONFIG_ZLIB_DEFLATE=m
1400CONFIG_TEXTSEARCH=y
1401CONFIG_TEXTSEARCH_KMP=m
1402CONFIG_TEXTSEARCH_BM=m
1403CONFIG_TEXTSEARCH_FSM=m
1404CONFIG_PLIST=y
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index aeefe2873e38..101e80347dce 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.18-rc1 3# Linux kernel version: 2.6.19-rc1
4# Thu Jul 6 10:04:13 2006 4# Fri Oct 6 17:34:55 2006
5# 5#
6CONFIG_MIPS=y 6CONFIG_MIPS=y
7 7
@@ -25,8 +25,6 @@ CONFIG_MIPS=y
25# CONFIG_MIPS_COBALT is not set 25# CONFIG_MIPS_COBALT is not set
26# CONFIG_MACH_DECSTATION is not set 26# CONFIG_MACH_DECSTATION is not set
27# CONFIG_MIPS_EV64120 is not set 27# CONFIG_MIPS_EV64120 is not set
28# CONFIG_MIPS_IVR is not set
29# CONFIG_MIPS_ITE8172 is not set
30# CONFIG_MACH_JAZZ is not set 28# CONFIG_MACH_JAZZ is not set
31# CONFIG_LASAT is not set 29# CONFIG_LASAT is not set
32# CONFIG_MIPS_ATLAS is not set 30# CONFIG_MIPS_ATLAS is not set
@@ -67,6 +65,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
67CONFIG_GENERIC_FIND_NEXT_BIT=y 65CONFIG_GENERIC_FIND_NEXT_BIT=y
68CONFIG_GENERIC_HWEIGHT=y 66CONFIG_GENERIC_HWEIGHT=y
69CONFIG_GENERIC_CALIBRATE_DELAY=y 67CONFIG_GENERIC_CALIBRATE_DELAY=y
68CONFIG_GENERIC_TIME=y
70CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 69CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
71CONFIG_ARCH_MAY_HAVE_PC_FDC=y 70CONFIG_ARCH_MAY_HAVE_PC_FDC=y
72CONFIG_DMA_NONCOHERENT=y 71CONFIG_DMA_NONCOHERENT=y
@@ -134,19 +133,19 @@ CONFIG_MIPS_CPU_SCACHE=y
134CONFIG_CPU_HAS_PREFETCH=y 133CONFIG_CPU_HAS_PREFETCH=y
135# CONFIG_MIPS_MT_DISABLED is not set 134# CONFIG_MIPS_MT_DISABLED is not set
136# CONFIG_MIPS_MT_SMTC is not set 135# CONFIG_MIPS_MT_SMTC is not set
137# CONFIG_MIPS_MT_SMP is not set 136CONFIG_MIPS_MT_SMP=y
138CONFIG_MIPS_VPE_LOADER=y 137# CONFIG_MIPS_VPE_LOADER is not set
139CONFIG_MIPS_MT=y 138CONFIG_MIPS_MT=y
140CONFIG_SYS_SUPPORTS_MULTITHREADING=y 139CONFIG_SYS_SUPPORTS_MULTITHREADING=y
141CONFIG_MIPS_MT_FPAFF=y 140CONFIG_MIPS_MT_FPAFF=y
142CONFIG_MIPS_VPE_LOADER_TOM=y
143CONFIG_MIPS_VPE_APSP_API=y
144CONFIG_MIPS_APSP_KSPD=y
145# CONFIG_64BIT_PHYS_ADDR is not set 141# CONFIG_64BIT_PHYS_ADDR is not set
146CONFIG_CPU_HAS_LLSC=y 142CONFIG_CPU_HAS_LLSC=y
143CONFIG_CPU_MIPSR2_IRQ_VI=y
144CONFIG_CPU_MIPSR2_SRS=y
147CONFIG_CPU_HAS_SYNC=y 145CONFIG_CPU_HAS_SYNC=y
148CONFIG_GENERIC_HARDIRQS=y 146CONFIG_GENERIC_HARDIRQS=y
149CONFIG_GENERIC_IRQ_PROBE=y 147CONFIG_GENERIC_IRQ_PROBE=y
148CONFIG_IRQ_PER_CPU=y
150CONFIG_CPU_SUPPORTS_HIGHMEM=y 149CONFIG_CPU_SUPPORTS_HIGHMEM=y
151CONFIG_ARCH_FLATMEM_ENABLE=y 150CONFIG_ARCH_FLATMEM_ENABLE=y
152CONFIG_SELECT_MEMORY_MODEL=y 151CONFIG_SELECT_MEMORY_MODEL=y
@@ -158,6 +157,9 @@ CONFIG_FLAT_NODE_MEM_MAP=y
158# CONFIG_SPARSEMEM_STATIC is not set 157# CONFIG_SPARSEMEM_STATIC is not set
159CONFIG_SPLIT_PTLOCK_CPUS=4 158CONFIG_SPLIT_PTLOCK_CPUS=4
160# CONFIG_RESOURCES_64BIT is not set 159# CONFIG_RESOURCES_64BIT is not set
160CONFIG_SMP=y
161CONFIG_SYS_SUPPORTS_SMP=y
162CONFIG_NR_CPUS=2
161# CONFIG_HZ_48 is not set 163# CONFIG_HZ_48 is not set
162CONFIG_HZ_100=y 164CONFIG_HZ_100=y
163# CONFIG_HZ_128 is not set 165# CONFIG_HZ_128 is not set
@@ -170,6 +172,7 @@ CONFIG_HZ=100
170CONFIG_PREEMPT_NONE=y 172CONFIG_PREEMPT_NONE=y
171# CONFIG_PREEMPT_VOLUNTARY is not set 173# CONFIG_PREEMPT_VOLUNTARY is not set
172# CONFIG_PREEMPT is not set 174# CONFIG_PREEMPT is not set
175CONFIG_PREEMPT_BKL=y
173CONFIG_LOCKDEP_SUPPORT=y 176CONFIG_LOCKDEP_SUPPORT=y
174CONFIG_STACKTRACE_SUPPORT=y 177CONFIG_STACKTRACE_SUPPORT=y
175CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 178CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
@@ -178,7 +181,7 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
178# Code maturity level options 181# Code maturity level options
179# 182#
180CONFIG_EXPERIMENTAL=y 183CONFIG_EXPERIMENTAL=y
181CONFIG_BROKEN_ON_SMP=y 184CONFIG_LOCK_KERNEL=y
182CONFIG_INIT_ENV_ARG_LIMIT=32 185CONFIG_INIT_ENV_ARG_LIMIT=32
183 186
184# 187#
@@ -188,15 +191,20 @@ CONFIG_LOCALVERSION=""
188CONFIG_LOCALVERSION_AUTO=y 191CONFIG_LOCALVERSION_AUTO=y
189CONFIG_SWAP=y 192CONFIG_SWAP=y
190CONFIG_SYSVIPC=y 193CONFIG_SYSVIPC=y
194# CONFIG_IPC_NS is not set
191# CONFIG_POSIX_MQUEUE is not set 195# CONFIG_POSIX_MQUEUE is not set
192# CONFIG_BSD_PROCESS_ACCT is not set 196# CONFIG_BSD_PROCESS_ACCT is not set
193CONFIG_SYSCTL=y 197# CONFIG_TASKSTATS is not set
198# CONFIG_UTS_NS is not set
194# CONFIG_AUDIT is not set 199# CONFIG_AUDIT is not set
195# CONFIG_IKCONFIG is not set 200# CONFIG_IKCONFIG is not set
201# CONFIG_CPUSETS is not set
196CONFIG_RELAY=y 202CONFIG_RELAY=y
197CONFIG_INITRAMFS_SOURCE="" 203CONFIG_INITRAMFS_SOURCE=""
198# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 204# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
205CONFIG_SYSCTL=y
199CONFIG_EMBEDDED=y 206CONFIG_EMBEDDED=y
207# CONFIG_SYSCTL_SYSCALL is not set
200CONFIG_KALLSYMS=y 208CONFIG_KALLSYMS=y
201# CONFIG_KALLSYMS_EXTRA_PASS is not set 209# CONFIG_KALLSYMS_EXTRA_PASS is not set
202CONFIG_HOTPLUG=y 210CONFIG_HOTPLUG=y
@@ -204,12 +212,12 @@ CONFIG_PRINTK=y
204CONFIG_BUG=y 212CONFIG_BUG=y
205CONFIG_ELF_CORE=y 213CONFIG_ELF_CORE=y
206CONFIG_BASE_FULL=y 214CONFIG_BASE_FULL=y
207CONFIG_RT_MUTEXES=y
208CONFIG_FUTEX=y 215CONFIG_FUTEX=y
209CONFIG_EPOLL=y 216CONFIG_EPOLL=y
210CONFIG_SHMEM=y 217CONFIG_SHMEM=y
211CONFIG_SLAB=y 218CONFIG_SLAB=y
212CONFIG_VM_EVENT_COUNTERS=y 219CONFIG_VM_EVENT_COUNTERS=y
220CONFIG_RT_MUTEXES=y
213# CONFIG_TINY_SHMEM is not set 221# CONFIG_TINY_SHMEM is not set
214CONFIG_BASE_SMALL=0 222CONFIG_BASE_SMALL=0
215# CONFIG_SLOB is not set 223# CONFIG_SLOB is not set
@@ -223,10 +231,12 @@ CONFIG_MODULE_UNLOAD=y
223CONFIG_MODVERSIONS=y 231CONFIG_MODVERSIONS=y
224CONFIG_MODULE_SRCVERSION_ALL=y 232CONFIG_MODULE_SRCVERSION_ALL=y
225CONFIG_KMOD=y 233CONFIG_KMOD=y
234CONFIG_STOP_MACHINE=y
226 235
227# 236#
228# Block layer 237# Block layer
229# 238#
239CONFIG_BLOCK=y
230# CONFIG_LBD is not set 240# CONFIG_LBD is not set
231# CONFIG_BLK_DEV_IO_TRACE is not set 241# CONFIG_BLK_DEV_IO_TRACE is not set
232# CONFIG_LSF is not set 242# CONFIG_LSF is not set
@@ -249,6 +259,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
249# 259#
250CONFIG_HW_HAS_PCI=y 260CONFIG_HW_HAS_PCI=y
251CONFIG_PCI=y 261CONFIG_PCI=y
262# CONFIG_PCI_MULTITHREAD_PROBE is not set
252CONFIG_MMU=y 263CONFIG_MMU=y
253 264
254# 265#
@@ -282,6 +293,7 @@ CONFIG_PACKET_MMAP=y
282CONFIG_UNIX=y 293CONFIG_UNIX=y
283CONFIG_XFRM=y 294CONFIG_XFRM=y
284CONFIG_XFRM_USER=m 295CONFIG_XFRM_USER=m
296# CONFIG_XFRM_SUB_POLICY is not set
285CONFIG_NET_KEY=y 297CONFIG_NET_KEY=y
286CONFIG_INET=y 298CONFIG_INET=y
287CONFIG_IP_MULTICAST=y 299CONFIG_IP_MULTICAST=y
@@ -313,10 +325,12 @@ CONFIG_INET_XFRM_TUNNEL=m
313CONFIG_INET_TUNNEL=m 325CONFIG_INET_TUNNEL=m
314CONFIG_INET_XFRM_MODE_TRANSPORT=m 326CONFIG_INET_XFRM_MODE_TRANSPORT=m
315CONFIG_INET_XFRM_MODE_TUNNEL=m 327CONFIG_INET_XFRM_MODE_TUNNEL=m
328CONFIG_INET_XFRM_MODE_BEET=y
316CONFIG_INET_DIAG=y 329CONFIG_INET_DIAG=y
317CONFIG_INET_TCP_DIAG=y 330CONFIG_INET_TCP_DIAG=y
318# CONFIG_TCP_CONG_ADVANCED is not set 331# CONFIG_TCP_CONG_ADVANCED is not set
319CONFIG_TCP_CONG_BIC=y 332CONFIG_TCP_CONG_CUBIC=y
333CONFIG_DEFAULT_TCP_CONG="cubic"
320 334
321# 335#
322# IP: Virtual Server Configuration 336# IP: Virtual Server Configuration
@@ -358,11 +372,16 @@ CONFIG_IPV6_ROUTE_INFO=y
358CONFIG_INET6_AH=m 372CONFIG_INET6_AH=m
359CONFIG_INET6_ESP=m 373CONFIG_INET6_ESP=m
360CONFIG_INET6_IPCOMP=m 374CONFIG_INET6_IPCOMP=m
375# CONFIG_IPV6_MIP6 is not set
361CONFIG_INET6_XFRM_TUNNEL=m 376CONFIG_INET6_XFRM_TUNNEL=m
362CONFIG_INET6_TUNNEL=m 377CONFIG_INET6_TUNNEL=m
363CONFIG_INET6_XFRM_MODE_TRANSPORT=m 378CONFIG_INET6_XFRM_MODE_TRANSPORT=m
364CONFIG_INET6_XFRM_MODE_TUNNEL=m 379CONFIG_INET6_XFRM_MODE_TUNNEL=m
380CONFIG_INET6_XFRM_MODE_BEET=m
381# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
365CONFIG_IPV6_TUNNEL=m 382CONFIG_IPV6_TUNNEL=m
383# CONFIG_IPV6_SUBTREES is not set
384# CONFIG_IPV6_MULTIPLE_TABLES is not set
366CONFIG_NETWORK_SECMARK=y 385CONFIG_NETWORK_SECMARK=y
367CONFIG_NETFILTER=y 386CONFIG_NETFILTER=y
368# CONFIG_NETFILTER_DEBUG is not set 387# CONFIG_NETFILTER_DEBUG is not set
@@ -377,6 +396,7 @@ CONFIG_NETFILTER_NETLINK_LOG=m
377CONFIG_NETFILTER_XTABLES=m 396CONFIG_NETFILTER_XTABLES=m
378CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 397CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
379CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 398CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
399# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
380CONFIG_NETFILTER_XT_TARGET_MARK=m 400CONFIG_NETFILTER_XT_TARGET_MARK=m
381CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 401CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
382CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 402CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
@@ -387,6 +407,7 @@ CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
387CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 407CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
388CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 408CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
389CONFIG_NETFILTER_XT_MATCH_DCCP=m 409CONFIG_NETFILTER_XT_MATCH_DCCP=m
410# CONFIG_NETFILTER_XT_MATCH_DSCP is not set
390CONFIG_NETFILTER_XT_MATCH_ESP=m 411CONFIG_NETFILTER_XT_MATCH_ESP=m
391CONFIG_NETFILTER_XT_MATCH_HELPER=m 412CONFIG_NETFILTER_XT_MATCH_HELPER=m
392CONFIG_NETFILTER_XT_MATCH_LENGTH=m 413CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -429,7 +450,6 @@ CONFIG_IP_NF_MATCH_IPRANGE=m
429CONFIG_IP_NF_MATCH_TOS=m 450CONFIG_IP_NF_MATCH_TOS=m
430CONFIG_IP_NF_MATCH_RECENT=m 451CONFIG_IP_NF_MATCH_RECENT=m
431CONFIG_IP_NF_MATCH_ECN=m 452CONFIG_IP_NF_MATCH_ECN=m
432CONFIG_IP_NF_MATCH_DSCP=m
433CONFIG_IP_NF_MATCH_AH=m 453CONFIG_IP_NF_MATCH_AH=m
434CONFIG_IP_NF_MATCH_TTL=m 454CONFIG_IP_NF_MATCH_TTL=m
435CONFIG_IP_NF_MATCH_OWNER=m 455CONFIG_IP_NF_MATCH_OWNER=m
@@ -457,7 +477,6 @@ CONFIG_IP_NF_NAT_SIP=m
457CONFIG_IP_NF_MANGLE=m 477CONFIG_IP_NF_MANGLE=m
458CONFIG_IP_NF_TARGET_TOS=m 478CONFIG_IP_NF_TARGET_TOS=m
459CONFIG_IP_NF_TARGET_ECN=m 479CONFIG_IP_NF_TARGET_ECN=m
460CONFIG_IP_NF_TARGET_DSCP=m
461CONFIG_IP_NF_TARGET_TTL=m 480CONFIG_IP_NF_TARGET_TTL=m
462CONFIG_IP_NF_TARGET_CLUSTERIP=m 481CONFIG_IP_NF_TARGET_CLUSTERIP=m
463CONFIG_IP_NF_RAW=m 482CONFIG_IP_NF_RAW=m
@@ -536,13 +555,12 @@ CONFIG_LLC=m
536# CONFIG_LLC2 is not set 555# CONFIG_LLC2 is not set
537# CONFIG_IPX is not set 556# CONFIG_IPX is not set
538CONFIG_ATALK=m 557CONFIG_ATALK=m
539CONFIG_DEV_APPLETALK=y 558CONFIG_DEV_APPLETALK=m
540CONFIG_IPDDP=m 559CONFIG_IPDDP=m
541CONFIG_IPDDP_ENCAP=y 560CONFIG_IPDDP_ENCAP=y
542CONFIG_IPDDP_DECAP=y 561CONFIG_IPDDP_DECAP=y
543# CONFIG_X25 is not set 562# CONFIG_X25 is not set
544# CONFIG_LAPB is not set 563# CONFIG_LAPB is not set
545CONFIG_NET_DIVERT=y
546# CONFIG_ECONET is not set 564# CONFIG_ECONET is not set
547# CONFIG_WAN_ROUTER is not set 565# CONFIG_WAN_ROUTER is not set
548 566
@@ -604,6 +622,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
604CONFIG_IEEE80211_SOFTMAC=m 622CONFIG_IEEE80211_SOFTMAC=m
605# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set 623# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
606CONFIG_WIRELESS_EXT=y 624CONFIG_WIRELESS_EXT=y
625CONFIG_FIB_RULES=y
607 626
608# 627#
609# Device Drivers 628# Device Drivers
@@ -652,6 +671,7 @@ CONFIG_BLK_DEV_NBD=m
652CONFIG_BLK_DEV_RAM=y 671CONFIG_BLK_DEV_RAM=y
653CONFIG_BLK_DEV_RAM_COUNT=16 672CONFIG_BLK_DEV_RAM_COUNT=16
654CONFIG_BLK_DEV_RAM_SIZE=4096 673CONFIG_BLK_DEV_RAM_SIZE=4096
674CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
655# CONFIG_BLK_DEV_INITRD is not set 675# CONFIG_BLK_DEV_INITRD is not set
656CONFIG_CDROM_PKTCDVD=m 676CONFIG_CDROM_PKTCDVD=m
657CONFIG_CDROM_PKTCDVD_BUFFERS=8 677CONFIG_CDROM_PKTCDVD_BUFFERS=8
@@ -662,6 +682,7 @@ CONFIG_ATA_OVER_ETH=m
662# ATA/ATAPI/MFM/RLL support 682# ATA/ATAPI/MFM/RLL support
663# 683#
664CONFIG_IDE=y 684CONFIG_IDE=y
685CONFIG_IDE_MAX_HWIFS=4
665CONFIG_BLK_DEV_IDE=y 686CONFIG_BLK_DEV_IDE=y
666 687
667# 688#
@@ -699,6 +720,7 @@ CONFIG_IDEDMA_PCI_AUTO=y
699# CONFIG_BLK_DEV_CS5530 is not set 720# CONFIG_BLK_DEV_CS5530 is not set
700# CONFIG_BLK_DEV_HPT34X is not set 721# CONFIG_BLK_DEV_HPT34X is not set
701# CONFIG_BLK_DEV_HPT366 is not set 722# CONFIG_BLK_DEV_HPT366 is not set
723# CONFIG_BLK_DEV_JMICRON is not set
702# CONFIG_BLK_DEV_SC1200 is not set 724# CONFIG_BLK_DEV_SC1200 is not set
703CONFIG_BLK_DEV_PIIX=y 725CONFIG_BLK_DEV_PIIX=y
704# CONFIG_BLK_DEV_IT821X is not set 726# CONFIG_BLK_DEV_IT821X is not set
@@ -721,6 +743,7 @@ CONFIG_IDEDMA_AUTO=y
721# 743#
722CONFIG_RAID_ATTRS=m 744CONFIG_RAID_ATTRS=m
723CONFIG_SCSI=m 745CONFIG_SCSI=m
746CONFIG_SCSI_NETLINK=y
724CONFIG_SCSI_PROC_FS=y 747CONFIG_SCSI_PROC_FS=y
725 748
726# 749#
@@ -742,12 +765,13 @@ CONFIG_SCSI_CONSTANTS=y
742CONFIG_SCSI_LOGGING=y 765CONFIG_SCSI_LOGGING=y
743 766
744# 767#
745# SCSI Transport Attributes 768# SCSI Transports
746# 769#
747CONFIG_SCSI_SPI_ATTRS=m 770CONFIG_SCSI_SPI_ATTRS=m
748CONFIG_SCSI_FC_ATTRS=m 771CONFIG_SCSI_FC_ATTRS=m
749CONFIG_SCSI_ISCSI_ATTRS=m 772CONFIG_SCSI_ISCSI_ATTRS=m
750CONFIG_SCSI_SAS_ATTRS=m 773CONFIG_SCSI_SAS_ATTRS=m
774# CONFIG_SCSI_SAS_LIBSAS is not set
751 775
752# 776#
753# SCSI low-level drivers 777# SCSI low-level drivers
@@ -765,21 +789,23 @@ CONFIG_AIC7XXX_DEBUG_MASK=0
765CONFIG_AIC7XXX_REG_PRETTY_PRINT=y 789CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
766# CONFIG_SCSI_AIC7XXX_OLD is not set 790# CONFIG_SCSI_AIC7XXX_OLD is not set
767# CONFIG_SCSI_AIC79XX is not set 791# CONFIG_SCSI_AIC79XX is not set
792# CONFIG_SCSI_AIC94XX is not set
768# CONFIG_SCSI_DPT_I2O is not set 793# CONFIG_SCSI_DPT_I2O is not set
794# CONFIG_SCSI_ARCMSR is not set
769# CONFIG_MEGARAID_NEWGEN is not set 795# CONFIG_MEGARAID_NEWGEN is not set
770# CONFIG_MEGARAID_LEGACY is not set 796# CONFIG_MEGARAID_LEGACY is not set
771# CONFIG_MEGARAID_SAS is not set 797# CONFIG_MEGARAID_SAS is not set
772# CONFIG_SCSI_SATA is not set
773# CONFIG_SCSI_HPTIOP is not set 798# CONFIG_SCSI_HPTIOP is not set
774# CONFIG_SCSI_DMX3191D is not set 799# CONFIG_SCSI_DMX3191D is not set
775# CONFIG_SCSI_FUTURE_DOMAIN is not set 800# CONFIG_SCSI_FUTURE_DOMAIN is not set
776# CONFIG_SCSI_IPS is not set 801# CONFIG_SCSI_IPS is not set
777# CONFIG_SCSI_INITIO is not set 802# CONFIG_SCSI_INITIO is not set
778# CONFIG_SCSI_INIA100 is not set 803# CONFIG_SCSI_INIA100 is not set
804# CONFIG_SCSI_STEX is not set
779# CONFIG_SCSI_SYM53C8XX_2 is not set 805# CONFIG_SCSI_SYM53C8XX_2 is not set
780# CONFIG_SCSI_IPR is not set
781# CONFIG_SCSI_QLOGIC_1280 is not set 806# CONFIG_SCSI_QLOGIC_1280 is not set
782# CONFIG_SCSI_QLA_FC is not set 807# CONFIG_SCSI_QLA_FC is not set
808# CONFIG_SCSI_QLA_ISCSI is not set
783# CONFIG_SCSI_LPFC is not set 809# CONFIG_SCSI_LPFC is not set
784# CONFIG_SCSI_DC395x is not set 810# CONFIG_SCSI_DC395x is not set
785# CONFIG_SCSI_DC390T is not set 811# CONFIG_SCSI_DC390T is not set
@@ -787,6 +813,11 @@ CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
787# CONFIG_SCSI_DEBUG is not set 813# CONFIG_SCSI_DEBUG is not set
788 814
789# 815#
816# Serial ATA (prod) and Parallel ATA (experimental) drivers
817#
818# CONFIG_ATA is not set
819
820#
790# Multi-device support (RAID and LVM) 821# Multi-device support (RAID and LVM)
791# 822#
792CONFIG_MD=y 823CONFIG_MD=y
@@ -800,6 +831,7 @@ CONFIG_MD_RAID5_RESHAPE=y
800CONFIG_MD_MULTIPATH=m 831CONFIG_MD_MULTIPATH=m
801CONFIG_MD_FAULTY=m 832CONFIG_MD_FAULTY=m
802CONFIG_BLK_DEV_DM=m 833CONFIG_BLK_DEV_DM=m
834# CONFIG_DM_DEBUG is not set
803CONFIG_DM_CRYPT=m 835CONFIG_DM_CRYPT=m
804CONFIG_DM_SNAPSHOT=m 836CONFIG_DM_SNAPSHOT=m
805CONFIG_DM_MIRROR=m 837CONFIG_DM_MIRROR=m
@@ -854,6 +886,7 @@ CONFIG_LXT_PHY=m
854CONFIG_CICADA_PHY=m 886CONFIG_CICADA_PHY=m
855CONFIG_VITESSE_PHY=m 887CONFIG_VITESSE_PHY=m
856CONFIG_SMSC_PHY=m 888CONFIG_SMSC_PHY=m
889# CONFIG_FIXED_PHY is not set
857 890
858# 891#
859# Ethernet (10 or 100Mbit) 892# Ethernet (10 or 100Mbit)
@@ -873,6 +906,7 @@ CONFIG_MII=y
873# CONFIG_HP100 is not set 906# CONFIG_HP100 is not set
874CONFIG_NET_PCI=y 907CONFIG_NET_PCI=y
875CONFIG_PCNET32=y 908CONFIG_PCNET32=y
909# CONFIG_PCNET32_NAPI is not set
876# CONFIG_AMD8111_ETH is not set 910# CONFIG_AMD8111_ETH is not set
877# CONFIG_ADAPTEC_STARFIRE is not set 911# CONFIG_ADAPTEC_STARFIRE is not set
878# CONFIG_B44 is not set 912# CONFIG_B44 is not set
@@ -909,6 +943,7 @@ CONFIG_PCNET32=y
909# CONFIG_VIA_VELOCITY is not set 943# CONFIG_VIA_VELOCITY is not set
910# CONFIG_TIGON3 is not set 944# CONFIG_TIGON3 is not set
911# CONFIG_BNX2 is not set 945# CONFIG_BNX2 is not set
946# CONFIG_QLA3XXX is not set
912 947
913# 948#
914# Ethernet (10000 Mbit) 949# Ethernet (10000 Mbit)
@@ -956,6 +991,7 @@ CONFIG_PCNET32=y
956# Input device support 991# Input device support
957# 992#
958CONFIG_INPUT=y 993CONFIG_INPUT=y
994# CONFIG_INPUT_FF_MEMLESS is not set
959 995
960# 996#
961# Userland interfaces 997# Userland interfaces
@@ -1070,12 +1106,12 @@ CONFIG_RTC=y
1070# 1106#
1071# Misc devices 1107# Misc devices
1072# 1108#
1109# CONFIG_TIFM_CORE is not set
1073 1110
1074# 1111#
1075# Multimedia devices 1112# Multimedia devices
1076# 1113#
1077# CONFIG_VIDEO_DEV is not set 1114# CONFIG_VIDEO_DEV is not set
1078CONFIG_VIDEO_V4L2=y
1079 1115
1080# 1116#
1081# Digital Video Broadcasting Devices 1117# Digital Video Broadcasting Devices
@@ -1093,6 +1129,7 @@ CONFIG_VIDEO_V4L2=y
1093# 1129#
1094# CONFIG_VGA_CONSOLE is not set 1130# CONFIG_VGA_CONSOLE is not set
1095CONFIG_DUMMY_CONSOLE=y 1131CONFIG_DUMMY_CONSOLE=y
1132# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
1096 1133
1097# 1134#
1098# Sound 1135# Sound
@@ -1191,6 +1228,7 @@ CONFIG_XFS_QUOTA=y
1191CONFIG_XFS_SECURITY=y 1228CONFIG_XFS_SECURITY=y
1192CONFIG_XFS_POSIX_ACL=y 1229CONFIG_XFS_POSIX_ACL=y
1193# CONFIG_XFS_RT is not set 1230# CONFIG_XFS_RT is not set
1231# CONFIG_GFS2_FS is not set
1194# CONFIG_OCFS2_FS is not set 1232# CONFIG_OCFS2_FS is not set
1195CONFIG_MINIX_FS=m 1233CONFIG_MINIX_FS=m
1196CONFIG_ROMFS_FS=m 1234CONFIG_ROMFS_FS=m
@@ -1230,8 +1268,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1230# 1268#
1231CONFIG_PROC_FS=y 1269CONFIG_PROC_FS=y
1232CONFIG_PROC_KCORE=y 1270CONFIG_PROC_KCORE=y
1271CONFIG_PROC_SYSCTL=y
1233CONFIG_SYSFS=y 1272CONFIG_SYSFS=y
1234CONFIG_TMPFS=y 1273CONFIG_TMPFS=y
1274# CONFIG_TMPFS_POSIX_ACL is not set
1235# CONFIG_HUGETLB_PAGE is not set 1275# CONFIG_HUGETLB_PAGE is not set
1236CONFIG_RAMFS=y 1276CONFIG_RAMFS=y
1237# CONFIG_CONFIGFS_FS is not set 1277# CONFIG_CONFIGFS_FS is not set
@@ -1279,7 +1319,6 @@ CONFIG_SUNRPC=y
1279# CONFIG_RPCSEC_GSS_SPKM3 is not set 1319# CONFIG_RPCSEC_GSS_SPKM3 is not set
1280# CONFIG_SMB_FS is not set 1320# CONFIG_SMB_FS is not set
1281# CONFIG_CIFS is not set 1321# CONFIG_CIFS is not set
1282# CONFIG_CIFS_DEBUG2 is not set
1283# CONFIG_NCP_FS is not set 1322# CONFIG_NCP_FS is not set
1284# CONFIG_CODA_FS is not set 1323# CONFIG_CODA_FS is not set
1285# CONFIG_AFS_FS is not set 1324# CONFIG_AFS_FS is not set
@@ -1336,6 +1375,11 @@ CONFIG_NLS_KOI8_U=m
1336CONFIG_NLS_UTF8=m 1375CONFIG_NLS_UTF8=m
1337 1376
1338# 1377#
1378# Distributed Lock Manager
1379#
1380# CONFIG_DLM is not set
1381
1382#
1339# Profiling support 1383# Profiling support
1340# 1384#
1341# CONFIG_PROFILING is not set 1385# CONFIG_PROFILING is not set
@@ -1345,10 +1389,11 @@ CONFIG_NLS_UTF8=m
1345# 1389#
1346CONFIG_TRACE_IRQFLAGS_SUPPORT=y 1390CONFIG_TRACE_IRQFLAGS_SUPPORT=y
1347# CONFIG_PRINTK_TIME is not set 1391# CONFIG_PRINTK_TIME is not set
1392CONFIG_ENABLE_MUST_CHECK=y
1348# CONFIG_MAGIC_SYSRQ is not set 1393# CONFIG_MAGIC_SYSRQ is not set
1349# CONFIG_UNUSED_SYMBOLS is not set 1394# CONFIG_UNUSED_SYMBOLS is not set
1350# CONFIG_DEBUG_KERNEL is not set 1395# CONFIG_DEBUG_KERNEL is not set
1351CONFIG_LOG_BUF_SHIFT=14 1396CONFIG_LOG_BUF_SHIFT=15
1352# CONFIG_DEBUG_FS is not set 1397# CONFIG_DEBUG_FS is not set
1353CONFIG_CROSSCOMPILE=y 1398CONFIG_CROSSCOMPILE=y
1354CONFIG_CMDLINE="" 1399CONFIG_CMDLINE=""
@@ -1363,6 +1408,10 @@ CONFIG_CMDLINE=""
1363# Cryptographic options 1408# Cryptographic options
1364# 1409#
1365CONFIG_CRYPTO=y 1410CONFIG_CRYPTO=y
1411CONFIG_CRYPTO_ALGAPI=y
1412CONFIG_CRYPTO_BLKCIPHER=m
1413CONFIG_CRYPTO_HASH=y
1414CONFIG_CRYPTO_MANAGER=m
1366CONFIG_CRYPTO_HMAC=y 1415CONFIG_CRYPTO_HMAC=y
1367CONFIG_CRYPTO_NULL=m 1416CONFIG_CRYPTO_NULL=m
1368CONFIG_CRYPTO_MD4=m 1417CONFIG_CRYPTO_MD4=m
@@ -1372,9 +1421,12 @@ CONFIG_CRYPTO_SHA256=m
1372CONFIG_CRYPTO_SHA512=m 1421CONFIG_CRYPTO_SHA512=m
1373CONFIG_CRYPTO_WP512=m 1422CONFIG_CRYPTO_WP512=m
1374CONFIG_CRYPTO_TGR192=m 1423CONFIG_CRYPTO_TGR192=m
1424CONFIG_CRYPTO_ECB=m
1425CONFIG_CRYPTO_CBC=m
1375CONFIG_CRYPTO_DES=m 1426CONFIG_CRYPTO_DES=m
1376CONFIG_CRYPTO_BLOWFISH=m 1427CONFIG_CRYPTO_BLOWFISH=m
1377CONFIG_CRYPTO_TWOFISH=m 1428CONFIG_CRYPTO_TWOFISH=m
1429CONFIG_CRYPTO_TWOFISH_COMMON=m
1378CONFIG_CRYPTO_SERPENT=m 1430CONFIG_CRYPTO_SERPENT=m
1379CONFIG_CRYPTO_AES=m 1431CONFIG_CRYPTO_AES=m
1380CONFIG_CRYPTO_CAST5=m 1432CONFIG_CRYPTO_CAST5=m
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig
index 741f8258075c..9e672f63a0aa 100644
--- a/arch/mips/configs/pb1100_defconfig
+++ b/arch/mips/configs/pb1100_defconfig
@@ -76,7 +76,6 @@ CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_SOC_AU1100=y 76CONFIG_SOC_AU1100=y
77CONFIG_SOC_AU1X00=y 77CONFIG_SOC_AU1X00=y
78CONFIG_SWAP_IO_SPACE=y 78CONFIG_SWAP_IO_SPACE=y
79# CONFIG_AU1X00_USB_DEVICE is not set
80CONFIG_MIPS_L1_CACHE_SHIFT=5 79CONFIG_MIPS_L1_CACHE_SHIFT=5
81 80
82# 81#
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig
index 8576340714da..d0c0f4af1bff 100644
--- a/arch/mips/configs/pb1500_defconfig
+++ b/arch/mips/configs/pb1500_defconfig
@@ -75,7 +75,6 @@ CONFIG_CPU_LITTLE_ENDIAN=y
75CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y 75CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
76CONFIG_SOC_AU1500=y 76CONFIG_SOC_AU1500=y
77CONFIG_SOC_AU1X00=y 77CONFIG_SOC_AU1X00=y
78# CONFIG_AU1X00_USB_DEVICE is not set
79CONFIG_MIPS_L1_CACHE_SHIFT=5 78CONFIG_MIPS_L1_CACHE_SHIFT=5
80 79
81# 80#
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c
index 513fc6722d84..a8bd2e66705c 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq.c
@@ -153,8 +153,7 @@ u8 i8259_interrupt_ack(void)
153 * the first level int-handler will jump here if it is a vrc5477 irq 153 * the first level int-handler will jump here if it is a vrc5477 irq
154 */ 154 */
155#define NUM_5477_IRQS 32 155#define NUM_5477_IRQS 32
156static void 156static void vrc5477_irq_dispatch(void)
157vrc5477_irq_dispatch(struct pt_regs *regs)
158{ 157{
159 u32 intStatus; 158 u32 intStatus;
160 u32 bitmask; 159 u32 bitmask;
@@ -178,7 +177,7 @@ vrc5477_irq_dispatch(struct pt_regs *regs)
178 /* check for i8259 interrupts */ 177 /* check for i8259 interrupts */
179 if (intStatus & (1 << VRC5477_I8259_CASCADE)) { 178 if (intStatus & (1 << VRC5477_I8259_CASCADE)) {
180 int i8259_irq = i8259_interrupt_ack(); 179 int i8259_irq = i8259_interrupt_ack();
181 do_IRQ(I8259_IRQ_BASE + i8259_irq, regs); 180 do_IRQ(I8259_IRQ_BASE + i8259_irq);
182 return; 181 return;
183 } 182 }
184 } 183 }
@@ -186,7 +185,7 @@ vrc5477_irq_dispatch(struct pt_regs *regs)
186 for (i=0, bitmask=1; i<= NUM_5477_IRQS; bitmask <<=1, i++) { 185 for (i=0, bitmask=1; i<= NUM_5477_IRQS; bitmask <<=1, i++) {
187 /* do we need to "and" with the int mask? */ 186 /* do we need to "and" with the int mask? */
188 if (intStatus & bitmask) { 187 if (intStatus & bitmask) {
189 do_IRQ(VRC5477_IRQ_BASE + i, regs); 188 do_IRQ(VRC5477_IRQ_BASE + i);
190 return; 189 return;
191 } 190 }
192 } 191 }
@@ -194,18 +193,18 @@ vrc5477_irq_dispatch(struct pt_regs *regs)
194 193
195#define VR5477INTS (STATUSF_IP2|STATUSF_IP3|STATUSF_IP4|STATUSF_IP5|STATUSF_IP6) 194#define VR5477INTS (STATUSF_IP2|STATUSF_IP3|STATUSF_IP4|STATUSF_IP5|STATUSF_IP6)
196 195
197asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 196asmlinkage void plat_irq_dispatch(void)
198{ 197{
199 unsigned int pending = read_c0_cause() & read_c0_status(); 198 unsigned int pending = read_c0_cause() & read_c0_status();
200 199
201 if (pending & STATUSF_IP7) 200 if (pending & STATUSF_IP7)
202 do_IRQ(CPU_IRQ_BASE + 7, regs); 201 do_IRQ(CPU_IRQ_BASE + 7);
203 else if (pending & VR5477INTS) 202 else if (pending & VR5477INTS)
204 vrc5477_irq_dispatch(regs); 203 vrc5477_irq_dispatch();
205 else if (pending & STATUSF_IP0) 204 else if (pending & STATUSF_IP0)
206 do_IRQ(CPU_IRQ_BASE, regs); 205 do_IRQ(CPU_IRQ_BASE);
207 else if (pending & STATUSF_IP1) 206 else if (pending & STATUSF_IP1)
208 do_IRQ(CPU_IRQ_BASE + 1, regs); 207 do_IRQ(CPU_IRQ_BASE + 1);
209 else 208 else
210 spurious_interrupt(regs); 209 spurious_interrupt();
211} 210}
diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c
index cc24c5ed0c05..3e374d05978f 100644
--- a/arch/mips/dec/ecc-berr.c
+++ b/arch/mips/dec/ecc-berr.c
@@ -24,6 +24,7 @@
24#include <asm/addrspace.h> 24#include <asm/addrspace.h>
25#include <asm/bootinfo.h> 25#include <asm/bootinfo.h>
26#include <asm/cpu.h> 26#include <asm/cpu.h>
27#include <asm/irq_regs.h>
27#include <asm/processor.h> 28#include <asm/processor.h>
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/traps.h> 30#include <asm/traps.h>
@@ -200,8 +201,10 @@ int dec_ecc_be_handler(struct pt_regs *regs, int is_fixup)
200 return dec_ecc_be_backend(regs, is_fixup, 0); 201 return dec_ecc_be_backend(regs, is_fixup, 0);
201} 202}
202 203
203irqreturn_t dec_ecc_be_interrupt(int irq, void *dev_id, struct pt_regs *regs) 204irqreturn_t dec_ecc_be_interrupt(int irq, void *dev_id)
204{ 205{
206 struct pt_regs *regs = get_irq_regs();
207
205 int action = dec_ecc_be_backend(regs, 0, 1); 208 int action = dec_ecc_be_backend(regs, 0, 1);
206 209
207 if (action == MIPS_BE_DISCARD) 210 if (action == MIPS_BE_DISCARD)
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
index 455a65b91cb0..31dd47d1002d 100644
--- a/arch/mips/dec/int-handler.S
+++ b/arch/mips/dec/int-handler.S
@@ -264,10 +264,10 @@
264 srlv t3,t1,t2 264 srlv t3,t1,t2
265 265
266handle_it: 266handle_it:
267 jal do_IRQ 267 LONG_L s0, TI_REGS($28)
268 move a1,sp 268 LONG_S sp, TI_REGS($28)
269 269 PTR_LA ra, ret_from_irq
270 j ret_from_irq 270 j do_IRQ
271 nop 271 nop
272 272
273#ifdef CONFIG_32BIT 273#ifdef CONFIG_32BIT
@@ -277,9 +277,8 @@ fpu:
277#endif 277#endif
278 278
279spurious: 279spurious:
280 jal spurious_interrupt 280 PTR_LA ra, _ret_from_irq
281 nop 281 j spurious_interrupt
282 j ret_from_irq
283 nop 282 nop
284 END(plat_irq_dispatch) 283 END(plat_irq_dispatch)
285 284
diff --git a/arch/mips/dec/kn01-berr.c b/arch/mips/dec/kn01-berr.c
index b9271db9bc76..f19b4617a0a6 100644
--- a/arch/mips/dec/kn01-berr.c
+++ b/arch/mips/dec/kn01-berr.c
@@ -150,10 +150,10 @@ int dec_kn01_be_handler(struct pt_regs *regs, int is_fixup)
150 return dec_kn01_be_backend(regs, is_fixup, 0); 150 return dec_kn01_be_backend(regs, is_fixup, 0);
151} 151}
152 152
153irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id, 153irqreturn_t dec_kn01_be_interrupt(int irq, void *dev_id)
154 struct pt_regs *regs)
155{ 154{
156 volatile u16 *csr = (void *)CKSEG1ADDR(KN01_SLOT_BASE + KN01_CSR); 155 volatile u16 *csr = (void *)CKSEG1ADDR(KN01_SLOT_BASE + KN01_CSR);
156 struct pt_regs *regs = get_irq_regs();
157 int action; 157 int action;
158 158
159 if (!(*csr & KN01_CSR_MEMERR)) 159 if (!(*csr & KN01_CSR_MEMERR))
diff --git a/arch/mips/dec/kn02xa-berr.c b/arch/mips/dec/kn02xa-berr.c
index 6cd3f94f79fe..7a053aadcd3a 100644
--- a/arch/mips/dec/kn02xa-berr.c
+++ b/arch/mips/dec/kn02xa-berr.c
@@ -21,6 +21,8 @@
21#include <linux/types.h> 21#include <linux/types.h>
22 22
23#include <asm/addrspace.h> 23#include <asm/addrspace.h>
24#include <asm/irq_regs.h>
25#include <asm/ptrace.h>
24#include <asm/system.h> 26#include <asm/system.h>
25#include <asm/traps.h> 27#include <asm/traps.h>
26 28
@@ -104,9 +106,9 @@ int dec_kn02xa_be_handler(struct pt_regs *regs, int is_fixup)
104 return dec_kn02xa_be_backend(regs, is_fixup, 0); 106 return dec_kn02xa_be_backend(regs, is_fixup, 0);
105} 107}
106 108
107irqreturn_t dec_kn02xa_be_interrupt(int irq, void *dev_id, 109irqreturn_t dec_kn02xa_be_interrupt(int irq, void *dev_id)
108 struct pt_regs *regs)
109{ 110{
111 struct pt_regs *regs = get_irq_regs();
110 int action = dec_kn02xa_be_backend(regs, 0, 1); 112 int action = dec_kn02xa_be_backend(regs, 0, 1);
111 113
112 if (action == MIPS_BE_DISCARD) 114 if (action == MIPS_BE_DISCARD)
diff --git a/arch/mips/dec/reset.c b/arch/mips/dec/reset.c
index f78c6da47921..56397227adb0 100644
--- a/arch/mips/dec/reset.c
+++ b/arch/mips/dec/reset.c
@@ -8,7 +8,6 @@
8#include <linux/linkage.h> 8#include <linux/linkage.h>
9 9
10#include <asm/addrspace.h> 10#include <asm/addrspace.h>
11#include <asm/ptrace.h>
12 11
13typedef void ATTRIB_NORET (* noret_func_t)(void); 12typedef void ATTRIB_NORET (* noret_func_t)(void);
14 13
@@ -35,7 +34,7 @@ void ATTRIB_NORET dec_machine_power_off(void)
35 back_to_prom(); 34 back_to_prom();
36} 35}
37 36
38irqreturn_t dec_intr_halt(int irq, void *dev_id, struct pt_regs *regs) 37irqreturn_t dec_intr_halt(int irq, void *dev_id)
39{ 38{
40 dec_machine_halt(); 39 dec_machine_halt();
41} 40}
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index d43241c2f541..6b7481e97bec 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -46,7 +46,7 @@
46extern void dec_machine_restart(char *command); 46extern void dec_machine_restart(char *command);
47extern void dec_machine_halt(void); 47extern void dec_machine_halt(void);
48extern void dec_machine_power_off(void); 48extern void dec_machine_power_off(void);
49extern irqreturn_t dec_intr_halt(int irq, void *dev_id, struct pt_regs *regs); 49extern irqreturn_t dec_intr_halt(int irq, void *dev_id);
50 50
51unsigned long dec_kn_slot_base, dec_kn_slot_size; 51unsigned long dec_kn_slot_base, dec_kn_slot_size;
52 52
diff --git a/arch/mips/emma2rh/common/irq.c b/arch/mips/emma2rh/common/irq.c
index 3af57693c84c..c191b3e9d9d9 100644
--- a/arch/mips/emma2rh/common/irq.c
+++ b/arch/mips/emma2rh/common/irq.c
@@ -39,7 +39,7 @@
39/* 39/*
40 * the first level int-handler will jump here if it is a emma2rh irq 40 * the first level int-handler will jump here if it is a emma2rh irq
41 */ 41 */
42asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs) 42void emma2rh_irq_dispatch(void)
43{ 43{
44 u32 intStatus; 44 u32 intStatus;
45 u32 bitmask; 45 u32 bitmask;
@@ -56,7 +56,7 @@ asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs)
56 & emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN); 56 & emma2rh_in32(EMMA2RH_BHIF_SW_INT_EN);
57 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) { 57 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
58 if (swIntStatus & bitmask) { 58 if (swIntStatus & bitmask) {
59 do_IRQ(EMMA2RH_SW_IRQ_BASE + i, regs); 59 do_IRQ(EMMA2RH_SW_IRQ_BASE + i);
60 return; 60 return;
61 } 61 }
62 } 62 }
@@ -65,7 +65,7 @@ asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs)
65 65
66 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) { 66 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
67 if (intStatus & bitmask) { 67 if (intStatus & bitmask) {
68 do_IRQ(EMMA2RH_IRQ_BASE + i, regs); 68 do_IRQ(EMMA2RH_IRQ_BASE + i);
69 return; 69 return;
70 } 70 }
71 } 71 }
@@ -81,7 +81,7 @@ asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs)
81 & emma2rh_in32(EMMA2RH_GPIO_INT_MASK); 81 & emma2rh_in32(EMMA2RH_GPIO_INT_MASK);
82 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) { 82 for (i = 0, bitmask = 1; i < 32; i++, bitmask <<= 1) {
83 if (gpioIntStatus & bitmask) { 83 if (gpioIntStatus & bitmask) {
84 do_IRQ(EMMA2RH_GPIO_IRQ_BASE + i, regs); 84 do_IRQ(EMMA2RH_GPIO_IRQ_BASE + i);
85 return; 85 return;
86 } 86 }
87 } 87 }
@@ -90,7 +90,7 @@ asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs)
90 90
91 for (i = 32, bitmask = 1; i < 64; i++, bitmask <<= 1) { 91 for (i = 32, bitmask = 1; i < 64; i++, bitmask <<= 1) {
92 if (intStatus & bitmask) { 92 if (intStatus & bitmask) {
93 do_IRQ(EMMA2RH_IRQ_BASE + i, regs); 93 do_IRQ(EMMA2RH_IRQ_BASE + i);
94 return; 94 return;
95 } 95 }
96 } 96 }
@@ -100,7 +100,7 @@ asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs)
100 100
101 for (i = 64, bitmask = 1; i < 96; i++, bitmask <<= 1) { 101 for (i = 64, bitmask = 1; i < 96; i++, bitmask <<= 1) {
102 if (intStatus & bitmask) { 102 if (intStatus & bitmask) {
103 do_IRQ(EMMA2RH_IRQ_BASE + i, regs); 103 do_IRQ(EMMA2RH_IRQ_BASE + i);
104 return; 104 return;
105 } 105 }
106 } 106 }
diff --git a/arch/mips/emma2rh/markeins/irq.c b/arch/mips/emma2rh/markeins/irq.c
index 2a736be42c8c..c93369cb4115 100644
--- a/arch/mips/emma2rh/markeins/irq.c
+++ b/arch/mips/emma2rh/markeins/irq.c
@@ -57,7 +57,7 @@
57extern void emma2rh_sw_irq_init(u32 base); 57extern void emma2rh_sw_irq_init(u32 base);
58extern void emma2rh_gpio_irq_init(u32 base); 58extern void emma2rh_gpio_irq_init(u32 base);
59extern void emma2rh_irq_init(u32 base); 59extern void emma2rh_irq_init(u32 base);
60extern asmlinkage void emma2rh_irq_dispatch(struct pt_regs *regs); 60extern void emma2rh_irq_dispatch(void);
61 61
62static struct irqaction irq_cascade = { 62static struct irqaction irq_cascade = {
63 .handler = no_action, 63 .handler = no_action,
@@ -114,20 +114,20 @@ void __init arch_init_irq(void)
114 setup_irq(CPU_IRQ_BASE + CPU_EMMA2RH_CASCADE, &irq_cascade); 114 setup_irq(CPU_IRQ_BASE + CPU_EMMA2RH_CASCADE, &irq_cascade);
115} 115}
116 116
117asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 117asmlinkage void plat_irq_dispatch(void)
118{ 118{
119 unsigned int pending = read_c0_status() & read_c0_cause(); 119 unsigned int pending = read_c0_status() & read_c0_cause();
120 120
121 if (pending & STATUSF_IP7) 121 if (pending & STATUSF_IP7)
122 do_IRQ(CPU_IRQ_BASE + 7, regs); 122 do_IRQ(CPU_IRQ_BASE + 7);
123 else if (pending & STATUSF_IP2) 123 else if (pending & STATUSF_IP2)
124 emma2rh_irq_dispatch(regs); 124 emma2rh_irq_dispatch();
125 else if (pending & STATUSF_IP1) 125 else if (pending & STATUSF_IP1)
126 do_IRQ(CPU_IRQ_BASE + 1, regs); 126 do_IRQ(CPU_IRQ_BASE + 1);
127 else if (pending & STATUSF_IP0) 127 else if (pending & STATUSF_IP0)
128 do_IRQ(CPU_IRQ_BASE + 0, regs); 128 do_IRQ(CPU_IRQ_BASE + 0);
129 else 129 else
130 spurious_interrupt(regs); 130 spurious_interrupt();
131} 131}
132 132
133 133
diff --git a/arch/mips/gt64120/common/time.c b/arch/mips/gt64120/common/time.c
index 7feca49350d1..c83ae6acd601 100644
--- a/arch/mips/gt64120/common/time.c
+++ b/arch/mips/gt64120/common/time.c
@@ -10,7 +10,7 @@
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/sched.h> 11#include <linux/sched.h>
12#include <linux/kernel_stat.h> 12#include <linux/kernel_stat.h>
13#include <asm/ptrace.h> 13#include <asm/irq_regs.h>
14#include <asm/gt64120.h> 14#include <asm/gt64120.h>
15 15
16/* 16/*
@@ -19,7 +19,7 @@
19 * differently than other MIPS interrupts. 19 * differently than other MIPS interrupts.
20 */ 20 */
21 21
22static void gt64120_irq(int irq, void *dev_id, struct pt_regs *regs) 22static irqreturn_t gt64120_irq(int irq, void *dev_id)
23{ 23{
24 unsigned int irq_src, int_high_src, irq_src_mask, int_high_src_mask; 24 unsigned int irq_src, int_high_src, irq_src_mask, int_high_src_mask;
25 int handled = 0; 25 int handled = 0;
@@ -36,12 +36,14 @@ static void gt64120_irq(int irq, void *dev_id, struct pt_regs *regs)
36 irq_src &= ~0x00000800; 36 irq_src &= ~0x00000800;
37 do_timer(1); 37 do_timer(1);
38#ifndef CONFIG_SMP 38#ifndef CONFIG_SMP
39 update_process_times(user_mode(regs)); 39 update_process_times(user_mode(get_irq_regs()));
40#endif 40#endif
41 } 41 }
42 42
43 GT_WRITE(GT_INTRCAUSE_OFS, 0); 43 GT_WRITE(GT_INTRCAUSE_OFS, 0);
44 GT_WRITE(GT_HINTRCAUSE_OFS, 0); 44 GT_WRITE(GT_HINTRCAUSE_OFS, 0);
45
46 return IRQ_HANDLED;
45} 47}
46 48
47/* 49/*
diff --git a/arch/mips/gt64120/ev64120/irq.c b/arch/mips/gt64120/ev64120/irq.c
index 5d939ac58f3f..ed4d82b9a24a 100644
--- a/arch/mips/gt64120/ev64120/irq.c
+++ b/arch/mips/gt64120/ev64120/irq.c
@@ -46,22 +46,22 @@
46#include <asm/system.h> 46#include <asm/system.h>
47#include <asm/gt64120.h> 47#include <asm/gt64120.h>
48 48
49asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 49asmlinkage void plat_irq_dispatch(void)
50{ 50{
51 unsigned int pending = read_c0_status() & read_c0_cause(); 51 unsigned int pending = read_c0_status() & read_c0_cause();
52 52
53 if (pending & STATUSF_IP4) /* int2 hardware line (timer) */ 53 if (pending & STATUSF_IP4) /* int2 hardware line (timer) */
54 do_IRQ(4, regs); 54 do_IRQ(4);
55 else if (pending & STATUSF_IP2) /* int0 hardware line */ 55 else if (pending & STATUSF_IP2) /* int0 hardware line */
56 do_IRQ(GT_INTA, regs); 56 do_IRQ(GT_INTA);
57 else if (pending & STATUSF_IP5) /* int3 hardware line */ 57 else if (pending & STATUSF_IP5) /* int3 hardware line */
58 do_IRQ(GT_INTD, regs); 58 do_IRQ(GT_INTD);
59 else if (pending & STATUSF_IP6) /* int4 hardware line */ 59 else if (pending & STATUSF_IP6) /* int4 hardware line */
60 do_IRQ(6, regs); 60 do_IRQ(6);
61 else if (pending & STATUSF_IP7) /* compare int */ 61 else if (pending & STATUSF_IP7) /* compare int */
62 do_IRQ(7, regs); 62 do_IRQ(7);
63 else 63 else
64 spurious_interrupt(regs); 64 spurious_interrupt();
65} 65}
66 66
67static void disable_ev64120_irq(unsigned int irq_nr) 67static void disable_ev64120_irq(unsigned int irq_nr)
diff --git a/arch/mips/gt64120/ev64120/setup.c b/arch/mips/gt64120/ev64120/setup.c
index 4236da31ecc6..91c2d3f41617 100644
--- a/arch/mips/gt64120/ev64120/setup.c
+++ b/arch/mips/gt64120/ev64120/setup.c
@@ -42,7 +42,6 @@
42#include <asm/irq.h> 42#include <asm/irq.h>
43#include <asm/pci.h> 43#include <asm/pci.h>
44#include <asm/processor.h> 44#include <asm/processor.h>
45#include <asm/ptrace.h>
46#include <asm/time.h> 45#include <asm/time.h>
47#include <asm/reboot.h> 46#include <asm/reboot.h>
48#include <asm/traps.h> 47#include <asm/traps.h>
diff --git a/arch/mips/gt64120/momenco_ocelot/irq.c b/arch/mips/gt64120/momenco_ocelot/irq.c
index 885f67f32ea3..d9294401ccb0 100644
--- a/arch/mips/gt64120/momenco_ocelot/irq.c
+++ b/arch/mips/gt64120/momenco_ocelot/irq.c
@@ -48,22 +48,22 @@
48#include <asm/mipsregs.h> 48#include <asm/mipsregs.h>
49#include <asm/system.h> 49#include <asm/system.h>
50 50
51asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 51asmlinkage void plat_irq_dispatch(void)
52{ 52{
53 unsigned int pending = read_c0_status() & read_c0_cause(); 53 unsigned int pending = read_c0_status() & read_c0_cause();
54 54
55 if (pending & STATUSF_IP2) /* int0 hardware line */ 55 if (pending & STATUSF_IP2) /* int0 hardware line */
56 do_IRQ(2, regs); 56 do_IRQ(2);
57 else if (pending & STATUSF_IP3) /* int1 hardware line */ 57 else if (pending & STATUSF_IP3) /* int1 hardware line */
58 do_IRQ(3, regs); 58 do_IRQ(3);
59 else if (pending & STATUSF_IP4) /* int2 hardware line */ 59 else if (pending & STATUSF_IP4) /* int2 hardware line */
60 do_IRQ(4, regs); 60 do_IRQ(4);
61 else if (pending & STATUSF_IP5) /* int3 hardware line */ 61 else if (pending & STATUSF_IP5) /* int3 hardware line */
62 do_IRQ(5, regs); 62 do_IRQ(5);
63 else if (pending & STATUSF_IP6) /* int4 hardware line */ 63 else if (pending & STATUSF_IP6) /* int4 hardware line */
64 do_IRQ(6, regs); 64 do_IRQ(6);
65 else if (pending & STATUSF_IP7) /* cpu timer */ 65 else if (pending & STATUSF_IP7) /* cpu timer */
66 do_IRQ(7, regs); 66 do_IRQ(7);
67 else { 67 else {
68 /* 68 /*
69 * Now look at the extended interrupts 69 * Now look at the extended interrupts
@@ -71,13 +71,13 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
71 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16; 71 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16;
72 72
73 if (pending & STATUSF_IP8) /* int6 hardware line */ 73 if (pending & STATUSF_IP8) /* int6 hardware line */
74 do_IRQ(8, regs); 74 do_IRQ(8);
75 else if (pending & STATUSF_IP9) /* int7 hardware line */ 75 else if (pending & STATUSF_IP9) /* int7 hardware line */
76 do_IRQ(9, regs); 76 do_IRQ(9);
77 else if (pending & STATUSF_IP10) /* int8 hardware line */ 77 else if (pending & STATUSF_IP10) /* int8 hardware line */
78 do_IRQ(10, regs); 78 do_IRQ(10);
79 else if (pending & STATUSF_IP11) /* int9 hardware line */ 79 else if (pending & STATUSF_IP11) /* int9 hardware line */
80 do_IRQ(11, regs); 80 do_IRQ(11);
81 } 81 }
82} 82}
83 83
diff --git a/arch/mips/gt64120/momenco_ocelot/setup.c b/arch/mips/gt64120/momenco_ocelot/setup.c
index 9804642ecf89..0e5bbee2d5b7 100644
--- a/arch/mips/gt64120/momenco_ocelot/setup.c
+++ b/arch/mips/gt64120/momenco_ocelot/setup.c
@@ -56,7 +56,6 @@
56#include <asm/irq.h> 56#include <asm/irq.h>
57#include <asm/pci.h> 57#include <asm/pci.h>
58#include <asm/processor.h> 58#include <asm/processor.h>
59#include <asm/ptrace.h>
60#include <asm/reboot.h> 59#include <asm/reboot.h>
61#include <asm/traps.h> 60#include <asm/traps.h>
62#include <linux/bootmem.h> 61#include <linux/bootmem.h>
diff --git a/arch/mips/gt64120/wrppmc/irq.c b/arch/mips/gt64120/wrppmc/irq.c
index 8d75a43ce877..eedfc24e1eae 100644
--- a/arch/mips/gt64120/wrppmc/irq.c
+++ b/arch/mips/gt64120/wrppmc/irq.c
@@ -30,18 +30,18 @@
30#include <asm/irq_cpu.h> 30#include <asm/irq_cpu.h>
31#include <asm/gt64120.h> 31#include <asm/gt64120.h>
32 32
33asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 33asmlinkage void plat_irq_dispatch(void)
34{ 34{
35 unsigned int pending = read_c0_status() & read_c0_cause(); 35 unsigned int pending = read_c0_status() & read_c0_cause();
36 36
37 if (pending & STATUSF_IP7) 37 if (pending & STATUSF_IP7)
38 do_IRQ(WRPPMC_MIPS_TIMER_IRQ, regs); /* CPU Compare/Count internal timer */ 38 do_IRQ(WRPPMC_MIPS_TIMER_IRQ); /* CPU Compare/Count internal timer */
39 else if (pending & STATUSF_IP6) 39 else if (pending & STATUSF_IP6)
40 do_IRQ(WRPPMC_UART16550_IRQ, regs); /* UART 16550 port */ 40 do_IRQ(WRPPMC_UART16550_IRQ); /* UART 16550 port */
41 else if (pending & STATUSF_IP3) 41 else if (pending & STATUSF_IP3)
42 do_IRQ(WRPPMC_PCI_INTA_IRQ, regs); /* PCI INT_A */ 42 do_IRQ(WRPPMC_PCI_INTA_IRQ); /* PCI INT_A */
43 else 43 else
44 spurious_interrupt(regs); 44 spurious_interrupt();
45} 45}
46 46
47/** 47/**
diff --git a/arch/mips/jazz/irq.c b/arch/mips/jazz/irq.c
index eef05093deb4..d5bd6b3a0933 100644
--- a/arch/mips/jazz/irq.c
+++ b/arch/mips/jazz/irq.c
@@ -94,26 +94,26 @@ void __init arch_init_irq(void)
94 change_c0_status(ST0_IM, IE_IRQ4 | IE_IRQ3 | IE_IRQ2 | IE_IRQ1); 94 change_c0_status(ST0_IM, IE_IRQ4 | IE_IRQ3 | IE_IRQ2 | IE_IRQ1);
95} 95}
96 96
97static void loc_call(unsigned int irq, struct pt_regs *regs, unsigned int mask) 97static void loc_call(unsigned int irq, unsigned int mask)
98{ 98{
99 r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, 99 r4030_write_reg16(JAZZ_IO_IRQ_ENABLE,
100 r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) & mask); 100 r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) & mask);
101 do_IRQ(irq, regs); 101 do_IRQ(irq);
102 r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, 102 r4030_write_reg16(JAZZ_IO_IRQ_ENABLE,
103 r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | mask); 103 r4030_read_reg16(JAZZ_IO_IRQ_ENABLE) | mask);
104} 104}
105 105
106static void ll_local_dev(struct pt_regs *regs) 106static void ll_local_dev(void)
107{ 107{
108 switch (r4030_read_reg32(JAZZ_IO_IRQ_SOURCE)) { 108 switch (r4030_read_reg32(JAZZ_IO_IRQ_SOURCE)) {
109 case 0: 109 case 0:
110 panic("Unimplemented loc_no_irq handler"); 110 panic("Unimplemented loc_no_irq handler");
111 break; 111 break;
112 case 4: 112 case 4:
113 loc_call(JAZZ_PARALLEL_IRQ, regs, JAZZ_IE_PARALLEL); 113 loc_call(JAZZ_PARALLEL_IRQ, JAZZ_IE_PARALLEL);
114 break; 114 break;
115 case 8: 115 case 8:
116 loc_call(JAZZ_PARALLEL_IRQ, regs, JAZZ_IE_FLOPPY); 116 loc_call(JAZZ_PARALLEL_IRQ, JAZZ_IE_FLOPPY);
117 break; 117 break;
118 case 12: 118 case 12:
119 panic("Unimplemented loc_sound handler"); 119 panic("Unimplemented loc_sound handler");
@@ -122,27 +122,27 @@ static void ll_local_dev(struct pt_regs *regs)
122 panic("Unimplemented loc_video handler"); 122 panic("Unimplemented loc_video handler");
123 break; 123 break;
124 case 20: 124 case 20:
125 loc_call(JAZZ_ETHERNET_IRQ, regs, JAZZ_IE_ETHERNET); 125 loc_call(JAZZ_ETHERNET_IRQ, JAZZ_IE_ETHERNET);
126 break; 126 break;
127 case 24: 127 case 24:
128 loc_call(JAZZ_SCSI_IRQ, regs, JAZZ_IE_SCSI); 128 loc_call(JAZZ_SCSI_IRQ, JAZZ_IE_SCSI);
129 break; 129 break;
130 case 28: 130 case 28:
131 loc_call(JAZZ_KEYBOARD_IRQ, regs, JAZZ_IE_KEYBOARD); 131 loc_call(JAZZ_KEYBOARD_IRQ, JAZZ_IE_KEYBOARD);
132 break; 132 break;
133 case 32: 133 case 32:
134 loc_call(JAZZ_MOUSE_IRQ, regs, JAZZ_IE_MOUSE); 134 loc_call(JAZZ_MOUSE_IRQ, JAZZ_IE_MOUSE);
135 break; 135 break;
136 case 36: 136 case 36:
137 loc_call(JAZZ_SERIAL1_IRQ, regs, JAZZ_IE_SERIAL1); 137 loc_call(JAZZ_SERIAL1_IRQ, JAZZ_IE_SERIAL1);
138 break; 138 break;
139 case 40: 139 case 40:
140 loc_call(JAZZ_SERIAL2_IRQ, regs, JAZZ_IE_SERIAL2); 140 loc_call(JAZZ_SERIAL2_IRQ, JAZZ_IE_SERIAL2);
141 break; 141 break;
142 } 142 }
143} 143}
144 144
145asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 145asmlinkage void plat_irq_dispatch(void)
146{ 146{
147 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 147 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
148 148
@@ -150,13 +150,13 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
150 write_c0_compare(0); 150 write_c0_compare(0);
151 else if (pending & IE_IRQ4) { 151 else if (pending & IE_IRQ4) {
152 r4030_read_reg32(JAZZ_TIMER_REGISTER); 152 r4030_read_reg32(JAZZ_TIMER_REGISTER);
153 do_IRQ(JAZZ_TIMER_IRQ, regs); 153 do_IRQ(JAZZ_TIMER_IRQ);
154 } else if (pending & IE_IRQ3) 154 } else if (pending & IE_IRQ3)
155 panic("Unimplemented ISA NMI handler"); 155 panic("Unimplemented ISA NMI handler");
156 else if (pending & IE_IRQ2) 156 else if (pending & IE_IRQ2)
157 do_IRQ(r4030_read_reg32(JAZZ_EISA_IRQ_ACK), regs); 157 do_IRQ(r4030_read_reg32(JAZZ_EISA_IRQ_ACK));
158 else if (pending & IE_IRQ1) { 158 else if (pending & IE_IRQ1) {
159 ll_local_dev(regs); 159 ll_local_dev();
160 } else if (unlikely(pending & IE_IRQ0)) 160 } else if (unlikely(pending & IE_IRQ0))
161 panic("Unimplemented local_dma handler"); 161 panic("Unimplemented local_dma handler");
162 else if (pending & IE_SW1) { 162 else if (pending & IE_SW1) {
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index 487a9ea1ef00..6dc4135d6e11 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -19,12 +19,12 @@
19#include <linux/fb.h> 19#include <linux/fb.h>
20#include <linux/ide.h> 20#include <linux/ide.h>
21#include <linux/pm.h> 21#include <linux/pm.h>
22#include <linux/screen_info.h>
22 23
23#include <asm/bootinfo.h> 24#include <asm/bootinfo.h>
24#include <asm/irq.h> 25#include <asm/irq.h>
25#include <asm/jazz.h> 26#include <asm/jazz.h>
26#include <asm/jazzdma.h> 27#include <asm/jazzdma.h>
27#include <asm/ptrace.h>
28#include <asm/reboot.h> 28#include <asm/reboot.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/pgtable.h> 30#include <asm/pgtable.h>
@@ -45,10 +45,27 @@ void __init plat_time_init(struct irqaction *irq)
45} 45}
46 46
47static struct resource jazz_io_resources[] = { 47static struct resource jazz_io_resources[] = {
48 { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, 48 {
49 { "timer", 0x40, 0x5f, IORESOURCE_BUSY }, 49 .start = 0x00,
50 { "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY }, 50 .end = 0x1f,
51 { "dma2", 0xc0, 0xdf, IORESOURCE_BUSY }, 51 .name = "dma1",
52 .flags = IORESOURCE_BUSY
53 }, {
54 .start = 0x40,
55 .end = 0x5f,
56 .name = "timer",
57 .end = IORESOURCE_BUSY
58 }, {
59 .start = 0x80,
60 .end = 0x8f,
61 .name = "dma page reg",
62 .flags = IORESOURCE_BUSY
63 }, {
64 .start = 0xc0,
65 .end = 0xdf,
66 .name = "dma2",
67 .flags = IORESOURCE_BUSY
68 }
52}; 69};
53 70
54void __init plat_mem_setup(void) 71void __init plat_mem_setup(void)
@@ -81,8 +98,6 @@ void __init plat_mem_setup(void)
81 _machine_halt = jazz_machine_halt; 98 _machine_halt = jazz_machine_halt;
82 pm_power_off = jazz_machine_power_off; 99 pm_power_off = jazz_machine_power_off;
83 100
84#warning "Somebody should check if screen_info is ok for Jazz."
85
86 screen_info = (struct screen_info) { 101 screen_info = (struct screen_info) {
87 0, 0, /* orig-x, orig-y */ 102 0, 0, /* orig-x, orig-y */
88 0, /* unused */ 103 0, /* unused */
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c
index 722174481467..39a0243bed9a 100644
--- a/arch/mips/jmr3927/rbhma3100/irq.c
+++ b/arch/mips/jmr3927/rbhma3100/irq.c
@@ -46,6 +46,7 @@
46#include <linux/smp_lock.h> 46#include <linux/smp_lock.h>
47#include <linux/bitops.h> 47#include <linux/bitops.h>
48 48
49#include <asm/irq_regs.h>
49#include <asm/io.h> 50#include <asm/io.h>
50#include <asm/mipsregs.h> 51#include <asm/mipsregs.h>
51#include <asm/system.h> 52#include <asm/system.h>
@@ -239,45 +240,80 @@ struct tb_irq_space jmr3927_ioc_irqspace = {
239 .space_id = 0, 240 .space_id = 0,
240 can_share : 1 241 can_share : 1
241}; 242};
243
242struct tb_irq_space jmr3927_irc_irqspace = { 244struct tb_irq_space jmr3927_irc_irqspace = {
243 .next = NULL, 245 .next = NULL,
244 .start_irqno = JMR3927_IRQ_IRC, 246 .start_irqno = JMR3927_IRQ_IRC,
245 nr_irqs : JMR3927_NR_IRQ_IRC, 247 .nr_irqs = JMR3927_NR_IRQ_IRC,
246 .mask_func = mask_irq_irc, 248 .mask_func = mask_irq_irc,
247 .unmask_func = unmask_irq_irc, 249 .unmask_func = unmask_irq_irc,
248 .name = "on-chip", 250 .name = "on-chip",
249 .space_id = 0, 251 .space_id = 0,
250 can_share : 0 252 .can_share = 0
251}; 253};
252 254
253void jmr3927_spurious(struct pt_regs *regs) 255
256#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
257static int tx_branch_likely_bug_count = 0;
258static int have_tx_branch_likely_bug = 0;
259
260static void tx_branch_likely_bug_fixup(void)
261{
262 struct pt_regs *regs = get_irq_regs();
263
264 /* TX39/49-BUG: Under this condition, the insn in delay slot
265 of the branch likely insn is executed (not nullified) even
266 the branch condition is false. */
267 if (!have_tx_branch_likely_bug)
268 return;
269 if ((regs->cp0_epc & 0xfff) == 0xffc &&
270 KSEGX(regs->cp0_epc) != KSEG0 &&
271 KSEGX(regs->cp0_epc) != KSEG1) {
272 unsigned int insn = *(unsigned int*)(regs->cp0_epc - 4);
273 /* beql,bnel,blezl,bgtzl */
274 /* bltzl,bgezl,blezall,bgezall */
275 /* bczfl, bcztl */
276 if ((insn & 0xf0000000) == 0x50000000 ||
277 (insn & 0xfc0e0000) == 0x04020000 ||
278 (insn & 0xf3fe0000) == 0x41020000) {
279 regs->cp0_epc -= 4;
280 tx_branch_likely_bug_count++;
281 printk(KERN_INFO
282 "fix branch-likery bug in %s (insn %08x)\n",
283 current->comm, insn);
284 }
285 }
286}
287#endif
288
289static void jmr3927_spurious(void)
254{ 290{
255#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND 291#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
256 tx_branch_likely_bug_fixup(regs); 292 tx_branch_likely_bug_fixup();
257#endif 293#endif
258 printk(KERN_WARNING "spurious interrupt (cause 0x%lx, pc 0x%lx, ra 0x%lx).\n", 294 printk(KERN_WARNING "spurious interrupt (cause 0x%lx, pc 0x%lx, ra 0x%lx).\n",
259 regs->cp0_cause, regs->cp0_epc, regs->regs[31]); 295 regs->cp0_cause, regs->cp0_epc, regs->regs[31]);
260} 296}
261 297
262asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 298asmlinkage void plat_irq_dispatch(void)
263{ 299{
264 int irq; 300 int irq;
265 301
266#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND 302#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
267 tx_branch_likely_bug_fixup(regs); 303 tx_branch_likely_bug_fixup();
268#endif 304#endif
269 if ((regs->cp0_cause & CAUSEF_IP7) == 0) { 305 if ((regs->cp0_cause & CAUSEF_IP7) == 0) {
270#if 0 306#if 0
271 jmr3927_spurious(regs); 307 jmr3927_spurious();
272#endif 308#endif
273 return; 309 return;
274 } 310 }
275 irq = (regs->cp0_cause >> CAUSEB_IP2) & 0x0f; 311 irq = (regs->cp0_cause >> CAUSEB_IP2) & 0x0f;
276 312
277 do_IRQ(irq + JMR3927_IRQ_IRC, regs); 313 do_IRQ(irq + JMR3927_IRQ_IRC);
278} 314}
279 315
280static irqreturn_t jmr3927_ioc_interrupt(int irq, void *dev_id, struct pt_regs *regs) 316static irqreturn_t jmr3927_ioc_interrupt(int irq, void *dev_id)
281{ 317{
282 unsigned char istat = jmr3927_ioc_reg_in(JMR3927_IOC_INTS2_ADDR); 318 unsigned char istat = jmr3927_ioc_reg_in(JMR3927_IOC_INTS2_ADDR);
283 int i; 319 int i;
@@ -285,7 +321,7 @@ static irqreturn_t jmr3927_ioc_interrupt(int irq, void *dev_id, struct pt_regs *
285 for (i = 0; i < JMR3927_NR_IRQ_IOC; i++) { 321 for (i = 0; i < JMR3927_NR_IRQ_IOC; i++) {
286 if (istat & (1 << i)) { 322 if (istat & (1 << i)) {
287 irq = JMR3927_IRQ_IOC + i; 323 irq = JMR3927_IRQ_IOC + i;
288 do_IRQ(irq, regs); 324 do_IRQ(irq);
289 } 325 }
290 } 326 }
291 return IRQ_HANDLED; 327 return IRQ_HANDLED;
@@ -295,7 +331,7 @@ static struct irqaction ioc_action = {
295 jmr3927_ioc_interrupt, 0, CPU_MASK_NONE, "IOC", NULL, NULL, 331 jmr3927_ioc_interrupt, 0, CPU_MASK_NONE, "IOC", NULL, NULL,
296}; 332};
297 333
298static irqreturn_t jmr3927_isac_interrupt(int irq, void *dev_id, struct pt_regs *regs) 334static irqreturn_t jmr3927_isac_interrupt(int irq, void *dev_id)
299{ 335{
300 unsigned char istat = jmr3927_isac_reg_in(JMR3927_ISAC_INTS2_ADDR); 336 unsigned char istat = jmr3927_isac_reg_in(JMR3927_ISAC_INTS2_ADDR);
301 int i; 337 int i;
@@ -303,7 +339,7 @@ static irqreturn_t jmr3927_isac_interrupt(int irq, void *dev_id, struct pt_regs
303 for (i = 0; i < JMR3927_NR_IRQ_ISAC; i++) { 339 for (i = 0; i < JMR3927_NR_IRQ_ISAC; i++) {
304 if (istat & (1 << i)) { 340 if (istat & (1 << i)) {
305 irq = JMR3927_IRQ_ISAC + i; 341 irq = JMR3927_IRQ_ISAC + i;
306 do_IRQ(irq, regs); 342 do_IRQ(irq);
307 } 343 }
308 } 344 }
309 return IRQ_HANDLED; 345 return IRQ_HANDLED;
@@ -314,7 +350,7 @@ static struct irqaction isac_action = {
314}; 350};
315 351
316 352
317static irqreturn_t jmr3927_isaerr_interrupt(int irq, void * dev_id, struct pt_regs * regs) 353static irqreturn_t jmr3927_isaerr_interrupt(int irq, void *dev_id)
318{ 354{
319 printk(KERN_WARNING "ISA error interrupt (irq 0x%x).\n", irq); 355 printk(KERN_WARNING "ISA error interrupt (irq 0x%x).\n", irq);
320 356
@@ -324,7 +360,7 @@ static struct irqaction isaerr_action = {
324 jmr3927_isaerr_interrupt, 0, CPU_MASK_NONE, "ISA error", NULL, NULL, 360 jmr3927_isaerr_interrupt, 0, CPU_MASK_NONE, "ISA error", NULL, NULL,
325}; 361};
326 362
327static irqreturn_t jmr3927_pcierr_interrupt(int irq, void * dev_id, struct pt_regs * regs) 363static irqreturn_t jmr3927_pcierr_interrupt(int irq, void *dev_id)
328{ 364{
329 printk(KERN_WARNING "PCI error interrupt (irq 0x%x).\n", irq); 365 printk(KERN_WARNING "PCI error interrupt (irq 0x%x).\n", irq);
330 printk(KERN_WARNING "pcistat:%02x, lbstat:%04lx\n", 366 printk(KERN_WARNING "pcistat:%02x, lbstat:%04lx\n",
@@ -439,33 +475,3 @@ void jmr3927_irq_init(u32 irq_base)
439 475
440 jmr3927_irq_base = irq_base; 476 jmr3927_irq_base = irq_base;
441} 477}
442
443#ifdef CONFIG_TX_BRANCH_LIKELY_BUG_WORKAROUND
444static int tx_branch_likely_bug_count = 0;
445static int have_tx_branch_likely_bug = 0;
446void tx_branch_likely_bug_fixup(struct pt_regs *regs)
447{
448 /* TX39/49-BUG: Under this condition, the insn in delay slot
449 of the branch likely insn is executed (not nullified) even
450 the branch condition is false. */
451 if (!have_tx_branch_likely_bug)
452 return;
453 if ((regs->cp0_epc & 0xfff) == 0xffc &&
454 KSEGX(regs->cp0_epc) != KSEG0 &&
455 KSEGX(regs->cp0_epc) != KSEG1) {
456 unsigned int insn = *(unsigned int*)(regs->cp0_epc - 4);
457 /* beql,bnel,blezl,bgtzl */
458 /* bltzl,bgezl,blezall,bgezall */
459 /* bczfl, bcztl */
460 if ((insn & 0xf0000000) == 0x50000000 ||
461 (insn & 0xfc0e0000) == 0x04020000 ||
462 (insn & 0xf3fe0000) == 0x41020000) {
463 regs->cp0_epc -= 4;
464 tx_branch_likely_bug_count++;
465 printk(KERN_INFO
466 "fix branch-likery bug in %s (insn %08x)\n",
467 current->comm, insn);
468 }
469 }
470}
471#endif
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index ec28077d5ee2..e9ce5b3721af 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -93,11 +93,12 @@ void output_thread_info_defines(void)
93 offset("#define TI_TASK ", struct thread_info, task); 93 offset("#define TI_TASK ", struct thread_info, task);
94 offset("#define TI_EXEC_DOMAIN ", struct thread_info, exec_domain); 94 offset("#define TI_EXEC_DOMAIN ", struct thread_info, exec_domain);
95 offset("#define TI_FLAGS ", struct thread_info, flags); 95 offset("#define TI_FLAGS ", struct thread_info, flags);
96 offset("#define TI_TP_VALUE ", struct thread_info, tp_value);
96 offset("#define TI_CPU ", struct thread_info, cpu); 97 offset("#define TI_CPU ", struct thread_info, cpu);
97 offset("#define TI_PRE_COUNT ", struct thread_info, preempt_count); 98 offset("#define TI_PRE_COUNT ", struct thread_info, preempt_count);
98 offset("#define TI_ADDR_LIMIT ", struct thread_info, addr_limit); 99 offset("#define TI_ADDR_LIMIT ", struct thread_info, addr_limit);
99 offset("#define TI_RESTART_BLOCK ", struct thread_info, restart_block); 100 offset("#define TI_RESTART_BLOCK ", struct thread_info, restart_block);
100 offset("#define TI_TP_VALUE ", struct thread_info, tp_value); 101 offset("#define TI_REGS ", struct thread_info, regs);
101 constant("#define _THREAD_SIZE_ORDER ", THREAD_SIZE_ORDER); 102 constant("#define _THREAD_SIZE_ORDER ", THREAD_SIZE_ORDER);
102 constant("#define _THREAD_SIZE ", THREAD_SIZE); 103 constant("#define _THREAD_SIZE ", THREAD_SIZE);
103 constant("#define _THREAD_MASK ", THREAD_MASK); 104 constant("#define _THREAD_MASK ", THREAD_MASK);
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index 9fbf8430c849..8485af340ee1 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -135,7 +135,6 @@ static inline void check_wait(void)
135 case CPU_R5000: 135 case CPU_R5000:
136 case CPU_NEVADA: 136 case CPU_NEVADA:
137 case CPU_RM7000: 137 case CPU_RM7000:
138 case CPU_RM9000:
139 case CPU_4KC: 138 case CPU_4KC:
140 case CPU_4KEC: 139 case CPU_4KEC:
141 case CPU_4KSC: 140 case CPU_4KSC:
@@ -164,6 +163,14 @@ static inline void check_wait(void)
164 } else 163 } else
165 printk(" unavailable.\n"); 164 printk(" unavailable.\n");
166 break; 165 break;
166 case CPU_RM9000:
167 if ((c->processor_id & 0x00ff) >= 0x40) {
168 cpu_wait = r4k_wait;
169 printk(" available.\n");
170 } else {
171 printk(" unavailable.\n");
172 }
173 break;
167 default: 174 default:
168 printk(" unavailable.\n"); 175 printk(" unavailable.\n");
169 break; 176 break;
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index 766655f35250..417c08ac76eb 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -20,10 +20,7 @@
20#include <asm/mipsmtregs.h> 20#include <asm/mipsmtregs.h>
21#endif 21#endif
22 22
23#ifdef CONFIG_PREEMPT 23#ifndef CONFIG_PREEMPT
24 .macro preempt_stop
25 .endm
26#else
27 .macro preempt_stop 24 .macro preempt_stop
28 local_irq_disable 25 local_irq_disable
29 .endm 26 .endm
@@ -32,9 +29,16 @@
32 29
33 .text 30 .text
34 .align 5 31 .align 5
32FEXPORT(ret_from_irq)
33 LONG_S s0, TI_REGS($28)
34#ifdef CONFIG_PREEMPT
35FEXPORT(ret_from_exception)
36#else
37 b _ret_from_irq
35FEXPORT(ret_from_exception) 38FEXPORT(ret_from_exception)
36 preempt_stop 39 preempt_stop
37FEXPORT(ret_from_irq) 40#endif
41FEXPORT(_ret_from_irq)
38 LONG_L t0, PT_STATUS(sp) # returning to kernel mode? 42 LONG_L t0, PT_STATUS(sp) # returning to kernel mode?
39 andi t0, t0, KU_USER 43 andi t0, t0, KU_USER
40 beqz t0, resume_kernel 44 beqz t0, resume_kernel
@@ -79,7 +83,6 @@ FEXPORT(syscall_exit)
79FEXPORT(restore_all) # restore full frame 83FEXPORT(restore_all) # restore full frame
80#ifdef CONFIG_MIPS_MT_SMTC 84#ifdef CONFIG_MIPS_MT_SMTC
81/* Detect and execute deferred IPI "interrupts" */ 85/* Detect and execute deferred IPI "interrupts" */
82 move a0,sp
83 jal deferred_smtc_ipi 86 jal deferred_smtc_ipi
84/* Re-arm any temporarily masked interrupts not explicitly "acked" */ 87/* Re-arm any temporarily masked interrupts not explicitly "acked" */
85 mfc0 v0, CP0_TCSTATUS 88 mfc0 v0, CP0_TCSTATUS
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index af6ef2fd8300..5baca16993d0 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -131,8 +131,9 @@ NESTED(handle_int, PT_SIZE, sp)
131 CLI 131 CLI
132 TRACE_IRQS_OFF 132 TRACE_IRQS_OFF
133 133
134 LONG_L s0, TI_REGS($28)
135 LONG_S sp, TI_REGS($28)
134 PTR_LA ra, ret_from_irq 136 PTR_LA ra, ret_from_irq
135 move a0, sp
136 j plat_irq_dispatch 137 j plat_irq_dispatch
137 END(handle_int) 138 END(handle_int)
138 139
@@ -219,7 +220,9 @@ NESTED(except_vec_vi_handler, 0, sp)
219#endif /* CONFIG_MIPS_MT_SMTC */ 220#endif /* CONFIG_MIPS_MT_SMTC */
220 CLI 221 CLI
221 TRACE_IRQS_OFF 222 TRACE_IRQS_OFF
222 move a0, sp 223
224 LONG_L s0, TI_REGS($28)
225 LONG_S sp, TI_REGS($28)
223 PTR_LA ra, ret_from_irq 226 PTR_LA ra, ret_from_irq
224 jr v0 227 jr v0
225 END(except_vec_vi_handler) 228 END(except_vec_vi_handler)
diff --git a/arch/mips/kernel/irq-msc01.c b/arch/mips/kernel/irq-msc01.c
index 63dfeb41796b..650a80ca3741 100644
--- a/arch/mips/kernel/irq-msc01.c
+++ b/arch/mips/kernel/irq-msc01.c
@@ -1,16 +1,17 @@
1/* 1/*
2 * Copyright (c) 2004 MIPS Inc
3 * Author: chris@mips.com
4 *
5 * This program is free software; you can redistribute it and/or modify it 2 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the 3 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your 4 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. 5 * option) any later version.
6 *
7 * Copyright (c) 2004 MIPS Inc
8 * Author: chris@mips.com
9 *
10 * Copyright (C) 2004, 06 Ralf Baechle <ralf@linux-mips.org>
9 */ 11 */
10#include <linux/module.h> 12#include <linux/module.h>
11#include <linux/interrupt.h> 13#include <linux/interrupt.h>
12#include <linux/kernel.h> 14#include <linux/kernel.h>
13#include <asm/ptrace.h>
14#include <linux/sched.h> 15#include <linux/sched.h>
15#include <linux/kernel_stat.h> 16#include <linux/kernel_stat.h>
16#include <asm/io.h> 17#include <asm/io.h>
@@ -115,14 +116,14 @@ static void end_msc_irq(unsigned int irq)
115/* 116/*
116 * Interrupt handler for interrupts coming from SOC-it. 117 * Interrupt handler for interrupts coming from SOC-it.
117 */ 118 */
118void ll_msc_irq(struct pt_regs *regs) 119void ll_msc_irq(void)
119{ 120{
120 unsigned int irq; 121 unsigned int irq;
121 122
122 /* read the interrupt vector register */ 123 /* read the interrupt vector register */
123 MSCIC_READ(MSC01_IC_VEC, irq); 124 MSCIC_READ(MSC01_IC_VEC, irq);
124 if (irq < 64) 125 if (irq < 64)
125 do_IRQ(irq + irq_base, regs); 126 do_IRQ(irq + irq_base);
126 else { 127 else {
127 /* Ignore spurious interrupt */ 128 /* Ignore spurious interrupt */
128 } 129 }
diff --git a/arch/mips/kernel/irq-mv6434x.c b/arch/mips/kernel/irq-mv6434x.c
index b117e64da64d..37d106202b83 100644
--- a/arch/mips/kernel/irq-mv6434x.c
+++ b/arch/mips/kernel/irq-mv6434x.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Copyright 2002 Momentum Computer 2 * Copyright 2002 Momentum Computer
3 * Author: mdharm@momenco.com 3 * Author: mdharm@momenco.com
4 * Copyright (C) 2004 Ralf Baechle <ralf@linux-mips.org> 4 * Copyright (C) 2004, 06 Ralf Baechle <ralf@linux-mips.org>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify it 6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the 7 * under the terms of the GNU General Public License as published by the
@@ -15,7 +15,6 @@
15#include <linux/mv643xx.h> 15#include <linux/mv643xx.h>
16#include <linux/sched.h> 16#include <linux/sched.h>
17 17
18#include <asm/ptrace.h>
19#include <asm/io.h> 18#include <asm/io.h>
20#include <asm/irq.h> 19#include <asm/irq.h>
21#include <asm/marvell.h> 20#include <asm/marvell.h>
@@ -113,7 +112,7 @@ static void end_mv64340_irq(unsigned int irq)
113 * Interrupt handler for interrupts coming from the Marvell chip. 112 * Interrupt handler for interrupts coming from the Marvell chip.
114 * It could be built in ethernet ports etc... 113 * It could be built in ethernet ports etc...
115 */ 114 */
116void ll_mv64340_irq(struct pt_regs *regs) 115void ll_mv64340_irq(void)
117{ 116{
118 unsigned int irq_src_low, irq_src_high; 117 unsigned int irq_src_low, irq_src_high;
119 unsigned int irq_mask_low, irq_mask_high; 118 unsigned int irq_mask_low, irq_mask_high;
@@ -129,9 +128,9 @@ void ll_mv64340_irq(struct pt_regs *regs)
129 irq_src_high &= irq_mask_high; 128 irq_src_high &= irq_mask_high;
130 129
131 if (irq_src_low) 130 if (irq_src_low)
132 do_IRQ(ls1bit32(irq_src_low) + irq_base, regs); 131 do_IRQ(ls1bit32(irq_src_low) + irq_base);
133 else 132 else
134 do_IRQ(ls1bit32(irq_src_high) + irq_base + 32, regs); 133 do_IRQ(ls1bit32(irq_src_high) + irq_base + 32);
135} 134}
136 135
137#define shutdown_mv64340_irq disable_mv64340_irq 136#define shutdown_mv64340_irq disable_mv64340_irq
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index a00b0e7ab9b1..dd24434392b6 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -53,9 +53,8 @@ unsigned long irq_hwmask[NR_IRQS];
53 * SMP cross-CPU interrupts have their own specific 53 * SMP cross-CPU interrupts have their own specific
54 * handlers). 54 * handlers).
55 */ 55 */
56asmlinkage unsigned int do_IRQ(unsigned int irq, struct pt_regs *regs) 56asmlinkage unsigned int do_IRQ(unsigned int irq)
57{ 57{
58 struct pt_regs *old_regs = set_irq_regs(regs);
59 irq_enter(); 58 irq_enter();
60 59
61 __DO_IRQ_SMTC_HOOK(); 60 __DO_IRQ_SMTC_HOOK();
@@ -63,7 +62,6 @@ asmlinkage unsigned int do_IRQ(unsigned int irq, struct pt_regs *regs)
63 62
64 irq_exit(); 63 irq_exit();
65 64
66 set_irq_regs(old_regs);
67 return 1; 65 return 1;
68} 66}
69 67
@@ -112,7 +110,7 @@ skip:
112 return 0; 110 return 0;
113} 111}
114 112
115asmlinkage void spurious_interrupt(struct pt_regs *regs) 113asmlinkage void spurious_interrupt(void)
116{ 114{
117 atomic_inc(&irq_err_count); 115 atomic_inc(&irq_err_count);
118} 116}
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index d8beef107902..4ed37ba19731 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -89,9 +89,9 @@ static const char *cpu_name[] = {
89 89
90static int show_cpuinfo(struct seq_file *m, void *v) 90static int show_cpuinfo(struct seq_file *m, void *v)
91{ 91{
92 unsigned int version = current_cpu_data.processor_id;
93 unsigned int fp_vers = current_cpu_data.fpu_id;
94 unsigned long n = (unsigned long) v - 1; 92 unsigned long n = (unsigned long) v - 1;
93 unsigned int version = cpu_data[n].processor_id;
94 unsigned int fp_vers = cpu_data[n].fpu_id;
95 char fmt [64]; 95 char fmt [64];
96 96
97#ifdef CONFIG_SMP 97#ifdef CONFIG_SMP
@@ -107,9 +107,9 @@ static int show_cpuinfo(struct seq_file *m, void *v)
107 107
108 seq_printf(m, "processor\t\t: %ld\n", n); 108 seq_printf(m, "processor\t\t: %ld\n", n);
109 sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n", 109 sprintf(fmt, "cpu model\t\t: %%s V%%d.%%d%s\n",
110 cpu_has_fpu ? " FPU V%d.%d" : ""); 110 cpu_data[n].options & MIPS_CPU_FPU ? " FPU V%d.%d" : "");
111 seq_printf(m, fmt, cpu_name[current_cpu_data.cputype <= CPU_LAST ? 111 seq_printf(m, fmt, cpu_name[cpu_data[n].cputype <= CPU_LAST ?
112 current_cpu_data.cputype : CPU_UNKNOWN], 112 cpu_data[n].cputype : CPU_UNKNOWN],
113 (version >> 4) & 0x0f, version & 0x0f, 113 (version >> 4) & 0x0f, version & 0x0f,
114 (fp_vers >> 4) & 0x0f, fp_vers & 0x0f); 114 (fp_vers >> 4) & 0x0f, fp_vers & 0x0f);
115 seq_printf(m, "BogoMIPS\t\t: %lu.%02lu\n", 115 seq_printf(m, "BogoMIPS\t\t: %lu.%02lu\n",
@@ -118,7 +118,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
118 seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no"); 118 seq_printf(m, "wait instruction\t: %s\n", cpu_wait ? "yes" : "no");
119 seq_printf(m, "microsecond timers\t: %s\n", 119 seq_printf(m, "microsecond timers\t: %s\n",
120 cpu_has_counter ? "yes" : "no"); 120 cpu_has_counter ? "yes" : "no");
121 seq_printf(m, "tlb_entries\t\t: %d\n", current_cpu_data.tlbsize); 121 seq_printf(m, "tlb_entries\t\t: %d\n", cpu_data[n].tlbsize);
122 seq_printf(m, "extra interrupt vector\t: %s\n", 122 seq_printf(m, "extra interrupt vector\t: %s\n",
123 cpu_has_divec ? "yes" : "no"); 123 cpu_has_divec ? "yes" : "no");
124 seq_printf(m, "hardware watchpoint\t: %s\n", 124 seq_printf(m, "hardware watchpoint\t: %s\n",
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 045d987bc683..9f307eb1a31e 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -115,7 +115,7 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
115 status |= KU_USER; 115 status |= KU_USER;
116 regs->cp0_status = status; 116 regs->cp0_status = status;
117 clear_used_math(); 117 clear_used_math();
118 lose_fpu(); 118 clear_fpu_owner();
119 if (cpu_has_dsp) 119 if (cpu_has_dsp)
120 __init_dsp(); 120 __init_dsp();
121 regs->cp0_epc = pc; 121 regs->cp0_epc = pc;
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 362d1728e531..258d74fd0b63 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -106,6 +106,7 @@ int ptrace_setregs (struct task_struct *child, __s64 __user *data)
106int ptrace_getfpregs (struct task_struct *child, __u32 __user *data) 106int ptrace_getfpregs (struct task_struct *child, __u32 __user *data)
107{ 107{
108 int i; 108 int i;
109 unsigned int tmp;
109 110
110 if (!access_ok(VERIFY_WRITE, data, 33 * 8)) 111 if (!access_ok(VERIFY_WRITE, data, 33 * 8))
111 return -EIO; 112 return -EIO;
@@ -121,10 +122,10 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data)
121 122
122 __put_user (child->thread.fpu.fcr31, data + 64); 123 __put_user (child->thread.fpu.fcr31, data + 64);
123 124
125 preempt_disable();
124 if (cpu_has_fpu) { 126 if (cpu_has_fpu) {
125 unsigned int flags, tmp; 127 unsigned int flags;
126 128
127 preempt_disable();
128 if (cpu_has_mipsmt) { 129 if (cpu_has_mipsmt) {
129 unsigned int vpflags = dvpe(); 130 unsigned int vpflags = dvpe();
130 flags = read_c0_status(); 131 flags = read_c0_status();
@@ -138,11 +139,11 @@ int ptrace_getfpregs (struct task_struct *child, __u32 __user *data)
138 __asm__ __volatile__("cfc1\t%0,$0" : "=r" (tmp)); 139 __asm__ __volatile__("cfc1\t%0,$0" : "=r" (tmp));
139 write_c0_status(flags); 140 write_c0_status(flags);
140 } 141 }
141 preempt_enable();
142 __put_user (tmp, data + 65);
143 } else { 142 } else {
144 __put_user ((__u32) 0, data + 65); 143 tmp = 0;
145 } 144 }
145 preempt_enable();
146 __put_user (tmp, data + 65);
146 147
147 return 0; 148 return 0;
148} 149}
@@ -245,16 +246,17 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
245 unsigned int mtflags; 246 unsigned int mtflags;
246#endif /* CONFIG_MIPS_MT_SMTC */ 247#endif /* CONFIG_MIPS_MT_SMTC */
247 248
248 if (!cpu_has_fpu) 249 preempt_disable();
250 if (!cpu_has_fpu) {
251 preempt_enable();
249 break; 252 break;
253 }
250 254
251#ifdef CONFIG_MIPS_MT_SMTC 255#ifdef CONFIG_MIPS_MT_SMTC
252 /* Read-modify-write of Status must be atomic */ 256 /* Read-modify-write of Status must be atomic */
253 local_irq_save(irqflags); 257 local_irq_save(irqflags);
254 mtflags = dmt(); 258 mtflags = dmt();
255#endif /* CONFIG_MIPS_MT_SMTC */ 259#endif /* CONFIG_MIPS_MT_SMTC */
256
257 preempt_disable();
258 if (cpu_has_mipsmt) { 260 if (cpu_has_mipsmt) {
259 unsigned int vpflags = dvpe(); 261 unsigned int vpflags = dvpe();
260 flags = read_c0_status(); 262 flags = read_c0_status();
diff --git a/arch/mips/kernel/ptrace32.c b/arch/mips/kernel/ptrace32.c
index f40ecd8be05f..d9a39c169450 100644
--- a/arch/mips/kernel/ptrace32.c
+++ b/arch/mips/kernel/ptrace32.c
@@ -175,7 +175,9 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
175 unsigned int mtflags; 175 unsigned int mtflags;
176#endif /* CONFIG_MIPS_MT_SMTC */ 176#endif /* CONFIG_MIPS_MT_SMTC */
177 177
178 preempt_disable();
178 if (!cpu_has_fpu) { 179 if (!cpu_has_fpu) {
180 preempt_enable();
179 tmp = 0; 181 tmp = 0;
180 break; 182 break;
181 } 183 }
@@ -186,7 +188,6 @@ asmlinkage int sys32_ptrace(int request, int pid, int addr, int data)
186 mtflags = dmt(); 188 mtflags = dmt();
187#endif /* CONFIG_MIPS_MT_SMTC */ 189#endif /* CONFIG_MIPS_MT_SMTC */
188 190
189 preempt_disable();
190 if (cpu_has_mipsmt) { 191 if (cpu_has_mipsmt) {
191 unsigned int vpflags = dvpe(); 192 unsigned int vpflags = dvpe();
192 flags = read_c0_status(); 193 flags = read_c0_status();
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index cdab1b2cd134..8c8c8324f775 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -61,16 +61,16 @@ static int sp_stopping = 0;
61 61
62extern void *vpe_get_shared(int index); 62extern void *vpe_get_shared(int index);
63 63
64static void rtlx_dispatch(struct pt_regs *regs) 64static void rtlx_dispatch(void)
65{ 65{
66 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ, regs); 66 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_RTLX_IRQ);
67} 67}
68 68
69 69
70/* Interrupt handler may be called before rtlx_init has otherwise had 70/* Interrupt handler may be called before rtlx_init has otherwise had
71 a chance to run. 71 a chance to run.
72*/ 72*/
73static irqreturn_t rtlx_interrupt(int irq, void *dev_id, struct pt_regs *regs) 73static irqreturn_t rtlx_interrupt(int irq, void *dev_id)
74{ 74{
75 int i; 75 int i;
76 76
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 766253c44f3f..3b5f3b632622 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -106,22 +106,22 @@ void __init sanitize_tlb_entries(void)
106 clear_c0_mvpcontrol(MVPCONTROL_VPC); 106 clear_c0_mvpcontrol(MVPCONTROL_VPC);
107} 107}
108 108
109static void ipi_resched_dispatch (struct pt_regs *regs) 109static void ipi_resched_dispatch(void)
110{ 110{
111 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ, regs); 111 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ);
112} 112}
113 113
114static void ipi_call_dispatch (struct pt_regs *regs) 114static void ipi_call_dispatch(void)
115{ 115{
116 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ, regs); 116 do_IRQ(MIPSCPU_INT_BASE + MIPS_CPU_IPI_CALL_IRQ);
117} 117}
118 118
119irqreturn_t ipi_resched_interrupt(int irq, void *dev_id, struct pt_regs *regs) 119static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
120{ 120{
121 return IRQ_HANDLED; 121 return IRQ_HANDLED;
122} 122}
123 123
124irqreturn_t ipi_call_interrupt(int irq, void *dev_id, struct pt_regs *regs) 124static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
125{ 125{
126 smp_call_function_interrupt(); 126 smp_call_function_interrupt();
127 127
@@ -250,8 +250,8 @@ void __init plat_prepare_cpus(unsigned int max_cpus)
250{ 250{
251 /* set up ipi interrupts */ 251 /* set up ipi interrupts */
252 if (cpu_has_vint) { 252 if (cpu_has_vint) {
253 set_vi_handler (MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch); 253 set_vi_handler(MIPS_CPU_IPI_RESCHED_IRQ, ipi_resched_dispatch);
254 set_vi_handler (MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch); 254 set_vi_handler(MIPS_CPU_IPI_CALL_IRQ, ipi_call_dispatch);
255 } 255 }
256 256
257 cpu_ipi_resched_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ; 257 cpu_ipi_resched_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_RESCHED_IRQ;
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
index 221895802dca..1af3612a1ce8 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -467,14 +467,18 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices);
467 467
468static int __init topology_init(void) 468static int __init topology_init(void)
469{ 469{
470 int cpu; 470 int i, ret;
471 int ret;
472 471
473 for_each_present_cpu(cpu) { 472#ifdef CONFIG_NUMA
474 ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu); 473 for_each_online_node(i)
474 register_one_node(i);
475#endif /* CONFIG_NUMA */
476
477 for_each_present_cpu(i) {
478 ret = register_cpu(&per_cpu(cpu_devices, i), i);
475 if (ret) 479 if (ret)
476 printk(KERN_WARNING "topology_init: register_cpu %d " 480 printk(KERN_WARNING "topology_init: register_cpu %d "
477 "failed (%d)\n", cpu, ret); 481 "failed (%d)\n", i, ret);
478 } 482 }
479 483
480 return 0; 484 return 0;
diff --git a/arch/mips/kernel/smtc-asm.S b/arch/mips/kernel/smtc-asm.S
index 76cb31d57482..1cb9441f1474 100644
--- a/arch/mips/kernel/smtc-asm.S
+++ b/arch/mips/kernel/smtc-asm.S
@@ -97,15 +97,12 @@ FEXPORT(__smtc_ipi_vector)
97 SAVE_ALL 97 SAVE_ALL
98 CLI 98 CLI
99 TRACE_IRQS_OFF 99 TRACE_IRQS_OFF
100 move a0,sp
101 /* Function to be invoked passed stack pad slot 5 */ 100 /* Function to be invoked passed stack pad slot 5 */
102 lw t0,PT_PADSLOT5(sp) 101 lw t0,PT_PADSLOT5(sp)
103 /* Argument from sender passed in stack pad slot 4 */ 102 /* Argument from sender passed in stack pad slot 4 */
104 lw a1,PT_PADSLOT4(sp) 103 lw a0,PT_PADSLOT4(sp)
105 jalr t0 104 PTR_LA ra, _ret_from_irq
106 nop 105 jr t0
107 j ret_from_irq
108 nop
109 106
110/* 107/*
111 * Called from idle loop to provoke processing of queued IPIs 108 * Called from idle loop to provoke processing of queued IPIs
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 604bcc5cb7c8..cc1f7474f7d7 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -82,7 +82,7 @@ struct smtc_ipi_q freeIPIq;
82 82
83/* Forward declarations */ 83/* Forward declarations */
84 84
85void ipi_decode(struct pt_regs *, struct smtc_ipi *); 85void ipi_decode(struct smtc_ipi *);
86void post_direct_ipi(int cpu, struct smtc_ipi *pipi); 86void post_direct_ipi(int cpu, struct smtc_ipi *pipi);
87void setup_cross_vpe_interrupts(void); 87void setup_cross_vpe_interrupts(void);
88void init_smtc_stats(void); 88void init_smtc_stats(void);
@@ -820,19 +820,19 @@ void post_direct_ipi(int cpu, struct smtc_ipi *pipi)
820 write_tc_c0_tcrestart(__smtc_ipi_vector); 820 write_tc_c0_tcrestart(__smtc_ipi_vector);
821} 821}
822 822
823void ipi_resched_interrupt(struct pt_regs *regs) 823static void ipi_resched_interrupt(void)
824{ 824{
825 /* Return from interrupt should be enough to cause scheduler check */ 825 /* Return from interrupt should be enough to cause scheduler check */
826} 826}
827 827
828 828
829void ipi_call_interrupt(struct pt_regs *regs) 829static void ipi_call_interrupt(void)
830{ 830{
831 /* Invoke generic function invocation code in smp.c */ 831 /* Invoke generic function invocation code in smp.c */
832 smp_call_function_interrupt(); 832 smp_call_function_interrupt();
833} 833}
834 834
835void ipi_decode(struct pt_regs *regs, struct smtc_ipi *pipi) 835void ipi_decode(struct smtc_ipi *pipi)
836{ 836{
837 void *arg_copy = pipi->arg; 837 void *arg_copy = pipi->arg;
838 int type_copy = pipi->type; 838 int type_copy = pipi->type;
@@ -846,15 +846,15 @@ void ipi_decode(struct pt_regs *regs, struct smtc_ipi *pipi)
846#ifdef SMTC_IDLE_HOOK_DEBUG 846#ifdef SMTC_IDLE_HOOK_DEBUG
847 clock_hang_reported[dest_copy] = 0; 847 clock_hang_reported[dest_copy] = 0;
848#endif /* SMTC_IDLE_HOOK_DEBUG */ 848#endif /* SMTC_IDLE_HOOK_DEBUG */
849 local_timer_interrupt(0, NULL, regs); 849 local_timer_interrupt(0, NULL);
850 break; 850 break;
851 case LINUX_SMP_IPI: 851 case LINUX_SMP_IPI:
852 switch ((int)arg_copy) { 852 switch ((int)arg_copy) {
853 case SMP_RESCHEDULE_YOURSELF: 853 case SMP_RESCHEDULE_YOURSELF:
854 ipi_resched_interrupt(regs); 854 ipi_resched_interrupt();
855 break; 855 break;
856 case SMP_CALL_FUNCTION: 856 case SMP_CALL_FUNCTION:
857 ipi_call_interrupt(regs); 857 ipi_call_interrupt();
858 break; 858 break;
859 default: 859 default:
860 printk("Impossible SMTC IPI Argument 0x%x\n", 860 printk("Impossible SMTC IPI Argument 0x%x\n",
@@ -868,7 +868,7 @@ void ipi_decode(struct pt_regs *regs, struct smtc_ipi *pipi)
868 } 868 }
869} 869}
870 870
871void deferred_smtc_ipi(struct pt_regs *regs) 871void deferred_smtc_ipi(void)
872{ 872{
873 struct smtc_ipi *pipi; 873 struct smtc_ipi *pipi;
874 unsigned long flags; 874 unsigned long flags;
@@ -883,7 +883,7 @@ void deferred_smtc_ipi(struct pt_regs *regs)
883 while((pipi = smtc_ipi_dq(&IPIQ[q])) != NULL) { 883 while((pipi = smtc_ipi_dq(&IPIQ[q])) != NULL) {
884 /* ipi_decode() should be called with interrupts off */ 884 /* ipi_decode() should be called with interrupts off */
885 local_irq_save(flags); 885 local_irq_save(flags);
886 ipi_decode(regs, pipi); 886 ipi_decode(pipi);
887 local_irq_restore(flags); 887 local_irq_restore(flags);
888 } 888 }
889 } 889 }
@@ -917,7 +917,7 @@ void smtc_timer_broadcast(int vpe)
917 917
918static int cpu_ipi_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_IRQ; 918static int cpu_ipi_irq = MIPSCPU_INT_BASE + MIPS_CPU_IPI_IRQ;
919 919
920static irqreturn_t ipi_interrupt(int irq, void *dev_idm, struct pt_regs *regs) 920static irqreturn_t ipi_interrupt(int irq, void *dev_idm)
921{ 921{
922 int my_vpe = cpu_data[smp_processor_id()].vpe_id; 922 int my_vpe = cpu_data[smp_processor_id()].vpe_id;
923 int my_tc = cpu_data[smp_processor_id()].tc_id; 923 int my_tc = cpu_data[smp_processor_id()].tc_id;
@@ -978,7 +978,7 @@ static irqreturn_t ipi_interrupt(int irq, void *dev_idm, struct pt_regs *regs)
978 * with interrupts off 978 * with interrupts off
979 */ 979 */
980 local_irq_save(flags); 980 local_irq_save(flags);
981 ipi_decode(regs, pipi); 981 ipi_decode(pipi);
982 local_irq_restore(flags); 982 local_irq_restore(flags);
983 } 983 }
984 } 984 }
@@ -987,9 +987,9 @@ static irqreturn_t ipi_interrupt(int irq, void *dev_idm, struct pt_regs *regs)
987 return IRQ_HANDLED; 987 return IRQ_HANDLED;
988} 988}
989 989
990static void ipi_irq_dispatch(struct pt_regs *regs) 990static void ipi_irq_dispatch(void)
991{ 991{
992 do_IRQ(cpu_ipi_irq, regs); 992 do_IRQ(cpu_ipi_irq);
993} 993}
994 994
995static struct irqaction irq_ipi; 995static struct irqaction irq_ipi;
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index d349eb9e4ffb..debe86c2f691 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -324,8 +324,7 @@ static long last_rtc_update;
324 */ 324 */
325void local_timer_interrupt(int irq, void *dev_id) 325void local_timer_interrupt(int irq, void *dev_id)
326{ 326{
327 if (current->pid) 327 profile_tick(CPU_PROFILING);
328 profile_tick(CPU_PROFILING);
329 update_process_times(user_mode(get_irq_regs())); 328 update_process_times(user_mode(get_irq_regs()));
330} 329}
331 330
@@ -434,9 +433,8 @@ int (*perf_irq)(void) = null_perf_irq;
434EXPORT_SYMBOL(null_perf_irq); 433EXPORT_SYMBOL(null_perf_irq);
435EXPORT_SYMBOL(perf_irq); 434EXPORT_SYMBOL(perf_irq);
436 435
437asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs) 436asmlinkage void ll_timer_interrupt(int irq)
438{ 437{
439 struct pt_regs *old_regs = set_irq_regs(regs);
440 int r2 = cpu_has_mips_r2; 438 int r2 = cpu_has_mips_r2;
441 439
442 irq_enter(); 440 irq_enter();
@@ -458,12 +456,10 @@ asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs)
458 456
459out: 457out:
460 irq_exit(); 458 irq_exit();
461 set_irq_regs(old_regs);
462} 459}
463 460
464asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs) 461asmlinkage void ll_local_timer_interrupt(int irq)
465{ 462{
466 struct pt_regs *old_regs = set_irq_regs(regs);
467 irq_enter(); 463 irq_enter();
468 if (smp_processor_id() != 0) 464 if (smp_processor_id() != 0)
469 kstat_this_cpu.irqs[irq]++; 465 kstat_this_cpu.irqs[irq]++;
@@ -472,7 +468,6 @@ asmlinkage void ll_local_timer_interrupt(int irq, struct pt_regs *regs)
472 local_timer_interrupt(irq, NULL); 468 local_timer_interrupt(irq, NULL);
473 469
474 irq_exit(); 470 irq_exit();
475 set_irq_regs(old_regs);
476} 471}
477 472
478/* 473/*
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index b7292a56d4cd..cce8313ec27d 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -66,7 +66,7 @@ extern asmlinkage void handle_mcheck(void);
66extern asmlinkage void handle_reserved(void); 66extern asmlinkage void handle_reserved(void);
67 67
68extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, 68extern int fpu_emulator_cop1Handler(struct pt_regs *xcp,
69 struct mips_fpu_struct *ctx); 69 struct mips_fpu_struct *ctx, int has_fpu);
70 70
71void (*board_be_init)(void); 71void (*board_be_init)(void);
72int (*board_be_handler)(struct pt_regs *regs, int is_fixup); 72int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
@@ -641,7 +641,7 @@ asmlinkage void do_fpe(struct pt_regs *regs, unsigned long fcr31)
641 preempt_enable(); 641 preempt_enable();
642 642
643 /* Run the emulator */ 643 /* Run the emulator */
644 sig = fpu_emulator_cop1Handler (regs, &current->thread.fpu); 644 sig = fpu_emulator_cop1Handler (regs, &current->thread.fpu, 1);
645 645
646 preempt_disable(); 646 preempt_disable();
647 647
@@ -791,11 +791,13 @@ asmlinkage void do_cpu(struct pt_regs *regs)
791 set_used_math(); 791 set_used_math();
792 } 792 }
793 793
794 preempt_enable(); 794 if (cpu_has_fpu) {
795 795 preempt_enable();
796 if (!cpu_has_fpu) { 796 } else {
797 int sig = fpu_emulator_cop1Handler(regs, 797 int sig;
798 &current->thread.fpu); 798 preempt_enable();
799 sig = fpu_emulator_cop1Handler(regs,
800 &current->thread.fpu, 0);
799 if (sig) 801 if (sig)
800 force_sig(sig, current); 802 force_sig(sig, current);
801#ifdef CONFIG_MIPS_MT_FPAFF 803#ifdef CONFIG_MIPS_MT_FPAFF
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c
index 456be8fc961a..a144a002dcc4 100644
--- a/arch/mips/lasat/interrupt.c
+++ b/arch/mips/lasat/interrupt.c
@@ -108,14 +108,14 @@ static unsigned long get_int_status_200(void)
108 return int_status; 108 return int_status;
109} 109}
110 110
111asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 111asmlinkage void plat_irq_dispatch(void)
112{ 112{
113 unsigned long int_status; 113 unsigned long int_status;
114 unsigned int cause = read_c0_cause(); 114 unsigned int cause = read_c0_cause();
115 int irq; 115 int irq;
116 116
117 if (cause & CAUSEF_IP7) { /* R4000 count / compare IRQ */ 117 if (cause & CAUSEF_IP7) { /* R4000 count / compare IRQ */
118 ll_timer_interrupt(7, regs); 118 ll_timer_interrupt(7);
119 return; 119 return;
120 } 120 }
121 121
@@ -125,7 +125,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
125 if (int_status) { 125 if (int_status) {
126 irq = ls1bit32(int_status); 126 irq = ls1bit32(int_status);
127 127
128 do_IRQ(irq, regs); 128 do_IRQ(irq);
129 } 129 }
130} 130}
131 131
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 3f0d5d26d506..80531b35cd61 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -38,8 +38,6 @@
38 38
39#include <asm/inst.h> 39#include <asm/inst.h>
40#include <asm/bootinfo.h> 40#include <asm/bootinfo.h>
41#include <asm/cpu.h>
42#include <asm/cpu-features.h>
43#include <asm/processor.h> 41#include <asm/processor.h>
44#include <asm/ptrace.h> 42#include <asm/ptrace.h>
45#include <asm/signal.h> 43#include <asm/signal.h>
@@ -1233,7 +1231,8 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1233 return 0; 1231 return 0;
1234} 1232}
1235 1233
1236int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx) 1234int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
1235 int has_fpu)
1237{ 1236{
1238 unsigned long oldepc, prevepc; 1237 unsigned long oldepc, prevepc;
1239 mips_instruction insn; 1238 mips_instruction insn;
@@ -1263,7 +1262,7 @@ int fpu_emulator_cop1Handler(struct pt_regs *xcp, struct mips_fpu_struct *ctx)
1263 ieee754_csr.rm = mips_rm[ieee754_csr.rm]; 1262 ieee754_csr.rm = mips_rm[ieee754_csr.rm];
1264 } 1263 }
1265 1264
1266 if (cpu_has_fpu) 1265 if (has_fpu)
1267 break; 1266 break;
1268 if (sig) 1267 if (sig)
1269 break; 1268 break;
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c
index a020a3cb4f4b..be624b8c3b0e 100644
--- a/arch/mips/mips-boards/atlas/atlas_int.c
+++ b/arch/mips/mips-boards/atlas/atlas_int.c
@@ -101,7 +101,7 @@ static inline int ls1bit32(unsigned int x)
101 return b; 101 return b;
102} 102}
103 103
104static inline void atlas_hw0_irqdispatch(struct pt_regs *regs) 104static inline void atlas_hw0_irqdispatch(void)
105{ 105{
106 unsigned long int_status; 106 unsigned long int_status;
107 int irq; 107 int irq;
@@ -116,7 +116,7 @@ static inline void atlas_hw0_irqdispatch(struct pt_regs *regs)
116 116
117 DEBUG_INT("atlas_hw0_irqdispatch: irq=%d\n", irq); 117 DEBUG_INT("atlas_hw0_irqdispatch: irq=%d\n", irq);
118 118
119 do_IRQ(irq, regs); 119 do_IRQ(irq);
120} 120}
121 121
122static inline int clz(unsigned long x) 122static inline int clz(unsigned long x)
@@ -188,7 +188,7 @@ static inline unsigned int irq_ffs(unsigned int pending)
188 * then we just return, if multiple IRQs are pending then we will just take 188 * then we just return, if multiple IRQs are pending then we will just take
189 * another exception, big deal. 189 * another exception, big deal.
190 */ 190 */
191asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 191asmlinkage void plat_irq_dispatch(void)
192{ 192{
193 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 193 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
194 int irq; 194 int irq;
@@ -196,11 +196,11 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
196 irq = irq_ffs(pending); 196 irq = irq_ffs(pending);
197 197
198 if (irq == MIPSCPU_INT_ATLAS) 198 if (irq == MIPSCPU_INT_ATLAS)
199 atlas_hw0_irqdispatch(regs); 199 atlas_hw0_irqdispatch();
200 else if (irq >= 0) 200 else if (irq >= 0)
201 do_IRQ(MIPSCPU_INT_BASE + irq, regs); 201 do_IRQ(MIPSCPU_INT_BASE + irq);
202 else 202 else
203 spurious_interrupt(regs); 203 spurious_interrupt();
204} 204}
205 205
206static inline void init_atlas_irqs (int base) 206static inline void init_atlas_irqs (int base)
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index 8d15861fce61..6f8a9fe7c1e3 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -30,7 +30,6 @@
30 30
31#include <asm/mipsregs.h> 31#include <asm/mipsregs.h>
32#include <asm/mipsmtregs.h> 32#include <asm/mipsmtregs.h>
33#include <asm/ptrace.h>
34#include <asm/hardirq.h> 33#include <asm/hardirq.h>
35#include <asm/irq.h> 34#include <asm/irq.h>
36#include <asm/div64.h> 35#include <asm/div64.h>
@@ -82,19 +81,19 @@ static inline void scroll_display_message(void)
82 } 81 }
83} 82}
84 83
85static void mips_timer_dispatch (struct pt_regs *regs) 84static void mips_timer_dispatch(void)
86{ 85{
87 do_IRQ (mips_cpu_timer_irq, regs); 86 do_IRQ(mips_cpu_timer_irq);
88} 87}
89 88
90/* 89/*
91 * Redeclare until I get around mopping the timer code insanity on MIPS. 90 * Redeclare until I get around mopping the timer code insanity on MIPS.
92 */ 91 */
93extern int null_perf_irq(struct pt_regs *regs); 92extern int null_perf_irq(void);
94 93
95extern int (*perf_irq)(struct pt_regs *regs); 94extern int (*perf_irq)(void);
96 95
97irqreturn_t mips_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 96irqreturn_t mips_timer_interrupt(int irq, void *dev_id)
98{ 97{
99 int cpu = smp_processor_id(); 98 int cpu = smp_processor_id();
100 99
@@ -119,7 +118,7 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
119 * perf counter overflow, or both. 118 * perf counter overflow, or both.
120 */ 119 */
121 if (read_c0_cause() & (1 << 26)) 120 if (read_c0_cause() & (1 << 26))
122 perf_irq(regs); 121 perf_irq();
123 122
124 if (read_c0_cause() & (1 << 30)) { 123 if (read_c0_cause() & (1 << 30)) {
125 /* If timer interrupt, make it de-assert */ 124 /* If timer interrupt, make it de-assert */
@@ -139,13 +138,13 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
139 * the tick on VPE 0 to run the full timer_interrupt(). 138 * the tick on VPE 0 to run the full timer_interrupt().
140 */ 139 */
141 if (cpu_data[cpu].vpe_id == 0) { 140 if (cpu_data[cpu].vpe_id == 0) {
142 timer_interrupt(irq, NULL, regs); 141 timer_interrupt(irq, NULL);
143 smtc_timer_broadcast(cpu_data[cpu].vpe_id); 142 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
144 scroll_display_message(); 143 scroll_display_message();
145 } else { 144 } else {
146 write_c0_compare(read_c0_count() + 145 write_c0_compare(read_c0_count() +
147 (mips_hpt_frequency/HZ)); 146 (mips_hpt_frequency/HZ));
148 local_timer_interrupt(irq, dev_id, regs); 147 local_timer_interrupt(irq, dev_id);
149 smtc_timer_broadcast(cpu_data[cpu].vpe_id); 148 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
150 } 149 }
151 } 150 }
@@ -159,12 +158,12 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
159 * timer int. 158 * timer int.
160 */ 159 */
161 if (!r2 || (read_c0_cause() & (1 << 26))) 160 if (!r2 || (read_c0_cause() & (1 << 26)))
162 if (perf_irq(regs)) 161 if (perf_irq())
163 goto out; 162 goto out;
164 163
165 /* we keep interrupt disabled all the time */ 164 /* we keep interrupt disabled all the time */
166 if (!r2 || (read_c0_cause() & (1 << 30))) 165 if (!r2 || (read_c0_cause() & (1 << 30)))
167 timer_interrupt(irq, NULL, regs); 166 timer_interrupt(irq, NULL);
168 167
169 scroll_display_message(); 168 scroll_display_message();
170 } else { 169 } else {
@@ -180,7 +179,7 @@ irqreturn_t mips_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
180 /* 179 /*
181 * Other CPUs should do profiling and process accounting 180 * Other CPUs should do profiling and process accounting
182 */ 181 */
183 local_timer_interrupt(irq, dev_id, regs); 182 local_timer_interrupt(irq, dev_id);
184 } 183 }
185out: 184out:
186#endif /* CONFIG_MIPS_MT_SMTC */ 185#endif /* CONFIG_MIPS_MT_SMTC */
diff --git a/arch/mips/mips-boards/malta/malta_int.c b/arch/mips/mips-boards/malta/malta_int.c
index 7cc0ba4f553a..6244d0e2c7de 100644
--- a/arch/mips/mips-boards/malta/malta_int.c
+++ b/arch/mips/mips-boards/malta/malta_int.c
@@ -114,7 +114,7 @@ static inline int get_int(void)
114 return irq; 114 return irq;
115} 115}
116 116
117static void malta_hw0_irqdispatch(struct pt_regs *regs) 117static void malta_hw0_irqdispatch(void)
118{ 118{
119 int irq; 119 int irq;
120 120
@@ -123,17 +123,21 @@ static void malta_hw0_irqdispatch(struct pt_regs *regs)
123 return; /* interrupt has already been cleared */ 123 return; /* interrupt has already been cleared */
124 } 124 }
125 125
126 do_IRQ(MALTA_INT_BASE+irq, regs); 126 do_IRQ(MALTA_INT_BASE + irq);
127} 127}
128 128
129void corehi_irqdispatch(struct pt_regs *regs) 129static void corehi_irqdispatch(void)
130{ 130{
131 unsigned int intedge, intsteer, pcicmd, pcibadaddr;
132 unsigned int pcimstat, intisr, inten, intpol;
131 unsigned int intrcause,datalo,datahi; 133 unsigned int intrcause,datalo,datahi;
132 unsigned int pcimstat, intisr, inten, intpol, intedge, intsteer, pcicmd, pcibadaddr; 134 struct pt_regs *regs;
133 135
134 printk("CoreHI interrupt, shouldn't happen, so we die here!!!\n"); 136 printk("CoreHI interrupt, shouldn't happen, so we die here!!!\n");
135 printk("epc : %08lx\nStatus: %08lx\nCause : %08lx\nbadVaddr : %08lx\n" 137 printk("epc : %08lx\nStatus: %08lx\n"
136, regs->cp0_epc, regs->cp0_status, regs->cp0_cause, regs->cp0_badvaddr); 138 "Cause : %08lx\nbadVaddr : %08lx\n",
139 regs->cp0_epc, regs->cp0_status,
140 regs->cp0_cause, regs->cp0_badvaddr);
137 141
138 /* Read all the registers and then print them as there is a 142 /* Read all the registers and then print them as there is a
139 problem with interspersed printk's upsetting the Bonito controller. 143 problem with interspersed printk's upsetting the Bonito controller.
@@ -146,7 +150,7 @@ void corehi_irqdispatch(struct pt_regs *regs)
146 case MIPS_REVISION_CORID_CORE_FPGA3: 150 case MIPS_REVISION_CORID_CORE_FPGA3:
147 case MIPS_REVISION_CORID_CORE_24K: 151 case MIPS_REVISION_CORID_CORE_24K:
148 case MIPS_REVISION_CORID_CORE_EMUL_MSC: 152 case MIPS_REVISION_CORID_CORE_EMUL_MSC:
149 ll_msc_irq(regs); 153 ll_msc_irq();
150 break; 154 break;
151 case MIPS_REVISION_CORID_QED_RM5261: 155 case MIPS_REVISION_CORID_QED_RM5261:
152 case MIPS_REVISION_CORID_CORE_LV: 156 case MIPS_REVISION_CORID_CORE_LV:
@@ -208,23 +212,23 @@ static inline unsigned int irq_ffs(unsigned int pending)
208 unsigned int a0 = 7; 212 unsigned int a0 = 7;
209 unsigned int t0; 213 unsigned int t0;
210 214
211 t0 = s0 & 0xf000; 215 t0 = pending & 0xf000;
212 t0 = t0 < 1; 216 t0 = t0 < 1;
213 t0 = t0 << 2; 217 t0 = t0 << 2;
214 a0 = a0 - t0; 218 a0 = a0 - t0;
215 s0 = s0 << t0; 219 pending = pending << t0;
216 220
217 t0 = s0 & 0xc000; 221 t0 = pending & 0xc000;
218 t0 = t0 < 1; 222 t0 = t0 < 1;
219 t0 = t0 << 1; 223 t0 = t0 << 1;
220 a0 = a0 - t0; 224 a0 = a0 - t0;
221 s0 = s0 << t0; 225 pending = pending << t0;
222 226
223 t0 = s0 & 0x8000; 227 t0 = pending & 0x8000;
224 t0 = t0 < 1; 228 t0 = t0 < 1;
225 //t0 = t0 << 2; 229 //t0 = t0 << 2;
226 a0 = a0 - t0; 230 a0 = a0 - t0;
227 //s0 = s0 << t0; 231 //pending = pending << t0;
228 232
229 return a0; 233 return a0;
230#endif 234#endif
@@ -255,7 +259,7 @@ static inline unsigned int irq_ffs(unsigned int pending)
255 * another exception, big deal. 259 * another exception, big deal.
256 */ 260 */
257 261
258asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 262asmlinkage void plat_irq_dispatch(void)
259{ 263{
260 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 264 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
261 int irq; 265 int irq;
@@ -263,11 +267,11 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
263 irq = irq_ffs(pending); 267 irq = irq_ffs(pending);
264 268
265 if (irq == MIPSCPU_INT_I8259A) 269 if (irq == MIPSCPU_INT_I8259A)
266 malta_hw0_irqdispatch(regs); 270 malta_hw0_irqdispatch();
267 else if (irq > 0) 271 else if (irq > 0)
268 do_IRQ(MIPSCPU_INT_BASE + irq, regs); 272 do_IRQ(MIPSCPU_INT_BASE + irq);
269 else 273 else
270 spurious_interrupt(regs); 274 spurious_interrupt();
271} 275}
272 276
273static struct irqaction i8259irq = { 277static struct irqaction i8259irq = {
diff --git a/arch/mips/mips-boards/sead/sead_int.c b/arch/mips/mips-boards/sead/sead_int.c
index 9168d934c661..f445fcddfdfd 100644
--- a/arch/mips/mips-boards/sead/sead_int.c
+++ b/arch/mips/mips-boards/sead/sead_int.c
@@ -98,7 +98,7 @@ static inline unsigned int irq_ffs(unsigned int pending)
98 * then we just return, if multiple IRQs are pending then we will just take 98 * then we just return, if multiple IRQs are pending then we will just take
99 * another exception, big deal. 99 * another exception, big deal.
100 */ 100 */
101asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 101asmlinkage void plat_irq_dispatch(void)
102{ 102{
103 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 103 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
104 int irq; 104 int irq;
@@ -106,7 +106,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
106 irq = irq_ffs(pending); 106 irq = irq_ffs(pending);
107 107
108 if (irq >= 0) 108 if (irq >= 0)
109 do_IRQ(MIPSCPU_INT_BASE + irq, regs); 109 do_IRQ(MIPSCPU_INT_BASE + irq);
110 else 110 else
111 spurious_interrupt(regs); 111 spurious_interrupt(regs);
112} 112}
diff --git a/arch/mips/mips-boards/sim/sim_int.c b/arch/mips/mips-boards/sim/sim_int.c
index 2c15c8efec4e..2ce449dce6f2 100644
--- a/arch/mips/mips-boards/sim/sim_int.c
+++ b/arch/mips/mips-boards/sim/sim_int.c
@@ -71,12 +71,7 @@ static inline unsigned int irq_ffs(unsigned int pending)
71#endif 71#endif
72} 72}
73 73
74static inline void sim_hw0_irqdispatch(struct pt_regs *regs) 74asmlinkage void plat_irq_dispatch(void)
75{
76 do_IRQ(2, regs);
77}
78
79asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
80{ 75{
81 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 76 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
82 int irq; 77 int irq;
@@ -84,9 +79,9 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
84 irq = irq_ffs(pending); 79 irq = irq_ffs(pending);
85 80
86 if (irq > 0) 81 if (irq > 0)
87 do_IRQ(MIPSCPU_INT_BASE + irq, regs); 82 do_IRQ(MIPSCPU_INT_BASE + irq);
88 else 83 else
89 spurious_interrupt(regs); 84 spurious_interrupt();
90} 85}
91 86
92void __init arch_init_irq(void) 87void __init arch_init_irq(void)
diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c
index 230929ecd57f..c566b9bd0427 100644
--- a/arch/mips/mips-boards/sim/sim_time.c
+++ b/arch/mips/mips-boards/sim/sim_time.c
@@ -15,7 +15,6 @@
15#include <linux/mc146818rtc.h> 15#include <linux/mc146818rtc.h>
16#include <linux/timex.h> 16#include <linux/timex.h>
17#include <asm/mipsregs.h> 17#include <asm/mipsregs.h>
18#include <asm/ptrace.h>
19#include <asm/hardirq.h> 18#include <asm/hardirq.h>
20#include <asm/irq.h> 19#include <asm/irq.h>
21#include <asm/div64.h> 20#include <asm/div64.h>
@@ -33,7 +32,7 @@
33 32
34unsigned long cpu_khz; 33unsigned long cpu_khz;
35 34
36irqreturn_t sim_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 35irqreturn_t sim_timer_interrupt(int irq, void *dev_id)
37{ 36{
38#ifdef CONFIG_SMP 37#ifdef CONFIG_SMP
39 int cpu = smp_processor_id(); 38 int cpu = smp_processor_id();
@@ -44,7 +43,7 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
44 */ 43 */
45#ifndef CONFIG_MIPS_MT_SMTC 44#ifndef CONFIG_MIPS_MT_SMTC
46 if (cpu == 0) { 45 if (cpu == 0) {
47 timer_interrupt(irq, dev_id, regs); 46 timer_interrupt(irq, dev_id);
48 } 47 }
49 else { 48 else {
50 /* Everyone else needs to reset the timer int here as 49 /* Everyone else needs to reset the timer int here as
@@ -84,7 +83,7 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
84 irq_enable_hazard(); 83 irq_enable_hazard();
85 evpe(vpflags); 84 evpe(vpflags);
86 85
87 if(cpu_data[cpu].vpe_id == 0) timer_interrupt(irq, dev_id, regs); 86 if(cpu_data[cpu].vpe_id == 0) timer_interrupt(irq, dev_id);
88 else write_c0_compare (read_c0_count() + ( mips_hpt_frequency/HZ)); 87 else write_c0_compare (read_c0_count() + ( mips_hpt_frequency/HZ));
89 smtc_timer_broadcast(cpu_data[cpu].vpe_id); 88 smtc_timer_broadcast(cpu_data[cpu].vpe_id);
90 89
@@ -93,10 +92,10 @@ irqreturn_t sim_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
93 /* 92 /*
94 * every CPU should do profiling and process accounting 93 * every CPU should do profiling and process accounting
95 */ 94 */
96 local_timer_interrupt (irq, dev_id, regs); 95 local_timer_interrupt (irq, dev_id);
97 return IRQ_HANDLED; 96 return IRQ_HANDLED;
98#else 97#else
99 return timer_interrupt (irq, dev_id, regs); 98 return timer_interrupt (irq, dev_id);
100#endif 99#endif
101} 100}
102 101
@@ -177,9 +176,9 @@ void __init sim_time_init(void)
177 176
178static int mips_cpu_timer_irq; 177static int mips_cpu_timer_irq;
179 178
180static void mips_timer_dispatch (struct pt_regs *regs) 179static void mips_timer_dispatch(void)
181{ 180{
182 do_IRQ (mips_cpu_timer_irq, regs); 181 do_IRQ(mips_cpu_timer_irq);
183} 182}
184 183
185 184
diff --git a/arch/mips/momentum/jaguar_atx/irq.c b/arch/mips/momentum/jaguar_atx/irq.c
index f9067469a656..2efb25aa1aed 100644
--- a/arch/mips/momentum/jaguar_atx/irq.c
+++ b/arch/mips/momentum/jaguar_atx/irq.c
@@ -40,33 +40,33 @@
40#include <asm/mipsregs.h> 40#include <asm/mipsregs.h>
41#include <asm/time.h> 41#include <asm/time.h>
42 42
43asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 43asmlinkage void plat_irq_dispatch(void)
44{ 44{
45 unsigned int pending = read_c0_cause() & read_c0_status(); 45 unsigned int pending = read_c0_cause() & read_c0_status();
46 46
47 if (pending & STATUSF_IP0) 47 if (pending & STATUSF_IP0)
48 do_IRQ(0, regs); 48 do_IRQ(0);
49 else if (pending & STATUSF_IP1) 49 else if (pending & STATUSF_IP1)
50 do_IRQ(1, regs); 50 do_IRQ(1);
51 else if (pending & STATUSF_IP2) 51 else if (pending & STATUSF_IP2)
52 do_IRQ(2, regs); 52 do_IRQ(2);
53 else if (pending & STATUSF_IP3) 53 else if (pending & STATUSF_IP3)
54 do_IRQ(3, regs); 54 do_IRQ(3);
55 else if (pending & STATUSF_IP4) 55 else if (pending & STATUSF_IP4)
56 do_IRQ(4, regs); 56 do_IRQ(4);
57 else if (pending & STATUSF_IP5) 57 else if (pending & STATUSF_IP5)
58 do_IRQ(5, regs); 58 do_IRQ(5);
59 else if (pending & STATUSF_IP6) 59 else if (pending & STATUSF_IP6)
60 do_IRQ(6, regs); 60 do_IRQ(6);
61 else if (pending & STATUSF_IP7) 61 else if (pending & STATUSF_IP7)
62 ll_timer_interrupt(7, regs); 62 ll_timer_interrupt(7);
63 else { 63 else {
64 /* 64 /*
65 * Now look at the extended interrupts 65 * Now look at the extended interrupts
66 */ 66 */
67 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16; 67 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16;
68 if (pending & STATUSF_IP8) 68 if (pending & STATUSF_IP8)
69 ll_mv64340_irq(regs); 69 ll_mv64340_irq();
70 } 70 }
71} 71}
72 72
diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c
index e6fe2992227d..5a510142b978 100644
--- a/arch/mips/momentum/jaguar_atx/setup.c
+++ b/arch/mips/momentum/jaguar_atx/setup.c
@@ -62,7 +62,6 @@
62#include <asm/io.h> 62#include <asm/io.h>
63#include <asm/irq.h> 63#include <asm/irq.h>
64#include <asm/processor.h> 64#include <asm/processor.h>
65#include <asm/ptrace.h>
66#include <asm/reboot.h> 65#include <asm/reboot.h>
67#include <asm/tlbflush.h> 66#include <asm/tlbflush.h>
68 67
diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c
index 793782a9c195..cea0e5deb80e 100644
--- a/arch/mips/momentum/ocelot_3/irq.c
+++ b/arch/mips/momentum/ocelot_3/irq.c
@@ -75,26 +75,26 @@ void __init arch_init_irq(void)
75 75
76} 76}
77 77
78asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 78asmlinkage void plat_irq_dispatch(void)
79{ 79{
80 unsigned int pending = read_c0_cause() & read_c0_status(); 80 unsigned int pending = read_c0_cause() & read_c0_status();
81 81
82 if (pending & STATUSF_IP0) 82 if (pending & STATUSF_IP0)
83 do_IRQ(0, regs); 83 do_IRQ(0);
84 else if (pending & STATUSF_IP1) 84 else if (pending & STATUSF_IP1)
85 do_IRQ(1, regs); 85 do_IRQ(1);
86 else if (pending & STATUSF_IP2) 86 else if (pending & STATUSF_IP2)
87 do_IRQ(2, regs); 87 do_IRQ(2);
88 else if (pending & STATUSF_IP3) 88 else if (pending & STATUSF_IP3)
89 do_IRQ(3, regs); 89 do_IRQ(3);
90 else if (pending & STATUSF_IP4) 90 else if (pending & STATUSF_IP4)
91 do_IRQ(4, regs); 91 do_IRQ(4);
92 else if (pending & STATUSF_IP5) 92 else if (pending & STATUSF_IP5)
93 do_IRQ(5, regs); 93 do_IRQ(5);
94 else if (pending & STATUSF_IP6) 94 else if (pending & STATUSF_IP6)
95 do_IRQ(6, regs); 95 do_IRQ(6);
96 else if (pending & STATUSF_IP7) 96 else if (pending & STATUSF_IP7)
97 do_IRQ(7, regs); 97 do_IRQ(7);
98 else { 98 else {
99 /* 99 /*
100 * Now look at the extended interrupts 100 * Now look at the extended interrupts
@@ -102,8 +102,8 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
102 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16; 102 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16;
103 103
104 if (pending & STATUSF_IP8) 104 if (pending & STATUSF_IP8)
105 ll_mv64340_irq(regs); 105 ll_mv64340_irq();
106 else 106 else
107 spurious_interrupt(regs); 107 spurious_interrupt();
108 } 108 }
109} 109}
diff --git a/arch/mips/momentum/ocelot_3/setup.c b/arch/mips/momentum/ocelot_3/setup.c
index 435d0787329e..7d74f8c54129 100644
--- a/arch/mips/momentum/ocelot_3/setup.c
+++ b/arch/mips/momentum/ocelot_3/setup.c
@@ -67,7 +67,6 @@
67#include <asm/irq.h> 67#include <asm/irq.h>
68#include <asm/pci.h> 68#include <asm/pci.h>
69#include <asm/processor.h> 69#include <asm/processor.h>
70#include <asm/ptrace.h>
71#include <asm/reboot.h> 70#include <asm/reboot.h>
72#include <asm/mc146818rtc.h> 71#include <asm/mc146818rtc.h>
73#include <asm/tlbflush.h> 72#include <asm/tlbflush.h>
diff --git a/arch/mips/momentum/ocelot_c/cpci-irq.c b/arch/mips/momentum/ocelot_c/cpci-irq.c
index a5dc230520df..47e3fa32b075 100644
--- a/arch/mips/momentum/ocelot_c/cpci-irq.c
+++ b/arch/mips/momentum/ocelot_c/cpci-irq.c
@@ -21,7 +21,6 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/irq.h> 22#include <linux/irq.h>
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <asm/ptrace.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/kernel_stat.h> 25#include <linux/kernel_stat.h>
27#include <asm/io.h> 26#include <asm/io.h>
@@ -112,7 +111,7 @@ static void end_cpci_irq(unsigned int irq)
112 * Interrupt handler for interrupts coming from the FPGA chip. 111 * Interrupt handler for interrupts coming from the FPGA chip.
113 * It could be built in ethernet ports etc... 112 * It could be built in ethernet ports etc...
114 */ 113 */
115void ll_cpci_irq(struct pt_regs *regs) 114void ll_cpci_irq(void)
116{ 115{
117 unsigned int irq_src, irq_mask; 116 unsigned int irq_src, irq_mask;
118 117
@@ -123,7 +122,7 @@ void ll_cpci_irq(struct pt_regs *regs)
123 /* mask for just the interrupts we want */ 122 /* mask for just the interrupts we want */
124 irq_src &= ~irq_mask; 123 irq_src &= ~irq_mask;
125 124
126 do_IRQ(ls1bit8(irq_src) + CPCI_IRQ_BASE, regs); 125 do_IRQ(ls1bit8(irq_src) + CPCI_IRQ_BASE);
127} 126}
128 127
129#define shutdown_cpci_irq disable_cpci_irq 128#define shutdown_cpci_irq disable_cpci_irq
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c
index 9d44ae1e156b..ea65223a6d2c 100644
--- a/arch/mips/momentum/ocelot_c/irq.c
+++ b/arch/mips/momentum/ocelot_c/irq.c
@@ -59,31 +59,31 @@ static struct irqaction cascade_mv64340 = {
59 no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL 59 no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via MV64340", NULL, NULL
60}; 60};
61 61
62extern void ll_uart_irq(struct pt_regs *regs); 62extern void ll_uart_irq(void);
63extern void ll_cpci_irq(struct pt_regs *regs); 63extern void ll_cpci_irq(void);
64 64
65asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 65asmlinkage void plat_irq_dispatch(void)
66{ 66{
67 unsigned int pending = read_c0_cause() & read_c0_status(); 67 unsigned int pending = read_c0_cause() & read_c0_status();
68 68
69 if (pending & STATUSF_IP0) 69 if (pending & STATUSF_IP0)
70 do_IRQ(0, regs); 70 do_IRQ(0);
71 else if (pending & STATUSF_IP1) 71 else if (pending & STATUSF_IP1)
72 do_IRQ(1, regs); 72 do_IRQ(1);
73 else if (pending & STATUSF_IP2) 73 else if (pending & STATUSF_IP2)
74 do_IRQ(2, regs); 74 do_IRQ(2);
75 else if (pending & STATUSF_IP3) 75 else if (pending & STATUSF_IP3)
76 ll_uart_irq(regs); 76 ll_uart_irq();
77 else if (pending & STATUSF_IP4) 77 else if (pending & STATUSF_IP4)
78 do_IRQ(4, regs); 78 do_IRQ(4);
79 else if (pending & STATUSF_IP5) 79 else if (pending & STATUSF_IP5)
80 ll_cpci_irq(regs); 80 ll_cpci_irq();
81 else if (pending & STATUSF_IP6) 81 else if (pending & STATUSF_IP6)
82 ll_mv64340_irq(regs); 82 ll_mv64340_irq();
83 else if (pending & STATUSF_IP7) 83 else if (pending & STATUSF_IP7)
84 do_IRQ(7, regs); 84 do_IRQ(7);
85 else 85 else
86 spurious_interrupt(regs); 86 spurious_interrupt();
87} 87}
88 88
89void __init arch_init_irq(void) 89void __init arch_init_irq(void)
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c
index 36f570ecc6fb..9c0c462af650 100644
--- a/arch/mips/momentum/ocelot_c/setup.c
+++ b/arch/mips/momentum/ocelot_c/setup.c
@@ -62,7 +62,6 @@
62#include <asm/irq.h> 62#include <asm/irq.h>
63#include <asm/pci.h> 63#include <asm/pci.h>
64#include <asm/processor.h> 64#include <asm/processor.h>
65#include <asm/ptrace.h>
66#include <asm/reboot.h> 65#include <asm/reboot.h>
67#include <asm/marvell.h> 66#include <asm/marvell.h>
68#include <linux/bootmem.h> 67#include <linux/bootmem.h>
diff --git a/arch/mips/momentum/ocelot_c/uart-irq.c b/arch/mips/momentum/ocelot_c/uart-irq.c
index 9f33d8f1d826..510257dc205a 100644
--- a/arch/mips/momentum/ocelot_c/uart-irq.c
+++ b/arch/mips/momentum/ocelot_c/uart-irq.c
@@ -16,7 +16,6 @@
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/irq.h> 17#include <linux/irq.h>
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <asm/ptrace.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/kernel_stat.h> 20#include <linux/kernel_stat.h>
22#include <asm/io.h> 21#include <asm/io.h>
@@ -105,7 +104,7 @@ static void end_uart_irq(unsigned int irq)
105/* 104/*
106 * Interrupt handler for interrupts coming from the FPGA chip. 105 * Interrupt handler for interrupts coming from the FPGA chip.
107 */ 106 */
108void ll_uart_irq(struct pt_regs *regs) 107void ll_uart_irq(void)
109{ 108{
110 unsigned int irq_src, irq_mask; 109 unsigned int irq_src, irq_mask;
111 110
@@ -116,7 +115,7 @@ void ll_uart_irq(struct pt_regs *regs)
116 /* mask for just the interrupts we want */ 115 /* mask for just the interrupts we want */
117 irq_src &= ~irq_mask; 116 irq_src &= ~irq_mask;
118 117
119 do_IRQ(ls1bit8(irq_src) + 74, regs); 118 do_IRQ(ls1bit8(irq_src) + 74);
120} 119}
121 120
122#define shutdown_uart_irq disable_uart_irq 121#define shutdown_uart_irq disable_uart_irq
diff --git a/arch/mips/momentum/ocelot_g/gt-irq.c b/arch/mips/momentum/ocelot_g/gt-irq.c
index 6cd87cf0195a..7b5cc6648f7e 100644
--- a/arch/mips/momentum/ocelot_g/gt-irq.c
+++ b/arch/mips/momentum/ocelot_g/gt-irq.c
@@ -14,7 +14,6 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <asm/ptrace.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/kernel_stat.h> 18#include <linux/kernel_stat.h>
20#include <asm/gt64240.h> 19#include <asm/gt64240.h>
@@ -108,7 +107,7 @@ int disable_galileo_irq(int int_cause, int bit_num)
108 * we keep this particular structure in the function. 107 * we keep this particular structure in the function.
109 */ 108 */
110 109
111static irqreturn_t gt64240_p0int_irq(int irq, void *dev, struct pt_regs *regs) 110static irqreturn_t gt64240_p0int_irq(int irq, void *dev)
112{ 111{
113 uint32_t irq_src, irq_src_mask; 112 uint32_t irq_src, irq_src_mask;
114 int handled; 113 int handled;
@@ -135,7 +134,7 @@ static irqreturn_t gt64240_p0int_irq(int irq, void *dev, struct pt_regs *regs)
135 /* handle the timer call */ 134 /* handle the timer call */
136 do_timer(1); 135 do_timer(1);
137#ifndef CONFIG_SMP 136#ifndef CONFIG_SMP
138 update_process_times(user_mode(regs)); 137 update_process_times(user_mode(get_irq_regs()));
139#endif 138#endif
140 } 139 }
141 140
diff --git a/arch/mips/momentum/ocelot_g/irq.c b/arch/mips/momentum/ocelot_g/irq.c
index 7a4a419804f1..da46524e87cb 100644
--- a/arch/mips/momentum/ocelot_g/irq.c
+++ b/arch/mips/momentum/ocelot_g/irq.c
@@ -48,22 +48,22 @@
48#include <asm/mipsregs.h> 48#include <asm/mipsregs.h>
49#include <asm/system.h> 49#include <asm/system.h>
50 50
51asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 51asmlinkage void plat_irq_dispatch(void)
52{ 52{
53 unsigned int pending = read_c0_cause() & read_c0_status(); 53 unsigned int pending = read_c0_cause() & read_c0_status();
54 54
55 if (pending & STATUSF_IP2) 55 if (pending & STATUSF_IP2)
56 do_IRQ(2, regs); 56 do_IRQ(2);
57 else if (pending & STATUSF_IP3) 57 else if (pending & STATUSF_IP3)
58 do_IRQ(3, regs); 58 do_IRQ(3);
59 else if (pending & STATUSF_IP4) 59 else if (pending & STATUSF_IP4)
60 do_IRQ(4, regs); 60 do_IRQ(4);
61 else if (pending & STATUSF_IP5) 61 else if (pending & STATUSF_IP5)
62 do_IRQ(5, regs); 62 do_IRQ(5);
63 else if (pending & STATUSF_IP6) 63 else if (pending & STATUSF_IP6)
64 do_IRQ(6, regs); 64 do_IRQ(6);
65 else if (pending & STATUSF_IP7) 65 else if (pending & STATUSF_IP7)
66 do_IRQ(7, regs); 66 do_IRQ(7);
67 else { 67 else {
68 /* 68 /*
69 * Now look at the extended interrupts 69 * Now look at the extended interrupts
@@ -71,15 +71,15 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
71 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16; 71 pending = (read_c0_cause() & (read_c0_intcontrol() << 8)) >> 16;
72 72
73 if (pending & STATUSF_IP8) 73 if (pending & STATUSF_IP8)
74 do_IRQ(8, regs); 74 do_IRQ(8);
75 else if (pending & STATUSF_IP9) 75 else if (pending & STATUSF_IP9)
76 do_IRQ(9, regs); 76 do_IRQ(9);
77 else if (pending & STATUSF_IP10) 77 else if (pending & STATUSF_IP10)
78 do_IRQ(10, regs); 78 do_IRQ(10);
79 else if (pending & STATUSF_IP11) 79 else if (pending & STATUSF_IP11)
80 do_IRQ(11, regs); 80 do_IRQ(11);
81 else 81 else
82 spurious_interrupt(regs); 82 spurious_interrupt();
83 } 83 }
84} 84}
85 85
diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c
index c580b1de33bc..56ec47039c16 100644
--- a/arch/mips/momentum/ocelot_g/setup.c
+++ b/arch/mips/momentum/ocelot_g/setup.c
@@ -58,7 +58,6 @@
58#include <asm/irq.h> 58#include <asm/irq.h>
59#include <asm/pci.h> 59#include <asm/pci.h>
60#include <asm/processor.h> 60#include <asm/processor.h>
61#include <asm/ptrace.h>
62#include <asm/reboot.h> 61#include <asm/reboot.h>
63#include <linux/bootmem.h> 62#include <linux/bootmem.h>
64 63
diff --git a/arch/mips/oprofile/op_impl.h b/arch/mips/oprofile/op_impl.h
index 5cfce7d87a4d..354e54496406 100644
--- a/arch/mips/oprofile/op_impl.h
+++ b/arch/mips/oprofile/op_impl.h
@@ -12,8 +12,8 @@
12 12
13struct pt_regs; 13struct pt_regs;
14 14
15extern int null_perf_irq(struct pt_regs *regs); 15extern int null_perf_irq(void);
16extern int (*perf_irq)(struct pt_regs *regs); 16extern int (*perf_irq)(void);
17 17
18/* Per-counter configuration as set via oprofilefs. */ 18/* Per-counter configuration as set via oprofilefs. */
19struct op_counter_config { 19struct op_counter_config {
diff --git a/arch/mips/oprofile/op_model_mipsxx.c b/arch/mips/oprofile/op_model_mipsxx.c
index a175d673540f..dd0aec9c3ce1 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -3,12 +3,13 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 2004, 2005 by Ralf Baechle 6 * Copyright (C) 2004, 05, 06 by Ralf Baechle
7 * Copyright (C) 2005 by MIPS Technologies, Inc. 7 * Copyright (C) 2005 by MIPS Technologies, Inc.
8 */ 8 */
9#include <linux/oprofile.h> 9#include <linux/oprofile.h>
10#include <linux/interrupt.h> 10#include <linux/interrupt.h>
11#include <linux/smp.h> 11#include <linux/smp.h>
12#include <asm/irq_regs.h>
12 13
13#include "op_impl.h" 14#include "op_impl.h"
14 15
@@ -170,7 +171,7 @@ static void mipsxx_cpu_stop(void *args)
170 } 171 }
171} 172}
172 173
173static int mipsxx_perfcount_handler(struct pt_regs *regs) 174static int mipsxx_perfcount_handler(void)
174{ 175{
175 unsigned int counters = op_model_mipsxx_ops.num_counters; 176 unsigned int counters = op_model_mipsxx_ops.num_counters;
176 unsigned int control; 177 unsigned int control;
@@ -184,7 +185,7 @@ static int mipsxx_perfcount_handler(struct pt_regs *regs)
184 counter = r_c0_perfcntr ## n(); \ 185 counter = r_c0_perfcntr ## n(); \
185 if ((control & M_PERFCTL_INTERRUPT_ENABLE) && \ 186 if ((control & M_PERFCTL_INTERRUPT_ENABLE) && \
186 (counter & M_COUNTER_OVERFLOW)) { \ 187 (counter & M_COUNTER_OVERFLOW)) { \
187 oprofile_add_sample(regs, n); \ 188 oprofile_add_sample(get_irq_regs(), n); \
188 w_c0_perfcntr ## n(reg.counter[n]); \ 189 w_c0_perfcntr ## n(reg.counter[n]); \
189 handled = 1; \ 190 handled = 1; \
190 } 191 }
diff --git a/arch/mips/pci/pci-ip32.c b/arch/mips/pci/pci-ip32.c
index 17c7932cf0ae..618ea7dbc474 100644
--- a/arch/mips/pci/pci-ip32.c
+++ b/arch/mips/pci/pci-ip32.c
@@ -22,7 +22,7 @@
22 * registered on the bridge error irq. It's conceivable that some of these 22 * registered on the bridge error irq. It's conceivable that some of these
23 * conditions warrant a panic. Anybody care to say which ones? 23 * conditions warrant a panic. Anybody care to say which ones?
24 */ 24 */
25static irqreturn_t macepci_error(int irq, void *dev, struct pt_regs *regs) 25static irqreturn_t macepci_error(int irq, void *dev)
26{ 26{
27 char s; 27 char s;
28 unsigned int flags = mace->pci.error; 28 unsigned int flags = mace->pci.error;
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c
index 3c93512be1ec..710611615ca2 100644
--- a/arch/mips/philips/pnx8550/common/int.c
+++ b/arch/mips/philips/pnx8550/common/int.c
@@ -23,6 +23,7 @@
23 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 23 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
24 * 24 *
25 */ 25 */
26#include <linux/compiler.h>
26#include <linux/init.h> 27#include <linux/init.h>
27#include <linux/irq.h> 28#include <linux/irq.h>
28#include <linux/sched.h> 29#include <linux/sched.h>
@@ -52,7 +53,7 @@ static char gic_prio[PNX8550_INT_GIC_TOTINT] = {
52 1 // 70 53 1 // 70
53}; 54};
54 55
55static void hw0_irqdispatch(int irq, struct pt_regs *regs) 56static void hw0_irqdispatch(int irq)
56{ 57{
57 /* find out which interrupt */ 58 /* find out which interrupt */
58 irq = PNX8550_GIC_VECTOR_0 >> 3; 59 irq = PNX8550_GIC_VECTOR_0 >> 3;
@@ -61,42 +62,39 @@ static void hw0_irqdispatch(int irq, struct pt_regs *regs)
61 printk("hw0_irqdispatch: irq 0, spurious interrupt?\n"); 62 printk("hw0_irqdispatch: irq 0, spurious interrupt?\n");
62 return; 63 return;
63 } 64 }
64 do_IRQ(PNX8550_INT_GIC_MIN + irq, regs); 65 do_IRQ(PNX8550_INT_GIC_MIN + irq);
65} 66}
66 67
67 68
68static void timer_irqdispatch(int irq, struct pt_regs *regs) 69static void timer_irqdispatch(int irq)
69{ 70{
70 irq = (0x01c0 & read_c0_config7()) >> 6; 71 irq = (0x01c0 & read_c0_config7()) >> 6;
71 72
72 if (irq == 0) { 73 if (unlikely(irq == 0)) {
73 printk("timer_irqdispatch: irq 0, spurious interrupt?\n"); 74 printk("timer_irqdispatch: irq 0, spurious interrupt?\n");
74 return; 75 return;
75 } 76 }
76 77
77 if (irq & 0x1) { 78 if (irq & 0x1)
78 do_IRQ(PNX8550_INT_TIMER1, regs); 79 do_IRQ(PNX8550_INT_TIMER1);
79 } 80 if (irq & 0x2)
80 if (irq & 0x2) { 81 do_IRQ(PNX8550_INT_TIMER2);
81 do_IRQ(PNX8550_INT_TIMER2, regs); 82 if (irq & 0x4)
82 } 83 do_IRQ(PNX8550_INT_TIMER3);
83 if (irq & 0x4) {
84 do_IRQ(PNX8550_INT_TIMER3, regs);
85 }
86} 84}
87 85
88asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 86asmlinkage void plat_irq_dispatch(void)
89{ 87{
90 unsigned int pending = read_c0_status() & read_c0_cause(); 88 unsigned int pending = read_c0_status() & read_c0_cause();
91 89
92 if (pending & STATUSF_IP2) 90 if (pending & STATUSF_IP2)
93 hw0_irqdispatch(2, regs); 91 hw0_irqdispatch(2);
94 else if (pending & STATUSF_IP7) { 92 else if (pending & STATUSF_IP7) {
95 if (read_c0_config7() & 0x01c0) 93 if (read_c0_config7() & 0x01c0)
96 timer_irqdispatch(7, regs); 94 timer_irqdispatch(7);
97 } 95 }
98 96
99 spurious_interrupt(regs); 97 spurious_interrupt();
100} 98}
101 99
102static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask) 100static inline void modify_cp0_intmask(unsigned clr_mask, unsigned set_mask)
diff --git a/arch/mips/pmc-sierra/yosemite/irq.c b/arch/mips/pmc-sierra/yosemite/irq.c
index b91d0aa3b7ed..adb048527e76 100644
--- a/arch/mips/pmc-sierra/yosemite/irq.c
+++ b/arch/mips/pmc-sierra/yosemite/irq.c
@@ -56,15 +56,13 @@
56#define HYPERTRANSPORT_INTC 0x7a /* INTC# */ 56#define HYPERTRANSPORT_INTC 0x7a /* INTC# */
57#define HYPERTRANSPORT_INTD 0x7b /* INTD# */ 57#define HYPERTRANSPORT_INTD 0x7b /* INTD# */
58 58
59extern void jaguar_mailbox_irq(struct pt_regs *);
60
61/* 59/*
62 * Handle hypertransport & SMP interrupts. The interrupt lines are scarce. 60 * Handle hypertransport & SMP interrupts. The interrupt lines are scarce.
63 * For interprocessor interrupts, the best thing to do is to use the INTMSG 61 * For interprocessor interrupts, the best thing to do is to use the INTMSG
64 * register. We use the same external interrupt line, i.e. INTB3 and monitor 62 * register. We use the same external interrupt line, i.e. INTB3 and monitor
65 * another status bit 63 * another status bit
66 */ 64 */
67asmlinkage void ll_ht_smp_irq_handler(int irq, struct pt_regs *regs) 65static void ll_ht_smp_irq_handler(int irq)
68{ 66{
69 u32 status = OCD_READ(RM9000x2_OCD_INTP0STATUS4); 67 u32 status = OCD_READ(RM9000x2_OCD_INTP0STATUS4);
70 68
@@ -107,50 +105,35 @@ asmlinkage void ll_ht_smp_irq_handler(int irq, struct pt_regs *regs)
107 } 105 }
108#endif /* CONFIG_HT_LEVEL_TRIGGER */ 106#endif /* CONFIG_HT_LEVEL_TRIGGER */
109 107
110 do_IRQ(irq, regs); 108 do_IRQ(irq);
111}
112
113asmlinkage void do_extended_irq(struct pt_regs *regs)
114{
115 unsigned int intcontrol = read_c0_intcontrol();
116 unsigned int cause = read_c0_cause();
117 unsigned int status = read_c0_status();
118 unsigned int pending_sr, pending_ic;
119
120 pending_sr = status & cause & 0xff00;
121 pending_ic = (cause >> 8) & intcontrol & 0xff00;
122
123 if (pending_ic & (1 << 13))
124 do_IRQ(13, regs);
125
126} 109}
127 110
128asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 111asmlinkage void plat_irq_dispatch(void)
129{ 112{
130 unsigned int cause = read_c0_cause(); 113 unsigned int cause = read_c0_cause();
131 unsigned int status = read_c0_status(); 114 unsigned int status = read_c0_status();
132 unsigned int pending = cause & status; 115 unsigned int pending = cause & status;
133 116
134 if (pending & STATUSF_IP7) { 117 if (pending & STATUSF_IP7) {
135 do_IRQ(7, regs); 118 do_IRQ(7);
136 } else if (pending & STATUSF_IP2) { 119 } else if (pending & STATUSF_IP2) {
137#ifdef CONFIG_HYPERTRANSPORT 120#ifdef CONFIG_HYPERTRANSPORT
138 ll_ht_smp_irq_handler(2, regs); 121 ll_ht_smp_irq_handler(2);
139#else 122#else
140 do_IRQ(2, regs); 123 do_IRQ(2);
141#endif 124#endif
142 } else if (pending & STATUSF_IP3) { 125 } else if (pending & STATUSF_IP3) {
143 do_IRQ(3, regs); 126 do_IRQ(3);
144 } else if (pending & STATUSF_IP4) { 127 } else if (pending & STATUSF_IP4) {
145 do_IRQ(4, regs); 128 do_IRQ(4);
146 } else if (pending & STATUSF_IP5) { 129 } else if (pending & STATUSF_IP5) {
147#ifdef CONFIG_SMP 130#ifdef CONFIG_SMP
148 titan_mailbox_irq(regs); 131 titan_mailbox_irq();
149#else 132#else
150 do_IRQ(5, regs); 133 do_IRQ(5);
151#endif 134#endif
152 } else if (pending & STATUSF_IP6) { 135 } else if (pending & STATUSF_IP6) {
153 do_IRQ(4, regs); 136 do_IRQ(4);
154 } 137 }
155} 138}
156 139
@@ -178,18 +161,3 @@ void __init arch_init_irq(void)
178 register_gdb_console(); 161 register_gdb_console();
179#endif 162#endif
180} 163}
181
182#ifdef CONFIG_KGDB
183/*
184 * The 16550 DUART has two ports, but is allocated one IRQ
185 * for the serial console. Hence, a generic framework for
186 * serial IRQ routing in place. Currently, just calls the
187 * do_IRQ fuction. But, going in the future, need to check
188 * DUART registers for channel A and B, then decide the
189 * appropriate action
190 */
191asmlinkage void yosemite_kgdb_irq(int irq, struct pt_regs *regs)
192{
193 do_IRQ(irq, regs);
194}
195#endif
diff --git a/arch/mips/pmc-sierra/yosemite/setup.c b/arch/mips/pmc-sierra/yosemite/setup.c
index 0a6ee8e5eec2..1b9b0d396d3e 100644
--- a/arch/mips/pmc-sierra/yosemite/setup.c
+++ b/arch/mips/pmc-sierra/yosemite/setup.c
@@ -46,7 +46,6 @@
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/irq.h> 47#include <asm/irq.h>
48#include <asm/processor.h> 48#include <asm/processor.h>
49#include <asm/ptrace.h>
50#include <asm/reboot.h> 49#include <asm/reboot.h>
51#include <asm/serial.h> 50#include <asm/serial.h>
52#include <asm/titan_dep.h> 51#include <asm/titan_dep.h>
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c
index c197311e15d3..65fa3a23ea5e 100644
--- a/arch/mips/pmc-sierra/yosemite/smp.c
+++ b/arch/mips/pmc-sierra/yosemite/smp.c
@@ -110,7 +110,7 @@ void prom_smp_finish(void)
110{ 110{
111} 111}
112 112
113asmlinkage void titan_mailbox_irq(struct pt_regs *regs) 113asmlinkage void titan_mailbox_irq(void)
114{ 114{
115 int cpu = smp_processor_id(); 115 int cpu = smp_processor_id();
116 unsigned long status; 116 unsigned long status;
diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c
index 3352374c4c7d..f5ea2fe10f14 100644
--- a/arch/mips/qemu/q-irq.c
+++ b/arch/mips/qemu/q-irq.c
@@ -9,19 +9,19 @@
9 9
10extern asmlinkage void qemu_handle_int(void); 10extern asmlinkage void qemu_handle_int(void);
11 11
12asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 12asmlinkage void plat_irq_dispatch(void)
13{ 13{
14 unsigned int pending = read_c0_status() & read_c0_cause(); 14 unsigned int pending = read_c0_status() & read_c0_cause();
15 15
16 if (pending & 0x8000) { 16 if (pending & 0x8000) {
17 ll_timer_interrupt(Q_COUNT_COMPARE_IRQ, regs); 17 ll_timer_interrupt(Q_COUNT_COMPARE_IRQ);
18 return; 18 return;
19 } 19 }
20 if (pending & 0x0400) { 20 if (pending & 0x0400) {
21 int irq = i8259_irq(); 21 int irq = i8259_irq();
22 22
23 if (likely(irq >= 0)) 23 if (likely(irq >= 0))
24 do_IRQ(irq, regs); 24 do_IRQ(irq);
25 25
26 return; 26 return;
27 } 27 }
diff --git a/arch/mips/sgi-ip22/ip22-berr.c b/arch/mips/sgi-ip22/ip22-berr.c
index a28dc7800072..de6a0cc32fea 100644
--- a/arch/mips/sgi-ip22/ip22-berr.c
+++ b/arch/mips/sgi-ip22/ip22-berr.c
@@ -12,6 +12,7 @@
12#include <asm/system.h> 12#include <asm/system.h>
13#include <asm/traps.h> 13#include <asm/traps.h>
14#include <asm/branch.h> 14#include <asm/branch.h>
15#include <asm/irq_regs.h>
15#include <asm/sgi/mc.h> 16#include <asm/sgi/mc.h>
16#include <asm/sgi/hpc3.h> 17#include <asm/sgi/hpc3.h>
17#include <asm/sgi/ioc.h> 18#include <asm/sgi/ioc.h>
@@ -85,9 +86,10 @@ static void print_buserr(void)
85 * and then clear the interrupt when this happens. 86 * and then clear the interrupt when this happens.
86 */ 87 */
87 88
88void ip22_be_interrupt(int irq, struct pt_regs *regs) 89void ip22_be_interrupt(int irq)
89{ 90{
90 const int field = 2 * sizeof(unsigned long); 91 const int field = 2 * sizeof(unsigned long);
92 const struct pt_regs *regs = get_irq_regs();
91 93
92 save_and_clear_buserr(); 94 save_and_clear_buserr();
93 print_buserr(); 95 print_buserr();
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c
index ee0514a29922..0d18ed47c47a 100644
--- a/arch/mips/sgi-ip22/ip22-eisa.c
+++ b/arch/mips/sgi-ip22/ip22-eisa.c
@@ -70,7 +70,7 @@ static char __init *decode_eisa_sig(unsigned long addr)
70 return sig_str; 70 return sig_str;
71} 71}
72 72
73static irqreturn_t ip22_eisa_intr(int irq, void *dev_id, struct pt_regs *regs) 73static irqreturn_t ip22_eisa_intr(int irq, void *dev_id)
74{ 74{
75 u8 eisa_irq; 75 u8 eisa_irq;
76 u8 dma1, dma2; 76 u8 dma1, dma2;
@@ -80,7 +80,7 @@ static irqreturn_t ip22_eisa_intr(int irq, void *dev_id, struct pt_regs *regs)
80 dma2 = inb(EISA_DMA2_STATUS); 80 dma2 = inb(EISA_DMA2_STATUS);
81 81
82 if (eisa_irq < EISA_MAX_IRQ) { 82 if (eisa_irq < EISA_MAX_IRQ) {
83 do_IRQ(eisa_irq, regs); 83 do_IRQ(eisa_irq);
84 return IRQ_HANDLED; 84 return IRQ_HANDLED;
85 } 85 }
86 86
@@ -89,6 +89,7 @@ static irqreturn_t ip22_eisa_intr(int irq, void *dev_id, struct pt_regs *regs)
89 89
90 outb(0x20, EISA_INT2_CTRL); 90 outb(0x20, EISA_INT2_CTRL);
91 outb(0x20, EISA_INT1_CTRL); 91 outb(0x20, EISA_INT1_CTRL);
92
92 return IRQ_NONE; 93 return IRQ_NONE;
93} 94}
94 95
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index f66026e5d64b..af518898eaa1 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -222,7 +222,7 @@ static struct irq_chip ip22_local3_irq_type = {
222 .end = end_local3_irq, 222 .end = end_local3_irq,
223}; 223};
224 224
225static void indy_local0_irqdispatch(struct pt_regs *regs) 225static void indy_local0_irqdispatch(void)
226{ 226{
227 u8 mask = sgint->istat0 & sgint->imask0; 227 u8 mask = sgint->istat0 & sgint->imask0;
228 u8 mask2; 228 u8 mask2;
@@ -236,11 +236,10 @@ static void indy_local0_irqdispatch(struct pt_regs *regs)
236 236
237 /* if irq == 0, then the interrupt has already been cleared */ 237 /* if irq == 0, then the interrupt has already been cleared */
238 if (irq) 238 if (irq)
239 do_IRQ(irq, regs); 239 do_IRQ(irq);
240 return;
241} 240}
242 241
243static void indy_local1_irqdispatch(struct pt_regs *regs) 242static void indy_local1_irqdispatch(void)
244{ 243{
245 u8 mask = sgint->istat1 & sgint->imask1; 244 u8 mask = sgint->istat1 & sgint->imask1;
246 u8 mask2; 245 u8 mask2;
@@ -254,19 +253,18 @@ static void indy_local1_irqdispatch(struct pt_regs *regs)
254 253
255 /* if irq == 0, then the interrupt has already been cleared */ 254 /* if irq == 0, then the interrupt has already been cleared */
256 if (irq) 255 if (irq)
257 do_IRQ(irq, regs); 256 do_IRQ(irq);
258 return;
259} 257}
260 258
261extern void ip22_be_interrupt(int irq, struct pt_regs *regs); 259extern void ip22_be_interrupt(int irq);
262 260
263static void indy_buserror_irq(struct pt_regs *regs) 261static void indy_buserror_irq(void)
264{ 262{
265 int irq = SGI_BUSERR_IRQ; 263 int irq = SGI_BUSERR_IRQ;
266 264
267 irq_enter(); 265 irq_enter();
268 kstat_this_cpu.irqs[irq]++; 266 kstat_this_cpu.irqs[irq]++;
269 ip22_be_interrupt(irq, regs); 267 ip22_be_interrupt(irq);
270 irq_exit(); 268 irq_exit();
271} 269}
272 270
@@ -305,8 +303,8 @@ static struct irqaction map1_cascade = {
305#define SGI_INTERRUPTS SGINT_LOCAL3 303#define SGI_INTERRUPTS SGINT_LOCAL3
306#endif 304#endif
307 305
308extern void indy_r4k_timer_interrupt(struct pt_regs *regs); 306extern void indy_r4k_timer_interrupt(void);
309extern void indy_8254timer_irq(struct pt_regs *regs); 307extern void indy_8254timer_irq(void);
310 308
311/* 309/*
312 * IRQs on the INDY look basically (barring software IRQs which we don't use 310 * IRQs on the INDY look basically (barring software IRQs which we don't use
@@ -336,7 +334,7 @@ extern void indy_8254timer_irq(struct pt_regs *regs);
336 * another exception, big deal. 334 * another exception, big deal.
337 */ 335 */
338 336
339asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 337asmlinkage void plat_irq_dispatch(void)
340{ 338{
341 unsigned int pending = read_c0_cause(); 339 unsigned int pending = read_c0_cause();
342 340
@@ -344,15 +342,15 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
344 * First we check for r4k counter/timer IRQ. 342 * First we check for r4k counter/timer IRQ.
345 */ 343 */
346 if (pending & CAUSEF_IP7) 344 if (pending & CAUSEF_IP7)
347 indy_r4k_timer_interrupt(regs); 345 indy_r4k_timer_interrupt();
348 else if (pending & CAUSEF_IP2) 346 else if (pending & CAUSEF_IP2)
349 indy_local0_irqdispatch(regs); 347 indy_local0_irqdispatch();
350 else if (pending & CAUSEF_IP3) 348 else if (pending & CAUSEF_IP3)
351 indy_local1_irqdispatch(regs); 349 indy_local1_irqdispatch();
352 else if (pending & CAUSEF_IP6) 350 else if (pending & CAUSEF_IP6)
353 indy_buserror_irq(regs); 351 indy_buserror_irq();
354 else if (pending & (CAUSEF_IP4 | CAUSEF_IP5)) 352 else if (pending & (CAUSEF_IP4 | CAUSEF_IP5))
355 indy_8254timer_irq(regs); 353 indy_8254timer_irq();
356} 354}
357 355
358extern void mips_cpu_irq_init(unsigned int irq_base); 356extern void mips_cpu_irq_init(unsigned int irq_base);
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c
index 3462b0d98def..205554734099 100644
--- a/arch/mips/sgi-ip22/ip22-time.c
+++ b/arch/mips/sgi-ip22/ip22-time.c
@@ -175,7 +175,7 @@ static __init void indy_time_init(void)
175} 175}
176 176
177/* Generic SGI handler for (spurious) 8254 interrupts */ 177/* Generic SGI handler for (spurious) 8254 interrupts */
178void indy_8254timer_irq(struct pt_regs *regs) 178void indy_8254timer_irq(void)
179{ 179{
180 int irq = SGI_8254_0_IRQ; 180 int irq = SGI_8254_0_IRQ;
181 ULONG cnt; 181 ULONG cnt;
@@ -189,16 +189,14 @@ void indy_8254timer_irq(struct pt_regs *regs)
189 irq_exit(); 189 irq_exit();
190} 190}
191 191
192void indy_r4k_timer_interrupt(struct pt_regs *regs) 192void indy_r4k_timer_interrupt(void)
193{ 193{
194 struct pt_regs *old_regs = set_irq_regs(regs);
195 int irq = SGI_TIMER_IRQ; 194 int irq = SGI_TIMER_IRQ;
196 195
197 irq_enter(); 196 irq_enter();
198 kstat_this_cpu.irqs[irq]++; 197 kstat_this_cpu.irqs[irq]++;
199 timer_interrupt(irq, NULL); 198 timer_interrupt(irq, NULL);
200 irq_exit(); 199 irq_exit();
201 set_irq_regs(old_regs);
202} 200}
203 201
204void __init plat_timer_setup(struct irqaction *irq) 202void __init plat_timer_setup(struct irqaction *irq)
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index 24a85372284f..f01ba1f90770 100644
--- a/arch/mips/sgi-ip27/ip27-irq.c
+++ b/arch/mips/sgi-ip27/ip27-irq.c
@@ -30,7 +30,6 @@
30#include <asm/mipsregs.h> 30#include <asm/mipsregs.h>
31#include <asm/system.h> 31#include <asm/system.h>
32 32
33#include <asm/ptrace.h>
34#include <asm/processor.h> 33#include <asm/processor.h>
35#include <asm/pci/bridge.h> 34#include <asm/pci/bridge.h>
36#include <asm/sn/addrs.h> 35#include <asm/sn/addrs.h>
@@ -129,7 +128,7 @@ static int ms1bit(unsigned long x)
129 * Kanoj 05.13.00 128 * Kanoj 05.13.00
130 */ 129 */
131 130
132static void ip27_do_irq_mask0(struct pt_regs *regs) 131static void ip27_do_irq_mask0(void)
133{ 132{
134 int irq, swlevel; 133 int irq, swlevel;
135 hubreg_t pend0, mask0; 134 hubreg_t pend0, mask0;
@@ -164,13 +163,13 @@ static void ip27_do_irq_mask0(struct pt_regs *regs)
164 struct slice_data *si = cpu_data[cpu].data; 163 struct slice_data *si = cpu_data[cpu].data;
165 164
166 irq = si->level_to_irq[swlevel]; 165 irq = si->level_to_irq[swlevel];
167 do_IRQ(irq, regs); 166 do_IRQ(irq);
168 } 167 }
169 168
170 LOCAL_HUB_L(PI_INT_PEND0); 169 LOCAL_HUB_L(PI_INT_PEND0);
171} 170}
172 171
173static void ip27_do_irq_mask1(struct pt_regs *regs) 172static void ip27_do_irq_mask1(void)
174{ 173{
175 int irq, swlevel; 174 int irq, swlevel;
176 hubreg_t pend1, mask1; 175 hubreg_t pend1, mask1;
@@ -190,17 +189,17 @@ static void ip27_do_irq_mask1(struct pt_regs *regs)
190 /* "map" swlevel to irq */ 189 /* "map" swlevel to irq */
191 irq = si->level_to_irq[swlevel]; 190 irq = si->level_to_irq[swlevel];
192 LOCAL_HUB_CLR_INTR(swlevel); 191 LOCAL_HUB_CLR_INTR(swlevel);
193 do_IRQ(irq, regs); 192 do_IRQ(irq);
194 193
195 LOCAL_HUB_L(PI_INT_PEND1); 194 LOCAL_HUB_L(PI_INT_PEND1);
196} 195}
197 196
198static void ip27_prof_timer(struct pt_regs *regs) 197static void ip27_prof_timer(void)
199{ 198{
200 panic("CPU %d got a profiling interrupt", smp_processor_id()); 199 panic("CPU %d got a profiling interrupt", smp_processor_id());
201} 200}
202 201
203static void ip27_hub_error(struct pt_regs *regs) 202static void ip27_hub_error(void)
204{ 203{
205 panic("CPU %d got a hub error interrupt", smp_processor_id()); 204 panic("CPU %d got a hub error interrupt", smp_processor_id());
206} 205}
@@ -418,22 +417,22 @@ int __devinit request_bridge_irq(struct bridge_controller *bc)
418 return irq; 417 return irq;
419} 418}
420 419
421extern void ip27_rt_timer_interrupt(struct pt_regs *regs); 420extern void ip27_rt_timer_interrupt(void);
422 421
423asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 422asmlinkage void plat_irq_dispatch(void)
424{ 423{
425 unsigned long pending = read_c0_cause() & read_c0_status(); 424 unsigned long pending = read_c0_cause() & read_c0_status();
426 425
427 if (pending & CAUSEF_IP4) 426 if (pending & CAUSEF_IP4)
428 ip27_rt_timer_interrupt(regs); 427 ip27_rt_timer_interrupt();
429 else if (pending & CAUSEF_IP2) /* PI_INT_PEND_0 or CC_PEND_{A|B} */ 428 else if (pending & CAUSEF_IP2) /* PI_INT_PEND_0 or CC_PEND_{A|B} */
430 ip27_do_irq_mask0(regs); 429 ip27_do_irq_mask0();
431 else if (pending & CAUSEF_IP3) /* PI_INT_PEND_1 */ 430 else if (pending & CAUSEF_IP3) /* PI_INT_PEND_1 */
432 ip27_do_irq_mask1(regs); 431 ip27_do_irq_mask1();
433 else if (pending & CAUSEF_IP5) 432 else if (pending & CAUSEF_IP5)
434 ip27_prof_timer(regs); 433 ip27_prof_timer();
435 else if (pending & CAUSEF_IP6) 434 else if (pending & CAUSEF_IP6)
436 ip27_hub_error(regs); 435 ip27_hub_error();
437} 436}
438 437
439void __init arch_init_irq(void) 438void __init arch_init_irq(void)
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 257ce118e380..4e870fc4469b 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -89,7 +89,7 @@ static int set_rtc_mmss(unsigned long nowtime)
89 89
90static unsigned int rt_timer_irq; 90static unsigned int rt_timer_irq;
91 91
92void ip27_rt_timer_interrupt(struct pt_regs *regs) 92void ip27_rt_timer_interrupt(void)
93{ 93{
94 int cpu = smp_processor_id(); 94 int cpu = smp_processor_id();
95 int cpuA = cputoslice(cpu) == 0; 95 int cpuA = cputoslice(cpu) == 0;
@@ -111,7 +111,7 @@ again:
111 if (cpu == 0) 111 if (cpu == 0)
112 do_timer(1); 112 do_timer(1);
113 113
114 update_process_times(user_mode(regs)); 114 update_process_times(user_mode(get_irq_regs()));
115 115
116 /* 116 /*
117 * If we have an externally synchronized Linux clock, then update 117 * If we have an externally synchronized Linux clock, then update
diff --git a/arch/mips/sgi-ip32/crime.c b/arch/mips/sgi-ip32/crime.c
index 41b5eca1148c..bff508704d03 100644
--- a/arch/mips/sgi-ip32/crime.c
+++ b/arch/mips/sgi-ip32/crime.c
@@ -14,7 +14,6 @@
14#include <asm/bootinfo.h> 14#include <asm/bootinfo.h>
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/mipsregs.h> 16#include <asm/mipsregs.h>
17#include <asm/ptrace.h>
18#include <asm/page.h> 17#include <asm/page.h>
19#include <asm/ip32/crime.h> 18#include <asm/ip32/crime.h>
20#include <asm/ip32/mace.h> 19#include <asm/ip32/mace.h>
@@ -40,8 +39,7 @@ void __init crime_init(void)
40 id, rev, field, (unsigned long) CRIME_BASE); 39 id, rev, field, (unsigned long) CRIME_BASE);
41} 40}
42 41
43irqreturn_t 42irqreturn_t crime_memerr_intr(unsigned int irq, void *dev_id)
44crime_memerr_intr (unsigned int irq, void *dev_id, struct pt_regs *regs)
45{ 43{
46 unsigned long stat, addr; 44 unsigned long stat, addr;
47 int fatal = 0; 45 int fatal = 0;
@@ -92,8 +90,7 @@ crime_memerr_intr (unsigned int irq, void *dev_id, struct pt_regs *regs)
92 return IRQ_HANDLED; 90 return IRQ_HANDLED;
93} 91}
94 92
95irqreturn_t 93irqreturn_t crime_cpuerr_intr(unsigned int irq, void *dev_id)
96crime_cpuerr_intr (unsigned int irq, void *dev_id, struct pt_regs *regs)
97{ 94{
98 unsigned long stat = crime->cpu_error_stat & CRIME_CPU_ERROR_MASK; 95 unsigned long stat = crime->cpu_error_stat & CRIME_CPU_ERROR_MASK;
99 unsigned long addr = crime->cpu_error_addr & CRIME_CPU_ERROR_ADDR_MASK; 96 unsigned long addr = crime->cpu_error_addr & CRIME_CPU_ERROR_ADDR_MASK;
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index c64a820373de..c9acadd0846b 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -120,10 +120,8 @@ static void inline flush_mace_bus(void)
120static DEFINE_SPINLOCK(ip32_irq_lock); 120static DEFINE_SPINLOCK(ip32_irq_lock);
121 121
122/* Some initial interrupts to set up */ 122/* Some initial interrupts to set up */
123extern irqreturn_t crime_memerr_intr (int irq, void *dev_id, 123extern irqreturn_t crime_memerr_intr(int irq, void *dev_id);
124 struct pt_regs *regs); 124extern irqreturn_t crime_cpuerr_intr(int irq, void *dev_id);
125extern irqreturn_t crime_cpuerr_intr (int irq, void *dev_id,
126 struct pt_regs *regs);
127 125
128struct irqaction memerr_irq = { crime_memerr_intr, IRQF_DISABLED, 126struct irqaction memerr_irq = { crime_memerr_intr, IRQF_DISABLED,
129 CPU_MASK_NONE, "CRIME memory error", NULL, NULL }; 127 CPU_MASK_NONE, "CRIME memory error", NULL, NULL };
@@ -479,7 +477,7 @@ static struct irq_chip ip32_mace_interrupt = {
479 .end = end_mace_irq, 477 .end = end_mace_irq,
480}; 478};
481 479
482static void ip32_unknown_interrupt(struct pt_regs *regs) 480static void ip32_unknown_interrupt(void)
483{ 481{
484 printk ("Unknown interrupt occurred!\n"); 482 printk ("Unknown interrupt occurred!\n");
485 printk ("cp0_status: %08x\n", read_c0_status()); 483 printk ("cp0_status: %08x\n", read_c0_status());
@@ -492,7 +490,7 @@ static void ip32_unknown_interrupt(struct pt_regs *regs)
492 printk ("MACE PCI control register: %08x\n", mace->pci.control); 490 printk ("MACE PCI control register: %08x\n", mace->pci.control);
493 491
494 printk("Register dump:\n"); 492 printk("Register dump:\n");
495 show_regs(regs); 493 show_regs(get_irq_regs());
496 494
497 printk("Please mail this report to linux-mips@linux-mips.org\n"); 495 printk("Please mail this report to linux-mips@linux-mips.org\n");
498 printk("Spinning..."); 496 printk("Spinning...");
@@ -501,7 +499,7 @@ static void ip32_unknown_interrupt(struct pt_regs *regs)
501 499
502/* CRIME 1.1 appears to deliver all interrupts to this one pin. */ 500/* CRIME 1.1 appears to deliver all interrupts to this one pin. */
503/* change this to loop over all edge-triggered irqs, exception masked out ones */ 501/* change this to loop over all edge-triggered irqs, exception masked out ones */
504static void ip32_irq0(struct pt_regs *regs) 502static void ip32_irq0(void)
505{ 503{
506 uint64_t crime_int; 504 uint64_t crime_int;
507 int irq = 0; 505 int irq = 0;
@@ -516,50 +514,50 @@ static void ip32_irq0(struct pt_regs *regs)
516 } 514 }
517 irq++; 515 irq++;
518 DBG("*irq %u*\n", irq); 516 DBG("*irq %u*\n", irq);
519 do_IRQ(irq, regs); 517 do_IRQ(irq);
520} 518}
521 519
522static void ip32_irq1(struct pt_regs *regs) 520static void ip32_irq1(void)
523{ 521{
524 ip32_unknown_interrupt(regs); 522 ip32_unknown_interrupt();
525} 523}
526 524
527static void ip32_irq2(struct pt_regs *regs) 525static void ip32_irq2(void)
528{ 526{
529 ip32_unknown_interrupt(regs); 527 ip32_unknown_interrupt();
530} 528}
531 529
532static void ip32_irq3(struct pt_regs *regs) 530static void ip32_irq3(void)
533{ 531{
534 ip32_unknown_interrupt(regs); 532 ip32_unknown_interrupt();
535} 533}
536 534
537static void ip32_irq4(struct pt_regs *regs) 535static void ip32_irq4(void)
538{ 536{
539 ip32_unknown_interrupt(regs); 537 ip32_unknown_interrupt();
540} 538}
541 539
542static void ip32_irq5(struct pt_regs *regs) 540static void ip32_irq5(void)
543{ 541{
544 ll_timer_interrupt(IP32_R4K_TIMER_IRQ, regs); 542 ll_timer_interrupt(IP32_R4K_TIMER_IRQ);
545} 543}
546 544
547asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 545asmlinkage void plat_irq_dispatch(void)
548{ 546{
549 unsigned int pending = read_c0_cause(); 547 unsigned int pending = read_c0_cause();
550 548
551 if (likely(pending & IE_IRQ0)) 549 if (likely(pending & IE_IRQ0))
552 ip32_irq0(regs); 550 ip32_irq0();
553 else if (unlikely(pending & IE_IRQ1)) 551 else if (unlikely(pending & IE_IRQ1))
554 ip32_irq1(regs); 552 ip32_irq1();
555 else if (unlikely(pending & IE_IRQ2)) 553 else if (unlikely(pending & IE_IRQ2))
556 ip32_irq2(regs); 554 ip32_irq2();
557 else if (unlikely(pending & IE_IRQ3)) 555 else if (unlikely(pending & IE_IRQ3))
558 ip32_irq3(regs); 556 ip32_irq3();
559 else if (unlikely(pending & IE_IRQ4)) 557 else if (unlikely(pending & IE_IRQ4))
560 ip32_irq4(regs); 558 ip32_irq4();
561 else if (likely(pending & IE_IRQ5)) 559 else if (likely(pending & IE_IRQ5))
562 ip32_irq5(regs); 560 ip32_irq5();
563} 561}
564 562
565void __init arch_init_irq(void) 563void __init arch_init_irq(void)
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index a46b75b23ecb..8b1f41484923 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -25,9 +25,9 @@
25#include <linux/kernel_stat.h> 25#include <linux/kernel_stat.h>
26 26
27#include <asm/errno.h> 27#include <asm/errno.h>
28#include <asm/irq_regs.h>
28#include <asm/signal.h> 29#include <asm/signal.h>
29#include <asm/system.h> 30#include <asm/system.h>
30#include <asm/ptrace.h>
31#include <asm/io.h> 31#include <asm/io.h>
32 32
33#include <asm/sibyte/bcm1480_regs.h> 33#include <asm/sibyte/bcm1480_regs.h>
@@ -284,8 +284,7 @@ void __init init_bcm1480_irqs(void)
284} 284}
285 285
286 286
287static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id, 287static irqreturn_t bcm1480_dummy_handler(int irq, void *dev_id)
288 struct pt_regs *regs)
289{ 288{
290 return IRQ_NONE; 289 return IRQ_NONE;
291} 290}
@@ -453,7 +452,7 @@ void __init arch_init_irq(void)
453#define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port,reg))) 452#define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port,reg)))
454#define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port,reg))) 453#define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port,reg)))
455 454
456void bcm1480_kgdb_interrupt(struct pt_regs *regs) 455static void bcm1480_kgdb_interrupt(void)
457{ 456{
458 /* 457 /*
459 * Clear break-change status (allow some time for the remote 458 * Clear break-change status (allow some time for the remote
@@ -464,16 +463,15 @@ void bcm1480_kgdb_interrupt(struct pt_regs *regs)
464 mdelay(500); 463 mdelay(500);
465 duart_out(R_DUART_CMD, V_DUART_MISC_CMD_RESET_BREAK_INT | 464 duart_out(R_DUART_CMD, V_DUART_MISC_CMD_RESET_BREAK_INT |
466 M_DUART_RX_EN | M_DUART_TX_EN); 465 M_DUART_RX_EN | M_DUART_TX_EN);
467 set_async_breakpoint(&regs->cp0_epc); 466 set_async_breakpoint(&get_irq_regs()->cp0_epc);
468} 467}
469 468
470#endif /* CONFIG_KGDB */ 469#endif /* CONFIG_KGDB */
471 470
472extern void bcm1480_timer_interrupt(struct pt_regs *regs); 471extern void bcm1480_timer_interrupt(void);
473extern void bcm1480_mailbox_interrupt(struct pt_regs *regs); 472extern void bcm1480_mailbox_interrupt(void);
474extern void bcm1480_kgdb_interrupt(struct pt_regs *regs);
475 473
476asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 474asmlinkage void plat_irq_dispatch(void)
477{ 475{
478 unsigned int pending; 476 unsigned int pending;
479 477
@@ -486,21 +484,21 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
486 484
487#ifdef CONFIG_SIBYTE_BCM1480_PROF 485#ifdef CONFIG_SIBYTE_BCM1480_PROF
488 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ 486 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
489 sbprof_cpu_intr(exception_epc(regs)); 487 sbprof_cpu_intr();
490 else 488 else
491#endif 489#endif
492 490
493 if (pending & CAUSEF_IP4) 491 if (pending & CAUSEF_IP4)
494 bcm1480_timer_interrupt(regs); 492 bcm1480_timer_interrupt();
495 493
496#ifdef CONFIG_SMP 494#ifdef CONFIG_SMP
497 else if (pending & CAUSEF_IP3) 495 else if (pending & CAUSEF_IP3)
498 bcm1480_mailbox_interrupt(regs); 496 bcm1480_mailbox_interrupt();
499#endif 497#endif
500 498
501#ifdef CONFIG_KGDB 499#ifdef CONFIG_KGDB
502 else if (pending & CAUSEF_IP6) 500 else if (pending & CAUSEF_IP6)
503 bcm1480_kgdb_interrupt(regs); /* KGDB (uart 1) */ 501 bcm1480_kgdb_interrupt(); /* KGDB (uart 1) */
504#endif 502#endif
505 503
506 else if (pending & CAUSEF_IP2) { 504 else if (pending & CAUSEF_IP2) {
@@ -521,9 +519,9 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
521 519
522 if (mask_h) { 520 if (mask_h) {
523 if (mask_h ^ 1) 521 if (mask_h ^ 1)
524 do_IRQ(fls64(mask_h) - 1, regs); 522 do_IRQ(fls64(mask_h) - 1);
525 else 523 else
526 do_IRQ(63 + fls64(mask_l), regs); 524 do_IRQ(63 + fls64(mask_l));
527 } 525 }
528 } 526 }
529} 527}
diff --git a/arch/mips/sibyte/bcm1480/smp.c b/arch/mips/sibyte/bcm1480/smp.c
index 584a4b33faac..6eac36d1b8c8 100644
--- a/arch/mips/sibyte/bcm1480/smp.c
+++ b/arch/mips/sibyte/bcm1480/smp.c
@@ -88,7 +88,7 @@ void core_send_ipi(int cpu, unsigned int action)
88 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]); 88 __raw_writeq((((u64)action)<< 48), mailbox_0_set_regs[cpu]);
89} 89}
90 90
91void bcm1480_mailbox_interrupt(struct pt_regs *regs) 91void bcm1480_mailbox_interrupt(void)
92{ 92{
93 int cpu = smp_processor_id(); 93 int cpu = smp_processor_id();
94 unsigned int action; 94 unsigned int action;
diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c
index 7e088f6c4a86..bf12af46132e 100644
--- a/arch/mips/sibyte/bcm1480/time.c
+++ b/arch/mips/sibyte/bcm1480/time.c
@@ -31,7 +31,6 @@
31#include <linux/kernel_stat.h> 31#include <linux/kernel_stat.h>
32 32
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/ptrace.h>
35#include <asm/addrspace.h> 34#include <asm/addrspace.h>
36#include <asm/time.h> 35#include <asm/time.h>
37#include <asm/io.h> 36#include <asm/io.h>
@@ -100,10 +99,10 @@ void bcm1480_time_init(void)
100 99
101#include <asm/sibyte/sb1250.h> 100#include <asm/sibyte/sb1250.h>
102 101
103void bcm1480_timer_interrupt(struct pt_regs *regs) 102void bcm1480_timer_interrupt(void)
104{ 103{
105 int cpu = smp_processor_id(); 104 int cpu = smp_processor_id();
106 int irq = K_BCM1480_INT_TIMER_0+cpu; 105 int irq = K_BCM1480_INT_TIMER_0 + cpu;
107 106
108 /* Reset the timer */ 107 /* Reset the timer */
109 __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS, 108 __raw_writeq(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS,
@@ -113,13 +112,13 @@ void bcm1480_timer_interrupt(struct pt_regs *regs)
113 /* 112 /*
114 * CPU 0 handles the global timer interrupt job 113 * CPU 0 handles the global timer interrupt job
115 */ 114 */
116 ll_timer_interrupt(irq, regs); 115 ll_timer_interrupt(irq);
117 } 116 }
118 else { 117 else {
119 /* 118 /*
120 * other CPUs should just do profiling and process accounting 119 * other CPUs should just do profiling and process accounting
121 */ 120 */
122 ll_local_timer_interrupt(irq, regs); 121 ll_local_timer_interrupt(irq);
123 } 122 }
124} 123}
125 124
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index f9bd9f074517..d5d26770daf6 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -28,7 +28,6 @@
28#include <asm/errno.h> 28#include <asm/errno.h>
29#include <asm/signal.h> 29#include <asm/signal.h>
30#include <asm/system.h> 30#include <asm/system.h>
31#include <asm/ptrace.h>
32#include <asm/io.h> 31#include <asm/io.h>
33 32
34#include <asm/sibyte/sb1250_regs.h> 33#include <asm/sibyte/sb1250_regs.h>
@@ -254,8 +253,7 @@ void __init init_sb1250_irqs(void)
254} 253}
255 254
256 255
257static irqreturn_t sb1250_dummy_handler(int irq, void *dev_id, 256static irqreturn_t sb1250_dummy_handler(int irq, void *dev_id)
258 struct pt_regs *regs)
259{ 257{
260 return IRQ_NONE; 258 return IRQ_NONE;
261} 259}
@@ -403,7 +401,7 @@ void __init arch_init_irq(void)
403#define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port,reg))) 401#define duart_out(reg, val) csr_out32(val, IOADDR(A_DUART_CHANREG(kgdb_port,reg)))
404#define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port,reg))) 402#define duart_in(reg) csr_in32(IOADDR(A_DUART_CHANREG(kgdb_port,reg)))
405 403
406static void sb1250_kgdb_interrupt(struct pt_regs *regs) 404static void sb1250_kgdb_interrupt(void)
407{ 405{
408 /* 406 /*
409 * Clear break-change status (allow some time for the remote 407 * Clear break-change status (allow some time for the remote
@@ -414,16 +412,15 @@ static void sb1250_kgdb_interrupt(struct pt_regs *regs)
414 mdelay(500); 412 mdelay(500);
415 duart_out(R_DUART_CMD, V_DUART_MISC_CMD_RESET_BREAK_INT | 413 duart_out(R_DUART_CMD, V_DUART_MISC_CMD_RESET_BREAK_INT |
416 M_DUART_RX_EN | M_DUART_TX_EN); 414 M_DUART_RX_EN | M_DUART_TX_EN);
417 set_async_breakpoint(&regs->cp0_epc); 415 set_async_breakpoint(&get_irq_regs()->cp0_epc);
418} 416}
419 417
420#endif /* CONFIG_KGDB */ 418#endif /* CONFIG_KGDB */
421 419
422extern void sb1250_timer_interrupt(struct pt_regs *regs); 420extern void sb1250_timer_interrupt(void);
423extern void sb1250_mailbox_interrupt(struct pt_regs *regs); 421extern void sb1250_mailbox_interrupt(void);
424extern void sb1250_kgdb_interrupt(struct pt_regs *regs);
425 422
426asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 423asmlinkage void plat_irq_dispatch(void)
427{ 424{
428 unsigned int pending; 425 unsigned int pending;
429 426
@@ -446,21 +443,21 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
446 443
447#ifdef CONFIG_SIBYTE_SB1250_PROF 444#ifdef CONFIG_SIBYTE_SB1250_PROF
448 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */ 445 if (pending & CAUSEF_IP7) /* Cpu performance counter interrupt */
449 sbprof_cpu_intr(exception_epc(regs)); 446 sbprof_cpu_intr();
450 else 447 else
451#endif 448#endif
452 449
453 if (pending & CAUSEF_IP4) 450 if (pending & CAUSEF_IP4)
454 sb1250_timer_interrupt(regs); 451 sb1250_timer_interrupt();
455 452
456#ifdef CONFIG_SMP 453#ifdef CONFIG_SMP
457 else if (pending & CAUSEF_IP3) 454 else if (pending & CAUSEF_IP3)
458 sb1250_mailbox_interrupt(regs); 455 sb1250_mailbox_interrupt();
459#endif 456#endif
460 457
461#ifdef CONFIG_KGDB 458#ifdef CONFIG_KGDB
462 else if (pending & CAUSEF_IP6) /* KGDB (uart 1) */ 459 else if (pending & CAUSEF_IP6) /* KGDB (uart 1) */
463 sb1250_kgdb_interrupt(regs); 460 sb1250_kgdb_interrupt();
464#endif 461#endif
465 462
466 else if (pending & CAUSEF_IP2) { 463 else if (pending & CAUSEF_IP2) {
@@ -475,9 +472,9 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
475 mask = __raw_readq(IOADDR(A_IMR_REGISTER(smp_processor_id(), 472 mask = __raw_readq(IOADDR(A_IMR_REGISTER(smp_processor_id(),
476 R_IMR_INTERRUPT_STATUS_BASE))); 473 R_IMR_INTERRUPT_STATUS_BASE)));
477 if (mask) 474 if (mask)
478 do_IRQ(fls64(mask) - 1, regs); 475 do_IRQ(fls64(mask) - 1);
479 else 476 else
480 spurious_interrupt(regs); 477 spurious_interrupt();
481 } else 478 } else
482 spurious_interrupt(regs); 479 spurious_interrupt();
483} 480}
diff --git a/arch/mips/sibyte/sb1250/smp.c b/arch/mips/sibyte/sb1250/smp.c
index f859db02d3c9..c38e1f34460d 100644
--- a/arch/mips/sibyte/sb1250/smp.c
+++ b/arch/mips/sibyte/sb1250/smp.c
@@ -76,7 +76,7 @@ void core_send_ipi(int cpu, unsigned int action)
76 __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]); 76 __raw_writeq((((u64)action) << 48), mailbox_set_regs[cpu]);
77} 77}
78 78
79void sb1250_mailbox_interrupt(struct pt_regs *regs) 79void sb1250_mailbox_interrupt(void)
80{ 80{
81 int cpu = smp_processor_id(); 81 int cpu = smp_processor_id();
82 unsigned int action; 82 unsigned int action;
diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c
index 4b669dc86ef4..0ccf1796dd78 100644
--- a/arch/mips/sibyte/sb1250/time.c
+++ b/arch/mips/sibyte/sb1250/time.c
@@ -31,7 +31,6 @@
31#include <linux/kernel_stat.h> 31#include <linux/kernel_stat.h>
32 32
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/ptrace.h>
35#include <asm/addrspace.h> 34#include <asm/addrspace.h>
36#include <asm/time.h> 35#include <asm/time.h>
37#include <asm/io.h> 36#include <asm/io.h>
@@ -125,7 +124,7 @@ void sb1250_time_init(void)
125 */ 124 */
126} 125}
127 126
128void sb1250_timer_interrupt(struct pt_regs *regs) 127void sb1250_timer_interrupt(void)
129{ 128{
130 int cpu = smp_processor_id(); 129 int cpu = smp_processor_id();
131 int irq = K_INT_TIMER_0 + cpu; 130 int irq = K_INT_TIMER_0 + cpu;
@@ -138,13 +137,13 @@ void sb1250_timer_interrupt(struct pt_regs *regs)
138 /* 137 /*
139 * CPU 0 handles the global timer interrupt job 138 * CPU 0 handles the global timer interrupt job
140 */ 139 */
141 ll_timer_interrupt(irq, regs); 140 ll_timer_interrupt(irq);
142 } 141 }
143 else { 142 else {
144 /* 143 /*
145 * other CPUs should just do profiling and process accounting 144 * other CPUs should just do profiling and process accounting
146 */ 145 */
147 ll_local_timer_interrupt(irq, regs); 146 ll_local_timer_interrupt(irq);
148 } 147 }
149} 148}
150 149
diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c
index cda165f42b6a..48fb74a7aaec 100644
--- a/arch/mips/sni/irq.c
+++ b/arch/mips/sni/irq.c
@@ -69,20 +69,20 @@ static struct irq_chip pciasic_irq_type = {
69 * hwint0 should deal with MP agent, ASIC PCI, EISA NMI and debug 69 * hwint0 should deal with MP agent, ASIC PCI, EISA NMI and debug
70 * button interrupts. Later ... 70 * button interrupts. Later ...
71 */ 71 */
72static void pciasic_hwint0(struct pt_regs *regs) 72static void pciasic_hwint0(void)
73{ 73{
74 panic("Received int0 but no handler yet ..."); 74 panic("Received int0 but no handler yet ...");
75} 75}
76 76
77/* This interrupt was used for the com1 console on the first prototypes. */ 77/* This interrupt was used for the com1 console on the first prototypes. */
78static void pciasic_hwint2(struct pt_regs *regs) 78static void pciasic_hwint2(void)
79{ 79{
80 /* I think this shouldn't happen on production machines. */ 80 /* I think this shouldn't happen on production machines. */
81 panic("hwint2 and no handler yet"); 81 panic("hwint2 and no handler yet");
82} 82}
83 83
84/* hwint5 is the r4k count / compare interrupt */ 84/* hwint5 is the r4k count / compare interrupt */
85static void pciasic_hwint5(struct pt_regs *regs) 85static void pciasic_hwint5(void)
86{ 86{
87 panic("hwint5 and no handler yet"); 87 panic("hwint5 and no handler yet");
88} 88}
@@ -103,7 +103,7 @@ static unsigned int ls1bit8(unsigned int x)
103 * 103 *
104 * The EISA_INT bit in CSITPEND is high active, all others are low active. 104 * The EISA_INT bit in CSITPEND is high active, all others are low active.
105 */ 105 */
106static void pciasic_hwint1(struct pt_regs *regs) 106static void pciasic_hwint1(void)
107{ 107{
108 u8 pend = *(volatile char *)PCIMT_CSITPEND; 108 u8 pend = *(volatile char *)PCIMT_CSITPEND;
109 unsigned long flags; 109 unsigned long flags;
@@ -119,13 +119,13 @@ static void pciasic_hwint1(struct pt_regs *regs)
119 if (unlikely(irq < 0)) 119 if (unlikely(irq < 0))
120 return; 120 return;
121 121
122 do_IRQ(irq, regs); 122 do_IRQ(irq);
123 } 123 }
124 124
125 if (!(pend & IT_SCSI)) { 125 if (!(pend & IT_SCSI)) {
126 flags = read_c0_status(); 126 flags = read_c0_status();
127 clear_c0_status(ST0_IM); 127 clear_c0_status(ST0_IM);
128 do_IRQ(PCIMT_IRQ_SCSI, regs); 128 do_IRQ(PCIMT_IRQ_SCSI);
129 write_c0_status(flags); 129 write_c0_status(flags);
130 } 130 }
131} 131}
@@ -133,7 +133,7 @@ static void pciasic_hwint1(struct pt_regs *regs)
133/* 133/*
134 * hwint 3 should deal with the PCI A - D interrupts, 134 * hwint 3 should deal with the PCI A - D interrupts,
135 */ 135 */
136static void pciasic_hwint3(struct pt_regs *regs) 136static void pciasic_hwint3(void)
137{ 137{
138 u8 pend = *(volatile char *)PCIMT_CSITPEND; 138 u8 pend = *(volatile char *)PCIMT_CSITPEND;
139 int irq; 139 int irq;
@@ -141,21 +141,21 @@ static void pciasic_hwint3(struct pt_regs *regs)
141 pend &= (IT_INTA | IT_INTB | IT_INTC | IT_INTD); 141 pend &= (IT_INTA | IT_INTB | IT_INTC | IT_INTD);
142 clear_c0_status(IE_IRQ3); 142 clear_c0_status(IE_IRQ3);
143 irq = PCIMT_IRQ_INT2 + ls1bit8(pend); 143 irq = PCIMT_IRQ_INT2 + ls1bit8(pend);
144 do_IRQ(irq, regs); 144 do_IRQ(irq);
145 set_c0_status(IE_IRQ3); 145 set_c0_status(IE_IRQ3);
146} 146}
147 147
148/* 148/*
149 * hwint 4 is used for only the onboard PCnet 32. 149 * hwint 4 is used for only the onboard PCnet 32.
150 */ 150 */
151static void pciasic_hwint4(struct pt_regs *regs) 151static void pciasic_hwint4(void)
152{ 152{
153 clear_c0_status(IE_IRQ4); 153 clear_c0_status(IE_IRQ4);
154 do_IRQ(PCIMT_IRQ_ETHERNET, regs); 154 do_IRQ(PCIMT_IRQ_ETHERNET);
155 set_c0_status(IE_IRQ4); 155 set_c0_status(IE_IRQ4);
156} 156}
157 157
158asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 158asmlinkage void plat_irq_dispatch(void)
159{ 159{
160 unsigned int pending = read_c0_status() & read_c0_cause(); 160 unsigned int pending = read_c0_status() & read_c0_cause();
161 static unsigned char led_cache; 161 static unsigned char led_cache;
@@ -163,17 +163,17 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
163 *(volatile unsigned char *) PCIMT_CSLED = ++led_cache; 163 *(volatile unsigned char *) PCIMT_CSLED = ++led_cache;
164 164
165 if (pending & 0x0800) 165 if (pending & 0x0800)
166 pciasic_hwint1(regs); 166 pciasic_hwint1();
167 else if (pending & 0x4000) 167 else if (pending & 0x4000)
168 pciasic_hwint4(regs); 168 pciasic_hwint4();
169 else if (pending & 0x2000) 169 else if (pending & 0x2000)
170 pciasic_hwint3(regs); 170 pciasic_hwint3();
171 else if (pending & 0x1000) 171 else if (pending & 0x1000)
172 pciasic_hwint2(regs); 172 pciasic_hwint2();
173 else if (pending & 0x8000) 173 else if (pending & 0x8000)
174 pciasic_hwint5(regs); 174 pciasic_hwint5();
175 else if (pending & 0x0400) 175 else if (pending & 0x0400)
176 pciasic_hwint0(regs); 176 pciasic_hwint0();
177} 177}
178 178
179void __init init_pciasic(void) 179void __init init_pciasic(void)
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index 4e98feb15410..afeb7f13e5b5 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -31,7 +31,6 @@
31#include <asm/irq.h> 31#include <asm/irq.h>
32#include <asm/mc146818-time.h> 32#include <asm/mc146818-time.h>
33#include <asm/processor.h> 33#include <asm/processor.h>
34#include <asm/ptrace.h>
35#include <asm/reboot.h> 34#include <asm/reboot.h>
36#include <asm/sni.h> 35#include <asm/sni.h>
37#include <asm/time.h> 36#include <asm/time.h>
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c
index cd176f6a06c8..8266a88a3f88 100644
--- a/arch/mips/tx4927/common/tx4927_irq.c
+++ b/arch/mips/tx4927/common/tx4927_irq.c
@@ -576,24 +576,24 @@ static int tx4927_irq_nested(void)
576 return (sw_irq); 576 return (sw_irq);
577} 577}
578 578
579asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 579asmlinkage void plat_irq_dispatch(void)
580{ 580{
581 unsigned int pending = read_c0_status() & read_c0_cause(); 581 unsigned int pending = read_c0_status() & read_c0_cause();
582 582
583 if (pending & STATUSF_IP7) /* cpu timer */ 583 if (pending & STATUSF_IP7) /* cpu timer */
584 do_IRQ(TX4927_IRQ_CPU_TIMER, regs); 584 do_IRQ(TX4927_IRQ_CPU_TIMER);
585 else if (pending & STATUSF_IP2) { /* tx4927 pic */ 585 else if (pending & STATUSF_IP2) { /* tx4927 pic */
586 unsigned int irq = tx4927_irq_nested(); 586 unsigned int irq = tx4927_irq_nested();
587 587
588 if (unlikely(irq == 0)) { 588 if (unlikely(irq == 0)) {
589 spurious_interrupt(regs); 589 spurious_interrupt();
590 return; 590 return;
591 } 591 }
592 do_IRQ(irq, regs); 592 do_IRQ(irq);
593 } else if (pending & STATUSF_IP0) /* user line 0 */ 593 } else if (pending & STATUSF_IP0) /* user line 0 */
594 do_IRQ(TX4927_IRQ_USER0, regs); 594 do_IRQ(TX4927_IRQ_USER0);
595 else if (pending & STATUSF_IP1) /* user line 1 */ 595 else if (pending & STATUSF_IP1) /* user line 1 */
596 do_IRQ(TX4927_IRQ_USER1, regs); 596 do_IRQ(TX4927_IRQ_USER1);
597 else 597 else
598 spurious_interrupt(regs); 598 spurious_interrupt();
599} 599}
diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c
index 3ace4037343e..4658b2ae4833 100644
--- a/arch/mips/tx4927/common/tx4927_setup.c
+++ b/arch/mips/tx4927/common/tx4927_setup.c
@@ -53,19 +53,9 @@ void __init tx4927_time_init(void);
53void dump_cp0(char *key); 53void dump_cp0(char *key);
54 54
55 55
56void (*__wbflush) (void);
57
58static void tx4927_write_buffer_flush(void)
59{
60 __asm__ __volatile__
61 ("sync\n\t" "nop\n\t" "loop: bc0f loop\n\t" "nop\n\t");
62}
63
64
65void __init plat_mem_setup(void) 56void __init plat_mem_setup(void)
66{ 57{
67 board_time_init = tx4927_time_init; 58 board_time_init = tx4927_time_init;
68 __wbflush = tx4927_write_buffer_flush;
69 59
70#ifdef CONFIG_TOSHIBA_RBTX4927 60#ifdef CONFIG_TOSHIBA_RBTX4927
71 { 61 {
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
index b0f021f2a6c4..0c3c3f668230 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
@@ -127,9 +127,9 @@ JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthB
127#include <asm/irq.h> 127#include <asm/irq.h>
128#include <asm/pci.h> 128#include <asm/pci.h>
129#include <asm/processor.h> 129#include <asm/processor.h>
130#include <asm/ptrace.h>
131#include <asm/reboot.h> 130#include <asm/reboot.h>
132#include <asm/time.h> 131#include <asm/time.h>
132#include <asm/wbflush.h>
133#include <linux/bootmem.h> 133#include <linux/bootmem.h>
134#include <linux/blkdev.h> 134#include <linux/blkdev.h>
135#ifdef CONFIG_RTC_DS1742 135#ifdef CONFIG_RTC_DS1742
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index f0d70c476005..735cb8778f4c 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -58,8 +58,8 @@
58#include <asm/page.h> 58#include <asm/page.h>
59#include <asm/io.h> 59#include <asm/io.h>
60#include <asm/irq.h> 60#include <asm/irq.h>
61#include <asm/irq_regs.h>
61#include <asm/processor.h> 62#include <asm/processor.h>
62#include <asm/ptrace.h>
63#include <asm/reboot.h> 63#include <asm/reboot.h>
64#include <asm/time.h> 64#include <asm/time.h>
65#include <linux/bootmem.h> 65#include <linux/bootmem.h>
@@ -160,8 +160,7 @@ int tx4927_pci66 = 0; /* 0:auto */
160char *toshiba_name = ""; 160char *toshiba_name = "";
161 161
162#ifdef CONFIG_PCI 162#ifdef CONFIG_PCI
163static void tx4927_pcierr_interrupt(int irq, void *dev_id, 163static void tx4927_pcierr_interrupt(int irq, void *dev_id)
164 struct pt_regs *regs)
165{ 164{
166#ifdef CONFIG_BLK_DEV_IDEPCI 165#ifdef CONFIG_BLK_DEV_IDEPCI
167 /* ignore MasterAbort for ide probing... */ 166 /* ignore MasterAbort for ide probing... */
@@ -185,7 +184,7 @@ static void tx4927_pcierr_interrupt(int irq, void *dev_id,
185 (unsigned long) tx4927_ccfgptr->ccfg, 184 (unsigned long) tx4927_ccfgptr->ccfg,
186 (unsigned long) (tx4927_ccfgptr->tear >> 32), 185 (unsigned long) (tx4927_ccfgptr->tear >> 32),
187 (unsigned long) tx4927_ccfgptr->tear); 186 (unsigned long) tx4927_ccfgptr->tear);
188 show_regs(regs); 187 show_regs(get_irq_regs());
189} 188}
190 189
191void __init toshiba_rbtx4927_pci_irq_init(void) 190void __init toshiba_rbtx4927_pci_irq_init(void)
diff --git a/arch/mips/tx4938/common/irq.c b/arch/mips/tx4938/common/irq.c
index cbfb34221b59..77fe2454f5b9 100644
--- a/arch/mips/tx4938/common/irq.c
+++ b/arch/mips/tx4938/common/irq.c
@@ -30,6 +30,7 @@
30#include <asm/irq.h> 30#include <asm/irq.h>
31#include <asm/mipsregs.h> 31#include <asm/mipsregs.h>
32#include <asm/system.h> 32#include <asm/system.h>
33#include <asm/wbflush.h>
33#include <asm/tx4938/rbtx4938.h> 34#include <asm/tx4938/rbtx4938.h>
34 35
35/**********************************************************************************/ 36/**********************************************************************************/
@@ -104,8 +105,6 @@ tx4938_irq_cp0_init(void)
104 irq_desc[i].depth = 1; 105 irq_desc[i].depth = 1;
105 irq_desc[i].chip = &tx4938_irq_cp0_type; 106 irq_desc[i].chip = &tx4938_irq_cp0_type;
106 } 107 }
107
108 return;
109} 108}
110 109
111static unsigned int 110static unsigned int
@@ -113,7 +112,7 @@ tx4938_irq_cp0_startup(unsigned int irq)
113{ 112{
114 tx4938_irq_cp0_enable(irq); 113 tx4938_irq_cp0_enable(irq);
115 114
116 return (0); 115 return 0;
117} 116}
118 117
119static void 118static void
@@ -144,16 +143,12 @@ tx4938_irq_cp0_disable(unsigned int irq)
144 clear_c0_status(tx4938_irq_cp0_mask(irq)); 143 clear_c0_status(tx4938_irq_cp0_mask(irq));
145 144
146 spin_unlock_irqrestore(&tx4938_cp0_lock, flags); 145 spin_unlock_irqrestore(&tx4938_cp0_lock, flags);
147
148 return;
149} 146}
150 147
151static void 148static void
152tx4938_irq_cp0_mask_and_ack(unsigned int irq) 149tx4938_irq_cp0_mask_and_ack(unsigned int irq)
153{ 150{
154 tx4938_irq_cp0_disable(irq); 151 tx4938_irq_cp0_disable(irq);
155
156 return;
157} 152}
158 153
159static void 154static void
@@ -162,8 +157,6 @@ tx4938_irq_cp0_end(unsigned int irq)
162 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { 157 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
163 tx4938_irq_cp0_enable(irq); 158 tx4938_irq_cp0_enable(irq);
164 } 159 }
165
166 return;
167} 160}
168 161
169/**********************************************************************************/ 162/**********************************************************************************/
@@ -227,7 +220,7 @@ tx4938_irq_pic_addr(int irq)
227 } 220 }
228 } 221 }
229 222
230 return (0); 223 return 0;
231} 224}
232 225
233u32 226u32
@@ -278,7 +271,7 @@ tx4938_irq_pic_mask(int irq)
278 return (0x00000007); 271 return (0x00000007);
279 } 272 }
280 } 273 }
281 return (0x00000000); 274 return 0x00000000;
282} 275}
283 276
284static void 277static void
@@ -292,8 +285,6 @@ tx4938_irq_pic_modify(unsigned pic_reg, unsigned clr_bits, unsigned set_bits)
292 TX4938_WR(pic_reg, val); 285 TX4938_WR(pic_reg, val);
293 mmiowb(); 286 mmiowb();
294 TX4938_RD(pic_reg); 287 TX4938_RD(pic_reg);
295
296 return;
297} 288}
298 289
299static void __init 290static void __init
@@ -317,8 +308,6 @@ tx4938_irq_pic_init(void)
317 TX4938_WR(0xff1ff600, TX4938_RD(0xff1ff600) | 0x1); /* irq enable */ 308 TX4938_WR(0xff1ff600, TX4938_RD(0xff1ff600) | 0x1); /* irq enable */
318 309
319 spin_unlock_irqrestore(&tx4938_pic_lock, flags); 310 spin_unlock_irqrestore(&tx4938_pic_lock, flags);
320
321 return;
322} 311}
323 312
324static unsigned int 313static unsigned int
@@ -326,15 +315,13 @@ tx4938_irq_pic_startup(unsigned int irq)
326{ 315{
327 tx4938_irq_pic_enable(irq); 316 tx4938_irq_pic_enable(irq);
328 317
329 return (0); 318 return 0;
330} 319}
331 320
332static void 321static void
333tx4938_irq_pic_shutdown(unsigned int irq) 322tx4938_irq_pic_shutdown(unsigned int irq)
334{ 323{
335 tx4938_irq_pic_disable(irq); 324 tx4938_irq_pic_disable(irq);
336
337 return;
338} 325}
339 326
340static void 327static void
@@ -348,8 +335,6 @@ tx4938_irq_pic_enable(unsigned int irq)
348 tx4938_irq_pic_mask(irq)); 335 tx4938_irq_pic_mask(irq));
349 336
350 spin_unlock_irqrestore(&tx4938_pic_lock, flags); 337 spin_unlock_irqrestore(&tx4938_pic_lock, flags);
351
352 return;
353} 338}
354 339
355static void 340static void
@@ -363,16 +348,12 @@ tx4938_irq_pic_disable(unsigned int irq)
363 tx4938_irq_pic_mask(irq), 0); 348 tx4938_irq_pic_mask(irq), 0);
364 349
365 spin_unlock_irqrestore(&tx4938_pic_lock, flags); 350 spin_unlock_irqrestore(&tx4938_pic_lock, flags);
366
367 return;
368} 351}
369 352
370static void 353static void
371tx4938_irq_pic_mask_and_ack(unsigned int irq) 354tx4938_irq_pic_mask_and_ack(unsigned int irq)
372{ 355{
373 tx4938_irq_pic_disable(irq); 356 tx4938_irq_pic_disable(irq);
374
375 return;
376} 357}
377 358
378static void 359static void
@@ -381,8 +362,6 @@ tx4938_irq_pic_end(unsigned int irq)
381 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) { 362 if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
382 tx4938_irq_pic_enable(irq); 363 tx4938_irq_pic_enable(irq);
383 } 364 }
384
385 return;
386} 365}
387 366
388/**********************************************************************************/ 367/**********************************************************************************/
@@ -394,8 +373,6 @@ tx4938_irq_init(void)
394{ 373{
395 tx4938_irq_cp0_init(); 374 tx4938_irq_cp0_init();
396 tx4938_irq_pic_init(); 375 tx4938_irq_pic_init();
397
398 return;
399} 376}
400 377
401int 378int
@@ -417,23 +394,23 @@ tx4938_irq_nested(void)
417 } 394 }
418 395
419 wbflush(); 396 wbflush();
420 return (sw_irq); 397 return sw_irq;
421} 398}
422 399
423asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 400asmlinkage void plat_irq_dispatch(void)
424{ 401{
425 unsigned int pending = read_c0_cause() & read_c0_status(); 402 unsigned int pending = read_c0_cause() & read_c0_status();
426 403
427 if (pending & STATUSF_IP7) 404 if (pending & STATUSF_IP7)
428 do_IRQ(TX4938_IRQ_CPU_TIMER, regs); 405 do_IRQ(TX4938_IRQ_CPU_TIMER);
429 else if (pending & STATUSF_IP2) { 406 else if (pending & STATUSF_IP2) {
430 int irq = tx4938_irq_nested(); 407 int irq = tx4938_irq_nested();
431 if (irq) 408 if (irq)
432 do_IRQ(irq, regs); 409 do_IRQ(irq);
433 else 410 else
434 spurious_interrupt(regs); 411 spurious_interrupt();
435 } else if (pending & STATUSF_IP1) 412 } else if (pending & STATUSF_IP1)
436 do_IRQ(TX4938_IRQ_USER1, regs); 413 do_IRQ(TX4938_IRQ_USER1);
437 else if (pending & STATUSF_IP0) 414 else if (pending & STATUSF_IP0)
438 do_IRQ(TX4938_IRQ_USER0, regs); 415 do_IRQ(TX4938_IRQ_USER0);
439} 416}
diff --git a/arch/mips/tx4938/common/setup.c b/arch/mips/tx4938/common/setup.c
index 71859c4fee84..f415a1f18fba 100644
--- a/arch/mips/tx4938/common/setup.c
+++ b/arch/mips/tx4938/common/setup.c
@@ -41,29 +41,10 @@ void __init tx4938_setup(void);
41void __init tx4938_time_init(void); 41void __init tx4938_time_init(void);
42void dump_cp0(char *key); 42void dump_cp0(char *key);
43 43
44void (*__wbflush) (void);
45
46static void
47tx4938_write_buffer_flush(void)
48{
49 mmiowb();
50
51 __asm__ __volatile__(
52 ".set push\n\t"
53 ".set noreorder\n\t"
54 "lw $0,%0\n\t"
55 "nop\n\t"
56 ".set pop"
57 : /* no output */
58 : "m" (*(int *)KSEG1)
59 : "memory");
60}
61
62void __init 44void __init
63plat_mem_setup(void) 45plat_mem_setup(void)
64{ 46{
65 board_time_init = tx4938_time_init; 47 board_time_init = tx4938_time_init;
66 __wbflush = tx4938_write_buffer_flush;
67 toshiba_rbtx4938_setup(); 48 toshiba_rbtx4938_setup();
68} 49}
69 50
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/irq.c b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
index 83f2750825a4..102e473c10a2 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/irq.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/irq.c
@@ -81,9 +81,9 @@ IRQ Device
81#include <asm/io.h> 81#include <asm/io.h>
82#include <asm/irq.h> 82#include <asm/irq.h>
83#include <asm/processor.h> 83#include <asm/processor.h>
84#include <asm/ptrace.h>
85#include <asm/reboot.h> 84#include <asm/reboot.h>
86#include <asm/time.h> 85#include <asm/time.h>
86#include <asm/wbflush.h>
87#include <linux/bootmem.h> 87#include <linux/bootmem.h>
88#include <asm/tx4938/rbtx4938.h> 88#include <asm/tx4938/rbtx4938.h>
89 89
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
index fae3136f462d..b926e6a75c29 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/spi_txx9.c
@@ -35,7 +35,8 @@ void __init txx9_spi_init(unsigned long base, int (*cs_func)(int chipid, int on)
35} 35}
36 36
37static DECLARE_WAIT_QUEUE_HEAD(txx9_spi_wait); 37static DECLARE_WAIT_QUEUE_HEAD(txx9_spi_wait);
38static void txx9_spi_interrupt(int irq, void *dev_id, struct pt_regs *regs) 38
39static void txx9_spi_interrupt(int irq, void *dev_id)
39{ 40{
40 /* disable rx intr */ 41 /* disable rx intr */
41 tx4938_spiptr->cr0 &= ~TXx9_SPCR0_RBSIE; 42 tx4938_spiptr->cr0 &= ~TXx9_SPCR0_RBSIE;
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c
index 7a5c31d58378..c215c0d39fae 100644
--- a/arch/mips/vr41xx/common/icu.c
+++ b/arch/mips/vr41xx/common/icu.c
@@ -635,7 +635,7 @@ int vr41xx_set_intassign(unsigned int irq, unsigned char intassign)
635 635
636EXPORT_SYMBOL(vr41xx_set_intassign); 636EXPORT_SYMBOL(vr41xx_set_intassign);
637 637
638static int icu_get_irq(unsigned int irq, struct pt_regs *regs) 638static int icu_get_irq(unsigned int irq)
639{ 639{
640 uint16_t pend1, pend2; 640 uint16_t pend1, pend2;
641 uint16_t mask1, mask2; 641 uint16_t mask1, mask2;
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c
index 4733c5344467..397ba94cd7ec 100644
--- a/arch/mips/vr41xx/common/irq.c
+++ b/arch/mips/vr41xx/common/irq.c
@@ -25,7 +25,7 @@
25#include <asm/vr41xx/irq.h> 25#include <asm/vr41xx/irq.h>
26 26
27typedef struct irq_cascade { 27typedef struct irq_cascade {
28 int (*get_irq)(unsigned int, struct pt_regs *); 28 int (*get_irq)(unsigned int);
29} irq_cascade_t; 29} irq_cascade_t;
30 30
31static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned; 31static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned;
@@ -36,7 +36,7 @@ static struct irqaction cascade_irqaction = {
36 .name = "cascade", 36 .name = "cascade",
37}; 37};
38 38
39int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *)) 39int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int))
40{ 40{
41 int retval = 0; 41 int retval = 0;
42 42
@@ -59,7 +59,7 @@ int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *)
59 59
60EXPORT_SYMBOL_GPL(cascade_irq); 60EXPORT_SYMBOL_GPL(cascade_irq);
61 61
62static void irq_dispatch(unsigned int irq, struct pt_regs *regs) 62static void irq_dispatch(unsigned int irq)
63{ 63{
64 irq_cascade_t *cascade; 64 irq_cascade_t *cascade;
65 struct irq_desc *desc; 65 struct irq_desc *desc;
@@ -74,39 +74,39 @@ static void irq_dispatch(unsigned int irq, struct pt_regs *regs)
74 unsigned int source_irq = irq; 74 unsigned int source_irq = irq;
75 desc = irq_desc + source_irq; 75 desc = irq_desc + source_irq;
76 desc->chip->ack(source_irq); 76 desc->chip->ack(source_irq);
77 irq = cascade->get_irq(irq, regs); 77 irq = cascade->get_irq(irq);
78 if (irq < 0) 78 if (irq < 0)
79 atomic_inc(&irq_err_count); 79 atomic_inc(&irq_err_count);
80 else 80 else
81 irq_dispatch(irq, regs); 81 irq_dispatch(irq);
82 desc->chip->end(source_irq); 82 desc->chip->end(source_irq);
83 } else 83 } else
84 do_IRQ(irq, regs); 84 do_IRQ(irq);
85} 85}
86 86
87asmlinkage void plat_irq_dispatch(struct pt_regs *regs) 87asmlinkage void plat_irq_dispatch(void)
88{ 88{
89 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM; 89 unsigned int pending = read_c0_cause() & read_c0_status() & ST0_IM;
90 90
91 if (pending & CAUSEF_IP7) 91 if (pending & CAUSEF_IP7)
92 do_IRQ(7, regs); 92 do_IRQ(7);
93 else if (pending & 0x7800) { 93 else if (pending & 0x7800) {
94 if (pending & CAUSEF_IP3) 94 if (pending & CAUSEF_IP3)
95 irq_dispatch(3, regs); 95 irq_dispatch(3);
96 else if (pending & CAUSEF_IP4) 96 else if (pending & CAUSEF_IP4)
97 irq_dispatch(4, regs); 97 irq_dispatch(4);
98 else if (pending & CAUSEF_IP5) 98 else if (pending & CAUSEF_IP5)
99 irq_dispatch(5, regs); 99 irq_dispatch(5);
100 else if (pending & CAUSEF_IP6) 100 else if (pending & CAUSEF_IP6)
101 irq_dispatch(6, regs); 101 irq_dispatch(6);
102 } else if (pending & CAUSEF_IP2) 102 } else if (pending & CAUSEF_IP2)
103 irq_dispatch(2, regs); 103 irq_dispatch(2);
104 else if (pending & CAUSEF_IP0) 104 else if (pending & CAUSEF_IP0)
105 do_IRQ(0, regs); 105 do_IRQ(0);
106 else if (pending & CAUSEF_IP1) 106 else if (pending & CAUSEF_IP1)
107 do_IRQ(1, regs); 107 do_IRQ(1);
108 else 108 else
109 spurious_interrupt(regs); 109 spurious_interrupt();
110} 110}
111 111
112void __init arch_init_irq(void) 112void __init arch_init_irq(void)