aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/alpha_ksyms.c93
-rw-r--r--arch/alpha/kernel/core_apecs.c5
-rw-r--r--arch/alpha/kernel/core_cia.c5
-rw-r--r--arch/alpha/kernel/core_irongate.c2
-rw-r--r--arch/alpha/kernel/core_lca.c6
-rw-r--r--arch/alpha/kernel/core_mcpcia.c5
-rw-r--r--arch/alpha/kernel/core_polaris.c5
-rw-r--r--arch/alpha/kernel/core_t2.c5
-rw-r--r--arch/alpha/kernel/core_tsunami.c5
-rw-r--r--arch/alpha/kernel/core_wildfire.c5
-rw-r--r--arch/alpha/kernel/err_ev6.c5
-rw-r--r--arch/alpha/kernel/err_ev7.c2
-rw-r--r--arch/alpha/kernel/err_impl.h10
-rw-r--r--arch/alpha/kernel/err_marvel.c4
-rw-r--r--arch/alpha/kernel/err_titan.c14
-rw-r--r--arch/alpha/kernel/irq.c4
-rw-r--r--arch/alpha/kernel/irq_alpha.c25
-rw-r--r--arch/alpha/kernel/irq_i8259.c8
-rw-r--r--arch/alpha/kernel/irq_impl.h10
-rw-r--r--arch/alpha/kernel/irq_pyxis.c6
-rw-r--r--arch/alpha/kernel/irq_srm.c4
-rw-r--r--arch/alpha/kernel/pci-noop.c1
-rw-r--r--arch/alpha/kernel/pci_iommu.c17
-rw-r--r--arch/alpha/kernel/process.c5
-rw-r--r--arch/alpha/kernel/proto.h29
-rw-r--r--arch/alpha/kernel/setup.c6
-rw-r--r--arch/alpha/kernel/smp.c14
-rw-r--r--arch/alpha/kernel/sys_alcor.c6
-rw-r--r--arch/alpha/kernel/sys_cabriolet.c16
-rw-r--r--arch/alpha/kernel/sys_dp264.c14
-rw-r--r--arch/alpha/kernel/sys_eb64p.c6
-rw-r--r--arch/alpha/kernel/sys_eiger.c16
-rw-r--r--arch/alpha/kernel/sys_jensen.c8
-rw-r--r--arch/alpha/kernel/sys_marvel.c4
-rw-r--r--arch/alpha/kernel/sys_miata.c4
-rw-r--r--arch/alpha/kernel/sys_mikasa.c11
-rw-r--r--arch/alpha/kernel/sys_nautilus.c7
-rw-r--r--arch/alpha/kernel/sys_noritake.c15
-rw-r--r--arch/alpha/kernel/sys_rawhide.c4
-rw-r--r--arch/alpha/kernel/sys_rx164.c6
-rw-r--r--arch/alpha/kernel/sys_sable.c4
-rw-r--r--arch/alpha/kernel/sys_takara.c16
-rw-r--r--arch/alpha/kernel/sys_titan.c12
-rw-r--r--arch/alpha/kernel/sys_wildfire.c4
-rw-r--r--arch/alpha/kernel/time.c7
-rw-r--r--arch/alpha/mm/numa.c2
-rw-r--r--arch/arm/common/locomo.c25
-rw-r--r--arch/arm/common/sa1111.c8
-rw-r--r--arch/arm/common/sharpsl_pm.c6
-rw-r--r--arch/arm/common/time-acorn.c4
-rw-r--r--arch/arm/kernel/armksyms.c6
-rw-r--r--arch/arm/kernel/ecard.c8
-rw-r--r--arch/arm/kernel/irq.c4
-rw-r--r--arch/arm/kernel/time.c6
-rw-r--r--arch/arm/mach-aaec2000/core.c4
-rw-r--r--arch/arm/mach-at91rm9200/at91rm9200_time.c4
-rw-r--r--arch/arm/mach-at91rm9200/gpio.c4
-rw-r--r--arch/arm/mach-clps711x/time.c4
-rw-r--r--arch/arm/mach-clps7500/core.c4
-rw-r--r--arch/arm/mach-ebsa110/core.c4
-rw-r--r--arch/arm/mach-ep93xx/core.c10
-rw-r--r--arch/arm/mach-footbridge/dc21285-timer.c4
-rw-r--r--arch/arm/mach-footbridge/dc21285.c12
-rw-r--r--arch/arm/mach-footbridge/isa-irq.c6
-rw-r--r--arch/arm/mach-footbridge/isa-timer.c4
-rw-r--r--arch/arm/mach-h720x/common.c29
-rw-r--r--arch/arm/mach-h720x/cpu-h7201.c4
-rw-r--r--arch/arm/mach-h720x/cpu-h7202.c11
-rw-r--r--arch/arm/mach-imx/dma.c12
-rw-r--r--arch/arm/mach-imx/irq.c24
-rw-r--r--arch/arm/mach-imx/time.c4
-rw-r--r--arch/arm/mach-integrator/core.c6
-rw-r--r--arch/arm/mach-integrator/integrator_cp.c6
-rw-r--r--arch/arm/mach-integrator/pci_v3.c3
-rw-r--r--arch/arm/mach-integrator/time.c3
-rw-r--r--arch/arm/mach-ixp2000/core.c12
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c4
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c4
-rw-r--r--arch/arm/mach-ixp23xx/core.c8
-rw-r--r--arch/arm/mach-ixp23xx/ixdp2351.c8
-rw-r--r--arch/arm/mach-ixp4xx/common.c4
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-power.c2
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-power.c4
-rw-r--r--arch/arm/mach-lh7a40x/arch-kev7a400.c5
-rw-r--r--arch/arm/mach-lh7a40x/arch-lpd7a40x.c3
-rw-r--r--arch/arm/mach-lh7a40x/irq-kev7a400.c5
-rw-r--r--arch/arm/mach-lh7a40x/irq-lpd7a40x.c3
-rw-r--r--arch/arm/mach-lh7a40x/time.c4
-rw-r--r--arch/arm/mach-netx/generic.c5
-rw-r--r--arch/arm/mach-netx/time.c4
-rw-r--r--arch/arm/mach-omap1/board-osk.c2
-rw-r--r--arch/arm/mach-omap1/fpga.c5
-rw-r--r--arch/arm/mach-omap1/pm.c3
-rw-r--r--arch/arm/mach-omap1/serial.c3
-rw-r--r--arch/arm/mach-omap1/time.c8
-rw-r--r--arch/arm/mach-omap2/board-apollon.c2
-rw-r--r--arch/arm/mach-omap2/timer-gp.c5
-rw-r--r--arch/arm/mach-pnx4008/dma.c10
-rw-r--r--arch/arm/mach-pnx4008/time.c5
-rw-r--r--arch/arm/mach-pxa/corgi.c2
-rw-r--r--arch/arm/mach-pxa/dma.c8
-rw-r--r--arch/arm/mach-pxa/idp.c2
-rw-r--r--arch/arm/mach-pxa/irq.c11
-rw-r--r--arch/arm/mach-pxa/lpd270.c5
-rw-r--r--arch/arm/mach-pxa/lubbock.c13
-rw-r--r--arch/arm/mach-pxa/mainstone.c7
-rw-r--r--arch/arm/mach-pxa/poodle.c2
-rw-r--r--arch/arm/mach-pxa/spitz.c2
-rw-r--r--arch/arm/mach-pxa/ssp.c2
-rw-r--r--arch/arm/mach-pxa/time.c8
-rw-r--r--arch/arm/mach-pxa/tosa.c2
-rw-r--r--arch/arm/mach-pxa/trizeps4.c2
-rw-r--r--arch/arm/mach-realview/core.c6
-rw-r--r--arch/arm/mach-rpc/dma.c2
-rw-r--r--arch/arm/mach-s3c2410/bast-irq.c5
-rw-r--r--arch/arm/mach-s3c2410/dma.c2
-rw-r--r--arch/arm/mach-s3c2410/irq.c41
-rw-r--r--arch/arm/mach-s3c2410/mach-amlm5900.c2
-rw-r--r--arch/arm/mach-s3c2410/s3c2440-irq.c7
-rw-r--r--arch/arm/mach-s3c2410/s3c244x-irq.c7
-rw-r--r--arch/arm/mach-s3c2410/time.c4
-rw-r--r--arch/arm/mach-s3c2410/usb-simtec.c2
-rw-r--r--arch/arm/mach-sa1100/dma.c2
-rw-r--r--arch/arm/mach-sa1100/h3600.c6
-rw-r--r--arch/arm/mach-sa1100/irq.c5
-rw-r--r--arch/arm/mach-sa1100/neponset.c8
-rw-r--r--arch/arm/mach-sa1100/ssp.c2
-rw-r--r--arch/arm/mach-sa1100/time.c8
-rw-r--r--arch/arm/mach-shark/core.c4
-rw-r--r--arch/arm/mach-shark/irq.c2
-rw-r--r--arch/arm/mach-versatile/core.c14
-rw-r--r--arch/arm/mach-versatile/pci.c32
-rw-r--r--arch/arm/mm/ioremap.c6
-rw-r--r--arch/arm/oprofile/op_model_xscale.c4
-rw-r--r--arch/arm/plat-iop/time.c4
-rw-r--r--arch/arm/plat-omap/dma.c9
-rw-r--r--arch/arm/plat-omap/gpio.c5
-rw-r--r--arch/arm/plat-omap/mcbsp.c4
-rw-r--r--arch/arm/plat-omap/timer32k.c15
-rw-r--r--arch/arm/vfp/vfpmodule.c2
-rw-r--r--arch/arm26/kernel/armksyms.c8
-rw-r--r--arch/avr32/kernel/time.c10
-rw-r--r--arch/avr32/mach-at32ap/extint.c5
-rw-r--r--arch/avr32/mach-at32ap/intc.c7
-rw-r--r--arch/i386/Kconfig.cpu3
-rw-r--r--arch/i386/kernel/apic.c2
-rw-r--r--arch/i386/kernel/io_apic.c14
-rw-r--r--arch/i386/kernel/microcode.c8
-rw-r--r--arch/i386/kernel/setup.c13
-rw-r--r--arch/i386/kernel/syscall_table.S1
-rw-r--r--arch/i386/kernel/time.c4
-rw-r--r--arch/i386/lib/usercopy.c2
-rw-r--r--arch/i386/mm/discontig.c11
-rw-r--r--arch/i386/pci/irq.c4
-rw-r--r--arch/ia64/hp/sim/simeth.c6
-rw-r--r--arch/ia64/hp/sim/simscsi.c2
-rw-r--r--arch/ia64/hp/sim/simserial.c20
-rw-r--r--arch/ia64/kernel/irq.c5
-rw-r--r--arch/ia64/kernel/irq_ia64.c7
-rw-r--r--arch/ia64/mm/contig.c1
-rw-r--r--arch/ia64/mm/discontig.c1
-rw-r--r--arch/ia64/sn/kernel/huberror.c4
-rw-r--r--arch/ia64/sn/kernel/sn2/timer_interrupt.c2
-rw-r--r--arch/ia64/sn/kernel/xpc_main.c7
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_ate.c2
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c4
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c42
-rw-r--r--arch/m32r/kernel/irq.c5
-rw-r--r--arch/m32r/kernel/setup.c8
-rw-r--r--arch/m32r/kernel/setup_mappi.c16
-rw-r--r--arch/m32r/kernel/signal.c6
-rw-r--r--arch/m32r/kernel/smp.c15
-rw-r--r--arch/m32r/kernel/sys_m32r.c6
-rw-r--r--arch/m32r/kernel/time.c10
-rw-r--r--arch/m32r/kernel/traps.c2
-rw-r--r--arch/m68k/Kconfig2
-rw-r--r--arch/m68k/amiga/amiints.c40
-rw-r--r--arch/m68k/amiga/cia.c4
-rw-r--r--arch/m68k/amiga/config.c5
-rw-r--r--arch/m68k/apollo/config.c14
-rw-r--r--arch/m68k/apollo/dma.c50
-rw-r--r--arch/m68k/apollo/dn_ints.c2
-rw-r--r--arch/m68k/atari/ataints.c9
-rw-r--r--arch/m68k/atari/config.c2
-rw-r--r--arch/m68k/atari/stdma.c11
-rw-r--r--arch/m68k/atari/time.c11
-rw-r--r--arch/m68k/bvme6000/config.c12
-rw-r--r--arch/m68k/hp300/time.c8
-rw-r--r--arch/m68k/hp300/time.h2
-rw-r--r--arch/m68k/kernel/Makefile3
-rw-r--r--arch/m68k/kernel/dma.c4
-rw-r--r--arch/m68k/kernel/entry.S33
-rw-r--r--arch/m68k/kernel/ints.c21
-rw-r--r--arch/m68k/kernel/m68k_ksyms.c55
-rw-r--r--arch/m68k/kernel/process.c11
-rw-r--r--arch/m68k/kernel/setup.c17
-rw-r--r--arch/m68k/kernel/time.c7
-rw-r--r--arch/m68k/kernel/traps.c6
-rw-r--r--arch/m68k/lib/string.c15
-rw-r--r--arch/m68k/lib/uaccess.c2
-rw-r--r--arch/m68k/mac/baboon.c6
-rw-r--r--arch/m68k/mac/config.c4
-rw-r--r--arch/m68k/mac/iop.c22
-rw-r--r--arch/m68k/mac/macints.c16
-rw-r--r--arch/m68k/mac/oss.c16
-rw-r--r--arch/m68k/mac/psc.c6
-rw-r--r--arch/m68k/mac/via.c24
-rw-r--r--arch/m68k/mm/kmap.c4
-rw-r--r--arch/m68k/mm/memory.c8
-rw-r--r--arch/m68k/mm/sun3kmap.c11
-rw-r--r--arch/m68k/mvme147/config.c10
-rw-r--r--arch/m68k/mvme16x/config.c12
-rw-r--r--arch/m68k/q40/config.c2
-rw-r--r--arch/m68k/q40/q40ints.c16
-rw-r--r--arch/m68k/sun3/Makefile2
-rw-r--r--arch/m68k/sun3/config.c4
-rw-r--r--arch/m68k/sun3/idprom.c3
-rw-r--r--arch/m68k/sun3/sun3_ksyms.c13
-rw-r--r--arch/m68k/sun3/sun3dvma.c6
-rw-r--r--arch/m68k/sun3/sun3ints.c11
-rw-r--r--arch/m68k/sun3x/time.c2
-rw-r--r--arch/m68k/sun3x/time.h2
-rw-r--r--arch/mips/Kconfig25
-rw-r--r--arch/mips/Makefile13
-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/bigsur_defconfig102
-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.c31
-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.c16
-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-klnuma.c2
-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.c8
-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
-rw-r--r--arch/parisc/kernel/drivers.c6
-rw-r--r--arch/parisc/kernel/firmware.c250
-rw-r--r--arch/parisc/kernel/irq.c9
-rw-r--r--arch/parisc/kernel/parisc_ksyms.c4
-rw-r--r--arch/parisc/kernel/smp.c15
-rw-r--r--arch/parisc/kernel/time.c34
-rw-r--r--arch/powerpc/boot/Makefile16
-rw-r--r--arch/powerpc/boot/dts/mpc8349emitx.dts246
-rw-r--r--arch/powerpc/boot/of.c5
-rw-r--r--arch/powerpc/configs/iseries_defconfig86
-rw-r--r--arch/powerpc/configs/maple_defconfig56
-rw-r--r--arch/powerpc/configs/pseries_defconfig2
-rw-r--r--arch/powerpc/kernel/ibmebus.c2
-rw-r--r--arch/powerpc/kernel/iommu.c2
-rw-r--r--arch/powerpc/kernel/irq.c6
-rw-r--r--arch/powerpc/kernel/prom.c2
-rw-r--r--arch/powerpc/kernel/time.c2
-rw-r--r--arch/powerpc/mm/mem.c7
-rw-r--r--arch/powerpc/mm/numa.c6
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx.c1
-rw-r--r--arch/powerpc/platforms/82xx/mpc82xx_ads.c7
-rw-r--r--arch/powerpc/platforms/82xx/pq2ads.h2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c5
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_cds.c7
-rw-r--r--arch/powerpc/platforms/86xx/mpc86xx_hpcn.c5
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c5
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c6
-rw-r--r--arch/powerpc/platforms/chrp/setup.c7
-rw-r--r--arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c5
-rw-r--r--arch/powerpc/platforms/iseries/irq.c17
-rw-r--r--arch/powerpc/platforms/iseries/irq.h2
-rw-r--r--arch/powerpc/platforms/iseries/lpevents.c4
-rw-r--r--arch/powerpc/platforms/iseries/mf.c4
-rw-r--r--arch/powerpc/platforms/iseries/smp.c6
-rw-r--r--arch/powerpc/platforms/iseries/smp.h6
-rw-r--r--arch/powerpc/platforms/iseries/viopath.c2
-rw-r--r--arch/powerpc/platforms/maple/pci.c187
-rw-r--r--arch/powerpc/platforms/pasemi/pci.c26
-rw-r--r--arch/powerpc/platforms/powermac/pic.c12
-rw-r--r--arch/powerpc/platforms/powermac/pic.h4
-rw-r--r--arch/powerpc/platforms/powermac/smp.c15
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c3
-rw-r--r--arch/powerpc/platforms/pseries/setup.c2
-rw-r--r--arch/powerpc/platforms/pseries/xics.c4
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.c2
-rw-r--r--arch/powerpc/sysdev/cpm2_pic.h2
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c9
-rw-r--r--arch/powerpc/sysdev/i8259.c2
-rw-r--r--arch/powerpc/sysdev/ipic.c2
-rw-r--r--arch/powerpc/sysdev/mpic.c6
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_ic.c14
-rw-r--r--arch/powerpc/sysdev/qe_lib/qe_io.c1
-rw-r--r--arch/powerpc/sysdev/tsi108_pci.c3
-rw-r--r--arch/powerpc/xmon/xmon.c6
-rw-r--r--arch/ppc/4xx_io/serial_sicc.c10
-rw-r--r--arch/ppc/8260_io/enet.c4
-rw-r--r--arch/ppc/8260_io/fcc_enet.c6
-rw-r--r--arch/ppc/8xx_io/commproc.c19
-rw-r--r--arch/ppc/8xx_io/cs4218_tdm.c4
-rw-r--r--arch/ppc/8xx_io/enet.c4
-rw-r--r--arch/ppc/8xx_io/fec.c7
-rw-r--r--arch/ppc/kernel/smp.c4
-rw-r--r--arch/ppc/kernel/time.c2
-rw-r--r--arch/ppc/mm/init.c7
-rw-r--r--arch/ppc/platforms/85xx/mpc8560_ads.c6
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_cds_common.c6
-rw-r--r--arch/ppc/platforms/85xx/stx_gp3.c6
-rw-r--r--arch/ppc/platforms/85xx/tqm85xx.c6
-rw-r--r--arch/ppc/platforms/apus_setup.c2
-rw-r--r--arch/ppc/platforms/hdpu.c22
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c10
-rw-r--r--arch/ppc/platforms/sbc82xx.c4
-rw-r--r--arch/ppc/syslib/cpc700.h2
-rw-r--r--arch/ppc/syslib/cpc700_pic.c2
-rw-r--r--arch/ppc/syslib/cpm2_pic.c2
-rw-r--r--arch/ppc/syslib/cpm2_pic.h2
-rw-r--r--arch/ppc/syslib/gt64260_pic.c9
-rw-r--r--arch/ppc/syslib/i8259.c2
-rw-r--r--arch/ppc/syslib/ibm440gx_common.c2
-rw-r--r--arch/ppc/syslib/ipic.c2
-rw-r--r--arch/ppc/syslib/m82xx_pci.c4
-rw-r--r--arch/ppc/syslib/m8xx_setup.c2
-rw-r--r--arch/ppc/syslib/m8xx_wdt.c4
-rw-r--r--arch/ppc/syslib/mpc52xx_pic.c2
-rw-r--r--arch/ppc/syslib/mv64360_pic.c22
-rw-r--r--arch/ppc/syslib/open_pic.c14
-rw-r--r--arch/ppc/syslib/open_pic2.c2
-rw-r--r--arch/ppc/syslib/ppc403_pic.c2
-rw-r--r--arch/ppc/syslib/ppc4xx_pic.c8
-rw-r--r--arch/ppc/syslib/ppc85xx_rio.c9
-rw-r--r--arch/ppc/syslib/ppc8xx_pic.c4
-rw-r--r--arch/ppc/syslib/xilinx_pic.c2
-rw-r--r--arch/s390/Kconfig3
-rw-r--r--arch/s390/appldata/appldata_base.c2
-rw-r--r--arch/s390/defconfig1
-rw-r--r--arch/s390/kernel/s390_ext.c9
-rw-r--r--arch/s390/kernel/s390_ksyms.c1
-rw-r--r--arch/s390/kernel/smp.c2
-rw-r--r--arch/s390/kernel/stacktrace.c17
-rw-r--r--arch/s390/kernel/time.c103
-rw-r--r--arch/s390/kernel/traps.c12
-rw-r--r--arch/s390/kernel/vtime.c11
-rw-r--r--arch/s390/mm/fault.c2
-rw-r--r--arch/sparc/kernel/irq.c23
-rw-r--r--arch/sparc/kernel/pcic.c5
-rw-r--r--arch/sparc/kernel/prom.c7
-rw-r--r--arch/sparc/kernel/setup.c10
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c4
-rw-r--r--arch/sparc/kernel/sun4c_irq.c2
-rw-r--r--arch/sparc/kernel/sun4d_irq.c12
-rw-r--r--arch/sparc/kernel/sun4d_smp.c6
-rw-r--r--arch/sparc/kernel/sun4m_irq.c2
-rw-r--r--arch/sparc/kernel/sun4m_smp.c7
-rw-r--r--arch/sparc/kernel/tick14.c2
-rw-r--r--arch/sparc/kernel/time.c7
-rw-r--r--arch/sparc/kernel/vmlinux.lds.S4
-rw-r--r--arch/sparc/lib/locks.S20
-rw-r--r--arch/sparc/mm/srmmu.c2
-rw-r--r--arch/sparc64/defconfig19
-rw-r--r--arch/sparc64/kernel/ebus.c2
-rw-r--r--arch/sparc64/kernel/irq.c12
-rw-r--r--arch/sparc64/kernel/of_device.c2
-rw-r--r--arch/sparc64/kernel/pci_psycho.c6
-rw-r--r--arch/sparc64/kernel/pci_sabre.c6
-rw-r--r--arch/sparc64/kernel/pci_schizo.c8
-rw-r--r--arch/sparc64/kernel/power.c2
-rw-r--r--arch/sparc64/kernel/sbus.c6
-rw-r--r--arch/sparc64/kernel/setup.c10
-rw-r--r--arch/sparc64/kernel/smp.c6
-rw-r--r--arch/sparc64/kernel/time.c7
-rw-r--r--arch/um/Kconfig35
-rw-r--r--arch/um/Kconfig.i38649
-rw-r--r--arch/um/Makefile-x86_644
-rw-r--r--arch/um/drivers/line.c7
-rw-r--r--arch/um/drivers/mconsole_kern.c8
-rw-r--r--arch/um/drivers/net_kern.c2
-rw-r--r--arch/um/drivers/pcap_user.h2
-rw-r--r--arch/um/drivers/port_kern.c4
-rw-r--r--arch/um/drivers/ubd_kern.c2
-rw-r--r--arch/um/drivers/xterm_kern.c2
-rw-r--r--arch/um/include/common-offsets.h11
-rw-r--r--arch/um/include/irq_kern.h5
-rw-r--r--arch/um/include/longjmp.h3
-rw-r--r--arch/um/include/os.h1
-rw-r--r--arch/um/include/sysdep-i386/kernel-offsets.h5
-rw-r--r--arch/um/include/sysdep-x86_64/kernel-offsets.h5
-rw-r--r--arch/um/kernel/irq.c15
-rw-r--r--arch/um/kernel/sigio.c2
-rw-r--r--arch/um/kernel/skas/mmu.c5
-rw-r--r--arch/um/kernel/time.c2
-rw-r--r--arch/um/kernel/tt/uaccess_user.c6
-rw-r--r--arch/um/os-Linux/tt.c1
-rw-r--r--arch/um/os-Linux/util.c9
-rw-r--r--arch/um/sys-x86_64/ksyms.c3
-rw-r--r--arch/x86_64/ia32/ptrace32.c4
-rw-r--r--arch/x86_64/kernel/apic.c5
-rw-r--r--arch/x86_64/kernel/genapic_cluster.c8
-rw-r--r--arch/x86_64/kernel/genapic_flat.c24
-rw-r--r--arch/x86_64/kernel/io_apic.c141
-rw-r--r--arch/x86_64/kernel/irq.c14
-rw-r--r--arch/x86_64/mm/init.c9
-rw-r--r--arch/x86_64/mm/numa.c8
497 files changed, 4524 insertions, 4130 deletions
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c
index 8b02420f732e..692809e4aece 100644
--- a/arch/alpha/kernel/alpha_ksyms.c
+++ b/arch/alpha/kernel/alpha_ksyms.c
@@ -6,41 +6,14 @@
6 */ 6 */
7 7
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/string.h>
10#include <linux/user.h>
11#include <linux/elfcore.h>
12#include <linux/socket.h>
13#include <linux/syscalls.h>
14#include <linux/in.h>
15#include <linux/in6.h>
16#include <linux/pci.h>
17#include <linux/screen_info.h>
18#include <linux/tty.h>
19#include <linux/mm.h>
20#include <linux/delay.h>
21#include <linux/dma-mapping.h>
22
23#include <asm/io.h>
24#include <asm/console.h> 9#include <asm/console.h>
25#include <asm/hwrpb.h>
26#include <asm/uaccess.h> 10#include <asm/uaccess.h>
27#include <asm/processor.h>
28#include <asm/checksum.h> 11#include <asm/checksum.h>
29#include <linux/interrupt.h>
30#include <asm/fpu.h> 12#include <asm/fpu.h>
31#include <asm/irq.h>
32#include <asm/machvec.h> 13#include <asm/machvec.h>
33#include <asm/pgalloc.h>
34#include <asm/semaphore.h>
35#include <asm/tlbflush.h>
36#include <asm/cacheflush.h>
37#include <asm/vga.h>
38 14
39#include <asm/unistd.h> 15#include <asm/unistd.h>
40 16
41extern struct hwrpb_struct *hwrpb;
42extern spinlock_t rtc_lock;
43
44/* these are C runtime functions with special calling conventions: */ 17/* these are C runtime functions with special calling conventions: */
45extern void __divl (void); 18extern void __divl (void);
46extern void __reml (void); 19extern void __reml (void);
@@ -52,14 +25,9 @@ extern void __divqu (void);
52extern void __remqu (void); 25extern void __remqu (void);
53 26
54EXPORT_SYMBOL(alpha_mv); 27EXPORT_SYMBOL(alpha_mv);
55EXPORT_SYMBOL(screen_info);
56EXPORT_SYMBOL(perf_irq);
57EXPORT_SYMBOL(callback_getenv); 28EXPORT_SYMBOL(callback_getenv);
58EXPORT_SYMBOL(callback_setenv); 29EXPORT_SYMBOL(callback_setenv);
59EXPORT_SYMBOL(callback_save_env); 30EXPORT_SYMBOL(callback_save_env);
60#ifdef CONFIG_ALPHA_GENERIC
61EXPORT_SYMBOL(alpha_using_srm);
62#endif /* CONFIG_ALPHA_GENERIC */
63 31
64/* platform dependent support */ 32/* platform dependent support */
65EXPORT_SYMBOL(strcat); 33EXPORT_SYMBOL(strcat);
@@ -77,47 +45,14 @@ EXPORT_SYMBOL(__constant_c_memset);
77EXPORT_SYMBOL(copy_page); 45EXPORT_SYMBOL(copy_page);
78EXPORT_SYMBOL(clear_page); 46EXPORT_SYMBOL(clear_page);
79 47
80EXPORT_SYMBOL(__direct_map_base);
81EXPORT_SYMBOL(__direct_map_size);
82
83#ifdef CONFIG_PCI
84EXPORT_SYMBOL(pci_alloc_consistent);
85EXPORT_SYMBOL(pci_free_consistent);
86EXPORT_SYMBOL(pci_map_single);
87EXPORT_SYMBOL(pci_map_page);
88EXPORT_SYMBOL(pci_unmap_single);
89EXPORT_SYMBOL(pci_unmap_page);
90EXPORT_SYMBOL(pci_map_sg);
91EXPORT_SYMBOL(pci_unmap_sg);
92EXPORT_SYMBOL(pci_dma_supported);
93EXPORT_SYMBOL(pci_dac_dma_supported);
94EXPORT_SYMBOL(pci_dac_page_to_dma);
95EXPORT_SYMBOL(pci_dac_dma_to_page);
96EXPORT_SYMBOL(pci_dac_dma_to_offset);
97EXPORT_SYMBOL(alpha_gendev_to_pci);
98#endif
99EXPORT_SYMBOL(dma_set_mask);
100
101EXPORT_SYMBOL(dump_thread);
102EXPORT_SYMBOL(dump_elf_thread);
103EXPORT_SYMBOL(dump_elf_task);
104EXPORT_SYMBOL(dump_elf_task_fp);
105EXPORT_SYMBOL(hwrpb);
106EXPORT_SYMBOL(start_thread);
107EXPORT_SYMBOL(alpha_read_fp_reg); 48EXPORT_SYMBOL(alpha_read_fp_reg);
108EXPORT_SYMBOL(alpha_read_fp_reg_s); 49EXPORT_SYMBOL(alpha_read_fp_reg_s);
109EXPORT_SYMBOL(alpha_write_fp_reg); 50EXPORT_SYMBOL(alpha_write_fp_reg);
110EXPORT_SYMBOL(alpha_write_fp_reg_s); 51EXPORT_SYMBOL(alpha_write_fp_reg_s);
111 52
112/* In-kernel system calls. */ 53/* entry.S */
113EXPORT_SYMBOL(kernel_thread); 54EXPORT_SYMBOL(kernel_thread);
114EXPORT_SYMBOL(sys_dup);
115EXPORT_SYMBOL(sys_exit);
116EXPORT_SYMBOL(sys_write);
117EXPORT_SYMBOL(sys_lseek);
118EXPORT_SYMBOL(kernel_execve); 55EXPORT_SYMBOL(kernel_execve);
119EXPORT_SYMBOL(sys_setsid);
120EXPORT_SYMBOL(sys_wait4);
121 56
122/* Networking helper routines. */ 57/* Networking helper routines. */
123EXPORT_SYMBOL(csum_tcpudp_magic); 58EXPORT_SYMBOL(csum_tcpudp_magic);
@@ -134,10 +69,6 @@ EXPORT_SYMBOL(alpha_fp_emul_imprecise);
134EXPORT_SYMBOL(alpha_fp_emul); 69EXPORT_SYMBOL(alpha_fp_emul);
135#endif 70#endif
136 71
137#ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK
138EXPORT_SYMBOL(__min_ipl);
139#endif
140
141/* 72/*
142 * The following are specially called from the uaccess assembly stubs. 73 * The following are specially called from the uaccess assembly stubs.
143 */ 74 */
@@ -160,27 +91,10 @@ EXPORT_SYMBOL(up);
160 */ 91 */
161 92
162#ifdef CONFIG_SMP 93#ifdef CONFIG_SMP
163EXPORT_SYMBOL(flush_tlb_mm);
164EXPORT_SYMBOL(flush_tlb_range);
165EXPORT_SYMBOL(flush_tlb_page);
166EXPORT_SYMBOL(smp_imb);
167EXPORT_SYMBOL(cpu_data);
168EXPORT_SYMBOL(smp_num_cpus);
169EXPORT_SYMBOL(smp_call_function);
170EXPORT_SYMBOL(smp_call_function_on_cpu);
171EXPORT_SYMBOL(_atomic_dec_and_lock); 94EXPORT_SYMBOL(_atomic_dec_and_lock);
172#endif /* CONFIG_SMP */ 95#endif /* CONFIG_SMP */
173 96
174/* 97/*
175 * NUMA specific symbols
176 */
177#ifdef CONFIG_DISCONTIGMEM
178EXPORT_SYMBOL(node_data);
179#endif /* CONFIG_DISCONTIGMEM */
180
181EXPORT_SYMBOL(rtc_lock);
182
183/*
184 * The following are special because they're not called 98 * The following are special because they're not called
185 * explicitly (the C compiler or assembler generates them in 99 * explicitly (the C compiler or assembler generates them in
186 * response to division operations). Fortunately, their 100 * response to division operations). Fortunately, their
@@ -200,8 +114,3 @@ EXPORT_SYMBOL(__remqu);
200EXPORT_SYMBOL(memcpy); 114EXPORT_SYMBOL(memcpy);
201EXPORT_SYMBOL(memset); 115EXPORT_SYMBOL(memset);
202EXPORT_SYMBOL(memchr); 116EXPORT_SYMBOL(memchr);
203
204#ifdef CONFIG_ALPHA_IRONGATE
205EXPORT_SYMBOL(irongate_ioremap);
206EXPORT_SYMBOL(irongate_iounmap);
207#endif
diff --git a/arch/alpha/kernel/core_apecs.c b/arch/alpha/kernel/core_apecs.c
index a27ba12ba35e..ca46b2c24457 100644
--- a/arch/alpha/kernel/core_apecs.c
+++ b/arch/alpha/kernel/core_apecs.c
@@ -387,8 +387,7 @@ apecs_pci_clr_err(void)
387} 387}
388 388
389void 389void
390apecs_machine_check(unsigned long vector, unsigned long la_ptr, 390apecs_machine_check(unsigned long vector, unsigned long la_ptr)
391 struct pt_regs * regs)
392{ 391{
393 struct el_common *mchk_header; 392 struct el_common *mchk_header;
394 struct el_apecs_procdata *mchk_procdata; 393 struct el_apecs_procdata *mchk_procdata;
@@ -412,7 +411,7 @@ apecs_machine_check(unsigned long vector, unsigned long la_ptr,
412 wrmces(0x7); /* reset machine check pending flag */ 411 wrmces(0x7); /* reset machine check pending flag */
413 mb(); 412 mb();
414 413
415 process_mcheck_info(vector, la_ptr, regs, "APECS", 414 process_mcheck_info(vector, la_ptr, "APECS",
416 (mcheck_expected(0) 415 (mcheck_expected(0)
417 && (mchk_sysdata->epic_dcsr & 0x0c00UL))); 416 && (mchk_sysdata->epic_dcsr & 0x0c00UL)));
418} 417}
diff --git a/arch/alpha/kernel/core_cia.c b/arch/alpha/kernel/core_cia.c
index fd563064363c..1d6ee6c985f9 100644
--- a/arch/alpha/kernel/core_cia.c
+++ b/arch/alpha/kernel/core_cia.c
@@ -1192,8 +1192,7 @@ cia_decode_mchk(unsigned long la_ptr)
1192} 1192}
1193 1193
1194void 1194void
1195cia_machine_check(unsigned long vector, unsigned long la_ptr, 1195cia_machine_check(unsigned long vector, unsigned long la_ptr)
1196 struct pt_regs * regs)
1197{ 1196{
1198 int expected; 1197 int expected;
1199 1198
@@ -1208,5 +1207,5 @@ cia_machine_check(unsigned long vector, unsigned long la_ptr,
1208 expected = mcheck_expected(0); 1207 expected = mcheck_expected(0);
1209 if (!expected && vector == 0x660) 1208 if (!expected && vector == 0x660)
1210 expected = cia_decode_mchk(la_ptr); 1209 expected = cia_decode_mchk(la_ptr);
1211 process_mcheck_info(vector, la_ptr, regs, "CIA", expected); 1210 process_mcheck_info(vector, la_ptr, "CIA", expected);
1212} 1211}
diff --git a/arch/alpha/kernel/core_irongate.c b/arch/alpha/kernel/core_irongate.c
index 138d497d1cca..e4a0bcf1d28b 100644
--- a/arch/alpha/kernel/core_irongate.c
+++ b/arch/alpha/kernel/core_irongate.c
@@ -404,6 +404,7 @@ irongate_ioremap(unsigned long addr, unsigned long size)
404#endif 404#endif
405 return (void __iomem *)vaddr; 405 return (void __iomem *)vaddr;
406} 406}
407EXPORT_SYMBOL(irongate_ioremap);
407 408
408void 409void
409irongate_iounmap(volatile void __iomem *xaddr) 410irongate_iounmap(volatile void __iomem *xaddr)
@@ -414,3 +415,4 @@ irongate_iounmap(volatile void __iomem *xaddr)
414 if (addr) 415 if (addr)
415 return vfree((void *)(PAGE_MASK & addr)); 416 return vfree((void *)(PAGE_MASK & addr));
416} 417}
418EXPORT_SYMBOL(irongate_iounmap);
diff --git a/arch/alpha/kernel/core_lca.c b/arch/alpha/kernel/core_lca.c
index 6a5a9145c676..4843f6ec9f3a 100644
--- a/arch/alpha/kernel/core_lca.c
+++ b/arch/alpha/kernel/core_lca.c
@@ -19,6 +19,7 @@
19#include <linux/tty.h> 19#include <linux/tty.h>
20 20
21#include <asm/ptrace.h> 21#include <asm/ptrace.h>
22#include <asm/irq_regs.h>
22#include <asm/smp.h> 23#include <asm/smp.h>
23 24
24#include "proto.h" 25#include "proto.h"
@@ -386,8 +387,7 @@ ioc_error(__u32 stat0, __u32 stat1)
386} 387}
387 388
388void 389void
389lca_machine_check(unsigned long vector, unsigned long la_ptr, 390lca_machine_check(unsigned long vector, unsigned long la_ptr)
390 struct pt_regs *regs)
391{ 391{
392 const char * reason; 392 const char * reason;
393 union el_lca el; 393 union el_lca el;
@@ -397,7 +397,7 @@ lca_machine_check(unsigned long vector, unsigned long la_ptr,
397 wrmces(rdmces()); /* reset machine check pending flag */ 397 wrmces(rdmces()); /* reset machine check pending flag */
398 398
399 printk(KERN_CRIT "LCA machine check: vector=%#lx pc=%#lx code=%#x\n", 399 printk(KERN_CRIT "LCA machine check: vector=%#lx pc=%#lx code=%#x\n",
400 vector, regs->pc, (unsigned int) el.c->code); 400 vector, get_irq_regs()->pc, (unsigned int) el.c->code);
401 401
402 /* 402 /*
403 * The first quadword after the common header always seems to 403 * The first quadword after the common header always seems to
diff --git a/arch/alpha/kernel/core_mcpcia.c b/arch/alpha/kernel/core_mcpcia.c
index 28849c894153..8d019071190a 100644
--- a/arch/alpha/kernel/core_mcpcia.c
+++ b/arch/alpha/kernel/core_mcpcia.c
@@ -572,8 +572,7 @@ mcpcia_print_system_area(unsigned long la_ptr)
572} 572}
573 573
574void 574void
575mcpcia_machine_check(unsigned long vector, unsigned long la_ptr, 575mcpcia_machine_check(unsigned long vector, unsigned long la_ptr)
576 struct pt_regs * regs)
577{ 576{
578 struct el_common *mchk_header; 577 struct el_common *mchk_header;
579 struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout; 578 struct el_MCPCIA_uncorrected_frame_mcheck *mchk_logout;
@@ -610,7 +609,7 @@ mcpcia_machine_check(unsigned long vector, unsigned long la_ptr,
610 wrmces(0x7); 609 wrmces(0x7);
611 mb(); 610 mb();
612 611
613 process_mcheck_info(vector, la_ptr, regs, "MCPCIA", expected != 0); 612 process_mcheck_info(vector, la_ptr, "MCPCIA", expected != 0);
614 if (!expected && vector != 0x620 && vector != 0x630) { 613 if (!expected && vector != 0x620 && vector != 0x630) {
615 mcpcia_print_uncorrectable(mchk_logout); 614 mcpcia_print_uncorrectable(mchk_logout);
616 mcpcia_print_system_area(la_ptr); 615 mcpcia_print_system_area(la_ptr);
diff --git a/arch/alpha/kernel/core_polaris.c b/arch/alpha/kernel/core_polaris.c
index 277674a500ff..c5a271d37abd 100644
--- a/arch/alpha/kernel/core_polaris.c
+++ b/arch/alpha/kernel/core_polaris.c
@@ -187,8 +187,7 @@ polaris_pci_clr_err(void)
187} 187}
188 188
189void 189void
190polaris_machine_check(unsigned long vector, unsigned long la_ptr, 190polaris_machine_check(unsigned long vector, unsigned long la_ptr)
191 struct pt_regs * regs)
192{ 191{
193 /* Clear the error before any reporting. */ 192 /* Clear the error before any reporting. */
194 mb(); 193 mb();
@@ -198,6 +197,6 @@ polaris_machine_check(unsigned long vector, unsigned long la_ptr,
198 wrmces(0x7); 197 wrmces(0x7);
199 mb(); 198 mb();
200 199
201 process_mcheck_info(vector, la_ptr, regs, "POLARIS", 200 process_mcheck_info(vector, la_ptr, "POLARIS",
202 mcheck_expected(0)); 201 mcheck_expected(0));
203} 202}
diff --git a/arch/alpha/kernel/core_t2.c b/arch/alpha/kernel/core_t2.c
index ecce09e3626a..f5ca5255eb06 100644
--- a/arch/alpha/kernel/core_t2.c
+++ b/arch/alpha/kernel/core_t2.c
@@ -551,8 +551,7 @@ t2_clear_errors(int cpu)
551 * Hence all the taken/expected/any_expected/last_taken stuff... 551 * Hence all the taken/expected/any_expected/last_taken stuff...
552 */ 552 */
553void 553void
554t2_machine_check(unsigned long vector, unsigned long la_ptr, 554t2_machine_check(unsigned long vector, unsigned long la_ptr)
555 struct pt_regs * regs)
556{ 555{
557 int cpu = smp_processor_id(); 556 int cpu = smp_processor_id();
558#ifdef CONFIG_VERBOSE_MCHECK 557#ifdef CONFIG_VERBOSE_MCHECK
@@ -618,5 +617,5 @@ t2_machine_check(unsigned long vector, unsigned long la_ptr,
618 } 617 }
619#endif 618#endif
620 619
621 process_mcheck_info(vector, la_ptr, regs, "T2", mcheck_expected(cpu)); 620 process_mcheck_info(vector, la_ptr, "T2", mcheck_expected(cpu));
622} 621}
diff --git a/arch/alpha/kernel/core_tsunami.c b/arch/alpha/kernel/core_tsunami.c
index 8aa305bd6a2c..ce623c6e55e1 100644
--- a/arch/alpha/kernel/core_tsunami.c
+++ b/arch/alpha/kernel/core_tsunami.c
@@ -443,8 +443,7 @@ tsunami_pci_clr_err(void)
443} 443}
444 444
445void 445void
446tsunami_machine_check(unsigned long vector, unsigned long la_ptr, 446tsunami_machine_check(unsigned long vector, unsigned long la_ptr)
447 struct pt_regs * regs)
448{ 447{
449 /* Clear error before any reporting. */ 448 /* Clear error before any reporting. */
450 mb(); 449 mb();
@@ -454,6 +453,6 @@ tsunami_machine_check(unsigned long vector, unsigned long la_ptr,
454 wrmces(0x7); 453 wrmces(0x7);
455 mb(); 454 mb();
456 455
457 process_mcheck_info(vector, la_ptr, regs, "TSUNAMI", 456 process_mcheck_info(vector, la_ptr, "TSUNAMI",
458 mcheck_expected(smp_processor_id())); 457 mcheck_expected(smp_processor_id()));
459} 458}
diff --git a/arch/alpha/kernel/core_wildfire.c b/arch/alpha/kernel/core_wildfire.c
index 2b767a1bad96..7e072443d7fd 100644
--- a/arch/alpha/kernel/core_wildfire.c
+++ b/arch/alpha/kernel/core_wildfire.c
@@ -322,8 +322,7 @@ wildfire_init_arch(void)
322} 322}
323 323
324void 324void
325wildfire_machine_check(unsigned long vector, unsigned long la_ptr, 325wildfire_machine_check(unsigned long vector, unsigned long la_ptr)
326 struct pt_regs * regs)
327{ 326{
328 mb(); 327 mb();
329 mb(); /* magic */ 328 mb(); /* magic */
@@ -332,7 +331,7 @@ wildfire_machine_check(unsigned long vector, unsigned long la_ptr,
332 wrmces(0x7); 331 wrmces(0x7);
333 mb(); 332 mb();
334 333
335 process_mcheck_info(vector, la_ptr, regs, "WILDFIRE", 334 process_mcheck_info(vector, la_ptr, "WILDFIRE",
336 mcheck_expected(smp_processor_id())); 335 mcheck_expected(smp_processor_id()));
337} 336}
338 337
diff --git a/arch/alpha/kernel/err_ev6.c b/arch/alpha/kernel/err_ev6.c
index 64f59f2fcf5c..69b5f4ea7355 100644
--- a/arch/alpha/kernel/err_ev6.c
+++ b/arch/alpha/kernel/err_ev6.c
@@ -11,6 +11,7 @@
11#include <linux/sched.h> 11#include <linux/sched.h>
12 12
13#include <asm/io.h> 13#include <asm/io.h>
14#include <asm/irq_regs.h>
14#include <asm/hwrpb.h> 15#include <asm/hwrpb.h>
15#include <asm/smp.h> 16#include <asm/smp.h>
16#include <asm/err_common.h> 17#include <asm/err_common.h>
@@ -229,7 +230,7 @@ ev6_process_logout_frame(struct el_common *mchk_header, int print)
229} 230}
230 231
231void 232void
232ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 233ev6_machine_check(u64 vector, u64 la_ptr)
233{ 234{
234 struct el_common *mchk_header = (struct el_common *)la_ptr; 235 struct el_common *mchk_header = (struct el_common *)la_ptr;
235 236
@@ -260,7 +261,7 @@ ev6_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
260 (unsigned int)vector, (int)smp_processor_id()); 261 (unsigned int)vector, (int)smp_processor_id());
261 262
262 ev6_process_logout_frame(mchk_header, 1); 263 ev6_process_logout_frame(mchk_header, 1);
263 dik_show_regs(regs, NULL); 264 dik_show_regs(get_irq_regs(), NULL);
264 265
265 err_print_prefix = saved_err_prefix; 266 err_print_prefix = saved_err_prefix;
266 } 267 }
diff --git a/arch/alpha/kernel/err_ev7.c b/arch/alpha/kernel/err_ev7.c
index fed6b3d1b803..95463ab1cf35 100644
--- a/arch/alpha/kernel/err_ev7.c
+++ b/arch/alpha/kernel/err_ev7.c
@@ -118,7 +118,7 @@ ev7_collect_logout_frame_subpackets(struct el_subpacket *el_ptr,
118} 118}
119 119
120void 120void
121ev7_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 121ev7_machine_check(u64 vector, u64 la_ptr)
122{ 122{
123 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr; 123 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr;
124 char *saved_err_prefix = err_print_prefix; 124 char *saved_err_prefix = err_print_prefix;
diff --git a/arch/alpha/kernel/err_impl.h b/arch/alpha/kernel/err_impl.h
index 64e9b73809fa..3c12258158e6 100644
--- a/arch/alpha/kernel/err_impl.h
+++ b/arch/alpha/kernel/err_impl.h
@@ -60,26 +60,26 @@ extern struct ev7_lf_subpackets *
60ev7_collect_logout_frame_subpackets(struct el_subpacket *, 60ev7_collect_logout_frame_subpackets(struct el_subpacket *,
61 struct ev7_lf_subpackets *); 61 struct ev7_lf_subpackets *);
62extern void ev7_register_error_handlers(void); 62extern void ev7_register_error_handlers(void);
63extern void ev7_machine_check(u64, u64, struct pt_regs *); 63extern void ev7_machine_check(u64, u64);
64 64
65/* 65/*
66 * err_ev6.c 66 * err_ev6.c
67 */ 67 */
68extern void ev6_register_error_handlers(void); 68extern void ev6_register_error_handlers(void);
69extern int ev6_process_logout_frame(struct el_common *, int); 69extern int ev6_process_logout_frame(struct el_common *, int);
70extern void ev6_machine_check(u64, u64, struct pt_regs *); 70extern void ev6_machine_check(u64, u64);
71 71
72/* 72/*
73 * err_marvel.c 73 * err_marvel.c
74 */ 74 */
75extern void marvel_machine_check(u64, u64, struct pt_regs *); 75extern void marvel_machine_check(u64, u64);
76extern void marvel_register_error_handlers(void); 76extern void marvel_register_error_handlers(void);
77 77
78/* 78/*
79 * err_titan.c 79 * err_titan.c
80 */ 80 */
81extern int titan_process_logout_frame(struct el_common *, int); 81extern int titan_process_logout_frame(struct el_common *, int);
82extern void titan_machine_check(u64, u64, struct pt_regs *); 82extern void titan_machine_check(u64, u64);
83extern void titan_register_error_handlers(void); 83extern void titan_register_error_handlers(void);
84extern int privateer_process_logout_frame(struct el_common *, int); 84extern int privateer_process_logout_frame(struct el_common *, int);
85extern void privateer_machine_check(u64, u64, struct pt_regs *); 85extern void privateer_machine_check(u64, u64);
diff --git a/arch/alpha/kernel/err_marvel.c b/arch/alpha/kernel/err_marvel.c
index 70b38b1d2af3..f2956ac8dccc 100644
--- a/arch/alpha/kernel/err_marvel.c
+++ b/arch/alpha/kernel/err_marvel.c
@@ -1042,7 +1042,7 @@ marvel_process_logout_frame(struct ev7_lf_subpackets *lf_subpackets, int print)
1042} 1042}
1043 1043
1044void 1044void
1045marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 1045marvel_machine_check(u64 vector, u64 la_ptr)
1046{ 1046{
1047 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr; 1047 struct el_subpacket *el_ptr = (struct el_subpacket *)la_ptr;
1048 int (*process_frame)(struct ev7_lf_subpackets *, int) = NULL; 1048 int (*process_frame)(struct ev7_lf_subpackets *, int) = NULL;
@@ -1077,7 +1077,7 @@ marvel_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
1077 1077
1078 default: 1078 default:
1079 /* Don't know it - pass it up. */ 1079 /* Don't know it - pass it up. */
1080 ev7_machine_check(vector, la_ptr, regs); 1080 ev7_machine_check(vector, la_ptr);
1081 return; 1081 return;
1082 } 1082 }
1083 1083
diff --git a/arch/alpha/kernel/err_titan.c b/arch/alpha/kernel/err_titan.c
index 7e6720d45f02..febe71c6869f 100644
--- a/arch/alpha/kernel/err_titan.c
+++ b/arch/alpha/kernel/err_titan.c
@@ -379,7 +379,7 @@ titan_process_logout_frame(struct el_common *mchk_header, int print)
379} 379}
380 380
381void 381void
382titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 382titan_machine_check(u64 vector, u64 la_ptr)
383{ 383{
384 struct el_common *mchk_header = (struct el_common *)la_ptr; 384 struct el_common *mchk_header = (struct el_common *)la_ptr;
385 struct el_TITAN_sysdata_mcheck *tmchk = 385 struct el_TITAN_sysdata_mcheck *tmchk =
@@ -408,7 +408,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
408 * Only handle system errors here 408 * Only handle system errors here
409 */ 409 */
410 if ((vector != SCB_Q_SYSMCHK) && (vector != SCB_Q_SYSERR)) { 410 if ((vector != SCB_Q_SYSMCHK) && (vector != SCB_Q_SYSERR)) {
411 ev6_machine_check(vector, la_ptr, regs); 411 ev6_machine_check(vector, la_ptr);
412 return; 412 return;
413 } 413 }
414 414
@@ -442,7 +442,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
442#ifdef CONFIG_VERBOSE_MCHECK 442#ifdef CONFIG_VERBOSE_MCHECK
443 titan_process_logout_frame(mchk_header, alpha_verbose_mcheck); 443 titan_process_logout_frame(mchk_header, alpha_verbose_mcheck);
444 if (alpha_verbose_mcheck) 444 if (alpha_verbose_mcheck)
445 dik_show_regs(regs, NULL); 445 dik_show_regs(get_irq_regs(), NULL);
446#endif /* CONFIG_VERBOSE_MCHECK */ 446#endif /* CONFIG_VERBOSE_MCHECK */
447 447
448 err_print_prefix = saved_err_prefix; 448 err_print_prefix = saved_err_prefix;
@@ -452,7 +452,7 @@ titan_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
452 * machine checks to interrupts 452 * machine checks to interrupts
453 */ 453 */
454 irqmask = tmchk->c_dirx & TITAN_MCHECK_INTERRUPT_MASK; 454 irqmask = tmchk->c_dirx & TITAN_MCHECK_INTERRUPT_MASK;
455 titan_dispatch_irqs(irqmask, regs); 455 titan_dispatch_irqs(irqmask);
456 } 456 }
457 457
458 458
@@ -701,7 +701,7 @@ privateer_process_logout_frame(struct el_common *mchk_header, int print)
701} 701}
702 702
703void 703void
704privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs) 704privateer_machine_check(u64 vector, u64 la_ptr)
705{ 705{
706 struct el_common *mchk_header = (struct el_common *)la_ptr; 706 struct el_common *mchk_header = (struct el_common *)la_ptr;
707 struct el_TITAN_sysdata_mcheck *tmchk = 707 struct el_TITAN_sysdata_mcheck *tmchk =
@@ -723,7 +723,7 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
723 * Only handle system events here. 723 * Only handle system events here.
724 */ 724 */
725 if (vector != SCB_Q_SYSEVENT) 725 if (vector != SCB_Q_SYSEVENT)
726 return titan_machine_check(vector, la_ptr, regs); 726 return titan_machine_check(vector, la_ptr);
727 727
728 /* 728 /*
729 * Report the event - System Events should be reported even if no 729 * Report the event - System Events should be reported even if no
@@ -746,7 +746,7 @@ privateer_machine_check(u64 vector, u64 la_ptr, struct pt_regs *regs)
746 /* 746 /*
747 * Dispatch the interrupt(s). 747 * Dispatch the interrupt(s).
748 */ 748 */
749 titan_dispatch_irqs(irqmask, regs); 749 titan_dispatch_irqs(irqmask);
750 750
751 /* 751 /*
752 * Release the logout frame. 752 * Release the logout frame.
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 729c475d2269..facf82a5499a 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -127,7 +127,7 @@ unlock:
127#define MAX_ILLEGAL_IRQS 16 127#define MAX_ILLEGAL_IRQS 16
128 128
129void 129void
130handle_irq(int irq, struct pt_regs * regs) 130handle_irq(int irq)
131{ 131{
132 /* 132 /*
133 * We ack quickly, we don't want the irq controller 133 * We ack quickly, we don't want the irq controller
@@ -157,6 +157,6 @@ handle_irq(int irq, struct pt_regs * regs)
157 * at IPL 0. 157 * at IPL 0.
158 */ 158 */
159 local_irq_disable(); 159 local_irq_disable();
160 __do_IRQ(irq, regs); 160 __do_IRQ(irq);
161 irq_exit(); 161 irq_exit();
162} 162}
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index ddf5cf8dcb0b..e16aeb6e79ef 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -6,6 +6,7 @@
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/irq.h> 7#include <linux/irq.h>
8#include <linux/kernel_stat.h> 8#include <linux/kernel_stat.h>
9#include <linux/module.h>
9 10
10#include <asm/machvec.h> 11#include <asm/machvec.h>
11#include <asm/dma.h> 12#include <asm/dma.h>
@@ -16,6 +17,7 @@
16/* Hack minimum IPL during interrupt processing for broken hardware. */ 17/* Hack minimum IPL during interrupt processing for broken hardware. */
17#ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK 18#ifdef CONFIG_ALPHA_BROKEN_IRQ_MASK
18int __min_ipl; 19int __min_ipl;
20EXPORT_SYMBOL(__min_ipl);
19#endif 21#endif
20 22
21/* 23/*
@@ -30,6 +32,7 @@ dummy_perf(unsigned long vector, struct pt_regs *regs)
30} 32}
31 33
32void (*perf_irq)(unsigned long, struct pt_regs *) = dummy_perf; 34void (*perf_irq)(unsigned long, struct pt_regs *) = dummy_perf;
35EXPORT_SYMBOL(perf_irq);
33 36
34/* 37/*
35 * The main interrupt entry point. 38 * The main interrupt entry point.
@@ -39,6 +42,7 @@ asmlinkage void
39do_entInt(unsigned long type, unsigned long vector, 42do_entInt(unsigned long type, unsigned long vector,
40 unsigned long la_ptr, struct pt_regs *regs) 43 unsigned long la_ptr, struct pt_regs *regs)
41{ 44{
45 struct pt_regs *old_regs;
42 switch (type) { 46 switch (type) {
43 case 0: 47 case 0:
44#ifdef CONFIG_SMP 48#ifdef CONFIG_SMP
@@ -51,6 +55,7 @@ do_entInt(unsigned long type, unsigned long vector,
51#endif 55#endif
52 break; 56 break;
53 case 1: 57 case 1:
58 old_regs = set_irq_regs(regs);
54#ifdef CONFIG_SMP 59#ifdef CONFIG_SMP
55 { 60 {
56 long cpu; 61 long cpu;
@@ -61,18 +66,23 @@ do_entInt(unsigned long type, unsigned long vector,
61 if (cpu != boot_cpuid) { 66 if (cpu != boot_cpuid) {
62 kstat_cpu(cpu).irqs[RTC_IRQ]++; 67 kstat_cpu(cpu).irqs[RTC_IRQ]++;
63 } else { 68 } else {
64 handle_irq(RTC_IRQ, regs); 69 handle_irq(RTC_IRQ);
65 } 70 }
66 } 71 }
67#else 72#else
68 handle_irq(RTC_IRQ, regs); 73 handle_irq(RTC_IRQ);
69#endif 74#endif
75 set_irq_regs(old_regs);
70 return; 76 return;
71 case 2: 77 case 2:
72 alpha_mv.machine_check(vector, la_ptr, regs); 78 old_regs = set_irq_regs(regs);
79 alpha_mv.machine_check(vector, la_ptr);
80 set_irq_regs(old_regs);
73 return; 81 return;
74 case 3: 82 case 3:
75 alpha_mv.device_interrupt(vector, regs); 83 old_regs = set_irq_regs(regs);
84 alpha_mv.device_interrupt(vector);
85 set_irq_regs(old_regs);
76 return; 86 return;
77 case 4: 87 case 4:
78 perf_irq(la_ptr, regs); 88 perf_irq(la_ptr, regs);
@@ -120,8 +130,7 @@ struct mcheck_info __mcheck_info;
120 130
121void 131void
122process_mcheck_info(unsigned long vector, unsigned long la_ptr, 132process_mcheck_info(unsigned long vector, unsigned long la_ptr,
123 struct pt_regs *regs, const char *machine, 133 const char *machine, int expected)
124 int expected)
125{ 134{
126 struct el_common *mchk_header; 135 struct el_common *mchk_header;
127 const char *reason; 136 const char *reason;
@@ -148,7 +157,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
148 mchk_header = (struct el_common *)la_ptr; 157 mchk_header = (struct el_common *)la_ptr;
149 158
150 printk(KERN_CRIT "%s machine check: vector=0x%lx pc=0x%lx code=0x%x\n", 159 printk(KERN_CRIT "%s machine check: vector=0x%lx pc=0x%lx code=0x%x\n",
151 machine, vector, regs->pc, mchk_header->code); 160 machine, vector, get_irq_regs()->pc, mchk_header->code);
152 161
153 switch (mchk_header->code) { 162 switch (mchk_header->code) {
154 /* Machine check reasons. Defined according to PALcode sources. */ 163 /* Machine check reasons. Defined according to PALcode sources. */
@@ -189,7 +198,7 @@ process_mcheck_info(unsigned long vector, unsigned long la_ptr,
189 printk(KERN_CRIT "machine check type: %s%s\n", 198 printk(KERN_CRIT "machine check type: %s%s\n",
190 reason, mchk_header->retry ? " (retryable)" : ""); 199 reason, mchk_header->retry ? " (retryable)" : "");
191 200
192 dik_show_regs(regs, NULL); 201 dik_show_regs(get_irq_regs(), NULL);
193 202
194#ifdef CONFIG_VERBOSE_MCHECK 203#ifdef CONFIG_VERBOSE_MCHECK
195 if (alpha_verbose_mcheck > 1) { 204 if (alpha_verbose_mcheck > 1) {
diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c
index ebbadbc0c36a..9405bee9894e 100644
--- a/arch/alpha/kernel/irq_i8259.c
+++ b/arch/alpha/kernel/irq_i8259.c
@@ -137,7 +137,7 @@ init_i8259a_irqs(void)
137 137
138#if defined(IACK_SC) 138#if defined(IACK_SC)
139void 139void
140isa_device_interrupt(unsigned long vector, struct pt_regs *regs) 140isa_device_interrupt(unsigned long vector)
141{ 141{
142 /* 142 /*
143 * Generate a PCI interrupt acknowledge cycle. The PIC will 143 * Generate a PCI interrupt acknowledge cycle. The PIC will
@@ -147,13 +147,13 @@ isa_device_interrupt(unsigned long vector, struct pt_regs *regs)
147 */ 147 */
148 int j = *(vuip) IACK_SC; 148 int j = *(vuip) IACK_SC;
149 j &= 0xff; 149 j &= 0xff;
150 handle_irq(j, regs); 150 handle_irq(j);
151} 151}
152#endif 152#endif
153 153
154#if defined(CONFIG_ALPHA_GENERIC) || !defined(IACK_SC) 154#if defined(CONFIG_ALPHA_GENERIC) || !defined(IACK_SC)
155void 155void
156isa_no_iack_sc_device_interrupt(unsigned long vector, struct pt_regs *regs) 156isa_no_iack_sc_device_interrupt(unsigned long vector)
157{ 157{
158 unsigned long pic; 158 unsigned long pic;
159 159
@@ -176,7 +176,7 @@ isa_no_iack_sc_device_interrupt(unsigned long vector, struct pt_regs *regs)
176 while (pic) { 176 while (pic) {
177 int j = ffz(~pic); 177 int j = ffz(~pic);
178 pic &= pic - 1; 178 pic &= pic - 1;
179 handle_irq(j, regs); 179 handle_irq(j);
180 } 180 }
181} 181}
182#endif 182#endif
diff --git a/arch/alpha/kernel/irq_impl.h b/arch/alpha/kernel/irq_impl.h
index f201d8ffc0d9..cc9a8a7aa279 100644
--- a/arch/alpha/kernel/irq_impl.h
+++ b/arch/alpha/kernel/irq_impl.h
@@ -15,10 +15,10 @@
15 15
16#define RTC_IRQ 8 16#define RTC_IRQ 8
17 17
18extern void isa_device_interrupt(unsigned long, struct pt_regs *); 18extern void isa_device_interrupt(unsigned long);
19extern void isa_no_iack_sc_device_interrupt(unsigned long, struct pt_regs *); 19extern void isa_no_iack_sc_device_interrupt(unsigned long);
20extern void srm_device_interrupt(unsigned long, struct pt_regs *); 20extern void srm_device_interrupt(unsigned long);
21extern void pyxis_device_interrupt(unsigned long, struct pt_regs *); 21extern void pyxis_device_interrupt(unsigned long);
22 22
23extern struct irqaction timer_irqaction; 23extern struct irqaction timer_irqaction;
24extern struct irqaction isa_cascade_irqaction; 24extern struct irqaction isa_cascade_irqaction;
@@ -39,4 +39,4 @@ extern void i8259a_end_irq(unsigned int);
39extern struct hw_interrupt_type i8259a_irq_type; 39extern struct hw_interrupt_type i8259a_irq_type;
40extern void init_i8259a_irqs(void); 40extern void init_i8259a_irqs(void);
41 41
42extern void handle_irq(int irq, struct pt_regs * regs); 42extern void handle_irq(int irq);
diff --git a/arch/alpha/kernel/irq_pyxis.c b/arch/alpha/kernel/irq_pyxis.c
index 3b581415bab0..d53edbccbfe5 100644
--- a/arch/alpha/kernel/irq_pyxis.c
+++ b/arch/alpha/kernel/irq_pyxis.c
@@ -81,7 +81,7 @@ static struct hw_interrupt_type pyxis_irq_type = {
81}; 81};
82 82
83void 83void
84pyxis_device_interrupt(unsigned long vector, struct pt_regs *regs) 84pyxis_device_interrupt(unsigned long vector)
85{ 85{
86 unsigned long pld; 86 unsigned long pld;
87 unsigned int i; 87 unsigned int i;
@@ -98,9 +98,9 @@ pyxis_device_interrupt(unsigned long vector, struct pt_regs *regs)
98 i = ffz(~pld); 98 i = ffz(~pld);
99 pld &= pld - 1; /* clear least bit set */ 99 pld &= pld - 1; /* clear least bit set */
100 if (i == 7) 100 if (i == 7)
101 isa_device_interrupt(vector, regs); 101 isa_device_interrupt(vector);
102 else 102 else
103 handle_irq(16+i, regs); 103 handle_irq(16+i);
104 } 104 }
105} 105}
106 106
diff --git a/arch/alpha/kernel/irq_srm.c b/arch/alpha/kernel/irq_srm.c
index 8e4d121f84cc..32212014fbe9 100644
--- a/arch/alpha/kernel/irq_srm.c
+++ b/arch/alpha/kernel/irq_srm.c
@@ -72,8 +72,8 @@ init_srm_irqs(long max, unsigned long ignore_mask)
72} 72}
73 73
74void 74void
75srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 75srm_device_interrupt(unsigned long vector)
76{ 76{
77 int irq = (vector - 0x800) >> 4; 77 int irq = (vector - 0x800) >> 4;
78 handle_irq(irq, regs); 78 handle_irq(irq);
79} 79}
diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c
index fff5cf93e816..174b729c504b 100644
--- a/arch/alpha/kernel/pci-noop.c
+++ b/arch/alpha/kernel/pci-noop.c
@@ -201,6 +201,7 @@ dma_set_mask(struct device *dev, u64 mask)
201 201
202 return 0; 202 return 0;
203} 203}
204EXPORT_SYMBOL(dma_set_mask);
204 205
205void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) 206void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen)
206{ 207{
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
index c468e312e5f8..6e7d1fe6e935 100644
--- a/arch/alpha/kernel/pci_iommu.c
+++ b/arch/alpha/kernel/pci_iommu.c
@@ -300,6 +300,7 @@ pci_map_single(struct pci_dev *pdev, void *cpu_addr, size_t size, int dir)
300 dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0; 300 dac_allowed = pdev ? pci_dac_dma_supported(pdev, pdev->dma_mask) : 0;
301 return pci_map_single_1(pdev, cpu_addr, size, dac_allowed); 301 return pci_map_single_1(pdev, cpu_addr, size, dac_allowed);
302} 302}
303EXPORT_SYMBOL(pci_map_single);
303 304
304dma_addr_t 305dma_addr_t
305pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset, 306pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset,
@@ -314,6 +315,7 @@ pci_map_page(struct pci_dev *pdev, struct page *page, unsigned long offset,
314 return pci_map_single_1(pdev, (char *)page_address(page) + offset, 315 return pci_map_single_1(pdev, (char *)page_address(page) + offset,
315 size, dac_allowed); 316 size, dac_allowed);
316} 317}
318EXPORT_SYMBOL(pci_map_page);
317 319
318/* Unmap a single streaming mode DMA translation. The DMA_ADDR and 320/* Unmap a single streaming mode DMA translation. The DMA_ADDR and
319 SIZE must match what was provided for in a previous pci_map_single 321 SIZE must match what was provided for in a previous pci_map_single
@@ -379,6 +381,7 @@ pci_unmap_single(struct pci_dev *pdev, dma_addr_t dma_addr, size_t size,
379 DBGA2("pci_unmap_single: sg [%lx,%lx] np %ld from %p\n", 381 DBGA2("pci_unmap_single: sg [%lx,%lx] np %ld from %p\n",
380 dma_addr, size, npages, __builtin_return_address(0)); 382 dma_addr, size, npages, __builtin_return_address(0));
381} 383}
384EXPORT_SYMBOL(pci_unmap_single);
382 385
383void 386void
384pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr, 387pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr,
@@ -386,6 +389,7 @@ pci_unmap_page(struct pci_dev *pdev, dma_addr_t dma_addr,
386{ 389{
387 pci_unmap_single(pdev, dma_addr, size, direction); 390 pci_unmap_single(pdev, dma_addr, size, direction);
388} 391}
392EXPORT_SYMBOL(pci_unmap_page);
389 393
390/* Allocate and map kernel buffer using consistent mode DMA for PCI 394/* Allocate and map kernel buffer using consistent mode DMA for PCI
391 device. Returns non-NULL cpu-view pointer to the buffer if 395 device. Returns non-NULL cpu-view pointer to the buffer if
@@ -427,6 +431,7 @@ try_again:
427 431
428 return cpu_addr; 432 return cpu_addr;
429} 433}
434EXPORT_SYMBOL(pci_alloc_consistent);
430 435
431/* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must 436/* Free and unmap a consistent DMA buffer. CPU_ADDR and DMA_ADDR must
432 be values that were returned from pci_alloc_consistent. SIZE must 437 be values that were returned from pci_alloc_consistent. SIZE must
@@ -444,7 +449,7 @@ pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu_addr,
444 DBGA2("pci_free_consistent: [%x,%lx] from %p\n", 449 DBGA2("pci_free_consistent: [%x,%lx] from %p\n",
445 dma_addr, size, __builtin_return_address(0)); 450 dma_addr, size, __builtin_return_address(0));
446} 451}
447 452EXPORT_SYMBOL(pci_free_consistent);
448 453
449/* Classify the elements of the scatterlist. Write dma_address 454/* Classify the elements of the scatterlist. Write dma_address
450 of each element with: 455 of each element with:
@@ -672,6 +677,7 @@ pci_map_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
672 pci_unmap_sg(pdev, start, out - start, direction); 677 pci_unmap_sg(pdev, start, out - start, direction);
673 return 0; 678 return 0;
674} 679}
680EXPORT_SYMBOL(pci_map_sg);
675 681
676/* Unmap a set of streaming mode DMA translations. Again, cpu read 682/* Unmap a set of streaming mode DMA translations. Again, cpu read
677 rules concerning calls here are the same as for pci_unmap_single() 683 rules concerning calls here are the same as for pci_unmap_single()
@@ -752,6 +758,7 @@ pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sg, int nents,
752 758
753 DBGA("pci_unmap_sg: %ld entries\n", nents - (end - sg)); 759 DBGA("pci_unmap_sg: %ld entries\n", nents - (end - sg));
754} 760}
761EXPORT_SYMBOL(pci_unmap_sg);
755 762
756 763
757/* Return whether the given PCI device DMA address mask can be 764/* Return whether the given PCI device DMA address mask can be
@@ -786,6 +793,7 @@ pci_dma_supported(struct pci_dev *pdev, u64 mask)
786 793
787 return 0; 794 return 0;
788} 795}
796EXPORT_SYMBOL(pci_dma_supported);
789 797
790 798
791/* 799/*
@@ -908,6 +916,7 @@ pci_dac_dma_supported(struct pci_dev *dev, u64 mask)
908 916
909 return ok; 917 return ok;
910} 918}
919EXPORT_SYMBOL(pci_dac_dma_supported);
911 920
912dma64_addr_t 921dma64_addr_t
913pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page, 922pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page,
@@ -917,6 +926,7 @@ pci_dac_page_to_dma(struct pci_dev *pdev, struct page *page,
917 + __pa(page_address(page)) 926 + __pa(page_address(page))
918 + (dma64_addr_t) offset); 927 + (dma64_addr_t) offset);
919} 928}
929EXPORT_SYMBOL(pci_dac_page_to_dma);
920 930
921struct page * 931struct page *
922pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr) 932pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr)
@@ -924,13 +934,14 @@ pci_dac_dma_to_page(struct pci_dev *pdev, dma64_addr_t dma_addr)
924 unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset; 934 unsigned long paddr = (dma_addr & PAGE_MASK) - alpha_mv.pci_dac_offset;
925 return virt_to_page(__va(paddr)); 935 return virt_to_page(__va(paddr));
926} 936}
937EXPORT_SYMBOL(pci_dac_dma_to_page);
927 938
928unsigned long 939unsigned long
929pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr) 940pci_dac_dma_to_offset(struct pci_dev *pdev, dma64_addr_t dma_addr)
930{ 941{
931 return (dma_addr & ~PAGE_MASK); 942 return (dma_addr & ~PAGE_MASK);
932} 943}
933 944EXPORT_SYMBOL(pci_dac_dma_to_offset);
934 945
935/* Helper for generic DMA-mapping functions. */ 946/* Helper for generic DMA-mapping functions. */
936 947
@@ -957,6 +968,7 @@ alpha_gendev_to_pci(struct device *dev)
957 /* This assumes ISA bus master with dma_mask 0xffffff. */ 968 /* This assumes ISA bus master with dma_mask 0xffffff. */
958 return NULL; 969 return NULL;
959} 970}
971EXPORT_SYMBOL(alpha_gendev_to_pci);
960 972
961int 973int
962dma_set_mask(struct device *dev, u64 mask) 974dma_set_mask(struct device *dev, u64 mask)
@@ -969,3 +981,4 @@ dma_set_mask(struct device *dev, u64 mask)
969 981
970 return 0; 982 return 0;
971} 983}
984EXPORT_SYMBOL(dma_set_mask);
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index b3a8a2980365..3370e6faeae0 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -205,6 +205,7 @@ start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp)
205 regs->ps = 8; 205 regs->ps = 8;
206 wrusp(sp); 206 wrusp(sp);
207} 207}
208EXPORT_SYMBOL(start_thread);
208 209
209/* 210/*
210 * Free current thread data structures etc.. 211 * Free current thread data structures etc..
@@ -376,6 +377,7 @@ dump_thread(struct pt_regs * pt, struct user * dump)
376 dump->regs[EF_A2] = pt->r18; 377 dump->regs[EF_A2] = pt->r18;
377 memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8); 378 memcpy((char *)dump->regs + EF_SIZE, sw->fp, 32 * 8);
378} 379}
380EXPORT_SYMBOL(dump_thread);
379 381
380/* 382/*
381 * Fill in the user structure for a ELF core dump. 383 * Fill in the user structure for a ELF core dump.
@@ -424,6 +426,7 @@ dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt, struct thread_info *ti)
424 useful value of the thread's UNIQUE field. */ 426 useful value of the thread's UNIQUE field. */
425 dest[32] = ti->pcb.unique; 427 dest[32] = ti->pcb.unique;
426} 428}
429EXPORT_SYMBOL(dump_elf_thread);
427 430
428int 431int
429dump_elf_task(elf_greg_t *dest, struct task_struct *task) 432dump_elf_task(elf_greg_t *dest, struct task_struct *task)
@@ -431,6 +434,7 @@ dump_elf_task(elf_greg_t *dest, struct task_struct *task)
431 dump_elf_thread(dest, task_pt_regs(task), task_thread_info(task)); 434 dump_elf_thread(dest, task_pt_regs(task), task_thread_info(task));
432 return 1; 435 return 1;
433} 436}
437EXPORT_SYMBOL(dump_elf_task);
434 438
435int 439int
436dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task) 440dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task)
@@ -439,6 +443,7 @@ dump_elf_task_fp(elf_fpreg_t *dest, struct task_struct *task)
439 memcpy(dest, sw->fp, 32 * 8); 443 memcpy(dest, sw->fp, 32 * 8);
440 return 1; 444 return 1;
441} 445}
446EXPORT_SYMBOL(dump_elf_task_fp);
442 447
443/* 448/*
444 * sys_execve() executes a new program. 449 * sys_execve() executes a new program.
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
index 21f71287b6f5..95912ecc65e1 100644
--- a/arch/alpha/kernel/proto.h
+++ b/arch/alpha/kernel/proto.h
@@ -20,7 +20,7 @@ struct pci_controller;
20extern struct pci_ops apecs_pci_ops; 20extern struct pci_ops apecs_pci_ops;
21extern void apecs_init_arch(void); 21extern void apecs_init_arch(void);
22extern void apecs_pci_clr_err(void); 22extern void apecs_pci_clr_err(void);
23extern void apecs_machine_check(u64, u64, struct pt_regs *); 23extern void apecs_machine_check(u64, u64);
24extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 24extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
25 25
26/* core_cia.c */ 26/* core_cia.c */
@@ -29,27 +29,27 @@ extern void cia_init_pci(void);
29extern void cia_init_arch(void); 29extern void cia_init_arch(void);
30extern void pyxis_init_arch(void); 30extern void pyxis_init_arch(void);
31extern void cia_kill_arch(int); 31extern void cia_kill_arch(int);
32extern void cia_machine_check(u64, u64, struct pt_regs *); 32extern void cia_machine_check(u64, u64);
33extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 33extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
34 34
35/* core_irongate.c */ 35/* core_irongate.c */
36extern struct pci_ops irongate_pci_ops; 36extern struct pci_ops irongate_pci_ops;
37extern int irongate_pci_clr_err(void); 37extern int irongate_pci_clr_err(void);
38extern void irongate_init_arch(void); 38extern void irongate_init_arch(void);
39extern void irongate_machine_check(u64, u64, struct pt_regs *); 39extern void irongate_machine_check(u64, u64);
40#define irongate_pci_tbi ((void *)0) 40#define irongate_pci_tbi ((void *)0)
41 41
42/* core_lca.c */ 42/* core_lca.c */
43extern struct pci_ops lca_pci_ops; 43extern struct pci_ops lca_pci_ops;
44extern void lca_init_arch(void); 44extern void lca_init_arch(void);
45extern void lca_machine_check(u64, u64, struct pt_regs *); 45extern void lca_machine_check(u64, u64);
46extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 46extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
47 47
48/* core_marvel.c */ 48/* core_marvel.c */
49extern struct pci_ops marvel_pci_ops; 49extern struct pci_ops marvel_pci_ops;
50extern void marvel_init_arch(void); 50extern void marvel_init_arch(void);
51extern void marvel_kill_arch(int); 51extern void marvel_kill_arch(int);
52extern void marvel_machine_check(u64, u64, struct pt_regs *); 52extern void marvel_machine_check(u64, u64);
53extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 53extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
54extern int marvel_pa_to_nid(unsigned long); 54extern int marvel_pa_to_nid(unsigned long);
55extern int marvel_cpuid_to_nid(int); 55extern int marvel_cpuid_to_nid(int);
@@ -64,7 +64,7 @@ void io7_clear_errors(struct io7 *io7);
64extern struct pci_ops mcpcia_pci_ops; 64extern struct pci_ops mcpcia_pci_ops;
65extern void mcpcia_init_arch(void); 65extern void mcpcia_init_arch(void);
66extern void mcpcia_init_hoses(void); 66extern void mcpcia_init_hoses(void);
67extern void mcpcia_machine_check(u64, u64, struct pt_regs *); 67extern void mcpcia_machine_check(u64, u64);
68extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 68extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
69 69
70/* core_polaris.c */ 70/* core_polaris.c */
@@ -72,21 +72,21 @@ extern struct pci_ops polaris_pci_ops;
72extern int polaris_read_config_dword(struct pci_dev *, int, u32 *); 72extern int polaris_read_config_dword(struct pci_dev *, int, u32 *);
73extern int polaris_write_config_dword(struct pci_dev *, int, u32); 73extern int polaris_write_config_dword(struct pci_dev *, int, u32);
74extern void polaris_init_arch(void); 74extern void polaris_init_arch(void);
75extern void polaris_machine_check(u64, u64, struct pt_regs *); 75extern void polaris_machine_check(u64, u64);
76#define polaris_pci_tbi ((void *)0) 76#define polaris_pci_tbi ((void *)0)
77 77
78/* core_t2.c */ 78/* core_t2.c */
79extern struct pci_ops t2_pci_ops; 79extern struct pci_ops t2_pci_ops;
80extern void t2_init_arch(void); 80extern void t2_init_arch(void);
81extern void t2_kill_arch(int); 81extern void t2_kill_arch(int);
82extern void t2_machine_check(u64, u64, struct pt_regs *); 82extern void t2_machine_check(u64, u64);
83extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 83extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
84 84
85/* core_titan.c */ 85/* core_titan.c */
86extern struct pci_ops titan_pci_ops; 86extern struct pci_ops titan_pci_ops;
87extern void titan_init_arch(void); 87extern void titan_init_arch(void);
88extern void titan_kill_arch(int); 88extern void titan_kill_arch(int);
89extern void titan_machine_check(u64, u64, struct pt_regs *); 89extern void titan_machine_check(u64, u64);
90extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 90extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
91extern struct _alpha_agp_info *titan_agp_info(void); 91extern struct _alpha_agp_info *titan_agp_info(void);
92 92
@@ -94,14 +94,14 @@ extern struct _alpha_agp_info *titan_agp_info(void);
94extern struct pci_ops tsunami_pci_ops; 94extern struct pci_ops tsunami_pci_ops;
95extern void tsunami_init_arch(void); 95extern void tsunami_init_arch(void);
96extern void tsunami_kill_arch(int); 96extern void tsunami_kill_arch(int);
97extern void tsunami_machine_check(u64, u64, struct pt_regs *); 97extern void tsunami_machine_check(u64, u64);
98extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 98extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
99 99
100/* core_wildfire.c */ 100/* core_wildfire.c */
101extern struct pci_ops wildfire_pci_ops; 101extern struct pci_ops wildfire_pci_ops;
102extern void wildfire_init_arch(void); 102extern void wildfire_init_arch(void);
103extern void wildfire_kill_arch(int); 103extern void wildfire_kill_arch(int);
104extern void wildfire_machine_check(u64, u64, struct pt_regs *); 104extern void wildfire_machine_check(u64, u64);
105extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); 105extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
106extern int wildfire_pa_to_nid(unsigned long); 106extern int wildfire_pa_to_nid(unsigned long);
107extern int wildfire_cpuid_to_nid(int); 107extern int wildfire_cpuid_to_nid(int);
@@ -133,7 +133,7 @@ extern void smp_percpu_timer_interrupt(struct pt_regs *);
133/* extern void reset_for_srm(void); */ 133/* extern void reset_for_srm(void); */
134 134
135/* time.c */ 135/* time.c */
136extern irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs); 136extern irqreturn_t timer_interrupt(int irq, void *dev);
137extern void common_init_rtc(void); 137extern void common_init_rtc(void);
138extern unsigned long est_cycle_freq; 138extern unsigned long est_cycle_freq;
139 139
@@ -177,7 +177,7 @@ extern void dik_show_regs(struct pt_regs *regs, unsigned long *r9_15);
177extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *); 177extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *);
178 178
179/* sys_titan.c */ 179/* sys_titan.c */
180extern void titan_dispatch_irqs(u64, struct pt_regs *); 180extern void titan_dispatch_irqs(u64);
181 181
182/* ../mm/init.c */ 182/* ../mm/init.c */
183extern void switch_to_system_map(void); 183extern void switch_to_system_map(void);
@@ -214,5 +214,4 @@ extern struct mcheck_info
214#endif 214#endif
215 215
216extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr, 216extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr,
217 struct pt_regs *regs, const char *machine, 217 const char *machine, int expected);
218 int expected);
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index a94e6d93e2ee..1aea7c7c683c 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -66,6 +66,7 @@ static struct notifier_block alpha_panic_block = {
66 66
67 67
68struct hwrpb_struct *hwrpb; 68struct hwrpb_struct *hwrpb;
69EXPORT_SYMBOL(hwrpb);
69unsigned long srm_hae; 70unsigned long srm_hae;
70 71
71int alpha_l1i_cacheshape; 72int alpha_l1i_cacheshape;
@@ -111,6 +112,7 @@ unsigned long alpha_agpgart_size = DEFAULT_AGP_APER_SIZE;
111#ifdef CONFIG_ALPHA_GENERIC 112#ifdef CONFIG_ALPHA_GENERIC
112struct alpha_machine_vector alpha_mv; 113struct alpha_machine_vector alpha_mv;
113int alpha_using_srm; 114int alpha_using_srm;
115EXPORT_SYMBOL(alpha_using_srm);
114#endif 116#endif
115 117
116static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, 118static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long,
@@ -137,6 +139,8 @@ struct screen_info screen_info = {
137 .orig_video_points = 16 139 .orig_video_points = 16
138}; 140};
139 141
142EXPORT_SYMBOL(screen_info);
143
140/* 144/*
141 * The direct map I/O window, if any. This should be the same 145 * The direct map I/O window, if any. This should be the same
142 * for all busses, since it's used by virt_to_bus. 146 * for all busses, since it's used by virt_to_bus.
@@ -144,6 +148,8 @@ struct screen_info screen_info = {
144 148
145unsigned long __direct_map_base; 149unsigned long __direct_map_base;
146unsigned long __direct_map_size; 150unsigned long __direct_map_size;
151EXPORT_SYMBOL(__direct_map_base);
152EXPORT_SYMBOL(__direct_map_size);
147 153
148/* 154/*
149 * Declare all of the machine vectors. 155 * Declare all of the machine vectors.
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index 4dc273e537fd..d1ec4f51df1a 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -52,6 +52,7 @@
52 52
53/* A collection of per-processor data. */ 53/* A collection of per-processor data. */
54struct cpuinfo_alpha cpu_data[NR_CPUS]; 54struct cpuinfo_alpha cpu_data[NR_CPUS];
55EXPORT_SYMBOL(cpu_data);
55 56
56/* A collection of single bit ipi messages. */ 57/* A collection of single bit ipi messages. */
57static struct { 58static struct {
@@ -74,6 +75,7 @@ EXPORT_SYMBOL(cpu_online_map);
74 75
75int smp_num_probed; /* Internal processor count */ 76int smp_num_probed; /* Internal processor count */
76int smp_num_cpus = 1; /* Number that came online. */ 77int smp_num_cpus = 1; /* Number that came online. */
78EXPORT_SYMBOL(smp_num_cpus);
77 79
78extern void calibrate_delay(void); 80extern void calibrate_delay(void);
79 81
@@ -515,12 +517,15 @@ smp_cpus_done(unsigned int max_cpus)
515void 517void
516smp_percpu_timer_interrupt(struct pt_regs *regs) 518smp_percpu_timer_interrupt(struct pt_regs *regs)
517{ 519{
520 struct pt_regs *old_regs;
518 int cpu = smp_processor_id(); 521 int cpu = smp_processor_id();
519 unsigned long user = user_mode(regs); 522 unsigned long user = user_mode(regs);
520 struct cpuinfo_alpha *data = &cpu_data[cpu]; 523 struct cpuinfo_alpha *data = &cpu_data[cpu];
521 524
525 old_regs = set_irq_regs(regs);
526
522 /* Record kernel PC. */ 527 /* Record kernel PC. */
523 profile_tick(CPU_PROFILING, regs); 528 profile_tick(CPU_PROFILING);
524 529
525 if (!--data->prof_counter) { 530 if (!--data->prof_counter) {
526 /* We need to make like a normal interrupt -- otherwise 531 /* We need to make like a normal interrupt -- otherwise
@@ -534,6 +539,7 @@ smp_percpu_timer_interrupt(struct pt_regs *regs)
534 539
535 irq_exit(); 540 irq_exit();
536 } 541 }
542 set_irq_regs(old_regs);
537} 543}
538 544
539int __init 545int __init
@@ -786,6 +792,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry,
786 792
787 return 0; 793 return 0;
788} 794}
795EXPORT_SYMBOL(smp_call_function_on_cpu);
789 796
790int 797int
791smp_call_function (void (*func) (void *info), void *info, int retry, int wait) 798smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
@@ -793,6 +800,7 @@ smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
793 return smp_call_function_on_cpu (func, info, retry, wait, 800 return smp_call_function_on_cpu (func, info, retry, wait,
794 cpu_online_map); 801 cpu_online_map);
795} 802}
803EXPORT_SYMBOL(smp_call_function);
796 804
797static void 805static void
798ipi_imb(void *ignored) 806ipi_imb(void *ignored)
@@ -807,6 +815,7 @@ smp_imb(void)
807 if (on_each_cpu(ipi_imb, NULL, 1, 1)) 815 if (on_each_cpu(ipi_imb, NULL, 1, 1))
808 printk(KERN_CRIT "smp_imb: timed out\n"); 816 printk(KERN_CRIT "smp_imb: timed out\n");
809} 817}
818EXPORT_SYMBOL(smp_imb);
810 819
811static void 820static void
812ipi_flush_tlb_all(void *ignored) 821ipi_flush_tlb_all(void *ignored)
@@ -862,6 +871,7 @@ flush_tlb_mm(struct mm_struct *mm)
862 871
863 preempt_enable(); 872 preempt_enable();
864} 873}
874EXPORT_SYMBOL(flush_tlb_mm);
865 875
866struct flush_tlb_page_struct { 876struct flush_tlb_page_struct {
867 struct vm_area_struct *vma; 877 struct vm_area_struct *vma;
@@ -914,6 +924,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr)
914 924
915 preempt_enable(); 925 preempt_enable();
916} 926}
927EXPORT_SYMBOL(flush_tlb_page);
917 928
918void 929void
919flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) 930flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
@@ -921,6 +932,7 @@ flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long e
921 /* On the Alpha we always flush the whole user tlb. */ 932 /* On the Alpha we always flush the whole user tlb. */
922 flush_tlb_mm(vma->vm_mm); 933 flush_tlb_mm(vma->vm_mm);
923} 934}
935EXPORT_SYMBOL(flush_tlb_range);
924 936
925static void 937static void
926ipi_flush_icache_page(void *x) 938ipi_flush_icache_page(void *x)
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c
index d6926b7b1e99..49bedfbbd31b 100644
--- a/arch/alpha/kernel/sys_alcor.c
+++ b/arch/alpha/kernel/sys_alcor.c
@@ -100,7 +100,7 @@ static struct hw_interrupt_type alcor_irq_type = {
100}; 100};
101 101
102static void 102static void
103alcor_device_interrupt(unsigned long vector, struct pt_regs *regs) 103alcor_device_interrupt(unsigned long vector)
104{ 104{
105 unsigned long pld; 105 unsigned long pld;
106 unsigned int i; 106 unsigned int i;
@@ -116,9 +116,9 @@ alcor_device_interrupt(unsigned long vector, struct pt_regs *regs)
116 i = ffz(~pld); 116 i = ffz(~pld);
117 pld &= pld - 1; /* clear least bit set */ 117 pld &= pld - 1; /* clear least bit set */
118 if (i == 31) { 118 if (i == 31) {
119 isa_device_interrupt(vector, regs); 119 isa_device_interrupt(vector);
120 } else { 120 } else {
121 handle_irq(16 + i, regs); 121 handle_irq(16 + i);
122 } 122 }
123 } 123 }
124} 124}
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c
index 25a215067da8..ace475c124f6 100644
--- a/arch/alpha/kernel/sys_cabriolet.c
+++ b/arch/alpha/kernel/sys_cabriolet.c
@@ -82,7 +82,7 @@ static struct hw_interrupt_type cabriolet_irq_type = {
82}; 82};
83 83
84static void 84static void
85cabriolet_device_interrupt(unsigned long v, struct pt_regs *r) 85cabriolet_device_interrupt(unsigned long v)
86{ 86{
87 unsigned long pld; 87 unsigned long pld;
88 unsigned int i; 88 unsigned int i;
@@ -98,15 +98,15 @@ cabriolet_device_interrupt(unsigned long v, struct pt_regs *r)
98 i = ffz(~pld); 98 i = ffz(~pld);
99 pld &= pld - 1; /* clear least bit set */ 99 pld &= pld - 1; /* clear least bit set */
100 if (i == 4) { 100 if (i == 4) {
101 isa_device_interrupt(v, r); 101 isa_device_interrupt(v);
102 } else { 102 } else {
103 handle_irq(16 + i, r); 103 handle_irq(16 + i);
104 } 104 }
105 } 105 }
106} 106}
107 107
108static void __init 108static void __init
109common_init_irq(void (*srm_dev_int)(unsigned long v, struct pt_regs *r)) 109common_init_irq(void (*srm_dev_int)(unsigned long v))
110{ 110{
111 init_i8259a_irqs(); 111 init_i8259a_irqs();
112 112
@@ -154,18 +154,18 @@ cabriolet_init_irq(void)
154 too invasive though. */ 154 too invasive though. */
155 155
156static void 156static void
157pc164_srm_device_interrupt(unsigned long v, struct pt_regs *r) 157pc164_srm_device_interrupt(unsigned long v)
158{ 158{
159 __min_ipl = getipl(); 159 __min_ipl = getipl();
160 srm_device_interrupt(v, r); 160 srm_device_interrupt(v);
161 __min_ipl = 0; 161 __min_ipl = 0;
162} 162}
163 163
164static void 164static void
165pc164_device_interrupt(unsigned long v, struct pt_regs *r) 165pc164_device_interrupt(unsigned long v)
166{ 166{
167 __min_ipl = getipl(); 167 __min_ipl = getipl();
168 cabriolet_device_interrupt(v, r); 168 cabriolet_device_interrupt(v);
169 __min_ipl = 0; 169 __min_ipl = 0;
170} 170}
171 171
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c
index dd6103b867e7..85d2f933dd07 100644
--- a/arch/alpha/kernel/sys_dp264.c
+++ b/arch/alpha/kernel/sys_dp264.c
@@ -217,7 +217,7 @@ static struct hw_interrupt_type clipper_irq_type = {
217}; 217};
218 218
219static void 219static void
220dp264_device_interrupt(unsigned long vector, struct pt_regs * regs) 220dp264_device_interrupt(unsigned long vector)
221{ 221{
222#if 1 222#if 1
223 printk("dp264_device_interrupt: NOT IMPLEMENTED YET!! \n"); 223 printk("dp264_device_interrupt: NOT IMPLEMENTED YET!! \n");
@@ -236,9 +236,9 @@ dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
236 i = ffz(~pld); 236 i = ffz(~pld);
237 pld &= pld - 1; /* clear least bit set */ 237 pld &= pld - 1; /* clear least bit set */
238 if (i == 55) 238 if (i == 55)
239 isa_device_interrupt(vector, regs); 239 isa_device_interrupt(vector);
240 else 240 else
241 handle_irq(16 + i, 16 + i, regs); 241 handle_irq(16 + i);
242#if 0 242#if 0
243 TSUNAMI_cchip->dir0.csr = 1UL << i; mb(); 243 TSUNAMI_cchip->dir0.csr = 1UL << i; mb();
244 tmp = TSUNAMI_cchip->dir0.csr; 244 tmp = TSUNAMI_cchip->dir0.csr;
@@ -248,7 +248,7 @@ dp264_device_interrupt(unsigned long vector, struct pt_regs * regs)
248} 248}
249 249
250static void 250static void
251dp264_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 251dp264_srm_device_interrupt(unsigned long vector)
252{ 252{
253 int irq; 253 int irq;
254 254
@@ -268,11 +268,11 @@ dp264_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
268 if (irq >= 32) 268 if (irq >= 32)
269 irq -= 16; 269 irq -= 16;
270 270
271 handle_irq(irq, regs); 271 handle_irq(irq);
272} 272}
273 273
274static void 274static void
275clipper_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 275clipper_srm_device_interrupt(unsigned long vector)
276{ 276{
277 int irq; 277 int irq;
278 278
@@ -290,7 +290,7 @@ clipper_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
290 * 290 *
291 * Eg IRQ 24 is DRIR bit 8, etc, etc 291 * Eg IRQ 24 is DRIR bit 8, etc, etc
292 */ 292 */
293 handle_irq(irq, regs); 293 handle_irq(irq);
294} 294}
295 295
296static void __init 296static void __init
diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c
index ed108b66ec09..9c5a306dc0ee 100644
--- a/arch/alpha/kernel/sys_eb64p.c
+++ b/arch/alpha/kernel/sys_eb64p.c
@@ -80,7 +80,7 @@ static struct hw_interrupt_type eb64p_irq_type = {
80}; 80};
81 81
82static void 82static void
83eb64p_device_interrupt(unsigned long vector, struct pt_regs *regs) 83eb64p_device_interrupt(unsigned long vector)
84{ 84{
85 unsigned long pld; 85 unsigned long pld;
86 unsigned int i; 86 unsigned int i;
@@ -97,9 +97,9 @@ eb64p_device_interrupt(unsigned long vector, struct pt_regs *regs)
97 pld &= pld - 1; /* clear least bit set */ 97 pld &= pld - 1; /* clear least bit set */
98 98
99 if (i == 5) { 99 if (i == 5) {
100 isa_device_interrupt(vector, regs); 100 isa_device_interrupt(vector);
101 } else { 101 } else {
102 handle_irq(16 + i, regs); 102 handle_irq(16 + i);
103 } 103 }
104 } 104 }
105} 105}
diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c
index 64a785baf53a..7ef3b6fb3700 100644
--- a/arch/alpha/kernel/sys_eiger.c
+++ b/arch/alpha/kernel/sys_eiger.c
@@ -91,7 +91,7 @@ static struct hw_interrupt_type eiger_irq_type = {
91}; 91};
92 92
93static void 93static void
94eiger_device_interrupt(unsigned long vector, struct pt_regs * regs) 94eiger_device_interrupt(unsigned long vector)
95{ 95{
96 unsigned intstatus; 96 unsigned intstatus;
97 97
@@ -118,20 +118,20 @@ eiger_device_interrupt(unsigned long vector, struct pt_regs * regs)
118 * despatch an interrupt if it's set. 118 * despatch an interrupt if it's set.
119 */ 119 */
120 120
121 if (intstatus & 8) handle_irq(16+3, regs); 121 if (intstatus & 8) handle_irq(16+3);
122 if (intstatus & 4) handle_irq(16+2, regs); 122 if (intstatus & 4) handle_irq(16+2);
123 if (intstatus & 2) handle_irq(16+1, regs); 123 if (intstatus & 2) handle_irq(16+1);
124 if (intstatus & 1) handle_irq(16+0, regs); 124 if (intstatus & 1) handle_irq(16+0);
125 } else { 125 } else {
126 isa_device_interrupt(vector, regs); 126 isa_device_interrupt(vector);
127 } 127 }
128} 128}
129 129
130static void 130static void
131eiger_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 131eiger_srm_device_interrupt(unsigned long vector)
132{ 132{
133 int irq = (vector - 0x800) >> 4; 133 int irq = (vector - 0x800) >> 4;
134 handle_irq(irq, regs); 134 handle_irq(irq);
135} 135}
136 136
137static void __init 137static void __init
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c
index 4ac2b328b8de..2c3de97de46c 100644
--- a/arch/alpha/kernel/sys_jensen.c
+++ b/arch/alpha/kernel/sys_jensen.c
@@ -129,7 +129,7 @@ static struct hw_interrupt_type jensen_local_irq_type = {
129}; 129};
130 130
131static void 131static void
132jensen_device_interrupt(unsigned long vector, struct pt_regs * regs) 132jensen_device_interrupt(unsigned long vector)
133{ 133{
134 int irq; 134 int irq;
135 135
@@ -189,7 +189,7 @@ jensen_device_interrupt(unsigned long vector, struct pt_regs * regs)
189 if (cc - last_msg > ((JENSEN_CYCLES_PER_SEC) * 3) || 189 if (cc - last_msg > ((JENSEN_CYCLES_PER_SEC) * 3) ||
190 irq != last_irq) { 190 irq != last_irq) {
191 printk(KERN_CRIT " irq %d count %d cc %u @ %lx\n", 191 printk(KERN_CRIT " irq %d count %d cc %u @ %lx\n",
192 irq, count, cc-last_cc, regs->pc); 192 irq, count, cc-last_cc, get_irq_regs()->pc);
193 count = 0; 193 count = 0;
194 last_msg = cc; 194 last_msg = cc;
195 last_irq = irq; 195 last_irq = irq;
@@ -198,7 +198,7 @@ jensen_device_interrupt(unsigned long vector, struct pt_regs * regs)
198 } 198 }
199#endif 199#endif
200 200
201 handle_irq(irq, regs); 201 handle_irq(irq);
202} 202}
203 203
204static void __init 204static void __init
@@ -244,7 +244,7 @@ jensen_init_arch(void)
244} 244}
245 245
246static void 246static void
247jensen_machine_check (u64 vector, u64 la, struct pt_regs *regs) 247jensen_machine_check (u64 vector, u64 la)
248{ 248{
249 printk(KERN_CRIT "Machine check\n"); 249 printk(KERN_CRIT "Machine check\n");
250} 250}
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c
index 36d215954376..e349f03b830e 100644
--- a/arch/alpha/kernel/sys_marvel.c
+++ b/arch/alpha/kernel/sys_marvel.c
@@ -38,7 +38,7 @@
38 * Interrupt handling. 38 * Interrupt handling.
39 */ 39 */
40static void 40static void
41io7_device_interrupt(unsigned long vector, struct pt_regs * regs) 41io7_device_interrupt(unsigned long vector)
42{ 42{
43 unsigned int pid; 43 unsigned int pid;
44 unsigned int irq; 44 unsigned int irq;
@@ -64,7 +64,7 @@ io7_device_interrupt(unsigned long vector, struct pt_regs * regs)
64 irq &= MARVEL_IRQ_VEC_IRQ_MASK; /* not too many bits */ 64 irq &= MARVEL_IRQ_VEC_IRQ_MASK; /* not too many bits */
65 irq |= pid << MARVEL_IRQ_VEC_PE_SHIFT; /* merge the pid */ 65 irq |= pid << MARVEL_IRQ_VEC_PE_SHIFT; /* merge the pid */
66 66
67 handle_irq(irq, regs); 67 handle_irq(irq);
68} 68}
69 69
70static volatile unsigned long * 70static volatile unsigned long *
diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c
index 61ac56f8eeea..b8b817feb1ee 100644
--- a/arch/alpha/kernel/sys_miata.c
+++ b/arch/alpha/kernel/sys_miata.c
@@ -33,7 +33,7 @@
33 33
34 34
35static void 35static void
36miata_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 36miata_srm_device_interrupt(unsigned long vector)
37{ 37{
38 int irq; 38 int irq;
39 39
@@ -56,7 +56,7 @@ miata_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
56 if (irq >= 16) 56 if (irq >= 16)
57 irq = irq + 8; 57 irq = irq + 8;
58 58
59 handle_irq(irq, regs); 59 handle_irq(irq);
60} 60}
61 61
62static void __init 62static void __init
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c
index cc4c58111366..8d3e9429c5ee 100644
--- a/arch/alpha/kernel/sys_mikasa.c
+++ b/arch/alpha/kernel/sys_mikasa.c
@@ -79,7 +79,7 @@ static struct hw_interrupt_type mikasa_irq_type = {
79}; 79};
80 80
81static void 81static void
82mikasa_device_interrupt(unsigned long vector, struct pt_regs *regs) 82mikasa_device_interrupt(unsigned long vector)
83{ 83{
84 unsigned long pld; 84 unsigned long pld;
85 unsigned int i; 85 unsigned int i;
@@ -97,9 +97,9 @@ mikasa_device_interrupt(unsigned long vector, struct pt_regs *regs)
97 i = ffz(~pld); 97 i = ffz(~pld);
98 pld &= pld - 1; /* clear least bit set */ 98 pld &= pld - 1; /* clear least bit set */
99 if (i < 16) { 99 if (i < 16) {
100 isa_device_interrupt(vector, regs); 100 isa_device_interrupt(vector);
101 } else { 101 } else {
102 handle_irq(i, regs); 102 handle_irq(i);
103 } 103 }
104 } 104 }
105} 105}
@@ -182,8 +182,7 @@ mikasa_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
182 182
183#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO) 183#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
184static void 184static void
185mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr, 185mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr)
186 struct pt_regs * regs)
187{ 186{
188#define MCHK_NO_DEVSEL 0x205U 187#define MCHK_NO_DEVSEL 0x205U
189#define MCHK_NO_TABT 0x204U 188#define MCHK_NO_TABT 0x204U
@@ -202,7 +201,7 @@ mikasa_apecs_machine_check(unsigned long vector, unsigned long la_ptr,
202 mb(); 201 mb();
203 202
204 code = mchk_header->code; 203 code = mchk_header->code;
205 process_mcheck_info(vector, la_ptr, regs, "MIKASA APECS", 204 process_mcheck_info(vector, la_ptr, "MIKASA APECS",
206 (mcheck_expected(0) 205 (mcheck_expected(0)
207 && (code == MCHK_NO_DEVSEL 206 && (code == MCHK_NO_DEVSEL
208 || code == MCHK_NO_TABT))); 207 || code == MCHK_NO_TABT)));
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c
index c0d696efec5b..93744bab73fb 100644
--- a/arch/alpha/kernel/sys_nautilus.c
+++ b/arch/alpha/kernel/sys_nautilus.c
@@ -124,8 +124,7 @@ naut_sys_machine_check(unsigned long vector, unsigned long la_ptr,
124 in the system. They are analysed separately but all starts here. */ 124 in the system. They are analysed separately but all starts here. */
125 125
126void 126void
127nautilus_machine_check(unsigned long vector, unsigned long la_ptr, 127nautilus_machine_check(unsigned long vector, unsigned long la_ptr)
128 struct pt_regs *regs)
129{ 128{
130 char *mchk_class; 129 char *mchk_class;
131 130
@@ -165,7 +164,7 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
165 else if (vector == SCB_Q_SYSMCHK) 164 else if (vector == SCB_Q_SYSMCHK)
166 mchk_class = "Fatal"; 165 mchk_class = "Fatal";
167 else { 166 else {
168 ev6_machine_check(vector, la_ptr, regs); 167 ev6_machine_check(vector, la_ptr);
169 return; 168 return;
170 } 169 }
171 170
@@ -173,7 +172,7 @@ nautilus_machine_check(unsigned long vector, unsigned long la_ptr,
173 "[%s System Machine Check (NMI)]\n", 172 "[%s System Machine Check (NMI)]\n",
174 vector, mchk_class); 173 vector, mchk_class);
175 174
176 naut_sys_machine_check(vector, la_ptr, regs); 175 naut_sys_machine_check(vector, la_ptr, get_irq_regs());
177 176
178 /* Tell the PALcode to clear the machine check */ 177 /* Tell the PALcode to clear the machine check */
179 draina(); 178 draina();
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c
index 2d3cff7e8c5f..de6ba3432e8a 100644
--- a/arch/alpha/kernel/sys_noritake.c
+++ b/arch/alpha/kernel/sys_noritake.c
@@ -77,7 +77,7 @@ static struct hw_interrupt_type noritake_irq_type = {
77}; 77};
78 78
79static void 79static void
80noritake_device_interrupt(unsigned long vector, struct pt_regs *regs) 80noritake_device_interrupt(unsigned long vector)
81{ 81{
82 unsigned long pld; 82 unsigned long pld;
83 unsigned int i; 83 unsigned int i;
@@ -96,15 +96,15 @@ noritake_device_interrupt(unsigned long vector, struct pt_regs *regs)
96 i = ffz(~pld); 96 i = ffz(~pld);
97 pld &= pld - 1; /* clear least bit set */ 97 pld &= pld - 1; /* clear least bit set */
98 if (i < 16) { 98 if (i < 16) {
99 isa_device_interrupt(vector, regs); 99 isa_device_interrupt(vector);
100 } else { 100 } else {
101 handle_irq(i, regs); 101 handle_irq(i);
102 } 102 }
103 } 103 }
104} 104}
105 105
106static void 106static void
107noritake_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 107noritake_srm_device_interrupt(unsigned long vector)
108{ 108{
109 int irq; 109 int irq;
110 110
@@ -122,7 +122,7 @@ noritake_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
122 if (irq >= 16) 122 if (irq >= 16)
123 irq = irq + 1; 123 irq = irq + 1;
124 124
125 handle_irq(irq, regs); 125 handle_irq(irq);
126} 126}
127 127
128static void __init 128static void __init
@@ -264,8 +264,7 @@ noritake_swizzle(struct pci_dev *dev, u8 *pinp)
264 264
265#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO) 265#if defined(CONFIG_ALPHA_GENERIC) || !defined(CONFIG_ALPHA_PRIMO)
266static void 266static void
267noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr, 267noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr)
268 struct pt_regs * regs)
269{ 268{
270#define MCHK_NO_DEVSEL 0x205U 269#define MCHK_NO_DEVSEL 0x205U
271#define MCHK_NO_TABT 0x204U 270#define MCHK_NO_TABT 0x204U
@@ -284,7 +283,7 @@ noritake_apecs_machine_check(unsigned long vector, unsigned long la_ptr,
284 mb(); 283 mb();
285 284
286 code = mchk_header->code; 285 code = mchk_header->code;
287 process_mcheck_info(vector, la_ptr, regs, "NORITAKE APECS", 286 process_mcheck_info(vector, la_ptr, "NORITAKE APECS",
288 (mcheck_expected(0) 287 (mcheck_expected(0)
289 && (code == MCHK_NO_DEVSEL 288 && (code == MCHK_NO_DEVSEL
290 || code == MCHK_NO_TABT))); 289 || code == MCHK_NO_TABT)));
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c
index 949607e3d6fb..581d08c70b92 100644
--- a/arch/alpha/kernel/sys_rawhide.c
+++ b/arch/alpha/kernel/sys_rawhide.c
@@ -134,7 +134,7 @@ static struct hw_interrupt_type rawhide_irq_type = {
134}; 134};
135 135
136static void 136static void
137rawhide_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 137rawhide_srm_device_interrupt(unsigned long vector)
138{ 138{
139 int irq; 139 int irq;
140 140
@@ -158,7 +158,7 @@ rawhide_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
158 /* Adjust by which hose it is from. */ 158 /* Adjust by which hose it is from. */
159 irq -= ((irq + 16) >> 2) & 0x38; 159 irq -= ((irq + 16) >> 2) & 0x38;
160 160
161 handle_irq(irq, regs); 161 handle_irq(irq);
162} 162}
163 163
164static void __init 164static void __init
diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c
index 6ae506052635..ce1faa6f1df1 100644
--- a/arch/alpha/kernel/sys_rx164.c
+++ b/arch/alpha/kernel/sys_rx164.c
@@ -83,7 +83,7 @@ static struct hw_interrupt_type rx164_irq_type = {
83}; 83};
84 84
85static void 85static void
86rx164_device_interrupt(unsigned long vector, struct pt_regs *regs) 86rx164_device_interrupt(unsigned long vector)
87{ 87{
88 unsigned long pld; 88 unsigned long pld;
89 volatile unsigned int *dirr; 89 volatile unsigned int *dirr;
@@ -102,9 +102,9 @@ rx164_device_interrupt(unsigned long vector, struct pt_regs *regs)
102 i = ffz(~pld); 102 i = ffz(~pld);
103 pld &= pld - 1; /* clear least bit set */ 103 pld &= pld - 1; /* clear least bit set */
104 if (i == 20) { 104 if (i == 20) {
105 isa_no_iack_sc_device_interrupt(vector, regs); 105 isa_no_iack_sc_device_interrupt(vector);
106 } else { 106 } else {
107 handle_irq(16+i, regs); 107 handle_irq(16+i);
108 } 108 }
109 } 109 }
110} 110}
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index a7a14647b50e..906019cfa681 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -512,7 +512,7 @@ static struct hw_interrupt_type sable_lynx_irq_type = {
512}; 512};
513 513
514static void 514static void
515sable_lynx_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 515sable_lynx_srm_device_interrupt(unsigned long vector)
516{ 516{
517 /* Note that the vector reported by the SRM PALcode corresponds 517 /* Note that the vector reported by the SRM PALcode corresponds
518 to the interrupt mask bits, but we have to manage via the 518 to the interrupt mask bits, but we have to manage via the
@@ -526,7 +526,7 @@ sable_lynx_srm_device_interrupt(unsigned long vector, struct pt_regs * regs)
526 printk("%s: vector 0x%lx bit 0x%x irq 0x%x\n", 526 printk("%s: vector 0x%lx bit 0x%x irq 0x%x\n",
527 __FUNCTION__, vector, bit, irq); 527 __FUNCTION__, vector, bit, irq);
528#endif 528#endif
529 handle_irq(irq, regs); 529 handle_irq(irq);
530} 530}
531 531
532static void __init 532static void __init
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c
index 2c75cd1fd81a..9bd9a31450c6 100644
--- a/arch/alpha/kernel/sys_takara.c
+++ b/arch/alpha/kernel/sys_takara.c
@@ -85,7 +85,7 @@ static struct hw_interrupt_type takara_irq_type = {
85}; 85};
86 86
87static void 87static void
88takara_device_interrupt(unsigned long vector, struct pt_regs *regs) 88takara_device_interrupt(unsigned long vector)
89{ 89{
90 unsigned intstatus; 90 unsigned intstatus;
91 91
@@ -112,20 +112,20 @@ takara_device_interrupt(unsigned long vector, struct pt_regs *regs)
112 * despatch an interrupt if it's set. 112 * despatch an interrupt if it's set.
113 */ 113 */
114 114
115 if (intstatus & 8) handle_irq(16+3, regs); 115 if (intstatus & 8) handle_irq(16+3);
116 if (intstatus & 4) handle_irq(16+2, regs); 116 if (intstatus & 4) handle_irq(16+2);
117 if (intstatus & 2) handle_irq(16+1, regs); 117 if (intstatus & 2) handle_irq(16+1);
118 if (intstatus & 1) handle_irq(16+0, regs); 118 if (intstatus & 1) handle_irq(16+0);
119 } else { 119 } else {
120 isa_device_interrupt (vector, regs); 120 isa_device_interrupt (vector);
121 } 121 }
122} 122}
123 123
124static void 124static void
125takara_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 125takara_srm_device_interrupt(unsigned long vector)
126{ 126{
127 int irq = (vector - 0x800) >> 4; 127 int irq = (vector - 0x800) >> 4;
128 handle_irq(irq, regs); 128 handle_irq(irq);
129} 129}
130 130
131static void __init 131static void __init
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index 302aab38d95f..29ab7db81c30 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -167,18 +167,18 @@ titan_set_irq_affinity(unsigned int irq, cpumask_t affinity)
167} 167}
168 168
169static void 169static void
170titan_device_interrupt(unsigned long vector, struct pt_regs * regs) 170titan_device_interrupt(unsigned long vector)
171{ 171{
172 printk("titan_device_interrupt: NOT IMPLEMENTED YET!! \n"); 172 printk("titan_device_interrupt: NOT IMPLEMENTED YET!! \n");
173} 173}
174 174
175static void 175static void
176titan_srm_device_interrupt(unsigned long vector, struct pt_regs * regs) 176titan_srm_device_interrupt(unsigned long vector)
177{ 177{
178 int irq; 178 int irq;
179 179
180 irq = (vector - 0x800) >> 4; 180 irq = (vector - 0x800) >> 4;
181 handle_irq(irq, regs); 181 handle_irq(irq);
182} 182}
183 183
184 184
@@ -204,7 +204,7 @@ static struct hw_interrupt_type titan_irq_type = {
204}; 204};
205 205
206static irqreturn_t 206static irqreturn_t
207titan_intr_nop(int irq, void *dev_id, struct pt_regs *regs) 207titan_intr_nop(int irq, void *dev_id)
208{ 208{
209 /* 209 /*
210 * This is a NOP interrupt handler for the purposes of 210 * This is a NOP interrupt handler for the purposes of
@@ -243,7 +243,7 @@ titan_legacy_init_irq(void)
243} 243}
244 244
245void 245void
246titan_dispatch_irqs(u64 mask, struct pt_regs *regs) 246titan_dispatch_irqs(u64 mask)
247{ 247{
248 unsigned long vector; 248 unsigned long vector;
249 249
@@ -263,7 +263,7 @@ titan_dispatch_irqs(u64 mask, struct pt_regs *regs)
263 vector = 0x900 + (vector << 4); /* convert to SRM vector */ 263 vector = 0x900 + (vector << 4); /* convert to SRM vector */
264 264
265 /* dispatch it */ 265 /* dispatch it */
266 alpha_mv.device_interrupt(vector, regs); 266 alpha_mv.device_interrupt(vector);
267 } 267 }
268} 268}
269 269
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c
index 22c5798fe083..42c3eede4d09 100644
--- a/arch/alpha/kernel/sys_wildfire.c
+++ b/arch/alpha/kernel/sys_wildfire.c
@@ -234,7 +234,7 @@ wildfire_init_irq(void)
234} 234}
235 235
236static void 236static void
237wildfire_device_interrupt(unsigned long vector, struct pt_regs * regs) 237wildfire_device_interrupt(unsigned long vector)
238{ 238{
239 int irq; 239 int irq;
240 240
@@ -246,7 +246,7 @@ wildfire_device_interrupt(unsigned long vector, struct pt_regs * regs)
246 * bits 5-0: irq in PCA 246 * bits 5-0: irq in PCA
247 */ 247 */
248 248
249 handle_irq(irq, regs); 249 handle_irq(irq);
250 return; 250 return;
251} 251}
252 252
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 581ddcc22fc5..d7053eb4ffcf 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -57,6 +57,7 @@
57static int set_rtc_mmss(unsigned long); 57static int set_rtc_mmss(unsigned long);
58 58
59DEFINE_SPINLOCK(rtc_lock); 59DEFINE_SPINLOCK(rtc_lock);
60EXPORT_SYMBOL(rtc_lock);
60 61
61#define TICK_SIZE (tick_nsec / 1000) 62#define TICK_SIZE (tick_nsec / 1000)
62 63
@@ -104,7 +105,7 @@ unsigned long long sched_clock(void)
104 * timer_interrupt() needs to keep up the real-time clock, 105 * timer_interrupt() needs to keep up the real-time clock,
105 * as well as call the "do_timer()" routine every clocktick 106 * as well as call the "do_timer()" routine every clocktick
106 */ 107 */
107irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs) 108irqreturn_t timer_interrupt(int irq, void *dev)
108{ 109{
109 unsigned long delta; 110 unsigned long delta;
110 __u32 now; 111 __u32 now;
@@ -112,7 +113,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs)
112 113
113#ifndef CONFIG_SMP 114#ifndef CONFIG_SMP
114 /* Not SMP, do kernel PC profiling here. */ 115 /* Not SMP, do kernel PC profiling here. */
115 profile_tick(CPU_PROFILING, regs); 116 profile_tick(CPU_PROFILING);
116#endif 117#endif
117 118
118 write_seqlock(&xtime_lock); 119 write_seqlock(&xtime_lock);
@@ -132,7 +133,7 @@ irqreturn_t timer_interrupt(int irq, void *dev, struct pt_regs * regs)
132 while (nticks > 0) { 133 while (nticks > 0) {
133 do_timer(1); 134 do_timer(1);
134#ifndef CONFIG_SMP 135#ifndef CONFIG_SMP
135 update_process_times(user_mode(regs)); 136 update_process_times(user_mode(get_irq_regs()));
136#endif 137#endif
137 nticks--; 138 nticks--;
138 } 139 }
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index b826f58c6e72..e3e3806a6f25 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -13,12 +13,14 @@
13#include <linux/swap.h> 13#include <linux/swap.h>
14#include <linux/initrd.h> 14#include <linux/initrd.h>
15#include <linux/pfn.h> 15#include <linux/pfn.h>
16#include <linux/module.h>
16 17
17#include <asm/hwrpb.h> 18#include <asm/hwrpb.h>
18#include <asm/pgalloc.h> 19#include <asm/pgalloc.h>
19 20
20pg_data_t node_data[MAX_NUMNODES]; 21pg_data_t node_data[MAX_NUMNODES];
21bootmem_data_t node_bdata[MAX_NUMNODES]; 22bootmem_data_t node_bdata[MAX_NUMNODES];
23EXPORT_SYMBOL(node_data);
22 24
23#undef DEBUG_DISCONTIG 25#undef DEBUG_DISCONTIG
24#ifdef DEBUG_DISCONTIG 26#ifdef DEBUG_DISCONTIG
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 181ef1ead5b8..80a72c75214f 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -163,8 +163,7 @@ static struct locomo_dev_info locomo_devices[] = {
163#define LOCOMO_IRQ_LT_START (IRQ_LOCOMO_LT) 163#define LOCOMO_IRQ_LT_START (IRQ_LOCOMO_LT)
164#define LOCOMO_IRQ_SPI_START (IRQ_LOCOMO_SPI_RFR) 164#define LOCOMO_IRQ_SPI_START (IRQ_LOCOMO_SPI_RFR)
165 165
166static void locomo_handler(unsigned int irq, struct irqdesc *desc, 166static void locomo_handler(unsigned int irq, struct irqdesc *desc)
167 struct pt_regs *regs)
168{ 167{
169 int req, i; 168 int req, i;
170 struct irqdesc *d; 169 struct irqdesc *d;
@@ -182,7 +181,7 @@ static void locomo_handler(unsigned int irq, struct irqdesc *desc,
182 d = irq_desc + irq; 181 d = irq_desc + irq;
183 for (i = 0; i <= 3; i++, d++, irq++) { 182 for (i = 0; i <= 3; i++, d++, irq++) {
184 if (req & (0x0100 << i)) { 183 if (req & (0x0100 << i)) {
185 desc_handle_irq(irq, d, regs); 184 desc_handle_irq(irq, d);
186 } 185 }
187 186
188 } 187 }
@@ -218,15 +217,14 @@ static struct irq_chip locomo_chip = {
218 .unmask = locomo_unmask_irq, 217 .unmask = locomo_unmask_irq,
219}; 218};
220 219
221static void locomo_key_handler(unsigned int irq, struct irqdesc *desc, 220static void locomo_key_handler(unsigned int irq, struct irqdesc *desc)
222 struct pt_regs *regs)
223{ 221{
224 struct irqdesc *d; 222 struct irqdesc *d;
225 void __iomem *mapbase = get_irq_chipdata(irq); 223 void __iomem *mapbase = get_irq_chipdata(irq);
226 224
227 if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { 225 if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) {
228 d = irq_desc + LOCOMO_IRQ_KEY_START; 226 d = irq_desc + LOCOMO_IRQ_KEY_START;
229 desc_handle_irq(LOCOMO_IRQ_KEY_START, d, regs); 227 desc_handle_irq(LOCOMO_IRQ_KEY_START, d);
230 } 228 }
231} 229}
232 230
@@ -264,8 +262,7 @@ static struct irq_chip locomo_key_chip = {
264 .unmask = locomo_key_unmask_irq, 262 .unmask = locomo_key_unmask_irq,
265}; 263};
266 264
267static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, 265static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc)
268 struct pt_regs *regs)
269{ 266{
270 int req, i; 267 int req, i;
271 struct irqdesc *d; 268 struct irqdesc *d;
@@ -280,7 +277,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc,
280 d = irq_desc + LOCOMO_IRQ_GPIO_START; 277 d = irq_desc + LOCOMO_IRQ_GPIO_START;
281 for (i = 0; i <= 15; i++, irq++, d++) { 278 for (i = 0; i <= 15; i++, irq++, d++) {
282 if (req & (0x0001 << i)) { 279 if (req & (0x0001 << i)) {
283 desc_handle_irq(irq, d, regs); 280 desc_handle_irq(irq, d);
284 } 281 }
285 } 282 }
286 } 283 }
@@ -328,15 +325,14 @@ static struct irq_chip locomo_gpio_chip = {
328 .unmask = locomo_gpio_unmask_irq, 325 .unmask = locomo_gpio_unmask_irq,
329}; 326};
330 327
331static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc, 328static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc)
332 struct pt_regs *regs)
333{ 329{
334 struct irqdesc *d; 330 struct irqdesc *d;
335 void __iomem *mapbase = get_irq_chipdata(irq); 331 void __iomem *mapbase = get_irq_chipdata(irq);
336 332
337 if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { 333 if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) {
338 d = irq_desc + LOCOMO_IRQ_LT_START; 334 d = irq_desc + LOCOMO_IRQ_LT_START;
339 desc_handle_irq(LOCOMO_IRQ_LT_START, d, regs); 335 desc_handle_irq(LOCOMO_IRQ_LT_START, d);
340 } 336 }
341} 337}
342 338
@@ -374,8 +370,7 @@ static struct irq_chip locomo_lt_chip = {
374 .unmask = locomo_lt_unmask_irq, 370 .unmask = locomo_lt_unmask_irq,
375}; 371};
376 372
377static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, 373static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc)
378 struct pt_regs *regs)
379{ 374{
380 int req, i; 375 int req, i;
381 struct irqdesc *d; 376 struct irqdesc *d;
@@ -388,7 +383,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc,
388 383
389 for (i = 0; i <= 3; i++, irq++, d++) { 384 for (i = 0; i <= 3; i++, irq++, d++) {
390 if (req & (0x0001 << i)) { 385 if (req & (0x0001 << i)) {
391 desc_handle_irq(irq, d, regs); 386 desc_handle_irq(irq, d);
392 } 387 }
393 } 388 }
394 } 389 }
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 30046ad41ced..d5f72010a6f3 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -147,7 +147,7 @@ void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *ho
147 * will call us again if there are more interrupts to process. 147 * will call us again if there are more interrupts to process.
148 */ 148 */
149static void 149static void
150sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 150sa1111_irq_handler(unsigned int irq, struct irqdesc *desc)
151{ 151{
152 unsigned int stat0, stat1, i; 152 unsigned int stat0, stat1, i;
153 void __iomem *base = get_irq_data(irq); 153 void __iomem *base = get_irq_data(irq);
@@ -162,17 +162,17 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
162 sa1111_writel(stat1, base + SA1111_INTSTATCLR1); 162 sa1111_writel(stat1, base + SA1111_INTSTATCLR1);
163 163
164 if (stat0 == 0 && stat1 == 0) { 164 if (stat0 == 0 && stat1 == 0) {
165 do_bad_IRQ(irq, desc, regs); 165 do_bad_IRQ(irq, desc);
166 return; 166 return;
167 } 167 }
168 168
169 for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1) 169 for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1)
170 if (stat0 & 1) 170 if (stat0 & 1)
171 handle_edge_irq(i, irq_desc + i, regs); 171 handle_edge_irq(i, irq_desc + i);
172 172
173 for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1) 173 for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1)
174 if (stat1 & 1) 174 if (stat1 & 1)
175 handle_edge_irq(i, irq_desc + i, regs); 175 handle_edge_irq(i, irq_desc + i);
176 176
177 /* For level-based interrupts */ 177 /* For level-based interrupts */
178 desc->chip->unmask(irq); 178 desc->chip->unmask(irq);
diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c
index f412dedda684..605dedf96790 100644
--- a/arch/arm/common/sharpsl_pm.c
+++ b/arch/arm/common/sharpsl_pm.c
@@ -258,7 +258,7 @@ static void sharpsl_ac_timer(unsigned long data)
258} 258}
259 259
260 260
261irqreturn_t sharpsl_ac_isr(int irq, void *dev_id, struct pt_regs *fp) 261irqreturn_t sharpsl_ac_isr(int irq, void *dev_id)
262{ 262{
263 /* Delay the event slightly to debounce */ 263 /* Delay the event slightly to debounce */
264 /* Must be a smaller delay than the chrg_full_isr below */ 264 /* Must be a smaller delay than the chrg_full_isr below */
@@ -293,7 +293,7 @@ static void sharpsl_chrg_full_timer(unsigned long data)
293/* Charging Finished Interrupt (Not present on Corgi) */ 293/* Charging Finished Interrupt (Not present on Corgi) */
294/* Can trigger at the same time as an AC staus change so 294/* Can trigger at the same time as an AC staus change so
295 delay until after that has been processed */ 295 delay until after that has been processed */
296irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp) 296irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id)
297{ 297{
298 if (sharpsl_pm.flags & SHARPSL_SUSPENDED) 298 if (sharpsl_pm.flags & SHARPSL_SUSPENDED)
299 return IRQ_HANDLED; 299 return IRQ_HANDLED;
@@ -304,7 +304,7 @@ irqreturn_t sharpsl_chrg_full_isr(int irq, void *dev_id, struct pt_regs *fp)
304 return IRQ_HANDLED; 304 return IRQ_HANDLED;
305} 305}
306 306
307irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id, struct pt_regs *fp) 307irqreturn_t sharpsl_fatal_isr(int irq, void *dev_id)
308{ 308{
309 int is_fatal = 0; 309 int is_fatal = 0;
310 310
diff --git a/arch/arm/common/time-acorn.c b/arch/arm/common/time-acorn.c
index 3f60dd9aca80..34038eccbba9 100644
--- a/arch/arm/common/time-acorn.c
+++ b/arch/arm/common/time-acorn.c
@@ -67,10 +67,10 @@ void __init ioctime_init(void)
67} 67}
68 68
69static irqreturn_t 69static irqreturn_t
70ioc_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 70ioc_timer_interrupt(int irq, void *dev_id)
71{ 71{
72 write_seqlock(&xtime_lock); 72 write_seqlock(&xtime_lock);
73 timer_tick(regs); 73 timer_tick();
74 write_sequnlock(&xtime_lock); 74 write_sequnlock(&xtime_lock);
75 return IRQ_HANDLED; 75 return IRQ_HANDLED;
76} 76}
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index da69e660574b..4779f474f911 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -178,9 +178,3 @@ EXPORT_SYMBOL(_find_next_zero_bit_be);
178EXPORT_SYMBOL(_find_first_bit_be); 178EXPORT_SYMBOL(_find_first_bit_be);
179EXPORT_SYMBOL(_find_next_bit_be); 179EXPORT_SYMBOL(_find_next_bit_be);
180#endif 180#endif
181
182 /* syscalls */
183EXPORT_SYMBOL(sys_write);
184EXPORT_SYMBOL(sys_lseek);
185EXPORT_SYMBOL(sys_exit);
186EXPORT_SYMBOL(sys_wait4);
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index 3e14b1348c0b..b27513a0f11e 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -567,7 +567,7 @@ static void ecard_check_lockup(struct irqdesc *desc)
567} 567}
568 568
569static void 569static void
570ecard_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 570ecard_irq_handler(unsigned int irq, struct irqdesc *desc)
571{ 571{
572 ecard_t *ec; 572 ecard_t *ec;
573 int called = 0; 573 int called = 0;
@@ -586,7 +586,7 @@ ecard_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
586 586
587 if (pending) { 587 if (pending) {
588 struct irqdesc *d = irq_desc + ec->irq; 588 struct irqdesc *d = irq_desc + ec->irq;
589 desc_handle_irq(ec->irq, d, regs); 589 desc_handle_irq(ec->irq, d);
590 called ++; 590 called ++;
591 } 591 }
592 } 592 }
@@ -609,7 +609,7 @@ static unsigned char first_set[] =
609}; 609};
610 610
611static void 611static void
612ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 612ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc)
613{ 613{
614 const unsigned int statusmask = 15; 614 const unsigned int statusmask = 15;
615 unsigned int status; 615 unsigned int status;
@@ -633,7 +633,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
633 * Serial cards should go in 0/1, ethernet/scsi in 2/3 633 * Serial cards should go in 0/1, ethernet/scsi in 2/3
634 * otherwise you will lose serial data at high speeds! 634 * otherwise you will lose serial data at high speeds!
635 */ 635 */
636 desc_handle_irq(ec->irq, d, regs); 636 desc_handle_irq(ec->irq, d);
637 } else { 637 } else {
638 printk(KERN_WARNING "card%d: interrupt from unclaimed " 638 printk(KERN_WARNING "card%d: interrupt from unclaimed "
639 "card???\n", slot); 639 "card???\n", slot);
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 2e1bf830fe11..2c4ff1cbe334 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -111,6 +111,7 @@ static struct irq_desc bad_irq_desc = {
111 */ 111 */
112asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) 112asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
113{ 113{
114 struct pt_regs *old_regs = set_irq_regs(regs);
114 struct irqdesc *desc = irq_desc + irq; 115 struct irqdesc *desc = irq_desc + irq;
115 116
116 /* 117 /*
@@ -122,12 +123,13 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
122 123
123 irq_enter(); 124 irq_enter();
124 125
125 desc_handle_irq(irq, desc, regs); 126 desc_handle_irq(irq, desc);
126 127
127 /* AT91 specific workaround */ 128 /* AT91 specific workaround */
128 irq_finish(irq); 129 irq_finish(irq);
129 130
130 irq_exit(); 131 irq_exit();
132 set_irq_regs(old_regs);
131} 133}
132 134
133void set_irq_flags(unsigned int irq, unsigned int iflags) 135void set_irq_flags(unsigned int irq, unsigned int iflags)
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index b030320b17c7..c03cab5c4c79 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -27,6 +27,7 @@
27#include <linux/profile.h> 27#include <linux/profile.h>
28#include <linux/sysdev.h> 28#include <linux/sysdev.h>
29#include <linux/timer.h> 29#include <linux/timer.h>
30#include <linux/irq.h>
30 31
31#include <asm/leds.h> 32#include <asm/leds.h>
32#include <asm/thread_info.h> 33#include <asm/thread_info.h>
@@ -324,9 +325,10 @@ EXPORT_SYMBOL(restore_time_delta);
324/* 325/*
325 * Kernel system timer support. 326 * Kernel system timer support.
326 */ 327 */
327void timer_tick(struct pt_regs *regs) 328void timer_tick(void)
328{ 329{
329 profile_tick(CPU_PROFILING, regs); 330 struct pt_regs *regs = get_irq_regs();
331 profile_tick(CPU_PROFILING);
330 do_leds(); 332 do_leds();
331 do_set_rtc(); 333 do_set_rtc();
332 do_timer(1); 334 do_timer(1);
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c
index baa997c857dc..fe3d297d682d 100644
--- a/arch/arm/mach-aaec2000/core.c
+++ b/arch/arm/mach-aaec2000/core.c
@@ -127,12 +127,12 @@ static unsigned long aaec2000_gettimeoffset(void)
127 127
128/* We enter here with IRQs enabled */ 128/* We enter here with IRQs enabled */
129static irqreturn_t 129static irqreturn_t
130aaec2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 130aaec2000_timer_interrupt(int irq, void *dev_id)
131{ 131{
132 /* TODO: Check timer accuracy */ 132 /* TODO: Check timer accuracy */
133 write_seqlock(&xtime_lock); 133 write_seqlock(&xtime_lock);
134 134
135 timer_tick(regs); 135 timer_tick();
136 TIMER1_CLEAR = 1; 136 TIMER1_CLEAR = 1;
137 137
138 write_sequnlock(&xtime_lock); 138 write_sequnlock(&xtime_lock);
diff --git a/arch/arm/mach-at91rm9200/at91rm9200_time.c b/arch/arm/mach-at91rm9200/at91rm9200_time.c
index a92a8622c78a..07c9cea8961d 100644
--- a/arch/arm/mach-at91rm9200/at91rm9200_time.c
+++ b/arch/arm/mach-at91rm9200/at91rm9200_time.c
@@ -65,13 +65,13 @@ static unsigned long at91rm9200_gettimeoffset(void)
65/* 65/*
66 * IRQ handler for the timer. 66 * IRQ handler for the timer.
67 */ 67 */
68static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 68static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id)
69{ 69{
70 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */ 70 if (at91_sys_read(AT91_ST_SR) & AT91_ST_PITS) { /* This is a shared interrupt */
71 write_seqlock(&xtime_lock); 71 write_seqlock(&xtime_lock);
72 72
73 while (((read_CRTR() - last_crtr) & AT91_ST_ALMV) >= LATCH) { 73 while (((read_CRTR() - last_crtr) & AT91_ST_ALMV) >= LATCH) {
74 timer_tick(regs); 74 timer_tick();
75 last_crtr = (last_crtr + LATCH) & AT91_ST_ALMV; 75 last_crtr = (last_crtr + LATCH) & AT91_ST_ALMV;
76 } 76 }
77 77
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c
index 58c9bf5e9520..7467d644f0a3 100644
--- a/arch/arm/mach-at91rm9200/gpio.c
+++ b/arch/arm/mach-at91rm9200/gpio.c
@@ -332,7 +332,7 @@ static struct irq_chip gpio_irqchip = {
332 .set_wake = gpio_irq_set_wake, 332 .set_wake = gpio_irq_set_wake,
333}; 333};
334 334
335static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs *regs) 335static void gpio_irq_handler(unsigned irq, struct irqdesc *desc)
336{ 336{
337 unsigned pin; 337 unsigned pin;
338 struct irqdesc *gpio; 338 struct irqdesc *gpio;
@@ -363,7 +363,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
363 gpio_irq_mask(pin); 363 gpio_irq_mask(pin);
364 } 364 }
365 else 365 else
366 desc_handle_irq(pin, gpio, regs); 366 desc_handle_irq(pin, gpio);
367 } 367 }
368 pin++; 368 pin++;
369 gpio++; 369 gpio++;
diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c
index a071eac4a30a..428493dd4687 100644
--- a/arch/arm/mach-clps711x/time.c
+++ b/arch/arm/mach-clps711x/time.c
@@ -48,10 +48,10 @@ static unsigned long clps711x_gettimeoffset(void)
48 * IRQ handler for the timer 48 * IRQ handler for the timer
49 */ 49 */
50static irqreturn_t 50static irqreturn_t
51p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 51p720t_timer_interrupt(int irq, void *dev_id)
52{ 52{
53 write_seqlock(&xtime_lock); 53 write_seqlock(&xtime_lock);
54 timer_tick(regs); 54 timer_tick();
55 write_sequnlock(&xtime_lock); 55 write_sequnlock(&xtime_lock);
56 return IRQ_HANDLED; 56 return IRQ_HANDLED;
57} 57}
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c
index 92eaebdd5606..fb10cf252588 100644
--- a/arch/arm/mach-clps7500/core.c
+++ b/arch/arm/mach-clps7500/core.c
@@ -292,11 +292,11 @@ extern void ioctime_init(void);
292extern unsigned long ioc_timer_gettimeoffset(void); 292extern unsigned long ioc_timer_gettimeoffset(void);
293 293
294static irqreturn_t 294static irqreturn_t
295clps7500_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 295clps7500_timer_interrupt(int irq, void *dev_id)
296{ 296{
297 write_seqlock(&xtime_lock); 297 write_seqlock(&xtime_lock);
298 298
299 timer_tick(regs); 299 timer_tick();
300 300
301 /* Why not using do_leds interface?? */ 301 /* Why not using do_leds interface?? */
302 { 302 {
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 70dd12ef3c40..90103ab373a6 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -174,7 +174,7 @@ static unsigned long ebsa110_gettimeoffset(void)
174} 174}
175 175
176static irqreturn_t 176static irqreturn_t
177ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 177ebsa110_timer_interrupt(int irq, void *dev_id)
178{ 178{
179 u32 count; 179 u32 count;
180 180
@@ -190,7 +190,7 @@ ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
190 __raw_writeb(count & 0xff, PIT_T1); 190 __raw_writeb(count & 0xff, PIT_T1);
191 __raw_writeb(count >> 8, PIT_T1); 191 __raw_writeb(count >> 8, PIT_T1);
192 192
193 timer_tick(regs); 193 timer_tick();
194 194
195 write_sequnlock(&xtime_lock); 195 write_sequnlock(&xtime_lock);
196 196
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index a87a784b9201..e3fd1ab6adcc 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -97,7 +97,7 @@ static unsigned int last_jiffy_time;
97 97
98#define TIMER4_TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ) 98#define TIMER4_TICKS_PER_JIFFY ((CLOCK_TICK_RATE + (HZ/2)) / HZ)
99 99
100static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 100static int ep93xx_timer_interrupt(int irq, void *dev_id)
101{ 101{
102 write_seqlock(&xtime_lock); 102 write_seqlock(&xtime_lock);
103 103
@@ -106,7 +106,7 @@ static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
106 (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time) 106 (__raw_readl(EP93XX_TIMER4_VALUE_LOW) - last_jiffy_time)
107 >= TIMER4_TICKS_PER_JIFFY) { 107 >= TIMER4_TICKS_PER_JIFFY) {
108 last_jiffy_time += TIMER4_TICKS_PER_JIFFY; 108 last_jiffy_time += TIMER4_TICKS_PER_JIFFY;
109 timer_tick(regs); 109 timer_tick();
110 } 110 }
111 111
112 write_sequnlock(&xtime_lock); 112 write_sequnlock(&xtime_lock);
@@ -245,7 +245,7 @@ EXPORT_SYMBOL(gpio_line_set);
245 * EP93xx IRQ handling 245 * EP93xx IRQ handling
246 *************************************************************************/ 246 *************************************************************************/
247static void ep93xx_gpio_ab_irq_handler(unsigned int irq, 247static void ep93xx_gpio_ab_irq_handler(unsigned int irq,
248 struct irqdesc *desc, struct pt_regs *regs) 248 struct irqdesc *desc)
249{ 249{
250 unsigned char status; 250 unsigned char status;
251 int i; 251 int i;
@@ -254,7 +254,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq,
254 for (i = 0; i < 8; i++) { 254 for (i = 0; i < 8; i++) {
255 if (status & (1 << i)) { 255 if (status & (1 << i)) {
256 desc = irq_desc + IRQ_EP93XX_GPIO(0) + i; 256 desc = irq_desc + IRQ_EP93XX_GPIO(0) + i;
257 desc_handle_irq(IRQ_EP93XX_GPIO(0) + i, desc, regs); 257 desc_handle_irq(IRQ_EP93XX_GPIO(0) + i, desc);
258 } 258 }
259 } 259 }
260 260
@@ -262,7 +262,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq,
262 for (i = 0; i < 8; i++) { 262 for (i = 0; i < 8; i++) {
263 if (status & (1 << i)) { 263 if (status & (1 << i)) {
264 desc = irq_desc + IRQ_EP93XX_GPIO(8) + i; 264 desc = irq_desc + IRQ_EP93XX_GPIO(8) + i;
265 desc_handle_irq(IRQ_EP93XX_GPIO(8) + i, desc, regs); 265 desc_handle_irq(IRQ_EP93XX_GPIO(8) + i, desc);
266 } 266 }
267 } 267 }
268} 268}
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c
index 2af610811ca4..fa6be870c6c2 100644
--- a/arch/arm/mach-footbridge/dc21285-timer.c
+++ b/arch/arm/mach-footbridge/dc21285-timer.c
@@ -28,13 +28,13 @@ static unsigned long timer1_gettimeoffset (void)
28} 28}
29 29
30static irqreturn_t 30static irqreturn_t
31timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs) 31timer1_interrupt(int irq, void *dev_id)
32{ 32{
33 write_seqlock(&xtime_lock); 33 write_seqlock(&xtime_lock);
34 34
35 *CSR_TIMER1_CLR = 0; 35 *CSR_TIMER1_CLR = 0;
36 36
37 timer_tick(regs); 37 timer_tick();
38 38
39 write_sequnlock(&xtime_lock); 39 write_sequnlock(&xtime_lock);
40 40
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index a1ae49df5c3b..fa5d4976f514 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -154,7 +154,7 @@ static void dc21285_enable_error(unsigned long __data)
154/* 154/*
155 * Warn on PCI errors. 155 * Warn on PCI errors.
156 */ 156 */
157static irqreturn_t dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs) 157static irqreturn_t dc21285_abort_irq(int irq, void *dev_id)
158{ 158{
159 unsigned int cmd; 159 unsigned int cmd;
160 unsigned int status; 160 unsigned int status;
@@ -165,7 +165,7 @@ static irqreturn_t dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs
165 165
166 if (status & PCI_STATUS_REC_MASTER_ABORT) { 166 if (status & PCI_STATUS_REC_MASTER_ABORT) {
167 printk(KERN_DEBUG "PCI: master abort, pc=0x%08lx\n", 167 printk(KERN_DEBUG "PCI: master abort, pc=0x%08lx\n",
168 instruction_pointer(regs)); 168 instruction_pointer(get_irq_regs()));
169 cmd |= PCI_STATUS_REC_MASTER_ABORT << 16; 169 cmd |= PCI_STATUS_REC_MASTER_ABORT << 16;
170 } 170 }
171 171
@@ -184,7 +184,7 @@ static irqreturn_t dc21285_abort_irq(int irq, void *dev_id, struct pt_regs *regs
184 return IRQ_HANDLED; 184 return IRQ_HANDLED;
185} 185}
186 186
187static irqreturn_t dc21285_serr_irq(int irq, void *dev_id, struct pt_regs *regs) 187static irqreturn_t dc21285_serr_irq(int irq, void *dev_id)
188{ 188{
189 struct timer_list *timer = dev_id; 189 struct timer_list *timer = dev_id;
190 unsigned int cntl; 190 unsigned int cntl;
@@ -206,7 +206,7 @@ static irqreturn_t dc21285_serr_irq(int irq, void *dev_id, struct pt_regs *regs)
206 return IRQ_HANDLED; 206 return IRQ_HANDLED;
207} 207}
208 208
209static irqreturn_t dc21285_discard_irq(int irq, void *dev_id, struct pt_regs *regs) 209static irqreturn_t dc21285_discard_irq(int irq, void *dev_id)
210{ 210{
211 printk(KERN_DEBUG "PCI: discard timer expired\n"); 211 printk(KERN_DEBUG "PCI: discard timer expired\n");
212 *CSR_SA110_CNTL &= 0xffffde07; 212 *CSR_SA110_CNTL &= 0xffffde07;
@@ -214,7 +214,7 @@ static irqreturn_t dc21285_discard_irq(int irq, void *dev_id, struct pt_regs *re
214 return IRQ_HANDLED; 214 return IRQ_HANDLED;
215} 215}
216 216
217static irqreturn_t dc21285_dparity_irq(int irq, void *dev_id, struct pt_regs *regs) 217static irqreturn_t dc21285_dparity_irq(int irq, void *dev_id)
218{ 218{
219 unsigned int cmd; 219 unsigned int cmd;
220 220
@@ -228,7 +228,7 @@ static irqreturn_t dc21285_dparity_irq(int irq, void *dev_id, struct pt_regs *re
228 return IRQ_HANDLED; 228 return IRQ_HANDLED;
229} 229}
230 230
231static irqreturn_t dc21285_parity_irq(int irq, void *dev_id, struct pt_regs *regs) 231static irqreturn_t dc21285_parity_irq(int irq, void *dev_id)
232{ 232{
233 struct timer_list *timer = dev_id; 233 struct timer_list *timer = dev_id;
234 unsigned int cmd; 234 unsigned int cmd;
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c
index 87448c2d6baa..888dedd501b9 100644
--- a/arch/arm/mach-footbridge/isa-irq.c
+++ b/arch/arm/mach-footbridge/isa-irq.c
@@ -85,17 +85,17 @@ static struct irqchip isa_hi_chip = {
85}; 85};
86 86
87static void 87static void
88isa_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 88isa_irq_handler(unsigned int irq, struct irqdesc *desc)
89{ 89{
90 unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE; 90 unsigned int isa_irq = *(unsigned char *)PCIIACK_BASE;
91 91
92 if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) { 92 if (isa_irq < _ISA_IRQ(0) || isa_irq >= _ISA_IRQ(16)) {
93 do_bad_IRQ(isa_irq, desc, regs); 93 do_bad_IRQ(isa_irq, desc);
94 return; 94 return;
95 } 95 }
96 96
97 desc = irq_desc + isa_irq; 97 desc = irq_desc + isa_irq;
98 desc_handle_irq(isa_irq, desc, regs); 98 desc_handle_irq(isa_irq, desc);
99} 99}
100 100
101static struct irqaction irq_cascade = { 101static struct irqaction irq_cascade = {
diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c
index c4810a40c8e1..d884a3954fb4 100644
--- a/arch/arm/mach-footbridge/isa-timer.c
+++ b/arch/arm/mach-footbridge/isa-timer.c
@@ -62,10 +62,10 @@ static unsigned long isa_gettimeoffset(void)
62} 62}
63 63
64static irqreturn_t 64static irqreturn_t
65isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 65isa_timer_interrupt(int irq, void *dev_id)
66{ 66{
67 write_seqlock(&xtime_lock); 67 write_seqlock(&xtime_lock);
68 timer_tick(regs); 68 timer_tick();
69 write_sequnlock(&xtime_lock); 69 write_sequnlock(&xtime_lock);
70 return IRQ_HANDLED; 70 return IRQ_HANDLED;
71} 71}
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c
index c096b4569308..4719229a1a78 100644
--- a/arch/arm/mach-h720x/common.c
+++ b/arch/arm/mach-h720x/common.c
@@ -101,14 +101,14 @@ static void inline unmask_gpio_irq(u32 irq)
101 101
102static void 102static void
103h720x_gpio_handler(unsigned int mask, unsigned int irq, 103h720x_gpio_handler(unsigned int mask, unsigned int irq,
104 struct irqdesc *desc, struct pt_regs *regs) 104 struct irqdesc *desc)
105{ 105{
106 IRQDBG("%s irq: %d\n",__FUNCTION__,irq); 106 IRQDBG("%s irq: %d\n",__FUNCTION__,irq);
107 desc = irq_desc + irq; 107 desc = irq_desc + irq;
108 while (mask) { 108 while (mask) {
109 if (mask & 1) { 109 if (mask & 1) {
110 IRQDBG("handling irq %d\n", irq); 110 IRQDBG("handling irq %d\n", irq);
111 desc_handle_irq(irq, desc, regs); 111 desc_handle_irq(irq, desc);
112 } 112 }
113 irq++; 113 irq++;
114 desc++; 114 desc++;
@@ -117,63 +117,58 @@ h720x_gpio_handler(unsigned int mask, unsigned int irq,
117} 117}
118 118
119static void 119static void
120h720x_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 120h720x_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
121 struct pt_regs *regs)
122{ 121{
123 unsigned int mask, irq; 122 unsigned int mask, irq;
124 123
125 mask = CPU_REG(GPIO_A_VIRT,GPIO_STAT); 124 mask = CPU_REG(GPIO_A_VIRT,GPIO_STAT);
126 irq = IRQ_CHAINED_GPIOA(0); 125 irq = IRQ_CHAINED_GPIOA(0);
127 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); 126 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
128 h720x_gpio_handler(mask, irq, desc, regs); 127 h720x_gpio_handler(mask, irq, desc);
129} 128}
130 129
131static void 130static void
132h720x_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 131h720x_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
133 struct pt_regs *regs)
134{ 132{
135 unsigned int mask, irq; 133 unsigned int mask, irq;
136 mask = CPU_REG(GPIO_B_VIRT,GPIO_STAT); 134 mask = CPU_REG(GPIO_B_VIRT,GPIO_STAT);
137 irq = IRQ_CHAINED_GPIOB(0); 135 irq = IRQ_CHAINED_GPIOB(0);
138 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); 136 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
139 h720x_gpio_handler(mask, irq, desc, regs); 137 h720x_gpio_handler(mask, irq, desc);
140} 138}
141 139
142static void 140static void
143h720x_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 141h720x_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
144 struct pt_regs *regs)
145{ 142{
146 unsigned int mask, irq; 143 unsigned int mask, irq;
147 144
148 mask = CPU_REG(GPIO_C_VIRT,GPIO_STAT); 145 mask = CPU_REG(GPIO_C_VIRT,GPIO_STAT);
149 irq = IRQ_CHAINED_GPIOC(0); 146 irq = IRQ_CHAINED_GPIOC(0);
150 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); 147 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
151 h720x_gpio_handler(mask, irq, desc, regs); 148 h720x_gpio_handler(mask, irq, desc);
152} 149}
153 150
154static void 151static void
155h720x_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 152h720x_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
156 struct pt_regs *regs)
157{ 153{
158 unsigned int mask, irq; 154 unsigned int mask, irq;
159 155
160 mask = CPU_REG(GPIO_D_VIRT,GPIO_STAT); 156 mask = CPU_REG(GPIO_D_VIRT,GPIO_STAT);
161 irq = IRQ_CHAINED_GPIOD(0); 157 irq = IRQ_CHAINED_GPIOD(0);
162 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); 158 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
163 h720x_gpio_handler(mask, irq, desc, regs); 159 h720x_gpio_handler(mask, irq, desc);
164} 160}
165 161
166#ifdef CONFIG_CPU_H7202 162#ifdef CONFIG_CPU_H7202
167static void 163static void
168h720x_gpioe_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 164h720x_gpioe_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
169 struct pt_regs *regs)
170{ 165{
171 unsigned int mask, irq; 166 unsigned int mask, irq;
172 167
173 mask = CPU_REG(GPIO_E_VIRT,GPIO_STAT); 168 mask = CPU_REG(GPIO_E_VIRT,GPIO_STAT);
174 irq = IRQ_CHAINED_GPIOE(0); 169 irq = IRQ_CHAINED_GPIOE(0);
175 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); 170 IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq);
176 h720x_gpio_handler(mask, irq, desc, regs); 171 h720x_gpio_handler(mask, irq, desc);
177} 172}
178#endif 173#endif
179 174
diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c
index a9a8255a3a03..13f76bdb3d9d 100644
--- a/arch/arm/mach-h720x/cpu-h7201.c
+++ b/arch/arm/mach-h720x/cpu-h7201.c
@@ -27,12 +27,12 @@
27 * Timer interrupt handler 27 * Timer interrupt handler
28 */ 28 */
29static irqreturn_t 29static irqreturn_t
30h7201_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 30h7201_timer_interrupt(int irq, void *dev_id)
31{ 31{
32 write_seqlock(&xtime_lock); 32 write_seqlock(&xtime_lock);
33 33
34 CPU_REG (TIMER_VIRT, TIMER_TOPSTAT); 34 CPU_REG (TIMER_VIRT, TIMER_TOPSTAT);
35 timer_tick(regs); 35 timer_tick();
36 36
37 write_sequnlock(&xtime_lock); 37 write_sequnlock(&xtime_lock);
38 38
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c
index da678d163fd9..06fecaefd8dc 100644
--- a/arch/arm/mach-h720x/cpu-h7202.c
+++ b/arch/arm/mach-h720x/cpu-h7202.c
@@ -106,8 +106,7 @@ static struct platform_device *devices[] __initdata = {
106 * we have to handle all timer interrupts in one place. 106 * we have to handle all timer interrupts in one place.
107 */ 107 */
108static void 108static void
109h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 109h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
110 struct pt_regs *regs)
111{ 110{
112 unsigned int mask, irq; 111 unsigned int mask, irq;
113 112
@@ -115,7 +114,7 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
115 114
116 if ( mask & TSTAT_T0INT ) { 115 if ( mask & TSTAT_T0INT ) {
117 write_seqlock(&xtime_lock); 116 write_seqlock(&xtime_lock);
118 timer_tick(regs); 117 timer_tick();
119 write_sequnlock(&xtime_lock); 118 write_sequnlock(&xtime_lock);
120 if( mask == TSTAT_T0INT ) 119 if( mask == TSTAT_T0INT )
121 return; 120 return;
@@ -126,7 +125,7 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
126 desc = irq_desc + irq; 125 desc = irq_desc + irq;
127 while (mask) { 126 while (mask) {
128 if (mask & 1) 127 if (mask & 1)
129 desc_handle_irq(irq, desc, regs); 128 desc_handle_irq(irq, desc);
130 irq++; 129 irq++;
131 desc++; 130 desc++;
132 mask >>= 1; 131 mask >>= 1;
@@ -137,9 +136,9 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
137 * Timer interrupt handler 136 * Timer interrupt handler
138 */ 137 */
139static irqreturn_t 138static irqreturn_t
140h7202_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 139h7202_timer_interrupt(int irq, void *dev_id)
141{ 140{
142 h7202_timerx_demux_handler(0, NULL, regs); 141 h7202_timerx_demux_handler(0, NULL);
143 return IRQ_HANDLED; 142 return IRQ_HANDLED;
144} 143}
145 144
diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c
index 36578871ecc8..6d50d85a618c 100644
--- a/arch/arm/mach-imx/dma.c
+++ b/arch/arm/mach-imx/dma.c
@@ -279,8 +279,8 @@ imx_dma_setup_sg(imx_dmach_t dma_ch,
279 */ 279 */
280int 280int
281imx_dma_setup_handlers(imx_dmach_t dma_ch, 281imx_dma_setup_handlers(imx_dmach_t dma_ch,
282 void (*irq_handler) (int, void *, struct pt_regs *), 282 void (*irq_handler) (int, void *),
283 void (*err_handler) (int, void *, struct pt_regs *, int), 283 void (*err_handler) (int, void *, int),
284 void *data) 284 void *data)
285{ 285{
286 struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch]; 286 struct imx_dma_channel *imxdma = &imx_dma_channels[dma_ch];
@@ -461,7 +461,7 @@ imx_dma_request_by_prio(imx_dmach_t * pdma_ch, const char *name,
461 return -ENODEV; 461 return -ENODEV;
462} 462}
463 463
464static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs) 464static irqreturn_t dma_err_handler(int irq, void *dev_id)
465{ 465{
466 int i, disr = DISR; 466 int i, disr = DISR;
467 struct imx_dma_channel *channel; 467 struct imx_dma_channel *channel;
@@ -500,7 +500,7 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs)
500 /*imx_dma_channels[i].sg = NULL;*/ 500 /*imx_dma_channels[i].sg = NULL;*/
501 501
502 if (channel->name && channel->err_handler) { 502 if (channel->name && channel->err_handler) {
503 channel->err_handler(i, channel->data, regs, errcode); 503 channel->err_handler(i, channel->data, errcode);
504 continue; 504 continue;
505 } 505 }
506 506
@@ -517,7 +517,7 @@ static irqreturn_t dma_err_handler(int irq, void *dev_id, struct pt_regs *regs)
517 return IRQ_HANDLED; 517 return IRQ_HANDLED;
518} 518}
519 519
520static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) 520static irqreturn_t dma_irq_handler(int irq, void *dev_id)
521{ 521{
522 int i, disr = DISR; 522 int i, disr = DISR;
523 523
@@ -536,7 +536,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
536 } else { 536 } else {
537 if (channel->irq_handler) 537 if (channel->irq_handler)
538 channel->irq_handler(i, 538 channel->irq_handler(i,
539 channel->data, regs); 539 channel->data);
540 } 540 }
541 } else { 541 } else {
542 /* 542 /*
diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c
index 2688bd82c2a2..368b13b058ab 100644
--- a/arch/arm/mach-imx/irq.c
+++ b/arch/arm/mach-imx/irq.c
@@ -146,13 +146,13 @@ imx_gpio_unmask_irq(unsigned int irq)
146 146
147static void 147static void
148imx_gpio_handler(unsigned int mask, unsigned int irq, 148imx_gpio_handler(unsigned int mask, unsigned int irq,
149 struct irqdesc *desc, struct pt_regs *regs) 149 struct irqdesc *desc)
150{ 150{
151 desc = irq_desc + irq; 151 desc = irq_desc + irq;
152 while (mask) { 152 while (mask) {
153 if (mask & 1) { 153 if (mask & 1) {
154 DEBUG_IRQ("handling irq %d\n", irq); 154 DEBUG_IRQ("handling irq %d\n", irq);
155 desc_handle_irq(irq, desc, regs); 155 desc_handle_irq(irq, desc);
156 } 156 }
157 irq++; 157 irq++;
158 desc++; 158 desc++;
@@ -161,47 +161,43 @@ imx_gpio_handler(unsigned int mask, unsigned int irq,
161} 161}
162 162
163static void 163static void
164imx_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 164imx_gpioa_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
165 struct pt_regs *regs)
166{ 165{
167 unsigned int mask, irq; 166 unsigned int mask, irq;
168 167
169 mask = ISR(0); 168 mask = ISR(0);
170 irq = IRQ_GPIOA(0); 169 irq = IRQ_GPIOA(0);
171 imx_gpio_handler(mask, irq, desc, regs); 170 imx_gpio_handler(mask, irq, desc);
172} 171}
173 172
174static void 173static void
175imx_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 174imx_gpiob_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
176 struct pt_regs *regs)
177{ 175{
178 unsigned int mask, irq; 176 unsigned int mask, irq;
179 177
180 mask = ISR(1); 178 mask = ISR(1);
181 irq = IRQ_GPIOB(0); 179 irq = IRQ_GPIOB(0);
182 imx_gpio_handler(mask, irq, desc, regs); 180 imx_gpio_handler(mask, irq, desc);
183} 181}
184 182
185static void 183static void
186imx_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 184imx_gpioc_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
187 struct pt_regs *regs)
188{ 185{
189 unsigned int mask, irq; 186 unsigned int mask, irq;
190 187
191 mask = ISR(2); 188 mask = ISR(2);
192 irq = IRQ_GPIOC(0); 189 irq = IRQ_GPIOC(0);
193 imx_gpio_handler(mask, irq, desc, regs); 190 imx_gpio_handler(mask, irq, desc);
194} 191}
195 192
196static void 193static void
197imx_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 194imx_gpiod_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
198 struct pt_regs *regs)
199{ 195{
200 unsigned int mask, irq; 196 unsigned int mask, irq;
201 197
202 mask = ISR(3); 198 mask = ISR(3);
203 irq = IRQ_GPIOD(0); 199 irq = IRQ_GPIOD(0);
204 imx_gpio_handler(mask, irq, desc, regs); 200 imx_gpio_handler(mask, irq, desc);
205} 201}
206 202
207static struct irq_chip imx_internal_chip = { 203static struct irq_chip imx_internal_chip = {
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 6ed7523c65bb..8ae4a2c5066f 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -56,7 +56,7 @@ static unsigned long imx_gettimeoffset(void)
56 * IRQ handler for the timer 56 * IRQ handler for the timer
57 */ 57 */
58static irqreturn_t 58static irqreturn_t
59imx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 59imx_timer_interrupt(int irq, void *dev_id)
60{ 60{
61 write_seqlock(&xtime_lock); 61 write_seqlock(&xtime_lock);
62 62
@@ -64,7 +64,7 @@ imx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
64 if (IMX_TSTAT(TIMER_BASE)) 64 if (IMX_TSTAT(TIMER_BASE))
65 IMX_TSTAT(TIMER_BASE) = 0; 65 IMX_TSTAT(TIMER_BASE) = 0;
66 66
67 timer_tick(regs); 67 timer_tick();
68 write_sequnlock(&xtime_lock); 68 write_sequnlock(&xtime_lock);
69 69
70 return IRQ_HANDLED; 70 return IRQ_HANDLED;
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 42021fdfa0c6..8d880cb9ba39 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -248,7 +248,7 @@ unsigned long integrator_gettimeoffset(void)
248 * IRQ handler for the timer 248 * IRQ handler for the timer
249 */ 249 */
250static irqreturn_t 250static irqreturn_t
251integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 251integrator_timer_interrupt(int irq, void *dev_id)
252{ 252{
253 write_seqlock(&xtime_lock); 253 write_seqlock(&xtime_lock);
254 254
@@ -262,7 +262,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
262 * primary CPU 262 * primary CPU
263 */ 263 */
264 if (hard_smp_processor_id() == 0) { 264 if (hard_smp_processor_id() == 0) {
265 timer_tick(regs); 265 timer_tick();
266#ifdef CONFIG_SMP 266#ifdef CONFIG_SMP
267 smp_send_timer(); 267 smp_send_timer();
268#endif 268#endif
@@ -272,7 +272,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
272 /* 272 /*
273 * this is the ARM equivalent of the APIC timer interrupt 273 * this is the ARM equivalent of the APIC timer interrupt
274 */ 274 */
275 update_process_times(user_mode(regs)); 275 update_process_times(user_mode(get_irq_regs()));
276#endif /* CONFIG_SMP */ 276#endif /* CONFIG_SMP */
277 277
278 write_sequnlock(&xtime_lock); 278 write_sequnlock(&xtime_lock);
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c
index 678b6ba2b463..771b65bffe69 100644
--- a/arch/arm/mach-integrator/integrator_cp.c
+++ b/arch/arm/mach-integrator/integrator_cp.c
@@ -202,12 +202,12 @@ static struct irq_chip sic_chip = {
202}; 202};
203 203
204static void 204static void
205sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 205sic_handle_irq(unsigned int irq, struct irqdesc *desc)
206{ 206{
207 unsigned long status = sic_readl(INTCP_VA_SIC_BASE + IRQ_STATUS); 207 unsigned long status = sic_readl(INTCP_VA_SIC_BASE + IRQ_STATUS);
208 208
209 if (status == 0) { 209 if (status == 0) {
210 do_bad_IRQ(irq, desc, regs); 210 do_bad_IRQ(irq, desc);
211 return; 211 return;
212 } 212 }
213 213
@@ -218,7 +218,7 @@ sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
218 irq += IRQ_SIC_START; 218 irq += IRQ_SIC_START;
219 219
220 desc = irq_desc + irq; 220 desc = irq_desc + irq;
221 desc_handle_irq(irq, desc, regs); 221 desc_handle_irq(irq, desc);
222 } while (status); 222 } while (status);
223} 223}
224 224
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index 4418f6d7572d..fb8c6d97b22b 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -440,9 +440,10 @@ v3_pci_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
440 return 1; 440 return 1;
441} 441}
442 442
443static irqreturn_t v3_irq(int irq, void *devid, struct pt_regs *regs) 443static irqreturn_t v3_irq(int irq, void *devid)
444{ 444{
445#ifdef CONFIG_DEBUG_LL 445#ifdef CONFIG_DEBUG_LL
446 struct pt_regs *regs = get_irq_regs();
446 unsigned long pc = instruction_pointer(regs); 447 unsigned long pc = instruction_pointer(regs);
447 unsigned long instr = *(unsigned long *)pc; 448 unsigned long instr = *(unsigned long *)pc;
448 char buf[128]; 449 char buf[128];
diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c
index ee49cf790dab..5278f589fcee 100644
--- a/arch/arm/mach-integrator/time.c
+++ b/arch/arm/mach-integrator/time.c
@@ -96,8 +96,7 @@ static struct rtc_ops rtc_ops = {
96 .set_alarm = integrator_rtc_set_alarm, 96 .set_alarm = integrator_rtc_set_alarm,
97}; 97};
98 98
99static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id, 99static irqreturn_t arm_rtc_interrupt(int irq, void *dev_id)
100 struct pt_regs *regs)
101{ 100{
102 writel(0, rtc_base + RTC_EOI); 101 writel(0, rtc_base + RTC_EOI);
103 return IRQ_HANDLED; 102 return IRQ_HANDLED;
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index 7f91f689a041..22c98e9dad28 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -204,7 +204,7 @@ unsigned long ixp2000_gettimeoffset (void)
204 return offset / ticks_per_usec; 204 return offset / ticks_per_usec;
205} 205}
206 206
207static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 207static int ixp2000_timer_interrupt(int irq, void *dev_id)
208{ 208{
209 write_seqlock(&xtime_lock); 209 write_seqlock(&xtime_lock);
210 210
@@ -213,7 +213,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
213 213
214 while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr) 214 while ((signed long)(next_jiffy_time - *missing_jiffy_timer_csr)
215 >= ticks_per_jiffy) { 215 >= ticks_per_jiffy) {
216 timer_tick(regs); 216 timer_tick();
217 next_jiffy_time -= ticks_per_jiffy; 217 next_jiffy_time -= ticks_per_jiffy;
218 } 218 }
219 219
@@ -308,7 +308,7 @@ EXPORT_SYMBOL(gpio_line_config);
308/************************************************************************* 308/*************************************************************************
309 * IRQ handling IXP2000 309 * IRQ handling IXP2000
310 *************************************************************************/ 310 *************************************************************************/
311static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 311static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc)
312{ 312{
313 int i; 313 int i;
314 unsigned long status = *IXP2000_GPIO_INST; 314 unsigned long status = *IXP2000_GPIO_INST;
@@ -316,7 +316,7 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc, str
316 for (i = 0; i <= 7; i++) { 316 for (i = 0; i <= 7; i++) {
317 if (status & (1<<i)) { 317 if (status & (1<<i)) {
318 desc = irq_desc + i + IRQ_IXP2000_GPIO0; 318 desc = irq_desc + i + IRQ_IXP2000_GPIO0;
319 desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc, regs); 319 desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc);
320 } 320 }
321 } 321 }
322} 322}
@@ -401,7 +401,7 @@ static void ixp2000_pci_irq_unmask(unsigned int irq)
401/* 401/*
402 * Error interrupts. These are used extensively by the microengine drivers 402 * Error interrupts. These are used extensively by the microengine drivers
403 */ 403 */
404static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 404static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc)
405{ 405{
406 int i; 406 int i;
407 unsigned long status = *IXP2000_IRQ_ERR_STATUS; 407 unsigned long status = *IXP2000_IRQ_ERR_STATUS;
@@ -409,7 +409,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, str
409 for(i = 31; i >= 0; i--) { 409 for(i = 31; i >= 0; i--) {
410 if(status & (1 << i)) { 410 if(status & (1 << i)) {
411 desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i; 411 desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i;
412 desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs); 412 desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc);
413 } 413 }
414 } 414 }
415} 415}
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index 40eef8b36740..af48cb52dfc4 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -106,7 +106,7 @@ static void ixdp2x00_irq_unmask(unsigned int irq)
106 ixp2000_release_slowport(&old_cfg); 106 ixp2000_release_slowport(&old_cfg);
107} 107}
108 108
109static void ixdp2x00_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 109static void ixdp2x00_irq_handler(unsigned int irq, struct irqdesc *desc)
110{ 110{
111 volatile u32 ex_interrupt = 0; 111 volatile u32 ex_interrupt = 0;
112 static struct slowport_cfg old_cfg; 112 static struct slowport_cfg old_cfg;
@@ -132,7 +132,7 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irqdesc *desc, struct
132 struct irqdesc *cpld_desc; 132 struct irqdesc *cpld_desc;
133 int cpld_irq = IXP2000_BOARD_IRQ(0) + i; 133 int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
134 cpld_desc = irq_desc + cpld_irq; 134 cpld_desc = irq_desc + cpld_irq;
135 desc_handle_irq(cpld_irq, cpld_desc, regs); 135 desc_handle_irq(cpld_irq, cpld_desc);
136 } 136 }
137 } 137 }
138 138
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index 7f42366f60d1..9ccae9e63f70 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -63,7 +63,7 @@ static void ixdp2x01_irq_unmask(unsigned int irq)
63 63
64static u32 valid_irq_mask; 64static u32 valid_irq_mask;
65 65
66static void ixdp2x01_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 66static void ixdp2x01_irq_handler(unsigned int irq, struct irqdesc *desc)
67{ 67{
68 u32 ex_interrupt; 68 u32 ex_interrupt;
69 int i; 69 int i;
@@ -82,7 +82,7 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irqdesc *desc, struct
82 struct irqdesc *cpld_desc; 82 struct irqdesc *cpld_desc;
83 int cpld_irq = IXP2000_BOARD_IRQ(0) + i; 83 int cpld_irq = IXP2000_BOARD_IRQ(0) + i;
84 cpld_desc = irq_desc + cpld_irq; 84 cpld_desc = irq_desc + cpld_irq;
85 desc_handle_irq(cpld_irq, cpld_desc, regs); 85 desc_handle_irq(cpld_irq, cpld_desc);
86 } 86 }
87 } 87 }
88 88
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
index 566a07821c77..a704a1820048 100644
--- a/arch/arm/mach-ixp23xx/core.c
+++ b/arch/arm/mach-ixp23xx/core.c
@@ -251,7 +251,7 @@ static void ixp23xx_pci_irq_unmask(unsigned int irq)
251/* 251/*
252 * TODO: Should this just be done at ASM level? 252 * TODO: Should this just be done at ASM level?
253 */ 253 */
254static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 254static void pci_handler(unsigned int irq, struct irqdesc *desc)
255{ 255{
256 u32 pci_interrupt; 256 u32 pci_interrupt;
257 unsigned int irqno; 257 unsigned int irqno;
@@ -271,7 +271,7 @@ static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *
271 } 271 }
272 272
273 int_desc = irq_desc + irqno; 273 int_desc = irq_desc + irqno;
274 desc_handle_irq(irqno, int_desc, regs); 274 desc_handle_irq(irqno, int_desc);
275 275
276 desc->chip->unmask(irq); 276 desc->chip->unmask(irq);
277} 277}
@@ -348,12 +348,12 @@ ixp23xx_gettimeoffset(void)
348} 348}
349 349
350static irqreturn_t 350static irqreturn_t
351ixp23xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 351ixp23xx_timer_interrupt(int irq, void *dev_id)
352{ 352{
353 /* Clear Pending Interrupt by writing '1' to it */ 353 /* Clear Pending Interrupt by writing '1' to it */
354 *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND; 354 *IXP23XX_TIMER_STATUS = IXP23XX_TIMER1_INT_PEND;
355 while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) { 355 while ((signed long)(*IXP23XX_TIMER_CONT - next_jiffy_time) >= LATCH) {
356 timer_tick(regs); 356 timer_tick();
357 next_jiffy_time += LATCH; 357 next_jiffy_time += LATCH;
358 } 358 }
359 359
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
index 37a32e6bcca2..b6ab0e8bb5e8 100644
--- a/arch/arm/mach-ixp23xx/ixdp2351.c
+++ b/arch/arm/mach-ixp23xx/ixdp2351.c
@@ -60,7 +60,7 @@ static void ixdp2351_inta_unmask(unsigned int irq)
60 *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(irq); 60 *IXDP2351_CPLD_INTA_MASK_CLR_REG = IXDP2351_INTA_IRQ_MASK(irq);
61} 61}
62 62
63static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 63static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc)
64{ 64{
65 u16 ex_interrupt = 65 u16 ex_interrupt =
66 *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID; 66 *IXDP2351_CPLD_INTA_STAT_REG & IXDP2351_INTA_IRQ_VALID;
@@ -74,7 +74,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct
74 int cpld_irq = 74 int cpld_irq =
75 IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); 75 IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i);
76 cpld_desc = irq_desc + cpld_irq; 76 cpld_desc = irq_desc + cpld_irq;
77 desc_handle_irq(cpld_irq, cpld_desc, regs); 77 desc_handle_irq(cpld_irq, cpld_desc);
78 } 78 }
79 } 79 }
80 80
@@ -97,7 +97,7 @@ static void ixdp2351_intb_unmask(unsigned int irq)
97 *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(irq); 97 *IXDP2351_CPLD_INTB_MASK_CLR_REG = IXDP2351_INTB_IRQ_MASK(irq);
98} 98}
99 99
100static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 100static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc)
101{ 101{
102 u16 ex_interrupt = 102 u16 ex_interrupt =
103 *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID; 103 *IXDP2351_CPLD_INTB_STAT_REG & IXDP2351_INTB_IRQ_VALID;
@@ -111,7 +111,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct
111 int cpld_irq = 111 int cpld_irq =
112 IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); 112 IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i);
113 cpld_desc = irq_desc + cpld_irq; 113 cpld_desc = irq_desc + cpld_irq;
114 desc_handle_irq(cpld_irq, cpld_desc, regs); 114 desc_handle_irq(cpld_irq, cpld_desc);
115 } 115 }
116 } 116 }
117 117
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index 35dd8b3824b0..c7513f6eb50c 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -256,7 +256,7 @@ static unsigned volatile last_jiffy_time;
256 256
257#define CLOCK_TICKS_PER_USEC ((CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC) 257#define CLOCK_TICKS_PER_USEC ((CLOCK_TICK_RATE + USEC_PER_SEC/2) / USEC_PER_SEC)
258 258
259static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 259static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id)
260{ 260{
261 write_seqlock(&xtime_lock); 261 write_seqlock(&xtime_lock);
262 262
@@ -267,7 +267,7 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs
267 * Catch up with the real idea of time 267 * Catch up with the real idea of time
268 */ 268 */
269 while ((signed long)(*IXP4XX_OSTS - last_jiffy_time) >= LATCH) { 269 while ((signed long)(*IXP4XX_OSTS - last_jiffy_time) >= LATCH) {
270 timer_tick(regs); 270 timer_tick();
271 last_jiffy_time += LATCH; 271 last_jiffy_time += LATCH;
272 } 272 }
273 273
diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c
index 81ffcae1f56e..29aa98d3a7fa 100644
--- a/arch/arm/mach-ixp4xx/nas100d-power.c
+++ b/arch/arm/mach-ixp4xx/nas100d-power.c
@@ -24,7 +24,7 @@
24 24
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
26 26
27static irqreturn_t nas100d_reset_handler(int irq, void *dev_id, struct pt_regs *regs) 27static irqreturn_t nas100d_reset_handler(int irq, void *dev_id)
28{ 28{
29 /* Signal init to do the ctrlaltdel action, this will bypass init if 29 /* Signal init to do the ctrlaltdel action, this will bypass init if
30 * it hasn't started and do a kernel_restart. 30 * it hasn't started and do a kernel_restart.
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c
index a29b3b2b61b6..acd71e9c38a7 100644
--- a/arch/arm/mach-ixp4xx/nslu2-power.c
+++ b/arch/arm/mach-ixp4xx/nslu2-power.c
@@ -25,7 +25,7 @@
25 25
26#include <asm/mach-types.h> 26#include <asm/mach-types.h>
27 27
28static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *regs) 28static irqreturn_t nslu2_power_handler(int irq, void *dev_id)
29{ 29{
30 /* Signal init to do the ctrlaltdel action, this will bypass init if 30 /* Signal init to do the ctrlaltdel action, this will bypass init if
31 * it hasn't started and do a kernel_restart. 31 * it hasn't started and do a kernel_restart.
@@ -35,7 +35,7 @@ static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *re
35 return IRQ_HANDLED; 35 return IRQ_HANDLED;
36} 36}
37 37
38static irqreturn_t nslu2_reset_handler(int irq, void *dev_id, struct pt_regs *regs) 38static irqreturn_t nslu2_reset_handler(int irq, void *dev_id)
39{ 39{
40 /* This is the paper-clip reset, it shuts the machine down directly. 40 /* This is the paper-clip reset, it shuts the machine down directly.
41 */ 41 */
diff --git a/arch/arm/mach-lh7a40x/arch-kev7a400.c b/arch/arm/mach-lh7a40x/arch-kev7a400.c
index 4f2ab48800a5..15fbcc911fe7 100644
--- a/arch/arm/mach-lh7a40x/arch-kev7a400.c
+++ b/arch/arm/mach-lh7a40x/arch-kev7a400.c
@@ -71,14 +71,13 @@ static struct irq_chip kev7a400_cpld_chip = {
71}; 71};
72 72
73 73
74static void kev7a400_cpld_handler (unsigned int irq, struct irqdesc *desc, 74static void kev7a400_cpld_handler (unsigned int irq, struct irqdesc *desc)
75 struct pt_regs *regs)
76{ 75{
77 u32 mask = CPLD_LATCHED_INTS; 76 u32 mask = CPLD_LATCHED_INTS;
78 irq = IRQ_KEV7A400_CPLD; 77 irq = IRQ_KEV7A400_CPLD;
79 for (; mask; mask >>= 1, ++irq) { 78 for (; mask; mask >>= 1, ++irq) {
80 if (mask & 1) 79 if (mask & 1)
81 desc[irq].handle (irq, desc, regs); 80 desc[irq].handle (irq, desc);
82 } 81 }
83} 82}
84 83
diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
index a21b12f06c6b..8441e0a156cb 100644
--- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
+++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
@@ -207,8 +207,7 @@ static struct irq_chip lpd7a40x_cpld_chip = {
207 .unmask = lh7a40x_unmask_cpld_irq, 207 .unmask = lh7a40x_unmask_cpld_irq,
208}; 208};
209 209
210static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, 210static void lpd7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc)
211 struct pt_regs *regs)
212{ 211{
213 unsigned int mask = CPLD_INTERRUPTS; 212 unsigned int mask = CPLD_INTERRUPTS;
214 213
diff --git a/arch/arm/mach-lh7a40x/irq-kev7a400.c b/arch/arm/mach-lh7a40x/irq-kev7a400.c
index f9b3fe9174a5..646071334b8f 100644
--- a/arch/arm/mach-lh7a40x/irq-kev7a400.c
+++ b/arch/arm/mach-lh7a40x/irq-kev7a400.c
@@ -51,14 +51,13 @@ irq_chip lh7a400_cpld_chip = {
51}; 51};
52 52
53static void 53static void
54lh7a400_cpld_handler (unsigned int irq, struct irqdesc *desc, 54lh7a400_cpld_handler (unsigned int irq, struct irqdesc *desc)
55 struct pt_regs *regs)
56{ 55{
57 u32 mask = CPLD_LATCHED_INTS; 56 u32 mask = CPLD_LATCHED_INTS;
58 irq = IRQ_KEV_7A400_CPLD; 57 irq = IRQ_KEV_7A400_CPLD;
59 for (; mask; mask >>= 1, ++irq) { 58 for (; mask; mask >>= 1, ++irq) {
60 if (mask & 1) 59 if (mask & 1)
61 desc[irq].handle (irq, desc, regs); 60 desc[irq].handle (irq, desc);
62 } 61 }
63} 62}
64 63
diff --git a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
index d6055dde6468..b20376804bbb 100644
--- a/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
+++ b/arch/arm/mach-lh7a40x/irq-lpd7a40x.c
@@ -57,8 +57,7 @@ static struct irq_chip lh7a40x_cpld_chip = {
57 .unmask = lh7a40x_unmask_cpld_irq, 57 .unmask = lh7a40x_unmask_cpld_irq,
58}; 58};
59 59
60static void lh7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc, 60static void lh7a40x_cpld_handler (unsigned int irq, struct irqdesc *desc)
61 struct pt_regs *regs)
62{ 61{
63 unsigned int mask = CPLD_INTERRUPTS; 62 unsigned int mask = CPLD_INTERRUPTS;
64 63
diff --git a/arch/arm/mach-lh7a40x/time.c b/arch/arm/mach-lh7a40x/time.c
index ad5652e01507..bef3c4b68d3b 100644
--- a/arch/arm/mach-lh7a40x/time.c
+++ b/arch/arm/mach-lh7a40x/time.c
@@ -39,12 +39,12 @@
39#endif 39#endif
40 40
41static irqreturn_t 41static irqreturn_t
42lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 42lh7a40x_timer_interrupt(int irq, void *dev_id)
43{ 43{
44 write_seqlock(&xtime_lock); 44 write_seqlock(&xtime_lock);
45 45
46 TIMER_EOI = 0; 46 TIMER_EOI = 0;
47 timer_tick(regs); 47 timer_tick();
48 48
49 write_sequnlock(&xtime_lock); 49 write_sequnlock(&xtime_lock);
50 50
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c
index af0b13534cfd..edbbbdc3b06b 100644
--- a/arch/arm/mach-netx/generic.c
+++ b/arch/arm/mach-netx/generic.c
@@ -69,8 +69,7 @@ static struct platform_device *devices[] __initdata = {
69#endif 69#endif
70 70
71static void 71static void
72netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc, 72netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc)
73 struct pt_regs *regs)
74{ 73{
75 unsigned int irq = NETX_IRQ_HIF_CHAINED(0); 74 unsigned int irq = NETX_IRQ_HIF_CHAINED(0);
76 unsigned int stat; 75 unsigned int stat;
@@ -83,7 +82,7 @@ netx_hif_demux_handler(unsigned int irq_unused, struct irqdesc *desc,
83 while (stat) { 82 while (stat) {
84 if (stat & 1) { 83 if (stat & 1) {
85 DEBUG_IRQ("handling irq %d\n", irq); 84 DEBUG_IRQ("handling irq %d\n", irq);
86 desc_handle_irq(irq, desc, regs); 85 desc_handle_irq(irq, desc);
87 } 86 }
88 irq++; 87 irq++;
89 desc++; 88 desc++;
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index 6d72c81b7d9f..0993336c0b55 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -38,11 +38,11 @@ static unsigned long netx_gettimeoffset(void)
38 * IRQ handler for the timer 38 * IRQ handler for the timer
39 */ 39 */
40static irqreturn_t 40static irqreturn_t
41netx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 41netx_timer_interrupt(int irq, void *dev_id)
42{ 42{
43 write_seqlock(&xtime_lock); 43 write_seqlock(&xtime_lock);
44 44
45 timer_tick(regs); 45 timer_tick();
46 write_sequnlock(&xtime_lock); 46 write_sequnlock(&xtime_lock);
47 47
48 /* acknowledge interrupt */ 48 /* acknowledge interrupt */
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 6b05647a6c01..3a622801d7b0 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -327,7 +327,7 @@ static struct spi_board_info __initdata mistral_boardinfo[] = { {
327 327
328#ifdef CONFIG_PM 328#ifdef CONFIG_PM
329static irqreturn_t 329static irqreturn_t
330osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) 330osk_mistral_wake_interrupt(int irq, void *ignored)
331{ 331{
332 return IRQ_HANDLED; 332 return IRQ_HANDLED;
333} 333}
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index efe9bfc6e55f..8e40208b10bb 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -84,8 +84,7 @@ static void fpga_mask_ack_irq(unsigned int irq)
84 fpga_ack_irq(irq); 84 fpga_ack_irq(irq);
85} 85}
86 86
87void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc, 87void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc)
88 struct pt_regs *regs)
89{ 88{
90 struct irqdesc *d; 89 struct irqdesc *d;
91 u32 stat; 90 u32 stat;
@@ -101,7 +100,7 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc,
101 fpga_irq++, stat >>= 1) { 100 fpga_irq++, stat >>= 1) {
102 if (stat & 1) { 101 if (stat & 1) {
103 d = irq_desc + fpga_irq; 102 d = irq_desc + fpga_irq;
104 desc_handle_irq(fpga_irq, d, regs); 103 desc_handle_irq(fpga_irq, d);
105 } 104 }
106 } 105 }
107} 106}
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index cd76185bab74..4834758d340c 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -682,8 +682,7 @@ static int omap_pm_finish(suspend_state_t state)
682} 682}
683 683
684 684
685static irqreturn_t omap_wakeup_interrupt(int irq, void * dev, 685static irqreturn_t omap_wakeup_interrupt(int irq, void *dev)
686 struct pt_regs * regs)
687{ 686{
688 return IRQ_HANDLED; 687 return IRQ_HANDLED;
689} 688}
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index c4b790217a5b..4cc98a578e4b 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -204,8 +204,7 @@ void __init omap_serial_init(void)
204 204
205#ifdef CONFIG_OMAP_SERIAL_WAKE 205#ifdef CONFIG_OMAP_SERIAL_WAKE
206 206
207static irqreturn_t omap_serial_wake_interrupt(int irq, void *dev_id, 207static irqreturn_t omap_serial_wake_interrupt(int irq, void *dev_id)
208 struct pt_regs *regs)
209{ 208{
210 /* Need to do something with serial port right after wake-up? */ 209 /* Need to do something with serial port right after wake-up? */
211 return IRQ_HANDLED; 210 return IRQ_HANDLED;
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index 4d91b9f51084..1b7e4a506c26 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -160,8 +160,7 @@ static unsigned long omap_mpu_timer_gettimeoffset(void)
160 * Latency during the interrupt is calculated using timer1. 160 * Latency during the interrupt is calculated using timer1.
161 * Both timer0 and timer1 are counting at 6MHz (P2 6.5MHz). 161 * Both timer0 and timer1 are counting at 6MHz (P2 6.5MHz).
162 */ 162 */
163static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id, 163static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id)
164 struct pt_regs *regs)
165{ 164{
166 unsigned long now, latency; 165 unsigned long now, latency;
167 166
@@ -169,7 +168,7 @@ static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id,
169 now = 0 - omap_mpu_timer_read(0); 168 now = 0 - omap_mpu_timer_read(0);
170 latency = MPU_TICKS_PER_SEC / HZ - omap_mpu_timer_read(1); 169 latency = MPU_TICKS_PER_SEC / HZ - omap_mpu_timer_read(1);
171 omap_mpu_timer_last = now - latency; 170 omap_mpu_timer_last = now - latency;
172 timer_tick(regs); 171 timer_tick();
173 write_sequnlock(&xtime_lock); 172 write_sequnlock(&xtime_lock);
174 173
175 return IRQ_HANDLED; 174 return IRQ_HANDLED;
@@ -182,8 +181,7 @@ static struct irqaction omap_mpu_timer_irq = {
182}; 181};
183 182
184static unsigned long omap_mpu_timer1_overflows; 183static unsigned long omap_mpu_timer1_overflows;
185static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id, 184static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id)
186 struct pt_regs *regs)
187{ 185{
188 omap_mpu_timer1_overflows++; 186 omap_mpu_timer1_overflows++;
189 return IRQ_HANDLED; 187 return IRQ_HANDLED;
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index c37b0e6d1248..03d6905ba490 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -203,7 +203,7 @@ static void __init apollon_led_init(void)
203 omap_set_gpio_dataout(LED2_GPIO15, 0); 203 omap_set_gpio_dataout(LED2_GPIO15, 0);
204} 204}
205 205
206static irqreturn_t apollon_sw_interrupt(int irq, void *ignored, struct pt_regs *regs) 206static irqreturn_t apollon_sw_interrupt(int irq, void *ignored)
207{ 207{
208 static unsigned int led0, led1, led2; 208 static unsigned int led0, led1, led2;
209 209
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index fe5fd6d42dea..973189cd9766 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -37,13 +37,12 @@ static inline void omap2_gp_timer_start(unsigned long load_val)
37 omap_dm_timer_start(gptimer); 37 omap_dm_timer_start(gptimer);
38} 38}
39 39
40static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, 40static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id)
41 struct pt_regs *regs)
42{ 41{
43 write_seqlock(&xtime_lock); 42 write_seqlock(&xtime_lock);
44 43
45 omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW); 44 omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW);
46 timer_tick(regs); 45 timer_tick();
47 46
48 write_sequnlock(&xtime_lock); 47 write_sequnlock(&xtime_lock);
49 48
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c
index ec01574f88ac..d6a279e4b524 100644
--- a/arch/arm/mach-pnx4008/dma.c
+++ b/arch/arm/mach-pnx4008/dma.c
@@ -32,7 +32,7 @@
32 32
33static struct dma_channel { 33static struct dma_channel {
34 char *name; 34 char *name;
35 void (*irq_handler) (int, int, void *, struct pt_regs *); 35 void (*irq_handler) (int, int, void *);
36 void *data; 36 void *data;
37 struct pnx4008_dma_ll *ll; 37 struct pnx4008_dma_ll *ll;
38 u32 ll_dma; 38 u32 ll_dma;
@@ -150,8 +150,7 @@ static inline void pnx4008_dma_unlock(void)
150#define VALID_CHANNEL(c) (((c) >= 0) && ((c) < MAX_DMA_CHANNELS)) 150#define VALID_CHANNEL(c) (((c) >= 0) && ((c) < MAX_DMA_CHANNELS))
151 151
152int pnx4008_request_channel(char *name, int ch, 152int pnx4008_request_channel(char *name, int ch,
153 void (*irq_handler) (int, int, void *, 153 void (*irq_handler) (int, int, void *), void *data)
154 struct pt_regs *), void *data)
155{ 154{
156 int i, found = 0; 155 int i, found = 0;
157 156
@@ -1033,7 +1032,7 @@ int pnx4008_dma_ch_enabled(int ch)
1033 1032
1034EXPORT_SYMBOL_GPL(pnx4008_dma_ch_enabled); 1033EXPORT_SYMBOL_GPL(pnx4008_dma_ch_enabled);
1035 1034
1036static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) 1035static irqreturn_t dma_irq_handler(int irq, void *dev_id)
1037{ 1036{
1038 int i; 1037 int i;
1039 unsigned long dint = __raw_readl(DMAC_INT_STAT); 1038 unsigned long dint = __raw_readl(DMAC_INT_STAT);
@@ -1053,8 +1052,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
1053 cause |= DMA_ERR_INT; 1052 cause |= DMA_ERR_INT;
1054 if (tcint & i_bit) 1053 if (tcint & i_bit)
1055 cause |= DMA_TC_INT; 1054 cause |= DMA_TC_INT;
1056 channel->irq_handler(i, cause, channel->data, 1055 channel->irq_handler(i, cause, channel->data);
1057 regs);
1058 } else { 1056 } else {
1059 /* 1057 /*
1060 * IRQ for an unregistered DMA channel 1058 * IRQ for an unregistered DMA channel
diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c
index b986065cd0f3..8621c206ac84 100644
--- a/arch/arm/mach-pnx4008/time.c
+++ b/arch/arm/mach-pnx4008/time.c
@@ -47,15 +47,14 @@ static unsigned long pnx4008_gettimeoffset(void)
47/*! 47/*!
48 * IRQ handler for the timer 48 * IRQ handler for the timer
49 */ 49 */
50static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id, 50static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id)
51 struct pt_regs *regs)
52{ 51{
53 if (__raw_readl(HSTIM_INT) & MATCH0_INT) { 52 if (__raw_readl(HSTIM_INT) & MATCH0_INT) {
54 53
55 write_seqlock(&xtime_lock); 54 write_seqlock(&xtime_lock);
56 55
57 do { 56 do {
58 timer_tick(regs); 57 timer_tick();
59 58
60 /* 59 /*
61 * this algorithm takes care of possible delay 60 * this algorithm takes care of possible delay
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 337c01c4ac37..a1a900d16665 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -212,7 +212,7 @@ static struct platform_device corgits_device = {
212 */ 212 */
213static struct pxamci_platform_data corgi_mci_platform_data; 213static struct pxamci_platform_data corgi_mci_platform_data;
214 214
215static int corgi_mci_init(struct device *dev, irqreturn_t (*corgi_detect_int)(int, void *, struct pt_regs *), void *data) 215static int corgi_mci_init(struct device *dev, irq_handler_t corgi_detect_int, void *data)
216{ 216{
217 int err; 217 int err;
218 218
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c
index 7d8c85486c66..4440babe7b97 100644
--- a/arch/arm/mach-pxa/dma.c
+++ b/arch/arm/mach-pxa/dma.c
@@ -27,13 +27,13 @@
27 27
28static struct dma_channel { 28static struct dma_channel {
29 char *name; 29 char *name;
30 void (*irq_handler)(int, void *, struct pt_regs *); 30 void (*irq_handler)(int, void *);
31 void *data; 31 void *data;
32} dma_channels[PXA_DMA_CHANNELS]; 32} dma_channels[PXA_DMA_CHANNELS];
33 33
34 34
35int pxa_request_dma (char *name, pxa_dma_prio prio, 35int pxa_request_dma (char *name, pxa_dma_prio prio,
36 void (*irq_handler)(int, void *, struct pt_regs *), 36 void (*irq_handler)(int, void *),
37 void *data) 37 void *data)
38{ 38{
39 unsigned long flags; 39 unsigned long flags;
@@ -87,7 +87,7 @@ void pxa_free_dma (int dma_ch)
87 local_irq_restore(flags); 87 local_irq_restore(flags);
88} 88}
89 89
90static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) 90static irqreturn_t dma_irq_handler(int irq, void *dev_id)
91{ 91{
92 int i, dint = DINT; 92 int i, dint = DINT;
93 93
@@ -95,7 +95,7 @@ static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
95 if (dint & (1 << i)) { 95 if (dint & (1 << i)) {
96 struct dma_channel *channel = &dma_channels[i]; 96 struct dma_channel *channel = &dma_channels[i];
97 if (channel->name && channel->irq_handler) { 97 if (channel->name && channel->irq_handler) {
98 channel->irq_handler(i, channel->data, regs); 98 channel->irq_handler(i, channel->data);
99 } else { 99 } else {
100 /* 100 /*
101 * IRQ for an unregistered DMA channel: 101 * IRQ for an unregistered DMA channel:
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 3e4b0ab71c66..64df44043a65 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -125,7 +125,7 @@ static struct pxafb_mach_info sharp_lm8v31 = {
125 .pxafb_lcd_power = &idp_lcd_power 125 .pxafb_lcd_power = &idp_lcd_power
126}; 126};
127 127
128static int idp_mci_init(struct device *dev, irqreturn_t (*idp_detect_int)(int, void *, struct pt_regs *), void *data) 128static int idp_mci_init(struct device *dev, irq_handler_t idp_detect_int, void *data)
129{ 129{
130 /* setup GPIO for PXA25x MMC controller */ 130 /* setup GPIO for PXA25x MMC controller */
131 pxa_gpio_mode(GPIO6_MMCCLK_MD); 131 pxa_gpio_mode(GPIO6_MMCCLK_MD);
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 12141e2a50cc..ab1a16025d51 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -143,8 +143,7 @@ static struct irq_chip pxa_low_gpio_chip = {
143 * Demux handler for GPIO>=2 edge detect interrupts 143 * Demux handler for GPIO>=2 edge detect interrupts
144 */ 144 */
145 145
146static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, 146static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc)
147 struct pt_regs *regs)
148{ 147{
149 unsigned int mask; 148 unsigned int mask;
150 int loop; 149 int loop;
@@ -160,7 +159,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc,
160 mask >>= 2; 159 mask >>= 2;
161 do { 160 do {
162 if (mask & 1) 161 if (mask & 1)
163 desc_handle_irq(irq, desc, regs); 162 desc_handle_irq(irq, desc);
164 irq++; 163 irq++;
165 desc++; 164 desc++;
166 mask >>= 1; 165 mask >>= 1;
@@ -175,7 +174,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc,
175 desc = irq_desc + irq; 174 desc = irq_desc + irq;
176 do { 175 do {
177 if (mask & 1) 176 if (mask & 1)
178 desc_handle_irq(irq, desc, regs); 177 desc_handle_irq(irq, desc);
179 irq++; 178 irq++;
180 desc++; 179 desc++;
181 mask >>= 1; 180 mask >>= 1;
@@ -190,7 +189,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc,
190 desc = irq_desc + irq; 189 desc = irq_desc + irq;
191 do { 190 do {
192 if (mask & 1) 191 if (mask & 1)
193 desc_handle_irq(irq, desc, regs); 192 desc_handle_irq(irq, desc);
194 irq++; 193 irq++;
195 desc++; 194 desc++;
196 mask >>= 1; 195 mask >>= 1;
@@ -206,7 +205,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc,
206 desc = irq_desc + irq; 205 desc = irq_desc + irq;
207 do { 206 do {
208 if (mask & 1) 207 if (mask & 1)
209 desc_handle_irq(irq, desc, regs); 208 desc_handle_irq(irq, desc);
210 irq++; 209 irq++;
211 desc++; 210 desc++;
212 mask >>= 1; 211 mask >>= 1;
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index eff2a91b2565..5749f6b72e12 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -75,8 +75,7 @@ static struct irq_chip lpd270_irq_chip = {
75 .unmask = lpd270_unmask_irq, 75 .unmask = lpd270_unmask_irq,
76}; 76};
77 77
78static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc, 78static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc)
79 struct pt_regs *regs)
80{ 79{
81 unsigned long pending; 80 unsigned long pending;
82 81
@@ -86,7 +85,7 @@ static void lpd270_irq_handler(unsigned int irq, struct irqdesc *desc,
86 if (likely(pending)) { 85 if (likely(pending)) {
87 irq = LPD270_IRQ(0) + __ffs(pending); 86 irq = LPD270_IRQ(0) + __ffs(pending);
88 desc = irq_desc + irq; 87 desc = irq_desc + irq;
89 desc_handle_irq(irq, desc, regs); 88 desc_handle_irq(irq, desc);
90 89
91 pending = __raw_readw(LPD270_INT_STATUS) & 90 pending = __raw_readw(LPD270_INT_STATUS) &
92 lpd270_irq_enabled; 91 lpd270_irq_enabled;
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 157cf47cbe66..ee80d62119d3 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -85,8 +85,7 @@ static struct irq_chip lubbock_irq_chip = {
85 .unmask = lubbock_unmask_irq, 85 .unmask = lubbock_unmask_irq,
86}; 86};
87 87
88static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc, 88static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc)
89 struct pt_regs *regs)
90{ 89{
91 unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; 90 unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
92 do { 91 do {
@@ -94,7 +93,7 @@ static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc,
94 if (likely(pending)) { 93 if (likely(pending)) {
95 irq = LUBBOCK_IRQ(0) + __ffs(pending); 94 irq = LUBBOCK_IRQ(0) + __ffs(pending);
96 desc = irq_desc + irq; 95 desc = irq_desc + irq;
97 desc_handle_irq(irq, desc, regs); 96 desc_handle_irq(irq, desc);
98 } 97 }
99 pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; 98 pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
100 } while (pending); 99 } while (pending);
@@ -379,7 +378,7 @@ static struct pxafb_mach_info sharp_lm8v31 = {
379#define MMC_POLL_RATE msecs_to_jiffies(1000) 378#define MMC_POLL_RATE msecs_to_jiffies(1000)
380 379
381static void lubbock_mmc_poll(unsigned long); 380static void lubbock_mmc_poll(unsigned long);
382static irqreturn_t (*mmc_detect_int)(int, void *, struct pt_regs *); 381static irq_handler_t mmc_detect_int;
383 382
384static struct timer_list mmc_timer = { 383static struct timer_list mmc_timer = {
385 .function = lubbock_mmc_poll, 384 .function = lubbock_mmc_poll,
@@ -403,17 +402,17 @@ static void lubbock_mmc_poll(unsigned long data)
403 } 402 }
404} 403}
405 404
406static irqreturn_t lubbock_detect_int(int irq, void *data, struct pt_regs *regs) 405static irqreturn_t lubbock_detect_int(int irq, void *data)
407{ 406{
408 /* IRQ is level triggered; disable, and poll for removal */ 407 /* IRQ is level triggered; disable, and poll for removal */
409 disable_irq(irq); 408 disable_irq(irq);
410 mod_timer(&mmc_timer, jiffies + MMC_POLL_RATE); 409 mod_timer(&mmc_timer, jiffies + MMC_POLL_RATE);
411 410
412 return mmc_detect_int(irq, data, regs); 411 return mmc_detect_int(irq, data);
413} 412}
414 413
415static int lubbock_mci_init(struct device *dev, 414static int lubbock_mci_init(struct device *dev,
416 irqreturn_t (*detect_int)(int, void *, struct pt_regs *), 415 irq_handler_t detect_int,
417 void *data) 416 void *data)
418{ 417{
419 /* setup GPIO for PXA25x MMC controller */ 418 /* setup GPIO for PXA25x MMC controller */
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 7ba0447d6fa3..49c34d94a9fe 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -71,8 +71,7 @@ static struct irq_chip mainstone_irq_chip = {
71 .unmask = mainstone_unmask_irq, 71 .unmask = mainstone_unmask_irq,
72}; 72};
73 73
74static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, 74static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc)
75 struct pt_regs *regs)
76{ 75{
77 unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; 76 unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled;
78 do { 77 do {
@@ -80,7 +79,7 @@ static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc,
80 if (likely(pending)) { 79 if (likely(pending)) {
81 irq = MAINSTONE_IRQ(0) + __ffs(pending); 80 irq = MAINSTONE_IRQ(0) + __ffs(pending);
82 desc = irq_desc + irq; 81 desc = irq_desc + irq;
83 desc_handle_irq(irq, desc, regs); 82 desc_handle_irq(irq, desc);
84 } 83 }
85 pending = MST_INTSETCLR & mainstone_irq_enabled; 84 pending = MST_INTSETCLR & mainstone_irq_enabled;
86 } while (pending); 85 } while (pending);
@@ -314,7 +313,7 @@ static struct pxafb_mach_info mainstone_pxafb_info = {
314 .pxafb_backlight_power = mainstone_backlight_power, 313 .pxafb_backlight_power = mainstone_backlight_power,
315}; 314};
316 315
317static int mainstone_mci_init(struct device *dev, irqreturn_t (*mstone_detect_int)(int, void *, struct pt_regs *), void *data) 316static int mainstone_mci_init(struct device *dev, irq_handler_t mstone_detect_int, void *data)
318{ 317{
319 int err; 318 int err;
320 319
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 5e8c098ca139..34fb80b37023 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -197,7 +197,7 @@ static struct platform_device poodle_ts_device = {
197 */ 197 */
198static struct pxamci_platform_data poodle_mci_platform_data; 198static struct pxamci_platform_data poodle_mci_platform_data;
199 199
200static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(int, void *, struct pt_regs *), void *data) 200static int poodle_mci_init(struct device *dev, irq_handler_t poodle_detect_int, void *data)
201{ 201{
202 int err; 202 int err;
203 203
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 401cdb850fbc..3cbac63bed3c 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -291,7 +291,7 @@ static struct platform_device spitzts_device = {
291 291
292static struct pxamci_platform_data spitz_mci_platform_data; 292static struct pxamci_platform_data spitz_mci_platform_data;
293 293
294static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(int, void *, struct pt_regs *), void *data) 294static int spitz_mci_init(struct device *dev, irq_handler_t spitz_detect_int, void *data)
295{ 295{
296 int err; 296 int err;
297 297
diff --git a/arch/arm/mach-pxa/ssp.c b/arch/arm/mach-pxa/ssp.c
index 1fddfeaa630d..6cc202755fb4 100644
--- a/arch/arm/mach-pxa/ssp.c
+++ b/arch/arm/mach-pxa/ssp.c
@@ -65,7 +65,7 @@ static const struct ssp_info_ ssp_info[PXA_SSP_PORTS] = {
65static DEFINE_MUTEX(mutex); 65static DEFINE_MUTEX(mutex);
66static int use_count[PXA_SSP_PORTS] = {0, 0, 0}; 66static int use_count[PXA_SSP_PORTS] = {0, 0, 0};
67 67
68static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) 68static irqreturn_t ssp_interrupt(int irq, void *dev_id)
69{ 69{
70 struct ssp_dev *dev = (struct ssp_dev*) dev_id; 70 struct ssp_dev *dev = (struct ssp_dev*) dev_id;
71 unsigned int status = SSSR_P(dev->port); 71 unsigned int status = SSSR_P(dev->port);
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index 5dbd191c57c4..3ac268fa419b 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -75,7 +75,7 @@ static int match_posponed;
75#endif 75#endif
76 76
77static irqreturn_t 77static irqreturn_t
78pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 78pxa_timer_interrupt(int irq, void *dev_id)
79{ 79{
80 int next_match; 80 int next_match;
81 81
@@ -105,7 +105,7 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
105 * exactly one tick period which should be a pretty rare event. 105 * exactly one tick period which should be a pretty rare event.
106 */ 106 */
107 do { 107 do {
108 timer_tick(regs); 108 timer_tick();
109 OSSR = OSSR_M0; /* Clear match on timer 0 */ 109 OSSR = OSSR_M0; /* Clear match on timer 0 */
110 next_match = (OSMR0 += LATCH); 110 next_match = (OSMR0 += LATCH);
111 } while( (signed long)(next_match - OSCR) <= 8 ); 111 } while( (signed long)(next_match - OSCR) <= 8 );
@@ -157,13 +157,13 @@ static void pxa_dyn_tick_reprogram(unsigned long ticks)
157} 157}
158 158
159static irqreturn_t 159static irqreturn_t
160pxa_dyn_tick_handler(int irq, void *dev_id, struct pt_regs *regs) 160pxa_dyn_tick_handler(int irq, void *dev_id)
161{ 161{
162 if (match_posponed) { 162 if (match_posponed) {
163 match_posponed = 0; 163 match_posponed = 0;
164 OSMR0 = initial_match; 164 OSMR0 = initial_match;
165 if ( (signed long)(initial_match - OSCR) <= 8 ) 165 if ( (signed long)(initial_match - OSCR) <= 8 )
166 return pxa_timer_interrupt(irq, dev_id, regs); 166 return pxa_timer_interrupt(irq, dev_id);
167 } 167 }
168 return IRQ_NONE; 168 return IRQ_NONE;
169} 169}
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 249353616aba..7915a5a22865 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -174,7 +174,7 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
174 */ 174 */
175static struct pxamci_platform_data tosa_mci_platform_data; 175static struct pxamci_platform_data tosa_mci_platform_data;
176 176
177static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int, void *, struct pt_regs *), void *data) 177static int tosa_mci_init(struct device *dev, irq_handler_t tosa_detect_int, void *data)
178{ 178{
179 int err; 179 int err;
180 180
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 910571e9a190..c1827d021ba8 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -270,7 +270,7 @@ void board_pcmcia_power(int power) {;}
270#endif /* CONFIG_MACH_TRIZEPS4_CONXS */ 270#endif /* CONFIG_MACH_TRIZEPS4_CONXS */
271EXPORT_SYMBOL(board_pcmcia_power); 271EXPORT_SYMBOL(board_pcmcia_power);
272 272
273static int trizeps4_mci_init(struct device *dev, irqreturn_t (*mci_detect_int)(int, void *, struct pt_regs *), void *data) 273static int trizeps4_mci_init(struct device *dev, irq_handler_t mci_detect_int, void *data)
274{ 274{
275 int err; 275 int err;
276 /* setup GPIO for PXA27x MMC controller */ 276 /* setup GPIO for PXA27x MMC controller */
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index da0286973823..68c67053f479 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -515,18 +515,18 @@ static unsigned long realview_gettimeoffset(void)
515/* 515/*
516 * IRQ handler for the timer 516 * IRQ handler for the timer
517 */ 517 */
518static irqreturn_t realview_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 518static irqreturn_t realview_timer_interrupt(int irq, void *dev_id)
519{ 519{
520 write_seqlock(&xtime_lock); 520 write_seqlock(&xtime_lock);
521 521
522 // ...clear the interrupt 522 // ...clear the interrupt
523 writel(1, TIMER0_VA_BASE + TIMER_INTCLR); 523 writel(1, TIMER0_VA_BASE + TIMER_INTCLR);
524 524
525 timer_tick(regs); 525 timer_tick();
526 526
527#if defined(CONFIG_SMP) && !defined(CONFIG_LOCAL_TIMERS) 527#if defined(CONFIG_SMP) && !defined(CONFIG_LOCAL_TIMERS)
528 smp_send_timer(); 528 smp_send_timer();
529 update_process_times(user_mode(regs)); 529 update_process_times(user_mode(get_irq_regs()));
530#endif 530#endif
531 531
532 write_sequnlock(&xtime_lock); 532 write_sequnlock(&xtime_lock);
diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c
index ac511d41d4d7..596379a4cf82 100644
--- a/arch/arm/mach-rpc/dma.c
+++ b/arch/arm/mach-rpc/dma.c
@@ -83,7 +83,7 @@ static void iomd_get_next_sg(struct scatterlist *sg, dma_t *dma)
83 sg->length |= flags; 83 sg->length |= flags;
84} 84}
85 85
86static irqreturn_t iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs) 86static irqreturn_t iomd_dma_handle(int irq, void *dev_id)
87{ 87{
88 dma_t *dma = (dma_t *)dev_id; 88 dma_t *dma = (dma_t *)dev_id;
89 unsigned long base = dma->dma_base; 89 unsigned long base = dma->dma_base;
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c
index 440e9aa0211a..23d5beea5568 100644
--- a/arch/arm/mach-s3c2410/bast-irq.c
+++ b/arch/arm/mach-s3c2410/bast-irq.c
@@ -112,8 +112,7 @@ static struct irqchip bast_pc104_chip = {
112 112
113static void 113static void
114bast_irq_pc104_demux(unsigned int irq, 114bast_irq_pc104_demux(unsigned int irq,
115 struct irqdesc *desc, 115 struct irqdesc *desc)
116 struct pt_regs *regs)
117{ 116{
118 unsigned int stat; 117 unsigned int stat;
119 unsigned int irqno; 118 unsigned int irqno;
@@ -133,7 +132,7 @@ bast_irq_pc104_demux(unsigned int irq,
133 if (stat & 1) { 132 if (stat & 1) {
134 irqno = bast_pc104_irqs[i]; 133 irqno = bast_pc104_irqs[i];
135 desc = irq_desc + irqno; 134 desc = irq_desc + irqno;
136 desc_handle_irq(irqno, desc, regs); 135 desc_handle_irq(irqno, desc);
137 } 136 }
138 } 137 }
139 } 138 }
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index d264bbbd8bef..3d211dc2f2f9 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -595,7 +595,7 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan)
595#define dmadbg2(x...) 595#define dmadbg2(x...)
596 596
597static irqreturn_t 597static irqreturn_t
598s3c2410_dma_irq(int irq, void *devpw, struct pt_regs *regs) 598s3c2410_dma_irq(int irq, void *devpw)
599{ 599{
600 struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw; 600 struct s3c2410_dma_chan *chan = (struct s3c2410_dma_chan *)devpw;
601 struct s3c2410_dma_buf *buf; 601 struct s3c2410_dma_buf *buf;
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c
index 3e9f3462c61b..683b3491ba3c 100644
--- a/arch/arm/mach-s3c2410/irq.c
+++ b/arch/arm/mach-s3c2410/irq.c
@@ -480,8 +480,7 @@ static struct irqchip s3c_irq_adc = {
480 480
481/* irq demux for adc */ 481/* irq demux for adc */
482static void s3c_irq_demux_adc(unsigned int irq, 482static void s3c_irq_demux_adc(unsigned int irq,
483 struct irqdesc *desc, 483 struct irqdesc *desc)
484 struct pt_regs *regs)
485{ 484{
486 unsigned int subsrc, submsk; 485 unsigned int subsrc, submsk;
487 unsigned int offset = 9; 486 unsigned int offset = 9;
@@ -500,17 +499,16 @@ static void s3c_irq_demux_adc(unsigned int irq,
500 if (subsrc != 0) { 499 if (subsrc != 0) {
501 if (subsrc & 1) { 500 if (subsrc & 1) {
502 mydesc = irq_desc + IRQ_TC; 501 mydesc = irq_desc + IRQ_TC;
503 desc_handle_irq(IRQ_TC, mydesc, regs); 502 desc_handle_irq(IRQ_TC, mydesc);
504 } 503 }
505 if (subsrc & 2) { 504 if (subsrc & 2) {
506 mydesc = irq_desc + IRQ_ADC; 505 mydesc = irq_desc + IRQ_ADC;
507 desc_handle_irq(IRQ_ADC, mydesc, regs); 506 desc_handle_irq(IRQ_ADC, mydesc);
508 } 507 }
509 } 508 }
510} 509}
511 510
512static void s3c_irq_demux_uart(unsigned int start, 511static void s3c_irq_demux_uart(unsigned int start)
513 struct pt_regs *regs)
514{ 512{
515 unsigned int subsrc, submsk; 513 unsigned int subsrc, submsk;
516 unsigned int offset = start - IRQ_S3CUART_RX0; 514 unsigned int offset = start - IRQ_S3CUART_RX0;
@@ -533,17 +531,17 @@ static void s3c_irq_demux_uart(unsigned int start,
533 desc = irq_desc + start; 531 desc = irq_desc + start;
534 532
535 if (subsrc & 1) 533 if (subsrc & 1)
536 desc_handle_irq(start, desc, regs); 534 desc_handle_irq(start, desc);
537 535
538 desc++; 536 desc++;
539 537
540 if (subsrc & 2) 538 if (subsrc & 2)
541 desc_handle_irq(start+1, desc, regs); 539 desc_handle_irq(start+1, desc);
542 540
543 desc++; 541 desc++;
544 542
545 if (subsrc & 4) 543 if (subsrc & 4)
546 desc_handle_irq(start+2, desc, regs); 544 desc_handle_irq(start+2, desc);
547 } 545 }
548} 546}
549 547
@@ -551,35 +549,31 @@ static void s3c_irq_demux_uart(unsigned int start,
551 549
552static void 550static void
553s3c_irq_demux_uart0(unsigned int irq, 551s3c_irq_demux_uart0(unsigned int irq,
554 struct irqdesc *desc, 552 struct irqdesc *desc)
555 struct pt_regs *regs)
556{ 553{
557 irq = irq; 554 irq = irq;
558 s3c_irq_demux_uart(IRQ_S3CUART_RX0, regs); 555 s3c_irq_demux_uart(IRQ_S3CUART_RX0);
559} 556}
560 557
561static void 558static void
562s3c_irq_demux_uart1(unsigned int irq, 559s3c_irq_demux_uart1(unsigned int irq,
563 struct irqdesc *desc, 560 struct irqdesc *desc)
564 struct pt_regs *regs)
565{ 561{
566 irq = irq; 562 irq = irq;
567 s3c_irq_demux_uart(IRQ_S3CUART_RX1, regs); 563 s3c_irq_demux_uart(IRQ_S3CUART_RX1);
568} 564}
569 565
570static void 566static void
571s3c_irq_demux_uart2(unsigned int irq, 567s3c_irq_demux_uart2(unsigned int irq,
572 struct irqdesc *desc, 568 struct irqdesc *desc)
573 struct pt_regs *regs)
574{ 569{
575 irq = irq; 570 irq = irq;
576 s3c_irq_demux_uart(IRQ_S3CUART_RX2, regs); 571 s3c_irq_demux_uart(IRQ_S3CUART_RX2);
577} 572}
578 573
579static void 574static void
580s3c_irq_demux_extint8(unsigned int irq, 575s3c_irq_demux_extint8(unsigned int irq,
581 struct irqdesc *desc, 576 struct irqdesc *desc)
582 struct pt_regs *regs)
583{ 577{
584 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); 578 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
585 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); 579 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
@@ -594,15 +588,14 @@ s3c_irq_demux_extint8(unsigned int irq,
594 eintpnd &= ~(1<<irq); 588 eintpnd &= ~(1<<irq);
595 589
596 irq += (IRQ_EINT4 - 4); 590 irq += (IRQ_EINT4 - 4);
597 desc_handle_irq(irq, irq_desc + irq, regs); 591 desc_handle_irq(irq, irq_desc + irq);
598 } 592 }
599 593
600} 594}
601 595
602static void 596static void
603s3c_irq_demux_extint4t7(unsigned int irq, 597s3c_irq_demux_extint4t7(unsigned int irq,
604 struct irqdesc *desc, 598 struct irqdesc *desc)
605 struct pt_regs *regs)
606{ 599{
607 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND); 600 unsigned long eintpnd = __raw_readl(S3C24XX_EINTPEND);
608 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK); 601 unsigned long eintmsk = __raw_readl(S3C24XX_EINTMASK);
@@ -618,7 +611,7 @@ s3c_irq_demux_extint4t7(unsigned int irq,
618 611
619 irq += (IRQ_EINT4 - 4); 612 irq += (IRQ_EINT4 - 4);
620 613
621 desc_handle_irq(irq, irq_desc + irq, regs); 614 desc_handle_irq(irq, irq_desc + irq);
622 } 615 }
623} 616}
624 617
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c
index ba5109af40b4..817e2c684410 100644
--- a/arch/arm/mach-s3c2410/mach-amlm5900.c
+++ b/arch/arm/mach-s3c2410/mach-amlm5900.c
@@ -226,7 +226,7 @@ static struct s3c2410fb_mach_info __initdata amlm5900_lcd_info = {
226#endif 226#endif
227 227
228static irqreturn_t 228static irqreturn_t
229amlm5900_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) 229amlm5900_wake_interrupt(int irq, void *ignored)
230{ 230{
231 return IRQ_HANDLED; 231 return IRQ_HANDLED;
232} 232}
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c
index fc08febe2e54..39db0752d53b 100644
--- a/arch/arm/mach-s3c2410/s3c2440-irq.c
+++ b/arch/arm/mach-s3c2410/s3c2440-irq.c
@@ -42,8 +42,7 @@
42/* WDT/AC97 */ 42/* WDT/AC97 */
43 43
44static void s3c_irq_demux_wdtac97(unsigned int irq, 44static void s3c_irq_demux_wdtac97(unsigned int irq,
45 struct irqdesc *desc, 45 struct irqdesc *desc)
46 struct pt_regs *regs)
47{ 46{
48 unsigned int subsrc, submsk; 47 unsigned int subsrc, submsk;
49 struct irqdesc *mydesc; 48 struct irqdesc *mydesc;
@@ -61,11 +60,11 @@ static void s3c_irq_demux_wdtac97(unsigned int irq,
61 if (subsrc != 0) { 60 if (subsrc != 0) {
62 if (subsrc & 1) { 61 if (subsrc & 1) {
63 mydesc = irq_desc + IRQ_S3C2440_WDT; 62 mydesc = irq_desc + IRQ_S3C2440_WDT;
64 desc_handle_irq(IRQ_S3C2440_WDT, mydesc, regs); 63 desc_handle_irq(IRQ_S3C2440_WDT, mydesc);
65 } 64 }
66 if (subsrc & 2) { 65 if (subsrc & 2) {
67 mydesc = irq_desc + IRQ_S3C2440_AC97; 66 mydesc = irq_desc + IRQ_S3C2440_AC97;
68 desc_handle_irq(IRQ_S3C2440_AC97, mydesc, regs); 67 desc_handle_irq(IRQ_S3C2440_AC97, mydesc);
69 } 68 }
70 } 69 }
71} 70}
diff --git a/arch/arm/mach-s3c2410/s3c244x-irq.c b/arch/arm/mach-s3c2410/s3c244x-irq.c
index ec702f88b299..146f2109dd90 100644
--- a/arch/arm/mach-s3c2410/s3c244x-irq.c
+++ b/arch/arm/mach-s3c2410/s3c244x-irq.c
@@ -42,8 +42,7 @@
42/* camera irq */ 42/* camera irq */
43 43
44static void s3c_irq_demux_cam(unsigned int irq, 44static void s3c_irq_demux_cam(unsigned int irq,
45 struct irqdesc *desc, 45 struct irqdesc *desc)
46 struct pt_regs *regs)
47{ 46{
48 unsigned int subsrc, submsk; 47 unsigned int subsrc, submsk;
49 struct irqdesc *mydesc; 48 struct irqdesc *mydesc;
@@ -61,11 +60,11 @@ static void s3c_irq_demux_cam(unsigned int irq,
61 if (subsrc != 0) { 60 if (subsrc != 0) {
62 if (subsrc & 1) { 61 if (subsrc & 1) {
63 mydesc = irq_desc + IRQ_S3C2440_CAM_C; 62 mydesc = irq_desc + IRQ_S3C2440_CAM_C;
64 desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc, regs); 63 desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc);
65 } 64 }
66 if (subsrc & 2) { 65 if (subsrc & 2) {
67 mydesc = irq_desc + IRQ_S3C2440_CAM_P; 66 mydesc = irq_desc + IRQ_S3C2440_CAM_P;
68 desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc, regs); 67 desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc);
69 } 68 }
70 } 69 }
71} 70}
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c
index 00d1cfca9712..9910bf0f2cea 100644
--- a/arch/arm/mach-s3c2410/time.c
+++ b/arch/arm/mach-s3c2410/time.c
@@ -128,10 +128,10 @@ static unsigned long s3c2410_gettimeoffset (void)
128 * IRQ handler for the timer 128 * IRQ handler for the timer
129 */ 129 */
130static irqreturn_t 130static irqreturn_t
131s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 131s3c2410_timer_interrupt(int irq, void *dev_id)
132{ 132{
133 write_seqlock(&xtime_lock); 133 write_seqlock(&xtime_lock);
134 timer_tick(regs); 134 timer_tick();
135 write_sequnlock(&xtime_lock); 135 write_sequnlock(&xtime_lock);
136 return IRQ_HANDLED; 136 return IRQ_HANDLED;
137} 137}
diff --git a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c
index c635efa7cd31..22b0e1cdd4bf 100644
--- a/arch/arm/mach-s3c2410/usb-simtec.c
+++ b/arch/arm/mach-s3c2410/usb-simtec.c
@@ -58,7 +58,7 @@ usb_simtec_powercontrol(int port, int to)
58} 58}
59 59
60static irqreturn_t 60static irqreturn_t
61usb_simtec_ocirq(int irq, void *pw, struct pt_regs *regs) 61usb_simtec_ocirq(int irq, void *pw)
62{ 62{
63 struct s3c2410_hcd_info *info = (struct s3c2410_hcd_info *)pw; 63 struct s3c2410_hcd_info *info = (struct s3c2410_hcd_info *)pw;
64 64
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
index 2ea2a657a034..1fbe053e8b59 100644
--- a/arch/arm/mach-sa1100/dma.c
+++ b/arch/arm/mach-sa1100/dma.c
@@ -42,7 +42,7 @@ static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS];
42static spinlock_t dma_list_lock; 42static spinlock_t dma_list_lock;
43 43
44 44
45static irqreturn_t dma_irq_handler(int irq, void *dev_id, struct pt_regs *regs) 45static irqreturn_t dma_irq_handler(int irq, void *dev_id)
46{ 46{
47 dma_regs_t *dma_regs = dev_id; 47 dma_regs_t *dma_regs = dev_id;
48 sa1100_dma_t *dma = dma_chan + (((u_int)dma_regs >> 5) & 7); 48 sa1100_dma_t *dma = dma_chan + (((u_int)dma_regs >> 5) & 7);
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index 7364478cec12..fa6dc71bd6ad 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -702,7 +702,7 @@ static u32 gpio_irq_mask[] = {
702 GPIO2_SD_CON_SLT, 702 GPIO2_SD_CON_SLT,
703}; 703};
704 704
705static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 705static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc)
706{ 706{
707 int i; 707 int i;
708 708
@@ -719,14 +719,14 @@ static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc, struct pt_re
719 if (0) printk("%s KPIO 0x%08X\n", __FUNCTION__, irq); 719 if (0) printk("%s KPIO 0x%08X\n", __FUNCTION__, irq);
720 for (j = 0; j < H3800_KPIO_IRQ_COUNT; j++) 720 for (j = 0; j < H3800_KPIO_IRQ_COUNT; j++)
721 if (irq & kpio_irq_mask[j]) 721 if (irq & kpio_irq_mask[j])
722 do_edge_IRQ(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j, regs); 722 do_edge_IRQ(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j);
723 723
724 /* GPIO2 */ 724 /* GPIO2 */
725 irq = H3800_ASIC2_GPIINTFLAG; 725 irq = H3800_ASIC2_GPIINTFLAG;
726 if (0) printk("%s GPIO 0x%08X\n", __FUNCTION__, irq); 726 if (0) printk("%s GPIO 0x%08X\n", __FUNCTION__, irq);
727 for (j = 0; j < H3800_GPIO_IRQ_COUNT; j++) 727 for (j = 0; j < H3800_GPIO_IRQ_COUNT; j++)
728 if (irq & gpio_irq_mask[j]) 728 if (irq & gpio_irq_mask[j])
729 do_edge_IRQ(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j , regs); 729 do_edge_IRQ(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j);
730 } 730 }
731 731
732 if (i >= MAX_ASIC_ISR_LOOPS) 732 if (i >= MAX_ASIC_ISR_LOOPS)
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index b55b90a2e8fe..f4c6322ca33e 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -110,8 +110,7 @@ static struct irq_chip sa1100_low_gpio_chip = {
110 * and call the handler. 110 * and call the handler.
111 */ 111 */
112static void 112static void
113sa1100_high_gpio_handler(unsigned int irq, struct irqdesc *desc, 113sa1100_high_gpio_handler(unsigned int irq, struct irqdesc *desc)
114 struct pt_regs *regs)
115{ 114{
116 unsigned int mask; 115 unsigned int mask;
117 116
@@ -128,7 +127,7 @@ sa1100_high_gpio_handler(unsigned int irq, struct irqdesc *desc,
128 mask >>= 11; 127 mask >>= 11;
129 do { 128 do {
130 if (mask & 1) 129 if (mask & 1)
131 desc_handle_irq(irq, desc, regs); 130 desc_handle_irq(irq, desc);
132 mask >>= 1; 131 mask >>= 1;
133 irq++; 132 irq++;
134 desc++; 133 desc++;
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index af6d2775cf82..354d5e91da59 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -29,7 +29,7 @@
29 * is rather unfortunate. 29 * is rather unfortunate.
30 */ 30 */
31static void 31static void
32neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 32neponset_irq_handler(unsigned int irq, struct irqdesc *desc)
33{ 33{
34 unsigned int irr; 34 unsigned int irr;
35 35
@@ -69,12 +69,12 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
69 69
70 if (irr & IRR_ETHERNET) { 70 if (irr & IRR_ETHERNET) {
71 d = irq_desc + IRQ_NEPONSET_SMC9196; 71 d = irq_desc + IRQ_NEPONSET_SMC9196;
72 desc_handle_irq(IRQ_NEPONSET_SMC9196, d, regs); 72 desc_handle_irq(IRQ_NEPONSET_SMC9196, d);
73 } 73 }
74 74
75 if (irr & IRR_USAR) { 75 if (irr & IRR_USAR) {
76 d = irq_desc + IRQ_NEPONSET_USAR; 76 d = irq_desc + IRQ_NEPONSET_USAR;
77 desc_handle_irq(IRQ_NEPONSET_USAR, d, regs); 77 desc_handle_irq(IRQ_NEPONSET_USAR, d);
78 } 78 }
79 79
80 desc->chip->unmask(irq); 80 desc->chip->unmask(irq);
@@ -82,7 +82,7 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
82 82
83 if (irr & IRR_SA1111) { 83 if (irr & IRR_SA1111) {
84 d = irq_desc + IRQ_NEPONSET_SA1111; 84 d = irq_desc + IRQ_NEPONSET_SA1111;
85 desc_handle_irq(IRQ_NEPONSET_SA1111, d, regs); 85 desc_handle_irq(IRQ_NEPONSET_SA1111, d);
86 } 86 }
87 } 87 }
88} 88}
diff --git a/arch/arm/mach-sa1100/ssp.c b/arch/arm/mach-sa1100/ssp.c
index 5eba5fbbb561..59703c6fb29b 100644
--- a/arch/arm/mach-sa1100/ssp.c
+++ b/arch/arm/mach-sa1100/ssp.c
@@ -25,7 +25,7 @@
25 25
26#define TIMEOUT 100000 26#define TIMEOUT 100000
27 27
28static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs) 28static irqreturn_t ssp_interrupt(int irq, void *dev_id)
29{ 29{
30 unsigned int status = Ser4SSSR; 30 unsigned int status = Ser4SSSR;
31 31
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index 49ae716e16c2..4284bd6f7a1f 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -77,7 +77,7 @@ static int match_posponed;
77#endif 77#endif
78 78
79static irqreturn_t 79static irqreturn_t
80sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 80sa1100_timer_interrupt(int irq, void *dev_id)
81{ 81{
82 unsigned int next_match; 82 unsigned int next_match;
83 83
@@ -99,7 +99,7 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
99 * handlers. 99 * handlers.
100 */ 100 */
101 do { 101 do {
102 timer_tick(regs); 102 timer_tick();
103 OSSR = OSSR_M0; /* Clear match on timer 0 */ 103 OSSR = OSSR_M0; /* Clear match on timer 0 */
104 next_match = (OSMR0 += LATCH); 104 next_match = (OSMR0 += LATCH);
105 } while ((signed long)(next_match - OSCR) <= 0); 105 } while ((signed long)(next_match - OSCR) <= 0);
@@ -151,13 +151,13 @@ static void sa1100_dyn_tick_reprogram(unsigned long ticks)
151} 151}
152 152
153static irqreturn_t 153static irqreturn_t
154sa1100_dyn_tick_handler(int irq, void *dev_id, struct pt_regs *regs) 154sa1100_dyn_tick_handler(int irq, void *dev_id)
155{ 155{
156 if (match_posponed) { 156 if (match_posponed) {
157 match_posponed = 0; 157 match_posponed = 0;
158 OSMR0 = initial_match; 158 OSMR0 = initial_match;
159 if ((signed long)(initial_match - OSCR) <= 0) 159 if ((signed long)(initial_match - OSCR) <= 0)
160 return sa1100_timer_interrupt(irq, dev_id, regs); 160 return sa1100_timer_interrupt(irq, dev_id);
161 } 161 }
162 return IRQ_NONE; 162 return IRQ_NONE;
163} 163}
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index 1095df34fec0..0e480fae8ec5 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -80,10 +80,10 @@ static void __init shark_map_io(void)
80#define HZ_TIME ((1193180 + HZ/2) / HZ) 80#define HZ_TIME ((1193180 + HZ/2) / HZ)
81 81
82static irqreturn_t 82static irqreturn_t
83shark_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 83shark_timer_interrupt(int irq, void *dev_id)
84{ 84{
85 write_seqlock(&xtime_lock); 85 write_seqlock(&xtime_lock);
86 timer_tick(regs); 86 timer_tick();
87 write_sequnlock(&xtime_lock); 87 write_sequnlock(&xtime_lock);
88 return IRQ_HANDLED; 88 return IRQ_HANDLED;
89} 89}
diff --git a/arch/arm/mach-shark/irq.c b/arch/arm/mach-shark/irq.c
index b227052296cf..297ecf130650 100644
--- a/arch/arm/mach-shark/irq.c
+++ b/arch/arm/mach-shark/irq.c
@@ -61,7 +61,7 @@ static void shark_enable_8259A_irq(unsigned int irq)
61 61
62static void shark_ack_8259A_irq(unsigned int irq){} 62static void shark_ack_8259A_irq(unsigned int irq){}
63 63
64static irqreturn_t bogus_int(int irq, void *dev_id, struct pt_regs *regs) 64static irqreturn_t bogus_int(int irq, void *dev_id)
65{ 65{
66 printk("Got interrupt %i!\n",irq); 66 printk("Got interrupt %i!\n",irq);
67 return IRQ_NONE; 67 return IRQ_NONE;
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index f2bbef07b1e4..3b8576111c16 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -77,12 +77,12 @@ static struct irq_chip sic_chip = {
77}; 77};
78 78
79static void 79static void
80sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 80sic_handle_irq(unsigned int irq, struct irqdesc *desc)
81{ 81{
82 unsigned long status = readl(VA_SIC_BASE + SIC_IRQ_STATUS); 82 unsigned long status = readl(VA_SIC_BASE + SIC_IRQ_STATUS);
83 83
84 if (status == 0) { 84 if (status == 0) {
85 do_bad_IRQ(irq, desc, regs); 85 do_bad_IRQ(irq, desc);
86 return; 86 return;
87 } 87 }
88 88
@@ -93,7 +93,7 @@ sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
93 irq += IRQ_SIC_START; 93 irq += IRQ_SIC_START;
94 94
95 desc = irq_desc + irq; 95 desc = irq_desc + irq;
96 desc_handle_irq(irq, desc, regs); 96 desc_handle_irq(irq, desc);
97 } while (status); 97 } while (status);
98} 98}
99 99
@@ -188,12 +188,12 @@ static struct map_desc versatile_io_desc[] __initdata = {
188 .length = SZ_4K, 188 .length = SZ_4K,
189 .type = MT_DEVICE 189 .type = MT_DEVICE
190 }, { 190 }, {
191 .virtual = VERSATILE_PCI_VIRT_BASE, 191 .virtual = (unsigned long)VERSATILE_PCI_VIRT_BASE,
192 .pfn = __phys_to_pfn(VERSATILE_PCI_BASE), 192 .pfn = __phys_to_pfn(VERSATILE_PCI_BASE),
193 .length = VERSATILE_PCI_BASE_SIZE, 193 .length = VERSATILE_PCI_BASE_SIZE,
194 .type = MT_DEVICE 194 .type = MT_DEVICE
195 }, { 195 }, {
196 .virtual = VERSATILE_PCI_CFG_VIRT_BASE, 196 .virtual = (unsigned long)VERSATILE_PCI_CFG_VIRT_BASE,
197 .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE), 197 .pfn = __phys_to_pfn(VERSATILE_PCI_CFG_BASE),
198 .length = VERSATILE_PCI_CFG_BASE_SIZE, 198 .length = VERSATILE_PCI_CFG_BASE_SIZE,
199 .type = MT_DEVICE 199 .type = MT_DEVICE
@@ -851,14 +851,14 @@ static unsigned long versatile_gettimeoffset(void)
851/* 851/*
852 * IRQ handler for the timer 852 * IRQ handler for the timer
853 */ 853 */
854static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 854static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id)
855{ 855{
856 write_seqlock(&xtime_lock); 856 write_seqlock(&xtime_lock);
857 857
858 // ...clear the interrupt 858 // ...clear the interrupt
859 writel(1, TIMER0_VA_BASE + TIMER_INTCLR); 859 writel(1, TIMER0_VA_BASE + TIMER_INTCLR);
860 860
861 timer_tick(regs); 861 timer_tick();
862 862
863 write_sequnlock(&xtime_lock); 863 write_sequnlock(&xtime_lock);
864 864
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index 13bbd08ff841..5cd0b5d9e7eb 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -40,14 +40,15 @@
40 * Cfg 42000000 - 42FFFFFF PCI config 40 * Cfg 42000000 - 42FFFFFF PCI config
41 * 41 *
42 */ 42 */
43#define SYS_PCICTL IO_ADDRESS(VERSATILE_SYS_PCICTL) 43#define __IO_ADDRESS(n) ((void __iomem *)(unsigned long)IO_ADDRESS(n))
44#define PCI_IMAP0 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x0) 44#define SYS_PCICTL __IO_ADDRESS(VERSATILE_SYS_PCICTL)
45#define PCI_IMAP1 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x4) 45#define PCI_IMAP0 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x0)
46#define PCI_IMAP2 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x8) 46#define PCI_IMAP1 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x4)
47#define PCI_SMAP0 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x10) 47#define PCI_IMAP2 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x8)
48#define PCI_SMAP1 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x14) 48#define PCI_SMAP0 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x10)
49#define PCI_SMAP2 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x18) 49#define PCI_SMAP1 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x14)
50#define PCI_SELFID IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0xc) 50#define PCI_SMAP2 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x18)
51#define PCI_SELFID __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0xc)
51 52
52#define DEVICE_ID_OFFSET 0x00 53#define DEVICE_ID_OFFSET 0x00
53#define CSR_OFFSET 0x04 54#define CSR_OFFSET 0x04
@@ -76,7 +77,7 @@ static int __init versatile_pci_slot_ignore(char *str)
76__setup("pci_slot_ignore=", versatile_pci_slot_ignore); 77__setup("pci_slot_ignore=", versatile_pci_slot_ignore);
77 78
78 79
79static unsigned long __pci_addr(struct pci_bus *bus, 80static void __iomem *__pci_addr(struct pci_bus *bus,
80 unsigned int devfn, int offset) 81 unsigned int devfn, int offset)
81{ 82{
82 unsigned int busnr = bus->number; 83 unsigned int busnr = bus->number;
@@ -91,14 +92,14 @@ static unsigned long __pci_addr(struct pci_bus *bus,
91 if (devfn > 255) 92 if (devfn > 255)
92 BUG(); 93 BUG();
93 94
94 return (VERSATILE_PCI_CFG_VIRT_BASE | (busnr << 16) | 95 return VERSATILE_PCI_CFG_VIRT_BASE + ((busnr << 16) |
95 (PCI_SLOT(devfn) << 11) | (PCI_FUNC(devfn) << 8) | offset); 96 (PCI_SLOT(devfn) << 11) | (PCI_FUNC(devfn) << 8) | offset);
96} 97}
97 98
98static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int where, 99static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int where,
99 int size, u32 *val) 100 int size, u32 *val)
100{ 101{
101 unsigned long addr = __pci_addr(bus, devfn, where); 102 void __iomem *addr = __pci_addr(bus, devfn, where & ~3);
102 u32 v; 103 u32 v;
103 int slot = PCI_SLOT(devfn); 104 int slot = PCI_SLOT(devfn);
104 105
@@ -121,13 +122,12 @@ static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int wh
121 break; 122 break;
122 123
123 case 2: 124 case 2:
124 v = __raw_readl(addr & ~3); 125 v = __raw_readl(addr);
125 if (addr & 2) v >>= 16; 126 if (where & 2) v >>= 16;
126 v &= 0xffff; 127 v &= 0xffff;
127 break; 128 break;
128 129
129 default: 130 default:
130 addr &= ~3;
131 v = __raw_readl(addr); 131 v = __raw_readl(addr);
132 break; 132 break;
133 } 133 }
@@ -140,7 +140,7 @@ static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int wh
140static int versatile_write_config(struct pci_bus *bus, unsigned int devfn, int where, 140static int versatile_write_config(struct pci_bus *bus, unsigned int devfn, int where,
141 int size, u32 val) 141 int size, u32 val)
142{ 142{
143 unsigned long addr = __pci_addr(bus, devfn, where); 143 void __iomem *addr = __pci_addr(bus, devfn, where);
144 int slot = PCI_SLOT(devfn); 144 int slot = PCI_SLOT(devfn);
145 145
146 if (pci_slot_ignore & (1 << slot)) { 146 if (pci_slot_ignore & (1 << slot)) {
@@ -279,7 +279,7 @@ int __init pci_versatile_setup(int nr, struct pci_sys_data *sys)
279 printk("PCI core found (slot %d)\n",myslot); 279 printk("PCI core found (slot %d)\n",myslot);
280 280
281 __raw_writel(myslot, PCI_SELFID); 281 __raw_writel(myslot, PCI_SELFID);
282 local_pci_cfg_base = (void *) VERSATILE_PCI_CFG_VIRT_BASE + (myslot << 11); 282 local_pci_cfg_base = VERSATILE_PCI_CFG_VIRT_BASE + (myslot << 11);
283 283
284 val = __raw_readl(local_pci_cfg_base + CSR_OFFSET); 284 val = __raw_readl(local_pci_cfg_base + CSR_OFFSET);
285 val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE; 285 val |= PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE;
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 591fc3187c7f..465440592791 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -361,14 +361,14 @@ __ioremap(unsigned long phys_addr, size_t size, unsigned long flags)
361} 361}
362EXPORT_SYMBOL(__ioremap); 362EXPORT_SYMBOL(__ioremap);
363 363
364void __iounmap(void __iomem *addr) 364void __iounmap(volatile void __iomem *addr)
365{ 365{
366#ifndef CONFIG_SMP 366#ifndef CONFIG_SMP
367 struct vm_struct **p, *tmp; 367 struct vm_struct **p, *tmp;
368#endif 368#endif
369 unsigned int section_mapping = 0; 369 unsigned int section_mapping = 0;
370 370
371 addr = (void __iomem *)(PAGE_MASK & (unsigned long)addr); 371 addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long)addr);
372 372
373#ifndef CONFIG_SMP 373#ifndef CONFIG_SMP
374 /* 374 /*
@@ -395,6 +395,6 @@ void __iounmap(void __iomem *addr)
395#endif 395#endif
396 396
397 if (!section_mapping) 397 if (!section_mapping)
398 vunmap(addr); 398 vunmap((void __force *)addr);
399} 399}
400EXPORT_SYMBOL(__iounmap); 400EXPORT_SYMBOL(__iounmap);
diff --git a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c
index 726ad2b3b435..7899d3ca75a3 100644
--- a/arch/arm/oprofile/op_model_xscale.c
+++ b/arch/arm/oprofile/op_model_xscale.c
@@ -341,7 +341,7 @@ static void inline __xsc2_check_ctrs(void)
341 __asm__ __volatile__ ("mcr p14, 0, %0, c5, c1, 0" : : "r" (flag)); 341 __asm__ __volatile__ ("mcr p14, 0, %0, c5, c1, 0" : : "r" (flag));
342} 342}
343 343
344static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs) 344static irqreturn_t xscale_pmu_interrupt(int irq, void *arg)
345{ 345{
346 int i; 346 int i;
347 u32 pmnc; 347 u32 pmnc;
@@ -356,7 +356,7 @@ static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs
356 continue; 356 continue;
357 357
358 write_counter(i, -(u32)results[i].reset_counter); 358 write_counter(i, -(u32)results[i].reset_counter);
359 oprofile_add_sample(regs, i); 359 oprofile_add_sample(get_irq_regs(), i);
360 results[i].ovf--; 360 results[i].ovf--;
361 } 361 }
362 362
diff --git a/arch/arm/plat-iop/time.c b/arch/arm/plat-iop/time.c
index 06282dffbdc6..f530abdaa7a1 100644
--- a/arch/arm/plat-iop/time.c
+++ b/arch/arm/plat-iop/time.c
@@ -47,7 +47,7 @@ unsigned long iop3xx_gettimeoffset(void)
47} 47}
48 48
49static irqreturn_t 49static irqreturn_t
50iop3xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 50iop3xx_timer_interrupt(int irq, void *dev_id)
51{ 51{
52 write_seqlock(&xtime_lock); 52 write_seqlock(&xtime_lock);
53 53
@@ -57,7 +57,7 @@ iop3xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
57 57
58 while ((signed long)(next_jiffy_time - *IOP3XX_TU_TCR1) 58 while ((signed long)(next_jiffy_time - *IOP3XX_TU_TCR1)
59 >= ticks_per_jiffy) { 59 >= ticks_per_jiffy) {
60 timer_tick(regs); 60 timer_tick();
61 next_jiffy_time -= ticks_per_jiffy; 61 next_jiffy_time -= ticks_per_jiffy;
62 } 62 }
63 63
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 1bbb431843ce..bb045e5ddbd8 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -899,8 +899,7 @@ static int omap1_dma_handle_ch(int ch)
899 return 1; 899 return 1;
900} 900}
901 901
902static irqreturn_t omap1_dma_irq_handler(int irq, void *dev_id, 902static irqreturn_t omap1_dma_irq_handler(int irq, void *dev_id)
903 struct pt_regs *regs)
904{ 903{
905 int ch = ((int) dev_id) - 1; 904 int ch = ((int) dev_id) - 1;
906 int handled = 0; 905 int handled = 0;
@@ -962,8 +961,7 @@ static int omap2_dma_handle_ch(int ch)
962} 961}
963 962
964/* STATUS register count is from 1-32 while our is 0-31 */ 963/* STATUS register count is from 1-32 while our is 0-31 */
965static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id, 964static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id)
966 struct pt_regs *regs)
967{ 965{
968 u32 val; 966 u32 val;
969 int i; 967 int i;
@@ -1220,8 +1218,7 @@ static void set_b1_regs(void)
1220 omap_writew(fi, OMAP1610_DMA_LCD_SRC_FI_B1_L); 1218 omap_writew(fi, OMAP1610_DMA_LCD_SRC_FI_B1_L);
1221} 1219}
1222 1220
1223static irqreturn_t lcd_dma_irq_handler(int irq, void *dev_id, 1221static irqreturn_t lcd_dma_irq_handler(int irq, void *dev_id)
1224 struct pt_regs *regs)
1225{ 1222{
1226 u16 w; 1223 u16 w;
1227 1224
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index f55f99ae58ae..8162eed8b500 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -783,8 +783,7 @@ void omap_free_gpio(int gpio)
783 * line's interrupt handler has been run, we may miss some nested 783 * line's interrupt handler has been run, we may miss some nested
784 * interrupts. 784 * interrupts.
785 */ 785 */
786static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, 786static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc)
787 struct pt_regs *regs)
788{ 787{
789 void __iomem *isr_reg = NULL; 788 void __iomem *isr_reg = NULL;
790 u32 isr; 789 u32 isr;
@@ -882,7 +881,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
882 continue; 881 continue;
883 } 882 }
884 883
885 desc_handle_irq(gpio_irq, d, regs); 884 desc_handle_irq(gpio_irq, d);
886 885
887 if (unlikely((d->status & IRQ_PENDING) && !d->depth)) { 886 if (unlikely((d->status & IRQ_PENDING) && !d->depth)) {
888 irq_mask = 1 << 887 irq_mask = 1 <<
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index ade9a0fa6ef6..ec50008a2df6 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -96,7 +96,7 @@ static void omap_mcbsp_dump_reg(u8 id)
96 DBG("***********************\n"); 96 DBG("***********************\n");
97} 97}
98 98
99static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id, struct pt_regs *regs) 99static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id)
100{ 100{
101 struct omap_mcbsp * mcbsp_tx = (struct omap_mcbsp *)(dev_id); 101 struct omap_mcbsp * mcbsp_tx = (struct omap_mcbsp *)(dev_id);
102 102
@@ -106,7 +106,7 @@ static irqreturn_t omap_mcbsp_tx_irq_handler(int irq, void *dev_id, struct pt_re
106 return IRQ_HANDLED; 106 return IRQ_HANDLED;
107} 107}
108 108
109static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id, struct pt_regs *regs) 109static irqreturn_t omap_mcbsp_rx_irq_handler(int irq, void *dev_id)
110{ 110{
111 struct omap_mcbsp * mcbsp_rx = (struct omap_mcbsp *)(dev_id); 111 struct omap_mcbsp * mcbsp_rx = (struct omap_mcbsp *)(dev_id);
112 112
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index cf6df3378d37..265310601161 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -194,8 +194,7 @@ unsigned long long sched_clock(void)
194 * issues with dynamic tick. In the dynamic tick case, we need to lock 194 * issues with dynamic tick. In the dynamic tick case, we need to lock
195 * with irqsave. 195 * with irqsave.
196 */ 196 */
197static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id, 197static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id)
198 struct pt_regs *regs)
199{ 198{
200 unsigned long now; 199 unsigned long now;
201 200
@@ -205,7 +204,7 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id,
205 while ((signed long)(now - omap_32k_last_tick) 204 while ((signed long)(now - omap_32k_last_tick)
206 >= OMAP_32K_TICKS_PER_HZ) { 205 >= OMAP_32K_TICKS_PER_HZ) {
207 omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ; 206 omap_32k_last_tick += OMAP_32K_TICKS_PER_HZ;
208 timer_tick(regs); 207 timer_tick();
209 } 208 }
210 209
211 /* Restart timer so we don't drift off due to modulo or dynamic tick. 210 /* Restart timer so we don't drift off due to modulo or dynamic tick.
@@ -218,19 +217,17 @@ static inline irqreturn_t _omap_32k_timer_interrupt(int irq, void *dev_id,
218 return IRQ_HANDLED; 217 return IRQ_HANDLED;
219} 218}
220 219
221static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id, 220static irqreturn_t omap_32k_timer_handler(int irq, void *dev_id)
222 struct pt_regs *regs)
223{ 221{
224 return _omap_32k_timer_interrupt(irq, dev_id, regs); 222 return _omap_32k_timer_interrupt(irq, dev_id);
225} 223}
226 224
227static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id, 225static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id)
228 struct pt_regs *regs)
229{ 226{
230 unsigned long flags; 227 unsigned long flags;
231 228
232 write_seqlock_irqsave(&xtime_lock, flags); 229 write_seqlock_irqsave(&xtime_lock, flags);
233 _omap_32k_timer_interrupt(irq, dev_id, regs); 230 _omap_32k_timer_interrupt(irq, dev_id);
234 write_sequnlock_irqrestore(&xtime_lock, flags); 231 write_sequnlock_irqrestore(&xtime_lock, flags);
235 232
236 return IRQ_HANDLED; 233 return IRQ_HANDLED;
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index dedbb449632e..a657a28f08db 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -90,7 +90,7 @@ void vfp_raise_sigfpe(unsigned int sicode, struct pt_regs *regs)
90 90
91 info.si_signo = SIGFPE; 91 info.si_signo = SIGFPE;
92 info.si_code = sicode; 92 info.si_code = sicode;
93 info.si_addr = (void *)(instruction_pointer(regs) - 4); 93 info.si_addr = (void __user *)(instruction_pointer(regs) - 4);
94 94
95 /* 95 /*
96 * This is the same as NWFPE, because it's not clear what 96 * This is the same as NWFPE, because it's not clear what
diff --git a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c
index 07907b6ecb63..93293d04b303 100644
--- a/arch/arm26/kernel/armksyms.c
+++ b/arch/arm26/kernel/armksyms.c
@@ -202,14 +202,6 @@ EXPORT_SYMBOL(_find_next_zero_bit_le);
202EXPORT_SYMBOL(elf_platform); 202EXPORT_SYMBOL(elf_platform);
203EXPORT_SYMBOL(elf_hwcap); 203EXPORT_SYMBOL(elf_hwcap);
204 204
205 /* syscalls */
206EXPORT_SYMBOL(sys_write);
207EXPORT_SYMBOL(sys_read);
208EXPORT_SYMBOL(sys_lseek);
209EXPORT_SYMBOL(sys_open);
210EXPORT_SYMBOL(sys_exit);
211EXPORT_SYMBOL(sys_wait4);
212
213#ifdef CONFIG_PREEMPT 205#ifdef CONFIG_PREEMPT
214EXPORT_SYMBOL(kernel_flag); 206EXPORT_SYMBOL(kernel_flag);
215#endif 207#endif
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index 3e56b9f4358a..5a247ba71a72 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -124,15 +124,15 @@ unsigned long long sched_clock(void)
124 * 124 *
125 * In UP mode, it is invoked from the (global) timer_interrupt. 125 * In UP mode, it is invoked from the (global) timer_interrupt.
126 */ 126 */
127static void local_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 127static void local_timer_interrupt(int irq, void *dev_id)
128{ 128{
129 if (current->pid) 129 if (current->pid)
130 profile_tick(CPU_PROFILING, regs); 130 profile_tick(CPU_PROFILING);
131 update_process_times(user_mode(regs)); 131 update_process_times(user_mode(get_irq_regs()));
132} 132}
133 133
134static irqreturn_t 134static irqreturn_t
135timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 135timer_interrupt(int irq, void *dev_id)
136{ 136{
137 unsigned int count; 137 unsigned int count;
138 138
@@ -157,7 +157,7 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
157 * 157 *
158 * SMP is not supported yet. 158 * SMP is not supported yet.
159 */ 159 */
160 local_timer_interrupt(irq, dev_id, regs); 160 local_timer_interrupt(irq, dev_id);
161 161
162 return IRQ_HANDLED; 162 return IRQ_HANDLED;
163} 163}
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index 7da9c5f7a0eb..4dff1f988900 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -102,8 +102,7 @@ struct irq_chip eim_chip = {
102 .set_type = eim_set_irq_type, 102 .set_type = eim_set_irq_type,
103}; 103};
104 104
105static void demux_eim_irq(unsigned int irq, struct irq_desc *desc, 105static void demux_eim_irq(unsigned int irq, struct irq_desc *desc)
106 struct pt_regs *regs)
107{ 106{
108 struct at32_sm *sm = desc->handler_data; 107 struct at32_sm *sm = desc->handler_data;
109 struct irq_desc *ext_desc; 108 struct irq_desc *ext_desc;
@@ -121,7 +120,7 @@ static void demux_eim_irq(unsigned int irq, struct irq_desc *desc,
121 120
122 ext_irq = i + sm->eim_first_irq; 121 ext_irq = i + sm->eim_first_irq;
123 ext_desc = irq_desc + ext_irq; 122 ext_desc = irq_desc + ext_irq;
124 ext_desc->handle_irq(ext_irq, ext_desc, regs); 123 ext_desc->handle_irq(ext_irq, ext_desc);
125 } 124 }
126 125
127 spin_unlock(&sm->lock); 126 spin_unlock(&sm->lock);
diff --git a/arch/avr32/mach-at32ap/intc.c b/arch/avr32/mach-at32ap/intc.c
index 74f8c9f2f03d..eb87a18ad7b2 100644
--- a/arch/avr32/mach-at32ap/intc.c
+++ b/arch/avr32/mach-at32ap/intc.c
@@ -52,16 +52,19 @@ static struct intc intc0 = {
52asmlinkage void do_IRQ(int level, struct pt_regs *regs) 52asmlinkage void do_IRQ(int level, struct pt_regs *regs)
53{ 53{
54 struct irq_desc *desc; 54 struct irq_desc *desc;
55 struct pt_regs *old_regs;
55 unsigned int irq; 56 unsigned int irq;
56 unsigned long status_reg; 57 unsigned long status_reg;
57 58
58 local_irq_disable(); 59 local_irq_disable();
59 60
61 old_regs = set_irq_regs(regs);
62
60 irq_enter(); 63 irq_enter();
61 64
62 irq = intc_readl(&intc0, INTCAUSE0 - 4 * level); 65 irq = intc_readl(&intc0, INTCAUSE0 - 4 * level);
63 desc = irq_desc + irq; 66 desc = irq_desc + irq;
64 desc->handle_irq(irq, desc, regs); 67 desc->handle_irq(irq, desc);
65 68
66 /* 69 /*
67 * Clear all interrupt level masks so that we may handle 70 * Clear all interrupt level masks so that we may handle
@@ -75,6 +78,8 @@ asmlinkage void do_IRQ(int level, struct pt_regs *regs)
75 sysreg_write(SR, status_reg); 78 sysreg_write(SR, status_reg);
76 79
77 irq_exit(); 80 irq_exit();
81
82 set_irq_regs(old_regs);
78} 83}
79 84
80void __init init_IRQ(void) 85void __init init_IRQ(void)
diff --git a/arch/i386/Kconfig.cpu b/arch/i386/Kconfig.cpu
index 21c9a4e71104..fc4f2abccf06 100644
--- a/arch/i386/Kconfig.cpu
+++ b/arch/i386/Kconfig.cpu
@@ -7,6 +7,7 @@ choice
7 7
8config M386 8config M386
9 bool "386" 9 bool "386"
10 depends on !UML
10 ---help--- 11 ---help---
11 This is the processor type of your CPU. This information is used for 12 This is the processor type of your CPU. This information is used for
12 optimizing purposes. In order to compile a kernel that can run on 13 optimizing purposes. In order to compile a kernel that can run on
@@ -301,7 +302,7 @@ config X86_USE_PPRO_CHECKSUM
301 302
302config X86_USE_3DNOW 303config X86_USE_3DNOW
303 bool 304 bool
304 depends on MCYRIXIII || MK7 || MGEODE_LX 305 depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML
305 default y 306 default y
306 307
307config X86_OOSTORE 308config X86_OOSTORE
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 7d500da0e63b..2fd4b7d927c2 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -1197,7 +1197,7 @@ inline void smp_local_timer_interrupt(void)
1197{ 1197{
1198 profile_tick(CPU_PROFILING); 1198 profile_tick(CPU_PROFILING);
1199#ifdef CONFIG_SMP 1199#ifdef CONFIG_SMP
1200 update_process_times(user_mode_vm(irq_regs)); 1200 update_process_times(user_mode_vm(get_irq_regs()));
1201#endif 1201#endif
1202 1202
1203 /* 1203 /*
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index b7287fb499f3..27bceaf5ce40 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -1184,8 +1184,8 @@ static int __assign_irq_vector(int irq)
1184 1184
1185 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 1185 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
1186 1186
1187 if (IO_APIC_VECTOR(irq) > 0) 1187 if (irq_vector[irq] > 0)
1188 return IO_APIC_VECTOR(irq); 1188 return irq_vector[irq];
1189 1189
1190 current_vector += 8; 1190 current_vector += 8;
1191 if (current_vector == SYSCALL_VECTOR) 1191 if (current_vector == SYSCALL_VECTOR)
@@ -1199,7 +1199,7 @@ static int __assign_irq_vector(int irq)
1199 } 1199 }
1200 1200
1201 vector = current_vector; 1201 vector = current_vector;
1202 IO_APIC_VECTOR(irq) = vector; 1202 irq_vector[irq] = vector;
1203 1203
1204 return vector; 1204 return vector;
1205} 1205}
@@ -1967,7 +1967,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
1967 * operation to prevent an edge-triggered interrupt escaping meanwhile. 1967 * operation to prevent an edge-triggered interrupt escaping meanwhile.
1968 * The idea is from Manfred Spraul. --macro 1968 * The idea is from Manfred Spraul. --macro
1969 */ 1969 */
1970 i = IO_APIC_VECTOR(irq); 1970 i = irq_vector[irq];
1971 1971
1972 v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1)); 1972 v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
1973 1973
@@ -1984,7 +1984,7 @@ static void ack_ioapic_quirk_irq(unsigned int irq)
1984 1984
1985static int ioapic_retrigger_irq(unsigned int irq) 1985static int ioapic_retrigger_irq(unsigned int irq)
1986{ 1986{
1987 send_IPI_self(IO_APIC_VECTOR(irq)); 1987 send_IPI_self(irq_vector[irq]);
1988 1988
1989 return 1; 1989 return 1;
1990} 1990}
@@ -2020,7 +2020,7 @@ static inline void init_IO_APIC_traps(void)
2020 */ 2020 */
2021 for (irq = 0; irq < NR_IRQS ; irq++) { 2021 for (irq = 0; irq < NR_IRQS ; irq++) {
2022 int tmp = irq; 2022 int tmp = irq;
2023 if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) { 2023 if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
2024 /* 2024 /*
2025 * Hmm.. We don't have an entry for this, 2025 * Hmm.. We don't have an entry for this,
2026 * so default to an old-fashioned 8259 2026 * so default to an old-fashioned 8259
@@ -2594,7 +2594,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
2594} 2594}
2595#endif 2595#endif
2596 2596
2597static struct hw_interrupt_type ht_irq_chip = { 2597static struct irq_chip ht_irq_chip = {
2598 .name = "PCI-HT", 2598 .name = "PCI-HT",
2599 .mask = mask_ht_irq, 2599 .mask = mask_ht_irq,
2600 .unmask = unmask_ht_irq, 2600 .unmask = unmask_ht_irq,
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c
index 9b9479768d5e..c4d0291b519f 100644
--- a/arch/i386/kernel/microcode.c
+++ b/arch/i386/kernel/microcode.c
@@ -656,14 +656,18 @@ static struct attribute_group mc_attr_group = {
656 656
657static int mc_sysdev_add(struct sys_device *sys_dev) 657static int mc_sysdev_add(struct sys_device *sys_dev)
658{ 658{
659 int cpu = sys_dev->id; 659 int err, cpu = sys_dev->id;
660 struct ucode_cpu_info *uci = ucode_cpu_info + cpu; 660 struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
661 661
662 if (!cpu_online(cpu)) 662 if (!cpu_online(cpu))
663 return 0; 663 return 0;
664
664 pr_debug("Microcode:CPU %d added\n", cpu); 665 pr_debug("Microcode:CPU %d added\n", cpu);
665 memset(uci, 0, sizeof(*uci)); 666 memset(uci, 0, sizeof(*uci));
666 sysfs_create_group(&sys_dev->kobj, &mc_attr_group); 667
668 err = sysfs_create_group(&sys_dev->kobj, &mc_attr_group);
669 if (err)
670 return err;
667 671
668 microcode_init_cpu(cpu); 672 microcode_init_cpu(cpu);
669 return 0; 673 return 0;
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 000cf03751fe..519e63c3c130 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1083,16 +1083,15 @@ static unsigned long __init setup_memory(void)
1083 1083
1084void __init zone_sizes_init(void) 1084void __init zone_sizes_init(void)
1085{ 1085{
1086 unsigned long max_zone_pfns[MAX_NR_ZONES];
1087 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
1088 max_zone_pfns[ZONE_DMA] =
1089 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
1090 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
1086#ifdef CONFIG_HIGHMEM 1091#ifdef CONFIG_HIGHMEM
1087 unsigned long max_zone_pfns[MAX_NR_ZONES] = { 1092 max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
1088 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT,
1089 max_low_pfn,
1090 highend_pfn};
1091 add_active_range(0, 0, highend_pfn); 1093 add_active_range(0, 0, highend_pfn);
1092#else 1094#else
1093 unsigned long max_zone_pfns[MAX_NR_ZONES] = {
1094 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT,
1095 max_low_pfn};
1096 add_active_range(0, 0, max_low_pfn); 1095 add_active_range(0, 0, max_low_pfn);
1097#endif 1096#endif
1098 1097
diff --git a/arch/i386/kernel/syscall_table.S b/arch/i386/kernel/syscall_table.S
index 7e639f78b0b9..2697e9210e92 100644
--- a/arch/i386/kernel/syscall_table.S
+++ b/arch/i386/kernel/syscall_table.S
@@ -318,3 +318,4 @@ ENTRY(sys_call_table)
318 .long sys_vmsplice 318 .long sys_vmsplice
319 .long sys_move_pages 319 .long sys_move_pages
320 .long sys_getcpu 320 .long sys_getcpu
321 .long sys_epoll_pwait
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index 3f221f5eb47e..78af572fd17c 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -201,8 +201,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
201 high bit of the PPI port B (0x61). Note that some PS/2s, 201 high bit of the PPI port B (0x61). Note that some PS/2s,
202 notably the 55SX, work fine if this is removed. */ 202 notably the 55SX, work fine if this is removed. */
203 203
204 irq = inb_p( 0x61 ); /* read the current state */ 204 u8 irq_v = inb_p( 0x61 ); /* read the current state */
205 outb_p( irq|0x80, 0x61 ); /* reset the IRQ */ 205 outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */
206 } 206 }
207 207
208 write_sequnlock(&xtime_lock); 208 write_sequnlock(&xtime_lock);
diff --git a/arch/i386/lib/usercopy.c b/arch/i386/lib/usercopy.c
index 08502fc6d0cb..258df6b4d7d7 100644
--- a/arch/i386/lib/usercopy.c
+++ b/arch/i386/lib/usercopy.c
@@ -179,7 +179,7 @@ __clear_user(void __user *to, unsigned long n)
179EXPORT_SYMBOL(__clear_user); 179EXPORT_SYMBOL(__clear_user);
180 180
181/** 181/**
182 * strlen_user: - Get the size of a string in user space. 182 * strnlen_user: - Get the size of a string in user space.
183 * @s: The string to measure. 183 * @s: The string to measure.
184 * @n: The maximum valid length 184 * @n: The maximum valid length
185 * 185 *
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index 455597db84df..ddbdb0336f28 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -356,11 +356,12 @@ void __init numa_kva_reserve(void)
356void __init zone_sizes_init(void) 356void __init zone_sizes_init(void)
357{ 357{
358 int nid; 358 int nid;
359 unsigned long max_zone_pfns[MAX_NR_ZONES] = { 359 unsigned long max_zone_pfns[MAX_NR_ZONES];
360 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT, 360 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
361 max_low_pfn, 361 max_zone_pfns[ZONE_DMA] =
362 highend_pfn 362 virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
363 }; 363 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
364 max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
364 365
365 /* If SRAT has not registered memory, register it now */ 366 /* If SRAT has not registered memory, register it now */
366 if (find_max_pfn_with_active_regions() == 0) { 367 if (find_max_pfn_with_active_regions() == 0) {
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index 47f02af74be3..dbc4aae91959 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -1141,10 +1141,6 @@ static int pirq_enable_irq(struct pci_dev *dev)
1141 } 1141 }
1142 dev = temp_dev; 1142 dev = temp_dev;
1143 if (irq >= 0) { 1143 if (irq >= 0) {
1144#ifdef CONFIG_PCI_MSI
1145 if (!platform_legacy_irq(irq))
1146 irq = IO_APIC_VECTOR(irq);
1147#endif
1148 printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n", 1144 printk(KERN_INFO "PCI->APIC IRQ transform: %s[%c] -> IRQ %d\n",
1149 pci_name(dev), 'A' + pin, irq); 1145 pci_name(dev), 'A' + pin, irq);
1150 dev->irq = irq; 1146 dev->irq = irq;
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
index e1a1b11473e2..424e9257c9a0 100644
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -54,7 +54,7 @@ static int simeth_close(struct net_device *dev);
54static int simeth_tx(struct sk_buff *skb, struct net_device *dev); 54static int simeth_tx(struct sk_buff *skb, struct net_device *dev);
55static int simeth_rx(struct net_device *dev); 55static int simeth_rx(struct net_device *dev);
56static struct net_device_stats *simeth_get_stats(struct net_device *dev); 56static struct net_device_stats *simeth_get_stats(struct net_device *dev);
57static irqreturn_t simeth_interrupt(int irq, void *dev_id, struct pt_regs * regs); 57static irqreturn_t simeth_interrupt(int irq, void *dev_id);
58static void set_multicast_list(struct net_device *dev); 58static void set_multicast_list(struct net_device *dev);
59static int simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr); 59static int simeth_device_event(struct notifier_block *this,unsigned long event, void *ptr);
60 60
@@ -87,7 +87,7 @@ static int simeth_debug; /* set to 1 to get debug information */
87 */ 87 */
88static struct notifier_block simeth_dev_notifier = { 88static struct notifier_block simeth_dev_notifier = {
89 simeth_device_event, 89 simeth_device_event,
90 0 90 NULL
91}; 91};
92 92
93 93
@@ -497,7 +497,7 @@ simeth_rx(struct net_device *dev)
497 * Interrupt handler (Yes, we can do it too !!!) 497 * Interrupt handler (Yes, we can do it too !!!)
498 */ 498 */
499static irqreturn_t 499static irqreturn_t
500simeth_interrupt(int irq, void *dev_id, struct pt_regs * regs) 500simeth_interrupt(int irq, void *dev_id)
501{ 501{
502 struct net_device *dev = dev_id; 502 struct net_device *dev = dev_id;
503 503
diff --git a/arch/ia64/hp/sim/simscsi.c b/arch/ia64/hp/sim/simscsi.c
index 8f0a16a79a67..bb87682bbb1b 100644
--- a/arch/ia64/hp/sim/simscsi.c
+++ b/arch/ia64/hp/sim/simscsi.c
@@ -103,7 +103,7 @@ simscsi_interrupt (unsigned long val)
103 103
104 while ((sc = queue[rd].sc) != 0) { 104 while ((sc = queue[rd].sc) != 0) {
105 atomic_dec(&num_reqs); 105 atomic_dec(&num_reqs);
106 queue[rd].sc = 0; 106 queue[rd].sc = NULL;
107 if (DBG) 107 if (DBG)
108 printk("simscsi_interrupt: done with %ld\n", sc->serial_number); 108 printk("simscsi_interrupt: done with %ld\n", sc->serial_number);
109 (*sc->scsi_done)(sc); 109 (*sc->scsi_done)(sc);
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 246eb3d3757a..caab986af70c 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -92,7 +92,7 @@ static struct serial_uart_config uart_config[] = {
92 { "ST16650V2", 32, UART_CLEAR_FIFO | UART_USE_FIFO | 92 { "ST16650V2", 32, UART_CLEAR_FIFO | UART_USE_FIFO |
93 UART_STARTECH }, 93 UART_STARTECH },
94 { "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO}, 94 { "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO},
95 { 0, 0} 95 { NULL, 0}
96}; 96};
97 97
98struct tty_driver *hp_simserial_driver; 98struct tty_driver *hp_simserial_driver;
@@ -130,7 +130,7 @@ static void rs_start(struct tty_struct *tty)
130#endif 130#endif
131} 131}
132 132
133static void receive_chars(struct tty_struct *tty, struct pt_regs *regs) 133static void receive_chars(struct tty_struct *tty)
134{ 134{
135 unsigned char ch; 135 unsigned char ch;
136 static unsigned char seen_esc = 0; 136 static unsigned char seen_esc = 0;
@@ -152,7 +152,7 @@ static void receive_chars(struct tty_struct *tty, struct pt_regs *regs)
152 ch = ia64_ssc(0, 0, 0, 0, 152 ch = ia64_ssc(0, 0, 0, 0,
153 SSC_GETCHAR); 153 SSC_GETCHAR);
154 while (!ch); 154 while (!ch);
155 handle_sysrq(ch, regs, NULL); 155 handle_sysrq(ch, NULL);
156 } 156 }
157#endif 157#endif
158 seen_esc = 0; 158 seen_esc = 0;
@@ -170,7 +170,7 @@ static void receive_chars(struct tty_struct *tty, struct pt_regs *regs)
170/* 170/*
171 * This is the serial driver's interrupt routine for a single port 171 * This is the serial driver's interrupt routine for a single port
172 */ 172 */
173static irqreturn_t rs_interrupt_single(int irq, void *dev_id, struct pt_regs * regs) 173static irqreturn_t rs_interrupt_single(int irq, void *dev_id)
174{ 174{
175 struct async_struct * info; 175 struct async_struct * info;
176 176
@@ -187,7 +187,7 @@ static irqreturn_t rs_interrupt_single(int irq, void *dev_id, struct pt_regs * r
187 * pretty simple in our case, because we only get interrupts 187 * pretty simple in our case, because we only get interrupts
188 * on inbound traffic 188 * on inbound traffic
189 */ 189 */
190 receive_chars(info->tty, regs); 190 receive_chars(info->tty);
191 return IRQ_HANDLED; 191 return IRQ_HANDLED;
192} 192}
193 193
@@ -555,7 +555,7 @@ static void shutdown(struct async_struct * info)
555 555
556 if (info->xmit.buf) { 556 if (info->xmit.buf) {
557 free_page((unsigned long) info->xmit.buf); 557 free_page((unsigned long) info->xmit.buf);
558 info->xmit.buf = 0; 558 info->xmit.buf = NULL;
559 } 559 }
560 560
561 if (info->tty) set_bit(TTY_IO_ERROR, &info->tty->flags); 561 if (info->tty) set_bit(TTY_IO_ERROR, &info->tty->flags);
@@ -628,7 +628,7 @@ static void rs_close(struct tty_struct *tty, struct file * filp)
628 if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty); 628 if (tty->driver->flush_buffer) tty->driver->flush_buffer(tty);
629 if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty); 629 if (tty->ldisc.flush_buffer) tty->ldisc.flush_buffer(tty);
630 info->event = 0; 630 info->event = 0;
631 info->tty = 0; 631 info->tty = NULL;
632 if (info->blocked_open) { 632 if (info->blocked_open) {
633 if (info->close_delay) 633 if (info->close_delay)
634 schedule_timeout_interruptible(info->close_delay); 634 schedule_timeout_interruptible(info->close_delay);
@@ -668,7 +668,7 @@ static void rs_hangup(struct tty_struct *tty)
668 info->event = 0; 668 info->event = 0;
669 state->count = 0; 669 state->count = 0;
670 info->flags &= ~ASYNC_NORMAL_ACTIVE; 670 info->flags &= ~ASYNC_NORMAL_ACTIVE;
671 info->tty = 0; 671 info->tty = NULL;
672 wake_up_interruptible(&info->open_wait); 672 wake_up_interruptible(&info->open_wait);
673} 673}
674 674
@@ -714,7 +714,7 @@ startup(struct async_struct *info)
714{ 714{
715 unsigned long flags; 715 unsigned long flags;
716 int retval=0; 716 int retval=0;
717 irqreturn_t (*handler)(int, void *, struct pt_regs *); 717 irq_handler_t handler;
718 struct serial_state *state= info->state; 718 struct serial_state *state= info->state;
719 unsigned long page; 719 unsigned long page;
720 720
@@ -769,7 +769,7 @@ startup(struct async_struct *info)
769 /* 769 /*
770 * Insert serial port into IRQ chain. 770 * Insert serial port into IRQ chain.
771 */ 771 */
772 info->prev_port = 0; 772 info->prev_port = NULL;
773 info->next_port = IRQ_ports[state->irq]; 773 info->next_port = IRQ_ports[state->irq];
774 if (info->next_port) 774 if (info->next_port)
775 info->next_port->prev_port = info; 775 info->next_port->prev_port = info;
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 7852382de2fa..f07c0864b0b4 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -194,8 +194,11 @@ void fixup_irqs(void)
194 */ 194 */
195 for (irq=0; irq < NR_IRQS; irq++) { 195 for (irq=0; irq < NR_IRQS; irq++) {
196 if (vectors_in_migration[irq]) { 196 if (vectors_in_migration[irq]) {
197 struct pt_regs *old_regs = set_irq_regs(NULL);
198
197 vectors_in_migration[irq]=0; 199 vectors_in_migration[irq]=0;
198 __do_IRQ(irq, NULL); 200 __do_IRQ(irq);
201 set_irq_regs(old_regs);
199 } 202 }
200 } 203 }
201 204
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index 7fd3ef9e064d..68339dd0c9e2 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -226,6 +226,8 @@ void ia64_process_pending_intr(void)
226 */ 226 */
227 while (vector != IA64_SPURIOUS_INT_VECTOR) { 227 while (vector != IA64_SPURIOUS_INT_VECTOR) {
228 if (!IS_RESCHEDULE(vector)) { 228 if (!IS_RESCHEDULE(vector)) {
229 struct pt_regs *old_regs = set_irq_regs(NULL);
230
229 ia64_setreg(_IA64_REG_CR_TPR, vector); 231 ia64_setreg(_IA64_REG_CR_TPR, vector);
230 ia64_srlz_d(); 232 ia64_srlz_d();
231 233
@@ -236,7 +238,8 @@ void ia64_process_pending_intr(void)
236 * Probably could shared code. 238 * Probably could shared code.
237 */ 239 */
238 vectors_in_migration[local_vector_to_irq(vector)]=0; 240 vectors_in_migration[local_vector_to_irq(vector)]=0;
239 __do_IRQ(local_vector_to_irq(vector), NULL); 241 __do_IRQ(local_vector_to_irq(vector));
242 set_irq_regs(old_regs);
240 243
241 /* 244 /*
242 * Disable interrupts and send EOI 245 * Disable interrupts and send EOI
@@ -253,7 +256,7 @@ void ia64_process_pending_intr(void)
253 256
254 257
255#ifdef CONFIG_SMP 258#ifdef CONFIG_SMP
256extern irqreturn_t handle_IPI (int irq, void *dev_id, struct pt_regs *regs); 259extern irqreturn_t handle_IPI (int irq, void *dev_id);
257 260
258static struct irqaction ipi_irqaction = { 261static struct irqaction ipi_irqaction = {
259 .handler = handle_IPI, 262 .handler = handle_IPI,
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index daf977ff2920..82deaa3a7c48 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -233,6 +233,7 @@ paging_init (void)
233 efi_memmap_walk(count_pages, &num_physpages); 233 efi_memmap_walk(count_pages, &num_physpages);
234 234
235 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT; 235 max_dma = virt_to_phys((void *) MAX_DMA_ADDRESS) >> PAGE_SHIFT;
236 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
236 max_zone_pfns[ZONE_DMA] = max_dma; 237 max_zone_pfns[ZONE_DMA] = max_dma;
237 max_zone_pfns[ZONE_NORMAL] = max_low_pfn; 238 max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
238 239
diff --git a/arch/ia64/mm/discontig.c b/arch/ia64/mm/discontig.c
index d497b6b0f5b2..96722cb1b49d 100644
--- a/arch/ia64/mm/discontig.c
+++ b/arch/ia64/mm/discontig.c
@@ -709,6 +709,7 @@ void __init paging_init(void)
709 max_pfn = mem_data[node].max_pfn; 709 max_pfn = mem_data[node].max_pfn;
710 } 710 }
711 711
712 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
712 max_zone_pfns[ZONE_DMA] = max_dma; 713 max_zone_pfns[ZONE_DMA] = max_dma;
713 max_zone_pfns[ZONE_NORMAL] = max_pfn; 714 max_zone_pfns[ZONE_NORMAL] = max_pfn;
714 free_area_init_nodes(max_zone_pfns); 715 free_area_init_nodes(max_zone_pfns);
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c
index 96fb81e6321f..abca6bd7962f 100644
--- a/arch/ia64/sn/kernel/huberror.c
+++ b/arch/ia64/sn/kernel/huberror.c
@@ -22,7 +22,7 @@
22void hubiio_crb_error_handler(struct hubdev_info *hubdev_info); 22void hubiio_crb_error_handler(struct hubdev_info *hubdev_info);
23extern void bte_crb_error_handler(cnodeid_t, int, int, ioerror_t *, 23extern void bte_crb_error_handler(cnodeid_t, int, int, ioerror_t *,
24 int); 24 int);
25static irqreturn_t hub_eint_handler(int irq, void *arg, struct pt_regs *ep) 25static irqreturn_t hub_eint_handler(int irq, void *arg)
26{ 26{
27 struct hubdev_info *hubdev_info; 27 struct hubdev_info *hubdev_info;
28 struct ia64_sal_retval ret_stuff; 28 struct ia64_sal_retval ret_stuff;
@@ -178,7 +178,7 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info)
178 */ 178 */
179void hub_error_init(struct hubdev_info *hubdev_info) 179void hub_error_init(struct hubdev_info *hubdev_info)
180{ 180{
181 if (request_irq(SGI_II_ERROR, (void *)hub_eint_handler, IRQF_SHARED, 181 if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED,
182 "SN_hub_error", (void *)hubdev_info)) 182 "SN_hub_error", (void *)hubdev_info))
183 printk("hub_error_init: Failed to request_irq for 0x%p\n", 183 printk("hub_error_init: Failed to request_irq for 0x%p\n",
184 hubdev_info); 184 hubdev_info);
diff --git a/arch/ia64/sn/kernel/sn2/timer_interrupt.c b/arch/ia64/sn/kernel/sn2/timer_interrupt.c
index fa7f69945917..103d6ea8e94b 100644
--- a/arch/ia64/sn/kernel/sn2/timer_interrupt.c
+++ b/arch/ia64/sn/kernel/sn2/timer_interrupt.c
@@ -36,7 +36,7 @@ extern irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs);
36 36
37#define SN_LB_INT_WAR_INTERVAL 100 37#define SN_LB_INT_WAR_INTERVAL 100
38 38
39void sn_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 39void sn_timer_interrupt(int irq, void *dev_id)
40{ 40{
41 /* LED blinking */ 41 /* LED blinking */
42 if (!pda->hb_count--) { 42 if (!pda->hb_count--) {
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c
index 4d026f9dd98b..fa96dfc0e1aa 100644
--- a/arch/ia64/sn/kernel/xpc_main.c
+++ b/arch/ia64/sn/kernel/xpc_main.c
@@ -222,7 +222,7 @@ xpc_timeout_partition_disengage_request(unsigned long data)
222 * Notify the heartbeat check thread that an IRQ has been received. 222 * Notify the heartbeat check thread that an IRQ has been received.
223 */ 223 */
224static irqreturn_t 224static irqreturn_t
225xpc_act_IRQ_handler(int irq, void *dev_id, struct pt_regs *regs) 225xpc_act_IRQ_handler(int irq, void *dev_id)
226{ 226{
227 atomic_inc(&xpc_act_IRQ_rcvd); 227 atomic_inc(&xpc_act_IRQ_rcvd);
228 wake_up_interruptible(&xpc_act_IRQ_wq); 228 wake_up_interruptible(&xpc_act_IRQ_wq);
@@ -607,12 +607,9 @@ xpc_activate_partition(struct xpc_partition *part)
607 * irq - Interrupt ReQuest number. NOT USED. 607 * irq - Interrupt ReQuest number. NOT USED.
608 * 608 *
609 * dev_id - partid of IPI's potential sender. 609 * dev_id - partid of IPI's potential sender.
610 *
611 * regs - processor's context before the processor entered
612 * interrupt code. NOT USED.
613 */ 610 */
614irqreturn_t 611irqreturn_t
615xpc_notify_IRQ_handler(int irq, void *dev_id, struct pt_regs *regs) 612xpc_notify_IRQ_handler(int irq, void *dev_id)
616{ 613{
617 partid_t partid = (partid_t) (u64) dev_id; 614 partid_t partid = (partid_t) (u64) dev_id;
618 struct xpc_partition *part = &xpc_partitions[partid]; 615 struct xpc_partition *part = &xpc_partitions[partid];
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_ate.c b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
index 5eb1e1e078b4..935029fc400d 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_ate.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_ate.c
@@ -126,7 +126,7 @@ int pcibr_ate_alloc(struct pcibus_info *pcibus_info, int count)
126 * Setup an Address Translation Entry as specified. Use either the Bridge 126 * Setup an Address Translation Entry as specified. Use either the Bridge
127 * internal maps or the external map RAM, as appropriate. 127 * internal maps or the external map RAM, as appropriate.
128 */ 128 */
129static inline u64 *pcibr_ate_addr(struct pcibus_info *pcibus_info, 129static inline u64 __iomem *pcibr_ate_addr(struct pcibus_info *pcibus_info,
130 int ate_index) 130 int ate_index)
131{ 131{
132 if (ate_index < pcibus_info->pbi_int_ate_size) { 132 if (ate_index < pcibus_info->pbi_int_ate_size) {
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index 838c93c9a16a..27dd7df0f446 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -95,7 +95,7 @@ u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
95 * bridge sends an error interrupt. 95 * bridge sends an error interrupt.
96 */ 96 */
97static irqreturn_t 97static irqreturn_t
98pcibr_error_intr_handler(int irq, void *arg, struct pt_regs *regs) 98pcibr_error_intr_handler(int irq, void *arg)
99{ 99{
100 struct pcibus_info *soft = (struct pcibus_info *)arg; 100 struct pcibus_info *soft = (struct pcibus_info *)arg;
101 101
@@ -138,7 +138,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
138 /* 138 /*
139 * register the bridge's error interrupt handler 139 * register the bridge's error interrupt handler
140 */ 140 */
141 if (request_irq(SGI_PCIASIC_ERROR, (void *)pcibr_error_intr_handler, 141 if (request_irq(SGI_PCIASIC_ERROR, pcibr_error_intr_handler,
142 IRQF_SHARED, "PCIBR error", (void *)(soft))) { 142 IRQF_SHARED, "PCIBR error", (void *)(soft))) {
143 printk(KERN_WARNING 143 printk(KERN_WARNING
144 "pcibr cannot allocate interrupt for error handler\n"); 144 "pcibr cannot allocate interrupt for error handler\n");
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index 0e81f68aaf8e..46e16dcf5971 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -53,7 +53,7 @@
53 */ 53 */
54 54
55static void inline 55static void inline
56tioce_mmr_war_pre(struct tioce_kernel *kern, void *mmr_addr) 56tioce_mmr_war_pre(struct tioce_kernel *kern, void __iomem *mmr_addr)
57{ 57{
58 u64 mmr_base; 58 u64 mmr_base;
59 u64 mmr_offset; 59 u64 mmr_offset;
@@ -62,7 +62,7 @@ tioce_mmr_war_pre(struct tioce_kernel *kern, void *mmr_addr)
62 return; 62 return;
63 63
64 mmr_base = kern->ce_common->ce_pcibus.bs_base; 64 mmr_base = kern->ce_common->ce_pcibus.bs_base;
65 mmr_offset = (u64)mmr_addr - mmr_base; 65 mmr_offset = (unsigned long)mmr_addr - mmr_base;
66 66
67 if (mmr_offset < 0x45000) { 67 if (mmr_offset < 0x45000) {
68 u64 mmr_war_offset; 68 u64 mmr_war_offset;
@@ -79,7 +79,7 @@ tioce_mmr_war_pre(struct tioce_kernel *kern, void *mmr_addr)
79} 79}
80 80
81static void inline 81static void inline
82tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr) 82tioce_mmr_war_post(struct tioce_kernel *kern, void __iomem *mmr_addr)
83{ 83{
84 u64 mmr_base; 84 u64 mmr_base;
85 u64 mmr_offset; 85 u64 mmr_offset;
@@ -88,7 +88,7 @@ tioce_mmr_war_post(struct tioce_kernel *kern, void *mmr_addr)
88 return; 88 return;
89 89
90 mmr_base = kern->ce_common->ce_pcibus.bs_base; 90 mmr_base = kern->ce_common->ce_pcibus.bs_base;
91 mmr_offset = (u64)mmr_addr - mmr_base; 91 mmr_offset = (unsigned long)mmr_addr - mmr_base;
92 92
93 if (mmr_offset < 0x45000) { 93 if (mmr_offset < 0x45000) {
94 if (mmr_offset == 0x100) 94 if (mmr_offset == 0x100)
@@ -223,7 +223,7 @@ tioce_dma_d64(unsigned long ct_addr, int dma_flags)
223 * @pci_dev. 223 * @pci_dev.
224 */ 224 */
225static inline void 225static inline void
226pcidev_to_tioce(struct pci_dev *pdev, struct tioce **base, 226pcidev_to_tioce(struct pci_dev *pdev, struct tioce __iomem **base,
227 struct tioce_kernel **kernel, int *port) 227 struct tioce_kernel **kernel, int *port)
228{ 228{
229 struct pcidev_info *pcidev_info; 229 struct pcidev_info *pcidev_info;
@@ -235,7 +235,7 @@ pcidev_to_tioce(struct pci_dev *pdev, struct tioce **base,
235 ce_kernel = (struct tioce_kernel *)ce_common->ce_kernel_private; 235 ce_kernel = (struct tioce_kernel *)ce_common->ce_kernel_private;
236 236
237 if (base) 237 if (base)
238 *base = (struct tioce *)ce_common->ce_pcibus.bs_base; 238 *base = (struct tioce __iomem *)ce_common->ce_pcibus.bs_base;
239 if (kernel) 239 if (kernel)
240 *kernel = ce_kernel; 240 *kernel = ce_kernel;
241 241
@@ -275,13 +275,13 @@ tioce_alloc_map(struct tioce_kernel *ce_kern, int type, int port,
275 u64 pagesize; 275 u64 pagesize;
276 int msi_capable, msi_wanted; 276 int msi_capable, msi_wanted;
277 u64 *ate_shadow; 277 u64 *ate_shadow;
278 u64 *ate_reg; 278 u64 __iomem *ate_reg;
279 u64 addr; 279 u64 addr;
280 struct tioce *ce_mmr; 280 struct tioce __iomem *ce_mmr;
281 u64 bus_base; 281 u64 bus_base;
282 struct tioce_dmamap *map; 282 struct tioce_dmamap *map;
283 283
284 ce_mmr = (struct tioce *)ce_kern->ce_common->ce_pcibus.bs_base; 284 ce_mmr = (struct tioce __iomem *)ce_kern->ce_common->ce_pcibus.bs_base;
285 285
286 switch (type) { 286 switch (type) {
287 case TIOCE_ATE_M32: 287 case TIOCE_ATE_M32:
@@ -386,7 +386,7 @@ tioce_dma_d32(struct pci_dev *pdev, u64 ct_addr, int dma_flags)
386{ 386{
387 int dma_ok; 387 int dma_ok;
388 int port; 388 int port;
389 struct tioce *ce_mmr; 389 struct tioce __iomem *ce_mmr;
390 struct tioce_kernel *ce_kern; 390 struct tioce_kernel *ce_kern;
391 u64 ct_upper; 391 u64 ct_upper;
392 u64 ct_lower; 392 u64 ct_lower;
@@ -461,7 +461,7 @@ tioce_dma_unmap(struct pci_dev *pdev, dma_addr_t bus_addr, int dir)
461 int i; 461 int i;
462 int port; 462 int port;
463 struct tioce_kernel *ce_kern; 463 struct tioce_kernel *ce_kern;
464 struct tioce *ce_mmr; 464 struct tioce __iomem *ce_mmr;
465 unsigned long flags; 465 unsigned long flags;
466 466
467 bus_addr = tioce_dma_barrier(bus_addr, 0); 467 bus_addr = tioce_dma_barrier(bus_addr, 0);
@@ -700,9 +700,9 @@ static void
700tioce_reserve_m32(struct tioce_kernel *ce_kern, u64 base, u64 limit) 700tioce_reserve_m32(struct tioce_kernel *ce_kern, u64 base, u64 limit)
701{ 701{
702 int ate_index, last_ate, ps; 702 int ate_index, last_ate, ps;
703 struct tioce *ce_mmr; 703 struct tioce __iomem *ce_mmr;
704 704
705 ce_mmr = (struct tioce *)ce_kern->ce_common->ce_pcibus.bs_base; 705 ce_mmr = (struct tioce __iomem *)ce_kern->ce_common->ce_pcibus.bs_base;
706 ps = ce_kern->ce_ate3240_pagesize; 706 ps = ce_kern->ce_ate3240_pagesize;
707 ate_index = ATE_PAGE(base, ps); 707 ate_index = ATE_PAGE(base, ps);
708 last_ate = ate_index + ATE_NPAGES(base, limit-base+1, ps) - 1; 708 last_ate = ate_index + ATE_NPAGES(base, limit-base+1, ps) - 1;
@@ -736,7 +736,7 @@ tioce_kern_init(struct tioce_common *tioce_common)
736 int dev; 736 int dev;
737 u32 tmp; 737 u32 tmp;
738 unsigned int seg, bus; 738 unsigned int seg, bus;
739 struct tioce *tioce_mmr; 739 struct tioce __iomem *tioce_mmr;
740 struct tioce_kernel *tioce_kern; 740 struct tioce_kernel *tioce_kern;
741 741
742 tioce_kern = kzalloc(sizeof(struct tioce_kernel), GFP_KERNEL); 742 tioce_kern = kzalloc(sizeof(struct tioce_kernel), GFP_KERNEL);
@@ -767,7 +767,7 @@ tioce_kern_init(struct tioce_common *tioce_common)
767 * the ate's. 767 * the ate's.
768 */ 768 */
769 769
770 tioce_mmr = (struct tioce *)tioce_common->ce_pcibus.bs_base; 770 tioce_mmr = (struct tioce __iomem *)tioce_common->ce_pcibus.bs_base;
771 tioce_mmr_clri(tioce_kern, &tioce_mmr->ce_ure_page_map, 771 tioce_mmr_clri(tioce_kern, &tioce_mmr->ce_ure_page_map,
772 CE_URE_PAGESIZE_MASK); 772 CE_URE_PAGESIZE_MASK);
773 tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_ure_page_map, 773 tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_ure_page_map,
@@ -858,7 +858,7 @@ tioce_force_interrupt(struct sn_irq_info *sn_irq_info)
858 struct pcidev_info *pcidev_info; 858 struct pcidev_info *pcidev_info;
859 struct tioce_common *ce_common; 859 struct tioce_common *ce_common;
860 struct tioce_kernel *ce_kern; 860 struct tioce_kernel *ce_kern;
861 struct tioce *ce_mmr; 861 struct tioce __iomem *ce_mmr;
862 u64 force_int_val; 862 u64 force_int_val;
863 863
864 if (!sn_irq_info->irq_bridge) 864 if (!sn_irq_info->irq_bridge)
@@ -872,7 +872,7 @@ tioce_force_interrupt(struct sn_irq_info *sn_irq_info)
872 return; 872 return;
873 873
874 ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info; 874 ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info;
875 ce_mmr = (struct tioce *)ce_common->ce_pcibus.bs_base; 875 ce_mmr = (struct tioce __iomem *)ce_common->ce_pcibus.bs_base;
876 ce_kern = (struct tioce_kernel *)ce_common->ce_kernel_private; 876 ce_kern = (struct tioce_kernel *)ce_common->ce_kernel_private;
877 877
878 /* 878 /*
@@ -953,7 +953,7 @@ tioce_target_interrupt(struct sn_irq_info *sn_irq_info)
953 struct pcidev_info *pcidev_info; 953 struct pcidev_info *pcidev_info;
954 struct tioce_common *ce_common; 954 struct tioce_common *ce_common;
955 struct tioce_kernel *ce_kern; 955 struct tioce_kernel *ce_kern;
956 struct tioce *ce_mmr; 956 struct tioce __iomem *ce_mmr;
957 int bit; 957 int bit;
958 u64 vector; 958 u64 vector;
959 959
@@ -962,7 +962,7 @@ tioce_target_interrupt(struct sn_irq_info *sn_irq_info)
962 return; 962 return;
963 963
964 ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info; 964 ce_common = (struct tioce_common *)pcidev_info->pdi_pcibus_info;
965 ce_mmr = (struct tioce *)ce_common->ce_pcibus.bs_base; 965 ce_mmr = (struct tioce __iomem *)ce_common->ce_pcibus.bs_base;
966 ce_kern = (struct tioce_kernel *)ce_common->ce_kernel_private; 966 ce_kern = (struct tioce_kernel *)ce_common->ce_kernel_private;
967 967
968 bit = sn_irq_info->irq_int_bit; 968 bit = sn_irq_info->irq_int_bit;
@@ -994,7 +994,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
994 cnodeid_t my_cnode, mem_cnode; 994 cnodeid_t my_cnode, mem_cnode;
995 struct tioce_common *tioce_common; 995 struct tioce_common *tioce_common;
996 struct tioce_kernel *tioce_kern; 996 struct tioce_kernel *tioce_kern;
997 struct tioce *tioce_mmr; 997 struct tioce __iomem *tioce_mmr;
998 998
999 /* 999 /*
1000 * Allocate kernel bus soft and copy from prom. 1000 * Allocate kernel bus soft and copy from prom.
@@ -1018,7 +1018,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1018 * interrupt handler. 1018 * interrupt handler.
1019 */ 1019 */
1020 1020
1021 tioce_mmr = (struct tioce *)tioce_common->ce_pcibus.bs_base; 1021 tioce_mmr = (struct tioce __iomem *)tioce_common->ce_pcibus.bs_base;
1022 tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_int_status_alias, ~0ULL); 1022 tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_int_status_alias, ~0ULL);
1023 tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_error_summary_alias, 1023 tioce_mmr_seti(tioce_kern, &tioce_mmr->ce_adm_error_summary_alias,
1024 ~0ULL); 1024 ~0ULL);
diff --git a/arch/m32r/kernel/irq.c b/arch/m32r/kernel/irq.c
index 3841861df6a2..f8d8650383e0 100644
--- a/arch/m32r/kernel/irq.c
+++ b/arch/m32r/kernel/irq.c
@@ -77,13 +77,16 @@ skip:
77 */ 77 */
78asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs) 78asmlinkage unsigned int do_IRQ(int irq, struct pt_regs *regs)
79{ 79{
80 struct pt_regs *old_regs;
81 old_regs = set_irq_regs(regs);
80 irq_enter(); 82 irq_enter();
81 83
82#ifdef CONFIG_DEBUG_STACKOVERFLOW 84#ifdef CONFIG_DEBUG_STACKOVERFLOW
83 /* FIXME M32R */ 85 /* FIXME M32R */
84#endif 86#endif
85 __do_IRQ(irq, regs); 87 __do_IRQ(irq);
86 irq_exit(); 88 irq_exit();
89 set_irq_regs(old_regs);
87 90
88 return 1; 91 return 1;
89} 92}
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
index 3f35ab3d2dc2..0e7778be33cc 100644
--- a/arch/m32r/kernel/setup.c
+++ b/arch/m32r/kernel/setup.c
@@ -369,10 +369,10 @@ static void c_stop(struct seq_file *m, void *v)
369} 369}
370 370
371struct seq_operations cpuinfo_op = { 371struct seq_operations cpuinfo_op = {
372 start: c_start, 372 .start = c_start,
373 next: c_next, 373 .next = c_next,
374 stop: c_stop, 374 .stop = c_stop,
375 show: show_cpuinfo, 375 .show = show_cpuinfo,
376}; 376};
377#endif /* CONFIG_PROC_FS */ 377#endif /* CONFIG_PROC_FS */
378 378
diff --git a/arch/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c
index 67dbbdc9d111..6b2d77da0683 100644
--- a/arch/m32r/kernel/setup_mappi.c
+++ b/arch/m32r/kernel/setup_mappi.c
@@ -86,7 +86,7 @@ void __init init_IRQ(void)
86 /* INT0 : LAN controller (RTL8019AS) */ 86 /* INT0 : LAN controller (RTL8019AS) */
87 irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED; 87 irq_desc[M32R_IRQ_INT0].status = IRQ_DISABLED;
88 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type; 88 irq_desc[M32R_IRQ_INT0].chip = &mappi_irq_type;
89 irq_desc[M32R_IRQ_INT0].action = 0; 89 irq_desc[M32R_IRQ_INT0].action = NULL;
90 irq_desc[M32R_IRQ_INT0].depth = 1; 90 irq_desc[M32R_IRQ_INT0].depth = 1;
91 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10; 91 icu_data[M32R_IRQ_INT0].icucr = M32R_ICUCR_IEN|M32R_ICUCR_ISMOD10;
92 disable_mappi_irq(M32R_IRQ_INT0); 92 disable_mappi_irq(M32R_IRQ_INT0);
@@ -95,7 +95,7 @@ void __init init_IRQ(void)
95 /* MFT2 : system timer */ 95 /* MFT2 : system timer */
96 irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED; 96 irq_desc[M32R_IRQ_MFT2].status = IRQ_DISABLED;
97 irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type; 97 irq_desc[M32R_IRQ_MFT2].chip = &mappi_irq_type;
98 irq_desc[M32R_IRQ_MFT2].action = 0; 98 irq_desc[M32R_IRQ_MFT2].action = NULL;
99 irq_desc[M32R_IRQ_MFT2].depth = 1; 99 irq_desc[M32R_IRQ_MFT2].depth = 1;
100 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN; 100 icu_data[M32R_IRQ_MFT2].icucr = M32R_ICUCR_IEN;
101 disable_mappi_irq(M32R_IRQ_MFT2); 101 disable_mappi_irq(M32R_IRQ_MFT2);
@@ -104,7 +104,7 @@ void __init init_IRQ(void)
104 /* SIO0_R : uart receive data */ 104 /* SIO0_R : uart receive data */
105 irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED; 105 irq_desc[M32R_IRQ_SIO0_R].status = IRQ_DISABLED;
106 irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type; 106 irq_desc[M32R_IRQ_SIO0_R].chip = &mappi_irq_type;
107 irq_desc[M32R_IRQ_SIO0_R].action = 0; 107 irq_desc[M32R_IRQ_SIO0_R].action = NULL;
108 irq_desc[M32R_IRQ_SIO0_R].depth = 1; 108 irq_desc[M32R_IRQ_SIO0_R].depth = 1;
109 icu_data[M32R_IRQ_SIO0_R].icucr = 0; 109 icu_data[M32R_IRQ_SIO0_R].icucr = 0;
110 disable_mappi_irq(M32R_IRQ_SIO0_R); 110 disable_mappi_irq(M32R_IRQ_SIO0_R);
@@ -112,7 +112,7 @@ void __init init_IRQ(void)
112 /* SIO0_S : uart send data */ 112 /* SIO0_S : uart send data */
113 irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED; 113 irq_desc[M32R_IRQ_SIO0_S].status = IRQ_DISABLED;
114 irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type; 114 irq_desc[M32R_IRQ_SIO0_S].chip = &mappi_irq_type;
115 irq_desc[M32R_IRQ_SIO0_S].action = 0; 115 irq_desc[M32R_IRQ_SIO0_S].action = NULL;
116 irq_desc[M32R_IRQ_SIO0_S].depth = 1; 116 irq_desc[M32R_IRQ_SIO0_S].depth = 1;
117 icu_data[M32R_IRQ_SIO0_S].icucr = 0; 117 icu_data[M32R_IRQ_SIO0_S].icucr = 0;
118 disable_mappi_irq(M32R_IRQ_SIO0_S); 118 disable_mappi_irq(M32R_IRQ_SIO0_S);
@@ -120,7 +120,7 @@ void __init init_IRQ(void)
120 /* SIO1_R : uart receive data */ 120 /* SIO1_R : uart receive data */
121 irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED; 121 irq_desc[M32R_IRQ_SIO1_R].status = IRQ_DISABLED;
122 irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type; 122 irq_desc[M32R_IRQ_SIO1_R].chip = &mappi_irq_type;
123 irq_desc[M32R_IRQ_SIO1_R].action = 0; 123 irq_desc[M32R_IRQ_SIO1_R].action = NULL;
124 irq_desc[M32R_IRQ_SIO1_R].depth = 1; 124 irq_desc[M32R_IRQ_SIO1_R].depth = 1;
125 icu_data[M32R_IRQ_SIO1_R].icucr = 0; 125 icu_data[M32R_IRQ_SIO1_R].icucr = 0;
126 disable_mappi_irq(M32R_IRQ_SIO1_R); 126 disable_mappi_irq(M32R_IRQ_SIO1_R);
@@ -128,7 +128,7 @@ void __init init_IRQ(void)
128 /* SIO1_S : uart send data */ 128 /* SIO1_S : uart send data */
129 irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED; 129 irq_desc[M32R_IRQ_SIO1_S].status = IRQ_DISABLED;
130 irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type; 130 irq_desc[M32R_IRQ_SIO1_S].chip = &mappi_irq_type;
131 irq_desc[M32R_IRQ_SIO1_S].action = 0; 131 irq_desc[M32R_IRQ_SIO1_S].action = NULL;
132 irq_desc[M32R_IRQ_SIO1_S].depth = 1; 132 irq_desc[M32R_IRQ_SIO1_S].depth = 1;
133 icu_data[M32R_IRQ_SIO1_S].icucr = 0; 133 icu_data[M32R_IRQ_SIO1_S].icucr = 0;
134 disable_mappi_irq(M32R_IRQ_SIO1_S); 134 disable_mappi_irq(M32R_IRQ_SIO1_S);
@@ -138,7 +138,7 @@ void __init init_IRQ(void)
138 /* INT1 : pccard0 interrupt */ 138 /* INT1 : pccard0 interrupt */
139 irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED; 139 irq_desc[M32R_IRQ_INT1].status = IRQ_DISABLED;
140 irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type; 140 irq_desc[M32R_IRQ_INT1].chip = &mappi_irq_type;
141 irq_desc[M32R_IRQ_INT1].action = 0; 141 irq_desc[M32R_IRQ_INT1].action = NULL;
142 irq_desc[M32R_IRQ_INT1].depth = 1; 142 irq_desc[M32R_IRQ_INT1].depth = 1;
143 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 143 icu_data[M32R_IRQ_INT1].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
144 disable_mappi_irq(M32R_IRQ_INT1); 144 disable_mappi_irq(M32R_IRQ_INT1);
@@ -146,7 +146,7 @@ void __init init_IRQ(void)
146 /* INT2 : pccard1 interrupt */ 146 /* INT2 : pccard1 interrupt */
147 irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED; 147 irq_desc[M32R_IRQ_INT2].status = IRQ_DISABLED;
148 irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type; 148 irq_desc[M32R_IRQ_INT2].chip = &mappi_irq_type;
149 irq_desc[M32R_IRQ_INT2].action = 0; 149 irq_desc[M32R_IRQ_INT2].action = NULL;
150 irq_desc[M32R_IRQ_INT2].depth = 1; 150 irq_desc[M32R_IRQ_INT2].depth = 1;
151 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00; 151 icu_data[M32R_IRQ_INT2].icucr = M32R_ICUCR_IEN | M32R_ICUCR_ISMOD00;
152 disable_mappi_irq(M32R_IRQ_INT2); 152 disable_mappi_irq(M32R_IRQ_INT2);
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index a9174efe80cb..b60cea4aebaa 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -33,7 +33,7 @@
33int do_signal(struct pt_regs *, sigset_t *); 33int do_signal(struct pt_regs *, sigset_t *);
34 34
35asmlinkage int 35asmlinkage int
36sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, 36sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize,
37 unsigned long r2, unsigned long r3, unsigned long r4, 37 unsigned long r2, unsigned long r3, unsigned long r4,
38 unsigned long r5, unsigned long r6, struct pt_regs *regs) 38 unsigned long r5, unsigned long r6, struct pt_regs *regs)
39{ 39{
@@ -78,8 +78,8 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss,
78struct rt_sigframe 78struct rt_sigframe
79{ 79{
80 int sig; 80 int sig;
81 struct siginfo *pinfo; 81 struct siginfo __user *pinfo;
82 void *puc; 82 void __user *puc;
83 struct siginfo info; 83 struct siginfo info;
84 struct ucontext uc; 84 struct ucontext uc;
85// struct _fpstate fpstate; 85// struct _fpstate fpstate;
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
index 8b1f6eb76870..360129174b2b 100644
--- a/arch/m32r/kernel/smp.c
+++ b/arch/m32r/kernel/smp.c
@@ -101,7 +101,7 @@ void smp_call_function_interrupt(void);
101 101
102void smp_send_timer(void); 102void smp_send_timer(void);
103void smp_ipi_timer_interrupt(struct pt_regs *); 103void smp_ipi_timer_interrupt(struct pt_regs *);
104void smp_local_timer_interrupt(struct pt_regs *); 104void smp_local_timer_interrupt(void);
105 105
106void send_IPI_allbutself(int, int); 106void send_IPI_allbutself(int, int);
107static void send_IPI_mask(cpumask_t, int, int); 107static void send_IPI_mask(cpumask_t, int, int);
@@ -231,7 +231,7 @@ void smp_flush_tlb_all(void)
231 local_irq_save(flags); 231 local_irq_save(flags);
232 __flush_tlb_all(); 232 __flush_tlb_all();
233 local_irq_restore(flags); 233 local_irq_restore(flags);
234 smp_call_function(flush_tlb_all_ipi, 0, 1, 1); 234 smp_call_function(flush_tlb_all_ipi, NULL, 1, 1);
235 preempt_enable(); 235 preempt_enable();
236} 236}
237 237
@@ -734,9 +734,12 @@ void smp_send_timer(void)
734 *==========================================================================*/ 734 *==========================================================================*/
735void smp_ipi_timer_interrupt(struct pt_regs *regs) 735void smp_ipi_timer_interrupt(struct pt_regs *regs)
736{ 736{
737 struct pt_regs *old_regs;
738 old_regs = set_irq_regs(regs);
737 irq_enter(); 739 irq_enter();
738 smp_local_timer_interrupt(regs); 740 smp_local_timer_interrupt();
739 irq_exit(); 741 irq_exit();
742 set_irq_regs(old_regs);
740} 743}
741 744
742/*==========================================================================* 745/*==========================================================================*
@@ -762,9 +765,9 @@ void smp_ipi_timer_interrupt(struct pt_regs *regs)
762 * ---------- --- -------------------------------------------------------- 765 * ---------- --- --------------------------------------------------------
763 * 2003-06-24 hy use per_cpu structure. 766 * 2003-06-24 hy use per_cpu structure.
764 *==========================================================================*/ 767 *==========================================================================*/
765void smp_local_timer_interrupt(struct pt_regs *regs) 768void smp_local_timer_interrupt(void)
766{ 769{
767 int user = user_mode(regs); 770 int user = user_mode(get_irq_regs());
768 int cpu_id = smp_processor_id(); 771 int cpu_id = smp_processor_id();
769 772
770 /* 773 /*
@@ -774,7 +777,7 @@ void smp_local_timer_interrupt(struct pt_regs *regs)
774 * useful with a profiling multiplier != 1 777 * useful with a profiling multiplier != 1
775 */ 778 */
776 779
777 profile_tick(CPU_PROFILING, regs); 780 profile_tick(CPU_PROFILING);
778 781
779 if (--per_cpu(prof_counter, cpu_id) <= 0) { 782 if (--per_cpu(prof_counter, cpu_id) <= 0) {
780 /* 783 /*
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index b567351f3c52..b4e7bcb43540 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -31,7 +31,7 @@
31/* 31/*
32 * sys_tas() - test-and-set 32 * sys_tas() - test-and-set
33 */ 33 */
34asmlinkage int sys_tas(int *addr) 34asmlinkage int sys_tas(int __user *addr)
35{ 35{
36 int oldval; 36 int oldval;
37 37
@@ -90,7 +90,7 @@ sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2,
90 90
91 error = do_pipe(fd); 91 error = do_pipe(fd);
92 if (!error) { 92 if (!error) {
93 if (copy_to_user((void *)r0, (void *)fd, 2*sizeof(int))) 93 if (copy_to_user((void __user *)r0, fd, 2*sizeof(int)))
94 error = -EFAULT; 94 error = -EFAULT;
95 } 95 }
96 return error; 96 return error;
@@ -201,7 +201,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
201 } 201 }
202} 202}
203 203
204asmlinkage int sys_uname(struct old_utsname * name) 204asmlinkage int sys_uname(struct old_utsname __user * name)
205{ 205{
206 int err; 206 int err;
207 if (!name) 207 if (!name)
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index d8af155db984..a09038282c78 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -35,7 +35,7 @@
35 35
36#ifdef CONFIG_SMP 36#ifdef CONFIG_SMP
37extern void send_IPI_allbutself(int, int); 37extern void send_IPI_allbutself(int, int);
38extern void smp_local_timer_interrupt(struct pt_regs *); 38extern void smp_local_timer_interrupt(void);
39#endif 39#endif
40 40
41#define TICK_SIZE (tick_nsec / 1000) 41#define TICK_SIZE (tick_nsec / 1000)
@@ -188,15 +188,15 @@ static long last_rtc_update = 0;
188 * timer_interrupt() needs to keep up the real-time clock, 188 * timer_interrupt() needs to keep up the real-time clock,
189 * as well as call the "do_timer()" routine every clocktick 189 * as well as call the "do_timer()" routine every clocktick
190 */ 190 */
191irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 191irqreturn_t timer_interrupt(int irq, void *dev_id)
192{ 192{
193#ifndef CONFIG_SMP 193#ifndef CONFIG_SMP
194 profile_tick(CPU_PROFILING, regs); 194 profile_tick(CPU_PROFILING);
195#endif 195#endif
196 do_timer(1); 196 do_timer(1);
197 197
198#ifndef CONFIG_SMP 198#ifndef CONFIG_SMP
199 update_process_times(user_mode(regs)); 199 update_process_times(user_mode(get_irq_regs()));
200#endif 200#endif
201 /* 201 /*
202 * If we have an externally synchronized Linux clock, then update 202 * If we have an externally synchronized Linux clock, then update
@@ -221,7 +221,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
221 a hack, so don't look closely for now.. */ 221 a hack, so don't look closely for now.. */
222 222
223#ifdef CONFIG_SMP 223#ifdef CONFIG_SMP
224 smp_local_timer_interrupt(regs); 224 smp_local_timer_interrupt();
225 smp_send_timer(); 225 smp_send_timer();
226#endif 226#endif
227 227
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c
index c1daf2c40c7c..97e0b1c0830e 100644
--- a/arch/m32r/kernel/traps.c
+++ b/arch/m32r/kernel/traps.c
@@ -268,7 +268,7 @@ static __inline__ void do_trap(int trapnr, int signr, const char * str,
268#define DO_ERROR(trapnr, signr, str, name) \ 268#define DO_ERROR(trapnr, signr, str, name) \
269asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ 269asmlinkage void do_##name(struct pt_regs * regs, long error_code) \
270{ \ 270{ \
271 do_trap(trapnr, signr, 0, regs, error_code, NULL); \ 271 do_trap(trapnr, signr, NULL, regs, error_code, NULL); \
272} 272}
273 273
274#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ 274#define DO_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 805b81fedf80..7bc14461a6ac 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -600,7 +600,7 @@ config MVME147_SCC
600 600
601config SERIAL167 601config SERIAL167
602 bool "CD2401 support for MVME166/7 serial ports" 602 bool "CD2401 support for MVME166/7 serial ports"
603 depends on MVME16x && BROKEN 603 depends on MVME16x
604 help 604 help
605 This is the driver for the serial ports on the Motorola MVME166, 605 This is the driver for the serial ports on the Motorola MVME166,
606 167, and 172 boards. Everyone using one of these boards should say 606 167, and 172 boards. Everyone using one of these boards should say
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 96c79d840cff..28d95cfe8ac0 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -47,10 +47,10 @@
47 47
48static void amiga_enable_irq(unsigned int irq); 48static void amiga_enable_irq(unsigned int irq);
49static void amiga_disable_irq(unsigned int irq); 49static void amiga_disable_irq(unsigned int irq);
50static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp); 50static irqreturn_t ami_int1(int irq, void *dev_id);
51static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp); 51static irqreturn_t ami_int3(int irq, void *dev_id);
52static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp); 52static irqreturn_t ami_int4(int irq, void *dev_id);
53static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp); 53static irqreturn_t ami_int5(int irq, void *dev_id);
54 54
55static struct irq_controller amiga_irq_controller = { 55static struct irq_controller amiga_irq_controller = {
56 .name = "amiga", 56 .name = "amiga",
@@ -113,98 +113,98 @@ static void amiga_disable_irq(unsigned int irq)
113 * The builtin Amiga hardware interrupt handlers. 113 * The builtin Amiga hardware interrupt handlers.
114 */ 114 */
115 115
116static irqreturn_t ami_int1(int irq, void *dev_id, struct pt_regs *fp) 116static irqreturn_t ami_int1(int irq, void *dev_id)
117{ 117{
118 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 118 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
119 119
120 /* if serial transmit buffer empty, interrupt */ 120 /* if serial transmit buffer empty, interrupt */
121 if (ints & IF_TBE) { 121 if (ints & IF_TBE) {
122 amiga_custom.intreq = IF_TBE; 122 amiga_custom.intreq = IF_TBE;
123 m68k_handle_int(IRQ_AMIGA_TBE, fp); 123 m68k_handle_int(IRQ_AMIGA_TBE);
124 } 124 }
125 125
126 /* if floppy disk transfer complete, interrupt */ 126 /* if floppy disk transfer complete, interrupt */
127 if (ints & IF_DSKBLK) { 127 if (ints & IF_DSKBLK) {
128 amiga_custom.intreq = IF_DSKBLK; 128 amiga_custom.intreq = IF_DSKBLK;
129 m68k_handle_int(IRQ_AMIGA_DSKBLK, fp); 129 m68k_handle_int(IRQ_AMIGA_DSKBLK);
130 } 130 }
131 131
132 /* if software interrupt set, interrupt */ 132 /* if software interrupt set, interrupt */
133 if (ints & IF_SOFT) { 133 if (ints & IF_SOFT) {
134 amiga_custom.intreq = IF_SOFT; 134 amiga_custom.intreq = IF_SOFT;
135 m68k_handle_int(IRQ_AMIGA_SOFT, fp); 135 m68k_handle_int(IRQ_AMIGA_SOFT);
136 } 136 }
137 return IRQ_HANDLED; 137 return IRQ_HANDLED;
138} 138}
139 139
140static irqreturn_t ami_int3(int irq, void *dev_id, struct pt_regs *fp) 140static irqreturn_t ami_int3(int irq, void *dev_id)
141{ 141{
142 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 142 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
143 143
144 /* if a blitter interrupt */ 144 /* if a blitter interrupt */
145 if (ints & IF_BLIT) { 145 if (ints & IF_BLIT) {
146 amiga_custom.intreq = IF_BLIT; 146 amiga_custom.intreq = IF_BLIT;
147 m68k_handle_int(IRQ_AMIGA_BLIT, fp); 147 m68k_handle_int(IRQ_AMIGA_BLIT);
148 } 148 }
149 149
150 /* if a copper interrupt */ 150 /* if a copper interrupt */
151 if (ints & IF_COPER) { 151 if (ints & IF_COPER) {
152 amiga_custom.intreq = IF_COPER; 152 amiga_custom.intreq = IF_COPER;
153 m68k_handle_int(IRQ_AMIGA_COPPER, fp); 153 m68k_handle_int(IRQ_AMIGA_COPPER);
154 } 154 }
155 155
156 /* if a vertical blank interrupt */ 156 /* if a vertical blank interrupt */
157 if (ints & IF_VERTB) { 157 if (ints & IF_VERTB) {
158 amiga_custom.intreq = IF_VERTB; 158 amiga_custom.intreq = IF_VERTB;
159 m68k_handle_int(IRQ_AMIGA_VERTB, fp); 159 m68k_handle_int(IRQ_AMIGA_VERTB);
160 } 160 }
161 return IRQ_HANDLED; 161 return IRQ_HANDLED;
162} 162}
163 163
164static irqreturn_t ami_int4(int irq, void *dev_id, struct pt_regs *fp) 164static irqreturn_t ami_int4(int irq, void *dev_id)
165{ 165{
166 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 166 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
167 167
168 /* if audio 0 interrupt */ 168 /* if audio 0 interrupt */
169 if (ints & IF_AUD0) { 169 if (ints & IF_AUD0) {
170 amiga_custom.intreq = IF_AUD0; 170 amiga_custom.intreq = IF_AUD0;
171 m68k_handle_int(IRQ_AMIGA_AUD0, fp); 171 m68k_handle_int(IRQ_AMIGA_AUD0);
172 } 172 }
173 173
174 /* if audio 1 interrupt */ 174 /* if audio 1 interrupt */
175 if (ints & IF_AUD1) { 175 if (ints & IF_AUD1) {
176 amiga_custom.intreq = IF_AUD1; 176 amiga_custom.intreq = IF_AUD1;
177 m68k_handle_int(IRQ_AMIGA_AUD1, fp); 177 m68k_handle_int(IRQ_AMIGA_AUD1);
178 } 178 }
179 179
180 /* if audio 2 interrupt */ 180 /* if audio 2 interrupt */
181 if (ints & IF_AUD2) { 181 if (ints & IF_AUD2) {
182 amiga_custom.intreq = IF_AUD2; 182 amiga_custom.intreq = IF_AUD2;
183 m68k_handle_int(IRQ_AMIGA_AUD2, fp); 183 m68k_handle_int(IRQ_AMIGA_AUD2);
184 } 184 }
185 185
186 /* if audio 3 interrupt */ 186 /* if audio 3 interrupt */
187 if (ints & IF_AUD3) { 187 if (ints & IF_AUD3) {
188 amiga_custom.intreq = IF_AUD3; 188 amiga_custom.intreq = IF_AUD3;
189 m68k_handle_int(IRQ_AMIGA_AUD3, fp); 189 m68k_handle_int(IRQ_AMIGA_AUD3);
190 } 190 }
191 return IRQ_HANDLED; 191 return IRQ_HANDLED;
192} 192}
193 193
194static irqreturn_t ami_int5(int irq, void *dev_id, struct pt_regs *fp) 194static irqreturn_t ami_int5(int irq, void *dev_id)
195{ 195{
196 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar; 196 unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
197 197
198 /* if serial receive buffer full interrupt */ 198 /* if serial receive buffer full interrupt */
199 if (ints & IF_RBF) { 199 if (ints & IF_RBF) {
200 /* acknowledge of IF_RBF must be done by the serial interrupt */ 200 /* acknowledge of IF_RBF must be done by the serial interrupt */
201 m68k_handle_int(IRQ_AMIGA_RBF, fp); 201 m68k_handle_int(IRQ_AMIGA_RBF);
202 } 202 }
203 203
204 /* if a disk sync interrupt */ 204 /* if a disk sync interrupt */
205 if (ints & IF_DSKSYN) { 205 if (ints & IF_DSKSYN) {
206 amiga_custom.intreq = IF_DSKSYN; 206 amiga_custom.intreq = IF_DSKSYN;
207 m68k_handle_int(IRQ_AMIGA_DSKSYN, fp); 207 m68k_handle_int(IRQ_AMIGA_DSKSYN);
208 } 208 }
209 return IRQ_HANDLED; 209 return IRQ_HANDLED;
210} 210}
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index dbad30054721..7a20058eb380 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -82,7 +82,7 @@ unsigned char cia_able_irq(struct ciabase *base, unsigned char mask)
82 return old; 82 return old;
83} 83}
84 84
85static irqreturn_t cia_handler(int irq, void *dev_id, struct pt_regs *fp) 85static irqreturn_t cia_handler(int irq, void *dev_id)
86{ 86{
87 struct ciabase *base = (struct ciabase *)dev_id; 87 struct ciabase *base = (struct ciabase *)dev_id;
88 int mach_irq; 88 int mach_irq;
@@ -93,7 +93,7 @@ static irqreturn_t cia_handler(int irq, void *dev_id, struct pt_regs *fp)
93 amiga_custom.intreq = base->int_mask; 93 amiga_custom.intreq = base->int_mask;
94 for (; ints; mach_irq++, ints >>= 1) { 94 for (; ints; mach_irq++, ints >>= 1) {
95 if (ints & 1) 95 if (ints & 1)
96 m68k_handle_int(mach_irq, fp); 96 m68k_handle_int(mach_irq);
97 } 97 }
98 return IRQ_HANDLED; 98 return IRQ_HANDLED;
99} 99}
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index 092e50d2cb13..3204f412cad8 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -83,7 +83,7 @@ static char amiga_model_name[13] = "Amiga ";
83 83
84extern char m68k_debug_device[]; 84extern char m68k_debug_device[];
85 85
86static void amiga_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 86static void amiga_sched_init(irq_handler_t handler);
87/* amiga specific irq functions */ 87/* amiga specific irq functions */
88extern void amiga_init_IRQ (void); 88extern void amiga_init_IRQ (void);
89static void amiga_get_model(char *model); 89static void amiga_get_model(char *model);
@@ -487,8 +487,7 @@ void __init config_amiga(void)
487 487
488static unsigned short jiffy_ticks; 488static unsigned short jiffy_ticks;
489 489
490static void __init amiga_sched_init(irqreturn_t (*timer_routine)(int, void *, 490static void __init amiga_sched_init(irq_handler_t timer_routine)
491 struct pt_regs *))
492{ 491{
493 static struct resource sched_res = { 492 static struct resource sched_res = {
494 .name = "timer", .start = 0x00bfd400, .end = 0x00bfd5ff, 493 .name = "timer", .start = 0x00bfd400, .end = 0x00bfd5ff,
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index 6f4581575fb4..cb8e7609df4c 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -25,7 +25,7 @@ u_long cpuctrl_physaddr;
25u_long timer_physaddr; 25u_long timer_physaddr;
26u_long apollo_model; 26u_long apollo_model;
27 27
28extern void dn_sched_init(irqreturn_t (*handler)(int,void *,struct pt_regs *)); 28extern void dn_sched_init(irq_handler_t handler);
29extern void dn_init_IRQ(void); 29extern void dn_init_IRQ(void);
30extern unsigned long dn_gettimeoffset(void); 30extern unsigned long dn_gettimeoffset(void);
31extern int dn_dummy_hwclk(int, struct rtc_time *); 31extern int dn_dummy_hwclk(int, struct rtc_time *);
@@ -38,7 +38,7 @@ extern irqreturn_t dn_process_int(int irq, struct pt_regs *fp);
38#ifdef CONFIG_HEARTBEAT 38#ifdef CONFIG_HEARTBEAT
39static void dn_heartbeat(int on); 39static void dn_heartbeat(int on);
40#endif 40#endif
41static irqreturn_t dn_timer_int(int irq,void *, struct pt_regs *); 41static irqreturn_t dn_timer_int(int irq,void *);
42static void dn_get_model(char *model); 42static void dn_get_model(char *model);
43static const char *apollo_models[] = { 43static const char *apollo_models[] = {
44 [APOLLO_DN3000-APOLLO_DN3000] = "DN3000 (Otter)", 44 [APOLLO_DN3000-APOLLO_DN3000] = "DN3000 (Otter)",
@@ -174,13 +174,13 @@ void config_apollo(void) {
174 174
175} 175}
176 176
177irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp) 177irqreturn_t dn_timer_int(int irq, void *dev_id)
178{ 178{
179 irqreturn_t (*timer_handler)(int, void *, struct pt_regs *) = dev_id; 179 irq_handler_t timer_handler = dev_id;
180 180
181 volatile unsigned char x; 181 volatile unsigned char x;
182 182
183 timer_handler(irq, dev_id, fp); 183 timer_handler(irq, dev_id);
184 184
185 x=*(volatile unsigned char *)(timer+3); 185 x=*(volatile unsigned char *)(timer+3);
186 x=*(volatile unsigned char *)(timer+5); 186 x=*(volatile unsigned char *)(timer+5);
@@ -188,8 +188,8 @@ irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp)
188 return IRQ_HANDLED; 188 return IRQ_HANDLED;
189} 189}
190 190
191void dn_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) { 191void dn_sched_init(irq_handler_t timer_routine)
192 192{
193 /* program timer 1 */ 193 /* program timer 1 */
194 *(volatile unsigned char *)(timer+3)=0x01; 194 *(volatile unsigned char *)(timer+3)=0x01;
195 *(volatile unsigned char *)(timer+1)=0x40; 195 *(volatile unsigned char *)(timer+1)=0x40;
diff --git a/arch/m68k/apollo/dma.c b/arch/m68k/apollo/dma.c
deleted file mode 100644
index aed8be177ef1..000000000000
--- a/arch/m68k/apollo/dma.c
+++ /dev/null
@@ -1,50 +0,0 @@
1#include <linux/types.h>
2#include <linux/kernel.h>
3#include <linux/mm.h>
4#include <linux/kd.h>
5#include <linux/tty.h>
6#include <linux/console.h>
7
8#include <asm/setup.h>
9#include <asm/bootinfo.h>
10#include <asm/system.h>
11#include <asm/pgtable.h>
12#include <asm/apollodma.h>
13#include <asm/io.h>
14
15/* note only works for 16 Bit 1 page DMA's */
16
17static unsigned short next_free_xlat_entry=0;
18
19unsigned short dma_map_page(unsigned long phys_addr,int count,int type) {
20
21 unsigned long page_aligned_addr=phys_addr & (~((1<<12)-1));
22 unsigned short start_map_addr=page_aligned_addr >> 10;
23 unsigned short free_xlat_entry, *xlat_map_entry;
24 int i;
25
26 free_xlat_entry=next_free_xlat_entry;
27 for(i=0,xlat_map_entry=addr_xlat_map+(free_xlat_entry<<2);i<8;i++,xlat_map_entry++) {
28#if 0
29 printk("phys_addr: %x, page_aligned_addr: %x, start_map_addr: %x\n",phys_addr,page_aligned_addr,start_map_addr+i);
30#endif
31 out_be16(xlat_map_entry, start_map_addr+i);
32 }
33
34 next_free_xlat_entry+=2;
35 if(next_free_xlat_entry>125)
36 next_free_xlat_entry=0;
37
38#if 0
39 printk("next_free_xlat_entry: %d\n",next_free_xlat_entry);
40#endif
41
42 return free_xlat_entry<<10;
43}
44
45void dma_unmap_page(unsigned short dma_addr) {
46
47 return ;
48
49}
50
diff --git a/arch/m68k/apollo/dn_ints.c b/arch/m68k/apollo/dn_ints.c
index 9fe07803797b..4274af125998 100644
--- a/arch/m68k/apollo/dn_ints.c
+++ b/arch/m68k/apollo/dn_ints.c
@@ -6,7 +6,7 @@
6 6
7void dn_process_int(unsigned int irq, struct pt_regs *fp) 7void dn_process_int(unsigned int irq, struct pt_regs *fp)
8{ 8{
9 m68k_handle_int(irq, fp); 9 __m68k_handle_int(irq, fp);
10 10
11 *(volatile unsigned char *)(pica)=0x20; 11 *(volatile unsigned char *)(pica)=0x20;
12 *(volatile unsigned char *)(picb)=0x20; 12 *(volatile unsigned char *)(picb)=0x20;
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c
index ece13cbf9950..7f812641790c 100644
--- a/arch/m68k/atari/ataints.c
+++ b/arch/m68k/atari/ataints.c
@@ -332,6 +332,9 @@ static void atari_shutdown_irq(unsigned int irq)
332 atari_disable_irq(irq); 332 atari_disable_irq(irq);
333 atari_turnoff_irq(irq); 333 atari_turnoff_irq(irq);
334 m68k_irq_shutdown(irq); 334 m68k_irq_shutdown(irq);
335
336 if (irq == IRQ_AUTO_4)
337 vectors[VEC_INT4] = falcon_hblhandler;
335} 338}
336 339
337static struct irq_controller atari_irq_controller = { 340static struct irq_controller atari_irq_controller = {
@@ -356,7 +359,7 @@ static struct irq_controller atari_irq_controller = {
356 359
357void __init atari_init_IRQ(void) 360void __init atari_init_IRQ(void)
358{ 361{
359 m68k_setup_user_interrupt(VEC_USER, 192, NULL); 362 m68k_setup_user_interrupt(VEC_USER, NUM_ATARI_SOURCES - IRQ_USER, NULL);
360 m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1); 363 m68k_setup_irq_controller(&atari_irq_controller, 1, NUM_ATARI_SOURCES - 1);
361 364
362 /* Initialize the MFP(s) */ 365 /* Initialize the MFP(s) */
@@ -403,8 +406,10 @@ void __init atari_init_IRQ(void)
403 * gets overruns) 406 * gets overruns)
404 */ 407 */
405 408
406 if (!MACH_IS_HADES) 409 if (!MACH_IS_HADES) {
407 vectors[VEC_INT2] = falcon_hblhandler; 410 vectors[VEC_INT2] = falcon_hblhandler;
411 vectors[VEC_INT4] = falcon_hblhandler;
412 }
408 } 413 }
409 414
410 if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) { 415 if (ATARIHW_PRESENT(PCM_8BIT) && ATARIHW_PRESENT(MICROWIRE)) {
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index b2079252a954..ca5cd4344e3d 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -62,7 +62,7 @@ static void atari_heartbeat( int on );
62#endif 62#endif
63 63
64/* atari specific timer functions (in time.c) */ 64/* atari specific timer functions (in time.c) */
65extern void atari_sched_init(irqreturn_t (*)(int, void *, struct pt_regs *)); 65extern void atari_sched_init(irq_handler_t );
66extern unsigned long atari_gettimeoffset (void); 66extern unsigned long atari_gettimeoffset (void);
67extern int atari_mste_hwclk (int, struct rtc_time *); 67extern int atari_mste_hwclk (int, struct rtc_time *);
68extern int atari_tt_hwclk (int, struct rtc_time *); 68extern int atari_tt_hwclk (int, struct rtc_time *);
diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c
index 288f5e6a124e..d64b5804e980 100644
--- a/arch/m68k/atari/stdma.c
+++ b/arch/m68k/atari/stdma.c
@@ -44,7 +44,7 @@
44 44
45static int stdma_locked; /* the semaphore */ 45static int stdma_locked; /* the semaphore */
46 /* int func to be called */ 46 /* int func to be called */
47static irqreturn_t (*stdma_isr)(int, void *, struct pt_regs *); 47static irq_handler_t stdma_isr;
48static void *stdma_isr_data; /* data passed to isr */ 48static void *stdma_isr_data; /* data passed to isr */
49static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */ 49static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */
50 50
@@ -53,7 +53,7 @@ static DECLARE_WAIT_QUEUE_HEAD(stdma_wait); /* wait queue for ST-DMA */
53 53
54/***************************** Prototypes *****************************/ 54/***************************** Prototypes *****************************/
55 55
56static irqreturn_t stdma_int (int irq, void *dummy, struct pt_regs *fp); 56static irqreturn_t stdma_int (int irq, void *dummy);
57 57
58/************************* End of Prototypes **************************/ 58/************************* End of Prototypes **************************/
59 59
@@ -75,8 +75,7 @@ static irqreturn_t stdma_int (int irq, void *dummy, struct pt_regs *fp);
75 * 75 *
76 */ 76 */
77 77
78void stdma_lock(irqreturn_t (*handler)(int, void *, struct pt_regs *), 78void stdma_lock(irq_handler_t handler, void *data)
79 void *data)
80{ 79{
81 unsigned long flags; 80 unsigned long flags;
82 81
@@ -188,9 +187,9 @@ void __init stdma_init(void)
188 * 187 *
189 */ 188 */
190 189
191static irqreturn_t stdma_int(int irq, void *dummy, struct pt_regs *fp) 190static irqreturn_t stdma_int(int irq, void *dummy)
192{ 191{
193 if (stdma_isr) 192 if (stdma_isr)
194 (*stdma_isr)(irq, stdma_isr_data, fp); 193 (*stdma_isr)(irq, stdma_isr_data);
195 return IRQ_HANDLED; 194 return IRQ_HANDLED;
196} 195}
diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c
index e79bbc94216d..e0d3c8bfb408 100644
--- a/arch/m68k/atari/time.c
+++ b/arch/m68k/atari/time.c
@@ -16,11 +16,12 @@
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/rtc.h> 17#include <linux/rtc.h>
18#include <linux/bcd.h> 18#include <linux/bcd.h>
19#include <linux/delay.h>
19 20
20#include <asm/atariints.h> 21#include <asm/atariints.h>
21 22
22void __init 23void __init
23atari_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) 24atari_sched_init(irq_handler_t timer_routine)
24{ 25{
25 /* set Timer C data Register */ 26 /* set Timer C data Register */
26 mfp.tim_dt_c = INT_TICKS; 27 mfp.tim_dt_c = INT_TICKS;
@@ -212,8 +213,12 @@ int atari_tt_hwclk( int op, struct rtc_time *t )
212 * additionally the RTC_SET bit is set to prevent an update cycle. 213 * additionally the RTC_SET bit is set to prevent an update cycle.
213 */ 214 */
214 215
215 while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) 216 while( RTC_READ(RTC_FREQ_SELECT) & RTC_UIP ) {
216 schedule_timeout_interruptible(HWCLK_POLL_INTERVAL); 217 if (in_atomic() || irqs_disabled())
218 mdelay(1);
219 else
220 schedule_timeout_interruptible(HWCLK_POLL_INTERVAL);
221 }
217 222
218 local_irq_save(flags); 223 local_irq_save(flags);
219 RTC_WRITE( RTC_CONTROL, ctrl | RTC_SET ); 224 RTC_WRITE( RTC_CONTROL, ctrl | RTC_SET );
diff --git a/arch/m68k/bvme6000/config.c b/arch/m68k/bvme6000/config.c
index d1e916ae55a8..896ae3d3d919 100644
--- a/arch/m68k/bvme6000/config.c
+++ b/arch/m68k/bvme6000/config.c
@@ -38,7 +38,7 @@
38 38
39static void bvme6000_get_model(char *model); 39static void bvme6000_get_model(char *model);
40static int bvme6000_get_hardware_list(char *buffer); 40static int bvme6000_get_hardware_list(char *buffer);
41extern void bvme6000_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 41extern void bvme6000_sched_init(irq_handler_t handler);
42extern unsigned long bvme6000_gettimeoffset (void); 42extern unsigned long bvme6000_gettimeoffset (void);
43extern int bvme6000_hwclk (int, struct rtc_time *); 43extern int bvme6000_hwclk (int, struct rtc_time *);
44extern int bvme6000_set_clock_mmss (unsigned long); 44extern int bvme6000_set_clock_mmss (unsigned long);
@@ -52,7 +52,7 @@ static unsigned char bin2bcd (unsigned char b);
52/* Save tick handler routine pointer, will point to do_timer() in 52/* Save tick handler routine pointer, will point to do_timer() in
53 * kernel/sched.c, called via bvme6000_process_int() */ 53 * kernel/sched.c, called via bvme6000_process_int() */
54 54
55static irqreturn_t (*tick_handler)(int, void *, struct pt_regs *); 55static irq_handler_t tick_handler;
56 56
57 57
58int bvme6000_parse_bootinfo(const struct bi_record *bi) 58int bvme6000_parse_bootinfo(const struct bi_record *bi)
@@ -154,7 +154,7 @@ void __init config_bvme6000(void)
154} 154}
155 155
156 156
157irqreturn_t bvme6000_abort_int (int irq, void *dev_id, struct pt_regs *fp) 157irqreturn_t bvme6000_abort_int (int irq, void *dev_id)
158{ 158{
159 unsigned long *new = (unsigned long *)vectors; 159 unsigned long *new = (unsigned long *)vectors;
160 unsigned long *old = (unsigned long *)0xf8000000; 160 unsigned long *old = (unsigned long *)0xf8000000;
@@ -171,14 +171,14 @@ irqreturn_t bvme6000_abort_int (int irq, void *dev_id, struct pt_regs *fp)
171} 171}
172 172
173 173
174static irqreturn_t bvme6000_timer_int (int irq, void *dev_id, struct pt_regs *fp) 174static irqreturn_t bvme6000_timer_int (int irq, void *dev_id)
175{ 175{
176 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; 176 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;
177 unsigned char msr = rtc->msr & 0xc0; 177 unsigned char msr = rtc->msr & 0xc0;
178 178
179 rtc->msr = msr | 0x20; /* Ack the interrupt */ 179 rtc->msr = msr | 0x20; /* Ack the interrupt */
180 180
181 return tick_handler(irq, dev_id, fp); 181 return tick_handler(irq, dev_id);
182} 182}
183 183
184/* 184/*
@@ -190,7 +190,7 @@ static irqreturn_t bvme6000_timer_int (int irq, void *dev_id, struct pt_regs *fp
190 * so divide by 8 to get the microsecond result. 190 * so divide by 8 to get the microsecond result.
191 */ 191 */
192 192
193void bvme6000_sched_init (irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) 193void bvme6000_sched_init (irq_handler_t timer_routine)
194{ 194{
195 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE; 195 volatile RtcPtr_t rtc = (RtcPtr_t)BVME_RTC_BASE;
196 unsigned char msr = rtc->msr & 0xc0; 196 unsigned char msr = rtc->msr & 0xc0;
diff --git a/arch/m68k/hp300/time.c b/arch/m68k/hp300/time.c
index 7df05662b277..dd7c8a2583d3 100644
--- a/arch/m68k/hp300/time.c
+++ b/arch/m68k/hp300/time.c
@@ -36,15 +36,15 @@
36 36
37#define INTVAL ((10000 / 4) - 1) 37#define INTVAL ((10000 / 4) - 1)
38 38
39static irqreturn_t hp300_tick(int irq, void *dev_id, struct pt_regs *regs) 39static irqreturn_t hp300_tick(int irq, void *dev_id)
40{ 40{
41 unsigned long tmp; 41 unsigned long tmp;
42 irqreturn_t (*vector)(int, void *, struct pt_regs *) = dev_id; 42 irq_handler_t vector = dev_id;
43 in_8(CLOCKBASE + CLKSR); 43 in_8(CLOCKBASE + CLKSR);
44 asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE)); 44 asm volatile ("movpw %1@(5),%0" : "=d" (tmp) : "a" (CLOCKBASE));
45 /* Turn off the network and SCSI leds */ 45 /* Turn off the network and SCSI leds */
46 blinken_leds(0, 0xe0); 46 blinken_leds(0, 0xe0);
47 return vector(irq, NULL, regs); 47 return vector(irq, NULL);
48} 48}
49 49
50unsigned long hp300_gettimeoffset(void) 50unsigned long hp300_gettimeoffset(void)
@@ -63,7 +63,7 @@ unsigned long hp300_gettimeoffset(void)
63 return (USECS_PER_JIFFY * ticks) / INTVAL; 63 return (USECS_PER_JIFFY * ticks) / INTVAL;
64} 64}
65 65
66void __init hp300_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)) 66void __init hp300_sched_init(irq_handler_t vector)
67{ 67{
68 out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */ 68 out_8(CLOCKBASE + CLKCR2, 0x1); /* select CR1 */
69 out_8(CLOCKBASE + CLKCR1, 0x1); /* reset */ 69 out_8(CLOCKBASE + CLKCR1, 0x1); /* reset */
diff --git a/arch/m68k/hp300/time.h b/arch/m68k/hp300/time.h
index 8ef9987b49ab..f5b3d098b0f5 100644
--- a/arch/m68k/hp300/time.h
+++ b/arch/m68k/hp300/time.h
@@ -1,4 +1,4 @@
1extern void hp300_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)); 1extern void hp300_sched_init(irq_handler_t vector);
2extern unsigned long hp300_gettimeoffset (void); 2extern unsigned long hp300_gettimeoffset (void);
3 3
4 4
diff --git a/arch/m68k/kernel/Makefile b/arch/m68k/kernel/Makefile
index dae609797dc0..1c9ecaa473d5 100644
--- a/arch/m68k/kernel/Makefile
+++ b/arch/m68k/kernel/Makefile
@@ -9,10 +9,11 @@ else
9endif 9endif
10extra-y += vmlinux.lds 10extra-y += vmlinux.lds
11 11
12obj-y := entry.o process.o traps.o ints.o dma.o signal.o ptrace.o \ 12obj-y := entry.o process.o traps.o ints.o signal.o ptrace.o \
13 sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o 13 sys_m68k.o time.o semaphore.o setup.o m68k_ksyms.o
14 14
15obj-$(CONFIG_PCI) += bios32.o 15obj-$(CONFIG_PCI) += bios32.o
16obj-$(CONFIG_MODULES) += module.o 16obj-$(CONFIG_MODULES) += module.o
17obj-y$(CONFIG_MMU_SUN3) += dma.o # no, it's not a typo
17 18
18EXTRA_AFLAGS := -traditional 19EXTRA_AFLAGS := -traditional
diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c
index fc449f8b2045..9d4e4b5b6bd8 100644
--- a/arch/m68k/kernel/dma.c
+++ b/arch/m68k/kernel/dma.c
@@ -15,7 +15,7 @@
15#include <asm/scatterlist.h> 15#include <asm/scatterlist.h>
16 16
17void *dma_alloc_coherent(struct device *dev, size_t size, 17void *dma_alloc_coherent(struct device *dev, size_t size,
18 dma_addr_t *handle, int flag) 18 dma_addr_t *handle, gfp_t flag)
19{ 19{
20 struct page *page, **map; 20 struct page *page, **map;
21 pgprot_t pgprot; 21 pgprot_t pgprot;
@@ -51,7 +51,7 @@ void *dma_alloc_coherent(struct device *dev, size_t size,
51 pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S; 51 pgprot_val(pgprot) |= _PAGE_GLOBAL040 | _PAGE_NOCACHE_S;
52 else 52 else
53 pgprot_val(pgprot) |= _PAGE_NOCACHE030; 53 pgprot_val(pgprot) |= _PAGE_NOCACHE030;
54 addr = vmap(map, size, flag, pgprot); 54 addr = vmap(map, size, VM_MAP, pgprot);
55 kfree(map); 55 kfree(map);
56 56
57 return addr; 57 return addr;
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 9083c8b7659f..222ce4244564 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -205,7 +205,7 @@ ENTRY(auto_inthandler)
205 movel %sp,%sp@- 205 movel %sp,%sp@-
206 movel %d0,%sp@- | put vector # on stack 206 movel %d0,%sp@- | put vector # on stack
207auto_irqhandler_fixup = . + 2 207auto_irqhandler_fixup = . + 2
208 jsr m68k_handle_int | process the IRQ 208 jsr __m68k_handle_int | process the IRQ
209 addql #8,%sp | pop parameters off stack 209 addql #8,%sp | pop parameters off stack
210 210
211ret_from_interrupt: 211ret_from_interrupt:
@@ -239,7 +239,7 @@ user_irqvec_fixup = . + 2
239 movel %sp,%sp@- 239 movel %sp,%sp@-
240 movel %d0,%sp@- | put vector # on stack 240 movel %d0,%sp@- | put vector # on stack
241user_irqhandler_fixup = . + 2 241user_irqhandler_fixup = . + 2
242 jsr m68k_handle_int | process the IRQ 242 jsr __m68k_handle_int | process the IRQ
243 addql #8,%sp | pop parameters off stack 243 addql #8,%sp | pop parameters off stack
244 244
245 subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1) 245 subqb #1,%curptr@(TASK_INFO+TINFO_PREEMPT+1)
@@ -706,4 +706,33 @@ sys_call_table:
706 .long sys_add_key 706 .long sys_add_key
707 .long sys_request_key /* 280 */ 707 .long sys_request_key /* 280 */
708 .long sys_keyctl 708 .long sys_keyctl
709 .long sys_ioprio_set
710 .long sys_ioprio_get
711 .long sys_inotify_init
712 .long sys_inotify_add_watch /* 285 */
713 .long sys_inotify_rm_watch
714 .long sys_migrate_pages
715 .long sys_openat
716 .long sys_mkdirat
717 .long sys_mknodat /* 290 */
718 .long sys_fchownat
719 .long sys_futimesat
720 .long sys_fstatat64
721 .long sys_unlinkat
722 .long sys_renameat /* 295 */
723 .long sys_linkat
724 .long sys_symlinkat
725 .long sys_readlinkat
726 .long sys_fchmodat
727 .long sys_faccessat /* 300 */
728 .long sys_ni_syscall /* Reserved for pselect6 */
729 .long sys_ni_syscall /* Reserved for ppoll */
730 .long sys_unshare
731 .long sys_set_robust_list
732 .long sys_get_robust_list /* 305 */
733 .long sys_splice
734 .long sys_sync_file_range
735 .long sys_tee
736 .long sys_vmsplice
737 .long sys_move_pages /* 310 */
709 738
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index b33e37fb7b0e..84aceca6c05c 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -39,6 +39,7 @@
39#include <asm/page.h> 39#include <asm/page.h>
40#include <asm/machdep.h> 40#include <asm/machdep.h>
41#include <asm/cacheflush.h> 41#include <asm/cacheflush.h>
42#include <asm/irq_regs.h>
42 43
43#ifdef CONFIG_Q40 44#ifdef CONFIG_Q40
44#include <asm/q40ints.h> 45#include <asm/q40ints.h>
@@ -104,7 +105,7 @@ void __init init_IRQ(void)
104 * @handler: called from auto vector interrupts 105 * @handler: called from auto vector interrupts
105 * 106 *
106 * setup the handler to be called from auto vector interrupts instead of the 107 * setup the handler to be called from auto vector interrupts instead of the
107 * standard m68k_handle_int(), it will be called with irq numbers in the range 108 * standard __m68k_handle_int(), it will be called with irq numbers in the range
108 * from IRQ_AUTO_1 - IRQ_AUTO_7. 109 * from IRQ_AUTO_1 - IRQ_AUTO_7.
109 */ 110 */
110void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *)) 111void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_regs *))
@@ -123,7 +124,7 @@ void __init m68k_setup_auto_interrupt(void (*handler)(unsigned int, struct pt_re
123 * setup user vector interrupts, this includes activating the specified range 124 * setup user vector interrupts, this includes activating the specified range
124 * of interrupts, only then these interrupts can be requested (note: this is 125 * of interrupts, only then these interrupts can be requested (note: this is
125 * different from auto vector interrupts). An optional handler can be installed 126 * different from auto vector interrupts). An optional handler can be installed
126 * to be called instead of the default m68k_handle_int(), it will be called 127 * to be called instead of the default __m68k_handle_int(), it will be called
127 * with irq numbers starting from IRQ_USER. 128 * with irq numbers starting from IRQ_USER.
128 */ 129 */
129void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt, 130void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
@@ -131,6 +132,7 @@ void __init m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt,
131{ 132{
132 int i; 133 int i;
133 134
135 BUG_ON(IRQ_USER + cnt >= NR_IRQS);
134 m68k_first_user_vec = vec; 136 m68k_first_user_vec = vec;
135 for (i = 0; i < cnt; i++) 137 for (i = 0; i < cnt; i++)
136 irq_controller[IRQ_USER + i] = &user_irq_controller; 138 irq_controller[IRQ_USER + i] = &user_irq_controller;
@@ -215,7 +217,7 @@ int setup_irq(unsigned int irq, struct irq_node *node)
215} 217}
216 218
217int request_irq(unsigned int irq, 219int request_irq(unsigned int irq,
218 irqreturn_t (*handler) (int, void *, struct pt_regs *), 220 irq_handler_t handler,
219 unsigned long flags, const char *devname, void *dev_id) 221 unsigned long flags, const char *devname, void *dev_id)
220{ 222{
221 struct irq_node *node; 223 struct irq_node *node;
@@ -379,18 +381,25 @@ unsigned int irq_canonicalize(unsigned int irq)
379 381
380EXPORT_SYMBOL(irq_canonicalize); 382EXPORT_SYMBOL(irq_canonicalize);
381 383
382asmlinkage void m68k_handle_int(unsigned int irq, struct pt_regs *regs) 384asmlinkage void m68k_handle_int(unsigned int irq)
383{ 385{
384 struct irq_node *node; 386 struct irq_node *node;
385
386 kstat_cpu(0).irqs[irq]++; 387 kstat_cpu(0).irqs[irq]++;
387 node = irq_list[irq]; 388 node = irq_list[irq];
388 do { 389 do {
389 node->handler(irq, node->dev_id, regs); 390 node->handler(irq, node->dev_id);
390 node = node->next; 391 node = node->next;
391 } while (node); 392 } while (node);
392} 393}
393 394
395asmlinkage void __m68k_handle_int(unsigned int irq, struct pt_regs *regs)
396{
397 struct pt_regs *old_regs;
398 old_regs = set_irq_regs(regs);
399 m68k_handle_int(irq);
400 set_irq_regs(old_regs);
401}
402
394asmlinkage void handle_badint(struct pt_regs *regs) 403asmlinkage void handle_badint(struct pt_regs *regs)
395{ 404{
396 kstat_cpu(0).irqs[0]++; 405 kstat_cpu(0).irqs[0]++;
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c
index aff26a52167c..6fc69c74fe2e 100644
--- a/arch/m68k/kernel/m68k_ksyms.c
+++ b/arch/m68k/kernel/m68k_ksyms.c
@@ -1,65 +1,10 @@
1#include <linux/module.h> 1#include <linux/module.h>
2#include <linux/linkage.h>
3#include <linux/sched.h>
4#include <linux/string.h>
5#include <linux/mm.h>
6#include <linux/user.h>
7#include <linux/elfcore.h>
8#include <linux/in6.h>
9#include <linux/interrupt.h>
10
11#include <asm/setup.h>
12#include <asm/machdep.h>
13#include <asm/pgalloc.h>
14#include <asm/irq.h>
15#include <asm/io.h>
16#include <asm/semaphore.h> 2#include <asm/semaphore.h>
17#include <asm/checksum.h>
18 3
19asmlinkage long long __ashldi3 (long long, int); 4asmlinkage long long __ashldi3 (long long, int);
20asmlinkage long long __ashrdi3 (long long, int); 5asmlinkage long long __ashrdi3 (long long, int);
21asmlinkage long long __lshrdi3 (long long, int); 6asmlinkage long long __lshrdi3 (long long, int);
22asmlinkage long long __muldi3 (long long, long long); 7asmlinkage long long __muldi3 (long long, long long);
23extern char m68k_debug_device[];
24
25/* platform dependent support */
26
27EXPORT_SYMBOL(m68k_machtype);
28EXPORT_SYMBOL(m68k_cputype);
29EXPORT_SYMBOL(m68k_is040or060);
30EXPORT_SYMBOL(m68k_realnum_memory);
31EXPORT_SYMBOL(m68k_memory);
32#ifndef CONFIG_SUN3
33EXPORT_SYMBOL(cache_push);
34EXPORT_SYMBOL(cache_clear);
35#ifndef CONFIG_SINGLE_MEMORY_CHUNK
36EXPORT_SYMBOL(mm_vtop);
37EXPORT_SYMBOL(mm_ptov);
38EXPORT_SYMBOL(mm_end_of_chunk);
39#else
40EXPORT_SYMBOL(m68k_memoffset);
41#endif /* !CONFIG_SINGLE_MEMORY_CHUNK */
42EXPORT_SYMBOL(__ioremap);
43EXPORT_SYMBOL(iounmap);
44EXPORT_SYMBOL(kernel_set_cachemode);
45#endif /* !CONFIG_SUN3 */
46EXPORT_SYMBOL(m68k_debug_device);
47EXPORT_SYMBOL(mach_hwclk);
48EXPORT_SYMBOL(mach_get_ss);
49EXPORT_SYMBOL(mach_get_rtc_pll);
50EXPORT_SYMBOL(mach_set_rtc_pll);
51#ifdef CONFIG_INPUT_M68K_BEEP_MODULE
52EXPORT_SYMBOL(mach_beep);
53#endif
54EXPORT_SYMBOL(dump_fpu);
55EXPORT_SYMBOL(dump_thread);
56EXPORT_SYMBOL(strnlen);
57EXPORT_SYMBOL(strrchr);
58EXPORT_SYMBOL(strstr);
59EXPORT_SYMBOL(kernel_thread);
60#ifdef CONFIG_VME
61EXPORT_SYMBOL(vme_brdtype);
62#endif
63 8
64/* The following are special because they're not called 9/* The following are special because they're not called
65 explicitly (the C compiler generates them). Fortunately, 10 explicitly (the C compiler generates them). Fortunately,
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 45a46646c1b3..99fc1226f7f8 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -187,6 +187,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
187 set_fs (fs); 187 set_fs (fs);
188 return pid; 188 return pid;
189} 189}
190EXPORT_SYMBOL(kernel_thread);
190 191
191void flush_thread(void) 192void flush_thread(void)
192{ 193{
@@ -221,13 +222,13 @@ asmlinkage int m68k_clone(struct pt_regs *regs)
221{ 222{
222 unsigned long clone_flags; 223 unsigned long clone_flags;
223 unsigned long newsp; 224 unsigned long newsp;
224 int *parent_tidptr, *child_tidptr; 225 int __user *parent_tidptr, *child_tidptr;
225 226
226 /* syscall2 puts clone_flags in d1 and usp in d2 */ 227 /* syscall2 puts clone_flags in d1 and usp in d2 */
227 clone_flags = regs->d1; 228 clone_flags = regs->d1;
228 newsp = regs->d2; 229 newsp = regs->d2;
229 parent_tidptr = (int *)regs->d3; 230 parent_tidptr = (int __user *)regs->d3;
230 child_tidptr = (int *)regs->d4; 231 child_tidptr = (int __user *)regs->d4;
231 if (!newsp) 232 if (!newsp)
232 newsp = rdusp(); 233 newsp = rdusp();
233 return do_fork(clone_flags, newsp, regs, 0, 234 return do_fork(clone_flags, newsp, regs, 0,
@@ -311,6 +312,7 @@ int dump_fpu (struct pt_regs *regs, struct user_m68kfp_struct *fpu)
311 : "memory"); 312 : "memory");
312 return 1; 313 return 1;
313} 314}
315EXPORT_SYMBOL(dump_fpu);
314 316
315/* 317/*
316 * fill in the user structure for a core dump.. 318 * fill in the user structure for a core dump..
@@ -357,11 +359,12 @@ void dump_thread(struct pt_regs * regs, struct user * dump)
357 /* dump floating point stuff */ 359 /* dump floating point stuff */
358 dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp); 360 dump->u_fpvalid = dump_fpu (regs, &dump->m68kfp);
359} 361}
362EXPORT_SYMBOL(dump_thread);
360 363
361/* 364/*
362 * sys_execve() executes a new program. 365 * sys_execve() executes a new program.
363 */ 366 */
364asmlinkage int sys_execve(char *name, char **argv, char **envp) 367asmlinkage int sys_execve(char __user *name, char __user * __user *argv, char __user * __user *envp)
365{ 368{
366 int error; 369 int error;
367 char * filename; 370 char * filename;
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index f2d7ee0ee18c..9af3ee0e555d 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -42,29 +42,39 @@
42 42
43unsigned long m68k_machtype; 43unsigned long m68k_machtype;
44unsigned long m68k_cputype; 44unsigned long m68k_cputype;
45EXPORT_SYMBOL(m68k_machtype);
46EXPORT_SYMBOL(m68k_cputype);
45unsigned long m68k_fputype; 47unsigned long m68k_fputype;
46unsigned long m68k_mmutype; 48unsigned long m68k_mmutype;
47#ifdef CONFIG_VME 49#ifdef CONFIG_VME
48unsigned long vme_brdtype; 50unsigned long vme_brdtype;
51EXPORT_SYMBOL(vme_brdtype);
49#endif 52#endif
50 53
51int m68k_is040or060; 54int m68k_is040or060;
55EXPORT_SYMBOL(m68k_is040or060);
52 56
53extern int end; 57extern int end;
54extern unsigned long availmem; 58extern unsigned long availmem;
55 59
56int m68k_num_memory; 60int m68k_num_memory;
57int m68k_realnum_memory; 61int m68k_realnum_memory;
62EXPORT_SYMBOL(m68k_realnum_memory);
63#ifdef CONFIG_SINGLE_MEMORY_CHUNK
58unsigned long m68k_memoffset; 64unsigned long m68k_memoffset;
65EXPORT_SYMBOL(m68k_memoffset);
66#endif
59struct mem_info m68k_memory[NUM_MEMINFO]; 67struct mem_info m68k_memory[NUM_MEMINFO];
68EXPORT_SYMBOL(m68k_memory);
60 69
61static struct mem_info m68k_ramdisk; 70static struct mem_info m68k_ramdisk;
62 71
63static char m68k_command_line[CL_SIZE]; 72static char m68k_command_line[CL_SIZE];
64 73
65char m68k_debug_device[6] = ""; 74char m68k_debug_device[6] = "";
75EXPORT_SYMBOL(m68k_debug_device);
66 76
67void (*mach_sched_init) (irqreturn_t (*handler)(int, void *, struct pt_regs *)) __initdata = NULL; 77void (*mach_sched_init) (irq_handler_t handler) __initdata = NULL;
68/* machine dependent irq functions */ 78/* machine dependent irq functions */
69void (*mach_init_IRQ) (void) __initdata = NULL; 79void (*mach_init_IRQ) (void) __initdata = NULL;
70void (*mach_get_model) (char *model); 80void (*mach_get_model) (char *model);
@@ -72,10 +82,14 @@ int (*mach_get_hardware_list) (char *buffer);
72/* machine dependent timer functions */ 82/* machine dependent timer functions */
73unsigned long (*mach_gettimeoffset) (void); 83unsigned long (*mach_gettimeoffset) (void);
74int (*mach_hwclk) (int, struct rtc_time*); 84int (*mach_hwclk) (int, struct rtc_time*);
85EXPORT_SYMBOL(mach_hwclk);
75int (*mach_set_clock_mmss) (unsigned long); 86int (*mach_set_clock_mmss) (unsigned long);
76unsigned int (*mach_get_ss)(void); 87unsigned int (*mach_get_ss)(void);
77int (*mach_get_rtc_pll)(struct rtc_pll_info *); 88int (*mach_get_rtc_pll)(struct rtc_pll_info *);
78int (*mach_set_rtc_pll)(struct rtc_pll_info *); 89int (*mach_set_rtc_pll)(struct rtc_pll_info *);
90EXPORT_SYMBOL(mach_get_ss);
91EXPORT_SYMBOL(mach_get_rtc_pll);
92EXPORT_SYMBOL(mach_set_rtc_pll);
79void (*mach_reset)( void ); 93void (*mach_reset)( void );
80void (*mach_halt)( void ); 94void (*mach_halt)( void );
81void (*mach_power_off)( void ); 95void (*mach_power_off)( void );
@@ -89,6 +103,7 @@ void (*mach_l2_flush) (int);
89#endif 103#endif
90#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE) 104#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
91void (*mach_beep)(unsigned int, unsigned int); 105void (*mach_beep)(unsigned int, unsigned int);
106EXPORT_SYMBOL(mach_beep);
92#endif 107#endif
93#if defined(CONFIG_ISA) && defined(MULTI_ISA) 108#if defined(CONFIG_ISA) && defined(MULTI_ISA)
94int isa_type; 109int isa_type;
diff --git a/arch/m68k/kernel/time.c b/arch/m68k/kernel/time.c
index 28b2fefa4513..2a599c3ed787 100644
--- a/arch/m68k/kernel/time.c
+++ b/arch/m68k/kernel/time.c
@@ -21,6 +21,7 @@
21 21
22#include <asm/machdep.h> 22#include <asm/machdep.h>
23#include <asm/io.h> 23#include <asm/io.h>
24#include <asm/irq_regs.h>
24 25
25#include <linux/time.h> 26#include <linux/time.h>
26#include <linux/timex.h> 27#include <linux/timex.h>
@@ -37,13 +38,13 @@ static inline int set_rtc_mmss(unsigned long nowtime)
37 * timer_interrupt() needs to keep up the real-time clock, 38 * timer_interrupt() needs to keep up the real-time clock,
38 * as well as call the "do_timer()" routine every clocktick 39 * as well as call the "do_timer()" routine every clocktick
39 */ 40 */
40static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs * regs) 41static irqreturn_t timer_interrupt(int irq, void *dummy)
41{ 42{
42 do_timer(1); 43 do_timer(1);
43#ifndef CONFIG_SMP 44#ifndef CONFIG_SMP
44 update_process_times(user_mode(regs)); 45 update_process_times(user_mode(get_irq_regs()));
45#endif 46#endif
46 profile_tick(CPU_PROFILING, regs); 47 profile_tick(CPU_PROFILING);
47 48
48#ifdef CONFIG_HEARTBEAT 49#ifdef CONFIG_HEARTBEAT
49 /* use power LED as a heartbeat instead -- much more useful 50 /* use power LED as a heartbeat instead -- much more useful
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index 4569406a2e1f..759fa244e6cd 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -326,13 +326,13 @@ static inline int do_040writeback1(unsigned short wbs, unsigned long wba,
326 326
327 switch (wbs & WBSIZ_040) { 327 switch (wbs & WBSIZ_040) {
328 case BA_SIZE_BYTE: 328 case BA_SIZE_BYTE:
329 res = put_user(wbd & 0xff, (char *)wba); 329 res = put_user(wbd & 0xff, (char __user *)wba);
330 break; 330 break;
331 case BA_SIZE_WORD: 331 case BA_SIZE_WORD:
332 res = put_user(wbd & 0xffff, (short *)wba); 332 res = put_user(wbd & 0xffff, (short __user *)wba);
333 break; 333 break;
334 case BA_SIZE_LONG: 334 case BA_SIZE_LONG:
335 res = put_user(wbd, (int *)wba); 335 res = put_user(wbd, (int __user *)wba);
336 break; 336 break;
337 } 337 }
338 338
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c
index b92b89e1ea0c..891e1347bc4e 100644
--- a/arch/m68k/lib/string.c
+++ b/arch/m68k/lib/string.c
@@ -1,6 +1,19 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file COPYING in the main directory of this archive
4 * for more details.
5 */
6
7#define __IN_STRING_C
1 8
2#include <linux/types.h>
3#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/string.h>
11
12char *strcpy(char *dest, const char *src)
13{
14 return __kernel_strcpy(dest, src);
15}
16EXPORT_SYMBOL(strcpy);
4 17
5void *memset(void *s, int c, size_t count) 18void *memset(void *s, int c, size_t count)
6{ 19{
diff --git a/arch/m68k/lib/uaccess.c b/arch/m68k/lib/uaccess.c
index 1bc188c0d983..865f9fb9e686 100644
--- a/arch/m68k/lib/uaccess.c
+++ b/arch/m68k/lib/uaccess.c
@@ -84,7 +84,7 @@ unsigned long __generic_copy_to_user(void __user *to, const void *from,
84 " .even\n" 84 " .even\n"
85 "20: lsl.l #2,%0\n" 85 "20: lsl.l #2,%0\n"
86 "50: add.l %5,%0\n" 86 "50: add.l %5,%0\n"
87 " jra 7b\n" 87 " jra 8b\n"
88 " .previous\n" 88 " .previous\n"
89 "\n" 89 "\n"
90 " .section __ex_table,\"a\"\n" 90 " .section __ex_table,\"a\"\n"
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 6eaa881793d1..a1c7ec706741 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -25,7 +25,7 @@
25int baboon_present,baboon_active; 25int baboon_present,baboon_active;
26volatile struct baboon *baboon; 26volatile struct baboon *baboon;
27 27
28irqreturn_t baboon_irq(int, void *, struct pt_regs *); 28irqreturn_t baboon_irq(int, void *);
29 29
30#if 0 30#if 0
31extern int macide_ack_intr(struct ata_channel *); 31extern int macide_ack_intr(struct ata_channel *);
@@ -64,7 +64,7 @@ void __init baboon_register_interrupts(void)
64 * Baboon interrupt handler. This works a lot like a VIA. 64 * Baboon interrupt handler. This works a lot like a VIA.
65 */ 65 */
66 66
67irqreturn_t baboon_irq(int irq, void *dev_id, struct pt_regs *regs) 67irqreturn_t baboon_irq(int irq, void *dev_id)
68{ 68{
69 int irq_bit,i; 69 int irq_bit,i;
70 unsigned char events; 70 unsigned char events;
@@ -81,7 +81,7 @@ irqreturn_t baboon_irq(int irq, void *dev_id, struct pt_regs *regs)
81 for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) { 81 for (i = 0, irq_bit = 1 ; i < 3 ; i++, irq_bit <<= 1) {
82 if (events & irq_bit/* & baboon_active*/) { 82 if (events & irq_bit/* & baboon_active*/) {
83 baboon_active &= ~irq_bit; 83 baboon_active &= ~irq_bit;
84 m68k_handle_int(IRQ_BABOON_0 + i, regs); 84 m68k_handle_int(IRQ_BABOON_0 + i);
85 baboon_active |= irq_bit; 85 baboon_active |= irq_bit;
86 baboon->mb_ifr &= ~irq_bit; 86 baboon->mb_ifr &= ~irq_bit;
87 } 87 }
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 85dda1095b1f..562b38d00180 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -72,7 +72,7 @@ extern int show_mac_interrupts(struct seq_file *, void *);
72extern void iop_preinit(void); 72extern void iop_preinit(void);
73extern void iop_init(void); 73extern void iop_init(void);
74extern void via_init(void); 74extern void via_init(void);
75extern void via_init_clock(irqreturn_t (*func)(int, void *, struct pt_regs *)); 75extern void via_init_clock(irq_handler_t func);
76extern void via_flush_cache(void); 76extern void via_flush_cache(void);
77extern void oss_init(void); 77extern void oss_init(void);
78extern void psc_init(void); 78extern void psc_init(void);
@@ -88,7 +88,7 @@ extern void mac_debugging_long(int, long);
88 88
89static void mac_get_model(char *str); 89static void mac_get_model(char *str);
90 90
91static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)) 91static void mac_sched_init(irq_handler_t vector)
92{ 92{
93 via_init_clock(vector); 93 via_init_clock(vector);
94} 94}
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index bc657b1057a7..0cea21f58192 100644
--- a/arch/m68k/mac/iop.c
+++ b/arch/m68k/mac/iop.c
@@ -132,7 +132,7 @@ static int iop_get_proc_info(char *, char **, off_t, int);
132 132
133struct listener { 133struct listener {
134 const char *devname; 134 const char *devname;
135 void (*handler)(struct iop_msg *, struct pt_regs *); 135 void (*handler)(struct iop_msg *);
136}; 136};
137 137
138/* 138/*
@@ -152,7 +152,7 @@ static struct iop_msg iop_msg_pool[NUM_IOP_MSGS];
152static struct iop_msg *iop_send_queue[NUM_IOPS][NUM_IOP_CHAN]; 152static struct iop_msg *iop_send_queue[NUM_IOPS][NUM_IOP_CHAN];
153static struct listener iop_listeners[NUM_IOPS][NUM_IOP_CHAN]; 153static struct listener iop_listeners[NUM_IOPS][NUM_IOP_CHAN];
154 154
155irqreturn_t iop_ism_irq(int, void *, struct pt_regs *); 155irqreturn_t iop_ism_irq(int, void *);
156 156
157extern void oss_irq_enable(int); 157extern void oss_irq_enable(int);
158 158
@@ -342,7 +342,7 @@ void __init iop_register_interrupts(void)
342 */ 342 */
343 343
344int iop_listen(uint iop_num, uint chan, 344int iop_listen(uint iop_num, uint chan,
345 void (*handler)(struct iop_msg *, struct pt_regs *), 345 void (*handler)(struct iop_msg *),
346 const char *devname) 346 const char *devname)
347{ 347{
348 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL; 348 if ((iop_num >= NUM_IOPS) || !iop_base[iop_num]) return -EINVAL;
@@ -407,7 +407,7 @@ static void iop_do_send(struct iop_msg *msg)
407 * has gone into the IOP_MSG_COMPLETE state. 407 * has gone into the IOP_MSG_COMPLETE state.
408 */ 408 */
409 409
410static void iop_handle_send(uint iop_num, uint chan, struct pt_regs *regs) 410static void iop_handle_send(uint iop_num, uint chan)
411{ 411{
412 volatile struct mac_iop *iop = iop_base[iop_num]; 412 volatile struct mac_iop *iop = iop_base[iop_num];
413 struct iop_msg *msg,*msg2; 413 struct iop_msg *msg,*msg2;
@@ -426,7 +426,7 @@ static void iop_handle_send(uint iop_num, uint chan, struct pt_regs *regs)
426 for (i = 0 ; i < IOP_MSG_LEN ; i++, offset++) { 426 for (i = 0 ; i < IOP_MSG_LEN ; i++, offset++) {
427 msg->reply[i] = iop_readb(iop, offset); 427 msg->reply[i] = iop_readb(iop, offset);
428 } 428 }
429 if (msg->handler) (*msg->handler)(msg, regs); 429 if (msg->handler) (*msg->handler)(msg);
430 msg2 = msg; 430 msg2 = msg;
431 msg = msg->next; 431 msg = msg->next;
432 iop_free_msg(msg2); 432 iop_free_msg(msg2);
@@ -440,7 +440,7 @@ static void iop_handle_send(uint iop_num, uint chan, struct pt_regs *regs)
440 * gone into the IOP_MSG_NEW state. 440 * gone into the IOP_MSG_NEW state.
441 */ 441 */
442 442
443static void iop_handle_recv(uint iop_num, uint chan, struct pt_regs *regs) 443static void iop_handle_recv(uint iop_num, uint chan)
444{ 444{
445 volatile struct mac_iop *iop = iop_base[iop_num]; 445 volatile struct mac_iop *iop = iop_base[iop_num];
446 int i,offset; 446 int i,offset;
@@ -468,7 +468,7 @@ static void iop_handle_recv(uint iop_num, uint chan, struct pt_regs *regs)
468 /* the message ourselves to avoid possible stalls. */ 468 /* the message ourselves to avoid possible stalls. */
469 469
470 if (msg->handler) { 470 if (msg->handler) {
471 (*msg->handler)(msg, regs); 471 (*msg->handler)(msg);
472 } else { 472 } else {
473#ifdef DEBUG_IOP 473#ifdef DEBUG_IOP
474 printk("iop_handle_recv: unclaimed message on iop %d channel %d\n", iop_num, chan); 474 printk("iop_handle_recv: unclaimed message on iop %d channel %d\n", iop_num, chan);
@@ -492,7 +492,7 @@ static void iop_handle_recv(uint iop_num, uint chan, struct pt_regs *regs)
492 492
493int iop_send_message(uint iop_num, uint chan, void *privdata, 493int iop_send_message(uint iop_num, uint chan, void *privdata,
494 uint msg_len, __u8 *msg_data, 494 uint msg_len, __u8 *msg_data,
495 void (*handler)(struct iop_msg *, struct pt_regs *)) 495 void (*handler)(struct iop_msg *))
496{ 496{
497 struct iop_msg *msg, *q; 497 struct iop_msg *msg, *q;
498 498
@@ -584,7 +584,7 @@ __u8 *iop_compare_code(uint iop_num, __u8 *code_start,
584 * Handle an ISM IOP interrupt 584 * Handle an ISM IOP interrupt
585 */ 585 */
586 586
587irqreturn_t iop_ism_irq(int irq, void *dev_id, struct pt_regs *regs) 587irqreturn_t iop_ism_irq(int irq, void *dev_id)
588{ 588{
589 uint iop_num = (uint) dev_id; 589 uint iop_num = (uint) dev_id;
590 volatile struct mac_iop *iop = iop_base[iop_num]; 590 volatile struct mac_iop *iop = iop_base[iop_num];
@@ -608,7 +608,7 @@ irqreturn_t iop_ism_irq(int irq, void *dev_id, struct pt_regs *regs)
608 printk(" %02X", state); 608 printk(" %02X", state);
609#endif 609#endif
610 if (state == IOP_MSG_COMPLETE) { 610 if (state == IOP_MSG_COMPLETE) {
611 iop_handle_send(iop_num, i, regs); 611 iop_handle_send(iop_num, i);
612 } 612 }
613 } 613 }
614#ifdef DEBUG_IOP 614#ifdef DEBUG_IOP
@@ -628,7 +628,7 @@ irqreturn_t iop_ism_irq(int irq, void *dev_id, struct pt_regs *regs)
628 printk(" %02X", state); 628 printk(" %02X", state);
629#endif 629#endif
630 if (state == IOP_MSG_NEW) { 630 if (state == IOP_MSG_NEW) {
631 iop_handle_recv(iop_num, i, regs); 631 iop_handle_recv(iop_num, i);
632 } 632 }
633 } 633 }
634#ifdef DEBUG_IOP 634#ifdef DEBUG_IOP
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index 694b14bb0de1..f6fcd754d8f6 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -133,6 +133,7 @@
133#include <asm/hwtest.h> 133#include <asm/hwtest.h>
134#include <asm/errno.h> 134#include <asm/errno.h>
135#include <asm/macints.h> 135#include <asm/macints.h>
136#include <asm/irq_regs.h>
136 137
137#define DEBUG_SPURIOUS 138#define DEBUG_SPURIOUS
138#define SHUTUP_SONIC 139#define SHUTUP_SONIC
@@ -208,8 +209,8 @@ static void scc_irq_disable(unsigned int);
208 * console_loglevel determines NMI handler function 209 * console_loglevel determines NMI handler function
209 */ 210 */
210 211
211irqreturn_t mac_nmi_handler(int, void *, struct pt_regs *); 212irqreturn_t mac_nmi_handler(int, void *);
212irqreturn_t mac_debug_handler(int, void *, struct pt_regs *); 213irqreturn_t mac_debug_handler(int, void *);
213 214
214/* #define DEBUG_MACINTS */ 215/* #define DEBUG_MACINTS */
215 216
@@ -393,7 +394,7 @@ int mac_irq_pending(unsigned int irq)
393 394
394static int num_debug[8]; 395static int num_debug[8];
395 396
396irqreturn_t mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs) 397irqreturn_t mac_debug_handler(int irq, void *dev_id)
397{ 398{
398 if (num_debug[irq] < 10) { 399 if (num_debug[irq] < 10) {
399 printk("DEBUG: Unexpected IRQ %d\n", irq); 400 printk("DEBUG: Unexpected IRQ %d\n", irq);
@@ -405,7 +406,7 @@ irqreturn_t mac_debug_handler(int irq, void *dev_id, struct pt_regs *regs)
405static int in_nmi; 406static int in_nmi;
406static volatile int nmi_hold; 407static volatile int nmi_hold;
407 408
408irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp) 409irqreturn_t mac_nmi_handler(int irq, void *dev_id)
409{ 410{
410 int i; 411 int i;
411 /* 412 /*
@@ -432,6 +433,7 @@ irqreturn_t mac_nmi_handler(int irq, void *dev_id, struct pt_regs *fp)
432 433
433 if (console_loglevel >= 8) { 434 if (console_loglevel >= 8) {
434#if 0 435#if 0
436 struct pt_regs *fp = get_irq_regs();
435 show_state(); 437 show_state();
436 printk("PC: %08lx\nSR: %04x SP: %p\n", fp->pc, fp->sr, fp); 438 printk("PC: %08lx\nSR: %04x SP: %p\n", fp->pc, fp->sr, fp);
437 printk("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n", 439 printk("d0: %08lx d1: %08lx d2: %08lx d3: %08lx\n",
@@ -479,7 +481,7 @@ static void scc_irq_disable(unsigned int irq)
479 * here is cleaner than hacking it into drivers/char/macserial.c. 481 * here is cleaner than hacking it into drivers/char/macserial.c.
480 */ 482 */
481 483
482void mac_scc_dispatch(int irq, void *dev_id, struct pt_regs *regs) 484void mac_scc_dispatch(int irq, void *dev_id)
483{ 485{
484 volatile unsigned char *scc = (unsigned char *) mac_bi_data.sccbase + 2; 486 volatile unsigned char *scc = (unsigned char *) mac_bi_data.sccbase + 2;
485 unsigned char reg; 487 unsigned char reg;
@@ -504,7 +506,7 @@ void mac_scc_dispatch(int irq, void *dev_id, struct pt_regs *regs)
504 /* pretty much kill the system. */ 506 /* pretty much kill the system. */
505 507
506 if (reg & 0x38) 508 if (reg & 0x38)
507 m68k_handle_int(IRQ_SCCA, regs); 509 m68k_handle_int(IRQ_SCCA);
508 if (reg & 0x07) 510 if (reg & 0x07)
509 m68k_handle_int(IRQ_SCCB, regs); 511 m68k_handle_int(IRQ_SCCB);
510} 512}
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index 63e04365191f..63690819565a 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -30,11 +30,11 @@
30int oss_present; 30int oss_present;
31volatile struct mac_oss *oss; 31volatile struct mac_oss *oss;
32 32
33irqreturn_t oss_irq(int, void *, struct pt_regs *); 33irqreturn_t oss_irq(int, void *);
34irqreturn_t oss_nubus_irq(int, void *, struct pt_regs *); 34irqreturn_t oss_nubus_irq(int, void *);
35 35
36extern irqreturn_t via1_irq(int, void *, struct pt_regs *); 36extern irqreturn_t via1_irq(int, void *);
37extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *); 37extern irqreturn_t mac_scc_dispatch(int, void *);
38 38
39/* 39/*
40 * Initialize the OSS 40 * Initialize the OSS
@@ -92,7 +92,7 @@ void __init oss_nubus_init(void)
92 * and SCSI; everything else is routed to its own autovector IRQ. 92 * and SCSI; everything else is routed to its own autovector IRQ.
93 */ 93 */
94 94
95irqreturn_t oss_irq(int irq, void *dev_id, struct pt_regs *regs) 95irqreturn_t oss_irq(int irq, void *dev_id)
96{ 96{
97 int events; 97 int events;
98 98
@@ -113,7 +113,7 @@ irqreturn_t oss_irq(int irq, void *dev_id, struct pt_regs *regs)
113 oss->irq_pending &= ~OSS_IP_SOUND; 113 oss->irq_pending &= ~OSS_IP_SOUND;
114 } else if (events & OSS_IP_SCSI) { 114 } else if (events & OSS_IP_SCSI) {
115 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED; 115 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_DISABLED;
116 m68k_handle_int(IRQ_MAC_SCSI, regs); 116 m68k_handle_int(IRQ_MAC_SCSI);
117 oss->irq_pending &= ~OSS_IP_SCSI; 117 oss->irq_pending &= ~OSS_IP_SCSI;
118 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI; 118 oss->irq_level[OSS_SCSI] = OSS_IRQLEV_SCSI;
119 } else { 119 } else {
@@ -128,7 +128,7 @@ irqreturn_t oss_irq(int irq, void *dev_id, struct pt_regs *regs)
128 * Unlike the VIA/RBV this is on its own autovector interrupt level. 128 * Unlike the VIA/RBV this is on its own autovector interrupt level.
129 */ 129 */
130 130
131irqreturn_t oss_nubus_irq(int irq, void *dev_id, struct pt_regs *regs) 131irqreturn_t oss_nubus_irq(int irq, void *dev_id)
132{ 132{
133 int events, irq_bit, i; 133 int events, irq_bit, i;
134 134
@@ -146,7 +146,7 @@ irqreturn_t oss_nubus_irq(int irq, void *dev_id, struct pt_regs *regs)
146 for (i = 0, irq_bit = 1 ; i < 6 ; i++, irq_bit <<= 1) { 146 for (i = 0, irq_bit = 1 ; i < 6 ; i++, irq_bit <<= 1) {
147 if (events & irq_bit) { 147 if (events & irq_bit) {
148 oss->irq_level[i] = OSS_IRQLEV_DISABLED; 148 oss->irq_level[i] = OSS_IRQLEV_DISABLED;
149 m68k_handle_int(NUBUS_SOURCE_BASE + i, regs); 149 m68k_handle_int(NUBUS_SOURCE_BASE + i);
150 oss->irq_pending &= ~irq_bit; 150 oss->irq_pending &= ~irq_bit;
151 oss->irq_level[i] = OSS_IRQLEV_NUBUS; 151 oss->irq_level[i] = OSS_IRQLEV_NUBUS;
152 } 152 }
diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index e26218091755..15378a5878c9 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -30,7 +30,7 @@
30int psc_present; 30int psc_present;
31volatile __u8 *psc; 31volatile __u8 *psc;
32 32
33irqreturn_t psc_irq(int, void *, struct pt_regs *); 33irqreturn_t psc_irq(int, void *);
34 34
35/* 35/*
36 * Debugging dump, used in various places to see what's going on. 36 * Debugging dump, used in various places to see what's going on.
@@ -127,7 +127,7 @@ void __init psc_register_interrupts(void)
127 * PSC interrupt handler. It's a lot like the VIA interrupt handler. 127 * PSC interrupt handler. It's a lot like the VIA interrupt handler.
128 */ 128 */
129 129
130irqreturn_t psc_irq(int irq, void *dev_id, struct pt_regs *regs) 130irqreturn_t psc_irq(int irq, void *dev_id)
131{ 131{
132 int pIFR = pIFRbase + ((int) dev_id); 132 int pIFR = pIFRbase + ((int) dev_id);
133 int pIER = pIERbase + ((int) dev_id); 133 int pIER = pIERbase + ((int) dev_id);
@@ -149,7 +149,7 @@ irqreturn_t psc_irq(int irq, void *dev_id, struct pt_regs *regs)
149 for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) { 149 for (i = 0, irq_bit = 1 ; i < 4 ; i++, irq_bit <<= 1) {
150 if (events & irq_bit) { 150 if (events & irq_bit) {
151 psc_write_byte(pIER, irq_bit); 151 psc_write_byte(pIER, irq_bit);
152 m68k_handle_int(base_irq + i, regs); 152 m68k_handle_int(base_irq + i);
153 psc_write_byte(pIFR, irq_bit); 153 psc_write_byte(pIFR, irq_bit);
154 psc_write_byte(pIER, irq_bit | 0x80); 154 psc_write_byte(pIER, irq_bit | 0x80);
155 } 155 }
diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c
index c4aa345d544e..e27735be2924 100644
--- a/arch/m68k/mac/via.c
+++ b/arch/m68k/mac/via.c
@@ -63,14 +63,14 @@ static int gIER,gIFR,gBufA,gBufB;
63static int nubus_active; 63static int nubus_active;
64 64
65void via_debug_dump(void); 65void via_debug_dump(void);
66irqreturn_t via1_irq(int, void *, struct pt_regs *); 66irqreturn_t via1_irq(int, void *);
67irqreturn_t via2_irq(int, void *, struct pt_regs *); 67irqreturn_t via2_irq(int, void *);
68irqreturn_t via_nubus_irq(int, void *, struct pt_regs *); 68irqreturn_t via_nubus_irq(int, void *);
69void via_irq_enable(int irq); 69void via_irq_enable(int irq);
70void via_irq_disable(int irq); 70void via_irq_disable(int irq);
71void via_irq_clear(int irq); 71void via_irq_clear(int irq);
72 72
73extern irqreturn_t mac_scc_dispatch(int, void *, struct pt_regs *); 73extern irqreturn_t mac_scc_dispatch(int, void *);
74extern int oss_present; 74extern int oss_present;
75 75
76/* 76/*
@@ -235,7 +235,7 @@ void __init via_init(void)
235 * Start the 100 Hz clock 235 * Start the 100 Hz clock
236 */ 236 */
237 237
238void __init via_init_clock(irqreturn_t (*func)(int, void *, struct pt_regs *)) 238void __init via_init_clock(irq_handler_t func)
239{ 239{
240 via1[vACR] |= 0x40; 240 via1[vACR] |= 0x40;
241 via1[vT1LL] = MAC_CLOCK_LOW; 241 via1[vT1LL] = MAC_CLOCK_LOW;
@@ -412,7 +412,7 @@ void __init via_nubus_init(void)
412 * the machspec interrupt number after clearing the interrupt. 412 * the machspec interrupt number after clearing the interrupt.
413 */ 413 */
414 414
415irqreturn_t via1_irq(int irq, void *dev_id, struct pt_regs *regs) 415irqreturn_t via1_irq(int irq, void *dev_id)
416{ 416{
417 int irq_bit, i; 417 int irq_bit, i;
418 unsigned char events, mask; 418 unsigned char events, mask;
@@ -424,7 +424,7 @@ irqreturn_t via1_irq(int irq, void *dev_id, struct pt_regs *regs)
424 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) 424 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1)
425 if (events & irq_bit) { 425 if (events & irq_bit) {
426 via1[vIER] = irq_bit; 426 via1[vIER] = irq_bit;
427 m68k_handle_int(VIA1_SOURCE_BASE + i, regs); 427 m68k_handle_int(VIA1_SOURCE_BASE + i);
428 via1[vIFR] = irq_bit; 428 via1[vIFR] = irq_bit;
429 via1[vIER] = irq_bit | 0x80; 429 via1[vIER] = irq_bit | 0x80;
430 } 430 }
@@ -439,14 +439,14 @@ irqreturn_t via1_irq(int irq, void *dev_id, struct pt_regs *regs)
439 /* No, it won't be set. that's why we're doing this. */ 439 /* No, it won't be set. that's why we're doing this. */
440 via_irq_disable(IRQ_MAC_NUBUS); 440 via_irq_disable(IRQ_MAC_NUBUS);
441 via_irq_clear(IRQ_MAC_NUBUS); 441 via_irq_clear(IRQ_MAC_NUBUS);
442 m68k_handle_int(IRQ_MAC_NUBUS, regs); 442 m68k_handle_int(IRQ_MAC_NUBUS);
443 via_irq_enable(IRQ_MAC_NUBUS); 443 via_irq_enable(IRQ_MAC_NUBUS);
444 } 444 }
445#endif 445#endif
446 return IRQ_HANDLED; 446 return IRQ_HANDLED;
447} 447}
448 448
449irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs) 449irqreturn_t via2_irq(int irq, void *dev_id)
450{ 450{
451 int irq_bit, i; 451 int irq_bit, i;
452 unsigned char events, mask; 452 unsigned char events, mask;
@@ -459,7 +459,7 @@ irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs)
459 if (events & irq_bit) { 459 if (events & irq_bit) {
460 via2[gIER] = irq_bit; 460 via2[gIER] = irq_bit;
461 via2[gIFR] = irq_bit | rbv_clear; 461 via2[gIFR] = irq_bit | rbv_clear;
462 m68k_handle_int(VIA2_SOURCE_BASE + i, regs); 462 m68k_handle_int(VIA2_SOURCE_BASE + i);
463 via2[gIER] = irq_bit | 0x80; 463 via2[gIER] = irq_bit | 0x80;
464 } 464 }
465 return IRQ_HANDLED; 465 return IRQ_HANDLED;
@@ -470,7 +470,7 @@ irqreturn_t via2_irq(int irq, void *dev_id, struct pt_regs *regs)
470 * VIA2 dispatcher as a fast interrupt handler. 470 * VIA2 dispatcher as a fast interrupt handler.
471 */ 471 */
472 472
473irqreturn_t via_nubus_irq(int irq, void *dev_id, struct pt_regs *regs) 473irqreturn_t via_nubus_irq(int irq, void *dev_id)
474{ 474{
475 int irq_bit, i; 475 int irq_bit, i;
476 unsigned char events; 476 unsigned char events;
@@ -481,7 +481,7 @@ irqreturn_t via_nubus_irq(int irq, void *dev_id, struct pt_regs *regs)
481 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) { 481 for (i = 0, irq_bit = 1 ; i < 7 ; i++, irq_bit <<= 1) {
482 if (events & irq_bit) { 482 if (events & irq_bit) {
483 via_irq_disable(NUBUS_SOURCE_BASE + i); 483 via_irq_disable(NUBUS_SOURCE_BASE + i);
484 m68k_handle_int(NUBUS_SOURCE_BASE + i, regs); 484 m68k_handle_int(NUBUS_SOURCE_BASE + i);
485 via_irq_enable(NUBUS_SOURCE_BASE + i); 485 via_irq_enable(NUBUS_SOURCE_BASE + i);
486 } 486 }
487 } 487 }
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
index f46f049d29ff..b54ef1726c55 100644
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -7,6 +7,7 @@
7 * used by other architectures /Roman Zippel 7 * used by other architectures /Roman Zippel
8 */ 8 */
9 9
10#include <linux/module.h>
10#include <linux/mm.h> 11#include <linux/mm.h>
11#include <linux/kernel.h> 12#include <linux/kernel.h>
12#include <linux/string.h> 13#include <linux/string.h>
@@ -219,6 +220,7 @@ void __iomem *__ioremap(unsigned long physaddr, unsigned long size, int cachefla
219 220
220 return (void __iomem *)retaddr; 221 return (void __iomem *)retaddr;
221} 222}
223EXPORT_SYMBOL(__ioremap);
222 224
223/* 225/*
224 * Unmap a ioremap()ed region again 226 * Unmap a ioremap()ed region again
@@ -234,6 +236,7 @@ void iounmap(void __iomem *addr)
234 free_io_area((__force void *)addr); 236 free_io_area((__force void *)addr);
235#endif 237#endif
236} 238}
239EXPORT_SYMBOL(iounmap);
237 240
238/* 241/*
239 * __iounmap unmaps nearly everything, so be careful 242 * __iounmap unmaps nearly everything, so be careful
@@ -360,3 +363,4 @@ void kernel_set_cachemode(void *addr, unsigned long size, int cmode)
360 363
361 flush_tlb_all(); 364 flush_tlb_all();
362} 365}
366EXPORT_SYMBOL(kernel_set_cachemode);
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c
index a0c095e17222..0f88812822b1 100644
--- a/arch/m68k/mm/memory.c
+++ b/arch/m68k/mm/memory.c
@@ -4,6 +4,7 @@
4 * Copyright (C) 1995 Hamish Macdonald 4 * Copyright (C) 1995 Hamish Macdonald
5 */ 5 */
6 6
7#include <linux/module.h>
7#include <linux/mm.h> 8#include <linux/mm.h>
8#include <linux/kernel.h> 9#include <linux/kernel.h>
9#include <linux/string.h> 10#include <linux/string.h>
@@ -157,9 +158,8 @@ unsigned long mm_vtop(unsigned long vaddr)
157 158
158 return -1; 159 return -1;
159} 160}
160#endif 161EXPORT_SYMBOL(mm_vtop);
161 162
162#ifndef CONFIG_SINGLE_MEMORY_CHUNK
163unsigned long mm_ptov (unsigned long paddr) 163unsigned long mm_ptov (unsigned long paddr)
164{ 164{
165 int i = 0; 165 int i = 0;
@@ -185,6 +185,7 @@ unsigned long mm_ptov (unsigned long paddr)
185#endif 185#endif
186 return -1; 186 return -1;
187} 187}
188EXPORT_SYMBOL(mm_ptov);
188#endif 189#endif
189 190
190/* invalidate page in both caches */ 191/* invalidate page in both caches */
@@ -298,6 +299,7 @@ void cache_clear (unsigned long paddr, int len)
298 mach_l2_flush(0); 299 mach_l2_flush(0);
299#endif 300#endif
300} 301}
302EXPORT_SYMBOL(cache_clear); /* probably can be unexported */
301 303
302 304
303/* 305/*
@@ -350,6 +352,7 @@ void cache_push (unsigned long paddr, int len)
350 mach_l2_flush(1); 352 mach_l2_flush(1);
351#endif 353#endif
352} 354}
355EXPORT_SYMBOL(cache_push); /* probably can be unexported */
353 356
354#ifndef CONFIG_SINGLE_MEMORY_CHUNK 357#ifndef CONFIG_SINGLE_MEMORY_CHUNK
355int mm_end_of_chunk (unsigned long addr, int len) 358int mm_end_of_chunk (unsigned long addr, int len)
@@ -361,4 +364,5 @@ int mm_end_of_chunk (unsigned long addr, int len)
361 return 1; 364 return 1;
362 return 0; 365 return 0;
363} 366}
367EXPORT_SYMBOL(mm_end_of_chunk);
364#endif 368#endif
diff --git a/arch/m68k/mm/sun3kmap.c b/arch/m68k/mm/sun3kmap.c
index 7f0d86f3fe73..1af24cb5bfe1 100644
--- a/arch/m68k/mm/sun3kmap.c
+++ b/arch/m68k/mm/sun3kmap.c
@@ -8,6 +8,7 @@
8 * for more details. 8 * for more details.
9 */ 9 */
10 10
11#include <linux/module.h>
11#include <linux/types.h> 12#include <linux/types.h>
12#include <linux/kernel.h> 13#include <linux/kernel.h>
13#include <linux/mm.h> 14#include <linux/mm.h>
@@ -59,7 +60,7 @@ static inline void do_pmeg_mapin(unsigned long phys, unsigned long virt,
59 } 60 }
60} 61}
61 62
62void *sun3_ioremap(unsigned long phys, unsigned long size, 63void __iomem *sun3_ioremap(unsigned long phys, unsigned long size,
63 unsigned long type) 64 unsigned long type)
64{ 65{
65 struct vm_struct *area; 66 struct vm_struct *area;
@@ -101,22 +102,24 @@ void *sun3_ioremap(unsigned long phys, unsigned long size,
101 virt += seg_pages * PAGE_SIZE; 102 virt += seg_pages * PAGE_SIZE;
102 } 103 }
103 104
104 return (void *)ret; 105 return (void __iomem *)ret;
105 106
106} 107}
107 108
108 109
109void *__ioremap(unsigned long phys, unsigned long size, int cache) 110void __iomem *__ioremap(unsigned long phys, unsigned long size, int cache)
110{ 111{
111 112
112 return sun3_ioremap(phys, size, SUN3_PAGE_TYPE_IO); 113 return sun3_ioremap(phys, size, SUN3_PAGE_TYPE_IO);
113 114
114} 115}
116EXPORT_SYMBOL(__ioremap);
115 117
116void iounmap(void *addr) 118void iounmap(void __iomem *addr)
117{ 119{
118 vfree((void *)(PAGE_MASK & (unsigned long)addr)); 120 vfree((void *)(PAGE_MASK & (unsigned long)addr));
119} 121}
122EXPORT_SYMBOL(iounmap);
120 123
121/* sun3_map_test(addr, val) -- Reads a byte from addr, storing to val, 124/* sun3_map_test(addr, val) -- Reads a byte from addr, storing to val,
122 * trapping the potential read fault. Returns 0 if the access faulted, 125 * trapping the potential read fault. Returns 0 if the access faulted,
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 0cd0e5bddcee..4a7df9c3f85a 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -38,7 +38,7 @@
38 38
39static void mvme147_get_model(char *model); 39static void mvme147_get_model(char *model);
40static int mvme147_get_hardware_list(char *buffer); 40static int mvme147_get_hardware_list(char *buffer);
41extern void mvme147_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 41extern void mvme147_sched_init(irq_handler_t handler);
42extern unsigned long mvme147_gettimeoffset (void); 42extern unsigned long mvme147_gettimeoffset (void);
43extern int mvme147_hwclk (int, struct rtc_time *); 43extern int mvme147_hwclk (int, struct rtc_time *);
44extern int mvme147_set_clock_mmss (unsigned long); 44extern int mvme147_set_clock_mmss (unsigned long);
@@ -51,7 +51,7 @@ static int bcd2int (unsigned char b);
51/* Save tick handler routine pointer, will point to do_timer() in 51/* Save tick handler routine pointer, will point to do_timer() in
52 * kernel/sched.c, called via mvme147_process_int() */ 52 * kernel/sched.c, called via mvme147_process_int() */
53 53
54irqreturn_t (*tick_handler)(int, void *, struct pt_regs *); 54irq_handler_t tick_handler;
55 55
56 56
57int mvme147_parse_bootinfo(const struct bi_record *bi) 57int mvme147_parse_bootinfo(const struct bi_record *bi)
@@ -114,15 +114,15 @@ void __init config_mvme147(void)
114 114
115/* Using pcc tick timer 1 */ 115/* Using pcc tick timer 1 */
116 116
117static irqreturn_t mvme147_timer_int (int irq, void *dev_id, struct pt_regs *fp) 117static irqreturn_t mvme147_timer_int (int irq, void *dev_id)
118{ 118{
119 m147_pcc->t1_int_cntrl = PCC_TIMER_INT_CLR; 119 m147_pcc->t1_int_cntrl = PCC_TIMER_INT_CLR;
120 m147_pcc->t1_int_cntrl = PCC_INT_ENAB|PCC_LEVEL_TIMER1; 120 m147_pcc->t1_int_cntrl = PCC_INT_ENAB|PCC_LEVEL_TIMER1;
121 return tick_handler(irq, dev_id, fp); 121 return tick_handler(irq, dev_id);
122} 122}
123 123
124 124
125void mvme147_sched_init (irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) 125void mvme147_sched_init (irq_handler_t timer_routine)
126{ 126{
127 tick_handler = timer_routine; 127 tick_handler = timer_routine;
128 request_irq (PCC_IRQ_TIMER1, mvme147_timer_int, 128 request_irq (PCC_IRQ_TIMER1, mvme147_timer_int,
diff --git a/arch/m68k/mvme16x/config.c b/arch/m68k/mvme16x/config.c
index ce2727ed1bc0..c829ebb6b1af 100644
--- a/arch/m68k/mvme16x/config.c
+++ b/arch/m68k/mvme16x/config.c
@@ -42,7 +42,7 @@ static MK48T08ptr_t volatile rtc = (MK48T08ptr_t)MVME_RTC_BASE;
42 42
43static void mvme16x_get_model(char *model); 43static void mvme16x_get_model(char *model);
44static int mvme16x_get_hardware_list(char *buffer); 44static int mvme16x_get_hardware_list(char *buffer);
45extern void mvme16x_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 45extern void mvme16x_sched_init(irq_handler_t handler);
46extern unsigned long mvme16x_gettimeoffset (void); 46extern unsigned long mvme16x_gettimeoffset (void);
47extern int mvme16x_hwclk (int, struct rtc_time *); 47extern int mvme16x_hwclk (int, struct rtc_time *);
48extern int mvme16x_set_clock_mmss (unsigned long); 48extern int mvme16x_set_clock_mmss (unsigned long);
@@ -54,7 +54,7 @@ int bcd2int (unsigned char b);
54/* Save tick handler routine pointer, will point to do_timer() in 54/* Save tick handler routine pointer, will point to do_timer() in
55 * kernel/sched.c, called via mvme16x_process_int() */ 55 * kernel/sched.c, called via mvme16x_process_int() */
56 56
57static irqreturn_t (*tick_handler)(int, void *, struct pt_regs *); 57static irq_handler_t tick_handler;
58 58
59 59
60unsigned short mvme16x_config; 60unsigned short mvme16x_config;
@@ -190,7 +190,7 @@ void __init config_mvme16x(void)
190 } 190 }
191} 191}
192 192
193static irqreturn_t mvme16x_abort_int (int irq, void *dev_id, struct pt_regs *fp) 193static irqreturn_t mvme16x_abort_int (int irq, void *dev_id)
194{ 194{
195 p_bdid p = &mvme_bdid; 195 p_bdid p = &mvme_bdid;
196 unsigned long *new = (unsigned long *)vectors; 196 unsigned long *new = (unsigned long *)vectors;
@@ -218,13 +218,13 @@ static irqreturn_t mvme16x_abort_int (int irq, void *dev_id, struct pt_regs *fp)
218 return IRQ_HANDLED; 218 return IRQ_HANDLED;
219} 219}
220 220
221static irqreturn_t mvme16x_timer_int (int irq, void *dev_id, struct pt_regs *fp) 221static irqreturn_t mvme16x_timer_int (int irq, void *dev_id)
222{ 222{
223 *(volatile unsigned char *)0xfff4201b |= 8; 223 *(volatile unsigned char *)0xfff4201b |= 8;
224 return tick_handler(irq, dev_id, fp); 224 return tick_handler(irq, dev_id);
225} 225}
226 226
227void mvme16x_sched_init (irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) 227void mvme16x_sched_init (irq_handler_t timer_routine)
228{ 228{
229 p_bdid p = &mvme_bdid; 229 p_bdid p = &mvme_bdid;
230 int irq; 230 int irq;
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
index 9a1827876408..92f873cc7060 100644
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -39,7 +39,7 @@ extern irqreturn_t q40_process_int (int level, struct pt_regs *regs);
39extern void q40_init_IRQ (void); 39extern void q40_init_IRQ (void);
40static void q40_get_model(char *model); 40static void q40_get_model(char *model);
41static int q40_get_hardware_list(char *buffer); 41static int q40_get_hardware_list(char *buffer);
42extern void q40_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 42extern void q40_sched_init(irq_handler_t handler);
43 43
44extern unsigned long q40_gettimeoffset (void); 44extern unsigned long q40_gettimeoffset (void);
45extern int q40_hwclk (int, struct rtc_time *); 45extern int q40_hwclk (int, struct rtc_time *);
diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c
index 472f41c4158b..31cc07d8cec4 100644
--- a/arch/m68k/q40/q40ints.c
+++ b/arch/m68k/q40/q40ints.c
@@ -125,9 +125,9 @@ void q40_mksound(unsigned int hz, unsigned int ticks)
125 sound_ticks = ticks << 1; 125 sound_ticks = ticks << 1;
126} 126}
127 127
128static irqreturn_t (*q40_timer_routine)(int, void *, struct pt_regs *); 128static irq_handler_t q40_timer_routine;
129 129
130static irqreturn_t q40_timer_int (int irq, void * dev, struct pt_regs * regs) 130static irqreturn_t q40_timer_int (int irq, void * dev)
131{ 131{
132 ql_ticks = ql_ticks ? 0 : 1; 132 ql_ticks = ql_ticks ? 0 : 1;
133 if (sound_ticks) { 133 if (sound_ticks) {
@@ -138,11 +138,11 @@ static irqreturn_t q40_timer_int (int irq, void * dev, struct pt_regs * regs)
138 } 138 }
139 139
140 if (!ql_ticks) 140 if (!ql_ticks)
141 q40_timer_routine(irq, dev, regs); 141 q40_timer_routine(irq, dev);
142 return IRQ_HANDLED; 142 return IRQ_HANDLED;
143} 143}
144 144
145void q40_sched_init (irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) 145void q40_sched_init (irq_handler_t timer_routine)
146{ 146{
147 int timer_irq; 147 int timer_irq;
148 148
@@ -218,11 +218,11 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)
218 switch (irq) { 218 switch (irq) {
219 case 4: 219 case 4:
220 case 6: 220 case 6:
221 m68k_handle_int(Q40_IRQ_SAMPLE, fp); 221 __m68k_handle_int(Q40_IRQ_SAMPLE, fp);
222 return; 222 return;
223 } 223 }
224 if (mir & Q40_IRQ_FRAME_MASK) { 224 if (mir & Q40_IRQ_FRAME_MASK) {
225 m68k_handle_int(Q40_IRQ_FRAME, fp); 225 __m68k_handle_int(Q40_IRQ_FRAME, fp);
226 master_outb(-1, FRAME_CLEAR_REG); 226 master_outb(-1, FRAME_CLEAR_REG);
227 } 227 }
228 if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) { 228 if ((mir & Q40_IRQ_SER_MASK) || (mir & Q40_IRQ_EXT_MASK)) {
@@ -257,7 +257,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)
257 goto iirq; 257 goto iirq;
258 } 258 }
259 q40_state[irq] |= IRQ_INPROGRESS; 259 q40_state[irq] |= IRQ_INPROGRESS;
260 m68k_handle_int(irq, fp); 260 __m68k_handle_int(irq, fp);
261 q40_state[irq] &= ~IRQ_INPROGRESS; 261 q40_state[irq] &= ~IRQ_INPROGRESS;
262 262
263 /* naively enable everything, if that fails than */ 263 /* naively enable everything, if that fails than */
@@ -288,7 +288,7 @@ static void q40_irq_handler(unsigned int irq, struct pt_regs *fp)
288 mir = master_inb(IIRQ_REG); 288 mir = master_inb(IIRQ_REG);
289 /* should test whether keyboard irq is really enabled, doing it in defhand */ 289 /* should test whether keyboard irq is really enabled, doing it in defhand */
290 if (mir & Q40_IRQ_KEYB_MASK) 290 if (mir & Q40_IRQ_KEYB_MASK)
291 m68k_handle_int(Q40_IRQ_KEYBOARD, fp); 291 __m68k_handle_int(Q40_IRQ_KEYBOARD, fp);
292 292
293 return; 293 return;
294} 294}
diff --git a/arch/m68k/sun3/Makefile b/arch/m68k/sun3/Makefile
index 4d4f0695d985..be1a8470d636 100644
--- a/arch/m68k/sun3/Makefile
+++ b/arch/m68k/sun3/Makefile
@@ -2,6 +2,6 @@
2# Makefile for Linux arch/m68k/sun3 source directory 2# Makefile for Linux arch/m68k/sun3 source directory
3# 3#
4 4
5obj-y := sun3_ksyms.o sun3ints.o sun3dvma.o sbus.o idprom.o 5obj-y := sun3ints.o sun3dvma.o sbus.o idprom.o
6 6
7obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o 7obj-$(CONFIG_SUN3) += config.o mmu_emu.o leds.o dvma.o intersil.o
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c
index d09d03b3d956..4851b8437a87 100644
--- a/arch/m68k/sun3/config.c
+++ b/arch/m68k/sun3/config.c
@@ -35,7 +35,7 @@ extern char _text, _end;
35char sun3_reserved_pmeg[SUN3_PMEGS_NUM]; 35char sun3_reserved_pmeg[SUN3_PMEGS_NUM];
36 36
37extern unsigned long sun3_gettimeoffset(void); 37extern unsigned long sun3_gettimeoffset(void);
38extern void sun3_sched_init(irqreturn_t (*handler)(int, void *, struct pt_regs *)); 38extern void sun3_sched_init(irq_handler_t handler);
39extern void sun3_get_model (char* model); 39extern void sun3_get_model (char* model);
40extern void idprom_init (void); 40extern void idprom_init (void);
41extern int sun3_hwclk(int set, struct rtc_time *t); 41extern int sun3_hwclk(int set, struct rtc_time *t);
@@ -162,7 +162,7 @@ void __init config_sun3(void)
162 sun3_bootmem_alloc(memory_start, memory_end); 162 sun3_bootmem_alloc(memory_start, memory_end);
163} 163}
164 164
165void __init sun3_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) 165void __init sun3_sched_init(irq_handler_t timer_routine)
166{ 166{
167 sun3_disable_interrupts(); 167 sun3_disable_interrupts();
168 intersil_clock->cmd_reg=(INTERSIL_RUN|INTERSIL_INT_DISABLE|INTERSIL_24H_MODE); 168 intersil_clock->cmd_reg=(INTERSIL_RUN|INTERSIL_INT_DISABLE|INTERSIL_24H_MODE);
diff --git a/arch/m68k/sun3/idprom.c b/arch/m68k/sun3/idprom.c
index 02c1fee6fe74..dca6ab6a4ede 100644
--- a/arch/m68k/sun3/idprom.c
+++ b/arch/m68k/sun3/idprom.c
@@ -6,6 +6,7 @@
6 * Sun3/3x models added by David Monro (davidm@psrg.cs.usyd.edu.au) 6 * Sun3/3x models added by David Monro (davidm@psrg.cs.usyd.edu.au)
7 */ 7 */
8 8
9#include <linux/module.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
10#include <linux/types.h> 11#include <linux/types.h>
11#include <linux/init.h> 12#include <linux/init.h>
@@ -16,6 +17,8 @@
16#include <asm/machines.h> /* Fun with Sun released architectures. */ 17#include <asm/machines.h> /* Fun with Sun released architectures. */
17 18
18struct idprom *idprom; 19struct idprom *idprom;
20EXPORT_SYMBOL(idprom);
21
19static struct idprom idprom_buffer; 22static struct idprom idprom_buffer;
20 23
21/* Here is the master table of Sun machines which use some implementation 24/* Here is the master table of Sun machines which use some implementation
diff --git a/arch/m68k/sun3/sun3_ksyms.c b/arch/m68k/sun3/sun3_ksyms.c
deleted file mode 100644
index 43e5a9af8abd..000000000000
--- a/arch/m68k/sun3/sun3_ksyms.c
+++ /dev/null
@@ -1,13 +0,0 @@
1#include <linux/module.h>
2#include <linux/types.h>
3#include <asm/dvma.h>
4#include <asm/idprom.h>
5
6/*
7 * Add things here when you find the need for it.
8 */
9EXPORT_SYMBOL(dvma_map_align);
10EXPORT_SYMBOL(dvma_unmap);
11EXPORT_SYMBOL(dvma_malloc_align);
12EXPORT_SYMBOL(dvma_free);
13EXPORT_SYMBOL(idprom);
diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c
index a2bc2da7f8f0..8709677fa025 100644
--- a/arch/m68k/sun3/sun3dvma.c
+++ b/arch/m68k/sun3/sun3dvma.c
@@ -6,6 +6,7 @@
6 * Contains common routines for sun3/sun3x DVMA management. 6 * Contains common routines for sun3/sun3x DVMA management.
7 */ 7 */
8 8
9#include <linux/module.h>
9#include <linux/kernel.h> 10#include <linux/kernel.h>
10#include <linux/mm.h> 11#include <linux/mm.h>
11#include <linux/list.h> 12#include <linux/list.h>
@@ -312,6 +313,7 @@ inline unsigned long dvma_map_align(unsigned long kaddr, int len, int align)
312 BUG(); 313 BUG();
313 return 0; 314 return 0;
314} 315}
316EXPORT_SYMBOL(dvma_map_align);
315 317
316void dvma_unmap(void *baddr) 318void dvma_unmap(void *baddr)
317{ 319{
@@ -327,7 +329,7 @@ void dvma_unmap(void *baddr)
327 return; 329 return;
328 330
329} 331}
330 332EXPORT_SYMBOL(dvma_unmap);
331 333
332void *dvma_malloc_align(unsigned long len, unsigned long align) 334void *dvma_malloc_align(unsigned long len, unsigned long align)
333{ 335{
@@ -367,6 +369,7 @@ void *dvma_malloc_align(unsigned long len, unsigned long align)
367 return (void *)vaddr; 369 return (void *)vaddr;
368 370
369} 371}
372EXPORT_SYMBOL(dvma_malloc_align);
370 373
371void dvma_free(void *vaddr) 374void dvma_free(void *vaddr)
372{ 375{
@@ -374,3 +377,4 @@ void dvma_free(void *vaddr)
374 return; 377 return;
375 378
376} 379}
380EXPORT_SYMBOL(dvma_free);
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index dc4ea7e074a6..baf74e8de8b5 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -15,6 +15,7 @@
15#include <asm/intersil.h> 15#include <asm/intersil.h>
16#include <asm/oplib.h> 16#include <asm/oplib.h>
17#include <asm/sun3ints.h> 17#include <asm/sun3ints.h>
18#include <asm/irq_regs.h>
18#include <linux/seq_file.h> 19#include <linux/seq_file.h>
19 20
20extern void sun3_leds (unsigned char); 21extern void sun3_leds (unsigned char);
@@ -48,7 +49,7 @@ void sun3_disable_irq(unsigned int irq)
48 *sun3_intreg &= ~(1 << irq); 49 *sun3_intreg &= ~(1 << irq);
49} 50}
50 51
51static irqreturn_t sun3_int7(int irq, void *dev_id, struct pt_regs *fp) 52static irqreturn_t sun3_int7(int irq, void *dev_id)
52{ 53{
53 *sun3_intreg |= (1 << irq); 54 *sun3_intreg |= (1 << irq);
54 if (!(kstat_cpu(0).irqs[irq] % 2000)) 55 if (!(kstat_cpu(0).irqs[irq] % 2000))
@@ -56,7 +57,7 @@ static irqreturn_t sun3_int7(int irq, void *dev_id, struct pt_regs *fp)
56 return IRQ_HANDLED; 57 return IRQ_HANDLED;
57} 58}
58 59
59static irqreturn_t sun3_int5(int irq, void *dev_id, struct pt_regs *fp) 60static irqreturn_t sun3_int5(int irq, void *dev_id)
60{ 61{
61#ifdef CONFIG_SUN3 62#ifdef CONFIG_SUN3
62 intersil_clear(); 63 intersil_clear();
@@ -67,14 +68,14 @@ static irqreturn_t sun3_int5(int irq, void *dev_id, struct pt_regs *fp)
67#endif 68#endif
68 do_timer(1); 69 do_timer(1);
69#ifndef CONFIG_SMP 70#ifndef CONFIG_SMP
70 update_process_times(user_mode(fp)); 71 update_process_times(user_mode(get_irq_regs()));
71#endif 72#endif
72 if (!(kstat_cpu(0).irqs[irq] % 20)) 73 if (!(kstat_cpu(0).irqs[irq] % 20))
73 sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 160) / 20]); 74 sun3_leds(led_pattern[(kstat_cpu(0).irqs[irq] % 160) / 20]);
74 return IRQ_HANDLED; 75 return IRQ_HANDLED;
75} 76}
76 77
77static irqreturn_t sun3_vec255(int irq, void *dev_id, struct pt_regs *fp) 78static irqreturn_t sun3_vec255(int irq, void *dev_id)
78{ 79{
79// intersil_clear(); 80// intersil_clear();
80 return IRQ_HANDLED; 81 return IRQ_HANDLED;
@@ -84,7 +85,7 @@ static void sun3_inthandle(unsigned int irq, struct pt_regs *fp)
84{ 85{
85 *sun3_intreg &= ~(1 << irq); 86 *sun3_intreg &= ~(1 << irq);
86 87
87 m68k_handle_int(irq, fp); 88 __m68k_handle_int(irq, fp);
88} 89}
89 90
90static struct irq_controller sun3_irq_controller = { 91static struct irq_controller sun3_irq_controller = {
diff --git a/arch/m68k/sun3x/time.c b/arch/m68k/sun3x/time.c
index 6f4204fbecd7..f5eaafb00d21 100644
--- a/arch/m68k/sun3x/time.c
+++ b/arch/m68k/sun3x/time.c
@@ -90,7 +90,7 @@ static void sun3x_timer_tick(int irq, void *dev_id, struct pt_regs *regs)
90} 90}
91#endif 91#endif
92 92
93void __init sun3x_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)) 93void __init sun3x_sched_init(irq_handler_t vector)
94{ 94{
95 95
96 sun3_disable_interrupts(); 96 sun3_disable_interrupts();
diff --git a/arch/m68k/sun3x/time.h b/arch/m68k/sun3x/time.h
index e7e43b4ec4a1..6909e1297534 100644
--- a/arch/m68k/sun3x/time.h
+++ b/arch/m68k/sun3x/time.h
@@ -3,7 +3,7 @@
3 3
4extern int sun3x_hwclk(int set, struct rtc_time *t); 4extern int sun3x_hwclk(int set, struct rtc_time *t);
5unsigned long sun3x_gettimeoffset (void); 5unsigned long sun3x_gettimeoffset (void);
6void sun3x_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *)); 6void sun3x_sched_init(irq_handler_t vector);
7 7
8struct mostek_dt { 8struct mostek_dt {
9 volatile unsigned char csr; 9 volatile unsigned char csr;
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/Makefile b/arch/mips/Makefile
index 2124350ab94d..641aa30b3638 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -91,8 +91,17 @@ cflags-y += -ffreestanding
91# carefully avoid to add it redundantly because gcc 3.3/3.4 complains 91# carefully avoid to add it redundantly because gcc 3.3/3.4 complains
92# when fed the toolchain default! 92# when fed the toolchain default!
93# 93#
94cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB -D__MIPSEB__) 94# Certain gcc versions upto gcc 4.1.1 (probably 4.2-subversion as of
95cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL -D__MIPSEL__) 95# 2006-10-10 don't properly change the the predefined symbols if -EB / -EL
96# are used, so we kludge that here. A bug has been filed at
97# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413.
98#
99undef-all += -UMIPSEB -U_MIPSEB -U__MIPSEB -U__MIPSEB__
100undef-all += -UMIPSEL -U_MIPSEL -U__MIPSEL -U__MIPSEL__
101predef-be += -DMIPSEB -D_MIPSEB -D__MIPSEB -D__MIPSEB__
102predef-le += -DMIPSEL -D_MIPSEL -D__MIPSEL -D__MIPSEL__
103cflags-$(CONFIG_CPU_BIG_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' && echo -EB $(undef-all) $(predef-be))
104cflags-$(CONFIG_CPU_LITTLE_ENDIAN) += $(shell $(CC) -dumpmachine |grep -q 'mips.*el-.*' || echo -EL $(undef-all) $(predef-le))
96 105
97cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \ 106cflags-$(CONFIG_SB1XXX_CORELIS) += $(call cc-option,-mno-sched-prolog) \
98 -fno-omit-frame-pointer 107 -fno-omit-frame-pointer
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/bigsur_defconfig b/arch/mips/configs/bigsur_defconfig
index c6a015940b41..ba3bf733d27d 100644
--- a/arch/mips/configs/bigsur_defconfig
+++ b/arch/mips/configs/bigsur_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:02:58 2006 4# Wed Oct 11 01:41:41 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
@@ -83,6 +81,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
83CONFIG_GENERIC_FIND_NEXT_BIT=y 81CONFIG_GENERIC_FIND_NEXT_BIT=y
84CONFIG_GENERIC_HWEIGHT=y 82CONFIG_GENERIC_HWEIGHT=y
85CONFIG_GENERIC_CALIBRATE_DELAY=y 83CONFIG_GENERIC_CALIBRATE_DELAY=y
84CONFIG_GENERIC_TIME=y
86CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 85CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
87CONFIG_DMA_COHERENT=y 86CONFIG_DMA_COHERENT=y
88CONFIG_CPU_BIG_ENDIAN=y 87CONFIG_CPU_BIG_ENDIAN=y
@@ -132,8 +131,8 @@ CONFIG_PAGE_SIZE_4KB=y
132# CONFIG_PAGE_SIZE_64KB is not set 131# CONFIG_PAGE_SIZE_64KB is not set
133# CONFIG_SIBYTE_DMA_PAGEOPS is not set 132# CONFIG_SIBYTE_DMA_PAGEOPS is not set
134CONFIG_MIPS_MT_DISABLED=y 133CONFIG_MIPS_MT_DISABLED=y
135# CONFIG_MIPS_MT_SMTC is not set
136# CONFIG_MIPS_MT_SMP is not set 134# CONFIG_MIPS_MT_SMP is not set
135# CONFIG_MIPS_MT_SMTC is not set
137# CONFIG_MIPS_VPE_LOADER is not set 136# CONFIG_MIPS_VPE_LOADER is not set
138CONFIG_CPU_HAS_LLSC=y 137CONFIG_CPU_HAS_LLSC=y
139CONFIG_CPU_HAS_SYNC=y 138CONFIG_CPU_HAS_SYNC=y
@@ -185,9 +184,11 @@ CONFIG_LOCALVERSION=""
185CONFIG_LOCALVERSION_AUTO=y 184CONFIG_LOCALVERSION_AUTO=y
186CONFIG_SWAP=y 185CONFIG_SWAP=y
187CONFIG_SYSVIPC=y 186CONFIG_SYSVIPC=y
187# CONFIG_IPC_NS is not set
188# CONFIG_POSIX_MQUEUE is not set 188# CONFIG_POSIX_MQUEUE is not set
189# CONFIG_BSD_PROCESS_ACCT is not set 189# CONFIG_BSD_PROCESS_ACCT is not set
190CONFIG_SYSCTL=y 190# CONFIG_TASKSTATS is not set
191# CONFIG_UTS_NS is not set
191# CONFIG_AUDIT is not set 192# CONFIG_AUDIT is not set
192CONFIG_IKCONFIG=y 193CONFIG_IKCONFIG=y
193CONFIG_IKCONFIG_PROC=y 194CONFIG_IKCONFIG_PROC=y
@@ -195,7 +196,9 @@ CONFIG_IKCONFIG_PROC=y
195# CONFIG_RELAY is not set 196# CONFIG_RELAY is not set
196CONFIG_INITRAMFS_SOURCE="" 197CONFIG_INITRAMFS_SOURCE=""
197# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set 198# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
199CONFIG_SYSCTL=y
198CONFIG_EMBEDDED=y 200CONFIG_EMBEDDED=y
201# CONFIG_SYSCTL_SYSCALL is not set
199CONFIG_KALLSYMS=y 202CONFIG_KALLSYMS=y
200# CONFIG_KALLSYMS_ALL is not set 203# CONFIG_KALLSYMS_ALL is not set
201# CONFIG_KALLSYMS_EXTRA_PASS is not set 204# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -204,12 +207,12 @@ CONFIG_PRINTK=y
204CONFIG_BUG=y 207CONFIG_BUG=y
205CONFIG_ELF_CORE=y 208CONFIG_ELF_CORE=y
206CONFIG_BASE_FULL=y 209CONFIG_BASE_FULL=y
207CONFIG_RT_MUTEXES=y
208CONFIG_FUTEX=y 210CONFIG_FUTEX=y
209CONFIG_EPOLL=y 211CONFIG_EPOLL=y
210CONFIG_SHMEM=y 212CONFIG_SHMEM=y
211CONFIG_SLAB=y 213CONFIG_SLAB=y
212CONFIG_VM_EVENT_COUNTERS=y 214CONFIG_VM_EVENT_COUNTERS=y
215CONFIG_RT_MUTEXES=y
213# CONFIG_TINY_SHMEM is not set 216# CONFIG_TINY_SHMEM is not set
214CONFIG_BASE_SMALL=0 217CONFIG_BASE_SMALL=0
215# CONFIG_SLOB is not set 218# CONFIG_SLOB is not set
@@ -228,6 +231,7 @@ CONFIG_STOP_MACHINE=y
228# 231#
229# Block layer 232# Block layer
230# 233#
234CONFIG_BLOCK=y
231# CONFIG_BLK_DEV_IO_TRACE is not set 235# CONFIG_BLK_DEV_IO_TRACE is not set
232 236
233# 237#
@@ -249,18 +253,17 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
249CONFIG_HW_HAS_PCI=y 253CONFIG_HW_HAS_PCI=y
250CONFIG_PCI=y 254CONFIG_PCI=y
251CONFIG_PCI_DOMAINS=y 255CONFIG_PCI_DOMAINS=y
256# CONFIG_PCI_MULTITHREAD_PROBE is not set
252CONFIG_PCI_DEBUG=y 257CONFIG_PCI_DEBUG=y
253CONFIG_MMU=y 258CONFIG_MMU=y
254 259
255# 260#
256# PCCARD (PCMCIA/CardBus) support 261# PCCARD (PCMCIA/CardBus) support
257# 262#
258# CONFIG_PCCARD is not set
259 263
260# 264#
261# PCI Hotplug Support 265# PCI Hotplug Support
262# 266#
263# CONFIG_HOTPLUG_PCI is not set
264 267
265# 268#
266# Executable file formats 269# Executable file formats
@@ -271,7 +274,7 @@ CONFIG_BINFMT_ELF=y
271CONFIG_MIPS32_COMPAT=y 274CONFIG_MIPS32_COMPAT=y
272CONFIG_COMPAT=y 275CONFIG_COMPAT=y
273CONFIG_MIPS32_O32=y 276CONFIG_MIPS32_O32=y
274# CONFIG_MIPS32_N32 is not set 277CONFIG_MIPS32_N32=y
275CONFIG_BINFMT_ELF32=y 278CONFIG_BINFMT_ELF32=y
276 279
277# 280#
@@ -288,6 +291,7 @@ CONFIG_PACKET_MMAP=y
288CONFIG_UNIX=y 291CONFIG_UNIX=y
289CONFIG_XFRM=y 292CONFIG_XFRM=y
290CONFIG_XFRM_USER=m 293CONFIG_XFRM_USER=m
294# CONFIG_XFRM_SUB_POLICY is not set
291CONFIG_NET_KEY=y 295CONFIG_NET_KEY=y
292CONFIG_INET=y 296CONFIG_INET=y
293# CONFIG_IP_MULTICAST is not set 297# CONFIG_IP_MULTICAST is not set
@@ -308,10 +312,12 @@ CONFIG_IP_PNP_BOOTP=y
308# CONFIG_INET_TUNNEL is not set 312# CONFIG_INET_TUNNEL is not set
309CONFIG_INET_XFRM_MODE_TRANSPORT=m 313CONFIG_INET_XFRM_MODE_TRANSPORT=m
310CONFIG_INET_XFRM_MODE_TUNNEL=m 314CONFIG_INET_XFRM_MODE_TUNNEL=m
315CONFIG_INET_XFRM_MODE_BEET=y
311CONFIG_INET_DIAG=y 316CONFIG_INET_DIAG=y
312CONFIG_INET_TCP_DIAG=y 317CONFIG_INET_TCP_DIAG=y
313# CONFIG_TCP_CONG_ADVANCED is not set 318# CONFIG_TCP_CONG_ADVANCED is not set
314CONFIG_TCP_CONG_BIC=y 319CONFIG_TCP_CONG_CUBIC=y
320CONFIG_DEFAULT_TCP_CONG="cubic"
315# CONFIG_IPV6 is not set 321# CONFIG_IPV6 is not set
316# CONFIG_INET6_XFRM_TUNNEL is not set 322# CONFIG_INET6_XFRM_TUNNEL is not set
317# CONFIG_INET6_TUNNEL is not set 323# CONFIG_INET6_TUNNEL is not set
@@ -341,7 +347,6 @@ CONFIG_NETWORK_SECMARK=y
341# CONFIG_ATALK is not set 347# CONFIG_ATALK is not set
342# CONFIG_X25 is not set 348# CONFIG_X25 is not set
343# CONFIG_LAPB is not set 349# CONFIG_LAPB is not set
344# CONFIG_NET_DIVERT is not set
345# CONFIG_ECONET is not set 350# CONFIG_ECONET is not set
346# CONFIG_WAN_ROUTER is not set 351# CONFIG_WAN_ROUTER is not set
347 352
@@ -368,7 +373,6 @@ CONFIG_NETWORK_SECMARK=y
368# 373#
369CONFIG_STANDALONE=y 374CONFIG_STANDALONE=y
370CONFIG_PREVENT_FIRMWARE_BUILD=y 375CONFIG_PREVENT_FIRMWARE_BUILD=y
371# CONFIG_FW_LOADER is not set
372# CONFIG_DEBUG_DRIVER is not set 376# CONFIG_DEBUG_DRIVER is not set
373# CONFIG_SYS_HYPERVISOR is not set 377# CONFIG_SYS_HYPERVISOR is not set
374 378
@@ -404,7 +408,7 @@ CONFIG_BLK_DEV_LOOP=m
404CONFIG_BLK_DEV_NBD=m 408CONFIG_BLK_DEV_NBD=m
405# CONFIG_BLK_DEV_SX8 is not set 409# CONFIG_BLK_DEV_SX8 is not set
406# CONFIG_BLK_DEV_RAM is not set 410# CONFIG_BLK_DEV_RAM is not set
407# CONFIG_BLK_DEV_INITRD is not set 411CONFIG_BLK_DEV_INITRD=y
408# CONFIG_CDROM_PKTCDVD is not set 412# CONFIG_CDROM_PKTCDVD is not set
409# CONFIG_ATA_OVER_ETH is not set 413# CONFIG_ATA_OVER_ETH is not set
410 414
@@ -412,6 +416,7 @@ CONFIG_BLK_DEV_NBD=m
412# ATA/ATAPI/MFM/RLL support 416# ATA/ATAPI/MFM/RLL support
413# 417#
414CONFIG_IDE=y 418CONFIG_IDE=y
419CONFIG_IDE_MAX_HWIFS=4
415CONFIG_BLK_DEV_IDE=y 420CONFIG_BLK_DEV_IDE=y
416 421
417# 422#
@@ -429,10 +434,40 @@ CONFIG_BLK_DEV_IDEFLOPPY=y
429# IDE chipset support/bugfixes 434# IDE chipset support/bugfixes
430# 435#
431CONFIG_IDE_GENERIC=y 436CONFIG_IDE_GENERIC=y
432# CONFIG_BLK_DEV_IDEPCI is not set 437CONFIG_BLK_DEV_IDEPCI=y
438# CONFIG_IDEPCI_SHARE_IRQ is not set
439# CONFIG_BLK_DEV_OFFBOARD is not set
440CONFIG_BLK_DEV_GENERIC=y
441# CONFIG_BLK_DEV_OPTI621 is not set
442CONFIG_BLK_DEV_IDEDMA_PCI=y
443# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
444# CONFIG_IDEDMA_PCI_AUTO is not set
445# CONFIG_BLK_DEV_AEC62XX is not set
446# CONFIG_BLK_DEV_ALI15X3 is not set
447# CONFIG_BLK_DEV_AMD74XX is not set
448CONFIG_BLK_DEV_CMD64X=y
449# CONFIG_BLK_DEV_TRIFLEX is not set
450# CONFIG_BLK_DEV_CY82C693 is not set
451# CONFIG_BLK_DEV_CS5520 is not set
452# CONFIG_BLK_DEV_CS5530 is not set
453# CONFIG_BLK_DEV_HPT34X is not set
454# CONFIG_BLK_DEV_HPT366 is not set
455# CONFIG_BLK_DEV_JMICRON is not set
456# CONFIG_BLK_DEV_SC1200 is not set
457# CONFIG_BLK_DEV_PIIX is not set
458# CONFIG_BLK_DEV_IT821X is not set
459# CONFIG_BLK_DEV_NS87415 is not set
460# CONFIG_BLK_DEV_PDC202XX_OLD is not set
461# CONFIG_BLK_DEV_PDC202XX_NEW is not set
462# CONFIG_BLK_DEV_SVWKS is not set
463# CONFIG_BLK_DEV_SIIMAGE is not set
464# CONFIG_BLK_DEV_SLC90E66 is not set
465# CONFIG_BLK_DEV_TRM290 is not set
466# CONFIG_BLK_DEV_VIA82CXXX is not set
433# CONFIG_BLK_DEV_IDE_SWARM is not set 467# CONFIG_BLK_DEV_IDE_SWARM is not set
434# CONFIG_IDE_ARM is not set 468# CONFIG_IDE_ARM is not set
435# CONFIG_BLK_DEV_IDEDMA is not set 469CONFIG_BLK_DEV_IDEDMA=y
470# CONFIG_IDEDMA_IVB is not set
436# CONFIG_IDEDMA_AUTO is not set 471# CONFIG_IDEDMA_AUTO is not set
437# CONFIG_BLK_DEV_HD is not set 472# CONFIG_BLK_DEV_HD is not set
438 473
@@ -441,6 +476,12 @@ CONFIG_IDE_GENERIC=y
441# 476#
442# CONFIG_RAID_ATTRS is not set 477# CONFIG_RAID_ATTRS is not set
443# CONFIG_SCSI is not set 478# CONFIG_SCSI is not set
479# CONFIG_SCSI_NETLINK is not set
480
481#
482# Serial ATA (prod) and Parallel ATA (experimental) drivers
483#
484# CONFIG_ATA is not set
444 485
445# 486#
446# Multi-device support (RAID and LVM) 487# Multi-device support (RAID and LVM)
@@ -516,6 +557,7 @@ CONFIG_NET_SB1250_MAC=y
516# CONFIG_SK98LIN is not set 557# CONFIG_SK98LIN is not set
517# CONFIG_TIGON3 is not set 558# CONFIG_TIGON3 is not set
518# CONFIG_BNX2 is not set 559# CONFIG_BNX2 is not set
560# CONFIG_QLA3XXX is not set
519 561
520# 562#
521# Ethernet (10000 Mbit) 563# Ethernet (10000 Mbit)
@@ -650,7 +692,6 @@ CONFIG_I2C_CHARDEV=y
650# CONFIG_I2C_ALGOBIT is not set 692# CONFIG_I2C_ALGOBIT is not set
651# CONFIG_I2C_ALGOPCF is not set 693# CONFIG_I2C_ALGOPCF is not set
652# CONFIG_I2C_ALGOPCA is not set 694# CONFIG_I2C_ALGOPCA is not set
653CONFIG_I2C_ALGO_SIBYTE=y
654 695
655# 696#
656# I2C Hardware Bus support 697# I2C Hardware Bus support
@@ -712,12 +753,12 @@ CONFIG_I2C_DEBUG_CHIP=y
712# 753#
713# Misc devices 754# Misc devices
714# 755#
756# CONFIG_TIFM_CORE is not set
715 757
716# 758#
717# Multimedia devices 759# Multimedia devices
718# 760#
719# CONFIG_VIDEO_DEV is not set 761# CONFIG_VIDEO_DEV is not set
720CONFIG_VIDEO_V4L2=y
721 762
722# 763#
723# Digital Video Broadcasting Devices 764# Digital Video Broadcasting Devices
@@ -729,6 +770,7 @@ CONFIG_VIDEO_V4L2=y
729# 770#
730# CONFIG_FIRMWARE_EDID is not set 771# CONFIG_FIRMWARE_EDID is not set
731# CONFIG_FB is not set 772# CONFIG_FB is not set
773# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
732 774
733# 775#
734# Sound 776# Sound
@@ -811,6 +853,7 @@ CONFIG_FS_MBCACHE=y
811# CONFIG_JFS_FS is not set 853# CONFIG_JFS_FS is not set
812CONFIG_FS_POSIX_ACL=y 854CONFIG_FS_POSIX_ACL=y
813# CONFIG_XFS_FS is not set 855# CONFIG_XFS_FS is not set
856# CONFIG_GFS2_FS is not set
814# CONFIG_OCFS2_FS is not set 857# CONFIG_OCFS2_FS is not set
815# CONFIG_MINIX_FS is not set 858# CONFIG_MINIX_FS is not set
816# CONFIG_ROMFS_FS is not set 859# CONFIG_ROMFS_FS is not set
@@ -840,8 +883,10 @@ CONFIG_DNOTIFY=y
840# 883#
841CONFIG_PROC_FS=y 884CONFIG_PROC_FS=y
842CONFIG_PROC_KCORE=y 885CONFIG_PROC_KCORE=y
886CONFIG_PROC_SYSCTL=y
843CONFIG_SYSFS=y 887CONFIG_SYSFS=y
844# CONFIG_TMPFS is not set 888CONFIG_TMPFS=y
889# CONFIG_TMPFS_POSIX_ACL is not set
845# CONFIG_HUGETLB_PAGE is not set 890# CONFIG_HUGETLB_PAGE is not set
846CONFIG_RAMFS=y 891CONFIG_RAMFS=y
847# CONFIG_CONFIGFS_FS is not set 892# CONFIG_CONFIGFS_FS is not set
@@ -851,6 +896,7 @@ CONFIG_RAMFS=y
851# 896#
852# CONFIG_ADFS_FS is not set 897# CONFIG_ADFS_FS is not set
853# CONFIG_AFFS_FS is not set 898# CONFIG_AFFS_FS is not set
899# CONFIG_ECRYPT_FS is not set
854# CONFIG_HFS_FS is not set 900# CONFIG_HFS_FS is not set
855# CONFIG_HFSPLUS_FS is not set 901# CONFIG_HFSPLUS_FS is not set
856# CONFIG_BEFS_FS is not set 902# CONFIG_BEFS_FS is not set
@@ -881,7 +927,6 @@ CONFIG_SUNRPC=y
881# CONFIG_RPCSEC_GSS_SPKM3 is not set 927# CONFIG_RPCSEC_GSS_SPKM3 is not set
882# CONFIG_SMB_FS is not set 928# CONFIG_SMB_FS is not set
883# CONFIG_CIFS is not set 929# CONFIG_CIFS is not set
884# CONFIG_CIFS_DEBUG2 is not set
885# CONFIG_NCP_FS is not set 930# CONFIG_NCP_FS is not set
886# CONFIG_CODA_FS is not set 931# CONFIG_CODA_FS is not set
887# CONFIG_AFS_FS is not set 932# CONFIG_AFS_FS is not set
@@ -899,6 +944,10 @@ CONFIG_MSDOS_PARTITION=y
899# CONFIG_NLS is not set 944# CONFIG_NLS is not set
900 945
901# 946#
947# Distributed Lock Manager
948#
949
950#
902# Profiling support 951# Profiling support
903# 952#
904# CONFIG_PROFILING is not set 953# CONFIG_PROFILING is not set
@@ -907,7 +956,8 @@ CONFIG_MSDOS_PARTITION=y
907# Kernel hacking 956# Kernel hacking
908# 957#
909CONFIG_TRACE_IRQFLAGS_SUPPORT=y 958CONFIG_TRACE_IRQFLAGS_SUPPORT=y
910CONFIG_PRINTK_TIME=y 959# CONFIG_PRINTK_TIME is not set
960CONFIG_ENABLE_MUST_CHECK=y
911CONFIG_MAGIC_SYSRQ=y 961CONFIG_MAGIC_SYSRQ=y
912# CONFIG_UNUSED_SYMBOLS is not set 962# CONFIG_UNUSED_SYMBOLS is not set
913CONFIG_DEBUG_KERNEL=y 963CONFIG_DEBUG_KERNEL=y
@@ -920,12 +970,15 @@ CONFIG_DETECT_SOFTLOCKUP=y
920# CONFIG_DEBUG_SPINLOCK is not set 970# CONFIG_DEBUG_SPINLOCK is not set
921CONFIG_DEBUG_MUTEXES=y 971CONFIG_DEBUG_MUTEXES=y
922# CONFIG_DEBUG_RWSEMS is not set 972# CONFIG_DEBUG_RWSEMS is not set
973# CONFIG_DEBUG_LOCK_ALLOC is not set
974# CONFIG_PROVE_LOCKING is not set
923# CONFIG_DEBUG_SPINLOCK_SLEEP is not set 975# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
924# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set 976# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
925# CONFIG_DEBUG_KOBJECT is not set 977# CONFIG_DEBUG_KOBJECT is not set
926# CONFIG_DEBUG_INFO is not set 978# CONFIG_DEBUG_INFO is not set
927# CONFIG_DEBUG_FS is not set 979# CONFIG_DEBUG_FS is not set
928# CONFIG_DEBUG_VM is not set 980# CONFIG_DEBUG_VM is not set
981# CONFIG_DEBUG_LIST is not set
929CONFIG_FORCED_INLINING=y 982CONFIG_FORCED_INLINING=y
930# CONFIG_RCU_TORTURE_TEST is not set 983# CONFIG_RCU_TORTURE_TEST is not set
931CONFIG_CROSSCOMPILE=y 984CONFIG_CROSSCOMPILE=y
@@ -946,6 +999,10 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y
946# Cryptographic options 999# Cryptographic options
947# 1000#
948CONFIG_CRYPTO=y 1001CONFIG_CRYPTO=y
1002CONFIG_CRYPTO_ALGAPI=y
1003CONFIG_CRYPTO_BLKCIPHER=m
1004CONFIG_CRYPTO_HASH=y
1005CONFIG_CRYPTO_MANAGER=m
949CONFIG_CRYPTO_HMAC=y 1006CONFIG_CRYPTO_HMAC=y
950CONFIG_CRYPTO_NULL=y 1007CONFIG_CRYPTO_NULL=y
951CONFIG_CRYPTO_MD4=y 1008CONFIG_CRYPTO_MD4=y
@@ -955,9 +1012,12 @@ CONFIG_CRYPTO_SHA256=y
955CONFIG_CRYPTO_SHA512=y 1012CONFIG_CRYPTO_SHA512=y
956CONFIG_CRYPTO_WP512=m 1013CONFIG_CRYPTO_WP512=m
957CONFIG_CRYPTO_TGR192=m 1014CONFIG_CRYPTO_TGR192=m
1015CONFIG_CRYPTO_ECB=m
1016CONFIG_CRYPTO_CBC=m
958CONFIG_CRYPTO_DES=y 1017CONFIG_CRYPTO_DES=y
959CONFIG_CRYPTO_BLOWFISH=y 1018CONFIG_CRYPTO_BLOWFISH=y
960CONFIG_CRYPTO_TWOFISH=y 1019CONFIG_CRYPTO_TWOFISH=y
1020CONFIG_CRYPTO_TWOFISH_COMMON=y
961CONFIG_CRYPTO_SERPENT=y 1021CONFIG_CRYPTO_SERPENT=y
962CONFIG_CRYPTO_AES=m 1022CONFIG_CRYPTO_AES=m
963# CONFIG_CRYPTO_CAST5 is not set 1023# CONFIG_CRYPTO_CAST5 is not set
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..d848f1a07786 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>
@@ -37,7 +37,7 @@ extern void jazz_machine_restart(char *command);
37extern void jazz_machine_halt(void); 37extern void jazz_machine_halt(void);
38extern void jazz_machine_power_off(void); 38extern void jazz_machine_power_off(void);
39 39
40void __init plat_time_init(struct irqaction *irq) 40void __init plat_timer_setup(struct irqaction *irq)
41{ 41{
42 /* set the clock to 100 Hz */ 42 /* set the clock to 100 Hz */
43 r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9); 43 r4030_write_reg32(JAZZ_TIMER_INTERVAL, 9);
@@ -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..db80957ada89 100644
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -310,7 +310,7 @@ static void flush_tlb_all_ipi(void *info)
310 310
311void flush_tlb_all(void) 311void flush_tlb_all(void)
312{ 312{
313 on_each_cpu(flush_tlb_all_ipi, 0, 1, 1); 313 on_each_cpu(flush_tlb_all_ipi, NULL, 1, 1);
314} 314}
315 315
316static void flush_tlb_mm_ipi(void *mm) 316static void flush_tlb_mm_ipi(void *mm)
@@ -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-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c
index d777b7d1a9fe..f9f404a8ddad 100644
--- a/arch/mips/sgi-ip27/ip27-klnuma.c
+++ b/arch/mips/sgi-ip27/ip27-klnuma.c
@@ -26,7 +26,7 @@ static cpumask_t ktext_repmask;
26 * kernel. For example, we should never put a copy on a headless node, 26 * kernel. For example, we should never put a copy on a headless node,
27 * and we should respect the topology of the machine. 27 * and we should respect the topology of the machine.
28 */ 28 */
29void __init setup_replication_mask() 29void __init setup_replication_mask(void)
30{ 30{
31 cnodeid_t cnode; 31 cnodeid_t cnode;
32 32
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..bf328277c775 100644
--- a/arch/mips/sibyte/bcm1480/smp.c
+++ b/arch/mips/sibyte/bcm1480/smp.c
@@ -34,21 +34,21 @@ extern void smp_call_function_interrupt(void);
34 * independent of board/firmware 34 * independent of board/firmware
35 */ 35 */
36 36
37static void *mailbox_0_set_regs[] = { 37static volatile void *mailbox_0_set_regs[] = {
38 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 38 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
39 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 39 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
40 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 40 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
41 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU), 41 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_SET_CPU),
42}; 42};
43 43
44static void *mailbox_0_clear_regs[] = { 44static volatile void *mailbox_0_clear_regs[] = {
45 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 45 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
46 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 46 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
47 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 47 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
48 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU), 48 IOADDR(A_BCM1480_IMR_CPU3_BASE + R_BCM1480_IMR_MAILBOX_0_CLR_CPU),
49}; 49};
50 50
51static void *mailbox_0_regs[] = { 51static volatile void *mailbox_0_regs[] = {
52 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CPU), 52 IOADDR(A_BCM1480_IMR_CPU0_BASE + R_BCM1480_IMR_MAILBOX_0_CPU),
53 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CPU), 53 IOADDR(A_BCM1480_IMR_CPU1_BASE + R_BCM1480_IMR_MAILBOX_0_CPU),
54 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CPU), 54 IOADDR(A_BCM1480_IMR_CPU2_BASE + R_BCM1480_IMR_MAILBOX_0_CPU),
@@ -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)
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c
index 2b257e4f17df..d6c486e9501c 100644
--- a/arch/parisc/kernel/drivers.c
+++ b/arch/parisc/kernel/drivers.c
@@ -424,7 +424,7 @@ struct parisc_device * create_tree_node(char id, struct device *parent)
424 /* make the generic dma mask a pointer to the parisc one */ 424 /* make the generic dma mask a pointer to the parisc one */
425 dev->dev.dma_mask = &dev->dma_mask; 425 dev->dev.dma_mask = &dev->dma_mask;
426 dev->dev.coherent_dma_mask = dev->dma_mask; 426 dev->dev.coherent_dma_mask = dev->dma_mask;
427 if (!device_register(&dev->dev)) { 427 if (device_register(&dev->dev)) {
428 kfree(dev); 428 kfree(dev);
429 return NULL; 429 return NULL;
430 } 430 }
@@ -853,9 +853,9 @@ static void print_parisc_device(struct parisc_device *dev)
853 */ 853 */
854void init_parisc_bus(void) 854void init_parisc_bus(void)
855{ 855{
856 if (!bus_register(&parisc_bus_type)) 856 if (bus_register(&parisc_bus_type))
857 panic("Could not register PA-RISC bus type\n"); 857 panic("Could not register PA-RISC bus type\n");
858 if (!device_register(&root)) 858 if (device_register(&root))
859 panic("Could not register PA-RISC root device\n"); 859 panic("Could not register PA-RISC root device\n");
860 get_device(&root); 860 get_device(&root);
861} 861}
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
index c2531ae032cf..9158b707c0dd 100644
--- a/arch/parisc/kernel/firmware.c
+++ b/arch/parisc/kernel/firmware.c
@@ -160,13 +160,14 @@ void __init set_firmware_width(void)
160{ 160{
161#ifdef __LP64__ 161#ifdef __LP64__
162 int retval; 162 int retval;
163 unsigned long flags;
163 164
164 spin_lock_irq(&pdc_lock); 165 spin_lock_irqsave(&pdc_lock, flags);
165 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0); 166 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
166 convert_to_wide(pdc_result); 167 convert_to_wide(pdc_result);
167 if(pdc_result[0] != NARROW_FIRMWARE) 168 if(pdc_result[0] != NARROW_FIRMWARE)
168 parisc_narrow_firmware = 0; 169 parisc_narrow_firmware = 0;
169 spin_unlock_irq(&pdc_lock); 170 spin_unlock_irqrestore(&pdc_lock, flags);
170#endif 171#endif
171} 172}
172 173
@@ -196,10 +197,11 @@ void pdc_emergency_unlock(void)
196int pdc_add_valid(unsigned long address) 197int pdc_add_valid(unsigned long address)
197{ 198{
198 int retval; 199 int retval;
200 unsigned long flags;
199 201
200 spin_lock_irq(&pdc_lock); 202 spin_lock_irqsave(&pdc_lock, flags);
201 retval = mem_pdc_call(PDC_ADD_VALID, PDC_ADD_VALID_VERIFY, address); 203 retval = mem_pdc_call(PDC_ADD_VALID, PDC_ADD_VALID_VERIFY, address);
202 spin_unlock_irq(&pdc_lock); 204 spin_unlock_irqrestore(&pdc_lock, flags);
203 205
204 return retval; 206 return retval;
205} 207}
@@ -216,15 +218,16 @@ EXPORT_SYMBOL(pdc_add_valid);
216int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len) 218int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len)
217{ 219{
218 int retval; 220 int retval;
221 unsigned long flags;
219 222
220 spin_lock_irq(&pdc_lock); 223 spin_lock_irqsave(&pdc_lock, flags);
221 memcpy(&pdc_result, chassis_info, sizeof(*chassis_info)); 224 memcpy(&pdc_result, chassis_info, sizeof(*chassis_info));
222 memcpy(&pdc_result2, led_info, len); 225 memcpy(&pdc_result2, led_info, len);
223 retval = mem_pdc_call(PDC_CHASSIS, PDC_RETURN_CHASSIS_INFO, 226 retval = mem_pdc_call(PDC_CHASSIS, PDC_RETURN_CHASSIS_INFO,
224 __pa(pdc_result), __pa(pdc_result2), len); 227 __pa(pdc_result), __pa(pdc_result2), len);
225 memcpy(chassis_info, pdc_result, sizeof(*chassis_info)); 228 memcpy(chassis_info, pdc_result, sizeof(*chassis_info));
226 memcpy(led_info, pdc_result2, len); 229 memcpy(led_info, pdc_result2, len);
227 spin_unlock_irq(&pdc_lock); 230 spin_unlock_irqrestore(&pdc_lock, flags);
228 231
229 return retval; 232 return retval;
230} 233}
@@ -239,13 +242,14 @@ int __init pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_inf
239int pdc_pat_chassis_send_log(unsigned long state, unsigned long data) 242int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
240{ 243{
241 int retval = 0; 244 int retval = 0;
245 unsigned long flags;
242 246
243 if (!is_pdc_pat()) 247 if (!is_pdc_pat())
244 return -1; 248 return -1;
245 249
246 spin_lock_irq(&pdc_lock); 250 spin_lock_irqsave(&pdc_lock, flags);
247 retval = mem_pdc_call(PDC_PAT_CHASSIS_LOG, PDC_PAT_CHASSIS_WRITE_LOG, __pa(&state), __pa(&data)); 251 retval = mem_pdc_call(PDC_PAT_CHASSIS_LOG, PDC_PAT_CHASSIS_WRITE_LOG, __pa(&state), __pa(&data));
248 spin_unlock_irq(&pdc_lock); 252 spin_unlock_irqrestore(&pdc_lock, flags);
249 253
250 return retval; 254 return retval;
251} 255}
@@ -258,10 +262,11 @@ int pdc_pat_chassis_send_log(unsigned long state, unsigned long data)
258int pdc_chassis_disp(unsigned long disp) 262int pdc_chassis_disp(unsigned long disp)
259{ 263{
260 int retval = 0; 264 int retval = 0;
265 unsigned long flags;
261 266
262 spin_lock_irq(&pdc_lock); 267 spin_lock_irqsave(&pdc_lock, flags);
263 retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_DISP, disp); 268 retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_DISP, disp);
264 spin_unlock_irq(&pdc_lock); 269 spin_unlock_irqrestore(&pdc_lock, flags);
265 270
266 return retval; 271 return retval;
267} 272}
@@ -273,11 +278,12 @@ int pdc_chassis_disp(unsigned long disp)
273int pdc_chassis_warn(unsigned long *warn) 278int pdc_chassis_warn(unsigned long *warn)
274{ 279{
275 int retval = 0; 280 int retval = 0;
281 unsigned long flags;
276 282
277 spin_lock_irq(&pdc_lock); 283 spin_lock_irqsave(&pdc_lock, flags);
278 retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_WARN, __pa(pdc_result)); 284 retval = mem_pdc_call(PDC_CHASSIS, PDC_CHASSIS_WARN, __pa(pdc_result));
279 *warn = pdc_result[0]; 285 *warn = pdc_result[0];
280 spin_unlock_irq(&pdc_lock); 286 spin_unlock_irqrestore(&pdc_lock, flags);
281 287
282 return retval; 288 return retval;
283} 289}
@@ -292,15 +298,16 @@ int pdc_chassis_warn(unsigned long *warn)
292int __init pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info) 298int __init pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info)
293{ 299{
294 int retval; 300 int retval;
301 unsigned long flags;
295 302
296 spin_lock_irq(&pdc_lock); 303 spin_lock_irqsave(&pdc_lock, flags);
297 retval = mem_pdc_call(PDC_COPROC, PDC_COPROC_CFG, __pa(pdc_result)); 304 retval = mem_pdc_call(PDC_COPROC, PDC_COPROC_CFG, __pa(pdc_result));
298 convert_to_wide(pdc_result); 305 convert_to_wide(pdc_result);
299 pdc_coproc_info->ccr_functional = pdc_result[0]; 306 pdc_coproc_info->ccr_functional = pdc_result[0];
300 pdc_coproc_info->ccr_present = pdc_result[1]; 307 pdc_coproc_info->ccr_present = pdc_result[1];
301 pdc_coproc_info->revision = pdc_result[17]; 308 pdc_coproc_info->revision = pdc_result[17];
302 pdc_coproc_info->model = pdc_result[18]; 309 pdc_coproc_info->model = pdc_result[18];
303 spin_unlock_irq(&pdc_lock); 310 spin_unlock_irqrestore(&pdc_lock, flags);
304 311
305 return retval; 312 return retval;
306} 313}
@@ -320,14 +327,15 @@ int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
320 void *iodc_data, unsigned int iodc_data_size) 327 void *iodc_data, unsigned int iodc_data_size)
321{ 328{
322 int retval; 329 int retval;
330 unsigned long flags;
323 331
324 spin_lock_irq(&pdc_lock); 332 spin_lock_irqsave(&pdc_lock, flags);
325 retval = mem_pdc_call(PDC_IODC, PDC_IODC_READ, __pa(pdc_result), hpa, 333 retval = mem_pdc_call(PDC_IODC, PDC_IODC_READ, __pa(pdc_result), hpa,
326 index, __pa(pdc_result2), iodc_data_size); 334 index, __pa(pdc_result2), iodc_data_size);
327 convert_to_wide(pdc_result); 335 convert_to_wide(pdc_result);
328 *actcnt = pdc_result[0]; 336 *actcnt = pdc_result[0];
329 memcpy(iodc_data, pdc_result2, iodc_data_size); 337 memcpy(iodc_data, pdc_result2, iodc_data_size);
330 spin_unlock_irq(&pdc_lock); 338 spin_unlock_irqrestore(&pdc_lock, flags);
331 339
332 return retval; 340 return retval;
333} 341}
@@ -346,14 +354,15 @@ int pdc_system_map_find_mods(struct pdc_system_map_mod_info *pdc_mod_info,
346 struct pdc_module_path *mod_path, long mod_index) 354 struct pdc_module_path *mod_path, long mod_index)
347{ 355{
348 int retval; 356 int retval;
357 unsigned long flags;
349 358
350 spin_lock_irq(&pdc_lock); 359 spin_lock_irqsave(&pdc_lock, flags);
351 retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_MODULE, __pa(pdc_result), 360 retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_MODULE, __pa(pdc_result),
352 __pa(pdc_result2), mod_index); 361 __pa(pdc_result2), mod_index);
353 convert_to_wide(pdc_result); 362 convert_to_wide(pdc_result);
354 memcpy(pdc_mod_info, pdc_result, sizeof(*pdc_mod_info)); 363 memcpy(pdc_mod_info, pdc_result, sizeof(*pdc_mod_info));
355 memcpy(mod_path, pdc_result2, sizeof(*mod_path)); 364 memcpy(mod_path, pdc_result2, sizeof(*mod_path));
356 spin_unlock_irq(&pdc_lock); 365 spin_unlock_irqrestore(&pdc_lock, flags);
357 366
358 pdc_mod_info->mod_addr = f_extend(pdc_mod_info->mod_addr); 367 pdc_mod_info->mod_addr = f_extend(pdc_mod_info->mod_addr);
359 return retval; 368 return retval;
@@ -372,13 +381,14 @@ int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info,
372 long mod_index, long addr_index) 381 long mod_index, long addr_index)
373{ 382{
374 int retval; 383 int retval;
384 unsigned long flags;
375 385
376 spin_lock_irq(&pdc_lock); 386 spin_lock_irqsave(&pdc_lock, flags);
377 retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_ADDRESS, __pa(pdc_result), 387 retval = mem_pdc_call(PDC_SYSTEM_MAP, PDC_FIND_ADDRESS, __pa(pdc_result),
378 mod_index, addr_index); 388 mod_index, addr_index);
379 convert_to_wide(pdc_result); 389 convert_to_wide(pdc_result);
380 memcpy(pdc_addr_info, pdc_result, sizeof(*pdc_addr_info)); 390 memcpy(pdc_addr_info, pdc_result, sizeof(*pdc_addr_info));
381 spin_unlock_irq(&pdc_lock); 391 spin_unlock_irqrestore(&pdc_lock, flags);
382 392
383 pdc_addr_info->mod_addr = f_extend(pdc_addr_info->mod_addr); 393 pdc_addr_info->mod_addr = f_extend(pdc_addr_info->mod_addr);
384 return retval; 394 return retval;
@@ -393,12 +403,13 @@ int pdc_system_map_find_addrs(struct pdc_system_map_addr_info *pdc_addr_info,
393int pdc_model_info(struct pdc_model *model) 403int pdc_model_info(struct pdc_model *model)
394{ 404{
395 int retval; 405 int retval;
406 unsigned long flags;
396 407
397 spin_lock_irq(&pdc_lock); 408 spin_lock_irqsave(&pdc_lock, flags);
398 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0); 409 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_INFO, __pa(pdc_result), 0);
399 convert_to_wide(pdc_result); 410 convert_to_wide(pdc_result);
400 memcpy(model, pdc_result, sizeof(*model)); 411 memcpy(model, pdc_result, sizeof(*model));
401 spin_unlock_irq(&pdc_lock); 412 spin_unlock_irqrestore(&pdc_lock, flags);
402 413
403 return retval; 414 return retval;
404} 415}
@@ -414,8 +425,9 @@ int pdc_model_info(struct pdc_model *model)
414int pdc_model_sysmodel(char *name) 425int pdc_model_sysmodel(char *name)
415{ 426{
416 int retval; 427 int retval;
428 unsigned long flags;
417 429
418 spin_lock_irq(&pdc_lock); 430 spin_lock_irqsave(&pdc_lock, flags);
419 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_SYSMODEL, __pa(pdc_result), 431 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_SYSMODEL, __pa(pdc_result),
420 OS_ID_HPUX, __pa(name)); 432 OS_ID_HPUX, __pa(name));
421 convert_to_wide(pdc_result); 433 convert_to_wide(pdc_result);
@@ -425,7 +437,7 @@ int pdc_model_sysmodel(char *name)
425 } else { 437 } else {
426 name[0] = 0; 438 name[0] = 0;
427 } 439 }
428 spin_unlock_irq(&pdc_lock); 440 spin_unlock_irqrestore(&pdc_lock, flags);
429 441
430 return retval; 442 return retval;
431} 443}
@@ -443,12 +455,13 @@ int pdc_model_sysmodel(char *name)
443int pdc_model_versions(unsigned long *versions, int id) 455int pdc_model_versions(unsigned long *versions, int id)
444{ 456{
445 int retval; 457 int retval;
458 unsigned long flags;
446 459
447 spin_lock_irq(&pdc_lock); 460 spin_lock_irqsave(&pdc_lock, flags);
448 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_VERSIONS, __pa(pdc_result), id); 461 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_VERSIONS, __pa(pdc_result), id);
449 convert_to_wide(pdc_result); 462 convert_to_wide(pdc_result);
450 *versions = pdc_result[0]; 463 *versions = pdc_result[0];
451 spin_unlock_irq(&pdc_lock); 464 spin_unlock_irqrestore(&pdc_lock, flags);
452 465
453 return retval; 466 return retval;
454} 467}
@@ -463,13 +476,14 @@ int pdc_model_versions(unsigned long *versions, int id)
463int pdc_model_cpuid(unsigned long *cpu_id) 476int pdc_model_cpuid(unsigned long *cpu_id)
464{ 477{
465 int retval; 478 int retval;
479 unsigned long flags;
466 480
467 spin_lock_irq(&pdc_lock); 481 spin_lock_irqsave(&pdc_lock, flags);
468 pdc_result[0] = 0; /* preset zero (call may not be implemented!) */ 482 pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
469 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CPU_ID, __pa(pdc_result), 0); 483 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CPU_ID, __pa(pdc_result), 0);
470 convert_to_wide(pdc_result); 484 convert_to_wide(pdc_result);
471 *cpu_id = pdc_result[0]; 485 *cpu_id = pdc_result[0];
472 spin_unlock_irq(&pdc_lock); 486 spin_unlock_irqrestore(&pdc_lock, flags);
473 487
474 return retval; 488 return retval;
475} 489}
@@ -484,13 +498,14 @@ int pdc_model_cpuid(unsigned long *cpu_id)
484int pdc_model_capabilities(unsigned long *capabilities) 498int pdc_model_capabilities(unsigned long *capabilities)
485{ 499{
486 int retval; 500 int retval;
501 unsigned long flags;
487 502
488 spin_lock_irq(&pdc_lock); 503 spin_lock_irqsave(&pdc_lock, flags);
489 pdc_result[0] = 0; /* preset zero (call may not be implemented!) */ 504 pdc_result[0] = 0; /* preset zero (call may not be implemented!) */
490 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0); 505 retval = mem_pdc_call(PDC_MODEL, PDC_MODEL_CAPABILITIES, __pa(pdc_result), 0);
491 convert_to_wide(pdc_result); 506 convert_to_wide(pdc_result);
492 *capabilities = pdc_result[0]; 507 *capabilities = pdc_result[0];
493 spin_unlock_irq(&pdc_lock); 508 spin_unlock_irqrestore(&pdc_lock, flags);
494 509
495 return retval; 510 return retval;
496} 511}
@@ -504,12 +519,13 @@ int pdc_model_capabilities(unsigned long *capabilities)
504int pdc_cache_info(struct pdc_cache_info *cache_info) 519int pdc_cache_info(struct pdc_cache_info *cache_info)
505{ 520{
506 int retval; 521 int retval;
522 unsigned long flags;
507 523
508 spin_lock_irq(&pdc_lock); 524 spin_lock_irqsave(&pdc_lock, flags);
509 retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_INFO, __pa(pdc_result), 0); 525 retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_INFO, __pa(pdc_result), 0);
510 convert_to_wide(pdc_result); 526 convert_to_wide(pdc_result);
511 memcpy(cache_info, pdc_result, sizeof(*cache_info)); 527 memcpy(cache_info, pdc_result, sizeof(*cache_info));
512 spin_unlock_irq(&pdc_lock); 528 spin_unlock_irqrestore(&pdc_lock, flags);
513 529
514 return retval; 530 return retval;
515} 531}
@@ -523,13 +539,14 @@ int pdc_cache_info(struct pdc_cache_info *cache_info)
523int pdc_spaceid_bits(unsigned long *space_bits) 539int pdc_spaceid_bits(unsigned long *space_bits)
524{ 540{
525 int retval; 541 int retval;
542 unsigned long flags;
526 543
527 spin_lock_irq(&pdc_lock); 544 spin_lock_irqsave(&pdc_lock, flags);
528 pdc_result[0] = 0; 545 pdc_result[0] = 0;
529 retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_RET_SPID, __pa(pdc_result), 0); 546 retval = mem_pdc_call(PDC_CACHE, PDC_CACHE_RET_SPID, __pa(pdc_result), 0);
530 convert_to_wide(pdc_result); 547 convert_to_wide(pdc_result);
531 *space_bits = pdc_result[0]; 548 *space_bits = pdc_result[0];
532 spin_unlock_irq(&pdc_lock); 549 spin_unlock_irqrestore(&pdc_lock, flags);
533 550
534 return retval; 551 return retval;
535} 552}
@@ -544,11 +561,12 @@ int pdc_spaceid_bits(unsigned long *space_bits)
544int pdc_btlb_info(struct pdc_btlb_info *btlb) 561int pdc_btlb_info(struct pdc_btlb_info *btlb)
545{ 562{
546 int retval; 563 int retval;
564 unsigned long flags;
547 565
548 spin_lock_irq(&pdc_lock); 566 spin_lock_irqsave(&pdc_lock, flags);
549 retval = mem_pdc_call(PDC_BLOCK_TLB, PDC_BTLB_INFO, __pa(pdc_result), 0); 567 retval = mem_pdc_call(PDC_BLOCK_TLB, PDC_BTLB_INFO, __pa(pdc_result), 0);
550 memcpy(btlb, pdc_result, sizeof(*btlb)); 568 memcpy(btlb, pdc_result, sizeof(*btlb));
551 spin_unlock_irq(&pdc_lock); 569 spin_unlock_irqrestore(&pdc_lock, flags);
552 570
553 if(retval < 0) { 571 if(retval < 0) {
554 btlb->max_size = 0; 572 btlb->max_size = 0;
@@ -572,13 +590,14 @@ int pdc_mem_map_hpa(struct pdc_memory_map *address,
572 struct pdc_module_path *mod_path) 590 struct pdc_module_path *mod_path)
573{ 591{
574 int retval; 592 int retval;
593 unsigned long flags;
575 594
576 spin_lock_irq(&pdc_lock); 595 spin_lock_irqsave(&pdc_lock, flags);
577 memcpy(pdc_result2, mod_path, sizeof(*mod_path)); 596 memcpy(pdc_result2, mod_path, sizeof(*mod_path));
578 retval = mem_pdc_call(PDC_MEM_MAP, PDC_MEM_MAP_HPA, __pa(pdc_result), 597 retval = mem_pdc_call(PDC_MEM_MAP, PDC_MEM_MAP_HPA, __pa(pdc_result),
579 __pa(pdc_result2)); 598 __pa(pdc_result2));
580 memcpy(address, pdc_result, sizeof(*address)); 599 memcpy(address, pdc_result, sizeof(*address));
581 spin_unlock_irq(&pdc_lock); 600 spin_unlock_irqrestore(&pdc_lock, flags);
582 601
583 return retval; 602 return retval;
584} 603}
@@ -594,8 +613,9 @@ int pdc_mem_map_hpa(struct pdc_memory_map *address,
594int pdc_lan_station_id(char *lan_addr, unsigned long hpa) 613int pdc_lan_station_id(char *lan_addr, unsigned long hpa)
595{ 614{
596 int retval; 615 int retval;
616 unsigned long flags;
597 617
598 spin_lock_irq(&pdc_lock); 618 spin_lock_irqsave(&pdc_lock, flags);
599 retval = mem_pdc_call(PDC_LAN_STATION_ID, PDC_LAN_STATION_ID_READ, 619 retval = mem_pdc_call(PDC_LAN_STATION_ID, PDC_LAN_STATION_ID_READ,
600 __pa(pdc_result), hpa); 620 __pa(pdc_result), hpa);
601 if (retval < 0) { 621 if (retval < 0) {
@@ -604,7 +624,7 @@ int pdc_lan_station_id(char *lan_addr, unsigned long hpa)
604 } else { 624 } else {
605 memcpy(lan_addr, pdc_result, PDC_LAN_STATION_ID_SIZE); 625 memcpy(lan_addr, pdc_result, PDC_LAN_STATION_ID_SIZE);
606 } 626 }
607 spin_unlock_irq(&pdc_lock); 627 spin_unlock_irqrestore(&pdc_lock, flags);
608 628
609 return retval; 629 return retval;
610} 630}
@@ -623,13 +643,14 @@ EXPORT_SYMBOL(pdc_lan_station_id);
623int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count) 643int pdc_stable_read(unsigned long staddr, void *memaddr, unsigned long count)
624{ 644{
625 int retval; 645 int retval;
646 unsigned long flags;
626 647
627 spin_lock_irq(&pdc_lock); 648 spin_lock_irqsave(&pdc_lock, flags);
628 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_READ, staddr, 649 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_READ, staddr,
629 __pa(pdc_result), count); 650 __pa(pdc_result), count);
630 convert_to_wide(pdc_result); 651 convert_to_wide(pdc_result);
631 memcpy(memaddr, pdc_result, count); 652 memcpy(memaddr, pdc_result, count);
632 spin_unlock_irq(&pdc_lock); 653 spin_unlock_irqrestore(&pdc_lock, flags);
633 654
634 return retval; 655 return retval;
635} 656}
@@ -648,13 +669,14 @@ EXPORT_SYMBOL(pdc_stable_read);
648int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count) 669int pdc_stable_write(unsigned long staddr, void *memaddr, unsigned long count)
649{ 670{
650 int retval; 671 int retval;
672 unsigned long flags;
651 673
652 spin_lock_irq(&pdc_lock); 674 spin_lock_irqsave(&pdc_lock, flags);
653 memcpy(pdc_result, memaddr, count); 675 memcpy(pdc_result, memaddr, count);
654 convert_to_wide(pdc_result); 676 convert_to_wide(pdc_result);
655 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_WRITE, staddr, 677 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_WRITE, staddr,
656 __pa(pdc_result), count); 678 __pa(pdc_result), count);
657 spin_unlock_irq(&pdc_lock); 679 spin_unlock_irqrestore(&pdc_lock, flags);
658 680
659 return retval; 681 return retval;
660} 682}
@@ -672,11 +694,12 @@ EXPORT_SYMBOL(pdc_stable_write);
672int pdc_stable_get_size(unsigned long *size) 694int pdc_stable_get_size(unsigned long *size)
673{ 695{
674 int retval; 696 int retval;
697 unsigned long flags;
675 698
676 spin_lock_irq(&pdc_lock); 699 spin_lock_irqsave(&pdc_lock, flags);
677 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_RETURN_SIZE, __pa(pdc_result)); 700 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_RETURN_SIZE, __pa(pdc_result));
678 *size = pdc_result[0]; 701 *size = pdc_result[0];
679 spin_unlock_irq(&pdc_lock); 702 spin_unlock_irqrestore(&pdc_lock, flags);
680 703
681 return retval; 704 return retval;
682} 705}
@@ -691,10 +714,11 @@ EXPORT_SYMBOL(pdc_stable_get_size);
691int pdc_stable_verify_contents(void) 714int pdc_stable_verify_contents(void)
692{ 715{
693 int retval; 716 int retval;
717 unsigned long flags;
694 718
695 spin_lock_irq(&pdc_lock); 719 spin_lock_irqsave(&pdc_lock, flags);
696 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_VERIFY_CONTENTS); 720 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_VERIFY_CONTENTS);
697 spin_unlock_irq(&pdc_lock); 721 spin_unlock_irqrestore(&pdc_lock, flags);
698 722
699 return retval; 723 return retval;
700} 724}
@@ -709,10 +733,11 @@ EXPORT_SYMBOL(pdc_stable_verify_contents);
709int pdc_stable_initialize(void) 733int pdc_stable_initialize(void)
710{ 734{
711 int retval; 735 int retval;
736 unsigned long flags;
712 737
713 spin_lock_irq(&pdc_lock); 738 spin_lock_irqsave(&pdc_lock, flags);
714 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_INITIALIZE); 739 retval = mem_pdc_call(PDC_STABLE, PDC_STABLE_INITIALIZE);
715 spin_unlock_irq(&pdc_lock); 740 spin_unlock_irqrestore(&pdc_lock, flags);
716 741
717 return retval; 742 return retval;
718} 743}
@@ -735,8 +760,9 @@ EXPORT_SYMBOL(pdc_stable_initialize);
735int pdc_get_initiator(struct hardware_path *hwpath, struct pdc_initiator *initiator) 760int pdc_get_initiator(struct hardware_path *hwpath, struct pdc_initiator *initiator)
736{ 761{
737 int retval; 762 int retval;
763 unsigned long flags;
738 764
739 spin_lock_irq(&pdc_lock); 765 spin_lock_irqsave(&pdc_lock, flags);
740 766
741/* BCJ-XXXX series boxes. E.G. "9000/785/C3000" */ 767/* BCJ-XXXX series boxes. E.G. "9000/785/C3000" */
742#define IS_SPROCKETS() (strlen(boot_cpu_data.pdc.sys_model_name) == 14 && \ 768#define IS_SPROCKETS() (strlen(boot_cpu_data.pdc.sys_model_name) == 14 && \
@@ -776,7 +802,8 @@ int pdc_get_initiator(struct hardware_path *hwpath, struct pdc_initiator *initia
776 } 802 }
777 803
778 out: 804 out:
779 spin_unlock_irq(&pdc_lock); 805 spin_unlock_irqrestore(&pdc_lock, flags);
806
780 return (retval >= PDC_OK); 807 return (retval >= PDC_OK);
781} 808}
782EXPORT_SYMBOL(pdc_get_initiator); 809EXPORT_SYMBOL(pdc_get_initiator);
@@ -794,13 +821,14 @@ EXPORT_SYMBOL(pdc_get_initiator);
794int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa) 821int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa)
795{ 822{
796 int retval; 823 int retval;
824 unsigned long flags;
797 825
798 spin_lock_irq(&pdc_lock); 826 spin_lock_irqsave(&pdc_lock, flags);
799 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SIZE, 827 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL_SIZE,
800 __pa(pdc_result), hpa); 828 __pa(pdc_result), hpa);
801 convert_to_wide(pdc_result); 829 convert_to_wide(pdc_result);
802 *num_entries = pdc_result[0]; 830 *num_entries = pdc_result[0];
803 spin_unlock_irq(&pdc_lock); 831 spin_unlock_irqrestore(&pdc_lock, flags);
804 832
805 return retval; 833 return retval;
806} 834}
@@ -817,14 +845,15 @@ int pdc_pci_irt_size(unsigned long *num_entries, unsigned long hpa)
817int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl) 845int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl)
818{ 846{
819 int retval; 847 int retval;
848 unsigned long flags;
820 849
821 BUG_ON((unsigned long)tbl & 0x7); 850 BUG_ON((unsigned long)tbl & 0x7);
822 851
823 spin_lock_irq(&pdc_lock); 852 spin_lock_irqsave(&pdc_lock, flags);
824 pdc_result[0] = num_entries; 853 pdc_result[0] = num_entries;
825 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL, 854 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_GET_INT_TBL,
826 __pa(pdc_result), hpa, __pa(tbl)); 855 __pa(pdc_result), hpa, __pa(tbl));
827 spin_unlock_irq(&pdc_lock); 856 spin_unlock_irqrestore(&pdc_lock, flags);
828 857
829 return retval; 858 return retval;
830} 859}
@@ -842,12 +871,15 @@ int pdc_pci_irt(unsigned long num_entries, unsigned long hpa, void *tbl)
842unsigned int pdc_pci_config_read(void *hpa, unsigned long cfg_addr) 871unsigned int pdc_pci_config_read(void *hpa, unsigned long cfg_addr)
843{ 872{
844 int retval; 873 int retval;
845 spin_lock_irq(&pdc_lock); 874 unsigned long flags;
875
876 spin_lock_irqsave(&pdc_lock, flags);
846 pdc_result[0] = 0; 877 pdc_result[0] = 0;
847 pdc_result[1] = 0; 878 pdc_result[1] = 0;
848 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_READ_CONFIG, 879 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_READ_CONFIG,
849 __pa(pdc_result), hpa, cfg_addr&~3UL, 4UL); 880 __pa(pdc_result), hpa, cfg_addr&~3UL, 4UL);
850 spin_unlock_irq(&pdc_lock); 881 spin_unlock_irqrestore(&pdc_lock, flags);
882
851 return retval ? ~0 : (unsigned int) pdc_result[0]; 883 return retval ? ~0 : (unsigned int) pdc_result[0];
852} 884}
853 885
@@ -863,12 +895,15 @@ unsigned int pdc_pci_config_read(void *hpa, unsigned long cfg_addr)
863void pdc_pci_config_write(void *hpa, unsigned long cfg_addr, unsigned int val) 895void pdc_pci_config_write(void *hpa, unsigned long cfg_addr, unsigned int val)
864{ 896{
865 int retval; 897 int retval;
866 spin_lock_irq(&pdc_lock); 898 unsigned long flags;
899
900 spin_lock_irqsave(&pdc_lock, flags);
867 pdc_result[0] = 0; 901 pdc_result[0] = 0;
868 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_WRITE_CONFIG, 902 retval = mem_pdc_call(PDC_PCI_INDEX, PDC_PCI_WRITE_CONFIG,
869 __pa(pdc_result), hpa, 903 __pa(pdc_result), hpa,
870 cfg_addr&~3UL, 4UL, (unsigned long) val); 904 cfg_addr&~3UL, 4UL, (unsigned long) val);
871 spin_unlock_irq(&pdc_lock); 905 spin_unlock_irqrestore(&pdc_lock, flags);
906
872 return retval; 907 return retval;
873} 908}
874#endif /* UNTESTED CODE */ 909#endif /* UNTESTED CODE */
@@ -882,12 +917,13 @@ void pdc_pci_config_write(void *hpa, unsigned long cfg_addr, unsigned int val)
882int pdc_tod_read(struct pdc_tod *tod) 917int pdc_tod_read(struct pdc_tod *tod)
883{ 918{
884 int retval; 919 int retval;
920 unsigned long flags;
885 921
886 spin_lock_irq(&pdc_lock); 922 spin_lock_irqsave(&pdc_lock, flags);
887 retval = mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(pdc_result), 0); 923 retval = mem_pdc_call(PDC_TOD, PDC_TOD_READ, __pa(pdc_result), 0);
888 convert_to_wide(pdc_result); 924 convert_to_wide(pdc_result);
889 memcpy(tod, pdc_result, sizeof(*tod)); 925 memcpy(tod, pdc_result, sizeof(*tod));
890 spin_unlock_irq(&pdc_lock); 926 spin_unlock_irqrestore(&pdc_lock, flags);
891 927
892 return retval; 928 return retval;
893} 929}
@@ -903,10 +939,11 @@ EXPORT_SYMBOL(pdc_tod_read);
903int pdc_tod_set(unsigned long sec, unsigned long usec) 939int pdc_tod_set(unsigned long sec, unsigned long usec)
904{ 940{
905 int retval; 941 int retval;
942 unsigned long flags;
906 943
907 spin_lock_irq(&pdc_lock); 944 spin_lock_irqsave(&pdc_lock, flags);
908 retval = mem_pdc_call(PDC_TOD, PDC_TOD_WRITE, sec, usec); 945 retval = mem_pdc_call(PDC_TOD, PDC_TOD_WRITE, sec, usec);
909 spin_unlock_irq(&pdc_lock); 946 spin_unlock_irqrestore(&pdc_lock, flags);
910 947
911 return retval; 948 return retval;
912} 949}
@@ -917,13 +954,14 @@ int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
917 struct pdc_memory_table *tbl, unsigned long entries) 954 struct pdc_memory_table *tbl, unsigned long entries)
918{ 955{
919 int retval; 956 int retval;
957 unsigned long flags;
920 958
921 spin_lock_irq(&pdc_lock); 959 spin_lock_irqsave(&pdc_lock, flags);
922 retval = mem_pdc_call(PDC_MEM, PDC_MEM_TABLE, __pa(pdc_result), __pa(pdc_result2), entries); 960 retval = mem_pdc_call(PDC_MEM, PDC_MEM_TABLE, __pa(pdc_result), __pa(pdc_result2), entries);
923 convert_to_wide(pdc_result); 961 convert_to_wide(pdc_result);
924 memcpy(r_addr, pdc_result, sizeof(*r_addr)); 962 memcpy(r_addr, pdc_result, sizeof(*r_addr));
925 memcpy(tbl, pdc_result2, entries * sizeof(*tbl)); 963 memcpy(tbl, pdc_result2, entries * sizeof(*tbl));
926 spin_unlock_irq(&pdc_lock); 964 spin_unlock_irqrestore(&pdc_lock, flags);
927 965
928 return retval; 966 return retval;
929} 967}
@@ -936,11 +974,12 @@ int pdc_mem_mem_table(struct pdc_memory_table_raddr *r_addr,
936int pdc_do_firm_test_reset(unsigned long ftc_bitmap) 974int pdc_do_firm_test_reset(unsigned long ftc_bitmap)
937{ 975{
938 int retval; 976 int retval;
977 unsigned long flags;
939 978
940 spin_lock_irq(&pdc_lock); 979 spin_lock_irqsave(&pdc_lock, flags);
941 retval = mem_pdc_call(PDC_BROADCAST_RESET, PDC_DO_FIRM_TEST_RESET, 980 retval = mem_pdc_call(PDC_BROADCAST_RESET, PDC_DO_FIRM_TEST_RESET,
942 PDC_FIRM_TEST_MAGIC, ftc_bitmap); 981 PDC_FIRM_TEST_MAGIC, ftc_bitmap);
943 spin_unlock_irq(&pdc_lock); 982 spin_unlock_irqrestore(&pdc_lock, flags);
944 983
945 return retval; 984 return retval;
946} 985}
@@ -953,10 +992,11 @@ int pdc_do_firm_test_reset(unsigned long ftc_bitmap)
953int pdc_do_reset(void) 992int pdc_do_reset(void)
954{ 993{
955 int retval; 994 int retval;
995 unsigned long flags;
956 996
957 spin_lock_irq(&pdc_lock); 997 spin_lock_irqsave(&pdc_lock, flags);
958 retval = mem_pdc_call(PDC_BROADCAST_RESET, PDC_DO_RESET); 998 retval = mem_pdc_call(PDC_BROADCAST_RESET, PDC_DO_RESET);
959 spin_unlock_irq(&pdc_lock); 999 spin_unlock_irqrestore(&pdc_lock, flags);
960 1000
961 return retval; 1001 return retval;
962} 1002}
@@ -970,16 +1010,17 @@ int pdc_do_reset(void)
970int __init pdc_soft_power_info(unsigned long *power_reg) 1010int __init pdc_soft_power_info(unsigned long *power_reg)
971{ 1011{
972 int retval; 1012 int retval;
1013 unsigned long flags;
973 1014
974 *power_reg = (unsigned long) (-1); 1015 *power_reg = (unsigned long) (-1);
975 1016
976 spin_lock_irq(&pdc_lock); 1017 spin_lock_irqsave(&pdc_lock, flags);
977 retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_INFO, __pa(pdc_result), 0); 1018 retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_INFO, __pa(pdc_result), 0);
978 if (retval == PDC_OK) { 1019 if (retval == PDC_OK) {
979 convert_to_wide(pdc_result); 1020 convert_to_wide(pdc_result);
980 *power_reg = f_extend(pdc_result[0]); 1021 *power_reg = f_extend(pdc_result[0]);
981 } 1022 }
982 spin_unlock_irq(&pdc_lock); 1023 spin_unlock_irqrestore(&pdc_lock, flags);
983 1024
984 return retval; 1025 return retval;
985} 1026}
@@ -998,9 +1039,12 @@ int __init pdc_soft_power_info(unsigned long *power_reg)
998int pdc_soft_power_button(int sw_control) 1039int pdc_soft_power_button(int sw_control)
999{ 1040{
1000 int retval; 1041 int retval;
1001 spin_lock_irq(&pdc_lock); 1042 unsigned long flags;
1043
1044 spin_lock_irqsave(&pdc_lock, flags);
1002 retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_ENABLE, __pa(pdc_result), sw_control); 1045 retval = mem_pdc_call(PDC_SOFT_POWER, PDC_SOFT_POWER_ENABLE, __pa(pdc_result), sw_control);
1003 spin_unlock_irq(&pdc_lock); 1046 spin_unlock_irqrestore(&pdc_lock, flags);
1047
1004 return retval; 1048 return retval;
1005} 1049}
1006 1050
@@ -1011,9 +1055,11 @@ int pdc_soft_power_button(int sw_control)
1011 */ 1055 */
1012void pdc_io_reset(void) 1056void pdc_io_reset(void)
1013{ 1057{
1014 spin_lock_irq(&pdc_lock); 1058 unsigned long flags;
1059
1060 spin_lock_irqsave(&pdc_lock, flags);
1015 mem_pdc_call(PDC_IO, PDC_IO_RESET, 0); 1061 mem_pdc_call(PDC_IO, PDC_IO_RESET, 0);
1016 spin_unlock_irq(&pdc_lock); 1062 spin_unlock_irqrestore(&pdc_lock, flags);
1017} 1063}
1018 1064
1019/* 1065/*
@@ -1027,9 +1073,11 @@ void pdc_io_reset(void)
1027 */ 1073 */
1028void pdc_io_reset_devices(void) 1074void pdc_io_reset_devices(void)
1029{ 1075{
1030 spin_lock_irq(&pdc_lock); 1076 unsigned long flags;
1077
1078 spin_lock_irqsave(&pdc_lock, flags);
1031 mem_pdc_call(PDC_IO, PDC_IO_RESET_DEVICES, 0); 1079 mem_pdc_call(PDC_IO, PDC_IO_RESET_DEVICES, 0);
1032 spin_unlock_irq(&pdc_lock); 1080 spin_unlock_irqrestore(&pdc_lock, flags);
1033} 1081}
1034 1082
1035 1083
@@ -1146,10 +1194,11 @@ int pdc_sti_call(unsigned long func, unsigned long flags,
1146 unsigned long glob_cfg) 1194 unsigned long glob_cfg)
1147{ 1195{
1148 int retval; 1196 int retval;
1197 unsigned long irqflags;
1149 1198
1150 spin_lock_irq(&pdc_lock); 1199 spin_lock_irqsave(&pdc_lock, irqflags);
1151 retval = real32_call(func, flags, inptr, outputr, glob_cfg); 1200 retval = real32_call(func, flags, inptr, outputr, glob_cfg);
1152 spin_unlock_irq(&pdc_lock); 1201 spin_unlock_irqrestore(&pdc_lock, irqflags);
1153 1202
1154 return retval; 1203 return retval;
1155} 1204}
@@ -1166,11 +1215,12 @@ EXPORT_SYMBOL(pdc_sti_call);
1166int pdc_pat_cell_get_number(struct pdc_pat_cell_num *cell_info) 1215int pdc_pat_cell_get_number(struct pdc_pat_cell_num *cell_info)
1167{ 1216{
1168 int retval; 1217 int retval;
1218 unsigned long flags;
1169 1219
1170 spin_lock_irq(&pdc_lock); 1220 spin_lock_irqsave(&pdc_lock, flags);
1171 retval = mem_pdc_call(PDC_PAT_CELL, PDC_PAT_CELL_GET_NUMBER, __pa(pdc_result)); 1221 retval = mem_pdc_call(PDC_PAT_CELL, PDC_PAT_CELL_GET_NUMBER, __pa(pdc_result));
1172 memcpy(cell_info, pdc_result, sizeof(*cell_info)); 1222 memcpy(cell_info, pdc_result, sizeof(*cell_info));
1173 spin_unlock_irq(&pdc_lock); 1223 spin_unlock_irqrestore(&pdc_lock, flags);
1174 1224
1175 return retval; 1225 return retval;
1176} 1226}
@@ -1190,16 +1240,17 @@ int pdc_pat_cell_module(unsigned long *actcnt, unsigned long ploc, unsigned long
1190 unsigned long view_type, void *mem_addr) 1240 unsigned long view_type, void *mem_addr)
1191{ 1241{
1192 int retval; 1242 int retval;
1243 unsigned long flags;
1193 static struct pdc_pat_cell_mod_maddr_block result __attribute__ ((aligned (8))); 1244 static struct pdc_pat_cell_mod_maddr_block result __attribute__ ((aligned (8)));
1194 1245
1195 spin_lock_irq(&pdc_lock); 1246 spin_lock_irqsave(&pdc_lock, flags);
1196 retval = mem_pdc_call(PDC_PAT_CELL, PDC_PAT_CELL_MODULE, __pa(pdc_result), 1247 retval = mem_pdc_call(PDC_PAT_CELL, PDC_PAT_CELL_MODULE, __pa(pdc_result),
1197 ploc, mod, view_type, __pa(&result)); 1248 ploc, mod, view_type, __pa(&result));
1198 if(!retval) { 1249 if(!retval) {
1199 *actcnt = pdc_result[0]; 1250 *actcnt = pdc_result[0];
1200 memcpy(mem_addr, &result, *actcnt); 1251 memcpy(mem_addr, &result, *actcnt);
1201 } 1252 }
1202 spin_unlock_irq(&pdc_lock); 1253 spin_unlock_irqrestore(&pdc_lock, flags);
1203 1254
1204 return retval; 1255 return retval;
1205} 1256}
@@ -1214,12 +1265,13 @@ int pdc_pat_cell_module(unsigned long *actcnt, unsigned long ploc, unsigned long
1214int pdc_pat_cpu_get_number(struct pdc_pat_cpu_num *cpu_info, void *hpa) 1265int pdc_pat_cpu_get_number(struct pdc_pat_cpu_num *cpu_info, void *hpa)
1215{ 1266{
1216 int retval; 1267 int retval;
1268 unsigned long flags;
1217 1269
1218 spin_lock_irq(&pdc_lock); 1270 spin_lock_irqsave(&pdc_lock, flags);
1219 retval = mem_pdc_call(PDC_PAT_CPU, PDC_PAT_CPU_GET_NUMBER, 1271 retval = mem_pdc_call(PDC_PAT_CPU, PDC_PAT_CPU_GET_NUMBER,
1220 __pa(&pdc_result), hpa); 1272 __pa(&pdc_result), hpa);
1221 memcpy(cpu_info, pdc_result, sizeof(*cpu_info)); 1273 memcpy(cpu_info, pdc_result, sizeof(*cpu_info));
1222 spin_unlock_irq(&pdc_lock); 1274 spin_unlock_irqrestore(&pdc_lock, flags);
1223 1275
1224 return retval; 1276 return retval;
1225} 1277}
@@ -1235,12 +1287,13 @@ int pdc_pat_cpu_get_number(struct pdc_pat_cpu_num *cpu_info, void *hpa)
1235int pdc_pat_get_irt_size(unsigned long *num_entries, unsigned long cell_num) 1287int pdc_pat_get_irt_size(unsigned long *num_entries, unsigned long cell_num)
1236{ 1288{
1237 int retval; 1289 int retval;
1290 unsigned long flags;
1238 1291
1239 spin_lock_irq(&pdc_lock); 1292 spin_lock_irqsave(&pdc_lock, flags);
1240 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_GET_PCI_ROUTING_TABLE_SIZE, 1293 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_GET_PCI_ROUTING_TABLE_SIZE,
1241 __pa(pdc_result), cell_num); 1294 __pa(pdc_result), cell_num);
1242 *num_entries = pdc_result[0]; 1295 *num_entries = pdc_result[0];
1243 spin_unlock_irq(&pdc_lock); 1296 spin_unlock_irqrestore(&pdc_lock, flags);
1244 1297
1245 return retval; 1298 return retval;
1246} 1299}
@@ -1255,11 +1308,12 @@ int pdc_pat_get_irt_size(unsigned long *num_entries, unsigned long cell_num)
1255int pdc_pat_get_irt(void *r_addr, unsigned long cell_num) 1308int pdc_pat_get_irt(void *r_addr, unsigned long cell_num)
1256{ 1309{
1257 int retval; 1310 int retval;
1311 unsigned long flags;
1258 1312
1259 spin_lock_irq(&pdc_lock); 1313 spin_lock_irqsave(&pdc_lock, flags);
1260 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_GET_PCI_ROUTING_TABLE, 1314 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_GET_PCI_ROUTING_TABLE,
1261 __pa(r_addr), cell_num); 1315 __pa(r_addr), cell_num);
1262 spin_unlock_irq(&pdc_lock); 1316 spin_unlock_irqrestore(&pdc_lock, flags);
1263 1317
1264 return retval; 1318 return retval;
1265} 1319}
@@ -1276,13 +1330,14 @@ int pdc_pat_pd_get_addr_map(unsigned long *actual_len, void *mem_addr,
1276 unsigned long count, unsigned long offset) 1330 unsigned long count, unsigned long offset)
1277{ 1331{
1278 int retval; 1332 int retval;
1333 unsigned long flags;
1279 1334
1280 spin_lock_irq(&pdc_lock); 1335 spin_lock_irqsave(&pdc_lock, flags);
1281 retval = mem_pdc_call(PDC_PAT_PD, PDC_PAT_PD_GET_ADDR_MAP, __pa(pdc_result), 1336 retval = mem_pdc_call(PDC_PAT_PD, PDC_PAT_PD_GET_ADDR_MAP, __pa(pdc_result),
1282 __pa(pdc_result2), count, offset); 1337 __pa(pdc_result2), count, offset);
1283 *actual_len = pdc_result[0]; 1338 *actual_len = pdc_result[0];
1284 memcpy(mem_addr, pdc_result2, *actual_len); 1339 memcpy(mem_addr, pdc_result2, *actual_len);
1285 spin_unlock_irq(&pdc_lock); 1340 spin_unlock_irqrestore(&pdc_lock, flags);
1286 1341
1287 return retval; 1342 return retval;
1288} 1343}
@@ -1297,7 +1352,9 @@ int pdc_pat_pd_get_addr_map(unsigned long *actual_len, void *mem_addr,
1297int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *mem_addr) 1352int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *mem_addr)
1298{ 1353{
1299 int retval; 1354 int retval;
1300 spin_lock_irq(&pdc_lock); 1355 unsigned long flags;
1356
1357 spin_lock_irqsave(&pdc_lock, flags);
1301 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_PCI_CONFIG_READ, 1358 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_PCI_CONFIG_READ,
1302 __pa(pdc_result), pci_addr, pci_size); 1359 __pa(pdc_result), pci_addr, pci_size);
1303 switch(pci_size) { 1360 switch(pci_size) {
@@ -1305,7 +1362,7 @@ int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *mem_addr)
1305 case 2: *(u16 *)mem_addr = (u16) pdc_result[0]; 1362 case 2: *(u16 *)mem_addr = (u16) pdc_result[0];
1306 case 4: *(u32 *)mem_addr = (u32) pdc_result[0]; 1363 case 4: *(u32 *)mem_addr = (u32) pdc_result[0];
1307 } 1364 }
1308 spin_unlock_irq(&pdc_lock); 1365 spin_unlock_irqrestore(&pdc_lock, flags);
1309 1366
1310 return retval; 1367 return retval;
1311} 1368}
@@ -1321,11 +1378,12 @@ int pdc_pat_io_pci_cfg_read(unsigned long pci_addr, int pci_size, u32 *mem_addr)
1321int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val) 1378int pdc_pat_io_pci_cfg_write(unsigned long pci_addr, int pci_size, u32 val)
1322{ 1379{
1323 int retval; 1380 int retval;
1381 unsigned long flags;
1324 1382
1325 spin_lock_irq(&pdc_lock); 1383 spin_lock_irqsave(&pdc_lock, flags);
1326 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_PCI_CONFIG_WRITE, 1384 retval = mem_pdc_call(PDC_PAT_IO, PDC_PAT_IO_PCI_CONFIG_WRITE,
1327 pci_addr, pci_size, val); 1385 pci_addr, pci_size, val);
1328 spin_unlock_irq(&pdc_lock); 1386 spin_unlock_irqrestore(&pdc_lock, flags);
1329 1387
1330 return retval; 1388 return retval;
1331} 1389}
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 9bdd0197ceb7..b39c5b9aff46 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -35,8 +35,8 @@
35 35
36#undef PARISC_IRQ_CR16_COUNTS 36#undef PARISC_IRQ_CR16_COUNTS
37 37
38extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *); 38extern irqreturn_t timer_interrupt(int, void *);
39extern irqreturn_t ipi_interrupt(int, void *, struct pt_regs *); 39extern irqreturn_t ipi_interrupt(int, void *);
40 40
41#define EIEM_MASK(irq) (1UL<<(CPU_IRQ_MAX - irq)) 41#define EIEM_MASK(irq) (1UL<<(CPU_IRQ_MAX - irq))
42 42
@@ -347,12 +347,14 @@ static inline int eirr_to_irq(unsigned long eirr)
347/* ONLY called from entry.S:intr_extint() */ 347/* ONLY called from entry.S:intr_extint() */
348void do_cpu_irq_mask(struct pt_regs *regs) 348void do_cpu_irq_mask(struct pt_regs *regs)
349{ 349{
350 struct pt_regs *old_regs;
350 unsigned long eirr_val; 351 unsigned long eirr_val;
351 int irq, cpu = smp_processor_id(); 352 int irq, cpu = smp_processor_id();
352#ifdef CONFIG_SMP 353#ifdef CONFIG_SMP
353 cpumask_t dest; 354 cpumask_t dest;
354#endif 355#endif
355 356
357 old_regs = set_irq_regs(regs);
356 local_irq_disable(); 358 local_irq_disable();
357 irq_enter(); 359 irq_enter();
358 360
@@ -375,10 +377,11 @@ void do_cpu_irq_mask(struct pt_regs *regs)
375 goto set_out; 377 goto set_out;
376 } 378 }
377#endif 379#endif
378 __do_IRQ(irq, regs); 380 __do_IRQ(irq);
379 381
380 out: 382 out:
381 irq_exit(); 383 irq_exit();
384 set_irq_regs(old_regs);
382 return; 385 return;
383 386
384 set_out: 387 set_out:
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
index 6d57553d8ef8..8f6a0b312f7a 100644
--- a/arch/parisc/kernel/parisc_ksyms.c
+++ b/arch/parisc/kernel/parisc_ksyms.c
@@ -69,10 +69,6 @@ EXPORT_SYMBOL(memcpy_toio);
69EXPORT_SYMBOL(memcpy_fromio); 69EXPORT_SYMBOL(memcpy_fromio);
70EXPORT_SYMBOL(memset_io); 70EXPORT_SYMBOL(memset_io);
71 71
72#include <asm/unistd.h>
73EXPORT_SYMBOL(sys_lseek);
74EXPORT_SYMBOL(sys_write);
75
76#include <asm/semaphore.h> 72#include <asm/semaphore.h>
77EXPORT_SYMBOL(__up); 73EXPORT_SYMBOL(__up);
78EXPORT_SYMBOL(__down_interruptible); 74EXPORT_SYMBOL(__down_interruptible);
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index faad338f310e..4a23a97b06cd 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -154,7 +154,7 @@ halt_processor(void)
154 154
155 155
156irqreturn_t 156irqreturn_t
157ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs) 157ipi_interrupt(int irq, void *dev_id)
158{ 158{
159 int this_cpu = smp_processor_id(); 159 int this_cpu = smp_processor_id();
160 struct cpuinfo_parisc *p = &cpu_data[this_cpu]; 160 struct cpuinfo_parisc *p = &cpu_data[this_cpu];
@@ -414,19 +414,6 @@ smp_flush_tlb_all(void)
414 on_each_cpu(flush_tlb_all_local, NULL, 1, 1); 414 on_each_cpu(flush_tlb_all_local, NULL, 1, 1);
415} 415}
416 416
417
418void
419smp_do_timer(struct pt_regs *regs)
420{
421 int cpu = smp_processor_id();
422 struct cpuinfo_parisc *data = &cpu_data[cpu];
423
424 if (!--data->prof_counter) {
425 data->prof_counter = data->prof_multiplier;
426 update_process_times(user_mode(regs));
427 }
428}
429
430/* 417/*
431 * Called by secondaries to update state and initialize CPU registers. 418 * Called by secondaries to update state and initialize CPU registers.
432 */ 419 */
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index 1d58ce0e37ad..bad7d1eb62b9 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -34,10 +34,6 @@
34 34
35static unsigned long clocktick __read_mostly; /* timer cycles per tick */ 35static unsigned long clocktick __read_mostly; /* timer cycles per tick */
36 36
37#ifdef CONFIG_SMP
38extern void smp_do_timer(struct pt_regs *regs);
39#endif
40
41/* 37/*
42 * We keep time on PA-RISC Linux by using the Interval Timer which is 38 * We keep time on PA-RISC Linux by using the Interval Timer which is
43 * a pair of registers; one is read-only and one is write-only; both 39 * a pair of registers; one is read-only and one is write-only; both
@@ -55,21 +51,22 @@ extern void smp_do_timer(struct pt_regs *regs);
55 * held off for an arbitrarily long period of time by interrupts being 51 * held off for an arbitrarily long period of time by interrupts being
56 * disabled, so we may miss one or more ticks. 52 * disabled, so we may miss one or more ticks.
57 */ 53 */
58irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) 54irqreturn_t timer_interrupt(int irq, void *dev_id)
59{ 55{
60 unsigned long now; 56 unsigned long now;
61 unsigned long next_tick; 57 unsigned long next_tick;
62 unsigned long cycles_elapsed, ticks_elapsed; 58 unsigned long cycles_elapsed, ticks_elapsed;
63 unsigned long cycles_remainder; 59 unsigned long cycles_remainder;
64 unsigned int cpu = smp_processor_id(); 60 unsigned int cpu = smp_processor_id();
61 struct cpuinfo_parisc *cpuinfo = &cpu_data[cpu];
65 62
66 /* gcc can optimize for "read-only" case with a local clocktick */ 63 /* gcc can optimize for "read-only" case with a local clocktick */
67 unsigned long cpt = clocktick; 64 unsigned long cpt = clocktick;
68 65
69 profile_tick(CPU_PROFILING, regs); 66 profile_tick(CPU_PROFILING);
70 67
71 /* Initialize next_tick to the expected tick time. */ 68 /* Initialize next_tick to the expected tick time. */
72 next_tick = cpu_data[cpu].it_value; 69 next_tick = cpuinfo->it_value;
73 70
74 /* Get current interval timer. 71 /* Get current interval timer.
75 * CR16 reads as 64 bits in CPU wide mode. 72 * CR16 reads as 64 bits in CPU wide mode.
@@ -120,7 +117,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
120 */ 117 */
121 next_tick = now + cycles_remainder; 118 next_tick = now + cycles_remainder;
122 119
123 cpu_data[cpu].it_value = next_tick; 120 cpuinfo->it_value = next_tick;
124 121
125 /* Skip one clocktick on purpose if we are likely to miss next_tick. 122 /* Skip one clocktick on purpose if we are likely to miss next_tick.
126 * We want to avoid the new next_tick being less than CR16. 123 * We want to avoid the new next_tick being less than CR16.
@@ -131,18 +128,19 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
131 next_tick += cpt; 128 next_tick += cpt;
132 129
133 /* Program the IT when to deliver the next interrupt. */ 130 /* Program the IT when to deliver the next interrupt. */
134 /* Only bottom 32-bits of next_tick are written to cr16. */ 131 /* Only bottom 32-bits of next_tick are written to cr16. */
135 mtctl(next_tick, 16); 132 mtctl(next_tick, 16);
136 133
137 134
138 /* Done mucking with unreliable delivery of interrupts. 135 /* Done mucking with unreliable delivery of interrupts.
139 * Go do system house keeping. 136 * Go do system house keeping.
140 */ 137 */
141#ifdef CONFIG_SMP 138
142 smp_do_timer(regs); 139 if (!--cpuinfo->prof_counter) {
143#else 140 cpuinfo->prof_counter = cpuinfo->prof_multiplier;
144 update_process_times(user_mode(regs)); 141 update_process_times(user_mode(get_irq_regs()));
145#endif 142 }
143
146 if (cpu == 0) { 144 if (cpu == 0) {
147 write_seqlock(&xtime_lock); 145 write_seqlock(&xtime_lock);
148 do_timer(ticks_elapsed); 146 do_timer(ticks_elapsed);
@@ -319,13 +317,15 @@ void __init time_init(void)
319 317
320 start_cpu_itimer(); /* get CPU 0 started */ 318 start_cpu_itimer(); /* get CPU 0 started */
321 319
322 if(pdc_tod_read(&tod_data) == 0) { 320 if (pdc_tod_read(&tod_data) == 0) {
323 write_seqlock_irq(&xtime_lock); 321 unsigned long flags;
322
323 write_seqlock_irqsave(&xtime_lock, flags);
324 xtime.tv_sec = tod_data.tod_sec; 324 xtime.tv_sec = tod_data.tod_sec;
325 xtime.tv_nsec = tod_data.tod_usec * 1000; 325 xtime.tv_nsec = tod_data.tod_usec * 1000;
326 set_normalized_timespec(&wall_to_monotonic, 326 set_normalized_timespec(&wall_to_monotonic,
327 -xtime.tv_sec, -xtime.tv_nsec); 327 -xtime.tv_sec, -xtime.tv_nsec);
328 write_sequnlock_irq(&xtime_lock); 328 write_sequnlock_irqrestore(&xtime_lock, flags);
329 } else { 329 } else {
330 printk(KERN_ERR "Error reading tod clock\n"); 330 printk(KERN_ERR "Error reading tod clock\n");
331 xtime.tv_sec = 0; 331 xtime.tv_sec = 0;
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 003520b56303..37ddfcab0003 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -105,10 +105,10 @@ wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff)
105# Bits for building various flavours of zImage 105# Bits for building various flavours of zImage
106 106
107ifneq ($(CROSS32_COMPILE),) 107ifneq ($(CROSS32_COMPILE),)
108CROSSWRAP := -C $(CROSS32_COMPILE) 108CROSSWRAP := -C "$(CROSS32_COMPILE)"
109else 109else
110ifneq ($(CROSS_COMPILE),) 110ifneq ($(CROSS_COMPILE),)
111CROSSWRAP := -C $(CROSS_COMPILE) 111CROSSWRAP := -C "$(CROSS_COMPILE)"
112endif 112endif
113endif 113endif
114 114
@@ -151,12 +151,12 @@ $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits)
151$(obj)/uImage: vmlinux $(wrapperbits) 151$(obj)/uImage: vmlinux $(wrapperbits)
152 $(call cmd,wrap,uboot) 152 $(call cmd,wrap,uboot)
153 153
154image-$(CONFIG_PPC_PSERIES) += zImage.pseries 154image-$(CONFIG_PPC_PSERIES) += zImage.pseries
155image-$(CONFIG_PPC_MAPLE) += zImage.pseries 155image-$(CONFIG_PPC_MAPLE) += zImage.pseries
156image-$(CONFIG_PPC_CELL) += zImage.pseries 156image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries
157image-$(CONFIG_PPC_CHRP) += zImage.chrp 157image-$(CONFIG_PPC_CHRP) += zImage.chrp
158image-$(CONFIG_PPC_PMAC) += zImage.pmac 158image-$(CONFIG_PPC_PMAC) += zImage.pmac
159image-$(CONFIG_DEFAULT_UIMAGE) += uImage 159image-$(CONFIG_DEFAULT_UIMAGE) += uImage
160 160
161# For 32-bit powermacs, build the COFF and miboot images 161# For 32-bit powermacs, build the COFF and miboot images
162# as well as the ELF images. 162# as well as the ELF images.
diff --git a/arch/powerpc/boot/dts/mpc8349emitx.dts b/arch/powerpc/boot/dts/mpc8349emitx.dts
new file mode 100644
index 000000000000..27807fc45888
--- /dev/null
+++ b/arch/powerpc/boot/dts/mpc8349emitx.dts
@@ -0,0 +1,246 @@
1/*
2 * MPC8349E-mITX Device Tree Source
3 *
4 * Copyright 2006 Freescale Semiconductor Inc.
5 *
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
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version.
10 */
11/ {
12 model = "MPC8349EMITX";
13 compatible = "MPC834xMITX";
14 #address-cells = <1>;
15 #size-cells = <1>;
16
17 cpus {
18 #cpus = <1>;
19 #address-cells = <1>;
20 #size-cells = <0>;
21
22 PowerPC,8349@0 {
23 device_type = "cpu";
24 reg = <0>;
25 d-cache-line-size = <20>;
26 i-cache-line-size = <20>;
27 d-cache-size = <8000>;
28 i-cache-size = <8000>;
29 timebase-frequency = <0>; // from bootloader
30 bus-frequency = <0>; // from bootloader
31 clock-frequency = <0>; // from bootloader
32 32-bit;
33 };
34 };
35
36 memory {
37 device_type = "memory";
38 reg = <00000000 10000000>;
39 };
40
41 soc8349@e0000000 {
42 #address-cells = <1>;
43 #size-cells = <1>;
44 #interrupt-cells = <2>;
45 device_type = "soc";
46 ranges = <0 e0000000 00100000>;
47 reg = <e0000000 00000200>;
48 bus-frequency = <0>; // from bootloader
49
50 wdt@200 {
51 device_type = "watchdog";
52 compatible = "mpc83xx_wdt";
53 reg = <200 100>;
54 };
55
56 i2c@3000 {
57 device_type = "i2c";
58 compatible = "fsl-i2c";
59 reg = <3000 100>;
60 interrupts = <e 8>;
61 interrupt-parent = <700>;
62 dfsrr;
63 };
64
65 i2c@3100 {
66 device_type = "i2c";
67 compatible = "fsl-i2c";
68 reg = <3100 100>;
69 interrupts = <f 8>;
70 interrupt-parent = <700>;
71 dfsrr;
72 };
73
74 spi@7000 {
75 device_type = "spi";
76 compatible = "mpc83xx_spi";
77 reg = <7000 1000>;
78 interrupts = <10 8>;
79 interrupt-parent = <700>;
80 mode = <0>;
81 };
82
83 usb@22000 {
84 device_type = "usb";
85 compatible = "fsl-usb2-mph";
86 reg = <22000 1000>;
87 #address-cells = <1>;
88 #size-cells = <0>;
89 interrupt-parent = <700>;
90 interrupts = <27 2>;
91 phy_type = "ulpi";
92 port1;
93 };
94
95 usb@23000 {
96 device_type = "usb";
97 compatible = "fsl-usb2-dr";
98 reg = <23000 1000>;
99 #address-cells = <1>;
100 #size-cells = <0>;
101 interrupt-parent = <700>;
102 interrupts = <26 2>;
103 phy_type = "ulpi";
104 };
105
106 mdio@24520 {
107 device_type = "mdio";
108 compatible = "gianfar";
109 reg = <24520 20>;
110 #address-cells = <1>;
111 #size-cells = <0>;
112 linux,phandle = <24520>;
113
114 /* Vitesse 8201 */
115 ethernet-phy@1c {
116 linux,phandle = <245201c>;
117 interrupt-parent = <700>;
118 interrupts = <12 2>;
119 reg = <1c>;
120 device_type = "ethernet-phy";
121 };
122
123 /* Vitesse 7385 */
124 ethernet-phy@1f {
125 linux,phandle = <245201f>;
126 interrupt-parent = <700>;
127 interrupts = <12 2>;
128 reg = <1f>;
129 device_type = "ethernet-phy";
130 };
131 };
132
133 ethernet@24000 {
134 device_type = "network";
135 model = "TSEC";
136 compatible = "gianfar";
137 reg = <24000 1000>;
138 address = [ 00 00 00 00 00 00 ];
139 local-mac-address = [ 00 00 00 00 00 00 ];
140 interrupts = <20 8 21 8 22 8>;
141 interrupt-parent = <700>;
142 phy-handle = <245201c>;
143 };
144
145 ethernet@25000 {
146 #address-cells = <1>;
147 #size-cells = <0>;
148 device_type = "network";
149 model = "TSEC";
150 compatible = "gianfar";
151 reg = <25000 1000>;
152 address = [ 00 00 00 00 00 00 ];
153 local-mac-address = [ 00 00 00 00 00 00 ];
154 interrupts = <23 8 24 8 25 8>;
155 interrupt-parent = <700>;
156 phy-handle = <245201f>;
157 };
158
159 serial@4500 {
160 device_type = "serial";
161 compatible = "ns16550";
162 reg = <4500 100>;
163 clock-frequency = <0>; // from bootloader
164 interrupts = <9 8>;
165 interrupt-parent = <700>;
166 };
167
168 serial@4600 {
169 device_type = "serial";
170 compatible = "ns16550";
171 reg = <4600 100>;
172 clock-frequency = <0>; // from bootloader
173 interrupts = <a 8>;
174 interrupt-parent = <700>;
175 };
176
177 pci@8500 {
178 interrupt-map-mask = <f800 0 0 7>;
179 interrupt-map = <
180 /* IDSEL 0x10 - SATA */
181 8000 0 0 1 700 16 8 /* SATA_INTA */
182 >;
183 interrupt-parent = <700>;
184 interrupts = <42 8>;
185 bus-range = <0 0>;
186 ranges = <42000000 0 80000000 80000000 0 10000000
187 02000000 0 90000000 90000000 0 10000000
188 01000000 0 00000000 e2000000 0 01000000>;
189 clock-frequency = <3f940aa>;
190 #interrupt-cells = <1>;
191 #size-cells = <2>;
192 #address-cells = <3>;
193 reg = <8500 100>;
194 compatible = "83xx";
195 device_type = "pci";
196 };
197
198 pci@8600 {
199 interrupt-map-mask = <f800 0 0 7>;
200 interrupt-map = <
201 /* IDSEL 0x0E - MiniPCI Slot */
202 7000 0 0 1 700 15 8 /* PCI_INTA */
203
204 /* IDSEL 0x0F - PCI Slot */
205 7800 0 0 1 700 14 8 /* PCI_INTA */
206 7800 0 0 2 700 15 8 /* PCI_INTB */
207 >;
208 interrupt-parent = <700>;
209 interrupts = <43 8>;
210 bus-range = <1 1>;
211 ranges = <42000000 0 a0000000 a0000000 0 10000000
212 02000000 0 b0000000 b0000000 0 10000000
213 01000000 0 00000000 e3000000 0 01000000>;
214 clock-frequency = <3f940aa>;
215 #interrupt-cells = <1>;
216 #size-cells = <2>;
217 #address-cells = <3>;
218 reg = <8600 100>;
219 compatible = "83xx";
220 device_type = "pci";
221 };
222
223 crypto@30000 {
224 device_type = "crypto";
225 model = "SEC2";
226 compatible = "talitos";
227 reg = <30000 10000>;
228 interrupts = <b 8>;
229 interrupt-parent = <700>;
230 num-channels = <4>;
231 channel-fifo-len = <18>;
232 exec-units-mask = <0000007e>;
233 descriptor-types-mask = <01010ebf>;
234 };
235
236 pic@700 {
237 linux,phandle = <700>;
238 interrupt-controller;
239 #address-cells = <0>;
240 #interrupt-cells = <2>;
241 reg = <700 100>;
242 built-in;
243 device_type = "ipic";
244 };
245 };
246};
diff --git a/arch/powerpc/boot/of.c b/arch/powerpc/boot/of.c
index fd99f789a37b..3a71845afc6c 100644
--- a/arch/powerpc/boot/of.c
+++ b/arch/powerpc/boot/of.c
@@ -176,12 +176,9 @@ static void *claim(unsigned long virt, unsigned long size, unsigned long align)
176static void *of_try_claim(u32 size) 176static void *of_try_claim(u32 size)
177{ 177{
178 unsigned long addr = 0; 178 unsigned long addr = 0;
179 static u8 first_time = 1;
180 179
181 if (first_time) { 180 if (claim_base == 0)
182 claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB); 181 claim_base = _ALIGN_UP((unsigned long)_end, ONE_MB);
183 first_time = 0;
184 }
185 182
186 for(; claim_base < RAM_END; claim_base += ONE_MB) { 183 for(; claim_base < RAM_END; claim_base += ONE_MB) {
187#ifdef DEBUG 184#ifdef DEBUG
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index d58f82f836f8..b5005506c2f8 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_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-rc6 3# Linux kernel version: 2.6.19-rc1
4# Sun Sep 10 10:22:57 2006 4# Fri Oct 6 13:25:04 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -22,6 +22,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 22CONFIG_PPC_OF=y
23# CONFIG_PPC_UDBG_16550 is not set 23# CONFIG_PPC_UDBG_16550 is not set
24# CONFIG_GENERIC_TBSYNC is not set 24# CONFIG_GENERIC_TBSYNC is not set
25CONFIG_AUDIT_ARCH=y
25# CONFIG_DEFAULT_UIMAGE is not set 26# CONFIG_DEFAULT_UIMAGE is not set
26 27
27# 28#
@@ -52,10 +53,11 @@ CONFIG_LOCALVERSION=""
52CONFIG_LOCALVERSION_AUTO=y 53CONFIG_LOCALVERSION_AUTO=y
53CONFIG_SWAP=y 54CONFIG_SWAP=y
54CONFIG_SYSVIPC=y 55CONFIG_SYSVIPC=y
56# CONFIG_IPC_NS is not set
55CONFIG_POSIX_MQUEUE=y 57CONFIG_POSIX_MQUEUE=y
56# CONFIG_BSD_PROCESS_ACCT is not set 58# CONFIG_BSD_PROCESS_ACCT is not set
57# CONFIG_TASKSTATS is not set 59# CONFIG_TASKSTATS is not set
58CONFIG_SYSCTL=y 60# CONFIG_UTS_NS is not set
59CONFIG_AUDIT=y 61CONFIG_AUDIT=y
60CONFIG_AUDITSYSCALL=y 62CONFIG_AUDITSYSCALL=y
61CONFIG_IKCONFIG=y 63CONFIG_IKCONFIG=y
@@ -64,7 +66,9 @@ CONFIG_IKCONFIG_PROC=y
64# CONFIG_RELAY is not set 66# CONFIG_RELAY is not set
65CONFIG_INITRAMFS_SOURCE="" 67CONFIG_INITRAMFS_SOURCE=""
66CONFIG_CC_OPTIMIZE_FOR_SIZE=y 68CONFIG_CC_OPTIMIZE_FOR_SIZE=y
69CONFIG_SYSCTL=y
67# CONFIG_EMBEDDED is not set 70# CONFIG_EMBEDDED is not set
71# CONFIG_SYSCTL_SYSCALL is not set
68CONFIG_KALLSYMS=y 72CONFIG_KALLSYMS=y
69# CONFIG_KALLSYMS_ALL is not set 73# CONFIG_KALLSYMS_ALL is not set
70# CONFIG_KALLSYMS_EXTRA_PASS is not set 74# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -73,12 +77,12 @@ CONFIG_PRINTK=y
73CONFIG_BUG=y 77CONFIG_BUG=y
74CONFIG_ELF_CORE=y 78CONFIG_ELF_CORE=y
75CONFIG_BASE_FULL=y 79CONFIG_BASE_FULL=y
76CONFIG_RT_MUTEXES=y
77CONFIG_FUTEX=y 80CONFIG_FUTEX=y
78CONFIG_EPOLL=y 81CONFIG_EPOLL=y
79CONFIG_SHMEM=y 82CONFIG_SHMEM=y
80CONFIG_SLAB=y 83CONFIG_SLAB=y
81CONFIG_VM_EVENT_COUNTERS=y 84CONFIG_VM_EVENT_COUNTERS=y
85CONFIG_RT_MUTEXES=y
82# CONFIG_TINY_SHMEM is not set 86# CONFIG_TINY_SHMEM is not set
83CONFIG_BASE_SMALL=0 87CONFIG_BASE_SMALL=0
84# CONFIG_SLOB is not set 88# CONFIG_SLOB is not set
@@ -97,6 +101,7 @@ CONFIG_STOP_MACHINE=y
97# 101#
98# Block layer 102# Block layer
99# 103#
104CONFIG_BLOCK=y
100# CONFIG_BLK_DEV_IO_TRACE is not set 105# CONFIG_BLK_DEV_IO_TRACE is not set
101 106
102# 107#
@@ -115,13 +120,18 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
115# 120#
116# Platform support 121# Platform support
117# 122#
118# CONFIG_PPC_MULTIPLATFORM is not set 123CONFIG_PPC_MULTIPLATFORM=y
119CONFIG_PPC_ISERIES=y
120# CONFIG_EMBEDDED6xx is not set 124# CONFIG_EMBEDDED6xx is not set
121# CONFIG_APUS is not set 125# CONFIG_APUS is not set
126# CONFIG_PPC_PSERIES is not set
127CONFIG_PPC_ISERIES=y
128# CONFIG_PPC_PMAC is not set
129# CONFIG_PPC_MAPLE is not set
130# CONFIG_PPC_PASEMI is not set
122# CONFIG_PPC_CELL is not set 131# CONFIG_PPC_CELL is not set
123# CONFIG_PPC_CELL_NATIVE is not set 132# CONFIG_PPC_CELL_NATIVE is not set
124# CONFIG_UDBG_RTAS_CONSOLE is not set 133# CONFIG_PPC_IBM_CELL_BLADE is not set
134# CONFIG_U3_DART is not set
125# CONFIG_PPC_RTAS is not set 135# CONFIG_PPC_RTAS is not set
126# CONFIG_MMIO_NVRAM is not set 136# CONFIG_MMIO_NVRAM is not set
127CONFIG_IBMVIO=y 137CONFIG_IBMVIO=y
@@ -147,12 +157,15 @@ CONFIG_BINFMT_ELF=y
147CONFIG_FORCE_MAX_ZONEORDER=13 157CONFIG_FORCE_MAX_ZONEORDER=13
148CONFIG_IOMMU_VMERGE=y 158CONFIG_IOMMU_VMERGE=y
149CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 159CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
160# CONFIG_KEXEC is not set
161# CONFIG_CRASH_DUMP is not set
150CONFIG_IRQ_ALL_CPUS=y 162CONFIG_IRQ_ALL_CPUS=y
151CONFIG_LPARCFG=y 163CONFIG_LPARCFG=y
152# CONFIG_NUMA is not set 164# CONFIG_NUMA is not set
153CONFIG_ARCH_SELECT_MEMORY_MODEL=y 165CONFIG_ARCH_SELECT_MEMORY_MODEL=y
154CONFIG_ARCH_FLATMEM_ENABLE=y 166CONFIG_ARCH_FLATMEM_ENABLE=y
155CONFIG_ARCH_SPARSEMEM_ENABLE=y 167CONFIG_ARCH_SPARSEMEM_ENABLE=y
168CONFIG_ARCH_POPULATES_NODE_MAP=y
156CONFIG_SELECT_MEMORY_MODEL=y 169CONFIG_SELECT_MEMORY_MODEL=y
157CONFIG_FLATMEM_MANUAL=y 170CONFIG_FLATMEM_MANUAL=y
158# CONFIG_DISCONTIGMEM_MANUAL is not set 171# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -179,6 +192,7 @@ CONFIG_GENERIC_ISA_DMA=y
179CONFIG_PCI=y 192CONFIG_PCI=y
180CONFIG_PCI_DOMAINS=y 193CONFIG_PCI_DOMAINS=y
181# CONFIG_PCIEPORTBUS is not set 194# CONFIG_PCIEPORTBUS is not set
195# CONFIG_PCI_MULTITHREAD_PROBE is not set
182# CONFIG_PCI_DEBUG is not set 196# CONFIG_PCI_DEBUG is not set
183 197
184# 198#
@@ -206,6 +220,7 @@ CONFIG_PACKET=y
206CONFIG_UNIX=y 220CONFIG_UNIX=y
207CONFIG_XFRM=y 221CONFIG_XFRM=y
208CONFIG_XFRM_USER=m 222CONFIG_XFRM_USER=m
223CONFIG_XFRM_SUB_POLICY=y
209CONFIG_NET_KEY=m 224CONFIG_NET_KEY=m
210CONFIG_INET=y 225CONFIG_INET=y
211CONFIG_IP_MULTICAST=y 226CONFIG_IP_MULTICAST=y
@@ -224,10 +239,12 @@ CONFIG_INET_XFRM_TUNNEL=m
224CONFIG_INET_TUNNEL=y 239CONFIG_INET_TUNNEL=y
225CONFIG_INET_XFRM_MODE_TRANSPORT=y 240CONFIG_INET_XFRM_MODE_TRANSPORT=y
226CONFIG_INET_XFRM_MODE_TUNNEL=y 241CONFIG_INET_XFRM_MODE_TUNNEL=y
242CONFIG_INET_XFRM_MODE_BEET=m
227CONFIG_INET_DIAG=y 243CONFIG_INET_DIAG=y
228CONFIG_INET_TCP_DIAG=y 244CONFIG_INET_TCP_DIAG=y
229# CONFIG_TCP_CONG_ADVANCED is not set 245# CONFIG_TCP_CONG_ADVANCED is not set
230CONFIG_TCP_CONG_BIC=y 246CONFIG_TCP_CONG_CUBIC=y
247CONFIG_DEFAULT_TCP_CONG="cubic"
231 248
232# 249#
233# IP: Virtual Server Configuration 250# IP: Virtual Server Configuration
@@ -247,6 +264,7 @@ CONFIG_NETFILTER=y
247CONFIG_NETFILTER_XTABLES=m 264CONFIG_NETFILTER_XTABLES=m
248CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m 265CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
249CONFIG_NETFILTER_XT_TARGET_CONNMARK=m 266CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
267CONFIG_NETFILTER_XT_TARGET_DSCP=m
250CONFIG_NETFILTER_XT_TARGET_MARK=m 268CONFIG_NETFILTER_XT_TARGET_MARK=m
251CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m 269CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
252CONFIG_NETFILTER_XT_TARGET_NOTRACK=m 270CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
@@ -255,6 +273,7 @@ CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
255CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 273CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
256CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 274CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
257# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 275# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
276CONFIG_NETFILTER_XT_MATCH_DSCP=m
258# CONFIG_NETFILTER_XT_MATCH_ESP is not set 277# CONFIG_NETFILTER_XT_MATCH_ESP is not set
259CONFIG_NETFILTER_XT_MATCH_HELPER=m 278CONFIG_NETFILTER_XT_MATCH_HELPER=m
260CONFIG_NETFILTER_XT_MATCH_LENGTH=m 279CONFIG_NETFILTER_XT_MATCH_LENGTH=m
@@ -294,7 +313,6 @@ CONFIG_IP_NF_MATCH_IPRANGE=m
294CONFIG_IP_NF_MATCH_TOS=m 313CONFIG_IP_NF_MATCH_TOS=m
295CONFIG_IP_NF_MATCH_RECENT=m 314CONFIG_IP_NF_MATCH_RECENT=m
296CONFIG_IP_NF_MATCH_ECN=m 315CONFIG_IP_NF_MATCH_ECN=m
297CONFIG_IP_NF_MATCH_DSCP=m
298# CONFIG_IP_NF_MATCH_AH is not set 316# CONFIG_IP_NF_MATCH_AH is not set
299CONFIG_IP_NF_MATCH_TTL=m 317CONFIG_IP_NF_MATCH_TTL=m
300CONFIG_IP_NF_MATCH_OWNER=m 318CONFIG_IP_NF_MATCH_OWNER=m
@@ -319,7 +337,6 @@ CONFIG_IP_NF_NAT_AMANDA=m
319CONFIG_IP_NF_MANGLE=m 337CONFIG_IP_NF_MANGLE=m
320CONFIG_IP_NF_TARGET_TOS=m 338CONFIG_IP_NF_TARGET_TOS=m
321CONFIG_IP_NF_TARGET_ECN=m 339CONFIG_IP_NF_TARGET_ECN=m
322CONFIG_IP_NF_TARGET_DSCP=m
323CONFIG_IP_NF_TARGET_TTL=m 340CONFIG_IP_NF_TARGET_TTL=m
324CONFIG_IP_NF_TARGET_CLUSTERIP=m 341CONFIG_IP_NF_TARGET_CLUSTERIP=m
325CONFIG_IP_NF_RAW=m 342CONFIG_IP_NF_RAW=m
@@ -351,7 +368,6 @@ CONFIG_LLC=y
351# CONFIG_ATALK is not set 368# CONFIG_ATALK is not set
352# CONFIG_X25 is not set 369# CONFIG_X25 is not set
353# CONFIG_LAPB is not set 370# CONFIG_LAPB is not set
354# CONFIG_NET_DIVERT is not set
355# CONFIG_ECONET is not set 371# CONFIG_ECONET is not set
356# CONFIG_WAN_ROUTER is not set 372# CONFIG_WAN_ROUTER is not set
357 373
@@ -433,6 +449,7 @@ CONFIG_BLK_DEV_INITRD=y
433# 449#
434# CONFIG_RAID_ATTRS is not set 450# CONFIG_RAID_ATTRS is not set
435CONFIG_SCSI=y 451CONFIG_SCSI=y
452CONFIG_SCSI_NETLINK=y
436CONFIG_SCSI_PROC_FS=y 453CONFIG_SCSI_PROC_FS=y
437 454
438# 455#
@@ -454,12 +471,14 @@ CONFIG_SCSI_CONSTANTS=y
454# CONFIG_SCSI_LOGGING is not set 471# CONFIG_SCSI_LOGGING is not set
455 472
456# 473#
457# SCSI Transport Attributes 474# SCSI Transports
458# 475#
459CONFIG_SCSI_SPI_ATTRS=y 476CONFIG_SCSI_SPI_ATTRS=y
460CONFIG_SCSI_FC_ATTRS=y 477CONFIG_SCSI_FC_ATTRS=y
461# CONFIG_SCSI_ISCSI_ATTRS is not set 478# CONFIG_SCSI_ISCSI_ATTRS is not set
462# CONFIG_SCSI_SAS_ATTRS is not set 479CONFIG_SCSI_SAS_ATTRS=m
480CONFIG_SCSI_SAS_LIBSAS=m
481CONFIG_SCSI_SAS_LIBSAS_DEBUG=y
463 482
464# 483#
465# SCSI low-level drivers 484# SCSI low-level drivers
@@ -472,10 +491,11 @@ CONFIG_SCSI_FC_ATTRS=y
472# CONFIG_SCSI_AIC7XXX is not set 491# CONFIG_SCSI_AIC7XXX is not set
473# CONFIG_SCSI_AIC7XXX_OLD is not set 492# CONFIG_SCSI_AIC7XXX_OLD is not set
474# CONFIG_SCSI_AIC79XX is not set 493# CONFIG_SCSI_AIC79XX is not set
494# CONFIG_SCSI_AIC94XX is not set
495# CONFIG_SCSI_ARCMSR is not set
475# CONFIG_MEGARAID_NEWGEN is not set 496# CONFIG_MEGARAID_NEWGEN is not set
476# CONFIG_MEGARAID_LEGACY is not set 497# CONFIG_MEGARAID_LEGACY is not set
477# CONFIG_MEGARAID_SAS is not set 498# CONFIG_MEGARAID_SAS is not set
478# CONFIG_ATA is not set
479# CONFIG_SCSI_HPTIOP is not set 499# CONFIG_SCSI_HPTIOP is not set
480# CONFIG_SCSI_BUSLOGIC is not set 500# CONFIG_SCSI_BUSLOGIC is not set
481# CONFIG_SCSI_DMX3191D is not set 501# CONFIG_SCSI_DMX3191D is not set
@@ -486,16 +506,22 @@ CONFIG_SCSI_FC_ATTRS=y
486CONFIG_SCSI_IBMVSCSI=m 506CONFIG_SCSI_IBMVSCSI=m
487# CONFIG_SCSI_INITIO is not set 507# CONFIG_SCSI_INITIO is not set
488# CONFIG_SCSI_INIA100 is not set 508# CONFIG_SCSI_INIA100 is not set
509# CONFIG_SCSI_STEX is not set
489# CONFIG_SCSI_SYM53C8XX_2 is not set 510# CONFIG_SCSI_SYM53C8XX_2 is not set
490# CONFIG_SCSI_IPR is not set
491# CONFIG_SCSI_QLOGIC_1280 is not set 511# CONFIG_SCSI_QLOGIC_1280 is not set
492# CONFIG_SCSI_QLA_FC is not set 512# CONFIG_SCSI_QLA_FC is not set
513# CONFIG_SCSI_QLA_ISCSI is not set
493# CONFIG_SCSI_LPFC is not set 514# CONFIG_SCSI_LPFC is not set
494# CONFIG_SCSI_DC395x is not set 515# CONFIG_SCSI_DC395x is not set
495# CONFIG_SCSI_DC390T is not set 516# CONFIG_SCSI_DC390T is not set
496# CONFIG_SCSI_DEBUG is not set 517# CONFIG_SCSI_DEBUG is not set
497 518
498# 519#
520# Serial ATA (prod) and Parallel ATA (experimental) drivers
521#
522# CONFIG_ATA is not set
523
524#
499# Multi-device support (RAID and LVM) 525# Multi-device support (RAID and LVM)
500# 526#
501CONFIG_MD=y 527CONFIG_MD=y
@@ -508,6 +534,7 @@ CONFIG_MD_RAID10=m
508CONFIG_MD_MULTIPATH=m 534CONFIG_MD_MULTIPATH=m
509CONFIG_MD_FAULTY=m 535CONFIG_MD_FAULTY=m
510CONFIG_BLK_DEV_DM=y 536CONFIG_BLK_DEV_DM=y
537# CONFIG_DM_DEBUG is not set
511CONFIG_DM_CRYPT=m 538CONFIG_DM_CRYPT=m
512CONFIG_DM_SNAPSHOT=m 539CONFIG_DM_SNAPSHOT=m
513CONFIG_DM_MIRROR=m 540CONFIG_DM_MIRROR=m
@@ -573,6 +600,7 @@ CONFIG_MII=y
573# CONFIG_HP100 is not set 600# CONFIG_HP100 is not set
574CONFIG_NET_PCI=y 601CONFIG_NET_PCI=y
575CONFIG_PCNET32=y 602CONFIG_PCNET32=y
603CONFIG_PCNET32_NAPI=y
576# CONFIG_AMD8111_ETH is not set 604# CONFIG_AMD8111_ETH is not set
577# CONFIG_ADAPTEC_STARFIRE is not set 605# CONFIG_ADAPTEC_STARFIRE is not set
578# CONFIG_B44 is not set 606# CONFIG_B44 is not set
@@ -610,6 +638,7 @@ CONFIG_E1000=m
610# CONFIG_VIA_VELOCITY is not set 638# CONFIG_VIA_VELOCITY is not set
611# CONFIG_TIGON3 is not set 639# CONFIG_TIGON3 is not set
612# CONFIG_BNX2 is not set 640# CONFIG_BNX2 is not set
641# CONFIG_QLA3XXX is not set
613 642
614# 643#
615# Ethernet (10000 Mbit) 644# Ethernet (10000 Mbit)
@@ -649,6 +678,7 @@ CONFIG_PPP_BSDCOMP=m
649# CONFIG_PPP_MPPE is not set 678# CONFIG_PPP_MPPE is not set
650CONFIG_PPPOE=m 679CONFIG_PPPOE=m
651# CONFIG_SLIP is not set 680# CONFIG_SLIP is not set
681CONFIG_SLHC=m
652# CONFIG_NET_FC is not set 682# CONFIG_NET_FC is not set
653# CONFIG_SHAPER is not set 683# CONFIG_SHAPER is not set
654CONFIG_NETCONSOLE=y 684CONFIG_NETCONSOLE=y
@@ -671,6 +701,7 @@ CONFIG_NET_POLL_CONTROLLER=y
671# Input device support 701# Input device support
672# 702#
673CONFIG_INPUT=y 703CONFIG_INPUT=y
704# CONFIG_INPUT_FF_MEMLESS is not set
674 705
675# 706#
676# Userland interfaces 707# Userland interfaces
@@ -774,12 +805,12 @@ CONFIG_MAX_RAW_DEVS=256
774# 805#
775# Misc devices 806# Misc devices
776# 807#
808# CONFIG_TIFM_CORE is not set
777 809
778# 810#
779# Multimedia devices 811# Multimedia devices
780# 812#
781# CONFIG_VIDEO_DEV is not set 813# CONFIG_VIDEO_DEV is not set
782CONFIG_VIDEO_V4L2=y
783 814
784# 815#
785# Digital Video Broadcasting Devices 816# Digital Video Broadcasting Devices
@@ -893,6 +924,9 @@ CONFIG_XFS_FS=m
893CONFIG_XFS_SECURITY=y 924CONFIG_XFS_SECURITY=y
894CONFIG_XFS_POSIX_ACL=y 925CONFIG_XFS_POSIX_ACL=y
895# CONFIG_XFS_RT is not set 926# CONFIG_XFS_RT is not set
927CONFIG_GFS2_FS=m
928CONFIG_GFS2_FS_LOCKING_NOLOCK=m
929CONFIG_GFS2_FS_LOCKING_DLM=m
896# CONFIG_OCFS2_FS is not set 930# CONFIG_OCFS2_FS is not set
897# CONFIG_MINIX_FS is not set 931# CONFIG_MINIX_FS is not set
898# CONFIG_ROMFS_FS is not set 932# CONFIG_ROMFS_FS is not set
@@ -929,12 +963,14 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
929# 963#
930CONFIG_PROC_FS=y 964CONFIG_PROC_FS=y
931CONFIG_PROC_KCORE=y 965CONFIG_PROC_KCORE=y
966CONFIG_PROC_SYSCTL=y
932CONFIG_SYSFS=y 967CONFIG_SYSFS=y
933CONFIG_TMPFS=y 968CONFIG_TMPFS=y
969CONFIG_TMPFS_POSIX_ACL=y
934# CONFIG_HUGETLBFS is not set 970# CONFIG_HUGETLBFS is not set
935# CONFIG_HUGETLB_PAGE is not set 971# CONFIG_HUGETLB_PAGE is not set
936CONFIG_RAMFS=y 972CONFIG_RAMFS=y
937# CONFIG_CONFIGFS_FS is not set 973CONFIG_CONFIGFS_FS=m
938 974
939# 975#
940# Miscellaneous filesystems 976# Miscellaneous filesystems
@@ -988,6 +1024,7 @@ CONFIG_CIFS_POSIX=y
988# CONFIG_CODA_FS is not set 1024# CONFIG_CODA_FS is not set
989# CONFIG_AFS_FS is not set 1025# CONFIG_AFS_FS is not set
990# CONFIG_9P_FS is not set 1026# CONFIG_9P_FS is not set
1027CONFIG_GENERIC_ACL=y
991 1028
992# 1029#
993# Partition Types 1030# Partition Types
@@ -1040,6 +1077,12 @@ CONFIG_NLS_ISO8859_1=y
1040# CONFIG_NLS_UTF8 is not set 1077# CONFIG_NLS_UTF8 is not set
1041 1078
1042# 1079#
1080# Distributed Lock Manager
1081#
1082CONFIG_DLM=m
1083# CONFIG_DLM_DEBUG is not set
1084
1085#
1043# iSeries device drivers 1086# iSeries device drivers
1044# 1087#
1045CONFIG_VIOCONS=y 1088CONFIG_VIOCONS=y
@@ -1073,6 +1116,7 @@ CONFIG_PLIST=y
1073# Kernel hacking 1116# Kernel hacking
1074# 1117#
1075# CONFIG_PRINTK_TIME is not set 1118# CONFIG_PRINTK_TIME is not set
1119CONFIG_ENABLE_MUST_CHECK=y
1076CONFIG_MAGIC_SYSRQ=y 1120CONFIG_MAGIC_SYSRQ=y
1077# CONFIG_UNUSED_SYMBOLS is not set 1121# CONFIG_UNUSED_SYMBOLS is not set
1078CONFIG_DEBUG_KERNEL=y 1122CONFIG_DEBUG_KERNEL=y
@@ -1091,6 +1135,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
1091# CONFIG_DEBUG_INFO is not set 1135# CONFIG_DEBUG_INFO is not set
1092CONFIG_DEBUG_FS=y 1136CONFIG_DEBUG_FS=y
1093# CONFIG_DEBUG_VM is not set 1137# CONFIG_DEBUG_VM is not set
1138# CONFIG_DEBUG_LIST is not set
1094# CONFIG_FORCED_INLINING is not set 1139# CONFIG_FORCED_INLINING is not set
1095# CONFIG_RCU_TORTURE_TEST is not set 1140# CONFIG_RCU_TORTURE_TEST is not set
1096CONFIG_DEBUG_STACKOVERFLOW=y 1141CONFIG_DEBUG_STACKOVERFLOW=y
@@ -1109,6 +1154,10 @@ CONFIG_IRQSTACKS=y
1109# Cryptographic options 1154# Cryptographic options
1110# 1155#
1111CONFIG_CRYPTO=y 1156CONFIG_CRYPTO=y
1157CONFIG_CRYPTO_ALGAPI=y
1158CONFIG_CRYPTO_BLKCIPHER=m
1159CONFIG_CRYPTO_HASH=y
1160CONFIG_CRYPTO_MANAGER=m
1112CONFIG_CRYPTO_HMAC=y 1161CONFIG_CRYPTO_HMAC=y
1113CONFIG_CRYPTO_NULL=m 1162CONFIG_CRYPTO_NULL=m
1114CONFIG_CRYPTO_MD4=m 1163CONFIG_CRYPTO_MD4=m
@@ -1118,9 +1167,12 @@ CONFIG_CRYPTO_SHA256=m
1118CONFIG_CRYPTO_SHA512=m 1167CONFIG_CRYPTO_SHA512=m
1119CONFIG_CRYPTO_WP512=m 1168CONFIG_CRYPTO_WP512=m
1120CONFIG_CRYPTO_TGR192=m 1169CONFIG_CRYPTO_TGR192=m
1170CONFIG_CRYPTO_ECB=m
1171CONFIG_CRYPTO_CBC=m
1121CONFIG_CRYPTO_DES=y 1172CONFIG_CRYPTO_DES=y
1122CONFIG_CRYPTO_BLOWFISH=m 1173CONFIG_CRYPTO_BLOWFISH=m
1123CONFIG_CRYPTO_TWOFISH=m 1174CONFIG_CRYPTO_TWOFISH=m
1175CONFIG_CRYPTO_TWOFISH_COMMON=m
1124CONFIG_CRYPTO_SERPENT=m 1176CONFIG_CRYPTO_SERPENT=m
1125CONFIG_CRYPTO_AES=m 1177CONFIG_CRYPTO_AES=m
1126CONFIG_CRYPTO_CAST5=m 1178CONFIG_CRYPTO_CAST5=m
diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
index 62ba66091a13..ae96a5b2f00d 100644
--- a/arch/powerpc/configs/maple_defconfig
+++ b/arch/powerpc/configs/maple_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-rc6 3# Linux kernel version: 2.6.18
4# Sun Sep 10 10:24:55 2006 4# Mon Oct 9 11:59:34 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -22,6 +22,7 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
22CONFIG_PPC_OF=y 22CONFIG_PPC_OF=y
23CONFIG_PPC_UDBG_16550=y 23CONFIG_PPC_UDBG_16550=y
24CONFIG_GENERIC_TBSYNC=y 24CONFIG_GENERIC_TBSYNC=y
25CONFIG_AUDIT_ARCH=y
25# CONFIG_DEFAULT_UIMAGE is not set 26# CONFIG_DEFAULT_UIMAGE is not set
26 27
27# 28#
@@ -34,7 +35,7 @@ CONFIG_PPC_FPU=y
34CONFIG_PPC_STD_MMU=y 35CONFIG_PPC_STD_MMU=y
35CONFIG_VIRT_CPU_ACCOUNTING=y 36CONFIG_VIRT_CPU_ACCOUNTING=y
36CONFIG_SMP=y 37CONFIG_SMP=y
37CONFIG_NR_CPUS=2 38CONFIG_NR_CPUS=4
38CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 39CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
39 40
40# 41#
@@ -51,10 +52,11 @@ CONFIG_LOCALVERSION=""
51CONFIG_LOCALVERSION_AUTO=y 52CONFIG_LOCALVERSION_AUTO=y
52CONFIG_SWAP=y 53CONFIG_SWAP=y
53CONFIG_SYSVIPC=y 54CONFIG_SYSVIPC=y
55# CONFIG_IPC_NS is not set
54CONFIG_POSIX_MQUEUE=y 56CONFIG_POSIX_MQUEUE=y
55# CONFIG_BSD_PROCESS_ACCT is not set 57# CONFIG_BSD_PROCESS_ACCT is not set
56# CONFIG_TASKSTATS is not set 58# CONFIG_TASKSTATS is not set
57CONFIG_SYSCTL=y 59# CONFIG_UTS_NS is not set
58# CONFIG_AUDIT is not set 60# CONFIG_AUDIT is not set
59CONFIG_IKCONFIG=y 61CONFIG_IKCONFIG=y
60CONFIG_IKCONFIG_PROC=y 62CONFIG_IKCONFIG_PROC=y
@@ -62,7 +64,9 @@ CONFIG_IKCONFIG_PROC=y
62# CONFIG_RELAY is not set 64# CONFIG_RELAY is not set
63CONFIG_INITRAMFS_SOURCE="" 65CONFIG_INITRAMFS_SOURCE=""
64CONFIG_CC_OPTIMIZE_FOR_SIZE=y 66CONFIG_CC_OPTIMIZE_FOR_SIZE=y
67CONFIG_SYSCTL=y
65# CONFIG_EMBEDDED is not set 68# CONFIG_EMBEDDED is not set
69# CONFIG_SYSCTL_SYSCALL is not set
66CONFIG_KALLSYMS=y 70CONFIG_KALLSYMS=y
67CONFIG_KALLSYMS_ALL=y 71CONFIG_KALLSYMS_ALL=y
68# CONFIG_KALLSYMS_EXTRA_PASS is not set 72# CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -71,12 +75,12 @@ CONFIG_PRINTK=y
71CONFIG_BUG=y 75CONFIG_BUG=y
72CONFIG_ELF_CORE=y 76CONFIG_ELF_CORE=y
73CONFIG_BASE_FULL=y 77CONFIG_BASE_FULL=y
74CONFIG_RT_MUTEXES=y
75CONFIG_FUTEX=y 78CONFIG_FUTEX=y
76CONFIG_EPOLL=y 79CONFIG_EPOLL=y
77CONFIG_SHMEM=y 80CONFIG_SHMEM=y
78CONFIG_SLAB=y 81CONFIG_SLAB=y
79CONFIG_VM_EVENT_COUNTERS=y 82CONFIG_VM_EVENT_COUNTERS=y
83CONFIG_RT_MUTEXES=y
80# CONFIG_TINY_SHMEM is not set 84# CONFIG_TINY_SHMEM is not set
81CONFIG_BASE_SMALL=0 85CONFIG_BASE_SMALL=0
82# CONFIG_SLOB is not set 86# CONFIG_SLOB is not set
@@ -95,6 +99,7 @@ CONFIG_STOP_MACHINE=y
95# 99#
96# Block layer 100# Block layer
97# 101#
102CONFIG_BLOCK=y
98# CONFIG_BLK_DEV_IO_TRACE is not set 103# CONFIG_BLK_DEV_IO_TRACE is not set
99 104
100# 105#
@@ -114,16 +119,16 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
114# Platform support 119# Platform support
115# 120#
116CONFIG_PPC_MULTIPLATFORM=y 121CONFIG_PPC_MULTIPLATFORM=y
117# CONFIG_PPC_ISERIES is not set
118# CONFIG_EMBEDDED6xx is not set 122# CONFIG_EMBEDDED6xx is not set
119# CONFIG_APUS is not set 123# CONFIG_APUS is not set
120# CONFIG_PPC_PSERIES is not set 124# CONFIG_PPC_PSERIES is not set
125# CONFIG_PPC_ISERIES is not set
121# CONFIG_PPC_PMAC is not set 126# CONFIG_PPC_PMAC is not set
122CONFIG_PPC_MAPLE=y 127CONFIG_PPC_MAPLE=y
128# CONFIG_PPC_PASEMI is not set
123# CONFIG_PPC_CELL is not set 129# CONFIG_PPC_CELL is not set
124# CONFIG_PPC_CELL_NATIVE is not set 130# CONFIG_PPC_CELL_NATIVE is not set
125# CONFIG_PPC_IBM_CELL_BLADE is not set 131# CONFIG_PPC_IBM_CELL_BLADE is not set
126# CONFIG_UDBG_RTAS_CONSOLE is not set
127CONFIG_U3_DART=y 132CONFIG_U3_DART=y
128# CONFIG_PPC_RTAS is not set 133# CONFIG_PPC_RTAS is not set
129# CONFIG_MMIO_NVRAM is not set 134# CONFIG_MMIO_NVRAM is not set
@@ -157,6 +162,7 @@ CONFIG_IRQ_ALL_CPUS=y
157CONFIG_ARCH_SELECT_MEMORY_MODEL=y 162CONFIG_ARCH_SELECT_MEMORY_MODEL=y
158CONFIG_ARCH_FLATMEM_ENABLE=y 163CONFIG_ARCH_FLATMEM_ENABLE=y
159CONFIG_ARCH_SPARSEMEM_ENABLE=y 164CONFIG_ARCH_SPARSEMEM_ENABLE=y
165CONFIG_ARCH_POPULATES_NODE_MAP=y
160CONFIG_SELECT_MEMORY_MODEL=y 166CONFIG_SELECT_MEMORY_MODEL=y
161CONFIG_FLATMEM_MANUAL=y 167CONFIG_FLATMEM_MANUAL=y
162# CONFIG_DISCONTIGMEM_MANUAL is not set 168# CONFIG_DISCONTIGMEM_MANUAL is not set
@@ -184,6 +190,7 @@ CONFIG_GENERIC_ISA_DMA=y
184CONFIG_PCI=y 190CONFIG_PCI=y
185CONFIG_PCI_DOMAINS=y 191CONFIG_PCI_DOMAINS=y
186# CONFIG_PCIEPORTBUS is not set 192# CONFIG_PCIEPORTBUS is not set
193# CONFIG_PCI_MULTITHREAD_PROBE is not set
187# CONFIG_PCI_DEBUG is not set 194# CONFIG_PCI_DEBUG is not set
188 195
189# 196#
@@ -211,6 +218,7 @@ CONFIG_PACKET_MMAP=y
211CONFIG_UNIX=y 218CONFIG_UNIX=y
212CONFIG_XFRM=y 219CONFIG_XFRM=y
213CONFIG_XFRM_USER=m 220CONFIG_XFRM_USER=m
221# CONFIG_XFRM_SUB_POLICY is not set
214# CONFIG_NET_KEY is not set 222# CONFIG_NET_KEY is not set
215CONFIG_INET=y 223CONFIG_INET=y
216CONFIG_IP_MULTICAST=y 224CONFIG_IP_MULTICAST=y
@@ -232,10 +240,12 @@ CONFIG_IP_PNP_DHCP=y
232# CONFIG_INET_TUNNEL is not set 240# CONFIG_INET_TUNNEL is not set
233CONFIG_INET_XFRM_MODE_TRANSPORT=y 241CONFIG_INET_XFRM_MODE_TRANSPORT=y
234CONFIG_INET_XFRM_MODE_TUNNEL=y 242CONFIG_INET_XFRM_MODE_TUNNEL=y
243CONFIG_INET_XFRM_MODE_BEET=y
235CONFIG_INET_DIAG=y 244CONFIG_INET_DIAG=y
236CONFIG_INET_TCP_DIAG=y 245CONFIG_INET_TCP_DIAG=y
237# CONFIG_TCP_CONG_ADVANCED is not set 246# CONFIG_TCP_CONG_ADVANCED is not set
238CONFIG_TCP_CONG_BIC=y 247CONFIG_TCP_CONG_CUBIC=y
248CONFIG_DEFAULT_TCP_CONG="cubic"
239# CONFIG_IPV6 is not set 249# CONFIG_IPV6 is not set
240# CONFIG_INET6_XFRM_TUNNEL is not set 250# CONFIG_INET6_XFRM_TUNNEL is not set
241# CONFIG_INET6_TUNNEL is not set 251# CONFIG_INET6_TUNNEL is not set
@@ -265,7 +275,6 @@ CONFIG_TCP_CONG_BIC=y
265# CONFIG_ATALK is not set 275# CONFIG_ATALK is not set
266# CONFIG_X25 is not set 276# CONFIG_X25 is not set
267# CONFIG_LAPB is not set 277# CONFIG_LAPB is not set
268# CONFIG_NET_DIVERT is not set
269# CONFIG_ECONET is not set 278# CONFIG_ECONET is not set
270# CONFIG_WAN_ROUTER is not set 279# CONFIG_WAN_ROUTER is not set
271 280
@@ -377,6 +386,7 @@ CONFIG_BLK_DEV_AMD74XX=y
377# CONFIG_BLK_DEV_CS5530 is not set 386# CONFIG_BLK_DEV_CS5530 is not set
378# CONFIG_BLK_DEV_HPT34X is not set 387# CONFIG_BLK_DEV_HPT34X is not set
379# CONFIG_BLK_DEV_HPT366 is not set 388# CONFIG_BLK_DEV_HPT366 is not set
389# CONFIG_BLK_DEV_JMICRON is not set
380# CONFIG_BLK_DEV_SC1200 is not set 390# CONFIG_BLK_DEV_SC1200 is not set
381# CONFIG_BLK_DEV_PIIX is not set 391# CONFIG_BLK_DEV_PIIX is not set
382# CONFIG_BLK_DEV_IT821X is not set 392# CONFIG_BLK_DEV_IT821X is not set
@@ -399,6 +409,12 @@ CONFIG_IDEDMA_AUTO=y
399# 409#
400# CONFIG_RAID_ATTRS is not set 410# CONFIG_RAID_ATTRS is not set
401# CONFIG_SCSI is not set 411# CONFIG_SCSI is not set
412# CONFIG_SCSI_NETLINK is not set
413
414#
415# Serial ATA (prod) and Parallel ATA (experimental) drivers
416#
417# CONFIG_ATA is not set
402 418
403# 419#
404# Multi-device support (RAID and LVM) 420# Multi-device support (RAID and LVM)
@@ -498,7 +514,7 @@ CONFIG_E1000=y
498# CONFIG_VIA_VELOCITY is not set 514# CONFIG_VIA_VELOCITY is not set
499CONFIG_TIGON3=y 515CONFIG_TIGON3=y
500# CONFIG_BNX2 is not set 516# CONFIG_BNX2 is not set
501# CONFIG_MV643XX_ETH is not set 517# CONFIG_QLA3XXX is not set
502 518
503# 519#
504# Ethernet (10000 Mbit) 520# Ethernet (10000 Mbit)
@@ -545,6 +561,7 @@ CONFIG_TIGON3=y
545# Input device support 561# Input device support
546# 562#
547CONFIG_INPUT=y 563CONFIG_INPUT=y
564# CONFIG_INPUT_FF_MEMLESS is not set
548 565
549# 566#
550# Userland interfaces 567# Userland interfaces
@@ -704,6 +721,7 @@ CONFIG_I2C_AMD8111=y
704# 721#
705# Misc devices 722# Misc devices
706# 723#
724# CONFIG_TIFM_CORE is not set
707 725
708# 726#
709# Multimedia devices 727# Multimedia devices
@@ -779,7 +797,6 @@ CONFIG_USB_UHCI_HCD=y
779# 797#
780# may also be needed; see USB_STORAGE Help for more information 798# may also be needed; see USB_STORAGE Help for more information
781# 799#
782# CONFIG_USB_STORAGE is not set
783# CONFIG_USB_LIBUSUAL is not set 800# CONFIG_USB_LIBUSUAL is not set
784 801
785# 802#
@@ -802,6 +819,7 @@ CONFIG_USB_HIDINPUT=y
802# CONFIG_USB_ATI_REMOTE2 is not set 819# CONFIG_USB_ATI_REMOTE2 is not set
803# CONFIG_USB_KEYSPAN_REMOTE is not set 820# CONFIG_USB_KEYSPAN_REMOTE is not set
804# CONFIG_USB_APPLETOUCH is not set 821# CONFIG_USB_APPLETOUCH is not set
822# CONFIG_USB_TRANCEVIBRATOR is not set
805 823
806# 824#
807# USB Imaging devices 825# USB Imaging devices
@@ -828,6 +846,7 @@ CONFIG_USB_MON=y
828CONFIG_USB_SERIAL=y 846CONFIG_USB_SERIAL=y
829# CONFIG_USB_SERIAL_CONSOLE is not set 847# CONFIG_USB_SERIAL_CONSOLE is not set
830CONFIG_USB_SERIAL_GENERIC=y 848CONFIG_USB_SERIAL_GENERIC=y
849# CONFIG_USB_SERIAL_AIRCABLE is not set
831# CONFIG_USB_SERIAL_AIRPRIME is not set 850# CONFIG_USB_SERIAL_AIRPRIME is not set
832# CONFIG_USB_SERIAL_ARK3116 is not set 851# CONFIG_USB_SERIAL_ARK3116 is not set
833# CONFIG_USB_SERIAL_BELKIN is not set 852# CONFIG_USB_SERIAL_BELKIN is not set
@@ -862,6 +881,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
862# CONFIG_USB_SERIAL_KLSI is not set 881# CONFIG_USB_SERIAL_KLSI is not set
863# CONFIG_USB_SERIAL_KOBIL_SCT is not set 882# CONFIG_USB_SERIAL_KOBIL_SCT is not set
864# CONFIG_USB_SERIAL_MCT_U232 is not set 883# CONFIG_USB_SERIAL_MCT_U232 is not set
884# CONFIG_USB_SERIAL_MOS7840 is not set
865# CONFIG_USB_SERIAL_NAVMAN is not set 885# CONFIG_USB_SERIAL_NAVMAN is not set
866# CONFIG_USB_SERIAL_PL2303 is not set 886# CONFIG_USB_SERIAL_PL2303 is not set
867# CONFIG_USB_SERIAL_HP4X is not set 887# CONFIG_USB_SERIAL_HP4X is not set
@@ -879,6 +899,7 @@ CONFIG_USB_EZUSB=y
879# 899#
880# CONFIG_USB_EMI62 is not set 900# CONFIG_USB_EMI62 is not set
881# CONFIG_USB_EMI26 is not set 901# CONFIG_USB_EMI26 is not set
902# CONFIG_USB_ADUTUX is not set
882# CONFIG_USB_AUERSWALD is not set 903# CONFIG_USB_AUERSWALD is not set
883# CONFIG_USB_RIO500 is not set 904# CONFIG_USB_RIO500 is not set
884# CONFIG_USB_LEGOTOWER is not set 905# CONFIG_USB_LEGOTOWER is not set
@@ -886,9 +907,9 @@ CONFIG_USB_EZUSB=y
886# CONFIG_USB_LED is not set 907# CONFIG_USB_LED is not set
887# CONFIG_USB_CYPRESS_CY7C63 is not set 908# CONFIG_USB_CYPRESS_CY7C63 is not set
888# CONFIG_USB_CYTHERM is not set 909# CONFIG_USB_CYTHERM is not set
889# CONFIG_USB_PHIDGETKIT is not set 910# CONFIG_USB_PHIDGET is not set
890# CONFIG_USB_PHIDGETSERVO is not set
891# CONFIG_USB_IDMOUSE is not set 911# CONFIG_USB_IDMOUSE is not set
912# CONFIG_USB_FTDI_ELAN is not set
892# CONFIG_USB_APPLEDISPLAY is not set 913# CONFIG_USB_APPLEDISPLAY is not set
893# CONFIG_USB_SISUSBVGA is not set 914# CONFIG_USB_SISUSBVGA is not set
894# CONFIG_USB_LD is not set 915# CONFIG_USB_LD is not set
@@ -995,8 +1016,10 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
995# 1016#
996CONFIG_PROC_FS=y 1017CONFIG_PROC_FS=y
997CONFIG_PROC_KCORE=y 1018CONFIG_PROC_KCORE=y
1019CONFIG_PROC_SYSCTL=y
998CONFIG_SYSFS=y 1020CONFIG_SYSFS=y
999CONFIG_TMPFS=y 1021CONFIG_TMPFS=y
1022# CONFIG_TMPFS_POSIX_ACL is not set
1000CONFIG_HUGETLBFS=y 1023CONFIG_HUGETLBFS=y
1001CONFIG_HUGETLB_PAGE=y 1024CONFIG_HUGETLB_PAGE=y
1002CONFIG_RAMFS=y 1025CONFIG_RAMFS=y
@@ -1129,6 +1152,7 @@ CONFIG_PLIST=y
1129# Kernel hacking 1152# Kernel hacking
1130# 1153#
1131# CONFIG_PRINTK_TIME is not set 1154# CONFIG_PRINTK_TIME is not set
1155CONFIG_ENABLE_MUST_CHECK=y
1132CONFIG_MAGIC_SYSRQ=y 1156CONFIG_MAGIC_SYSRQ=y
1133# CONFIG_UNUSED_SYMBOLS is not set 1157# CONFIG_UNUSED_SYMBOLS is not set
1134CONFIG_DEBUG_KERNEL=y 1158CONFIG_DEBUG_KERNEL=y
@@ -1148,6 +1172,7 @@ CONFIG_DEBUG_SPINLOCK_SLEEP=y
1148# CONFIG_DEBUG_INFO is not set 1172# CONFIG_DEBUG_INFO is not set
1149CONFIG_DEBUG_FS=y 1173CONFIG_DEBUG_FS=y
1150# CONFIG_DEBUG_VM is not set 1174# CONFIG_DEBUG_VM is not set
1175# CONFIG_DEBUG_LIST is not set
1151# CONFIG_FORCED_INLINING is not set 1176# CONFIG_FORCED_INLINING is not set
1152# CONFIG_RCU_TORTURE_TEST is not set 1177# CONFIG_RCU_TORTURE_TEST is not set
1153CONFIG_DEBUG_STACKOVERFLOW=y 1178CONFIG_DEBUG_STACKOVERFLOW=y
@@ -1169,6 +1194,9 @@ CONFIG_BOOTX_TEXT=y
1169# Cryptographic options 1194# Cryptographic options
1170# 1195#
1171CONFIG_CRYPTO=y 1196CONFIG_CRYPTO=y
1197CONFIG_CRYPTO_ALGAPI=y
1198CONFIG_CRYPTO_BLKCIPHER=m
1199CONFIG_CRYPTO_MANAGER=m
1172# CONFIG_CRYPTO_HMAC is not set 1200# CONFIG_CRYPTO_HMAC is not set
1173# CONFIG_CRYPTO_NULL is not set 1201# CONFIG_CRYPTO_NULL is not set
1174# CONFIG_CRYPTO_MD4 is not set 1202# CONFIG_CRYPTO_MD4 is not set
@@ -1178,6 +1206,8 @@ CONFIG_CRYPTO_MD5=y
1178# CONFIG_CRYPTO_SHA512 is not set 1206# CONFIG_CRYPTO_SHA512 is not set
1179# CONFIG_CRYPTO_WP512 is not set 1207# CONFIG_CRYPTO_WP512 is not set
1180# CONFIG_CRYPTO_TGR192 is not set 1208# CONFIG_CRYPTO_TGR192 is not set
1209CONFIG_CRYPTO_ECB=m
1210CONFIG_CRYPTO_CBC=m
1181CONFIG_CRYPTO_DES=y 1211CONFIG_CRYPTO_DES=y
1182# CONFIG_CRYPTO_BLOWFISH is not set 1212# CONFIG_CRYPTO_BLOWFISH is not set
1183# CONFIG_CRYPTO_TWOFISH is not set 1213# CONFIG_CRYPTO_TWOFISH is not set
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index 44175fb7adec..9828663652e9 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_defconfig
@@ -506,7 +506,7 @@ CONFIG_SCSI_SAS_ATTRS=m
506# CONFIG_MEGARAID_NEWGEN is not set 506# CONFIG_MEGARAID_NEWGEN is not set
507# CONFIG_MEGARAID_LEGACY is not set 507# CONFIG_MEGARAID_LEGACY is not set
508# CONFIG_MEGARAID_SAS is not set 508# CONFIG_MEGARAID_SAS is not set
509# CONFIG_ATA is not set 509CONFIG_ATA=y
510# CONFIG_SCSI_HPTIOP is not set 510# CONFIG_SCSI_HPTIOP is not set
511# CONFIG_SCSI_BUSLOGIC is not set 511# CONFIG_SCSI_BUSLOGIC is not set
512# CONFIG_SCSI_DMX3191D is not set 512# CONFIG_SCSI_DMX3191D is not set
diff --git a/arch/powerpc/kernel/ibmebus.c b/arch/powerpc/kernel/ibmebus.c
index 124dbcba94a8..39db7a3affe1 100644
--- a/arch/powerpc/kernel/ibmebus.c
+++ b/arch/powerpc/kernel/ibmebus.c
@@ -319,7 +319,7 @@ EXPORT_SYMBOL(ibmebus_unregister_driver);
319 319
320int ibmebus_request_irq(struct ibmebus_dev *dev, 320int ibmebus_request_irq(struct ibmebus_dev *dev,
321 u32 ist, 321 u32 ist,
322 irqreturn_t (*handler)(int, void*, struct pt_regs *), 322 irq_handler_t handler,
323 unsigned long irq_flags, const char * devname, 323 unsigned long irq_flags, const char * devname,
324 void *dev_id) 324 void *dev_id)
325{ 325{
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index ba0694071728..f88a2a675d90 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -75,7 +75,7 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl,
75 /* This allocator was derived from x86_64's bit string search */ 75 /* This allocator was derived from x86_64's bit string search */
76 76
77 /* Sanity check */ 77 /* Sanity check */
78 if (unlikely(npages) == 0) { 78 if (unlikely(npages == 0)) {
79 if (printk_ratelimit()) 79 if (printk_ratelimit())
80 WARN_ON(1); 80 WARN_ON(1);
81 return DMA_ERROR_CODE; 81 return DMA_ERROR_CODE;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 5deaab3090b4..5e37bf14ef2d 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -217,7 +217,7 @@ void do_IRQ(struct pt_regs *regs)
217 * The value -2 is for buggy hardware and means that this IRQ 217 * The value -2 is for buggy hardware and means that this IRQ
218 * has already been handled. -- Tom 218 * has already been handled. -- Tom
219 */ 219 */
220 irq = ppc_md.get_irq(regs); 220 irq = ppc_md.get_irq();
221 221
222 if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) { 222 if (irq != NO_IRQ && irq != NO_IRQ_IGNORE) {
223#ifdef CONFIG_IRQSTACKS 223#ifdef CONFIG_IRQSTACKS
@@ -572,8 +572,8 @@ unsigned int irq_create_mapping(struct irq_host *host,
572} 572}
573EXPORT_SYMBOL_GPL(irq_create_mapping); 573EXPORT_SYMBOL_GPL(irq_create_mapping);
574 574
575extern unsigned int irq_create_of_mapping(struct device_node *controller, 575unsigned int irq_create_of_mapping(struct device_node *controller,
576 u32 *intspec, unsigned int intsize) 576 u32 *intspec, unsigned int intsize)
577{ 577{
578 struct irq_host *host; 578 struct irq_host *host;
579 irq_hw_number_t hwirq; 579 irq_hw_number_t hwirq;
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index eb913f80bfb1..865b9648d0d5 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -724,7 +724,7 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
724 strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE)); 724 strlcpy(cmd_line, p, min((int)l, COMMAND_LINE_SIZE));
725 725
726#ifdef CONFIG_CMDLINE 726#ifdef CONFIG_CMDLINE
727 if (l == 0 || (l == 1 && (*p) == 0)) 727 if (p == NULL || l == 0 || (l == 1 && (*p) == 0))
728 strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE); 728 strlcpy(cmd_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
729#endif /* CONFIG_CMDLINE */ 729#endif /* CONFIG_CMDLINE */
730 730
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index d210d0a5006b..5b59bc18dfe7 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -706,7 +706,7 @@ void timer_interrupt(struct pt_regs * regs)
706 706
707#ifdef CONFIG_PPC_ISERIES 707#ifdef CONFIG_PPC_ISERIES
708 if (hvlpevent_is_pending()) 708 if (hvlpevent_is_pending())
709 process_hvlpevents(regs); 709 process_hvlpevents();
710#endif 710#endif
711 711
712#ifdef CONFIG_PPC64 712#ifdef CONFIG_PPC64
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 16fe027bbc12..d1c0758c5611 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -307,11 +307,12 @@ void __init paging_init(void)
307 top_of_ram, total_ram); 307 top_of_ram, total_ram);
308 printk(KERN_DEBUG "Memory hole size: %ldMB\n", 308 printk(KERN_DEBUG "Memory hole size: %ldMB\n",
309 (top_of_ram - total_ram) >> 20); 309 (top_of_ram - total_ram) >> 20);
310 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
310#ifdef CONFIG_HIGHMEM 311#ifdef CONFIG_HIGHMEM
311 max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT; 312 max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
312 max_zone_pfns[1] = top_of_ram >> PAGE_SHIFT; 313 max_zone_pfns[ZONE_HIGHMEM] = top_of_ram >> PAGE_SHIFT;
313#else 314#else
314 max_zone_pfns[0] = top_of_ram >> PAGE_SHIFT; 315 max_zone_pfns[ZONE_DMA] = top_of_ram >> PAGE_SHIFT;
315#endif 316#endif
316 free_area_init_nodes(max_zone_pfns); 317 free_area_init_nodes(max_zone_pfns);
317} 318}
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 43c272075e1a..9da01dc8cfd9 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -617,9 +617,9 @@ void __init do_init_bootmem(void)
617 617
618void __init paging_init(void) 618void __init paging_init(void)
619{ 619{
620 unsigned long max_zone_pfns[MAX_NR_ZONES] = { 620 unsigned long max_zone_pfns[MAX_NR_ZONES];
621 lmb_end_of_DRAM() >> PAGE_SHIFT 621 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
622 }; 622 max_zone_pfns[ZONE_DMA] = lmb_end_of_DRAM() >> PAGE_SHIFT;
623 free_area_init_nodes(max_zone_pfns); 623 free_area_init_nodes(max_zone_pfns);
624} 624}
625 625
diff --git a/arch/powerpc/platforms/82xx/mpc82xx.c b/arch/powerpc/platforms/82xx/mpc82xx.c
index 89d702de4863..0f5b30dc60da 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx.c
@@ -11,7 +11,6 @@
11 * option) any later version. 11 * option) any later version.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/stddef.h> 14#include <linux/stddef.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/powerpc/platforms/82xx/mpc82xx_ads.c b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
index 4276f087f26e..bb9acbb98176 100644
--- a/arch/powerpc/platforms/82xx/mpc82xx_ads.c
+++ b/arch/powerpc/platforms/82xx/mpc82xx_ads.c
@@ -12,8 +12,6 @@
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14 14
15
16#include <linux/config.h>
17#include <linux/stddef.h> 15#include <linux/stddef.h>
18#include <linux/kernel.h> 16#include <linux/kernel.h>
19#include <linux/init.h> 17#include <linux/init.h>
@@ -384,8 +382,7 @@ struct hw_interrupt_type m82xx_pci_ic = {
384}; 382};
385 383
386static void 384static void
387m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc, 385m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc)
388 struct pt_regs *regs)
389{ 386{
390 unsigned long stat, mask, pend; 387 unsigned long stat, mask, pend;
391 int bit; 388 int bit;
@@ -398,7 +395,7 @@ m82xx_pci_irq_demux(unsigned int irq, struct irq_desc *desc,
398 break; 395 break;
399 for (bit = 0; pend != 0; ++bit, pend <<= 1) { 396 for (bit = 0; pend != 0; ++bit, pend <<= 1) {
400 if (pend & 0x80000000) 397 if (pend & 0x80000000)
401 __do_IRQ(pci_int_base + bit, regs); 398 __do_IRQ(pci_int_base + bit);
402 } 399 }
403 } 400 }
404} 401}
diff --git a/arch/powerpc/platforms/82xx/pq2ads.h b/arch/powerpc/platforms/82xx/pq2ads.h
index a7348213508f..fb2f92bcd770 100644
--- a/arch/powerpc/platforms/82xx/pq2ads.h
+++ b/arch/powerpc/platforms/82xx/pq2ads.h
@@ -22,8 +22,6 @@
22#ifndef __MACH_ADS8260_DEFS 22#ifndef __MACH_ADS8260_DEFS
23#define __MACH_ADS8260_DEFS 23#define __MACH_ADS8260_DEFS
24 24
25#include <linux/config.h>
26
27#include <asm/ppcboot.h> 25#include <asm/ppcboot.h>
28 26
29/* For our show_cpuinfo hooks. */ 27/* For our show_cpuinfo hooks. */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 8af7126fc6b9..d3e669d69c73 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
@@ -66,12 +66,11 @@ mpc85xx_pcibios_fixup(void)
66 66
67#ifdef CONFIG_CPM2 67#ifdef CONFIG_CPM2
68 68
69static void cpm2_cascade(unsigned int irq, struct irq_desc *desc, 69static void cpm2_cascade(unsigned int irq, struct irq_desc *desc)
70 struct pt_regs *regs)
71{ 70{
72 int cascade_irq; 71 int cascade_irq;
73 72
74 while ((cascade_irq = cpm2_get_irq(regs)) >= 0) { 73 while ((cascade_irq = cpm2_get_irq()) >= 0) {
75 generic_handle_irq(cascade_irq); 74 generic_handle_irq(cascade_irq);
76 } 75 }
77 desc->chip->eoi(irq); 76 desc->chip->eoi(irq);
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_cds.c b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
index b92fc6976a47..953cd5dd3f54 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_cds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_cds.c
@@ -132,10 +132,9 @@ mpc85xx_cds_pcibios_fixup(void)
132 132
133#ifdef CONFIG_PPC_I8259 133#ifdef CONFIG_PPC_I8259
134#warning The i8259 PIC support is currently broken 134#warning The i8259 PIC support is currently broken
135static void mpc85xx_8259_cascade(unsigned int irq, struct 135static void mpc85xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
136 irq_desc *desc, struct pt_regs *regs)
137{ 136{
138 unsigned int cascade_irq = i8259_irq(regs); 137 unsigned int cascade_irq = i8259_irq();
139 138
140 if (cascade_irq != NO_IRQ) 139 if (cascade_irq != NO_IRQ)
141 generic_handle_irq(cascade_irq); 140 generic_handle_irq(cascade_irq);
@@ -150,8 +149,10 @@ void __init mpc85xx_cds_pic_init(void)
150 struct mpic *mpic; 149 struct mpic *mpic;
151 struct resource r; 150 struct resource r;
152 struct device_node *np = NULL; 151 struct device_node *np = NULL;
152#ifdef CONFIG_PPC_I8259
153 struct device_node *cascade_node = NULL; 153 struct device_node *cascade_node = NULL;
154 int cascade_irq; 154 int cascade_irq;
155#endif
155 156
156 np = of_find_node_by_type(np, "open-pic"); 157 np = of_find_node_by_type(np, "open-pic");
157 158
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
index 8218703babde..1a1c226ad4d9 100644
--- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
+++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
@@ -53,10 +53,9 @@ unsigned long pci_dram_offset = 0;
53 53
54 54
55#ifdef CONFIG_PCI 55#ifdef CONFIG_PCI
56static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc, 56static void mpc86xx_8259_cascade(unsigned int irq, struct irq_desc *desc)
57 struct pt_regs *regs)
58{ 57{
59 unsigned int cascade_irq = i8259_irq(regs); 58 unsigned int cascade_irq = i8259_irq();
60 if (cascade_irq != NO_IRQ) 59 if (cascade_irq != NO_IRQ)
61 generic_handle_irq(cascade_irq); 60 generic_handle_irq(cascade_irq);
62 desc->chip->eoi(irq); 61 desc->chip->eoi(irq);
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index f8768b096f02..a914c12b4060 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -98,8 +98,7 @@ static void iic_ioexc_eoi(unsigned int irq)
98{ 98{
99} 99}
100 100
101static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc, 101static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc)
102 struct pt_regs *regs)
103{ 102{
104 struct cbe_iic_regs __iomem *node_iic = (void __iomem *)desc->handler_data; 103 struct cbe_iic_regs __iomem *node_iic = (void __iomem *)desc->handler_data;
105 unsigned int base = (irq & 0xffffff00) | IIC_IRQ_TYPE_IOEXC; 104 unsigned int base = (irq & 0xffffff00) | IIC_IRQ_TYPE_IOEXC;
@@ -140,7 +139,7 @@ static struct irq_chip iic_ioexc_chip = {
140}; 139};
141 140
142/* Get an IRQ number from the pending state register of the IIC */ 141/* Get an IRQ number from the pending state register of the IIC */
143static unsigned int iic_get_irq(struct pt_regs *regs) 142static unsigned int iic_get_irq(void)
144{ 143{
145 struct cbe_iic_pending_bits pending; 144 struct cbe_iic_pending_bits pending;
146 struct iic *iic; 145 struct iic *iic;
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index ac5f12662dbb..ccfd0c4db874 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -147,7 +147,7 @@ static int __spu_trap_data_map(struct spu *spu, unsigned long ea, u64 dsisr)
147} 147}
148 148
149static irqreturn_t 149static irqreturn_t
150spu_irq_class_0(int irq, void *data, struct pt_regs *regs) 150spu_irq_class_0(int irq, void *data)
151{ 151{
152 struct spu *spu; 152 struct spu *spu;
153 153
@@ -186,7 +186,7 @@ spu_irq_class_0_bottom(struct spu *spu)
186EXPORT_SYMBOL_GPL(spu_irq_class_0_bottom); 186EXPORT_SYMBOL_GPL(spu_irq_class_0_bottom);
187 187
188static irqreturn_t 188static irqreturn_t
189spu_irq_class_1(int irq, void *data, struct pt_regs *regs) 189spu_irq_class_1(int irq, void *data)
190{ 190{
191 struct spu *spu; 191 struct spu *spu;
192 unsigned long stat, mask, dar, dsisr; 192 unsigned long stat, mask, dar, dsisr;
@@ -224,7 +224,7 @@ spu_irq_class_1(int irq, void *data, struct pt_regs *regs)
224EXPORT_SYMBOL_GPL(spu_irq_class_1_bottom); 224EXPORT_SYMBOL_GPL(spu_irq_class_1_bottom);
225 225
226static irqreturn_t 226static irqreturn_t
227spu_irq_class_2(int irq, void *data, struct pt_regs *regs) 227spu_irq_class_2(int irq, void *data)
228{ 228{
229 struct spu *spu; 229 struct spu *spu;
230 unsigned long stat; 230 unsigned long stat;
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 35cd7a5f6834..cae3d13229b9 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -70,7 +70,7 @@ unsigned long event_scan_interval;
70 * has to include <linux/interrupt.h> (to get irqreturn_t), which 70 * has to include <linux/interrupt.h> (to get irqreturn_t), which
71 * causes all sorts of problems. -- paulus 71 * causes all sorts of problems. -- paulus
72 */ 72 */
73extern irqreturn_t xmon_irq(int, void *, struct pt_regs *); 73extern irqreturn_t xmon_irq(int, void *);
74 74
75extern unsigned long loops_per_jiffy; 75extern unsigned long loops_per_jiffy;
76 76
@@ -335,10 +335,9 @@ chrp_event_scan(unsigned long unused)
335 jiffies + event_scan_interval); 335 jiffies + event_scan_interval);
336} 336}
337 337
338static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc, 338static void chrp_8259_cascade(unsigned int irq, struct irq_desc *desc)
339 struct pt_regs *regs)
340{ 339{
341 unsigned int cascade_irq = i8259_irq(regs); 340 unsigned int cascade_irq = i8259_irq();
342 if (cascade_irq != NO_IRQ) 341 if (cascade_irq != NO_IRQ)
343 generic_handle_irq(cascade_irq); 342 generic_handle_irq(cascade_irq);
344 desc->chip->eoi(irq); 343 desc->chip->eoi(irq);
diff --git a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
index cb6f084844f2..bdb475c65cba 100644
--- a/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
+++ b/arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c
@@ -61,8 +61,7 @@ pci_dram_offset = MPC7448_HPC2_PCI_MEM_OFFSET;
61extern int tsi108_setup_pci(struct device_node *dev); 61extern int tsi108_setup_pci(struct device_node *dev);
62extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val); 62extern void _nmask_and_or_msr(unsigned long nmask, unsigned long or_val);
63extern void tsi108_pci_int_init(void); 63extern void tsi108_pci_int_init(void);
64extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc, 64extern void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc);
65 struct pt_regs *regs);
66 65
67int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn) 66int mpc7448_hpc2_exclude_device(u_char bus, u_char devfn)
68{ 67{
@@ -200,7 +199,7 @@ static void __init mpc7448_hpc2_init_IRQ(void)
200 tsi_pic = of_find_node_by_type(NULL, "open-pic"); 199 tsi_pic = of_find_node_by_type(NULL, "open-pic");
201 if (tsi_pic) { 200 if (tsi_pic) {
202 unsigned int size; 201 unsigned int size;
203 void *prop = get_property(tsi_pic, "reg", &size); 202 const void *prop = get_property(tsi_pic, "reg", &size);
204 mpic_paddr = of_translate_address(tsi_pic, prop); 203 mpic_paddr = of_translate_address(tsi_pic, prop);
205 } 204 }
206 205
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c
index e32446877e78..5225abfafd9b 100644
--- a/arch/powerpc/platforms/iseries/irq.c
+++ b/arch/powerpc/platforms/iseries/irq.c
@@ -43,10 +43,7 @@
43#include "irq.h" 43#include "irq.h"
44#include "pci.h" 44#include "pci.h"
45#include "call_pci.h" 45#include "call_pci.h"
46 46#include "smp.h"
47#if defined(CONFIG_SMP)
48extern void iSeries_smp_message_recv(struct pt_regs *);
49#endif
50 47
51#ifdef CONFIG_PCI 48#ifdef CONFIG_PCI
52 49
@@ -88,7 +85,7 @@ static DEFINE_SPINLOCK(pending_irqs_lock);
88static int num_pending_irqs; 85static int num_pending_irqs;
89static int pending_irqs[NR_IRQS]; 86static int pending_irqs[NR_IRQS];
90 87
91static void int_received(struct pci_event *event, struct pt_regs *regs) 88static void int_received(struct pci_event *event)
92{ 89{
93 int irq; 90 int irq;
94 91
@@ -146,11 +143,11 @@ static void int_received(struct pci_event *event, struct pt_regs *regs)
146 } 143 }
147} 144}
148 145
149static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs) 146static void pci_event_handler(struct HvLpEvent *event)
150{ 147{
151 if (event && (event->xType == HvLpEvent_Type_PciIo)) { 148 if (event && (event->xType == HvLpEvent_Type_PciIo)) {
152 if (hvlpevent_is_int(event)) 149 if (hvlpevent_is_int(event))
153 int_received((struct pci_event *)event, regs); 150 int_received((struct pci_event *)event);
154 else 151 else
155 printk(KERN_ERR 152 printk(KERN_ERR
156 "pci_event_handler: unexpected ack received\n"); 153 "pci_event_handler: unexpected ack received\n");
@@ -308,18 +305,18 @@ int __init iSeries_allocate_IRQ(HvBusNumber bus,
308/* 305/*
309 * Get the next pending IRQ. 306 * Get the next pending IRQ.
310 */ 307 */
311unsigned int iSeries_get_irq(struct pt_regs *regs) 308unsigned int iSeries_get_irq(void)
312{ 309{
313 int irq = NO_IRQ_IGNORE; 310 int irq = NO_IRQ_IGNORE;
314 311
315#ifdef CONFIG_SMP 312#ifdef CONFIG_SMP
316 if (get_lppaca()->int_dword.fields.ipi_cnt) { 313 if (get_lppaca()->int_dword.fields.ipi_cnt) {
317 get_lppaca()->int_dword.fields.ipi_cnt = 0; 314 get_lppaca()->int_dword.fields.ipi_cnt = 0;
318 iSeries_smp_message_recv(regs); 315 iSeries_smp_message_recv();
319 } 316 }
320#endif /* CONFIG_SMP */ 317#endif /* CONFIG_SMP */
321 if (hvlpevent_is_pending()) 318 if (hvlpevent_is_pending())
322 process_hvlpevents(regs); 319 process_hvlpevents();
323 320
324#ifdef CONFIG_PCI 321#ifdef CONFIG_PCI
325 if (num_pending_irqs) { 322 if (num_pending_irqs) {
diff --git a/arch/powerpc/platforms/iseries/irq.h b/arch/powerpc/platforms/iseries/irq.h
index 1ee8985140e5..69f1b437fc7b 100644
--- a/arch/powerpc/platforms/iseries/irq.h
+++ b/arch/powerpc/platforms/iseries/irq.h
@@ -4,6 +4,6 @@
4extern void iSeries_init_IRQ(void); 4extern void iSeries_init_IRQ(void);
5extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, u32); 5extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, u32);
6extern void iSeries_activate_IRQs(void); 6extern void iSeries_activate_IRQs(void);
7extern unsigned int iSeries_get_irq(struct pt_regs *); 7extern unsigned int iSeries_get_irq(void);
8 8
9#endif /* _ISERIES_IRQ_H */ 9#endif /* _ISERIES_IRQ_H */
diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c
index 98c1c2440aad..e3e929e1b460 100644
--- a/arch/powerpc/platforms/iseries/lpevents.c
+++ b/arch/powerpc/platforms/iseries/lpevents.c
@@ -116,7 +116,7 @@ static void hvlpevent_clear_valid(struct HvLpEvent * event)
116 hvlpevent_invalidate(event); 116 hvlpevent_invalidate(event);
117} 117}
118 118
119void process_hvlpevents(struct pt_regs *regs) 119void process_hvlpevents(void)
120{ 120{
121 struct HvLpEvent * event; 121 struct HvLpEvent * event;
122 122
@@ -144,7 +144,7 @@ void process_hvlpevents(struct pt_regs *regs)
144 __get_cpu_var(hvlpevent_counts)[event->xType]++; 144 __get_cpu_var(hvlpevent_counts)[event->xType]++;
145 if (event->xType < HvLpEvent_Type_NumTypes && 145 if (event->xType < HvLpEvent_Type_NumTypes &&
146 lpEventHandler[event->xType]) 146 lpEventHandler[event->xType])
147 lpEventHandler[event->xType](event, regs); 147 lpEventHandler[event->xType](event);
148 else 148 else
149 printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType ); 149 printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType );
150 150
diff --git a/arch/powerpc/platforms/iseries/mf.c b/arch/powerpc/platforms/iseries/mf.c
index 1983b640bac1..b5737d68d6c4 100644
--- a/arch/powerpc/platforms/iseries/mf.c
+++ b/arch/powerpc/platforms/iseries/mf.c
@@ -513,7 +513,7 @@ static void handle_ack(struct io_mf_lp_event *event)
513 * parse it enough to know if it is an interrupt or an 513 * parse it enough to know if it is an interrupt or an
514 * acknowledge. 514 * acknowledge.
515 */ 515 */
516static void hv_handler(struct HvLpEvent *event, struct pt_regs *regs) 516static void hv_handler(struct HvLpEvent *event)
517{ 517{
518 if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) { 518 if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) {
519 if (hvlpevent_is_ack(event)) 519 if (hvlpevent_is_ack(event))
@@ -847,7 +847,7 @@ static int mf_get_boot_rtc(struct rtc_time *tm)
847 /* We need to poll here as we are not yet taking interrupts */ 847 /* We need to poll here as we are not yet taking interrupts */
848 while (rtc_data.busy) { 848 while (rtc_data.busy) {
849 if (hvlpevent_is_pending()) 849 if (hvlpevent_is_pending())
850 process_hvlpevents(NULL); 850 process_hvlpevents();
851 } 851 }
852 return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm); 852 return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
853} 853}
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c
index 2eb095edb472..aee5908df700 100644
--- a/arch/powerpc/platforms/iseries/smp.c
+++ b/arch/powerpc/platforms/iseries/smp.c
@@ -43,9 +43,11 @@
43#include <asm/cputable.h> 43#include <asm/cputable.h>
44#include <asm/system.h> 44#include <asm/system.h>
45 45
46#include "smp.h"
47
46static unsigned long iSeries_smp_message[NR_CPUS]; 48static unsigned long iSeries_smp_message[NR_CPUS];
47 49
48void iSeries_smp_message_recv(struct pt_regs *regs) 50void iSeries_smp_message_recv(void)
49{ 51{
50 int cpu = smp_processor_id(); 52 int cpu = smp_processor_id();
51 int msg; 53 int msg;
@@ -55,7 +57,7 @@ void iSeries_smp_message_recv(struct pt_regs *regs)
55 57
56 for (msg = 0; msg < 4; msg++) 58 for (msg = 0; msg < 4; msg++)
57 if (test_and_clear_bit(msg, &iSeries_smp_message[cpu])) 59 if (test_and_clear_bit(msg, &iSeries_smp_message[cpu]))
58 smp_message_recv(msg, regs); 60 smp_message_recv(msg);
59} 61}
60 62
61static inline void smp_iSeries_do_message(int cpu, int msg) 63static inline void smp_iSeries_do_message(int cpu, int msg)
diff --git a/arch/powerpc/platforms/iseries/smp.h b/arch/powerpc/platforms/iseries/smp.h
new file mode 100644
index 000000000000..d501f7de01e7
--- /dev/null
+++ b/arch/powerpc/platforms/iseries/smp.h
@@ -0,0 +1,6 @@
1#ifndef _PLATFORMS_ISERIES_SMP_H
2#define _PLATFORMS_ISERIES_SMP_H
3
4extern void iSeries_smp_message_recv(void);
5
6#endif /* _PLATFORMS_ISERIES_SMP_H */
diff --git a/arch/powerpc/platforms/iseries/viopath.c b/arch/powerpc/platforms/iseries/viopath.c
index 9baa4ee82592..04e07e5da0c1 100644
--- a/arch/powerpc/platforms/iseries/viopath.c
+++ b/arch/powerpc/platforms/iseries/viopath.c
@@ -378,7 +378,7 @@ void vio_set_hostlp(void)
378} 378}
379EXPORT_SYMBOL(vio_set_hostlp); 379EXPORT_SYMBOL(vio_set_hostlp);
380 380
381static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs) 381static void vio_handleEvent(struct HvLpEvent *event)
382{ 382{
383 HvLpIndex remoteLp; 383 HvLpIndex remoteLp;
384 int subtype = (event->xSubtype & VIOMAJOR_SUBTYPE_MASK) 384 int subtype = (event->xSubtype & VIOMAJOR_SUBTYPE_MASK)
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index 1b827618e05f..63b4d1bff359 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -8,7 +8,7 @@
8 * 2 of the License, or (at your option) any later version. 8 * 2 of the License, or (at your option) any later version.
9 */ 9 */
10 10
11#define DEBUG 11#undef DEBUG
12 12
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/pci.h> 14#include <linux/pci.h>
@@ -16,6 +16,7 @@
16#include <linux/string.h> 16#include <linux/string.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/bootmem.h> 18#include <linux/bootmem.h>
19#include <linux/irq.h>
19 20
20#include <asm/sections.h> 21#include <asm/sections.h>
21#include <asm/io.h> 22#include <asm/io.h>
@@ -33,7 +34,7 @@
33#define DBG(x...) 34#define DBG(x...)
34#endif 35#endif
35 36
36static struct pci_controller *u3_agp, *u3_ht; 37static struct pci_controller *u3_agp, *u3_ht, *u4_pcie;
37 38
38static int __init fixup_one_level_bus_range(struct device_node *node, int higher) 39static int __init fixup_one_level_bus_range(struct device_node *node, int higher)
39{ 40{
@@ -287,6 +288,114 @@ static struct pci_ops u3_ht_pci_ops =
287 u3_ht_write_config 288 u3_ht_write_config
288}; 289};
289 290
291static unsigned int u4_pcie_cfa0(unsigned int devfn, unsigned int off)
292{
293 return (1 << PCI_SLOT(devfn)) |
294 (PCI_FUNC(devfn) << 8) |
295 ((off >> 8) << 28) |
296 (off & 0xfcu);
297}
298
299static unsigned int u4_pcie_cfa1(unsigned int bus, unsigned int devfn,
300 unsigned int off)
301{
302 return (bus << 16) |
303 (devfn << 8) |
304 ((off >> 8) << 28) |
305 (off & 0xfcu) | 1u;
306}
307
308static volatile void __iomem *u4_pcie_cfg_access(struct pci_controller* hose,
309 u8 bus, u8 dev_fn, int offset)
310{
311 unsigned int caddr;
312
313 if (bus == hose->first_busno)
314 caddr = u4_pcie_cfa0(dev_fn, offset);
315 else
316 caddr = u4_pcie_cfa1(bus, dev_fn, offset);
317
318 /* Uninorth will return garbage if we don't read back the value ! */
319 do {
320 out_le32(hose->cfg_addr, caddr);
321 } while (in_le32(hose->cfg_addr) != caddr);
322
323 offset &= 0x03;
324 return hose->cfg_data + offset;
325}
326
327static int u4_pcie_read_config(struct pci_bus *bus, unsigned int devfn,
328 int offset, int len, u32 *val)
329{
330 struct pci_controller *hose;
331 volatile void __iomem *addr;
332
333 hose = pci_bus_to_host(bus);
334 if (hose == NULL)
335 return PCIBIOS_DEVICE_NOT_FOUND;
336 if (offset >= 0x1000)
337 return PCIBIOS_BAD_REGISTER_NUMBER;
338 addr = u4_pcie_cfg_access(hose, bus->number, devfn, offset);
339 if (!addr)
340 return PCIBIOS_DEVICE_NOT_FOUND;
341 /*
342 * Note: the caller has already checked that offset is
343 * suitably aligned and that len is 1, 2 or 4.
344 */
345 switch (len) {
346 case 1:
347 *val = in_8(addr);
348 break;
349 case 2:
350 *val = in_le16(addr);
351 break;
352 default:
353 *val = in_le32(addr);
354 break;
355 }
356 return PCIBIOS_SUCCESSFUL;
357}
358static int u4_pcie_write_config(struct pci_bus *bus, unsigned int devfn,
359 int offset, int len, u32 val)
360{
361 struct pci_controller *hose;
362 volatile void __iomem *addr;
363
364 hose = pci_bus_to_host(bus);
365 if (hose == NULL)
366 return PCIBIOS_DEVICE_NOT_FOUND;
367 if (offset >= 0x1000)
368 return PCIBIOS_BAD_REGISTER_NUMBER;
369 addr = u4_pcie_cfg_access(hose, bus->number, devfn, offset);
370 if (!addr)
371 return PCIBIOS_DEVICE_NOT_FOUND;
372 /*
373 * Note: the caller has already checked that offset is
374 * suitably aligned and that len is 1, 2 or 4.
375 */
376 switch (len) {
377 case 1:
378 out_8(addr, val);
379 (void) in_8(addr);
380 break;
381 case 2:
382 out_le16(addr, val);
383 (void) in_le16(addr);
384 break;
385 default:
386 out_le32(addr, val);
387 (void) in_le32(addr);
388 break;
389 }
390 return PCIBIOS_SUCCESSFUL;
391}
392
393static struct pci_ops u4_pcie_pci_ops =
394{
395 u4_pcie_read_config,
396 u4_pcie_write_config
397};
398
290static void __init setup_u3_agp(struct pci_controller* hose) 399static void __init setup_u3_agp(struct pci_controller* hose)
291{ 400{
292 /* On G5, we move AGP up to high bus number so we don't need 401 /* On G5, we move AGP up to high bus number so we don't need
@@ -307,6 +416,26 @@ static void __init setup_u3_agp(struct pci_controller* hose)
307 u3_agp = hose; 416 u3_agp = hose;
308} 417}
309 418
419static void __init setup_u4_pcie(struct pci_controller* hose)
420{
421 /* We currently only implement the "non-atomic" config space, to
422 * be optimised later.
423 */
424 hose->ops = &u4_pcie_pci_ops;
425 hose->cfg_addr = ioremap(0xf0000000 + 0x800000, 0x1000);
426 hose->cfg_data = ioremap(0xf0000000 + 0xc00000, 0x1000);
427
428 /* The bus contains a bridge from root -> device, we need to
429 * make it visible on bus 0 so that we pick the right type
430 * of config cycles. If we didn't, we would have to force all
431 * config cycles to be type 1. So we override the "bus-range"
432 * property here
433 */
434 hose->first_busno = 0x00;
435 hose->last_busno = 0xff;
436 u4_pcie = hose;
437}
438
310static void __init setup_u3_ht(struct pci_controller* hose) 439static void __init setup_u3_ht(struct pci_controller* hose)
311{ 440{
312 hose->ops = &u3_ht_pci_ops; 441 hose->ops = &u3_ht_pci_ops;
@@ -354,6 +483,10 @@ static int __init add_bridge(struct device_node *dev)
354 setup_u3_ht(hose); 483 setup_u3_ht(hose);
355 disp_name = "U3-HT"; 484 disp_name = "U3-HT";
356 primary = 1; 485 primary = 1;
486 } else if (device_is_compatible(dev, "u4-pcie")) {
487 setup_u4_pcie(hose);
488 disp_name = "U4-PCIE";
489 primary = 0;
357 } 490 }
358 printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n", 491 printk(KERN_INFO "Found %s PCI host bridge. Firmware bus number: %d->%d\n",
359 disp_name, hose->first_busno, hose->last_busno); 492 disp_name, hose->first_busno, hose->last_busno);
@@ -361,7 +494,6 @@ static int __init add_bridge(struct device_node *dev)
361 /* Interpret the "ranges" property */ 494 /* Interpret the "ranges" property */
362 /* This also maps the I/O region and sets isa_io/mem_base */ 495 /* This also maps the I/O region and sets isa_io/mem_base */
363 pci_process_bridge_OF_ranges(hose, dev, primary); 496 pci_process_bridge_OF_ranges(hose, dev, primary);
364 pci_setup_phb_io(hose, primary);
365 497
366 /* Fixup "bus-range" OF property */ 498 /* Fixup "bus-range" OF property */
367 fixup_bus_range(dev); 499 fixup_bus_range(dev);
@@ -376,8 +508,30 @@ void __init maple_pcibios_fixup(void)
376 508
377 DBG(" -> maple_pcibios_fixup\n"); 509 DBG(" -> maple_pcibios_fixup\n");
378 510
379 for_each_pci_dev(dev) 511 for_each_pci_dev(dev) {
512 /* Fixup IRQ for PCIe host */
513 if (u4_pcie != NULL && dev->bus->number == 0 &&
514 pci_bus_to_host(dev->bus) == u4_pcie) {
515 printk(KERN_DEBUG "Fixup U4 PCIe IRQ\n");
516 dev->irq = irq_create_mapping(NULL, 1);
517 if (dev->irq != NO_IRQ)
518 set_irq_type(dev->irq, IRQ_TYPE_LEVEL_LOW);
519 continue;
520 }
521
522 /* Hide AMD8111 IDE interrupt when in legacy mode so
523 * the driver calls pci_get_legacy_ide_irq()
524 */
525 if (dev->vendor == PCI_VENDOR_ID_AMD &&
526 dev->device == PCI_DEVICE_ID_AMD_8111_IDE &&
527 (dev->class & 5) != 5) {
528 dev->irq = NO_IRQ;
529 continue;
530 }
531
532 /* For all others, map the interrupt from the device-tree */
380 pci_read_irq_line(dev); 533 pci_read_irq_line(dev);
534 }
381 535
382 DBG(" <- maple_pcibios_fixup\n"); 536 DBG(" <- maple_pcibios_fixup\n");
383} 537}
@@ -388,8 +542,10 @@ static void __init maple_fixup_phb_resources(void)
388 542
389 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { 543 list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
390 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; 544 unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base;
545
391 hose->io_resource.start += offset; 546 hose->io_resource.start += offset;
392 hose->io_resource.end += offset; 547 hose->io_resource.end += offset;
548
393 printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n", 549 printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n",
394 hose->global_number, 550 hose->global_number,
395 (unsigned long long)hose->io_resource.start, 551 (unsigned long long)hose->io_resource.start,
@@ -431,6 +587,19 @@ void __init maple_pci_init(void)
431 if (ht && add_bridge(ht) != 0) 587 if (ht && add_bridge(ht) != 0)
432 of_node_put(ht); 588 of_node_put(ht);
433 589
590 /*
591 * We need to call pci_setup_phb_io for the HT bridge first
592 * so it gets the I/O port numbers starting at 0, and we
593 * need to call it for the AGP bridge after that so it gets
594 * small positive I/O port numbers.
595 */
596 if (u3_ht)
597 pci_setup_phb_io(u3_ht, 1);
598 if (u3_agp)
599 pci_setup_phb_io(u3_agp, 0);
600 if (u4_pcie)
601 pci_setup_phb_io(u4_pcie, 0);
602
434 /* Fixup the IO resources on our host bridges as the common code 603 /* Fixup the IO resources on our host bridges as the common code
435 * does it only for childs of the host bridges 604 * does it only for childs of the host bridges
436 */ 605 */
@@ -465,8 +634,11 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
465 return defirq; 634 return defirq;
466 635
467 np = pci_device_to_OF_node(pdev); 636 np = pci_device_to_OF_node(pdev);
468 if (np == NULL) 637 if (np == NULL) {
638 printk("Failed to locate OF node for IDE %s\n",
639 pci_name(pdev));
469 return defirq; 640 return defirq;
641 }
470 irq = irq_of_parse_and_map(np, channel & 0x1); 642 irq = irq_of_parse_and_map(np, channel & 0x1);
471 if (irq == NO_IRQ) { 643 if (irq == NO_IRQ) {
472 printk("Failed to map onboard IDE interrupt for channel %d\n", 644 printk("Failed to map onboard IDE interrupt for channel %d\n",
@@ -479,6 +651,9 @@ int maple_pci_get_legacy_ide_irq(struct pci_dev *pdev, int channel)
479/* XXX: To remove once all firmwares are ok */ 651/* XXX: To remove once all firmwares are ok */
480static void fixup_maple_ide(struct pci_dev* dev) 652static void fixup_maple_ide(struct pci_dev* dev)
481{ 653{
654 if (!machine_is(maple))
655 return;
656
482#if 0 /* Enable this to enable IDE port 0 */ 657#if 0 /* Enable this to enable IDE port 0 */
483 { 658 {
484 u8 v; 659 u8 v;
@@ -495,7 +670,7 @@ static void fixup_maple_ide(struct pci_dev* dev)
495 dev->resource[4].start = 0xcc00; 670 dev->resource[4].start = 0xcc00;
496 dev->resource[4].end = 0xcc10; 671 dev->resource[4].end = 0xcc10;
497#endif 672#endif
498#if 1 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */ 673#if 0 /* Enable this to fixup IDE sense/polarity of irqs in IO-APICs */
499 { 674 {
500 struct pci_dev *apicdev; 675 struct pci_dev *apicdev;
501 u32 v; 676 u32 v;
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c
index 4679c5230413..39020c1fa13d 100644
--- a/arch/powerpc/platforms/pasemi/pci.c
+++ b/arch/powerpc/platforms/pasemi/pci.c
@@ -35,17 +35,17 @@
35 35
36#define CONFIG_OFFSET_VALID(off) ((off) < 4096) 36#define CONFIG_OFFSET_VALID(off) ((off) < 4096)
37 37
38static unsigned long pa_pxp_cfg_addr(struct pci_controller *hose, 38static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose,
39 u8 bus, u8 devfn, int offset) 39 u8 bus, u8 devfn, int offset)
40{ 40{
41 return ((unsigned long)hose->cfg_data) + PA_PXP_CFA(bus, devfn, offset); 41 return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset);
42} 42}
43 43
44static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, 44static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
45 int offset, int len, u32 *val) 45 int offset, int len, u32 *val)
46{ 46{
47 struct pci_controller *hose; 47 struct pci_controller *hose;
48 unsigned long addr; 48 void volatile __iomem *addr;
49 49
50 hose = pci_bus_to_host(bus); 50 hose = pci_bus_to_host(bus);
51 if (!hose) 51 if (!hose)
@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
62 */ 62 */
63 switch (len) { 63 switch (len) {
64 case 1: 64 case 1:
65 *val = in_8((u8 *)addr); 65 *val = in_8(addr);
66 break; 66 break;
67 case 2: 67 case 2:
68 *val = in_le16((u16 *)addr); 68 *val = in_le16(addr);
69 break; 69 break;
70 default: 70 default:
71 *val = in_le32((u32 *)addr); 71 *val = in_le32(addr);
72 break; 72 break;
73 } 73 }
74 74
@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
79 int offset, int len, u32 val) 79 int offset, int len, u32 val)
80{ 80{
81 struct pci_controller *hose; 81 struct pci_controller *hose;
82 unsigned long addr; 82 void volatile __iomem *addr;
83 83
84 hose = pci_bus_to_host(bus); 84 hose = pci_bus_to_host(bus);
85 if (!hose) 85 if (!hose)
@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
96 */ 96 */
97 switch (len) { 97 switch (len) {
98 case 1: 98 case 1:
99 out_8((u8 *)addr, val); 99 out_8(addr, val);
100 (void) in_8((u8 *)addr); 100 (void) in_8(addr);
101 break; 101 break;
102 case 2: 102 case 2:
103 out_le16((u16 *)addr, val); 103 out_le16(addr, val);
104 (void) in_le16((u16 *)addr); 104 (void) in_le16(addr);
105 break; 105 break;
106 default: 106 default:
107 out_le32((u32 *)addr, val); 107 out_le32(addr, val);
108 (void) in_le32((u32 *)addr); 108 (void) in_le32(addr);
109 break; 109 break;
110 } 110 }
111 return PCIBIOS_SUCCESSFUL; 111 return PCIBIOS_SUCCESSFUL;
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 5da677835c00..39db12890214 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -42,7 +42,7 @@
42 * has to include <linux/interrupt.h> (to get irqreturn_t), which 42 * has to include <linux/interrupt.h> (to get irqreturn_t), which
43 * causes all sorts of problems. -- paulus 43 * causes all sorts of problems. -- paulus
44 */ 44 */
45extern irqreturn_t xmon_irq(int, void *, struct pt_regs *); 45extern irqreturn_t xmon_irq(int, void *);
46 46
47#ifdef CONFIG_PPC32 47#ifdef CONFIG_PPC32
48struct pmac_irq_hw { 48struct pmac_irq_hw {
@@ -210,7 +210,7 @@ static struct irq_chip pmac_pic = {
210 .retrigger = pmac_retrigger, 210 .retrigger = pmac_retrigger,
211}; 211};
212 212
213static irqreturn_t gatwick_action(int cpl, void *dev_id, struct pt_regs *regs) 213static irqreturn_t gatwick_action(int cpl, void *dev_id)
214{ 214{
215 unsigned long flags; 215 unsigned long flags;
216 int irq, bits; 216 int irq, bits;
@@ -235,18 +235,18 @@ static irqreturn_t gatwick_action(int cpl, void *dev_id, struct pt_regs *regs)
235 return rc; 235 return rc;
236} 236}
237 237
238static unsigned int pmac_pic_get_irq(struct pt_regs *regs) 238static unsigned int pmac_pic_get_irq(void)
239{ 239{
240 int irq; 240 int irq;
241 unsigned long bits = 0; 241 unsigned long bits = 0;
242 unsigned long flags; 242 unsigned long flags;
243 243
244#ifdef CONFIG_SMP 244#ifdef CONFIG_SMP
245 void psurge_smp_message_recv(struct pt_regs *); 245 void psurge_smp_message_recv(void);
246 246
247 /* IPI's are a hack on the powersurge -- Cort */ 247 /* IPI's are a hack on the powersurge -- Cort */
248 if ( smp_processor_id() != 0 ) { 248 if ( smp_processor_id() != 0 ) {
249 psurge_smp_message_recv(regs); 249 psurge_smp_message_recv();
250 return NO_IRQ_IGNORE; /* ignore, already handled */ 250 return NO_IRQ_IGNORE; /* ignore, already handled */
251 } 251 }
252#endif /* CONFIG_SMP */ 252#endif /* CONFIG_SMP */
@@ -444,7 +444,7 @@ static void pmac_u3_cascade(unsigned int irq, struct irq_desc *desc)
444{ 444{
445 struct mpic *mpic = desc->handler_data; 445 struct mpic *mpic = desc->handler_data;
446 446
447 unsigned int cascade_irq = mpic_get_one_irq(mpic, get_irq_regs()); 447 unsigned int cascade_irq = mpic_get_one_irq(mpic);
448 if (cascade_irq != NO_IRQ) 448 if (cascade_irq != NO_IRQ)
449 generic_handle_irq(cascade_irq); 449 generic_handle_irq(cascade_irq);
450 desc->chip->eoi(irq); 450 desc->chip->eoi(irq);
diff --git a/arch/powerpc/platforms/powermac/pic.h b/arch/powerpc/platforms/powermac/pic.h
index 664103dfeef9..c44c89f5e532 100644
--- a/arch/powerpc/platforms/powermac/pic.h
+++ b/arch/powerpc/platforms/powermac/pic.h
@@ -5,7 +5,7 @@
5 5
6extern struct hw_interrupt_type pmac_pic; 6extern struct hw_interrupt_type pmac_pic;
7 7
8void pmac_pic_init(void); 8extern void pmac_pic_init(void);
9int pmac_get_irq(struct pt_regs *regs); 9extern int pmac_get_irq(void);
10 10
11#endif /* __PPC_PLATFORMS_PMAC_PIC_H */ 11#endif /* __PPC_PLATFORMS_PMAC_PIC_H */
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 1949b657b092..eeb2ae5ffc58 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -160,7 +160,7 @@ static inline void psurge_clr_ipi(int cpu)
160 */ 160 */
161static unsigned long psurge_smp_message[NR_CPUS]; 161static unsigned long psurge_smp_message[NR_CPUS];
162 162
163void psurge_smp_message_recv(struct pt_regs *regs) 163void psurge_smp_message_recv(void)
164{ 164{
165 int cpu = smp_processor_id(); 165 int cpu = smp_processor_id();
166 int msg; 166 int msg;
@@ -174,12 +174,12 @@ void psurge_smp_message_recv(struct pt_regs *regs)
174 /* make sure there is a message there */ 174 /* make sure there is a message there */
175 for (msg = 0; msg < 4; msg++) 175 for (msg = 0; msg < 4; msg++)
176 if (test_and_clear_bit(msg, &psurge_smp_message[cpu])) 176 if (test_and_clear_bit(msg, &psurge_smp_message[cpu]))
177 smp_message_recv(msg, regs); 177 smp_message_recv(msg);
178} 178}
179 179
180irqreturn_t psurge_primary_intr(int irq, void *d, struct pt_regs *regs) 180irqreturn_t psurge_primary_intr(int irq, void *d)
181{ 181{
182 psurge_smp_message_recv(regs); 182 psurge_smp_message_recv();
183 return IRQ_HANDLED; 183 return IRQ_HANDLED;
184} 184}
185 185
@@ -328,6 +328,7 @@ static void __init smp_psurge_kick_cpu(int nr)
328{ 328{
329 unsigned long start = __pa(__secondary_start_pmac_0) + nr * 8; 329 unsigned long start = __pa(__secondary_start_pmac_0) + nr * 8;
330 unsigned long a; 330 unsigned long a;
331 int i;
331 332
332 /* may need to flush here if secondary bats aren't setup */ 333 /* may need to flush here if secondary bats aren't setup */
333 for (a = KERNELBASE; a < KERNELBASE + 0x800000; a += 32) 334 for (a = KERNELBASE; a < KERNELBASE + 0x800000; a += 32)
@@ -340,7 +341,11 @@ static void __init smp_psurge_kick_cpu(int nr)
340 mb(); 341 mb();
341 342
342 psurge_set_ipi(nr); 343 psurge_set_ipi(nr);
343 udelay(10); 344 /*
345 * We can't use udelay here because the timebase is now frozen.
346 */
347 for (i = 0; i < 2000; ++i)
348 barrier();
344 psurge_clr_ipi(nr); 349 psurge_clr_ipi(nr);
345 350
346 if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu - done", 0x354); 351 if (ppc_md.progress) ppc_md.progress("smp_psurge_kick_cpu - done", 0x354);
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index bbf2e34dc358..d24ba547e53f 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -267,7 +267,8 @@ static void iommu_table_setparms(struct pci_controller *phb,
267 struct iommu_table *tbl) 267 struct iommu_table *tbl)
268{ 268{
269 struct device_node *node; 269 struct device_node *node;
270 const unsigned long *basep, *sizep; 270 const unsigned long *basep;
271 const u32 *sizep;
271 272
272 node = (struct device_node *)phb->arch_data; 273 node = (struct device_node *)phb->arch_data;
273 274
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index ad9aec2c6fee..89a8119f988d 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -123,7 +123,7 @@ static void __init fwnmi_init(void)
123 123
124void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc) 124void pseries_8259_cascade(unsigned int irq, struct irq_desc *desc)
125{ 125{
126 unsigned int cascade_irq = i8259_irq(get_irq_regs()); 126 unsigned int cascade_irq = i8259_irq();
127 if (cascade_irq != NO_IRQ) 127 if (cascade_irq != NO_IRQ)
128 generic_handle_irq(cascade_irq); 128 generic_handle_irq(cascade_irq);
129 desc->chip->eoi(irq); 129 desc->chip->eoi(irq);
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index f6bd2f285153..d071abe78ab1 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -308,14 +308,14 @@ static inline unsigned int xics_remap_irq(unsigned int vec)
308 return NO_IRQ; 308 return NO_IRQ;
309} 309}
310 310
311static unsigned int xics_get_irq_direct(struct pt_regs *regs) 311static unsigned int xics_get_irq_direct(void)
312{ 312{
313 unsigned int cpu = smp_processor_id(); 313 unsigned int cpu = smp_processor_id();
314 314
315 return xics_remap_irq(direct_xirr_info_get(cpu)); 315 return xics_remap_irq(direct_xirr_info_get(cpu));
316} 316}
317 317
318static unsigned int xics_get_irq_lpar(struct pt_regs *regs) 318static unsigned int xics_get_irq_lpar(void)
319{ 319{
320 unsigned int cpu = smp_processor_id(); 320 unsigned int cpu = smp_processor_id();
321 321
diff --git a/arch/powerpc/sysdev/cpm2_pic.c b/arch/powerpc/sysdev/cpm2_pic.c
index 28b018994746..767ee6651adc 100644
--- a/arch/powerpc/sysdev/cpm2_pic.c
+++ b/arch/powerpc/sysdev/cpm2_pic.c
@@ -147,7 +147,7 @@ static struct irq_chip cpm2_pic = {
147 .end = cpm2_end_irq, 147 .end = cpm2_end_irq,
148}; 148};
149 149
150unsigned int cpm2_get_irq(struct pt_regs *regs) 150unsigned int cpm2_get_irq(void)
151{ 151{
152 int irq; 152 int irq;
153 unsigned long bits; 153 unsigned long bits;
diff --git a/arch/powerpc/sysdev/cpm2_pic.h b/arch/powerpc/sysdev/cpm2_pic.h
index 3c513e5a688e..2840616529e4 100644
--- a/arch/powerpc/sysdev/cpm2_pic.h
+++ b/arch/powerpc/sysdev/cpm2_pic.h
@@ -3,7 +3,7 @@
3 3
4extern intctl_cpm2_t *cpm2_intctl; 4extern intctl_cpm2_t *cpm2_intctl;
5 5
6extern unsigned int cpm2_get_irq(struct pt_regs *regs); 6extern unsigned int cpm2_get_irq(void);
7 7
8extern void cpm2_pic_init(struct device_node*); 8extern void cpm2_pic_init(struct device_node*);
9 9
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 7d759f1c26b1..dbe92ae20333 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -567,7 +567,7 @@ static int __init fs_enet_of_init(void)
567 struct resource r[4]; 567 struct resource r[4];
568 struct device_node *phy, *mdio; 568 struct device_node *phy, *mdio;
569 struct fs_platform_info fs_enet_data; 569 struct fs_platform_info fs_enet_data;
570 const unsigned int *id, *phy_addr, phy_irq; 570 const unsigned int *id, *phy_addr, *phy_irq;
571 const void *mac_addr; 571 const void *mac_addr;
572 const phandle *ph; 572 const phandle *ph;
573 const char *model; 573 const char *model;
@@ -641,7 +641,7 @@ static int __init fs_enet_of_init(void)
641 641
642 if (strstr(model, "FCC")) { 642 if (strstr(model, "FCC")) {
643 int fcc_index = *id - 1; 643 int fcc_index = *id - 1;
644 unsigned char* mdio_bb_prop; 644 const unsigned char *mdio_bb_prop;
645 645
646 fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0); 646 fs_enet_data.dpram_offset = (u32)cpm_dpram_addr(0);
647 fs_enet_data.rx_ring = 32; 647 fs_enet_data.rx_ring = 32;
@@ -708,8 +708,9 @@ static int __init fs_enet_of_init(void)
708 ret = platform_device_add_data(fs_enet_dev, &fs_enet_data, 708 ret = platform_device_add_data(fs_enet_dev, &fs_enet_data,
709 sizeof(struct 709 sizeof(struct
710 fs_platform_info)); 710 fs_platform_info));
711 if (ret) 711 if (ret)
712 goto unreg; 712 goto unreg;
713 }
713 } 714 }
714 return 0; 715 return 0;
715 716
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c
index 26a6a3becd66..0450265d73bb 100644
--- a/arch/powerpc/sysdev/i8259.c
+++ b/arch/powerpc/sysdev/i8259.c
@@ -34,7 +34,7 @@ static struct irq_host *i8259_host;
34 * which is called. It should be noted that polling is broken on some 34 * which is called. It should be noted that polling is broken on some
35 * IBM and Motorola PReP boxes so we must use the int-ack feature on them. 35 * IBM and Motorola PReP boxes so we must use the int-ack feature on them.
36 */ 36 */
37unsigned int i8259_irq(struct pt_regs *regs) 37unsigned int i8259_irq(void)
38{ 38{
39 int irq; 39 int irq;
40 int lock = 0; 40 int lock = 0;
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c
index 6ebdae8e6f69..bc4d4a7f9657 100644
--- a/arch/powerpc/sysdev/ipic.c
+++ b/arch/powerpc/sysdev/ipic.c
@@ -709,7 +709,7 @@ void ipic_clear_mcp_status(u32 mask)
709} 709}
710 710
711/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ 711/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
712unsigned int ipic_get_irq(struct pt_regs *regs) 712unsigned int ipic_get_irq(void)
713{ 713{
714 int irq; 714 int irq;
715 715
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 195215560fd7..ba4833f57d47 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1217,7 +1217,7 @@ void mpic_send_ipi(unsigned int ipi_no, unsigned int cpu_mask)
1217 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0])); 1217 mpic_physmask(cpu_mask & cpus_addr(cpu_online_map)[0]));
1218} 1218}
1219 1219
1220unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs) 1220unsigned int mpic_get_one_irq(struct mpic *mpic)
1221{ 1221{
1222 u32 src; 1222 u32 src;
1223 1223
@@ -1230,13 +1230,13 @@ unsigned int mpic_get_one_irq(struct mpic *mpic, struct pt_regs *regs)
1230 return irq_linear_revmap(mpic->irqhost, src); 1230 return irq_linear_revmap(mpic->irqhost, src);
1231} 1231}
1232 1232
1233unsigned int mpic_get_irq(struct pt_regs *regs) 1233unsigned int mpic_get_irq(void)
1234{ 1234{
1235 struct mpic *mpic = mpic_primary; 1235 struct mpic *mpic = mpic_primary;
1236 1236
1237 BUG_ON(mpic == NULL); 1237 BUG_ON(mpic == NULL);
1238 1238
1239 return mpic_get_one_irq(mpic, regs); 1239 return mpic_get_one_irq(mpic);
1240} 1240}
1241 1241
1242 1242
diff --git a/arch/powerpc/sysdev/qe_lib/qe_ic.c b/arch/powerpc/sysdev/qe_lib/qe_ic.c
index 0dec010bcbb5..6995f51b9488 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_ic.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_ic.c
@@ -300,7 +300,7 @@ static struct irq_host_ops qe_ic_host_ops = {
300}; 300};
301 301
302/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ 302/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
303unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic, struct pt_regs *regs) 303unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic)
304{ 304{
305 int irq; 305 int irq;
306 306
@@ -316,7 +316,7 @@ unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic, struct pt_regs *regs)
316} 316}
317 317
318/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */ 318/* Return an interrupt vector or NO_IRQ if no interrupt is pending. */
319unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic, struct pt_regs *regs) 319unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic)
320{ 320{
321 int irq; 321 int irq;
322 322
@@ -333,13 +333,12 @@ unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic, struct pt_regs *regs)
333 333
334/* FIXME: We mask all the QE Low interrupts while handling. We should 334/* FIXME: We mask all the QE Low interrupts while handling. We should
335 * let other interrupt come in, but BAD interrupts are generated */ 335 * let other interrupt come in, but BAD interrupts are generated */
336void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc, 336void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc)
337 struct pt_regs *regs)
338{ 337{
339 struct qe_ic *qe_ic = desc->handler_data; 338 struct qe_ic *qe_ic = desc->handler_data;
340 struct irq_chip *chip = irq_desc[irq].chip; 339 struct irq_chip *chip = irq_desc[irq].chip;
341 340
342 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic, regs); 341 unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
343 342
344 chip->mask_ack(irq); 343 chip->mask_ack(irq);
345 if (cascade_irq != NO_IRQ) 344 if (cascade_irq != NO_IRQ)
@@ -349,13 +348,12 @@ void fastcall qe_ic_cascade_low(unsigned int irq, struct irq_desc *desc,
349 348
350/* FIXME: We mask all the QE High interrupts while handling. We should 349/* FIXME: We mask all the QE High interrupts while handling. We should
351 * let other interrupt come in, but BAD interrupts are generated */ 350 * let other interrupt come in, but BAD interrupts are generated */
352void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc, 351void fastcall qe_ic_cascade_high(unsigned int irq, struct irq_desc *desc)
353 struct pt_regs *regs)
354{ 352{
355 struct qe_ic *qe_ic = desc->handler_data; 353 struct qe_ic *qe_ic = desc->handler_data;
356 struct irq_chip *chip = irq_desc[irq].chip; 354 struct irq_chip *chip = irq_desc[irq].chip;
357 355
358 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic, regs); 356 unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
359 357
360 chip->mask_ack(irq); 358 chip->mask_ack(irq);
361 if (cascade_irq != NO_IRQ) 359 if (cascade_irq != NO_IRQ)
diff --git a/arch/powerpc/sysdev/qe_lib/qe_io.c b/arch/powerpc/sysdev/qe_lib/qe_io.c
index aea435970389..0afe6bfe3714 100644
--- a/arch/powerpc/sysdev/qe_lib/qe_io.c
+++ b/arch/powerpc/sysdev/qe_lib/qe_io.c
@@ -14,7 +14,6 @@
14 * option) any later version. 14 * option) any later version.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/stddef.h> 17#include <linux/stddef.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/init.h> 19#include <linux/init.h>
diff --git a/arch/powerpc/sysdev/tsi108_pci.c b/arch/powerpc/sysdev/tsi108_pci.c
index 14f4a1ab6d18..322f86e93de5 100644
--- a/arch/powerpc/sysdev/tsi108_pci.c
+++ b/arch/powerpc/sysdev/tsi108_pci.c
@@ -405,8 +405,7 @@ void __init tsi108_pci_int_init(void)
405 init_pci_source(); 405 init_pci_source();
406} 406}
407 407
408void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc, 408void tsi108_irq_cascade(unsigned int irq, struct irq_desc *desc)
409 struct pt_regs *regs)
410{ 409{
411 unsigned int cascade_irq = get_pci_source(); 410 unsigned int cascade_irq = get_pci_source();
412 if (cascade_irq != NO_IRQ) 411 if (cascade_irq != NO_IRQ)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 5a854f36383c..f56ffef4defa 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -36,6 +36,7 @@
36#include <asm/rtas.h> 36#include <asm/rtas.h>
37#include <asm/sstep.h> 37#include <asm/sstep.h>
38#include <asm/bug.h> 38#include <asm/bug.h>
39#include <asm/irq_regs.h>
39 40
40#ifdef CONFIG_PPC64 41#ifdef CONFIG_PPC64
41#include <asm/hvcall.h> 42#include <asm/hvcall.h>
@@ -521,13 +522,12 @@ int xmon(struct pt_regs *excp)
521} 522}
522EXPORT_SYMBOL(xmon); 523EXPORT_SYMBOL(xmon);
523 524
524irqreturn_t 525irqreturn_t xmon_irq(int irq, void *d)
525xmon_irq(int irq, void *d, struct pt_regs *regs)
526{ 526{
527 unsigned long flags; 527 unsigned long flags;
528 local_irq_save(flags); 528 local_irq_save(flags);
529 printf("Keyboard interrupt\n"); 529 printf("Keyboard interrupt\n");
530 xmon(regs); 530 xmon(get_irq_regs());
531 local_irq_restore(flags); 531 local_irq_restore(flags);
532 return IRQ_HANDLED; 532 return IRQ_HANDLED;
533} 533}
diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c
index 87fe9a89dba7..e35483961b90 100644
--- a/arch/ppc/4xx_io/serial_sicc.c
+++ b/arch/ppc/4xx_io/serial_sicc.c
@@ -414,7 +414,7 @@ static void siccuart_event(struct SICC_info *info, int event)
414} 414}
415 415
416static void 416static void
417siccuart_rx_chars(struct SICC_info *info, struct pt_regs *regs) 417siccuart_rx_chars(struct SICC_info *info)
418{ 418{
419 struct tty_struct *tty = info->tty; 419 struct tty_struct *tty = info->tty;
420 unsigned int status, ch, rsr, flg, ignored = 0; 420 unsigned int status, ch, rsr, flg, ignored = 0;
@@ -441,7 +441,7 @@ siccuart_rx_chars(struct SICC_info *info, struct pt_regs *regs)
441#ifdef SUPPORT_SYSRQ 441#ifdef SUPPORT_SYSRQ
442 if (info->sysrq) { 442 if (info->sysrq) {
443 if (ch && time_before(jiffies, info->sysrq)) { 443 if (ch && time_before(jiffies, info->sysrq)) {
444 handle_sysrq(ch, regs, NULL); 444 handle_sysrq(ch, NULL);
445 info->sysrq = 0; 445 info->sysrq = 0;
446 goto ignore_char; 446 goto ignore_char;
447 } 447 }
@@ -553,15 +553,15 @@ static void siccuart_tx_chars(struct SICC_info *info)
553} 553}
554 554
555 555
556static irqreturn_t siccuart_int_rx(int irq, void *dev_id, struct pt_regs *regs) 556static irqreturn_t siccuart_int_rx(int irq, void *dev_id)
557{ 557{
558 struct SICC_info *info = dev_id; 558 struct SICC_info *info = dev_id;
559 siccuart_rx_chars(info, regs); 559 siccuart_rx_chars(info)
560 return IRQ_HANDLED; 560 return IRQ_HANDLED;
561} 561}
562 562
563 563
564static irqreturn_t siccuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) 564static irqreturn_t siccuart_int_tx(int irq, void *dev_id)
565{ 565{
566 struct SICC_info *info = dev_id; 566 struct SICC_info *info = dev_id;
567 siccuart_tx_chars(info); 567 siccuart_tx_chars(info);
diff --git a/arch/ppc/8260_io/enet.c b/arch/ppc/8260_io/enet.c
index ac6d55fe2235..a6056c29cf00 100644
--- a/arch/ppc/8260_io/enet.c
+++ b/arch/ppc/8260_io/enet.c
@@ -122,7 +122,7 @@ struct scc_enet_private {
122static int scc_enet_open(struct net_device *dev); 122static int scc_enet_open(struct net_device *dev);
123static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev); 123static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
124static int scc_enet_rx(struct net_device *dev); 124static int scc_enet_rx(struct net_device *dev);
125static irqreturn_t scc_enet_interrupt(int irq, void *dev_id, struct pt_regs *); 125static irqreturn_t scc_enet_interrupt(int irq, void *dev_id);
126static int scc_enet_close(struct net_device *dev); 126static int scc_enet_close(struct net_device *dev);
127static struct net_device_stats *scc_enet_get_stats(struct net_device *dev); 127static struct net_device_stats *scc_enet_get_stats(struct net_device *dev);
128static void set_multicast_list(struct net_device *dev); 128static void set_multicast_list(struct net_device *dev);
@@ -273,7 +273,7 @@ scc_enet_timeout(struct net_device *dev)
273 * This is called from the CPM handler, not the MPC core interrupt. 273 * This is called from the CPM handler, not the MPC core interrupt.
274 */ 274 */
275static irqreturn_t 275static irqreturn_t
276scc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) 276scc_enet_interrupt(int irq, void * dev_id)
277{ 277{
278 struct net_device *dev = dev_id; 278 struct net_device *dev = dev_id;
279 volatile struct scc_enet_private *cep; 279 volatile struct scc_enet_private *cep;
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
index e347fe88316d..2e1943e27819 100644
--- a/arch/ppc/8260_io/fcc_enet.c
+++ b/arch/ppc/8260_io/fcc_enet.c
@@ -140,7 +140,7 @@ typedef struct {
140static int fcc_enet_open(struct net_device *dev); 140static int fcc_enet_open(struct net_device *dev);
141static int fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev); 141static int fcc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
142static int fcc_enet_rx(struct net_device *dev); 142static int fcc_enet_rx(struct net_device *dev);
143static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id, struct pt_regs *); 143static irqreturn_t fcc_enet_interrupt(int irq, void *dev_id);
144static int fcc_enet_close(struct net_device *dev); 144static int fcc_enet_close(struct net_device *dev);
145static struct net_device_stats *fcc_enet_get_stats(struct net_device *dev); 145static struct net_device_stats *fcc_enet_get_stats(struct net_device *dev);
146/* static void set_multicast_list(struct net_device *dev); */ 146/* static void set_multicast_list(struct net_device *dev); */
@@ -524,7 +524,7 @@ fcc_enet_timeout(struct net_device *dev)
524 524
525/* The interrupt handler. */ 525/* The interrupt handler. */
526static irqreturn_t 526static irqreturn_t
527fcc_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) 527fcc_enet_interrupt(int irq, void * dev_id)
528{ 528{
529 struct net_device *dev = dev_id; 529 struct net_device *dev = dev_id;
530 volatile struct fcc_enet_private *cep; 530 volatile struct fcc_enet_private *cep;
@@ -1563,7 +1563,7 @@ mii_discover_phy(uint mii_reg, struct net_device *dev)
1563#ifdef PHY_INTERRUPT 1563#ifdef PHY_INTERRUPT
1564/* This interrupt occurs when the PHY detects a link change. */ 1564/* This interrupt occurs when the PHY detects a link change. */
1565static irqreturn_t 1565static irqreturn_t
1566mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) 1566mii_link_interrupt(int irq, void * dev_id)
1567{ 1567{
1568 struct net_device *dev = dev_id; 1568 struct net_device *dev = dev_id;
1569 struct fcc_enet_private *fep = dev->priv; 1569 struct fcc_enet_private *fep = dev->priv;
diff --git a/arch/ppc/8xx_io/commproc.c b/arch/ppc/8xx_io/commproc.c
index 9b3ace26280c..3b23bcb35b7a 100644
--- a/arch/ppc/8xx_io/commproc.c
+++ b/arch/ppc/8xx_io/commproc.c
@@ -47,12 +47,12 @@ cpm8xx_t *cpmp; /* Pointer to comm processor space */
47/* CPM interrupt vector functions. 47/* CPM interrupt vector functions.
48*/ 48*/
49struct cpm_action { 49struct cpm_action {
50 void (*handler)(void *, struct pt_regs * regs); 50 void (*handler)(void *);
51 void *dev_id; 51 void *dev_id;
52}; 52};
53static struct cpm_action cpm_vecs[CPMVEC_NR]; 53static struct cpm_action cpm_vecs[CPMVEC_NR];
54static irqreturn_t cpm_interrupt(int irq, void * dev, struct pt_regs * regs); 54static irqreturn_t cpm_interrupt(int irq, void * dev);
55static irqreturn_t cpm_error_interrupt(int irq, void *dev, struct pt_regs * regs); 55static irqreturn_t cpm_error_interrupt(int irq, void *dev);
56static void alloc_host_memory(void); 56static void alloc_host_memory(void);
57/* Define a table of names to identify CPM interrupt handlers in 57/* Define a table of names to identify CPM interrupt handlers in
58 * /proc/interrupts. 58 * /proc/interrupts.
@@ -205,7 +205,7 @@ cpm_interrupt_init(void)
205 * Get the CPM interrupt vector. 205 * Get the CPM interrupt vector.
206 */ 206 */
207int 207int
208cpm_get_irq(struct pt_regs *regs) 208cpm_get_irq(void)
209{ 209{
210 int cpm_vec; 210 int cpm_vec;
211 211
@@ -222,7 +222,7 @@ cpm_get_irq(struct pt_regs *regs)
222/* CPM interrupt controller cascade interrupt. 222/* CPM interrupt controller cascade interrupt.
223*/ 223*/
224static irqreturn_t 224static irqreturn_t
225cpm_interrupt(int irq, void * dev, struct pt_regs * regs) 225cpm_interrupt(int irq, void * dev)
226{ 226{
227 /* This interrupt handler never actually gets called. It is 227 /* This interrupt handler never actually gets called. It is
228 * installed only to unmask the CPM cascade interrupt in the SIU 228 * installed only to unmask the CPM cascade interrupt in the SIU
@@ -237,7 +237,7 @@ cpm_interrupt(int irq, void * dev, struct pt_regs * regs)
237 * tests in the interrupt handler. 237 * tests in the interrupt handler.
238 */ 238 */
239static irqreturn_t 239static irqreturn_t
240cpm_error_interrupt(int irq, void *dev, struct pt_regs *regs) 240cpm_error_interrupt(int irq, void *dev)
241{ 241{
242 return IRQ_HANDLED; 242 return IRQ_HANDLED;
243} 243}
@@ -246,11 +246,11 @@ cpm_error_interrupt(int irq, void *dev, struct pt_regs *regs)
246 * request_irq() to the handler prototype required by cpm_install_handler(). 246 * request_irq() to the handler prototype required by cpm_install_handler().
247 */ 247 */
248static irqreturn_t 248static irqreturn_t
249cpm_handler_helper(int irq, void *dev_id, struct pt_regs *regs) 249cpm_handler_helper(int irq, void *dev_id)
250{ 250{
251 int cpm_vec = irq - CPM_IRQ_OFFSET; 251 int cpm_vec = irq - CPM_IRQ_OFFSET;
252 252
253 (*cpm_vecs[cpm_vec].handler)(dev_id, regs); 253 (*cpm_vecs[cpm_vec].handler)(dev_id);
254 254
255 return IRQ_HANDLED; 255 return IRQ_HANDLED;
256} 256}
@@ -267,8 +267,7 @@ cpm_handler_helper(int irq, void *dev_id, struct pt_regs *regs)
267 * request_irq() or cpm_install_handler(). 267 * request_irq() or cpm_install_handler().
268 */ 268 */
269void 269void
270cpm_install_handler(int cpm_vec, void (*handler)(void *, struct pt_regs *regs), 270cpm_install_handler(int cpm_vec, void (*handler)(void *), void *dev_id)
271 void *dev_id)
272{ 271{
273 int err; 272 int err;
274 273
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c
index f5f300fc213d..959d31c26cbb 100644
--- a/arch/ppc/8xx_io/cs4218_tdm.c
+++ b/arch/ppc/8xx_io/cs4218_tdm.c
@@ -331,7 +331,7 @@ static int CS_SetFormat(int format);
331static int CS_SetVolume(int volume); 331static int CS_SetVolume(int volume);
332static void cs4218_tdm_tx_intr(void *devid); 332static void cs4218_tdm_tx_intr(void *devid);
333static void cs4218_tdm_rx_intr(void *devid); 333static void cs4218_tdm_rx_intr(void *devid);
334static void cs4218_intr(void *devid, struct pt_regs *regs); 334static void cs4218_intr(void *devid);
335static int cs_get_volume(uint reg); 335static int cs_get_volume(uint reg);
336static int cs_volume_setter(int volume, int mute); 336static int cs_volume_setter(int volume, int mute);
337static int cs_get_gain(uint reg); 337static int cs_get_gain(uint reg);
@@ -2646,7 +2646,7 @@ int __init tdm8xx_sound_init(void)
2646 * full duplex operation. 2646 * full duplex operation.
2647 */ 2647 */
2648static void 2648static void
2649cs4218_intr(void *dev_id, struct pt_regs *regs) 2649cs4218_intr(void *dev_id)
2650{ 2650{
2651 volatile smc_t *sp; 2651 volatile smc_t *sp;
2652 volatile cpm8xx_t *cp; 2652 volatile cpm8xx_t *cp;
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index a695375c3e4c..b23c45bc151a 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -149,7 +149,7 @@ struct scc_enet_private {
149static int scc_enet_open(struct net_device *dev); 149static int scc_enet_open(struct net_device *dev);
150static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev); 150static int scc_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
151static int scc_enet_rx(struct net_device *dev); 151static int scc_enet_rx(struct net_device *dev);
152static void scc_enet_interrupt(void *dev_id, struct pt_regs *regs); 152static void scc_enet_interrupt(void *dev_id);
153static int scc_enet_close(struct net_device *dev); 153static int scc_enet_close(struct net_device *dev);
154static struct net_device_stats *scc_enet_get_stats(struct net_device *dev); 154static struct net_device_stats *scc_enet_get_stats(struct net_device *dev);
155static void set_multicast_list(struct net_device *dev); 155static void set_multicast_list(struct net_device *dev);
@@ -305,7 +305,7 @@ scc_enet_timeout(struct net_device *dev)
305 * This is called from the CPM handler, not the MPC core interrupt. 305 * This is called from the CPM handler, not the MPC core interrupt.
306 */ 306 */
307static void 307static void
308scc_enet_interrupt(void *dev_id, struct pt_regs *regs) 308scc_enet_interrupt(void *dev_id)
309{ 309{
310 struct net_device *dev = dev_id; 310 struct net_device *dev = dev_id;
311 volatile struct scc_enet_private *cep; 311 volatile struct scc_enet_private *cep;
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index 8b6295bbb564..2f9fa9e3d331 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -198,8 +198,7 @@ static int fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev);
198#ifdef CONFIG_USE_MDIO 198#ifdef CONFIG_USE_MDIO
199static void fec_enet_mii(struct net_device *dev); 199static void fec_enet_mii(struct net_device *dev);
200#endif /* CONFIG_USE_MDIO */ 200#endif /* CONFIG_USE_MDIO */
201static irqreturn_t fec_enet_interrupt(int irq, void * dev_id, 201static irqreturn_t fec_enet_interrupt(int irq, void * dev_id);
202 struct pt_regs * regs);
203#ifdef CONFIG_FEC_PACKETHOOK 202#ifdef CONFIG_FEC_PACKETHOOK
204static void fec_enet_tx(struct net_device *dev, __u32 regval); 203static void fec_enet_tx(struct net_device *dev, __u32 regval);
205static void fec_enet_rx(struct net_device *dev, __u32 regval); 204static void fec_enet_rx(struct net_device *dev, __u32 regval);
@@ -472,7 +471,7 @@ fec_timeout(struct net_device *dev)
472 * This is called from the MPC core interrupt. 471 * This is called from the MPC core interrupt.
473 */ 472 */
474static irqreturn_t 473static irqreturn_t
475fec_enet_interrupt(int irq, void * dev_id, struct pt_regs * regs) 474fec_enet_interrupt(int irq, void * dev_id)
476{ 475{
477 struct net_device *dev = dev_id; 476 struct net_device *dev = dev_id;
478 volatile fec_t *fecp; 477 volatile fec_t *fecp;
@@ -1408,7 +1407,7 @@ static
1408#ifdef CONFIG_RPXCLASSIC 1407#ifdef CONFIG_RPXCLASSIC
1409void mii_link_interrupt(void *dev_id) 1408void mii_link_interrupt(void *dev_id)
1410#else 1409#else
1411irqreturn_t mii_link_interrupt(int irq, void * dev_id, struct pt_regs * regs) 1410irqreturn_t mii_link_interrupt(int irq, void * dev_id)
1412#endif 1411#endif
1413{ 1412{
1414#ifdef CONFIG_USE_MDIO 1413#ifdef CONFIG_USE_MDIO
diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c
index ca57e896a36c..96a55972b986 100644
--- a/arch/ppc/kernel/smp.c
+++ b/arch/ppc/kernel/smp.c
@@ -84,7 +84,7 @@ smp_message_pass(int target, int msg)
84/* 84/*
85 * Common functions 85 * Common functions
86 */ 86 */
87void smp_message_recv(int msg, struct pt_regs *regs) 87void smp_message_recv(int msg)
88{ 88{
89 atomic_inc(&ipi_recv); 89 atomic_inc(&ipi_recv);
90 90
@@ -100,7 +100,7 @@ void smp_message_recv(int msg, struct pt_regs *regs)
100 break; 100 break;
101#ifdef CONFIG_XMON 101#ifdef CONFIG_XMON
102 case PPC_MSG_XMON_BREAK: 102 case PPC_MSG_XMON_BREAK:
103 xmon(regs); 103 xmon(get_irq_regs());
104 break; 104 break;
105#endif /* CONFIG_XMON */ 105#endif /* CONFIG_XMON */
106 default: 106 default:
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
index 187388625a76..d4b2cf74da6a 100644
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -142,7 +142,7 @@ void timer_interrupt(struct pt_regs * regs)
142 while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) { 142 while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
143 jiffy_stamp += tb_ticks_per_jiffy; 143 jiffy_stamp += tb_ticks_per_jiffy;
144 144
145 profile_tick(CPU_PROFILING, regs); 145 profile_tick(CPU_PROFILING);
146 update_process_times(user_mode(regs)); 146 update_process_times(user_mode(regs));
147 147
148 if (smp_processor_id()) 148 if (smp_processor_id())
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
index 410200046af1..c374e53ae03a 100644
--- a/arch/ppc/mm/init.c
+++ b/arch/ppc/mm/init.c
@@ -374,11 +374,12 @@ void __init paging_init(void)
374 end_pfn = start_pfn + (total_memory >> PAGE_SHIFT); 374 end_pfn = start_pfn + (total_memory >> PAGE_SHIFT);
375 add_active_range(0, start_pfn, end_pfn); 375 add_active_range(0, start_pfn, end_pfn);
376 376
377 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
377#ifdef CONFIG_HIGHMEM 378#ifdef CONFIG_HIGHMEM
378 max_zone_pfns[0] = total_lowmem >> PAGE_SHIFT; 379 max_zone_pfns[ZONE_DMA] = total_lowmem >> PAGE_SHIFT;
379 max_zone_pfns[1] = total_memory >> PAGE_SHIFT; 380 max_zone_pfns[ZONE_HIGHMEM] = total_memory >> PAGE_SHIFT;
380#else 381#else
381 max_zone_pfns[0] = total_memory >> PAGE_SHIFT; 382 max_zone_pfns[ZONE_DMA] = total_memory >> PAGE_SHIFT;
382#endif /* CONFIG_HIGHMEM */ 383#endif /* CONFIG_HIGHMEM */
383 free_area_init_nodes(max_zone_pfns); 384 free_area_init_nodes(max_zone_pfns);
384} 385}
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c
index 94badafe4ef1..14ecec7bbed7 100644
--- a/arch/ppc/platforms/85xx/mpc8560_ads.c
+++ b/arch/ppc/platforms/85xx/mpc8560_ads.c
@@ -211,10 +211,10 @@ mpc8560ads_setup_arch(void)
211#endif 211#endif
212} 212}
213 213
214static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 214static irqreturn_t cpm2_cascade(int irq, void *dev_id)
215{ 215{
216 while ((irq = cpm2_get_irq(regs)) >= 0) 216 while ((irq = cpm2_get_irq()) >= 0)
217 __do_IRQ(irq, regs); 217 __do_IRQ(irq);
218 return IRQ_HANDLED; 218 return IRQ_HANDLED;
219} 219}
220 220
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
index 75204588a3e7..5ce0f69c1db6 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
@@ -127,10 +127,10 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m)
127} 127}
128 128
129#ifdef CONFIG_CPM2 129#ifdef CONFIG_CPM2
130static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 130static irqreturn_t cpm2_cascade(int irq, void *dev_id)
131{ 131{
132 while((irq = cpm2_get_irq(regs)) >= 0) 132 while((irq = cpm2_get_irq()) >= 0)
133 __do_IRQ(irq, regs); 133 __do_IRQ(irq);
134 return IRQ_HANDLED; 134 return IRQ_HANDLED;
135} 135}
136 136
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c
index 495aa79bb3a1..4bb18ab27672 100644
--- a/arch/ppc/platforms/85xx/stx_gp3.c
+++ b/arch/ppc/platforms/85xx/stx_gp3.c
@@ -156,10 +156,10 @@ gp3_setup_arch(void)
156 printk ("bi_immr_base = %8.8lx\n", binfo->bi_immr_base); 156 printk ("bi_immr_base = %8.8lx\n", binfo->bi_immr_base);
157} 157}
158 158
159static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 159static irqreturn_t cpm2_cascade(int irq, void *dev_id)
160{ 160{
161 while ((irq = cpm2_get_irq(regs)) >= 0) 161 while ((irq = cpm2_get_irq()) >= 0)
162 __do_IRQ(irq, regs); 162 __do_IRQ(irq);
163 163
164 return IRQ_HANDLED; 164 return IRQ_HANDLED;
165} 165}
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c
index 189ed4175f9f..dd45f2e18449 100644
--- a/arch/ppc/platforms/85xx/tqm85xx.c
+++ b/arch/ppc/platforms/85xx/tqm85xx.c
@@ -181,10 +181,10 @@ tqm85xx_setup_arch(void)
181} 181}
182 182
183#ifdef CONFIG_MPC8560 183#ifdef CONFIG_MPC8560
184static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs) 184static irqreturn_t cpm2_cascade(int irq, void *dev_id)
185{ 185{
186 while ((irq = cpm2_get_irq(regs)) >= 0) 186 while ((irq = cpm2_get_irq()) >= 0)
187 __do_IRQ(irq, regs); 187 __do_IRQ(irq);
188 return IRQ_HANDLED; 188 return IRQ_HANDLED;
189} 189}
190 190
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c
index 1d034ead2c9a..063274d2c503 100644
--- a/arch/ppc/platforms/apus_setup.c
+++ b/arch/ppc/platforms/apus_setup.c
@@ -492,7 +492,7 @@ apus_halt(void)
492 492
493static unsigned char last_ipl[8]; 493static unsigned char last_ipl[8];
494 494
495int apus_get_irq(struct pt_regs* regs) 495int apus_get_irq(void)
496{ 496{
497 unsigned char ipl_emu, mask; 497 unsigned char ipl_emu, mask;
498 unsigned int level; 498 unsigned int level;
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c
index e0f112a1fd0b..d809e17aa536 100644
--- a/arch/ppc/platforms/hdpu.c
+++ b/arch/ppc/platforms/hdpu.c
@@ -659,8 +659,7 @@ static void __init hdpu_map_io(void)
659char hdpu_smp0[] = "SMP Cpu #0"; 659char hdpu_smp0[] = "SMP Cpu #0";
660char hdpu_smp1[] = "SMP Cpu #1"; 660char hdpu_smp1[] = "SMP Cpu #1";
661 661
662static irqreturn_t hdpu_smp_cpu0_int_handler(int irq, void *dev_id, 662static irqreturn_t hdpu_smp_cpu0_int_handler(int irq, void *dev_id)
663 struct pt_regs *regs)
664{ 663{
665 volatile unsigned int doorbell; 664 volatile unsigned int doorbell;
666 665
@@ -670,22 +669,21 @@ static irqreturn_t hdpu_smp_cpu0_int_handler(int irq, void *dev_id,
670 mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, doorbell); 669 mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, doorbell);
671 670
672 if (doorbell & 1) { 671 if (doorbell & 1) {
673 smp_message_recv(0, regs); 672 smp_message_recv(0);
674 } 673 }
675 if (doorbell & 2) { 674 if (doorbell & 2) {
676 smp_message_recv(1, regs); 675 smp_message_recv(1);
677 } 676 }
678 if (doorbell & 4) { 677 if (doorbell & 4) {
679 smp_message_recv(2, regs); 678 smp_message_recv(2);
680 } 679 }
681 if (doorbell & 8) { 680 if (doorbell & 8) {
682 smp_message_recv(3, regs); 681 smp_message_recv(3);
683 } 682 }
684 return IRQ_HANDLED; 683 return IRQ_HANDLED;
685} 684}
686 685
687static irqreturn_t hdpu_smp_cpu1_int_handler(int irq, void *dev_id, 686static irqreturn_t hdpu_smp_cpu1_int_handler(int irq, void *dev_id)
688 struct pt_regs *regs)
689{ 687{
690 volatile unsigned int doorbell; 688 volatile unsigned int doorbell;
691 689
@@ -695,16 +693,16 @@ static irqreturn_t hdpu_smp_cpu1_int_handler(int irq, void *dev_id,
695 mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, doorbell); 693 mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, doorbell);
696 694
697 if (doorbell & 1) { 695 if (doorbell & 1) {
698 smp_message_recv(0, regs); 696 smp_message_recv(0);
699 } 697 }
700 if (doorbell & 2) { 698 if (doorbell & 2) {
701 smp_message_recv(1, regs); 699 smp_message_recv(1);
702 } 700 }
703 if (doorbell & 4) { 701 if (doorbell & 4) {
704 smp_message_recv(2, regs); 702 smp_message_recv(2);
705 } 703 }
706 if (doorbell & 8) { 704 if (doorbell & 8) {
707 smp_message_recv(3, regs); 705 smp_message_recv(3);
708 } 706 }
709 return IRQ_HANDLED; 707 return IRQ_HANDLED;
710} 708}
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index 3bb530af0297..13d70ab50bf1 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -451,11 +451,11 @@ static void __init ppc7d_calibrate_decr(void)
451 * Interrupt stuff 451 * Interrupt stuff
452 *****************************************************************************/ 452 *****************************************************************************/
453 453
454static irqreturn_t ppc7d_i8259_intr(int irq, void *dev_id, struct pt_regs *regs) 454static irqreturn_t ppc7d_i8259_intr(int irq, void *dev_id)
455{ 455{
456 u32 temp = mv64x60_read(&bh, MV64x60_GPP_INTR_CAUSE); 456 u32 temp = mv64x60_read(&bh, MV64x60_GPP_INTR_CAUSE);
457 if (temp & (1 << 28)) { 457 if (temp & (1 << 28)) {
458 i8259_irq(regs); 458 i8259_irq();
459 mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, temp & (~(1 << 28))); 459 mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, temp & (~(1 << 28)));
460 return IRQ_HANDLED; 460 return IRQ_HANDLED;
461 } 461 }
@@ -536,13 +536,13 @@ static u32 ppc7d_irq_canonicalize(u32 irq)
536 return irq; 536 return irq;
537} 537}
538 538
539static int ppc7d_get_irq(struct pt_regs *regs) 539static int ppc7d_get_irq(void)
540{ 540{
541 int irq; 541 int irq;
542 542
543 irq = mv64360_get_irq(regs); 543 irq = mv64360_get_irq();
544 if (irq == (mv64360_irq_base + MV64x60_IRQ_GPP28)) 544 if (irq == (mv64360_irq_base + MV64x60_IRQ_GPP28))
545 irq = i8259_irq(regs); 545 irq = i8259_irq();
546 return irq; 546 return irq;
547} 547}
548 548
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c
index 60b769c7f3fc..cc0935ccab7a 100644
--- a/arch/ppc/platforms/sbc82xx.c
+++ b/arch/ppc/platforms/sbc82xx.c
@@ -121,7 +121,7 @@ struct hw_interrupt_type sbc82xx_i8259_ic = {
121 .end = sbc82xx_i8259_end_irq, 121 .end = sbc82xx_i8259_end_irq,
122}; 122};
123 123
124static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id, struct pt_regs *regs) 124static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id)
125{ 125{
126 spin_lock(&sbc82xx_i8259_lock); 126 spin_lock(&sbc82xx_i8259_lock);
127 127
@@ -139,7 +139,7 @@ static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id, struct pt_regs *re
139 return IRQ_HANDLED; 139 return IRQ_HANDLED;
140 } 140 }
141 } 141 }
142 __do_IRQ(NR_SIU_INTS + irq, regs); 142 __do_IRQ(NR_SIU_INTS + irq);
143 return IRQ_HANDLED; 143 return IRQ_HANDLED;
144} 144}
145 145
diff --git a/arch/ppc/syslib/cpc700.h b/arch/ppc/syslib/cpc700.h
index 0a8a5d84390f..987e9aa0dd45 100644
--- a/arch/ppc/syslib/cpc700.h
+++ b/arch/ppc/syslib/cpc700.h
@@ -91,6 +91,6 @@ extern struct hw_interrupt_type cpc700_pic;
91extern unsigned int cpc700_irq_assigns[32][2]; 91extern unsigned int cpc700_irq_assigns[32][2];
92 92
93extern void __init cpc700_init_IRQ(void); 93extern void __init cpc700_init_IRQ(void);
94extern int cpc700_get_irq(struct pt_regs *); 94extern int cpc700_get_irq(void);
95 95
96#endif /* __PPC_SYSLIB_CPC700_H__ */ 96#endif /* __PPC_SYSLIB_CPC700_H__ */
diff --git a/arch/ppc/syslib/cpc700_pic.c b/arch/ppc/syslib/cpc700_pic.c
index 172aa215fdb0..d48e8f45c050 100644
--- a/arch/ppc/syslib/cpc700_pic.c
+++ b/arch/ppc/syslib/cpc700_pic.c
@@ -158,7 +158,7 @@ cpc700_init_IRQ(void)
158 * Find the highest IRQ that generating an interrupt, if any. 158 * Find the highest IRQ that generating an interrupt, if any.
159 */ 159 */
160int 160int
161cpc700_get_irq(struct pt_regs *regs) 161cpc700_get_irq(void)
162{ 162{
163 int irq = 0; 163 int irq = 0;
164 u_int irq_status, irq_test = 1; 164 u_int irq_status, irq_test = 1;
diff --git a/arch/ppc/syslib/cpm2_pic.c b/arch/ppc/syslib/cpm2_pic.c
index c0fee0beb815..fb2d5842641a 100644
--- a/arch/ppc/syslib/cpm2_pic.c
+++ b/arch/ppc/syslib/cpm2_pic.c
@@ -123,7 +123,7 @@ static struct hw_interrupt_type cpm2_pic = {
123 .end = cpm2_end_irq, 123 .end = cpm2_end_irq,
124}; 124};
125 125
126int cpm2_get_irq(struct pt_regs *regs) 126int cpm2_get_irq(void)
127{ 127{
128 int irq; 128 int irq;
129 unsigned long bits; 129 unsigned long bits;
diff --git a/arch/ppc/syslib/cpm2_pic.h b/arch/ppc/syslib/cpm2_pic.h
index 97cab8f13a1a..467339337a78 100644
--- a/arch/ppc/syslib/cpm2_pic.h
+++ b/arch/ppc/syslib/cpm2_pic.h
@@ -1,7 +1,7 @@
1#ifndef _PPC_KERNEL_CPM2_H 1#ifndef _PPC_KERNEL_CPM2_H
2#define _PPC_KERNEL_CPM2_H 2#define _PPC_KERNEL_CPM2_H
3 3
4extern int cpm2_get_irq(struct pt_regs *regs); 4extern int cpm2_get_irq(void);
5 5
6extern void cpm2_init_IRQ(void); 6extern void cpm2_init_IRQ(void);
7 7
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c
index 7fd550a7d586..e84d432c0657 100644
--- a/arch/ppc/syslib/gt64260_pic.c
+++ b/arch/ppc/syslib/gt64260_pic.c
@@ -110,9 +110,6 @@ gt64260_init_irq(void)
110 * This function returns the lowest interrupt number of all interrupts that 110 * This function returns the lowest interrupt number of all interrupts that
111 * are currently asserted. 111 * are currently asserted.
112 * 112 *
113 * Input Variable(s):
114 * struct pt_regs* not used
115 *
116 * Output Variable(s): 113 * Output Variable(s):
117 * None. 114 * None.
118 * 115 *
@@ -120,7 +117,7 @@ gt64260_init_irq(void)
120 * int <interrupt number> or -2 (bogus interrupt) 117 * int <interrupt number> or -2 (bogus interrupt)
121 */ 118 */
122int 119int
123gt64260_get_irq(struct pt_regs *regs) 120gt64260_get_irq(void)
124{ 121{
125 int irq; 122 int irq;
126 int irq_gpp; 123 int irq_gpp;
@@ -229,7 +226,7 @@ gt64260_mask_irq(unsigned int irq)
229} 226}
230 227
231static irqreturn_t 228static irqreturn_t
232gt64260_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs) 229gt64260_cpu_error_int_handler(int irq, void *dev_id)
233{ 230{
234 printk(KERN_ERR "gt64260_cpu_error_int_handler: %s 0x%08x\n", 231 printk(KERN_ERR "gt64260_cpu_error_int_handler: %s 0x%08x\n",
235 "Error on CPU interface - Cause regiser", 232 "Error on CPU interface - Cause regiser",
@@ -250,7 +247,7 @@ gt64260_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
250} 247}
251 248
252static irqreturn_t 249static irqreturn_t
253gt64260_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs) 250gt64260_pci_error_int_handler(int irq, void *dev_id)
254{ 251{
255 u32 val; 252 u32 val;
256 unsigned int pci_bus = (unsigned int)dev_id; 253 unsigned int pci_bus = (unsigned int)dev_id;
diff --git a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c
index eb35353af837..a43dda5a8334 100644
--- a/arch/ppc/syslib/i8259.c
+++ b/arch/ppc/syslib/i8259.c
@@ -28,7 +28,7 @@ static int i8259_pic_irq_offset;
28 * which is called. It should be noted that polling is broken on some 28 * which is called. It should be noted that polling is broken on some
29 * IBM and Motorola PReP boxes so we must use the int-ack feature on them. 29 * IBM and Motorola PReP boxes so we must use the int-ack feature on them.
30 */ 30 */
31int i8259_irq(struct pt_regs *regs) 31int i8259_irq(void)
32{ 32{
33 int irq; 33 int irq;
34 34
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c
index 4b77e6c8c87f..6ad52f4a26e1 100644
--- a/arch/ppc/syslib/ibm440gx_common.c
+++ b/arch/ppc/syslib/ibm440gx_common.c
@@ -119,7 +119,7 @@ static inline u32 l2c_diag(u32 addr)
119 return mfdcr(DCRN_L2C0_DATA); 119 return mfdcr(DCRN_L2C0_DATA);
120} 120}
121 121
122static irqreturn_t l2c_error_handler(int irq, void* dev, struct pt_regs* regs) 122static irqreturn_t l2c_error_handler(int irq, void* dev)
123{ 123{
124 u32 sr = mfdcr(DCRN_L2C0_SR); 124 u32 sr = mfdcr(DCRN_L2C0_SR);
125 if (sr & L2C_SR_CPE){ 125 if (sr & L2C_SR_CPE){
diff --git a/arch/ppc/syslib/ipic.c b/arch/ppc/syslib/ipic.c
index 46801f5ec03f..10659c24b1be 100644
--- a/arch/ppc/syslib/ipic.c
+++ b/arch/ppc/syslib/ipic.c
@@ -601,7 +601,7 @@ void ipic_clear_mcp_status(u32 mask)
601} 601}
602 602
603/* Return an interrupt vector or -1 if no interrupt is pending. */ 603/* Return an interrupt vector or -1 if no interrupt is pending. */
604int ipic_get_irq(struct pt_regs *regs) 604int ipic_get_irq(void)
605{ 605{
606 int irq; 606 int irq;
607 607
diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c
index d3fa264e179e..e3b586b1ede9 100644
--- a/arch/ppc/syslib/m82xx_pci.c
+++ b/arch/ppc/syslib/m82xx_pci.c
@@ -117,7 +117,7 @@ struct hw_interrupt_type pq2pci_ic = {
117}; 117};
118 118
119static irqreturn_t 119static irqreturn_t
120pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs) 120pq2pci_irq_demux(int irq, void *dev_id)
121{ 121{
122 unsigned long stat, mask, pend; 122 unsigned long stat, mask, pend;
123 int bit; 123 int bit;
@@ -130,7 +130,7 @@ pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs)
130 break; 130 break;
131 for (bit = 0; pend != 0; ++bit, pend <<= 1) { 131 for (bit = 0; pend != 0; ++bit, pend <<= 1) {
132 if (pend & 0x80000000) 132 if (pend & 0x80000000)
133 __do_IRQ(NR_CPM_INTS + bit, regs); 133 __do_IRQ(NR_CPM_INTS + bit);
134 } 134 }
135 } 135 }
136 136
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index 54303a7b4e69..d8d299bd1a12 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -169,7 +169,7 @@ abort(void)
169} 169}
170 170
171/* A place holder for time base interrupts, if they are ever enabled. */ 171/* A place holder for time base interrupts, if they are ever enabled. */
172irqreturn_t timebase_interrupt(int irq, void * dev, struct pt_regs * regs) 172irqreturn_t timebase_interrupt(int irq, void * dev)
173{ 173{
174 printk ("timebase_interrupt()\n"); 174 printk ("timebase_interrupt()\n");
175 175
diff --git a/arch/ppc/syslib/m8xx_wdt.c b/arch/ppc/syslib/m8xx_wdt.c
index ac11d7bab443..fffac8cbeb51 100644
--- a/arch/ppc/syslib/m8xx_wdt.c
+++ b/arch/ppc/syslib/m8xx_wdt.c
@@ -21,7 +21,7 @@
21static int wdt_timeout; 21static int wdt_timeout;
22int m8xx_has_internal_rtc = 0; 22int m8xx_has_internal_rtc = 0;
23 23
24static irqreturn_t m8xx_wdt_interrupt(int, void *, struct pt_regs *); 24static irqreturn_t m8xx_wdt_interrupt(int, void *);
25static struct irqaction m8xx_wdt_irqaction = { 25static struct irqaction m8xx_wdt_irqaction = {
26 .handler = m8xx_wdt_interrupt, 26 .handler = m8xx_wdt_interrupt,
27 .name = "watchdog", 27 .name = "watchdog",
@@ -35,7 +35,7 @@ void m8xx_wdt_reset(void)
35 out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */ 35 out_be16(&imap->im_siu_conf.sc_swsr, 0xaa39); /* write magic2 */
36} 36}
37 37
38static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev, struct pt_regs *regs) 38static irqreturn_t m8xx_wdt_interrupt(int irq, void *dev)
39{ 39{
40 volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR; 40 volatile immap_t *imap = (volatile immap_t *)IMAP_ADDR;
41 41
diff --git a/arch/ppc/syslib/mpc52xx_pic.c b/arch/ppc/syslib/mpc52xx_pic.c
index 6425b5cee7db..af35a316544a 100644
--- a/arch/ppc/syslib/mpc52xx_pic.c
+++ b/arch/ppc/syslib/mpc52xx_pic.c
@@ -220,7 +220,7 @@ mpc52xx_init_irq(void)
220} 220}
221 221
222int 222int
223mpc52xx_get_irq(struct pt_regs *regs) 223mpc52xx_get_irq(void)
224{ 224{
225 u32 status; 225 u32 status;
226 int irq = -1; 226 int irq = -1;
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c
index 3f6d162f87cf..4b7a3338e122 100644
--- a/arch/ppc/syslib/mv64360_pic.c
+++ b/arch/ppc/syslib/mv64360_pic.c
@@ -55,10 +55,9 @@
55 55
56static void mv64360_unmask_irq(unsigned int); 56static void mv64360_unmask_irq(unsigned int);
57static void mv64360_mask_irq(unsigned int); 57static void mv64360_mask_irq(unsigned int);
58static irqreturn_t mv64360_cpu_error_int_handler(int, void *, struct pt_regs *); 58static irqreturn_t mv64360_cpu_error_int_handler(int, void *);
59static irqreturn_t mv64360_sram_error_int_handler(int, void *, 59static irqreturn_t mv64360_sram_error_int_handler(int, void *);
60 struct pt_regs *); 60static irqreturn_t mv64360_pci_error_int_handler(int, void *);
61static irqreturn_t mv64360_pci_error_int_handler(int, void *, struct pt_regs *);
62 61
63/* ========================== local declarations =========================== */ 62/* ========================== local declarations =========================== */
64 63
@@ -131,9 +130,6 @@ mv64360_init_irq(void)
131 * This function returns the lowest interrupt number of all interrupts that 130 * This function returns the lowest interrupt number of all interrupts that
132 * are currently asserted. 131 * are currently asserted.
133 * 132 *
134 * Input Variable(s):
135 * struct pt_regs* not used
136 *
137 * Output Variable(s): 133 * Output Variable(s):
138 * None. 134 * None.
139 * 135 *
@@ -142,7 +138,7 @@ mv64360_init_irq(void)
142 * 138 *
143 */ 139 */
144int 140int
145mv64360_get_irq(struct pt_regs *regs) 141mv64360_get_irq(void)
146{ 142{
147 int irq; 143 int irq;
148 int irq_gpp; 144 int irq_gpp;
@@ -283,7 +279,7 @@ mv64360_mask_irq(unsigned int irq)
283} 279}
284 280
285static irqreturn_t 281static irqreturn_t
286mv64360_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs) 282mv64360_cpu_error_int_handler(int irq, void *dev_id)
287{ 283{
288 printk(KERN_ERR "mv64360_cpu_error_int_handler: %s 0x%08x\n", 284 printk(KERN_ERR "mv64360_cpu_error_int_handler: %s 0x%08x\n",
289 "Error on CPU interface - Cause regiser", 285 "Error on CPU interface - Cause regiser",
@@ -304,7 +300,7 @@ mv64360_cpu_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
304} 300}
305 301
306static irqreturn_t 302static irqreturn_t
307mv64360_sram_error_int_handler(int irq, void *dev_id, struct pt_regs *regs) 303mv64360_sram_error_int_handler(int irq, void *dev_id)
308{ 304{
309 printk(KERN_ERR "mv64360_sram_error_int_handler: %s 0x%08x\n", 305 printk(KERN_ERR "mv64360_sram_error_int_handler: %s 0x%08x\n",
310 "Error in internal SRAM - Cause register", 306 "Error in internal SRAM - Cause register",
@@ -325,7 +321,7 @@ mv64360_sram_error_int_handler(int irq, void *dev_id, struct pt_regs *regs)
325} 321}
326 322
327static irqreturn_t 323static irqreturn_t
328mv64360_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs) 324mv64360_pci_error_int_handler(int irq, void *dev_id)
329{ 325{
330 u32 val; 326 u32 val;
331 unsigned int pci_bus = (unsigned int)dev_id; 327 unsigned int pci_bus = (unsigned int)dev_id;
@@ -380,7 +376,7 @@ mv64360_register_hdlrs(void)
380 /* Clear old errors and register CPU interface error intr handler */ 376 /* Clear old errors and register CPU interface error intr handler */
381 mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); 377 mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
382 if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, 378 if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base,
383 mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0))) 379 mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, NULL)))
384 printk(KERN_WARNING "Can't register cpu error handler: %d", rc); 380 printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
385 381
386 mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); 382 mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
@@ -389,7 +385,7 @@ mv64360_register_hdlrs(void)
389 /* Clear old errors and register internal SRAM error intr handler */ 385 /* Clear old errors and register internal SRAM error intr handler */
390 mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); 386 mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0);
391 if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, 387 if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base,
392 mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, 0))) 388 mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, NULL)))
393 printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); 389 printk(KERN_WARNING "Can't register SRAM error handler: %d",rc);
394 390
395 /* Clear old errors and register PCI 0 error intr handler */ 391 /* Clear old errors and register PCI 0 error intr handler */
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c
index aa0b95788705..18ec94733293 100644
--- a/arch/ppc/syslib/open_pic.c
+++ b/arch/ppc/syslib/open_pic.c
@@ -45,7 +45,7 @@ static u_int NumSources;
45static int open_pic_irq_offset; 45static int open_pic_irq_offset;
46static volatile OpenPIC_Source __iomem *ISR[NR_IRQS]; 46static volatile OpenPIC_Source __iomem *ISR[NR_IRQS];
47static int openpic_cascade_irq = -1; 47static int openpic_cascade_irq = -1;
48static int (*openpic_cascade_fn)(struct pt_regs *); 48static int (*openpic_cascade_fn)(void);
49 49
50/* Global Operations */ 50/* Global Operations */
51static void openpic_disable_8259_pass_through(void); 51static void openpic_disable_8259_pass_through(void);
@@ -54,7 +54,7 @@ static void openpic_set_spurious(u_int vector);
54#ifdef CONFIG_SMP 54#ifdef CONFIG_SMP
55/* Interprocessor Interrupts */ 55/* Interprocessor Interrupts */
56static void openpic_initipi(u_int ipi, u_int pri, u_int vector); 56static void openpic_initipi(u_int ipi, u_int pri, u_int vector);
57static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *); 57static irqreturn_t openpic_ipi_action(int cpl, void *dev_id);
58#endif 58#endif
59 59
60/* Timer Interrupts */ 60/* Timer Interrupts */
@@ -700,7 +700,7 @@ static struct irqaction openpic_cascade_irqaction = {
700 700
701void __init 701void __init
702openpic_hookup_cascade(u_int irq, char *name, 702openpic_hookup_cascade(u_int irq, char *name,
703 int (*cascade_fn)(struct pt_regs *)) 703 int (*cascade_fn)(void))
704{ 704{
705 openpic_cascade_irq = irq; 705 openpic_cascade_irq = irq;
706 openpic_cascade_fn = cascade_fn; 706 openpic_cascade_fn = cascade_fn;
@@ -857,16 +857,16 @@ static void openpic_end_ipi(unsigned int irq_nr)
857{ 857{
858} 858}
859 859
860static irqreturn_t openpic_ipi_action(int cpl, void *dev_id, struct pt_regs *regs) 860static irqreturn_t openpic_ipi_action(int cpl, void *dev_id)
861{ 861{
862 smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset, regs); 862 smp_message_recv(cpl-OPENPIC_VEC_IPI-open_pic_irq_offset);
863 return IRQ_HANDLED; 863 return IRQ_HANDLED;
864} 864}
865 865
866#endif /* CONFIG_SMP */ 866#endif /* CONFIG_SMP */
867 867
868int 868int
869openpic_get_irq(struct pt_regs *regs) 869openpic_get_irq(void)
870{ 870{
871 int irq = openpic_irq(); 871 int irq = openpic_irq();
872 872
@@ -876,7 +876,7 @@ openpic_get_irq(struct pt_regs *regs)
876 * This should move to irq.c eventually. -- paulus 876 * This should move to irq.c eventually. -- paulus
877 */ 877 */
878 if (irq == openpic_cascade_irq && openpic_cascade_fn != NULL) { 878 if (irq == openpic_cascade_irq && openpic_cascade_fn != NULL) {
879 int cirq = openpic_cascade_fn(regs); 879 int cirq = openpic_cascade_fn();
880 880
881 /* Allow for the cascade being shared with other devices */ 881 /* Allow for the cascade being shared with other devices */
882 if (cirq != -1) { 882 if (cirq != -1) {
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c
index e1ff971539ea..d585207f9f77 100644
--- a/arch/ppc/syslib/open_pic2.c
+++ b/arch/ppc/syslib/open_pic2.c
@@ -529,7 +529,7 @@ static void openpic2_end_irq(unsigned int irq_nr)
529} 529}
530 530
531int 531int
532openpic2_get_irq(struct pt_regs *regs) 532openpic2_get_irq(void)
533{ 533{
534 int irq = openpic2_irq(); 534 int irq = openpic2_irq();
535 535
diff --git a/arch/ppc/syslib/ppc403_pic.c b/arch/ppc/syslib/ppc403_pic.c
index 1584c8b1229f..607ebd111d44 100644
--- a/arch/ppc/syslib/ppc403_pic.c
+++ b/arch/ppc/syslib/ppc403_pic.c
@@ -42,7 +42,7 @@ static struct hw_interrupt_type ppc403_aic = {
42}; 42};
43 43
44int 44int
45ppc403_pic_get_irq(struct pt_regs *regs) 45ppc403_pic_get_irq(void)
46{ 46{
47 int irq; 47 int irq;
48 unsigned long bits; 48 unsigned long bits;
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c
index 745685df5984..ee0da4b4b993 100644
--- a/arch/ppc/syslib/ppc4xx_pic.c
+++ b/arch/ppc/syslib/ppc4xx_pic.c
@@ -96,7 +96,7 @@ UIC_HANDLERS(1);
96UIC_HANDLERS(2); 96UIC_HANDLERS(2);
97UIC_HANDLERS(3); 97UIC_HANDLERS(3);
98 98
99static int ppc4xx_pic_get_irq(struct pt_regs *regs) 99static int ppc4xx_pic_get_irq(void)
100{ 100{
101 u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0)); 101 u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
102 if (uic0 & UIC0_UIC1NC) 102 if (uic0 & UIC0_UIC1NC)
@@ -125,7 +125,7 @@ UIC_HANDLERS(0);
125UIC_HANDLERS(1); 125UIC_HANDLERS(1);
126UIC_HANDLERS(2); 126UIC_HANDLERS(2);
127 127
128static int ppc4xx_pic_get_irq(struct pt_regs *regs) 128static int ppc4xx_pic_get_irq(void)
129{ 129{
130 u32 uicb = mfdcr(DCRN_UIC_MSR(UICB)); 130 u32 uicb = mfdcr(DCRN_UIC_MSR(UICB));
131 if (uicb & UICB_UIC0NC) 131 if (uicb & UICB_UIC0NC)
@@ -158,7 +158,7 @@ static void __init ppc4xx_pic_impl_init(void)
158UIC_HANDLERS(0); 158UIC_HANDLERS(0);
159UIC_HANDLERS(1); 159UIC_HANDLERS(1);
160 160
161static int ppc4xx_pic_get_irq(struct pt_regs *regs) 161static int ppc4xx_pic_get_irq(void)
162{ 162{
163 u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0)); 163 u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
164 if (uic0 & UIC0_UIC1NC) 164 if (uic0 & UIC0_UIC1NC)
@@ -179,7 +179,7 @@ static void __init ppc4xx_pic_impl_init(void)
179#define ACK_UIC0_PARENT 179#define ACK_UIC0_PARENT
180UIC_HANDLERS(0); 180UIC_HANDLERS(0);
181 181
182static int ppc4xx_pic_get_irq(struct pt_regs *regs) 182static int ppc4xx_pic_get_irq(void)
183{ 183{
184 u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0)); 184 u32 uic0 = mfdcr(DCRN_UIC_MSR(UIC0));
185 return uic0 ? 32 - ffs(uic0) : -1; 185 return uic0 ? 32 - ffs(uic0) : -1;
diff --git a/arch/ppc/syslib/ppc85xx_rio.c b/arch/ppc/syslib/ppc85xx_rio.c
index d9b471b4d695..05b0e9415085 100644
--- a/arch/ppc/syslib/ppc85xx_rio.c
+++ b/arch/ppc/syslib/ppc85xx_rio.c
@@ -349,13 +349,12 @@ EXPORT_SYMBOL_GPL(rio_hw_add_outb_message);
349 * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler 349 * mpc85xx_rio_tx_handler - MPC85xx outbound message interrupt handler
350 * @irq: Linux interrupt number 350 * @irq: Linux interrupt number
351 * @dev_instance: Pointer to interrupt-specific data 351 * @dev_instance: Pointer to interrupt-specific data
352 * @regs: Register context
353 * 352 *
354 * Handles outbound message interrupts. Executes a register outbound 353 * Handles outbound message interrupts. Executes a register outbound
355 * mailbox event handler and acks the interrupt occurence. 354 * mailbox event handler and acks the interrupt occurence.
356 */ 355 */
357static irqreturn_t 356static irqreturn_t
358mpc85xx_rio_tx_handler(int irq, void *dev_instance, struct pt_regs *regs) 357mpc85xx_rio_tx_handler(int irq, void *dev_instance)
359{ 358{
360 int osr; 359 int osr;
361 struct rio_mport *port = (struct rio_mport *)dev_instance; 360 struct rio_mport *port = (struct rio_mport *)dev_instance;
@@ -517,13 +516,12 @@ void rio_close_outb_mbox(struct rio_mport *mport, int mbox)
517 * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler 516 * mpc85xx_rio_rx_handler - MPC85xx inbound message interrupt handler
518 * @irq: Linux interrupt number 517 * @irq: Linux interrupt number
519 * @dev_instance: Pointer to interrupt-specific data 518 * @dev_instance: Pointer to interrupt-specific data
520 * @regs: Register context
521 * 519 *
522 * Handles inbound message interrupts. Executes a registered inbound 520 * Handles inbound message interrupts. Executes a registered inbound
523 * mailbox event handler and acks the interrupt occurence. 521 * mailbox event handler and acks the interrupt occurence.
524 */ 522 */
525static irqreturn_t 523static irqreturn_t
526mpc85xx_rio_rx_handler(int irq, void *dev_instance, struct pt_regs *regs) 524mpc85xx_rio_rx_handler(int irq, void *dev_instance)
527{ 525{
528 int isr; 526 int isr;
529 struct rio_mport *port = (struct rio_mport *)dev_instance; 527 struct rio_mport *port = (struct rio_mport *)dev_instance;
@@ -736,13 +734,12 @@ EXPORT_SYMBOL_GPL(rio_hw_get_inb_message);
736 * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler 734 * mpc85xx_rio_dbell_handler - MPC85xx doorbell interrupt handler
737 * @irq: Linux interrupt number 735 * @irq: Linux interrupt number
738 * @dev_instance: Pointer to interrupt-specific data 736 * @dev_instance: Pointer to interrupt-specific data
739 * @regs: Register context
740 * 737 *
741 * Handles doorbell interrupts. Parses a list of registered 738 * Handles doorbell interrupts. Parses a list of registered
742 * doorbell event handlers and executes a matching event handler. 739 * doorbell event handlers and executes a matching event handler.
743 */ 740 */
744static irqreturn_t 741static irqreturn_t
745mpc85xx_rio_dbell_handler(int irq, void *dev_instance, struct pt_regs *regs) 742mpc85xx_rio_dbell_handler(int irq, void *dev_instance)
746{ 743{
747 int dsr; 744 int dsr;
748 struct rio_mport *port = (struct rio_mport *)dev_instance; 745 struct rio_mport *port = (struct rio_mport *)dev_instance;
diff --git a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c
index d6c25fe25011..e8619c750732 100644
--- a/arch/ppc/syslib/ppc8xx_pic.c
+++ b/arch/ppc/syslib/ppc8xx_pic.c
@@ -10,7 +10,7 @@
10#include <asm/mpc8xx.h> 10#include <asm/mpc8xx.h>
11#include "ppc8xx_pic.h" 11#include "ppc8xx_pic.h"
12 12
13extern int cpm_get_irq(struct pt_regs *regs); 13extern int cpm_get_irq(void);
14 14
15/* The 8xx internal interrupt controller. It is usually 15/* The 8xx internal interrupt controller. It is usually
16 * the only interrupt controller. Some boards, like the MBX and 16 * the only interrupt controller. Some boards, like the MBX and
@@ -96,7 +96,7 @@ m8xx_get_irq(struct pt_regs *regs)
96 * get back SIU_LEVEL7. In this case, return -1 96 * get back SIU_LEVEL7. In this case, return -1
97 */ 97 */
98 if (irq == CPM_INTERRUPT) 98 if (irq == CPM_INTERRUPT)
99 irq = CPM_IRQ_OFFSET + cpm_get_irq(regs); 99 irq = CPM_IRQ_OFFSET + cpm_get_irq();
100#if defined(CONFIG_PCI) 100#if defined(CONFIG_PCI)
101 else if (irq == ISA_BRIDGE_INT) { 101 else if (irq == ISA_BRIDGE_INT) {
102 int isa_irq; 102 int isa_irq;
diff --git a/arch/ppc/syslib/xilinx_pic.c b/arch/ppc/syslib/xilinx_pic.c
index 39a93dc6375b..6fd4cdbada72 100644
--- a/arch/ppc/syslib/xilinx_pic.c
+++ b/arch/ppc/syslib/xilinx_pic.c
@@ -86,7 +86,7 @@ static struct hw_interrupt_type xilinx_intc = {
86}; 86};
87 87
88int 88int
89xilinx_pic_get_irq(struct pt_regs *regs) 89xilinx_pic_get_irq(void)
90{ 90{
91 int irq; 91 int irq;
92 92
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 51c2dfe89c62..608193cfe43f 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -30,6 +30,9 @@ config GENERIC_CALIBRATE_DELAY
30 bool 30 bool
31 default y 31 default y
32 32
33config GENERIC_TIME
34 def_bool y
35
33config GENERIC_BUST_SPINLOCK 36config GENERIC_BUST_SPINLOCK
34 bool 37 bool
35 38
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 2b1e6c9a6e0e..45c9fa7d7545 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -109,7 +109,7 @@ static LIST_HEAD(appldata_ops_list);
109 * 109 *
110 * schedule work and reschedule timer 110 * schedule work and reschedule timer
111 */ 111 */
112static void appldata_timer_function(unsigned long data, struct pt_regs *regs) 112static void appldata_timer_function(unsigned long data)
113{ 113{
114 P_DEBUG(" -= Timer =-\n"); 114 P_DEBUG(" -= Timer =-\n");
115 P_DEBUG("CPU: %i, expire_count: %i\n", smp_processor_id(), 115 P_DEBUG("CPU: %i, expire_count: %i\n", smp_processor_id(),
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index b6cad75fd1f4..a3257398ea8d 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -9,6 +9,7 @@ CONFIG_STACKTRACE_SUPPORT=y
9CONFIG_RWSEM_XCHGADD_ALGORITHM=y 9CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10CONFIG_GENERIC_HWEIGHT=y 10CONFIG_GENERIC_HWEIGHT=y
11CONFIG_GENERIC_CALIBRATE_DELAY=y 11CONFIG_GENERIC_CALIBRATE_DELAY=y
12CONFIG_GENERIC_TIME=y
12CONFIG_S390=y 13CONFIG_S390=y
13CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" 14CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
14 15
diff --git a/arch/s390/kernel/s390_ext.c b/arch/s390/kernel/s390_ext.c
index c1b383537fec..4faf96f8a834 100644
--- a/arch/s390/kernel/s390_ext.c
+++ b/arch/s390/kernel/s390_ext.c
@@ -16,6 +16,7 @@
16 16
17#include <asm/lowcore.h> 17#include <asm/lowcore.h>
18#include <asm/s390_ext.h> 18#include <asm/s390_ext.h>
19#include <asm/irq_regs.h>
19#include <asm/irq.h> 20#include <asm/irq.h>
20 21
21/* 22/*
@@ -114,7 +115,9 @@ void do_extint(struct pt_regs *regs, unsigned short code)
114{ 115{
115 ext_int_info_t *p; 116 ext_int_info_t *p;
116 int index; 117 int index;
118 struct pt_regs *old_regs;
117 119
120 old_regs = set_irq_regs(regs);
118 irq_enter(); 121 irq_enter();
119 asm volatile ("mc 0,0"); 122 asm volatile ("mc 0,0");
120 if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer) 123 if (S390_lowcore.int_clock >= S390_lowcore.jiffy_timer)
@@ -122,18 +125,18 @@ void do_extint(struct pt_regs *regs, unsigned short code)
122 * Make sure that the i/o interrupt did not "overtake" 125 * Make sure that the i/o interrupt did not "overtake"
123 * the last HZ timer interrupt. 126 * the last HZ timer interrupt.
124 */ 127 */
125 account_ticks(regs); 128 account_ticks();
126 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++; 129 kstat_cpu(smp_processor_id()).irqs[EXTERNAL_INTERRUPT]++;
127 index = ext_hash(code); 130 index = ext_hash(code);
128 for (p = ext_int_hash[index]; p; p = p->next) { 131 for (p = ext_int_hash[index]; p; p = p->next) {
129 if (likely(p->code == code)) { 132 if (likely(p->code == code)) {
130 if (likely(p->handler)) 133 if (likely(p->handler))
131 p->handler(regs, code); 134 p->handler(code);
132 } 135 }
133 } 136 }
134 irq_exit(); 137 irq_exit();
138 set_irq_regs(old_regs);
135} 139}
136 140
137EXPORT_SYMBOL(register_external_interrupt); 141EXPORT_SYMBOL(register_external_interrupt);
138EXPORT_SYMBOL(unregister_external_interrupt); 142EXPORT_SYMBOL(unregister_external_interrupt);
139
diff --git a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c
index 9f19e833a562..90b5ef529eb7 100644
--- a/arch/s390/kernel/s390_ksyms.c
+++ b/arch/s390/kernel/s390_ksyms.c
@@ -51,4 +51,3 @@ EXPORT_SYMBOL(csum_fold);
51EXPORT_SYMBOL(console_mode); 51EXPORT_SYMBOL(console_mode);
52EXPORT_SYMBOL(console_devno); 52EXPORT_SYMBOL(console_devno);
53EXPORT_SYMBOL(console_irq); 53EXPORT_SYMBOL(console_irq);
54EXPORT_SYMBOL(sys_wait4);
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index a8e6199755d4..62822245f9be 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -339,7 +339,7 @@ void machine_power_off_smp(void)
339 * cpus are handled. 339 * cpus are handled.
340 */ 340 */
341 341
342void do_ext_call_interrupt(struct pt_regs *regs, __u16 code) 342void do_ext_call_interrupt(__u16 code)
343{ 343{
344 unsigned long bits; 344 unsigned long bits;
345 345
diff --git a/arch/s390/kernel/stacktrace.c b/arch/s390/kernel/stacktrace.c
index d9428a0fc8fb..0d14a4789bf2 100644
--- a/arch/s390/kernel/stacktrace.c
+++ b/arch/s390/kernel/stacktrace.c
@@ -62,27 +62,26 @@ static inline unsigned long save_context_stack(struct stack_trace *trace,
62void save_stack_trace(struct stack_trace *trace, struct task_struct *task) 62void save_stack_trace(struct stack_trace *trace, struct task_struct *task)
63{ 63{
64 register unsigned long sp asm ("15"); 64 register unsigned long sp asm ("15");
65 unsigned long orig_sp; 65 unsigned long orig_sp, new_sp;
66 66
67 sp &= PSW_ADDR_INSN; 67 orig_sp = sp & PSW_ADDR_INSN;
68 orig_sp = sp;
69 68
70 sp = save_context_stack(trace, &trace->skip, sp, 69 new_sp = save_context_stack(trace, &trace->skip, orig_sp,
71 S390_lowcore.panic_stack - PAGE_SIZE, 70 S390_lowcore.panic_stack - PAGE_SIZE,
72 S390_lowcore.panic_stack); 71 S390_lowcore.panic_stack);
73 if ((sp != orig_sp) && !trace->all_contexts) 72 if ((new_sp != orig_sp) && !trace->all_contexts)
74 return; 73 return;
75 sp = save_context_stack(trace, &trace->skip, sp, 74 new_sp = save_context_stack(trace, &trace->skip, new_sp,
76 S390_lowcore.async_stack - ASYNC_SIZE, 75 S390_lowcore.async_stack - ASYNC_SIZE,
77 S390_lowcore.async_stack); 76 S390_lowcore.async_stack);
78 if ((sp != orig_sp) && !trace->all_contexts) 77 if ((new_sp != orig_sp) && !trace->all_contexts)
79 return; 78 return;
80 if (task) 79 if (task)
81 save_context_stack(trace, &trace->skip, sp, 80 save_context_stack(trace, &trace->skip, new_sp,
82 (unsigned long) task_stack_page(task), 81 (unsigned long) task_stack_page(task),
83 (unsigned long) task_stack_page(task) + THREAD_SIZE); 82 (unsigned long) task_stack_page(task) + THREAD_SIZE);
84 else 83 else
85 save_context_stack(trace, &trace->skip, sp, 84 save_context_stack(trace, &trace->skip, new_sp,
86 S390_lowcore.thread_info, 85 S390_lowcore.thread_info,
87 S390_lowcore.thread_info + THREAD_SIZE); 86 S390_lowcore.thread_info + THREAD_SIZE);
88 return; 87 return;
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 4bf66cc4a267..6cceed4df73e 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -28,12 +28,14 @@
28#include <linux/profile.h> 28#include <linux/profile.h>
29#include <linux/timex.h> 29#include <linux/timex.h>
30#include <linux/notifier.h> 30#include <linux/notifier.h>
31#include <linux/clocksource.h>
31 32
32#include <asm/uaccess.h> 33#include <asm/uaccess.h>
33#include <asm/delay.h> 34#include <asm/delay.h>
34#include <asm/s390_ext.h> 35#include <asm/s390_ext.h>
35#include <asm/div64.h> 36#include <asm/div64.h>
36#include <asm/irq.h> 37#include <asm/irq.h>
38#include <asm/irq_regs.h>
37#include <asm/timer.h> 39#include <asm/timer.h>
38 40
39/* change this if you have some constant time drift */ 41/* change this if you have some constant time drift */
@@ -81,78 +83,10 @@ void tod_to_timeval(__u64 todval, struct timespec *xtime)
81 xtime->tv_nsec = ((todval * 1000) >> 12); 83 xtime->tv_nsec = ((todval * 1000) >> 12);
82} 84}
83 85
84static inline unsigned long do_gettimeoffset(void)
85{
86 __u64 now;
87
88 now = (get_clock() - jiffies_timer_cc) >> 12;
89 now -= (__u64) jiffies * USECS_PER_JIFFY;
90 return (unsigned long) now;
91}
92
93/*
94 * This version of gettimeofday has microsecond resolution.
95 */
96void do_gettimeofday(struct timeval *tv)
97{
98 unsigned long flags;
99 unsigned long seq;
100 unsigned long usec, sec;
101
102 do {
103 seq = read_seqbegin_irqsave(&xtime_lock, flags);
104
105 sec = xtime.tv_sec;
106 usec = xtime.tv_nsec / 1000 + do_gettimeoffset();
107 } while (read_seqretry_irqrestore(&xtime_lock, seq, flags));
108
109 while (usec >= 1000000) {
110 usec -= 1000000;
111 sec++;
112 }
113
114 tv->tv_sec = sec;
115 tv->tv_usec = usec;
116}
117
118EXPORT_SYMBOL(do_gettimeofday);
119
120int do_settimeofday(struct timespec *tv)
121{
122 time_t wtm_sec, sec = tv->tv_sec;
123 long wtm_nsec, nsec = tv->tv_nsec;
124
125 if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
126 return -EINVAL;
127
128 write_seqlock_irq(&xtime_lock);
129 /* This is revolting. We need to set the xtime.tv_nsec
130 * correctly. However, the value in this location is
131 * is value at the last tick.
132 * Discover what correction gettimeofday
133 * would have done, and then undo it!
134 */
135 nsec -= do_gettimeoffset() * 1000;
136
137 wtm_sec = wall_to_monotonic.tv_sec + (xtime.tv_sec - sec);
138 wtm_nsec = wall_to_monotonic.tv_nsec + (xtime.tv_nsec - nsec);
139
140 set_normalized_timespec(&xtime, sec, nsec);
141 set_normalized_timespec(&wall_to_monotonic, wtm_sec, wtm_nsec);
142
143 ntp_clear();
144 write_sequnlock_irq(&xtime_lock);
145 clock_was_set();
146 return 0;
147}
148
149EXPORT_SYMBOL(do_settimeofday);
150
151
152#ifdef CONFIG_PROFILING 86#ifdef CONFIG_PROFILING
153#define s390_do_profile(regs) profile_tick(CPU_PROFILING, regs) 87#define s390_do_profile() profile_tick(CPU_PROFILING)
154#else 88#else
155#define s390_do_profile(regs) do { ; } while(0) 89#define s390_do_profile() do { ; } while(0)
156#endif /* CONFIG_PROFILING */ 90#endif /* CONFIG_PROFILING */
157 91
158 92
@@ -160,7 +94,7 @@ EXPORT_SYMBOL(do_settimeofday);
160 * timer_interrupt() needs to keep up the real-time clock, 94 * timer_interrupt() needs to keep up the real-time clock,
161 * as well as call the "do_timer()" routine every clocktick 95 * as well as call the "do_timer()" routine every clocktick
162 */ 96 */
163void account_ticks(struct pt_regs *regs) 97void account_ticks(void)
164{ 98{
165 __u64 tmp; 99 __u64 tmp;
166 __u32 ticks; 100 __u32 ticks;
@@ -221,10 +155,10 @@ void account_ticks(struct pt_regs *regs)
221 account_tick_vtime(current); 155 account_tick_vtime(current);
222#else 156#else
223 while (ticks--) 157 while (ticks--)
224 update_process_times(user_mode(regs)); 158 update_process_times(user_mode(get_irq_regs()));
225#endif 159#endif
226 160
227 s390_do_profile(regs); 161 s390_do_profile();
228} 162}
229 163
230#ifdef CONFIG_NO_IDLE_HZ 164#ifdef CONFIG_NO_IDLE_HZ
@@ -285,9 +219,11 @@ static inline void stop_hz_timer(void)
285 */ 219 */
286static inline void start_hz_timer(void) 220static inline void start_hz_timer(void)
287{ 221{
222 BUG_ON(!in_interrupt());
223
288 if (!cpu_isset(smp_processor_id(), nohz_cpu_mask)) 224 if (!cpu_isset(smp_processor_id(), nohz_cpu_mask))
289 return; 225 return;
290 account_ticks(task_pt_regs(current)); 226 account_ticks();
291 cpu_clear(smp_processor_id(), nohz_cpu_mask); 227 cpu_clear(smp_processor_id(), nohz_cpu_mask);
292} 228}
293 229
@@ -337,6 +273,22 @@ void init_cpu_timer(void)
337 273
338extern void vtime_init(void); 274extern void vtime_init(void);
339 275
276static cycle_t read_tod_clock(void)
277{
278 return get_clock();
279}
280
281static struct clocksource clocksource_tod = {
282 .name = "tod",
283 .rating = 100,
284 .read = read_tod_clock,
285 .mask = -1ULL,
286 .mult = 1000,
287 .shift = 12,
288 .is_continuous = 1,
289};
290
291
340/* 292/*
341 * Initialize the TOD clock and the CPU timer of 293 * Initialize the TOD clock and the CPU timer of
342 * the boot cpu. 294 * the boot cpu.
@@ -381,6 +333,9 @@ void __init time_init(void)
381 &ext_int_info_cc) != 0) 333 &ext_int_info_cc) != 0)
382 panic("Couldn't request external interrupt 0x1004"); 334 panic("Couldn't request external interrupt 0x1004");
383 335
336 if (clocksource_register(&clocksource_tod) != 0)
337 panic("Could not register TOD clock source");
338
384 init_cpu_timer(); 339 init_cpu_timer();
385 340
386#ifdef CONFIG_NO_IDLE_HZ 341#ifdef CONFIG_NO_IDLE_HZ
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index 3eb4fab048b8..66375a5e3d12 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -61,7 +61,7 @@ extern pgm_check_handler_t do_dat_exception;
61#ifdef CONFIG_PFAULT 61#ifdef CONFIG_PFAULT
62extern int pfault_init(void); 62extern int pfault_init(void);
63extern void pfault_fini(void); 63extern void pfault_fini(void);
64extern void pfault_interrupt(struct pt_regs *regs, __u16 error_code); 64extern void pfault_interrupt(__u16 error_code);
65static ext_int_info_t ext_int_pfault; 65static ext_int_info_t ext_int_pfault;
66#endif 66#endif
67extern pgm_check_handler_t do_monitor_call; 67extern pgm_check_handler_t do_monitor_call;
@@ -474,7 +474,7 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
474 signal = math_emu_b3(opcode, regs); 474 signal = math_emu_b3(opcode, regs);
475 } else if (opcode[0] == 0xed) { 475 } else if (opcode[0] == 0xed) {
476 get_user(*((__u32 *) (opcode+2)), 476 get_user(*((__u32 *) (opcode+2)),
477 (__u32 *)(location+1)); 477 (__u32 __user *)(location+1));
478 signal = math_emu_ed(opcode, regs); 478 signal = math_emu_ed(opcode, regs);
479 } else if (*((__u16 *) opcode) == 0xb299) { 479 } else if (*((__u16 *) opcode) == 0xb299) {
480 get_user(*((__u16 *) (opcode+2)), location+1); 480 get_user(*((__u16 *) (opcode+2)), location+1);
@@ -499,7 +499,7 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
499 info.si_signo = signal; 499 info.si_signo = signal;
500 info.si_errno = 0; 500 info.si_errno = 0;
501 info.si_code = SEGV_MAPERR; 501 info.si_code = SEGV_MAPERR;
502 info.si_addr = (void *) location; 502 info.si_addr = (void __user *) location;
503 do_trap(interruption_code, signal, 503 do_trap(interruption_code, signal,
504 "user address fault", regs, &info); 504 "user address fault", regs, &info);
505 } else 505 } else
@@ -520,10 +520,10 @@ asmlinkage void
520specification_exception(struct pt_regs * regs, long interruption_code) 520specification_exception(struct pt_regs * regs, long interruption_code)
521{ 521{
522 __u8 opcode[6]; 522 __u8 opcode[6];
523 __u16 *location = NULL; 523 __u16 __user *location = NULL;
524 int signal = 0; 524 int signal = 0;
525 525
526 location = (__u16 *) get_check_address(regs); 526 location = (__u16 __user *) get_check_address(regs);
527 527
528 /* 528 /*
529 * We got all needed information from the lowcore and can 529 * We got all needed information from the lowcore and can
@@ -632,7 +632,7 @@ asmlinkage void data_exception(struct pt_regs * regs, long interruption_code)
632 break; 632 break;
633 case 0xed: 633 case 0xed:
634 get_user(*((__u32 *) (opcode+2)), 634 get_user(*((__u32 *) (opcode+2)),
635 (__u32 *)(location+1)); 635 (__u32 __user *)(location+1));
636 signal = math_emu_ed(opcode, regs); 636 signal = math_emu_ed(opcode, regs);
637 break; 637 break;
638 case 0xb2: 638 case 0xb2:
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 2306cd83fca1..21baaf5496d6 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -22,6 +22,7 @@
22 22
23#include <asm/s390_ext.h> 23#include <asm/s390_ext.h>
24#include <asm/timer.h> 24#include <asm/timer.h>
25#include <asm/irq_regs.h>
25 26
26static ext_int_info_t ext_int_info_timer; 27static ext_int_info_t ext_int_info_timer;
27DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer); 28DEFINE_PER_CPU(struct vtimer_queue, virt_cpu_timer);
@@ -208,11 +209,11 @@ static void list_add_sorted(struct vtimer_list *timer, struct list_head *head)
208 * Do the callback functions of expired vtimer events. 209 * Do the callback functions of expired vtimer events.
209 * Called from within the interrupt handler. 210 * Called from within the interrupt handler.
210 */ 211 */
211static void do_callbacks(struct list_head *cb_list, struct pt_regs *regs) 212static void do_callbacks(struct list_head *cb_list)
212{ 213{
213 struct vtimer_queue *vt_list; 214 struct vtimer_queue *vt_list;
214 struct vtimer_list *event, *tmp; 215 struct vtimer_list *event, *tmp;
215 void (*fn)(unsigned long, struct pt_regs*); 216 void (*fn)(unsigned long);
216 unsigned long data; 217 unsigned long data;
217 218
218 if (list_empty(cb_list)) 219 if (list_empty(cb_list))
@@ -223,7 +224,7 @@ static void do_callbacks(struct list_head *cb_list, struct pt_regs *regs)
223 list_for_each_entry_safe(event, tmp, cb_list, entry) { 224 list_for_each_entry_safe(event, tmp, cb_list, entry) {
224 fn = event->function; 225 fn = event->function;
225 data = event->data; 226 data = event->data;
226 fn(data, regs); 227 fn(data);
227 228
228 if (!event->interval) 229 if (!event->interval)
229 /* delete one shot timer */ 230 /* delete one shot timer */
@@ -241,7 +242,7 @@ static void do_callbacks(struct list_head *cb_list, struct pt_regs *regs)
241/* 242/*
242 * Handler for the virtual CPU timer. 243 * Handler for the virtual CPU timer.
243 */ 244 */
244static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code) 245static void do_cpu_timer_interrupt(__u16 error_code)
245{ 246{
246 int cpu; 247 int cpu;
247 __u64 next, delta; 248 __u64 next, delta;
@@ -274,7 +275,7 @@ static void do_cpu_timer_interrupt(struct pt_regs *regs, __u16 error_code)
274 list_move_tail(&event->entry, &cb_list); 275 list_move_tail(&event->entry, &cb_list);
275 } 276 }
276 spin_unlock(&vt_list->lock); 277 spin_unlock(&vt_list->lock);
277 do_callbacks(&cb_list, regs); 278 do_callbacks(&cb_list);
278 279
279 /* next event is first in list */ 280 /* next event is first in list */
280 spin_lock(&vt_list->lock); 281 spin_lock(&vt_list->lock);
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 9c3c19fe62fc..1c323bbfda91 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -451,7 +451,7 @@ void pfault_fini(void)
451} 451}
452 452
453asmlinkage void 453asmlinkage void
454pfault_interrupt(struct pt_regs *regs, __u16 error_code) 454pfault_interrupt(__u16 error_code)
455{ 455{
456 struct task_struct *tsk; 456 struct task_struct *tsk;
457 __u16 subcode; 457 __u16 subcode;
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 72f0201051a0..b3b6680a2a30 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -46,6 +46,7 @@
46#include <asm/pgtable.h> 46#include <asm/pgtable.h>
47#include <asm/pcic.h> 47#include <asm/pcic.h>
48#include <asm/cacheflush.h> 48#include <asm/cacheflush.h>
49#include <asm/irq_regs.h>
49 50
50#ifdef CONFIG_SMP 51#ifdef CONFIG_SMP
51#define SMP_NOP2 "nop; nop;\n\t" 52#define SMP_NOP2 "nop; nop;\n\t"
@@ -133,8 +134,8 @@ static void irq_panic(void)
133 prom_halt(); 134 prom_halt();
134} 135}
135 136
136void (*sparc_init_timers)(irqreturn_t (*)(int, void *,struct pt_regs *)) = 137void (*sparc_init_timers)(irq_handler_t ) =
137 (void (*)(irqreturn_t (*)(int, void *,struct pt_regs *))) irq_panic; 138 (void (*)(irq_handler_t )) irq_panic;
138 139
139/* 140/*
140 * Dave Redman (djhr@tadpole.co.uk) 141 * Dave Redman (djhr@tadpole.co.uk)
@@ -319,12 +320,14 @@ void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs)
319 320
320void handler_irq(int irq, struct pt_regs * regs) 321void handler_irq(int irq, struct pt_regs * regs)
321{ 322{
323 struct pt_regs *old_regs;
322 struct irqaction * action; 324 struct irqaction * action;
323 int cpu = smp_processor_id(); 325 int cpu = smp_processor_id();
324#ifdef CONFIG_SMP 326#ifdef CONFIG_SMP
325 extern void smp4m_irq_rotate(int cpu); 327 extern void smp4m_irq_rotate(int cpu);
326#endif 328#endif
327 329
330 old_regs = set_irq_regs(regs);
328 irq_enter(); 331 irq_enter();
329 disable_pil_irq(irq); 332 disable_pil_irq(irq);
330#ifdef CONFIG_SMP 333#ifdef CONFIG_SMP
@@ -338,27 +341,31 @@ void handler_irq(int irq, struct pt_regs * regs)
338 do { 341 do {
339 if (!action || !action->handler) 342 if (!action || !action->handler)
340 unexpected_irq(irq, NULL, regs); 343 unexpected_irq(irq, NULL, regs);
341 action->handler(irq, action->dev_id, regs); 344 action->handler(irq, action->dev_id);
342 action = action->next; 345 action = action->next;
343 } while (action); 346 } while (action);
344 sparc_irq[irq].flags &= ~SPARC_IRQ_INPROGRESS; 347 sparc_irq[irq].flags &= ~SPARC_IRQ_INPROGRESS;
345 enable_pil_irq(irq); 348 enable_pil_irq(irq);
346 irq_exit(); 349 irq_exit();
350 set_irq_regs(old_regs);
347} 351}
348 352
349#ifdef CONFIG_BLK_DEV_FD 353#ifdef CONFIG_BLK_DEV_FD
350extern void floppy_interrupt(int irq, void *dev_id, struct pt_regs *regs); 354extern void floppy_interrupt(int irq, void *dev_id)
351 355
352void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs) 356void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
353{ 357{
358 struct pt_regs *old_regs;
354 int cpu = smp_processor_id(); 359 int cpu = smp_processor_id();
355 360
361 old_regs = set_irq_regs(regs);
356 disable_pil_irq(irq); 362 disable_pil_irq(irq);
357 irq_enter(); 363 irq_enter();
358 kstat_cpu(cpu).irqs[irq]++; 364 kstat_cpu(cpu).irqs[irq]++;
359 floppy_interrupt(irq, dev_id, regs); 365 floppy_interrupt(irq, dev_id);
360 irq_exit(); 366 irq_exit();
361 enable_pil_irq(irq); 367 enable_pil_irq(irq);
368 set_irq_regs(old_regs);
362 // XXX Eek, it's totally changed with preempt_count() and such 369 // XXX Eek, it's totally changed with preempt_count() and such
363 // if (softirq_pending(cpu)) 370 // if (softirq_pending(cpu))
364 // do_softirq(); 371 // do_softirq();
@@ -369,7 +376,7 @@ void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
369 * thus no sharing possible. 376 * thus no sharing possible.
370 */ 377 */
371int request_fast_irq(unsigned int irq, 378int request_fast_irq(unsigned int irq,
372 irqreturn_t (*handler)(int, void *, struct pt_regs *), 379 irq_handler_t handler,
373 unsigned long irqflags, const char *devname) 380 unsigned long irqflags, const char *devname)
374{ 381{
375 struct irqaction *action; 382 struct irqaction *action;
@@ -468,7 +475,7 @@ out:
468} 475}
469 476
470int request_irq(unsigned int irq, 477int request_irq(unsigned int irq,
471 irqreturn_t (*handler)(int, void *, struct pt_regs *), 478 irq_handler_t handler,
472 unsigned long irqflags, const char * devname, void *dev_id) 479 unsigned long irqflags, const char * devname, void *dev_id)
473{ 480{
474 struct irqaction * action, **actionp; 481 struct irqaction * action, **actionp;
@@ -478,7 +485,7 @@ int request_irq(unsigned int irq,
478 485
479 if (sparc_cpu_model == sun4d) { 486 if (sparc_cpu_model == sun4d) {
480 extern int sun4d_request_irq(unsigned int, 487 extern int sun4d_request_irq(unsigned int,
481 irqreturn_t (*)(int, void *, struct pt_regs *), 488 irq_handler_t ,
482 unsigned long, const char *, void *); 489 unsigned long, const char *, void *);
483 return sun4d_request_irq(irq, handler, irqflags, devname, dev_id); 490 return sun4d_request_irq(irq, handler, irqflags, devname, dev_id);
484 } 491 }
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index edb6cc665f56..207f1b6eef53 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -34,6 +34,7 @@
34#include <asm/pcic.h> 34#include <asm/pcic.h>
35#include <asm/timer.h> 35#include <asm/timer.h>
36#include <asm/uaccess.h> 36#include <asm/uaccess.h>
37#include <asm/irq_regs.h>
37 38
38 39
39unsigned int pcic_pin_to_irq(unsigned int pin, char *name); 40unsigned int pcic_pin_to_irq(unsigned int pin, char *name);
@@ -708,13 +709,13 @@ static void pcic_clear_clock_irq(void)
708 pcic_timer_dummy = readl(pcic0.pcic_regs+PCI_SYS_LIMIT); 709 pcic_timer_dummy = readl(pcic0.pcic_regs+PCI_SYS_LIMIT);
709} 710}
710 711
711static irqreturn_t pcic_timer_handler (int irq, void *h, struct pt_regs *regs) 712static irqreturn_t pcic_timer_handler (int irq, void *h)
712{ 713{
713 write_seqlock(&xtime_lock); /* Dummy, to show that we remember */ 714 write_seqlock(&xtime_lock); /* Dummy, to show that we remember */
714 pcic_clear_clock_irq(); 715 pcic_clear_clock_irq();
715 do_timer(1); 716 do_timer(1);
716#ifndef CONFIG_SMP 717#ifndef CONFIG_SMP
717 update_process_times(user_mode(regs)); 718 update_process_times(user_mode(get_irq_regs()));
718#endif 719#endif
719 write_sequnlock(&xtime_lock); 720 write_sequnlock(&xtime_lock);
720 return IRQ_HANDLED; 721 return IRQ_HANDLED;
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c
index 4ca9e5fc97f4..2cc302b6bec0 100644
--- a/arch/sparc/kernel/prom.c
+++ b/arch/sparc/kernel/prom.c
@@ -243,7 +243,7 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len
243 void *old_val = prop->value; 243 void *old_val = prop->value;
244 int ret; 244 int ret;
245 245
246 ret = prom_setprop(dp->node, name, val, len); 246 ret = prom_setprop(dp->node, (char *) name, val, len);
247 err = -EINVAL; 247 err = -EINVAL;
248 if (ret >= 0) { 248 if (ret >= 0) {
249 prop->value = new_val; 249 prop->value = new_val;
@@ -477,7 +477,10 @@ static struct property * __init build_one_prop(phandle node, char *prev, char *s
477 p->length = 0; 477 p->length = 0;
478 } else { 478 } else {
479 p->value = prom_early_alloc(p->length + 1); 479 p->value = prom_early_alloc(p->length + 1);
480 prom_getproperty(node, p->name, p->value, p->length); 480 len = prom_getproperty(node, p->name, p->value,
481 p->length);
482 if (len <= 0)
483 p->length = 0;
481 ((unsigned char *)p->value)[p->length] = '\0'; 484 ((unsigned char *)p->value)[p->length] = '\0';
482 } 485 }
483 } 486 }
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index 0251cab4708b..f5ee1ac834bc 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -121,16 +121,6 @@ static struct console prom_debug_console = {
121 .index = -1, 121 .index = -1,
122}; 122};
123 123
124int obp_system_intr(void)
125{
126 if (boot_flags & BOOTME_DEBUG) {
127 printk("OBP: system interrupted\n");
128 prom_halt();
129 return 1;
130 }
131 return 0;
132}
133
134/* 124/*
135 * Process kernel command line switches that are specific to the 125 * Process kernel command line switches that are specific to the
136 * SPARC or that require special low-level processing. 126 * SPARC or that require special low-level processing.
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index 4d441a554d35..33dadd9f2871 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -87,6 +87,7 @@ extern void ___set_bit(void);
87extern void ___clear_bit(void); 87extern void ___clear_bit(void);
88extern void ___change_bit(void); 88extern void ___change_bit(void);
89extern void ___rw_read_enter(void); 89extern void ___rw_read_enter(void);
90extern void ___rw_read_try(void);
90extern void ___rw_read_exit(void); 91extern void ___rw_read_exit(void);
91extern void ___rw_write_enter(void); 92extern void ___rw_write_enter(void);
92 93
@@ -104,8 +105,9 @@ extern unsigned _Urem(unsigned, unsigned);
104EXPORT_SYMBOL(sparc_cpu_model); 105EXPORT_SYMBOL(sparc_cpu_model);
105EXPORT_SYMBOL(kernel_thread); 106EXPORT_SYMBOL(kernel_thread);
106#ifdef CONFIG_SMP 107#ifdef CONFIG_SMP
107// XXX find what uses (or used) these. 108// XXX find what uses (or used) these. AV: see asm/spinlock.h
108EXPORT_SYMBOL(___rw_read_enter); 109EXPORT_SYMBOL(___rw_read_enter);
110EXPORT_SYMBOL(___rw_read_try);
109EXPORT_SYMBOL(___rw_read_exit); 111EXPORT_SYMBOL(___rw_read_exit);
110EXPORT_SYMBOL(___rw_write_enter); 112EXPORT_SYMBOL(___rw_write_enter);
111#endif 113#endif
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
index 4be2c86ea540..009e891a4329 100644
--- a/arch/sparc/kernel/sun4c_irq.c
+++ b/arch/sparc/kernel/sun4c_irq.c
@@ -154,7 +154,7 @@ static void sun4c_load_profile_irq(int cpu, unsigned int limit)
154 /* Errm.. not sure how to do this.. */ 154 /* Errm.. not sure how to do this.. */
155} 155}
156 156
157static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *)) 157static void __init sun4c_init_timers(irq_handler_t counter_fn)
158{ 158{
159 int irq; 159 int irq;
160 160
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 74eed9775ac0..d4f9da8170c5 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -38,6 +38,7 @@
38#include <asm/sbus.h> 38#include <asm/sbus.h>
39#include <asm/sbi.h> 39#include <asm/sbi.h>
40#include <asm/cacheflush.h> 40#include <asm/cacheflush.h>
41#include <asm/irq_regs.h>
41 42
42/* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */ 43/* If you trust current SCSI layer to handle different SCSI IRQs, enable this. I don't trust it... -jj */
43/* #define DISTRIBUTE_IRQS */ 44/* #define DISTRIBUTE_IRQS */
@@ -198,6 +199,7 @@ extern void unexpected_irq(int, void *, struct pt_regs *);
198 199
199void sun4d_handler_irq(int irq, struct pt_regs * regs) 200void sun4d_handler_irq(int irq, struct pt_regs * regs)
200{ 201{
202 struct pt_regs *old_regs;
201 struct irqaction * action; 203 struct irqaction * action;
202 int cpu = smp_processor_id(); 204 int cpu = smp_processor_id();
203 /* SBUS IRQ level (1 - 7) */ 205 /* SBUS IRQ level (1 - 7) */
@@ -208,6 +210,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs)
208 210
209 cc_set_iclr(1 << irq); 211 cc_set_iclr(1 << irq);
210 212
213 old_regs = set_irq_regs(regs);
211 irq_enter(); 214 irq_enter();
212 kstat_cpu(cpu).irqs[irq]++; 215 kstat_cpu(cpu).irqs[irq]++;
213 if (!sbusl) { 216 if (!sbusl) {
@@ -215,7 +218,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs)
215 if (!action) 218 if (!action)
216 unexpected_irq(irq, NULL, regs); 219 unexpected_irq(irq, NULL, regs);
217 do { 220 do {
218 action->handler(irq, action->dev_id, regs); 221 action->handler(irq, action->dev_id);
219 action = action->next; 222 action = action->next;
220 } while (action); 223 } while (action);
221 } else { 224 } else {
@@ -242,7 +245,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs)
242 if (!action) 245 if (!action)
243 unexpected_irq(irq, NULL, regs); 246 unexpected_irq(irq, NULL, regs);
244 do { 247 do {
245 action->handler(irq, action->dev_id, regs); 248 action->handler(irq, action->dev_id);
246 action = action->next; 249 action = action->next;
247 } while (action); 250 } while (action);
248 release_sbi(SBI2DEVID(sbino), slot); 251 release_sbi(SBI2DEVID(sbino), slot);
@@ -250,6 +253,7 @@ void sun4d_handler_irq(int irq, struct pt_regs * regs)
250 } 253 }
251 } 254 }
252 irq_exit(); 255 irq_exit();
256 set_irq_regs(old_regs);
253} 257}
254 258
255unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq) 259unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq)
@@ -272,7 +276,7 @@ unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
272} 276}
273 277
274int sun4d_request_irq(unsigned int irq, 278int sun4d_request_irq(unsigned int irq,
275 irqreturn_t (*handler)(int, void *, struct pt_regs *), 279 irq_handler_t handler,
276 unsigned long irqflags, const char * devname, void *dev_id) 280 unsigned long irqflags, const char * devname, void *dev_id)
277{ 281{
278 struct irqaction *action, *tmp = NULL, **actionp; 282 struct irqaction *action, *tmp = NULL, **actionp;
@@ -466,7 +470,7 @@ static void sun4d_load_profile_irq(int cpu, unsigned int limit)
466 bw_set_prof_limit(cpu, limit); 470 bw_set_prof_limit(cpu, limit);
467} 471}
468 472
469static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *)) 473static void __init sun4d_init_timers(irq_handler_t counter_fn)
470{ 474{
471 int irq; 475 int irq;
472 int cpu; 476 int cpu;
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index 3ff4edd32815..c80ea61e8ba0 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -23,6 +23,7 @@
23 23
24#include <asm/ptrace.h> 24#include <asm/ptrace.h>
25#include <asm/atomic.h> 25#include <asm/atomic.h>
26#include <asm/irq_regs.h>
26 27
27#include <asm/delay.h> 28#include <asm/delay.h>
28#include <asm/irq.h> 29#include <asm/irq.h>
@@ -369,10 +370,12 @@ void smp4d_message_pass(int target, int msg, unsigned long data, int wait)
369 370
370void smp4d_percpu_timer_interrupt(struct pt_regs *regs) 371void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
371{ 372{
373 struct pt_regs *old_regs;
372 int cpu = hard_smp4d_processor_id(); 374 int cpu = hard_smp4d_processor_id();
373 static int cpu_tick[NR_CPUS]; 375 static int cpu_tick[NR_CPUS];
374 static char led_mask[] = { 0xe, 0xd, 0xb, 0x7, 0xb, 0xd }; 376 static char led_mask[] = { 0xe, 0xd, 0xb, 0x7, 0xb, 0xd };
375 377
378 old_regs = set_irq_regs(regs);
376 bw_get_prof_limit(cpu); 379 bw_get_prof_limit(cpu);
377 bw_clear_intr_mask(0, 1); /* INTR_TABLE[0] & 1 is Profile IRQ */ 380 bw_clear_intr_mask(0, 1); /* INTR_TABLE[0] & 1 is Profile IRQ */
378 381
@@ -384,7 +387,7 @@ void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
384 show_leds(cpu); 387 show_leds(cpu);
385 } 388 }
386 389
387 profile_tick(CPU_PROFILING, regs); 390 profile_tick(CPU_PROFILING);
388 391
389 if(!--prof_counter(cpu)) { 392 if(!--prof_counter(cpu)) {
390 int user = user_mode(regs); 393 int user = user_mode(regs);
@@ -395,6 +398,7 @@ void smp4d_percpu_timer_interrupt(struct pt_regs *regs)
395 398
396 prof_counter(cpu) = prof_multiplier(cpu); 399 prof_counter(cpu) = prof_multiplier(cpu);
397 } 400 }
401 set_irq_regs(old_regs);
398} 402}
399 403
400extern unsigned int lvl14_resolution; 404extern unsigned int lvl14_resolution;
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index 7cefa301efea..a654c16f4027 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -228,7 +228,7 @@ static void sun4m_load_profile_irq(int cpu, unsigned int limit)
228 sun4m_timers->cpu_timers[cpu].l14_timer_limit = limit; 228 sun4m_timers->cpu_timers[cpu].l14_timer_limit = limit;
229} 229}
230 230
231static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, struct pt_regs *)) 231static void __init sun4m_init_timers(irq_handler_t counter_fn)
232{ 232{
233 int reg_count, irq, cpu; 233 int reg_count, irq, cpu;
234 struct linux_prom_registers cnt_regs[PROMREG_MAX]; 234 struct linux_prom_registers cnt_regs[PROMREG_MAX];
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index 7d4a649138f6..e2d9c018bd56 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -19,6 +19,7 @@
19#include <linux/profile.h> 19#include <linux/profile.h>
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/tlbflush.h> 21#include <asm/tlbflush.h>
22#include <asm/irq_regs.h>
22 23
23#include <asm/ptrace.h> 24#include <asm/ptrace.h>
24#include <asm/atomic.h> 25#include <asm/atomic.h>
@@ -353,11 +354,14 @@ void smp4m_cross_call_irq(void)
353 354
354void smp4m_percpu_timer_interrupt(struct pt_regs *regs) 355void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
355{ 356{
357 struct pt_regs *old_regs;
356 int cpu = smp_processor_id(); 358 int cpu = smp_processor_id();
357 359
360 old_regs = set_irq_regs(regs);
361
358 clear_profile_irq(cpu); 362 clear_profile_irq(cpu);
359 363
360 profile_tick(CPU_PROFILING, regs); 364 profile_tick(CPU_PROFILING);
361 365
362 if(!--prof_counter(cpu)) { 366 if(!--prof_counter(cpu)) {
363 int user = user_mode(regs); 367 int user = user_mode(regs);
@@ -368,6 +372,7 @@ void smp4m_percpu_timer_interrupt(struct pt_regs *regs)
368 372
369 prof_counter(cpu) = prof_multiplier(cpu); 373 prof_counter(cpu) = prof_multiplier(cpu);
370 } 374 }
375 set_irq_regs(old_regs);
371} 376}
372 377
373extern unsigned int lvl14_resolution; 378extern unsigned int lvl14_resolution;
diff --git a/arch/sparc/kernel/tick14.c b/arch/sparc/kernel/tick14.c
index d3b4daac705f..f1a7bd19e04f 100644
--- a/arch/sparc/kernel/tick14.c
+++ b/arch/sparc/kernel/tick14.c
@@ -55,7 +55,7 @@ void install_obp_ticker(void)
55 linux_lvl14[3] = obp_lvl14[3]; 55 linux_lvl14[3] = obp_lvl14[3];
56} 56}
57 57
58void claim_ticker14(irqreturn_t (*handler)(int, void *, struct pt_regs *), 58void claim_ticker14(irq_handler_t handler,
59 int irq_nr, unsigned int timeout ) 59 int irq_nr, unsigned int timeout )
60{ 60{
61 int cpu = smp_processor_id(); 61 int cpu = smp_processor_id();
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index e10dc831944d..7dcd1a16c6e4 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -42,6 +42,7 @@
42#include <asm/page.h> 42#include <asm/page.h>
43#include <asm/pcic.h> 43#include <asm/pcic.h>
44#include <asm/of_device.h> 44#include <asm/of_device.h>
45#include <asm/irq_regs.h>
45 46
46DEFINE_SPINLOCK(rtc_lock); 47DEFINE_SPINLOCK(rtc_lock);
47enum sparc_clock_type sp_clock_typ; 48enum sparc_clock_type sp_clock_typ;
@@ -104,13 +105,13 @@ __volatile__ unsigned int *master_l10_limit;
104 105
105#define TICK_SIZE (tick_nsec / 1000) 106#define TICK_SIZE (tick_nsec / 1000)
106 107
107irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) 108irqreturn_t timer_interrupt(int irq, void *dev_id)
108{ 109{
109 /* last time the cmos clock got updated */ 110 /* last time the cmos clock got updated */
110 static long last_rtc_update; 111 static long last_rtc_update;
111 112
112#ifndef CONFIG_SMP 113#ifndef CONFIG_SMP
113 profile_tick(CPU_PROFILING, regs); 114 profile_tick(CPU_PROFILING);
114#endif 115#endif
115 116
116 /* Protect counter clear so that do_gettimeoffset works */ 117 /* Protect counter clear so that do_gettimeoffset works */
@@ -128,7 +129,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
128 129
129 do_timer(1); 130 do_timer(1);
130#ifndef CONFIG_SMP 131#ifndef CONFIG_SMP
131 update_process_times(user_mode(regs)); 132 update_process_times(user_mode(get_irq_regs()));
132#endif 133#endif
133 134
134 135
diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S
index 346c19a949fd..1dd78c84888a 100644
--- a/arch/sparc/kernel/vmlinux.lds.S
+++ b/arch/sparc/kernel/vmlinux.lds.S
@@ -36,11 +36,11 @@ SECTIONS
36 36
37 . = ALIGN(4096); 37 . = ALIGN(4096);
38 __init_begin = .; 38 __init_begin = .;
39 _sinittext = .;
39 .init.text : { 40 .init.text : {
40 _sinittext = .;
41 *(.init.text) 41 *(.init.text)
42 _einittext = .;
43 } 42 }
43 _einittext = .;
44 __init_text_end = .; 44 __init_text_end = .;
45 .init.data : { *(.init.data) } 45 .init.data : { *(.init.data) }
46 . = ALIGN(16); 46 . = ALIGN(16);
diff --git a/arch/sparc/lib/locks.S b/arch/sparc/lib/locks.S
index 95fa48424967..b1df55cb2215 100644
--- a/arch/sparc/lib/locks.S
+++ b/arch/sparc/lib/locks.S
@@ -25,6 +25,15 @@ ___rw_read_enter_spin_on_wlock:
25 ldstub [%g1 + 3], %g2 25 ldstub [%g1 + 3], %g2
26 b ___rw_read_enter_spin_on_wlock 26 b ___rw_read_enter_spin_on_wlock
27 ldub [%g1 + 3], %g2 27 ldub [%g1 + 3], %g2
28___rw_read_try_spin_on_wlock:
29 andcc %g2, 0xff, %g0
30 be,a ___rw_read_try
31 ldstub [%g1 + 3], %g2
32 xnorcc %g2, 0x0, %o0 /* if g2 is ~0, set o0 to 0 and bugger off */
33 bne,a ___rw_read_enter_spin_on_wlock
34 ld [%g1], %g2
35 retl
36 mov %g4, %o7
28___rw_read_exit_spin_on_wlock: 37___rw_read_exit_spin_on_wlock:
29 orcc %g2, 0x0, %g0 38 orcc %g2, 0x0, %g0
30 be,a ___rw_read_exit 39 be,a ___rw_read_exit
@@ -60,6 +69,17 @@ ___rw_read_exit:
60 retl 69 retl
61 mov %g4, %o7 70 mov %g4, %o7
62 71
72 .globl ___rw_read_try
73___rw_read_try:
74 orcc %g2, 0x0, %g0
75 bne ___rw_read_try_spin_on_wlock
76 ld [%g1], %g2
77 add %g2, 1, %g2
78 st %g2, [%g1]
79 set 1, %o1
80 retl
81 mov %g4, %o7
82
63 .globl ___rw_write_enter 83 .globl ___rw_write_enter
64___rw_write_enter: 84___rw_write_enter:
65 orcc %g2, 0x0, %g0 85 orcc %g2, 0x0, %g0
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index b27a506309ee..0df7121cef07 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -402,7 +402,7 @@ void srmmu_nocache_calcsize(void)
402 srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size; 402 srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size;
403} 403}
404 404
405void srmmu_nocache_init(void) 405void __init srmmu_nocache_init(void)
406{ 406{
407 unsigned int bitmap_bits; 407 unsigned int bitmap_bits;
408 pgd_t *pgd; 408 pgd_t *pgd;
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig
index f54ab375464b..dcae559879ae 100644
--- a/arch/sparc64/defconfig
+++ b/arch/sparc64/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 3# Linux kernel version: 2.6.19-rc1
4# Mon Oct 2 14:24:40 2006 4# Thu Oct 5 02:08:41 2006
5# 5#
6CONFIG_SPARC=y 6CONFIG_SPARC=y
7CONFIG_SPARC64=y 7CONFIG_SPARC64=y
@@ -197,6 +197,7 @@ CONFIG_INET_XFRM_TUNNEL=y
197CONFIG_INET_TUNNEL=y 197CONFIG_INET_TUNNEL=y
198CONFIG_INET_XFRM_MODE_TRANSPORT=y 198CONFIG_INET_XFRM_MODE_TRANSPORT=y
199CONFIG_INET_XFRM_MODE_TUNNEL=y 199CONFIG_INET_XFRM_MODE_TUNNEL=y
200CONFIG_INET_XFRM_MODE_BEET=y
200CONFIG_INET_DIAG=y 201CONFIG_INET_DIAG=y
201CONFIG_INET_TCP_DIAG=y 202CONFIG_INET_TCP_DIAG=y
202# CONFIG_TCP_CONG_ADVANCED is not set 203# CONFIG_TCP_CONG_ADVANCED is not set
@@ -214,6 +215,7 @@ CONFIG_INET6_XFRM_TUNNEL=m
214CONFIG_INET6_TUNNEL=m 215CONFIG_INET6_TUNNEL=m
215CONFIG_INET6_XFRM_MODE_TRANSPORT=m 216CONFIG_INET6_XFRM_MODE_TRANSPORT=m
216CONFIG_INET6_XFRM_MODE_TUNNEL=m 217CONFIG_INET6_XFRM_MODE_TUNNEL=m
218CONFIG_INET6_XFRM_MODE_BEET=m
217# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set 219# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
218CONFIG_IPV6_TUNNEL=m 220CONFIG_IPV6_TUNNEL=m
219# CONFIG_IPV6_SUBTREES is not set 221# CONFIG_IPV6_SUBTREES is not set
@@ -373,6 +375,7 @@ CONFIG_BLK_DEV_ALI15X3=y
373# CONFIG_BLK_DEV_CS5530 is not set 375# CONFIG_BLK_DEV_CS5530 is not set
374# CONFIG_BLK_DEV_HPT34X is not set 376# CONFIG_BLK_DEV_HPT34X is not set
375# CONFIG_BLK_DEV_HPT366 is not set 377# CONFIG_BLK_DEV_HPT366 is not set
378# CONFIG_BLK_DEV_JMICRON is not set
376# CONFIG_BLK_DEV_SC1200 is not set 379# CONFIG_BLK_DEV_SC1200 is not set
377# CONFIG_BLK_DEV_PIIX is not set 380# CONFIG_BLK_DEV_PIIX is not set
378# CONFIG_BLK_DEV_IT821X is not set 381# CONFIG_BLK_DEV_IT821X is not set
@@ -449,10 +452,10 @@ CONFIG_ISCSI_TCP=m
449# CONFIG_SCSI_INIA100 is not set 452# CONFIG_SCSI_INIA100 is not set
450# CONFIG_SCSI_STEX is not set 453# CONFIG_SCSI_STEX is not set
451# CONFIG_SCSI_SYM53C8XX_2 is not set 454# CONFIG_SCSI_SYM53C8XX_2 is not set
452# CONFIG_SCSI_IPR is not set
453# CONFIG_SCSI_QLOGIC_1280 is not set 455# CONFIG_SCSI_QLOGIC_1280 is not set
454# CONFIG_SCSI_QLOGICPTI is not set 456# CONFIG_SCSI_QLOGICPTI is not set
455# CONFIG_SCSI_QLA_FC is not set 457# CONFIG_SCSI_QLA_FC is not set
458# CONFIG_SCSI_QLA_ISCSI is not set
456# CONFIG_SCSI_LPFC is not set 459# CONFIG_SCSI_LPFC is not set
457# CONFIG_SCSI_DC395x is not set 460# CONFIG_SCSI_DC395x is not set
458# CONFIG_SCSI_DC390T is not set 461# CONFIG_SCSI_DC390T is not set
@@ -478,6 +481,7 @@ CONFIG_MD_RAID456=m
478CONFIG_MD_MULTIPATH=m 481CONFIG_MD_MULTIPATH=m
479# CONFIG_MD_FAULTY is not set 482# CONFIG_MD_FAULTY is not set
480CONFIG_BLK_DEV_DM=m 483CONFIG_BLK_DEV_DM=m
484# CONFIG_DM_DEBUG is not set
481CONFIG_DM_CRYPT=m 485CONFIG_DM_CRYPT=m
482CONFIG_DM_SNAPSHOT=m 486CONFIG_DM_SNAPSHOT=m
483CONFIG_DM_MIRROR=m 487CONFIG_DM_MIRROR=m
@@ -840,12 +844,12 @@ CONFIG_HWMON=y
840# 844#
841# Misc devices 845# Misc devices
842# 846#
847# CONFIG_TIFM_CORE is not set
843 848
844# 849#
845# Multimedia devices 850# Multimedia devices
846# 851#
847# CONFIG_VIDEO_DEV is not set 852# CONFIG_VIDEO_DEV is not set
848CONFIG_VIDEO_V4L2=y
849 853
850# 854#
851# Digital Video Broadcasting Devices 855# Digital Video Broadcasting Devices
@@ -858,6 +862,7 @@ CONFIG_VIDEO_V4L2=y
858# 862#
859# CONFIG_FIRMWARE_EDID is not set 863# CONFIG_FIRMWARE_EDID is not set
860CONFIG_FB=y 864CONFIG_FB=y
865CONFIG_FB_DDC=y
861CONFIG_FB_CFB_FILLRECT=y 866CONFIG_FB_CFB_FILLRECT=y
862CONFIG_FB_CFB_COPYAREA=y 867CONFIG_FB_CFB_COPYAREA=y
863CONFIG_FB_CFB_IMAGEBLIT=y 868CONFIG_FB_CFB_IMAGEBLIT=y
@@ -1236,6 +1241,7 @@ CONFIG_FS_MBCACHE=y
1236# CONFIG_JFS_FS is not set 1241# CONFIG_JFS_FS is not set
1237CONFIG_FS_POSIX_ACL=y 1242CONFIG_FS_POSIX_ACL=y
1238# CONFIG_XFS_FS is not set 1243# CONFIG_XFS_FS is not set
1244# CONFIG_GFS2_FS is not set
1239# CONFIG_OCFS2_FS is not set 1245# CONFIG_OCFS2_FS is not set
1240# CONFIG_MINIX_FS is not set 1246# CONFIG_MINIX_FS is not set
1241# CONFIG_ROMFS_FS is not set 1247# CONFIG_ROMFS_FS is not set
@@ -1279,6 +1285,7 @@ CONFIG_RAMFS=y
1279# 1285#
1280# CONFIG_ADFS_FS is not set 1286# CONFIG_ADFS_FS is not set
1281# CONFIG_AFFS_FS is not set 1287# CONFIG_AFFS_FS is not set
1288# CONFIG_ECRYPT_FS is not set
1282# CONFIG_HFS_FS is not set 1289# CONFIG_HFS_FS is not set
1283# CONFIG_HFSPLUS_FS is not set 1290# CONFIG_HFSPLUS_FS is not set
1284# CONFIG_BEFS_FS is not set 1291# CONFIG_BEFS_FS is not set
@@ -1355,6 +1362,10 @@ CONFIG_NLS_DEFAULT="iso8859-1"
1355# CONFIG_NLS_UTF8 is not set 1362# CONFIG_NLS_UTF8 is not set
1356 1363
1357# 1364#
1365# Distributed Lock Manager
1366#
1367
1368#
1358# Instrumentation Support 1369# Instrumentation Support
1359# 1370#
1360CONFIG_PROFILING=y 1371CONFIG_PROFILING=y
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index 8a9b470e1b65..2df25c2b4071 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -79,7 +79,7 @@ static void __ebus_dma_reset(struct ebus_dma_info *p, int no_drain)
79 } 79 }
80} 80}
81 81
82static irqreturn_t ebus_dma_irq(int irq, void *dev_id, struct pt_regs *regs) 82static irqreturn_t ebus_dma_irq(int irq, void *dev_id)
83{ 83{
84 struct ebus_dma_info *p = dev_id; 84 struct ebus_dma_info *p = dev_id;
85 unsigned long flags; 85 unsigned long flags;
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 4e64724cb9ae..d64b1ea848de 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -522,12 +522,13 @@ void ack_bad_irq(unsigned int virt_irq)
522} 522}
523 523
524#ifndef CONFIG_SMP 524#ifndef CONFIG_SMP
525extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *); 525extern irqreturn_t timer_interrupt(int, void *);
526 526
527void timer_irq(int irq, struct pt_regs *regs) 527void timer_irq(int irq, struct pt_regs *regs)
528{ 528{
529 unsigned long clr_mask = 1 << irq; 529 unsigned long clr_mask = 1 << irq;
530 unsigned long tick_mask = tick_ops->softint_mask; 530 unsigned long tick_mask = tick_ops->softint_mask;
531 struct pt_regs *old_regs;
531 532
532 if (get_softint() & tick_mask) { 533 if (get_softint() & tick_mask) {
533 irq = 0; 534 irq = 0;
@@ -535,21 +536,25 @@ void timer_irq(int irq, struct pt_regs *regs)
535 } 536 }
536 clear_softint(clr_mask); 537 clear_softint(clr_mask);
537 538
539 old_regs = set_irq_regs(regs);
538 irq_enter(); 540 irq_enter();
539 541
540 kstat_this_cpu.irqs[0]++; 542 kstat_this_cpu.irqs[0]++;
541 timer_interrupt(irq, NULL, regs); 543 timer_interrupt(irq, NULL);
542 544
543 irq_exit(); 545 irq_exit();
546 set_irq_regs(old_regs);
544} 547}
545#endif 548#endif
546 549
547void handler_irq(int irq, struct pt_regs *regs) 550void handler_irq(int irq, struct pt_regs *regs)
548{ 551{
549 struct ino_bucket *bucket; 552 struct ino_bucket *bucket;
553 struct pt_regs *old_regs;
550 554
551 clear_softint(1 << irq); 555 clear_softint(1 << irq);
552 556
557 old_regs = set_irq_regs(regs);
553 irq_enter(); 558 irq_enter();
554 559
555 /* Sliiiick... */ 560 /* Sliiiick... */
@@ -558,12 +563,13 @@ void handler_irq(int irq, struct pt_regs *regs)
558 struct ino_bucket *next = __bucket(bucket->irq_chain); 563 struct ino_bucket *next = __bucket(bucket->irq_chain);
559 564
560 bucket->irq_chain = 0; 565 bucket->irq_chain = 0;
561 __do_IRQ(bucket->virt_irq, regs); 566 __do_IRQ(bucket->virt_irq);
562 567
563 bucket = next; 568 bucket = next;
564 } 569 }
565 570
566 irq_exit(); 571 irq_exit();
572 set_irq_regs(old_regs);
567} 573}
568 574
569struct sun5_timer { 575struct sun5_timer {
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index 7f9204535770..d822c7c18e1f 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -841,7 +841,7 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
841 if (!parent) 841 if (!parent)
842 strcpy(op->dev.bus_id, "root"); 842 strcpy(op->dev.bus_id, "root");
843 else 843 else
844 strcpy(op->dev.bus_id, dp->path_component_name); 844 sprintf(op->dev.bus_id, "%s@%08x", dp->name, dp->node);
845 845
846 if (of_device_register(op)) { 846 if (of_device_register(op)) {
847 printk("%s: Could not register of device.\n", 847 printk("%s: Could not register of device.\n",
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index 1ec0aab68c08..fda5db223d96 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -533,7 +533,7 @@ static void psycho_check_iommu_error(struct pci_controller_info *p,
533#define PSYCHO_UEAFSR_RESV2 0x00000000007fffffUL /* Reserved */ 533#define PSYCHO_UEAFSR_RESV2 0x00000000007fffffUL /* Reserved */
534#define PSYCHO_UE_AFAR 0x0038UL 534#define PSYCHO_UE_AFAR 0x0038UL
535 535
536static irqreturn_t psycho_ue_intr(int irq, void *dev_id, struct pt_regs *regs) 536static irqreturn_t psycho_ue_intr(int irq, void *dev_id)
537{ 537{
538 struct pci_controller_info *p = dev_id; 538 struct pci_controller_info *p = dev_id;
539 unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_UE_AFSR; 539 unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_UE_AFSR;
@@ -610,7 +610,7 @@ static irqreturn_t psycho_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
610#define PSYCHO_CEAFSR_RESV2 0x00000000007fffffUL /* Reserved */ 610#define PSYCHO_CEAFSR_RESV2 0x00000000007fffffUL /* Reserved */
611#define PSYCHO_CE_AFAR 0x0040UL 611#define PSYCHO_CE_AFAR 0x0040UL
612 612
613static irqreturn_t psycho_ce_intr(int irq, void *dev_id, struct pt_regs *regs) 613static irqreturn_t psycho_ce_intr(int irq, void *dev_id)
614{ 614{
615 struct pci_controller_info *p = dev_id; 615 struct pci_controller_info *p = dev_id;
616 unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_CE_AFSR; 616 unsigned long afsr_reg = p->pbm_A.controller_regs + PSYCHO_CE_AFSR;
@@ -735,7 +735,7 @@ static irqreturn_t psycho_pcierr_intr_other(struct pci_pbm_info *pbm, int is_pbm
735 return ret; 735 return ret;
736} 736}
737 737
738static irqreturn_t psycho_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs) 738static irqreturn_t psycho_pcierr_intr(int irq, void *dev_id)
739{ 739{
740 struct pci_pbm_info *pbm = dev_id; 740 struct pci_pbm_info *pbm = dev_id;
741 struct pci_controller_info *p = pbm->parent; 741 struct pci_controller_info *p = pbm->parent;
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
index 45891850b90d..6ec569828c29 100644
--- a/arch/sparc64/kernel/pci_sabre.c
+++ b/arch/sparc64/kernel/pci_sabre.c
@@ -574,7 +574,7 @@ static void sabre_check_iommu_error(struct pci_controller_info *p,
574 spin_unlock_irqrestore(&iommu->lock, flags); 574 spin_unlock_irqrestore(&iommu->lock, flags);
575} 575}
576 576
577static irqreturn_t sabre_ue_intr(int irq, void *dev_id, struct pt_regs *regs) 577static irqreturn_t sabre_ue_intr(int irq, void *dev_id)
578{ 578{
579 struct pci_controller_info *p = dev_id; 579 struct pci_controller_info *p = dev_id;
580 unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_UE_AFSR; 580 unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_UE_AFSR;
@@ -634,7 +634,7 @@ static irqreturn_t sabre_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
634 return IRQ_HANDLED; 634 return IRQ_HANDLED;
635} 635}
636 636
637static irqreturn_t sabre_ce_intr(int irq, void *dev_id, struct pt_regs *regs) 637static irqreturn_t sabre_ce_intr(int irq, void *dev_id)
638{ 638{
639 struct pci_controller_info *p = dev_id; 639 struct pci_controller_info *p = dev_id;
640 unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_CE_AFSR; 640 unsigned long afsr_reg = p->pbm_A.controller_regs + SABRE_CE_AFSR;
@@ -726,7 +726,7 @@ static irqreturn_t sabre_pcierr_intr_other(struct pci_controller_info *p)
726 return ret; 726 return ret;
727} 727}
728 728
729static irqreturn_t sabre_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs) 729static irqreturn_t sabre_pcierr_intr(int irq, void *dev_id)
730{ 730{
731 struct pci_controller_info *p = dev_id; 731 struct pci_controller_info *p = dev_id;
732 unsigned long afsr_reg, afar_reg; 732 unsigned long afsr_reg, afar_reg;
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index 75ade83ecc65..66911b126aed 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -515,7 +515,7 @@ static void schizo_check_iommu_error(struct pci_controller_info *p,
515#define SCHIZO_UEAFSR_MTAG 0x000000000000e000UL /* Safari */ 515#define SCHIZO_UEAFSR_MTAG 0x000000000000e000UL /* Safari */
516#define SCHIZO_UEAFSR_ECCSYND 0x00000000000001ffUL /* Safari */ 516#define SCHIZO_UEAFSR_ECCSYND 0x00000000000001ffUL /* Safari */
517 517
518static irqreturn_t schizo_ue_intr(int irq, void *dev_id, struct pt_regs *regs) 518static irqreturn_t schizo_ue_intr(int irq, void *dev_id)
519{ 519{
520 struct pci_controller_info *p = dev_id; 520 struct pci_controller_info *p = dev_id;
521 unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_UE_AFSR; 521 unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_UE_AFSR;
@@ -603,7 +603,7 @@ static irqreturn_t schizo_ue_intr(int irq, void *dev_id, struct pt_regs *regs)
603#define SCHIZO_CEAFSR_MTAG 0x000000000000e000UL 603#define SCHIZO_CEAFSR_MTAG 0x000000000000e000UL
604#define SCHIZO_CEAFSR_ECCSYND 0x00000000000001ffUL 604#define SCHIZO_CEAFSR_ECCSYND 0x00000000000001ffUL
605 605
606static irqreturn_t schizo_ce_intr(int irq, void *dev_id, struct pt_regs *regs) 606static irqreturn_t schizo_ce_intr(int irq, void *dev_id)
607{ 607{
608 struct pci_controller_info *p = dev_id; 608 struct pci_controller_info *p = dev_id;
609 unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_CE_AFSR; 609 unsigned long afsr_reg = p->pbm_B.controller_regs + SCHIZO_CE_AFSR;
@@ -778,7 +778,7 @@ static irqreturn_t schizo_pcierr_intr_other(struct pci_pbm_info *pbm)
778 return ret; 778 return ret;
779} 779}
780 780
781static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id, struct pt_regs *regs) 781static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id)
782{ 782{
783 struct pci_pbm_info *pbm = dev_id; 783 struct pci_pbm_info *pbm = dev_id;
784 struct pci_controller_info *p = pbm->parent; 784 struct pci_controller_info *p = pbm->parent;
@@ -933,7 +933,7 @@ static irqreturn_t schizo_pcierr_intr(int irq, void *dev_id, struct pt_regs *reg
933/* We only expect UNMAP errors here. The rest of the Safari errors 933/* We only expect UNMAP errors here. The rest of the Safari errors
934 * are marked fatal and thus cause a system reset. 934 * are marked fatal and thus cause a system reset.
935 */ 935 */
936static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id, struct pt_regs *regs) 936static irqreturn_t schizo_safarierr_intr(int irq, void *dev_id)
937{ 937{
938 struct pci_controller_info *p = dev_id; 938 struct pci_controller_info *p = dev_id;
939 u64 errlog; 939 u64 errlog;
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 0b9c70627ce4..699b24b890df 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -35,7 +35,7 @@ static void __iomem *power_reg;
35static DECLARE_WAIT_QUEUE_HEAD(powerd_wait); 35static DECLARE_WAIT_QUEUE_HEAD(powerd_wait);
36static int button_pressed; 36static int button_pressed;
37 37
38static irqreturn_t power_handler(int irq, void *dev_id, struct pt_regs *regs) 38static irqreturn_t power_handler(int irq, void *dev_id)
39{ 39{
40 if (button_pressed == 0) { 40 if (button_pressed == 0) {
41 button_pressed = 1; 41 button_pressed = 1;
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index c49a57795743..01d6d869ea2b 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -839,7 +839,7 @@ unsigned int sbus_build_irq(void *buscookie, unsigned int ino)
839#define SYSIO_UEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */ 839#define SYSIO_UEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */
840#define SYSIO_UEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */ 840#define SYSIO_UEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */
841#define SYSIO_UEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ 841#define SYSIO_UEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */
842static irqreturn_t sysio_ue_handler(int irq, void *dev_id, struct pt_regs *regs) 842static irqreturn_t sysio_ue_handler(int irq, void *dev_id)
843{ 843{
844 struct sbus_bus *sbus = dev_id; 844 struct sbus_bus *sbus = dev_id;
845 struct sbus_iommu *iommu = sbus->iommu; 845 struct sbus_iommu *iommu = sbus->iommu;
@@ -911,7 +911,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id, struct pt_regs *regs)
911#define SYSIO_CEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */ 911#define SYSIO_CEAFSR_SIZE 0x00001c0000000000UL /* Bad transfer size 2^SIZE */
912#define SYSIO_CEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */ 912#define SYSIO_CEAFSR_MID 0x000003e000000000UL /* UPA MID causing the fault */
913#define SYSIO_CEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */ 913#define SYSIO_CEAFSR_RESV2 0x0000001fffffffffUL /* Reserved */
914static irqreturn_t sysio_ce_handler(int irq, void *dev_id, struct pt_regs *regs) 914static irqreturn_t sysio_ce_handler(int irq, void *dev_id)
915{ 915{
916 struct sbus_bus *sbus = dev_id; 916 struct sbus_bus *sbus = dev_id;
917 struct sbus_iommu *iommu = sbus->iommu; 917 struct sbus_iommu *iommu = sbus->iommu;
@@ -988,7 +988,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id, struct pt_regs *regs)
988#define SYSIO_SBAFSR_SIZE 0x00001c0000000000UL /* Size of transfer */ 988#define SYSIO_SBAFSR_SIZE 0x00001c0000000000UL /* Size of transfer */
989#define SYSIO_SBAFSR_MID 0x000003e000000000UL /* MID causing the error */ 989#define SYSIO_SBAFSR_MID 0x000003e000000000UL /* MID causing the error */
990#define SYSIO_SBAFSR_RESV3 0x0000001fffffffffUL /* Reserved */ 990#define SYSIO_SBAFSR_RESV3 0x0000001fffffffffUL /* Reserved */
991static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id, struct pt_regs *regs) 991static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id)
992{ 992{
993 struct sbus_bus *sbus = dev_id; 993 struct sbus_bus *sbus = dev_id;
994 struct sbus_iommu *iommu = sbus->iommu; 994 struct sbus_iommu *iommu = sbus->iommu;
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index 958287448cfe..cc8ad480a204 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -91,16 +91,6 @@ void kernel_enter_debugger(void)
91{ 91{
92} 92}
93 93
94int obp_system_intr(void)
95{
96 if (boot_flags & BOOTME_DEBUG) {
97 printk("OBP: system interrupted\n");
98 prom_halt();
99 return 1;
100 }
101 return 0;
102}
103
104/* 94/*
105 * Process kernel command line switches that are specific to the 95 * Process kernel command line switches that are specific to the
106 * SPARC or that require special low-level processing. 96 * SPARC or that require special low-level processing.
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index f62bf3a2de1a..cc09d8266414 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -31,6 +31,7 @@
31#include <asm/cpudata.h> 31#include <asm/cpudata.h>
32 32
33#include <asm/irq.h> 33#include <asm/irq.h>
34#include <asm/irq_regs.h>
34#include <asm/page.h> 35#include <asm/page.h>
35#include <asm/pgtable.h> 36#include <asm/pgtable.h>
36#include <asm/oplib.h> 37#include <asm/oplib.h>
@@ -1187,6 +1188,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
1187 unsigned long compare, tick, pstate; 1188 unsigned long compare, tick, pstate;
1188 int cpu = smp_processor_id(); 1189 int cpu = smp_processor_id();
1189 int user = user_mode(regs); 1190 int user = user_mode(regs);
1191 struct pt_regs *old_regs;
1190 1192
1191 /* 1193 /*
1192 * Check for level 14 softint. 1194 * Check for level 14 softint.
@@ -1203,8 +1205,9 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
1203 clear_softint(tick_mask); 1205 clear_softint(tick_mask);
1204 } 1206 }
1205 1207
1208 old_regs = set_irq_regs(regs);
1206 do { 1209 do {
1207 profile_tick(CPU_PROFILING, regs); 1210 profile_tick(CPU_PROFILING);
1208 if (!--prof_counter(cpu)) { 1211 if (!--prof_counter(cpu)) {
1209 irq_enter(); 1212 irq_enter();
1210 1213
@@ -1236,6 +1239,7 @@ void smp_percpu_timer_interrupt(struct pt_regs *regs)
1236 : /* no outputs */ 1239 : /* no outputs */
1237 : "r" (pstate)); 1240 : "r" (pstate));
1238 } while (time_after_eq(tick, compare)); 1241 } while (time_after_eq(tick, compare));
1242 set_irq_regs(old_regs);
1239} 1243}
1240 1244
1241static void __init smp_setup_percpu_timer(void) 1245static void __init smp_setup_percpu_timer(void)
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 00f6fc4aaaff..061e1b1fa583 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -45,6 +45,7 @@
45#include <asm/cpudata.h> 45#include <asm/cpudata.h>
46#include <asm/uaccess.h> 46#include <asm/uaccess.h>
47#include <asm/prom.h> 47#include <asm/prom.h>
48#include <asm/irq_regs.h>
48 49
49DEFINE_SPINLOCK(mostek_lock); 50DEFINE_SPINLOCK(mostek_lock);
50DEFINE_SPINLOCK(rtc_lock); 51DEFINE_SPINLOCK(rtc_lock);
@@ -452,7 +453,7 @@ static inline void timer_check_rtc(void)
452 } 453 }
453} 454}
454 455
455irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) 456irqreturn_t timer_interrupt(int irq, void *dev_id)
456{ 457{
457 unsigned long ticks, compare, pstate; 458 unsigned long ticks, compare, pstate;
458 459
@@ -460,8 +461,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
460 461
461 do { 462 do {
462#ifndef CONFIG_SMP 463#ifndef CONFIG_SMP
463 profile_tick(CPU_PROFILING, regs); 464 profile_tick(CPU_PROFILING);
464 update_process_times(user_mode(regs)); 465 update_process_times(user_mode(get_irq_regs()));
465#endif 466#endif
466 do_timer(1); 467 do_timer(1);
467 468
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index d75307589d74..78fb619bdb73 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -25,6 +25,19 @@ config PCI
25config PCMCIA 25config PCMCIA
26 bool 26 bool
27 27
28# Yet to do!
29config TRACE_IRQFLAGS_SUPPORT
30 bool
31 default n
32
33config LOCKDEP_SUPPORT
34 bool
35 default y
36
37config STACKTRACE_SUPPORT
38 bool
39 default y
40
28config GENERIC_CALIBRATE_DELAY 41config GENERIC_CALIBRATE_DELAY
29 bool 42 bool
30 default y 43 default y
@@ -37,13 +50,15 @@ config IRQ_RELEASE_METHOD
37menu "UML-specific options" 50menu "UML-specific options"
38 51
39config MODE_TT 52config MODE_TT
40 bool "Tracing thread support" 53 bool "Tracing thread support (DEPRECATED)"
41 default n 54 default n
42 help 55 help
43 This option controls whether tracing thread support is compiled 56 This option controls whether tracing thread support is compiled
44 into UML. This option is largely obsolete, given that skas0 provides 57 into UML. This option is largely obsolete, given that skas0 provides
45 skas security and performance without needing to patch the host. 58 skas security and performance without needing to patch the host.
46 It is safe to say 'N' here. 59 It is safe to say 'N' here; saying 'Y' may cause additional problems
60 with the resulting binary even if you run UML in SKAS mode, and running
61 in TT mode is strongly *NOT RECOMMENDED*.
47 62
48config STATIC_LINK 63config STATIC_LINK
49 bool "Force a static link" 64 bool "Force a static link"
@@ -56,6 +71,9 @@ config STATIC_LINK
56 for use in a chroot jail. So, if you intend to run UML inside a 71 for use in a chroot jail. So, if you intend to run UML inside a
57 chroot, and you disable CONFIG_MODE_TT, you probably want to say Y 72 chroot, and you disable CONFIG_MODE_TT, you probably want to say Y
58 here. 73 here.
74 Additionally, this option enables using higher memory spaces (up to
75 2.75G) for UML - disabling CONFIG_MODE_TT and enabling this option leads
76 to best results for this.
59 77
60config KERNEL_HALF_GIGS 78config KERNEL_HALF_GIGS
61 int "Kernel address space size (in .5G units)" 79 int "Kernel address space size (in .5G units)"
@@ -72,10 +90,13 @@ config MODE_SKAS
72 default y 90 default y
73 help 91 help
74 This option controls whether skas (separate kernel address space) 92 This option controls whether skas (separate kernel address space)
75 support is compiled in. If you have applied the skas patch to the 93 support is compiled in.
76 host, then you certainly want to say Y here (and consider saying N 94 Unless you have specific needs to use TT mode (which applies almost only
77 to CONFIG_MODE_TT). Otherwise, it is safe to say Y. Disabling this 95 to developers), you should say Y here.
78 option will shrink the UML binary slightly. 96 SKAS mode will make use of the SKAS3 patch if it is applied on the host
97 (and your UML will run in SKAS3 mode), but if no SKAS patch is applied
98 on the host it will run in SKAS0 mode, which is anyway faster than TT
99 mode.
79 100
80source "arch/um/Kconfig.arch" 101source "arch/um/Kconfig.arch"
81source "mm/Kconfig" 102source "mm/Kconfig"
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
index f6eb72d117b9..f191a550a079 100644
--- a/arch/um/Kconfig.i386
+++ b/arch/um/Kconfig.i386
@@ -16,23 +16,42 @@ config SEMAPHORE_SLEEPERS
16 bool 16 bool
17 default y 17 default y
18 18
19config HOST_2G_2G 19choice
20 bool "2G/2G host address space split" 20 prompt "Host memory split"
21 default n 21 default HOST_VMSPLIT_3G
22 help 22 ---help---
23 This is needed when the host on which you run has a 2G/2G memory 23 This is needed when the host kernel on which you run has a non-default
24 split, instead of the customary 3G/1G. 24 (like 2G/2G) memory split, instead of the customary 3G/1G. If you did
25 25 not recompile your own kernel but use the default distro's one, you can
26 Note that to enable such a host 26 safely accept the "Default split" option.
27 configuration, which makes sense only in some cases, you need special 27
28 host patches. 28 It can be enabled on recent (>=2.6.16-rc2) vanilla kernels via
29 29 CONFIG_VM_SPLIT_*, or on previous kernels with special patches (-ck
30 So, if you do not know what to do here, say 'N'. 30 patchset by Con Kolivas, or other ones) - option names match closely the
31 host CONFIG_VM_SPLIT_* ones.
32
33 A lower setting (where 1G/3G is lowest and 3G/1G is higher) will
34 tolerate even more "normal" host kernels, but an higher setting will be
35 stricter.
36
37 So, if you do not know what to do here, say 'Default split'.
38
39 config HOST_VMSPLIT_3G
40 bool "Default split (3G/1G user/kernel host split)"
41 config HOST_VMSPLIT_3G_OPT
42 bool "3G/1G user/kernel host split (for full 1G low memory)"
43 config HOST_VMSPLIT_2G
44 bool "2G/2G user/kernel host split"
45 config HOST_VMSPLIT_1G
46 bool "1G/3G user/kernel host split"
47endchoice
31 48
32config TOP_ADDR 49config TOP_ADDR
33 hex 50 hex
34 default 0xc0000000 if !HOST_2G_2G 51 default 0xB0000000 if HOST_VMSPLIT_3G_OPT
35 default 0x80000000 if HOST_2G_2G 52 default 0x78000000 if HOST_VMSPLIT_2G
53 default 0x40000000 if HOST_VMSPLIT_1G
54 default 0xC0000000
36 55
37config 3_LEVEL_PGTABLES 56config 3_LEVEL_PGTABLES
38 bool "Three-level pagetables (EXPERIMENTAL)" 57 bool "Three-level pagetables (EXPERIMENTAL)"
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64
index 11154b6773ec..d278682dd799 100644
--- a/arch/um/Makefile-x86_64
+++ b/arch/um/Makefile-x86_64
@@ -1,10 +1,10 @@
1# Copyright 2003 - 2004 Pathscale, Inc 1# Copyright 2003 - 2004 Pathscale, Inc
2# Released under the GPL 2# Released under the GPL
3 3
4core-y += arch/um/sys-x86_64/ 4core-y += arch/um/sys-x86_64/ arch/x86_64/crypto/
5START := 0x60000000 5START := 0x60000000
6 6
7_extra_flags_ = -fno-builtin -m64 -mcmodel=kernel 7_extra_flags_ = -fno-builtin -m64
8 8
9#We #undef __x86_64__ for kernelspace, not for userspace where 9#We #undef __x86_64__ for kernelspace, not for userspace where
10#it's needed for headers to work! 10#it's needed for headers to work!
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index cfd9f01fd464..426633e5d6e3 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -20,7 +20,7 @@
20 20
21#define LINE_BUFSIZE 4096 21#define LINE_BUFSIZE 4096
22 22
23static irqreturn_t line_interrupt(int irq, void *data, struct pt_regs *unused) 23static irqreturn_t line_interrupt(int irq, void *data)
24{ 24{
25 struct chan *chan = data; 25 struct chan *chan = data;
26 struct line *line = chan->line; 26 struct line *line = chan->line;
@@ -364,8 +364,7 @@ void line_unthrottle(struct tty_struct *tty)
364 reactivate_chan(&line->chan_list, line->driver->read_irq); 364 reactivate_chan(&line->chan_list, line->driver->read_irq);
365} 365}
366 366
367static irqreturn_t line_write_interrupt(int irq, void *data, 367static irqreturn_t line_write_interrupt(int irq, void *data)
368 struct pt_regs *unused)
369{ 368{
370 struct chan *chan = data; 369 struct chan *chan = data;
371 struct line *line = chan->line; 370 struct line *line = chan->line;
@@ -712,7 +711,7 @@ struct winch {
712 struct tty_struct *tty; 711 struct tty_struct *tty;
713}; 712};
714 713
715static irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused) 714static irqreturn_t winch_interrupt(int irq, void *data)
716{ 715{
717 struct winch *winch = data; 716 struct winch *winch = data;
718 struct tty_struct *tty; 717 struct tty_struct *tty;
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index a67dcbd78de4..d08bd036ccb8 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -74,8 +74,7 @@ static void mc_work_proc(void *unused)
74 74
75static DECLARE_WORK(mconsole_work, mc_work_proc, NULL); 75static DECLARE_WORK(mconsole_work, mc_work_proc, NULL);
76 76
77static irqreturn_t mconsole_interrupt(int irq, void *dev_id, 77static irqreturn_t mconsole_interrupt(int irq, void *dev_id)
78 struct pt_regs *regs)
79{ 78{
80 /* long to avoid size mismatch warnings from gcc */ 79 /* long to avoid size mismatch warnings from gcc */
81 long fd; 80 long fd;
@@ -674,8 +673,9 @@ static void with_console(struct mc_request *req, void (*proc)(void *),
674static void sysrq_proc(void *arg) 673static void sysrq_proc(void *arg)
675{ 674{
676 char *op = arg; 675 char *op = arg;
677 676 struct pt_regs *old_regs = set_irq_regs(&current->thread.regs);
678 handle_sysrq(*op, &current->thread.regs, NULL); 677 handle_sysrq(*op, NULL);
678 set_irq_regs(old_regs);
679} 679}
680 680
681void mconsole_sysrq(struct mc_request *req) 681void mconsole_sysrq(struct mc_request *req)
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index c1c5604752fb..ec9eb8bd9432 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -77,7 +77,7 @@ static void uml_dev_close(void* dev)
77 dev_close( (struct net_device *) dev); 77 dev_close( (struct net_device *) dev);
78} 78}
79 79
80irqreturn_t uml_net_interrupt(int irq, void *dev_id, struct pt_regs *regs) 80irqreturn_t uml_net_interrupt(int irq, void *dev_id)
81{ 81{
82 struct net_device *dev = dev_id; 82 struct net_device *dev = dev_id;
83 struct uml_net_private *lp = dev->priv; 83 struct uml_net_private *lp = dev->priv;
diff --git a/arch/um/drivers/pcap_user.h b/arch/um/drivers/pcap_user.h
index 58f9f6a1420f..96b80b565eeb 100644
--- a/arch/um/drivers/pcap_user.h
+++ b/arch/um/drivers/pcap_user.h
@@ -15,7 +15,7 @@ struct pcap_data {
15 void *dev; 15 void *dev;
16}; 16};
17 17
18extern struct net_user_info pcap_user_info; 18extern const struct net_user_info pcap_user_info;
19 19
20extern int pcap_user_read(int fd, void *buf, int len, struct pcap_data *pri); 20extern int pcap_user_read(int fd, void *buf, int len, struct pcap_data *pri);
21 21
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c
index 73755f37a8a8..ce9f3733f73e 100644
--- a/arch/um/drivers/port_kern.c
+++ b/arch/um/drivers/port_kern.c
@@ -47,7 +47,7 @@ struct connection {
47 struct port_list *port; 47 struct port_list *port;
48}; 48};
49 49
50static irqreturn_t pipe_interrupt(int irq, void *data, struct pt_regs *regs) 50static irqreturn_t pipe_interrupt(int irq, void *data)
51{ 51{
52 struct connection *conn = data; 52 struct connection *conn = data;
53 int fd; 53 int fd;
@@ -152,7 +152,7 @@ void port_work_proc(void *unused)
152 152
153DECLARE_WORK(port_work, port_work_proc, NULL); 153DECLARE_WORK(port_work, port_work_proc, NULL);
154 154
155static irqreturn_t port_interrupt(int irq, void *data, struct pt_regs *regs) 155static irqreturn_t port_interrupt(int irq, void *data)
156{ 156{
157 struct port_list *port = data; 157 struct port_list *port = data;
158 158
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index f0b0668458b7..bc458f57921b 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -524,7 +524,7 @@ static void ubd_handler(void)
524 do_ubd_request(ubd_queue); 524 do_ubd_request(ubd_queue);
525} 525}
526 526
527static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused) 527static irqreturn_t ubd_intr(int irq, void *dev)
528{ 528{
529 ubd_handler(); 529 ubd_handler();
530 return(IRQ_HANDLED); 530 return(IRQ_HANDLED);
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c
index 6036ec85895a..a4ce7058e10e 100644
--- a/arch/um/drivers/xterm_kern.c
+++ b/arch/um/drivers/xterm_kern.c
@@ -21,7 +21,7 @@ struct xterm_wait {
21 int new_fd; 21 int new_fd;
22}; 22};
23 23
24static irqreturn_t xterm_interrupt(int irq, void *data, struct pt_regs *regs) 24static irqreturn_t xterm_interrupt(int irq, void *data)
25{ 25{
26 struct xterm_wait *xterm = data; 26 struct xterm_wait *xterm = data;
27 int fd; 27 int fd;
diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h
index 356390d1f8b9..461175f8b1d9 100644
--- a/arch/um/include/common-offsets.h
+++ b/arch/um/include/common-offsets.h
@@ -1,9 +1,16 @@
1/* for use by sys-$SUBARCH/kernel-offsets.c */ 1/* for use by sys-$SUBARCH/kernel-offsets.c */
2 2
3DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
4#ifdef CONFIG_MODE_TT
5OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid);
6#endif
7
3OFFSET(HOST_TASK_REGS, task_struct, thread.regs); 8OFFSET(HOST_TASK_REGS, task_struct, thread.regs);
4OFFSET(HOST_TASK_PID, task_struct, pid); 9OFFSET(HOST_TASK_PID, task_struct, pid);
10
5DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE); 11DEFINE(UM_KERN_PAGE_SIZE, PAGE_SIZE);
6DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC); 12DEFINE(UM_NSEC_PER_SEC, NSEC_PER_SEC);
13
7DEFINE_STR(UM_KERN_EMERG, KERN_EMERG); 14DEFINE_STR(UM_KERN_EMERG, KERN_EMERG);
8DEFINE_STR(UM_KERN_ALERT, KERN_ALERT); 15DEFINE_STR(UM_KERN_ALERT, KERN_ALERT);
9DEFINE_STR(UM_KERN_CRIT, KERN_CRIT); 16DEFINE_STR(UM_KERN_CRIT, KERN_CRIT);
@@ -12,6 +19,10 @@ DEFINE_STR(UM_KERN_WARNING, KERN_WARNING);
12DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE); 19DEFINE_STR(UM_KERN_NOTICE, KERN_NOTICE);
13DEFINE_STR(UM_KERN_INFO, KERN_INFO); 20DEFINE_STR(UM_KERN_INFO, KERN_INFO);
14DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG); 21DEFINE_STR(UM_KERN_DEBUG, KERN_DEBUG);
22
15DEFINE(UM_ELF_CLASS, ELF_CLASS); 23DEFINE(UM_ELF_CLASS, ELF_CLASS);
16DEFINE(UM_ELFCLASS32, ELFCLASS32); 24DEFINE(UM_ELFCLASS32, ELFCLASS32);
17DEFINE(UM_ELFCLASS64, ELFCLASS64); 25DEFINE(UM_ELFCLASS64, ELFCLASS64);
26
27/* For crypto assembler code. */
28DEFINE(crypto_tfm_ctx_offset, offsetof(struct crypto_tfm, __crt_ctx));
diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h
index c222d56b1494..4f775597fd5f 100644
--- a/arch/um/include/irq_kern.h
+++ b/arch/um/include/irq_kern.h
@@ -10,12 +10,11 @@
10#include "asm/ptrace.h" 10#include "asm/ptrace.h"
11 11
12extern int um_request_irq(unsigned int irq, int fd, int type, 12extern int um_request_irq(unsigned int irq, int fd, int type,
13 irqreturn_t (*handler)(int, void *, 13 irq_handler_t handler,
14 struct pt_regs *),
15 unsigned long irqflags, const char * devname, 14 unsigned long irqflags, const char * devname,
16 void *dev_id); 15 void *dev_id);
17extern int init_aio_irq(int irq, char *name, 16extern int init_aio_irq(int irq, char *name,
18 irqreturn_t (*handler)(int, void *, struct pt_regs *)); 17 irq_handler_t handler);
19 18
20#endif 19#endif
21 20
diff --git a/arch/um/include/longjmp.h b/arch/um/include/longjmp.h
index e93c6d3e893b..e860bc5848e0 100644
--- a/arch/um/include/longjmp.h
+++ b/arch/um/include/longjmp.h
@@ -12,7 +12,8 @@ extern void longjmp(jmp_buf, int);
12} while(0) 12} while(0)
13 13
14#define UML_SETJMP(buf) ({ \ 14#define UML_SETJMP(buf) ({ \
15 int n, enable; \ 15 int n; \
16 volatile int enable; \
16 enable = get_signals(); \ 17 enable = get_signals(); \
17 n = setjmp(*buf); \ 18 n = setjmp(*buf); \
18 if(n != 0) \ 19 if(n != 0) \
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 120ca21a513a..6516f6dca96d 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -201,6 +201,7 @@ extern int os_getpgrp(void);
201 201
202#ifdef UML_CONFIG_MODE_TT 202#ifdef UML_CONFIG_MODE_TT
203extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); 203extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int));
204extern void stop(void);
204#endif 205#endif
205extern void init_new_thread_signals(void); 206extern void init_new_thread_signals(void);
206extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); 207extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr);
diff --git a/arch/um/include/sysdep-i386/kernel-offsets.h b/arch/um/include/sysdep-i386/kernel-offsets.h
index 2c13de321f2f..97ec9d894d75 100644
--- a/arch/um/include/sysdep-i386/kernel-offsets.h
+++ b/arch/um/include/sysdep-i386/kernel-offsets.h
@@ -1,6 +1,7 @@
1#include <linux/stddef.h> 1#include <linux/stddef.h>
2#include <linux/sched.h> 2#include <linux/sched.h>
3#include <linux/elf.h> 3#include <linux/elf.h>
4#include <linux/crypto.h>
4#include <asm/mman.h> 5#include <asm/mman.h>
5 6
6#define DEFINE(sym, val) \ 7#define DEFINE(sym, val) \
@@ -17,9 +18,5 @@
17void foo(void) 18void foo(void)
18{ 19{
19 OFFSET(HOST_TASK_DEBUGREGS, task_struct, thread.arch.debugregs); 20 OFFSET(HOST_TASK_DEBUGREGS, task_struct, thread.arch.debugregs);
20 DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
21#ifdef CONFIG_MODE_TT
22 OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid);
23#endif
24#include <common-offsets.h> 21#include <common-offsets.h>
25} 22}
diff --git a/arch/um/include/sysdep-x86_64/kernel-offsets.h b/arch/um/include/sysdep-x86_64/kernel-offsets.h
index 91d129fb3930..a307237b7964 100644
--- a/arch/um/include/sysdep-x86_64/kernel-offsets.h
+++ b/arch/um/include/sysdep-x86_64/kernel-offsets.h
@@ -2,6 +2,7 @@
2#include <linux/sched.h> 2#include <linux/sched.h>
3#include <linux/time.h> 3#include <linux/time.h>
4#include <linux/elf.h> 4#include <linux/elf.h>
5#include <linux/crypto.h>
5#include <asm/page.h> 6#include <asm/page.h>
6#include <asm/mman.h> 7#include <asm/mman.h>
7 8
@@ -18,9 +19,5 @@
18 19
19void foo(void) 20void foo(void)
20{ 21{
21 DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
22#ifdef CONFIG_MODE_TT
23 OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid);
24#endif
25#include <common-offsets.h> 22#include <common-offsets.h>
26} 23}
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index eee97bb81ba5..ef259569fd8c 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -355,14 +355,16 @@ void forward_interrupts(int pid)
355 */ 355 */
356unsigned int do_IRQ(int irq, union uml_pt_regs *regs) 356unsigned int do_IRQ(int irq, union uml_pt_regs *regs)
357{ 357{
358 irq_enter(); 358 struct pt_regs *old_regs = set_irq_regs((struct pt_regs *)regs);
359 __do_IRQ(irq, (struct pt_regs *)regs); 359 irq_enter();
360 irq_exit(); 360 __do_IRQ(irq);
361 return 1; 361 irq_exit();
362 set_irq_regs(old_regs);
363 return 1;
362} 364}
363 365
364int um_request_irq(unsigned int irq, int fd, int type, 366int um_request_irq(unsigned int irq, int fd, int type,
365 irqreturn_t (*handler)(int, void *, struct pt_regs *), 367 irq_handler_t handler,
366 unsigned long irqflags, const char * devname, 368 unsigned long irqflags, const char * devname,
367 void *dev_id) 369 void *dev_id)
368{ 370{
@@ -423,8 +425,7 @@ void __init init_IRQ(void)
423 } 425 }
424} 426}
425 427
426int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, 428int init_aio_irq(int irq, char *name, irq_handler_t handler)
427 struct pt_regs *))
428{ 429{
429 int fds[2], err; 430 int fds[2], err;
430 431
diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio.c
index 0ad755ceb212..2b0ab438301c 100644
--- a/arch/um/kernel/sigio.c
+++ b/arch/um/kernel/sigio.c
@@ -17,7 +17,7 @@
17/* Protected by sigio_lock() called from write_sigio_workaround */ 17/* Protected by sigio_lock() called from write_sigio_workaround */
18static int sigio_irq_fd = -1; 18static int sigio_irq_fd = -1;
19 19
20static irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused) 20static irqreturn_t sigio_interrupt(int irq, void *data)
21{ 21{
22 char c; 22 char c;
23 23
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c
index c17eddcf89b3..2c6d090a2e87 100644
--- a/arch/um/kernel/skas/mmu.c
+++ b/arch/um/kernel/skas/mmu.c
@@ -60,10 +60,7 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
60#endif 60#endif
61 61
62 *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT)); 62 *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT));
63 /* This is wrong for the code page, but it doesn't matter since the 63 *pte = pte_mkread(*pte);
64 * stub is mapped by hand with the correct permissions.
65 */
66 *pte = pte_mkwrite(*pte);
67 return(0); 64 return(0);
68 65
69 out_pmd: 66 out_pmd:
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c
index a92965f8f9cd..2e354b3ca060 100644
--- a/arch/um/kernel/time.c
+++ b/arch/um/kernel/time.c
@@ -86,7 +86,7 @@ static inline unsigned long long get_time(void)
86 return nsecs; 86 return nsecs;
87} 87}
88 88
89irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs) 89irqreturn_t um_timer(int irq, void *dev)
90{ 90{
91 unsigned long long nsecs; 91 unsigned long long nsecs;
92 unsigned long flags; 92 unsigned long flags;
diff --git a/arch/um/kernel/tt/uaccess_user.c b/arch/um/kernel/tt/uaccess_user.c
index 6c92bbccb49c..ed1abcf4d057 100644
--- a/arch/um/kernel/tt/uaccess_user.c
+++ b/arch/um/kernel/tt/uaccess_user.c
@@ -4,13 +4,13 @@
4 * Licensed under the GPL 4 * Licensed under the GPL
5 */ 5 */
6 6
7#include <setjmp.h>
8#include <string.h> 7#include <string.h>
9#include "user_util.h" 8#include "user_util.h"
10#include "uml_uaccess.h" 9#include "uml_uaccess.h"
11#include "task.h" 10#include "task.h"
12#include "kern_util.h" 11#include "kern_util.h"
13#include "os.h" 12#include "os.h"
13#include "longjmp.h"
14 14
15int __do_copy_from_user(void *to, const void *from, int n, 15int __do_copy_from_user(void *to, const void *from, int n,
16 void **fault_addr, void **fault_catcher) 16 void **fault_addr, void **fault_catcher)
@@ -80,10 +80,10 @@ int __do_strnlen_user(const char *str, unsigned long n,
80 struct tt_regs save = TASK_REGS(get_current())->tt; 80 struct tt_regs save = TASK_REGS(get_current())->tt;
81 int ret; 81 int ret;
82 unsigned long *faddrp = (unsigned long *)fault_addr; 82 unsigned long *faddrp = (unsigned long *)fault_addr;
83 sigjmp_buf jbuf; 83 jmp_buf jbuf;
84 84
85 *fault_catcher = &jbuf; 85 *fault_catcher = &jbuf;
86 if(sigsetjmp(jbuf, 1) == 0) 86 if(UML_SETJMP(&jbuf) == 0)
87 ret = strlen(str) + 1; 87 ret = strlen(str) + 1;
88 else ret = *faddrp - (unsigned long) str; 88 else ret = *faddrp - (unsigned long) str;
89 89
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c
index 5461a065bbb9..3dc3a02d6263 100644
--- a/arch/um/os-Linux/tt.c
+++ b/arch/um/os-Linux/tt.c
@@ -10,7 +10,6 @@
10#include <errno.h> 10#include <errno.h>
11#include <stdarg.h> 11#include <stdarg.h>
12#include <stdlib.h> 12#include <stdlib.h>
13#include <setjmp.h>
14#include <sys/time.h> 13#include <sys/time.h>
15#include <sys/ptrace.h> 14#include <sys/ptrace.h>
16#include <linux/ptrace.h> 15#include <linux/ptrace.h>
diff --git a/arch/um/os-Linux/util.c b/arch/um/os-Linux/util.c
index 3f5b1514e8a7..56b8a50e8bc2 100644
--- a/arch/um/os-Linux/util.c
+++ b/arch/um/os-Linux/util.c
@@ -80,11 +80,18 @@ void setup_machinename(char *machine_out)
80 struct utsname host; 80 struct utsname host;
81 81
82 uname(&host); 82 uname(&host);
83#if defined(UML_CONFIG_UML_X86) && !defined(UML_CONFIG_64BIT) 83#ifdef UML_CONFIG_UML_X86
84# ifndef UML_CONFIG_64BIT
84 if (!strcmp(host.machine, "x86_64")) { 85 if (!strcmp(host.machine, "x86_64")) {
85 strcpy(machine_out, "i686"); 86 strcpy(machine_out, "i686");
86 return; 87 return;
87 } 88 }
89# else
90 if (!strcmp(host.machine, "i686")) {
91 strcpy(machine_out, "x86_64");
92 return;
93 }
94# endif
88#endif 95#endif
89 strcpy(machine_out, host.machine); 96 strcpy(machine_out, host.machine);
90} 97}
diff --git a/arch/um/sys-x86_64/ksyms.c b/arch/um/sys-x86_64/ksyms.c
index 859273808203..12c593607c59 100644
--- a/arch/um/sys-x86_64/ksyms.c
+++ b/arch/um/sys-x86_64/ksyms.c
@@ -14,6 +14,3 @@ EXPORT_SYMBOL(__up_wakeup);
14 14
15/*XXX: we need them because they would be exported by x86_64 */ 15/*XXX: we need them because they would be exported by x86_64 */
16EXPORT_SYMBOL(__memcpy); 16EXPORT_SYMBOL(__memcpy);
17
18/* Networking helper routines. */
19EXPORT_SYMBOL(ip_compute_csum);
diff --git a/arch/x86_64/ia32/ptrace32.c b/arch/x86_64/ia32/ptrace32.c
index d18198ed636b..3a7561d4703e 100644
--- a/arch/x86_64/ia32/ptrace32.c
+++ b/arch/x86_64/ia32/ptrace32.c
@@ -205,9 +205,9 @@ static int getreg32(struct task_struct *child, unsigned regno, u32 *val)
205static long ptrace32_siginfo(unsigned request, u32 pid, u32 addr, u32 data) 205static long ptrace32_siginfo(unsigned request, u32 pid, u32 addr, u32 data)
206{ 206{
207 int ret; 207 int ret;
208 compat_siginfo_t *si32 = (compat_siginfo_t *)compat_ptr(data); 208 compat_siginfo_t __user *si32 = compat_ptr(data);
209 siginfo_t ssi; 209 siginfo_t ssi;
210 siginfo_t *si = compat_alloc_user_space(sizeof(siginfo_t)); 210 siginfo_t __user *si = compat_alloc_user_space(sizeof(siginfo_t));
211 if (request == PTRACE_SETSIGINFO) { 211 if (request == PTRACE_SETSIGINFO) {
212 memset(&ssi, 0, sizeof(siginfo_t)); 212 memset(&ssi, 0, sizeof(siginfo_t));
213 ret = copy_siginfo_from_user32(&ssi, si32); 213 ret = copy_siginfo_from_user32(&ssi, si32);
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index af4a1c71a80d..4d9d5ed942b2 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -913,8 +913,10 @@ void smp_local_timer_interrupt(void)
913 * [ if a single-CPU system runs an SMP kernel then we call the local 913 * [ if a single-CPU system runs an SMP kernel then we call the local
914 * interrupt as well. Thus we cannot inline the local irq ... ] 914 * interrupt as well. Thus we cannot inline the local irq ... ]
915 */ 915 */
916void smp_apic_timer_interrupt(void) 916void smp_apic_timer_interrupt(struct pt_regs *regs)
917{ 917{
918 struct pt_regs *old_regs = set_irq_regs(regs);
919
918 /* 920 /*
919 * the NMI deadlock-detector uses this. 921 * the NMI deadlock-detector uses this.
920 */ 922 */
@@ -934,6 +936,7 @@ void smp_apic_timer_interrupt(void)
934 irq_enter(); 936 irq_enter();
935 smp_local_timer_interrupt(); 937 smp_local_timer_interrupt();
936 irq_exit(); 938 irq_exit();
939 set_irq_regs(old_regs);
937} 940}
938 941
939/* 942/*
diff --git a/arch/x86_64/kernel/genapic_cluster.c b/arch/x86_64/kernel/genapic_cluster.c
index cdb90e671b88..73d76308b955 100644
--- a/arch/x86_64/kernel/genapic_cluster.c
+++ b/arch/x86_64/kernel/genapic_cluster.c
@@ -63,6 +63,13 @@ static cpumask_t cluster_target_cpus(void)
63 return cpumask_of_cpu(0); 63 return cpumask_of_cpu(0);
64} 64}
65 65
66static cpumask_t cluster_vector_allocation_domain(int cpu)
67{
68 cpumask_t domain = CPU_MASK_NONE;
69 cpu_set(cpu, domain);
70 return domain;
71}
72
66static void cluster_send_IPI_mask(cpumask_t mask, int vector) 73static void cluster_send_IPI_mask(cpumask_t mask, int vector)
67{ 74{
68 send_IPI_mask_sequence(mask, vector); 75 send_IPI_mask_sequence(mask, vector);
@@ -119,6 +126,7 @@ struct genapic apic_cluster = {
119 .int_delivery_mode = dest_Fixed, 126 .int_delivery_mode = dest_Fixed,
120 .int_dest_mode = (APIC_DEST_PHYSICAL != 0), 127 .int_dest_mode = (APIC_DEST_PHYSICAL != 0),
121 .target_cpus = cluster_target_cpus, 128 .target_cpus = cluster_target_cpus,
129 .vector_allocation_domain = cluster_vector_allocation_domain,
122 .apic_id_registered = cluster_apic_id_registered, 130 .apic_id_registered = cluster_apic_id_registered,
123 .init_apic_ldr = cluster_init_apic_ldr, 131 .init_apic_ldr = cluster_init_apic_ldr,
124 .send_IPI_all = cluster_send_IPI_all, 132 .send_IPI_all = cluster_send_IPI_all,
diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c
index 50ad153eaac4..0dfc223c1839 100644
--- a/arch/x86_64/kernel/genapic_flat.c
+++ b/arch/x86_64/kernel/genapic_flat.c
@@ -22,6 +22,20 @@ static cpumask_t flat_target_cpus(void)
22 return cpu_online_map; 22 return cpu_online_map;
23} 23}
24 24
25static cpumask_t flat_vector_allocation_domain(int cpu)
26{
27 /* Careful. Some cpus do not strictly honor the set of cpus
28 * specified in the interrupt destination when using lowest
29 * priority interrupt delivery mode.
30 *
31 * In particular there was a hyperthreading cpu observed to
32 * deliver interrupts to the wrong hyperthread when only one
33 * hyperthread was specified in the interrupt desitination.
34 */
35 cpumask_t domain = { { [0] = APIC_ALL_CPUS, } };
36 return domain;
37}
38
25/* 39/*
26 * Set up the logical destination ID. 40 * Set up the logical destination ID.
27 * 41 *
@@ -121,6 +135,7 @@ struct genapic apic_flat = {
121 .int_delivery_mode = dest_LowestPrio, 135 .int_delivery_mode = dest_LowestPrio,
122 .int_dest_mode = (APIC_DEST_LOGICAL != 0), 136 .int_dest_mode = (APIC_DEST_LOGICAL != 0),
123 .target_cpus = flat_target_cpus, 137 .target_cpus = flat_target_cpus,
138 .vector_allocation_domain = flat_vector_allocation_domain,
124 .apic_id_registered = flat_apic_id_registered, 139 .apic_id_registered = flat_apic_id_registered,
125 .init_apic_ldr = flat_init_apic_ldr, 140 .init_apic_ldr = flat_init_apic_ldr,
126 .send_IPI_all = flat_send_IPI_all, 141 .send_IPI_all = flat_send_IPI_all,
@@ -141,6 +156,14 @@ static cpumask_t physflat_target_cpus(void)
141 return cpumask_of_cpu(0); 156 return cpumask_of_cpu(0);
142} 157}
143 158
159static cpumask_t physflat_vector_allocation_domain(int cpu)
160{
161 cpumask_t domain = CPU_MASK_NONE;
162 cpu_set(cpu, domain);
163 return domain;
164}
165
166
144static void physflat_send_IPI_mask(cpumask_t cpumask, int vector) 167static void physflat_send_IPI_mask(cpumask_t cpumask, int vector)
145{ 168{
146 send_IPI_mask_sequence(cpumask, vector); 169 send_IPI_mask_sequence(cpumask, vector);
@@ -179,6 +202,7 @@ struct genapic apic_physflat = {
179 .int_delivery_mode = dest_Fixed, 202 .int_delivery_mode = dest_Fixed,
180 .int_dest_mode = (APIC_DEST_PHYSICAL != 0), 203 .int_dest_mode = (APIC_DEST_PHYSICAL != 0),
181 .target_cpus = physflat_target_cpus, 204 .target_cpus = physflat_target_cpus,
205 .vector_allocation_domain = physflat_vector_allocation_domain,
182 .apic_id_registered = flat_apic_id_registered, 206 .apic_id_registered = flat_apic_id_registered,
183 .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/ 207 .init_apic_ldr = flat_init_apic_ldr,/*not needed, but shouldn't hurt*/
184 .send_IPI_all = physflat_send_IPI_all, 208 .send_IPI_all = physflat_send_IPI_all,
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 91728d9d3472..44b55f833875 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -47,7 +47,7 @@
47#include <asm/msidef.h> 47#include <asm/msidef.h>
48#include <asm/hypertransport.h> 48#include <asm/hypertransport.h>
49 49
50static int assign_irq_vector(int irq, cpumask_t mask); 50static int assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result);
51 51
52#define __apicdebuginit __init 52#define __apicdebuginit __init
53 53
@@ -174,12 +174,10 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
174 174
175 cpus_and(mask, tmp, CPU_MASK_ALL); 175 cpus_and(mask, tmp, CPU_MASK_ALL);
176 176
177 vector = assign_irq_vector(irq, mask); 177 vector = assign_irq_vector(irq, mask, &tmp);
178 if (vector < 0) 178 if (vector < 0)
179 return; 179 return;
180 180
181 cpus_clear(tmp);
182 cpu_set(vector >> 8, tmp);
183 dest = cpu_mask_to_apicid(tmp); 181 dest = cpu_mask_to_apicid(tmp);
184 182
185 /* 183 /*
@@ -188,7 +186,7 @@ static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
188 dest = SET_APIC_LOGICAL_ID(dest); 186 dest = SET_APIC_LOGICAL_ID(dest);
189 187
190 spin_lock_irqsave(&ioapic_lock, flags); 188 spin_lock_irqsave(&ioapic_lock, flags);
191 __target_IO_APIC_irq(irq, dest, vector & 0xff); 189 __target_IO_APIC_irq(irq, dest, vector);
192 set_native_irq_info(irq, mask); 190 set_native_irq_info(irq, mask);
193 spin_unlock_irqrestore(&ioapic_lock, flags); 191 spin_unlock_irqrestore(&ioapic_lock, flags);
194} 192}
@@ -563,9 +561,45 @@ static inline int IO_APIC_irq_trigger(int irq)
563} 561}
564 562
565/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */ 563/* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
566unsigned int irq_vector[NR_IRQ_VECTORS] __read_mostly = { FIRST_EXTERNAL_VECTOR, 0 }; 564static u8 irq_vector[NR_IRQ_VECTORS] __read_mostly = {
565 [0] = FIRST_EXTERNAL_VECTOR + 0,
566 [1] = FIRST_EXTERNAL_VECTOR + 1,
567 [2] = FIRST_EXTERNAL_VECTOR + 2,
568 [3] = FIRST_EXTERNAL_VECTOR + 3,
569 [4] = FIRST_EXTERNAL_VECTOR + 4,
570 [5] = FIRST_EXTERNAL_VECTOR + 5,
571 [6] = FIRST_EXTERNAL_VECTOR + 6,
572 [7] = FIRST_EXTERNAL_VECTOR + 7,
573 [8] = FIRST_EXTERNAL_VECTOR + 8,
574 [9] = FIRST_EXTERNAL_VECTOR + 9,
575 [10] = FIRST_EXTERNAL_VECTOR + 10,
576 [11] = FIRST_EXTERNAL_VECTOR + 11,
577 [12] = FIRST_EXTERNAL_VECTOR + 12,
578 [13] = FIRST_EXTERNAL_VECTOR + 13,
579 [14] = FIRST_EXTERNAL_VECTOR + 14,
580 [15] = FIRST_EXTERNAL_VECTOR + 15,
581};
582
583static cpumask_t irq_domain[NR_IRQ_VECTORS] __read_mostly = {
584 [0] = CPU_MASK_ALL,
585 [1] = CPU_MASK_ALL,
586 [2] = CPU_MASK_ALL,
587 [3] = CPU_MASK_ALL,
588 [4] = CPU_MASK_ALL,
589 [5] = CPU_MASK_ALL,
590 [6] = CPU_MASK_ALL,
591 [7] = CPU_MASK_ALL,
592 [8] = CPU_MASK_ALL,
593 [9] = CPU_MASK_ALL,
594 [10] = CPU_MASK_ALL,
595 [11] = CPU_MASK_ALL,
596 [12] = CPU_MASK_ALL,
597 [13] = CPU_MASK_ALL,
598 [14] = CPU_MASK_ALL,
599 [15] = CPU_MASK_ALL,
600};
567 601
568static int __assign_irq_vector(int irq, cpumask_t mask) 602static int __assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result)
569{ 603{
570 /* 604 /*
571 * NOTE! The local APIC isn't very good at handling 605 * NOTE! The local APIC isn't very good at handling
@@ -587,16 +621,24 @@ static int __assign_irq_vector(int irq, cpumask_t mask)
587 621
588 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS); 622 BUG_ON((unsigned)irq >= NR_IRQ_VECTORS);
589 623
590 if (IO_APIC_VECTOR(irq) > 0) 624 if (irq_vector[irq] > 0)
591 old_vector = IO_APIC_VECTOR(irq); 625 old_vector = irq_vector[irq];
592 if ((old_vector > 0) && cpu_isset(old_vector >> 8, mask)) { 626 if (old_vector > 0) {
593 return old_vector; 627 cpus_and(*result, irq_domain[irq], mask);
628 if (!cpus_empty(*result))
629 return old_vector;
594 } 630 }
595 631
596 for_each_cpu_mask(cpu, mask) { 632 for_each_cpu_mask(cpu, mask) {
633 cpumask_t domain;
634 int first, new_cpu;
597 int vector, offset; 635 int vector, offset;
598 vector = pos[cpu].vector; 636
599 offset = pos[cpu].offset; 637 domain = vector_allocation_domain(cpu);
638 first = first_cpu(domain);
639
640 vector = pos[first].vector;
641 offset = pos[first].offset;
600next: 642next:
601 vector += 8; 643 vector += 8;
602 if (vector >= FIRST_SYSTEM_VECTOR) { 644 if (vector >= FIRST_SYSTEM_VECTOR) {
@@ -604,35 +646,40 @@ next:
604 offset = (offset + 1) % 8; 646 offset = (offset + 1) % 8;
605 vector = FIRST_DEVICE_VECTOR + offset; 647 vector = FIRST_DEVICE_VECTOR + offset;
606 } 648 }
607 if (unlikely(pos[cpu].vector == vector)) 649 if (unlikely(pos[first].vector == vector))
608 continue; 650 continue;
609 if (vector == IA32_SYSCALL_VECTOR) 651 if (vector == IA32_SYSCALL_VECTOR)
610 goto next; 652 goto next;
611 if (per_cpu(vector_irq, cpu)[vector] != -1) 653 for_each_cpu_mask(new_cpu, domain)
612 goto next; 654 if (per_cpu(vector_irq, cpu)[vector] != -1)
655 goto next;
613 /* Found one! */ 656 /* Found one! */
614 pos[cpu].vector = vector; 657 for_each_cpu_mask(new_cpu, domain) {
615 pos[cpu].offset = offset; 658 pos[cpu].vector = vector;
659 pos[cpu].offset = offset;
660 }
616 if (old_vector >= 0) { 661 if (old_vector >= 0) {
617 int old_cpu = old_vector >> 8; 662 int old_cpu;
618 old_vector &= 0xff; 663 for_each_cpu_mask(old_cpu, irq_domain[irq])
619 per_cpu(vector_irq, old_cpu)[old_vector] = -1; 664 per_cpu(vector_irq, old_cpu)[old_vector] = -1;
620 } 665 }
621 per_cpu(vector_irq, cpu)[vector] = irq; 666 for_each_cpu_mask(new_cpu, domain)
622 vector |= cpu << 8; 667 per_cpu(vector_irq, new_cpu)[vector] = irq;
623 IO_APIC_VECTOR(irq) = vector; 668 irq_vector[irq] = vector;
669 irq_domain[irq] = domain;
670 cpus_and(*result, domain, mask);
624 return vector; 671 return vector;
625 } 672 }
626 return -ENOSPC; 673 return -ENOSPC;
627} 674}
628 675
629static int assign_irq_vector(int irq, cpumask_t mask) 676static int assign_irq_vector(int irq, cpumask_t mask, cpumask_t *result)
630{ 677{
631 int vector; 678 int vector;
632 unsigned long flags; 679 unsigned long flags;
633 680
634 spin_lock_irqsave(&vector_lock, flags); 681 spin_lock_irqsave(&vector_lock, flags);
635 vector = __assign_irq_vector(irq, mask); 682 vector = __assign_irq_vector(irq, mask, result);
636 spin_unlock_irqrestore(&vector_lock, flags); 683 spin_unlock_irqrestore(&vector_lock, flags);
637 return vector; 684 return vector;
638} 685}
@@ -704,14 +751,12 @@ static void __init setup_IO_APIC_irqs(void)
704 751
705 if (IO_APIC_IRQ(irq)) { 752 if (IO_APIC_IRQ(irq)) {
706 cpumask_t mask; 753 cpumask_t mask;
707 vector = assign_irq_vector(irq, TARGET_CPUS); 754 vector = assign_irq_vector(irq, TARGET_CPUS, &mask);
708 if (vector < 0) 755 if (vector < 0)
709 continue; 756 continue;
710 757
711 cpus_clear(mask);
712 cpu_set(vector >> 8, mask);
713 entry.dest.logical.logical_dest = cpu_mask_to_apicid(mask); 758 entry.dest.logical.logical_dest = cpu_mask_to_apicid(mask);
714 entry.vector = vector & 0xff; 759 entry.vector = vector;
715 760
716 ioapic_register_intr(irq, vector, IOAPIC_AUTO); 761 ioapic_register_intr(irq, vector, IOAPIC_AUTO);
717 if (!apic && (irq < 16)) 762 if (!apic && (irq < 16))
@@ -1289,7 +1334,7 @@ static inline void init_IO_APIC_traps(void)
1289 */ 1334 */
1290 for (irq = 0; irq < NR_IRQS ; irq++) { 1335 for (irq = 0; irq < NR_IRQS ; irq++) {
1291 int tmp = irq; 1336 int tmp = irq;
1292 if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) { 1337 if (IO_APIC_IRQ(tmp) && !irq_vector[tmp]) {
1293 /* 1338 /*
1294 * Hmm.. We don't have an entry for this, 1339 * Hmm.. We don't have an entry for this,
1295 * so default to an old-fashioned 8259 1340 * so default to an old-fashioned 8259
@@ -1430,12 +1475,13 @@ static inline void check_timer(void)
1430{ 1475{
1431 int apic1, pin1, apic2, pin2; 1476 int apic1, pin1, apic2, pin2;
1432 int vector; 1477 int vector;
1478 cpumask_t mask;
1433 1479
1434 /* 1480 /*
1435 * get/set the timer IRQ vector: 1481 * get/set the timer IRQ vector:
1436 */ 1482 */
1437 disable_8259A_irq(0); 1483 disable_8259A_irq(0);
1438 vector = assign_irq_vector(0, TARGET_CPUS); 1484 vector = assign_irq_vector(0, TARGET_CPUS, &mask);
1439 1485
1440 /* 1486 /*
1441 * Subtle, code in do_timer_interrupt() expects an AEOI 1487 * Subtle, code in do_timer_interrupt() expects an AEOI
@@ -1667,6 +1713,7 @@ int create_irq(void)
1667 int new; 1713 int new;
1668 int vector = 0; 1714 int vector = 0;
1669 unsigned long flags; 1715 unsigned long flags;
1716 cpumask_t mask;
1670 1717
1671 irq = -ENOSPC; 1718 irq = -ENOSPC;
1672 spin_lock_irqsave(&vector_lock, flags); 1719 spin_lock_irqsave(&vector_lock, flags);
@@ -1675,7 +1722,7 @@ int create_irq(void)
1675 continue; 1722 continue;
1676 if (irq_vector[new] != 0) 1723 if (irq_vector[new] != 0)
1677 continue; 1724 continue;
1678 vector = __assign_irq_vector(new, TARGET_CPUS); 1725 vector = __assign_irq_vector(new, TARGET_CPUS, &mask);
1679 if (likely(vector > 0)) 1726 if (likely(vector > 0))
1680 irq = new; 1727 irq = new;
1681 break; 1728 break;
@@ -1707,13 +1754,10 @@ static int msi_compose_msg(struct pci_dev *pdev, unsigned int irq, struct msi_ms
1707{ 1754{
1708 int vector; 1755 int vector;
1709 unsigned dest; 1756 unsigned dest;
1757 cpumask_t tmp;
1710 1758
1711 vector = assign_irq_vector(irq, TARGET_CPUS); 1759 vector = assign_irq_vector(irq, TARGET_CPUS, &tmp);
1712 if (vector >= 0) { 1760 if (vector >= 0) {
1713 cpumask_t tmp;
1714
1715 cpus_clear(tmp);
1716 cpu_set(vector >> 8, tmp);
1717 dest = cpu_mask_to_apicid(tmp); 1761 dest = cpu_mask_to_apicid(tmp);
1718 1762
1719 msg->address_hi = MSI_ADDR_BASE_HI; 1763 msg->address_hi = MSI_ADDR_BASE_HI;
@@ -1752,12 +1796,10 @@ static void set_msi_irq_affinity(unsigned int irq, cpumask_t mask)
1752 1796
1753 cpus_and(mask, tmp, CPU_MASK_ALL); 1797 cpus_and(mask, tmp, CPU_MASK_ALL);
1754 1798
1755 vector = assign_irq_vector(irq, mask); 1799 vector = assign_irq_vector(irq, mask, &tmp);
1756 if (vector < 0) 1800 if (vector < 0)
1757 return; 1801 return;
1758 1802
1759 cpus_clear(tmp);
1760 cpu_set(vector >> 8, tmp);
1761 dest = cpu_mask_to_apicid(tmp); 1803 dest = cpu_mask_to_apicid(tmp);
1762 1804
1763 read_msi_msg(irq, &msg); 1805 read_msi_msg(irq, &msg);
@@ -1844,12 +1886,10 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
1844 1886
1845 cpus_and(mask, tmp, CPU_MASK_ALL); 1887 cpus_and(mask, tmp, CPU_MASK_ALL);
1846 1888
1847 vector = assign_irq_vector(irq, mask); 1889 vector = assign_irq_vector(irq, mask, &tmp);
1848 if (vector < 0) 1890 if (vector < 0)
1849 return; 1891 return;
1850 1892
1851 cpus_clear(tmp);
1852 cpu_set(vector >> 8, tmp);
1853 dest = cpu_mask_to_apicid(tmp); 1893 dest = cpu_mask_to_apicid(tmp);
1854 1894
1855 target_ht_irq(irq, dest, vector & 0xff); 1895 target_ht_irq(irq, dest, vector & 0xff);
@@ -1857,7 +1897,7 @@ static void set_ht_irq_affinity(unsigned int irq, cpumask_t mask)
1857} 1897}
1858#endif 1898#endif
1859 1899
1860static struct hw_interrupt_type ht_irq_chip = { 1900static struct irq_chip ht_irq_chip = {
1861 .name = "PCI-HT", 1901 .name = "PCI-HT",
1862 .mask = mask_ht_irq, 1902 .mask = mask_ht_irq,
1863 .unmask = unmask_ht_irq, 1903 .unmask = unmask_ht_irq,
@@ -1871,15 +1911,13 @@ static struct hw_interrupt_type ht_irq_chip = {
1871int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev) 1911int arch_setup_ht_irq(unsigned int irq, struct pci_dev *dev)
1872{ 1912{
1873 int vector; 1913 int vector;
1914 cpumask_t tmp;
1874 1915
1875 vector = assign_irq_vector(irq, TARGET_CPUS); 1916 vector = assign_irq_vector(irq, TARGET_CPUS, &tmp);
1876 if (vector >= 0) { 1917 if (vector >= 0) {
1877 u32 low, high; 1918 u32 low, high;
1878 unsigned dest; 1919 unsigned dest;
1879 cpumask_t tmp;
1880 1920
1881 cpus_clear(tmp);
1882 cpu_set(vector >> 8, tmp);
1883 dest = cpu_mask_to_apicid(tmp); 1921 dest = cpu_mask_to_apicid(tmp);
1884 1922
1885 high = HT_IRQ_HIGH_DEST_ID(dest); 1923 high = HT_IRQ_HIGH_DEST_ID(dest);
@@ -1945,13 +1983,10 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p
1945 add_pin_to_irq(irq, ioapic, pin); 1983 add_pin_to_irq(irq, ioapic, pin);
1946 1984
1947 1985
1948 vector = assign_irq_vector(irq, TARGET_CPUS); 1986 vector = assign_irq_vector(irq, TARGET_CPUS, &mask);
1949 if (vector < 0) 1987 if (vector < 0)
1950 return vector; 1988 return vector;
1951 1989
1952 cpus_clear(mask);
1953 cpu_set(vector >> 8, mask);
1954
1955 /* 1990 /*
1956 * Generate a PCI IRQ routing entry and program the IOAPIC accordingly. 1991 * Generate a PCI IRQ routing entry and program the IOAPIC accordingly.
1957 * Note that we mask (disable) IRQs now -- these get enabled when the 1992 * Note that we mask (disable) IRQs now -- these get enabled when the
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index b8a407fcd5d5..dff68eb2b787 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -114,16 +114,16 @@ asmlinkage unsigned int do_IRQ(struct pt_regs *regs)
114 irq_enter(); 114 irq_enter();
115 irq = __get_cpu_var(vector_irq)[vector]; 115 irq = __get_cpu_var(vector_irq)[vector];
116 116
117 if (unlikely(irq >= NR_IRQS)) {
118 printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
119 __FUNCTION__, irq);
120 BUG();
121 }
122
123#ifdef CONFIG_DEBUG_STACKOVERFLOW 117#ifdef CONFIG_DEBUG_STACKOVERFLOW
124 stack_overflow_check(regs); 118 stack_overflow_check(regs);
125#endif 119#endif
126 generic_handle_irq(irq); 120
121 if (likely(irq < NR_IRQS))
122 generic_handle_irq(irq);
123 else
124 printk(KERN_EMERG "%s: %d.%d No irq handler for vector\n",
125 __func__, smp_processor_id(), vector);
126
127 irq_exit(); 127 irq_exit();
128 128
129 set_irq_regs(old_regs); 129 set_irq_regs(old_regs);
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 19c72520a868..971dc1181e69 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -406,9 +406,12 @@ void __cpuinit zap_low_mappings(int cpu)
406#ifndef CONFIG_NUMA 406#ifndef CONFIG_NUMA
407void __init paging_init(void) 407void __init paging_init(void)
408{ 408{
409 unsigned long max_zone_pfns[MAX_NR_ZONES] = {MAX_DMA_PFN, 409 unsigned long max_zone_pfns[MAX_NR_ZONES];
410 MAX_DMA32_PFN, 410 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
411 end_pfn}; 411 max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
412 max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
413 max_zone_pfns[ZONE_NORMAL] = end_pfn;
414
412 memory_present(0, 0, end_pfn); 415 memory_present(0, 0, end_pfn);
413 sparse_init(); 416 sparse_init();
414 free_area_init_nodes(max_zone_pfns); 417 free_area_init_nodes(max_zone_pfns);
diff --git a/arch/x86_64/mm/numa.c b/arch/x86_64/mm/numa.c
index 829a008bd39b..2ee2e003606c 100644
--- a/arch/x86_64/mm/numa.c
+++ b/arch/x86_64/mm/numa.c
@@ -338,9 +338,11 @@ static void __init arch_sparse_init(void)
338void __init paging_init(void) 338void __init paging_init(void)
339{ 339{
340 int i; 340 int i;
341 unsigned long max_zone_pfns[MAX_NR_ZONES] = { MAX_DMA_PFN, 341 unsigned long max_zone_pfns[MAX_NR_ZONES];
342 MAX_DMA32_PFN, 342 memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
343 end_pfn}; 343 max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN;
344 max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN;
345 max_zone_pfns[ZONE_NORMAL] = end_pfn;
344 346
345 arch_sparse_init(); 347 arch_sparse_init();
346 348