aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2006-07-03 17:24:23 -0400
committerSam Ravnborg <sam@mars.ravnborg.org>2006-07-03 17:24:23 -0400
commit05668381140309088443bf5dc53add4104610fbb (patch)
treeed53039717390e1a71ff16209281b1f1c8d3e6be
parent34c162f79e374556dd1384437f0dab558b5dc657 (diff)
parent29454dde27d8e340bb1987bad9aa504af7081eba (diff)
Merge branch 'master' of /home/sam/kernel/linux-2.6/
-rw-r--r--Documentation/DocBook/mtdnand.tmpl6
-rw-r--r--Documentation/DocBook/videobook.tmpl2
-rw-r--r--Documentation/arm/IXP4xx2
-rw-r--r--Documentation/digiepca.txt2
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--Documentation/memory-barriers.txt2
-rw-r--r--Documentation/networking/pktgen.txt2
-rw-r--r--Documentation/pci.txt2
-rw-r--r--Documentation/pcmcia/crc32hash.c32
-rw-r--r--Documentation/pcmcia/devicetable.txt36
-rw-r--r--Documentation/scsi/tmscsim.txt2
-rw-r--r--Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl8
-rw-r--r--Documentation/video4linux/CARDLIST.cx881
-rw-r--r--MAINTAINERS7
-rw-r--r--arch/alpha/kernel/alpha_ksyms.c1
-rw-r--r--arch/alpha/kernel/console.c1
-rw-r--r--arch/alpha/kernel/entry.S1
-rw-r--r--arch/alpha/kernel/gct.c1
-rw-r--r--arch/alpha/kernel/head.S1
-rw-r--r--arch/alpha/kernel/irq.c5
-rw-r--r--arch/alpha/kernel/irq_alpha.c3
-rw-r--r--arch/alpha/kernel/irq_i8259.c1
-rw-r--r--arch/alpha/kernel/machvec_impl.h1
-rw-r--r--arch/alpha/kernel/pci.c1
-rw-r--r--arch/alpha/kernel/process.c1
-rw-r--r--arch/alpha/kernel/proto.h1
-rw-r--r--arch/alpha/kernel/smc37c93x.c1
-rw-r--r--arch/alpha/kernel/srm_env.c1
-rw-r--r--arch/alpha/kernel/srmcons.c1
-rw-r--r--arch/alpha/kernel/sys_alcor.c1
-rw-r--r--arch/alpha/kernel/sys_cabriolet.c1
-rw-r--r--arch/alpha/kernel/sys_dp264.c1
-rw-r--r--arch/alpha/kernel/sys_eb64p.c1
-rw-r--r--arch/alpha/kernel/sys_jensen.c2
-rw-r--r--arch/alpha/kernel/sys_mikasa.c1
-rw-r--r--arch/alpha/kernel/sys_noritake.c1
-rw-r--r--arch/alpha/kernel/sys_sable.c1
-rw-r--r--arch/alpha/kernel/sys_sio.c1
-rw-r--r--arch/alpha/kernel/sys_titan.c15
-rw-r--r--arch/alpha/kernel/time.c1
-rw-r--r--arch/alpha/kernel/traps.c1
-rw-r--r--arch/alpha/kernel/vmlinux.lds.S1
-rw-r--r--arch/alpha/lib/callback_srm.S1
-rw-r--r--arch/alpha/lib/udelay.c1
-rw-r--r--arch/alpha/mm/extable.c1
-rw-r--r--arch/alpha/mm/fault.c1
-rw-r--r--arch/alpha/mm/init.c1
-rw-r--r--arch/alpha/mm/numa.c1
-rw-r--r--arch/arm/Kconfig24
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/boot/compressed/head-clps7500.S1
-rw-r--r--arch/arm/boot/compressed/head-l7200.S1
-rw-r--r--arch/arm/boot/compressed/head-sa1100.S1
-rw-r--r--arch/arm/boot/compressed/head-sharpsl.S1
-rw-r--r--arch/arm/boot/compressed/head-xscale.S1
-rw-r--r--arch/arm/boot/compressed/head.S8
-rw-r--r--arch/arm/common/gic.c18
-rw-r--r--arch/arm/common/locomo.c1
-rw-r--r--arch/arm/common/sa1111.c7
-rw-r--r--arch/arm/common/time-acorn.c3
-rw-r--r--arch/arm/common/uengine.c1
-rw-r--r--arch/arm/common/via82c505.c1
-rw-r--r--arch/arm/configs/at91rm9200dk_defconfig1
-rw-r--r--arch/arm/configs/at91rm9200ek_defconfig1
-rw-r--r--arch/arm/configs/ateb9200_defconfig1
-rw-r--r--arch/arm/configs/carmeva_defconfig1
-rw-r--r--arch/arm/configs/csb337_defconfig1
-rw-r--r--arch/arm/configs/csb637_defconfig1
-rw-r--r--arch/arm/configs/kafa_defconfig1
-rw-r--r--arch/arm/configs/kb9202_defconfig1
-rw-r--r--arch/arm/configs/omap_h2_1610_defconfig129
-rw-r--r--arch/arm/configs/onearm_defconfig1
-rw-r--r--arch/arm/configs/trizeps4_defconfig1579
-rw-r--r--arch/arm/kernel/Makefile2
-rw-r--r--arch/arm/kernel/apm.c1
-rw-r--r--arch/arm/kernel/asm-offsets.c3
-rw-r--r--arch/arm/kernel/bios32.c1
-rw-r--r--arch/arm/kernel/compat.c1
-rw-r--r--arch/arm/kernel/debug.S1
-rw-r--r--arch/arm/kernel/ecard.c3
-rw-r--r--arch/arm/kernel/entry-armv.S5
-rw-r--r--arch/arm/kernel/entry-common.S1
-rw-r--r--arch/arm/kernel/entry-header.S1
-rw-r--r--arch/arm/kernel/fiq.c1
-rw-r--r--arch/arm/kernel/head-nommu.S1
-rw-r--r--arch/arm/kernel/head.S6
-rw-r--r--arch/arm/kernel/irq.c952
-rw-r--r--arch/arm/kernel/iwmmxt-notifier.c64
-rw-r--r--arch/arm/kernel/iwmmxt.S27
-rw-r--r--arch/arm/kernel/module.c1
-rw-r--r--arch/arm/kernel/process.c7
-rw-r--r--arch/arm/kernel/ptrace.c1
-rw-r--r--arch/arm/kernel/setup.c5
-rw-r--r--arch/arm/kernel/signal.c1
-rw-r--r--arch/arm/kernel/smp.c1
-rw-r--r--arch/arm/kernel/time.c1
-rw-r--r--arch/arm/kernel/traps.c1
-rw-r--r--arch/arm/kernel/vmlinux.lds.S1
-rw-r--r--arch/arm/lib/backtrace.S1
-rw-r--r--arch/arm/lib/bitops.h1
-rw-r--r--arch/arm/lib/ucmpdi2.S1
-rw-r--r--arch/arm/mach-aaec2000/core.c3
-rw-r--r--arch/arm/mach-at91rm9200/Kconfig82
-rw-r--r--arch/arm/mach-at91rm9200/Makefile13
-rw-r--r--arch/arm/mach-at91rm9200/at91rm9200.c (renamed from arch/arm/mach-at91rm9200/common.c)3
-rw-r--r--arch/arm/mach-at91rm9200/at91rm9200_time.c (renamed from arch/arm/mach-at91rm9200/time.c)7
-rw-r--r--arch/arm/mach-at91rm9200/board-csb337.c1
-rw-r--r--arch/arm/mach-at91rm9200/board-csb637.c1
-rw-r--r--arch/arm/mach-at91rm9200/board-dk.c1
-rw-r--r--arch/arm/mach-at91rm9200/board-ek.c1
-rw-r--r--arch/arm/mach-at91rm9200/devices.c1
-rw-r--r--arch/arm/mach-at91rm9200/gpio.c11
-rw-r--r--arch/arm/mach-at91rm9200/irq.c1
-rw-r--r--arch/arm/mach-at91rm9200/leds.c1
-rw-r--r--arch/arm/mach-clps711x/fortunet.c1
-rw-r--r--arch/arm/mach-clps711x/p720t.c1
-rw-r--r--arch/arm/mach-clps711x/time.c3
-rw-r--r--arch/arm/mach-clps7500/core.c3
-rw-r--r--arch/arm/mach-ebsa110/core.c2
-rw-r--r--arch/arm/mach-ep93xx/Kconfig12
-rw-r--r--arch/arm/mach-ep93xx/Makefile2
-rw-r--r--arch/arm/mach-ep93xx/core.c3
-rw-r--r--arch/arm/mach-ep93xx/edb9302.c62
-rw-r--r--arch/arm/mach-ep93xx/edb9315a.c62
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c1
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c1
-rw-r--r--arch/arm/mach-footbridge/common.c1
-rw-r--r--arch/arm/mach-footbridge/dc21285-timer.c3
-rw-r--r--arch/arm/mach-footbridge/dc21285.c10
-rw-r--r--arch/arm/mach-footbridge/dma.c1
-rw-r--r--arch/arm/mach-footbridge/ebsa285-leds.c1
-rw-r--r--arch/arm/mach-footbridge/isa-timer.c3
-rw-r--r--arch/arm/mach-footbridge/netwinder-hw.c1
-rw-r--r--arch/arm/mach-footbridge/netwinder-leds.c1
-rw-r--r--arch/arm/mach-h720x/cpu-h7201.c2
-rw-r--r--arch/arm/mach-h720x/cpu-h7202.c2
-rw-r--r--arch/arm/mach-h720x/h7201-eval.c1
-rw-r--r--arch/arm/mach-h720x/h7202-eval.c1
-rw-r--r--arch/arm/mach-imx/time.c4
-rw-r--r--arch/arm/mach-integrator/core.c3
-rw-r--r--arch/arm/mach-integrator/pci_v3.c1
-rw-r--r--arch/arm/mach-integrator/time.c2
-rw-r--r--arch/arm/mach-iop3xx/Kconfig15
-rw-r--r--arch/arm/mach-iop3xx/common.c1
-rw-r--r--arch/arm/mach-iop3xx/iop321-setup.c1
-rw-r--r--arch/arm/mach-iop3xx/iop321-time.c2
-rw-r--r--arch/arm/mach-iop3xx/iop331-setup.c1
-rw-r--r--arch/arm/mach-iop3xx/iop331-time.c2
-rw-r--r--arch/arm/mach-ixp2000/core.c6
-rw-r--r--arch/arm/mach-ixp2000/enp2611.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2400.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2800.c1
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x00.c3
-rw-r--r--arch/arm/mach-ixp2000/ixdp2x01.c3
-rw-r--r--arch/arm/mach-ixp23xx/core.c5
-rw-r--r--arch/arm/mach-ixp23xx/espresso.c1
-rw-r--r--arch/arm/mach-ixp23xx/ixdp2351.c11
-rw-r--r--arch/arm/mach-ixp23xx/pci.c1
-rw-r--r--arch/arm/mach-ixp23xx/roadrunner.c1
-rw-r--r--arch/arm/mach-ixp4xx/common.c3
-rw-r--r--arch/arm/mach-ixp4xx/coyote-pci.c1
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdpg425-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-pci.c2
-rw-r--r--arch/arm/mach-ixp4xx/nas100d-power.c6
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-pci.c1
-rw-r--r--arch/arm/mach-ixp4xx/nslu2-power.c4
-rw-r--r--arch/arm/mach-l7200/core.c1
-rw-r--r--arch/arm/mach-lh7a40x/arch-lpd7a40x.c1
-rw-r--r--arch/arm/mach-lh7a40x/time.c4
-rw-r--r--arch/arm/mach-netx/time.c2
-rw-r--r--arch/arm/mach-omap1/Kconfig7
-rw-r--r--arch/arm/mach-omap1/Makefile1
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c7
-rw-r--r--arch/arm/mach-omap1/board-fsample.c319
-rw-r--r--arch/arm/mach-omap1/board-h3.c1
-rw-r--r--arch/arm/mach-omap1/board-innovator.c75
-rw-r--r--arch/arm/mach-omap1/board-osk.c151
-rw-r--r--arch/arm/mach-omap1/clock.c18
-rw-r--r--arch/arm/mach-omap1/devices.c1
-rw-r--r--arch/arm/mach-omap1/fpga.c3
-rw-r--r--arch/arm/mach-omap1/id.c1
-rw-r--r--arch/arm/mach-omap1/io.c1
-rw-r--r--arch/arm/mach-omap1/irq.c1
-rw-r--r--arch/arm/mach-omap1/leds-h2p2-debug.c1
-rw-r--r--arch/arm/mach-omap1/leds-innovator.c1
-rw-r--r--arch/arm/mach-omap1/leds-osk.c1
-rw-r--r--arch/arm/mach-omap1/mux.c1
-rw-r--r--arch/arm/mach-omap1/pm.c9
-rw-r--r--arch/arm/mach-omap1/serial.c4
-rw-r--r--arch/arm/mach-omap1/sleep.S1
-rw-r--r--arch/arm/mach-omap1/time.c7
-rw-r--r--arch/arm/mach-omap2/Kconfig1
-rw-r--r--arch/arm/mach-omap2/Makefile5
-rw-r--r--arch/arm/mach-omap2/board-apollon.c6
-rw-r--r--arch/arm/mach-omap2/clock.c38
-rw-r--r--arch/arm/mach-omap2/clock.h2
-rw-r--r--arch/arm/mach-omap2/devices.c47
-rw-r--r--arch/arm/mach-omap2/gpmc.c209
-rw-r--r--arch/arm/mach-omap2/id.c1
-rw-r--r--arch/arm/mach-omap2/io.c3
-rw-r--r--arch/arm/mach-omap2/irq.c1
-rw-r--r--arch/arm/mach-omap2/memory.c1
-rw-r--r--arch/arm/mach-omap2/mux.c39
-rw-r--r--arch/arm/mach-omap2/pm-domain.c300
-rw-r--r--arch/arm/mach-omap2/pm.c271
-rw-r--r--arch/arm/mach-omap2/prcm.c1
-rw-r--r--arch/arm/mach-omap2/sleep.S1
-rw-r--r--arch/arm/mach-omap2/sram-fn.S1
-rw-r--r--arch/arm/mach-omap2/timer-gp.c86
-rw-r--r--arch/arm/mach-pnx4008/time.c2
-rw-r--r--arch/arm/mach-pxa/Kconfig19
-rw-r--r--arch/arm/mach-pxa/Makefile2
-rw-r--r--arch/arm/mach-pxa/corgi.c2
-rw-r--r--arch/arm/mach-pxa/idp.c1
-rw-r--r--arch/arm/mach-pxa/leds-idp.c1
-rw-r--r--arch/arm/mach-pxa/leds-lubbock.c1
-rw-r--r--arch/arm/mach-pxa/leds-mainstone.c1
-rw-r--r--arch/arm/mach-pxa/leds-trizeps4.c134
-rw-r--r--arch/arm/mach-pxa/leds.c2
-rw-r--r--arch/arm/mach-pxa/leds.h1
-rw-r--r--arch/arm/mach-pxa/lpd270.c126
-rw-r--r--arch/arm/mach-pxa/lubbock.c2
-rw-r--r--arch/arm/mach-pxa/mainstone.c2
-rw-r--r--arch/arm/mach-pxa/pm.c1
-rw-r--r--arch/arm/mach-pxa/poodle.c2
-rw-r--r--arch/arm/mach-pxa/pxa25x.c1
-rw-r--r--arch/arm/mach-pxa/pxa27x.c1
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c10
-rw-r--r--arch/arm/mach-pxa/sleep.S1
-rw-r--r--arch/arm/mach-pxa/spitz.c2
-rw-r--r--arch/arm/mach-pxa/standby.S1
-rw-r--r--arch/arm/mach-pxa/time.c3
-rw-r--r--arch/arm/mach-pxa/tosa.c2
-rw-r--r--arch/arm/mach-pxa/trizeps4.c473
-rw-r--r--arch/arm/mach-realview/core.c3
-rw-r--r--arch/arm/mach-realview/realview_eb.c1
-rw-r--r--arch/arm/mach-rpc/dma.c2
-rw-r--r--arch/arm/mach-s3c2410/bast-irq.c6
-rw-r--r--arch/arm/mach-s3c2410/devs.h1
-rw-r--r--arch/arm/mach-s3c2410/dma.c3
-rw-r--r--arch/arm/mach-s3c2410/pm.c1
-rw-r--r--arch/arm/mach-s3c2410/sleep.S1
-rw-r--r--arch/arm/mach-s3c2410/time.c4
-rw-r--r--arch/arm/mach-s3c2410/usb-simtec.c4
-rw-r--r--arch/arm/mach-sa1100/assabet.c1
-rw-r--r--arch/arm/mach-sa1100/cerf.c2
-rw-r--r--arch/arm/mach-sa1100/collie.c1
-rw-r--r--arch/arm/mach-sa1100/collie_pm.c4
-rw-r--r--arch/arm/mach-sa1100/cpu-sa1110.c131
-rw-r--r--arch/arm/mach-sa1100/dma.c2
-rw-r--r--arch/arm/mach-sa1100/generic.c1
-rw-r--r--arch/arm/mach-sa1100/h3600.c5
-rw-r--r--arch/arm/mach-sa1100/irq.c3
-rw-r--r--arch/arm/mach-sa1100/leds-assabet.c1
-rw-r--r--arch/arm/mach-sa1100/leds-badge4.c1
-rw-r--r--arch/arm/mach-sa1100/leds-cerf.c1
-rw-r--r--arch/arm/mach-sa1100/leds-hackkit.c1
-rw-r--r--arch/arm/mach-sa1100/leds-lart.c1
-rw-r--r--arch/arm/mach-sa1100/leds-simpad.c1
-rw-r--r--arch/arm/mach-sa1100/pleb.c1
-rw-r--r--arch/arm/mach-sa1100/shannon.c1
-rw-r--r--arch/arm/mach-sa1100/simpad.c1
-rw-r--r--arch/arm/mach-sa1100/time.c3
-rw-r--r--arch/arm/mach-shark/core.c3
-rw-r--r--arch/arm/mach-shark/dma.c1
-rw-r--r--arch/arm/mach-shark/leds.c1
-rw-r--r--arch/arm/mach-versatile/core.c3
-rw-r--r--arch/arm/mach-versatile/pci.c1
-rw-r--r--arch/arm/mach-versatile/versatile_ab.c1
-rw-r--r--arch/arm/mach-versatile/versatile_pb.c1
-rw-r--r--arch/arm/mm/Kconfig4
-rw-r--r--arch/arm/mm/alignment.c1
-rw-r--r--arch/arm/mm/cache-v4wb.S1
-rw-r--r--arch/arm/mm/fault.c1
-rw-r--r--arch/arm/mm/init.c1
-rw-r--r--arch/arm/mm/ioremap.c227
-rw-r--r--arch/arm/mm/mm-armv.c38
-rw-r--r--arch/arm/mm/mmap.c1
-rw-r--r--arch/arm/mm/proc-arm1020.S20
-rw-r--r--arch/arm/mm/proc-arm1020e.S40
-rw-r--r--arch/arm/mm/proc-arm1022.S40
-rw-r--r--arch/arm/mm/proc-arm1026.S40
-rw-r--r--arch/arm/mm/proc-arm6_7.S16
-rw-r--r--arch/arm/mm/proc-arm720.S25
-rw-r--r--arch/arm/mm/proc-arm920.S34
-rw-r--r--arch/arm/mm/proc-arm922.S34
-rw-r--r--arch/arm/mm/proc-arm925.S40
-rw-r--r--arch/arm/mm/proc-arm926.S37
-rw-r--r--arch/arm/mm/proc-macros.S10
-rw-r--r--arch/arm/mm/proc-sa110.S21
-rw-r--r--arch/arm/mm/proc-sa1100.S23
-rw-r--r--arch/arm/mm/proc-v6.S19
-rw-r--r--arch/arm/mm/proc-xsc3.S28
-rw-r--r--arch/arm/mm/proc-xscale.S63
-rw-r--r--arch/arm/nwfpe/fpa11.c1
-rw-r--r--arch/arm/nwfpe/fpa11.h1
-rw-r--r--arch/arm/nwfpe/fpa11_cpdo.c1
-rw-r--r--arch/arm/nwfpe/fpa11_cpdt.c1
-rw-r--r--arch/arm/nwfpe/fpa11_cprt.c1
-rw-r--r--arch/arm/nwfpe/fpmodule.c1
-rw-r--r--arch/arm/nwfpe/fpopcode.c1
-rw-r--r--arch/arm/nwfpe/fpopcode.h1
-rw-r--r--arch/arm/nwfpe/softfloat.h1
-rw-r--r--arch/arm/oprofile/op_model_xscale.c2
-rw-r--r--arch/arm/plat-omap/Kconfig2
-rw-r--r--arch/arm/plat-omap/clock.c5
-rw-r--r--arch/arm/plat-omap/common.c1
-rw-r--r--arch/arm/plat-omap/cpu-omap.c18
-rw-r--r--arch/arm/plat-omap/devices.c11
-rw-r--r--arch/arm/plat-omap/dma.c88
-rw-r--r--arch/arm/plat-omap/dmtimer.c428
-rw-r--r--arch/arm/plat-omap/fb.c1
-rw-r--r--arch/arm/plat-omap/gpio.c107
-rw-r--r--arch/arm/plat-omap/mux.c1
-rw-r--r--arch/arm/plat-omap/ocpi.c1
-rw-r--r--arch/arm/plat-omap/pm.c2
-rw-r--r--arch/arm/plat-omap/sram-fn.S1
-rw-r--r--arch/arm/plat-omap/sram.c10
-rw-r--r--arch/arm/plat-omap/timer32k.c125
-rw-r--r--arch/arm/plat-omap/usb.c1
-rw-r--r--arch/arm/vfp/vfpmodule.c1
-rw-r--r--arch/arm26/Kconfig6
-rw-r--r--arch/arm26/boot/compressed/head.S1
-rw-r--r--arch/arm26/kernel/armksyms.c1
-rw-r--r--arch/arm26/kernel/asm-offsets.c1
-rw-r--r--arch/arm26/kernel/compat.c1
-rw-r--r--arch/arm26/kernel/ecard.c1
-rw-r--r--arch/arm26/kernel/fiq.c1
-rw-r--r--arch/arm26/kernel/head.S1
-rw-r--r--arch/arm26/kernel/irq.c17
-rw-r--r--arch/arm26/kernel/process.c1
-rw-r--r--arch/arm26/kernel/ptrace.c1
-rw-r--r--arch/arm26/kernel/semaphore.c1
-rw-r--r--arch/arm26/kernel/setup.c1
-rw-r--r--arch/arm26/kernel/signal.c1
-rw-r--r--arch/arm26/kernel/time.c3
-rw-r--r--arch/arm26/kernel/traps.c1
-rw-r--r--arch/arm26/kernel/vmlinux.lds.S1
-rw-r--r--arch/arm26/lib/backtrace.S1
-rw-r--r--arch/arm26/lib/csumpartialcopyuser.S1
-rw-r--r--arch/arm26/lib/kbd.c1
-rw-r--r--arch/arm26/lib/lib1funcs.S1
-rw-r--r--arch/arm26/machine/dma.c1
-rw-r--r--arch/arm26/machine/irq.c1
-rw-r--r--arch/arm26/mm/extable.c1
-rw-r--r--arch/arm26/mm/fault.c1
-rw-r--r--arch/arm26/mm/init.c1
-rw-r--r--arch/arm26/nwfpe/fpmodule.c1
-rw-r--r--arch/arm26/nwfpe/fpmodule.h1
-rw-r--r--arch/cris/arch-v10/boot/compressed/head.S1
-rw-r--r--arch/cris/arch-v10/boot/compressed/misc.c1
-rw-r--r--arch/cris/arch-v10/boot/rescue/head.S1
-rw-r--r--arch/cris/arch-v10/boot/rescue/kimagerescue.S1
-rw-r--r--arch/cris/arch-v10/drivers/axisflashmap.c1
-rw-r--r--arch/cris/arch-v10/drivers/ds1302.c1
-rw-r--r--arch/cris/arch-v10/drivers/eeprom.c1
-rw-r--r--arch/cris/arch-v10/drivers/gpio.c5
-rw-r--r--arch/cris/arch-v10/drivers/i2c.c1
-rw-r--r--arch/cris/arch-v10/drivers/pcf8563.c1
-rw-r--r--arch/cris/arch-v10/kernel/crisksyms.c1
-rw-r--r--arch/cris/arch-v10/kernel/debugport.c1
-rw-r--r--arch/cris/arch-v10/kernel/entry.S1
-rw-r--r--arch/cris/arch-v10/kernel/fasttimer.c1
-rw-r--r--arch/cris/arch-v10/kernel/head.S1
-rw-r--r--arch/cris/arch-v10/kernel/irq.c1
-rw-r--r--arch/cris/arch-v10/kernel/process.c1
-rw-r--r--arch/cris/arch-v10/kernel/setup.c1
-rw-r--r--arch/cris/arch-v10/kernel/time.c7
-rw-r--r--arch/cris/arch-v10/kernel/traps.c1
-rw-r--r--arch/cris/arch-v10/lib/dram_init.S1
-rw-r--r--arch/cris/arch-v10/mm/init.c1
-rw-r--r--arch/cris/arch-v10/vmlinux.lds.S1
-rw-r--r--arch/cris/arch-v32/boot/compressed/head.S1
-rw-r--r--arch/cris/arch-v32/boot/compressed/misc.c1
-rw-r--r--arch/cris/arch-v32/boot/rescue/head.S1
-rw-r--r--arch/cris/arch-v32/drivers/axisflashmap.c1
-rw-r--r--arch/cris/arch-v32/drivers/gpio.c5
-rw-r--r--arch/cris/arch-v32/drivers/i2c.c1
-rw-r--r--arch/cris/arch-v32/drivers/pcf8563.c1
-rw-r--r--arch/cris/arch-v32/drivers/sync_serial.c1
-rw-r--r--arch/cris/arch-v32/kernel/arbiter.c11
-rw-r--r--arch/cris/arch-v32/kernel/crisksyms.c1
-rw-r--r--arch/cris/arch-v32/kernel/debugport.c1
-rw-r--r--arch/cris/arch-v32/kernel/dma.c4
-rw-r--r--arch/cris/arch-v32/kernel/entry.S1
-rw-r--r--arch/cris/arch-v32/kernel/fasttimer.c3
-rw-r--r--arch/cris/arch-v32/kernel/head.S1
-rw-r--r--arch/cris/arch-v32/kernel/io.c1
-rw-r--r--arch/cris/arch-v32/kernel/irq.c3
-rw-r--r--arch/cris/arch-v32/kernel/kgdb_asm.S1
-rw-r--r--arch/cris/arch-v32/kernel/process.c1
-rw-r--r--arch/cris/arch-v32/kernel/setup.c1
-rw-r--r--arch/cris/arch-v32/kernel/smp.c2
-rw-r--r--arch/cris/arch-v32/kernel/time.c13
-rw-r--r--arch/cris/arch-v32/kernel/traps.c1
-rw-r--r--arch/cris/arch-v32/lib/dram_init.S1
-rw-r--r--arch/cris/arch-v32/lib/hw_settings.S1
-rw-r--r--arch/cris/arch-v32/lib/nand_init.S1
-rw-r--r--arch/cris/arch-v32/mm/init.c2
-rw-r--r--arch/cris/arch-v32/vmlinux.lds.S1
-rw-r--r--arch/cris/kernel/crisksyms.c1
-rw-r--r--arch/cris/kernel/irq.c3
-rw-r--r--arch/cris/kernel/setup.c1
-rw-r--r--arch/frv/kernel/break.S1
-rw-r--r--arch/frv/kernel/cmode.S1
-rw-r--r--arch/frv/kernel/entry-table.S1
-rw-r--r--arch/frv/kernel/entry.S1
-rw-r--r--arch/frv/kernel/frv_ksyms.c1
-rw-r--r--arch/frv/kernel/head-mmu-fr451.S1
-rw-r--r--arch/frv/kernel/head-uc-fr401.S1
-rw-r--r--arch/frv/kernel/head-uc-fr451.S1
-rw-r--r--arch/frv/kernel/head-uc-fr555.S1
-rw-r--r--arch/frv/kernel/head.S1
-rw-r--r--arch/frv/kernel/irq-mb93091.c1
-rw-r--r--arch/frv/kernel/irq-mb93093.c1
-rw-r--r--arch/frv/kernel/irq-mb93493.c1
-rw-r--r--arch/frv/kernel/irq-routing.c4
-rw-r--r--arch/frv/kernel/irq.c13
-rw-r--r--arch/frv/kernel/pm-mb93093.c1
-rw-r--r--arch/frv/kernel/pm.c1
-rw-r--r--arch/frv/kernel/process.c1
-rw-r--r--arch/frv/kernel/ptrace.c1
-rw-r--r--arch/frv/kernel/semaphore.c1
-rw-r--r--arch/frv/kernel/setup.c1
-rw-r--r--arch/frv/kernel/sleep.S1
-rw-r--r--arch/frv/kernel/switch_to.S1
-rw-r--r--arch/frv/kernel/sysctl.c1
-rw-r--r--arch/frv/kernel/time.c2
-rw-r--r--arch/frv/kernel/traps.c1
-rw-r--r--arch/frv/mb93090-mb00/pci-irq.c1
-rw-r--r--arch/frv/mb93090-mb00/pci-vdk.c1
-rw-r--r--arch/frv/mm/dma-alloc.c1
-rw-r--r--arch/frv/mm/extable.c1
-rw-r--r--arch/frv/mm/init.c1
-rw-r--r--arch/frv/mm/kmap.c1
-rw-r--r--arch/frv/mm/tlb-flush.S1
-rw-r--r--arch/frv/mm/tlb-miss.S1
-rw-r--r--arch/frv/mm/unaligned.c1
-rw-r--r--arch/h8300/kernel/gpio.c1
-rw-r--r--arch/h8300/kernel/h8300_ksyms.c1
-rw-r--r--arch/h8300/kernel/ints.c4
-rw-r--r--arch/h8300/kernel/process.c1
-rw-r--r--arch/h8300/kernel/ptrace.c1
-rw-r--r--arch/h8300/kernel/semaphore.c1
-rw-r--r--arch/h8300/kernel/setup.c1
-rw-r--r--arch/h8300/kernel/syscalls.S1
-rw-r--r--arch/h8300/kernel/vmlinux.lds.S1
-rw-r--r--arch/h8300/lib/romfs.S1
-rw-r--r--arch/h8300/mm/init.c1
-rw-r--r--arch/h8300/mm/kmap.c1
-rw-r--r--arch/h8300/mm/memory.c1
-rw-r--r--arch/h8300/platform/h8300h/aki3068net/crt0_ram.S1
-rw-r--r--arch/h8300/platform/h8300h/aki3068net/timer.c1
-rw-r--r--arch/h8300/platform/h8300h/entry.S1
-rw-r--r--arch/h8300/platform/h8300h/generic/crt0_ram.S1
-rw-r--r--arch/h8300/platform/h8300h/generic/crt0_rom.S1
-rw-r--r--arch/h8300/platform/h8300h/generic/timer.c1
-rw-r--r--arch/h8300/platform/h8300h/h8max/crt0_ram.S1
-rw-r--r--arch/h8300/platform/h8300h/h8max/timer.c1
-rw-r--r--arch/h8300/platform/h8300h/ints_h8300h.c1
-rw-r--r--arch/h8300/platform/h8s/edosk2674/crt0_ram.S1
-rw-r--r--arch/h8300/platform/h8s/edosk2674/crt0_rom.S1
-rw-r--r--arch/h8300/platform/h8s/edosk2674/timer.c1
-rw-r--r--arch/h8300/platform/h8s/entry.S1
-rw-r--r--arch/h8300/platform/h8s/generic/crt0_ram.S1
-rw-r--r--arch/h8300/platform/h8s/generic/crt0_rom.S1
-rw-r--r--arch/h8300/platform/h8s/generic/timer.c1
-rw-r--r--arch/h8300/platform/h8s/ints.c4
-rw-r--r--arch/h8300/platform/h8s/ints_h8s.c1
-rw-r--r--arch/i386/Kconfig2
-rw-r--r--arch/i386/boot/setup.S1
-rw-r--r--arch/i386/kernel/Makefile1
-rw-r--r--arch/i386/kernel/acpi/boot.c1
-rw-r--r--arch/i386/kernel/alternative.c6
-rw-r--r--arch/i386/kernel/apic.c1
-rw-r--r--arch/i386/kernel/apm.c1
-rw-r--r--arch/i386/kernel/audit.c23
-rw-r--r--arch/i386/kernel/bootflag.c1
-rw-r--r--arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c9
-rw-r--r--arch/i386/kernel/cpu/cpufreq/p4-clockmod.c1
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k7.c1
-rw-r--r--arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c9
-rw-r--r--arch/i386/kernel/cpu/intel.c1
-rw-r--r--arch/i386/kernel/cpu/mcheck/k7.c1
-rw-r--r--arch/i386/kernel/cpu/mcheck/mce.c1
-rw-r--r--arch/i386/kernel/cpu/mcheck/non-fatal.c1
-rw-r--r--arch/i386/kernel/cpu/mcheck/p4.c1
-rw-r--r--arch/i386/kernel/cpuid.c1
-rw-r--r--arch/i386/kernel/efi.c1
-rw-r--r--arch/i386/kernel/efi_stub.S1
-rw-r--r--arch/i386/kernel/entry.S1
-rw-r--r--arch/i386/kernel/head.S1
-rw-r--r--arch/i386/kernel/i386_ksyms.c1
-rw-r--r--arch/i386/kernel/i387.c1
-rw-r--r--arch/i386/kernel/i8259.c1
-rw-r--r--arch/i386/kernel/io_apic.c1
-rw-r--r--arch/i386/kernel/kprobes.c1
-rw-r--r--arch/i386/kernel/mca.c1
-rw-r--r--arch/i386/kernel/mpparse.c1
-rw-r--r--arch/i386/kernel/msr.c1
-rw-r--r--arch/i386/kernel/numaq.c1
-rw-r--r--arch/i386/kernel/process.c1
-rw-r--r--arch/i386/kernel/quirks.c1
-rw-r--r--arch/i386/kernel/reboot.c1
-rw-r--r--arch/i386/kernel/scx200.c1
-rw-r--r--arch/i386/kernel/semaphore.c1
-rw-r--r--arch/i386/kernel/setup.c1
-rw-r--r--arch/i386/kernel/smpboot.c1
-rw-r--r--arch/i386/kernel/srat.c1
-rw-r--r--arch/i386/kernel/time.c1
-rw-r--r--arch/i386/kernel/time_hpet.c1
-rw-r--r--arch/i386/kernel/traps.c1
-rw-r--r--arch/i386/kernel/vm86.c1
-rw-r--r--arch/i386/lib/checksum.S1
-rw-r--r--arch/i386/lib/memcpy.c1
-rw-r--r--arch/i386/lib/mmx.c1
-rw-r--r--arch/i386/lib/usercopy.c1
-rw-r--r--arch/i386/mach-default/setup.c3
-rw-r--r--arch/i386/mach-generic/bigsmp.c1
-rw-r--r--arch/i386/mach-generic/default.c1
-rw-r--r--arch/i386/mach-generic/es7000.c1
-rw-r--r--arch/i386/mach-generic/probe.c1
-rw-r--r--arch/i386/mach-generic/summit.c1
-rw-r--r--arch/i386/mach-visws/mpparse.c1
-rw-r--r--arch/i386/mach-visws/setup.c2
-rw-r--r--arch/i386/mach-visws/traps.c1
-rw-r--r--arch/i386/mach-visws/visws_apic.c1
-rw-r--r--arch/i386/mach-voyager/setup.c3
-rw-r--r--arch/i386/mach-voyager/voyager_basic.c1
-rw-r--r--arch/i386/mach-voyager/voyager_cat.c1
-rw-r--r--arch/i386/mach-voyager/voyager_smp.c1
-rw-r--r--arch/i386/mach-voyager/voyager_thread.c1
-rw-r--r--arch/i386/mm/boot_ioremap.c1
-rw-r--r--arch/i386/mm/discontig.c3
-rw-r--r--arch/i386/mm/extable.c1
-rw-r--r--arch/i386/mm/fault.c2
-rw-r--r--arch/i386/mm/hugetlbpage.c1
-rw-r--r--arch/i386/mm/init.c10
-rw-r--r--arch/i386/mm/pageattr.c1
-rw-r--r--arch/i386/mm/pgtable.c1
-rw-r--r--arch/i386/pci/init.c1
-rw-r--r--arch/i386/pci/irq.c3
-rw-r--r--arch/i386/pci/visws.c1
-rw-r--r--arch/i386/power/cpu.c1
-rw-r--r--arch/ia64/dig/setup.c1
-rw-r--r--arch/ia64/hp/common/sba_iommu.c1
-rw-r--r--arch/ia64/hp/sim/boot/bootloader.c1
-rw-r--r--arch/ia64/hp/sim/boot/fw-emu.c1
-rw-r--r--arch/ia64/hp/sim/hpsim_console.c1
-rw-r--r--arch/ia64/hp/sim/hpsim_setup.c1
-rw-r--r--arch/ia64/hp/sim/simeth.c1
-rw-r--r--arch/ia64/hp/sim/simserial.c3
-rw-r--r--arch/ia64/ia32/Makefile1
-rw-r--r--arch/ia64/ia32/audit.c11
-rw-r--r--arch/ia64/ia32/binfmt_elf32.c1
-rw-r--r--arch/ia64/ia32/ia32priv.h1
-rw-r--r--arch/ia64/ia32/sys_ia32.c1
-rw-r--r--arch/ia64/kernel/Makefile1
-rw-r--r--arch/ia64/kernel/acpi-ext.c1
-rw-r--r--arch/ia64/kernel/acpi.c1
-rw-r--r--arch/ia64/kernel/asm-offsets.c1
-rw-r--r--arch/ia64/kernel/audit.c29
-rw-r--r--arch/ia64/kernel/cpufreq/acpi-cpufreq.c1
-rw-r--r--arch/ia64/kernel/efi.c1
-rw-r--r--arch/ia64/kernel/entry.S1
-rw-r--r--arch/ia64/kernel/entry.h1
-rw-r--r--arch/ia64/kernel/gate.S1
-rw-r--r--arch/ia64/kernel/gate.lds.S1
-rw-r--r--arch/ia64/kernel/head.S1
-rw-r--r--arch/ia64/kernel/ia64_ksyms.c1
-rw-r--r--arch/ia64/kernel/iosapic.c1
-rw-r--r--arch/ia64/kernel/irq_ia64.c3
-rw-r--r--arch/ia64/kernel/ivt.S1
-rw-r--r--arch/ia64/kernel/kprobes.c1
-rw-r--r--arch/ia64/kernel/machvec.c1
-rw-r--r--arch/ia64/kernel/mca.c13
-rw-r--r--arch/ia64/kernel/mca_asm.S1
-rw-r--r--arch/ia64/kernel/mca_drv.c1
-rw-r--r--arch/ia64/kernel/mca_drv_asm.S1
-rw-r--r--arch/ia64/kernel/minstate.h1
-rw-r--r--arch/ia64/kernel/module.c1
-rw-r--r--arch/ia64/kernel/numa.c1
-rw-r--r--arch/ia64/kernel/palinfo.c1
-rw-r--r--arch/ia64/kernel/perfmon.c3
-rw-r--r--arch/ia64/kernel/perfmon_default_smpl.c1
-rw-r--r--arch/ia64/kernel/process.c1
-rw-r--r--arch/ia64/kernel/ptrace.c1
-rw-r--r--arch/ia64/kernel/sal.c1
-rw-r--r--arch/ia64/kernel/setup.c1
-rw-r--r--arch/ia64/kernel/signal.c1
-rw-r--r--arch/ia64/kernel/smpboot.c1
-rw-r--r--arch/ia64/kernel/sys_ia64.c1
-rw-r--r--arch/ia64/kernel/time.c3
-rw-r--r--arch/ia64/kernel/topology.c1
-rw-r--r--arch/ia64/kernel/traps.c1
-rw-r--r--arch/ia64/kernel/vmlinux.lds.S1
-rw-r--r--arch/ia64/lib/clear_page.S1
-rw-r--r--arch/ia64/lib/io.c1
-rw-r--r--arch/ia64/lib/memcpy_mck.S1
-rw-r--r--arch/ia64/mm/contig.c1
-rw-r--r--arch/ia64/mm/extable.c1
-rw-r--r--arch/ia64/mm/hugetlbpage.c1
-rw-r--r--arch/ia64/mm/init.c1
-rw-r--r--arch/ia64/mm/numa.c1
-rw-r--r--arch/ia64/mm/tlb.c1
-rw-r--r--arch/ia64/oprofile/perfmon.c1
-rw-r--r--arch/ia64/pci/pci.c1
-rw-r--r--arch/ia64/sn/kernel/bte.c1
-rw-r--r--arch/ia64/sn/kernel/huberror.c4
-rw-r--r--arch/ia64/sn/kernel/setup.c1
-rw-r--r--arch/ia64/sn/kernel/sn2/prominfo_proc.c1
-rw-r--r--arch/ia64/sn/kernel/sn2/sn_proc_fs.c1
-rw-r--r--arch/ia64/sn/kernel/xpc_channel.c2
-rw-r--r--arch/ia64/sn/kernel/xpnet.c1
-rw-r--r--arch/ia64/sn/pci/pcibr/pcibr_provider.c2
-rw-r--r--arch/ia64/sn/pci/tioca_provider.c2
-rw-r--r--arch/ia64/sn/pci/tioce_provider.c2
-rw-r--r--arch/m32r/boot/compressed/head.S1
-rw-r--r--arch/m32r/boot/compressed/m32r_sio.c1
-rw-r--r--arch/m32r/boot/compressed/misc.c1
-rw-r--r--arch/m32r/boot/compressed/vmlinux.lds.S1
-rw-r--r--arch/m32r/boot/setup.S1
-rw-r--r--arch/m32r/kernel/align.c1
-rw-r--r--arch/m32r/kernel/entry.S1
-rw-r--r--arch/m32r/kernel/head.S1
-rw-r--r--arch/m32r/kernel/io_m32104ut.c1
-rw-r--r--arch/m32r/kernel/io_m32700ut.c1
-rw-r--r--arch/m32r/kernel/io_mappi.c1
-rw-r--r--arch/m32r/kernel/io_mappi2.c1
-rw-r--r--arch/m32r/kernel/io_mappi3.c1
-rw-r--r--arch/m32r/kernel/io_oaks32r.c1
-rw-r--r--arch/m32r/kernel/io_opsput.c1
-rw-r--r--arch/m32r/kernel/io_usrv.c1
-rw-r--r--arch/m32r/kernel/m32r_ksyms.c1
-rw-r--r--arch/m32r/kernel/module.c1
-rw-r--r--arch/m32r/kernel/process.c1
-rw-r--r--arch/m32r/kernel/ptrace.c1
-rw-r--r--arch/m32r/kernel/semaphore.c1
-rw-r--r--arch/m32r/kernel/setup.c1
-rw-r--r--arch/m32r/kernel/setup_m32104ut.c1
-rw-r--r--arch/m32r/kernel/setup_m32700ut.c1
-rw-r--r--arch/m32r/kernel/setup_mappi.c1
-rw-r--r--arch/m32r/kernel/setup_mappi2.c1
-rw-r--r--arch/m32r/kernel/setup_mappi3.c1
-rw-r--r--arch/m32r/kernel/setup_oaks32r.c1
-rw-r--r--arch/m32r/kernel/setup_opsput.c1
-rw-r--r--arch/m32r/kernel/setup_usrv.c1
-rw-r--r--arch/m32r/kernel/signal.c1
-rw-r--r--arch/m32r/kernel/smpboot.c1
-rw-r--r--arch/m32r/kernel/sys_m32r.c1
-rw-r--r--arch/m32r/kernel/time.c3
-rw-r--r--arch/m32r/kernel/traps.c1
-rw-r--r--arch/m32r/kernel/vmlinux.lds.S1
-rw-r--r--arch/m32r/lib/ashxdi3.S1
-rw-r--r--arch/m32r/lib/checksum.S1
-rw-r--r--arch/m32r/lib/delay.c1
-rw-r--r--arch/m32r/lib/memcpy.S1
-rw-r--r--arch/m32r/lib/memset.S1
-rw-r--r--arch/m32r/lib/strlen.S1
-rw-r--r--arch/m32r/lib/usercopy.c1
-rw-r--r--arch/m32r/mm/cache.c1
-rw-r--r--arch/m32r/mm/discontig.c1
-rw-r--r--arch/m32r/mm/fault-nommu.c1
-rw-r--r--arch/m32r/mm/fault.c3
-rw-r--r--arch/m68k/amiga/amiga_ksyms.c1
-rw-r--r--arch/m68k/amiga/amiints.c2
-rw-r--r--arch/m68k/amiga/amisound.c1
-rw-r--r--arch/m68k/amiga/chipram.c1
-rw-r--r--arch/m68k/amiga/cia.c2
-rw-r--r--arch/m68k/amiga/config.c1
-rw-r--r--arch/m68k/apollo/config.c1
-rw-r--r--arch/m68k/atari/config.c1
-rw-r--r--arch/m68k/atari/debug.c1
-rw-r--r--arch/m68k/atari/hades-pci.c1
-rw-r--r--arch/m68k/atari/stram.c1
-rw-r--r--arch/m68k/hp300/config.c1
-rw-r--r--arch/m68k/kernel/bios32.c1
-rw-r--r--arch/m68k/kernel/entry.S1
-rw-r--r--arch/m68k/kernel/head.S1
-rw-r--r--arch/m68k/kernel/ints.c3
-rw-r--r--arch/m68k/kernel/m68k_ksyms.c1
-rw-r--r--arch/m68k/kernel/process.c1
-rw-r--r--arch/m68k/kernel/ptrace.c1
-rw-r--r--arch/m68k/kernel/semaphore.c1
-rw-r--r--arch/m68k/kernel/setup.c1
-rw-r--r--arch/m68k/kernel/traps.c1
-rw-r--r--arch/m68k/kernel/vmlinux.lds.S1
-rw-r--r--arch/m68k/mac/config.c1
-rw-r--r--arch/m68k/mac/debug.c1
-rw-r--r--arch/m68k/mac/iop.c1
-rw-r--r--arch/m68k/mac/misc.c1
-rw-r--r--arch/m68k/math-emu/fp_entry.S1
-rw-r--r--arch/m68k/math-emu/fp_util.S1
-rw-r--r--arch/m68k/mm/init.c1
-rw-r--r--arch/m68k/mm/kmap.c1
-rw-r--r--arch/m68k/mm/memory.c1
-rw-r--r--arch/m68k/mm/motorola.c1
-rw-r--r--arch/m68k/q40/config.c1
-rw-r--r--arch/m68k/sun3/config.c1
-rw-r--r--arch/m68k/sun3/prom/init.c1
-rw-r--r--arch/m68k/sun3/prom/printf.c1
-rw-r--r--arch/m68k/sun3/sun3dvma.c1
-rw-r--r--arch/m68k/sun3/sun3ints.c1
-rw-r--r--arch/m68k/sun3x/config.c1
-rw-r--r--arch/m68knommu/kernel/comempci.c1
-rw-r--r--arch/m68knommu/kernel/entry.S1
-rw-r--r--arch/m68knommu/kernel/m68k_ksyms.c1
-rw-r--r--arch/m68knommu/kernel/process.c1
-rw-r--r--arch/m68knommu/kernel/ptrace.c1
-rw-r--r--arch/m68knommu/kernel/semaphore.c1
-rw-r--r--arch/m68knommu/kernel/setup.c1
-rw-r--r--arch/m68knommu/kernel/syscalltable.S1
-rw-r--r--arch/m68knommu/kernel/time.c1
-rw-r--r--arch/m68knommu/kernel/traps.c1
-rw-r--r--arch/m68knommu/kernel/vmlinux.lds.S1
-rw-r--r--arch/m68knommu/lib/semaphore.S1
-rw-r--r--arch/m68knommu/mm/init.c1
-rw-r--r--arch/m68knommu/mm/kmap.c1
-rw-r--r--arch/m68knommu/mm/memory.c1
-rw-r--r--arch/m68knommu/platform/5206/config.c1
-rw-r--r--arch/m68knommu/platform/5206e/config.c1
-rw-r--r--arch/m68knommu/platform/520x/config.c1
-rw-r--r--arch/m68knommu/platform/523x/config.c1
-rw-r--r--arch/m68knommu/platform/5249/config.c1
-rw-r--r--arch/m68knommu/platform/5272/config.c1
-rw-r--r--arch/m68knommu/platform/527x/config.c1
-rw-r--r--arch/m68knommu/platform/528x/config.c1
-rw-r--r--arch/m68knommu/platform/5307/config.c1
-rw-r--r--arch/m68knommu/platform/5307/entry.S1
-rw-r--r--arch/m68knommu/platform/5307/head.S1
-rw-r--r--arch/m68knommu/platform/5307/ints.c1
-rw-r--r--arch/m68knommu/platform/5307/pit.c3
-rw-r--r--arch/m68knommu/platform/5307/timers.c5
-rw-r--r--arch/m68knommu/platform/5307/vectors.c1
-rw-r--r--arch/m68knommu/platform/5407/config.c1
-rw-r--r--arch/m68knommu/platform/68328/config.c1
-rw-r--r--arch/m68knommu/platform/68328/entry.S1
-rw-r--r--arch/m68knommu/platform/68328/head-de2.S1
-rw-r--r--arch/m68knommu/platform/68328/head-pilot.S1
-rw-r--r--arch/m68knommu/platform/68328/head-ram.S1
-rw-r--r--arch/m68knommu/platform/68328/head-rom.S1
-rw-r--r--arch/m68knommu/platform/68328/timers.c1
-rw-r--r--arch/m68knommu/platform/68360/config.c1
-rw-r--r--arch/m68knommu/platform/68360/entry.S1
-rw-r--r--arch/m68knommu/platform/68360/head-ram.S1
-rw-r--r--arch/m68knommu/platform/68360/head-rom.S1
-rw-r--r--arch/m68knommu/platform/68360/ints.c1
-rw-r--r--arch/m68knommu/platform/68EZ328/config.c1
-rw-r--r--arch/m68knommu/platform/68VZ328/config.c1
-rw-r--r--arch/mips/arc/identify.c1
-rw-r--r--arch/mips/au1000/common/au1xxx_irqmap.c1
-rw-r--r--arch/mips/au1000/common/dbdma.c3
-rw-r--r--arch/mips/au1000/common/dbg_io.c1
-rw-r--r--arch/mips/au1000/common/dma.c1
-rw-r--r--arch/mips/au1000/common/gpio.c1
-rw-r--r--arch/mips/au1000/common/irq.c3
-rw-r--r--arch/mips/au1000/common/pci.c1
-rw-r--r--arch/mips/au1000/common/platform.c1
-rw-r--r--arch/mips/au1000/common/power.c1
-rw-r--r--arch/mips/au1000/common/reset.c1
-rw-r--r--arch/mips/au1000/common/setup.c1
-rw-r--r--arch/mips/au1000/common/time.c1
-rw-r--r--arch/mips/au1000/common/usbdev.c8
-rw-r--r--arch/mips/au1000/csb250/board_setup.c1
-rw-r--r--arch/mips/au1000/db1x00/board_setup.c1
-rw-r--r--arch/mips/au1000/db1x00/init.c1
-rw-r--r--arch/mips/au1000/db1x00/irqmap.c1
-rw-r--r--arch/mips/au1000/db1x00/mirage_ts.c1
-rw-r--r--arch/mips/au1000/hydrogen3/board_setup.c1
-rw-r--r--arch/mips/au1000/hydrogen3/init.c1
-rw-r--r--arch/mips/au1000/mtx-1/board_setup.c1
-rw-r--r--arch/mips/au1000/pb1000/board_setup.c1
-rw-r--r--arch/mips/au1000/pb1100/board_setup.c1
-rw-r--r--arch/mips/au1000/pb1200/board_setup.c1
-rw-r--r--arch/mips/au1000/pb1200/irqmap.c1
-rw-r--r--arch/mips/au1000/pb1500/board_setup.c1
-rw-r--r--arch/mips/au1000/xxs1500/board_setup.c1
-rw-r--r--arch/mips/basler/excite/excite_iodev.c2
-rw-r--r--arch/mips/cobalt/console.c1
-rw-r--r--arch/mips/cobalt/setup.c1
-rw-r--r--arch/mips/ddb5xxx/common/prom.c1
-rw-r--r--arch/mips/ddb5xxx/ddb5477/irq.c1
-rw-r--r--arch/mips/ddb5xxx/ddb5477/setup.c1
-rw-r--r--arch/mips/dec/int-handler.S1
-rw-r--r--arch/mips/dec/prom/init.c1
-rw-r--r--arch/mips/dec/prom/memory.c1
-rw-r--r--arch/mips/dec/setup.c4
-rw-r--r--arch/mips/galileo-boards/ev96100/setup.c1
-rw-r--r--arch/mips/galileo-boards/ev96100/time.c1
-rw-r--r--arch/mips/gt64120/common/time.c3
-rw-r--r--arch/mips/gt64120/momenco_ocelot/dbg_io.c1
-rw-r--r--arch/mips/ite-boards/generic/dbg_io.c1
-rw-r--r--arch/mips/ite-boards/generic/it8172_cir.c1
-rw-r--r--arch/mips/ite-boards/generic/it8172_setup.c1
-rw-r--r--arch/mips/ite-boards/generic/pmon_prom.c1
-rw-r--r--arch/mips/jazz/setup.c1
-rw-r--r--arch/mips/jmr3927/rbhma3100/init.c1
-rw-r--r--arch/mips/jmr3927/rbhma3100/irq.c1
-rw-r--r--arch/mips/jmr3927/rbhma3100/setup.c1
-rw-r--r--arch/mips/kernel/asm-offsets.c1
-rw-r--r--arch/mips/kernel/cpu-bugs64.c1
-rw-r--r--arch/mips/kernel/cpu-probe.c1
-rw-r--r--arch/mips/kernel/entry.S1
-rw-r--r--arch/mips/kernel/gdb-low.S1
-rw-r--r--arch/mips/kernel/gdb-stub.c1
-rw-r--r--arch/mips/kernel/genex.S1
-rw-r--r--arch/mips/kernel/head.S1
-rw-r--r--arch/mips/kernel/irq.c1
-rw-r--r--arch/mips/kernel/linux32.c1
-rw-r--r--arch/mips/kernel/mips_ksyms.c1
-rw-r--r--arch/mips/kernel/proc.c1
-rw-r--r--arch/mips/kernel/process.c1
-rw-r--r--arch/mips/kernel/ptrace.c1
-rw-r--r--arch/mips/kernel/r2300_switch.S1
-rw-r--r--arch/mips/kernel/r4k_fpu.S1
-rw-r--r--arch/mips/kernel/r4k_switch.S1
-rw-r--r--arch/mips/kernel/rtlx.c2
-rw-r--r--arch/mips/kernel/scall32-o32.S1
-rw-r--r--arch/mips/kernel/scall64-64.S1
-rw-r--r--arch/mips/kernel/scall64-n32.S1
-rw-r--r--arch/mips/kernel/scall64-o32.S1
-rw-r--r--arch/mips/kernel/setup.c1
-rw-r--r--arch/mips/kernel/signal-common.h1
-rw-r--r--arch/mips/kernel/signal.c1
-rw-r--r--arch/mips/kernel/smp-mt.c4
-rw-r--r--arch/mips/kernel/smtc.c2
-rw-r--r--arch/mips/kernel/syscall.c1
-rw-r--r--arch/mips/kernel/time.c3
-rw-r--r--arch/mips/kernel/traps.c1
-rw-r--r--arch/mips/kernel/unaligned.c1
-rw-r--r--arch/mips/kernel/vmlinux.lds.S1
-rw-r--r--arch/mips/lasat/lasat_board.c1
-rw-r--r--arch/mips/lasat/reset.c1
-rw-r--r--arch/mips/lasat/setup.c1
-rw-r--r--arch/mips/lasat/sysctl.c1
-rw-r--r--arch/mips/lib-32/dump_tlb.c1
-rw-r--r--arch/mips/lib-64/dump_tlb.c1
-rw-r--r--arch/mips/lib/memcpy.S1
-rw-r--r--arch/mips/math-emu/kernel_linkage.c1
-rw-r--r--arch/mips/mips-boards/atlas/atlas_setup.c1
-rw-r--r--arch/mips/mips-boards/generic/init.c1
-rw-r--r--arch/mips/mips-boards/generic/memory.c1
-rw-r--r--arch/mips/mips-boards/generic/printf.c1
-rw-r--r--arch/mips/mips-boards/generic/reset.c1
-rw-r--r--arch/mips/mips-boards/generic/time.c1
-rw-r--r--arch/mips/mips-boards/malta/malta_setup.c1
-rw-r--r--arch/mips/mips-boards/sead/sead_setup.c1
-rw-r--r--arch/mips/mips-boards/sim/sim_IRQ.c1
-rw-r--r--arch/mips/mips-boards/sim/sim_irq.S1
-rw-r--r--arch/mips/mips-boards/sim/sim_setup.c1
-rw-r--r--arch/mips/mips-boards/sim/sim_smp.c1
-rw-r--r--arch/mips/mips-boards/sim/sim_time.c1
-rw-r--r--arch/mips/mm/c-r4k.c1
-rw-r--r--arch/mips/mm/c-sb1.c1
-rw-r--r--arch/mips/mm/cache.c1
-rw-r--r--arch/mips/mm/cerr-sb1.c1
-rw-r--r--arch/mips/mm/dma-coherent.c1
-rw-r--r--arch/mips/mm/dma-noncoherent.c1
-rw-r--r--arch/mips/mm/highmem.c1
-rw-r--r--arch/mips/mm/init.c1
-rw-r--r--arch/mips/mm/pg-sb1.c1
-rw-r--r--arch/mips/mm/pgtable-32.c1
-rw-r--r--arch/mips/mm/pgtable.c1
-rw-r--r--arch/mips/mm/tlb-r4k.c1
-rw-r--r--arch/mips/mm/tlb-r8k.c1
-rw-r--r--arch/mips/mm/tlbex.c1
-rw-r--r--arch/mips/momentum/jaguar_atx/dbg_io.c1
-rw-r--r--arch/mips/momentum/jaguar_atx/irq.c2
-rw-r--r--arch/mips/momentum/jaguar_atx/prom.c1
-rw-r--r--arch/mips/momentum/jaguar_atx/reset.c1
-rw-r--r--arch/mips/momentum/jaguar_atx/setup.c1
-rw-r--r--arch/mips/momentum/ocelot_3/irq.c2
-rw-r--r--arch/mips/momentum/ocelot_3/prom.c1
-rw-r--r--arch/mips/momentum/ocelot_c/dbg_io.c1
-rw-r--r--arch/mips/momentum/ocelot_c/irq.c4
-rw-r--r--arch/mips/momentum/ocelot_c/ocelot_c_fpga.h1
-rw-r--r--arch/mips/momentum/ocelot_c/prom.c1
-rw-r--r--arch/mips/momentum/ocelot_c/reset.c1
-rw-r--r--arch/mips/momentum/ocelot_c/setup.c1
-rw-r--r--arch/mips/momentum/ocelot_g/dbg_io.c1
-rw-r--r--arch/mips/momentum/ocelot_g/gt-irq.c3
-rw-r--r--arch/mips/momentum/ocelot_g/prom.c1
-rw-r--r--arch/mips/momentum/ocelot_g/setup.c1
-rw-r--r--arch/mips/pci/fixup-atlas.c1
-rw-r--r--arch/mips/pci/fixup-vr4133.c1
-rw-r--r--arch/mips/pci/ops-au1000.c1
-rw-r--r--arch/mips/pci/pci-bcm1480.c1
-rw-r--r--arch/mips/pci/pci-bcm1480ht.c1
-rw-r--r--arch/mips/pci/pci-ip32.c1
-rw-r--r--arch/mips/pci/pci-sb1250.c1
-rw-r--r--arch/mips/pci/pci.c1
-rw-r--r--arch/mips/philips/pnx8550/common/int.c5
-rw-r--r--arch/mips/philips/pnx8550/common/setup.c1
-rw-r--r--arch/mips/pmc-sierra/yosemite/ht.c1
-rw-r--r--arch/mips/pmc-sierra/yosemite/irq.c1
-rw-r--r--arch/mips/pmc-sierra/yosemite/prom.c1
-rw-r--r--arch/mips/sgi-ip22/ip22-eisa.c1
-rw-r--r--arch/mips/sgi-ip22/ip22-int.c11
-rw-r--r--arch/mips/sgi-ip22/ip22-setup.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-init.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-irq.c3
-rw-r--r--arch/mips/sgi-ip27/ip27-klnuma.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-memory.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-reset.c1
-rw-r--r--arch/mips/sgi-ip27/ip27-timer.c2
-rw-r--r--arch/mips/sgi-ip32/ip32-irq.c12
-rw-r--r--arch/mips/sgi-ip32/ip32-setup.c1
-rw-r--r--arch/mips/sibyte/bcm1480/irq.c1
-rw-r--r--arch/mips/sibyte/bcm1480/setup.c1
-rw-r--r--arch/mips/sibyte/bcm1480/time.c1
-rw-r--r--arch/mips/sibyte/cfe/console.c1
-rw-r--r--arch/mips/sibyte/cfe/setup.c1
-rw-r--r--arch/mips/sibyte/sb1250/bus_watcher.c1
-rw-r--r--arch/mips/sibyte/sb1250/irq.c1
-rw-r--r--arch/mips/sibyte/sb1250/prom.c1
-rw-r--r--arch/mips/sibyte/sb1250/setup.c1
-rw-r--r--arch/mips/sibyte/sb1250/time.c1
-rw-r--r--arch/mips/sibyte/swarm/setup.c1
-rw-r--r--arch/mips/sni/setup.c1
-rw-r--r--arch/mips/tx4927/common/tx4927_irq.c1
-rw-r--r--arch/mips/tx4927/common/tx4927_setup.c1
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c3
-rw-r--r--arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c1
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/prom.c1
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/setup.c1
-rw-r--r--arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c1
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/init.c1
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c1
-rw-r--r--arch/mips/vr41xx/nec-cmbvr4133/setup.c1
-rw-r--r--arch/parisc/kernel/entry.S1
-rw-r--r--arch/parisc/kernel/irq.c5
-rw-r--r--arch/parisc/kernel/pacache.S1
-rw-r--r--arch/parisc/kernel/parisc_ksyms.c1
-rw-r--r--arch/parisc/kernel/pci.c1
-rw-r--r--arch/parisc/kernel/pdc_cons.c1
-rw-r--r--arch/parisc/kernel/perf_asm.S1
-rw-r--r--arch/parisc/kernel/processor.c1
-rw-r--r--arch/parisc/kernel/real2.S1
-rw-r--r--arch/parisc/kernel/setup.c1
-rw-r--r--arch/parisc/kernel/smp.c1
-rw-r--r--arch/parisc/kernel/sys_parisc32.c1
-rw-r--r--arch/parisc/kernel/time.c1
-rw-r--r--arch/parisc/kernel/traps.c1
-rw-r--r--arch/parisc/kernel/unaligned.c1
-rw-r--r--arch/parisc/kernel/unwind.c1
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S1
-rw-r--r--arch/parisc/lib/bitops.c1
-rw-r--r--arch/parisc/lib/fixup.S1
-rw-r--r--arch/parisc/lib/memcpy.c1
-rw-r--r--arch/parisc/mm/init.c5
-rw-r--r--arch/powerpc/kernel/asm-offsets.c1
-rw-r--r--arch/powerpc/kernel/binfmt_elf32.c1
-rw-r--r--arch/powerpc/kernel/btext.c1
-rw-r--r--arch/powerpc/kernel/cpu_setup_6xx.S1
-rw-r--r--arch/powerpc/kernel/cpu_setup_power4.S1
-rw-r--r--arch/powerpc/kernel/cputable.c1
-rw-r--r--arch/powerpc/kernel/entry_32.S1
-rw-r--r--arch/powerpc/kernel/entry_64.S1
-rw-r--r--arch/powerpc/kernel/firmware.c1
-rw-r--r--arch/powerpc/kernel/fpu.S1
-rw-r--r--arch/powerpc/kernel/head_32.S1
-rw-r--r--arch/powerpc/kernel/head_44x.S1
-rw-r--r--arch/powerpc/kernel/head_4xx.S1
-rw-r--r--arch/powerpc/kernel/head_64.S1
-rw-r--r--arch/powerpc/kernel/head_8xx.S1
-rw-r--r--arch/powerpc/kernel/head_fsl_booke.S1
-rw-r--r--arch/powerpc/kernel/idle.c1
-rw-r--r--arch/powerpc/kernel/idle_6xx.S1
-rw-r--r--arch/powerpc/kernel/idle_power4.S1
-rw-r--r--arch/powerpc/kernel/iommu.c1
-rw-r--r--arch/powerpc/kernel/irq.c1
-rw-r--r--arch/powerpc/kernel/kprobes.c1
-rw-r--r--arch/powerpc/kernel/l2cr_6xx.S1
-rw-r--r--arch/powerpc/kernel/legacy_serial.c1
-rw-r--r--arch/powerpc/kernel/lparcfg.c1
-rw-r--r--arch/powerpc/kernel/misc_32.S1
-rw-r--r--arch/powerpc/kernel/misc_64.S1
-rw-r--r--arch/powerpc/kernel/of_device.c1
-rw-r--r--arch/powerpc/kernel/paca.c1
-rw-r--r--arch/powerpc/kernel/pci_32.c1
-rw-r--r--arch/powerpc/kernel/pci_64.c1
-rw-r--r--arch/powerpc/kernel/perfmon_fsl_booke.c1
-rw-r--r--arch/powerpc/kernel/pmc.c1
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c1
-rw-r--r--arch/powerpc/kernel/proc_ppc64.c1
-rw-r--r--arch/powerpc/kernel/process.c1
-rw-r--r--arch/powerpc/kernel/prom.c1
-rw-r--r--arch/powerpc/kernel/prom_init.c3
-rw-r--r--arch/powerpc/kernel/ptrace-common.h1
-rw-r--r--arch/powerpc/kernel/ptrace.c1
-rw-r--r--arch/powerpc/kernel/ptrace32.c1
-rw-r--r--arch/powerpc/kernel/setup-common.c1
-rw-r--r--arch/powerpc/kernel/setup_32.c1
-rw-r--r--arch/powerpc/kernel/setup_64.c1
-rw-r--r--arch/powerpc/kernel/signal_32.c1
-rw-r--r--arch/powerpc/kernel/signal_64.c1
-rw-r--r--arch/powerpc/kernel/smp-tbsync.c1
-rw-r--r--arch/powerpc/kernel/smp.c1
-rw-r--r--arch/powerpc/kernel/swsusp_32.S1
-rw-r--r--arch/powerpc/kernel/sys_ppc32.c1
-rw-r--r--arch/powerpc/kernel/sysfs.c1
-rw-r--r--arch/powerpc/kernel/systbl.S1
-rw-r--r--arch/powerpc/kernel/tau_6xx.c1
-rw-r--r--arch/powerpc/kernel/time.c1
-rw-r--r--arch/powerpc/kernel/traps.c1
-rw-r--r--arch/powerpc/kernel/udbg.c1
-rw-r--r--arch/powerpc/kernel/udbg_16550.c1
-rw-r--r--arch/powerpc/kernel/vdso.c1
-rw-r--r--arch/powerpc/kernel/vdso32/cacheflush.S1
-rw-r--r--arch/powerpc/kernel/vdso32/datapage.S1
-rw-r--r--arch/powerpc/kernel/vdso32/gettimeofday.S1
-rw-r--r--arch/powerpc/kernel/vdso32/sigtramp.S1
-rw-r--r--arch/powerpc/kernel/vdso64/cacheflush.S1
-rw-r--r--arch/powerpc/kernel/vdso64/datapage.S1
-rw-r--r--arch/powerpc/kernel/vdso64/gettimeofday.S1
-rw-r--r--arch/powerpc/kernel/vdso64/sigtramp.S1
-rw-r--r--arch/powerpc/kernel/vector.S1
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S1
-rw-r--r--arch/powerpc/lib/copy_32.S1
-rw-r--r--arch/powerpc/lib/locks.c1
-rw-r--r--arch/powerpc/lib/sstep.c1
-rw-r--r--arch/powerpc/lib/string.S1
-rw-r--r--arch/powerpc/math-emu/math.c1
-rw-r--r--arch/powerpc/mm/44x_mmu.c1
-rw-r--r--arch/powerpc/mm/4xx_mmu.c1
-rw-r--r--arch/powerpc/mm/fault.c1
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c1
-rw-r--r--arch/powerpc/mm/hash_low_32.S1
-rw-r--r--arch/powerpc/mm/hash_low_64.S1
-rw-r--r--arch/powerpc/mm/hash_utils_64.c1
-rw-r--r--arch/powerpc/mm/init_32.c1
-rw-r--r--arch/powerpc/mm/init_64.c1
-rw-r--r--arch/powerpc/mm/lmb.c1
-rw-r--r--arch/powerpc/mm/mem.c1
-rw-r--r--arch/powerpc/mm/mmu_context_32.c1
-rw-r--r--arch/powerpc/mm/mmu_context_64.c1
-rw-r--r--arch/powerpc/mm/pgtable_32.c1
-rw-r--r--arch/powerpc/mm/pgtable_64.c1
-rw-r--r--arch/powerpc/mm/ppc_mmu_32.c1
-rw-r--r--arch/powerpc/mm/slb.c1
-rw-r--r--arch/powerpc/mm/slb_low.S1
-rw-r--r--arch/powerpc/mm/stab.c1
-rw-r--r--arch/powerpc/mm/tlb_32.c1
-rw-r--r--arch/powerpc/mm/tlb_64.c1
-rw-r--r--arch/powerpc/platforms/83xx/misc.c1
-rw-r--r--arch/powerpc/platforms/83xx/mpc834x_sys.c1
-rw-r--r--arch/powerpc/platforms/83xx/pci.c1
-rw-r--r--arch/powerpc/platforms/85xx/mpc8540_ads.h1
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ads.c1
-rw-r--r--arch/powerpc/platforms/85xx/pci.c1
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c5
-rw-r--r--arch/powerpc/platforms/cell/pervasive.c1
-rw-r--r--arch/powerpc/platforms/cell/setup.c1
-rw-r--r--arch/powerpc/platforms/cell/smp.c1
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c6
-rw-r--r--arch/powerpc/platforms/cell/spufs/backing_ops.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/hw_ops.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/sched.c1
-rw-r--r--arch/powerpc/platforms/cell/spufs/switch.c1
-rw-r--r--arch/powerpc/platforms/chrp/pci.c1
-rw-r--r--arch/powerpc/platforms/chrp/setup.c1
-rw-r--r--arch/powerpc/platforms/chrp/smp.c1
-rw-r--r--arch/powerpc/platforms/iseries/irq.c1
-rw-r--r--arch/powerpc/platforms/iseries/lpardata.c1
-rw-r--r--arch/powerpc/platforms/iseries/setup.c1
-rw-r--r--arch/powerpc/platforms/iseries/smp.c1
-rw-r--r--arch/powerpc/platforms/maple/setup.c1
-rw-r--r--arch/powerpc/platforms/maple/time.c1
-rw-r--r--arch/powerpc/platforms/powermac/backlight.c1
-rw-r--r--arch/powerpc/platforms/powermac/bootx_init.c1
-rw-r--r--arch/powerpc/platforms/powermac/cache.S1
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c5
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_64.c1
-rw-r--r--arch/powerpc/platforms/powermac/feature.c1
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c1
-rw-r--r--arch/powerpc/platforms/powermac/nvram.c1
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_base.c1
-rw-r--r--arch/powerpc/platforms/powermac/pfunc_core.c1
-rw-r--r--arch/powerpc/platforms/powermac/pic.c3
-rw-r--r--arch/powerpc/platforms/powermac/setup.c1
-rw-r--r--arch/powerpc/platforms/powermac/sleep.S1
-rw-r--r--arch/powerpc/platforms/powermac/smp.c3
-rw-r--r--arch/powerpc/platforms/powermac/time.c1
-rw-r--r--arch/powerpc/platforms/powermac/udbg_adb.c1
-rw-r--r--arch/powerpc/platforms/powermac/udbg_scc.c1
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c2
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c1
-rw-r--r--arch/powerpc/platforms/pseries/lpar.c1
-rw-r--r--arch/powerpc/platforms/pseries/setup.c1
-rw-r--r--arch/powerpc/platforms/pseries/smp.c1
-rw-r--r--arch/powerpc/platforms/pseries/xics.c12
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c1
-rw-r--r--arch/powerpc/sysdev/fsl_soc.c1
-rw-r--r--arch/powerpc/sysdev/i8259.c2
-rw-r--r--arch/powerpc/sysdev/mpic.c16
-rw-r--r--arch/powerpc/xmon/xmon.c1
-rw-r--r--arch/ppc/4xx_io/serial_sicc.c1
-rw-r--r--arch/ppc/8260_io/fcc_enet.c3
-rw-r--r--arch/ppc/8xx_io/cs4218.h1
-rw-r--r--arch/ppc/8xx_io/cs4218_tdm.c1
-rw-r--r--arch/ppc/8xx_io/enet.c1
-rw-r--r--arch/ppc/8xx_io/fec.c1
-rw-r--r--arch/ppc/8xx_io/micropatch.c1
-rw-r--r--arch/ppc/amiga/amiints.c1
-rw-r--r--arch/ppc/amiga/config.c1
-rw-r--r--arch/ppc/boot/common/crt0.S1
-rw-r--r--arch/ppc/boot/common/misc-common.c1
-rw-r--r--arch/ppc/boot/common/ns16550.c1
-rw-r--r--arch/ppc/boot/simple/embed_config.c1
-rw-r--r--arch/ppc/boot/simple/head.S1
-rw-r--r--arch/ppc/boot/simple/m8xx_tty.c1
-rw-r--r--arch/ppc/boot/simple/misc-chestnut.c1
-rw-r--r--arch/ppc/boot/simple/misc-embedded.c1
-rw-r--r--arch/ppc/boot/simple/misc-ev64260.c1
-rw-r--r--arch/ppc/boot/simple/misc-ev64360.c1
-rw-r--r--arch/ppc/boot/simple/misc-katana.c1
-rw-r--r--arch/ppc/boot/simple/misc-mv64x60.c1
-rw-r--r--arch/ppc/boot/simple/misc-prep.c1
-rw-r--r--arch/ppc/boot/simple/misc-spruce.c1
-rw-r--r--arch/ppc/boot/simple/misc.c1
-rw-r--r--arch/ppc/boot/simple/mpc52xx_tty.c1
-rw-r--r--arch/ppc/boot/simple/mv64x60_tty.c1
-rw-r--r--arch/ppc/boot/simple/openbios.c1
-rw-r--r--arch/ppc/boot/simple/pibs.c1
-rw-r--r--arch/ppc/boot/simple/relocate.S1
-rw-r--r--arch/ppc/kernel/asm-offsets.c1
-rw-r--r--arch/ppc/kernel/cpu_setup_power4.S1
-rw-r--r--arch/ppc/kernel/dma-mapping.c1
-rw-r--r--arch/ppc/kernel/entry.S1
-rw-r--r--arch/ppc/kernel/head.S1
-rw-r--r--arch/ppc/kernel/head_44x.S1
-rw-r--r--arch/ppc/kernel/head_4xx.S1
-rw-r--r--arch/ppc/kernel/head_8xx.S1
-rw-r--r--arch/ppc/kernel/head_fsl_booke.S1
-rw-r--r--arch/ppc/kernel/misc.S1
-rw-r--r--arch/ppc/kernel/pci.c1
-rw-r--r--arch/ppc/kernel/ppc-stub.c1
-rw-r--r--arch/ppc/kernel/ppc_htab.c1
-rw-r--r--arch/ppc/kernel/ppc_ksyms.c1
-rw-r--r--arch/ppc/kernel/setup.c1
-rw-r--r--arch/ppc/kernel/smp-tbsync.c1
-rw-r--r--arch/ppc/kernel/smp.c1
-rw-r--r--arch/ppc/kernel/time.c1
-rw-r--r--arch/ppc/kernel/traps.c1
-rw-r--r--arch/ppc/lib/locks.c1
-rw-r--r--arch/ppc/lib/string.S1
-rw-r--r--arch/ppc/mm/44x_mmu.c1
-rw-r--r--arch/ppc/mm/4xx_mmu.c1
-rw-r--r--arch/ppc/mm/fault.c1
-rw-r--r--arch/ppc/mm/fsl_booke_mmu.c1
-rw-r--r--arch/ppc/mm/hashtable.S1
-rw-r--r--arch/ppc/mm/init.c1
-rw-r--r--arch/ppc/mm/mem_pieces.c1
-rw-r--r--arch/ppc/mm/mmu_context.c1
-rw-r--r--arch/ppc/mm/pgtable.c1
-rw-r--r--arch/ppc/mm/ppc_mmu.c1
-rw-r--r--arch/ppc/mm/tlb.c1
-rw-r--r--arch/ppc/platforms/4xx/bamboo.c1
-rw-r--r--arch/ppc/platforms/4xx/bamboo.h1
-rw-r--r--arch/ppc/platforms/4xx/bubinga.c1
-rw-r--r--arch/ppc/platforms/4xx/bubinga.h1
-rw-r--r--arch/ppc/platforms/4xx/cpci405.c1
-rw-r--r--arch/ppc/platforms/4xx/ebony.c1
-rw-r--r--arch/ppc/platforms/4xx/ebony.h1
-rw-r--r--arch/ppc/platforms/4xx/ep405.c1
-rw-r--r--arch/ppc/platforms/4xx/ibm405ep.c1
-rw-r--r--arch/ppc/platforms/4xx/ibm405ep.h1
-rw-r--r--arch/ppc/platforms/4xx/ibm405gp.c1
-rw-r--r--arch/ppc/platforms/4xx/ibm405gp.h1
-rw-r--r--arch/ppc/platforms/4xx/ibm405gpr.c1
-rw-r--r--arch/ppc/platforms/4xx/ibm405gpr.h1
-rw-r--r--arch/ppc/platforms/4xx/ibm440ep.h1
-rw-r--r--arch/ppc/platforms/4xx/ibm440gp.h1
-rw-r--r--arch/ppc/platforms/4xx/ibm440gx.h1
-rw-r--r--arch/ppc/platforms/4xx/ibm440sp.h1
-rw-r--r--arch/ppc/platforms/4xx/ibmnp405h.c1
-rw-r--r--arch/ppc/platforms/4xx/ibmnp405h.h1
-rw-r--r--arch/ppc/platforms/4xx/ibmstb4.h1
-rw-r--r--arch/ppc/platforms/4xx/ibmstbx25.h1
-rw-r--r--arch/ppc/platforms/4xx/luan.c1
-rw-r--r--arch/ppc/platforms/4xx/luan.h1
-rw-r--r--arch/ppc/platforms/4xx/ocotea.c1
-rw-r--r--arch/ppc/platforms/4xx/ocotea.h1
-rw-r--r--arch/ppc/platforms/4xx/ppc440spe.h1
-rw-r--r--arch/ppc/platforms/4xx/redwood5.c1
-rw-r--r--arch/ppc/platforms/4xx/redwood6.c1
-rw-r--r--arch/ppc/platforms/4xx/sycamore.c1
-rw-r--r--arch/ppc/platforms/4xx/sycamore.h1
-rw-r--r--arch/ppc/platforms/4xx/walnut.c1
-rw-r--r--arch/ppc/platforms/4xx/walnut.h1
-rw-r--r--arch/ppc/platforms/4xx/xilinx_ml300.c1
-rw-r--r--arch/ppc/platforms/4xx/xilinx_ml403.c1
-rw-r--r--arch/ppc/platforms/4xx/xparameters/xparameters.h1
-rw-r--r--arch/ppc/platforms/4xx/yucca.c1
-rw-r--r--arch/ppc/platforms/4xx/yucca.h1
-rw-r--r--arch/ppc/platforms/83xx/mpc834x_sys.c1
-rw-r--r--arch/ppc/platforms/83xx/mpc834x_sys.h1
-rw-r--r--arch/ppc/platforms/85xx/mpc8540_ads.c1
-rw-r--r--arch/ppc/platforms/85xx/mpc8540_ads.h1
-rw-r--r--arch/ppc/platforms/85xx/mpc8555_cds.h1
-rw-r--r--arch/ppc/platforms/85xx/mpc8560_ads.c3
-rw-r--r--arch/ppc/platforms/85xx/mpc8560_ads.h1
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_ads_common.c1
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_ads_common.h1
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_cds_common.c3
-rw-r--r--arch/ppc/platforms/85xx/mpc85xx_cds_common.h1
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.c1
-rw-r--r--arch/ppc/platforms/85xx/sbc8560.h1
-rw-r--r--arch/ppc/platforms/85xx/sbc85xx.c1
-rw-r--r--arch/ppc/platforms/85xx/sbc85xx.h1
-rw-r--r--arch/ppc/platforms/85xx/stx_gp3.c3
-rw-r--r--arch/ppc/platforms/85xx/stx_gp3.h1
-rw-r--r--arch/ppc/platforms/85xx/tqm85xx.c3
-rw-r--r--arch/ppc/platforms/85xx/tqm85xx.h1
-rw-r--r--arch/ppc/platforms/apus_pci.c1
-rw-r--r--arch/ppc/platforms/apus_setup.c1
-rw-r--r--arch/ppc/platforms/ccm.h1
-rw-r--r--arch/ppc/platforms/chestnut.c1
-rw-r--r--arch/ppc/platforms/cpci690.c1
-rw-r--r--arch/ppc/platforms/ev64260.c1
-rw-r--r--arch/ppc/platforms/ev64360.c1
-rw-r--r--arch/ppc/platforms/fads.h1
-rw-r--r--arch/ppc/platforms/gemini_prom.S1
-rw-r--r--arch/ppc/platforms/gemini_serial.h1
-rw-r--r--arch/ppc/platforms/gemini_setup.c1
-rw-r--r--arch/ppc/platforms/hdpu.c5
-rw-r--r--arch/ppc/platforms/hermes.h1
-rw-r--r--arch/ppc/platforms/ip860.h1
-rw-r--r--arch/ppc/platforms/ivms8.h1
-rw-r--r--arch/ppc/platforms/katana.c1
-rw-r--r--arch/ppc/platforms/lantec.h1
-rw-r--r--arch/ppc/platforms/lite5200.c1
-rw-r--r--arch/ppc/platforms/lopec.c1
-rw-r--r--arch/ppc/platforms/lwmon.h1
-rw-r--r--arch/ppc/platforms/mpc866ads_setup.c1
-rw-r--r--arch/ppc/platforms/mpc885ads.h1
-rw-r--r--arch/ppc/platforms/mpc885ads_setup.c1
-rw-r--r--arch/ppc/platforms/mvme5100.c1
-rw-r--r--arch/ppc/platforms/pal4_setup.c1
-rw-r--r--arch/ppc/platforms/pcu_e.h1
-rw-r--r--arch/ppc/platforms/powerpmc250.c1
-rw-r--r--arch/ppc/platforms/pplus.c1
-rw-r--r--arch/ppc/platforms/pq2ads.h1
-rw-r--r--arch/ppc/platforms/prep_pci.c1
-rw-r--r--arch/ppc/platforms/prep_setup.c1
-rw-r--r--arch/ppc/platforms/prpmc750.c1
-rw-r--r--arch/ppc/platforms/prpmc800.c1
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c3
-rw-r--r--arch/ppc/platforms/rpxclassic.h1
-rw-r--r--arch/ppc/platforms/rpxlite.h1
-rw-r--r--arch/ppc/platforms/sandpoint.c1
-rw-r--r--arch/ppc/platforms/sbc82xx.c3
-rw-r--r--arch/ppc/platforms/spruce.c1
-rw-r--r--arch/ppc/platforms/tqm8260.h1
-rw-r--r--arch/ppc/platforms/tqm8xx.h1
-rw-r--r--arch/ppc/syslib/btext.c1
-rw-r--r--arch/ppc/syslib/gen550_dbg.c1
-rw-r--r--arch/ppc/syslib/gen550_kgdb.c1
-rw-r--r--arch/ppc/syslib/gt64260_pic.c6
-rw-r--r--arch/ppc/syslib/ibm440gp_common.c1
-rw-r--r--arch/ppc/syslib/ibm440gp_common.h1
-rw-r--r--arch/ppc/syslib/ibm440gx_common.c3
-rw-r--r--arch/ppc/syslib/ibm440gx_common.h1
-rw-r--r--arch/ppc/syslib/ibm440sp_common.c1
-rw-r--r--arch/ppc/syslib/ibm44x_common.c1
-rw-r--r--arch/ppc/syslib/m8260_pci_erratum9.c1
-rw-r--r--arch/ppc/syslib/m8260_setup.c1
-rw-r--r--arch/ppc/syslib/m82xx_pci.c2
-rw-r--r--arch/ppc/syslib/m8xx_setup.c1
-rw-r--r--arch/ppc/syslib/mpc52xx_pci.c1
-rw-r--r--arch/ppc/syslib/mpc52xx_setup.c1
-rw-r--r--arch/ppc/syslib/mv64360_pic.c8
-rw-r--r--arch/ppc/syslib/mv64x60_dbg.c1
-rw-r--r--arch/ppc/syslib/ocp.c1
-rw-r--r--arch/ppc/syslib/open_pic.c16
-rw-r--r--arch/ppc/syslib/open_pic2.c1
-rw-r--r--arch/ppc/syslib/ppc440spe_pcie.c1
-rw-r--r--arch/ppc/syslib/ppc4xx_dma.c1
-rw-r--r--arch/ppc/syslib/ppc4xx_pic.c1
-rw-r--r--arch/ppc/syslib/ppc4xx_setup.c1
-rw-r--r--arch/ppc/syslib/ppc4xx_sgdma.c1
-rw-r--r--arch/ppc/syslib/ppc83xx_setup.c1
-rw-r--r--arch/ppc/syslib/ppc83xx_setup.h1
-rw-r--r--arch/ppc/syslib/ppc85xx_common.c1
-rw-r--r--arch/ppc/syslib/ppc85xx_common.h1
-rw-r--r--arch/ppc/syslib/ppc85xx_rio.c1
-rw-r--r--arch/ppc/syslib/ppc85xx_rio.h1
-rw-r--r--arch/ppc/syslib/ppc85xx_setup.c1
-rw-r--r--arch/ppc/syslib/ppc85xx_setup.h1
-rw-r--r--arch/ppc/syslib/ppc8xx_pic.c1
-rw-r--r--arch/ppc/syslib/ppc8xx_pic.h1
-rw-r--r--arch/ppc/syslib/qspan_pci.c1
-rw-r--r--arch/ppc/xmon/privinst.h1
-rw-r--r--arch/ppc/xmon/start.c1
-rw-r--r--arch/ppc/xmon/xmon.c1
-rw-r--r--arch/s390/appldata/appldata_base.c1
-rw-r--r--arch/s390/appldata/appldata_mem.c1
-rw-r--r--arch/s390/appldata/appldata_net_sum.c1
-rw-r--r--arch/s390/appldata/appldata_os.c1
-rw-r--r--arch/s390/kernel/asm-offsets.c1
-rw-r--r--arch/s390/kernel/binfmt_elf32.c1
-rw-r--r--arch/s390/kernel/compat_linux.c1
-rw-r--r--arch/s390/kernel/compat_linux.h1
-rw-r--r--arch/s390/kernel/compat_signal.c1
-rw-r--r--arch/s390/kernel/debug.c1
-rw-r--r--arch/s390/kernel/entry.S10
-rw-r--r--arch/s390/kernel/entry64.S2
-rw-r--r--arch/s390/kernel/head.S1
-rw-r--r--arch/s390/kernel/process.c1
-rw-r--r--arch/s390/kernel/s390_ksyms.c1
-rw-r--r--arch/s390/kernel/setup.c1
-rw-r--r--arch/s390/kernel/signal.c1
-rw-r--r--arch/s390/kernel/time.c1
-rw-r--r--arch/s390/kernel/traps.c1
-rw-r--r--arch/s390/kernel/vmlinux.lds.S1
-rw-r--r--arch/s390/kernel/vtime.c1
-rw-r--r--arch/s390/lib/delay.c1
-rw-r--r--arch/s390/math-emu/math.c1
-rw-r--r--arch/s390/mm/cmm.c1
-rw-r--r--arch/s390/mm/fault.c1
-rw-r--r--arch/s390/mm/init.c36
-rw-r--r--arch/sh/boards/adx/irq_maskreg.c1
-rw-r--r--arch/sh/boards/bigsur/io.c1
-rw-r--r--arch/sh/boards/bigsur/irq.c1
-rw-r--r--arch/sh/boards/bigsur/led.c1
-rw-r--r--arch/sh/boards/bigsur/setup.c1
-rw-r--r--arch/sh/boards/cat68701/setup.c1
-rw-r--r--arch/sh/boards/cqreek/setup.c1
-rw-r--r--arch/sh/boards/harp/irq.c1
-rw-r--r--arch/sh/boards/harp/led.c1
-rw-r--r--arch/sh/boards/harp/setup.c1
-rw-r--r--arch/sh/boards/hp6xx/setup.c1
-rw-r--r--arch/sh/boards/mpc1211/led.c1
-rw-r--r--arch/sh/boards/mpc1211/pci.c1
-rw-r--r--arch/sh/boards/mpc1211/setup.c1
-rw-r--r--arch/sh/boards/overdrive/fpga.c1
-rw-r--r--arch/sh/boards/overdrive/galileo.c1
-rw-r--r--arch/sh/boards/overdrive/io.c1
-rw-r--r--arch/sh/boards/overdrive/irq.c1
-rw-r--r--arch/sh/boards/overdrive/led.c1
-rw-r--r--arch/sh/boards/overdrive/setup.c1
-rw-r--r--arch/sh/boards/renesas/edosk7705/setup.c1
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/io.c1
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/irq.c1
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/led.c1
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/mach.c1
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/pci.c1
-rw-r--r--arch/sh/boards/renesas/hs7751rvoip/setup.c1
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/irq.c1
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/led.c1
-rw-r--r--arch/sh/boards/renesas/rts7751r2d/mach.c1
-rw-r--r--arch/sh/boards/renesas/systemh/irq.c1
-rw-r--r--arch/sh/boards/se/7300/io.c1
-rw-r--r--arch/sh/boards/se/7300/irq.c1
-rw-r--r--arch/sh/boards/se/7300/led.c1
-rw-r--r--arch/sh/boards/se/7300/setup.c1
-rw-r--r--arch/sh/boards/se/73180/io.c1
-rw-r--r--arch/sh/boards/se/73180/irq.c1
-rw-r--r--arch/sh/boards/se/73180/led.c1
-rw-r--r--arch/sh/boards/se/73180/setup.c1
-rw-r--r--arch/sh/boards/se/770x/irq.c1
-rw-r--r--arch/sh/boards/se/770x/led.c1
-rw-r--r--arch/sh/boards/se/770x/mach.c1
-rw-r--r--arch/sh/boards/se/770x/setup.c1
-rw-r--r--arch/sh/boards/se/7751/irq.c1
-rw-r--r--arch/sh/boards/se/7751/led.c1
-rw-r--r--arch/sh/boards/se/7751/mach.c1
-rw-r--r--arch/sh/boards/se/7751/pci.c1
-rw-r--r--arch/sh/boards/se/7751/setup.c1
-rw-r--r--arch/sh/boards/sh03/led.c1
-rw-r--r--arch/sh/boards/sh03/setup.c1
-rw-r--r--arch/sh/boards/sh2000/setup.c1
-rw-r--r--arch/sh/boards/snapgear/setup.c3
-rw-r--r--arch/sh/boards/superh/microdev/io.c1
-rw-r--r--arch/sh/boards/superh/microdev/irq.c1
-rw-r--r--arch/sh/boards/superh/microdev/led.c1
-rw-r--r--arch/sh/boards/superh/microdev/setup.c1
-rw-r--r--arch/sh/boards/unknown/setup.c1
-rw-r--r--arch/sh/boot/compressed/head.S1
-rw-r--r--arch/sh/boot/compressed/misc.c1
-rw-r--r--arch/sh/cchips/hd6446x/hd64461/io.c1
-rw-r--r--arch/sh/cchips/hd6446x/hd64461/setup.c3
-rw-r--r--arch/sh/cchips/hd6446x/hd64465/gpio.c2
-rw-r--r--arch/sh/cchips/hd6446x/hd64465/io.c1
-rw-r--r--arch/sh/cchips/hd6446x/hd64465/setup.c3
-rw-r--r--arch/sh/cchips/voyagergx/irq.c3
-rw-r--r--arch/sh/drivers/dma/dma-g2.c2
-rw-r--r--arch/sh/drivers/dma/dma-pvr2.c2
-rw-r--r--arch/sh/drivers/dma/dma-sh.c5
-rw-r--r--arch/sh/drivers/pci/dma-dreamcast.c1
-rw-r--r--arch/sh/drivers/pci/fixups-dreamcast.c1
-rw-r--r--arch/sh/drivers/pci/ops-bigsur.c1
-rw-r--r--arch/sh/drivers/pci/ops-dreamcast.c1
-rw-r--r--arch/sh/drivers/pci/ops-rts7751r2d.c1
-rw-r--r--arch/sh/drivers/pci/ops-sh03.c1
-rw-r--r--arch/sh/drivers/pci/ops-snapgear.c1
-rw-r--r--arch/sh/drivers/pci/pci-sh7751.c1
-rw-r--r--arch/sh/drivers/pci/pci-st40.c3
-rw-r--r--arch/sh/kernel/cf-enabler.c1
-rw-r--r--arch/sh/kernel/cpu/irq/ipr.c1
-rw-r--r--arch/sh/kernel/cpu/irq/pint.c1
-rw-r--r--arch/sh/kernel/cpu/sh3/ex.S1
-rw-r--r--arch/sh/kernel/cpu/sh4/ex.S1
-rw-r--r--arch/sh/kernel/cpu/sh4/sq.c1
-rw-r--r--arch/sh/kernel/entry.S1
-rw-r--r--arch/sh/kernel/ptrace.c1
-rw-r--r--arch/sh/kernel/relocate_kernel.S1
-rw-r--r--arch/sh/kernel/sh_ksyms.c1
-rw-r--r--arch/sh/kernel/smp.c1
-rw-r--r--arch/sh/kernel/time.c1
-rw-r--r--arch/sh/kernel/timers/timer-tmu.c2
-rw-r--r--arch/sh/kernel/traps.c1
-rw-r--r--arch/sh/kernel/vmlinux.lds.S1
-rw-r--r--arch/sh/lib/memcpy-sh4.S1
-rw-r--r--arch/sh/mm/cache-sh4.c1
-rw-r--r--arch/sh/mm/clear_page.S1
-rw-r--r--arch/sh/mm/extable.c1
-rw-r--r--arch/sh/mm/hugetlbpage.c1
-rw-r--r--arch/sh/mm/init.c1
-rw-r--r--arch/sh/mm/pg-sh4.c1
-rw-r--r--arch/sh64/boot/compressed/misc.c1
-rw-r--r--arch/sh64/boot/compressed/vmlinux.lds.S1
-rw-r--r--arch/sh64/kernel/alphanum.c1
-rw-r--r--arch/sh64/kernel/dma.c4
-rw-r--r--arch/sh64/kernel/entry.S1
-rw-r--r--arch/sh64/kernel/head.S1
-rw-r--r--arch/sh64/kernel/irq.c1
-rw-r--r--arch/sh64/kernel/irq_intc.c1
-rw-r--r--arch/sh64/kernel/led.c1
-rw-r--r--arch/sh64/kernel/pci_sh5.c5
-rw-r--r--arch/sh64/kernel/process.c1
-rw-r--r--arch/sh64/kernel/ptrace.c1
-rw-r--r--arch/sh64/kernel/setup.c1
-rw-r--r--arch/sh64/kernel/sh_ksyms.c1
-rw-r--r--arch/sh64/kernel/time.c5
-rw-r--r--arch/sh64/kernel/vmlinux.lds.S1
-rw-r--r--arch/sh64/lib/c-checksum.c1
-rw-r--r--arch/sh64/lib/dbg.c1
-rw-r--r--arch/sh64/lib/io.c1
-rw-r--r--arch/sh64/lib/iomap.c1
-rw-r--r--arch/sh64/lib/memcpy.c1
-rw-r--r--arch/sh64/lib/udelay.c1
-rw-r--r--arch/sh64/mach-cayman/iomap.c1
-rw-r--r--arch/sh64/mach-cayman/irq.c5
-rw-r--r--arch/sh64/mach-cayman/setup.c1
-rw-r--r--arch/sh64/mach-harp/setup.c1
-rw-r--r--arch/sh64/mach-romram/setup.c1
-rw-r--r--arch/sh64/mach-sim/setup.c1
-rw-r--r--arch/sh64/mm/cache.c1
-rw-r--r--arch/sh64/mm/extable.c1
-rw-r--r--arch/sh64/mm/hugetlbpage.c1
-rw-r--r--arch/sparc/kernel/asm-offsets.c1
-rw-r--r--arch/sparc/kernel/auxio.c1
-rw-r--r--arch/sparc/kernel/cpu.c1
-rw-r--r--arch/sparc/kernel/devices.c1
-rw-r--r--arch/sparc/kernel/ebus.c1
-rw-r--r--arch/sparc/kernel/entry.S1
-rw-r--r--arch/sparc/kernel/head.S1
-rw-r--r--arch/sparc/kernel/idprom.c1
-rw-r--r--arch/sparc/kernel/irq.c15
-rw-r--r--arch/sparc/kernel/pcic.c3
-rw-r--r--arch/sparc/kernel/process.c1
-rw-r--r--arch/sparc/kernel/setup.c1
-rw-r--r--arch/sparc/kernel/signal.c1
-rw-r--r--arch/sparc/kernel/sparc_ksyms.c1
-rw-r--r--arch/sparc/kernel/sun4c_irq.c3
-rw-r--r--arch/sparc/kernel/sun4d_irq.c13
-rw-r--r--arch/sparc/kernel/sun4m_irq.c3
-rw-r--r--arch/sparc/kernel/sys_solaris.c1
-rw-r--r--arch/sparc/kernel/systbls.S1
-rw-r--r--arch/sparc/kernel/tick14.c2
-rw-r--r--arch/sparc/kernel/time.c1
-rw-r--r--arch/sparc/kernel/traps.c1
-rw-r--r--arch/sparc/lib/atomic.S1
-rw-r--r--arch/sparc/lib/bitops.S1
-rw-r--r--arch/sparc/lib/rwsem.S1
-rw-r--r--arch/sparc/mm/btfixup.c1
-rw-r--r--arch/sparc/mm/extable.c1
-rw-r--r--arch/sparc/mm/hypersparc.S1
-rw-r--r--arch/sparc/mm/init.c1
-rw-r--r--arch/sparc/mm/io-unit.c1
-rw-r--r--arch/sparc/mm/iommu.c1
-rw-r--r--arch/sparc/mm/srmmu.c1
-rw-r--r--arch/sparc/mm/sun4c.c1
-rw-r--r--arch/sparc/mm/swift.S1
-rw-r--r--arch/sparc/mm/tsunami.S1
-rw-r--r--arch/sparc/mm/viking.S1
-rw-r--r--arch/sparc/prom/init.c1
-rw-r--r--arch/sparc/prom/memory.c1
-rw-r--r--arch/sparc/prom/misc.c1
-rw-r--r--arch/sparc64/kernel/binfmt_elf32.c1
-rw-r--r--arch/sparc64/kernel/cpu.c1
-rw-r--r--arch/sparc64/kernel/devices.c98
-rw-r--r--arch/sparc64/kernel/ebus.c3
-rw-r--r--arch/sparc64/kernel/entry.S1
-rw-r--r--arch/sparc64/kernel/etrap.S1
-rw-r--r--arch/sparc64/kernel/head.S1
-rw-r--r--arch/sparc64/kernel/irq.c1
-rw-r--r--arch/sparc64/kernel/kprobes.c1
-rw-r--r--arch/sparc64/kernel/ktlb.S1
-rw-r--r--arch/sparc64/kernel/of_device.c3
-rw-r--r--arch/sparc64/kernel/pci.c1
-rw-r--r--arch/sparc64/kernel/pci_psycho.c8
-rw-r--r--arch/sparc64/kernel/pci_sabre.c6
-rw-r--r--arch/sparc64/kernel/pci_schizo.c20
-rw-r--r--arch/sparc64/kernel/power.c1
-rw-r--r--arch/sparc64/kernel/process.c2
-rw-r--r--arch/sparc64/kernel/prom.c23
-rw-r--r--arch/sparc64/kernel/rtrap.S1
-rw-r--r--arch/sparc64/kernel/sbus.c6
-rw-r--r--arch/sparc64/kernel/setup.c1
-rw-r--r--arch/sparc64/kernel/signal.c1
-rw-r--r--arch/sparc64/kernel/sparc64_ksyms.c1
-rw-r--r--arch/sparc64/kernel/sys32.S1
-rw-r--r--arch/sparc64/kernel/sys_sparc.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c1
-rw-r--r--arch/sparc64/kernel/systbls.S1
-rw-r--r--arch/sparc64/kernel/time.c1
-rw-r--r--arch/sparc64/kernel/traps.c1
-rw-r--r--arch/sparc64/kernel/tsb.S1
-rw-r--r--arch/sparc64/kernel/ttable.S1
-rw-r--r--arch/sparc64/lib/atomic.S1
-rw-r--r--arch/sparc64/lib/bitops.S1
-rw-r--r--arch/sparc64/lib/mcount.S1
-rw-r--r--arch/sparc64/mm/hugetlbpage.c1
-rw-r--r--arch/sparc64/mm/init.c1
-rw-r--r--arch/sparc64/mm/ultra.S1
-rw-r--r--arch/sparc64/prom/misc.c1
-rw-r--r--arch/sparc64/solaris/misc.c1
-rw-r--r--arch/um/drivers/harddog_kern.c1
-rw-r--r--arch/um/drivers/line.c6
-rw-r--r--arch/um/drivers/mconsole_kern.c2
-rw-r--r--arch/um/drivers/net_kern.c2
-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/sysdep-x86_64/kernel-offsets.h1
-rw-r--r--arch/um/kernel/irq.c2
-rw-r--r--arch/um/kernel/sigio_kern.c2
-rw-r--r--arch/um/kernel/skas/uaccess.c15
-rw-r--r--arch/um/kernel/time_kern.c2
-rw-r--r--arch/um/kernel/vmlinux.lds.S1
-rw-r--r--arch/um/os-Linux/umid.c97
-rw-r--r--arch/um/sys-i386/checksum.S1
-rw-r--r--arch/um/sys-i386/ptrace.c1
-rw-r--r--arch/um/sys-ppc/misc.S1
-rw-r--r--arch/um/sys-x86_64/syscall_table.c1
-rw-r--r--arch/v850/kernel/anna.c1
-rw-r--r--arch/v850/kernel/as85ep1.c1
-rw-r--r--arch/v850/kernel/fpga85e2c.c1
-rw-r--r--arch/v850/kernel/gbus_int.c2
-rw-r--r--arch/v850/kernel/ma.c1
-rw-r--r--arch/v850/kernel/me2.c1
-rw-r--r--arch/v850/kernel/process.c1
-rw-r--r--arch/v850/kernel/rte_cb.c1
-rw-r--r--arch/v850/kernel/rte_cb_leds.c1
-rw-r--r--arch/v850/kernel/rte_ma1_cb.c1
-rw-r--r--arch/v850/kernel/rte_mb_a_pci.c1
-rw-r--r--arch/v850/kernel/rte_me2_cb.c3
-rw-r--r--arch/v850/kernel/rte_nb85e_cb.c1
-rw-r--r--arch/v850/kernel/sim.c1
-rw-r--r--arch/v850/kernel/sim85e2.c1
-rw-r--r--arch/v850/kernel/syscalls.c1
-rw-r--r--arch/v850/kernel/teg.c1
-rw-r--r--arch/v850/kernel/time.c2
-rw-r--r--arch/v850/kernel/v850_ksyms.c1
-rw-r--r--arch/v850/kernel/vmlinux.lds.S1
-rw-r--r--arch/x86_64/boot/setup.S1
-rw-r--r--arch/x86_64/ia32/Makefile3
-rw-r--r--arch/x86_64/ia32/audit.c11
-rw-r--r--arch/x86_64/ia32/sys_ia32.c1
-rw-r--r--arch/x86_64/kernel/Makefile1
-rw-r--r--arch/x86_64/kernel/acpi/sleep.c1
-rw-r--r--arch/x86_64/kernel/aperture.c1
-rw-r--r--arch/x86_64/kernel/apic.c1
-rw-r--r--arch/x86_64/kernel/audit.c29
-rw-r--r--arch/x86_64/kernel/e820.c1
-rw-r--r--arch/x86_64/kernel/entry.S1
-rw-r--r--arch/x86_64/kernel/genapic.c1
-rw-r--r--arch/x86_64/kernel/genapic_cluster.c1
-rw-r--r--arch/x86_64/kernel/genapic_flat.c1
-rw-r--r--arch/x86_64/kernel/i387.c1
-rw-r--r--arch/x86_64/kernel/i8259.c1
-rw-r--r--arch/x86_64/kernel/io_apic.c1
-rw-r--r--arch/x86_64/kernel/kprobes.c1
-rw-r--r--arch/x86_64/kernel/mpparse.c1
-rw-r--r--arch/x86_64/kernel/nmi.c1
-rw-r--r--arch/x86_64/kernel/pci-gart.c1
-rw-r--r--arch/x86_64/kernel/setup.c1
-rw-r--r--arch/x86_64/kernel/setup64.c1
-rw-r--r--arch/x86_64/kernel/smpboot.c1
-rw-r--r--arch/x86_64/kernel/suspend.c1
-rw-r--r--arch/x86_64/kernel/syscall.c1
-rw-r--r--arch/x86_64/kernel/time.c2
-rw-r--r--arch/x86_64/kernel/traps.c1
-rw-r--r--arch/x86_64/kernel/vmlinux.lds.S1
-rw-r--r--arch/x86_64/mm/extable.c1
-rw-r--r--arch/x86_64/mm/fault.c3
-rw-r--r--arch/x86_64/mm/init.c8
-rw-r--r--arch/x86_64/mm/mmap.c1
-rw-r--r--arch/x86_64/mm/pageattr.c1
-rw-r--r--arch/xtensa/boot/boot-elf/bootstrap.S1
-rw-r--r--arch/xtensa/kernel/coprocessor.S1
-rw-r--r--arch/xtensa/kernel/head.S1
-rw-r--r--arch/xtensa/kernel/pci.c1
-rw-r--r--arch/xtensa/kernel/platform.c1
-rw-r--r--arch/xtensa/kernel/process.c1
-rw-r--r--arch/xtensa/kernel/ptrace.c1
-rw-r--r--arch/xtensa/kernel/setup.c1
-rw-r--r--arch/xtensa/kernel/syscalls.c1
-rw-r--r--arch/xtensa/kernel/time.c3
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S1
-rw-r--r--arch/xtensa/kernel/xtensa_ksyms.c1
-rw-r--r--arch/xtensa/mm/init.c1
-rw-r--r--arch/xtensa/platform-iss/console.c1
-rw-r--r--arch/xtensa/platform-iss/network.c1
-rw-r--r--arch/xtensa/platform-iss/setup.c1
-rw-r--r--block/as-iosched.c1
-rw-r--r--block/blktrace.c1
-rw-r--r--block/cfq-iosched.c1
-rw-r--r--block/deadline-iosched.c1
-rw-r--r--block/elevator.c1
-rw-r--r--block/genhd.c1
-rw-r--r--block/ll_rw_blk.c1
-rw-r--r--drivers/acorn/block/mfmhd.c3
-rw-r--r--drivers/acpi/Kconfig7
-rw-r--r--drivers/acpi/Makefile1
-rw-r--r--drivers/acpi/ac.c63
-rw-r--r--drivers/acpi/acpi_memhotplug.c137
-rw-r--r--drivers/acpi/asus_acpi.c2
-rw-r--r--drivers/acpi/battery.c122
-rw-r--r--drivers/acpi/bus.c128
-rw-r--r--drivers/acpi/button.c72
-rw-r--r--drivers/acpi/container.c36
-rw-r--r--drivers/acpi/debug.c19
-rw-r--r--drivers/acpi/dispatcher/dsinit.c30
-rw-r--r--drivers/acpi/dispatcher/dsmethod.c330
-rw-r--r--drivers/acpi/dispatcher/dswexec.c4
-rw-r--r--drivers/acpi/dispatcher/dswload.c49
-rw-r--r--drivers/acpi/dock.c739
-rw-r--r--drivers/acpi/ec.c168
-rw-r--r--drivers/acpi/event.c19
-rw-r--r--drivers/acpi/events/evgpe.c14
-rw-r--r--drivers/acpi/events/evxface.c47
-rw-r--r--drivers/acpi/executer/exconfig.c8
-rw-r--r--drivers/acpi/executer/excreate.c27
-rw-r--r--drivers/acpi/executer/exdump.c8
-rw-r--r--drivers/acpi/executer/exfldio.c71
-rw-r--r--drivers/acpi/executer/exmutex.c12
-rw-r--r--drivers/acpi/executer/exsystem.c82
-rw-r--r--drivers/acpi/fan.c51
-rw-r--r--drivers/acpi/hardware/hwregs.c77
-rw-r--r--drivers/acpi/hotkey.c132
-rw-r--r--drivers/acpi/motherboard.c5
-rw-r--r--drivers/acpi/namespace/nsaccess.c27
-rw-r--r--drivers/acpi/numa.c1
-rw-r--r--drivers/acpi/osl.c75
-rw-r--r--drivers/acpi/parser/psparse.c18
-rw-r--r--drivers/acpi/pci_bind.c87
-rw-r--r--drivers/acpi/pci_irq.c92
-rw-r--r--drivers/acpi/pci_link.c189
-rw-r--r--drivers/acpi/pci_root.c39
-rw-r--r--drivers/acpi/power.c145
-rw-r--r--drivers/acpi/processor_core.c161
-rw-r--r--drivers/acpi/processor_idle.c129
-rw-r--r--drivers/acpi/processor_perflib.c132
-rw-r--r--drivers/acpi/processor_thermal.c48
-rw-r--r--drivers/acpi/processor_throttling.c45
-rw-r--r--drivers/acpi/scan.c109
-rw-r--r--drivers/acpi/system.c21
-rw-r--r--drivers/acpi/tables.c1
-rw-r--r--drivers/acpi/thermal.c218
-rw-r--r--drivers/acpi/utilities/utdelete.c36
-rw-r--r--drivers/acpi/utilities/utglobal.c1
-rw-r--r--drivers/acpi/utilities/utmisc.c3
-rw-r--r--drivers/acpi/utilities/utmutex.c39
-rw-r--r--drivers/acpi/utils.c104
-rw-r--r--drivers/acpi/video.c270
-rw-r--r--drivers/atm/adummy.c1
-rw-r--r--drivers/atm/ambassador.c2
-rw-r--r--drivers/atm/ambassador.h1
-rw-r--r--drivers/atm/eni.c3
-rw-r--r--drivers/atm/firestream.c2
-rw-r--r--drivers/atm/fore200e.c3
-rw-r--r--drivers/atm/fore200e.h1
-rw-r--r--drivers/atm/he.c3
-rw-r--r--drivers/atm/horizon.c2
-rw-r--r--drivers/atm/horizon.h1
-rw-r--r--drivers/atm/idt77252.c3
-rw-r--r--drivers/atm/iphase.c2
-rw-r--r--drivers/atm/iphase.h1
-rw-r--r--drivers/atm/lanai.c2
-rw-r--r--drivers/atm/nicstar.c3
-rw-r--r--drivers/atm/zatm.c3
-rw-r--r--drivers/atm/zatm.h1
-rw-r--r--drivers/base/bus.c1
-rw-r--r--drivers/base/class.c1
-rw-r--r--drivers/base/core.c1
-rw-r--r--drivers/base/driver.c1
-rw-r--r--drivers/base/power/main.c1
-rw-r--r--drivers/base/power/shutdown.c1
-rw-r--r--drivers/base/sys.c1
-rw-r--r--drivers/block/DAC960.c2
-rw-r--r--drivers/block/acsi.c1
-rw-r--r--drivers/block/cciss.c2
-rw-r--r--drivers/block/cpqarray.c2
-rw-r--r--drivers/block/loop.c1
-rw-r--r--drivers/block/nbd.c2
-rw-r--r--drivers/block/paride/paride.c1
-rw-r--r--drivers/block/pktcdvd.c1
-rw-r--r--drivers/block/ps2esdi.c5
-rw-r--r--drivers/block/rd.c1
-rw-r--r--drivers/block/swim3.c1
-rw-r--r--drivers/block/sx8.c2
-rw-r--r--drivers/block/umem.c3
-rw-r--r--drivers/bluetooth/bcm203x.c1
-rw-r--r--drivers/bluetooth/bfusb.c1
-rw-r--r--drivers/bluetooth/bluecard_cs.c1
-rw-r--r--drivers/bluetooth/bpa10x.c1
-rw-r--r--drivers/bluetooth/bt3c_cs.c1
-rw-r--r--drivers/bluetooth/btuart_cs.c1
-rw-r--r--drivers/bluetooth/dtl1_cs.c1
-rw-r--r--drivers/bluetooth/hci_bcsp.c1
-rw-r--r--drivers/bluetooth/hci_h4.c1
-rw-r--r--drivers/bluetooth/hci_ldisc.c1
-rw-r--r--drivers/bluetooth/hci_usb.c1
-rw-r--r--drivers/bluetooth/hci_vhci.c1
-rw-r--r--drivers/cdrom/cdrom.c1
-rw-r--r--drivers/cdrom/cdu31a.c2
-rw-r--r--drivers/cdrom/mcdx.c2
-rw-r--r--drivers/cdrom/sbpcd.c1
-rw-r--r--drivers/cdrom/sonycd535.c2
-rw-r--r--drivers/char/agp/amd64-agp.c1
-rw-r--r--drivers/char/agp/generic.c1
-rw-r--r--drivers/char/amiserial.c3
-rw-r--r--drivers/char/applicom.c4
-rw-r--r--drivers/char/consolemap.c1
-rw-r--r--drivers/char/cyclades.c9
-rw-r--r--drivers/char/decserial.c1
-rw-r--r--drivers/char/drm/drm.h1
-rw-r--r--drivers/char/drm/drmP.h1
-rw-r--r--drivers/char/drm/drm_irq.c2
-rw-r--r--drivers/char/drm/drm_memory.c1
-rw-r--r--drivers/char/drm/drm_memory.h1
-rw-r--r--drivers/char/drm/drm_memory_debug.h1
-rw-r--r--drivers/char/drm/drm_scatter.c1
-rw-r--r--drivers/char/drm/drm_sysfs.c1
-rw-r--r--drivers/char/drm/ffb_drv.c1
-rw-r--r--drivers/char/drm/i810_drv.c1
-rw-r--r--drivers/char/drm/i830_drv.c1
-rw-r--r--drivers/char/drm/mga_drv.c1
-rw-r--r--drivers/char/drm/r128_drv.c1
-rw-r--r--drivers/char/drm/radeon_drv.c1
-rw-r--r--drivers/char/drm/savage_drv.c1
-rw-r--r--drivers/char/drm/sis_drv.c1
-rw-r--r--drivers/char/drm/tdfx_drv.c1
-rw-r--r--drivers/char/drm/via_drv.c1
-rw-r--r--drivers/char/ds1302.c1
-rw-r--r--drivers/char/ds1620.c1
-rw-r--r--drivers/char/ec3104_keyb.c1
-rw-r--r--drivers/char/epca.c1
-rw-r--r--drivers/char/esp.c2
-rw-r--r--drivers/char/ftape/lowlevel/fdc-io.c2
-rw-r--r--drivers/char/ftape/lowlevel/ftape-calibr.c1
-rw-r--r--drivers/char/ftape/lowlevel/ftape-ctl.c1
-rw-r--r--drivers/char/ftape/lowlevel/ftape-init.c1
-rw-r--r--drivers/char/ftape/lowlevel/ftape-proc.c1
-rw-r--r--drivers/char/ftape/lowlevel/ftape-setup.c1
-rw-r--r--drivers/char/ftape/lowlevel/ftape-tracing.h1
-rw-r--r--drivers/char/ftape/lowlevel/ftape_syms.c1
-rw-r--r--drivers/char/ftape/zftape/zftape-ctl.c1
-rw-r--r--drivers/char/ftape/zftape/zftape-ctl.h1
-rw-r--r--drivers/char/ftape/zftape/zftape-init.c1
-rw-r--r--drivers/char/genrtc.c1
-rw-r--r--drivers/char/hpet.c3
-rw-r--r--drivers/char/hvc_console.c3
-rw-r--r--drivers/char/hvcs.c2
-rw-r--r--drivers/char/hvsi.c2
-rw-r--r--drivers/char/ip2/i2ellis.h1
-rw-r--r--drivers/char/ip2/ip2main.c7
-rw-r--r--drivers/char/ipmi/ipmi_devintf.c1
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c1
-rw-r--r--drivers/char/ipmi/ipmi_poweroff.c1
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c5
-rw-r--r--drivers/char/ipmi/ipmi_watchdog.c1
-rw-r--r--drivers/char/isicom.c8
-rw-r--r--drivers/char/istallion.c1
-rw-r--r--drivers/char/ite_gpio.c2
-rw-r--r--drivers/char/keyboard.c1
-rw-r--r--drivers/char/lcd.c1
-rw-r--r--drivers/char/lp.c1
-rw-r--r--drivers/char/mbcs.c7
-rw-r--r--drivers/char/mem.c1
-rw-r--r--drivers/char/misc.c1
-rw-r--r--drivers/char/mmtimer.c2
-rw-r--r--drivers/char/moxa.c1
-rw-r--r--drivers/char/mwave/3780i.c1
-rw-r--r--drivers/char/mxser.c3
-rw-r--r--drivers/char/n_hdlc.c1
-rw-r--r--drivers/char/nvram.c1
-rw-r--r--drivers/char/nwbutton.c3
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c7
-rw-r--r--drivers/char/pty.c1
-rw-r--r--drivers/char/qtronix.c3
-rw-r--r--drivers/char/random.c1
-rw-r--r--drivers/char/rio/rio_linux.c3
-rw-r--r--drivers/char/rio/rio_linux.h1
-rw-r--r--drivers/char/rio/rioinit.c1
-rw-r--r--drivers/char/riscom8.c2
-rw-r--r--drivers/char/rtc.c7
-rw-r--r--drivers/char/s3c2410-rtc.c4
-rw-r--r--drivers/char/serial167.c1
-rw-r--r--drivers/char/snsc.c2
-rw-r--r--drivers/char/snsc_event.c2
-rw-r--r--drivers/char/sonypi.c3
-rw-r--r--drivers/char/specialix.c5
-rw-r--r--drivers/char/stallion.c5
-rw-r--r--drivers/char/sx.c4
-rw-r--r--drivers/char/synclink.c2
-rw-r--r--drivers/char/synclink_gt.c3
-rw-r--r--drivers/char/synclinkmp.c3
-rw-r--r--drivers/char/sysrq.c1
-rw-r--r--drivers/char/tipar.c1
-rw-r--r--drivers/char/tlclk.c3
-rw-r--r--drivers/char/tpm/tpm_tis.c4
-rw-r--r--drivers/char/tty_io.c1
-rw-r--r--drivers/char/vc_screen.c1
-rw-r--r--drivers/char/viocons.c1
-rw-r--r--drivers/char/viotape.c1
-rw-r--r--drivers/char/vme_scc.c49
-rw-r--r--drivers/char/vt.c1
-rw-r--r--drivers/char/vt_ioctl.c1
-rw-r--r--drivers/char/watchdog/at91_wdt.c1
-rw-r--r--drivers/char/watchdog/booke_wdt.c1
-rw-r--r--drivers/char/watchdog/eurotechwdt.c3
-rw-r--r--drivers/char/watchdog/ib700wdt.c1
-rw-r--r--drivers/char/watchdog/ibmasr.c1
-rw-r--r--drivers/char/watchdog/indydog.c1
-rw-r--r--drivers/char/watchdog/ixp2000_wdt.c1
-rw-r--r--drivers/char/watchdog/ixp4xx_wdt.c1
-rw-r--r--drivers/char/watchdog/machzwd.c1
-rw-r--r--drivers/char/watchdog/mixcomwd.c1
-rw-r--r--drivers/char/watchdog/mpc83xx_wdt.c1
-rw-r--r--drivers/char/watchdog/mpc8xx_wdt.c1
-rw-r--r--drivers/char/watchdog/mpcore_wdt.c3
-rw-r--r--drivers/char/watchdog/mv64x60_wdt.c1
-rw-r--r--drivers/char/watchdog/pcwd_usb.c1
-rw-r--r--drivers/char/watchdog/s3c2410_wdt.c1
-rw-r--r--drivers/char/watchdog/sa1100_wdt.c1
-rw-r--r--drivers/char/watchdog/sbc8360.c1
-rw-r--r--drivers/char/watchdog/sbc_epx_c3.c1
-rw-r--r--drivers/char/watchdog/sc1200wdt.c1
-rw-r--r--drivers/char/watchdog/scx200_wdt.c1
-rw-r--r--drivers/char/watchdog/shwdt.c1
-rw-r--r--drivers/char/watchdog/softdog.c1
-rw-r--r--drivers/char/watchdog/w83977f_wdt.c1
-rw-r--r--drivers/char/watchdog/wd501p.h1
-rw-r--r--drivers/char/watchdog/wdrtas.c1
-rw-r--r--drivers/char/watchdog/wdt.c3
-rw-r--r--drivers/char/watchdog/wdt977.c1
-rw-r--r--drivers/char/watchdog/wdt_pci.c3
-rw-r--r--drivers/cpufreq/cpufreq.c1
-rw-r--r--drivers/cpufreq/cpufreq_stats.c1
-rw-r--r--drivers/cpufreq/cpufreq_userspace.c1
-rw-r--r--drivers/dma/ioatdma.c2
-rw-r--r--drivers/edac/amd76x_edac.c5
-rw-r--r--drivers/edac/e752x_edac.c4
-rw-r--r--drivers/edac/e7xxx_edac.c4
-rw-r--r--drivers/edac/edac_mc.c1
-rw-r--r--drivers/edac/edac_mc.h5
-rw-r--r--drivers/edac/i82860_edac.c4
-rw-r--r--drivers/edac/i82875p_edac.c4
-rw-r--r--drivers/edac/r82600_edac.c4
-rw-r--r--drivers/eisa/virtual_root.c1
-rw-r--r--drivers/fc4/fc_syms.c1
-rw-r--r--drivers/fc4/soc.c2
-rw-r--r--drivers/fc4/socal.c2
-rw-r--r--drivers/firmware/dell_rbu.c1
-rw-r--r--drivers/firmware/efivars.c1
-rw-r--r--drivers/firmware/pcdp.c1
-rw-r--r--drivers/hwmon/hwmon-vid.c1
-rw-r--r--drivers/hwmon/w83792d.c1
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c1
-rw-r--r--drivers/i2c/busses/i2c-iop3xx.c1
-rw-r--r--drivers/i2c/busses/i2c-mpc.c3
-rw-r--r--drivers/i2c/busses/i2c-powermac.c1
-rw-r--r--drivers/i2c/busses/i2c-pxa.c2
-rw-r--r--drivers/i2c/busses/i2c-s3c2410.c3
-rw-r--r--drivers/i2c/busses/scx200_i2c.c1
-rw-r--r--drivers/i2c/chips/isp1301_omap.c5
-rw-r--r--drivers/i2c/chips/tps65010.c9
-rw-r--r--drivers/ide/arm/icside.c1
-rw-r--r--drivers/ide/cris/ide-cris.c1
-rw-r--r--drivers/ide/h8300/ide-h8300.c1
-rw-r--r--drivers/ide/ide-cd.c1
-rw-r--r--drivers/ide/ide-disk.c1
-rw-r--r--drivers/ide/ide-dma.c1
-rw-r--r--drivers/ide/ide-floppy.c1
-rw-r--r--drivers/ide/ide-io.c1
-rw-r--r--drivers/ide/ide-iops.c1
-rw-r--r--drivers/ide/ide-lib.c1
-rw-r--r--drivers/ide/ide-probe.c11
-rw-r--r--drivers/ide/ide-proc.c1
-rw-r--r--drivers/ide/ide-tape.c1
-rw-r--r--drivers/ide/ide-taskfile.c1
-rw-r--r--drivers/ide/ide.c1
-rw-r--r--drivers/ide/legacy/ali14xx.c1
-rw-r--r--drivers/ide/legacy/dtc2278.c1
-rw-r--r--drivers/ide/legacy/gayle.c1
-rw-r--r--drivers/ide/legacy/hd.c4
-rw-r--r--drivers/ide/legacy/ht6560b.c1
-rw-r--r--drivers/ide/legacy/ide-cs.c81
-rw-r--r--drivers/ide/legacy/macide.c1
-rw-r--r--drivers/ide/legacy/qd65xx.c1
-rw-r--r--drivers/ide/legacy/umc8672.c1
-rw-r--r--drivers/ide/pci/aec62xx.c1
-rw-r--r--drivers/ide/pci/alim15x3.c1
-rw-r--r--drivers/ide/pci/amd74xx.c1
-rw-r--r--drivers/ide/pci/atiixp.c1
-rw-r--r--drivers/ide/pci/cmd640.c1
-rw-r--r--drivers/ide/pci/cmd64x.c1
-rw-r--r--drivers/ide/pci/cs5520.c1
-rw-r--r--drivers/ide/pci/cs5530.c1
-rw-r--r--drivers/ide/pci/cs5535.c1
-rw-r--r--drivers/ide/pci/cy82c693.c1
-rw-r--r--drivers/ide/pci/hpt34x.c1
-rw-r--r--drivers/ide/pci/hpt366.c1
-rw-r--r--drivers/ide/pci/it8172.c1
-rw-r--r--drivers/ide/pci/it821x.c3
-rw-r--r--drivers/ide/pci/ns87415.c1
-rw-r--r--drivers/ide/pci/pdc202xx_new.c1
-rw-r--r--drivers/ide/pci/pdc202xx_old.c1
-rw-r--r--drivers/ide/pci/piix.c1
-rw-r--r--drivers/ide/pci/sc1200.c1
-rw-r--r--drivers/ide/pci/serverworks.c1
-rw-r--r--drivers/ide/pci/siimage.c1
-rw-r--r--drivers/ide/pci/sis5513.c1
-rw-r--r--drivers/ide/pci/sl82c105.c1
-rw-r--r--drivers/ide/pci/slc90e66.c1
-rw-r--r--drivers/ide/pci/triflex.c1
-rw-r--r--drivers/ide/pci/trm290.c1
-rw-r--r--drivers/ide/pci/via82cxxx.c1
-rw-r--r--drivers/ide/ppc/mpc8xx.c1
-rw-r--r--drivers/ide/ppc/pmac.c1
-rw-r--r--drivers/ide/setup-pci.c1
-rw-r--r--drivers/ieee1394/config_roms.c1
-rw-r--r--drivers/ieee1394/dv1394.c1
-rw-r--r--drivers/ieee1394/highlevel.c1
-rw-r--r--drivers/ieee1394/hosts.c1
-rw-r--r--drivers/ieee1394/ieee1394_core.c1
-rw-r--r--drivers/ieee1394/nodemgr.c1
-rw-r--r--drivers/ieee1394/ohci1394.c5
-rw-r--r--drivers/ieee1394/oui2c.sh1
-rw-r--r--drivers/ieee1394/pcilynx.c3
-rw-r--r--drivers/ieee1394/pcilynx.h1
-rw-r--r--drivers/ieee1394/sbp2.c1
-rw-r--r--drivers/ieee1394/video1394.c1
-rw-r--r--drivers/infiniband/core/cm.c1
-rw-r--r--drivers/infiniband/core/uverbs_cmd.c2
-rw-r--r--drivers/infiniband/hw/ipath/Kconfig8
-rw-r--r--drivers/infiniband/hw/ipath/Makefile2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_common.h158
-rw-r--r--drivers/infiniband/hw/ipath/ipath_cq.c16
-rw-r--r--drivers/infiniband/hw/ipath/ipath_debug.h1
-rw-r--r--drivers/infiniband/hw/ipath/ipath_diag.c98
-rw-r--r--drivers/infiniband/hw/ipath/ipath_driver.c396
-rw-r--r--drivers/infiniband/hw/ipath/ipath_eeprom.c28
-rw-r--r--drivers/infiniband/hw/ipath/ipath_file_ops.c400
-rw-r--r--drivers/infiniband/hw/ipath/ipath_fs.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_ht400.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_init_chip.c68
-rw-r--r--drivers/infiniband/hw/ipath/ipath_intr.c256
-rw-r--r--drivers/infiniband/hw/ipath/ipath_kernel.h66
-rw-r--r--drivers/infiniband/hw/ipath/ipath_keys.c51
-rw-r--r--drivers/infiniband/hw/ipath/ipath_layer.c62
-rw-r--r--drivers/infiniband/hw/ipath/ipath_layer.h11
-rw-r--r--drivers/infiniband/hw/ipath/ipath_mad.c127
-rw-r--r--drivers/infiniband/hw/ipath/ipath_mr.c6
-rw-r--r--drivers/infiniband/hw/ipath/ipath_pe800.c5
-rw-r--r--drivers/infiniband/hw/ipath/ipath_qp.c108
-rw-r--r--drivers/infiniband/hw/ipath/ipath_rc.c899
-rw-r--r--drivers/infiniband/hw/ipath/ipath_registers.h1
-rw-r--r--drivers/infiniband/hw/ipath/ipath_ruc.c283
-rw-r--r--drivers/infiniband/hw/ipath/ipath_srq.c48
-rw-r--r--drivers/infiniband/hw/ipath/ipath_stats.c2
-rw-r--r--drivers/infiniband/hw/ipath/ipath_sysfs.c115
-rw-r--r--drivers/infiniband/hw/ipath/ipath_uc.c165
-rw-r--r--drivers/infiniband/hw/ipath/ipath_ud.c41
-rw-r--r--drivers/infiniband/hw/ipath/ipath_user_pages.c12
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.c183
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs.h82
-rw-r--r--drivers/infiniband/hw/ipath/ipath_verbs_mcast.c39
-rw-r--r--drivers/infiniband/hw/ipath/ipath_wc_x86_64.c1
-rw-r--r--drivers/infiniband/hw/ipath/ips_common.h263
-rw-r--r--drivers/infiniband/hw/ipath/verbs_debug.h1
-rw-r--r--drivers/infiniband/hw/mthca/mthca_eq.c2
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c1
-rw-r--r--drivers/infiniband/hw/mthca/mthca_reset.c1
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib.h1
-rw-r--r--drivers/input/gameport/emu10k1-gp.c1
-rw-r--r--drivers/input/gameport/ns558.c1
-rw-r--r--drivers/input/joystick/analog.c1
-rw-r--r--drivers/input/joystick/iforce/iforce.h1
-rw-r--r--drivers/input/keyboard/corgikbd.c2
-rw-r--r--drivers/input/keyboard/hilkbd.c1
-rw-r--r--drivers/input/keyboard/locomokbd.c1
-rw-r--r--drivers/input/keyboard/spitzkbd.c12
-rw-r--r--drivers/input/misc/ixp4xx-beeper.c2
-rw-r--r--drivers/input/misc/sparcspkr.c1
-rw-r--r--drivers/input/mouse/inport.c1
-rw-r--r--drivers/input/mouse/rpcmouse.c2
-rw-r--r--drivers/input/mouse/sermouse.c1
-rw-r--r--drivers/input/mouse/vsxxxaa.c1
-rw-r--r--drivers/input/mousedev.c1
-rw-r--r--drivers/input/power.c1
-rw-r--r--drivers/input/serio/ct82c710.c1
-rw-r--r--drivers/input/serio/gscps2.c3
-rw-r--r--drivers/input/serio/i8042-sparcio.h1
-rw-r--r--drivers/input/serio/i8042.c5
-rw-r--r--drivers/input/serio/i8042.h1
-rw-r--r--drivers/input/serio/pcips2.c2
-rw-r--r--drivers/input/touchscreen/ads7846.c2
-rw-r--r--drivers/input/touchscreen/corgi_ts.c4
-rw-r--r--drivers/input/touchscreen/h3600_ts_input.c4
-rw-r--r--drivers/input/touchscreen/hp680_ts_input.c2
-rw-r--r--drivers/input/tsdev.c1
-rw-r--r--drivers/isdn/capi/capi.c1
-rw-r--r--drivers/isdn/capi/capiutil.c1
-rw-r--r--drivers/isdn/divert/divert_procfs.c1
-rw-r--r--drivers/isdn/gigaset/gigaset.h1
-rw-r--r--drivers/isdn/hardware/avm/b1dma.c1
-rw-r--r--drivers/isdn/hardware/avm/b1pci.c5
-rw-r--r--drivers/isdn/hardware/avm/b1pcmcia.c2
-rw-r--r--drivers/isdn/hardware/avm/c4.c3
-rw-r--r--drivers/isdn/hardware/avm/t1pci.c3
-rw-r--r--drivers/isdn/hardware/eicon/capimain.c1
-rw-r--r--drivers/isdn/hardware/eicon/diva_didd.c1
-rw-r--r--drivers/isdn/hardware/eicon/divamnt.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasi.c1
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c3
-rw-r--r--drivers/isdn/hardware/eicon/divasproc.c1
-rw-r--r--drivers/isdn/hardware/eicon/platform.h1
-rw-r--r--drivers/isdn/hisax/avm_a1p.c2
-rw-r--r--drivers/isdn/hisax/avm_pci.c3
-rw-r--r--drivers/isdn/hisax/bkm_a4t.c3
-rw-r--r--drivers/isdn/hisax/bkm_a8.c3
-rw-r--r--drivers/isdn/hisax/config.c1
-rw-r--r--drivers/isdn/hisax/diva.c3
-rw-r--r--drivers/isdn/hisax/elsa.c23
-rw-r--r--drivers/isdn/hisax/elsa_ser.c1
-rw-r--r--drivers/isdn/hisax/enternow_pci.c3
-rw-r--r--drivers/isdn/hisax/gazel.c3
-rw-r--r--drivers/isdn/hisax/hfc4s8s_l1.c3
-rw-r--r--drivers/isdn/hisax/hfc_pci.c3
-rw-r--r--drivers/isdn/hisax/hfc_usb.c1
-rw-r--r--drivers/isdn/hisax/hisax.h1
-rw-r--r--drivers/isdn/hisax/hisax_debug.h1
-rw-r--r--drivers/isdn/hisax/hisax_fcpcipnp.c4
-rw-r--r--drivers/isdn/hisax/ipacx.c1
-rw-r--r--drivers/isdn/hisax/isdnl3.c1
-rw-r--r--drivers/isdn/hisax/l3dss1.c1
-rw-r--r--drivers/isdn/hisax/niccy.c3
-rw-r--r--drivers/isdn/hisax/nj_s.c3
-rw-r--r--drivers/isdn/hisax/nj_u.c3
-rw-r--r--drivers/isdn/hisax/sedlbauer.c5
-rw-r--r--drivers/isdn/hisax/st5481.h1
-rw-r--r--drivers/isdn/hisax/st5481_init.c1
-rw-r--r--drivers/isdn/hisax/teles3.c2
-rw-r--r--drivers/isdn/hisax/telespci.c3
-rw-r--r--drivers/isdn/hisax/w6692.c3
-rw-r--r--drivers/isdn/hysdn/boardergo.c3
-rw-r--r--drivers/isdn/hysdn/hysdn_defs.h1
-rw-r--r--drivers/isdn/hysdn/hysdn_init.c1
-rw-r--r--drivers/isdn/hysdn/hysdn_sched.c1
-rw-r--r--drivers/isdn/i4l/isdn_common.c1
-rw-r--r--drivers/isdn/i4l/isdn_net.c1
-rw-r--r--drivers/isdn/i4l/isdn_ppp.c1
-rw-r--r--drivers/isdn/i4l/isdn_tty.c1
-rw-r--r--drivers/isdn/i4l/isdn_tty.h1
-rw-r--r--drivers/isdn/isdnloop/isdnloop.c1
-rw-r--r--drivers/isdn/sc/init.c2
-rw-r--r--drivers/leds/led-class.c1
-rw-r--r--drivers/leds/led-triggers.c1
-rw-r--r--drivers/leds/leds-corgi.c1
-rw-r--r--drivers/leds/leds-ixp4xx-gpio.c1
-rw-r--r--drivers/leds/leds-locomo.c1
-rw-r--r--drivers/leds/leds-s3c24xx.c1
-rw-r--r--drivers/leds/leds-spitz.c1
-rw-r--r--drivers/leds/leds-tosa.c1
-rw-r--r--drivers/leds/ledtrig-timer.c1
-rw-r--r--drivers/macintosh/adb.c1
-rw-r--r--drivers/macintosh/adbhid.c1
-rw-r--r--drivers/macintosh/apm_emu.c1
-rw-r--r--drivers/macintosh/mac_hid.c1
-rw-r--r--drivers/macintosh/macio_asic.c5
-rw-r--r--drivers/macintosh/macio_sysfs.c1
-rw-r--r--drivers/macintosh/mediabay.c1
-rw-r--r--drivers/macintosh/smu.c5
-rw-r--r--drivers/macintosh/therm_adt746x.c1
-rw-r--r--drivers/macintosh/therm_pm72.c1
-rw-r--r--drivers/macintosh/therm_pm72.h2
-rw-r--r--drivers/macintosh/therm_windtunnel.c1
-rw-r--r--drivers/macintosh/via-cuda.c1
-rw-r--r--drivers/macintosh/via-pmu.c1
-rw-r--r--drivers/macintosh/windfarm_cpufreq_clamp.c1
-rw-r--r--drivers/md/bitmap.c1
-rw-r--r--drivers/md/dm-snap.c1
-rw-r--r--drivers/md/kcopyd.c1
-rw-r--r--drivers/md/md.c1
-rw-r--r--drivers/md/raid5.c1
-rw-r--r--drivers/media/common/saa7146_core.c2
-rw-r--r--drivers/media/common/saa7146_hlp.c2
-rw-r--r--drivers/media/dvb/b2c2/flexcop-common.h1
-rw-r--r--drivers/media/dvb/b2c2/flexcop-pci.c2
-rw-r--r--drivers/media/dvb/bt8xx/bt878.c2
-rw-r--r--drivers/media/dvb/cinergyT2/cinergyT2.c1
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb.h1
-rw-r--r--drivers/media/dvb/frontends/cx22700.c1
-rw-r--r--drivers/media/dvb/frontends/cx24123.c4
-rw-r--r--drivers/media/dvb/frontends/dib3000mb.c1
-rw-r--r--drivers/media/dvb/frontends/dib3000mc.c1
-rw-r--r--drivers/media/dvb/frontends/lgdt330x.c2
-rw-r--r--drivers/media/dvb/frontends/tda10021.c1
-rw-r--r--drivers/media/dvb/frontends/ves1820.c1
-rw-r--r--drivers/media/dvb/pluto2/pluto2.c2
-rw-r--r--drivers/media/dvb/ttpci/av7110.c1
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c15
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c2
-rw-r--r--drivers/media/radio/radio-gemtek-pci.c1
-rw-r--r--drivers/media/video/arv.c1
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c6
-rw-r--r--drivers/media/video/bt8xx/bttv-driver.c2
-rw-r--r--drivers/media/video/bt8xx/bttvp.h2
-rw-r--r--drivers/media/video/compat_ioctl32.c1
-rw-r--r--drivers/media/video/cpia.c1
-rw-r--r--drivers/media/video/cpia2/cpia2_v4l.c1
-rw-r--r--drivers/media/video/cpia_pp.c1
-rw-r--r--drivers/media/video/cx88/cx88-alsa.c2
-rw-r--r--drivers/media/video/cx88/cx88-blackbird.c43
-rw-r--r--drivers/media/video/cx88/cx88-cards.c19
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c28
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c2
-rw-r--r--drivers/media/video/cx88/cx88-video.c63
-rw-r--r--drivers/media/video/cx88/cx88.h3
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c2
-rw-r--r--drivers/media/video/meye.c3
-rw-r--r--drivers/media/video/meye.h1
-rw-r--r--drivers/media/video/msp3400-driver.h4
-rw-r--r--drivers/media/video/ov511.c1
-rw-r--r--drivers/media/video/pvrusb2/Makefile2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-audio.c4
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-context.c14
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ctrl.c6
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c6
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-debugifc.c6
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-demod.c126
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-demod.h38
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-eeprom.c4
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-encoder.c4
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h17
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c172
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.h32
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c6
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c4
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-core.c34
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-i2c-core.h3
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-io.c57
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-io.h13
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ioread.c34
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ioread.h1
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-main.c10
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-std.c6
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-sysfs.c14
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-tuner.c2
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-v4l2.c42
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-video-v4l.c4
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-wm8775.c2
-rw-r--r--drivers/media/video/pwc/pwc-uncompress.h1
-rw-r--r--drivers/media/video/pwc/pwc.h1
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c5
-rw-r--r--drivers/media/video/saa7134/saa7134-oss.c2
-rw-r--r--drivers/media/video/se401.c1
-rw-r--r--drivers/media/video/stradis.c2
-rw-r--r--drivers/media/video/stv680.c1
-rw-r--r--drivers/media/video/tda9887.c4
-rw-r--r--drivers/media/video/tuner-core.c12
-rw-r--r--drivers/media/video/tuner-simple.c74
-rw-r--r--drivers/media/video/tuner-types.c38
-rw-r--r--drivers/media/video/tvaudio.c1
-rw-r--r--drivers/media/video/tveeprom.c18
-rw-r--r--drivers/media/video/usbvideo/usbvideo.h1
-rw-r--r--drivers/media/video/v4l1-compat.c1
-rw-r--r--drivers/media/video/v4l2-common.c1
-rw-r--r--drivers/media/video/videocodec.c1
-rw-r--r--drivers/media/video/videocodec.h16
-rw-r--r--drivers/media/video/w9968cf.h1
-rw-r--r--drivers/media/video/zoran_card.c3
-rw-r--r--drivers/media/video/zoran_device.c1
-rw-r--r--drivers/media/video/zoran_driver.c1
-rw-r--r--drivers/media/video/zoran_procfs.c1
-rw-r--r--drivers/media/video/zr36120.c2
-rw-r--r--drivers/media/video/zr36120_mem.c1
-rw-r--r--drivers/message/fusion/mptbase.c5
-rw-r--r--drivers/message/fusion/mptbase.h1
-rw-r--r--drivers/message/i2o/debug.c1
-rw-r--r--drivers/message/i2o/pci.c2
-rw-r--r--drivers/mfd/ucb1x00-core.c3
-rw-r--r--drivers/mfd/ucb1x00-ts.c1
-rw-r--r--drivers/misc/ibmasm/ibmasm.h1
-rw-r--r--drivers/misc/ibmasm/module.c2
-rw-r--r--drivers/mmc/at91_mci.c3
-rw-r--r--drivers/mmc/au1xmmc.c3
-rw-r--r--drivers/mmc/imxmmc.c1
-rw-r--r--drivers/mmc/mmc.c1
-rw-r--r--drivers/mmc/mmci.c5
-rw-r--r--drivers/mmc/omap.c46
-rw-r--r--drivers/mmc/pxamci.c1
-rw-r--r--drivers/mmc/sdhci.c596
-rw-r--r--drivers/mmc/sdhci.h34
-rw-r--r--drivers/mmc/wbsd.c3
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0002.c1
-rw-r--r--drivers/mtd/chips/cfi_probe.c1
-rw-r--r--drivers/mtd/chips/chipreg.c1
-rw-r--r--drivers/mtd/chips/jedec_probe.c1
-rw-r--r--drivers/mtd/devices/block2mtd.c1
-rw-r--r--drivers/mtd/devices/docprobe.c1
-rw-r--r--drivers/mtd/devices/mtd_dataflash.c1
-rw-r--r--drivers/mtd/devices/mtdram.c1
-rw-r--r--drivers/mtd/devices/pmc551.c1
-rw-r--r--drivers/mtd/inftlcore.c1
-rw-r--r--drivers/mtd/maps/alchemy-flash.c1
-rw-r--r--drivers/mtd/maps/amd76xrom.c1
-rw-r--r--drivers/mtd/maps/ceiva.c1
-rw-r--r--drivers/mtd/maps/cstm_mips_ixx.c1
-rw-r--r--drivers/mtd/maps/dbox2-flash.c1
-rw-r--r--drivers/mtd/maps/dc21285.c1
-rw-r--r--drivers/mtd/maps/dilnetpc.c1
-rw-r--r--drivers/mtd/maps/dmv182.c1
-rw-r--r--drivers/mtd/maps/ebony.c1
-rw-r--r--drivers/mtd/maps/edb7312.c1
-rw-r--r--drivers/mtd/maps/h720x-flash.c1
-rw-r--r--drivers/mtd/maps/ichxrom.c1
-rw-r--r--drivers/mtd/maps/impa7.c1
-rw-r--r--drivers/mtd/maps/integrator-flash.c1
-rw-r--r--drivers/mtd/maps/ipaq-flash.c1
-rw-r--r--drivers/mtd/maps/l440gx.c1
-rw-r--r--drivers/mtd/maps/lasat.c1
-rw-r--r--drivers/mtd/maps/mpc1211.c1
-rw-r--r--drivers/mtd/maps/mtx-1_flash.c1
-rw-r--r--drivers/mtd/maps/ocotea.c1
-rw-r--r--drivers/mtd/maps/omap-toto-flash.c1
-rw-r--r--drivers/mtd/maps/physmap.c1
-rw-r--r--drivers/mtd/maps/redwood.c1
-rw-r--r--drivers/mtd/maps/sa1100-flash.c1
-rw-r--r--drivers/mtd/maps/sbc8240.c1
-rw-r--r--drivers/mtd/maps/sc520cdp.c1
-rw-r--r--drivers/mtd/maps/scb2_flash.c1
-rw-r--r--drivers/mtd/maps/scx200_docflash.c1
-rw-r--r--drivers/mtd/maps/solutionengine.c1
-rw-r--r--drivers/mtd/maps/tqm834x.c1
-rw-r--r--drivers/mtd/maps/tqm8xxl.c1
-rw-r--r--drivers/mtd/maps/ts5500_flash.c1
-rw-r--r--drivers/mtd/maps/uclinux.c1
-rw-r--r--drivers/mtd/maps/walnut.c1
-rw-r--r--drivers/mtd/maps/wr_sbc82xx_flash.c1
-rw-r--r--drivers/mtd/mtdblock.c1
-rw-r--r--drivers/mtd/mtdchar.c1
-rw-r--r--drivers/mtd/mtdcore.c1
-rw-r--r--drivers/mtd/mtdpart.c1
-rw-r--r--drivers/mtd/nand/nandsim.c1
-rw-r--r--drivers/mtd/nftlcore.c1
-rw-r--r--drivers/net/3c509.c1
-rw-r--r--drivers/net/3c515.c3
-rw-r--r--drivers/net/3c523.c2
-rw-r--r--drivers/net/3c527.c2
-rw-r--r--drivers/net/3c59x.c5
-rw-r--r--drivers/net/8139cp.c3
-rw-r--r--drivers/net/8139too.c3
-rw-r--r--drivers/net/82596.c1
-rw-r--r--drivers/net/8390.h1
-rw-r--r--drivers/net/Space.c1
-rw-r--r--drivers/net/a2065.c3
-rw-r--r--drivers/net/acenic.c3
-rw-r--r--drivers/net/acenic.h1
-rw-r--r--drivers/net/acenic_firmware.h1
-rw-r--r--drivers/net/amd8111e.c3
-rw-r--r--drivers/net/apne.c2
-rw-r--r--drivers/net/appletalk/cops.c1
-rw-r--r--drivers/net/appletalk/cops_ffdrv.h1
-rw-r--r--drivers/net/appletalk/cops_ltdrv.h1
-rw-r--r--drivers/net/appletalk/ipddp.c1
-rw-r--r--drivers/net/arcnet/arcnet.c1
-rw-r--r--drivers/net/arcnet/com20020-pci.c2
-rw-r--r--drivers/net/ariadne.c2
-rw-r--r--drivers/net/arm/at91_ether.c1
-rw-r--r--drivers/net/at1700.c1
-rw-r--r--drivers/net/au1000_eth.c1
-rw-r--r--drivers/net/b44.c4
-rw-r--r--drivers/net/bmac.c1
-rw-r--r--drivers/net/bnx2.c7
-rw-r--r--drivers/net/bonding/bond_main.c1
-rw-r--r--drivers/net/bonding/bond_sysfs.c1
-rw-r--r--drivers/net/cassini.c3
-rw-r--r--drivers/net/chelsio/common.h1
-rw-r--r--drivers/net/chelsio/cxgb2.c3
-rw-r--r--drivers/net/chelsio/sge.c1
-rw-r--r--drivers/net/cris/eth_v10.c3
-rw-r--r--drivers/net/cs89x0.c1
-rw-r--r--drivers/net/cs89x0.h1
-rw-r--r--drivers/net/declance.c1
-rw-r--r--drivers/net/defxx.c2
-rw-r--r--drivers/net/depca.c1
-rw-r--r--drivers/net/dgrs.c2
-rw-r--r--drivers/net/dl2k.c4
-rw-r--r--drivers/net/dm9000.c2
-rw-r--r--drivers/net/dummy.c1
-rw-r--r--drivers/net/e100.c3
-rw-r--r--drivers/net/e1000/e1000.h1
-rw-r--r--drivers/net/e1000/e1000_ethtool.c6
-rw-r--r--drivers/net/e1000/e1000_main.c2
-rw-r--r--drivers/net/eepro.c2
-rw-r--r--drivers/net/eepro100.c3
-rw-r--r--drivers/net/eexpress.c1
-rw-r--r--drivers/net/epic100.c3
-rw-r--r--drivers/net/fealnx.c2
-rw-r--r--drivers/net/fec.c1
-rw-r--r--drivers/net/fec_8xx/fec_8xx-netta.c1
-rw-r--r--drivers/net/fec_8xx/fec_main.c1
-rw-r--r--drivers/net/fec_8xx/fec_mii.c1
-rw-r--r--drivers/net/forcedeth.c18
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c3
-rw-r--r--drivers/net/fs_enet/fs_enet-mii.c1
-rw-r--r--drivers/net/fs_enet/mac-fcc.c1
-rw-r--r--drivers/net/fs_enet/mac-fec.c1
-rw-r--r--drivers/net/fs_enet/mac-scc.c1
-rw-r--r--drivers/net/fs_enet/mii-bitbang.c1
-rw-r--r--drivers/net/fs_enet/mii-fixed.c1
-rw-r--r--drivers/net/gianfar.c1
-rw-r--r--drivers/net/gianfar.h1
-rw-r--r--drivers/net/gianfar_ethtool.c1
-rw-r--r--drivers/net/gianfar_mii.c1
-rw-r--r--drivers/net/gianfar_sysfs.c1
-rw-r--r--drivers/net/gt96100eth.c2
-rw-r--r--drivers/net/gt96100eth.h1
-rw-r--r--drivers/net/hamachi.c2
-rw-r--r--drivers/net/hamradio/6pack.c1
-rw-r--r--drivers/net/hamradio/baycom_ser_fdx.c2
-rw-r--r--drivers/net/hamradio/baycom_ser_hdx.c2
-rw-r--r--drivers/net/hamradio/bpqether.c1
-rw-r--r--drivers/net/hamradio/mkiss.c1
-rw-r--r--drivers/net/hamradio/scc.c3
-rw-r--r--drivers/net/hamradio/yam.c3
-rw-r--r--drivers/net/hp100.c2
-rw-r--r--drivers/net/hydra.c2
-rw-r--r--drivers/net/ibm_emac/ibm_emac.h1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_core.c1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_core.h1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_debug.c1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_debug.h1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_mal.c1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_mal.h1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_phy.c1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_rgmii.c1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_rgmii.h1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_tah.c1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_tah.h1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_zmii.c1
-rw-r--r--drivers/net/ibm_emac/ibm_emac_zmii.h1
-rw-r--r--drivers/net/ibmlana.c2
-rw-r--r--drivers/net/ibmveth.c1
-rw-r--r--drivers/net/ifb.c1
-rw-r--r--drivers/net/ioc3-eth.c3
-rw-r--r--drivers/net/irda/au1k_ir.c1
-rw-r--r--drivers/net/irda/donauboe.c4
-rw-r--r--drivers/net/irda/pxaficp_ir.c1
-rw-r--r--drivers/net/irda/sa1100_ir.c1
-rw-r--r--drivers/net/irda/vlsi_ir.c3
-rw-r--r--drivers/net/iseries_veth.c1
-rw-r--r--drivers/net/ixgb/ixgb.h1
-rw-r--r--drivers/net/ixgb/ixgb_main.c2
-rw-r--r--drivers/net/ixp2000/caleb.c1
-rw-r--r--drivers/net/ixp2000/enp2611.c1
-rw-r--r--drivers/net/ixp2000/ixp2400-msf.c1
-rw-r--r--drivers/net/ixp2000/ixpdev.c3
-rw-r--r--drivers/net/ixp2000/pm3386.c1
-rw-r--r--drivers/net/jazzsonic.c2
-rw-r--r--drivers/net/lp486e.c2
-rw-r--r--drivers/net/mace.c1
-rw-r--r--drivers/net/mipsnet.c2
-rw-r--r--drivers/net/mv643xx_eth.c2
-rw-r--r--drivers/net/mv643xx_eth.h2
-rw-r--r--drivers/net/myri10ge/myri10ge.c4
-rw-r--r--drivers/net/myri_sbus.c3
-rw-r--r--drivers/net/natsemi.c3
-rw-r--r--drivers/net/ne2k-pci.c2
-rw-r--r--drivers/net/netx-eth.c2
-rw-r--r--drivers/net/ns83820.c3
-rw-r--r--drivers/net/pci-skeleton.c3
-rw-r--r--drivers/net/pcmcia/axnet_cs.c2
-rw-r--r--drivers/net/pcmcia/com20020_cs.c5
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c2
-rw-r--r--drivers/net/pcnet32.c2
-rw-r--r--drivers/net/phy/cicada.c1
-rw-r--r--drivers/net/phy/davicom.c1
-rw-r--r--drivers/net/phy/lxt.c1
-rw-r--r--drivers/net/phy/marvell.c1
-rw-r--r--drivers/net/phy/mdio_bus.c1
-rw-r--r--drivers/net/phy/phy.c3
-rw-r--r--drivers/net/phy/phy_device.c1
-rw-r--r--drivers/net/phy/qsemi.c1
-rw-r--r--drivers/net/ppp_generic.c1
-rw-r--r--drivers/net/ppp_mppe.c1
-rw-r--r--drivers/net/r8169.c2
-rw-r--r--drivers/net/rrunner.c3
-rw-r--r--drivers/net/rrunner.h1
-rw-r--r--drivers/net/s2io.c20
-rw-r--r--drivers/net/s2io.h2
-rw-r--r--drivers/net/sb1250-mac.c3
-rw-r--r--drivers/net/shaper.c1
-rw-r--r--drivers/net/sis190.c2
-rw-r--r--drivers/net/sis900.c2
-rw-r--r--drivers/net/sk98lin/skge.c8
-rw-r--r--drivers/net/sk98lin/skvpd.c2
-rw-r--r--drivers/net/sk_mca.c2
-rw-r--r--drivers/net/skfp/h/sba.h2
-rw-r--r--drivers/net/skfp/skfddi.c2
-rw-r--r--drivers/net/skge.c3
-rw-r--r--drivers/net/sky2.c5
-rw-r--r--drivers/net/slhc.c1
-rw-r--r--drivers/net/slip.c1
-rw-r--r--drivers/net/slip.h1
-rw-r--r--drivers/net/smc-ultra.c1
-rw-r--r--drivers/net/smc-ultra32.c2
-rw-r--r--drivers/net/smc911x.c2
-rw-r--r--drivers/net/smc91x.c1
-rw-r--r--drivers/net/smc91x.h4
-rw-r--r--drivers/net/sonic.h1
-rw-r--r--drivers/net/spider_net.c3
-rw-r--r--drivers/net/starfire.c3
-rw-r--r--drivers/net/stnic.c1
-rw-r--r--drivers/net/sun3lance.c2
-rw-r--r--drivers/net/sunbmac.c2
-rw-r--r--drivers/net/sundance.c2
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/sungem_phy.c1
-rw-r--r--drivers/net/sunhme.c5
-rw-r--r--drivers/net/sunhme.h1
-rw-r--r--drivers/net/sunlance.c3
-rw-r--r--drivers/net/sunqe.c2
-rw-r--r--drivers/net/tc35815.c2
-rw-r--r--drivers/net/tg3.c114
-rw-r--r--drivers/net/tg3.h5
-rw-r--r--drivers/net/tlan.c2
-rw-r--r--drivers/net/tokenring/3c359.c3
-rw-r--r--drivers/net/tokenring/abyss.c2
-rw-r--r--drivers/net/tokenring/lanstreamer.c3
-rw-r--r--drivers/net/tokenring/madgemc.c2
-rw-r--r--drivers/net/tokenring/olympic.c3
-rw-r--r--drivers/net/tokenring/smctr.c5
-rw-r--r--drivers/net/tokenring/smctr_firmware.h1
-rw-r--r--drivers/net/tokenring/tmspci.c2
-rw-r--r--drivers/net/tulip/de2104x.c3
-rw-r--r--drivers/net/tulip/de4x5.c9
-rw-r--r--drivers/net/tulip/dmfe.c2
-rw-r--r--drivers/net/tulip/interrupt.c1
-rw-r--r--drivers/net/tulip/tulip.h1
-rw-r--r--drivers/net/tulip/tulip_core.c5
-rw-r--r--drivers/net/tulip/uli526x.c2
-rw-r--r--drivers/net/tulip/winbond-840.c2
-rw-r--r--drivers/net/tulip/xircom_cb.c2
-rw-r--r--drivers/net/tulip/xircom_tulip_cb.c3
-rw-r--r--drivers/net/tun.c1
-rw-r--r--drivers/net/typhoon.c2
-rw-r--r--drivers/net/via-rhine.c4
-rw-r--r--drivers/net/via-velocity.c4
-rw-r--r--drivers/net/wan/cosa.c1
-rw-r--r--drivers/net/wan/dscc4.c2
-rw-r--r--drivers/net/wan/farsync.c2
-rw-r--r--drivers/net/wan/hdlc_generic.c1
-rw-r--r--drivers/net/wan/hostess_sv11.c2
-rw-r--r--drivers/net/wan/lmc/lmc_main.c2
-rw-r--r--drivers/net/wan/lmc/lmc_media.c1
-rw-r--r--drivers/net/wan/pc300_drv.c2
-rw-r--r--drivers/net/wan/pci200syn.c2
-rw-r--r--drivers/net/wan/sbni.c3
-rw-r--r--drivers/net/wan/sealevel.c2
-rw-r--r--drivers/net/wan/syncppp.c1
-rw-r--r--drivers/net/wan/wanxl.c2
-rw-r--r--drivers/net/wireless/airo.c3
-rw-r--r--drivers/net/wireless/airo_cs.c1
-rw-r--r--drivers/net/wireless/airport.c1
-rw-r--r--drivers/net/wireless/arlan-main.c1
-rw-r--r--drivers/net/wireless/arlan-proc.c1
-rw-r--r--drivers/net/wireless/arlan.h1
-rw-r--r--drivers/net/wireless/atmel.c3
-rw-r--r--drivers/net/wireless/atmel_cs.c1
-rw-r--r--drivers/net/wireless/atmel_pci.c1
-rw-r--r--drivers/net/wireless/bcm43xx/bcm43xx_main.c2
-rw-r--r--drivers/net/wireless/hermes.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c3
-rw-r--r--drivers/net/wireless/hostap/hostap_hw.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_main.c1
-rw-r--r--drivers/net/wireless/hostap/hostap_pci.c3
-rw-r--r--drivers/net/wireless/hostap/hostap_plx.c3
-rw-r--r--drivers/net/wireless/ipw2100.c5
-rw-r--r--drivers/net/wireless/ipw2200.c2
-rw-r--r--drivers/net/wireless/ipw2200.h1
-rw-r--r--drivers/net/wireless/netwave_cs.c1
-rw-r--r--drivers/net/wireless/orinoco.c1
-rw-r--r--drivers/net/wireless/orinoco_cs.c1
-rw-r--r--drivers/net/wireless/orinoco_nortel.c3
-rw-r--r--drivers/net/wireless/orinoco_pci.c3
-rw-r--r--drivers/net/wireless/orinoco_pci.h2
-rw-r--r--drivers/net/wireless/orinoco_plx.c3
-rw-r--r--drivers/net/wireless/orinoco_tmd.c3
-rw-r--r--drivers/net/wireless/prism54/islpci_hotplug.c2
-rw-r--r--drivers/net/wireless/prism54/islpci_mgt.c1
-rw-r--r--drivers/net/wireless/prism54/prismcompat.h1
-rw-r--r--drivers/net/wireless/ray_cs.c1
-rw-r--r--drivers/net/wireless/spectrum_cs.c1
-rw-r--r--drivers/net/wireless/strip.c1
-rw-r--r--drivers/net/wireless/wavelan_cs.p.h1
-rw-r--r--drivers/net/wireless/wl3501_cs.c1
-rw-r--r--drivers/net/yellowfin.c2
-rw-r--r--drivers/net/znet.c1
-rw-r--r--drivers/net/zorro8390.c2
-rw-r--r--drivers/nubus/nubus.c1
-rw-r--r--drivers/nubus/nubus_syms.c1
-rw-r--r--drivers/parisc/ccio-dma.c1
-rw-r--r--drivers/parisc/dino.c1
-rw-r--r--drivers/parisc/eisa.c2
-rw-r--r--drivers/parisc/gsc.c1
-rw-r--r--drivers/parisc/led.c1
-rw-r--r--drivers/parisc/power.c1
-rw-r--r--drivers/parisc/sba_iommu.c1
-rw-r--r--drivers/parisc/superio.c2
-rw-r--r--drivers/parport/ieee1284.c1
-rw-r--r--drivers/parport/ieee1284_ops.c1
-rw-r--r--drivers/parport/parport_ax88796.c2
-rw-r--r--drivers/parport/parport_mfc3.c2
-rw-r--r--drivers/parport/parport_pc.c1
-rw-r--r--drivers/parport/parport_sunbpp.c2
-rw-r--r--drivers/parport/procfs.c1
-rw-r--r--drivers/parport/share.c1
-rw-r--r--drivers/pci/hotplug/Makefile3
-rw-r--r--drivers/pci/hotplug/acpiphp.h36
-rw-r--r--drivers/pci/hotplug/acpiphp_core.c19
-rw-r--r--drivers/pci/hotplug/acpiphp_dock.c438
-rw-r--r--drivers/pci/hotplug/acpiphp_glue.c123
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_core.c3
-rw-r--r--drivers/pci/hotplug/cpci_hotplug_pci.c1
-rw-r--r--drivers/pci/hotplug/cpcihp_generic.c1
-rw-r--r--drivers/pci/hotplug/cpcihp_zt5550.c6
-rw-r--r--drivers/pci/hotplug/cpqphp_core.c3
-rw-r--r--drivers/pci/hotplug/cpqphp_ctrl.c1
-rw-r--r--drivers/pci/hotplug/cpqphp_nvram.c1
-rw-r--r--drivers/pci/hotplug/cpqphp_pci.c1
-rw-r--r--drivers/pci/hotplug/cpqphp_sysfs.c1
-rw-r--r--drivers/pci/hotplug/fakephp.c1
-rw-r--r--drivers/pci/hotplug/pci_hotplug_core.c1
-rw-r--r--drivers/pci/hotplug/pciehp_hpc.c2
-rw-r--r--drivers/pci/hotplug/pcihp_skeleton.c1
-rw-r--r--drivers/pci/hotplug/rpaphp_core.c1
-rw-r--r--drivers/pci/hotplug/shpchp_hpc.c2
-rw-r--r--drivers/pci/msi.c1
-rw-r--r--drivers/pci/pci-sysfs.c1
-rw-r--r--drivers/pci/quirks.c1
-rw-r--r--drivers/pci/rom.c1
-rw-r--r--drivers/pcmcia/at91_cf.c79
-rw-r--r--drivers/pcmcia/au1000_db1x00.c3
-rw-r--r--drivers/pcmcia/au1000_generic.c1
-rw-r--r--drivers/pcmcia/au1000_generic.h1
-rw-r--r--drivers/pcmcia/au1000_pb1x00.c1
-rw-r--r--drivers/pcmcia/cs.c29
-rw-r--r--drivers/pcmcia/hd64465_ss.c2
-rw-r--r--drivers/pcmcia/i82092.c2
-rw-r--r--drivers/pcmcia/i82365.c6
-rw-r--r--drivers/pcmcia/m32r_cfc.c1
-rw-r--r--drivers/pcmcia/m32r_pcc.c1
-rw-r--r--drivers/pcmcia/omap_cf.c2
-rw-r--r--drivers/pcmcia/pcmcia_resource.c27
-rw-r--r--drivers/pcmcia/pd6729.c2
-rw-r--r--drivers/pcmcia/pxa2xx_base.c1
-rw-r--r--drivers/pcmcia/sa1100_generic.c1
-rw-r--r--drivers/pcmcia/sa1111_generic.c1
-rw-r--r--drivers/pcmcia/sa11xx_base.c1
-rw-r--r--drivers/pcmcia/soc_common.c5
-rw-r--r--drivers/pcmcia/ti113x.h1
-rw-r--r--drivers/pcmcia/vrc4171_card.c2
-rw-r--r--drivers/pcmcia/vrc4173_cardu.c2
-rw-r--r--drivers/pcmcia/yenta_socket.c87
-rw-r--r--drivers/pnp/card.c1
-rw-r--r--drivers/pnp/driver.c1
-rw-r--r--drivers/pnp/isapnp/compat.c1
-rw-r--r--drivers/pnp/isapnp/core.c1
-rw-r--r--drivers/pnp/isapnp/proc.c1
-rw-r--r--drivers/pnp/manager.c1
-rw-r--r--drivers/pnp/pnpacpi/core.c1
-rw-r--r--drivers/pnp/pnpbios/rsparser.c1
-rw-r--r--drivers/pnp/quirks.c1
-rw-r--r--drivers/pnp/resource.c4
-rw-r--r--drivers/pnp/support.c1
-rw-r--r--drivers/rapidio/rio-scan.c1
-rw-r--r--drivers/rapidio/rio-sysfs.c1
-rw-r--r--drivers/rapidio/rio.c1
-rw-r--r--drivers/rtc/Kconfig18
-rw-r--r--drivers/rtc/Makefile1
-rw-r--r--drivers/rtc/rtc-at91.c2
-rw-r--r--drivers/rtc/rtc-ds1553.c2
-rw-r--r--drivers/rtc/rtc-pl031.c2
-rw-r--r--drivers/rtc/rtc-s3c.c607
-rw-r--r--drivers/rtc/rtc-sa1100.c6
-rw-r--r--drivers/rtc/rtc-vr41xx.c4
-rw-r--r--drivers/s390/block/dasd.c1
-rw-r--r--drivers/s390/block/dasd_devmap.c1
-rw-r--r--drivers/s390/block/dasd_diag.c1
-rw-r--r--drivers/s390/block/dasd_eckd.c1
-rw-r--r--drivers/s390/block/dasd_erp.c1
-rw-r--r--drivers/s390/block/dasd_fba.c1
-rw-r--r--drivers/s390/block/dasd_genhd.c1
-rw-r--r--drivers/s390/block/dasd_ioctl.c1
-rw-r--r--drivers/s390/block/dasd_proc.c1
-rw-r--r--drivers/s390/char/con3215.c1
-rw-r--r--drivers/s390/char/con3270.c1
-rw-r--r--drivers/s390/char/ctrlchar.c1
-rw-r--r--drivers/s390/char/fs3270.c1
-rw-r--r--drivers/s390/char/keyboard.c1
-rw-r--r--drivers/s390/char/raw3270.c1
-rw-r--r--drivers/s390/char/sclp_con.c1
-rw-r--r--drivers/s390/char/sclp_cpi.c1
-rw-r--r--drivers/s390/char/sclp_quiesce.c1
-rw-r--r--drivers/s390/char/sclp_rw.c1
-rw-r--r--drivers/s390/char/sclp_tty.c1
-rw-r--r--drivers/s390/char/sclp_vt220.c1
-rw-r--r--drivers/s390/char/tape.h1
-rw-r--r--drivers/s390/char/tape_34xx.c1
-rw-r--r--drivers/s390/char/tape_3590.c1
-rw-r--r--drivers/s390/char/tape_block.c1
-rw-r--r--drivers/s390/char/tape_char.c1
-rw-r--r--drivers/s390/char/tape_core.c1
-rw-r--r--drivers/s390/char/tape_proc.c1
-rw-r--r--drivers/s390/char/tape_std.c1
-rw-r--r--drivers/s390/char/tty3270.c1
-rw-r--r--drivers/s390/cio/blacklist.c1
-rw-r--r--drivers/s390/cio/chsc.c1
-rw-r--r--drivers/s390/cio/cio.c1
-rw-r--r--drivers/s390/cio/device.c1
-rw-r--r--drivers/s390/cio/device_fsm.c1
-rw-r--r--drivers/s390/cio/device_id.c1
-rw-r--r--drivers/s390/cio/device_ops.c1
-rw-r--r--drivers/s390/cio/device_pgid.c1
-rw-r--r--drivers/s390/cio/device_status.c1
-rw-r--r--drivers/s390/cio/qdio.c1
-rw-r--r--drivers/s390/net/fsm.c1
-rw-r--r--drivers/s390/net/iucv.c1
-rw-r--r--drivers/s390/net/qeth_eddp.c1
-rw-r--r--drivers/s390/net/qeth_main.c1
-rw-r--r--drivers/s390/s390mach.c1
-rw-r--r--drivers/s390/sysinfo.c1
-rw-r--r--drivers/sbus/char/aurora.c12
-rw-r--r--drivers/sbus/char/bbc_i2c.c2
-rw-r--r--drivers/sbus/char/cpwatchdog.c2
-rw-r--r--drivers/sbus/char/envctrl.c1
-rw-r--r--drivers/sbus/char/flash.c1
-rw-r--r--drivers/sbus/char/openprom.c1
-rw-r--r--drivers/sbus/dvma.c1
-rw-r--r--drivers/sbus/sbus.c1
-rw-r--r--drivers/scsi/3w-9xxx.c2
-rw-r--r--drivers/scsi/3w-xxxx.c2
-rw-r--r--drivers/scsi/53c700.c1
-rw-r--r--drivers/scsi/53c7xx.c5
-rw-r--r--drivers/scsi/BusLogic.c3
-rw-r--r--drivers/scsi/BusLogic.h1
-rw-r--r--drivers/scsi/FlashPoint.c1
-rw-r--r--drivers/scsi/NCR5380.c2
-rw-r--r--drivers/scsi/NCR53C9x.c1
-rw-r--r--drivers/scsi/NCR53C9x.h1
-rw-r--r--drivers/scsi/NCR_D700.c2
-rw-r--r--drivers/scsi/NCR_Q720.c2
-rw-r--r--drivers/scsi/a100u2w.c2
-rw-r--r--drivers/scsi/a2091.c2
-rw-r--r--drivers/scsi/a3000.c2
-rw-r--r--drivers/scsi/aacraid/rkt.c2
-rw-r--r--drivers/scsi/aacraid/rx.c2
-rw-r--r--drivers/scsi/aacraid/sa.c2
-rw-r--r--drivers/scsi/advansys.c19
-rw-r--r--drivers/scsi/aha152x.c4
-rw-r--r--drivers/scsi/aha1542.c1
-rw-r--r--drivers/scsi/aha1740.c2
-rw-r--r--drivers/scsi/ahci.c2
-rw-r--r--drivers/scsi/aic7xxx/aic7770_osm.c2
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm.h1
-rw-r--r--drivers/scsi/aic7xxx/aic79xx_osm_pci.c2
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm.h1
-rw-r--r--drivers/scsi/aic7xxx/aic7xxx_osm_pci.c2
-rw-r--r--drivers/scsi/aic7xxx_old.c4
-rw-r--r--drivers/scsi/aic7xxx_old/aic7xxx_proc.c1
-rw-r--r--drivers/scsi/amiga7xx.c1
-rw-r--r--drivers/scsi/arm/acornscsi.c3
-rw-r--r--drivers/scsi/arm/cumana_1.c2
-rw-r--r--drivers/scsi/arm/cumana_2.c2
-rw-r--r--drivers/scsi/arm/powertec.c2
-rw-r--r--drivers/scsi/atari_NCR5380.c1
-rw-r--r--drivers/scsi/atari_scsi.c1
-rw-r--r--drivers/scsi/atp870u.c6
-rw-r--r--drivers/scsi/blz1230.c2
-rw-r--r--drivers/scsi/blz2060.c2
-rw-r--r--drivers/scsi/ch.c1
-rw-r--r--drivers/scsi/constants.c1
-rw-r--r--drivers/scsi/cyberstorm.c2
-rw-r--r--drivers/scsi/cyberstormII.c2
-rw-r--r--drivers/scsi/dc395x.c2
-rw-r--r--drivers/scsi/dec_esp.c10
-rw-r--r--drivers/scsi/dmx3191d.c2
-rw-r--r--drivers/scsi/dpt/dpti_i2o.h1
-rw-r--r--drivers/scsi/dpt_i2o.c2
-rw-r--r--drivers/scsi/dtc.c2
-rw-r--r--drivers/scsi/eata.c3
-rw-r--r--drivers/scsi/eata_pio.c5
-rw-r--r--drivers/scsi/esp.c3
-rw-r--r--drivers/scsi/fastlane.c2
-rw-r--r--drivers/scsi/fcal.c1
-rw-r--r--drivers/scsi/fd_mcs.c2
-rw-r--r--drivers/scsi/fdomain.c3
-rw-r--r--drivers/scsi/g_NCR5380.c3
-rw-r--r--drivers/scsi/g_NCR5380.h1
-rw-r--r--drivers/scsi/gdth.c6
-rw-r--r--drivers/scsi/gvp11.c2
-rw-r--r--drivers/scsi/hptiop.c2
-rw-r--r--drivers/scsi/ibmmca.c7
-rw-r--r--drivers/scsi/ide-scsi.c1
-rw-r--r--drivers/scsi/imm.c1
-rw-r--r--drivers/scsi/in2000.c2
-rw-r--r--drivers/scsi/initio.c3
-rw-r--r--drivers/scsi/initio.h13
-rw-r--r--drivers/scsi/ipr.c3
-rw-r--r--drivers/scsi/ips.c5
-rw-r--r--drivers/scsi/jazz_esp.c2
-rw-r--r--drivers/scsi/lasi700.c2
-rw-r--r--drivers/scsi/libata-bmdma.c3
-rw-r--r--drivers/scsi/libata-core.c1
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c2
-rw-r--r--drivers/scsi/megaraid.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_mbox.c2
-rw-r--r--drivers/scsi/megaraid/megaraid_sas.c2
-rw-r--r--drivers/scsi/mesh.c1
-rw-r--r--drivers/scsi/ncr53c8xx.h2
-rw-r--r--drivers/scsi/nsp32.c2
-rw-r--r--drivers/scsi/oktagon_esp.c3
-rw-r--r--drivers/scsi/oktagon_io.S1
-rw-r--r--drivers/scsi/osst.h1
-rw-r--r--drivers/scsi/pas16.c2
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c2
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c2
-rw-r--r--drivers/scsi/pdc_adma.c2
-rw-r--r--drivers/scsi/pluto.c1
-rw-r--r--drivers/scsi/ppa.c1
-rw-r--r--drivers/scsi/qla1280.c5
-rw-r--r--drivers/scsi/qla2xxx/qla_def.h2
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c2
-rw-r--r--drivers/scsi/qlogicpti.c2
-rw-r--r--drivers/scsi/sata_mv.c2
-rw-r--r--drivers/scsi/sata_nv.c1
-rw-r--r--drivers/scsi/sata_promise.c2
-rw-r--r--drivers/scsi/sata_qstor.c2
-rw-r--r--drivers/scsi/sata_sil.c2
-rw-r--r--drivers/scsi/sata_sil24.c2
-rw-r--r--drivers/scsi/sata_sis.c1
-rw-r--r--drivers/scsi/sata_svw.c3
-rw-r--r--drivers/scsi/sata_sx4.c2
-rw-r--r--drivers/scsi/sata_uli.c1
-rw-r--r--drivers/scsi/sata_via.c2
-rw-r--r--drivers/scsi/sata_vsc.c2
-rw-r--r--drivers/scsi/scsi_debug.c1
-rw-r--r--drivers/scsi/scsi_logging.h1
-rw-r--r--drivers/scsi/scsi_priv.h1
-rw-r--r--drivers/scsi/scsi_scan.c1
-rw-r--r--drivers/scsi/scsi_sysfs.c1
-rw-r--r--drivers/scsi/scsi_transport_spi.c1
-rw-r--r--drivers/scsi/sd.c1
-rw-r--r--drivers/scsi/seagate.c2
-rw-r--r--drivers/scsi/sg.c1
-rw-r--r--drivers/scsi/sim710.c3
-rw-r--r--drivers/scsi/sr_vendor.c1
-rw-r--r--drivers/scsi/sun3_NCR5380.c1
-rw-r--r--drivers/scsi/sun3x_esp.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym53c8xx.h1
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.c2
-rw-r--r--drivers/scsi/sym53c8xx_2/sym_glue.h1
-rw-r--r--drivers/scsi/t128.c2
-rw-r--r--drivers/scsi/tmscsim.c3
-rw-r--r--drivers/scsi/tmscsim.h1
-rw-r--r--drivers/scsi/u14-34f.c3
-rw-r--r--drivers/scsi/wd33c93.c1
-rw-r--r--drivers/scsi/wd33c93.h1
-rw-r--r--drivers/scsi/wd7000.c2
-rw-r--r--drivers/scsi/zalon.c2
-rw-r--r--drivers/serial/21285.c1
-rw-r--r--drivers/serial/68328serial.c1
-rw-r--r--drivers/serial/68328serial.h1
-rw-r--r--drivers/serial/68360serial.c1
-rw-r--r--drivers/serial/8250.c5
-rw-r--r--drivers/serial/8250.h1
-rw-r--r--drivers/serial/8250_mca.c1
-rw-r--r--drivers/serial/amba-pl010.c1
-rw-r--r--drivers/serial/amba-pl011.c1
-rw-r--r--drivers/serial/at91_serial.c3
-rw-r--r--drivers/serial/clps711x.c1
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c1
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm1.c1
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_cpm2.c1
-rw-r--r--drivers/serial/crisv10.c23
-rw-r--r--drivers/serial/crisv10.h1
-rw-r--r--drivers/serial/dz.c3
-rw-r--r--drivers/serial/icom.c3
-rw-r--r--drivers/serial/imx.c3
-rw-r--r--drivers/serial/ioc4_serial.c2
-rw-r--r--drivers/serial/ip22zilog.c1
-rw-r--r--drivers/serial/jsm/jsm_driver.c2
-rw-r--r--drivers/serial/m32r_sio.c3
-rw-r--r--drivers/serial/m32r_sio.h1
-rw-r--r--drivers/serial/m32r_sio_reg.h1
-rw-r--r--drivers/serial/mcfserial.c2
-rw-r--r--drivers/serial/mcfserial.h1
-rw-r--r--drivers/serial/mpc52xx_uart.c3
-rw-r--r--drivers/serial/mpsc.c3
-rw-r--r--drivers/serial/mux.c1
-rw-r--r--drivers/serial/pmac_zilog.c3
-rw-r--r--drivers/serial/pxa.c3
-rw-r--r--drivers/serial/s3c2410.c1
-rw-r--r--drivers/serial/sa1100.c1
-rw-r--r--drivers/serial/serial_core.c1
-rw-r--r--drivers/serial/serial_cs.c1
-rw-r--r--drivers/serial/serial_lh7a40x.c1
-rw-r--r--drivers/serial/serial_txx9.c3
-rw-r--r--drivers/serial/sh-sci.c5
-rw-r--r--drivers/serial/sh-sci.h1
-rw-r--r--drivers/serial/sn_console.c3
-rw-r--r--drivers/serial/suncore.c1
-rw-r--r--drivers/serial/sunhv.c166
-rw-r--r--drivers/serial/sunsab.c3
-rw-r--r--drivers/serial/sunsu.c7
-rw-r--r--drivers/serial/sunzilog.c3
-rw-r--r--drivers/serial/v850e_uart.c4
-rw-r--r--drivers/serial/vr41xx_siu.c1
-rw-r--r--drivers/sn/ioc3.c7
-rw-r--r--drivers/spi/spi_bitbang.c1
-rw-r--r--drivers/spi/spi_butterfly.c1
-rw-r--r--drivers/tc/lk201.c1
-rw-r--r--drivers/tc/zs.c3
-rw-r--r--drivers/usb/core/buffer.c1
-rw-r--r--drivers/usb/core/config.c1
-rw-r--r--drivers/usb/core/driver.c1
-rw-r--r--drivers/usb/core/file.c1
-rw-r--r--drivers/usb/core/hcd-pci.c3
-rw-r--r--drivers/usb/core/hcd.c1
-rw-r--r--drivers/usb/core/hub.c1
-rw-r--r--drivers/usb/core/inode.c1
-rw-r--r--drivers/usb/core/message.c1
-rw-r--r--drivers/usb/core/notify.c1
-rw-r--r--drivers/usb/core/sysfs.c1
-rw-r--r--drivers/usb/core/urb.c1
-rw-r--r--drivers/usb/core/usb.c1
-rw-r--r--drivers/usb/gadget/at91_udc.c5
-rw-r--r--drivers/usb/gadget/dummy_hcd.c1
-rw-r--r--drivers/usb/gadget/ether.c1
-rw-r--r--drivers/usb/gadget/file_storage.c1
-rw-r--r--drivers/usb/gadget/goku_udc.c3
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c2
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.h1
-rw-r--r--drivers/usb/gadget/net2280.c3
-rw-r--r--drivers/usb/gadget/omap_udc.c9
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c7
-rw-r--r--drivers/usb/gadget/rndis.c1
-rw-r--r--drivers/usb/gadget/serial.c1
-rw-r--r--drivers/usb/gadget/zero.c1
-rw-r--r--drivers/usb/host/ehci-au1xxx.c2
-rw-r--r--drivers/usb/host/ehci-fsl.c2
-rw-r--r--drivers/usb/host/ehci-hcd.c1
-rw-r--r--drivers/usb/host/hc_crisv10.c1
-rw-r--r--drivers/usb/host/isp116x-hcd.c2
-rw-r--r--drivers/usb/host/ohci-at91.c2
-rw-r--r--drivers/usb/host/ohci-au1xxx.c2
-rw-r--r--drivers/usb/host/ohci-hcd.c1
-rw-r--r--drivers/usb/host/ohci-lh7a404.c2
-rw-r--r--drivers/usb/host/ohci-omap.c4
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c2
-rw-r--r--drivers/usb/host/ohci-pxa27x.c2
-rw-r--r--drivers/usb/host/ohci-s3c2410.c2
-rw-r--r--drivers/usb/host/ohci-sa1111.c2
-rw-r--r--drivers/usb/host/pci-quirks.c1
-rw-r--r--drivers/usb/host/sl811-hcd.c3
-rw-r--r--drivers/usb/host/uhci-debug.c1
-rw-r--r--drivers/usb/host/uhci-hcd.c1
-rw-r--r--drivers/usb/input/appletouch.c1
-rw-r--r--drivers/usb/input/ati_remote.c1
-rw-r--r--drivers/usb/input/hiddev.c1
-rw-r--r--drivers/usb/input/itmtouch.c1
-rw-r--r--drivers/usb/input/keyspan_remote.c1
-rw-r--r--drivers/usb/input/mtouchusb.c1
-rw-r--r--drivers/usb/input/touchkitusb.c1
-rw-r--r--drivers/usb/input/xpad.c1
-rw-r--r--drivers/usb/input/yealink.c1
-rw-r--r--drivers/usb/misc/cytherm.c1
-rw-r--r--drivers/usb/misc/idmouse.c1
-rw-r--r--drivers/usb/misc/ldusb.c1
-rw-r--r--drivers/usb/misc/legousbtower.c1
-rw-r--r--drivers/usb/misc/phidgetkit.c1
-rw-r--r--drivers/usb/misc/phidgetservo.c1
-rw-r--r--drivers/usb/misc/sisusbvga/sisusb_init.c1
-rw-r--r--drivers/usb/misc/usbled.c1
-rw-r--r--drivers/usb/misc/usbtest.c1
-rw-r--r--drivers/usb/net/asix.c1
-rw-r--r--drivers/usb/net/cdc_ether.c1
-rw-r--r--drivers/usb/net/cdc_subset.c1
-rw-r--r--drivers/usb/net/gl620a.c1
-rw-r--r--drivers/usb/net/net1080.c1
-rw-r--r--drivers/usb/net/plusb.c1
-rw-r--r--drivers/usb/net/rndis_host.c1
-rw-r--r--drivers/usb/net/rtl8150.c1
-rw-r--r--drivers/usb/net/usbnet.c1
-rw-r--r--drivers/usb/net/zaurus.c1
-rw-r--r--drivers/usb/serial/belkin_sa.c1
-rw-r--r--drivers/usb/serial/bus.c1
-rw-r--r--drivers/usb/serial/console.c1
-rw-r--r--drivers/usb/serial/cp2101.c1
-rw-r--r--drivers/usb/serial/cyberjack.c1
-rw-r--r--drivers/usb/serial/cypress_m8.c1
-rw-r--r--drivers/usb/serial/digi_acceleport.c1
-rw-r--r--drivers/usb/serial/empeg.c1
-rw-r--r--drivers/usb/serial/ezusb.c1
-rw-r--r--drivers/usb/serial/ftdi_sio.c1
-rw-r--r--drivers/usb/serial/garmin_gps.c1
-rw-r--r--drivers/usb/serial/generic.c1
-rw-r--r--drivers/usb/serial/hp4x.c1
-rw-r--r--drivers/usb/serial/io_edgeport.c1
-rw-r--r--drivers/usb/serial/io_ti.c1
-rw-r--r--drivers/usb/serial/ipaq.c1
-rw-r--r--drivers/usb/serial/ir-usb.c1
-rw-r--r--drivers/usb/serial/keyspan.c1
-rw-r--r--drivers/usb/serial/keyspan_pda.c1
-rw-r--r--drivers/usb/serial/kl5kusb105.c1
-rw-r--r--drivers/usb/serial/kobil_sct.c1
-rw-r--r--drivers/usb/serial/mct_u232.c1
-rw-r--r--drivers/usb/serial/omninet.c1
-rw-r--r--drivers/usb/serial/option.c1
-rw-r--r--drivers/usb/serial/pl2303.c1
-rw-r--r--drivers/usb/serial/safe_serial.c1
-rw-r--r--drivers/usb/serial/ti_usb_3410_5052.c1
-rw-r--r--drivers/usb/serial/usb-serial.c1
-rw-r--r--drivers/usb/serial/usb-serial.h1
-rw-r--r--drivers/usb/serial/visor.c1
-rw-r--r--drivers/usb/serial/whiteheat.c1
-rw-r--r--drivers/usb/storage/debug.h1
-rw-r--r--drivers/usb/storage/dpcm.c1
-rw-r--r--drivers/usb/storage/freecom.c1
-rw-r--r--drivers/usb/storage/initializers.h1
-rw-r--r--drivers/usb/storage/onetouch.c1
-rw-r--r--drivers/usb/storage/transport.c1
-rw-r--r--drivers/usb/storage/unusual_devs.h1
-rw-r--r--drivers/usb/storage/usb.c1
-rw-r--r--drivers/usb/usb-skeleton.c1
-rw-r--r--drivers/video/S3triofb.c1
-rw-r--r--drivers/video/acornfb.c1
-rw-r--r--drivers/video/amifb.c1
-rw-r--r--drivers/video/arcfb.c2
-rw-r--r--drivers/video/asiliantfb.c1
-rw-r--r--drivers/video/aty/aty128fb.c1
-rw-r--r--drivers/video/aty/atyfb.h1
-rw-r--r--drivers/video/aty/atyfb_base.c3
-rw-r--r--drivers/video/aty/radeon_base.c1
-rw-r--r--drivers/video/aty/radeon_i2c.c1
-rw-r--r--drivers/video/aty/radeonfb.h3
-rw-r--r--drivers/video/au1100fb.c1
-rw-r--r--drivers/video/au1200fb.c2
-rw-r--r--drivers/video/backlight/locomolcd.c1
-rw-r--r--drivers/video/cfbcopyarea.c1
-rw-r--r--drivers/video/cfbfillrect.c1
-rw-r--r--drivers/video/cfbimgblt.c1
-rw-r--r--drivers/video/chipsfb.c1
-rw-r--r--drivers/video/cirrusfb.c1
-rw-r--r--drivers/video/console/bitblit.c1
-rw-r--r--drivers/video/console/dummycon.c1
-rw-r--r--drivers/video/console/fbcon.c1
-rw-r--r--drivers/video/console/fbcon.h1
-rw-r--r--drivers/video/console/fbcon_ccw.c1
-rw-r--r--drivers/video/console/fbcon_cw.c1
-rw-r--r--drivers/video/console/fbcon_rotate.c1
-rw-r--r--drivers/video/console/fbcon_ud.c1
-rw-r--r--drivers/video/console/font_acorn_8x8.c1
-rw-r--r--drivers/video/console/fonts.c1
-rw-r--r--drivers/video/console/promcon.c1
-rw-r--r--drivers/video/console/sticore.c1
-rw-r--r--drivers/video/console/tileblit.c1
-rw-r--r--drivers/video/console/vgacon.c1
-rw-r--r--drivers/video/controlfb.c1
-rw-r--r--drivers/video/cyber2000fb.c1
-rw-r--r--drivers/video/cyber2000fb.h1
-rw-r--r--drivers/video/cyblafb.c1
-rw-r--r--drivers/video/fbmem.c1
-rw-r--r--drivers/video/gbefb.c1
-rw-r--r--drivers/video/hitfb.c1
-rw-r--r--drivers/video/i810/i810-i2c.c1
-rw-r--r--drivers/video/i810/i810_main.c1
-rw-r--r--drivers/video/imsttfb.c1
-rw-r--r--drivers/video/imxfb.c1
-rw-r--r--drivers/video/intelfb/intelfbdrv.c1
-rw-r--r--drivers/video/intelfb/intelfbhw.c1
-rw-r--r--drivers/video/kyro/fbdev.c1
-rw-r--r--drivers/video/logo/logo.c1
-rw-r--r--drivers/video/macmodes.c1
-rw-r--r--drivers/video/matrox/matroxfb_DAC1064.c1
-rw-r--r--drivers/video/matrox/matroxfb_DAC1064.h1
-rw-r--r--drivers/video/matrox/matroxfb_Ti3026.c1
-rw-r--r--drivers/video/matrox/matroxfb_Ti3026.h1
-rw-r--r--drivers/video/matrox/matroxfb_base.c3
-rw-r--r--drivers/video/matrox/matroxfb_base.h1
-rw-r--r--drivers/video/matrox/matroxfb_misc.c1
-rw-r--r--drivers/video/neofb.c1
-rw-r--r--drivers/video/nvidia/nv_i2c.c1
-rw-r--r--drivers/video/nvidia/nv_of.c1
-rw-r--r--drivers/video/nvidia/nvidia.c1
-rw-r--r--drivers/video/offb.c1
-rw-r--r--drivers/video/platinumfb.c1
-rw-r--r--drivers/video/pm2fb.c1
-rw-r--r--drivers/video/pm3fb.c1
-rw-r--r--drivers/video/pvr2fb.c1
-rw-r--r--drivers/video/pxafb.c3
-rw-r--r--drivers/video/riva/fbdev.c1
-rw-r--r--drivers/video/riva/rivafb-i2c.c1
-rw-r--r--drivers/video/riva/rivafb.h1
-rw-r--r--drivers/video/s1d13xxxfb.c1
-rw-r--r--drivers/video/s3c2410fb.c2
-rw-r--r--drivers/video/sa1100fb.c3
-rw-r--r--drivers/video/savage/savagefb-i2c.c1
-rw-r--r--drivers/video/savage/savagefb_driver.c1
-rw-r--r--drivers/video/sgivwfb.c1
-rw-r--r--drivers/video/sis/init.h1
-rw-r--r--drivers/video/sis/init301.c4
-rw-r--r--drivers/video/sis/init301.h1
-rw-r--r--drivers/video/sis/initextlfb.c1
-rw-r--r--drivers/video/sis/osdef.h1
-rw-r--r--drivers/video/sis/sis.h1
-rw-r--r--drivers/video/sis/sis_accel.c1
-rw-r--r--drivers/video/sis/sis_main.c1
-rw-r--r--drivers/video/sstfb.c1
-rw-r--r--drivers/video/stifb.c1
-rw-r--r--drivers/video/sun3fb.c1
-rw-r--r--drivers/video/tdfxfb.c1
-rw-r--r--drivers/video/tridentfb.c1
-rw-r--r--drivers/video/valkyriefb.c1
-rw-r--r--drivers/video/vgastate.c1
-rw-r--r--drivers/zorro/names.c1
-rw-r--r--fs/9p/conv.c1
-rw-r--r--fs/9p/error.c1
-rw-r--r--fs/9p/fcall.c1
-rw-r--r--fs/9p/fcprint.c1
-rw-r--r--fs/9p/fid.c1
-rw-r--r--fs/9p/mux.c1
-rw-r--r--fs/9p/trans_fd.c1
-rw-r--r--fs/9p/v9fs.c1
-rw-r--r--fs/9p/vfs_addr.c1
-rw-r--r--fs/9p/vfs_file.c1
-rw-r--r--fs/9p/vfs_super.c1
-rw-r--r--fs/adfs/dir.c1
-rw-r--r--fs/befs/linuxvfs.c38
-rw-r--r--fs/binfmt_flat.c1
-rw-r--r--fs/binfmt_som.c1
-rw-r--r--fs/block_dev.c1
-rw-r--r--fs/buffer.c1
-rw-r--r--fs/char_dev.c1
-rw-r--r--fs/cifs/asn1.c1
-rw-r--r--fs/cifs/file.c2
-rw-r--r--fs/coda/sysctl.c1
-rw-r--r--fs/compat_ioctl.c1
-rw-r--r--fs/dcache.c1
-rw-r--r--fs/dcookies.c1
-rw-r--r--fs/debugfs/file.c1
-rw-r--r--fs/debugfs/inode.c1
-rw-r--r--fs/exec.c1
-rw-r--r--fs/ext2/balloc.c1
-rw-r--r--fs/ext2/ialloc.c1
-rw-r--r--fs/ext2/super.c1
-rw-r--r--fs/ext2/xattr.h1
-rw-r--r--fs/ext3/balloc.c1
-rw-r--r--fs/ext3/resize.c1
-rw-r--r--fs/ext3/super.c1
-rw-r--r--fs/ext3/xattr.h1
-rw-r--r--fs/file_table.c1
-rw-r--r--fs/hfs/super.c1
-rw-r--r--fs/hfsplus/super.c1
-rw-r--r--fs/inode.c1
-rw-r--r--fs/ioctl.c1
-rw-r--r--fs/isofs/compress.c1
-rw-r--r--fs/isofs/dir.c1
-rw-r--r--fs/isofs/inode.c1
-rw-r--r--fs/jffs/intrep.c1
-rw-r--r--fs/jffs/jffs_fm.h1
-rw-r--r--fs/jffs2/compr_zlib.c1
-rw-r--r--fs/jffs2/debug.h1
-rw-r--r--fs/jffs2/fs.c1
-rw-r--r--fs/jffs2/nodelist.h1
-rw-r--r--fs/jffs2/super.c1
-rw-r--r--fs/jfs/jfs_txnmgr.c2
-rw-r--r--fs/jfs/super.c1
-rw-r--r--fs/lockd/clntproc.c1
-rw-r--r--fs/lockd/svc.c1
-rw-r--r--fs/lockd/svclock.c1
-rw-r--r--fs/lockd/svcproc.c1
-rw-r--r--fs/lockd/svcsubs.c1
-rw-r--r--fs/lockd/xdr.c1
-rw-r--r--fs/namespace.c1
-rw-r--r--fs/ncpfs/dir.c1
-rw-r--r--fs/ncpfs/inode.c1
-rw-r--r--fs/ncpfs/ioctl.c1
-rw-r--r--fs/ncpfs/ncplib_kernel.c1
-rw-r--r--fs/ncpfs/ncplib_kernel.h1
-rw-r--r--fs/ncpfs/ncpsign_kernel.c1
-rw-r--r--fs/ncpfs/sock.c1
-rw-r--r--fs/ncpfs/symlink.c1
-rw-r--r--fs/nfs/callback.c1
-rw-r--r--fs/nfs/callback_proc.c1
-rw-r--r--fs/nfs/callback_xdr.c1
-rw-r--r--fs/nfs/delegation.c1
-rw-r--r--fs/nfs/direct.c1
-rw-r--r--fs/nfs/inode.c1
-rw-r--r--fs/nfs/internal.h4
-rw-r--r--fs/nfs/nfs4state.c1
-rw-r--r--fs/nfs/pagelist.c1
-rw-r--r--fs/nfs/read.c1
-rw-r--r--fs/nfs/sysctl.c1
-rw-r--r--fs/nfs/write.c1
-rw-r--r--fs/nfsctl.c1
-rw-r--r--fs/nfsd/nfs4callback.c1
-rw-r--r--fs/nfsd/nfs4idmap.c1
-rw-r--r--fs/nfsd/nfsctl.c1
-rw-r--r--fs/nfsd/nfssvc.c1
-rw-r--r--fs/nfsd/vfs.c1
-rw-r--r--fs/nls/nls_base.c1
-rw-r--r--fs/ntfs/sysctl.h1
-rw-r--r--fs/partitions/acorn.c1
-rw-r--r--fs/partitions/efi.c1
-rw-r--r--fs/partitions/efi.h1
-rw-r--r--fs/partitions/ibm.c1
-rw-r--r--fs/partitions/mac.c1
-rw-r--r--fs/partitions/msdos.c1
-rw-r--r--fs/proc/array.c1
-rw-r--r--fs/proc/base.c1
-rw-r--r--fs/proc/kcore.c1
-rw-r--r--fs/proc/proc_misc.c1
-rw-r--r--fs/proc/root.c1
-rw-r--r--fs/proc/vmcore.c1
-rw-r--r--fs/qnx4/bitmap.c1
-rw-r--r--fs/qnx4/dir.c1
-rw-r--r--fs/qnx4/fsync.c1
-rw-r--r--fs/qnx4/inode.c1
-rw-r--r--fs/qnx4/namei.c1
-rw-r--r--fs/qnx4/truncate.c1
-rw-r--r--fs/reiserfs/bitmap.c1
-rw-r--r--fs/reiserfs/dir.c1
-rw-r--r--fs/reiserfs/do_balan.c1
-rw-r--r--fs/reiserfs/fix_node.c1
-rw-r--r--fs/reiserfs/ibalance.c1
-rw-r--r--fs/reiserfs/inode.c6
-rw-r--r--fs/reiserfs/journal.c1
-rw-r--r--fs/reiserfs/lbalance.c1
-rw-r--r--fs/reiserfs/namei.c1
-rw-r--r--fs/reiserfs/objectid.c1
-rw-r--r--fs/reiserfs/prints.c1
-rw-r--r--fs/reiserfs/procfs.c1
-rw-r--r--fs/reiserfs/stree.c1
-rw-r--r--fs/reiserfs/super.c1
-rw-r--r--fs/reiserfs/tail_conversion.c1
-rw-r--r--fs/smbfs/inode.c1
-rw-r--r--fs/smbfs/smbiod.c1
-rw-r--r--fs/stat.c1
-rw-r--r--fs/super.c1
-rw-r--r--fs/udf/super.c1
-rw-r--r--fs/udf/udfdecl.h1
-rw-r--r--fs/ufs/balloc.c48
-rw-r--r--fs/ufs/file.c4
-rw-r--r--fs/ufs/inode.c7
-rw-r--r--fs/ufs/super.c1
-rw-r--r--fs/ufs/truncate.c148
-rw-r--r--fs/ufs/util.c54
-rw-r--r--fs/ufs/util.h8
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.h1
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c1
-rw-r--r--fs/xfs/linux-2.6/xfs_linux.h1
-rw-r--r--include/acpi/acconfig.h2
-rw-r--r--include/acpi/acdispat.h2
-rw-r--r--include/acpi/acglobal.h26
-rw-r--r--include/acpi/acinterp.h5
-rw-r--r--include/acpi/aclocal.h36
-rw-r--r--include/acpi/acmacros.h2
-rw-r--r--include/acpi/acobject.h8
-rw-r--r--include/acpi/acpi_bus.h2
-rw-r--r--include/acpi/acpi_drivers.h17
-rw-r--r--include/acpi/acpiosxf.h40
-rw-r--r--include/acpi/actypes.h49
-rw-r--r--include/acpi/platform/aclinux.h2
-rw-r--r--include/acpi/processor.h1
-rw-r--r--include/asm-alpha/floppy.h2
-rw-r--r--include/asm-alpha/signal.h2
-rw-r--r--include/asm-arm/arch-at91rm9200/board.h2
-rw-r--r--include/asm-arm/arch-ixp4xx/io.h2
-rw-r--r--include/asm-arm/arch-omap/board-fsample.h51
-rw-r--r--include/asm-arm/arch-omap/board.h7
-rw-r--r--include/asm-arm/arch-omap/dma.h15
-rw-r--r--include/asm-arm/arch-omap/dmtimer.h80
-rw-r--r--include/asm-arm/arch-omap/gpmc.h91
-rw-r--r--include/asm-arm/arch-omap/hardware.h4
-rw-r--r--include/asm-arm/arch-omap/irqs.h14
-rw-r--r--include/asm-arm/arch-omap/mux.h26
-rw-r--r--include/asm-arm/arch-omap/pm.h33
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h2
-rw-r--r--include/asm-arm/arch-pxa/trizeps4.h106
-rw-r--r--include/asm-arm/bug.h1
-rw-r--r--include/asm-arm/dyntick.h6
-rw-r--r--include/asm-arm/floppy.h2
-rw-r--r--include/asm-arm/hw_irq.h20
-rw-r--r--include/asm-arm/irq.h22
-rw-r--r--include/asm-arm/mach/irq.h135
-rw-r--r--include/asm-arm/mach/time.h1
-rw-r--r--include/asm-arm/memory.h5
-rw-r--r--include/asm-arm/mmu.h1
-rw-r--r--include/asm-arm/mmu_context.h12
-rw-r--r--include/asm-arm/pgtable-hwdef.h1
-rw-r--r--include/asm-arm/procinfo.h3
-rw-r--r--include/asm-arm/signal.h6
-rw-r--r--include/asm-arm/thread_info.h3
-rw-r--r--include/asm-arm26/floppy.h2
-rw-r--r--include/asm-arm26/signal.h2
-rw-r--r--include/asm-cris/arch-v10/irq.h2
-rw-r--r--include/asm-cris/arch-v32/arbiter.h4
-rw-r--r--include/asm-cris/arch-v32/irq.h2
-rw-r--r--include/asm-cris/signal.h2
-rw-r--r--include/asm-frv/irq-routing.h2
-rw-r--r--include/asm-frv/signal.h2
-rw-r--r--include/asm-generic/audit_change_attr.h18
-rw-r--r--include/asm-generic/audit_dir_write.h14
-rw-r--r--include/asm-generic/sections.h1
-rw-r--r--include/asm-h8300/signal.h2
-rw-r--r--include/asm-i386/alternative.h8
-rw-r--r--include/asm-i386/floppy.h8
-rw-r--r--include/asm-i386/signal.h2
-rw-r--r--include/asm-ia64/irq.h2
-rw-r--r--include/asm-ia64/signal.h4
-rw-r--r--include/asm-ia64/sn/tioca_provider.h2
-rw-r--r--include/asm-m32r/signal.h2
-rw-r--r--include/asm-m68k/floppy.h4
-rw-r--r--include/asm-m68k/irq.h4
-rw-r--r--include/asm-m68k/signal.h2
-rw-r--r--include/asm-m68k/sun3xflop.h3
-rw-r--r--include/asm-m68knommu/irq.h4
-rw-r--r--include/asm-m68knommu/signal.h2
-rw-r--r--include/asm-mips/mach-generic/floppy.h2
-rw-r--r--include/asm-mips/mach-jazz/floppy.h2
-rw-r--r--include/asm-mips/signal.h11
-rw-r--r--include/asm-parisc/floppy.h8
-rw-r--r--include/asm-parisc/signal.h2
-rw-r--r--include/asm-powerpc/floppy.h2
-rw-r--r--include/asm-powerpc/of_device.h2
-rw-r--r--include/asm-powerpc/pmac_pfunc.h2
-rw-r--r--include/asm-powerpc/signal.h2
-rw-r--r--include/asm-ppc/floppy.h8
-rw-r--r--include/asm-ppc/page.h2
-rw-r--r--include/asm-s390/signal.h2
-rw-r--r--include/asm-sh/floppy.h9
-rw-r--r--include/asm-sh/mpc1211/keyboard.h2
-rw-r--r--include/asm-sh/signal.h2
-rw-r--r--include/asm-sh64/keyboard.h2
-rw-r--r--include/asm-sh64/signal.h2
-rw-r--r--include/asm-sparc/floppy.h3
-rw-r--r--include/asm-sparc/signal.h3
-rw-r--r--include/asm-sparc64/floppy.h2
-rw-r--r--include/asm-sparc64/signal.h3
-rw-r--r--include/asm-sparc64/vdev.h17
-rw-r--r--include/asm-um/kmap_types.h20
-rw-r--r--include/asm-v850/signal.h2
-rw-r--r--include/asm-x86_64/alternative.h9
-rw-r--r--include/asm-x86_64/floppy.h8
-rw-r--r--include/asm-x86_64/signal.h2
-rw-r--r--include/asm-xtensa/signal.h15
-rw-r--r--include/linux/audit.h25
-rw-r--r--include/linux/cpu.h6
-rw-r--r--include/linux/cpufreq.h6
-rw-r--r--include/linux/dqblk_xfs.h4
-rw-r--r--include/linux/err.h4
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/interrupt.h49
-rw-r--r--include/linux/irq.h62
-rw-r--r--include/linux/kobject.h2
-rw-r--r--include/linux/netdevice.h17
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--include/linux/pci_ids.h3
-rw-r--r--include/linux/signal.h26
-rw-r--r--include/linux/skbuff.h6
-rw-r--r--include/linux/udp.h2
-rw-r--r--include/linux/ufs_fs.h2
-rw-r--r--include/media/tuner-types.h55
-rw-r--r--include/net/ip6_route.h2
-rw-r--r--include/net/irda/irda_device.h2
-rw-r--r--include/net/protocol.h6
-rw-r--r--include/net/sock.h13
-rw-r--r--include/net/tcp.h2
-rw-r--r--include/net/tcp_ecn.h4
-rw-r--r--include/sound/initval.h2
-rw-r--r--init/main.c1
-rw-r--r--ipc/compat.c1
-rw-r--r--ipc/msg.c1
-rw-r--r--ipc/sem.c1
-rw-r--r--ipc/shm.c1
-rw-r--r--ipc/util.c1
-rw-r--r--kernel/acct.c1
-rw-r--r--kernel/audit.h1
-rw-r--r--kernel/auditfilter.c209
-rw-r--r--kernel/auditsc.c65
-rw-r--r--kernel/configs.c1
-rw-r--r--kernel/cpuset.c3
-rw-r--r--kernel/exec_domain.c1
-rw-r--r--kernel/exit.c1
-rw-r--r--kernel/fork.c1
-rw-r--r--kernel/futex.c8
-rw-r--r--kernel/irq/chip.c15
-rw-r--r--kernel/irq/handle.c22
-rw-r--r--kernel/irq/manage.c49
-rw-r--r--kernel/irq/spurious.c4
-rw-r--r--kernel/kmod.c1
-rw-r--r--kernel/ksysfs.c1
-rw-r--r--kernel/module.c1
-rw-r--r--kernel/panic.c1
-rw-r--r--kernel/params.c1
-rw-r--r--kernel/power/Kconfig12
-rw-r--r--kernel/printk.c1
-rw-r--r--kernel/profile.c1
-rw-r--r--kernel/resource.c1
-rw-r--r--kernel/signal.c1
-rw-r--r--kernel/spinlock.c1
-rw-r--r--kernel/sys.c1
-rw-r--r--kernel/sysctl.c1
-rw-r--r--kernel/wait.c1
-rw-r--r--lib/bust_spinlocks.c1
-rw-r--r--lib/extable.c1
-rw-r--r--lib/kobject_uevent.c4
-rw-r--r--lib/semaphore-sleepers.c1
-rw-r--r--lib/spinlock_debug.c1
-rw-r--r--lib/textsearch.c1
-rw-r--r--lib/ts_bm.c1
-rw-r--r--lib/ts_fsm.c1
-rw-r--r--lib/ts_kmp.c1
-rw-r--r--mm/filemap.c1
-rw-r--r--mm/memory_hotplug.c1
-rw-r--r--mm/mmzone.c1
-rw-r--r--mm/page_alloc.c1
-rw-r--r--mm/shmem.c1
-rw-r--r--mm/slob.c1
-rw-r--r--mm/sparse.c1
-rw-r--r--mm/swapfile.c1
-rw-r--r--net/802/fc.c1
-rw-r--r--net/802/fddi.c1
-rw-r--r--net/802/sysctl_net_802.c1
-rw-r--r--net/802/tr.c1
-rw-r--r--net/8021q/vlanproc.c1
-rw-r--r--net/appletalk/aarp.c1
-rw-r--r--net/appletalk/atalk_proc.c1
-rw-r--r--net/appletalk/ddp.c1
-rw-r--r--net/appletalk/sysctl_net_atalk.c1
-rw-r--r--net/atm/br2684.c1
-rw-r--r--net/atm/clip.c1
-rw-r--r--net/atm/common.c1
-rw-r--r--net/atm/ioctl.c1
-rw-r--r--net/atm/lec.c1
-rw-r--r--net/atm/lec.h1
-rw-r--r--net/atm/mpc.c1
-rw-r--r--net/atm/mpoa_proc.c1
-rw-r--r--net/atm/pppoatm.c1
-rw-r--r--net/atm/proc.c1
-rw-r--r--net/atm/pvc.c1
-rw-r--r--net/atm/resources.c1
-rw-r--r--net/atm/resources.h1
-rw-r--r--net/ax25/af_ax25.c1
-rw-r--r--net/ax25/ax25_dev.c1
-rw-r--r--net/ax25/ax25_iface.c1
-rw-r--r--net/ax25/ax25_ip.c1
-rw-r--r--net/ax25/ax25_out.c1
-rw-r--r--net/ax25/ax25_timer.c1
-rw-r--r--net/ax25/sysctl_net_ax25.c1
-rw-r--r--net/bluetooth/af_bluetooth.c1
-rw-r--r--net/bluetooth/bnep/core.c1
-rw-r--r--net/bluetooth/bnep/netdev.c1
-rw-r--r--net/bluetooth/bnep/sock.c1
-rw-r--r--net/bluetooth/cmtp/capi.c1
-rw-r--r--net/bluetooth/cmtp/core.c1
-rw-r--r--net/bluetooth/cmtp/sock.c1
-rw-r--r--net/bluetooth/hci_conn.c1
-rw-r--r--net/bluetooth/hci_core.c1
-rw-r--r--net/bluetooth/hci_event.c1
-rw-r--r--net/bluetooth/hci_sock.c1
-rw-r--r--net/bluetooth/hci_sysfs.c1
-rw-r--r--net/bluetooth/hidp/core.c1
-rw-r--r--net/bluetooth/hidp/sock.c1
-rw-r--r--net/bluetooth/l2cap.c1
-rw-r--r--net/bluetooth/lib.c1
-rw-r--r--net/bluetooth/rfcomm/core.c1
-rw-r--r--net/bluetooth/rfcomm/sock.c1
-rw-r--r--net/bluetooth/rfcomm/tty.c1
-rw-r--r--net/bluetooth/sco.c1
-rw-r--r--net/bridge/br.c1
-rw-r--r--net/bridge/netfilter/ebt_ulog.c1
-rw-r--r--net/core/dev.c1
-rw-r--r--net/core/link_watch.c1
-rw-r--r--net/core/neighbour.c1
-rw-r--r--net/core/net-sysfs.c1
-rw-r--r--net/core/rtnetlink.c1
-rw-r--r--net/core/skbuff.c1
-rw-r--r--net/core/sock.c1
-rw-r--r--net/core/sysctl_net_core.c1
-rw-r--r--net/dccp/ackvec.h1
-rw-r--r--net/dccp/ccids/ccid2.c1
-rw-r--r--net/dccp/ccids/ccid3.c1
-rw-r--r--net/dccp/ccids/ccid3.h1
-rw-r--r--net/dccp/ccids/lib/loss_interval.c1
-rw-r--r--net/dccp/ccids/lib/loss_interval.h1
-rw-r--r--net/dccp/ccids/lib/packet_history.c1
-rw-r--r--net/dccp/ccids/lib/packet_history.h1
-rw-r--r--net/dccp/ccids/lib/tfrc_equation.c1
-rw-r--r--net/dccp/dccp.h1
-rw-r--r--net/dccp/diag.c1
-rw-r--r--net/dccp/feat.c1
-rw-r--r--net/dccp/input.c1
-rw-r--r--net/dccp/ipv4.c1
-rw-r--r--net/dccp/ipv6.c1
-rw-r--r--net/dccp/ipv6.h1
-rw-r--r--net/dccp/minisocks.c1
-rw-r--r--net/dccp/options.c1
-rw-r--r--net/dccp/output.c1
-rw-r--r--net/dccp/proto.c1
-rw-r--r--net/dccp/sysctl.c1
-rw-r--r--net/dccp/timer.c1
-rw-r--r--net/decnet/af_decnet.c1
-rw-r--r--net/decnet/dn_dev.c1
-rw-r--r--net/decnet/dn_fib.c1
-rw-r--r--net/decnet/dn_neigh.c1
-rw-r--r--net/decnet/dn_nsp_in.c1
-rw-r--r--net/decnet/dn_route.c1
-rw-r--r--net/decnet/dn_rules.c1
-rw-r--r--net/decnet/dn_table.c1
-rw-r--r--net/decnet/sysctl_net_decnet.c1
-rw-r--r--net/econet/af_econet.c1
-rw-r--r--net/ethernet/eth.c1
-rw-r--r--net/ieee80211/ieee80211_crypt_ccmp.c1
-rw-r--r--net/ieee80211/ieee80211_crypt_tkip.c1
-rw-r--r--net/ieee80211/ieee80211_crypt_wep.c1
-rw-r--r--net/ieee80211/ieee80211_geo.c1
-rw-r--r--net/ieee80211/ieee80211_module.c1
-rw-r--r--net/ieee80211/ieee80211_rx.c1
-rw-r--r--net/ieee80211/ieee80211_tx.c1
-rw-r--r--net/ipv4/ah4.c1
-rw-r--r--net/ipv4/arp.c1
-rw-r--r--net/ipv4/datagram.c1
-rw-r--r--net/ipv4/devinet.c1
-rw-r--r--net/ipv4/esp4.c1
-rw-r--r--net/ipv4/fib_frontend.c1
-rw-r--r--net/ipv4/fib_hash.c1
-rw-r--r--net/ipv4/fib_rules.c1
-rw-r--r--net/ipv4/fib_semantics.c1
-rw-r--r--net/ipv4/fib_trie.c1
-rw-r--r--net/ipv4/icmp.c1
-rw-r--r--net/ipv4/igmp.c1
-rw-r--r--net/ipv4/inet_connection_sock.c1
-rw-r--r--net/ipv4/inet_diag.c1
-rw-r--r--net/ipv4/inet_hashtables.c1
-rw-r--r--net/ipv4/inet_timewait_sock.c1
-rw-r--r--net/ipv4/ip_forward.c1
-rw-r--r--net/ipv4/ip_fragment.c1
-rw-r--r--net/ipv4/ip_gre.c1
-rw-r--r--net/ipv4/ip_input.c1
-rw-r--r--net/ipv4/ip_output.c5
-rw-r--r--net/ipv4/ip_sockglue.c1
-rw-r--r--net/ipv4/ipcomp.c1
-rw-r--r--net/ipv4/ipip.c1
-rw-r--r--net/ipv4/ipmr.c1
-rw-r--r--net/ipv4/ipvs/ip_vs_est.c1
-rw-r--r--net/ipv4/multipath_drr.c1
-rw-r--r--net/ipv4/multipath_random.c1
-rw-r--r--net/ipv4/multipath_rr.c1
-rw-r--r--net/ipv4/multipath_wrandom.c1
-rw-r--r--net/ipv4/netfilter/arp_tables.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_ftp.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_helper_h323.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_helper_pptp.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_irc.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_gre.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_sctp.c2
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_tcp.c1
-rw-r--r--net/ipv4/netfilter/ip_conntrack_standalone.c1
-rw-r--r--net/ipv4/netfilter/ip_nat_helper.c1
-rw-r--r--net/ipv4/netfilter/ip_nat_helper_pptp.c1
-rw-r--r--net/ipv4/netfilter/ip_nat_proto_gre.c1
-rw-r--r--net/ipv4/netfilter/ip_nat_snmp_basic.c1
-rw-r--r--net/ipv4/netfilter/ip_nat_standalone.c1
-rw-r--r--net/ipv4/netfilter/ip_tables.c1
-rw-r--r--net/ipv4/netfilter/ipt_CLUSTERIP.c1
-rw-r--r--net/ipv4/netfilter/ipt_MASQUERADE.c1
-rw-r--r--net/ipv4/netfilter/ipt_NETMAP.c1
-rw-r--r--net/ipv4/netfilter/ipt_REJECT.c1
-rw-r--r--net/ipv4/netfilter/ipt_ULOG.c1
-rw-r--r--net/ipv4/netfilter/iptable_mangle.c1
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c1
-rw-r--r--net/ipv4/protocol.c1
-rw-r--r--net/ipv4/route.c1
-rw-r--r--net/ipv4/sysctl_net_ipv4.c1
-rw-r--r--net/ipv4/tcp.c18
-rw-r--r--net/ipv4/tcp_bic.c1
-rw-r--r--net/ipv4/tcp_cong.c1
-rw-r--r--net/ipv4/tcp_cubic.c1
-rw-r--r--net/ipv4/tcp_diag.c1
-rw-r--r--net/ipv4/tcp_highspeed.c1
-rw-r--r--net/ipv4/tcp_htcp.c1
-rw-r--r--net/ipv4/tcp_hybla.c1
-rw-r--r--net/ipv4/tcp_input.c1
-rw-r--r--net/ipv4/tcp_ipv4.c3
-rw-r--r--net/ipv4/tcp_minisocks.c1
-rw-r--r--net/ipv4/tcp_output.c9
-rw-r--r--net/ipv4/tcp_scalable.c1
-rw-r--r--net/ipv4/tcp_vegas.c1
-rw-r--r--net/ipv4/tcp_westwood.c1
-rw-r--r--net/ipv4/udp.c1
-rw-r--r--net/ipv4/xfrm4_policy.c1
-rw-r--r--net/ipv6/addrconf.c1
-rw-r--r--net/ipv6/af_inet6.c3
-rw-r--r--net/ipv6/ah6.c1
-rw-r--r--net/ipv6/anycast.c1
-rw-r--r--net/ipv6/esp6.c1
-rw-r--r--net/ipv6/exthdrs.c4
-rw-r--r--net/ipv6/inet6_connection_sock.c3
-rw-r--r--net/ipv6/inet6_hashtables.c1
-rw-r--r--net/ipv6/ip6_fib.c1
-rw-r--r--net/ipv6/ip6_flowlabel.c1
-rw-r--r--net/ipv6/ip6_input.c7
-rw-r--r--net/ipv6/ip6_output.c5
-rw-r--r--net/ipv6/ip6_tunnel.c1
-rw-r--r--net/ipv6/ipcomp6.c1
-rw-r--r--net/ipv6/ipv6_sockglue.c63
-rw-r--r--net/ipv6/ipv6_syms.c1
-rw-r--r--net/ipv6/mcast.c1
-rw-r--r--net/ipv6/ndisc.c1
-rw-r--r--net/ipv6/netfilter/ip6_tables.c1
-rw-r--r--net/ipv6/netfilter/ip6t_REJECT.c1
-rw-r--r--net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c1
-rw-r--r--net/ipv6/netfilter/nf_conntrack_reasm.c1
-rw-r--r--net/ipv6/proc.c1
-rw-r--r--net/ipv6/reassembly.c1
-rw-r--r--net/ipv6/route.c1
-rw-r--r--net/ipv6/sit.c1
-rw-r--r--net/ipv6/sysctl_net_ipv6.c1
-rw-r--r--net/ipv6/tcp_ipv6.c8
-rw-r--r--net/ipv6/udp.c1
-rw-r--r--net/ipv6/xfrm6_policy.c1
-rw-r--r--net/ipv6/xfrm6_tunnel.c1
-rw-r--r--net/ipx/af_ipx.c1
-rw-r--r--net/ipx/ipx_proc.c1
-rw-r--r--net/ipx/ipx_route.c1
-rw-r--r--net/ipx/sysctl_net_ipx.c1
-rw-r--r--net/irda/af_irda.c1
-rw-r--r--net/irda/ircomm/ircomm_core.c1
-rw-r--r--net/irda/ircomm/ircomm_tty.c1
-rw-r--r--net/irda/irda_device.c1
-rw-r--r--net/irda/iriap.c1
-rw-r--r--net/irda/irlan/irlan_common.c1
-rw-r--r--net/irda/irlan/irlan_eth.c1
-rw-r--r--net/irda/irlap.c1
-rw-r--r--net/irda/irlap_event.c1
-rw-r--r--net/irda/irlmp.c1
-rw-r--r--net/irda/irlmp_event.c1
-rw-r--r--net/irda/irlmp_frame.c1
-rw-r--r--net/irda/irmod.c1
-rw-r--r--net/irda/irnet/irnet.h1
-rw-r--r--net/irda/irsysctl.c1
-rw-r--r--net/irda/irttp.c1
-rw-r--r--net/irda/qos.c1
-rw-r--r--net/irda/timer.c1
-rw-r--r--net/key/af_key.c1
-rw-r--r--net/llc/af_llc.c1
-rw-r--r--net/llc/llc_if.c1
-rw-r--r--net/llc/llc_proc.c1
-rw-r--r--net/llc/llc_station.c1
-rw-r--r--net/llc/sysctl_net_llc.c1
-rw-r--r--net/netfilter/core.c1
-rw-r--r--net/netfilter/nf_conntrack_core.c1
-rw-r--r--net/netfilter/nf_conntrack_ftp.c1
-rw-r--r--net/netfilter/nf_conntrack_l3proto_generic.c1
-rw-r--r--net/netfilter/nf_conntrack_proto_sctp.c2
-rw-r--r--net/netfilter/nf_conntrack_proto_tcp.c1
-rw-r--r--net/netfilter/nf_conntrack_standalone.c1
-rw-r--r--net/netfilter/nf_internals.h1
-rw-r--r--net/netfilter/nf_log.c1
-rw-r--r--net/netfilter/nf_queue.c1
-rw-r--r--net/netfilter/nf_sockopt.c1
-rw-r--r--net/netfilter/nfnetlink.c1
-rw-r--r--net/netfilter/x_tables.c1
-rw-r--r--net/netfilter/xt_policy.c1
-rw-r--r--net/netlink/af_netlink.c1
-rw-r--r--net/netlink/attr.c1
-rw-r--r--net/netlink/genetlink.c1
-rw-r--r--net/netrom/af_netrom.c1
-rw-r--r--net/netrom/nr_dev.c1
-rw-r--r--net/packet/af_packet.c1
-rw-r--r--net/rose/af_rose.c1
-rw-r--r--net/rose/rose_dev.c1
-rw-r--r--net/rxrpc/rxrpc_syms.c1
-rw-r--r--net/rxrpc/sysctl.c1
-rw-r--r--net/sched/Kconfig8
-rw-r--r--net/sched/act_api.c1
-rw-r--r--net/sched/act_gact.c1
-rw-r--r--net/sched/act_ipt.c1
-rw-r--r--net/sched/act_mirred.c1
-rw-r--r--net/sched/act_pedit.c1
-rw-r--r--net/sched/act_police.c1
-rw-r--r--net/sched/act_simple.c1
-rw-r--r--net/sched/cls_api.c1
-rw-r--r--net/sched/cls_basic.c1
-rw-r--r--net/sched/cls_fw.c1
-rw-r--r--net/sched/cls_route.c1
-rw-r--r--net/sched/cls_rsvp.h1
-rw-r--r--net/sched/cls_tcindex.c1
-rw-r--r--net/sched/cls_u32.c1
-rw-r--r--net/sched/em_cmp.c1
-rw-r--r--net/sched/em_meta.c1
-rw-r--r--net/sched/em_nbyte.c1
-rw-r--r--net/sched/em_text.c1
-rw-r--r--net/sched/em_u32.c1
-rw-r--r--net/sched/ematch.c1
-rw-r--r--net/sched/sch_api.c1
-rw-r--r--net/sched/sch_atm.c1
-rw-r--r--net/sched/sch_blackhole.c1
-rw-r--r--net/sched/sch_cbq.c1
-rw-r--r--net/sched/sch_dsmark.c1
-rw-r--r--net/sched/sch_fifo.c1
-rw-r--r--net/sched/sch_generic.c1
-rw-r--r--net/sched/sch_gred.c1
-rw-r--r--net/sched/sch_hfsc.c1
-rw-r--r--net/sched/sch_htb.c1
-rw-r--r--net/sched/sch_ingress.c1
-rw-r--r--net/sched/sch_netem.c1
-rw-r--r--net/sched/sch_prio.c1
-rw-r--r--net/sched/sch_red.c1
-rw-r--r--net/sched/sch_sfq.c1
-rw-r--r--net/sched/sch_tbf.c1
-rw-r--r--net/sctp/socket.c1
-rw-r--r--net/socket.c1
-rw-r--r--net/sunrpc/pmap_clnt.c1
-rw-r--r--net/sunrpc/rpc_pipe.c1
-rw-r--r--net/sunrpc/sunrpc_syms.c1
-rw-r--r--net/sunrpc/sysctl.c1
-rw-r--r--net/sysctl_net.c1
-rw-r--r--net/unix/af_unix.c1
-rw-r--r--net/wanrouter/af_wanpipe.c1
-rw-r--r--net/wanrouter/wanmain.c1
-rw-r--r--net/wanrouter/wanproc.c1
-rw-r--r--net/x25/af_x25.c1
-rw-r--r--net/x25/x25_dev.c1
-rw-r--r--net/x25/x25_proc.c1
-rw-r--r--net/x25/x25_route.c1
-rw-r--r--net/xfrm/xfrm_algo.c1
-rw-r--r--net/xfrm/xfrm_policy.c1
-rwxr-xr-xscripts/kernel-doc13
-rw-r--r--security/capability.c1
-rw-r--r--security/commoncap.c1
-rw-r--r--security/dummy.c1
-rw-r--r--security/inode.c1
-rw-r--r--security/root_plug.c1
-rw-r--r--security/seclvl.c1
-rw-r--r--security/security.c1
-rw-r--r--security/selinux/hooks.c1
-rw-r--r--security/selinux/selinuxfs.c1
-rw-r--r--security/selinux/ss/services.c48
-rw-r--r--security/selinux/xfrm.c1
-rw-r--r--sound/arm/aaci.c2
-rw-r--r--sound/arm/sa11xx-uda1341.c1
-rw-r--r--sound/core/memalloc.c1
-rw-r--r--sound/core/sgbuf.c1
-rw-r--r--sound/drivers/mpu401/mpu401.c2
-rw-r--r--sound/drivers/mtpav.c2
-rw-r--r--sound/drivers/serial-u16550.c2
-rw-r--r--sound/isa/ad1816a/ad1816a.c2
-rw-r--r--sound/isa/ad1816a/ad1816a_lib.c2
-rw-r--r--sound/isa/ad1848/ad1848_lib.c2
-rw-r--r--sound/isa/als100.c2
-rw-r--r--sound/isa/azt2320.c2
-rw-r--r--sound/isa/cs423x/cs4231.c2
-rw-r--r--sound/isa/cs423x/cs4231_lib.c2
-rw-r--r--sound/isa/cs423x/cs4236.c2
-rw-r--r--sound/isa/dt019x.c2
-rw-r--r--sound/isa/es1688/es1688.c2
-rw-r--r--sound/isa/es1688/es1688_lib.c2
-rw-r--r--sound/isa/es18xx.c2
-rw-r--r--sound/isa/gus/gus_main.c2
-rw-r--r--sound/isa/gus/gusextreme.c2
-rw-r--r--sound/isa/gus/gusmax.c2
-rw-r--r--sound/isa/gus/interwave.c2
-rw-r--r--sound/isa/opl3sa2.c2
-rw-r--r--sound/isa/opti9xx/miro.c2
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c4
-rw-r--r--sound/isa/sb/sb_common.c2
-rw-r--r--sound/isa/sgalaxy.c2
-rw-r--r--sound/isa/sscape.c2
-rw-r--r--sound/isa/wavefront/wavefront.c4
-rw-r--r--sound/mips/au1x00.c4
-rw-r--r--sound/oss/ad1816.c1
-rw-r--r--sound/oss/ad1848.c1
-rw-r--r--sound/oss/ad1889.c3
-rw-r--r--sound/oss/aedsp16.c1
-rw-r--r--sound/oss/ali5455.c2
-rw-r--r--sound/oss/au1000.c4
-rw-r--r--sound/oss/btaudio.c2
-rw-r--r--sound/oss/cmpci.c2
-rw-r--r--sound/oss/cs4232.c1
-rw-r--r--sound/oss/cs4281/cs4281m.c2
-rw-r--r--sound/oss/cs46xx.c2
-rw-r--r--sound/oss/dmabuf.c6
-rw-r--r--sound/oss/dmasound/dmasound.h1
-rw-r--r--sound/oss/dmasound/dmasound_awacs.c1
-rw-r--r--sound/oss/dmasound/dmasound_paula.c1
-rw-r--r--sound/oss/emu10k1/main.c2
-rw-r--r--sound/oss/es1370.c2
-rw-r--r--sound/oss/es1371.c2
-rw-r--r--sound/oss/esssolo1.c2
-rw-r--r--sound/oss/forte.c2
-rw-r--r--sound/oss/hal2.c2
-rw-r--r--sound/oss/i810_audio.c2
-rw-r--r--sound/oss/ite8172.c2
-rw-r--r--sound/oss/kahlua.c1
-rw-r--r--sound/oss/maestro.c2
-rw-r--r--sound/oss/maestro3.c2
-rw-r--r--sound/oss/msnd_classic.h1
-rw-r--r--sound/oss/msnd_pinnacle.c1
-rw-r--r--sound/oss/msnd_pinnacle.h1
-rw-r--r--sound/oss/nec_vrc5477.c2
-rw-r--r--sound/oss/nm256_audio.c2
-rw-r--r--sound/oss/opl3sa2.c1
-rw-r--r--sound/oss/pas2_card.c1
-rw-r--r--sound/oss/pss.c1
-rw-r--r--sound/oss/rme96xx.c2
-rw-r--r--sound/oss/sb_card.c1
-rw-r--r--sound/oss/sb_common.c3
-rw-r--r--sound/oss/sh_dac_audio.c3
-rw-r--r--sound/oss/sonicvibes.c2
-rw-r--r--sound/oss/sound_config.h1
-rw-r--r--sound/oss/soundcard.c1
-rw-r--r--sound/oss/trident.c3
-rw-r--r--sound/oss/via82cxxx_audio.c5
-rw-r--r--sound/oss/vidc.c1
-rw-r--r--sound/oss/waveartist.c1
-rw-r--r--sound/oss/wavfront.c2
-rw-r--r--sound/oss/wf_midi.c2
-rw-r--r--sound/oss/ymfpci.c2
-rw-r--r--sound/pci/ad1889.c2
-rw-r--r--sound/pci/ali5451/ali5451.c2
-rw-r--r--sound/pci/als300.c2
-rw-r--r--sound/pci/atiixp.c2
-rw-r--r--sound/pci/atiixp_modem.c2
-rw-r--r--sound/pci/au88x0/au88x0.c2
-rw-r--r--sound/pci/azt3328.c2
-rw-r--r--sound/pci/bt87x.c2
-rw-r--r--sound/pci/ca0106/ca0106_main.c2
-rw-r--r--sound/pci/cmipci.c2
-rw-r--r--sound/pci/cs4281.c2
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c2
-rw-r--r--sound/pci/cs5535audio/cs5535audio.c2
-rw-r--r--sound/pci/echoaudio/echoaudio.c2
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c2
-rw-r--r--sound/pci/emu10k1/emu10k1x.c2
-rw-r--r--sound/pci/ens1370.c2
-rw-r--r--sound/pci/es1938.c4
-rw-r--r--sound/pci/es1968.c2
-rw-r--r--sound/pci/fm801.c2
-rw-r--r--sound/pci/hda/hda_intel.c2
-rw-r--r--sound/pci/ice1712/ice1712.c2
-rw-r--r--sound/pci/ice1712/ice1724.c2
-rw-r--r--sound/pci/intel8x0.c4
-rw-r--r--sound/pci/intel8x0m.c2
-rw-r--r--sound/pci/korg1212/korg1212.c2
-rw-r--r--sound/pci/maestro3.c2
-rw-r--r--sound/pci/mixart/mixart.c2
-rw-r--r--sound/pci/nm256/nm256.c2
-rw-r--r--sound/pci/pcxhr/pcxhr.c2
-rw-r--r--sound/pci/riptide/riptide.c2
-rw-r--r--sound/pci/rme32.c2
-rw-r--r--sound/pci/rme96.c2
-rw-r--r--sound/pci/rme9652/hdsp.c2
-rw-r--r--sound/pci/rme9652/hdspm.c2
-rw-r--r--sound/pci/rme9652/rme9652.c2
-rw-r--r--sound/pci/sonicvibes.c2
-rw-r--r--sound/pci/trident/trident_main.c2
-rw-r--r--sound/pci/via82xx.c2
-rw-r--r--sound/pci/via82xx_modem.c2
-rw-r--r--sound/pci/vx222/vx222.c2
-rw-r--r--sound/pci/ymfpci/ymfpci_main.c2
-rw-r--r--sound/ppc/pmac.c2
-rw-r--r--sound/sound_core.c1
-rw-r--r--sound/sparc/amd7930.c2
-rw-r--r--sound/sparc/cs4231.c3
-rw-r--r--sound/sparc/dbri.c4
3809 files changed, 14793 insertions, 12322 deletions
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index 6e463d0db26..999afe1ca8c 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -189,9 +189,9 @@ static unsigned long baseaddr;
189 <sect1> 189 <sect1>
190 <title>Partition defines</title> 190 <title>Partition defines</title>
191 <para> 191 <para>
192 If you want to divide your device into parititions, then 192 If you want to divide your device into partitions, then
193 enable the configuration switch CONFIG_MTD_PARITIONS and define 193 enable the configuration switch CONFIG_MTD_PARTITIONS and define
194 a paritioning scheme suitable to your board. 194 a partitioning scheme suitable to your board.
195 </para> 195 </para>
196 <programlisting> 196 <programlisting>
197#define NUM_PARTITIONS 2 197#define NUM_PARTITIONS 2
diff --git a/Documentation/DocBook/videobook.tmpl b/Documentation/DocBook/videobook.tmpl
index fdff984a516..b629da33951 100644
--- a/Documentation/DocBook/videobook.tmpl
+++ b/Documentation/DocBook/videobook.tmpl
@@ -976,7 +976,7 @@ static int camera_close(struct video_device *dev)
976 <title>Interrupt Handling</title> 976 <title>Interrupt Handling</title>
977 <para> 977 <para>
978 Our example handler is for an ISA bus device. If it was PCI you would be 978 Our example handler is for an ISA bus device. If it was PCI you would be
979 able to share the interrupt and would have set SA_SHIRQ to indicate a 979 able to share the interrupt and would have set IRQF_SHARED to indicate a
980 shared IRQ. We pass the device pointer as the interrupt routine argument. We 980 shared IRQ. We pass the device pointer as the interrupt routine argument. We
981 don't need to since we only support one card but doing this will make it 981 don't need to since we only support one card but doing this will make it
982 easier to upgrade the driver for multiple devices in the future. 982 easier to upgrade the driver for multiple devices in the future.
diff --git a/Documentation/arm/IXP4xx b/Documentation/arm/IXP4xx
index d4c6d3aa0c2..43edb4ecf27 100644
--- a/Documentation/arm/IXP4xx
+++ b/Documentation/arm/IXP4xx
@@ -85,7 +85,7 @@ IXP4xx provides two methods of accessing PCI memory space:
852) If > 64MB of memory space is required, the IXP4xx can be 852) If > 64MB of memory space is required, the IXP4xx can be
86 configured to use indirect registers to access PCI This allows 86 configured to use indirect registers to access PCI This allows
87 for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus. 87 for up to 128MB (0x48000000 to 0x4fffffff) of memory on the bus.
88 The disadvantadge of this is that every PCI access requires 88 The disadvantage of this is that every PCI access requires
89 three local register accesses plus a spinlock, but in some 89 three local register accesses plus a spinlock, but in some
90 cases the performance hit is acceptable. In addition, you cannot 90 cases the performance hit is acceptable. In addition, you cannot
91 mmap() PCI devices in this case due to the indirect nature 91 mmap() PCI devices in this case due to the indirect nature
diff --git a/Documentation/digiepca.txt b/Documentation/digiepca.txt
index 88820fe38da..f2560e22f2c 100644
--- a/Documentation/digiepca.txt
+++ b/Documentation/digiepca.txt
@@ -2,7 +2,7 @@ NOTE: This driver is obsolete. Digi provides a 2.6 driver (dgdm) at
2http://www.digi.com for PCI cards. They no longer maintain this driver, 2http://www.digi.com for PCI cards. They no longer maintain this driver,
3and have no 2.6 driver for ISA cards. 3and have no 2.6 driver for ISA cards.
4 4
5This driver requires a number of user-space tools. They can be aquired from 5This driver requires a number of user-space tools. They can be acquired from
6http://www.digi.com, but only works with 2.4 kernels. 6http://www.digi.com, but only works with 2.4 kernels.
7 7
8 8
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 1cbbb8e2899..99f219a01e0 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -257,3 +257,12 @@ Why: Code does no longer build since at least 2.6.0, apparently there is
257Who: Ralf Baechle <ralf@linux-mips.org> 257Who: Ralf Baechle <ralf@linux-mips.org>
258 258
259--------------------------- 259---------------------------
260
261What: Interrupt only SA_* flags
262When: Januar 2007
263Why: The interrupt related SA_* flags are replaced by IRQF_* to move them
264 out of the signal namespace.
265
266Who: Thomas Gleixner <tglx@linutronix.de>
267
268---------------------------
diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt
index cf0d5416a4c..28d1bc3edb1 100644
--- a/Documentation/memory-barriers.txt
+++ b/Documentation/memory-barriers.txt
@@ -602,7 +602,7 @@ Consider the following sequence of events:
602 602
603This sequence of events is committed to the memory coherence system in an order 603This sequence of events is committed to the memory coherence system in an order
604that the rest of the system might perceive as the unordered set of { STORE A, 604that the rest of the system might perceive as the unordered set of { STORE A,
605STORE B, STORE C } all occuring before the unordered set of { STORE D, STORE E 605STORE B, STORE C } all occurring before the unordered set of { STORE D, STORE E
606}: 606}:
607 607
608 +-------+ : : 608 +-------+ : :
diff --git a/Documentation/networking/pktgen.txt b/Documentation/networking/pktgen.txt
index 278771c9ad9..44f2f769e86 100644
--- a/Documentation/networking/pktgen.txt
+++ b/Documentation/networking/pktgen.txt
@@ -74,7 +74,7 @@ Examples:
74 pgset "pkt_size 9014" sets packet size to 9014 74 pgset "pkt_size 9014" sets packet size to 9014
75 pgset "frags 5" packet will consist of 5 fragments 75 pgset "frags 5" packet will consist of 5 fragments
76 pgset "count 200000" sets number of packets to send, set to zero 76 pgset "count 200000" sets number of packets to send, set to zero
77 for continious sends untill explicitl stopped. 77 for continuous sends until explicitly stopped.
78 78
79 pgset "delay 5000" adds delay to hard_start_xmit(). nanoseconds 79 pgset "delay 5000" adds delay to hard_start_xmit(). nanoseconds
80 80
diff --git a/Documentation/pci.txt b/Documentation/pci.txt
index 3242e5c1ee9..2b395e47896 100644
--- a/Documentation/pci.txt
+++ b/Documentation/pci.txt
@@ -225,7 +225,7 @@ Generic flavors of pci_request_region() are request_mem_region()
225Use these for address resources that are not described by "normal" PCI 225Use these for address resources that are not described by "normal" PCI
226interfaces (e.g. BAR). 226interfaces (e.g. BAR).
227 227
228 All interrupt handlers should be registered with SA_SHIRQ and use the devid 228 All interrupt handlers should be registered with IRQF_SHARED and use the devid
229to map IRQs to devices (remember that all PCI interrupts are shared). 229to map IRQs to devices (remember that all PCI interrupts are shared).
230 230
231 231
diff --git a/Documentation/pcmcia/crc32hash.c b/Documentation/pcmcia/crc32hash.c
new file mode 100644
index 00000000000..cbc36d299af
--- /dev/null
+++ b/Documentation/pcmcia/crc32hash.c
@@ -0,0 +1,32 @@
1/* crc32hash.c - derived from linux/lib/crc32.c, GNU GPL v2 */
2/* Usage example:
3$ ./crc32hash "Dual Speed"
4*/
5
6#include <string.h>
7#include <stdio.h>
8#include <ctype.h>
9#include <stdlib.h>
10
11unsigned int crc32(unsigned char const *p, unsigned int len)
12{
13 int i;
14 unsigned int crc = 0;
15 while (len--) {
16 crc ^= *p++;
17 for (i = 0; i < 8; i++)
18 crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
19 }
20 return crc;
21}
22
23int main(int argc, char **argv) {
24 unsigned int result;
25 if (argc != 2) {
26 printf("no string passed as argument\n");
27 return -1;
28 }
29 result = crc32(argv[1], strlen(argv[1]));
30 printf("0x%x\n", result);
31 return 0;
32}
diff --git a/Documentation/pcmcia/devicetable.txt b/Documentation/pcmcia/devicetable.txt
index 3351c035514..199afd100cf 100644
--- a/Documentation/pcmcia/devicetable.txt
+++ b/Documentation/pcmcia/devicetable.txt
@@ -27,37 +27,7 @@ pcmcia:m0149cC1ABf06pfn00fn00pa725B842DpbF1EFEE84pc0877B627pd00000000
27The hex value after "pa" is the hash of product ID string 1, after "pb" for 27The hex value after "pa" is the hash of product ID string 1, after "pb" for
28string 2 and so on. 28string 2 and so on.
29 29
30Alternatively, you can use this small tool to determine the crc32 hash. 30Alternatively, you can use crc32hash (see Documentation/pcmcia/crc32hash.c)
31simply pass the string you want to evaluate as argument to this program, 31to determine the crc32 hash. Simply pass the string you want to evaluate
32e.g. 32as argument to this program, e.g.:
33$ ./crc32hash "Dual Speed" 33$ ./crc32hash "Dual Speed"
34
35-------------------------------------------------------------------------
36/* crc32hash.c - derived from linux/lib/crc32.c, GNU GPL v2 */
37#include <string.h>
38#include <stdio.h>
39#include <ctype.h>
40#include <stdlib.h>
41
42unsigned int crc32(unsigned char const *p, unsigned int len)
43{
44 int i;
45 unsigned int crc = 0;
46 while (len--) {
47 crc ^= *p++;
48 for (i = 0; i < 8; i++)
49 crc = (crc >> 1) ^ ((crc & 1) ? 0xedb88320 : 0);
50 }
51 return crc;
52}
53
54int main(int argc, char **argv) {
55 unsigned int result;
56 if (argc != 2) {
57 printf("no string passed as argument\n");
58 return -1;
59 }
60 result = crc32(argv[1], strlen(argv[1]));
61 printf("0x%x\n", result);
62 return 0;
63}
diff --git a/Documentation/scsi/tmscsim.txt b/Documentation/scsi/tmscsim.txt
index e165229adf5..df7a02bfb5b 100644
--- a/Documentation/scsi/tmscsim.txt
+++ b/Documentation/scsi/tmscsim.txt
@@ -109,7 +109,7 @@ than the 33.33 MHz being in the PCI spec.
109 109
110If you want to share the IRQ with another device and the driver refuses to 110If you want to share the IRQ with another device and the driver refuses to
111do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to 111do so, you might succeed with changing the DC390_IRQ type in tmscsim.c to
112SA_SHIRQ | SA_INTERRUPT. 112IRQF_SHARED | IRQF_DISABLED.
113 113
114 114
1153.Features 1153.Features
diff --git a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
index 635cbb94357..69866d5997a 100644
--- a/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
+++ b/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
@@ -1149,7 +1149,7 @@
1149 } 1149 }
1150 chip->port = pci_resource_start(pci, 0); 1150 chip->port = pci_resource_start(pci, 0);
1151 if (request_irq(pci->irq, snd_mychip_interrupt, 1151 if (request_irq(pci->irq, snd_mychip_interrupt,
1152 SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { 1152 IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) {
1153 printk(KERN_ERR "cannot grab irq %d\n", pci->irq); 1153 printk(KERN_ERR "cannot grab irq %d\n", pci->irq);
1154 snd_mychip_free(chip); 1154 snd_mychip_free(chip);
1155 return -EBUSY; 1155 return -EBUSY;
@@ -1323,7 +1323,7 @@
1323 <programlisting> 1323 <programlisting>
1324<![CDATA[ 1324<![CDATA[
1325 if (request_irq(pci->irq, snd_mychip_interrupt, 1325 if (request_irq(pci->irq, snd_mychip_interrupt,
1326 SA_INTERRUPT|SA_SHIRQ, "My Chip", chip)) { 1326 IRQF_DISABLED|IRQF_SHARED, "My Chip", chip)) {
1327 printk(KERN_ERR "cannot grab irq %d\n", pci->irq); 1327 printk(KERN_ERR "cannot grab irq %d\n", pci->irq);
1328 snd_mychip_free(chip); 1328 snd_mychip_free(chip);
1329 return -EBUSY; 1329 return -EBUSY;
@@ -1342,7 +1342,7 @@
1342 1342
1343 <para> 1343 <para>
1344 On the PCI bus, the interrupts can be shared. Thus, 1344 On the PCI bus, the interrupts can be shared. Thus,
1345 <constant>SA_SHIRQ</constant> is given as the interrupt flag of 1345 <constant>IRQF_SHARED</constant> is given as the interrupt flag of
1346 <function>request_irq()</function>. 1346 <function>request_irq()</function>.
1347 </para> 1347 </para>
1348 1348
@@ -3048,7 +3048,7 @@ struct _snd_pcm_runtime {
3048 </para> 3048 </para>
3049 3049
3050 <para> 3050 <para>
3051 If you aquire a spinlock in the interrupt handler, and the 3051 If you acquire a spinlock in the interrupt handler, and the
3052 lock is used in other pcm callbacks, too, then you have to 3052 lock is used in other pcm callbacks, too, then you have to
3053 release the lock before calling 3053 release the lock before calling
3054 <function>snd_pcm_period_elapsed()</function>, because 3054 <function>snd_pcm_period_elapsed()</function>, because
diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index 6cb63ddf616..00d9a1f2a54 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -50,3 +50,4 @@
50 49 -> PixelView PlayTV P7000 [1554:4813] 50 49 -> PixelView PlayTV P7000 [1554:4813]
51 50 -> NPG Tech Real TV FM Top 10 [14f1:0842] 51 50 -> NPG Tech Real TV FM Top 10 [14f1:0842]
52 51 -> WinFast DTV2000 H [107d:665e] 52 51 -> WinFast DTV2000 H [107d:665e]
53 52 -> Geniatech DVB-S [14f1:0084]
diff --git a/MAINTAINERS b/MAINTAINERS
index 7e5a7ff2a86..42be131139c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2555,13 +2555,6 @@ M: thomas@winischhofer.net
2555W: http://www.winischhofer.at/linuxsisusbvga.shtml 2555W: http://www.winischhofer.at/linuxsisusbvga.shtml
2556S: Maintained 2556S: Maintained
2557 2557
2558SMB FILESYSTEM
2559P: Urban Widmark
2560M: urban@teststation.com
2561W: http://samba.org/
2562L: samba@samba.org
2563S: Maintained
2564
2565SMC91x ETHERNET DRIVER 2558SMC91x ETHERNET DRIVER
2566P: Nicolas Pitre 2559P: Nicolas Pitre
2567M: nico@cam.org 2560M: nico@cam.org
diff --git a/arch/alpha/kernel/alpha_ksyms.c b/arch/alpha/kernel/alpha_ksyms.c
index d3848c5b0d2..425643762bf 100644
--- a/arch/alpha/kernel/alpha_ksyms.c
+++ b/arch/alpha/kernel/alpha_ksyms.c
@@ -5,7 +5,6 @@
5 * modules. 5 * modules.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/string.h> 9#include <linux/string.h>
11#include <linux/user.h> 10#include <linux/user.h>
diff --git a/arch/alpha/kernel/console.c b/arch/alpha/kernel/console.c
index cb3e739fbad..f313b34939b 100644
--- a/arch/alpha/kernel/console.c
+++ b/arch/alpha/kernel/console.c
@@ -5,7 +5,6 @@
5 * non-0 I/O hose 5 * non-0 I/O hose
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/pci.h> 8#include <linux/pci.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/tty.h> 10#include <linux/tty.h>
diff --git a/arch/alpha/kernel/entry.S b/arch/alpha/kernel/entry.S
index 7af15bf7e5a..01ecd09d4a6 100644
--- a/arch/alpha/kernel/entry.S
+++ b/arch/alpha/kernel/entry.S
@@ -4,7 +4,6 @@
4 * Kernel entry-points. 4 * Kernel entry-points.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/asm-offsets.h> 7#include <asm/asm-offsets.h>
9#include <asm/thread_info.h> 8#include <asm/thread_info.h>
10#include <asm/pal.h> 9#include <asm/pal.h>
diff --git a/arch/alpha/kernel/gct.c b/arch/alpha/kernel/gct.c
index 8827687b9f8..c0c7155448e 100644
--- a/arch/alpha/kernel/gct.c
+++ b/arch/alpha/kernel/gct.c
@@ -2,7 +2,6 @@
2 * linux/arch/alpha/kernel/gct.c 2 * linux/arch/alpha/kernel/gct.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7#include <linux/types.h> 6#include <linux/types.h>
8#include <linux/errno.h> 7#include <linux/errno.h>
diff --git a/arch/alpha/kernel/head.S b/arch/alpha/kernel/head.S
index 0905721fcbc..1e2a62a1f75 100644
--- a/arch/alpha/kernel/head.S
+++ b/arch/alpha/kernel/head.S
@@ -7,7 +7,6 @@
7 * the kernel global pointer and jump to the kernel entry-point. 7 * the kernel global pointer and jump to the kernel entry-point.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <asm/system.h> 10#include <asm/system.h>
12#include <asm/asm-offsets.h> 11#include <asm/asm-offsets.h>
13 12
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index 63af36cf7f6..729c475d226 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -10,7 +10,6 @@
10 * should be easier. 10 * should be easier.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
@@ -95,12 +94,12 @@ show_interrupts(struct seq_file *p, void *v)
95#endif 94#endif
96 seq_printf(p, " %14s", irq_desc[irq].chip->typename); 95 seq_printf(p, " %14s", irq_desc[irq].chip->typename);
97 seq_printf(p, " %c%s", 96 seq_printf(p, " %c%s",
98 (action->flags & SA_INTERRUPT)?'+':' ', 97 (action->flags & IRQF_DISABLED)?'+':' ',
99 action->name); 98 action->name);
100 99
101 for (action=action->next; action; action = action->next) { 100 for (action=action->next; action; action = action->next) {
102 seq_printf(p, ", %c%s", 101 seq_printf(p, ", %c%s",
103 (action->flags & SA_INTERRUPT)?'+':' ', 102 (action->flags & IRQF_DISABLED)?'+':' ',
104 action->name); 103 action->name);
105 } 104 }
106 105
diff --git a/arch/alpha/kernel/irq_alpha.c b/arch/alpha/kernel/irq_alpha.c
index f20f2dff9c4..ddf5cf8dcb0 100644
--- a/arch/alpha/kernel/irq_alpha.c
+++ b/arch/alpha/kernel/irq_alpha.c
@@ -2,7 +2,6 @@
2 * Alpha specific irq code. 2 * Alpha specific irq code.
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/init.h> 5#include <linux/init.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
8#include <linux/irq.h> 7#include <linux/irq.h>
@@ -215,7 +214,7 @@ static unsigned int rtc_startup(unsigned int irq) { return 0; }
215 214
216struct irqaction timer_irqaction = { 215struct irqaction timer_irqaction = {
217 .handler = timer_interrupt, 216 .handler = timer_interrupt,
218 .flags = SA_INTERRUPT, 217 .flags = IRQF_DISABLED,
219 .name = "timer", 218 .name = "timer",
220}; 219};
221 220
diff --git a/arch/alpha/kernel/irq_i8259.c b/arch/alpha/kernel/irq_i8259.c
index ac893bd4803..ebbadbc0c36 100644
--- a/arch/alpha/kernel/irq_i8259.c
+++ b/arch/alpha/kernel/irq_i8259.c
@@ -7,7 +7,6 @@
7 * Started hacking from linux-2.3.30pre6/arch/i386/kernel/i8259.c. 7 * Started hacking from linux-2.3.30pre6/arch/i386/kernel/i8259.c.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/cache.h> 11#include <linux/cache.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
diff --git a/arch/alpha/kernel/machvec_impl.h b/arch/alpha/kernel/machvec_impl.h
index 11f996f24fd..08b8302e64c 100644
--- a/arch/alpha/kernel/machvec_impl.h
+++ b/arch/alpha/kernel/machvec_impl.h
@@ -6,7 +6,6 @@
6 * This file has goodies to help simplify instantiation of machine vectors. 6 * This file has goodies to help simplify instantiation of machine vectors.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <asm/pgalloc.h> 9#include <asm/pgalloc.h>
11 10
12/* Whee. These systems don't have an HAE: 11/* Whee. These systems don't have an HAE:
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
index 4ea6711e55a..ffb7d5423cc 100644
--- a/arch/alpha/kernel/pci.c
+++ b/arch/alpha/kernel/pci.c
@@ -12,7 +12,6 @@
12 * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru> 12 * Nov 2000, Ivan Kokshaysky <ink@jurassic.park.msu.ru>
13 * PCI-PCI bridges cleanup 13 * PCI-PCI bridges cleanup
14 */ 14 */
15#include <linux/config.h>
16#include <linux/string.h> 15#include <linux/string.h>
17#include <linux/pci.h> 16#include <linux/pci.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/alpha/kernel/process.c b/arch/alpha/kernel/process.c
index c760a831fd1..01c8c8b2333 100644
--- a/arch/alpha/kernel/process.c
+++ b/arch/alpha/kernel/process.c
@@ -8,7 +8,6 @@
8 * This file handles the architecture-dependent parts of process handling. 8 * This file handles the architecture-dependent parts of process handling.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h
index e1560fb1561..2a6e3da8144 100644
--- a/arch/alpha/kernel/proto.h
+++ b/arch/alpha/kernel/proto.h
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/interrupt.h> 1#include <linux/interrupt.h>
3 2
4 3
diff --git a/arch/alpha/kernel/smc37c93x.c b/arch/alpha/kernel/smc37c93x.c
index 421e51ea6bb..2636cc028d0 100644
--- a/arch/alpha/kernel/smc37c93x.c
+++ b/arch/alpha/kernel/smc37c93x.c
@@ -2,7 +2,6 @@
2 * SMC 37C93X initialization code 2 * SMC 37C93X initialization code
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7 6
8#include <linux/slab.h> 7#include <linux/slab.h>
diff --git a/arch/alpha/kernel/srm_env.c b/arch/alpha/kernel/srm_env.c
index 5c98fc83e23..990ac61028f 100644
--- a/arch/alpha/kernel/srm_env.c
+++ b/arch/alpha/kernel/srm_env.c
@@ -57,7 +57,6 @@
57 */ 57 */
58 58
59#include <linux/kernel.h> 59#include <linux/kernel.h>
60#include <linux/config.h>
61#include <linux/module.h> 60#include <linux/module.h>
62#include <linux/init.h> 61#include <linux/init.h>
63#include <linux/proc_fs.h> 62#include <linux/proc_fs.h>
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c
index 3b30d4f1fc4..9d7dff27f81 100644
--- a/arch/alpha/kernel/srmcons.c
+++ b/arch/alpha/kernel/srmcons.c
@@ -5,7 +5,6 @@
5 * (TTY driver and console driver) 5 * (TTY driver and console driver)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/console.h> 10#include <linux/console.h>
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c
index 1a1a2c7a3d9..d6926b7b1e9 100644
--- a/arch/alpha/kernel/sys_alcor.c
+++ b/arch/alpha/kernel/sys_alcor.c
@@ -8,7 +8,6 @@
8 * Code supporting the ALCOR and XLT (XL-300/366/433). 8 * Code supporting the ALCOR and XLT (XL-300/366/433).
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c
index 8c9e443d93a..25a215067da 100644
--- a/arch/alpha/kernel/sys_cabriolet.c
+++ b/arch/alpha/kernel/sys_cabriolet.c
@@ -9,7 +9,6 @@
9 * PC164 and LX164. 9 * PC164 and LX164.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c
index b28c8f1c6e1..dd6103b867e 100644
--- a/arch/alpha/kernel/sys_dp264.c
+++ b/arch/alpha/kernel/sys_dp264.c
@@ -12,7 +12,6 @@
12 * Code supporting the DP264 (EV6+TSUNAMI). 12 * Code supporting the DP264 (EV6+TSUNAMI).
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c
index aeb8e027790..ed108b66ec0 100644
--- a/arch/alpha/kernel/sys_eb64p.c
+++ b/arch/alpha/kernel/sys_eb64p.c
@@ -8,7 +8,6 @@
8 * Code supporting the EB64+ and EB66. 8 * Code supporting the EB64+ and EB66.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_jensen.c b/arch/alpha/kernel/sys_jensen.c
index 0148e095638..4ac2b328b8d 100644
--- a/arch/alpha/kernel/sys_jensen.c
+++ b/arch/alpha/kernel/sys_jensen.c
@@ -74,7 +74,7 @@ jensen_local_startup(unsigned int irq)
74 * the IPL from being dropped during handler processing. 74 * the IPL from being dropped during handler processing.
75 */ 75 */
76 if (irq_desc[irq].action) 76 if (irq_desc[irq].action)
77 irq_desc[irq].action->flags |= SA_INTERRUPT; 77 irq_desc[irq].action->flags |= IRQF_DISABLED;
78 return 0; 78 return 0;
79} 79}
80 80
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c
index b741600e376..cc4c5811136 100644
--- a/arch/alpha/kernel/sys_mikasa.c
+++ b/arch/alpha/kernel/sys_mikasa.c
@@ -8,7 +8,6 @@
8 * Code supporting the MIKASA (AlphaServer 1000). 8 * Code supporting the MIKASA (AlphaServer 1000).
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c
index 55db02d318d..2d3cff7e8c5 100644
--- a/arch/alpha/kernel/sys_noritake.c
+++ b/arch/alpha/kernel/sys_noritake.c
@@ -9,7 +9,6 @@
9 * CORELLE (AlphaServer 800), and ALCOR Primo (AlphaStation 600A). 9 * CORELLE (AlphaServer 800), and ALCOR Primo (AlphaStation 600A).
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c
index 24dea40c9bf..a7a14647b50 100644
--- a/arch/alpha/kernel/sys_sable.c
+++ b/arch/alpha/kernel/sys_sable.c
@@ -8,7 +8,6 @@
8 * Code supporting the Sable, Sable-Gamma, and Lynx systems. 8 * Code supporting the Sable, Sable-Gamma, and Lynx systems.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c
index 131a2d9f79d..cd85ef725e0 100644
--- a/arch/alpha/kernel/sys_sio.c
+++ b/arch/alpha/kernel/sys_sio.c
@@ -10,7 +10,6 @@
10 * Kenetics's Platform 2000, Avanti (AlphaStation), XL, and AlphaBook1. 10 * Kenetics's Platform 2000, Avanti (AlphaStation), XL, and AlphaBook1.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c
index 13f3ed8ed7a..302aab38d95 100644
--- a/arch/alpha/kernel/sys_titan.c
+++ b/arch/alpha/kernel/sys_titan.c
@@ -12,7 +12,6 @@
12 * Granite 12 * Granite
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
@@ -280,15 +279,15 @@ titan_late_init(void)
280 * all reported to the kernel as machine checks, so the handler 279 * all reported to the kernel as machine checks, so the handler
281 * is a nop so it can be called to count the individual events. 280 * is a nop so it can be called to count the individual events.
282 */ 281 */
283 request_irq(63+16, titan_intr_nop, SA_INTERRUPT, 282 request_irq(63+16, titan_intr_nop, IRQF_DISABLED,
284 "CChip Error", NULL); 283 "CChip Error", NULL);
285 request_irq(62+16, titan_intr_nop, SA_INTERRUPT, 284 request_irq(62+16, titan_intr_nop, IRQF_DISABLED,
286 "PChip 0 H_Error", NULL); 285 "PChip 0 H_Error", NULL);
287 request_irq(61+16, titan_intr_nop, SA_INTERRUPT, 286 request_irq(61+16, titan_intr_nop, IRQF_DISABLED,
288 "PChip 1 H_Error", NULL); 287 "PChip 1 H_Error", NULL);
289 request_irq(60+16, titan_intr_nop, SA_INTERRUPT, 288 request_irq(60+16, titan_intr_nop, IRQF_DISABLED,
290 "PChip 0 C_Error", NULL); 289 "PChip 0 C_Error", NULL);
291 request_irq(59+16, titan_intr_nop, SA_INTERRUPT, 290 request_irq(59+16, titan_intr_nop, IRQF_DISABLED,
292 "PChip 1 C_Error", NULL); 291 "PChip 1 C_Error", NULL);
293 292
294 /* 293 /*
@@ -349,9 +348,9 @@ privateer_init_pci(void)
349 * Hook a couple of extra err interrupts that the 348 * Hook a couple of extra err interrupts that the
350 * common titan code won't. 349 * common titan code won't.
351 */ 350 */
352 request_irq(53+16, titan_intr_nop, SA_INTERRUPT, 351 request_irq(53+16, titan_intr_nop, IRQF_DISABLED,
353 "NMI", NULL); 352 "NMI", NULL);
354 request_irq(50+16, titan_intr_nop, SA_INTERRUPT, 353 request_irq(50+16, titan_intr_nop, IRQF_DISABLED,
355 "Temperature Warning", NULL); 354 "Temperature Warning", NULL);
356 355
357 /* 356 /*
diff --git a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
index 3859749810b..50eccde2dcd 100644
--- a/arch/alpha/kernel/time.c
+++ b/arch/alpha/kernel/time.c
@@ -27,7 +27,6 @@
27 * 2003-06-03 R. Scott Bailey <scott.bailey@eds.com> 27 * 2003-06-03 R. Scott Bailey <scott.bailey@eds.com>
28 * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM 28 * Tighten sanity in time_init from 1% (10,000 PPM) to 250 PPM
29 */ 29 */
30#include <linux/config.h>
31#include <linux/errno.h> 30#include <linux/errno.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/sched.h> 32#include <linux/sched.h>
diff --git a/arch/alpha/kernel/traps.c b/arch/alpha/kernel/traps.c
index f9d12319e0f..d6e665d567b 100644
--- a/arch/alpha/kernel/traps.c
+++ b/arch/alpha/kernel/traps.c
@@ -8,7 +8,6 @@
8 * This file initializes the trap entry points 8 * This file initializes the trap entry points
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/tty.h> 13#include <linux/tty.h>
diff --git a/arch/alpha/kernel/vmlinux.lds.S b/arch/alpha/kernel/vmlinux.lds.S
index 0922e0785dd..71470e9d93b 100644
--- a/arch/alpha/kernel/vmlinux.lds.S
+++ b/arch/alpha/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <asm-generic/vmlinux.lds.h> 1#include <asm-generic/vmlinux.lds.h>
3 2
4OUTPUT_FORMAT("elf64-alpha") 3OUTPUT_FORMAT("elf64-alpha")
diff --git a/arch/alpha/lib/callback_srm.S b/arch/alpha/lib/callback_srm.S
index 0528acd0d9a..8804bec2c64 100644
--- a/arch/alpha/lib/callback_srm.S
+++ b/arch/alpha/lib/callback_srm.S
@@ -2,7 +2,6 @@
2 * arch/alpha/lib/callback_srm.S 2 * arch/alpha/lib/callback_srm.S
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <asm/console.h> 5#include <asm/console.h>
7 6
8.text 7.text
diff --git a/arch/alpha/lib/udelay.c b/arch/alpha/lib/udelay.c
index 1c879bbce41..69d52aa37ba 100644
--- a/arch/alpha/lib/udelay.c
+++ b/arch/alpha/lib/udelay.c
@@ -4,7 +4,6 @@
4 * Delay routines, using a pre-computed "loops_per_jiffy" value. 4 * Delay routines, using a pre-computed "loops_per_jiffy" value.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/sched.h> /* for udelay's use of smp_processor_id */ 8#include <linux/sched.h> /* for udelay's use of smp_processor_id */
10#include <asm/param.h> 9#include <asm/param.h>
diff --git a/arch/alpha/mm/extable.c b/arch/alpha/mm/extable.c
index c3849baebd5..dc7aeda1577 100644
--- a/arch/alpha/mm/extable.c
+++ b/arch/alpha/mm/extable.c
@@ -2,7 +2,6 @@
2 * linux/arch/alpha/mm/extable.c 2 * linux/arch/alpha/mm/extable.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <asm/uaccess.h> 6#include <asm/uaccess.h>
8 7
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 64ace5a9cd3..622dabd8468 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1995 Linus Torvalds 4 * Copyright (C) 1995 Linus Torvalds
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index 544ac5dc09e..917dad1b74c 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -6,7 +6,6 @@
6 6
7/* 2.3.x zone allocator, 1999 Andrea Arcangeli <andrea@suse.de> */ 7/* 2.3.x zone allocator, 1999 Andrea Arcangeli <andrea@suse.de> */
8 8
9#include <linux/config.h>
10#include <linux/pagemap.h> 9#include <linux/pagemap.h>
11#include <linux/signal.h> 10#include <linux/signal.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index bf6b65c81be..b826f58c6e7 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE 6 * Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index f123c7c9fc9..f81a62380ad 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -47,6 +47,18 @@ config MCA
47 <file:Documentation/mca.txt> (and especially the web page given 47 <file:Documentation/mca.txt> (and especially the web page given
48 there) before attempting to build an MCA bus kernel. 48 there) before attempting to build an MCA bus kernel.
49 49
50config GENERIC_HARDIRQS
51 bool
52 default y
53
54config HARDIRQS_SW_RESEND
55 bool
56 default y
57
58config GENERIC_IRQ_PROBE
59 bool
60 default y
61
50config RWSEM_GENERIC_SPINLOCK 62config RWSEM_GENERIC_SPINLOCK
51 bool 63 bool
52 default y 64 default y
@@ -121,11 +133,11 @@ config ARCH_VERSATILE
121 help 133 help
122 This enables support for ARM Ltd Versatile board. 134 This enables support for ARM Ltd Versatile board.
123 135
124config ARCH_AT91RM9200 136config ARCH_AT91
125 bool "Atmel AT91RM9200" 137 bool "Atmel AT91"
126 help 138 help
127 Say Y here if you intend to run this kernel on an Atmel 139 This enables support for systems based on the Atmel AT91RM9200
128 AT91RM9200-based board. 140 and AT91SAM9xxx processors.
129 141
130config ARCH_CLPS7500 142config ARCH_CLPS7500
131 bool "Cirrus CL-PS7500FE" 143 bool "Cirrus CL-PS7500FE"
@@ -547,7 +559,7 @@ config LEDS
547 ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \ 559 ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_NETWINDER || \
548 ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \ 560 ARCH_OMAP || ARCH_P720T || ARCH_PXA_IDP || \
549 ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \ 561 ARCH_SA1100 || ARCH_SHARK || ARCH_VERSATILE || \
550 ARCH_AT91RM9200 562 ARCH_AT91RM9200 || MACH_TRIZEPS4
551 help 563 help
552 If you say Y here, the LEDs on your machine will be used 564 If you say Y here, the LEDs on your machine will be used
553 to provide useful information about your current system status. 565 to provide useful information about your current system status.
@@ -678,7 +690,7 @@ config XIP_PHYS_ADDR
678 690
679endmenu 691endmenu
680 692
681if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP1) 693if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP)
682 694
683menu "CPU Frequency scaling" 695menu "CPU Frequency scaling"
684 696
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index a3bbaaf480b..3345c6d0fd1 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -114,7 +114,7 @@ endif
114 machine-$(CONFIG_ARCH_H720X) := h720x 114 machine-$(CONFIG_ARCH_H720X) := h720x
115 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 115 machine-$(CONFIG_ARCH_AAEC2000) := aaec2000
116 machine-$(CONFIG_ARCH_REALVIEW) := realview 116 machine-$(CONFIG_ARCH_REALVIEW) := realview
117 machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200 117 machine-$(CONFIG_ARCH_AT91) := at91rm9200
118 machine-$(CONFIG_ARCH_EP93XX) := ep93xx 118 machine-$(CONFIG_ARCH_EP93XX) := ep93xx
119 machine-$(CONFIG_ARCH_PNX4008) := pnx4008 119 machine-$(CONFIG_ARCH_PNX4008) := pnx4008
120 machine-$(CONFIG_ARCH_NETX) := netx 120 machine-$(CONFIG_ARCH_NETX) := netx
diff --git a/arch/arm/boot/compressed/head-clps7500.S b/arch/arm/boot/compressed/head-clps7500.S
index 4a8a689d15e..941c5f5cbac 100644
--- a/arch/arm/boot/compressed/head-clps7500.S
+++ b/arch/arm/boot/compressed/head-clps7500.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 1999, 2000, 2001 Nexus Electronics Ltd 4 * Copyright (C) 1999, 2000, 2001 Nexus Electronics Ltd
5 */ 5 */
6 6
7#include <linux/config.h>
8 7
9 /* There are three different ways the kernel can be 8 /* There are three different ways the kernel can be
10 booted on a 7500 system: from Angel (loaded in RAM), from 9 booted on a 7500 system: from Angel (loaded in RAM), from
diff --git a/arch/arm/boot/compressed/head-l7200.S b/arch/arm/boot/compressed/head-l7200.S
index b08bd23f8d1..d0e3b20856c 100644
--- a/arch/arm/boot/compressed/head-l7200.S
+++ b/arch/arm/boot/compressed/head-l7200.S
@@ -7,7 +7,6 @@
7 * is merged with head.S by the linker. 7 * is merged with head.S by the linker.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <asm/mach-types.h> 10#include <asm/mach-types.h>
12 11
13#ifndef CONFIG_ARCH_L7200 12#ifndef CONFIG_ARCH_L7200
diff --git a/arch/arm/boot/compressed/head-sa1100.S b/arch/arm/boot/compressed/head-sa1100.S
index 5aefffd4604..4c8c0e46027 100644
--- a/arch/arm/boot/compressed/head-sa1100.S
+++ b/arch/arm/boot/compressed/head-sa1100.S
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12#include <asm/mach-types.h> 11#include <asm/mach-types.h>
13 12
diff --git a/arch/arm/boot/compressed/head-sharpsl.S b/arch/arm/boot/compressed/head-sharpsl.S
index 59ad69640d6..eb0084ea1ec 100644
--- a/arch/arm/boot/compressed/head-sharpsl.S
+++ b/arch/arm/boot/compressed/head-sharpsl.S
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/linkage.h> 15#include <linux/linkage.h>
17#include <asm/mach-types.h> 16#include <asm/mach-types.h>
18 17
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
index d3fe2533907..73c5d9e0201 100644
--- a/arch/arm/boot/compressed/head-xscale.S
+++ b/arch/arm/boot/compressed/head-xscale.S
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/linkage.h> 8#include <linux/linkage.h>
10#include <asm/mach-types.h> 9#include <asm/mach-types.h>
11 10
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 23016f6aa64..14a9ff9c68d 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -8,7 +8,6 @@
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/linkage.h> 11#include <linux/linkage.h>
13 12
14/* 13/*
@@ -448,8 +447,11 @@ __common_mmu_cache_on:
448 mov r1, #-1 447 mov r1, #-1
449 mcr p15, 0, r3, c2, c0, 0 @ load page table pointer 448 mcr p15, 0, r3, c2, c0, 0 @ load page table pointer
450 mcr p15, 0, r1, c3, c0, 0 @ load domain access control 449 mcr p15, 0, r1, c3, c0, 0 @ load domain access control
451 mcr p15, 0, r0, c1, c0, 0 @ load control register 450 b 1f
452 mov pc, lr 451 .align 5 @ cache line aligned
4521: mcr p15, 0, r0, c1, c0, 0 @ load control register
453 mrc p15, 0, r0, c1, c0, 0 @ and read it back to
454 sub pc, lr, r0, lsr #32 @ properly flush pipeline
453 455
454/* 456/*
455 * All code following this line is relocatable. It is relocated by 457 * All code following this line is relocatable. It is relocated by
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c
index c02dc8116a1..f3c1ebfdd0a 100644
--- a/arch/arm/common/gic.c
+++ b/arch/arm/common/gic.c
@@ -33,6 +33,7 @@
33 33
34static void __iomem *gic_dist_base; 34static void __iomem *gic_dist_base;
35static void __iomem *gic_cpu_base; 35static void __iomem *gic_cpu_base;
36static DEFINE_SPINLOCK(irq_controller_lock);
36 37
37/* 38/*
38 * Routines to acknowledge, disable and enable interrupts 39 * Routines to acknowledge, disable and enable interrupts
@@ -52,32 +53,45 @@ static void __iomem *gic_cpu_base;
52static void gic_ack_irq(unsigned int irq) 53static void gic_ack_irq(unsigned int irq)
53{ 54{
54 u32 mask = 1 << (irq % 32); 55 u32 mask = 1 << (irq % 32);
56
57 spin_lock(&irq_controller_lock);
55 writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); 58 writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);
56 writel(irq, gic_cpu_base + GIC_CPU_EOI); 59 writel(irq, gic_cpu_base + GIC_CPU_EOI);
60 spin_unlock(&irq_controller_lock);
57} 61}
58 62
59static void gic_mask_irq(unsigned int irq) 63static void gic_mask_irq(unsigned int irq)
60{ 64{
61 u32 mask = 1 << (irq % 32); 65 u32 mask = 1 << (irq % 32);
66
67 spin_lock(&irq_controller_lock);
62 writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); 68 writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);
69 spin_unlock(&irq_controller_lock);
63} 70}
64 71
65static void gic_unmask_irq(unsigned int irq) 72static void gic_unmask_irq(unsigned int irq)
66{ 73{
67 u32 mask = 1 << (irq % 32); 74 u32 mask = 1 << (irq % 32);
75
76 spin_lock(&irq_controller_lock);
68 writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4); 77 writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4);
78 spin_unlock(&irq_controller_lock);
69} 79}
70 80
71#ifdef CONFIG_SMP 81#ifdef CONFIG_SMP
72static void gic_set_cpu(struct irqdesc *desc, unsigned int irq, unsigned int cpu) 82static void gic_set_cpu(unsigned int irq, cpumask_t mask_val)
73{ 83{
74 void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3); 84 void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3);
75 unsigned int shift = (irq % 4) * 8; 85 unsigned int shift = (irq % 4) * 8;
86 unsigned int cpu = first_cpu(mask_val);
76 u32 val; 87 u32 val;
77 88
89 spin_lock(&irq_controller_lock);
90 irq_desc[irq].cpu = cpu;
78 val = readl(reg) & ~(0xff << shift); 91 val = readl(reg) & ~(0xff << shift);
79 val |= 1 << (cpu + shift); 92 val |= 1 << (cpu + shift);
80 writel(val, reg); 93 writel(val, reg);
94 spin_unlock(&irq_controller_lock);
81} 95}
82#endif 96#endif
83 97
@@ -86,7 +100,7 @@ static struct irqchip gic_chip = {
86 .mask = gic_mask_irq, 100 .mask = gic_mask_irq,
87 .unmask = gic_unmask_irq, 101 .unmask = gic_unmask_irq,
88#ifdef CONFIG_SMP 102#ifdef CONFIG_SMP
89 .set_cpu = gic_set_cpu, 103 .set_affinity = gic_set_cpu,
90#endif 104#endif
91}; 105};
92 106
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 0dafba3a701..fbc3ab0e101 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -15,7 +15,6 @@
15 * Based on sa1111.c 15 * Based on sa1111.c
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 3f68db84e5e..1cdb26a47e1 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -14,7 +14,6 @@
14 * All initialization functions provided here are intended to be called 14 * All initialization functions provided here are intended to be called
15 * from machine specific code with proper arguments when required. 15 * from machine specific code with proper arguments when required.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
@@ -151,7 +150,7 @@ static void
151sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) 150sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
152{ 151{
153 unsigned int stat0, stat1, i; 152 unsigned int stat0, stat1, i;
154 void __iomem *base = desc->data; 153 void __iomem *base = get_irq_data(irq);
155 154
156 stat0 = sa1111_readl(base + SA1111_INTSTATCLR0); 155 stat0 = sa1111_readl(base + SA1111_INTSTATCLR0);
157 stat1 = sa1111_readl(base + SA1111_INTSTATCLR1); 156 stat1 = sa1111_readl(base + SA1111_INTSTATCLR1);
@@ -169,11 +168,11 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
169 168
170 for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1) 169 for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1)
171 if (stat0 & 1) 170 if (stat0 & 1)
172 do_edge_IRQ(i, irq_desc + i, regs); 171 handle_edge_irq(i, irq_desc + i, regs);
173 172
174 for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1) 173 for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1)
175 if (stat1 & 1) 174 if (stat1 & 1)
176 do_edge_IRQ(i, irq_desc + i, regs); 175 handle_edge_irq(i, irq_desc + i, regs);
177 176
178 /* For level-based interrupts */ 177 /* For level-based interrupts */
179 desc->chip->unmask(irq); 178 desc->chip->unmask(irq);
diff --git a/arch/arm/common/time-acorn.c b/arch/arm/common/time-acorn.c
index 486add853fb..3f60dd9aca8 100644
--- a/arch/arm/common/time-acorn.c
+++ b/arch/arm/common/time-acorn.c
@@ -16,6 +16,7 @@
16#include <linux/timex.h> 16#include <linux/timex.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/irq.h>
19 20
20#include <asm/hardware.h> 21#include <asm/hardware.h>
21#include <asm/io.h> 22#include <asm/io.h>
@@ -76,7 +77,7 @@ ioc_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
76 77
77static struct irqaction ioc_timer_irq = { 78static struct irqaction ioc_timer_irq = {
78 .name = "timer", 79 .name = "timer",
79 .flags = SA_INTERRUPT, 80 .flags = IRQF_DISABLED,
80 .handler = ioc_timer_interrupt 81 .handler = ioc_timer_interrupt
81}; 82};
82 83
diff --git a/arch/arm/common/uengine.c b/arch/arm/common/uengine.c
index dfca596a9a2..95c8508c29b 100644
--- a/arch/arm/common/uengine.c
+++ b/arch/arm/common/uengine.c
@@ -11,7 +11,6 @@
11 * License, or (at your option) any later version. 11 * License, or (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
diff --git a/arch/arm/common/via82c505.c b/arch/arm/common/via82c505.c
index ef716a5b07a..ba2e62986a5 100644
--- a/arch/arm/common/via82c505.c
+++ b/arch/arm/common/via82c505.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/pci.h> 2#include <linux/pci.h>
4#include <linux/ptrace.h> 3#include <linux/ptrace.h>
diff --git a/arch/arm/configs/at91rm9200dk_defconfig b/arch/arm/configs/at91rm9200dk_defconfig
index 9e1c1cceb73..4f3d8d37741 100644
--- a/arch/arm/configs/at91rm9200dk_defconfig
+++ b/arch/arm/configs/at91rm9200dk_defconfig
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
103# CONFIG_ARCH_IMX is not set 103# CONFIG_ARCH_IMX is not set
104# CONFIG_ARCH_H720X is not set 104# CONFIG_ARCH_H720X is not set
105# CONFIG_ARCH_AAEC2000 is not set 105# CONFIG_ARCH_AAEC2000 is not set
106CONFIG_ARCH_AT91=y
106CONFIG_ARCH_AT91RM9200=y 107CONFIG_ARCH_AT91RM9200=y
107 108
108# 109#
diff --git a/arch/arm/configs/at91rm9200ek_defconfig b/arch/arm/configs/at91rm9200ek_defconfig
index 6e0805a971d..08b5dc38876 100644
--- a/arch/arm/configs/at91rm9200ek_defconfig
+++ b/arch/arm/configs/at91rm9200ek_defconfig
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
103# CONFIG_ARCH_IMX is not set 103# CONFIG_ARCH_IMX is not set
104# CONFIG_ARCH_H720X is not set 104# CONFIG_ARCH_H720X is not set
105# CONFIG_ARCH_AAEC2000 is not set 105# CONFIG_ARCH_AAEC2000 is not set
106CONFIG_ARCH_AT91=y
106CONFIG_ARCH_AT91RM9200=y 107CONFIG_ARCH_AT91RM9200=y
107 108
108# 109#
diff --git a/arch/arm/configs/ateb9200_defconfig b/arch/arm/configs/ateb9200_defconfig
index 69c39e09874..bee7813d040 100644
--- a/arch/arm/configs/ateb9200_defconfig
+++ b/arch/arm/configs/ateb9200_defconfig
@@ -105,6 +105,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
105# CONFIG_ARCH_IMX is not set 105# CONFIG_ARCH_IMX is not set
106# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
107# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
108CONFIG_ARCH_AT91=y
108CONFIG_ARCH_AT91RM9200=y 109CONFIG_ARCH_AT91RM9200=y
109 110
110# 111#
diff --git a/arch/arm/configs/carmeva_defconfig b/arch/arm/configs/carmeva_defconfig
index 5ccd29a7c1f..8a075c8ecc6 100644
--- a/arch/arm/configs/carmeva_defconfig
+++ b/arch/arm/configs/carmeva_defconfig
@@ -82,6 +82,7 @@ CONFIG_OBSOLETE_MODPARM=y
82# CONFIG_ARCH_VERSATILE is not set 82# CONFIG_ARCH_VERSATILE is not set
83# CONFIG_ARCH_IMX is not set 83# CONFIG_ARCH_IMX is not set
84# CONFIG_ARCH_H720X is not set 84# CONFIG_ARCH_H720X is not set
85CONFIG_ARCH_AT91=y
85CONFIG_ARCH_AT91RM9200=y 86CONFIG_ARCH_AT91RM9200=y
86 87
87# 88#
diff --git a/arch/arm/configs/csb337_defconfig b/arch/arm/configs/csb337_defconfig
index 94bd9932a40..3594155a813 100644
--- a/arch/arm/configs/csb337_defconfig
+++ b/arch/arm/configs/csb337_defconfig
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
103# CONFIG_ARCH_IMX is not set 103# CONFIG_ARCH_IMX is not set
104# CONFIG_ARCH_H720X is not set 104# CONFIG_ARCH_H720X is not set
105# CONFIG_ARCH_AAEC2000 is not set 105# CONFIG_ARCH_AAEC2000 is not set
106CONFIG_ARCH_AT91=y
106CONFIG_ARCH_AT91RM9200=y 107CONFIG_ARCH_AT91RM9200=y
107 108
108# 109#
diff --git a/arch/arm/configs/csb637_defconfig b/arch/arm/configs/csb637_defconfig
index 1519124c550..640d70c1f06 100644
--- a/arch/arm/configs/csb637_defconfig
+++ b/arch/arm/configs/csb637_defconfig
@@ -103,6 +103,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
103# CONFIG_ARCH_IMX is not set 103# CONFIG_ARCH_IMX is not set
104# CONFIG_ARCH_H720X is not set 104# CONFIG_ARCH_H720X is not set
105# CONFIG_ARCH_AAEC2000 is not set 105# CONFIG_ARCH_AAEC2000 is not set
106CONFIG_ARCH_AT91=y
106CONFIG_ARCH_AT91RM9200=y 107CONFIG_ARCH_AT91RM9200=y
107 108
108# 109#
diff --git a/arch/arm/configs/kafa_defconfig b/arch/arm/configs/kafa_defconfig
index 51ded20e3f6..1db633e2c94 100644
--- a/arch/arm/configs/kafa_defconfig
+++ b/arch/arm/configs/kafa_defconfig
@@ -105,6 +105,7 @@ CONFIG_DEFAULT_IOSCHED="deadline"
105# CONFIG_ARCH_IMX is not set 105# CONFIG_ARCH_IMX is not set
106# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
107# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
108CONFIG_ARCH_AT91=y
108CONFIG_ARCH_AT91RM9200=y 109CONFIG_ARCH_AT91RM9200=y
109 110
110# 111#
diff --git a/arch/arm/configs/kb9202_defconfig b/arch/arm/configs/kb9202_defconfig
index fee4f566452..45396e08719 100644
--- a/arch/arm/configs/kb9202_defconfig
+++ b/arch/arm/configs/kb9202_defconfig
@@ -80,6 +80,7 @@ CONFIG_KMOD=y
80# CONFIG_ARCH_IMX is not set 80# CONFIG_ARCH_IMX is not set
81# CONFIG_ARCH_H720X is not set 81# CONFIG_ARCH_H720X is not set
82# CONFIG_ARCH_AAEC2000 is not set 82# CONFIG_ARCH_AAEC2000 is not set
83CONFIG_ARCH_AT91=y
83CONFIG_ARCH_AT91RM9200=y 84CONFIG_ARCH_AT91RM9200=y
84 85
85# 86#
diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig
index ee3ecbd9002..05adb0b34e7 100644
--- a/arch/arm/configs/omap_h2_1610_defconfig
+++ b/arch/arm/configs/omap_h2_1610_defconfig
@@ -1,19 +1,20 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.14 3# Linux kernel version: 2.6.17
4# Wed Nov 9 18:53:40 2005 4# Thu Jun 29 15:25:18 2006
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_UID16=y
9CONFIG_RWSEM_GENERIC_SPINLOCK=y 8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y 10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000
12CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
11 13
12# 14#
13# Code maturity level options 15# Code maturity level options
14# 16#
15CONFIG_EXPERIMENTAL=y 17CONFIG_EXPERIMENTAL=y
16CONFIG_CLEAN_COMPILE=y
17CONFIG_BROKEN_ON_SMP=y 18CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y 19CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32 20CONFIG_INIT_ENV_ARG_LIMIT=32
@@ -29,26 +30,26 @@ CONFIG_SYSVIPC=y
29# CONFIG_BSD_PROCESS_ACCT is not set 30# CONFIG_BSD_PROCESS_ACCT is not set
30CONFIG_SYSCTL=y 31CONFIG_SYSCTL=y
31# CONFIG_AUDIT is not set 32# CONFIG_AUDIT is not set
32# CONFIG_HOTPLUG is not set
33CONFIG_KOBJECT_UEVENT=y
34# CONFIG_IKCONFIG is not set 33# CONFIG_IKCONFIG is not set
34# CONFIG_RELAY is not set
35CONFIG_INITRAMFS_SOURCE="" 35CONFIG_INITRAMFS_SOURCE=""
36CONFIG_UID16=y
37CONFIG_CC_OPTIMIZE_FOR_SIZE=y
36# CONFIG_EMBEDDED is not set 38# CONFIG_EMBEDDED is not set
37CONFIG_KALLSYMS=y 39CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_EXTRA_PASS is not set 40# CONFIG_KALLSYMS_EXTRA_PASS is not set
41CONFIG_HOTPLUG=y
39CONFIG_PRINTK=y 42CONFIG_PRINTK=y
40CONFIG_BUG=y 43CONFIG_BUG=y
44CONFIG_ELF_CORE=y
41CONFIG_BASE_FULL=y 45CONFIG_BASE_FULL=y
42CONFIG_FUTEX=y 46CONFIG_FUTEX=y
43CONFIG_EPOLL=y 47CONFIG_EPOLL=y
44CONFIG_CC_OPTIMIZE_FOR_SIZE=y
45CONFIG_SHMEM=y 48CONFIG_SHMEM=y
46CONFIG_CC_ALIGN_FUNCTIONS=0 49CONFIG_SLAB=y
47CONFIG_CC_ALIGN_LABELS=0
48CONFIG_CC_ALIGN_LOOPS=0
49CONFIG_CC_ALIGN_JUMPS=0
50# CONFIG_TINY_SHMEM is not set 50# CONFIG_TINY_SHMEM is not set
51CONFIG_BASE_SMALL=0 51CONFIG_BASE_SMALL=0
52# CONFIG_SLOB is not set
52 53
53# 54#
54# Loadable module support 55# Loadable module support
@@ -56,7 +57,6 @@ CONFIG_BASE_SMALL=0
56CONFIG_MODULES=y 57CONFIG_MODULES=y
57CONFIG_MODULE_UNLOAD=y 58CONFIG_MODULE_UNLOAD=y
58# CONFIG_MODULE_FORCE_UNLOAD is not set 59# CONFIG_MODULE_FORCE_UNLOAD is not set
59CONFIG_OBSOLETE_MODPARM=y
60# CONFIG_MODVERSIONS is not set 60# CONFIG_MODVERSIONS is not set
61# CONFIG_MODULE_SRCVERSION_ALL is not set 61# CONFIG_MODULE_SRCVERSION_ALL is not set
62# CONFIG_KMOD is not set 62# CONFIG_KMOD is not set
@@ -64,6 +64,7 @@ CONFIG_OBSOLETE_MODPARM=y
64# 64#
65# Block layer 65# Block layer
66# 66#
67# CONFIG_BLK_DEV_IO_TRACE is not set
67 68
68# 69#
69# IO Schedulers 70# IO Schedulers
@@ -81,16 +82,26 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
81# 82#
82# System Type 83# System Type
83# 84#
85# CONFIG_ARCH_AAEC2000 is not set
86# CONFIG_ARCH_INTEGRATOR is not set
87# CONFIG_ARCH_REALVIEW is not set
88# CONFIG_ARCH_VERSATILE is not set
89# CONFIG_ARCH_AT91RM9200 is not set
84# CONFIG_ARCH_CLPS7500 is not set 90# CONFIG_ARCH_CLPS7500 is not set
85# CONFIG_ARCH_CLPS711X is not set 91# CONFIG_ARCH_CLPS711X is not set
86# CONFIG_ARCH_CO285 is not set 92# CONFIG_ARCH_CO285 is not set
87# CONFIG_ARCH_EBSA110 is not set 93# CONFIG_ARCH_EBSA110 is not set
94# CONFIG_ARCH_EP93XX is not set
88# CONFIG_ARCH_FOOTBRIDGE is not set 95# CONFIG_ARCH_FOOTBRIDGE is not set
89# CONFIG_ARCH_INTEGRATOR is not set 96# CONFIG_ARCH_NETX is not set
97# CONFIG_ARCH_H720X is not set
98# CONFIG_ARCH_IMX is not set
90# CONFIG_ARCH_IOP3XX is not set 99# CONFIG_ARCH_IOP3XX is not set
91# CONFIG_ARCH_IXP4XX is not set 100# CONFIG_ARCH_IXP4XX is not set
92# CONFIG_ARCH_IXP2000 is not set 101# CONFIG_ARCH_IXP2000 is not set
102# CONFIG_ARCH_IXP23XX is not set
93# CONFIG_ARCH_L7200 is not set 103# CONFIG_ARCH_L7200 is not set
104# CONFIG_ARCH_PNX4008 is not set
94# CONFIG_ARCH_PXA is not set 105# CONFIG_ARCH_PXA is not set
95# CONFIG_ARCH_RPC is not set 106# CONFIG_ARCH_RPC is not set
96# CONFIG_ARCH_SA1100 is not set 107# CONFIG_ARCH_SA1100 is not set
@@ -98,11 +109,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
98# CONFIG_ARCH_SHARK is not set 109# CONFIG_ARCH_SHARK is not set
99# CONFIG_ARCH_LH7A40X is not set 110# CONFIG_ARCH_LH7A40X is not set
100CONFIG_ARCH_OMAP=y 111CONFIG_ARCH_OMAP=y
101# CONFIG_ARCH_VERSATILE is not set
102# CONFIG_ARCH_REALVIEW is not set
103# CONFIG_ARCH_IMX is not set
104# CONFIG_ARCH_H720X is not set
105# CONFIG_ARCH_AAEC2000 is not set
106 112
107# 113#
108# TI OMAP Implementations 114# TI OMAP Implementations
@@ -141,6 +147,7 @@ CONFIG_ARCH_OMAP16XX=y
141CONFIG_MACH_OMAP_H2=y 147CONFIG_MACH_OMAP_H2=y
142# CONFIG_MACH_OMAP_H3 is not set 148# CONFIG_MACH_OMAP_H3 is not set
143# CONFIG_MACH_OMAP_OSK is not set 149# CONFIG_MACH_OMAP_OSK is not set
150# CONFIG_MACH_NOKIA770 is not set
144# CONFIG_MACH_OMAP_GENERIC is not set 151# CONFIG_MACH_OMAP_GENERIC is not set
145 152
146# 153#
@@ -177,7 +184,6 @@ CONFIG_ARM_THUMB=y
177# 184#
178# Bus support 185# Bus support
179# 186#
180CONFIG_ISA_DMA_API=y
181 187
182# 188#
183# PCCARD (PCMCIA/CardBus) support 189# PCCARD (PCMCIA/CardBus) support
@@ -189,6 +195,8 @@ CONFIG_ISA_DMA_API=y
189# 195#
190CONFIG_PREEMPT=y 196CONFIG_PREEMPT=y
191CONFIG_NO_IDLE_HZ=y 197CONFIG_NO_IDLE_HZ=y
198CONFIG_HZ=128
199# CONFIG_AEABI is not set
192# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 200# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
193CONFIG_SELECT_MEMORY_MODEL=y 201CONFIG_SELECT_MEMORY_MODEL=y
194CONFIG_FLATMEM_MANUAL=y 202CONFIG_FLATMEM_MANUAL=y
@@ -249,6 +257,8 @@ CONFIG_BINFMT_AOUT=y
249# Power management options 257# Power management options
250# 258#
251CONFIG_PM=y 259CONFIG_PM=y
260CONFIG_PM_LEGACY=y
261# CONFIG_PM_DEBUG is not set
252# CONFIG_APM is not set 262# CONFIG_APM is not set
253 263
254# 264#
@@ -259,9 +269,12 @@ CONFIG_NET=y
259# 269#
260# Networking options 270# Networking options
261# 271#
272# CONFIG_NETDEBUG is not set
262CONFIG_PACKET=y 273CONFIG_PACKET=y
263# CONFIG_PACKET_MMAP is not set 274# CONFIG_PACKET_MMAP is not set
264CONFIG_UNIX=y 275CONFIG_UNIX=y
276CONFIG_XFRM=y
277# CONFIG_XFRM_USER is not set
265# CONFIG_NET_KEY is not set 278# CONFIG_NET_KEY is not set
266CONFIG_INET=y 279CONFIG_INET=y
267# CONFIG_IP_MULTICAST is not set 280# CONFIG_IP_MULTICAST is not set
@@ -278,12 +291,18 @@ CONFIG_IP_PNP_BOOTP=y
278# CONFIG_INET_AH is not set 291# CONFIG_INET_AH is not set
279# CONFIG_INET_ESP is not set 292# CONFIG_INET_ESP is not set
280# CONFIG_INET_IPCOMP is not set 293# CONFIG_INET_IPCOMP is not set
294# CONFIG_INET_XFRM_TUNNEL is not set
281# CONFIG_INET_TUNNEL is not set 295# CONFIG_INET_TUNNEL is not set
296CONFIG_INET_XFRM_MODE_TRANSPORT=y
297CONFIG_INET_XFRM_MODE_TUNNEL=y
282CONFIG_INET_DIAG=y 298CONFIG_INET_DIAG=y
283CONFIG_INET_TCP_DIAG=y 299CONFIG_INET_TCP_DIAG=y
284# CONFIG_TCP_CONG_ADVANCED is not set 300# CONFIG_TCP_CONG_ADVANCED is not set
285CONFIG_TCP_CONG_BIC=y 301CONFIG_TCP_CONG_BIC=y
286# CONFIG_IPV6 is not set 302# CONFIG_IPV6 is not set
303# CONFIG_INET6_XFRM_TUNNEL is not set
304# CONFIG_INET6_TUNNEL is not set
305# CONFIG_NETWORK_SECMARK is not set
287# CONFIG_NETFILTER is not set 306# CONFIG_NETFILTER is not set
288 307
289# 308#
@@ -295,6 +314,11 @@ CONFIG_TCP_CONG_BIC=y
295# SCTP Configuration (EXPERIMENTAL) 314# SCTP Configuration (EXPERIMENTAL)
296# 315#
297# CONFIG_IP_SCTP is not set 316# CONFIG_IP_SCTP is not set
317
318#
319# TIPC Configuration (EXPERIMENTAL)
320#
321# CONFIG_TIPC is not set
298# CONFIG_ATM is not set 322# CONFIG_ATM is not set
299# CONFIG_BRIDGE is not set 323# CONFIG_BRIDGE is not set
300# CONFIG_VLAN_8021Q is not set 324# CONFIG_VLAN_8021Q is not set
@@ -312,7 +336,6 @@ CONFIG_TCP_CONG_BIC=y
312# QoS and/or fair queueing 336# QoS and/or fair queueing
313# 337#
314# CONFIG_NET_SCHED is not set 338# CONFIG_NET_SCHED is not set
315# CONFIG_NET_CLS_ROUTE is not set
316 339
317# 340#
318# Network testing 341# Network testing
@@ -333,6 +356,12 @@ CONFIG_TCP_CONG_BIC=y
333CONFIG_STANDALONE=y 356CONFIG_STANDALONE=y
334CONFIG_PREVENT_FIRMWARE_BUILD=y 357CONFIG_PREVENT_FIRMWARE_BUILD=y
335# CONFIG_FW_LOADER is not set 358# CONFIG_FW_LOADER is not set
359# CONFIG_SYS_HYPERVISOR is not set
360
361#
362# Connector - unified userspace <-> kernelspace linker
363#
364# CONFIG_CONNECTOR is not set
336 365
337# 366#
338# Memory Technology Devices (MTD) 367# Memory Technology Devices (MTD)
@@ -526,6 +555,7 @@ CONFIG_SERIO_SERPORT=y
526CONFIG_VT=y 555CONFIG_VT=y
527CONFIG_VT_CONSOLE=y 556CONFIG_VT_CONSOLE=y
528CONFIG_HW_CONSOLE=y 557CONFIG_HW_CONSOLE=y
558# CONFIG_VT_HW_CONSOLE_BINDING is not set
529# CONFIG_SERIAL_NONSTANDARD is not set 559# CONFIG_SERIAL_NONSTANDARD is not set
530 560
531# 561#
@@ -534,6 +564,7 @@ CONFIG_HW_CONSOLE=y
534CONFIG_SERIAL_8250=y 564CONFIG_SERIAL_8250=y
535CONFIG_SERIAL_8250_CONSOLE=y 565CONFIG_SERIAL_8250_CONSOLE=y
536CONFIG_SERIAL_8250_NR_UARTS=4 566CONFIG_SERIAL_8250_NR_UARTS=4
567CONFIG_SERIAL_8250_RUNTIME_UARTS=4
537# CONFIG_SERIAL_8250_EXTENDED is not set 568# CONFIG_SERIAL_8250_EXTENDED is not set
538 569
539# 570#
@@ -559,8 +590,8 @@ CONFIG_WATCHDOG_NOWAYOUT=y
559# Watchdog Device Drivers 590# Watchdog Device Drivers
560# 591#
561# CONFIG_SOFT_WATCHDOG is not set 592# CONFIG_SOFT_WATCHDOG is not set
593# CONFIG_HW_RANDOM is not set
562# CONFIG_NVRAM is not set 594# CONFIG_NVRAM is not set
563# CONFIG_RTC is not set
564# CONFIG_DTLK is not set 595# CONFIG_DTLK is not set
565# CONFIG_R3964 is not set 596# CONFIG_R3964 is not set
566 597
@@ -572,6 +603,7 @@ CONFIG_WATCHDOG_NOWAYOUT=y
572# 603#
573# TPM devices 604# TPM devices
574# 605#
606# CONFIG_TCG_TPM is not set
575# CONFIG_TELCLOCK is not set 607# CONFIG_TELCLOCK is not set
576 608
577# 609#
@@ -580,10 +612,22 @@ CONFIG_WATCHDOG_NOWAYOUT=y
580# CONFIG_I2C is not set 612# CONFIG_I2C is not set
581 613
582# 614#
615# SPI support
616#
617# CONFIG_SPI is not set
618# CONFIG_SPI_MASTER is not set
619
620#
621# Dallas's 1-wire bus
622#
623
624#
583# Hardware Monitoring support 625# Hardware Monitoring support
584# 626#
585CONFIG_HWMON=y 627CONFIG_HWMON=y
586# CONFIG_HWMON_VID is not set 628# CONFIG_HWMON_VID is not set
629# CONFIG_SENSORS_ABITUGURU is not set
630# CONFIG_SENSORS_F71805F is not set
587# CONFIG_HWMON_DEBUG_CHIP is not set 631# CONFIG_HWMON_DEBUG_CHIP is not set
588 632
589# 633#
@@ -591,13 +635,23 @@ CONFIG_HWMON=y
591# 635#
592 636
593# 637#
594# Multimedia Capabilities Port drivers 638# LED devices
639#
640# CONFIG_NEW_LEDS is not set
641
642#
643# LED drivers
644#
645
646#
647# LED Triggers
595# 648#
596 649
597# 650#
598# Multimedia devices 651# Multimedia devices
599# 652#
600# CONFIG_VIDEO_DEV is not set 653# CONFIG_VIDEO_DEV is not set
654CONFIG_VIDEO_V4L2=y
601 655
602# 656#
603# Digital Video Broadcasting Devices 657# Digital Video Broadcasting Devices
@@ -607,11 +661,13 @@ CONFIG_HWMON=y
607# 661#
608# Graphics support 662# Graphics support
609# 663#
664CONFIG_FIRMWARE_EDID=y
610CONFIG_FB=y 665CONFIG_FB=y
611# CONFIG_FB_CFB_FILLRECT is not set 666# CONFIG_FB_CFB_FILLRECT is not set
612# CONFIG_FB_CFB_COPYAREA is not set 667# CONFIG_FB_CFB_COPYAREA is not set
613# CONFIG_FB_CFB_IMAGEBLIT is not set 668# CONFIG_FB_CFB_IMAGEBLIT is not set
614# CONFIG_FB_MACMODES is not set 669# CONFIG_FB_MACMODES is not set
670# CONFIG_FB_BACKLIGHT is not set
615CONFIG_FB_MODE_HELPERS=y 671CONFIG_FB_MODE_HELPERS=y
616# CONFIG_FB_TILEBLITTING is not set 672# CONFIG_FB_TILEBLITTING is not set
617# CONFIG_FB_S1D13XXX is not set 673# CONFIG_FB_S1D13XXX is not set
@@ -635,7 +691,6 @@ CONFIG_FONT_8x16=y
635# CONFIG_FONT_SUN8x16 is not set 691# CONFIG_FONT_SUN8x16 is not set
636# CONFIG_FONT_SUN12x22 is not set 692# CONFIG_FONT_SUN12x22 is not set
637# CONFIG_FONT_10x18 is not set 693# CONFIG_FONT_10x18 is not set
638# CONFIG_FONT_RL is not set
639 694
640# 695#
641# Logo configuration 696# Logo configuration
@@ -660,16 +715,15 @@ CONFIG_SOUND=y
660# Open Sound System 715# Open Sound System
661# 716#
662CONFIG_SOUND_PRIME=y 717CONFIG_SOUND_PRIME=y
663# CONFIG_OBSOLETE_OSS_DRIVER is not set
664# CONFIG_SOUND_MSNDCLAS is not set 718# CONFIG_SOUND_MSNDCLAS is not set
665# CONFIG_SOUND_MSNDPIN is not set 719# CONFIG_SOUND_MSNDPIN is not set
666# CONFIG_SOUND_OSS is not set
667 720
668# 721#
669# USB support 722# USB support
670# 723#
671CONFIG_USB_ARCH_HAS_HCD=y 724CONFIG_USB_ARCH_HAS_HCD=y
672CONFIG_USB_ARCH_HAS_OHCI=y 725CONFIG_USB_ARCH_HAS_OHCI=y
726# CONFIG_USB_ARCH_HAS_EHCI is not set
673# CONFIG_USB is not set 727# CONFIG_USB is not set
674 728
675# 729#
@@ -680,17 +734,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y
680# USB Gadget Support 734# USB Gadget Support
681# 735#
682# CONFIG_USB_GADGET is not set 736# CONFIG_USB_GADGET is not set
683# CONFIG_USB_GADGET_NET2280 is not set
684# CONFIG_USB_GADGET_PXA2XX is not set
685# CONFIG_USB_GADGET_GOKU is not set
686# CONFIG_USB_GADGET_LH7A40X is not set
687# CONFIG_USB_GADGET_OMAP is not set
688# CONFIG_USB_GADGET_DUMMY_HCD is not set
689# CONFIG_USB_ZERO is not set
690# CONFIG_USB_ETH is not set
691# CONFIG_USB_GADGETFS is not set
692# CONFIG_USB_FILE_STORAGE is not set
693# CONFIG_USB_G_SERIAL is not set
694 737
695# 738#
696# MMC/SD Card support 739# MMC/SD Card support
@@ -698,20 +741,27 @@ CONFIG_USB_ARCH_HAS_OHCI=y
698# CONFIG_MMC is not set 741# CONFIG_MMC is not set
699 742
700# 743#
744# Real Time Clock
745#
746CONFIG_RTC_LIB=y
747# CONFIG_RTC_CLASS is not set
748
749#
701# File systems 750# File systems
702# 751#
703CONFIG_EXT2_FS=y 752CONFIG_EXT2_FS=y
704# CONFIG_EXT2_FS_XATTR is not set 753# CONFIG_EXT2_FS_XATTR is not set
705# CONFIG_EXT2_FS_XIP is not set 754# CONFIG_EXT2_FS_XIP is not set
706# CONFIG_EXT3_FS is not set 755# CONFIG_EXT3_FS is not set
707# CONFIG_JBD is not set
708# CONFIG_REISERFS_FS is not set 756# CONFIG_REISERFS_FS is not set
709# CONFIG_JFS_FS is not set 757# CONFIG_JFS_FS is not set
710# CONFIG_FS_POSIX_ACL is not set 758# CONFIG_FS_POSIX_ACL is not set
711# CONFIG_XFS_FS is not set 759# CONFIG_XFS_FS is not set
760# CONFIG_OCFS2_FS is not set
712# CONFIG_MINIX_FS is not set 761# CONFIG_MINIX_FS is not set
713CONFIG_ROMFS_FS=y 762CONFIG_ROMFS_FS=y
714CONFIG_INOTIFY=y 763CONFIG_INOTIFY=y
764CONFIG_INOTIFY_USER=y
715# CONFIG_QUOTA is not set 765# CONFIG_QUOTA is not set
716CONFIG_DNOTIFY=y 766CONFIG_DNOTIFY=y
717# CONFIG_AUTOFS_FS is not set 767# CONFIG_AUTOFS_FS is not set
@@ -741,7 +791,7 @@ CONFIG_SYSFS=y
741# CONFIG_TMPFS is not set 791# CONFIG_TMPFS is not set
742# CONFIG_HUGETLB_PAGE is not set 792# CONFIG_HUGETLB_PAGE is not set
743CONFIG_RAMFS=y 793CONFIG_RAMFS=y
744# CONFIG_RELAYFS_FS is not set 794# CONFIG_CONFIGFS_FS is not set
745 795
746# 796#
747# Miscellaneous filesystems 797# Miscellaneous filesystems
@@ -843,10 +893,13 @@ CONFIG_NLS_DEFAULT="iso8859-1"
843# Kernel hacking 893# Kernel hacking
844# 894#
845# CONFIG_PRINTK_TIME is not set 895# CONFIG_PRINTK_TIME is not set
896# CONFIG_MAGIC_SYSRQ is not set
846# CONFIG_DEBUG_KERNEL is not set 897# CONFIG_DEBUG_KERNEL is not set
847CONFIG_LOG_BUF_SHIFT=14 898CONFIG_LOG_BUF_SHIFT=14
848CONFIG_DEBUG_BUGVERBOSE=y 899CONFIG_DEBUG_BUGVERBOSE=y
900# CONFIG_DEBUG_FS is not set
849CONFIG_FRAME_POINTER=y 901CONFIG_FRAME_POINTER=y
902# CONFIG_UNWIND_INFO is not set
850# CONFIG_DEBUG_USER is not set 903# CONFIG_DEBUG_USER is not set
851 904
852# 905#
diff --git a/arch/arm/configs/onearm_defconfig b/arch/arm/configs/onearm_defconfig
index 5401c01caef..2b4a63be03f 100644
--- a/arch/arm/configs/onearm_defconfig
+++ b/arch/arm/configs/onearm_defconfig
@@ -85,6 +85,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
85# CONFIG_ARCH_INTEGRATOR is not set 85# CONFIG_ARCH_INTEGRATOR is not set
86# CONFIG_ARCH_REALVIEW is not set 86# CONFIG_ARCH_REALVIEW is not set
87# CONFIG_ARCH_VERSATILE is not set 87# CONFIG_ARCH_VERSATILE is not set
88CONFIG_ARCH_AT91=y
88CONFIG_ARCH_AT91RM9200=y 89CONFIG_ARCH_AT91RM9200=y
89# CONFIG_ARCH_CLPS7500 is not set 90# CONFIG_ARCH_CLPS7500 is not set
90# CONFIG_ARCH_CLPS711X is not set 91# CONFIG_ARCH_CLPS711X is not set
diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig
new file mode 100644
index 00000000000..a6698dc4f6b
--- /dev/null
+++ b/arch/arm/configs/trizeps4_defconfig
@@ -0,0 +1,1579 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17
4# Sat Jun 24 22:45:14 2006
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_ARCH_MTD_XIP=y
12CONFIG_VECTORS_BASE=0xffff0000
13
14#
15# Code maturity level options
16#
17CONFIG_EXPERIMENTAL=y
18CONFIG_BROKEN_ON_SMP=y
19CONFIG_LOCK_KERNEL=y
20CONFIG_INIT_ENV_ARG_LIMIT=32
21
22#
23# General setup
24#
25CONFIG_LOCALVERSION=""
26CONFIG_LOCALVERSION_AUTO=y
27CONFIG_SWAP=y
28CONFIG_SYSVIPC=y
29CONFIG_POSIX_MQUEUE=y
30CONFIG_BSD_PROCESS_ACCT=y
31CONFIG_BSD_PROCESS_ACCT_V3=y
32CONFIG_SYSCTL=y
33CONFIG_AUDIT=y
34CONFIG_IKCONFIG=y
35CONFIG_IKCONFIG_PROC=y
36# CONFIG_RELAY is not set
37CONFIG_INITRAMFS_SOURCE=""
38CONFIG_UID16=y
39CONFIG_CC_OPTIMIZE_FOR_SIZE=y
40CONFIG_EMBEDDED=y
41CONFIG_KALLSYMS=y
42CONFIG_KALLSYMS_EXTRA_PASS=y
43CONFIG_HOTPLUG=y
44CONFIG_PRINTK=y
45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y
49CONFIG_EPOLL=y
50CONFIG_SHMEM=y
51CONFIG_SLAB=y
52# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0
54# CONFIG_SLOB is not set
55CONFIG_OBSOLETE_INTERMODULE=y
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y
62CONFIG_MODULE_FORCE_UNLOAD=y
63# CONFIG_MODVERSIONS is not set
64CONFIG_MODULE_SRCVERSION_ALL=y
65CONFIG_KMOD=y
66
67#
68# Block layer
69#
70# CONFIG_BLK_DEV_IO_TRACE is not set
71
72#
73# IO Schedulers
74#
75CONFIG_IOSCHED_NOOP=y
76CONFIG_IOSCHED_AS=y
77CONFIG_IOSCHED_DEADLINE=y
78CONFIG_IOSCHED_CFQ=y
79CONFIG_DEFAULT_AS=y
80# CONFIG_DEFAULT_DEADLINE is not set
81# CONFIG_DEFAULT_CFQ is not set
82# CONFIG_DEFAULT_NOOP is not set
83CONFIG_DEFAULT_IOSCHED="anticipatory"
84
85#
86# System Type
87#
88# CONFIG_ARCH_CLPS7500 is not set
89# CONFIG_ARCH_CLPS711X is not set
90# CONFIG_ARCH_CO285 is not set
91# CONFIG_ARCH_EBSA110 is not set
92# CONFIG_ARCH_EP93XX is not set
93# CONFIG_ARCH_FOOTBRIDGE is not set
94# CONFIG_ARCH_INTEGRATOR is not set
95# CONFIG_ARCH_IOP3XX is not set
96# CONFIG_ARCH_IXP4XX is not set
97# CONFIG_ARCH_IXP2000 is not set
98# CONFIG_ARCH_IXP23XX is not set
99# CONFIG_ARCH_L7200 is not set
100CONFIG_ARCH_PXA=y
101# CONFIG_ARCH_RPC is not set
102# CONFIG_ARCH_SA1100 is not set
103# CONFIG_ARCH_S3C2410 is not set
104# CONFIG_ARCH_SHARK is not set
105# CONFIG_ARCH_LH7A40X is not set
106# CONFIG_ARCH_OMAP is not set
107# CONFIG_ARCH_VERSATILE is not set
108# CONFIG_ARCH_REALVIEW is not set
109# CONFIG_ARCH_IMX is not set
110# CONFIG_ARCH_H720X is not set
111# CONFIG_ARCH_AAEC2000 is not set
112# CONFIG_ARCH_AT91RM9200 is not set
113
114#
115# Intel PXA2xx Implementations
116#
117# CONFIG_ARCH_LUBBOCK is not set
118# CONFIG_MACH_LOGICPD_PXA270 is not set
119# CONFIG_MACH_MAINSTONE is not set
120# CONFIG_ARCH_PXA_IDP is not set
121# CONFIG_PXA_SHARPSL is not set
122CONFIG_MACH_TRIZEPS4=y
123CONFIG_MACH_TRIZEPS4_CONXS=y
124# CONFIG_MACH_TRIZEPS4_ANY is not set
125CONFIG_PXA27x=y
126
127#
128# Processor Type
129#
130CONFIG_CPU_32=y
131CONFIG_CPU_XSCALE=y
132CONFIG_CPU_32v5=y
133CONFIG_CPU_ABRT_EV5T=y
134CONFIG_CPU_CACHE_VIVT=y
135CONFIG_CPU_TLB_V4WBI=y
136
137#
138# Processor Features
139#
140CONFIG_ARM_THUMB=y
141CONFIG_XSCALE_PMU=y
142
143#
144# Bus support
145#
146
147#
148# PCCARD (PCMCIA/CardBus) support
149#
150CONFIG_PCCARD=m
151# CONFIG_PCMCIA_DEBUG is not set
152CONFIG_PCMCIA=m
153CONFIG_PCMCIA_LOAD_CIS=y
154CONFIG_PCMCIA_IOCTL=y
155
156#
157# PC-card bridges
158#
159CONFIG_PCMCIA_PXA2XX=m
160
161#
162# Kernel Features
163#
164CONFIG_PREEMPT=y
165# CONFIG_NO_IDLE_HZ is not set
166CONFIG_HZ=100
167# CONFIG_AEABI is not set
168# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
169CONFIG_SELECT_MEMORY_MODEL=y
170CONFIG_FLATMEM_MANUAL=y
171# CONFIG_DISCONTIGMEM_MANUAL is not set
172# CONFIG_SPARSEMEM_MANUAL is not set
173CONFIG_FLATMEM=y
174CONFIG_FLAT_NODE_MEM_MAP=y
175# CONFIG_SPARSEMEM_STATIC is not set
176CONFIG_SPLIT_PTLOCK_CPUS=4096
177CONFIG_LEDS=y
178CONFIG_LEDS_TIMER=y
179CONFIG_LEDS_CPU=y
180CONFIG_ALIGNMENT_TRAP=y
181
182#
183# Boot options
184#
185CONFIG_ZBOOT_ROM_TEXT=0
186CONFIG_ZBOOT_ROM_BSS=0
187CONFIG_CMDLINE="root=/dev/nfs ip=bootp console=ttyS0,115200n8"
188# CONFIG_XIP_KERNEL is not set
189
190#
191# Floating point emulation
192#
193
194#
195# At least one emulation must be selected
196#
197CONFIG_FPE_NWFPE=y
198CONFIG_FPE_NWFPE_XP=y
199# CONFIG_FPE_FASTFPE is not set
200
201#
202# Userspace binary formats
203#
204CONFIG_BINFMT_ELF=y
205# CONFIG_BINFMT_AOUT is not set
206CONFIG_BINFMT_MISC=m
207# CONFIG_ARTHUR is not set
208
209#
210# Power management options
211#
212CONFIG_PM=y
213CONFIG_PM_LEGACY=y
214# CONFIG_PM_DEBUG is not set
215CONFIG_APM=y
216
217#
218# Networking
219#
220CONFIG_NET=y
221
222#
223# Networking options
224#
225# CONFIG_NETDEBUG is not set
226CONFIG_PACKET=y
227CONFIG_PACKET_MMAP=y
228CONFIG_UNIX=y
229CONFIG_XFRM=y
230CONFIG_XFRM_USER=m
231CONFIG_NET_KEY=y
232CONFIG_INET=y
233# CONFIG_IP_MULTICAST is not set
234# CONFIG_IP_ADVANCED_ROUTER is not set
235CONFIG_IP_FIB_HASH=y
236CONFIG_IP_PNP=y
237CONFIG_IP_PNP_DHCP=y
238CONFIG_IP_PNP_BOOTP=y
239# CONFIG_IP_PNP_RARP is not set
240# CONFIG_NET_IPIP is not set
241# CONFIG_NET_IPGRE is not set
242# CONFIG_ARPD is not set
243# CONFIG_SYN_COOKIES is not set
244# CONFIG_INET_AH is not set
245# CONFIG_INET_ESP is not set
246# CONFIG_INET_IPCOMP is not set
247# CONFIG_INET_XFRM_TUNNEL is not set
248# CONFIG_INET_TUNNEL is not set
249CONFIG_INET_DIAG=y
250CONFIG_INET_TCP_DIAG=y
251# CONFIG_TCP_CONG_ADVANCED is not set
252CONFIG_TCP_CONG_BIC=y
253
254#
255# IP: Virtual Server Configuration
256#
257# CONFIG_IP_VS is not set
258CONFIG_IPV6=m
259# CONFIG_IPV6_PRIVACY is not set
260# CONFIG_IPV6_ROUTER_PREF is not set
261# CONFIG_INET6_AH is not set
262# CONFIG_INET6_ESP is not set
263# CONFIG_INET6_IPCOMP is not set
264# CONFIG_INET6_XFRM_TUNNEL is not set
265# CONFIG_INET6_TUNNEL is not set
266# CONFIG_IPV6_TUNNEL is not set
267CONFIG_NETFILTER=y
268# CONFIG_NETFILTER_DEBUG is not set
269
270#
271# Core Netfilter Configuration
272#
273# CONFIG_NETFILTER_NETLINK is not set
274# CONFIG_NETFILTER_XTABLES is not set
275
276#
277# IP: Netfilter Configuration
278#
279CONFIG_IP_NF_CONNTRACK=m
280CONFIG_IP_NF_CT_ACCT=y
281CONFIG_IP_NF_CONNTRACK_MARK=y
282# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
283# CONFIG_IP_NF_CT_PROTO_SCTP is not set
284CONFIG_IP_NF_FTP=m
285CONFIG_IP_NF_IRC=m
286# CONFIG_IP_NF_NETBIOS_NS is not set
287CONFIG_IP_NF_TFTP=m
288CONFIG_IP_NF_AMANDA=m
289# CONFIG_IP_NF_PPTP is not set
290# CONFIG_IP_NF_H323 is not set
291CONFIG_IP_NF_QUEUE=m
292
293#
294# IPv6: Netfilter Configuration (EXPERIMENTAL)
295#
296# CONFIG_IP6_NF_QUEUE is not set
297
298#
299# DCCP Configuration (EXPERIMENTAL)
300#
301# CONFIG_IP_DCCP is not set
302
303#
304# SCTP Configuration (EXPERIMENTAL)
305#
306# CONFIG_IP_SCTP is not set
307
308#
309# TIPC Configuration (EXPERIMENTAL)
310#
311# CONFIG_TIPC is not set
312# CONFIG_ATM is not set
313# CONFIG_BRIDGE is not set
314CONFIG_VLAN_8021Q=m
315# CONFIG_DECNET is not set
316# CONFIG_LLC2 is not set
317# CONFIG_IPX is not set
318# CONFIG_ATALK is not set
319# CONFIG_X25 is not set
320# CONFIG_LAPB is not set
321# CONFIG_NET_DIVERT is not set
322# CONFIG_ECONET is not set
323# CONFIG_WAN_ROUTER is not set
324
325#
326# QoS and/or fair queueing
327#
328# CONFIG_NET_SCHED is not set
329
330#
331# Network testing
332#
333# CONFIG_NET_PKTGEN is not set
334# CONFIG_HAMRADIO is not set
335CONFIG_IRDA=m
336
337#
338# IrDA protocols
339#
340CONFIG_IRLAN=m
341CONFIG_IRNET=m
342CONFIG_IRCOMM=m
343CONFIG_IRDA_ULTRA=y
344
345#
346# IrDA options
347#
348CONFIG_IRDA_CACHE_LAST_LSAP=y
349CONFIG_IRDA_FAST_RR=y
350# CONFIG_IRDA_DEBUG is not set
351
352#
353# Infrared-port device drivers
354#
355
356#
357# SIR device drivers
358#
359CONFIG_IRTTY_SIR=m
360
361#
362# Dongle support
363#
364# CONFIG_DONGLE is not set
365
366#
367# Old SIR device drivers
368#
369# CONFIG_IRPORT_SIR is not set
370
371#
372# Old Serial dongle support
373#
374
375#
376# FIR device drivers
377#
378# CONFIG_USB_IRDA is not set
379# CONFIG_SIGMATEL_FIR is not set
380# CONFIG_PXA_FICP is not set
381CONFIG_BT=m
382CONFIG_BT_L2CAP=m
383CONFIG_BT_SCO=m
384CONFIG_BT_RFCOMM=m
385CONFIG_BT_RFCOMM_TTY=y
386CONFIG_BT_BNEP=m
387CONFIG_BT_BNEP_MC_FILTER=y
388CONFIG_BT_BNEP_PROTO_FILTER=y
389CONFIG_BT_HIDP=m
390
391#
392# Bluetooth device drivers
393#
394# CONFIG_BT_HCIUSB is not set
395# CONFIG_BT_HCIUART is not set
396# CONFIG_BT_HCIBCM203X is not set
397# CONFIG_BT_HCIBPA10X is not set
398# CONFIG_BT_HCIBFUSB is not set
399# CONFIG_BT_HCIDTL1 is not set
400# CONFIG_BT_HCIBT3C is not set
401# CONFIG_BT_HCIBLUECARD is not set
402# CONFIG_BT_HCIBTUART is not set
403# CONFIG_BT_HCIVHCI is not set
404CONFIG_IEEE80211=m
405# CONFIG_IEEE80211_DEBUG is not set
406CONFIG_IEEE80211_CRYPT_WEP=m
407CONFIG_IEEE80211_CRYPT_CCMP=m
408CONFIG_IEEE80211_CRYPT_TKIP=m
409CONFIG_IEEE80211_SOFTMAC=m
410# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
411CONFIG_WIRELESS_EXT=y
412
413#
414# Device Drivers
415#
416
417#
418# Generic Driver Options
419#
420CONFIG_STANDALONE=y
421CONFIG_PREVENT_FIRMWARE_BUILD=y
422CONFIG_FW_LOADER=y
423
424#
425# Connector - unified userspace <-> kernelspace linker
426#
427CONFIG_CONNECTOR=y
428CONFIG_PROC_EVENTS=y
429
430#
431# Memory Technology Devices (MTD)
432#
433CONFIG_MTD=y
434# CONFIG_MTD_DEBUG is not set
435CONFIG_MTD_CONCAT=y
436CONFIG_MTD_PARTITIONS=y
437CONFIG_MTD_REDBOOT_PARTS=y
438CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
439CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
440CONFIG_MTD_REDBOOT_PARTS_READONLY=y
441# CONFIG_MTD_CMDLINE_PARTS is not set
442# CONFIG_MTD_AFS_PARTS is not set
443
444#
445# User Modules And Translation Layers
446#
447CONFIG_MTD_CHAR=y
448CONFIG_MTD_BLOCK=y
449# CONFIG_FTL is not set
450CONFIG_NFTL=y
451CONFIG_NFTL_RW=y
452CONFIG_INFTL=y
453# CONFIG_RFD_FTL is not set
454
455#
456# RAM/ROM/Flash chip drivers
457#
458CONFIG_MTD_CFI=y
459CONFIG_MTD_JEDECPROBE=y
460CONFIG_MTD_GEN_PROBE=y
461CONFIG_MTD_CFI_ADV_OPTIONS=y
462# CONFIG_MTD_CFI_NOSWAP is not set
463# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
464CONFIG_MTD_CFI_LE_BYTE_SWAP=y
465CONFIG_MTD_CFI_GEOMETRY=y
466CONFIG_MTD_MAP_BANK_WIDTH_1=y
467CONFIG_MTD_MAP_BANK_WIDTH_2=y
468CONFIG_MTD_MAP_BANK_WIDTH_4=y
469# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
470# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
471# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
472CONFIG_MTD_CFI_I1=y
473CONFIG_MTD_CFI_I2=y
474# CONFIG_MTD_CFI_I4 is not set
475# CONFIG_MTD_CFI_I8 is not set
476# CONFIG_MTD_OTP is not set
477CONFIG_MTD_CFI_INTELEXT=y
478CONFIG_MTD_CFI_AMDSTD=y
479# CONFIG_MTD_CFI_STAA is not set
480CONFIG_MTD_CFI_UTIL=y
481# CONFIG_MTD_RAM is not set
482# CONFIG_MTD_ROM is not set
483# CONFIG_MTD_ABSENT is not set
484# CONFIG_MTD_OBSOLETE_CHIPS is not set
485# CONFIG_MTD_XIP is not set
486
487#
488# Mapping drivers for chip access
489#
490CONFIG_MTD_COMPLEX_MAPPINGS=y
491CONFIG_MTD_PHYSMAP=y
492CONFIG_MTD_PHYSMAP_START=0x0
493CONFIG_MTD_PHYSMAP_LEN=0x4000000
494CONFIG_MTD_PHYSMAP_BANKWIDTH=2
495# CONFIG_MTD_TRIZEPS4 is not set
496# CONFIG_MTD_ARM_INTEGRATOR is not set
497# CONFIG_MTD_IMPA7 is not set
498# CONFIG_MTD_SHARP_SL is not set
499# CONFIG_MTD_PLATRAM is not set
500
501#
502# Self-contained MTD device drivers
503#
504# CONFIG_MTD_DATAFLASH is not set
505# CONFIG_MTD_M25P80 is not set
506# CONFIG_MTD_SLRAM is not set
507# CONFIG_MTD_PHRAM is not set
508# CONFIG_MTD_MTDRAM is not set
509# CONFIG_MTD_BLOCK2MTD is not set
510
511#
512# Disk-On-Chip Device Drivers
513#
514# CONFIG_MTD_DOC2000 is not set
515# CONFIG_MTD_DOC2001 is not set
516CONFIG_MTD_DOC2001PLUS=y
517CONFIG_MTD_DOCPROBE=y
518CONFIG_MTD_DOCECC=y
519# CONFIG_MTD_DOCPROBE_ADVANCED is not set
520CONFIG_MTD_DOCPROBE_ADDRESS=0
521
522#
523# NAND Flash Device Drivers
524#
525CONFIG_MTD_NAND=y
526# CONFIG_MTD_NAND_VERIFY_WRITE is not set
527# CONFIG_MTD_NAND_H1900 is not set
528CONFIG_MTD_NAND_IDS=y
529CONFIG_MTD_NAND_DISKONCHIP=y
530# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
531CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
532# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
533# CONFIG_MTD_NAND_SHARPSL is not set
534# CONFIG_MTD_NAND_NANDSIM is not set
535
536#
537# OneNAND Flash Device Drivers
538#
539# CONFIG_MTD_ONENAND is not set
540
541#
542# Parallel port support
543#
544# CONFIG_PARPORT is not set
545
546#
547# Plug and Play support
548#
549
550#
551# Block devices
552#
553# CONFIG_BLK_DEV_COW_COMMON is not set
554CONFIG_BLK_DEV_LOOP=y
555CONFIG_BLK_DEV_CRYPTOLOOP=m
556CONFIG_BLK_DEV_NBD=y
557# CONFIG_BLK_DEV_UB is not set
558CONFIG_BLK_DEV_RAM=y
559CONFIG_BLK_DEV_RAM_COUNT=4
560CONFIG_BLK_DEV_RAM_SIZE=4096
561CONFIG_BLK_DEV_INITRD=y
562# CONFIG_CDROM_PKTCDVD is not set
563# CONFIG_ATA_OVER_ETH is not set
564
565#
566# ATA/ATAPI/MFM/RLL support
567#
568CONFIG_IDE=y
569CONFIG_BLK_DEV_IDE=y
570
571#
572# Please see Documentation/ide.txt for help/info on IDE drives
573#
574# CONFIG_BLK_DEV_IDE_SATA is not set
575CONFIG_BLK_DEV_IDEDISK=y
576CONFIG_IDEDISK_MULTI_MODE=y
577CONFIG_BLK_DEV_IDECS=m
578# CONFIG_BLK_DEV_IDECD is not set
579# CONFIG_BLK_DEV_IDETAPE is not set
580# CONFIG_BLK_DEV_IDEFLOPPY is not set
581# CONFIG_BLK_DEV_IDESCSI is not set
582# CONFIG_IDE_TASK_IOCTL is not set
583
584#
585# IDE chipset support/bugfixes
586#
587CONFIG_IDE_GENERIC=y
588CONFIG_IDE_PXA_CF=y
589CONFIG_IDE_ARM=y
590# CONFIG_BLK_DEV_IDEDMA is not set
591# CONFIG_IDEDMA_AUTO is not set
592# CONFIG_BLK_DEV_HD is not set
593
594#
595# SCSI device support
596#
597# CONFIG_RAID_ATTRS is not set
598CONFIG_SCSI=m
599CONFIG_SCSI_PROC_FS=y
600
601#
602# SCSI support type (disk, tape, CD-ROM)
603#
604CONFIG_BLK_DEV_SD=m
605# CONFIG_CHR_DEV_ST is not set
606# CONFIG_CHR_DEV_OSST is not set
607# CONFIG_BLK_DEV_SR is not set
608CONFIG_CHR_DEV_SG=m
609# CONFIG_CHR_DEV_SCH is not set
610
611#
612# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
613#
614CONFIG_SCSI_MULTI_LUN=y
615# CONFIG_SCSI_CONSTANTS is not set
616# CONFIG_SCSI_LOGGING is not set
617
618#
619# SCSI Transport Attributes
620#
621# CONFIG_SCSI_SPI_ATTRS is not set
622# CONFIG_SCSI_FC_ATTRS is not set
623# CONFIG_SCSI_ISCSI_ATTRS is not set
624# CONFIG_SCSI_SAS_ATTRS is not set
625
626#
627# SCSI low-level drivers
628#
629# CONFIG_ISCSI_TCP is not set
630# CONFIG_SCSI_SATA is not set
631# CONFIG_SCSI_DEBUG is not set
632
633#
634# PCMCIA SCSI adapter support
635#
636# CONFIG_PCMCIA_AHA152X is not set
637# CONFIG_PCMCIA_FDOMAIN is not set
638# CONFIG_PCMCIA_NINJA_SCSI is not set
639# CONFIG_PCMCIA_QLOGIC is not set
640# CONFIG_PCMCIA_SYM53C500 is not set
641
642#
643# Multi-device support (RAID and LVM)
644#
645# CONFIG_MD is not set
646
647#
648# Fusion MPT device support
649#
650# CONFIG_FUSION is not set
651
652#
653# IEEE 1394 (FireWire) support
654#
655
656#
657# I2O device support
658#
659
660#
661# Network device support
662#
663CONFIG_NETDEVICES=y
664# CONFIG_DUMMY is not set
665# CONFIG_BONDING is not set
666# CONFIG_EQUALIZER is not set
667# CONFIG_TUN is not set
668
669#
670# PHY device support
671#
672CONFIG_PHYLIB=y
673
674#
675# MII PHY device drivers
676#
677# CONFIG_MARVELL_PHY is not set
678CONFIG_DAVICOM_PHY=y
679# CONFIG_QSEMI_PHY is not set
680# CONFIG_LXT_PHY is not set
681# CONFIG_CICADA_PHY is not set
682
683#
684# Ethernet (10 or 100Mbit)
685#
686CONFIG_NET_ETHERNET=y
687CONFIG_MII=y
688# CONFIG_SMC91X is not set
689CONFIG_DM9000=y
690
691#
692# Ethernet (1000 Mbit)
693#
694
695#
696# Ethernet (10000 Mbit)
697#
698
699#
700# Token Ring devices
701#
702
703#
704# Wireless LAN (non-hamradio)
705#
706CONFIG_NET_RADIO=y
707# CONFIG_NET_WIRELESS_RTNETLINK is not set
708
709#
710# Obsolete Wireless cards support (pre-802.11)
711#
712# CONFIG_STRIP is not set
713# CONFIG_PCMCIA_WAVELAN is not set
714# CONFIG_PCMCIA_NETWAVE is not set
715
716#
717# Wireless 802.11 Frequency Hopping cards support
718#
719# CONFIG_PCMCIA_RAYCS is not set
720
721#
722# Wireless 802.11b ISA/PCI cards support
723#
724CONFIG_HERMES=m
725# CONFIG_ATMEL is not set
726
727#
728# Wireless 802.11b Pcmcia/Cardbus cards support
729#
730CONFIG_PCMCIA_HERMES=m
731# CONFIG_PCMCIA_SPECTRUM is not set
732CONFIG_AIRO_CS=m
733# CONFIG_PCMCIA_WL3501 is not set
734CONFIG_HOSTAP=m
735CONFIG_HOSTAP_FIRMWARE=y
736CONFIG_HOSTAP_FIRMWARE_NVRAM=y
737CONFIG_HOSTAP_CS=m
738CONFIG_NET_WIRELESS=y
739
740#
741# PCMCIA network device support
742#
743# CONFIG_NET_PCMCIA is not set
744
745#
746# Wan interfaces
747#
748# CONFIG_WAN is not set
749CONFIG_PPP=m
750CONFIG_PPP_MULTILINK=y
751CONFIG_PPP_FILTER=y
752CONFIG_PPP_ASYNC=m
753CONFIG_PPP_SYNC_TTY=m
754CONFIG_PPP_DEFLATE=m
755CONFIG_PPP_BSDCOMP=m
756CONFIG_PPP_MPPE=m
757# CONFIG_PPPOE is not set
758# CONFIG_SLIP is not set
759# CONFIG_SHAPER is not set
760# CONFIG_NETCONSOLE is not set
761# CONFIG_NETPOLL is not set
762# CONFIG_NET_POLL_CONTROLLER is not set
763
764#
765# ISDN subsystem
766#
767# CONFIG_ISDN is not set
768
769#
770# Input device support
771#
772CONFIG_INPUT=y
773
774#
775# Userland interfaces
776#
777CONFIG_INPUT_MOUSEDEV=y
778CONFIG_INPUT_MOUSEDEV_PSAUX=y
779CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
780CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
781# CONFIG_INPUT_JOYDEV is not set
782CONFIG_INPUT_TSDEV=y
783CONFIG_INPUT_TSDEV_SCREEN_X=640
784CONFIG_INPUT_TSDEV_SCREEN_Y=480
785CONFIG_INPUT_EVDEV=y
786# CONFIG_INPUT_EVBUG is not set
787
788#
789# Input Device Drivers
790#
791CONFIG_INPUT_KEYBOARD=y
792CONFIG_KEYBOARD_ATKBD=y
793# CONFIG_KEYBOARD_SUNKBD is not set
794# CONFIG_KEYBOARD_LKKBD is not set
795# CONFIG_KEYBOARD_XTKBD is not set
796# CONFIG_KEYBOARD_NEWTON is not set
797CONFIG_INPUT_MOUSE=y
798# CONFIG_MOUSE_PS2 is not set
799CONFIG_MOUSE_SERIAL=y
800# CONFIG_MOUSE_VSXXXAA is not set
801# CONFIG_INPUT_JOYSTICK is not set
802CONFIG_INPUT_TOUCHSCREEN=y
803# CONFIG_TOUCHSCREEN_ADS7846 is not set
804# CONFIG_TOUCHSCREEN_GUNZE is not set
805# CONFIG_TOUCHSCREEN_ELO is not set
806# CONFIG_TOUCHSCREEN_MTOUCH is not set
807# CONFIG_TOUCHSCREEN_MK712 is not set
808CONFIG_INPUT_MISC=y
809CONFIG_INPUT_UINPUT=m
810
811#
812# Hardware I/O ports
813#
814CONFIG_SERIO=y
815CONFIG_SERIO_SERPORT=y
816CONFIG_SERIO_LIBPS2=y
817# CONFIG_SERIO_RAW is not set
818# CONFIG_GAMEPORT is not set
819
820#
821# Character devices
822#
823CONFIG_VT=y
824CONFIG_VT_CONSOLE=y
825CONFIG_HW_CONSOLE=y
826# CONFIG_SERIAL_NONSTANDARD is not set
827
828#
829# Serial drivers
830#
831# CONFIG_SERIAL_8250 is not set
832
833#
834# Non-8250 serial port support
835#
836CONFIG_SERIAL_PXA=y
837CONFIG_SERIAL_PXA_CONSOLE=y
838CONFIG_SERIAL_CORE=y
839CONFIG_SERIAL_CORE_CONSOLE=y
840CONFIG_UNIX98_PTYS=y
841CONFIG_LEGACY_PTYS=y
842CONFIG_LEGACY_PTY_COUNT=256
843
844#
845# IPMI
846#
847# CONFIG_IPMI_HANDLER is not set
848
849#
850# Watchdog Cards
851#
852CONFIG_WATCHDOG=y
853# CONFIG_WATCHDOG_NOWAYOUT is not set
854
855#
856# Watchdog Device Drivers
857#
858# CONFIG_SOFT_WATCHDOG is not set
859CONFIG_SA1100_WATCHDOG=y
860
861#
862# USB-based Watchdog Cards
863#
864# CONFIG_USBPCWATCHDOG is not set
865# CONFIG_NVRAM is not set
866# CONFIG_DTLK is not set
867# CONFIG_R3964 is not set
868
869#
870# Ftape, the floppy tape device driver
871#
872
873#
874# PCMCIA character devices
875#
876# CONFIG_SYNCLINK_CS is not set
877# CONFIG_CARDMAN_4000 is not set
878# CONFIG_CARDMAN_4040 is not set
879# CONFIG_RAW_DRIVER is not set
880
881#
882# TPM devices
883#
884# CONFIG_TCG_TPM is not set
885# CONFIG_TELCLOCK is not set
886
887#
888# I2C support
889#
890CONFIG_I2C=y
891CONFIG_I2C_CHARDEV=y
892
893#
894# I2C Algorithms
895#
896# CONFIG_I2C_ALGOBIT is not set
897# CONFIG_I2C_ALGOPCF is not set
898# CONFIG_I2C_ALGOPCA is not set
899
900#
901# I2C Hardware Bus support
902#
903CONFIG_I2C_PXA=y
904CONFIG_I2C_PXA_SLAVE=y
905# CONFIG_I2C_PARPORT_LIGHT is not set
906# CONFIG_I2C_STUB is not set
907# CONFIG_I2C_PCA_ISA is not set
908
909#
910# Miscellaneous I2C Chip support
911#
912# CONFIG_SENSORS_DS1337 is not set
913# CONFIG_SENSORS_DS1374 is not set
914CONFIG_SENSORS_EEPROM=m
915# CONFIG_SENSORS_PCF8574 is not set
916# CONFIG_SENSORS_PCA9539 is not set
917# CONFIG_SENSORS_PCF8591 is not set
918# CONFIG_SENSORS_MAX6875 is not set
919# CONFIG_I2C_DEBUG_CORE is not set
920# CONFIG_I2C_DEBUG_ALGO is not set
921# CONFIG_I2C_DEBUG_BUS is not set
922# CONFIG_I2C_DEBUG_CHIP is not set
923
924#
925# SPI support
926#
927CONFIG_SPI=y
928CONFIG_SPI_MASTER=y
929
930#
931# SPI Master Controller Drivers
932#
933# CONFIG_SPI_BITBANG is not set
934CONFIG_SPI_PXA2XX=m
935
936#
937# SPI Protocol Masters
938#
939
940#
941# Dallas's 1-wire bus
942#
943# CONFIG_W1 is not set
944
945#
946# Hardware Monitoring support
947#
948CONFIG_HWMON=y
949# CONFIG_HWMON_VID is not set
950# CONFIG_SENSORS_ADM1021 is not set
951# CONFIG_SENSORS_ADM1025 is not set
952# CONFIG_SENSORS_ADM1026 is not set
953# CONFIG_SENSORS_ADM1031 is not set
954# CONFIG_SENSORS_ADM9240 is not set
955# CONFIG_SENSORS_ASB100 is not set
956# CONFIG_SENSORS_ATXP1 is not set
957# CONFIG_SENSORS_DS1621 is not set
958# CONFIG_SENSORS_F71805F is not set
959# CONFIG_SENSORS_FSCHER is not set
960# CONFIG_SENSORS_FSCPOS is not set
961# CONFIG_SENSORS_GL518SM is not set
962# CONFIG_SENSORS_GL520SM is not set
963# CONFIG_SENSORS_IT87 is not set
964# CONFIG_SENSORS_LM63 is not set
965# CONFIG_SENSORS_LM75 is not set
966# CONFIG_SENSORS_LM77 is not set
967# CONFIG_SENSORS_LM78 is not set
968# CONFIG_SENSORS_LM80 is not set
969# CONFIG_SENSORS_LM83 is not set
970# CONFIG_SENSORS_LM85 is not set
971# CONFIG_SENSORS_LM87 is not set
972# CONFIG_SENSORS_LM90 is not set
973# CONFIG_SENSORS_LM92 is not set
974# CONFIG_SENSORS_MAX1619 is not set
975# CONFIG_SENSORS_PC87360 is not set
976# CONFIG_SENSORS_SMSC47M1 is not set
977# CONFIG_SENSORS_SMSC47B397 is not set
978# CONFIG_SENSORS_W83781D is not set
979# CONFIG_SENSORS_W83792D is not set
980# CONFIG_SENSORS_W83L785TS is not set
981# CONFIG_SENSORS_W83627HF is not set
982# CONFIG_SENSORS_W83627EHF is not set
983# CONFIG_HWMON_DEBUG_CHIP is not set
984
985#
986# Misc devices
987#
988
989#
990# Multimedia Capabilities Port drivers
991#
992CONFIG_UCB1400=y
993CONFIG_UCB1400_TS=y
994
995#
996# LED devices
997#
998CONFIG_NEW_LEDS=y
999CONFIG_LEDS_CLASS=y
1000
1001#
1002# LED drivers
1003#
1004
1005#
1006# LED Triggers
1007#
1008CONFIG_LEDS_TRIGGERS=y
1009CONFIG_LEDS_TRIGGER_TIMER=y
1010CONFIG_LEDS_TRIGGER_IDE_DISK=y
1011
1012#
1013# Multimedia devices
1014#
1015# CONFIG_VIDEO_DEV is not set
1016CONFIG_VIDEO_V4L2=y
1017
1018#
1019# Digital Video Broadcasting Devices
1020#
1021# CONFIG_DVB is not set
1022# CONFIG_USB_DABUSB is not set
1023
1024#
1025# Graphics support
1026#
1027CONFIG_FB=y
1028CONFIG_FB_CFB_FILLRECT=y
1029CONFIG_FB_CFB_COPYAREA=y
1030CONFIG_FB_CFB_IMAGEBLIT=y
1031# CONFIG_FB_MACMODES is not set
1032CONFIG_FB_FIRMWARE_EDID=y
1033# CONFIG_FB_MODE_HELPERS is not set
1034# CONFIG_FB_TILEBLITTING is not set
1035# CONFIG_FB_S1D13XXX is not set
1036CONFIG_FB_PXA=y
1037# CONFIG_FB_PXA_PARAMETERS is not set
1038# CONFIG_FB_VIRTUAL is not set
1039
1040#
1041# Console display driver support
1042#
1043# CONFIG_VGA_CONSOLE is not set
1044CONFIG_DUMMY_CONSOLE=y
1045CONFIG_FRAMEBUFFER_CONSOLE=y
1046CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
1047CONFIG_FONTS=y
1048CONFIG_FONT_8x8=y
1049CONFIG_FONT_8x16=y
1050# CONFIG_FONT_6x11 is not set
1051# CONFIG_FONT_7x14 is not set
1052# CONFIG_FONT_PEARL_8x8 is not set
1053# CONFIG_FONT_ACORN_8x8 is not set
1054# CONFIG_FONT_MINI_4x6 is not set
1055# CONFIG_FONT_SUN8x16 is not set
1056# CONFIG_FONT_SUN12x22 is not set
1057# CONFIG_FONT_10x18 is not set
1058
1059#
1060# Logo configuration
1061#
1062CONFIG_LOGO=y
1063CONFIG_LOGO_LINUX_MONO=y
1064CONFIG_LOGO_LINUX_VGA16=y
1065CONFIG_LOGO_LINUX_CLUT224=y
1066CONFIG_BACKLIGHT_LCD_SUPPORT=y
1067CONFIG_BACKLIGHT_CLASS_DEVICE=y
1068CONFIG_BACKLIGHT_DEVICE=y
1069CONFIG_LCD_CLASS_DEVICE=y
1070CONFIG_LCD_DEVICE=y
1071
1072#
1073# Sound
1074#
1075CONFIG_SOUND=y
1076
1077#
1078# Advanced Linux Sound Architecture
1079#
1080CONFIG_SND=y
1081CONFIG_SND_TIMER=y
1082CONFIG_SND_PCM=y
1083CONFIG_SND_HWDEP=m
1084CONFIG_SND_RAWMIDI=m
1085CONFIG_SND_SEQUENCER=m
1086# CONFIG_SND_SEQ_DUMMY is not set
1087CONFIG_SND_OSSEMUL=y
1088CONFIG_SND_MIXER_OSS=y
1089CONFIG_SND_PCM_OSS=y
1090CONFIG_SND_PCM_OSS_PLUGINS=y
1091# CONFIG_SND_SEQUENCER_OSS is not set
1092# CONFIG_SND_DYNAMIC_MINORS is not set
1093CONFIG_SND_SUPPORT_OLD_API=y
1094CONFIG_SND_VERBOSE_PROCFS=y
1095CONFIG_SND_VERBOSE_PRINTK=y
1096# CONFIG_SND_DEBUG is not set
1097
1098#
1099# Generic devices
1100#
1101CONFIG_SND_AC97_CODEC=y
1102CONFIG_SND_AC97_BUS=y
1103# CONFIG_SND_DUMMY is not set
1104# CONFIG_SND_VIRMIDI is not set
1105# CONFIG_SND_MTPAV is not set
1106# CONFIG_SND_SERIAL_U16550 is not set
1107# CONFIG_SND_MPU401 is not set
1108
1109#
1110# ALSA ARM devices
1111#
1112CONFIG_SND_PXA2XX_PCM=y
1113CONFIG_SND_PXA2XX_AC97=y
1114
1115#
1116# USB devices
1117#
1118CONFIG_SND_USB_AUDIO=m
1119
1120#
1121# PCMCIA devices
1122#
1123# CONFIG_SND_VXPOCKET is not set
1124# CONFIG_SND_PDAUDIOCF is not set
1125
1126#
1127# Open Sound System
1128#
1129# CONFIG_SOUND_PRIME is not set
1130
1131#
1132# USB support
1133#
1134CONFIG_USB_ARCH_HAS_HCD=y
1135CONFIG_USB_ARCH_HAS_OHCI=y
1136# CONFIG_USB_ARCH_HAS_EHCI is not set
1137CONFIG_USB=y
1138# CONFIG_USB_DEBUG is not set
1139
1140#
1141# Miscellaneous USB options
1142#
1143CONFIG_USB_DEVICEFS=y
1144# CONFIG_USB_BANDWIDTH is not set
1145# CONFIG_USB_DYNAMIC_MINORS is not set
1146# CONFIG_USB_SUSPEND is not set
1147# CONFIG_USB_OTG is not set
1148
1149#
1150# USB Host Controller Drivers
1151#
1152# CONFIG_USB_ISP116X_HCD is not set
1153CONFIG_USB_OHCI_HCD=y
1154# CONFIG_USB_OHCI_BIG_ENDIAN is not set
1155CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1156# CONFIG_USB_SL811_HCD is not set
1157
1158#
1159# USB Device Class drivers
1160#
1161# CONFIG_USB_ACM is not set
1162# CONFIG_USB_PRINTER is not set
1163
1164#
1165# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
1166#
1167
1168#
1169# may also be needed; see USB_STORAGE Help for more information
1170#
1171CONFIG_USB_STORAGE=m
1172# CONFIG_USB_STORAGE_DEBUG is not set
1173# CONFIG_USB_STORAGE_DATAFAB is not set
1174# CONFIG_USB_STORAGE_FREECOM is not set
1175# CONFIG_USB_STORAGE_ISD200 is not set
1176# CONFIG_USB_STORAGE_DPCM is not set
1177# CONFIG_USB_STORAGE_USBAT is not set
1178# CONFIG_USB_STORAGE_SDDR09 is not set
1179# CONFIG_USB_STORAGE_SDDR55 is not set
1180# CONFIG_USB_STORAGE_JUMPSHOT is not set
1181# CONFIG_USB_STORAGE_ALAUDA is not set
1182# CONFIG_USB_LIBUSUAL is not set
1183
1184#
1185# USB Input Devices
1186#
1187CONFIG_USB_HID=m
1188CONFIG_USB_HIDINPUT=y
1189# CONFIG_USB_HIDINPUT_POWERBOOK is not set
1190# CONFIG_HID_FF is not set
1191# CONFIG_USB_HIDDEV is not set
1192
1193#
1194# USB HID Boot Protocol drivers
1195#
1196# CONFIG_USB_KBD is not set
1197# CONFIG_USB_MOUSE is not set
1198# CONFIG_USB_AIPTEK is not set
1199# CONFIG_USB_WACOM is not set
1200# CONFIG_USB_ACECAD is not set
1201# CONFIG_USB_KBTAB is not set
1202# CONFIG_USB_POWERMATE is not set
1203CONFIG_USB_TOUCHSCREEN=m
1204# CONFIG_USB_TOUCHSCREEN_EGALAX is not set
1205# CONFIG_USB_TOUCHSCREEN_PANJIT is not set
1206# CONFIG_USB_TOUCHSCREEN_3M is not set
1207# CONFIG_USB_TOUCHSCREEN_ITM is not set
1208# CONFIG_USB_YEALINK is not set
1209# CONFIG_USB_XPAD is not set
1210# CONFIG_USB_ATI_REMOTE is not set
1211# CONFIG_USB_ATI_REMOTE2 is not set
1212# CONFIG_USB_KEYSPAN_REMOTE is not set
1213# CONFIG_USB_APPLETOUCH is not set
1214
1215#
1216# USB Imaging devices
1217#
1218# CONFIG_USB_MDC800 is not set
1219# CONFIG_USB_MICROTEK is not set
1220
1221#
1222# USB Network Adapters
1223#
1224# CONFIG_USB_CATC is not set
1225# CONFIG_USB_KAWETH is not set
1226# CONFIG_USB_PEGASUS is not set
1227# CONFIG_USB_RTL8150 is not set
1228# CONFIG_USB_USBNET is not set
1229# CONFIG_USB_ZD1201 is not set
1230CONFIG_USB_MON=y
1231
1232#
1233# USB port drivers
1234#
1235
1236#
1237# USB Serial Converter support
1238#
1239# CONFIG_USB_SERIAL is not set
1240
1241#
1242# USB Miscellaneous drivers
1243#
1244# CONFIG_USB_EMI62 is not set
1245# CONFIG_USB_EMI26 is not set
1246# CONFIG_USB_AUERSWALD is not set
1247# CONFIG_USB_RIO500 is not set
1248# CONFIG_USB_LEGOTOWER is not set
1249# CONFIG_USB_LCD is not set
1250# CONFIG_USB_LED is not set
1251# CONFIG_USB_CYTHERM is not set
1252# CONFIG_USB_PHIDGETKIT is not set
1253# CONFIG_USB_PHIDGETSERVO is not set
1254# CONFIG_USB_IDMOUSE is not set
1255# CONFIG_USB_LD is not set
1256# CONFIG_USB_TEST is not set
1257
1258#
1259# USB DSL modem support
1260#
1261
1262#
1263# USB Gadget Support
1264#
1265CONFIG_USB_GADGET=y
1266# CONFIG_USB_GADGET_DEBUG_FILES is not set
1267CONFIG_USB_GADGET_SELECTED=y
1268# CONFIG_USB_GADGET_NET2280 is not set
1269# CONFIG_USB_GADGET_PXA2XX is not set
1270# CONFIG_USB_GADGET_GOKU is not set
1271# CONFIG_USB_GADGET_LH7A40X is not set
1272# CONFIG_USB_GADGET_OMAP is not set
1273# CONFIG_USB_GADGET_AT91 is not set
1274CONFIG_USB_GADGET_DUMMY_HCD=y
1275CONFIG_USB_DUMMY_HCD=y
1276CONFIG_USB_GADGET_DUALSPEED=y
1277# CONFIG_USB_ZERO is not set
1278CONFIG_USB_ETH=m
1279CONFIG_USB_ETH_RNDIS=y
1280CONFIG_USB_GADGETFS=m
1281CONFIG_USB_FILE_STORAGE=m
1282# CONFIG_USB_FILE_STORAGE_TEST is not set
1283CONFIG_USB_G_SERIAL=m
1284
1285#
1286# MMC/SD Card support
1287#
1288CONFIG_MMC=y
1289# CONFIG_MMC_DEBUG is not set
1290CONFIG_MMC_BLOCK=y
1291CONFIG_MMC_PXA=y
1292
1293#
1294# Real Time Clock
1295#
1296CONFIG_RTC_LIB=y
1297CONFIG_RTC_CLASS=y
1298CONFIG_RTC_HCTOSYS=y
1299CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1300
1301#
1302# RTC interfaces
1303#
1304CONFIG_RTC_INTF_SYSFS=y
1305CONFIG_RTC_INTF_PROC=y
1306CONFIG_RTC_INTF_DEV=y
1307
1308#
1309# RTC drivers
1310#
1311# CONFIG_RTC_DRV_X1205 is not set
1312# CONFIG_RTC_DRV_DS1672 is not set
1313# CONFIG_RTC_DRV_PCF8563 is not set
1314# CONFIG_RTC_DRV_RS5C372 is not set
1315# CONFIG_RTC_DRV_M48T86 is not set
1316CONFIG_RTC_DRV_SA1100=y
1317# CONFIG_RTC_DRV_TEST is not set
1318
1319#
1320# File systems
1321#
1322CONFIG_EXT2_FS=y
1323CONFIG_EXT2_FS_XATTR=y
1324CONFIG_EXT2_FS_POSIX_ACL=y
1325CONFIG_EXT2_FS_SECURITY=y
1326# CONFIG_EXT2_FS_XIP is not set
1327CONFIG_EXT3_FS=y
1328CONFIG_EXT3_FS_XATTR=y
1329CONFIG_EXT3_FS_POSIX_ACL=y
1330CONFIG_EXT3_FS_SECURITY=y
1331CONFIG_JBD=y
1332# CONFIG_JBD_DEBUG is not set
1333CONFIG_FS_MBCACHE=y
1334# CONFIG_REISERFS_FS is not set
1335# CONFIG_JFS_FS is not set
1336CONFIG_FS_POSIX_ACL=y
1337# CONFIG_XFS_FS is not set
1338# CONFIG_OCFS2_FS is not set
1339# CONFIG_MINIX_FS is not set
1340# CONFIG_ROMFS_FS is not set
1341CONFIG_INOTIFY=y
1342# CONFIG_QUOTA is not set
1343CONFIG_DNOTIFY=y
1344# CONFIG_AUTOFS_FS is not set
1345CONFIG_AUTOFS4_FS=y
1346# CONFIG_FUSE_FS is not set
1347
1348#
1349# CD-ROM/DVD Filesystems
1350#
1351# CONFIG_ISO9660_FS is not set
1352# CONFIG_UDF_FS is not set
1353
1354#
1355# DOS/FAT/NT Filesystems
1356#
1357CONFIG_FAT_FS=m
1358CONFIG_MSDOS_FS=m
1359CONFIG_VFAT_FS=m
1360CONFIG_FAT_DEFAULT_CODEPAGE=437
1361CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-15"
1362# CONFIG_NTFS_FS is not set
1363
1364#
1365# Pseudo filesystems
1366#
1367CONFIG_PROC_FS=y
1368CONFIG_SYSFS=y
1369CONFIG_TMPFS=y
1370# CONFIG_HUGETLB_PAGE is not set
1371CONFIG_RAMFS=y
1372# CONFIG_CONFIGFS_FS is not set
1373
1374#
1375# Miscellaneous filesystems
1376#
1377# CONFIG_ADFS_FS is not set
1378# CONFIG_AFFS_FS is not set
1379# CONFIG_HFS_FS is not set
1380# CONFIG_HFSPLUS_FS is not set
1381# CONFIG_BEFS_FS is not set
1382# CONFIG_BFS_FS is not set
1383# CONFIG_EFS_FS is not set
1384CONFIG_JFFS_FS=y
1385CONFIG_JFFS_FS_VERBOSE=0
1386CONFIG_JFFS_PROC_FS=y
1387CONFIG_JFFS2_FS=y
1388CONFIG_JFFS2_FS_DEBUG=0
1389CONFIG_JFFS2_FS_WRITEBUFFER=y
1390# CONFIG_JFFS2_SUMMARY is not set
1391CONFIG_JFFS2_COMPRESSION_OPTIONS=y
1392CONFIG_JFFS2_ZLIB=y
1393CONFIG_JFFS2_RTIME=y
1394# CONFIG_JFFS2_RUBIN is not set
1395# CONFIG_JFFS2_CMODE_NONE is not set
1396CONFIG_JFFS2_CMODE_PRIORITY=y
1397# CONFIG_JFFS2_CMODE_SIZE is not set
1398# CONFIG_CRAMFS is not set
1399# CONFIG_VXFS_FS is not set
1400# CONFIG_HPFS_FS is not set
1401# CONFIG_QNX4FS_FS is not set
1402# CONFIG_SYSV_FS is not set
1403# CONFIG_UFS_FS is not set
1404
1405#
1406# Network File Systems
1407#
1408CONFIG_NFS_FS=y
1409CONFIG_NFS_V3=y
1410CONFIG_NFS_V3_ACL=y
1411CONFIG_NFS_V4=y
1412# CONFIG_NFS_DIRECTIO is not set
1413CONFIG_NFSD=y
1414CONFIG_NFSD_V2_ACL=y
1415CONFIG_NFSD_V3=y
1416CONFIG_NFSD_V3_ACL=y
1417CONFIG_NFSD_V4=y
1418CONFIG_NFSD_TCP=y
1419CONFIG_ROOT_NFS=y
1420CONFIG_LOCKD=y
1421CONFIG_LOCKD_V4=y
1422CONFIG_EXPORTFS=y
1423CONFIG_NFS_ACL_SUPPORT=y
1424CONFIG_NFS_COMMON=y
1425CONFIG_SUNRPC=y
1426CONFIG_SUNRPC_GSS=y
1427CONFIG_RPCSEC_GSS_KRB5=y
1428# CONFIG_RPCSEC_GSS_SPKM3 is not set
1429CONFIG_SMB_FS=m
1430# CONFIG_SMB_NLS_DEFAULT is not set
1431CONFIG_CIFS=m
1432# CONFIG_CIFS_STATS is not set
1433# CONFIG_CIFS_XATTR is not set
1434# CONFIG_CIFS_EXPERIMENTAL is not set
1435# CONFIG_NCP_FS is not set
1436# CONFIG_CODA_FS is not set
1437# CONFIG_AFS_FS is not set
1438# CONFIG_9P_FS is not set
1439
1440#
1441# Partition Types
1442#
1443CONFIG_PARTITION_ADVANCED=y
1444# CONFIG_ACORN_PARTITION is not set
1445# CONFIG_OSF_PARTITION is not set
1446# CONFIG_AMIGA_PARTITION is not set
1447# CONFIG_ATARI_PARTITION is not set
1448# CONFIG_MAC_PARTITION is not set
1449CONFIG_MSDOS_PARTITION=y
1450# CONFIG_BSD_DISKLABEL is not set
1451# CONFIG_MINIX_SUBPARTITION is not set
1452# CONFIG_SOLARIS_X86_PARTITION is not set
1453# CONFIG_UNIXWARE_DISKLABEL is not set
1454CONFIG_LDM_PARTITION=y
1455# CONFIG_LDM_DEBUG is not set
1456# CONFIG_SGI_PARTITION is not set
1457# CONFIG_ULTRIX_PARTITION is not set
1458# CONFIG_SUN_PARTITION is not set
1459# CONFIG_KARMA_PARTITION is not set
1460# CONFIG_EFI_PARTITION is not set
1461
1462#
1463# Native Language Support
1464#
1465CONFIG_NLS=y
1466CONFIG_NLS_DEFAULT="iso8859-15"
1467CONFIG_NLS_CODEPAGE_437=y
1468# CONFIG_NLS_CODEPAGE_737 is not set
1469# CONFIG_NLS_CODEPAGE_775 is not set
1470CONFIG_NLS_CODEPAGE_850=y
1471# CONFIG_NLS_CODEPAGE_852 is not set
1472# CONFIG_NLS_CODEPAGE_855 is not set
1473# CONFIG_NLS_CODEPAGE_857 is not set
1474# CONFIG_NLS_CODEPAGE_860 is not set
1475# CONFIG_NLS_CODEPAGE_861 is not set
1476# CONFIG_NLS_CODEPAGE_862 is not set
1477# CONFIG_NLS_CODEPAGE_863 is not set
1478# CONFIG_NLS_CODEPAGE_864 is not set
1479# CONFIG_NLS_CODEPAGE_865 is not set
1480# CONFIG_NLS_CODEPAGE_866 is not set
1481# CONFIG_NLS_CODEPAGE_869 is not set
1482# CONFIG_NLS_CODEPAGE_936 is not set
1483# CONFIG_NLS_CODEPAGE_950 is not set
1484# CONFIG_NLS_CODEPAGE_932 is not set
1485# CONFIG_NLS_CODEPAGE_949 is not set
1486# CONFIG_NLS_CODEPAGE_874 is not set
1487# CONFIG_NLS_ISO8859_8 is not set
1488# CONFIG_NLS_CODEPAGE_1250 is not set
1489# CONFIG_NLS_CODEPAGE_1251 is not set
1490CONFIG_NLS_ASCII=y
1491CONFIG_NLS_ISO8859_1=m
1492# CONFIG_NLS_ISO8859_2 is not set
1493# CONFIG_NLS_ISO8859_3 is not set
1494# CONFIG_NLS_ISO8859_4 is not set
1495# CONFIG_NLS_ISO8859_5 is not set
1496# CONFIG_NLS_ISO8859_6 is not set
1497# CONFIG_NLS_ISO8859_7 is not set
1498# CONFIG_NLS_ISO8859_9 is not set
1499# CONFIG_NLS_ISO8859_13 is not set
1500# CONFIG_NLS_ISO8859_14 is not set
1501CONFIG_NLS_ISO8859_15=m
1502# CONFIG_NLS_KOI8_R is not set
1503# CONFIG_NLS_KOI8_U is not set
1504CONFIG_NLS_UTF8=m
1505
1506#
1507# Profiling support
1508#
1509CONFIG_PROFILING=y
1510CONFIG_OPROFILE=y
1511
1512#
1513# Kernel hacking
1514#
1515# CONFIG_PRINTK_TIME is not set
1516CONFIG_MAGIC_SYSRQ=y
1517# CONFIG_DEBUG_KERNEL is not set
1518CONFIG_LOG_BUF_SHIFT=14
1519# CONFIG_DEBUG_BUGVERBOSE is not set
1520# CONFIG_DEBUG_FS is not set
1521CONFIG_FRAME_POINTER=y
1522# CONFIG_UNWIND_INFO is not set
1523CONFIG_DEBUG_USER=y
1524
1525#
1526# Security options
1527#
1528CONFIG_KEYS=y
1529CONFIG_KEYS_DEBUG_PROC_KEYS=y
1530CONFIG_SECURITY=y
1531# CONFIG_SECURITY_NETWORK is not set
1532CONFIG_SECURITY_CAPABILITIES=y
1533# CONFIG_SECURITY_ROOTPLUG is not set
1534# CONFIG_SECURITY_SECLVL is not set
1535
1536#
1537# Cryptographic options
1538#
1539CONFIG_CRYPTO=y
1540# CONFIG_CRYPTO_HMAC is not set
1541# CONFIG_CRYPTO_NULL is not set
1542CONFIG_CRYPTO_MD4=y
1543CONFIG_CRYPTO_MD5=y
1544CONFIG_CRYPTO_SHA1=m
1545CONFIG_CRYPTO_SHA256=m
1546CONFIG_CRYPTO_SHA512=m
1547# CONFIG_CRYPTO_WP512 is not set
1548# CONFIG_CRYPTO_TGR192 is not set
1549CONFIG_CRYPTO_DES=y
1550# CONFIG_CRYPTO_BLOWFISH is not set
1551# CONFIG_CRYPTO_TWOFISH is not set
1552# CONFIG_CRYPTO_SERPENT is not set
1553CONFIG_CRYPTO_AES=m
1554# CONFIG_CRYPTO_CAST5 is not set
1555# CONFIG_CRYPTO_CAST6 is not set
1556# CONFIG_CRYPTO_TEA is not set
1557CONFIG_CRYPTO_ARC4=m
1558# CONFIG_CRYPTO_KHAZAD is not set
1559# CONFIG_CRYPTO_ANUBIS is not set
1560CONFIG_CRYPTO_DEFLATE=m
1561CONFIG_CRYPTO_MICHAEL_MIC=m
1562CONFIG_CRYPTO_CRC32C=y
1563# CONFIG_CRYPTO_TEST is not set
1564
1565#
1566# Hardware crypto devices
1567#
1568
1569#
1570# Library routines
1571#
1572CONFIG_CRC_CCITT=y
1573CONFIG_CRC16=y
1574CONFIG_CRC32=y
1575CONFIG_LIBCRC32C=y
1576CONFIG_ZLIB_INFLATE=y
1577CONFIG_ZLIB_DEFLATE=y
1578CONFIG_REED_SOLOMON=y
1579CONFIG_REED_SOLOMON_DEC16=y
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 7cffbaef064..f0c0cdb1c18 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -25,7 +25,7 @@ obj-$(CONFIG_OABI_COMPAT) += sys_oabi-compat.o
25obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o 25obj-$(CONFIG_CRUNCH) += crunch.o crunch-bits.o
26AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312 26AFLAGS_crunch-bits.o := -Wa,-mcpu=ep9312
27 27
28obj-$(CONFIG_IWMMXT) += iwmmxt.o 28obj-$(CONFIG_IWMMXT) += iwmmxt.o iwmmxt-notifier.o
29AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt 29AFLAGS_iwmmxt.o := -Wa,-mcpu=iwmmxt
30 30
31ifneq ($(CONFIG_ARCH_EBSA110),y) 31ifneq ($(CONFIG_ARCH_EBSA110),y)
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c
index 2bed290fec7..33c55689f99 100644
--- a/arch/arm/kernel/apm.c
+++ b/arch/arm/kernel/apm.c
@@ -10,7 +10,6 @@
10 * [This document is available from Microsoft at: 10 * [This document is available from Microsoft at:
11 * http://www.microsoft.com/hwdev/busbios/amp_12.htm] 11 * http://www.microsoft.com/hwdev/busbios/amp_12.htm]
12 */ 12 */
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/poll.h> 14#include <linux/poll.h>
16#include <linux/timer.h> 15#include <linux/timer.h>
diff --git a/arch/arm/kernel/asm-offsets.c b/arch/arm/kernel/asm-offsets.c
index 447ede5143a..cc2d58d028e 100644
--- a/arch/arm/kernel/asm-offsets.c
+++ b/arch/arm/kernel/asm-offsets.c
@@ -105,6 +105,7 @@ int main(void)
105 BLANK(); 105 BLANK();
106 DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list)); 106 DEFINE(PROC_INFO_SZ, sizeof(struct proc_info_list));
107 DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush)); 107 DEFINE(PROCINFO_INITFUNC, offsetof(struct proc_info_list, __cpu_flush));
108 DEFINE(PROCINFO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mmu_flags)); 108 DEFINE(PROCINFO_MM_MMUFLAGS, offsetof(struct proc_info_list, __cpu_mm_mmu_flags));
109 DEFINE(PROCINFO_IO_MMUFLAGS, offsetof(struct proc_info_list, __cpu_io_mmu_flags));
109 return 0; 110 return 0;
110} 111}
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 45da06fc1ba..964faac104f 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * Bits taken from various places. 6 * Bits taken from various places.
7 */ 7 */
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/pci.h> 10#include <linux/pci.h>
diff --git a/arch/arm/kernel/compat.c b/arch/arm/kernel/compat.c
index 60cfa7f3226..0a1385442f4 100644
--- a/arch/arm/kernel/compat.c
+++ b/arch/arm/kernel/compat.c
@@ -15,7 +15,6 @@
15 * the kernel for 5 years from now (2001). This will allow boot loaders 15 * the kernel for 5 years from now (2001). This will allow boot loaders
16 * to convert to the new struct tag way. 16 * to convert to the new struct tag way.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/string.h> 20#include <linux/string.h>
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S
index da280bae3d0..a5747e58a9d 100644
--- a/arch/arm/kernel/debug.S
+++ b/arch/arm/kernel/debug.S
@@ -9,7 +9,6 @@
9 * 9 *
10 * 32-bit debugging code 10 * 32-bit debugging code
11 */ 11 */
12#include <linux/config.h>
13#include <linux/linkage.h> 12#include <linux/linkage.h>
14 13
15 .text 14 .text
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c
index 00aa225e8d9..ab4ad9562ee 100644
--- a/arch/arm/kernel/ecard.c
+++ b/arch/arm/kernel/ecard.c
@@ -27,7 +27,6 @@
27 */ 27 */
28#define ECARD_C 28#define ECARD_C
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/types.h> 32#include <linux/types.h>
@@ -620,7 +619,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
620 ecard_t *ec = slot_to_ecard(slot); 619 ecard_t *ec = slot_to_ecard(slot);
621 620
622 if (ec->claimed) { 621 if (ec->claimed) {
623 struct irqdesc *d = irqdesc + ec->irq; 622 struct irq_desc *d = irq_desc + ec->irq;
624 /* 623 /*
625 * this ugly code is so that we can operate a 624 * this ugly code is so that we can operate a
626 * prioritorising system: 625 * prioritorising system:
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S
index 6423a38839b..7ea5f01dfc7 100644
--- a/arch/arm/kernel/entry-armv.S
+++ b/arch/arm/kernel/entry-armv.S
@@ -14,7 +14,6 @@
14 * Note: there is a StrongARM bug in the STMIA rn, {regs}^ instruction that causes 14 * Note: there is a StrongARM bug in the STMIA rn, {regs}^ instruction that causes
15 * it to save wrong values... Be aware! 15 * it to save wrong values... Be aware!
16 */ 16 */
17#include <linux/config.h>
18 17
19#include <asm/memory.h> 18#include <asm/memory.h>
20#include <asm/glue.h> 19#include <asm/glue.h>
@@ -590,9 +589,7 @@ ENTRY(__switch_to)
590#ifdef CONFIG_MMU 589#ifdef CONFIG_MMU
591 mcr p15, 0, r6, c3, c0, 0 @ Set domain register 590 mcr p15, 0, r6, c3, c0, 0 @ Set domain register
592#endif 591#endif
593#if defined(CONFIG_IWMMXT) 592#if defined(CONFIG_CPU_XSCALE) && !defined(CONFIG_IWMMXT)
594 bl iwmmxt_task_switch
595#elif defined(CONFIG_CPU_XSCALE)
596 add r4, r2, #TI_CPU_DOMAIN + 40 @ cpu_context_save->extra 593 add r4, r2, #TI_CPU_DOMAIN + 40 @ cpu_context_save->extra
597 ldmib r4, {r4, r5} 594 ldmib r4, {r4, r5}
598 mar acc0, r4, r5 595 mar acc0, r4, r5
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 75af6d6e2f2..6f5e7c50d42 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11 10
12#include <asm/unistd.h> 11#include <asm/unistd.h>
13 12
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S
index f1c2fd5b63e..87ab4e15799 100644
--- a/arch/arm/kernel/entry-header.S
+++ b/arch/arm/kernel/entry-header.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/init.h> 1#include <linux/init.h>
3#include <linux/linkage.h> 2#include <linux/linkage.h>
4 3
diff --git a/arch/arm/kernel/fiq.c b/arch/arm/kernel/fiq.c
index 1ec3f7faa25..e8e90346f11 100644
--- a/arch/arm/kernel/fiq.c
+++ b/arch/arm/kernel/fiq.c
@@ -38,6 +38,7 @@
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/kernel.h> 39#include <linux/kernel.h>
40#include <linux/init.h> 40#include <linux/init.h>
41#include <linux/interrupt.h>
41#include <linux/seq_file.h> 42#include <linux/seq_file.h>
42 43
43#include <asm/cacheflush.h> 44#include <asm/cacheflush.h>
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S
index 2af7e44218a..ac9eb3d3051 100644
--- a/arch/arm/kernel/head-nommu.S
+++ b/arch/arm/kernel/head-nommu.S
@@ -12,7 +12,6 @@
12 * for 32-bit CPUs which has a process ID register(CP15). 12 * for 32-bit CPUs which has a process ID register(CP15).
13 * 13 *
14 */ 14 */
15#include <linux/config.h>
16#include <linux/linkage.h> 15#include <linux/linkage.h>
17#include <linux/init.h> 16#include <linux/init.h>
18 17
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 330b9476c39..2242f5f7cb7 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -11,7 +11,6 @@
11 * 11 *
12 * Kernel startup code for all 32-bit CPUs 12 * Kernel startup code for all 32-bit CPUs
13 */ 13 */
14#include <linux/config.h>
15#include <linux/linkage.h> 14#include <linux/linkage.h>
16#include <linux/init.h> 15#include <linux/init.h>
17 16
@@ -221,7 +220,7 @@ __create_page_tables:
221 teq r0, r6 220 teq r0, r6
222 bne 1b 221 bne 1b
223 222
224 ldr r7, [r10, #PROCINFO_MMUFLAGS] @ mmuflags 223 ldr r7, [r10, #PROCINFO_MM_MMUFLAGS] @ mm_mmuflags
225 224
226 /* 225 /*
227 * Create identity mapping for first MB of kernel to 226 * Create identity mapping for first MB of kernel to
@@ -272,8 +271,7 @@ __create_page_tables:
272#endif 271#endif
273 272
274#ifdef CONFIG_DEBUG_LL 273#ifdef CONFIG_DEBUG_LL
275 bic r7, r7, #0x0c @ turn off cacheable 274 ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags
276 @ and bufferable bits
277 /* 275 /*
278 * Map in IO space for serial debugging. 276 * Map in IO space for serial debugging.
279 * This allows debug messages to be output 277 * This allows debug messages to be output
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index ec20f8935e8..c3d4e94ef5b 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -21,12 +21,12 @@
21 * IRQ's are in fact implemented a bit like signal handlers for the kernel. 21 * IRQ's are in fact implemented a bit like signal handlers for the kernel.
22 * Naturally it's not a 1:1 relation, but there are similarities. 22 * Naturally it's not a 1:1 relation, but there are similarities.
23 */ 23 */
24#include <linux/config.h>
25#include <linux/kernel_stat.h> 24#include <linux/kernel_stat.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/signal.h> 26#include <linux/signal.h>
28#include <linux/ioport.h> 27#include <linux/ioport.h>
29#include <linux/interrupt.h> 28#include <linux/interrupt.h>
29#include <linux/irq.h>
30#include <linux/ptrace.h> 30#include <linux/ptrace.h>
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/random.h> 32#include <linux/random.h>
@@ -38,192 +38,18 @@
38#include <linux/kallsyms.h> 38#include <linux/kallsyms.h>
39#include <linux/proc_fs.h> 39#include <linux/proc_fs.h>
40 40
41#include <asm/irq.h>
42#include <asm/system.h> 41#include <asm/system.h>
43#include <asm/mach/irq.h>
44#include <asm/mach/time.h> 42#include <asm/mach/time.h>
45 43
46/* 44/*
47 * Maximum IRQ count. Currently, this is arbitary. However, it should
48 * not be set too low to prevent false triggering. Conversely, if it
49 * is set too high, then you could miss a stuck IRQ.
50 *
51 * Maybe we ought to set a timer and re-enable the IRQ at a later time?
52 */
53#define MAX_IRQ_CNT 100000
54
55static int noirqdebug __read_mostly;
56static volatile unsigned long irq_err_count;
57static DEFINE_SPINLOCK(irq_controller_lock);
58static LIST_HEAD(irq_pending);
59
60struct irqdesc irq_desc[NR_IRQS];
61void (*init_arch_irq)(void) __initdata = NULL;
62
63/*
64 * No architecture-specific irq_finish function defined in arm/arch/irqs.h. 45 * No architecture-specific irq_finish function defined in arm/arch/irqs.h.
65 */ 46 */
66#ifndef irq_finish 47#ifndef irq_finish
67#define irq_finish(irq) do { } while (0) 48#define irq_finish(irq) do { } while (0)
68#endif 49#endif
69 50
70/* 51void (*init_arch_irq)(void) __initdata = NULL;
71 * Dummy mask/unmask handler 52unsigned long irq_err_count;
72 */
73void dummy_mask_unmask_irq(unsigned int irq)
74{
75}
76
77irqreturn_t no_action(int irq, void *dev_id, struct pt_regs *regs)
78{
79 return IRQ_NONE;
80}
81
82void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
83{
84 irq_err_count++;
85 printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq);
86}
87
88static struct irqchip bad_chip = {
89 .ack = dummy_mask_unmask_irq,
90 .mask = dummy_mask_unmask_irq,
91 .unmask = dummy_mask_unmask_irq,
92};
93
94static struct irqdesc bad_irq_desc = {
95 .chip = &bad_chip,
96 .handle = do_bad_IRQ,
97 .pend = LIST_HEAD_INIT(bad_irq_desc.pend),
98 .disable_depth = 1,
99};
100
101#ifdef CONFIG_SMP
102void synchronize_irq(unsigned int irq)
103{
104 struct irqdesc *desc = irq_desc + irq;
105
106 while (desc->running)
107 barrier();
108}
109EXPORT_SYMBOL(synchronize_irq);
110
111#define smp_set_running(desc) do { desc->running = 1; } while (0)
112#define smp_clear_running(desc) do { desc->running = 0; } while (0)
113#else
114#define smp_set_running(desc) do { } while (0)
115#define smp_clear_running(desc) do { } while (0)
116#endif
117
118/**
119 * disable_irq_nosync - disable an irq without waiting
120 * @irq: Interrupt to disable
121 *
122 * Disable the selected interrupt line. Enables and disables
123 * are nested. We do this lazily.
124 *
125 * This function may be called from IRQ context.
126 */
127void disable_irq_nosync(unsigned int irq)
128{
129 struct irqdesc *desc = irq_desc + irq;
130 unsigned long flags;
131
132 spin_lock_irqsave(&irq_controller_lock, flags);
133 desc->disable_depth++;
134 list_del_init(&desc->pend);
135 spin_unlock_irqrestore(&irq_controller_lock, flags);
136}
137EXPORT_SYMBOL(disable_irq_nosync);
138
139/**
140 * disable_irq - disable an irq and wait for completion
141 * @irq: Interrupt to disable
142 *
143 * Disable the selected interrupt line. Enables and disables
144 * are nested. This functions waits for any pending IRQ
145 * handlers for this interrupt to complete before returning.
146 * If you use this function while holding a resource the IRQ
147 * handler may need you will deadlock.
148 *
149 * This function may be called - with care - from IRQ context.
150 */
151void disable_irq(unsigned int irq)
152{
153 struct irqdesc *desc = irq_desc + irq;
154
155 disable_irq_nosync(irq);
156 if (desc->action)
157 synchronize_irq(irq);
158}
159EXPORT_SYMBOL(disable_irq);
160
161/**
162 * enable_irq - enable interrupt handling on an irq
163 * @irq: Interrupt to enable
164 *
165 * Re-enables the processing of interrupts on this IRQ line.
166 * Note that this may call the interrupt handler, so you may
167 * get unexpected results if you hold IRQs disabled.
168 *
169 * This function may be called from IRQ context.
170 */
171void enable_irq(unsigned int irq)
172{
173 struct irqdesc *desc = irq_desc + irq;
174 unsigned long flags;
175
176 spin_lock_irqsave(&irq_controller_lock, flags);
177 if (unlikely(!desc->disable_depth)) {
178 printk("enable_irq(%u) unbalanced from %p\n", irq,
179 __builtin_return_address(0));
180 } else if (!--desc->disable_depth) {
181 desc->probing = 0;
182 desc->chip->unmask(irq);
183
184 /*
185 * If the interrupt is waiting to be processed,
186 * try to re-run it. We can't directly run it
187 * from here since the caller might be in an
188 * interrupt-protected region.
189 */
190 if (desc->pending && list_empty(&desc->pend)) {
191 desc->pending = 0;
192 if (!desc->chip->retrigger ||
193 desc->chip->retrigger(irq))
194 list_add(&desc->pend, &irq_pending);
195 }
196 }
197 spin_unlock_irqrestore(&irq_controller_lock, flags);
198}
199EXPORT_SYMBOL(enable_irq);
200
201/*
202 * Enable wake on selected irq
203 */
204void enable_irq_wake(unsigned int irq)
205{
206 struct irqdesc *desc = irq_desc + irq;
207 unsigned long flags;
208
209 spin_lock_irqsave(&irq_controller_lock, flags);
210 if (desc->chip->set_wake)
211 desc->chip->set_wake(irq, 1);
212 spin_unlock_irqrestore(&irq_controller_lock, flags);
213}
214EXPORT_SYMBOL(enable_irq_wake);
215
216void disable_irq_wake(unsigned int irq)
217{
218 struct irqdesc *desc = irq_desc + irq;
219 unsigned long flags;
220
221 spin_lock_irqsave(&irq_controller_lock, flags);
222 if (desc->chip->set_wake)
223 desc->chip->set_wake(irq, 0);
224 spin_unlock_irqrestore(&irq_controller_lock, flags);
225}
226EXPORT_SYMBOL(disable_irq_wake);
227 53
228int show_interrupts(struct seq_file *p, void *v) 54int show_interrupts(struct seq_file *p, void *v)
229{ 55{
@@ -243,8 +69,8 @@ int show_interrupts(struct seq_file *p, void *v)
243 } 69 }
244 70
245 if (i < NR_IRQS) { 71 if (i < NR_IRQS) {
246 spin_lock_irqsave(&irq_controller_lock, flags); 72 spin_lock_irqsave(&irq_desc[i].lock, flags);
247 action = irq_desc[i].action; 73 action = irq_desc[i].action;
248 if (!action) 74 if (!action)
249 goto unlock; 75 goto unlock;
250 76
@@ -257,7 +83,7 @@ int show_interrupts(struct seq_file *p, void *v)
257 83
258 seq_putc(p, '\n'); 84 seq_putc(p, '\n');
259unlock: 85unlock:
260 spin_unlock_irqrestore(&irq_controller_lock, flags); 86 spin_unlock_irqrestore(&irq_desc[i].lock, flags);
261 } else if (i == NR_IRQS) { 87 } else if (i == NR_IRQS) {
262#ifdef CONFIG_ARCH_ACORN 88#ifdef CONFIG_ARCH_ACORN
263 show_fiq_list(p, v); 89 show_fiq_list(p, v);
@@ -271,267 +97,11 @@ unlock:
271 return 0; 97 return 0;
272} 98}
273 99
274/* 100/* Handle bad interrupts */
275 * IRQ lock detection. 101static struct irq_desc bad_irq_desc = {
276 * 102 .handle_irq = handle_bad_irq,
277 * Hopefully, this should get us out of a few locked situations. 103 .lock = SPIN_LOCK_UNLOCKED
278 * However, it may take a while for this to happen, since we need 104};
279 * a large number if IRQs to appear in the same jiffie with the
280 * same instruction pointer (or within 2 instructions).
281 */
282static int check_irq_lock(struct irqdesc *desc, int irq, struct pt_regs *regs)
283{
284 unsigned long instr_ptr = instruction_pointer(regs);
285
286 if (desc->lck_jif == jiffies &&
287 desc->lck_pc >= instr_ptr && desc->lck_pc < instr_ptr + 8) {
288 desc->lck_cnt += 1;
289
290 if (desc->lck_cnt > MAX_IRQ_CNT) {
291 printk(KERN_ERR "IRQ LOCK: IRQ%d is locking the system, disabled\n", irq);
292 return 1;
293 }
294 } else {
295 desc->lck_cnt = 0;
296 desc->lck_pc = instruction_pointer(regs);
297 desc->lck_jif = jiffies;
298 }
299 return 0;
300}
301
302static void
303report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int ret)
304{
305 static int count = 100;
306 struct irqaction *action;
307
308 if (noirqdebug)
309 return;
310
311 if (ret != IRQ_HANDLED && ret != IRQ_NONE) {
312 if (!count)
313 return;
314 count--;
315 printk("irq%u: bogus retval mask %x\n", irq, ret);
316 } else {
317 desc->irqs_unhandled++;
318 if (desc->irqs_unhandled <= 99900)
319 return;
320 desc->irqs_unhandled = 0;
321 printk("irq%u: nobody cared\n", irq);
322 }
323 show_regs(regs);
324 dump_stack();
325 printk(KERN_ERR "handlers:");
326 action = desc->action;
327 do {
328 printk("\n" KERN_ERR "[<%p>]", action->handler);
329 print_symbol(" (%s)", (unsigned long)action->handler);
330 action = action->next;
331 } while (action);
332 printk("\n");
333}
334
335static int
336__do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
337{
338 unsigned int status;
339 int ret, retval = 0;
340
341 spin_unlock(&irq_controller_lock);
342
343#ifdef CONFIG_NO_IDLE_HZ
344 if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) {
345 spin_lock(&system_timer->dyn_tick->lock);
346 if (system_timer->dyn_tick->state & DYN_TICK_ENABLED)
347 system_timer->dyn_tick->handler(irq, 0, regs);
348 spin_unlock(&system_timer->dyn_tick->lock);
349 }
350#endif
351
352 if (!(action->flags & SA_INTERRUPT))
353 local_irq_enable();
354
355 status = 0;
356 do {
357 ret = action->handler(irq, action->dev_id, regs);
358 if (ret == IRQ_HANDLED)
359 status |= action->flags;
360 retval |= ret;
361 action = action->next;
362 } while (action);
363
364 if (status & SA_SAMPLE_RANDOM)
365 add_interrupt_randomness(irq);
366
367 spin_lock_irq(&irq_controller_lock);
368
369 return retval;
370}
371
372/*
373 * This is for software-decoded IRQs. The caller is expected to
374 * handle the ack, clear, mask and unmask issues.
375 */
376void
377do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
378{
379 struct irqaction *action;
380 const unsigned int cpu = smp_processor_id();
381
382 desc->triggered = 1;
383
384 kstat_cpu(cpu).irqs[irq]++;
385
386 smp_set_running(desc);
387
388 action = desc->action;
389 if (action) {
390 int ret = __do_irq(irq, action, regs);
391 if (ret != IRQ_HANDLED)
392 report_bad_irq(irq, regs, desc, ret);
393 }
394
395 smp_clear_running(desc);
396}
397
398/*
399 * Most edge-triggered IRQ implementations seem to take a broken
400 * approach to this. Hence the complexity.
401 */
402void
403do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
404{
405 const unsigned int cpu = smp_processor_id();
406
407 desc->triggered = 1;
408
409 /*
410 * If we're currently running this IRQ, or its disabled,
411 * we shouldn't process the IRQ. Instead, turn on the
412 * hardware masks.
413 */
414 if (unlikely(desc->running || desc->disable_depth))
415 goto running;
416
417 /*
418 * Acknowledge and clear the IRQ, but don't mask it.
419 */
420 desc->chip->ack(irq);
421
422 /*
423 * Mark the IRQ currently in progress.
424 */
425 desc->running = 1;
426
427 kstat_cpu(cpu).irqs[irq]++;
428
429 do {
430 struct irqaction *action;
431
432 action = desc->action;
433 if (!action)
434 break;
435
436 if (desc->pending && !desc->disable_depth) {
437 desc->pending = 0;
438 desc->chip->unmask(irq);
439 }
440
441 __do_irq(irq, action, regs);
442 } while (desc->pending && !desc->disable_depth);
443
444 desc->running = 0;
445
446 /*
447 * If we were disabled or freed, shut down the handler.
448 */
449 if (likely(desc->action && !check_irq_lock(desc, irq, regs)))
450 return;
451
452 running:
453 /*
454 * We got another IRQ while this one was masked or
455 * currently running. Delay it.
456 */
457 desc->pending = 1;
458 desc->chip->mask(irq);
459 desc->chip->ack(irq);
460}
461
462/*
463 * Level-based IRQ handler. Nice and simple.
464 */
465void
466do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
467{
468 struct irqaction *action;
469 const unsigned int cpu = smp_processor_id();
470
471 desc->triggered = 1;
472
473 /*
474 * Acknowledge, clear _AND_ disable the interrupt.
475 */
476 desc->chip->ack(irq);
477
478 if (likely(!desc->disable_depth)) {
479 kstat_cpu(cpu).irqs[irq]++;
480
481 smp_set_running(desc);
482
483 /*
484 * Return with this interrupt masked if no action
485 */
486 action = desc->action;
487 if (action) {
488 int ret = __do_irq(irq, desc->action, regs);
489
490 if (ret != IRQ_HANDLED)
491 report_bad_irq(irq, regs, desc, ret);
492
493 if (likely(!desc->disable_depth &&
494 !check_irq_lock(desc, irq, regs)))
495 desc->chip->unmask(irq);
496 }
497
498 smp_clear_running(desc);
499 }
500}
501
502static void do_pending_irqs(struct pt_regs *regs)
503{
504 struct list_head head, *l, *n;
505
506 do {
507 struct irqdesc *desc;
508
509 /*
510 * First, take the pending interrupts off the list.
511 * The act of calling the handlers may add some IRQs
512 * back onto the list.
513 */
514 head = irq_pending;
515 INIT_LIST_HEAD(&irq_pending);
516 head.next->prev = &head;
517 head.prev->next = &head;
518
519 /*
520 * Now run each entry. We must delete it from our
521 * list before calling the handler.
522 */
523 list_for_each_safe(l, n, &head) {
524 desc = list_entry(l, struct irqdesc, pend);
525 list_del_init(&desc->pend);
526 desc_handle_irq(desc - irq_desc, desc, regs);
527 }
528
529 /*
530 * The list must be empty.
531 */
532 BUG_ON(!list_empty(&head));
533 } while (!list_empty(&irq_pending));
534}
535 105
536/* 106/*
537 * do_IRQ handles all hardware IRQ's. Decoded IRQs should not 107 * do_IRQ handles all hardware IRQ's. Decoded IRQs should not
@@ -550,96 +120,15 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
550 desc = &bad_irq_desc; 120 desc = &bad_irq_desc;
551 121
552 irq_enter(); 122 irq_enter();
553 spin_lock(&irq_controller_lock);
554 desc_handle_irq(irq, desc, regs);
555 123
556 /* 124 desc_handle_irq(irq, desc, regs);
557 * Now re-run any pending interrupts.
558 */
559 if (!list_empty(&irq_pending))
560 do_pending_irqs(regs);
561 125
126 /* AT91 specific workaround */
562 irq_finish(irq); 127 irq_finish(irq);
563 128
564 spin_unlock(&irq_controller_lock);
565 irq_exit(); 129 irq_exit();
566} 130}
567 131
568void __set_irq_handler(unsigned int irq, irq_handler_t handle, int is_chained)
569{
570 struct irqdesc *desc;
571 unsigned long flags;
572
573 if (irq >= NR_IRQS) {
574 printk(KERN_ERR "Trying to install handler for IRQ%d\n", irq);
575 return;
576 }
577
578 if (handle == NULL)
579 handle = do_bad_IRQ;
580
581 desc = irq_desc + irq;
582
583 if (is_chained && desc->chip == &bad_chip)
584 printk(KERN_WARNING "Trying to install chained handler for IRQ%d\n", irq);
585
586 spin_lock_irqsave(&irq_controller_lock, flags);
587 if (handle == do_bad_IRQ) {
588 desc->chip->mask(irq);
589 desc->chip->ack(irq);
590 desc->disable_depth = 1;
591 }
592 desc->handle = handle;
593 if (handle != do_bad_IRQ && is_chained) {
594 desc->valid = 0;
595 desc->probe_ok = 0;
596 desc->disable_depth = 0;
597 desc->chip->unmask(irq);
598 }
599 spin_unlock_irqrestore(&irq_controller_lock, flags);
600}
601
602void set_irq_chip(unsigned int irq, struct irqchip *chip)
603{
604 struct irqdesc *desc;
605 unsigned long flags;
606
607 if (irq >= NR_IRQS) {
608 printk(KERN_ERR "Trying to install chip for IRQ%d\n", irq);
609 return;
610 }
611
612 if (chip == NULL)
613 chip = &bad_chip;
614
615 desc = irq_desc + irq;
616 spin_lock_irqsave(&irq_controller_lock, flags);
617 desc->chip = chip;
618 spin_unlock_irqrestore(&irq_controller_lock, flags);
619}
620
621int set_irq_type(unsigned int irq, unsigned int type)
622{
623 struct irqdesc *desc;
624 unsigned long flags;
625 int ret = -ENXIO;
626
627 if (irq >= NR_IRQS) {
628 printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq);
629 return -ENODEV;
630 }
631
632 desc = irq_desc + irq;
633 if (desc->chip->set_type) {
634 spin_lock_irqsave(&irq_controller_lock, flags);
635 ret = desc->chip->set_type(irq, type);
636 spin_unlock_irqrestore(&irq_controller_lock, flags);
637 }
638
639 return ret;
640}
641EXPORT_SYMBOL(set_irq_type);
642
643void set_irq_flags(unsigned int irq, unsigned int iflags) 132void set_irq_flags(unsigned int irq, unsigned int iflags)
644{ 133{
645 struct irqdesc *desc; 134 struct irqdesc *desc;
@@ -651,421 +140,32 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
651 } 140 }
652 141
653 desc = irq_desc + irq; 142 desc = irq_desc + irq;
654 spin_lock_irqsave(&irq_controller_lock, flags); 143 spin_lock_irqsave(&desc->lock, flags);
655 desc->valid = (iflags & IRQF_VALID) != 0; 144 desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
656 desc->probe_ok = (iflags & IRQF_PROBE) != 0; 145 if (iflags & IRQF_VALID)
657 desc->noautoenable = (iflags & IRQF_NOAUTOEN) != 0; 146 desc->status &= ~IRQ_NOREQUEST;
658 spin_unlock_irqrestore(&irq_controller_lock, flags); 147 if (iflags & IRQF_PROBE)
659} 148 desc->status &= ~IRQ_NOPROBE;
660 149 if (!(iflags & IRQF_NOAUTOEN))
661int setup_irq(unsigned int irq, struct irqaction *new) 150 desc->status &= ~IRQ_NOAUTOEN;
662{ 151 spin_unlock_irqrestore(&desc->lock, flags);
663 int shared = 0;
664 struct irqaction *old, **p;
665 unsigned long flags;
666 struct irqdesc *desc;
667
668 /*
669 * Some drivers like serial.c use request_irq() heavily,
670 * so we have to be careful not to interfere with a
671 * running system.
672 */
673 if (new->flags & SA_SAMPLE_RANDOM) {
674 /*
675 * This function might sleep, we want to call it first,
676 * outside of the atomic block.
677 * Yes, this might clear the entropy pool if the wrong
678 * driver is attempted to be loaded, without actually
679 * installing a new handler, but is this really a problem,
680 * only the sysadmin is able to do this.
681 */
682 rand_initialize_irq(irq);
683 }
684
685 /*
686 * The following block of code has to be executed atomically
687 */
688 desc = irq_desc + irq;
689 spin_lock_irqsave(&irq_controller_lock, flags);
690 p = &desc->action;
691 if ((old = *p) != NULL) {
692 /*
693 * Can't share interrupts unless both agree to and are
694 * the same type.
695 */
696 if (!(old->flags & new->flags & SA_SHIRQ) ||
697 (~old->flags & new->flags) & SA_TRIGGER_MASK) {
698 spin_unlock_irqrestore(&irq_controller_lock, flags);
699 return -EBUSY;
700 }
701
702 /* add new interrupt at end of irq queue */
703 do {
704 p = &old->next;
705 old = *p;
706 } while (old);
707 shared = 1;
708 }
709
710 *p = new;
711
712 if (!shared) {
713 desc->probing = 0;
714 desc->running = 0;
715 desc->pending = 0;
716 desc->disable_depth = 1;
717
718 if (new->flags & SA_TRIGGER_MASK &&
719 desc->chip->set_type) {
720 unsigned int type = new->flags & SA_TRIGGER_MASK;
721 desc->chip->set_type(irq, type);
722 }
723
724 if (!desc->noautoenable) {
725 desc->disable_depth = 0;
726 desc->chip->unmask(irq);
727 }
728 }
729
730 spin_unlock_irqrestore(&irq_controller_lock, flags);
731 return 0;
732}
733
734/**
735 * request_irq - allocate an interrupt line
736 * @irq: Interrupt line to allocate
737 * @handler: Function to be called when the IRQ occurs
738 * @irqflags: Interrupt type flags
739 * @devname: An ascii name for the claiming device
740 * @dev_id: A cookie passed back to the handler function
741 *
742 * This call allocates interrupt resources and enables the
743 * interrupt line and IRQ handling. From the point this
744 * call is made your handler function may be invoked. Since
745 * your handler function must clear any interrupt the board
746 * raises, you must take care both to initialise your hardware
747 * and to set up the interrupt handler in the right order.
748 *
749 * Dev_id must be globally unique. Normally the address of the
750 * device data structure is used as the cookie. Since the handler
751 * receives this value it makes sense to use it.
752 *
753 * If your interrupt is shared you must pass a non NULL dev_id
754 * as this is required when freeing the interrupt.
755 *
756 * Flags:
757 *
758 * SA_SHIRQ Interrupt is shared
759 *
760 * SA_INTERRUPT Disable local interrupts while processing
761 *
762 * SA_SAMPLE_RANDOM The interrupt can be used for entropy
763 *
764 */
765int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
766 unsigned long irq_flags, const char * devname, void *dev_id)
767{
768 unsigned long retval;
769 struct irqaction *action;
770
771 if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler ||
772 (irq_flags & SA_SHIRQ && !dev_id))
773 return -EINVAL;
774
775 action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL);
776 if (!action)
777 return -ENOMEM;
778
779 action->handler = handler;
780 action->flags = irq_flags;
781 cpus_clear(action->mask);
782 action->name = devname;
783 action->next = NULL;
784 action->dev_id = dev_id;
785
786 retval = setup_irq(irq, action);
787
788 if (retval)
789 kfree(action);
790 return retval;
791}
792
793EXPORT_SYMBOL(request_irq);
794
795/**
796 * free_irq - free an interrupt
797 * @irq: Interrupt line to free
798 * @dev_id: Device identity to free
799 *
800 * Remove an interrupt handler. The handler is removed and if the
801 * interrupt line is no longer in use by any driver it is disabled.
802 * On a shared IRQ the caller must ensure the interrupt is disabled
803 * on the card it drives before calling this function.
804 *
805 * This function must not be called from interrupt context.
806 */
807void free_irq(unsigned int irq, void *dev_id)
808{
809 struct irqaction * action, **p;
810 unsigned long flags;
811
812 if (irq >= NR_IRQS || !irq_desc[irq].valid) {
813 printk(KERN_ERR "Trying to free IRQ%d\n",irq);
814 dump_stack();
815 return;
816 }
817
818 spin_lock_irqsave(&irq_controller_lock, flags);
819 for (p = &irq_desc[irq].action; (action = *p) != NULL; p = &action->next) {
820 if (action->dev_id != dev_id)
821 continue;
822
823 /* Found it - now free it */
824 *p = action->next;
825 break;
826 }
827 spin_unlock_irqrestore(&irq_controller_lock, flags);
828
829 if (!action) {
830 printk(KERN_ERR "Trying to free free IRQ%d\n",irq);
831 dump_stack();
832 } else {
833 synchronize_irq(irq);
834 kfree(action);
835 }
836}
837
838EXPORT_SYMBOL(free_irq);
839
840static DECLARE_MUTEX(probe_sem);
841
842/* Start the interrupt probing. Unlike other architectures,
843 * we don't return a mask of interrupts from probe_irq_on,
844 * but return the number of interrupts enabled for the probe.
845 * The interrupts which have been enabled for probing is
846 * instead recorded in the irq_desc structure.
847 */
848unsigned long probe_irq_on(void)
849{
850 unsigned int i, irqs = 0;
851 unsigned long delay;
852
853 down(&probe_sem);
854
855 /*
856 * first snaffle up any unassigned but
857 * probe-able interrupts
858 */
859 spin_lock_irq(&irq_controller_lock);
860 for (i = 0; i < NR_IRQS; i++) {
861 if (!irq_desc[i].probe_ok || irq_desc[i].action)
862 continue;
863
864 irq_desc[i].probing = 1;
865 irq_desc[i].triggered = 0;
866 if (irq_desc[i].chip->set_type)
867 irq_desc[i].chip->set_type(i, IRQT_PROBE);
868 irq_desc[i].chip->unmask(i);
869 irqs += 1;
870 }
871 spin_unlock_irq(&irq_controller_lock);
872
873 /*
874 * wait for spurious interrupts to mask themselves out again
875 */
876 for (delay = jiffies + HZ/10; time_before(jiffies, delay); )
877 /* min 100ms delay */;
878
879 /*
880 * now filter out any obviously spurious interrupts
881 */
882 spin_lock_irq(&irq_controller_lock);
883 for (i = 0; i < NR_IRQS; i++) {
884 if (irq_desc[i].probing && irq_desc[i].triggered) {
885 irq_desc[i].probing = 0;
886 irqs -= 1;
887 }
888 }
889 spin_unlock_irq(&irq_controller_lock);
890
891 return irqs;
892}
893
894EXPORT_SYMBOL(probe_irq_on);
895
896unsigned int probe_irq_mask(unsigned long irqs)
897{
898 unsigned int mask = 0, i;
899
900 spin_lock_irq(&irq_controller_lock);
901 for (i = 0; i < 16 && i < NR_IRQS; i++)
902 if (irq_desc[i].probing && irq_desc[i].triggered)
903 mask |= 1 << i;
904 spin_unlock_irq(&irq_controller_lock);
905
906 up(&probe_sem);
907
908 return mask;
909}
910EXPORT_SYMBOL(probe_irq_mask);
911
912/*
913 * Possible return values:
914 * >= 0 - interrupt number
915 * -1 - no interrupt/many interrupts
916 */
917int probe_irq_off(unsigned long irqs)
918{
919 unsigned int i;
920 int irq_found = NO_IRQ;
921
922 /*
923 * look at the interrupts, and find exactly one
924 * that we were probing has been triggered
925 */
926 spin_lock_irq(&irq_controller_lock);
927 for (i = 0; i < NR_IRQS; i++) {
928 if (irq_desc[i].probing &&
929 irq_desc[i].triggered) {
930 if (irq_found != NO_IRQ) {
931 irq_found = NO_IRQ;
932 goto out;
933 }
934 irq_found = i;
935 }
936 }
937
938 if (irq_found == -1)
939 irq_found = NO_IRQ;
940out:
941 spin_unlock_irq(&irq_controller_lock);
942
943 up(&probe_sem);
944
945 return irq_found;
946}
947
948EXPORT_SYMBOL(probe_irq_off);
949
950#ifdef CONFIG_SMP
951static void route_irq(struct irqdesc *desc, unsigned int irq, unsigned int cpu)
952{
953 pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu);
954
955 spin_lock_irq(&irq_controller_lock);
956 desc->cpu = cpu;
957 desc->chip->set_cpu(desc, irq, cpu);
958 spin_unlock_irq(&irq_controller_lock);
959}
960
961#ifdef CONFIG_PROC_FS
962static int
963irq_affinity_read_proc(char *page, char **start, off_t off, int count,
964 int *eof, void *data)
965{
966 struct irqdesc *desc = irq_desc + ((int)data);
967 int len = cpumask_scnprintf(page, count, desc->affinity);
968
969 if (count - len < 2)
970 return -EINVAL;
971 page[len++] = '\n';
972 page[len] = '\0';
973
974 return len;
975}
976
977static int
978irq_affinity_write_proc(struct file *file, const char __user *buffer,
979 unsigned long count, void *data)
980{
981 unsigned int irq = (unsigned int)data;
982 struct irqdesc *desc = irq_desc + irq;
983 cpumask_t affinity, tmp;
984 int ret = -EIO;
985
986 if (!desc->chip->set_cpu)
987 goto out;
988
989 ret = cpumask_parse(buffer, count, affinity);
990 if (ret)
991 goto out;
992
993 cpus_and(tmp, affinity, cpu_online_map);
994 if (cpus_empty(tmp)) {
995 ret = -EINVAL;
996 goto out;
997 }
998
999 desc->affinity = affinity;
1000 route_irq(desc, irq, first_cpu(tmp));
1001 ret = count;
1002
1003 out:
1004 return ret;
1005}
1006#endif
1007#endif
1008
1009void __init init_irq_proc(void)
1010{
1011#if defined(CONFIG_SMP) && defined(CONFIG_PROC_FS)
1012 struct proc_dir_entry *dir;
1013 int irq;
1014
1015 dir = proc_mkdir("irq", NULL);
1016 if (!dir)
1017 return;
1018
1019 for (irq = 0; irq < NR_IRQS; irq++) {
1020 struct proc_dir_entry *entry;
1021 struct irqdesc *desc;
1022 char name[16];
1023
1024 desc = irq_desc + irq;
1025 memset(name, 0, sizeof(name));
1026 snprintf(name, sizeof(name) - 1, "%u", irq);
1027
1028 desc->procdir = proc_mkdir(name, dir);
1029 if (!desc->procdir)
1030 continue;
1031
1032 entry = create_proc_entry("smp_affinity", 0600, desc->procdir);
1033 if (entry) {
1034 entry->nlink = 1;
1035 entry->data = (void *)irq;
1036 entry->read_proc = irq_affinity_read_proc;
1037 entry->write_proc = irq_affinity_write_proc;
1038 }
1039 }
1040#endif
1041} 152}
1042 153
1043void __init init_IRQ(void) 154void __init init_IRQ(void)
1044{ 155{
1045 struct irqdesc *desc;
1046 int irq; 156 int irq;
1047 157
158 for (irq = 0; irq < NR_IRQS; irq++)
159 irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_DELAYED_DISABLE |
160 IRQ_NOPROBE;
161
1048#ifdef CONFIG_SMP 162#ifdef CONFIG_SMP
1049 bad_irq_desc.affinity = CPU_MASK_ALL; 163 bad_irq_desc.affinity = CPU_MASK_ALL;
1050 bad_irq_desc.cpu = smp_processor_id(); 164 bad_irq_desc.cpu = smp_processor_id();
1051#endif 165#endif
1052
1053 for (irq = 0, desc = irq_desc; irq < NR_IRQS; irq++, desc++) {
1054 *desc = bad_irq_desc;
1055 INIT_LIST_HEAD(&desc->pend);
1056 }
1057
1058 init_arch_irq(); 166 init_arch_irq();
1059} 167}
1060 168
1061static int __init noirqdebug_setup(char *str)
1062{
1063 noirqdebug = 1;
1064 return 1;
1065}
1066
1067__setup("noirqdebug", noirqdebug_setup);
1068
1069#ifdef CONFIG_HOTPLUG_CPU 169#ifdef CONFIG_HOTPLUG_CPU
1070/* 170/*
1071 * The CPU has been marked offline. Migrate IRQs off this CPU. If 171 * The CPU has been marked offline. Migrate IRQs off this CPU. If
diff --git a/arch/arm/kernel/iwmmxt-notifier.c b/arch/arm/kernel/iwmmxt-notifier.c
new file mode 100644
index 00000000000..44a86c33796
--- /dev/null
+++ b/arch/arm/kernel/iwmmxt-notifier.c
@@ -0,0 +1,64 @@
1/*
2 * linux/arch/arm/kernel/iwmmxt-notifier.c
3 *
4 * XScale iWMMXt (Concan) context switching and handling
5 *
6 * Initial code:
7 * Copyright (c) 2003, Intel Corporation
8 *
9 * Full lazy switching support, optimizations and more, by Nicolas Pitre
10 * Copyright (c) 2003-2004, MontaVista Software, Inc.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
17#include <linux/module.h>
18#include <linux/config.h>
19#include <linux/types.h>
20#include <linux/kernel.h>
21#include <linux/signal.h>
22#include <linux/sched.h>
23#include <linux/init.h>
24#include <asm/thread_notify.h>
25#include <asm/io.h>
26
27static int iwmmxt_do(struct notifier_block *self, unsigned long cmd, void *t)
28{
29 struct thread_info *thread = t;
30
31 switch (cmd) {
32 case THREAD_NOTIFY_FLUSH:
33 /*
34 * flush_thread() zeroes thread->fpstate, so no need
35 * to do anything here.
36 *
37 * FALLTHROUGH: Ensure we don't try to overwrite our newly
38 * initialised state information on the first fault.
39 */
40
41 case THREAD_NOTIFY_RELEASE:
42 iwmmxt_task_release(thread);
43 break;
44
45 case THREAD_NOTIFY_SWITCH:
46 iwmmxt_task_switch(thread);
47 break;
48 }
49
50 return NOTIFY_DONE;
51}
52
53static struct notifier_block iwmmxt_notifier_block = {
54 .notifier_call = iwmmxt_do,
55};
56
57static int __init iwmmxt_init(void)
58{
59 thread_register_notifier(&iwmmxt_notifier_block);
60
61 return 0;
62}
63
64late_initcall(iwmmxt_init);
diff --git a/arch/arm/kernel/iwmmxt.S b/arch/arm/kernel/iwmmxt.S
index a3bae95e536..b63b528f22a 100644
--- a/arch/arm/kernel/iwmmxt.S
+++ b/arch/arm/kernel/iwmmxt.S
@@ -271,30 +271,27 @@ ENTRY(iwmmxt_task_restore)
271/* 271/*
272 * Concan handling on task switch 272 * Concan handling on task switch
273 * 273 *
274 * r0 = previous task_struct pointer (must be preserved) 274 * r0 = next thread_info pointer
275 * r1 = previous thread_info pointer
276 * r2 = next thread_info pointer (must be preserved)
277 * 275 *
278 * Called only from __switch_to with task preemption disabled. 276 * Called only from the iwmmxt notifier with task preemption disabled.
279 * No need to care about preserving r4 and above.
280 */ 277 */
281ENTRY(iwmmxt_task_switch) 278ENTRY(iwmmxt_task_switch)
282 279
283 mrc p15, 0, r4, c15, c1, 0 280 mrc p15, 0, r1, c15, c1, 0
284 tst r4, #0x3 @ CP0 and CP1 accessible? 281 tst r1, #0x3 @ CP0 and CP1 accessible?
285 bne 1f @ yes: block them for next task 282 bne 1f @ yes: block them for next task
286 283
287 ldr r5, =concan_owner 284 ldr r2, =concan_owner
288 add r6, r2, #TI_IWMMXT_STATE @ get next task Concan save area 285 add r3, r0, #TI_IWMMXT_STATE @ get next task Concan save area
289 ldr r5, [r5] @ get current Concan owner 286 ldr r2, [r2] @ get current Concan owner
290 teq r5, r6 @ next task owns it? 287 teq r2, r3 @ next task owns it?
291 movne pc, lr @ no: leave Concan disabled 288 movne pc, lr @ no: leave Concan disabled
292 289
2931: eor r4, r4, #3 @ flip Concan access 2901: eor r1, r1, #3 @ flip Concan access
294 mcr p15, 0, r4, c15, c1, 0 291 mcr p15, 0, r1, c15, c1, 0
295 292
296 mrc p15, 0, r4, c2, c0, 0 293 mrc p15, 0, r1, c2, c0, 0
297 sub pc, lr, r4, lsr #32 @ cpwait and return 294 sub pc, lr, r1, lsr #32 @ cpwait and return
298 295
299/* 296/*
300 * Remove Concan ownership of given task 297 * Remove Concan ownership of given task
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 055bf5d2889..298363d9704 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * Module allocation method suggested by Andi Kleen. 10 * Module allocation method suggested by Andi Kleen.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/moduleloader.h> 13#include <linux/moduleloader.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index e1c77ee885a..3079535afcc 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -10,7 +10,6 @@
10 */ 10 */
11#include <stdarg.h> 11#include <stdarg.h>
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
@@ -353,9 +352,6 @@ void flush_thread(void)
353 memset(&thread->fpstate, 0, sizeof(union fp_state)); 352 memset(&thread->fpstate, 0, sizeof(union fp_state));
354 353
355 thread_notify(THREAD_NOTIFY_FLUSH, thread); 354 thread_notify(THREAD_NOTIFY_FLUSH, thread);
356#if defined(CONFIG_IWMMXT)
357 iwmmxt_task_release(thread);
358#endif
359} 355}
360 356
361void release_thread(struct task_struct *dead_task) 357void release_thread(struct task_struct *dead_task)
@@ -363,9 +359,6 @@ void release_thread(struct task_struct *dead_task)
363 struct thread_info *thread = task_thread_info(dead_task); 359 struct thread_info *thread = task_thread_info(dead_task);
364 360
365 thread_notify(THREAD_NOTIFY_RELEASE, thread); 361 thread_notify(THREAD_NOTIFY_RELEASE, thread);
366#if defined(CONFIG_IWMMXT)
367 iwmmxt_task_release(thread);
368#endif
369} 362}
370 363
371asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); 364asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index c40bdc77005..9254ba2f46f 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -9,7 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 6bdf70def01..7d6a516c0b9 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
@@ -345,9 +344,9 @@ static void __init setup_processor(void)
345 cpu_cache = *list->cache; 344 cpu_cache = *list->cache;
346#endif 345#endif
347 346
348 printk("CPU: %s [%08x] revision %d (ARMv%s)\n", 347 printk("CPU: %s [%08x] revision %d (ARMv%s), cr=%08x\n",
349 cpu_name, processor_id, (int)processor_id & 15, 348 cpu_name, processor_id, (int)processor_id & 15,
350 proc_arch[cpu_architecture()]); 349 proc_arch[cpu_architecture()], cr_alignment);
351 350
352 sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); 351 sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS);
353 sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); 352 sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 83a8d3c95eb..48cf7fffddf 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/signal.h> 11#include <linux/signal.h>
13#include <linux/ptrace.h> 12#include <linux/ptrace.h>
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 1370d726dc1..68e9634d260 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/delay.h> 10#include <linux/delay.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/spinlock.h> 12#include <linux/spinlock.h>
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c
index 9c12d4fefbd..09a67d77185 100644
--- a/arch/arm/kernel/time.c
+++ b/arch/arm/kernel/time.c
@@ -16,7 +16,6 @@
16 * 1998-12-20 Updated NTP code according to technical memorandum Jan '96 16 * 1998-12-20 Updated NTP code according to technical memorandum Jan '96
17 * "A Kernel Model for Precision Timekeeping" by Dave Mills 17 * "A Kernel Model for Precision Timekeeping" by Dave Mills
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/interrupt.h> 21#include <linux/interrupt.h>
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 35230a06010..35a052fc177 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -12,7 +12,6 @@
12 * 'linux/arch/arm/lib/traps.S'. Mostly a debugging aid, but will probably 12 * 'linux/arch/arm/lib/traps.S'. Mostly a debugging aid, but will probably
13 * kill the offending process. 13 * kill the offending process.
14 */ 14 */
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/signal.h> 16#include <linux/signal.h>
18#include <linux/spinlock.h> 17#include <linux/spinlock.h>
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 2df9688a702..3ca574ee277 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -4,7 +4,6 @@
4 */ 4 */
5 5
6#include <asm-generic/vmlinux.lds.h> 6#include <asm-generic/vmlinux.lds.h>
7#include <linux/config.h>
8#include <asm/thread_info.h> 7#include <asm/thread_info.h>
9#include <asm/memory.h> 8#include <asm/memory.h>
10 9
diff --git a/arch/arm/lib/backtrace.S b/arch/arm/lib/backtrace.S
index 91f993f2e9d..74230083cbf 100644
--- a/arch/arm/lib/backtrace.S
+++ b/arch/arm/lib/backtrace.S
@@ -10,7 +10,6 @@
10 * 27/03/03 Ian Molton Clean up CONFIG_CPU 10 * 27/03/03 Ian Molton Clean up CONFIG_CPU
11 * 11 *
12 */ 12 */
13#include <linux/config.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/assembler.h> 14#include <asm/assembler.h>
16 .text 15 .text
diff --git a/arch/arm/lib/bitops.h b/arch/arm/lib/bitops.h
index b8c14e93669..54225102174 100644
--- a/arch/arm/lib/bitops.h
+++ b/arch/arm/lib/bitops.h
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_CPU_32v6K) 2#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_CPU_32v6K)
4 .macro bitop, instr 3 .macro bitop, instr
diff --git a/arch/arm/lib/ucmpdi2.S b/arch/arm/lib/ucmpdi2.S
index d847a62834c..f76de07ac18 100644
--- a/arch/arm/lib/ucmpdi2.S
+++ b/arch/arm/lib/ucmpdi2.S
@@ -10,7 +10,6 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15 14
16#ifdef __ARMEB__ 15#ifdef __ARMEB__
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c
index 65be5efd633..baa997c857d 100644
--- a/arch/arm/mach-aaec2000/core.c
+++ b/arch/arm/mach-aaec2000/core.c
@@ -9,7 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
@@ -143,7 +142,7 @@ aaec2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
143 142
144static struct irqaction aaec2000_timer_irq = { 143static struct irqaction aaec2000_timer_irq = {
145 .name = "AAEC-2000 Timer Tick", 144 .name = "AAEC-2000 Timer Tick",
146 .flags = SA_INTERRUPT | SA_TIMER, 145 .flags = IRQF_DISABLED | IRQF_TIMER,
147 .handler = aaec2000_timer_interrupt, 146 .handler = aaec2000_timer_interrupt,
148}; 147};
149 148
diff --git a/arch/arm/mach-at91rm9200/Kconfig b/arch/arm/mach-at91rm9200/Kconfig
index 70d402f76ce..2f85e8693b1 100644
--- a/arch/arm/mach-at91rm9200/Kconfig
+++ b/arch/arm/mach-at91rm9200/Kconfig
@@ -1,6 +1,21 @@
1if ARCH_AT91RM9200 1if ARCH_AT91
2
3menu "Atmel AT91 System-on-Chip"
4
5comment "Atmel AT91 Processors"
6
7config ARCH_AT91RM9200
8 bool "AT91RM9200"
2 9
3menu "AT91RM9200 Implementations" 10config ARCH_AT91SAM9260
11 bool "AT91SAM9260"
12
13config ARCH_AT91SAM9261
14 bool "AT91SAM9261"
15
16# ----------------------------------------------------------
17
18if ARCH_AT91RM9200
4 19
5comment "AT91RM9200 Board Type" 20comment "AT91RM9200 Board Type"
6 21
@@ -8,58 +23,87 @@ config MACH_ONEARM
8 bool "Ajeco 1ARM Single Board Computer" 23 bool "Ajeco 1ARM Single Board Computer"
9 depends on ARCH_AT91RM9200 24 depends on ARCH_AT91RM9200
10 help 25 help
11 Select this if you are using Ajeco's 1ARM Single Board Computer 26 Select this if you are using Ajeco's 1ARM Single Board Computer.
27 <http://www.ajeco.fi/products.htm>
12 28
13config ARCH_AT91RM9200DK 29config ARCH_AT91RM9200DK
14 bool "Atmel AT91RM9200-DK Development board" 30 bool "Atmel AT91RM9200-DK Development board"
15 depends on ARCH_AT91RM9200 31 depends on ARCH_AT91RM9200
16 help 32 help
17 Select this if you are using Atmel's AT91RM9200-DK Development board 33 Select this if you are using Atmel's AT91RM9200-DK Development board.
34 (Discontinued)
35
18 36
19config MACH_AT91RM9200EK 37config MACH_AT91RM9200EK
20 bool "Atmel AT91RM9200-EK Evaluation Kit" 38 bool "Atmel AT91RM9200-EK Evaluation Kit"
21 depends on ARCH_AT91RM9200 39 depends on ARCH_AT91RM9200
22 help 40 help
23 Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit 41 Select this if you are using Atmel's AT91RM9200-EK Evaluation Kit.
42 <http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3507>
24 43
25config MACH_CSB337 44config MACH_CSB337
26 bool "Cogent CSB337 board" 45 bool "Cogent CSB337"
27 depends on ARCH_AT91RM9200 46 depends on ARCH_AT91RM9200
28 help 47 help
29 Select this if you are using Cogent's CSB337 board 48 Select this if you are using Cogent's CSB337 board.
49 <http://www.cogcomp.com/csb_csb337.htm>
30 50
31config MACH_CSB637 51config MACH_CSB637
32 bool "Cogent CSB637 board" 52 bool "Cogent CSB637"
33 depends on ARCH_AT91RM9200 53 depends on ARCH_AT91RM9200
34 help 54 help
35 Select this if you are using Cogent's CSB637 board 55 Select this if you are using Cogent's CSB637 board.
56 <http://www.cogcomp.com/csb_csb637.htm>
36 57
37config MACH_CARMEVA 58config MACH_CARMEVA
38 bool "Conitec's ARM&EVA" 59 bool "Conitec ARM&EVA"
39 depends on ARCH_AT91RM9200 60 depends on ARCH_AT91RM9200
40 help 61 help
41 Select this if you are using Conitec's AT91RM9200-MCU-Module 62 Select this if you are using Conitec's AT91RM9200-MCU-Module.
63 <http://www.conitec.net/english/linuxboard.htm>
42 64
43config MACH_KB9200 65config MACH_ATEB9200
44 bool "KwikByte's KB920x" 66 bool "Embest ATEB9200"
45 depends on ARCH_AT91RM9200 67 depends on ARCH_AT91RM9200
46 help 68 help
47 Select this if you are using KwikByte's KB920x board 69 Select this if you are using Embest's ATEB9200 board.
70 <http://www.embedinfo.com/english/product/ATEB9200.asp>
48 71
49config MACH_ATEB9200 72config MACH_KB9200
50 bool "Embest's ATEB9200" 73 bool "KwikByte KB920x"
51 depends on ARCH_AT91RM9200 74 depends on ARCH_AT91RM9200
52 help 75 help
53 Select this if you are using Embest's ATEB9200 board 76 Select this if you are using KwikByte's KB920x board.
77 <http://kwikbyte.com/KB9202_description_new.htm>
54 78
55config MACH_KAFA 79config MACH_KAFA
56 bool "Sperry-Sun KAFA board" 80 bool "Sperry-Sun KAFA board"
57 depends on ARCH_AT91RM9200 81 depends on ARCH_AT91RM9200
58 help 82 help
59 Select this if you are using Sperry-Sun's KAFA board 83 Select this if you are using Sperry-Sun's KAFA board.
84
85endif
86
87# ----------------------------------------------------------
88
89if ARCH_AT91SAM9260
90
91comment "AT91SAM9260 Board Type"
92
93endif
94
95# ----------------------------------------------------------
96
97if ARCH_AT91SAM9261
98
99comment "AT91SAM9261 Board Type"
100
101endif
102
60 103
104# ----------------------------------------------------------
61 105
62comment "AT91RM9200 Feature Selections" 106comment "AT91 Feature Selections"
63 107
64config AT91_PROGRAMMABLE_CLOCKS 108config AT91_PROGRAMMABLE_CLOCKS
65 bool "Programmable Clocks" 109 bool "Programmable Clocks"
diff --git a/arch/arm/mach-at91rm9200/Makefile b/arch/arm/mach-at91rm9200/Makefile
index 82db957322d..c174805c24e 100644
--- a/arch/arm/mach-at91rm9200/Makefile
+++ b/arch/arm/mach-at91rm9200/Makefile
@@ -2,14 +2,19 @@
2# Makefile for the linux kernel. 2# Makefile for the linux kernel.
3# 3#
4 4
5obj-y := clock.o irq.o time.o gpio.o common.o devices.o 5obj-y := clock.o irq.o gpio.o devices.o
6obj-m := 6obj-m :=
7obj-n := 7obj-n :=
8obj- := 8obj- :=
9 9
10obj-$(CONFIG_PM) += pm.o 10obj-$(CONFIG_PM) += pm.o
11 11
12# Board-specific support 12# CPU-specific support
13obj-$(CONFIG_ARCH_AT91RM9200) += at91rm9200.o at91rm9200_time.o
14obj-$(CONFIG_ARCH_AT91SAM9260) +=
15obj-$(CONFIG_ARCH_AT91SAM9261) +=
16
17# AT91RM9200 Board-specific support
13obj-$(CONFIG_MACH_ONEARM) += board-1arm.o 18obj-$(CONFIG_MACH_ONEARM) += board-1arm.o
14obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o 19obj-$(CONFIG_ARCH_AT91RM9200DK) += board-dk.o
15obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o 20obj-$(CONFIG_MACH_AT91RM9200EK) += board-ek.o
@@ -20,6 +25,10 @@ obj-$(CONFIG_MACH_KB9200) += board-kb9202.o
20obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o 25obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o
21obj-$(CONFIG_MACH_KAFA) += board-kafa.o 26obj-$(CONFIG_MACH_KAFA) += board-kafa.o
22 27
28# AT91SAM9260 board-specific support
29
30# AT91SAM9261 board-specific support
31
23# LEDs support 32# LEDs support
24led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o 33led-$(CONFIG_ARCH_AT91RM9200DK) += leds.o
25led-$(CONFIG_MACH_AT91RM9200EK) += leds.o 34led-$(CONFIG_MACH_AT91RM9200EK) += leds.o
diff --git a/arch/arm/mach-at91rm9200/common.c b/arch/arm/mach-at91rm9200/at91rm9200.c
index e836f8537a1..7e1d072bdd8 100644
--- a/arch/arm/mach-at91rm9200/common.c
+++ b/arch/arm/mach-at91rm9200/at91rm9200.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * arch/arm/mach-at91rm9200/common.c 2 * arch/arm/mach-at91rm9200/at91rm9200.c
3 * 3 *
4 * Copyright (C) 2005 SAN People 4 * Copyright (C) 2005 SAN People
5 * 5 *
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15 14
16#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-at91rm9200/time.c b/arch/arm/mach-at91rm9200/at91rm9200_time.c
index fc2d7d5e463..a92a8622c78 100644
--- a/arch/arm/mach-at91rm9200/time.c
+++ b/arch/arm/mach-at91rm9200/at91rm9200_time.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/arch/arm/mach-at91rm9200/time.c 2 * linux/arch/arm/mach-at91rm9200/at91rm9200_time.c
3 * 3 *
4 * Copyright (C) 2003 SAN People 4 * Copyright (C) 2003 SAN People
5 * Copyright (C) 2003 ATMEL 5 * Copyright (C) 2003 ATMEL
@@ -19,16 +19,15 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/irq.h>
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/sched.h> 26#include <linux/sched.h>
27#include <linux/time.h> 27#include <linux/time.h>
28 28
29#include <asm/hardware.h> 29#include <asm/hardware.h>
30#include <asm/io.h> 30#include <asm/io.h>
31#include <asm/irq.h>
32#include <asm/mach/time.h> 31#include <asm/mach/time.h>
33 32
34static unsigned long last_crtr; 33static unsigned long last_crtr;
@@ -86,7 +85,7 @@ static irqreturn_t at91rm9200_timer_interrupt(int irq, void *dev_id, struct pt_r
86 85
87static struct irqaction at91rm9200_timer_irq = { 86static struct irqaction at91rm9200_timer_irq = {
88 .name = "at91_tick", 87 .name = "at91_tick",
89 .flags = SA_SHIRQ | SA_INTERRUPT | SA_TIMER, 88 .flags = IRQF_SHARED | IRQF_DISABLED | IRQF_TIMER,
90 .handler = at91rm9200_timer_interrupt 89 .handler = at91rm9200_timer_interrupt
91}; 90};
92 91
diff --git a/arch/arm/mach-at91rm9200/board-csb337.c b/arch/arm/mach-at91rm9200/board-csb337.c
index e94645d77f7..794d3fbb449 100644
--- a/arch/arm/mach-at91rm9200/board-csb337.c
+++ b/arch/arm/mach-at91rm9200/board-csb337.c
@@ -18,7 +18,6 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/types.h> 21#include <linux/types.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
diff --git a/arch/arm/mach-at91rm9200/board-csb637.c b/arch/arm/mach-at91rm9200/board-csb637.c
index 67d5f7786cd..c8b6f334246 100644
--- a/arch/arm/mach-at91rm9200/board-csb637.c
+++ b/arch/arm/mach-at91rm9200/board-csb637.c
@@ -18,7 +18,6 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/types.h> 21#include <linux/types.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
diff --git a/arch/arm/mach-at91rm9200/board-dk.c b/arch/arm/mach-at91rm9200/board-dk.c
index 48d7390fa58..65873037e02 100644
--- a/arch/arm/mach-at91rm9200/board-dk.c
+++ b/arch/arm/mach-at91rm9200/board-dk.c
@@ -21,7 +21,6 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/types.h> 24#include <linux/types.h>
26#include <linux/init.h> 25#include <linux/init.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
diff --git a/arch/arm/mach-at91rm9200/board-ek.c b/arch/arm/mach-at91rm9200/board-ek.c
index 72202ed830a..868192351dd 100644
--- a/arch/arm/mach-at91rm9200/board-ek.c
+++ b/arch/arm/mach-at91rm9200/board-ek.c
@@ -21,7 +21,6 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/types.h> 24#include <linux/types.h>
26#include <linux/init.h> 25#include <linux/init.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
diff --git a/arch/arm/mach-at91rm9200/devices.c b/arch/arm/mach-at91rm9200/devices.c
index 1cf85d231ba..4352acb8817 100644
--- a/arch/arm/mach-at91rm9200/devices.c
+++ b/arch/arm/mach-at91rm9200/devices.c
@@ -13,7 +13,6 @@
13#include <asm/mach/arch.h> 13#include <asm/mach/arch.h>
14#include <asm/mach/map.h> 14#include <asm/mach/map.h>
15 15
16#include <linux/config.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
18 17
19#include <asm/hardware.h> 18#include <asm/hardware.h>
diff --git a/arch/arm/mach-at91rm9200/gpio.c b/arch/arm/mach-at91rm9200/gpio.c
index 83c34747087..5783c282ae7 100644
--- a/arch/arm/mach-at91rm9200/gpio.c
+++ b/arch/arm/mach-at91rm9200/gpio.c
@@ -10,12 +10,13 @@
10 */ 10 */
11 11
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/interrupt.h>
14#include <linux/irq.h>
13#include <linux/kernel.h> 15#include <linux/kernel.h>
14#include <linux/list.h> 16#include <linux/list.h>
15#include <linux/module.h> 17#include <linux/module.h>
16 18
17#include <asm/io.h> 19#include <asm/io.h>
18#include <asm/mach/irq.h>
19#include <asm/hardware.h> 20#include <asm/hardware.h>
20#include <asm/arch/gpio.h> 21#include <asm/arch/gpio.h>
21 22
@@ -340,7 +341,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
340 void __iomem *pio; 341 void __iomem *pio;
341 u32 isr; 342 u32 isr;
342 343
343 pio = desc->base; 344 pio = get_irq_chip_data(irq);
344 345
345 /* temporarily mask (level sensitive) parent IRQ */ 346 /* temporarily mask (level sensitive) parent IRQ */
346 desc->chip->ack(irq); 347 desc->chip->ack(irq);
@@ -350,12 +351,12 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
350 if (!isr) 351 if (!isr)
351 break; 352 break;
352 353
353 pin = (unsigned) desc->data; 354 pin = (unsigned) get_irq_data(irq);
354 gpio = &irq_desc[pin]; 355 gpio = &irq_desc[pin];
355 356
356 while (isr) { 357 while (isr) {
357 if (isr & 1) { 358 if (isr & 1) {
358 if (unlikely(gpio->disable_depth)) { 359 if (unlikely(gpio->depth)) {
359 /* 360 /*
360 * The core ARM interrupt handler lazily disables IRQs so 361 * The core ARM interrupt handler lazily disables IRQs so
361 * another IRQ must be generated before it actually gets 362 * another IRQ must be generated before it actually gets
@@ -364,7 +365,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
364 gpio_irq_mask(pin); 365 gpio_irq_mask(pin);
365 } 366 }
366 else 367 else
367 gpio->handle(pin, gpio, regs); 368 desc_handle_irq(pin, gpio, regs);
368 } 369 }
369 pin++; 370 pin++;
370 gpio++; 371 gpio++;
diff --git a/arch/arm/mach-at91rm9200/irq.c b/arch/arm/mach-at91rm9200/irq.c
index 70f4d7ac153..dcd560dbcfb 100644
--- a/arch/arm/mach-at91rm9200/irq.c
+++ b/arch/arm/mach-at91rm9200/irq.c
@@ -20,7 +20,6 @@
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/init.h> 23#include <linux/init.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/mm.h> 25#include <linux/mm.h>
diff --git a/arch/arm/mach-at91rm9200/leds.c b/arch/arm/mach-at91rm9200/leds.c
index 28150e8905b..1a333730466 100644
--- a/arch/arm/mach-at91rm9200/leds.c
+++ b/arch/arm/mach-at91rm9200/leds.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10*/ 10*/
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/arm/mach-clps711x/fortunet.c b/arch/arm/mach-clps711x/fortunet.c
index ff26a85aa4b..3792ab4f099 100644
--- a/arch/arm/mach-clps711x/fortunet.c
+++ b/arch/arm/mach-clps711x/fortunet.c
@@ -19,7 +19,6 @@
19 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/init.h> 23#include <linux/init.h>
25#include <linux/initrd.h> 24#include <linux/initrd.h>
diff --git a/arch/arm/mach-clps711x/p720t.c b/arch/arm/mach-clps711x/p720t.c
index 9ba45f4d5a7..c8ecd2480c2 100644
--- a/arch/arm/mach-clps711x/p720t.c
+++ b/arch/arm/mach-clps711x/p720t.c
@@ -17,7 +17,6 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/types.h> 22#include <linux/types.h>
diff --git a/arch/arm/mach-clps711x/time.c b/arch/arm/mach-clps711x/time.c
index 1a23f0dcd4b..a071eac4a30 100644
--- a/arch/arm/mach-clps711x/time.c
+++ b/arch/arm/mach-clps711x/time.c
@@ -19,6 +19,7 @@
19#include <linux/timex.h> 19#include <linux/timex.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/irq.h>
22#include <linux/sched.h> 23#include <linux/sched.h>
23 24
24#include <asm/hardware.h> 25#include <asm/hardware.h>
@@ -57,7 +58,7 @@ p720t_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
57 58
58static struct irqaction clps711x_timer_irq = { 59static struct irqaction clps711x_timer_irq = {
59 .name = "CLPS711x Timer Tick", 60 .name = "CLPS711x Timer Tick",
60 .flags = SA_INTERRUPT | SA_TIMER, 61 .flags = IRQF_DISABLED | IRQF_TIMER,
61 .handler = p720t_timer_interrupt, 62 .handler = p720t_timer_interrupt,
62}; 63};
63 64
diff --git a/arch/arm/mach-clps7500/core.c b/arch/arm/mach-clps7500/core.c
index 5b12cab0e69..92eaebdd560 100644
--- a/arch/arm/mach-clps7500/core.c
+++ b/arch/arm/mach-clps7500/core.c
@@ -9,6 +9,7 @@
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/interrupt.h> 11#include <linux/interrupt.h>
12#include <linux/irq.h>
12#include <linux/list.h> 13#include <linux/list.h>
13#include <linux/sched.h> 14#include <linux/sched.h>
14#include <linux/init.h> 15#include <linux/init.h>
@@ -315,7 +316,7 @@ clps7500_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
315 316
316static struct irqaction clps7500_timer_irq = { 317static struct irqaction clps7500_timer_irq = {
317 .name = "CLPS7500 Timer Tick", 318 .name = "CLPS7500 Timer Tick",
318 .flags = SA_INTERRUPT | SA_TIMER, 319 .flags = IRQF_DISABLED | IRQF_TIMER,
319 .handler = clps7500_timer_interrupt, 320 .handler = clps7500_timer_interrupt,
320}; 321};
321 322
diff --git a/arch/arm/mach-ebsa110/core.c b/arch/arm/mach-ebsa110/core.c
index 6d620d8268c..70dd12ef3c4 100644
--- a/arch/arm/mach-ebsa110/core.c
+++ b/arch/arm/mach-ebsa110/core.c
@@ -199,7 +199,7 @@ ebsa110_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
199 199
200static struct irqaction ebsa110_timer_irq = { 200static struct irqaction ebsa110_timer_irq = {
201 .name = "EBSA110 Timer Tick", 201 .name = "EBSA110 Timer Tick",
202 .flags = SA_INTERRUPT | SA_TIMER, 202 .flags = IRQF_DISABLED | IRQF_TIMER,
203 .handler = ebsa110_timer_interrupt, 203 .handler = ebsa110_timer_interrupt,
204}; 204};
205 205
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig
index e15e4c54a25..f1b740083ae 100644
--- a/arch/arm/mach-ep93xx/Kconfig
+++ b/arch/arm/mach-ep93xx/Kconfig
@@ -9,12 +9,24 @@ config CRUNCH
9 9
10comment "EP93xx Platforms" 10comment "EP93xx Platforms"
11 11
12config MACH_EDB9302
13 bool "Support Cirrus Logic EDB9302"
14 help
15 Say 'Y' here if you want your kernel to support the Cirrus
16 Logic EDB9302 Evaluation Board.
17
12config MACH_EDB9315 18config MACH_EDB9315
13 bool "Support Cirrus Logic EDB9315" 19 bool "Support Cirrus Logic EDB9315"
14 help 20 help
15 Say 'Y' here if you want your kernel to support the Cirrus 21 Say 'Y' here if you want your kernel to support the Cirrus
16 Logic EDB9315 Evaluation Board. 22 Logic EDB9315 Evaluation Board.
17 23
24config MACH_EDB9315A
25 bool "Support Cirrus Logic EDB9315A"
26 help
27 Say 'Y' here if you want your kernel to support the Cirrus
28 Logic EDB9315A Evaluation Board.
29
18config MACH_GESBC9312 30config MACH_GESBC9312
19 bool "Support Glomation GESBC-9312-sx" 31 bool "Support Glomation GESBC-9312-sx"
20 help 32 help
diff --git a/arch/arm/mach-ep93xx/Makefile b/arch/arm/mach-ep93xx/Makefile
index dfa7e2e8a18..1f5a6b0487e 100644
--- a/arch/arm/mach-ep93xx/Makefile
+++ b/arch/arm/mach-ep93xx/Makefile
@@ -6,6 +6,8 @@ obj-m :=
6obj-n := 6obj-n :=
7obj- := 7obj- :=
8 8
9obj-$(CONFIG_MACH_EDB9302) += edb9302.o
9obj-$(CONFIG_MACH_EDB9315) += edb9315.o 10obj-$(CONFIG_MACH_EDB9315) += edb9315.o
11obj-$(CONFIG_MACH_EDB9315A) += edb9315a.o
10obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o 12obj-$(CONFIG_MACH_GESBC9312) += gesbc9312.o
11obj-$(CONFIG_MACH_TS72XX) += ts72xx.o 13obj-$(CONFIG_MACH_TS72XX) += ts72xx.o
diff --git a/arch/arm/mach-ep93xx/core.c b/arch/arm/mach-ep93xx/core.c
index 1fe73c0a9d0..a87a784b920 100644
--- a/arch/arm/mach-ep93xx/core.c
+++ b/arch/arm/mach-ep93xx/core.c
@@ -13,7 +13,6 @@
13 * your option) any later version. 13 * your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/spinlock.h> 18#include <linux/spinlock.h>
@@ -117,7 +116,7 @@ static int ep93xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
117 116
118static struct irqaction ep93xx_timer_irq = { 117static struct irqaction ep93xx_timer_irq = {
119 .name = "ep93xx timer", 118 .name = "ep93xx timer",
120 .flags = SA_INTERRUPT | SA_TIMER, 119 .flags = IRQF_DISABLED | IRQF_TIMER,
121 .handler = ep93xx_timer_interrupt, 120 .handler = ep93xx_timer_interrupt,
122}; 121};
123 122
diff --git a/arch/arm/mach-ep93xx/edb9302.c b/arch/arm/mach-ep93xx/edb9302.c
new file mode 100644
index 00000000000..62a8efd2325
--- /dev/null
+++ b/arch/arm/mach-ep93xx/edb9302.c
@@ -0,0 +1,62 @@
1/*
2 * arch/arm/mach-ep93xx/edb9302.c
3 * Cirrus Logic EDB9302 support.
4 *
5 * Copyright (C) 2006 George Kashperko <george@chas.com.ua>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/config.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/sched.h>
18#include <linux/interrupt.h>
19#include <linux/ioport.h>
20#include <linux/mtd/physmap.h>
21#include <linux/platform_device.h>
22#include <asm/io.h>
23#include <asm/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9302_flash_data = {
28 .width = 2,
29};
30
31static struct resource edb9302_flash_resource = {
32 .start = 0x60000000,
33 .end = 0x60ffffff,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9302_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9302_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9302_flash_resource,
45};
46
47static void __init edb9302_init_machine(void)
48{
49 ep93xx_init_devices();
50 platform_device_register(&edb9302_flash);
51}
52
53MACHINE_START(EDB9302, "Cirrus Logic EDB9302 Evaluation Board")
54 /* Maintainer: George Kashperko <george@chas.com.ua> */
55 .phys_io = EP93XX_APB_PHYS_BASE,
56 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
57 .boot_params = 0x00000100,
58 .map_io = ep93xx_map_io,
59 .init_irq = ep93xx_init_irq,
60 .timer = &ep93xx_timer,
61 .init_machine = edb9302_init_machine,
62MACHINE_END
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c
new file mode 100644
index 00000000000..bfefdaa8f79
--- /dev/null
+++ b/arch/arm/mach-ep93xx/edb9315a.c
@@ -0,0 +1,62 @@
1/*
2 * arch/arm/mach-ep93xx/edb9315a.c
3 * Cirrus Logic EDB9315A support.
4 *
5 * Copyright (C) 2006 Lennert Buytenhek <buytenh@wantstofly.org>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 */
12
13#include <linux/config.h>
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/mm.h>
17#include <linux/sched.h>
18#include <linux/interrupt.h>
19#include <linux/ioport.h>
20#include <linux/mtd/physmap.h>
21#include <linux/platform_device.h>
22#include <asm/io.h>
23#include <asm/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26
27static struct physmap_flash_data edb9315a_flash_data = {
28 .width = 2,
29};
30
31static struct resource edb9315a_flash_resource = {
32 .start = 0x60000000,
33 .end = 0x60ffffff,
34 .flags = IORESOURCE_MEM,
35};
36
37static struct platform_device edb9315a_flash = {
38 .name = "physmap-flash",
39 .id = 0,
40 .dev = {
41 .platform_data = &edb9315a_flash_data,
42 },
43 .num_resources = 1,
44 .resource = &edb9315a_flash_resource,
45};
46
47static void __init edb9315a_init_machine(void)
48{
49 ep93xx_init_devices();
50 platform_device_register(&edb9315a_flash);
51}
52
53MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
54 /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
55 .phys_io = EP93XX_APB_PHYS_BASE,
56 .io_pg_offst = ((EP93XX_APB_VIRT_BASE) >> 18) & 0xfffc,
57 .boot_params = 0xc0000100,
58 .map_io = ep93xx_map_io,
59 .init_irq = ep93xx_init_irq,
60 .timer = &ep93xx_timer,
61 .init_machine = edb9315a_init_machine,
62MACHINE_END
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index 2c28d66d260..e760fd4f365 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -10,7 +10,6 @@
10 * your option) any later version. 10 * your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index 0b3b875b187..df315f2e9be 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -10,7 +10,6 @@
10 * your option) any later version. 10 * your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/arm/mach-footbridge/common.c b/arch/arm/mach-footbridge/common.c
index bbe6e4a0bf6..af900f4755a 100644
--- a/arch/arm/mach-footbridge/common.c
+++ b/arch/arm/mach-footbridge/common.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
diff --git a/arch/arm/mach-footbridge/dc21285-timer.c b/arch/arm/mach-footbridge/dc21285-timer.c
index 14a62d6008f..2af610811ca 100644
--- a/arch/arm/mach-footbridge/dc21285-timer.c
+++ b/arch/arm/mach-footbridge/dc21285-timer.c
@@ -6,6 +6,7 @@
6 */ 6 */
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/interrupt.h> 8#include <linux/interrupt.h>
9#include <linux/irq.h>
9 10
10#include <asm/irq.h> 11#include <asm/irq.h>
11 12
@@ -43,7 +44,7 @@ timer1_interrupt(int irq, void *dev_id, struct pt_regs *regs)
43static struct irqaction footbridge_timer_irq = { 44static struct irqaction footbridge_timer_irq = {
44 .name = "Timer1 timer tick", 45 .name = "Timer1 timer tick",
45 .handler = timer1_interrupt, 46 .handler = timer1_interrupt,
46 .flags = SA_INTERRUPT | SA_TIMER, 47 .flags = IRQF_DISABLED | IRQF_TIMER,
47}; 48};
48 49
49/* 50/*
diff --git a/arch/arm/mach-footbridge/dc21285.c b/arch/arm/mach-footbridge/dc21285.c
index 5dace259783..607ed1f5b3f 100644
--- a/arch/arm/mach-footbridge/dc21285.c
+++ b/arch/arm/mach-footbridge/dc21285.c
@@ -332,15 +332,15 @@ void __init dc21285_preinit(void)
332 /* 332 /*
333 * We don't care if these fail. 333 * We don't care if these fail.
334 */ 334 */
335 request_irq(IRQ_PCI_SERR, dc21285_serr_irq, SA_INTERRUPT, 335 request_irq(IRQ_PCI_SERR, dc21285_serr_irq, IRQF_DISABLED,
336 "PCI system error", &serr_timer); 336 "PCI system error", &serr_timer);
337 request_irq(IRQ_PCI_PERR, dc21285_parity_irq, SA_INTERRUPT, 337 request_irq(IRQ_PCI_PERR, dc21285_parity_irq, IRQF_DISABLED,
338 "PCI parity error", &perr_timer); 338 "PCI parity error", &perr_timer);
339 request_irq(IRQ_PCI_ABORT, dc21285_abort_irq, SA_INTERRUPT, 339 request_irq(IRQ_PCI_ABORT, dc21285_abort_irq, IRQF_DISABLED,
340 "PCI abort", NULL); 340 "PCI abort", NULL);
341 request_irq(IRQ_DISCARD_TIMER, dc21285_discard_irq, SA_INTERRUPT, 341 request_irq(IRQ_DISCARD_TIMER, dc21285_discard_irq, IRQF_DISABLED,
342 "Discard timer", NULL); 342 "Discard timer", NULL);
343 request_irq(IRQ_PCI_DPERR, dc21285_dparity_irq, SA_INTERRUPT, 343 request_irq(IRQ_PCI_DPERR, dc21285_dparity_irq, IRQF_DISABLED,
344 "PCI data parity", NULL); 344 "PCI data parity", NULL);
345 345
346 if (cfn_mode) { 346 if (cfn_mode) {
diff --git a/arch/arm/mach-footbridge/dma.c b/arch/arm/mach-footbridge/dma.c
index 7a54578b51a..1f9b09b8ed8 100644
--- a/arch/arm/mach-footbridge/dma.c
+++ b/arch/arm/mach-footbridge/dma.c
@@ -10,7 +10,6 @@
10 * 17-Mar-1999 RMK Allow any EBSA285-like architecture to have 10 * 17-Mar-1999 RMK Allow any EBSA285-like architecture to have
11 * ISA DMA controllers. 11 * ISA DMA controllers.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
16#include <asm/dma.h> 15#include <asm/dma.h>
diff --git a/arch/arm/mach-footbridge/ebsa285-leds.c b/arch/arm/mach-footbridge/ebsa285-leds.c
index 2c7c3630401..a64e2222651 100644
--- a/arch/arm/mach-footbridge/ebsa285-leds.c
+++ b/arch/arm/mach-footbridge/ebsa285-leds.c
@@ -16,7 +16,6 @@
16 * Changelog: 16 * Changelog:
17 * 02-05-1999 RMK Various cleanups 17 * 02-05-1999 RMK Various cleanups
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/init.h> 21#include <linux/init.h>
diff --git a/arch/arm/mach-footbridge/isa-timer.c b/arch/arm/mach-footbridge/isa-timer.c
index c1d74f7ab66..c4810a40c8e 100644
--- a/arch/arm/mach-footbridge/isa-timer.c
+++ b/arch/arm/mach-footbridge/isa-timer.c
@@ -6,6 +6,7 @@
6 */ 6 */
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/interrupt.h> 8#include <linux/interrupt.h>
9#include <linux/irq.h>
9 10
10#include <asm/io.h> 11#include <asm/io.h>
11#include <asm/irq.h> 12#include <asm/irq.h>
@@ -72,7 +73,7 @@ isa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
72static struct irqaction isa_timer_irq = { 73static struct irqaction isa_timer_irq = {
73 .name = "ISA timer tick", 74 .name = "ISA timer tick",
74 .handler = isa_timer_interrupt, 75 .handler = isa_timer_interrupt,
75 .flags = SA_INTERRUPT | SA_TIMER, 76 .flags = IRQF_DISABLED | IRQF_TIMER,
76}; 77};
77 78
78static void __init isa_timer_init(void) 79static void __init isa_timer_init(void)
diff --git a/arch/arm/mach-footbridge/netwinder-hw.c b/arch/arm/mach-footbridge/netwinder-hw.c
index 229bf0585e4..a1f381c64a3 100644
--- a/arch/arm/mach-footbridge/netwinder-hw.c
+++ b/arch/arm/mach-footbridge/netwinder-hw.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * Copyright (C) 1998, 1999 Russell King, Phil Blundell 6 * Copyright (C) 1998, 1999 Russell King, Phil Blundell
7 */ 7 */
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/ioport.h> 9#include <linux/ioport.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
diff --git a/arch/arm/mach-footbridge/netwinder-leds.c b/arch/arm/mach-footbridge/netwinder-leds.c
index 7451fc07b85..8e9cac5a213 100644
--- a/arch/arm/mach-footbridge/netwinder-leds.c
+++ b/arch/arm/mach-footbridge/netwinder-leds.c
@@ -16,7 +16,6 @@
16 * Changelog: 16 * Changelog:
17 * 02-05-1999 RMK Various cleanups 17 * 02-05-1999 RMK Various cleanups
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/init.h> 21#include <linux/init.h>
diff --git a/arch/arm/mach-h720x/cpu-h7201.c b/arch/arm/mach-h720x/cpu-h7201.c
index af9e4a5d5ea..a9a8255a3a0 100644
--- a/arch/arm/mach-h720x/cpu-h7201.c
+++ b/arch/arm/mach-h720x/cpu-h7201.c
@@ -41,7 +41,7 @@ h7201_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
41 41
42static struct irqaction h7201_timer_irq = { 42static struct irqaction h7201_timer_irq = {
43 .name = "h7201 Timer Tick", 43 .name = "h7201 Timer Tick",
44 .flags = SA_INTERRUPT | SA_TIMER, 44 .flags = IRQF_DISABLED | IRQF_TIMER,
45 .handler = h7201_timer_interrupt, 45 .handler = h7201_timer_interrupt,
46}; 46};
47 47
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c
index a4a7c0125d0..da678d163fd 100644
--- a/arch/arm/mach-h720x/cpu-h7202.c
+++ b/arch/arm/mach-h720x/cpu-h7202.c
@@ -171,7 +171,7 @@ static struct irqchip h7202_timerx_chip = {
171 171
172static struct irqaction h7202_timer_irq = { 172static struct irqaction h7202_timer_irq = {
173 .name = "h7202 Timer Tick", 173 .name = "h7202 Timer Tick",
174 .flags = SA_INTERRUPT | SA_TIMER, 174 .flags = IRQF_DISABLED | IRQF_TIMER,
175 .handler = h7202_timer_interrupt, 175 .handler = h7202_timer_interrupt,
176}; 176};
177 177
diff --git a/arch/arm/mach-h720x/h7201-eval.c b/arch/arm/mach-h720x/h7201-eval.c
index 193f968edac..407cd4c0aa8 100644
--- a/arch/arm/mach-h720x/h7201-eval.c
+++ b/arch/arm/mach-h720x/h7201-eval.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/types.h> 18#include <linux/types.h>
diff --git a/arch/arm/mach-h720x/h7202-eval.c b/arch/arm/mach-h720x/h7202-eval.c
index 36266896979..bf2acdce62e 100644
--- a/arch/arm/mach-h720x/h7202-eval.c
+++ b/arch/arm/mach-h720x/h7202-eval.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/types.h> 18#include <linux/types.h>
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index ea805bfa5e5..6ed7523c65b 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -8,11 +8,11 @@
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/irq.h>
16#include <linux/time.h> 16#include <linux/time.h>
17 17
18#include <asm/hardware.h> 18#include <asm/hardware.h>
@@ -72,7 +72,7 @@ imx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
72 72
73static struct irqaction imx_timer_irq = { 73static struct irqaction imx_timer_irq = {
74 .name = "i.MX Timer Tick", 74 .name = "i.MX Timer Tick",
75 .flags = SA_INTERRUPT | SA_TIMER, 75 .flags = IRQF_DISABLED | IRQF_TIMER,
76 .handler = imx_timer_interrupt, 76 .handler = imx_timer_interrupt,
77}; 77};
78 78
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c
index 576a5e979c0..42021fdfa0c 100644
--- a/arch/arm/mach-integrator/core.c
+++ b/arch/arm/mach-integrator/core.c
@@ -13,6 +13,7 @@
13#include <linux/device.h> 13#include <linux/device.h>
14#include <linux/spinlock.h> 14#include <linux/spinlock.h>
15#include <linux/interrupt.h> 15#include <linux/interrupt.h>
16#include <linux/irq.h>
16#include <linux/sched.h> 17#include <linux/sched.h>
17#include <linux/smp.h> 18#include <linux/smp.h>
18#include <linux/termios.h> 19#include <linux/termios.h>
@@ -281,7 +282,7 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
281 282
282static struct irqaction integrator_timer_irq = { 283static struct irqaction integrator_timer_irq = {
283 .name = "Integrator Timer Tick", 284 .name = "Integrator Timer Tick",
284 .flags = SA_INTERRUPT | SA_TIMER, 285 .flags = IRQF_DISABLED | IRQF_TIMER,
285 .handler = integrator_timer_interrupt, 286 .handler = integrator_timer_interrupt,
286}; 287};
287 288
diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c
index 229a63a525c..f9043592e29 100644
--- a/arch/arm/mach-integrator/pci_v3.c
+++ b/arch/arm/mach-integrator/pci_v3.c
@@ -20,7 +20,6 @@
20 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/pci.h> 24#include <linux/pci.h>
26#include <linux/ptrace.h> 25#include <linux/ptrace.h>
diff --git a/arch/arm/mach-integrator/time.c b/arch/arm/mach-integrator/time.c
index bc07f52a6fd..ee49cf790da 100644
--- a/arch/arm/mach-integrator/time.c
+++ b/arch/arm/mach-integrator/time.c
@@ -125,7 +125,7 @@ static int rtc_probe(struct amba_device *dev, void *id)
125 125
126 xtime.tv_sec = __raw_readl(rtc_base + RTC_DR); 126 xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
127 127
128 ret = request_irq(dev->irq[0], arm_rtc_interrupt, SA_INTERRUPT, 128 ret = request_irq(dev->irq[0], arm_rtc_interrupt, IRQF_DISABLED,
129 "rtc-pl030", dev); 129 "rtc-pl030", dev);
130 if (ret) 130 if (ret)
131 goto map_out; 131 goto map_out;
diff --git a/arch/arm/mach-iop3xx/Kconfig b/arch/arm/mach-iop3xx/Kconfig
index 2bfe8c729f9..4422f238860 100644
--- a/arch/arm/mach-iop3xx/Kconfig
+++ b/arch/arm/mach-iop3xx/Kconfig
@@ -30,12 +30,15 @@ config MACH_IQ80332
30 select ARCH_IOP331 30 select ARCH_IOP331
31 help 31 help
32 Say Y here if you want to run your kernel on the Intel IQ80332 32 Say Y here if you want to run your kernel on the Intel IQ80332
33 evaluation kit for the IOP332 chipset 33 evaluation kit for the IOP332 chipset.
34 34
35config ARCH_EP80219 35config ARCH_EP80219
36 bool "Enable support for EP80219" 36 bool "Enable support for EP80219"
37 select ARCH_IOP321 37 select ARCH_IOP321
38 select ARCH_IQ31244 38 select ARCH_IQ31244
39 help
40 Say Y here if you want to run your kernel on the Intel EP80219
41 evaluation kit for the Intel 80219 chipset (a IOP321 variant).
39 42
40# Which IOP variant are we running? 43# Which IOP variant are we running?
41config ARCH_IOP321 44config ARCH_IOP321
@@ -56,8 +59,8 @@ config IOP331_STEPD
56 bool "Chip stepping D of the IOP80331 processor or IOP80333" 59 bool "Chip stepping D of the IOP80331 processor or IOP80333"
57 depends on (ARCH_IOP331) 60 depends on (ARCH_IOP331)
58 help 61 help
59 Say Y here if you have StepD of the IOP80331 or IOP8033 62 Say Y here if you have StepD of the IOP80331 or IOP8033
60 based platforms. 63 based platforms.
61 64
62endmenu 65endmenu
63endif 66endif
diff --git a/arch/arm/mach-iop3xx/common.c b/arch/arm/mach-iop3xx/common.c
index fdeeef489a7..d7f50e57e75 100644
--- a/arch/arm/mach-iop3xx/common.c
+++ b/arch/arm/mach-iop3xx/common.c
@@ -12,7 +12,6 @@
12 * warranty of any kind, whether express or implied. 12 * warranty of any kind, whether express or implied.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
17#include <asm/hardware.h> 16#include <asm/hardware.h>
18 17
diff --git a/arch/arm/mach-iop3xx/iop321-setup.c b/arch/arm/mach-iop3xx/iop321-setup.c
index 0ebbcb20c6a..b6d096903c4 100644
--- a/arch/arm/mach-iop3xx/iop321-setup.c
+++ b/arch/arm/mach-iop3xx/iop321-setup.c
@@ -12,7 +12,6 @@
12 */ 12 */
13#include <linux/mm.h> 13#include <linux/mm.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/config.h>
16#include <linux/major.h> 15#include <linux/major.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
18#include <linux/platform_device.h> 17#include <linux/platform_device.h>
diff --git a/arch/arm/mach-iop3xx/iop321-time.c b/arch/arm/mach-iop3xx/iop321-time.c
index d67ac0e5d43..04b1a6f7eba 100644
--- a/arch/arm/mach-iop3xx/iop321-time.c
+++ b/arch/arm/mach-iop3xx/iop321-time.c
@@ -85,7 +85,7 @@ iop321_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
85static struct irqaction iop321_timer_irq = { 85static struct irqaction iop321_timer_irq = {
86 .name = "IOP321 Timer Tick", 86 .name = "IOP321 Timer Tick",
87 .handler = iop321_timer_interrupt, 87 .handler = iop321_timer_interrupt,
88 .flags = SA_INTERRUPT | SA_TIMER, 88 .flags = IRQF_DISABLED | IRQF_TIMER,
89}; 89};
90 90
91static void __init iop321_timer_init(void) 91static void __init iop321_timer_init(void)
diff --git a/arch/arm/mach-iop3xx/iop331-setup.c b/arch/arm/mach-iop3xx/iop331-setup.c
index 7b7b6eea384..3cc98d892ad 100644
--- a/arch/arm/mach-iop3xx/iop331-setup.c
+++ b/arch/arm/mach-iop3xx/iop331-setup.c
@@ -11,7 +11,6 @@
11 */ 11 */
12#include <linux/mm.h> 12#include <linux/mm.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/config.h>
15#include <linux/major.h> 14#include <linux/major.h>
16#include <linux/fs.h> 15#include <linux/fs.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
diff --git a/arch/arm/mach-iop3xx/iop331-time.c b/arch/arm/mach-iop3xx/iop331-time.c
index 3c1f0ebbd63..0c09e74c574 100644
--- a/arch/arm/mach-iop3xx/iop331-time.c
+++ b/arch/arm/mach-iop3xx/iop331-time.c
@@ -82,7 +82,7 @@ iop331_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
82static struct irqaction iop331_timer_irq = { 82static struct irqaction iop331_timer_irq = {
83 .name = "IOP331 Timer Tick", 83 .name = "IOP331 Timer Tick",
84 .handler = iop331_timer_interrupt, 84 .handler = iop331_timer_interrupt,
85 .flags = SA_INTERRUPT | SA_TIMER, 85 .flags = IRQF_DISABLED | IRQF_TIMER,
86}; 86};
87 87
88static void __init iop331_timer_init(void) 88static void __init iop331_timer_init(void)
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c
index ebe4391dd7f..7f91f689a04 100644
--- a/arch/arm/mach-ixp2000/core.c
+++ b/arch/arm/mach-ixp2000/core.c
@@ -14,12 +14,12 @@
14 * warranty of any kind, whether express or implied. 14 * warranty of any kind, whether express or implied.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/spinlock.h> 19#include <linux/spinlock.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/tty.h> 24#include <linux/tty.h>
25#include <linux/bitops.h> 25#include <linux/bitops.h>
@@ -224,7 +224,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
224 224
225static struct irqaction ixp2000_timer_irq = { 225static struct irqaction ixp2000_timer_irq = {
226 .name = "IXP2000 Timer Tick", 226 .name = "IXP2000 Timer Tick",
227 .flags = SA_INTERRUPT | SA_TIMER, 227 .flags = IRQF_DISABLED | IRQF_TIMER,
228 .handler = ixp2000_timer_interrupt, 228 .handler = ixp2000_timer_interrupt,
229}; 229};
230 230
@@ -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_IXP2000_DRAM0_MIN_ERR + i, desc, regs); 412 desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs);
413 } 413 }
414 } 414 }
415} 415}
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c
index 52fac89e95b..ac29298c5d3 100644
--- a/arch/arm/mach-ixp2000/enp2611.c
+++ b/arch/arm/mach-ixp2000/enp2611.c
@@ -18,7 +18,6 @@
18 * option) any later version. 18 * option) any later version.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c
index 09101271298..a6f14801872 100644
--- a/arch/arm/mach-ixp2000/ixdp2400.c
+++ b/arch/arm/mach-ixp2000/ixdp2400.c
@@ -14,7 +14,6 @@
14 * Free Software Foundation; either version 2 of the License, or (at your 14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. 15 * option) any later version.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c
index 076e3f8acc9..91d36d91dac 100644
--- a/arch/arm/mach-ixp2000/ixdp2800.c
+++ b/arch/arm/mach-ixp2000/ixdp2800.c
@@ -14,7 +14,6 @@
14 * Free Software Foundation; either version 2 of the License, or (at your 14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. 15 * option) any later version.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c
index d628da56b4b..40eef8b3674 100644
--- a/arch/arm/mach-ixp2000/ixdp2x00.c
+++ b/arch/arm/mach-ixp2000/ixdp2x00.c
@@ -14,7 +14,6 @@
14 * Free Software Foundation; either version 2 of the License, or (at your 14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. 15 * option) any later version.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
@@ -168,7 +167,7 @@ void ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long
168 } 167 }
169 168
170 /* Hook into PCI interrupt */ 169 /* Hook into PCI interrupt */
171 set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x00_irq_handler); 170 set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler);
172} 171}
173 172
174/************************************************************************* 173/*************************************************************************
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c
index 66915282a46..7f42366f60d 100644
--- a/arch/arm/mach-ixp2000/ixdp2x01.c
+++ b/arch/arm/mach-ixp2000/ixdp2x01.c
@@ -15,7 +15,6 @@
15 * option) any later version. 15 * option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/mm.h> 20#include <linux/mm.h>
@@ -128,7 +127,7 @@ void __init ixdp2x01_init_irq(void)
128 } 127 }
129 128
130 /* Hook into PCI interrupts */ 129 /* Hook into PCI interrupts */
131 set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x01_irq_handler); 130 set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler);
132} 131}
133 132
134 133
diff --git a/arch/arm/mach-ixp23xx/core.c b/arch/arm/mach-ixp23xx/core.c
index 051e3d70026..566a07821c7 100644
--- a/arch/arm/mach-ixp23xx/core.c
+++ b/arch/arm/mach-ixp23xx/core.c
@@ -14,7 +14,6 @@
14 * warranty of any kind, whether express or implied. 14 * warranty of any kind, whether express or implied.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/spinlock.h> 19#include <linux/spinlock.h>
@@ -272,7 +271,7 @@ static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *
272 } 271 }
273 272
274 int_desc = irq_desc + irqno; 273 int_desc = irq_desc + irqno;
275 int_desc->handle(irqno, int_desc, regs); 274 desc_handle_irq(irqno, int_desc, regs);
276 275
277 desc->chip->unmask(irq); 276 desc->chip->unmask(irq);
278} 277}
@@ -364,7 +363,7 @@ ixp23xx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
364static struct irqaction ixp23xx_timer_irq = { 363static struct irqaction ixp23xx_timer_irq = {
365 .name = "IXP23xx Timer Tick", 364 .name = "IXP23xx Timer Tick",
366 .handler = ixp23xx_timer_interrupt, 365 .handler = ixp23xx_timer_interrupt,
367 .flags = SA_INTERRUPT | SA_TIMER, 366 .flags = IRQF_DISABLED | IRQF_TIMER,
368}; 367};
369 368
370void __init ixp23xx_init_timer(void) 369void __init ixp23xx_init_timer(void)
diff --git a/arch/arm/mach-ixp23xx/espresso.c b/arch/arm/mach-ixp23xx/espresso.c
index 357351fbb1e..7a85ced5671 100644
--- a/arch/arm/mach-ixp23xx/espresso.c
+++ b/arch/arm/mach-ixp23xx/espresso.c
@@ -10,7 +10,6 @@
10 * warranty of any kind, whether express or implied. 10 * warranty of any kind, whether express or implied.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/spinlock.h> 15#include <linux/spinlock.h>
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c
index e0886871cc7..37a32e6bcca 100644
--- a/arch/arm/mach-ixp23xx/ixdp2351.c
+++ b/arch/arm/mach-ixp23xx/ixdp2351.c
@@ -14,12 +14,12 @@
14 * warranty of any kind, whether express or implied. 14 * warranty of any kind, whether express or implied.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/spinlock.h> 19#include <linux/spinlock.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/irq.h>
23#include <linux/serial.h> 23#include <linux/serial.h>
24#include <linux/tty.h> 24#include <linux/tty.h>
25#include <linux/bitops.h> 25#include <linux/bitops.h>
@@ -37,7 +37,6 @@
37#include <asm/memory.h> 37#include <asm/memory.h>
38#include <asm/hardware.h> 38#include <asm/hardware.h>
39#include <asm/mach-types.h> 39#include <asm/mach-types.h>
40#include <asm/irq.h>
41#include <asm/system.h> 40#include <asm/system.h>
42#include <asm/tlbflush.h> 41#include <asm/tlbflush.h>
43#include <asm/pgtable.h> 42#include <asm/pgtable.h>
@@ -75,7 +74,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct
75 int cpld_irq = 74 int cpld_irq =
76 IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); 75 IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i);
77 cpld_desc = irq_desc + cpld_irq; 76 cpld_desc = irq_desc + cpld_irq;
78 cpld_desc->handle(cpld_irq, cpld_desc, regs); 77 desc_handle_irq(cpld_irq, cpld_desc, regs);
79 } 78 }
80 } 79 }
81 80
@@ -112,7 +111,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct
112 int cpld_irq = 111 int cpld_irq =
113 IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); 112 IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i);
114 cpld_desc = irq_desc + cpld_irq; 113 cpld_desc = irq_desc + cpld_irq;
115 cpld_desc->handle(cpld_irq, cpld_desc, regs); 114 desc_handle_irq(cpld_irq, cpld_desc, regs);
116 } 115 }
117 } 116 }
118 117
@@ -159,8 +158,8 @@ void ixdp2351_init_irq(void)
159 } 158 }
160 } 159 }
161 160
162 set_irq_chained_handler(IRQ_IXP23XX_INTA, &ixdp2351_inta_handler); 161 set_irq_chained_handler(IRQ_IXP23XX_INTA, ixdp2351_inta_handler);
163 set_irq_chained_handler(IRQ_IXP23XX_INTB, &ixdp2351_intb_handler); 162 set_irq_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler);
164} 163}
165 164
166/* 165/*
diff --git a/arch/arm/mach-ixp23xx/pci.c b/arch/arm/mach-ixp23xx/pci.c
index ac72f94c5b4..3b34fa35e36 100644
--- a/arch/arm/mach-ixp23xx/pci.c
+++ b/arch/arm/mach-ixp23xx/pci.c
@@ -16,7 +16,6 @@
16 * option) any later version. 16 * option) any later version.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/pci.h> 21#include <linux/pci.h>
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c
index 92ad18f4125..d06e21b70de 100644
--- a/arch/arm/mach-ixp23xx/roadrunner.c
+++ b/arch/arm/mach-ixp23xx/roadrunner.c
@@ -14,7 +14,6 @@
14 * warranty of any kind, whether express or implied. 14 * warranty of any kind, whether express or implied.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/spinlock.h> 19#include <linux/spinlock.h>
diff --git a/arch/arm/mach-ixp4xx/common.c b/arch/arm/mach-ixp4xx/common.c
index bf25a76e9bd..7c25dbd5a18 100644
--- a/arch/arm/mach-ixp4xx/common.c
+++ b/arch/arm/mach-ixp4xx/common.c
@@ -13,7 +13,6 @@
13 * warranty of any kind, whether express or implied. 13 * warranty of any kind, whether express or implied.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
19#include <linux/init.h> 18#include <linux/init.h>
@@ -288,7 +287,7 @@ static irqreturn_t ixp4xx_timer_interrupt(int irq, void *dev_id, struct pt_regs
288 287
289static struct irqaction ixp4xx_timer_irq = { 288static struct irqaction ixp4xx_timer_irq = {
290 .name = "IXP4xx Timer Tick", 289 .name = "IXP4xx Timer Tick",
291 .flags = SA_INTERRUPT | SA_TIMER, 290 .flags = IRQF_DISABLED | IRQF_TIMER,
292 .handler = ixp4xx_timer_interrupt, 291 .handler = ixp4xx_timer_interrupt,
293}; 292};
294 293
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c
index e6b7fcd923f..2cebb287889 100644
--- a/arch/arm/mach-ixp4xx/coyote-pci.c
+++ b/arch/arm/mach-ixp4xx/coyote-pci.c
@@ -17,6 +17,7 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/pci.h> 18#include <linux/pci.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h>
20 21
21#include <asm/mach-types.h> 22#include <asm/mach-types.h>
22#include <asm/hardware.h> 23#include <asm/hardware.h>
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c
index da415d5d7f3..d5156c043f0 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c
@@ -15,9 +15,9 @@
15 */ 15 */
16 16
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/config.h>
19#include <linux/pci.h> 18#include <linux/pci.h>
20#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22 22
23#include <asm/mach/pci.h> 23#include <asm/mach/pci.h>
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c
index 526fb6175bc..ed527080021 100644
--- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c
+++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c
@@ -16,10 +16,10 @@
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/pci.h> 17#include <linux/pci.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/irq.h>
19 20
20#include <asm/mach-types.h> 21#include <asm/mach-types.h>
21#include <asm/hardware.h> 22#include <asm/hardware.h>
22#include <asm/irq.h>
23 23
24#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
25 25
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c
index 26b7c001ff6..b8ebaf4a9c8 100644
--- a/arch/arm/mach-ixp4xx/nas100d-pci.c
+++ b/arch/arm/mach-ixp4xx/nas100d-pci.c
@@ -15,9 +15,9 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/pci.h> 18#include <linux/pci.h>
20#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/irq.h>
21 21
22#include <asm/mach/pci.h> 22#include <asm/mach/pci.h>
23#include <asm/mach-types.h> 23#include <asm/mach-types.h>
diff --git a/arch/arm/mach-ixp4xx/nas100d-power.c b/arch/arm/mach-ixp4xx/nas100d-power.c
index a3745ed37f9..81ffcae1f56 100644
--- a/arch/arm/mach-ixp4xx/nas100d-power.c
+++ b/arch/arm/mach-ixp4xx/nas100d-power.c
@@ -17,9 +17,9 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/module.h>
21#include <linux/reboot.h>
22#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/irq.h>
22#include <linux/module.h>
23#include <linux/reboot.h> 23#include <linux/reboot.h>
24 24
25#include <asm/mach-types.h> 25#include <asm/mach-types.h>
@@ -42,7 +42,7 @@ static int __init nas100d_power_init(void)
42 set_irq_type(NAS100D_RB_IRQ, IRQT_LOW); 42 set_irq_type(NAS100D_RB_IRQ, IRQT_LOW);
43 43
44 if (request_irq(NAS100D_RB_IRQ, &nas100d_reset_handler, 44 if (request_irq(NAS100D_RB_IRQ, &nas100d_reset_handler,
45 SA_INTERRUPT, "NAS100D reset button", NULL) < 0) { 45 IRQF_DISABLED, "NAS100D reset button", NULL) < 0) {
46 46
47 printk(KERN_DEBUG "Reset Button IRQ %d not available\n", 47 printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
48 NAS100D_RB_IRQ); 48 NAS100D_RB_IRQ);
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c
index ece860444d5..0de639d6e60 100644
--- a/arch/arm/mach-ixp4xx/nslu2-pci.c
+++ b/arch/arm/mach-ixp4xx/nslu2-pci.c
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/pci.h> 18#include <linux/pci.h>
20#include <linux/init.h> 19#include <linux/init.h>
21 20
diff --git a/arch/arm/mach-ixp4xx/nslu2-power.c b/arch/arm/mach-ixp4xx/nslu2-power.c
index 6d38e97142c..e2a2230b69f 100644
--- a/arch/arm/mach-ixp4xx/nslu2-power.c
+++ b/arch/arm/mach-ixp4xx/nslu2-power.c
@@ -54,7 +54,7 @@ static int __init nslu2_power_init(void)
54 set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH); 54 set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH);
55 55
56 if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler, 56 if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler,
57 SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) { 57 IRQF_DISABLED, "NSLU2 reset button", NULL) < 0) {
58 58
59 printk(KERN_DEBUG "Reset Button IRQ %d not available\n", 59 printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
60 NSLU2_RB_IRQ); 60 NSLU2_RB_IRQ);
@@ -63,7 +63,7 @@ static int __init nslu2_power_init(void)
63 } 63 }
64 64
65 if (request_irq(NSLU2_PB_IRQ, &nslu2_power_handler, 65 if (request_irq(NSLU2_PB_IRQ, &nslu2_power_handler,
66 SA_INTERRUPT, "NSLU2 power button", NULL) < 0) { 66 IRQF_DISABLED, "NSLU2 power button", NULL) < 0) {
67 67
68 printk(KERN_DEBUG "Power Button IRQ %d not available\n", 68 printk(KERN_DEBUG "Power Button IRQ %d not available\n",
69 NSLU2_PB_IRQ); 69 NSLU2_PB_IRQ);
diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c
index ac626436e96..b7af5640ea7 100644
--- a/arch/arm/mach-l7200/core.c
+++ b/arch/arm/mach-l7200/core.c
@@ -7,6 +7,7 @@
7 */ 7 */
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/irq.h>
10#include <linux/device.h> 11#include <linux/device.h>
11 12
12#include <asm/types.h> 13#include <asm/types.h>
diff --git a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
index c0e6854289f..35c3606a207 100644
--- a/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
+++ b/arch/arm/mach-lh7a40x/arch-lpd7a40x.c
@@ -12,6 +12,7 @@
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/platform_device.h> 13#include <linux/platform_device.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/irq.h>
15 16
16#include <asm/hardware.h> 17#include <asm/hardware.h>
17#include <asm/setup.h> 18#include <asm/setup.h>
diff --git a/arch/arm/mach-lh7a40x/time.c b/arch/arm/mach-lh7a40x/time.c
index ef9af375fcc..ad5652e0150 100644
--- a/arch/arm/mach-lh7a40x/time.c
+++ b/arch/arm/mach-lh7a40x/time.c
@@ -8,10 +8,10 @@
8 * version 2 as published by the Free Software Foundation. 8 * version 2 as published by the Free Software Foundation.
9 * 9 *
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14#include <linux/irq.h>
15#include <linux/time.h> 15#include <linux/time.h>
16 16
17#include <asm/hardware.h> 17#include <asm/hardware.h>
@@ -53,7 +53,7 @@ lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
53 53
54static struct irqaction lh7a40x_timer_irq = { 54static struct irqaction lh7a40x_timer_irq = {
55 .name = "LHA740x Timer Tick", 55 .name = "LHA740x Timer Tick",
56 .flags = SA_INTERRUPT | SA_TIMER, 56 .flags = IRQF_DISABLED | IRQF_TIMER,
57 .handler = lh7a40x_timer_interrupt, 57 .handler = lh7a40x_timer_interrupt,
58}; 58};
59 59
diff --git a/arch/arm/mach-netx/time.c b/arch/arm/mach-netx/time.c
index edfbdf40c60..6d72c81b7d9 100644
--- a/arch/arm/mach-netx/time.c
+++ b/arch/arm/mach-netx/time.c
@@ -54,7 +54,7 @@ netx_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
54 54
55static struct irqaction netx_timer_irq = { 55static struct irqaction netx_timer_irq = {
56 .name = "NetX Timer Tick", 56 .name = "NetX Timer Tick",
57 .flags = SA_INTERRUPT | SA_TIMER, 57 .flags = IRQF_DISABLED | IRQF_TIMER,
58 .handler = netx_timer_interrupt, 58 .handler = netx_timer_interrupt,
59}; 59};
60 60
diff --git a/arch/arm/mach-omap1/Kconfig b/arch/arm/mach-omap1/Kconfig
index f8d716ccc1d..d135568dc9e 100644
--- a/arch/arm/mach-omap1/Kconfig
+++ b/arch/arm/mach-omap1/Kconfig
@@ -62,6 +62,13 @@ config MACH_OMAP_PERSEUS2
62 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such 62 Support for TI OMAP 730 Perseus2 board. Say Y here if you have such
63 a board. 63 a board.
64 64
65config MACH_OMAP_FSAMPLE
66 bool "TI F-Sample"
67 depends on ARCH_OMAP1 && ARCH_OMAP730
68 help
69 Support for TI OMAP 850 F-Sample board. Say Y here if you have such
70 a board.
71
65config MACH_VOICEBLUE 72config MACH_VOICEBLUE
66 bool "Voiceblue" 73 bool "Voiceblue"
67 depends on ARCH_OMAP1 && ARCH_OMAP15XX 74 depends on ARCH_OMAP1 && ARCH_OMAP15XX
diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 9ea719550ad..7165f74f78d 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -17,6 +17,7 @@ obj-$(CONFIG_MACH_OMAP_H2) += board-h2.o
17obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o 17obj-$(CONFIG_MACH_OMAP_INNOVATOR) += board-innovator.o
18obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 18obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
19obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o 19obj-$(CONFIG_MACH_OMAP_PERSEUS2) += board-perseus2.o
20obj-$(CONFIG_MACH_OMAP_FSAMPLE) += board-fsample.o
20obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o 21obj-$(CONFIG_MACH_OMAP_OSK) += board-osk.o
21obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o 22obj-$(CONFIG_MACH_OMAP_H3) += board-h3.o
22obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o 23obj-$(CONFIG_MACH_VOICEBLUE) += board-voiceblue.o
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 73df32aac4c..8437d065ada 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -80,8 +80,15 @@ static struct omap_uart_config ams_delta_uart_config __initdata = {
80 .enabled_uarts = 1, 80 .enabled_uarts = 1,
81}; 81};
82 82
83static struct omap_usb_config ams_delta_usb_config __initdata = {
84 .register_host = 1,
85 .hmc_mode = 16,
86 .pins[0] = 2,
87};
88
83static struct omap_board_config_kernel ams_delta_config[] = { 89static struct omap_board_config_kernel ams_delta_config[] = {
84 { OMAP_TAG_UART, &ams_delta_uart_config }, 90 { OMAP_TAG_UART, &ams_delta_uart_config },
91 { OMAP_TAG_USB, &ams_delta_usb_config },
85}; 92};
86 93
87static struct platform_device ams_delta_led_device = { 94static struct platform_device ams_delta_led_device = {
diff --git a/arch/arm/mach-omap1/board-fsample.c b/arch/arm/mach-omap1/board-fsample.c
new file mode 100644
index 00000000000..c753a3c5aad
--- /dev/null
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -0,0 +1,319 @@
1/*
2 * linux/arch/arm/mach-omap1/board-fsample.c
3 *
4 * Modified from board-perseus2.c
5 *
6 * Original OMAP730 support by Jean Pihet <j-pihet@ti.com>
7 * Updated for 2.6 by Kevin Hilman <kjh@hilman.org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#include <linux/kernel.h>
15#include <linux/init.h>
16#include <linux/platform_device.h>
17#include <linux/delay.h>
18#include <linux/mtd/mtd.h>
19#include <linux/mtd/nand.h>
20#include <linux/mtd/partitions.h>
21#include <linux/input.h>
22
23#include <asm/hardware.h>
24#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26#include <asm/mach/flash.h>
27#include <asm/mach/map.h>
28
29#include <asm/arch/tc.h>
30#include <asm/arch/gpio.h>
31#include <asm/arch/mux.h>
32#include <asm/arch/fpga.h>
33#include <asm/arch/keypad.h>
34#include <asm/arch/common.h>
35#include <asm/arch/board.h>
36#include <asm/arch/board-fsample.h>
37
38static int fsample_keymap[] = {
39 KEY(0,0,KEY_UP),
40 KEY(0,1,KEY_RIGHT),
41 KEY(0,2,KEY_LEFT),
42 KEY(0,3,KEY_DOWN),
43 KEY(0,4,KEY_CENTER),
44 KEY(0,5,KEY_0_5),
45 KEY(1,0,KEY_SOFT2),
46 KEY(1,1,KEY_SEND),
47 KEY(1,2,KEY_END),
48 KEY(1,3,KEY_VOLUMEDOWN),
49 KEY(1,4,KEY_VOLUMEUP),
50 KEY(1,5,KEY_RECORD),
51 KEY(2,0,KEY_SOFT1),
52 KEY(2,1,KEY_3),
53 KEY(2,2,KEY_6),
54 KEY(2,3,KEY_9),
55 KEY(2,4,KEY_SHARP),
56 KEY(2,5,KEY_2_5),
57 KEY(3,0,KEY_BACK),
58 KEY(3,1,KEY_2),
59 KEY(3,2,KEY_5),
60 KEY(3,3,KEY_8),
61 KEY(3,4,KEY_0),
62 KEY(3,5,KEY_HEADSETHOOK),
63 KEY(4,0,KEY_HOME),
64 KEY(4,1,KEY_1),
65 KEY(4,2,KEY_4),
66 KEY(4,3,KEY_7),
67 KEY(4,4,KEY_STAR),
68 KEY(4,5,KEY_POWER),
69 0
70};
71
72static struct resource smc91x_resources[] = {
73 [0] = {
74 .start = H2P2_DBG_FPGA_ETHR_START, /* Physical */
75 .end = H2P2_DBG_FPGA_ETHR_START + 0xf,
76 .flags = IORESOURCE_MEM,
77 },
78 [1] = {
79 .start = INT_730_MPU_EXT_NIRQ,
80 .end = 0,
81 .flags = IORESOURCE_IRQ,
82 },
83};
84
85static struct mtd_partition nor_partitions[] = {
86 /* bootloader (U-Boot, etc) in first sector */
87 {
88 .name = "bootloader",
89 .offset = 0,
90 .size = SZ_128K,
91 .mask_flags = MTD_WRITEABLE, /* force read-only */
92 },
93 /* bootloader params in the next sector */
94 {
95 .name = "params",
96 .offset = MTDPART_OFS_APPEND,
97 .size = SZ_128K,
98 .mask_flags = 0,
99 },
100 /* kernel */
101 {
102 .name = "kernel",
103 .offset = MTDPART_OFS_APPEND,
104 .size = SZ_2M,
105 .mask_flags = 0
106 },
107 /* rest of flash is a file system */
108 {
109 .name = "rootfs",
110 .offset = MTDPART_OFS_APPEND,
111 .size = MTDPART_SIZ_FULL,
112 .mask_flags = 0
113 },
114};
115
116static struct flash_platform_data nor_data = {
117 .map_name = "cfi_probe",
118 .width = 2,
119 .parts = nor_partitions,
120 .nr_parts = ARRAY_SIZE(nor_partitions),
121};
122
123static struct resource nor_resource = {
124 .start = OMAP_CS0_PHYS,
125 .end = OMAP_CS0_PHYS + SZ_32M - 1,
126 .flags = IORESOURCE_MEM,
127};
128
129static struct platform_device nor_device = {
130 .name = "omapflash",
131 .id = 0,
132 .dev = {
133 .platform_data = &nor_data,
134 },
135 .num_resources = 1,
136 .resource = &nor_resource,
137};
138
139static struct nand_platform_data nand_data = {
140 .options = NAND_SAMSUNG_LP_OPTIONS,
141};
142
143static struct resource nand_resource = {
144 .start = OMAP_CS3_PHYS,
145 .end = OMAP_CS3_PHYS + SZ_4K - 1,
146 .flags = IORESOURCE_MEM,
147};
148
149static struct platform_device nand_device = {
150 .name = "omapnand",
151 .id = 0,
152 .dev = {
153 .platform_data = &nand_data,
154 },
155 .num_resources = 1,
156 .resource = &nand_resource,
157};
158
159static struct platform_device smc91x_device = {
160 .name = "smc91x",
161 .id = 0,
162 .num_resources = ARRAY_SIZE(smc91x_resources),
163 .resource = smc91x_resources,
164};
165
166static struct resource kp_resources[] = {
167 [0] = {
168 .start = INT_730_MPUIO_KEYPAD,
169 .end = INT_730_MPUIO_KEYPAD,
170 .flags = IORESOURCE_IRQ,
171 },
172};
173
174static struct omap_kp_platform_data kp_data = {
175 .rows = 8,
176 .cols = 8,
177 .keymap = fsample_keymap,
178};
179
180static struct platform_device kp_device = {
181 .name = "omap-keypad",
182 .id = -1,
183 .dev = {
184 .platform_data = &kp_data,
185 },
186 .num_resources = ARRAY_SIZE(kp_resources),
187 .resource = kp_resources,
188};
189
190static struct platform_device lcd_device = {
191 .name = "lcd_p2",
192 .id = -1,
193};
194
195static struct platform_device *devices[] __initdata = {
196 &nor_device,
197 &nand_device,
198 &smc91x_device,
199 &kp_device,
200 &lcd_device,
201};
202
203#define P2_NAND_RB_GPIO_PIN 62
204
205static int nand_dev_ready(struct nand_platform_data *data)
206{
207 return omap_get_gpio_datain(P2_NAND_RB_GPIO_PIN);
208}
209
210static struct omap_uart_config fsample_uart_config __initdata = {
211 .enabled_uarts = ((1 << 0) | (1 << 1)),
212};
213
214static struct omap_lcd_config fsample_lcd_config __initdata = {
215 .ctrl_name = "internal",
216};
217
218static struct omap_board_config_kernel fsample_config[] = {
219 { OMAP_TAG_UART, &fsample_uart_config },
220 { OMAP_TAG_LCD, &fsample_lcd_config },
221};
222
223static void __init omap_fsample_init(void)
224{
225 if (!(omap_request_gpio(P2_NAND_RB_GPIO_PIN)))
226 nand_data.dev_ready = nand_dev_ready;
227
228 omap_cfg_reg(L3_1610_FLASH_CS2B_OE);
229 omap_cfg_reg(M8_1610_FLASH_CS2B_WE);
230
231 platform_add_devices(devices, ARRAY_SIZE(devices));
232
233 omap_board_config = fsample_config;
234 omap_board_config_size = ARRAY_SIZE(fsample_config);
235 omap_serial_init();
236}
237
238static void __init fsample_init_smc91x(void)
239{
240 fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
241 mdelay(50);
242 fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
243 H2P2_DBG_FPGA_LAN_RESET);
244 mdelay(50);
245}
246
247void omap_fsample_init_irq(void)
248{
249 omap1_init_common_hw();
250 omap_init_irq();
251 omap_gpio_init();
252 fsample_init_smc91x();
253}
254
255/* Only FPGA needs to be mapped here. All others are done with ioremap */
256static struct map_desc omap_fsample_io_desc[] __initdata = {
257 {
258 .virtual = H2P2_DBG_FPGA_BASE,
259 .pfn = __phys_to_pfn(H2P2_DBG_FPGA_START),
260 .length = H2P2_DBG_FPGA_SIZE,
261 .type = MT_DEVICE
262 },
263 {
264 .virtual = FSAMPLE_CPLD_BASE,
265 .pfn = __phys_to_pfn(FSAMPLE_CPLD_START),
266 .length = FSAMPLE_CPLD_SIZE,
267 .type = MT_DEVICE
268 }
269};
270
271static void __init omap_fsample_map_io(void)
272{
273 omap1_map_common_io();
274 iotable_init(omap_fsample_io_desc,
275 ARRAY_SIZE(omap_fsample_io_desc));
276
277 /* Early, board-dependent init */
278
279 /*
280 * Hold GSM Reset until needed
281 */
282 omap_writew(omap_readw(OMAP730_DSP_M_CTL) & ~1, OMAP730_DSP_M_CTL);
283
284 /*
285 * UARTs -> done automagically by 8250 driver
286 */
287
288 /*
289 * CSx timings, GPIO Mux ... setup
290 */
291
292 /* Flash: CS0 timings setup */
293 omap_writel(0x0000fff3, OMAP730_FLASH_CFG_0);
294 omap_writel(0x00000088, OMAP730_FLASH_ACFG_0);
295
296 /*
297 * Ethernet support through the debug board
298 * CS1 timings setup
299 */
300 omap_writel(0x0000fff3, OMAP730_FLASH_CFG_1);
301 omap_writel(0x00000000, OMAP730_FLASH_ACFG_1);
302
303 /*
304 * Configure MPU_EXT_NIRQ IO in IO_CONF9 register,
305 * It is used as the Ethernet controller interrupt
306 */
307 omap_writel(omap_readl(OMAP730_IO_CONF_9) & 0x1FFFFFFF, OMAP730_IO_CONF_9);
308}
309
310MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
311/* Maintainer: Brian Swetland <swetland@google.com> */
312 .phys_io = 0xfff00000,
313 .io_pg_offst = ((0xfef00000) >> 18) & 0xfffc,
314 .boot_params = 0x10000100,
315 .map_io = omap_fsample_map_io,
316 .init_irq = omap_fsample_init_irq,
317 .init_machine = omap_fsample_init,
318 .timer = &omap_timer,
319MACHINE_END
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index 4b8d0ec73cb..7b206116cd0 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -14,7 +14,6 @@
14 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/major.h> 19#include <linux/major.h>
diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c
index e90c137a4cf..4cbc62db5b5 100644
--- a/arch/arm/mach-omap1/board-innovator.c
+++ b/arch/arm/mach-omap1/board-innovator.c
@@ -37,6 +37,8 @@
37#include <asm/arch/usb.h> 37#include <asm/arch/usb.h>
38#include <asm/arch/keypad.h> 38#include <asm/arch/keypad.h>
39#include <asm/arch/common.h> 39#include <asm/arch/common.h>
40#include <asm/arch/mcbsp.h>
41#include <asm/arch/omap-alsa.h>
40 42
41static int innovator_keymap[] = { 43static int innovator_keymap[] = {
42 KEY(0, 0, KEY_F1), 44 KEY(0, 0, KEY_F1),
@@ -112,6 +114,42 @@ static struct platform_device innovator_flash_device = {
112 .resource = &innovator_flash_resource, 114 .resource = &innovator_flash_resource,
113}; 115};
114 116
117#define DEFAULT_BITPERSAMPLE 16
118
119static struct omap_mcbsp_reg_cfg mcbsp_regs = {
120 .spcr2 = FREE | FRST | GRST | XRST | XINTM(3),
121 .spcr1 = RINTM(3) | RRST,
122 .rcr2 = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
123 RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
124 .rcr1 = RFRLEN1(OMAP_MCBSP_WORD_8) | RWDLEN1(OMAP_MCBSP_WORD_16),
125 .xcr2 = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
126 XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
127 .xcr1 = XFRLEN1(OMAP_MCBSP_WORD_8) | XWDLEN1(OMAP_MCBSP_WORD_16),
128 .srgr1 = FWID(DEFAULT_BITPERSAMPLE - 1),
129 .srgr2 = GSYNC | CLKSP | FSGM | FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
130 /*.pcr0 = FSXM | FSRM | CLKXM | CLKRM | CLKXP | CLKRP,*/ /* mcbsp: master */
131 .pcr0 = CLKXP | CLKRP, /* mcbsp: slave */
132};
133
134static struct omap_alsa_codec_config alsa_config = {
135 .name = "OMAP Innovator AIC23",
136 .mcbsp_regs_alsa = &mcbsp_regs,
137 .codec_configure_dev = NULL, // aic23_configure,
138 .codec_set_samplerate = NULL, // aic23_set_samplerate,
139 .codec_clock_setup = NULL, // aic23_clock_setup,
140 .codec_clock_on = NULL, // aic23_clock_on,
141 .codec_clock_off = NULL, // aic23_clock_off,
142 .get_default_samplerate = NULL, // aic23_get_default_samplerate,
143};
144
145static struct platform_device innovator_mcbsp1_device = {
146 .name = "omap_alsa_mcbsp",
147 .id = 1,
148 .dev = {
149 .platform_data = &alsa_config,
150 },
151};
152
115static struct resource innovator_kp_resources[] = { 153static struct resource innovator_kp_resources[] = {
116 [0] = { 154 [0] = {
117 .start = INT_KEYBOARD, 155 .start = INT_KEYBOARD,
@@ -139,6 +177,10 @@ static struct platform_device innovator_kp_device = {
139 177
140#ifdef CONFIG_ARCH_OMAP15XX 178#ifdef CONFIG_ARCH_OMAP15XX
141 179
180#include <linux/spi/spi.h>
181#include <linux/spi/ads7846.h>
182
183
142/* Only FPGA needs to be mapped here. All others are done with ioremap */ 184/* Only FPGA needs to be mapped here. All others are done with ioremap */
143static struct map_desc innovator1510_io_desc[] __initdata = { 185static struct map_desc innovator1510_io_desc[] __initdata = {
144 { 186 {
@@ -174,13 +216,44 @@ static struct platform_device innovator1510_lcd_device = {
174 .id = -1, 216 .id = -1,
175}; 217};
176 218
219static struct platform_device innovator1510_spi_device = {
220 .name = "spi_inn1510",
221 .id = -1,
222};
223
177static struct platform_device *innovator1510_devices[] __initdata = { 224static struct platform_device *innovator1510_devices[] __initdata = {
178 &innovator_flash_device, 225 &innovator_flash_device,
179 &innovator1510_smc91x_device, 226 &innovator1510_smc91x_device,
227 &innovator_mcbsp1_device,
180 &innovator_kp_device, 228 &innovator_kp_device,
181 &innovator1510_lcd_device, 229 &innovator1510_lcd_device,
230 &innovator1510_spi_device,
182}; 231};
183 232
233static int innovator_get_pendown_state(void)
234{
235 return !(fpga_read(OMAP1510_FPGA_TOUCHSCREEN) & (1 << 5));
236}
237
238static const struct ads7846_platform_data innovator1510_ts_info = {
239 .model = 7846,
240 .vref_delay_usecs = 100, /* internal, no capacitor */
241 .x_plate_ohms = 419,
242 .y_plate_ohms = 486,
243 .get_pendown_state = innovator_get_pendown_state,
244};
245
246static struct spi_board_info __initdata innovator1510_boardinfo[] = { {
247 /* FPGA (bus "10") CS0 has an ads7846e */
248 .modalias = "ads7846",
249 .platform_data = &innovator1510_ts_info,
250 .irq = OMAP1510_INT_FPGA_TS,
251 .max_speed_hz = 120000 /* max sample rate at 3V */
252 * 26 /* command + data + overhead */,
253 .bus_num = 10,
254 .chip_select = 0,
255} };
256
184#endif /* CONFIG_ARCH_OMAP15XX */ 257#endif /* CONFIG_ARCH_OMAP15XX */
185 258
186#ifdef CONFIG_ARCH_OMAP16XX 259#ifdef CONFIG_ARCH_OMAP16XX
@@ -311,6 +384,8 @@ static void __init innovator_init(void)
311#ifdef CONFIG_ARCH_OMAP15XX 384#ifdef CONFIG_ARCH_OMAP15XX
312 if (cpu_is_omap1510()) { 385 if (cpu_is_omap1510()) {
313 platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices)); 386 platform_add_devices(innovator1510_devices, ARRAY_SIZE(innovator1510_devices));
387 spi_register_board_info(innovator1510_boardinfo,
388 ARRAY_SIZE(innovator1510_boardinfo));
314 } 389 }
315#endif 390#endif
316#ifdef CONFIG_ARCH_OMAP16XX 391#ifdef CONFIG_ARCH_OMAP16XX
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index 1160093e8ef..b742261c97a 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -29,11 +29,10 @@
29#include <linux/kernel.h> 29#include <linux/kernel.h>
30#include <linux/init.h> 30#include <linux/init.h>
31#include <linux/platform_device.h> 31#include <linux/platform_device.h>
32#include <linux/interrupt.h> 32#include <linux/irq.h>
33 33
34#include <linux/mtd/mtd.h> 34#include <linux/mtd/mtd.h>
35#include <linux/mtd/partitions.h> 35#include <linux/mtd/partitions.h>
36#include <linux/input.h>
37 36
38#include <asm/hardware.h> 37#include <asm/hardware.h>
39#include <asm/mach-types.h> 38#include <asm/mach-types.h>
@@ -45,25 +44,10 @@
45#include <asm/arch/usb.h> 44#include <asm/arch/usb.h>
46#include <asm/arch/mux.h> 45#include <asm/arch/mux.h>
47#include <asm/arch/tc.h> 46#include <asm/arch/tc.h>
48#include <asm/arch/keypad.h>
49#include <asm/arch/common.h> 47#include <asm/arch/common.h>
50#include <asm/arch/mcbsp.h> 48#include <asm/arch/mcbsp.h>
51#include <asm/arch/omap-alsa.h> 49#include <asm/arch/omap-alsa.h>
52 50
53static int osk_keymap[] = {
54 KEY(0, 0, KEY_F1),
55 KEY(0, 3, KEY_UP),
56 KEY(1, 1, KEY_LEFTCTRL),
57 KEY(1, 2, KEY_LEFT),
58 KEY(2, 0, KEY_SPACE),
59 KEY(2, 1, KEY_ESC),
60 KEY(2, 2, KEY_DOWN),
61 KEY(3, 2, KEY_ENTER),
62 KEY(3, 3, KEY_RIGHT),
63 0
64};
65
66
67static struct mtd_partition osk_partitions[] = { 51static struct mtd_partition osk_partitions[] = {
68 /* bootloader (U-Boot, etc) in first sector */ 52 /* bootloader (U-Boot, etc) in first sector */
69 { 53 {
@@ -181,48 +165,17 @@ static struct omap_alsa_codec_config alsa_config = {
181 165
182static struct platform_device osk5912_mcbsp1_device = { 166static struct platform_device osk5912_mcbsp1_device = {
183 .name = "omap_alsa_mcbsp", 167 .name = "omap_alsa_mcbsp",
184 .id = 1, 168 .id = 1,
185 .dev = { 169 .dev = {
186 .platform_data = &alsa_config, 170 .platform_data = &alsa_config,
187 }, 171 },
188}; 172};
189 173
190static struct resource osk5912_kp_resources[] = {
191 [0] = {
192 .start = INT_KEYBOARD,
193 .end = INT_KEYBOARD,
194 .flags = IORESOURCE_IRQ,
195 },
196};
197
198static struct omap_kp_platform_data osk_kp_data = {
199 .rows = 8,
200 .cols = 8,
201 .keymap = osk_keymap,
202};
203
204static struct platform_device osk5912_kp_device = {
205 .name = "omap-keypad",
206 .id = -1,
207 .dev = {
208 .platform_data = &osk_kp_data,
209 },
210 .num_resources = ARRAY_SIZE(osk5912_kp_resources),
211 .resource = osk5912_kp_resources,
212};
213
214static struct platform_device osk5912_lcd_device = {
215 .name = "lcd_osk",
216 .id = -1,
217};
218
219static struct platform_device *osk5912_devices[] __initdata = { 174static struct platform_device *osk5912_devices[] __initdata = {
220 &osk5912_flash_device, 175 &osk5912_flash_device,
221 &osk5912_smc91x_device, 176 &osk5912_smc91x_device,
222 &osk5912_cf_device, 177 &osk5912_cf_device,
223 &osk5912_mcbsp1_device, 178 &osk5912_mcbsp1_device,
224 &osk5912_kp_device,
225 &osk5912_lcd_device,
226}; 179};
227 180
228static void __init osk_init_smc91x(void) 181static void __init osk_init_smc91x(void)
@@ -276,18 +229,100 @@ static struct omap_uart_config osk_uart_config __initdata = {
276 .enabled_uarts = (1 << 0), 229 .enabled_uarts = (1 << 0),
277}; 230};
278 231
232#ifdef CONFIG_OMAP_OSK_MISTRAL
279static struct omap_lcd_config osk_lcd_config __initdata = { 233static struct omap_lcd_config osk_lcd_config __initdata = {
280 .ctrl_name = "internal", 234 .ctrl_name = "internal",
281}; 235};
236#endif
282 237
283static struct omap_board_config_kernel osk_config[] = { 238static struct omap_board_config_kernel osk_config[] = {
284 { OMAP_TAG_USB, &osk_usb_config }, 239 { OMAP_TAG_USB, &osk_usb_config },
285 { OMAP_TAG_UART, &osk_uart_config }, 240 { OMAP_TAG_UART, &osk_uart_config },
241#ifdef CONFIG_OMAP_OSK_MISTRAL
286 { OMAP_TAG_LCD, &osk_lcd_config }, 242 { OMAP_TAG_LCD, &osk_lcd_config },
243#endif
287}; 244};
288 245
289#ifdef CONFIG_OMAP_OSK_MISTRAL 246#ifdef CONFIG_OMAP_OSK_MISTRAL
290 247
248#include <linux/input.h>
249#include <linux/spi/spi.h>
250#include <linux/spi/ads7846.h>
251
252#include <asm/arch/keypad.h>
253
254static const int osk_keymap[] = {
255 /* KEY(col, row, code) */
256 KEY(0, 0, KEY_F1), /* SW4 */
257 KEY(0, 3, KEY_UP), /* (sw2/up) */
258 KEY(1, 1, KEY_LEFTCTRL), /* SW5 */
259 KEY(1, 2, KEY_LEFT), /* (sw2/left) */
260 KEY(2, 0, KEY_SPACE), /* SW3 */
261 KEY(2, 1, KEY_ESC), /* SW6 */
262 KEY(2, 2, KEY_DOWN), /* (sw2/down) */
263 KEY(3, 2, KEY_ENTER), /* (sw2/select) */
264 KEY(3, 3, KEY_RIGHT), /* (sw2/right) */
265 0
266};
267
268static struct omap_kp_platform_data osk_kp_data = {
269 .rows = 8,
270 .cols = 8,
271 .keymap = (int *) osk_keymap,
272};
273
274static struct resource osk5912_kp_resources[] = {
275 [0] = {
276 .start = INT_KEYBOARD,
277 .end = INT_KEYBOARD,
278 .flags = IORESOURCE_IRQ,
279 },
280};
281
282static struct platform_device osk5912_kp_device = {
283 .name = "omap-keypad",
284 .id = -1,
285 .dev = {
286 .platform_data = &osk_kp_data,
287 },
288 .num_resources = ARRAY_SIZE(osk5912_kp_resources),
289 .resource = osk5912_kp_resources,
290};
291
292static struct platform_device osk5912_lcd_device = {
293 .name = "lcd_osk",
294 .id = -1,
295};
296
297static struct platform_device *mistral_devices[] __initdata = {
298 &osk5912_kp_device,
299 &osk5912_lcd_device,
300};
301
302static int mistral_get_pendown_state(void)
303{
304 return !omap_get_gpio_datain(4);
305}
306
307static const struct ads7846_platform_data mistral_ts_info = {
308 .model = 7846,
309 .vref_delay_usecs = 100, /* internal, no capacitor */
310 .x_plate_ohms = 419,
311 .y_plate_ohms = 486,
312 .get_pendown_state = mistral_get_pendown_state,
313};
314
315static struct spi_board_info __initdata mistral_boardinfo[] = { {
316 /* MicroWire (bus 2) CS0 has an ads7846e */
317 .modalias = "ads7846",
318 .platform_data = &mistral_ts_info,
319 .irq = OMAP_GPIO_IRQ(4),
320 .max_speed_hz = 120000 /* max sample rate at 3V */
321 * 26 /* command + data + overhead */,
322 .bus_num = 2,
323 .chip_select = 0,
324} };
325
291#ifdef CONFIG_PM 326#ifdef CONFIG_PM
292static irqreturn_t 327static irqreturn_t
293osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs) 328osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs)
@@ -298,14 +333,18 @@ osk_mistral_wake_interrupt(int irq, void *ignored, struct pt_regs *regs)
298 333
299static void __init osk_mistral_init(void) 334static void __init osk_mistral_init(void)
300{ 335{
301 /* FIXME here's where to feed in framebuffer, touchpad, and 336 /* NOTE: we could actually tell if there's a Mistral board
302 * keyboard setup ... not in the drivers for those devices!
303 *
304 * NOTE: we could actually tell if there's a Mistral board
305 * attached, e.g. by trying to read something from the ads7846. 337 * attached, e.g. by trying to read something from the ads7846.
306 * But this is too early for that... 338 * But this arch_init() code is too early for that, since we
339 * can't talk to the ads or even the i2c eeprom.
307 */ 340 */
308 341
342 // omap_cfg_reg(P19_1610_GPIO6); // BUSY
343 omap_cfg_reg(P20_1610_GPIO4); // PENIRQ
344 set_irq_type(OMAP_GPIO_IRQ(4), IRQT_FALLING);
345 spi_register_board_info(mistral_boardinfo,
346 ARRAY_SIZE(mistral_boardinfo));
347
309 /* the sideways button (SW1) is for use as a "wakeup" button */ 348 /* the sideways button (SW1) is for use as a "wakeup" button */
310 omap_cfg_reg(N15_1610_MPUIO2); 349 omap_cfg_reg(N15_1610_MPUIO2);
311 if (omap_request_gpio(OMAP_MPUIO(2)) == 0) { 350 if (omap_request_gpio(OMAP_MPUIO(2)) == 0) {
@@ -318,7 +357,7 @@ static void __init osk_mistral_init(void)
318 */ 357 */
319 ret = request_irq(OMAP_GPIO_IRQ(OMAP_MPUIO(2)), 358 ret = request_irq(OMAP_GPIO_IRQ(OMAP_MPUIO(2)),
320 &osk_mistral_wake_interrupt, 359 &osk_mistral_wake_interrupt,
321 SA_SHIRQ, "mistral_wakeup", 360 IRQF_SHARED, "mistral_wakeup",
322 &osk_mistral_wake_interrupt); 361 &osk_mistral_wake_interrupt);
323 if (ret != 0) { 362 if (ret != 0) {
324 omap_free_gpio(OMAP_MPUIO(2)); 363 omap_free_gpio(OMAP_MPUIO(2));
@@ -329,6 +368,8 @@ static void __init osk_mistral_init(void)
329#endif 368#endif
330 } else 369 } else
331 printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n"); 370 printk(KERN_ERR "OSK+Mistral: wakeup button is awol\n");
371
372 platform_add_devices(mistral_devices, ARRAY_SIZE(mistral_devices));
332} 373}
333#else 374#else
334static void __init osk_mistral_init(void) { } 375static void __init osk_mistral_init(void) { }
diff --git a/arch/arm/mach-omap1/clock.c b/arch/arm/mach-omap1/clock.c
index 619db18144e..f1958e882e8 100644
--- a/arch/arm/mach-omap1/clock.c
+++ b/arch/arm/mach-omap1/clock.c
@@ -1,3 +1,4 @@
1//kernel/linux-omap-fsample/arch/arm/mach-omap1/clock.c#2 - edit change 3808 (text)
1/* 2/*
2 * linux/arch/arm/mach-omap1/clock.c 3 * linux/arch/arm/mach-omap1/clock.c
3 * 4 *
@@ -20,6 +21,7 @@
20 21
21#include <asm/io.h> 22#include <asm/io.h>
22 23
24#include <asm/arch/cpu.h>
23#include <asm/arch/usb.h> 25#include <asm/arch/usb.h>
24#include <asm/arch/clock.h> 26#include <asm/arch/clock.h>
25#include <asm/arch/sram.h> 27#include <asm/arch/sram.h>
@@ -270,8 +272,12 @@ static int omap1_select_table_rate(struct clk * clk, unsigned long rate)
270 /* 272 /*
271 * In most cases we should not need to reprogram DPLL. 273 * In most cases we should not need to reprogram DPLL.
272 * Reprogramming the DPLL is tricky, it must be done from SRAM. 274 * Reprogramming the DPLL is tricky, it must be done from SRAM.
275 * (on 730, bit 13 must always be 1)
273 */ 276 */
274 omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val); 277 if (cpu_is_omap730())
278 omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val | 0x2000);
279 else
280 omap_sram_reprogram_clock(ptr->dpllctl_val, ptr->ckctl_val);
275 281
276 ck_dpll1.rate = ptr->pll_rate; 282 ck_dpll1.rate = ptr->pll_rate;
277 propagate_rate(&ck_dpll1); 283 propagate_rate(&ck_dpll1);
@@ -748,7 +754,7 @@ int __init omap1_clk_init(void)
748 printk(KERN_ERR "System frequencies not set. Check your config.\n"); 754 printk(KERN_ERR "System frequencies not set. Check your config.\n");
749 /* Guess sane values (60MHz) */ 755 /* Guess sane values (60MHz) */
750 omap_writew(0x2290, DPLL_CTL); 756 omap_writew(0x2290, DPLL_CTL);
751 omap_writew(0x1005, ARM_CKCTL); 757 omap_writew(cpu_is_omap730() ? 0x3005 : 0x1005, ARM_CKCTL);
752 ck_dpll1.rate = 60000000; 758 ck_dpll1.rate = 60000000;
753 propagate_rate(&ck_dpll1); 759 propagate_rate(&ck_dpll1);
754 } 760 }
@@ -761,13 +767,17 @@ int __init omap1_clk_init(void)
761 ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10, 767 ck_dpll1.rate / 1000000, (ck_dpll1.rate / 100000) % 10,
762 arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10); 768 arm_ck.rate / 1000000, (arm_ck.rate / 100000) % 10);
763 769
764#ifdef CONFIG_MACH_OMAP_PERSEUS2 770#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
765 /* Select slicer output as OMAP input clock */ 771 /* Select slicer output as OMAP input clock */
766 omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL); 772 omap_writew(omap_readw(OMAP730_PCC_UPLD_CTRL) & ~0x1, OMAP730_PCC_UPLD_CTRL);
767#endif 773#endif
768 774
769 /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */ 775 /* Turn off DSP and ARM_TIMXO. Make sure ARM_INTHCK is not divided */
770 omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL); 776 /* (on 730, bit 13 must not be cleared) */
777 if (cpu_is_omap730())
778 omap_writew(omap_readw(ARM_CKCTL) & 0x2fff, ARM_CKCTL);
779 else
780 omap_writew(omap_readw(ARM_CKCTL) & 0x0fff, ARM_CKCTL);
771 781
772 /* Put DSP/MPUI into reset until needed */ 782 /* Put DSP/MPUI into reset until needed */
773 omap_writew(0, ARM_RSTCT1); 783 omap_writew(0, ARM_RSTCT1);
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 847329cafc5..a611c3b6395 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c
index aca2a120813..34eb79ee6e6 100644
--- a/arch/arm/mach-omap1/fpga.c
+++ b/arch/arm/mach-omap1/fpga.c
@@ -16,7 +16,6 @@
16 * published by the Free Software Foundation. 16 * published by the Free Software Foundation.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/types.h> 19#include <linux/types.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
@@ -134,7 +133,7 @@ static struct irqchip omap_fpga_irq = {
134 * mask_ack routine for all of the FPGA interrupts has been changed from 133 * mask_ack routine for all of the FPGA interrupts has been changed from
135 * fpga_mask_ack_irq() to fpga_ack_irq() so that the specific FPGA interrupt 134 * fpga_mask_ack_irq() to fpga_ack_irq() so that the specific FPGA interrupt
136 * being serviced is left unmasked. We can do this because the FPGA cascade 135 * being serviced is left unmasked. We can do this because the FPGA cascade
137 * interrupt is installed with the SA_INTERRUPT flag, which leaves all 136 * interrupt is installed with the IRQF_DISABLED flag, which leaves all
138 * interrupts masked at the CPU while an FPGA interrupt handler executes. 137 * interrupts masked at the CPU while an FPGA interrupt handler executes.
139 * 138 *
140 * Limited testing indicates that this workaround appears to be effective 139 * Limited testing indicates that this workaround appears to be effective
diff --git a/arch/arm/mach-omap1/id.c b/arch/arm/mach-omap1/id.c
index 5c637c04836..da13c3e8285 100644
--- a/arch/arm/mach-omap1/id.c
+++ b/arch/arm/mach-omap1/id.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.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/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index be3a2a4ee2b..fab8b0b27cf 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -8,7 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/arch/arm/mach-omap1/irq.c b/arch/arm/mach-omap1/irq.c
index a0431c00fa8..9e039845b50 100644
--- a/arch/arm/mach-omap1/irq.c
+++ b/arch/arm/mach-omap1/irq.c
@@ -36,7 +36,6 @@
36 * 675 Mass Ave, Cambridge, MA 02139, USA. 36 * 675 Mass Ave, Cambridge, MA 02139, USA.
37 */ 37 */
38 38
39#include <linux/config.h>
40#include <linux/init.h> 39#include <linux/init.h>
41#include <linux/module.h> 40#include <linux/module.h>
42#include <linux/sched.h> 41#include <linux/sched.h>
diff --git a/arch/arm/mach-omap1/leds-h2p2-debug.c b/arch/arm/mach-omap1/leds-h2p2-debug.c
index 65065081591..8976fbb21f7 100644
--- a/arch/arm/mach-omap1/leds-h2p2-debug.c
+++ b/arch/arm/mach-omap1/leds-h2p2-debug.c
@@ -9,7 +9,6 @@
9 * The "surfer" expansion board and H2 sample board also have two-color 9 * The "surfer" expansion board and H2 sample board also have two-color
10 * green+red LEDs (in parallel), used here for timer and idle indicators. 10 * green+red LEDs (in parallel), used here for timer and idle indicators.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/kernel_stat.h> 13#include <linux/kernel_stat.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
diff --git a/arch/arm/mach-omap1/leds-innovator.c b/arch/arm/mach-omap1/leds-innovator.c
index c8ffd1ddcde..a0cd001ac39 100644
--- a/arch/arm/mach-omap1/leds-innovator.c
+++ b/arch/arm/mach-omap1/leds-innovator.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * linux/arch/arm/mach-omap1/leds-innovator.c 2 * linux/arch/arm/mach-omap1/leds-innovator.c
3 */ 3 */
4#include <linux/config.h>
5#include <linux/init.h> 4#include <linux/init.h>
6 5
7#include <asm/hardware.h> 6#include <asm/hardware.h>
diff --git a/arch/arm/mach-omap1/leds-osk.c b/arch/arm/mach-omap1/leds-osk.c
index 2c8bda847c1..3b29e59b0e6 100644
--- a/arch/arm/mach-omap1/leds-osk.c
+++ b/arch/arm/mach-omap1/leds-osk.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * LED driver for OSK, and optionally Mistral QVGA, boards 4 * LED driver for OSK, and optionally Mistral QVGA, boards
5 */ 5 */
6#include <linux/config.h>
7#include <linux/init.h> 6#include <linux/init.h>
8#include <linux/workqueue.h> 7#include <linux/workqueue.h>
9 8
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index 10fe0b3efca..fa74ef7af15 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <asm/system.h> 27#include <asm/system.h>
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c
index ddf6b07dc9c..cd76185bab7 100644
--- a/arch/arm/mach-omap1/pm.c
+++ b/arch/arm/mach-omap1/pm.c
@@ -1,3 +1,4 @@
1//kernel/linux-omap-fsample/arch/arm/mach-omap1/pm.c#3 - integrate change 4545 (text)
1/* 2/*
2 * linux/arch/arm/mach-omap1/pm.c 3 * linux/arch/arm/mach-omap1/pm.c
3 * 4 *
@@ -50,6 +51,7 @@
50#include <asm/mach/irq.h> 51#include <asm/mach/irq.h>
51#include <asm/mach-types.h> 52#include <asm/mach-types.h>
52 53
54#include <asm/arch/cpu.h>
53#include <asm/arch/irqs.h> 55#include <asm/arch/irqs.h>
54#include <asm/arch/clock.h> 56#include <asm/arch/clock.h>
55#include <asm/arch/sram.h> 57#include <asm/arch/sram.h>
@@ -326,8 +328,9 @@ void omap_pm_suspend(void)
326 /* stop DSP */ 328 /* stop DSP */
327 omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1); 329 omap_writew(omap_readw(ARM_RSTCT1) & ~(1 << DSP_EN), ARM_RSTCT1);
328 330
329 /* shut down dsp_ck */ 331 /* shut down dsp_ck */
330 omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL); 332 if (!cpu_is_omap730())
333 omap_writew(omap_readw(ARM_CKCTL) & ~(1 << EN_DSPCK), ARM_CKCTL);
331 334
332 /* temporarily enabling api_ck to access DSP registers */ 335 /* temporarily enabling api_ck to access DSP registers */
333 omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2); 336 omap_writew(omap_readw(ARM_IDLECT2) | 1 << EN_APICK, ARM_IDLECT2);
@@ -687,7 +690,7 @@ static irqreturn_t omap_wakeup_interrupt(int irq, void * dev,
687 690
688static struct irqaction omap_wakeup_irq = { 691static struct irqaction omap_wakeup_irq = {
689 .name = "peripheral wakeup", 692 .name = "peripheral wakeup",
690 .flags = SA_INTERRUPT, 693 .flags = IRQF_DISABLED,
691 .handler = omap_wakeup_interrupt 694 .handler = omap_wakeup_interrupt
692}; 695};
693 696
diff --git a/arch/arm/mach-omap1/serial.c b/arch/arm/mach-omap1/serial.c
index 9b4cd698bec..976edfb882e 100644
--- a/arch/arm/mach-omap1/serial.c
+++ b/arch/arm/mach-omap1/serial.c
@@ -8,10 +8,10 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/irq.h>
15#include <linux/delay.h> 15#include <linux/delay.h>
16#include <linux/serial.h> 16#include <linux/serial.h>
17#include <linux/tty.h> 17#include <linux/tty.h>
@@ -253,7 +253,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr)
253 } 253 }
254 omap_set_gpio_direction(gpio_nr, 1); 254 omap_set_gpio_direction(gpio_nr, 1);
255 ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt, 255 ret = request_irq(OMAP_GPIO_IRQ(gpio_nr), &omap_serial_wake_interrupt,
256 SA_TRIGGER_RISING, "serial wakeup", NULL); 256 IRQF_TRIGGER_RISING, "serial wakeup", NULL);
257 if (ret) { 257 if (ret) {
258 omap_free_gpio(gpio_nr); 258 omap_free_gpio(gpio_nr);
259 printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n", 259 printk(KERN_ERR "No interrupt for UART wake GPIO: %i\n",
diff --git a/arch/arm/mach-omap1/sleep.S b/arch/arm/mach-omap1/sleep.S
index e58295e2d3b..abef33d10f0 100644
--- a/arch/arm/mach-omap1/sleep.S
+++ b/arch/arm/mach-omap1/sleep.S
@@ -32,7 +32,6 @@
32 * 675 Mass Ave, Cambridge, MA 02139, USA. 32 * 675 Mass Ave, Cambridge, MA 02139, USA.
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/linkage.h> 35#include <linux/linkage.h>
37#include <asm/assembler.h> 36#include <asm/assembler.h>
38#include <asm/arch/io.h> 37#include <asm/arch/io.h>
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index a85fe6066bc..4d91b9f5108 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -33,7 +33,6 @@
33 * 675 Mass Ave, Cambridge, MA 02139, USA. 33 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/kernel.h> 36#include <linux/kernel.h>
38#include <linux/init.h> 37#include <linux/init.h>
39#include <linux/delay.h> 38#include <linux/delay.h>
@@ -94,7 +93,7 @@ static inline unsigned long long cycles_2_ns(unsigned long long cyc)
94 * will break. On P2, the timer count rate is 6.5 MHz after programming PTV 93 * will break. On P2, the timer count rate is 6.5 MHz after programming PTV
95 * with 0. This divides the 13MHz input by 2, and is undocumented. 94 * with 0. This divides the 13MHz input by 2, and is undocumented.
96 */ 95 */
97#ifdef CONFIG_MACH_OMAP_PERSEUS2 96#if defined(CONFIG_MACH_OMAP_PERSEUS2) || defined(CONFIG_MACH_OMAP_FSAMPLE)
98/* REVISIT: This ifdef construct should be replaced by a query to clock 97/* REVISIT: This ifdef construct should be replaced by a query to clock
99 * framework to see if timer base frequency is 12.0, 13.0 or 19.2 MHz. 98 * framework to see if timer base frequency is 12.0, 13.0 or 19.2 MHz.
100 */ 99 */
@@ -178,7 +177,7 @@ static irqreturn_t omap_mpu_timer_interrupt(int irq, void *dev_id,
178 177
179static struct irqaction omap_mpu_timer_irq = { 178static struct irqaction omap_mpu_timer_irq = {
180 .name = "mpu timer", 179 .name = "mpu timer",
181 .flags = SA_INTERRUPT | SA_TIMER, 180 .flags = IRQF_DISABLED | IRQF_TIMER,
182 .handler = omap_mpu_timer_interrupt, 181 .handler = omap_mpu_timer_interrupt,
183}; 182};
184 183
@@ -192,7 +191,7 @@ static irqreturn_t omap_mpu_timer1_interrupt(int irq, void *dev_id,
192 191
193static struct irqaction omap_mpu_timer1_irq = { 192static struct irqaction omap_mpu_timer1_irq = {
194 .name = "mpu timer1 overflow", 193 .name = "mpu timer1 overflow",
195 .flags = SA_INTERRUPT, 194 .flags = IRQF_DISABLED,
196 .handler = omap_mpu_timer1_interrupt, 195 .handler = omap_mpu_timer1_interrupt,
197}; 196};
198 197
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 537dd2e6d38..aab97ccf1e6 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -8,6 +8,7 @@ config ARCH_OMAP24XX
8config ARCH_OMAP2420 8config ARCH_OMAP2420
9 bool "OMAP2420 support" 9 bool "OMAP2420 support"
10 depends on ARCH_OMAP24XX 10 depends on ARCH_OMAP24XX
11 select OMAP_DM_TIMER
11 12
12comment "OMAP Board Type" 13comment "OMAP Board Type"
13 depends on ARCH_OMAP2 14 depends on ARCH_OMAP2
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 111eaa64258..266d88e77bd 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -3,12 +3,13 @@
3# 3#
4 4
5# Common support 5# Common support
6obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o serial.o 6obj-y := irq.o id.o io.o sram-fn.o memory.o prcm.o clock.o mux.o devices.o \
7 serial.o gpmc.o
7 8
8obj-$(CONFIG_OMAP_MPU_TIMER) += timer-gp.o 9obj-$(CONFIG_OMAP_MPU_TIMER) += timer-gp.o
9 10
10# Power Management 11# Power Management
11obj-$(CONFIG_PM) += pm.o sleep.o 12obj-$(CONFIG_PM) += pm.o pm-domain.o sleep.o
12 13
13# Specific board support 14# Specific board support
14obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o 15obj-$(CONFIG_MACH_OMAP_GENERIC) += board-generic.o
diff --git a/arch/arm/mach-omap2/board-apollon.c b/arch/arm/mach-omap2/board-apollon.c
index 6c6ba172cdf..7993b7bae2b 100644
--- a/arch/arm/mach-omap2/board-apollon.c
+++ b/arch/arm/mach-omap2/board-apollon.c
@@ -234,17 +234,17 @@ static void __init apollon_sw_init(void)
234 234
235 set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQT_RISING); 235 set_irq_type(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), IRQT_RISING);
236 if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt, 236 if (request_irq(OMAP_GPIO_IRQ(SW_ENTER_GPIO16), &apollon_sw_interrupt,
237 SA_SHIRQ, "enter sw", 237 IRQF_SHARED, "enter sw",
238 &apollon_sw_interrupt)) 238 &apollon_sw_interrupt))
239 return; 239 return;
240 set_irq_type(OMAP_GPIO_IRQ(SW_UP_GPIO17), IRQT_RISING); 240 set_irq_type(OMAP_GPIO_IRQ(SW_UP_GPIO17), IRQT_RISING);
241 if (request_irq(OMAP_GPIO_IRQ(SW_UP_GPIO17), &apollon_sw_interrupt, 241 if (request_irq(OMAP_GPIO_IRQ(SW_UP_GPIO17), &apollon_sw_interrupt,
242 SA_SHIRQ, "up sw", 242 IRQF_SHARED, "up sw",
243 &apollon_sw_interrupt)) 243 &apollon_sw_interrupt))
244 return; 244 return;
245 set_irq_type(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), IRQT_RISING); 245 set_irq_type(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), IRQT_RISING);
246 if (request_irq(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), &apollon_sw_interrupt, 246 if (request_irq(OMAP_GPIO_IRQ(SW_DOWN_GPIO58), &apollon_sw_interrupt,
247 SA_SHIRQ, "down sw", 247 IRQF_SHARED, "down sw",
248 &apollon_sw_interrupt)) 248 &apollon_sw_interrupt))
249 return; 249 return;
250} 250}
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c
index 72eb4bf571a..d1b648a4efb 100644
--- a/arch/arm/mach-omap2/clock.c
+++ b/arch/arm/mach-omap2/clock.c
@@ -15,7 +15,6 @@
15 * it under the terms of the GNU General Public License version 2 as 15 * it under the terms of the GNU General Public License version 2 as
16 * published by the Free Software Foundation. 16 * published by the Free Software Foundation.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/device.h> 20#include <linux/device.h>
@@ -660,26 +659,35 @@ static int omap2_clk_set_rate(struct clk *clk, unsigned long rate)
660 659
661 /* Isolate control register */ 660 /* Isolate control register */
662 div_sel = (SRC_RATE_SEL_MASK & clk->flags); 661 div_sel = (SRC_RATE_SEL_MASK & clk->flags);
663 div_off = clk->src_offset; 662 div_off = clk->rate_offset;
664 663
665 validrate = omap2_clksel_round_rate(clk, rate, &new_div); 664 validrate = omap2_clksel_round_rate(clk, rate, &new_div);
666 if(validrate != rate) 665 if (validrate != rate)
667 return(ret); 666 return(ret);
668 667
669 field_val = omap2_get_clksel(&div_sel, &field_mask, clk); 668 field_val = omap2_get_clksel(&div_sel, &field_mask, clk);
670 if (div_sel == 0) 669 if (div_sel == 0)
671 return ret; 670 return ret;
672 671
673 if(clk->flags & CM_SYSCLKOUT_SEL1){ 672 if (clk->flags & CM_SYSCLKOUT_SEL1) {
674 switch(new_div){ 673 switch (new_div) {
675 case 16: field_val = 4; break; 674 case 16:
676 case 8: field_val = 3; break; 675 field_val = 4;
677 case 4: field_val = 2; break; 676 break;
678 case 2: field_val = 1; break; 677 case 8:
679 case 1: field_val = 0; break; 678 field_val = 3;
679 break;
680 case 4:
681 field_val = 2;
682 break;
683 case 2:
684 field_val = 1;
685 break;
686 case 1:
687 field_val = 0;
688 break;
680 } 689 }
681 } 690 } else
682 else
683 field_val = new_div; 691 field_val = new_div;
684 692
685 reg = (void __iomem *)div_sel; 693 reg = (void __iomem *)div_sel;
@@ -744,7 +752,7 @@ static u32 omap2_get_src_field(u32 *type_to_addr, u32 reg_offset,
744 val = 0x2; 752 val = 0x2;
745 break; 753 break;
746 case CM_WKUP_SEL1: 754 case CM_WKUP_SEL1:
747 src_reg_addr = (u32)&CM_CLKSEL2_CORE; 755 src_reg_addr = (u32)&CM_CLKSEL_WKUP;
748 mask = 0x3; 756 mask = 0x3;
749 if (src_clk == &func_32k_ck) 757 if (src_clk == &func_32k_ck)
750 val = 0x0; 758 val = 0x0;
@@ -784,9 +792,9 @@ static u32 omap2_get_src_field(u32 *type_to_addr, u32 reg_offset,
784 val = 0; 792 val = 0;
785 if (src_clk == &sys_ck) 793 if (src_clk == &sys_ck)
786 val = 1; 794 val = 1;
787 if (src_clk == &func_54m_ck)
788 val = 2;
789 if (src_clk == &func_96m_ck) 795 if (src_clk == &func_96m_ck)
796 val = 2;
797 if (src_clk == &func_54m_ck)
790 val = 3; 798 val = 3;
791 break; 799 break;
792 } 800 }
diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
index 6c78d471fab..2781dfbc516 100644
--- a/arch/arm/mach-omap2/clock.h
+++ b/arch/arm/mach-omap2/clock.h
@@ -1062,7 +1062,7 @@ static struct clk gpt2_ick = {
1062 .parent = &l4_ck, 1062 .parent = &l4_ck,
1063 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X, 1063 .flags = CLOCK_IN_OMAP242X | CLOCK_IN_OMAP243X,
1064 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit4 */ 1064 .enable_reg = (void __iomem *)&CM_ICLKEN1_CORE, /* Bit4 */
1065 .enable_bit = 0, 1065 .enable_bit = 4,
1066 .recalc = &omap2_followparent_recalc, 1066 .recalc = &omap2_followparent_recalc,
1067}; 1067};
1068 1068
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c
index fb7f91da1aa..aa4322451e8 100644
--- a/arch/arm/mach-omap2/devices.c
+++ b/arch/arm/mach-omap2/devices.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
@@ -105,6 +104,51 @@ static inline void omap_init_sti(void)
105static inline void omap_init_sti(void) {} 104static inline void omap_init_sti(void) {}
106#endif 105#endif
107 106
107#if defined(CONFIG_SPI_OMAP24XX)
108
109#include <asm/arch/mcspi.h>
110
111#define OMAP2_MCSPI1_BASE 0x48098000
112#define OMAP2_MCSPI2_BASE 0x4809a000
113
114/* FIXME: use resources instead */
115
116static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
117 .base = io_p2v(OMAP2_MCSPI1_BASE),
118 .num_cs = 4,
119};
120
121struct platform_device omap2_mcspi1 = {
122 .name = "omap2_mcspi",
123 .id = 1,
124 .dev = {
125 .platform_data = &omap2_mcspi1_config,
126 },
127};
128
129static struct omap2_mcspi_platform_config omap2_mcspi2_config = {
130 .base = io_p2v(OMAP2_MCSPI2_BASE),
131 .num_cs = 2,
132};
133
134struct platform_device omap2_mcspi2 = {
135 .name = "omap2_mcspi",
136 .id = 2,
137 .dev = {
138 .platform_data = &omap2_mcspi2_config,
139 },
140};
141
142static void omap_init_mcspi(void)
143{
144 platform_device_register(&omap2_mcspi1);
145 platform_device_register(&omap2_mcspi2);
146}
147
148#else
149static inline void omap_init_mcspi(void) {}
150#endif
151
108/*-------------------------------------------------------------------------*/ 152/*-------------------------------------------------------------------------*/
109 153
110static int __init omap2_init_devices(void) 154static int __init omap2_init_devices(void)
@@ -113,6 +157,7 @@ static int __init omap2_init_devices(void)
113 * in alphabetical order so they're easier to sort through. 157 * in alphabetical order so they're easier to sort through.
114 */ 158 */
115 omap_init_i2c(); 159 omap_init_i2c();
160 omap_init_mcspi();
116 omap_init_sti(); 161 omap_init_sti();
117 162
118 return 0; 163 return 0;
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
new file mode 100644
index 00000000000..c7a48f921fe
--- /dev/null
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -0,0 +1,209 @@
1/*
2 * GPMC support functions
3 *
4 * Copyright (C) 2005-2006 Nokia Corporation
5 *
6 * Author: Juha Yrjola
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/err.h>
15#include <linux/clk.h>
16
17#include <asm/io.h>
18#include <asm/arch/gpmc.h>
19
20#undef DEBUG
21
22#define GPMC_BASE 0x6800a000
23#define GPMC_REVISION 0x00
24#define GPMC_SYSCONFIG 0x10
25#define GPMC_SYSSTATUS 0x14
26#define GPMC_IRQSTATUS 0x18
27#define GPMC_IRQENABLE 0x1c
28#define GPMC_TIMEOUT_CONTROL 0x40
29#define GPMC_ERR_ADDRESS 0x44
30#define GPMC_ERR_TYPE 0x48
31#define GPMC_CONFIG 0x50
32#define GPMC_STATUS 0x54
33#define GPMC_PREFETCH_CONFIG1 0x1e0
34#define GPMC_PREFETCH_CONFIG2 0x1e4
35#define GPMC_PREFETCH_CONTROL 0x1e8
36#define GPMC_PREFETCH_STATUS 0x1f0
37#define GPMC_ECC_CONFIG 0x1f4
38#define GPMC_ECC_CONTROL 0x1f8
39#define GPMC_ECC_SIZE_CONFIG 0x1fc
40
41#define GPMC_CS0 0x60
42#define GPMC_CS_SIZE 0x30
43
44static void __iomem *gpmc_base =
45 (void __iomem *) IO_ADDRESS(GPMC_BASE);
46static void __iomem *gpmc_cs_base =
47 (void __iomem *) IO_ADDRESS(GPMC_BASE) + GPMC_CS0;
48
49static struct clk *gpmc_l3_clk;
50
51static void gpmc_write_reg(int idx, u32 val)
52{
53 __raw_writel(val, gpmc_base + idx);
54}
55
56static u32 gpmc_read_reg(int idx)
57{
58 return __raw_readl(gpmc_base + idx);
59}
60
61void gpmc_cs_write_reg(int cs, int idx, u32 val)
62{
63 void __iomem *reg_addr;
64
65 reg_addr = gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx;
66 __raw_writel(val, reg_addr);
67}
68
69u32 gpmc_cs_read_reg(int cs, int idx)
70{
71 return __raw_readl(gpmc_cs_base + (cs * GPMC_CS_SIZE) + idx);
72}
73
74/* TODO: Add support for gpmc_fck to clock framework and use it */
75static unsigned long gpmc_get_fclk_period(void)
76{
77 /* In picoseconds */
78 return 1000000000 / ((clk_get_rate(gpmc_l3_clk)) / 1000);
79}
80
81unsigned int gpmc_ns_to_ticks(unsigned int time_ns)
82{
83 unsigned long tick_ps;
84
85 /* Calculate in picosecs to yield more exact results */
86 tick_ps = gpmc_get_fclk_period();
87
88 return (time_ns * 1000 + tick_ps - 1) / tick_ps;
89}
90
91#ifdef DEBUG
92static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
93 int time, const char *name)
94#else
95static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit,
96 int time)
97#endif
98{
99 u32 l;
100 int ticks, mask, nr_bits;
101
102 if (time == 0)
103 ticks = 0;
104 else
105 ticks = gpmc_ns_to_ticks(time);
106 nr_bits = end_bit - st_bit + 1;
107 if (ticks >= 1 << nr_bits)
108 return -1;
109
110 mask = (1 << nr_bits) - 1;
111 l = gpmc_cs_read_reg(cs, reg);
112#ifdef DEBUG
113 printk(KERN_INFO "GPMC CS%d: %-10s: %d ticks, %3lu ns (was %i ticks)\n",
114 cs, name, ticks, gpmc_get_fclk_period() * ticks / 1000,
115 (l >> st_bit) & mask);
116#endif
117 l &= ~(mask << st_bit);
118 l |= ticks << st_bit;
119 gpmc_cs_write_reg(cs, reg, l);
120
121 return 0;
122}
123
124#ifdef DEBUG
125#define GPMC_SET_ONE(reg, st, end, field) \
126 if (set_gpmc_timing_reg(cs, (reg), (st), (end), \
127 t->field, #field) < 0) \
128 return -1
129#else
130#define GPMC_SET_ONE(reg, st, end, field) \
131 if (set_gpmc_timing_reg(cs, (reg), (st), (end), t->field) < 0) \
132 return -1
133#endif
134
135int gpmc_cs_calc_divider(int cs, unsigned int sync_clk)
136{
137 int div;
138 u32 l;
139
140 l = sync_clk * 1000 + (gpmc_get_fclk_period() - 1);
141 div = l / gpmc_get_fclk_period();
142 if (div > 4)
143 return -1;
144 if (div < 0)
145 div = 1;
146
147 return div;
148}
149
150int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t)
151{
152 int div;
153 u32 l;
154
155 div = gpmc_cs_calc_divider(cs, t->sync_clk);
156 if (div < 0)
157 return -1;
158
159 GPMC_SET_ONE(GPMC_CS_CONFIG2, 0, 3, cs_on);
160 GPMC_SET_ONE(GPMC_CS_CONFIG2, 8, 12, cs_rd_off);
161 GPMC_SET_ONE(GPMC_CS_CONFIG2, 16, 20, cs_wr_off);
162
163 GPMC_SET_ONE(GPMC_CS_CONFIG3, 0, 3, adv_on);
164 GPMC_SET_ONE(GPMC_CS_CONFIG3, 8, 12, adv_rd_off);
165 GPMC_SET_ONE(GPMC_CS_CONFIG3, 16, 20, adv_wr_off);
166
167 GPMC_SET_ONE(GPMC_CS_CONFIG4, 0, 3, oe_on);
168 GPMC_SET_ONE(GPMC_CS_CONFIG4, 8, 12, oe_off);
169 GPMC_SET_ONE(GPMC_CS_CONFIG4, 16, 19, we_on);
170 GPMC_SET_ONE(GPMC_CS_CONFIG4, 24, 28, we_off);
171
172 GPMC_SET_ONE(GPMC_CS_CONFIG5, 0, 4, rd_cycle);
173 GPMC_SET_ONE(GPMC_CS_CONFIG5, 8, 12, wr_cycle);
174 GPMC_SET_ONE(GPMC_CS_CONFIG5, 16, 20, access);
175
176 GPMC_SET_ONE(GPMC_CS_CONFIG5, 24, 27, page_burst_access);
177
178#ifdef DEBUG
179 printk(KERN_INFO "GPMC CS%d CLK period is %lu (div %d)\n",
180 cs, gpmc_get_fclk_period(), div);
181#endif
182
183 l = gpmc_cs_read_reg(cs, GPMC_CS_CONFIG1);
184 l &= ~0x03;
185 l |= (div - 1);
186
187 return 0;
188}
189
190unsigned long gpmc_cs_get_base_addr(int cs)
191{
192 return (gpmc_cs_read_reg(cs, GPMC_CS_CONFIG7) & 0x1f) << 24;
193}
194
195void __init gpmc_init(void)
196{
197 u32 l;
198
199 gpmc_l3_clk = clk_get(NULL, "core_l3_ck");
200 BUG_ON(IS_ERR(gpmc_l3_clk));
201
202 l = gpmc_read_reg(GPMC_REVISION);
203 printk(KERN_INFO "GPMC revision %d.%d\n", (l >> 4) & 0x0f, l & 0x0f);
204 /* Set smart idle mode and automatic L3 clock gating */
205 l = gpmc_read_reg(GPMC_SYSCONFIG);
206 l &= 0x03 << 3;
207 l |= (0x02 << 3) | (1 << 0);
208 gpmc_write_reg(GPMC_SYSCONFIG, l);
209}
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 76187300f2b..871ace4fccb 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.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/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 7d5711611f2..a0728c33e5d 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
@@ -27,6 +26,7 @@
27extern void omap_sram_init(void); 26extern void omap_sram_init(void);
28extern int omap2_clk_init(void); 27extern int omap2_clk_init(void);
29extern void omap2_check_revision(void); 28extern void omap2_check_revision(void);
29extern void gpmc_init(void);
30 30
31/* 31/*
32 * The machine specific code may provide the extra mapping besides the 32 * The machine specific code may provide the extra mapping besides the
@@ -67,4 +67,5 @@ void __init omap2_init_common_hw(void)
67{ 67{
68 omap2_mux_init(); 68 omap2_mux_init();
69 omap2_clk_init(); 69 omap2_clk_init();
70 gpmc_init();
70} 71}
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c
index d7baff675cf..3eed6a737bf 100644
--- a/arch/arm/mach-omap2/irq.c
+++ b/arch/arm/mach-omap2/irq.c
@@ -12,7 +12,6 @@
12 */ 12 */
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/config.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <asm/hardware.h> 16#include <asm/hardware.h>
18#include <asm/mach/irq.h> 17#include <asm/mach/irq.h>
diff --git a/arch/arm/mach-omap2/memory.c b/arch/arm/mach-omap2/memory.c
index 1d925d69fc3..85cbc2a2e66 100644
--- a/arch/arm/mach-omap2/memory.c
+++ b/arch/arm/mach-omap2/memory.c
@@ -14,7 +14,6 @@
14 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/device.h> 19#include <linux/device.h>
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 1197dc38c20..60ef084faff 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <asm/system.h> 27#include <asm/system.h>
@@ -53,6 +52,12 @@ MUX_CFG_24XX("W19_24XX_SYS_NIRQ", 0x12c, 0, 1, 1, 1)
53/* 24xx clocks */ 52/* 24xx clocks */
54MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1) 53MUX_CFG_24XX("W14_24XX_SYS_CLKOUT", 0x137, 0, 1, 1, 1)
55 54
55/* 24xx GPMC wait pin monitoring */
56MUX_CFG_24XX("L3_GPMC_WAIT0", 0x09a, 0, 1, 1, 1)
57MUX_CFG_24XX("N7_GPMC_WAIT1", 0x09b, 0, 1, 1, 1)
58MUX_CFG_24XX("M1_GPMC_WAIT2", 0x09c, 0, 1, 1, 1)
59MUX_CFG_24XX("P1_GPMC_WAIT3", 0x09d, 0, 1, 1, 1)
60
56/* 24xx McBSP */ 61/* 24xx McBSP */
57MUX_CFG_24XX("Y15_24XX_MCBSP2_CLKX", 0x124, 1, 1, 0, 1) 62MUX_CFG_24XX("Y15_24XX_MCBSP2_CLKX", 0x124, 1, 1, 0, 1)
58MUX_CFG_24XX("R14_24XX_MCBSP2_FSX", 0x125, 1, 1, 0, 1) 63MUX_CFG_24XX("R14_24XX_MCBSP2_FSX", 0x125, 1, 1, 0, 1)
@@ -60,18 +65,38 @@ MUX_CFG_24XX("W15_24XX_MCBSP2_DR", 0x126, 1, 1, 0, 1)
60MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1) 65MUX_CFG_24XX("V15_24XX_MCBSP2_DX", 0x127, 1, 1, 0, 1)
61 66
62/* 24xx GPIO */ 67/* 24xx GPIO */
63MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1) 68MUX_CFG_24XX("M21_242X_GPIO11", 0x0c9, 3, 1, 1, 1)
64MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1) 69MUX_CFG_24XX("AA10_242X_GPIO13", 0x0e5, 3, 0, 0, 1)
65MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1) 70MUX_CFG_24XX("AA6_242X_GPIO14", 0x0e6, 3, 0, 0, 1)
66MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1) 71MUX_CFG_24XX("AA4_242X_GPIO15", 0x0e7, 3, 0, 0, 1)
67MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1) 72MUX_CFG_24XX("Y11_242X_GPIO16", 0x0e8, 3, 0, 0, 1)
68MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1) 73MUX_CFG_24XX("AA12_242X_GPIO17", 0x0e9, 3, 0, 0, 1)
69MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1) 74MUX_CFG_24XX("AA8_242X_GPIO58", 0x0ea, 3, 0, 0, 1)
70MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1) 75MUX_CFG_24XX("Y20_24XX_GPIO60", 0x12c, 3, 0, 0, 1)
71MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1) 76MUX_CFG_24XX("W4__24XX_GPIO74", 0x0f2, 3, 0, 0, 1)
72MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1) 77MUX_CFG_24XX("M15_24XX_GPIO92", 0x10a, 3, 0, 0, 1)
73MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1) 78MUX_CFG_24XX("V14_24XX_GPIO117", 0x128, 3, 1, 0, 1)
74 79
80/* 242x DBG GPIO */
81MUX_CFG_24XX("V4_242X_GPIO49", 0xd3, 3, 0, 0, 1)
82MUX_CFG_24XX("W2_242X_GPIO50", 0xd4, 3, 0, 0, 1)
83MUX_CFG_24XX("U4_242X_GPIO51", 0xd5, 3, 0, 0, 1)
84MUX_CFG_24XX("V3_242X_GPIO52", 0xd6, 3, 0, 0, 1)
85MUX_CFG_24XX("V2_242X_GPIO53", 0xd7, 3, 0, 0, 1)
86MUX_CFG_24XX("V6_242X_GPIO53", 0xcf, 3, 0, 0, 1)
87MUX_CFG_24XX("T4_242X_GPIO54", 0xd8, 3, 0, 0, 1)
88MUX_CFG_24XX("Y4_242X_GPIO54", 0xd0, 3, 0, 0, 1)
89MUX_CFG_24XX("T3_242X_GPIO55", 0xd9, 3, 0, 0, 1)
90MUX_CFG_24XX("U2_242X_GPIO56", 0xda, 3, 0, 0, 1)
91
92/* 24xx external DMA requests */
93MUX_CFG_24XX("AA10_242X_DMAREQ0", 0x0e5, 2, 0, 0, 1)
94MUX_CFG_24XX("AA6_242X_DMAREQ1", 0x0e6, 2, 0, 0, 1)
95MUX_CFG_24XX("E4_242X_DMAREQ2", 0x074, 2, 0, 0, 1)
96MUX_CFG_24XX("G4_242X_DMAREQ3", 0x073, 2, 0, 0, 1)
97MUX_CFG_24XX("D3_242X_DMAREQ4", 0x072, 2, 0, 0, 1)
98MUX_CFG_24XX("E3_242X_DMAREQ5", 0x071, 2, 0, 0, 1)
99
75/* TSC IRQ */ 100/* TSC IRQ */
76MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1) 101MUX_CFG_24XX("P20_24XX_TSC_IRQ", 0x108, 0, 0, 0, 1)
77 102
diff --git a/arch/arm/mach-omap2/pm-domain.c b/arch/arm/mach-omap2/pm-domain.c
new file mode 100644
index 00000000000..5e20e740cde
--- /dev/null
+++ b/arch/arm/mach-omap2/pm-domain.c
@@ -0,0 +1,300 @@
1/*
2 * linux/arch/arm/mach-omap2/pm-domain.c
3 *
4 * Power domain functions for OMAP2
5 *
6 * Copyright (C) 2006 Nokia Corporation
7 * Tony Lindgren <tony@atomide.com>
8 *
9 * Some code based on earlier OMAP2 sample PM code
10 * Copyright (C) 2005 Texas Instruments, Inc.
11 * Richard Woodruff <r-woodruff2@ti.com>
12 *
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License version 2 as
15 * published by the Free Software Foundation.
16 */
17
18#include <linux/config.h>
19#include <linux/module.h>
20#include <linux/init.h>
21#include <linux/clk.h>
22
23#include <asm/io.h>
24
25#include "prcm-regs.h"
26
27/* Power domain offsets */
28#define PM_MPU_OFFSET 0x100
29#define PM_CORE_OFFSET 0x200
30#define PM_GFX_OFFSET 0x300
31#define PM_WKUP_OFFSET 0x400 /* Autoidle only */
32#define PM_PLL_OFFSET 0x500 /* Autoidle only */
33#define PM_DSP_OFFSET 0x800
34#define PM_MDM_OFFSET 0xc00
35
36/* Power domain wake-up dependency control register */
37#define PM_WKDEP_OFFSET 0xc8
38#define EN_MDM (1 << 5)
39#define EN_WKUP (1 << 4)
40#define EN_GFX (1 << 3)
41#define EN_DSP (1 << 2)
42#define EN_MPU (1 << 1)
43#define EN_CORE (1 << 0)
44
45/* Core power domain state transition control register */
46#define PM_PWSTCTRL_OFFSET 0xe0
47#define FORCESTATE (1 << 18) /* Only for DSP & GFX */
48#define MEM4RETSTATE (1 << 6)
49#define MEM3RETSTATE (1 << 5)
50#define MEM2RETSTATE (1 << 4)
51#define MEM1RETSTATE (1 << 3)
52#define LOGICRETSTATE (1 << 2) /* Logic is retained */
53#define POWERSTATE_OFF 0x3
54#define POWERSTATE_RETENTION 0x1
55#define POWERSTATE_ON 0x0
56
57/* Power domain state register */
58#define PM_PWSTST_OFFSET 0xe4
59
60/* Hardware supervised state transition control register */
61#define CM_CLKSTCTRL_OFFSET 0x48
62#define AUTOSTAT_MPU (1 << 0) /* MPU */
63#define AUTOSTAT_DSS (1 << 2) /* Core */
64#define AUTOSTAT_L4 (1 << 1) /* Core */
65#define AUTOSTAT_L3 (1 << 0) /* Core */
66#define AUTOSTAT_GFX (1 << 0) /* GFX */
67#define AUTOSTAT_IVA (1 << 8) /* 2420 IVA in DSP domain */
68#define AUTOSTAT_DSP (1 << 0) /* DSP */
69#define AUTOSTAT_MDM (1 << 0) /* MDM */
70
71/* Automatic control of interface clock idling */
72#define CM_AUTOIDLE1_OFFSET 0x30
73#define CM_AUTOIDLE2_OFFSET 0x34 /* Core only */
74#define CM_AUTOIDLE3_OFFSET 0x38 /* Core only */
75#define CM_AUTOIDLE4_OFFSET 0x3c /* Core only */
76#define AUTO_54M(x) (((x) & 0x3) << 6)
77#define AUTO_96M(x) (((x) & 0x3) << 2)
78#define AUTO_DPLL(x) (((x) & 0x3) << 0)
79#define AUTO_STOPPED 0x3
80#define AUTO_BYPASS_FAST 0x2 /* DPLL only */
81#define AUTO_BYPASS_LOW_POWER 0x1 /* DPLL only */
82#define AUTO_DISABLED 0x0
83
84/* Voltage control PRCM_VOLTCTRL bits */
85#define AUTO_EXTVOLT (1 << 15)
86#define FORCE_EXTVOLT (1 << 14)
87#define SETOFF_LEVEL(x) (((x) & 0x3) << 12)
88#define MEMRETCTRL (1 << 8)
89#define SETRET_LEVEL(x) (((x) & 0x3) << 6)
90#define VOLT_LEVEL(x) (((x) & 0x3) << 0)
91
92#define OMAP24XX_PRCM_VBASE IO_ADDRESS(OMAP24XX_PRCM_BASE)
93#define prcm_readl(r) __raw_readl(OMAP24XX_PRCM_VBASE + (r))
94#define prcm_writel(v, r) __raw_writel((v), OMAP24XX_PRCM_VBASE + (r))
95
96static u32 pmdomain_get_wakeup_dependencies(int domain_offset)
97{
98 return prcm_readl(domain_offset + PM_WKDEP_OFFSET);
99}
100
101static void pmdomain_set_wakeup_dependencies(u32 state, int domain_offset)
102{
103 prcm_writel(state, domain_offset + PM_WKDEP_OFFSET);
104}
105
106static u32 pmdomain_get_powerstate(int domain_offset)
107{
108 return prcm_readl(domain_offset + PM_PWSTCTRL_OFFSET);
109}
110
111static void pmdomain_set_powerstate(u32 state, int domain_offset)
112{
113 prcm_writel(state, domain_offset + PM_PWSTCTRL_OFFSET);
114}
115
116static u32 pmdomain_get_clock_autocontrol(int domain_offset)
117{
118 return prcm_readl(domain_offset + CM_CLKSTCTRL_OFFSET);
119}
120
121static void pmdomain_set_clock_autocontrol(u32 state, int domain_offset)
122{
123 prcm_writel(state, domain_offset + CM_CLKSTCTRL_OFFSET);
124}
125
126static u32 pmdomain_get_clock_autoidle1(int domain_offset)
127{
128 return prcm_readl(domain_offset + CM_AUTOIDLE1_OFFSET);
129}
130
131/* Core domain only */
132static u32 pmdomain_get_clock_autoidle2(int domain_offset)
133{
134 return prcm_readl(domain_offset + CM_AUTOIDLE2_OFFSET);
135}
136
137/* Core domain only */
138static u32 pmdomain_get_clock_autoidle3(int domain_offset)
139{
140 return prcm_readl(domain_offset + CM_AUTOIDLE3_OFFSET);
141}
142
143/* Core domain only */
144static u32 pmdomain_get_clock_autoidle4(int domain_offset)
145{
146 return prcm_readl(domain_offset + CM_AUTOIDLE4_OFFSET);
147}
148
149static void pmdomain_set_clock_autoidle1(u32 state, int domain_offset)
150{
151 prcm_writel(state, CM_AUTOIDLE1_OFFSET + domain_offset);
152}
153
154/* Core domain only */
155static void pmdomain_set_clock_autoidle2(u32 state, int domain_offset)
156{
157 prcm_writel(state, CM_AUTOIDLE2_OFFSET + domain_offset);
158}
159
160/* Core domain only */
161static void pmdomain_set_clock_autoidle3(u32 state, int domain_offset)
162{
163 prcm_writel(state, CM_AUTOIDLE3_OFFSET + domain_offset);
164}
165
166/* Core domain only */
167static void pmdomain_set_clock_autoidle4(u32 state, int domain_offset)
168{
169 prcm_writel(state, CM_AUTOIDLE4_OFFSET + domain_offset);
170}
171
172/*
173 * Configures power management domains to idle clocks automatically.
174 */
175void pmdomain_set_autoidle(void)
176{
177 u32 val;
178
179 /* Set PLL auto stop for 54M, 96M & DPLL */
180 pmdomain_set_clock_autoidle1(AUTO_54M(AUTO_STOPPED) |
181 AUTO_96M(AUTO_STOPPED) |
182 AUTO_DPLL(AUTO_STOPPED), PM_PLL_OFFSET);
183
184 /* External clock input control
185 * REVISIT: Should this be in clock framework?
186 */
187 PRCM_CLKSRC_CTRL |= (0x3 << 3);
188
189 /* Configure number of 32KHz clock cycles for sys_clk */
190 PRCM_CLKSSETUP = 0x00ff;
191
192 /* Configure automatic voltage transition */
193 PRCM_VOLTSETUP = 0;
194 val = PRCM_VOLTCTRL;
195 val &= ~(SETOFF_LEVEL(0x3) | VOLT_LEVEL(0x3));
196 val |= SETOFF_LEVEL(1) | VOLT_LEVEL(1) | AUTO_EXTVOLT;
197 PRCM_VOLTCTRL = val;
198
199 /* Disable emulation tools functional clock */
200 PRCM_CLKEMUL_CTRL = 0x0;
201
202 /* Set core memory retention state */
203 val = pmdomain_get_powerstate(PM_CORE_OFFSET);
204 if (cpu_is_omap2420()) {
205 val &= ~(0x7 << 3);
206 val |= (MEM3RETSTATE | MEM2RETSTATE | MEM1RETSTATE);
207 } else {
208 val &= ~(0xf << 3);
209 val |= (MEM4RETSTATE | MEM3RETSTATE | MEM2RETSTATE |
210 MEM1RETSTATE);
211 }
212 pmdomain_set_powerstate(val, PM_CORE_OFFSET);
213
214 /* OCP interface smart idle. REVISIT: Enable autoidle bit0 ? */
215 val = SMS_SYSCONFIG;
216 val &= ~(0x3 << 3);
217 val |= (0x2 << 3) | (1 << 0);
218 SMS_SYSCONFIG |= val;
219
220 val = SDRC_SYSCONFIG;
221 val &= ~(0x3 << 3);
222 val |= (0x2 << 3);
223 SDRC_SYSCONFIG = val;
224
225 /* Configure L3 interface for smart idle.
226 * REVISIT: Enable autoidle bit0 ?
227 */
228 val = GPMC_SYSCONFIG;
229 val &= ~(0x3 << 3);
230 val |= (0x2 << 3) | (1 << 0);
231 GPMC_SYSCONFIG = val;
232
233 pmdomain_set_powerstate(LOGICRETSTATE | POWERSTATE_RETENTION,
234 PM_MPU_OFFSET);
235 pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_CORE_OFFSET);
236 if (!cpu_is_omap2420())
237 pmdomain_set_powerstate(POWERSTATE_RETENTION, PM_MDM_OFFSET);
238
239 /* Assume suspend function has saved the state for DSP and GFX */
240 pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_DSP_OFFSET);
241 pmdomain_set_powerstate(FORCESTATE | POWERSTATE_OFF, PM_GFX_OFFSET);
242
243#if 0
244 /* REVISIT: Internal USB needs special handling */
245 force_standby_usb();
246 if (cpu_is_omap2430())
247 force_hsmmc();
248 sdram_self_refresh_on_idle_req(1);
249#endif
250
251 /* Enable clock auto control for all domains.
252 * Note that CORE domain includes also DSS, L4 & L3.
253 */
254 pmdomain_set_clock_autocontrol(AUTOSTAT_MPU, PM_MPU_OFFSET);
255 pmdomain_set_clock_autocontrol(AUTOSTAT_GFX, PM_GFX_OFFSET);
256 pmdomain_set_clock_autocontrol(AUTOSTAT_DSS | AUTOSTAT_L4 | AUTOSTAT_L3,
257 PM_CORE_OFFSET);
258 if (cpu_is_omap2420())
259 pmdomain_set_clock_autocontrol(AUTOSTAT_IVA | AUTOSTAT_DSP,
260 PM_DSP_OFFSET);
261 else {
262 pmdomain_set_clock_autocontrol(AUTOSTAT_DSP, PM_DSP_OFFSET);
263 pmdomain_set_clock_autocontrol(AUTOSTAT_MDM, PM_MDM_OFFSET);
264 }
265
266 /* Enable clock autoidle for all domains */
267 pmdomain_set_clock_autoidle1(0x2, PM_DSP_OFFSET);
268 if (cpu_is_omap2420()) {
269 pmdomain_set_clock_autoidle1(0xfffffff9, PM_CORE_OFFSET);
270 pmdomain_set_clock_autoidle2(0x7, PM_CORE_OFFSET);
271 pmdomain_set_clock_autoidle1(0x3f, PM_WKUP_OFFSET);
272 } else {
273 pmdomain_set_clock_autoidle1(0xeafffff1, PM_CORE_OFFSET);
274 pmdomain_set_clock_autoidle2(0xfff, PM_CORE_OFFSET);
275 pmdomain_set_clock_autoidle1(0x7f, PM_WKUP_OFFSET);
276 pmdomain_set_clock_autoidle1(0x3, PM_MDM_OFFSET);
277 }
278 pmdomain_set_clock_autoidle3(0x7, PM_CORE_OFFSET);
279 pmdomain_set_clock_autoidle4(0x1f, PM_CORE_OFFSET);
280}
281
282/*
283 * Initializes power domains by removing wake-up dependencies and powering
284 * down DSP and GFX. Gets called from PM init. Note that DSP and IVA code
285 * must re-enable DSP and GFX when used.
286 */
287void __init pmdomain_init(void)
288{
289 /* Remove all domain wakeup dependencies */
290 pmdomain_set_wakeup_dependencies(EN_WKUP | EN_CORE, PM_MPU_OFFSET);
291 pmdomain_set_wakeup_dependencies(0, PM_DSP_OFFSET);
292 pmdomain_set_wakeup_dependencies(0, PM_GFX_OFFSET);
293 pmdomain_set_wakeup_dependencies(EN_WKUP | EN_MPU, PM_CORE_OFFSET);
294 if (cpu_is_omap2430())
295 pmdomain_set_wakeup_dependencies(0, PM_MDM_OFFSET);
296
297 /* Power down DSP and GFX */
298 pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_DSP_OFFSET);
299 pmdomain_set_powerstate(POWERSTATE_OFF | FORCESTATE, PM_GFX_OFFSET);
300}
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
index 562168fa2b1..d7eee99b7e3 100644
--- a/arch/arm/mach-omap2/pm.c
+++ b/arch/arm/mach-omap2/pm.c
@@ -23,6 +23,7 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/sysfs.h> 24#include <linux/sysfs.h>
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/delay.h>
26 27
27#include <asm/io.h> 28#include <asm/io.h>
28#include <asm/irq.h> 29#include <asm/irq.h>
@@ -36,11 +37,18 @@
36#include <asm/arch/sram.h> 37#include <asm/arch/sram.h>
37#include <asm/arch/pm.h> 38#include <asm/arch/pm.h>
38 39
40#include "prcm-regs.h"
41
39static struct clk *vclk; 42static struct clk *vclk;
40static void (*omap2_sram_idle)(void); 43static void (*omap2_sram_idle)(void);
41static void (*omap2_sram_suspend)(int dllctrl, int cpu_rev); 44static void (*omap2_sram_suspend)(int dllctrl, int cpu_rev);
42static void (*saved_idle)(void); 45static void (*saved_idle)(void);
43 46
47extern void __init pmdomain_init(void);
48extern void pmdomain_set_autoidle(void);
49
50static unsigned int omap24xx_sleep_save[OMAP24XX_SLEEP_SAVE_SIZE];
51
44void omap2_pm_idle(void) 52void omap2_pm_idle(void)
45{ 53{
46 local_irq_disable(); 54 local_irq_disable();
@@ -87,23 +95,272 @@ static int omap2_pm_prepare(suspend_state_t state)
87 return error; 95 return error;
88} 96}
89 97
98#define INT0_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK1) | \
99 OMAP_IRQ_BIT(INT_24XX_GPIO_BANK2) | \
100 OMAP_IRQ_BIT(INT_24XX_GPIO_BANK3))
101
102#define INT1_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_GPIO_BANK4))
103
104#define INT2_WAKE_MASK (OMAP_IRQ_BIT(INT_24XX_UART1_IRQ) | \
105 OMAP_IRQ_BIT(INT_24XX_UART2_IRQ) | \
106 OMAP_IRQ_BIT(INT_24XX_UART3_IRQ))
107
108#define preg(reg) printk("%s\t(0x%p):\t0x%08x\n", #reg, &reg, reg);
109
110static void omap2_pm_debug(char * desc)
111{
112 printk("%s:\n", desc);
113
114 preg(CM_CLKSTCTRL_MPU);
115 preg(CM_CLKSTCTRL_CORE);
116 preg(CM_CLKSTCTRL_GFX);
117 preg(CM_CLKSTCTRL_DSP);
118 preg(CM_CLKSTCTRL_MDM);
119
120 preg(PM_PWSTCTRL_MPU);
121 preg(PM_PWSTCTRL_CORE);
122 preg(PM_PWSTCTRL_GFX);
123 preg(PM_PWSTCTRL_DSP);
124 preg(PM_PWSTCTRL_MDM);
125
126 preg(PM_PWSTST_MPU);
127 preg(PM_PWSTST_CORE);
128 preg(PM_PWSTST_GFX);
129 preg(PM_PWSTST_DSP);
130 preg(PM_PWSTST_MDM);
131
132 preg(CM_AUTOIDLE1_CORE);
133 preg(CM_AUTOIDLE2_CORE);
134 preg(CM_AUTOIDLE3_CORE);
135 preg(CM_AUTOIDLE4_CORE);
136 preg(CM_AUTOIDLE_WKUP);
137 preg(CM_AUTOIDLE_PLL);
138 preg(CM_AUTOIDLE_DSP);
139 preg(CM_AUTOIDLE_MDM);
140
141 preg(CM_ICLKEN1_CORE);
142 preg(CM_ICLKEN2_CORE);
143 preg(CM_ICLKEN3_CORE);
144 preg(CM_ICLKEN4_CORE);
145 preg(CM_ICLKEN_GFX);
146 preg(CM_ICLKEN_WKUP);
147 preg(CM_ICLKEN_DSP);
148 preg(CM_ICLKEN_MDM);
149
150 preg(CM_IDLEST1_CORE);
151 preg(CM_IDLEST2_CORE);
152 preg(CM_IDLEST3_CORE);
153 preg(CM_IDLEST4_CORE);
154 preg(CM_IDLEST_GFX);
155 preg(CM_IDLEST_WKUP);
156 preg(CM_IDLEST_CKGEN);
157 preg(CM_IDLEST_DSP);
158 preg(CM_IDLEST_MDM);
159
160 preg(RM_RSTST_MPU);
161 preg(RM_RSTST_GFX);
162 preg(RM_RSTST_WKUP);
163 preg(RM_RSTST_DSP);
164 preg(RM_RSTST_MDM);
165
166 preg(PM_WKDEP_MPU);
167 preg(PM_WKDEP_CORE);
168 preg(PM_WKDEP_GFX);
169 preg(PM_WKDEP_DSP);
170 preg(PM_WKDEP_MDM);
171
172 preg(CM_FCLKEN_WKUP);
173 preg(CM_ICLKEN_WKUP);
174 preg(CM_IDLEST_WKUP);
175 preg(CM_AUTOIDLE_WKUP);
176 preg(CM_CLKSEL_WKUP);
177
178 preg(PM_WKEN_WKUP);
179 preg(PM_WKST_WKUP);
180}
181
182static inline void omap2_pm_save_registers(void)
183{
184 /* Save interrupt registers */
185 OMAP24XX_SAVE(INTC_MIR0);
186 OMAP24XX_SAVE(INTC_MIR1);
187 OMAP24XX_SAVE(INTC_MIR2);
188
189 /* Save power control registers */
190 OMAP24XX_SAVE(CM_CLKSTCTRL_MPU);
191 OMAP24XX_SAVE(CM_CLKSTCTRL_CORE);
192 OMAP24XX_SAVE(CM_CLKSTCTRL_GFX);
193 OMAP24XX_SAVE(CM_CLKSTCTRL_DSP);
194 OMAP24XX_SAVE(CM_CLKSTCTRL_MDM);
195
196 /* Save power state registers */
197 OMAP24XX_SAVE(PM_PWSTCTRL_MPU);
198 OMAP24XX_SAVE(PM_PWSTCTRL_CORE);
199 OMAP24XX_SAVE(PM_PWSTCTRL_GFX);
200 OMAP24XX_SAVE(PM_PWSTCTRL_DSP);
201 OMAP24XX_SAVE(PM_PWSTCTRL_MDM);
202
203 /* Save autoidle registers */
204 OMAP24XX_SAVE(CM_AUTOIDLE1_CORE);
205 OMAP24XX_SAVE(CM_AUTOIDLE2_CORE);
206 OMAP24XX_SAVE(CM_AUTOIDLE3_CORE);
207 OMAP24XX_SAVE(CM_AUTOIDLE4_CORE);
208 OMAP24XX_SAVE(CM_AUTOIDLE_WKUP);
209 OMAP24XX_SAVE(CM_AUTOIDLE_PLL);
210 OMAP24XX_SAVE(CM_AUTOIDLE_DSP);
211 OMAP24XX_SAVE(CM_AUTOIDLE_MDM);
212
213 /* Save idle state registers */
214 OMAP24XX_SAVE(CM_IDLEST1_CORE);
215 OMAP24XX_SAVE(CM_IDLEST2_CORE);
216 OMAP24XX_SAVE(CM_IDLEST3_CORE);
217 OMAP24XX_SAVE(CM_IDLEST4_CORE);
218 OMAP24XX_SAVE(CM_IDLEST_GFX);
219 OMAP24XX_SAVE(CM_IDLEST_WKUP);
220 OMAP24XX_SAVE(CM_IDLEST_CKGEN);
221 OMAP24XX_SAVE(CM_IDLEST_DSP);
222 OMAP24XX_SAVE(CM_IDLEST_MDM);
223
224 /* Save clock registers */
225 OMAP24XX_SAVE(CM_FCLKEN1_CORE);
226 OMAP24XX_SAVE(CM_FCLKEN2_CORE);
227 OMAP24XX_SAVE(CM_ICLKEN1_CORE);
228 OMAP24XX_SAVE(CM_ICLKEN2_CORE);
229 OMAP24XX_SAVE(CM_ICLKEN3_CORE);
230 OMAP24XX_SAVE(CM_ICLKEN4_CORE);
231}
232
233static inline void omap2_pm_restore_registers(void)
234{
235 /* Restore clock state registers */
236 OMAP24XX_RESTORE(CM_CLKSTCTRL_MPU);
237 OMAP24XX_RESTORE(CM_CLKSTCTRL_CORE);
238 OMAP24XX_RESTORE(CM_CLKSTCTRL_GFX);
239 OMAP24XX_RESTORE(CM_CLKSTCTRL_DSP);
240 OMAP24XX_RESTORE(CM_CLKSTCTRL_MDM);
241
242 /* Restore power state registers */
243 OMAP24XX_RESTORE(PM_PWSTCTRL_MPU);
244 OMAP24XX_RESTORE(PM_PWSTCTRL_CORE);
245 OMAP24XX_RESTORE(PM_PWSTCTRL_GFX);
246 OMAP24XX_RESTORE(PM_PWSTCTRL_DSP);
247 OMAP24XX_RESTORE(PM_PWSTCTRL_MDM);
248
249 /* Restore idle state registers */
250 OMAP24XX_RESTORE(CM_IDLEST1_CORE);
251 OMAP24XX_RESTORE(CM_IDLEST2_CORE);
252 OMAP24XX_RESTORE(CM_IDLEST3_CORE);
253 OMAP24XX_RESTORE(CM_IDLEST4_CORE);
254 OMAP24XX_RESTORE(CM_IDLEST_GFX);
255 OMAP24XX_RESTORE(CM_IDLEST_WKUP);
256 OMAP24XX_RESTORE(CM_IDLEST_CKGEN);
257 OMAP24XX_RESTORE(CM_IDLEST_DSP);
258 OMAP24XX_RESTORE(CM_IDLEST_MDM);
259
260 /* Restore autoidle registers */
261 OMAP24XX_RESTORE(CM_AUTOIDLE1_CORE);
262 OMAP24XX_RESTORE(CM_AUTOIDLE2_CORE);
263 OMAP24XX_RESTORE(CM_AUTOIDLE3_CORE);
264 OMAP24XX_RESTORE(CM_AUTOIDLE4_CORE);
265 OMAP24XX_RESTORE(CM_AUTOIDLE_WKUP);
266 OMAP24XX_RESTORE(CM_AUTOIDLE_PLL);
267 OMAP24XX_RESTORE(CM_AUTOIDLE_DSP);
268 OMAP24XX_RESTORE(CM_AUTOIDLE_MDM);
269
270 /* Restore clock registers */
271 OMAP24XX_RESTORE(CM_FCLKEN1_CORE);
272 OMAP24XX_RESTORE(CM_FCLKEN2_CORE);
273 OMAP24XX_RESTORE(CM_ICLKEN1_CORE);
274 OMAP24XX_RESTORE(CM_ICLKEN2_CORE);
275 OMAP24XX_RESTORE(CM_ICLKEN3_CORE);
276 OMAP24XX_RESTORE(CM_ICLKEN4_CORE);
277
278 /* REVISIT: Clear interrupts here */
279
280 /* Restore interrupt registers */
281 OMAP24XX_RESTORE(INTC_MIR0);
282 OMAP24XX_RESTORE(INTC_MIR1);
283 OMAP24XX_RESTORE(INTC_MIR2);
284}
285
286static int omap2_pm_suspend(void)
287{
288 int processor_type = 0;
289
290 /* REVISIT: 0x21 or 0x26? */
291 if (cpu_is_omap2420())
292 processor_type = 0x21;
293
294 if (!processor_type)
295 return -ENOTSUPP;
296
297 local_irq_disable();
298 local_fiq_disable();
299
300 omap2_pm_save_registers();
301
302 /* Disable interrupts except for the wake events */
303 INTC_MIR_SET0 = 0xffffffff & ~INT0_WAKE_MASK;
304 INTC_MIR_SET1 = 0xffffffff & ~INT1_WAKE_MASK;
305 INTC_MIR_SET2 = 0xffffffff & ~INT2_WAKE_MASK;
306
307 pmdomain_set_autoidle();
308
309 /* Clear old wake-up events */
310 PM_WKST1_CORE = 0;
311 PM_WKST2_CORE = 0;
312 PM_WKST_WKUP = 0;
313
314 /* Enable wake-up events */
315 PM_WKEN1_CORE = (1 << 22) | (1 << 21); /* UART1 & 2 */
316 PM_WKEN2_CORE = (1 << 2); /* UART3 */
317 PM_WKEN_WKUP = (1 << 2) | (1 << 0); /* GPIO & GPT1 */
318
319 /* Disable clocks except for CM_ICLKEN2_CORE. It gets disabled
320 * in the SRAM suspend code */
321 CM_FCLKEN1_CORE = 0;
322 CM_FCLKEN2_CORE = 0;
323 CM_ICLKEN1_CORE = 0;
324 CM_ICLKEN3_CORE = 0;
325 CM_ICLKEN4_CORE = 0;
326
327 omap2_pm_debug("Status before suspend");
328
329 /* Must wait for serial buffers to clear */
330 mdelay(200);
331
332 /* Jump to SRAM suspend code
333 * REVISIT: When is this SDRC_DLLB_CTRL?
334 */
335 omap2_sram_suspend(SDRC_DLLA_CTRL, processor_type);
336
337 /* Back from sleep */
338 omap2_pm_restore_registers();
339
340 local_fiq_enable();
341 local_irq_enable();
342
343 return 0;
344}
345
90static int omap2_pm_enter(suspend_state_t state) 346static int omap2_pm_enter(suspend_state_t state)
91{ 347{
348 int ret = 0;
349
92 switch (state) 350 switch (state)
93 { 351 {
94 case PM_SUSPEND_STANDBY: 352 case PM_SUSPEND_STANDBY:
95 case PM_SUSPEND_MEM: 353 case PM_SUSPEND_MEM:
96 /* FIXME: Add suspend */ 354 ret = omap2_pm_suspend();
97 break; 355 break;
98
99 case PM_SUSPEND_DISK: 356 case PM_SUSPEND_DISK:
100 return -ENOTSUPP; 357 ret = -ENOTSUPP;
101 358 break;
102 default: 359 default:
103 return -EINVAL; 360 ret = -EINVAL;
104 } 361 }
105 362
106 return 0; 363 return ret;
107} 364}
108 365
109static int omap2_pm_finish(suspend_state_t state) 366static int omap2_pm_finish(suspend_state_t state)
@@ -143,6 +400,8 @@ int __init omap2_pm_init(void)
143 pm_set_ops(&omap_pm_ops); 400 pm_set_ops(&omap_pm_ops);
144 pm_idle = omap2_pm_idle; 401 pm_idle = omap2_pm_idle;
145 402
403 pmdomain_init();
404
146 return 0; 405 return 0;
147} 406}
148 407
diff --git a/arch/arm/mach-omap2/prcm.c b/arch/arm/mach-omap2/prcm.c
index 8893479dc7e..c2bf57ef682 100644
--- a/arch/arm/mach-omap2/prcm.c
+++ b/arch/arm/mach-omap2/prcm.c
@@ -13,7 +13,6 @@
13 * it under the terms of the GNU General Public License version 2 as 13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation. 14 * published by the Free Software Foundation.
15 */ 15 */
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/clk.h> 18#include <linux/clk.h>
diff --git a/arch/arm/mach-omap2/sleep.S b/arch/arm/mach-omap2/sleep.S
index 00299cbeb91..16247d55785 100644
--- a/arch/arm/mach-omap2/sleep.S
+++ b/arch/arm/mach-omap2/sleep.S
@@ -21,7 +21,6 @@
21 * MA 02111-1307 USA 21 * MA 02111-1307 USA
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/linkage.h> 24#include <linux/linkage.h>
26#include <asm/assembler.h> 25#include <asm/assembler.h>
27#include <asm/arch/io.h> 26#include <asm/arch/io.h>
diff --git a/arch/arm/mach-omap2/sram-fn.S b/arch/arm/mach-omap2/sram-fn.S
index d261e4ff4d9..a5ef7f611da 100644
--- a/arch/arm/mach-omap2/sram-fn.S
+++ b/arch/arm/mach-omap2/sram-fn.S
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
23 * MA 02111-1307 USA 23 * MA 02111-1307 USA
24 */ 24 */
25#include <linux/config.h>
26#include <linux/linkage.h> 25#include <linux/linkage.h>
27#include <asm/assembler.h> 26#include <asm/assembler.h>
28#include <asm/arch/io.h> 27#include <asm/arch/io.h>
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 1d2f5ac2f69..fe5fd6d42de 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -6,6 +6,7 @@
6 * Copyright (C) 2005 Nokia Corporation 6 * Copyright (C) 2005 Nokia Corporation
7 * Author: Paul Mundt <paul.mundt@nokia.com> 7 * Author: Paul Mundt <paul.mundt@nokia.com>
8 * Juha Yrjölä <juha.yrjola@nokia.com> 8 * Juha Yrjölä <juha.yrjola@nokia.com>
9 * OMAP Dual-mode timer framework support by Timo Teras
9 * 10 *
10 * Some parts based off of TI's 24xx code: 11 * Some parts based off of TI's 24xx code:
11 * 12 *
@@ -22,54 +23,18 @@
22#include <linux/interrupt.h> 23#include <linux/interrupt.h>
23#include <linux/err.h> 24#include <linux/err.h>
24#include <linux/clk.h> 25#include <linux/clk.h>
26#include <linux/delay.h>
25 27
26#include <asm/mach/time.h> 28#include <asm/mach/time.h>
27#include <asm/delay.h> 29#include <asm/arch/dmtimer.h>
28#include <asm/io.h>
29 30
30#define OMAP2_GP_TIMER1_BASE 0x48028000 31static struct omap_dm_timer *gptimer;
31#define OMAP2_GP_TIMER2_BASE 0x4802a000
32#define OMAP2_GP_TIMER3_BASE 0x48078000
33#define OMAP2_GP_TIMER4_BASE 0x4807a000
34 32
35#define GP_TIMER_TIDR 0x00 33static inline void omap2_gp_timer_start(unsigned long load_val)
36#define GP_TIMER_TISR 0x18
37#define GP_TIMER_TIER 0x1c
38#define GP_TIMER_TCLR 0x24
39#define GP_TIMER_TCRR 0x28
40#define GP_TIMER_TLDR 0x2c
41#define GP_TIMER_TSICR 0x40
42
43#define OS_TIMER_NR 1 /* GP timer 2 */
44
45static unsigned long timer_base[] = {
46 IO_ADDRESS(OMAP2_GP_TIMER1_BASE),
47 IO_ADDRESS(OMAP2_GP_TIMER2_BASE),
48 IO_ADDRESS(OMAP2_GP_TIMER3_BASE),
49 IO_ADDRESS(OMAP2_GP_TIMER4_BASE),
50};
51
52static inline unsigned int timer_read_reg(int nr, unsigned int reg)
53{
54 return __raw_readl(timer_base[nr] + reg);
55}
56
57static inline void timer_write_reg(int nr, unsigned int reg, unsigned int val)
58{
59 __raw_writel(val, timer_base[nr] + reg);
60}
61
62/* Note that we always enable the clock prescale divider bit */
63static inline void omap2_gp_timer_start(int nr, unsigned long load_val)
64{ 34{
65 unsigned int tmp; 35 omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val);
66 36 omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
67 tmp = 0xffffffff - load_val; 37 omap_dm_timer_start(gptimer);
68
69 timer_write_reg(nr, GP_TIMER_TLDR, tmp);
70 timer_write_reg(nr, GP_TIMER_TCRR, tmp);
71 timer_write_reg(nr, GP_TIMER_TIER, 1 << 1);
72 timer_write_reg(nr, GP_TIMER_TCLR, (1 << 5) | (1 << 1) | 1);
73} 38}
74 39
75static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id, 40static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id,
@@ -77,7 +42,7 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id,
77{ 42{
78 write_seqlock(&xtime_lock); 43 write_seqlock(&xtime_lock);
79 44
80 timer_write_reg(OS_TIMER_NR, GP_TIMER_TISR, 1 << 1); 45 omap_dm_timer_write_status(gptimer, OMAP_TIMER_INT_OVERFLOW);
81 timer_tick(regs); 46 timer_tick(regs);
82 47
83 write_sequnlock(&xtime_lock); 48 write_sequnlock(&xtime_lock);
@@ -87,41 +52,26 @@ static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id,
87 52
88static struct irqaction omap2_gp_timer_irq = { 53static struct irqaction omap2_gp_timer_irq = {
89 .name = "gp timer", 54 .name = "gp timer",
90 .flags = SA_INTERRUPT, 55 .flags = IRQF_DISABLED | IRQF_TIMER,
91 .handler = omap2_gp_timer_interrupt, 56 .handler = omap2_gp_timer_interrupt,
92}; 57};
93 58
94static void __init omap2_gp_timer_init(void) 59static void __init omap2_gp_timer_init(void)
95{ 60{
96 struct clk * sys_ck; 61 u32 tick_period;
97 u32 tick_period = 120000;
98 u32 l;
99 62
100 /* Reset clock and prescale value */ 63 omap_dm_timer_init();
101 timer_write_reg(OS_TIMER_NR, GP_TIMER_TCLR, 0); 64 gptimer = omap_dm_timer_request_specific(1);
65 BUG_ON(gptimer == NULL);
102 66
103 sys_ck = clk_get(NULL, "sys_ck"); 67 omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK);
104 if (IS_ERR(sys_ck)) 68 tick_period = clk_get_rate(omap_dm_timer_get_fclk(gptimer)) / 100;
105 printk(KERN_ERR "Could not get sys_ck\n");
106 else {
107 clk_enable(sys_ck);
108 tick_period = clk_get_rate(sys_ck) / 100;
109 clk_put(sys_ck);
110 }
111
112 tick_period /= 2; /* Minimum prescale divider is 2 */
113 tick_period -= 1; 69 tick_period -= 1;
114 70
115 l = timer_read_reg(OS_TIMER_NR, GP_TIMER_TIDR); 71 setup_irq(omap_dm_timer_get_irq(gptimer), &omap2_gp_timer_irq);
116 printk(KERN_INFO "OMAP2 GP timer (HW version %d.%d)\n", 72 omap2_gp_timer_start(tick_period);
117 (l >> 4) & 0x0f, l & 0x0f);
118
119 setup_irq(38, &omap2_gp_timer_irq);
120
121 omap2_gp_timer_start(OS_TIMER_NR, tick_period);
122} 73}
123 74
124struct sys_timer omap_timer = { 75struct sys_timer omap_timer = {
125 .init = omap2_gp_timer_init, 76 .init = omap2_gp_timer_init,
126}; 77};
127
diff --git a/arch/arm/mach-pnx4008/time.c b/arch/arm/mach-pnx4008/time.c
index 4ce68069852..888bf6cfba8 100644
--- a/arch/arm/mach-pnx4008/time.c
+++ b/arch/arm/mach-pnx4008/time.c
@@ -86,7 +86,7 @@ static irqreturn_t pnx4008_timer_interrupt(int irq, void *dev_id,
86 86
87static struct irqaction pnx4008_timer_irq = { 87static struct irqaction pnx4008_timer_irq = {
88 .name = "PNX4008 Tick Timer", 88 .name = "PNX4008 Tick Timer",
89 .flags = SA_INTERRUPT | SA_TIMER, 89 .flags = IRQF_DISABLED | IRQF_TIMER,
90 .handler = pnx4008_timer_interrupt 90 .handler = pnx4008_timer_interrupt
91}; 91};
92 92
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index ea5137f319c..03d07cae26c 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -35,6 +35,10 @@ config PXA_SHARPSL
35 SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa) 35 SL-C3000 (Spitz), SL-C3100 (Borzoi) or SL-C6000x (Tosa)
36 handheld computer. 36 handheld computer.
37 37
38config MACH_TRIZEPS4
39 bool "Keith und Koep Trizeps4 DIMM-Module"
40 select PXA27x
41
38endchoice 42endchoice
39 43
40if PXA_SHARPSL 44if PXA_SHARPSL
@@ -55,6 +59,21 @@ endchoice
55 59
56endif 60endif
57 61
62if MACH_TRIZEPS4
63
64choice
65 prompt "Select base board for Trizeps 4 module"
66
67config MACH_TRIZEPS4_CONXS
68 bool "ConXS Eval Board"
69
70config MACH_TRIZEPS4_ANY
71 bool "another Board"
72
73endchoice
74
75endif
76
58endmenu 77endmenu
59 78
60config MACH_POODLE 79config MACH_POODLE
diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
index 1610690be41..9093eb1c94e 100644
--- a/arch/arm/mach-pxa/Makefile
+++ b/arch/arm/mach-pxa/Makefile
@@ -12,6 +12,7 @@ obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
12obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o 12obj-$(CONFIG_MACH_LOGICPD_PXA270) += lpd270.o
13obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o 13obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
14obj-$(CONFIG_ARCH_PXA_IDP) += idp.o 14obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
15obj-$(CONFIG_MACH_TRIZEPS4) += trizeps4.o
15obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o 16obj-$(CONFIG_PXA_SHARP_C7xx) += corgi.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o corgi_pm.o
16obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o 17obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o spitz_pm.o
17obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o 18obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
@@ -23,6 +24,7 @@ led-y := leds.o
23led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o 24led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o
24led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o 25led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o
25led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o 26led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o
27led-$(CONFIG_MACH_TRIZEPS4) += leds-trizeps4.o
26 28
27obj-$(CONFIG_LEDS) += $(led-y) 29obj-$(CONFIG_LEDS) += $(led-y)
28 30
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index bf6648a8390..cce26576999 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -225,7 +225,7 @@ static int corgi_mci_init(struct device *dev, irqreturn_t (*corgi_detect_int)(in
225 corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250); 225 corgi_mci_platform_data.detect_delay = msecs_to_jiffies(250);
226 226
227 err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int, 227 err = request_irq(CORGI_IRQ_GPIO_nSD_DETECT, corgi_detect_int,
228 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 228 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
229 "MMC card detect", data); 229 "MMC card detect", data);
230 if (err) { 230 if (err) {
231 printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); 231 printk(KERN_ERR "corgi_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 347b9dea24c..6914d22bc20 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -18,6 +18,7 @@
18 18
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/irq.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22#include <linux/fb.h> 23#include <linux/fb.h>
23 24
diff --git a/arch/arm/mach-pxa/leds-idp.c b/arch/arm/mach-pxa/leds-idp.c
index 5eba6ea0b0f..38aa9270540 100644
--- a/arch/arm/mach-pxa/leds-idp.c
+++ b/arch/arm/mach-pxa/leds-idp.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14 14
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17 16
18#include <asm/hardware.h> 17#include <asm/hardware.h>
diff --git a/arch/arm/mach-pxa/leds-lubbock.c b/arch/arm/mach-pxa/leds-lubbock.c
index 05cf56059a0..afbc6698e27 100644
--- a/arch/arm/mach-pxa/leds-lubbock.c
+++ b/arch/arm/mach-pxa/leds-lubbock.c
@@ -11,7 +11,6 @@
11 * namespace collision. Mostly adapted the Mainstone version. 11 * namespace collision. Mostly adapted the Mainstone version.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16 15
17#include <asm/hardware.h> 16#include <asm/hardware.h>
diff --git a/arch/arm/mach-pxa/leds-mainstone.c b/arch/arm/mach-pxa/leds-mainstone.c
index c06d3d7a8dd..065293eb0d8 100644
--- a/arch/arm/mach-pxa/leds-mainstone.c
+++ b/arch/arm/mach-pxa/leds-mainstone.c
@@ -10,7 +10,6 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
16#include <asm/hardware.h> 15#include <asm/hardware.h>
diff --git a/arch/arm/mach-pxa/leds-trizeps4.c b/arch/arm/mach-pxa/leds-trizeps4.c
new file mode 100644
index 00000000000..14cfc85e44b
--- /dev/null
+++ b/arch/arm/mach-pxa/leds-trizeps4.c
@@ -0,0 +1,134 @@
1/*
2 * linux/arch/arm/mach-pxa/leds-trizeps4.c
3 *
4 * Author: Jürgen Schindele
5 * Created: 20 02, 2006
6 * Copyright: Jürgen Schindele
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 */
12
13#include <linux/config.h>
14#include <linux/init.h>
15
16#include <asm/hardware.h>
17#include <asm/system.h>
18#include <asm/types.h>
19#include <asm/leds.h>
20
21#include <asm/arch/pxa-regs.h>
22#include <asm/arch/trizeps4.h>
23
24#include "leds.h"
25
26#define LED_STATE_ENABLED 1
27#define LED_STATE_CLAIMED 2
28
29#define SYS_BUSY 0x01
30#define HEARTBEAT 0x02
31#define BLINK 0x04
32
33static unsigned int led_state;
34static unsigned int hw_led_state;
35
36void trizeps4_leds_event(led_event_t evt)
37{
38 unsigned long flags;
39
40 local_irq_save(flags);
41
42 switch (evt) {
43 case led_start:
44 hw_led_state = 0;
45 pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */
46 pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */
47 led_state = LED_STATE_ENABLED;
48 break;
49
50 case led_stop:
51 led_state &= ~LED_STATE_ENABLED;
52 break;
53
54 case led_claim:
55 led_state |= LED_STATE_CLAIMED;
56 hw_led_state = 0;
57 break;
58
59 case led_release:
60 led_state &= ~LED_STATE_CLAIMED;
61 hw_led_state = 0;
62 break;
63
64#ifdef CONFIG_LEDS_TIMER
65 case led_timer:
66 hw_led_state ^= HEARTBEAT;
67 break;
68#endif
69
70#ifdef CONFIG_LEDS_CPU
71 case led_idle_start:
72 hw_led_state &= ~SYS_BUSY;
73 break;
74
75 case led_idle_end:
76 hw_led_state |= SYS_BUSY;
77 break;
78#endif
79
80 case led_halted:
81 break;
82
83 case led_green_on:
84 hw_led_state |= BLINK;
85 break;
86
87 case led_green_off:
88 hw_led_state &= ~BLINK;
89 break;
90
91 case led_amber_on:
92 break;
93
94 case led_amber_off:
95 break;
96
97 case led_red_on:
98 break;
99
100 case led_red_off:
101 break;
102
103 default:
104 break;
105 }
106
107 if (led_state & LED_STATE_ENABLED) {
108 switch (hw_led_state) {
109 case 0:
110 GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED);
111 GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
112 break;
113 case 1:
114 GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED);
115 GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
116 break;
117 case 2:
118 GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED);
119 GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
120 break;
121 case 3:
122 GPCR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED);
123 GPCR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
124 break;
125 }
126 }
127 else {
128 /* turn all off */
129 GPSR(GPIO_SYS_BUSY_LED) |= GPIO_bit(GPIO_SYS_BUSY_LED);
130 GPSR(GPIO_HEARTBEAT_LED) |= GPIO_bit(GPIO_HEARTBEAT_LED);
131 }
132
133 local_irq_restore(flags);
134}
diff --git a/arch/arm/mach-pxa/leds.c b/arch/arm/mach-pxa/leds.c
index bbe4d5f6afa..e13eb841e48 100644
--- a/arch/arm/mach-pxa/leds.c
+++ b/arch/arm/mach-pxa/leds.c
@@ -24,6 +24,8 @@ pxa_leds_init(void)
24 leds_event = mainstone_leds_event; 24 leds_event = mainstone_leds_event;
25 if (machine_is_pxa_idp()) 25 if (machine_is_pxa_idp())
26 leds_event = idp_leds_event; 26 leds_event = idp_leds_event;
27 if (machine_is_trizeps4())
28 leds_event = trizeps4_leds_event;
27 29
28 leds_event(led_start); 30 leds_event(led_start);
29 return 0; 31 return 0;
diff --git a/arch/arm/mach-pxa/leds.h b/arch/arm/mach-pxa/leds.h
index d98f6e93c12..4f829b8c39d 100644
--- a/arch/arm/mach-pxa/leds.h
+++ b/arch/arm/mach-pxa/leds.h
@@ -10,3 +10,4 @@
10extern void idp_leds_event(led_event_t evt); 10extern void idp_leds_event(led_event_t evt);
11extern void lubbock_leds_event(led_event_t evt); 11extern void lubbock_leds_event(led_event_t evt);
12extern void mainstone_leds_event(led_event_t evt); 12extern void mainstone_leds_event(led_event_t evt);
13extern void trizeps4_leds_event(led_event_t evt);
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index ec0f43a102c..1a5f5c21481 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -248,58 +248,137 @@ static void lpd270_backlight_power(int on)
248 248
249/* 5.7" TFT QVGA (LoLo display number 1) */ 249/* 5.7" TFT QVGA (LoLo display number 1) */
250static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = { 250static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = {
251 .pixclock = 100000, 251 .pixclock = 150000,
252 .xres = 240, 252 .xres = 320,
253 .yres = 320, 253 .yres = 240,
254 .bpp = 16, 254 .bpp = 16,
255 .hsync_len = 64, 255 .hsync_len = 0x14,
256 .left_margin = 0x27, 256 .left_margin = 0x28,
257 .right_margin = 0x09, 257 .right_margin = 0x0a,
258 .vsync_len = 0x04, 258 .vsync_len = 0x02,
259 .upper_margin = 0x08, 259 .upper_margin = 0x08,
260 .lower_margin = 0x14, 260 .lower_margin = 0x14,
261 .sync = 0, 261 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
262 .lccr0 = 0x07800080, 262 .lccr0 = 0x07800080,
263 .lccr3 = 0x04400007, 263 .lccr3 = 0x00400000,
264 .pxafb_backlight_power = lpd270_backlight_power,
265};
266
267/* 12.1" TFT SVGA (LoLo display number 2) */
268static struct pxafb_mach_info sharp_lq121s1dg31 __initdata = {
269 .pixclock = 50000,
270 .xres = 800,
271 .yres = 600,
272 .bpp = 16,
273 .hsync_len = 0x05,
274 .left_margin = 0x52,
275 .right_margin = 0x05,
276 .vsync_len = 0x04,
277 .upper_margin = 0x14,
278 .lower_margin = 0x0a,
279 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
280 .lccr0 = 0x07800080,
281 .lccr3 = 0x00400000,
282 .pxafb_backlight_power = lpd270_backlight_power,
283};
284
285/* 3.6" TFT QVGA (LoLo display number 3) */
286static struct pxafb_mach_info sharp_lq036q1da01 __initdata = {
287 .pixclock = 150000,
288 .xres = 320,
289 .yres = 240,
290 .bpp = 16,
291 .hsync_len = 0x0e,
292 .left_margin = 0x04,
293 .right_margin = 0x0a,
294 .vsync_len = 0x03,
295 .upper_margin = 0x03,
296 .lower_margin = 0x03,
297 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
298 .lccr0 = 0x07800080,
299 .lccr3 = 0x00400000,
264 .pxafb_backlight_power = lpd270_backlight_power, 300 .pxafb_backlight_power = lpd270_backlight_power,
265}; 301};
266 302
267/* 6.4" TFT VGA (LoLo display number 5) */ 303/* 6.4" TFT VGA (LoLo display number 5) */
268static struct pxafb_mach_info sharp_lq64d343 __initdata = { 304static struct pxafb_mach_info sharp_lq64d343 __initdata = {
269 .pixclock = 20000, 305 .pixclock = 25000,
270 .xres = 640, 306 .xres = 640,
271 .yres = 480, 307 .yres = 480,
272 .bpp = 16, 308 .bpp = 16,
273 .hsync_len = 49, 309 .hsync_len = 0x31,
274 .left_margin = 0x89, 310 .left_margin = 0x89,
275 .right_margin = 0x19, 311 .right_margin = 0x19,
276 .vsync_len = 18, 312 .vsync_len = 0x12,
277 .upper_margin = 0x22, 313 .upper_margin = 0x22,
278 .lower_margin = 0, 314 .lower_margin = 0x00,
279 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 315 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
280 .lccr0 = 0x07800080, 316 .lccr0 = 0x07800080,
281 .lccr3 = 0x04400001, 317 .lccr3 = 0x00400000,
318 .pxafb_backlight_power = lpd270_backlight_power,
319};
320
321/* 10.4" TFT VGA (LoLo display number 7) */
322static struct pxafb_mach_info sharp_lq10d368 __initdata = {
323 .pixclock = 25000,
324 .xres = 640,
325 .yres = 480,
326 .bpp = 16,
327 .hsync_len = 0x31,
328 .left_margin = 0x89,
329 .right_margin = 0x19,
330 .vsync_len = 0x12,
331 .upper_margin = 0x22,
332 .lower_margin = 0x00,
333 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
334 .lccr0 = 0x07800080,
335 .lccr3 = 0x00400000,
282 .pxafb_backlight_power = lpd270_backlight_power, 336 .pxafb_backlight_power = lpd270_backlight_power,
283}; 337};
284 338
285/* 3.5" TFT QVGA (LoLo display number 8) */ 339/* 3.5" TFT QVGA (LoLo display number 8) */
286static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = { 340static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = {
287 .pixclock = 100000, 341 .pixclock = 150000,
288 .xres = 240, 342 .xres = 240,
289 .yres = 320, 343 .yres = 320,
290 .bpp = 16, 344 .bpp = 16,
291 .hsync_len = 0x34, 345 .hsync_len = 0x0e,
292 .left_margin = 0x09, 346 .left_margin = 0x0a,
293 .right_margin = 0x09, 347 .right_margin = 0x0a,
294 .vsync_len = 0x08, 348 .vsync_len = 0x03,
295 .upper_margin = 0x05, 349 .upper_margin = 0x05,
296 .lower_margin = 0x14, 350 .lower_margin = 0x14,
297 .sync = 0, 351 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
298 .lccr0 = 0x07800080, 352 .lccr0 = 0x07800080,
299 .lccr3 = 0x04400007, 353 .lccr3 = 0x00400000,
300 .pxafb_backlight_power = lpd270_backlight_power, 354 .pxafb_backlight_power = lpd270_backlight_power,
301}; 355};
302 356
357static struct pxafb_mach_info *lpd270_lcd_to_use;
358
359static int __init lpd270_set_lcd(char *str)
360{
361 if (!strnicmp(str, "lq057q3dc02", 11)) {
362 lpd270_lcd_to_use = &sharp_lq057q3dc02;
363 } else if (!strnicmp(str, "lq121s1dg31", 11)) {
364 lpd270_lcd_to_use = &sharp_lq121s1dg31;
365 } else if (!strnicmp(str, "lq036q1da01", 11)) {
366 lpd270_lcd_to_use = &sharp_lq036q1da01;
367 } else if (!strnicmp(str, "lq64d343", 8)) {
368 lpd270_lcd_to_use = &sharp_lq64d343;
369 } else if (!strnicmp(str, "lq10d368", 8)) {
370 lpd270_lcd_to_use = &sharp_lq10d368;
371 } else if (!strnicmp(str, "lq035q7db02-20", 14)) {
372 lpd270_lcd_to_use = &sharp_lq035q7db02_20;
373 } else {
374 printk(KERN_INFO "lpd270: unknown lcd panel [%s]\n", str);
375 }
376
377 return 1;
378}
379
380__setup("lcd=", lpd270_set_lcd);
381
303static struct platform_device *platform_devices[] __initdata = { 382static struct platform_device *platform_devices[] __initdata = {
304 &smc91x_device, 383 &smc91x_device,
305 &lpd270_audio_device, 384 &lpd270_audio_device,
@@ -345,9 +424,8 @@ static void __init lpd270_init(void)
345 424
346 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); 425 platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
347 426
348 // set_pxa_fb_info(&sharp_lq057q3dc02); 427 if (lpd270_lcd_to_use != NULL)
349 set_pxa_fb_info(&sharp_lq64d343); 428 set_pxa_fb_info(lpd270_lcd_to_use);
350 // set_pxa_fb_info(&sharp_lq035q7db02_20);
351 429
352 pxa_set_ohci_info(&lpd270_ohci_platform_data); 430 pxa_set_ohci_info(&lpd270_ohci_platform_data);
353} 431}
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 1ab26c6914f..6a9a669d60d 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -419,7 +419,7 @@ static int lubbock_mci_init(struct device *dev,
419 init_timer(&mmc_timer); 419 init_timer(&mmc_timer);
420 mmc_timer.data = (unsigned long) data; 420 mmc_timer.data = (unsigned long) data;
421 return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int, 421 return request_irq(LUBBOCK_SD_IRQ, lubbock_detect_int,
422 SA_SAMPLE_RANDOM, "lubbock-sd-detect", data); 422 IRQF_SAMPLE_RANDOM, "lubbock-sd-detect", data);
423} 423}
424 424
425static int lubbock_mci_get_ro(struct device *dev) 425static int lubbock_mci_get_ro(struct device *dev)
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index b307f11951d..21ddf3de2f6 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -331,7 +331,7 @@ static int mainstone_mci_init(struct device *dev, irqreturn_t (*mstone_detect_in
331 */ 331 */
332 MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; 332 MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL;
333 333
334 err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, SA_INTERRUPT, 334 err = request_irq(MAINSTONE_MMC_IRQ, mstone_detect_int, IRQF_DISABLED,
335 "MMC card detect", data); 335 "MMC card detect", data);
336 if (err) { 336 if (err) {
337 printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); 337 printk(KERN_ERR "mainstone_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c
index 852ea72d8c8..2112c414f0e 100644
--- a/arch/arm/mach-pxa/pm.c
+++ b/arch/arm/mach-pxa/pm.c
@@ -10,7 +10,6 @@
10 * This program is free software; you can redistribute it and/or 10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License. 11 * modify it under the terms of the GNU General Public License.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/suspend.h> 15#include <linux/suspend.h>
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 9a9fa87cea9..6dbff6d9480 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -212,7 +212,7 @@ static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(
212 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250); 212 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
213 213
214 err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int, 214 err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int,
215 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 215 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
216 "MMC card detect", data); 216 "MMC card detect", data);
217 if (err) { 217 if (err) {
218 printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); 218 printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 573a5758e78..c1f21739bf7 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -16,7 +16,6 @@
16 * initialization stuff for PXA machines which can be overridden later if 16 * initialization stuff for PXA machines which can be overridden later if
17 * need be. 17 * need be.
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/init.h> 21#include <linux/init.h>
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index 3baa70819f2..74eeada1e2f 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -11,7 +11,6 @@
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.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/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 0f1648780c4..db6e8f56a75 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -18,11 +18,11 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/kernel.h> 19#include <linux/kernel.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/irq.h>
21#include <linux/platform_device.h> 22#include <linux/platform_device.h>
22 23
23#include <asm/hardware.h> 24#include <asm/hardware.h>
24#include <asm/mach-types.h> 25#include <asm/mach-types.h>
25#include <asm/irq.h>
26#include <asm/apm.h> 26#include <asm/apm.h>
27#include <asm/arch/pm.h> 27#include <asm/arch/pm.h>
28#include <asm/arch/pxa-regs.h> 28#include <asm/arch/pxa-regs.h>
@@ -142,18 +142,18 @@ void sharpsl_pm_pxa_init(void)
142 pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batlock | GPIO_IN); 142 pxa_gpio_mode(sharpsl_pm.machinfo->gpio_batlock | GPIO_IN);
143 143
144 /* Register interrupt handlers */ 144 /* Register interrupt handlers */
145 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, SA_INTERRUPT, "AC Input Detect", sharpsl_ac_isr)) { 145 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin), sharpsl_ac_isr, IRQF_DISABLED, "AC Input Detect", sharpsl_ac_isr)) {
146 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin)); 146 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin));
147 } 147 }
148 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin),IRQT_BOTHEDGE); 148 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_acin),IRQT_BOTHEDGE);
149 149
150 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr, SA_INTERRUPT, "Battery Cover", sharpsl_fatal_isr)) { 150 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock), sharpsl_fatal_isr, IRQF_DISABLED, "Battery Cover", sharpsl_fatal_isr)) {
151 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock)); 151 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock));
152 } 152 }
153 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock),IRQT_FALLING); 153 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batlock),IRQT_FALLING);
154 154
155 if (sharpsl_pm.machinfo->gpio_fatal) { 155 if (sharpsl_pm.machinfo->gpio_fatal) {
156 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr, SA_INTERRUPT, "Fatal Battery", sharpsl_fatal_isr)) { 156 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal), sharpsl_fatal_isr, IRQF_DISABLED, "Fatal Battery", sharpsl_fatal_isr)) {
157 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal)); 157 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal));
158 } 158 }
159 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING); 159 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_fatal),IRQT_FALLING);
@@ -162,7 +162,7 @@ void sharpsl_pm_pxa_init(void)
162 if (sharpsl_pm.machinfo->batfull_irq) 162 if (sharpsl_pm.machinfo->batfull_irq)
163 { 163 {
164 /* Register interrupt handler. */ 164 /* Register interrupt handler. */
165 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, SA_INTERRUPT, "CO", sharpsl_chrg_full_isr)) { 165 if (request_irq(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull), sharpsl_chrg_full_isr, IRQF_DISABLED, "CO", sharpsl_chrg_full_isr)) {
166 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull)); 166 dev_err(sharpsl_pm.dev, "Could not get irq %d.\n", IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull));
167 } 167 }
168 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull),IRQT_RISING); 168 else set_irq_type(IRQ_GPIO(sharpsl_pm.machinfo->gpio_batfull),IRQT_RISING);
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
index 0650bed3b96..15874b360e5 100644
--- a/arch/arm/mach-pxa/sleep.S
+++ b/arch/arm/mach-pxa/sleep.S
@@ -11,7 +11,6 @@
11 * modify it under the terms of the GNU General Public License. 11 * modify it under the terms of the GNU General Public License.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/linkage.h> 14#include <linux/linkage.h>
16#include <asm/assembler.h> 15#include <asm/assembler.h>
17#include <asm/hardware.h> 16#include <asm/hardware.h>
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index eb9937f6f5c..1c32a9310dc 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -308,7 +308,7 @@ static int spitz_mci_init(struct device *dev, irqreturn_t (*spitz_detect_int)(in
308 spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250); 308 spitz_mci_platform_data.detect_delay = msecs_to_jiffies(250);
309 309
310 err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int, 310 err = request_irq(SPITZ_IRQ_GPIO_nSD_DETECT, spitz_detect_int,
311 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 311 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
312 "MMC card detect", data); 312 "MMC card detect", data);
313 if (err) { 313 if (err) {
314 printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); 314 printk(KERN_ERR "spitz_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
diff --git a/arch/arm/mach-pxa/standby.S b/arch/arm/mach-pxa/standby.S
index 6f6dbbd0802..d774430d02c 100644
--- a/arch/arm/mach-pxa/standby.S
+++ b/arch/arm/mach-pxa/standby.S
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/linkage.h> 12#include <linux/linkage.h>
14#include <asm/assembler.h> 13#include <asm/assembler.h>
15#include <asm/hardware.h> 14#include <asm/hardware.h>
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index b9b2057349e..5dbd191c57c 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -10,7 +10,6 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
@@ -118,7 +117,7 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
118 117
119static struct irqaction pxa_timer_irq = { 118static struct irqaction pxa_timer_irq = {
120 .name = "PXA Timer Tick", 119 .name = "PXA Timer Tick",
121 .flags = SA_INTERRUPT | SA_TIMER, 120 .flags = IRQF_DISABLED | IRQF_TIMER,
122 .handler = pxa_timer_interrupt, 121 .handler = pxa_timer_interrupt,
123}; 122};
124 123
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 7152bc13680..249353616ab 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -185,7 +185,7 @@ static int tosa_mci_init(struct device *dev, irqreturn_t (*tosa_detect_int)(int,
185 185
186 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250); 186 tosa_mci_platform_data.detect_delay = msecs_to_jiffies(250);
187 187
188 err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, SA_INTERRUPT, 188 err = request_irq(TOSA_IRQ_GPIO_nSD_DETECT, tosa_detect_int, IRQF_DISABLED,
189 "MMC/SD card detect", data); 189 "MMC/SD card detect", data);
190 if (err) { 190 if (err) {
191 printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n"); 191 printk(KERN_ERR "tosa_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
new file mode 100644
index 00000000000..7c3007df1bd
--- /dev/null
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -0,0 +1,473 @@
1/*
2 * linux/arch/arm/mach-pxa/trizeps4.c
3 *
4 * Support for the Keith und Koep Trizeps4 Module Platform.
5 *
6 * Author: Jürgen Schindele
7 * Created: 20 02, 2006
8 * Copyright: Jürgen Schindele
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
13 */
14
15#include <linux/init.h>
16#include <linux/kernel.h>
17#include <linux/platform_device.h>
18#include <linux/sysdev.h>
19#include <linux/interrupt.h>
20#include <linux/sched.h>
21#include <linux/bitops.h>
22#include <linux/fb.h>
23#include <linux/ioport.h>
24#include <linux/delay.h>
25#include <linux/serial_8250.h>
26#include <linux/mtd/mtd.h>
27#include <linux/mtd/partitions.h>
28
29#include <asm/types.h>
30#include <asm/setup.h>
31#include <asm/memory.h>
32#include <asm/mach-types.h>
33#include <asm/hardware.h>
34#include <asm/irq.h>
35#include <asm/sizes.h>
36
37#include <asm/mach/arch.h>
38#include <asm/mach/map.h>
39#include <asm/mach/irq.h>
40#include <asm/mach/flash.h>
41
42#include <asm/arch/pxa-regs.h>
43#include <asm/arch/trizeps4.h>
44#include <asm/arch/audio.h>
45#include <asm/arch/pxafb.h>
46#include <asm/arch/mmc.h>
47#include <asm/arch/irda.h>
48#include <asm/arch/ohci.h>
49
50#include "generic.h"
51
52/********************************************************************************************
53 * ONBOARD FLASH
54 ********************************************************************************************/
55static struct mtd_partition trizeps4_partitions[] = {
56 {
57 .name = "Bootloader",
58 .size = 0x00040000,
59 .offset = 0,
60 .mask_flags = MTD_WRITEABLE /* force read-only */
61 },{
62 .name = "Kernel",
63 .size = 0x00400000,
64 .offset = 0x00040000
65 },{
66 .name = "Filesystem",
67 .size = MTDPART_SIZ_FULL,
68 .offset = 0x00440000
69 }
70};
71
72static struct flash_platform_data trizeps4_flash_data[] = {
73 {
74 .map_name = "cfi_probe",
75 .parts = trizeps4_partitions,
76 .nr_parts = ARRAY_SIZE(trizeps4_partitions)
77 }
78};
79
80static struct resource flash_resource = {
81 .start = PXA_CS0_PHYS,
82 .end = PXA_CS0_PHYS + SZ_64M - 1,
83 .flags = IORESOURCE_MEM,
84};
85
86static struct platform_device flash_device = {
87 .name = "pxa2xx-flash",
88 .id = 0,
89 .dev = {
90 .platform_data = &trizeps4_flash_data,
91 },
92 .resource = &flash_resource,
93 .num_resources = 1,
94};
95
96/********************************************************************************************
97 * DAVICOM DM9000 Ethernet
98 ********************************************************************************************/
99static struct resource dm9000_resources[] = {
100 [0] = {
101 .start = TRIZEPS4_ETH_PHYS+0x300,
102 .end = TRIZEPS4_ETH_PHYS+0x400-1,
103 .flags = IORESOURCE_MEM,
104 },
105 [1] = {
106 .start = TRIZEPS4_ETH_PHYS+0x8300,
107 .end = TRIZEPS4_ETH_PHYS+0x8400-1,
108 .flags = IORESOURCE_MEM,
109 },
110 [2] = {
111 .start = TRIZEPS4_ETH_IRQ,
112 .end = TRIZEPS4_ETH_IRQ,
113 .flags = (IORESOURCE_IRQ | IRQT_RISING),
114 },
115};
116
117static struct platform_device dm9000_device = {
118 .name = "dm9000",
119 .id = -1,
120 .num_resources = ARRAY_SIZE(dm9000_resources),
121 .resource = dm9000_resources,
122};
123
124/********************************************************************************************
125 * PXA270 serial ports
126 ********************************************************************************************/
127static struct plat_serial8250_port tri_serial_ports[] = {
128#ifdef CONFIG_SERIAL_PXA
129 /* this uses the own PXA driver */
130 {
131 0,
132 },
133#else
134 /* this uses the generic 8520 driver */
135 [0] = {
136 .membase = (void *)&FFUART,
137 .irq = IRQ_FFUART,
138 .flags = UPF_BOOT_AUTOCONF,
139 .iotype = UPIO_MEM32,
140 .regshift = 2,
141 .uartclk = (921600*16),
142 },
143 [1] = {
144 .membase = (void *)&BTUART,
145 .irq = IRQ_BTUART,
146 .flags = UPF_BOOT_AUTOCONF,
147 .iotype = UPIO_MEM32,
148 .regshift = 2,
149 .uartclk = (921600*16),
150 },
151 {
152 0,
153 },
154#endif
155};
156
157static struct platform_device uart_devices = {
158 .name = "serial8250",
159 .id = 0,
160 .dev = {
161 .platform_data = tri_serial_ports,
162 },
163 .num_resources = 0,
164 .resource = NULL,
165};
166
167/********************************************************************************************
168 * PXA270 ac97 sound codec
169 ********************************************************************************************/
170static struct platform_device ac97_audio_device = {
171 .name = "pxa2xx-ac97",
172 .id = -1,
173};
174
175static struct platform_device * trizeps4_devices[] __initdata = {
176 &flash_device,
177 &uart_devices,
178 &dm9000_device,
179 &ac97_audio_device,
180};
181
182#ifdef CONFIG_MACH_TRIZEPS4_CONXS
183static short trizeps_conxs_bcr;
184
185/* PCCARD power switching supports only 3,3V */
186void board_pcmcia_power(int power)
187{
188 if (power) {
189 /* switch power on, put in reset and enable buffers */
190 trizeps_conxs_bcr |= power;
191 trizeps_conxs_bcr |= ConXS_BCR_CF_RESET;
192 trizeps_conxs_bcr &= ~(ConXS_BCR_CF_BUF_EN);
193 ConXS_BCR = trizeps_conxs_bcr;
194 /* wait a little */
195 udelay(2000);
196 /* take reset away */
197 trizeps_conxs_bcr &= ~(ConXS_BCR_CF_RESET);
198 ConXS_BCR = trizeps_conxs_bcr;
199 udelay(2000);
200 } else {
201 /* put in reset */
202 trizeps_conxs_bcr |= ConXS_BCR_CF_RESET;
203 ConXS_BCR = trizeps_conxs_bcr;
204 udelay(1000);
205 /* switch power off */
206 trizeps_conxs_bcr &= ~(0xf);
207 ConXS_BCR = trizeps_conxs_bcr;
208
209 }
210 pr_debug("%s: o%s 0x%x\n", __FUNCTION__, power ? "n": "ff", trizeps_conxs_bcr);
211}
212
213/* backlight power switching for LCD panel */
214static void board_backlight_power(int on)
215{
216 if (on) {
217 trizeps_conxs_bcr |= ConXS_BCR_L_DISP;
218 } else {
219 trizeps_conxs_bcr &= ~ConXS_BCR_L_DISP;
220 }
221 pr_debug("%s: o%s 0x%x\n", __FUNCTION__, on ? "n" : "ff", trizeps_conxs_bcr);
222 ConXS_BCR = trizeps_conxs_bcr;
223}
224
225/* Powersupply for MMC/SD cardslot */
226static void board_mci_power(struct device *dev, unsigned int vdd)
227{
228 struct pxamci_platform_data* p_d = dev->platform_data;
229
230 if (( 1 << vdd) & p_d->ocr_mask) {
231 pr_debug("%s: on\n", __FUNCTION__);
232 /* FIXME fill in values here */
233 } else {
234 pr_debug("%s: off\n", __FUNCTION__);
235 /* FIXME fill in values here */
236 }
237}
238
239static short trizeps_conxs_ircr;
240
241/* Switch modes and Power for IRDA receiver */
242static void board_irda_mode(struct device *dev, int mode)
243{
244 unsigned long flags;
245
246 local_irq_save(flags);
247 if (mode & IR_SIRMODE) {
248 /* Slow mode */
249 trizeps_conxs_ircr &= ~ConXS_IRCR_MODE;
250 } else if (mode & IR_FIRMODE) {
251 /* Fast mode */
252 trizeps_conxs_ircr |= ConXS_IRCR_MODE;
253 }
254 if (mode & IR_OFF) {
255 trizeps_conxs_ircr |= ConXS_IRCR_SD;
256 } else {
257 trizeps_conxs_ircr &= ~ConXS_IRCR_SD;
258 }
259 /* FIXME write values to register */
260 local_irq_restore(flags);
261}
262
263#else
264/* for other baseboards define dummies */
265void board_pcmcia_power(int power) {;}
266#define board_backlight_power NULL
267#define board_mci_power NULL
268#define board_irda_mode NULL
269
270#endif /* CONFIG_MACH_TRIZEPS4_CONXS */
271EXPORT_SYMBOL(board_pcmcia_power);
272
273static int trizeps4_mci_init(struct device *dev, irqreturn_t (*mci_detect_int)(int, void *, struct pt_regs *), void *data)
274{
275 int err;
276 /* setup GPIO for PXA27x MMC controller */
277 pxa_gpio_mode(GPIO32_MMCCLK_MD);
278 pxa_gpio_mode(GPIO112_MMCCMD_MD);
279 pxa_gpio_mode(GPIO92_MMCDAT0_MD);
280 pxa_gpio_mode(GPIO109_MMCDAT1_MD);
281 pxa_gpio_mode(GPIO110_MMCDAT2_MD);
282 pxa_gpio_mode(GPIO111_MMCDAT3_MD);
283
284 pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN);
285
286 err = request_irq(TRIZEPS4_MMC_IRQ, mci_detect_int,
287 IRQF_DISABLED | IRQF_TRIGGER_RISING,
288 "MMC card detect", data);
289 if (err) {
290 printk(KERN_ERR "trizeps4_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
291 return -1;
292 }
293 return 0;
294}
295
296static void trizeps4_mci_exit(struct device *dev, void *data)
297{
298 free_irq(TRIZEPS4_MMC_IRQ, data);
299}
300
301static struct pxamci_platform_data trizeps4_mci_platform_data = {
302 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
303 .init = trizeps4_mci_init,
304 .exit = trizeps4_mci_exit,
305 .setpower = board_mci_power,
306};
307
308static struct pxaficp_platform_data trizeps4_ficp_platform_data = {
309 .transceiver_cap = IR_SIRMODE | IR_FIRMODE | IR_OFF,
310 .transceiver_mode = board_irda_mode,
311};
312
313static int trizeps4_ohci_init(struct device *dev)
314{
315 /* setup Port1 GPIO pin. */
316 pxa_gpio_mode( 88 | GPIO_ALT_FN_1_IN); /* USBHPWR1 */
317 pxa_gpio_mode( 89 | GPIO_ALT_FN_2_OUT); /* USBHPEN1 */
318
319 /* Set the Power Control Polarity Low and Power Sense
320 Polarity Low to active low. */
321 UHCHR = (UHCHR | UHCHR_PCPL | UHCHR_PSPL) &
322 ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSEP3 | UHCHR_SSE);
323
324 return 0;
325}
326
327static void trizeps4_ohci_exit(struct device *dev)
328{
329 ;
330}
331
332static struct pxaohci_platform_data trizeps4_ohci_platform_data = {
333 .port_mode = PMM_PERPORT_MODE,
334 .init = trizeps4_ohci_init,
335 .exit = trizeps4_ohci_exit,
336};
337
338static struct map_desc trizeps4_io_desc[] __initdata = {
339 { /* ConXS CFSR */
340 .virtual = TRIZEPS4_CFSR_VIRT,
341 .pfn = __phys_to_pfn(TRIZEPS4_CFSR_PHYS),
342 .length = 0x00001000,
343 .type = MT_DEVICE
344 },
345 { /* ConXS BCR */
346 .virtual = TRIZEPS4_BOCR_VIRT,
347 .pfn = __phys_to_pfn(TRIZEPS4_BOCR_PHYS),
348 .length = 0x00001000,
349 .type = MT_DEVICE
350 },
351 { /* ConXS IRCR */
352 .virtual = TRIZEPS4_IRCR_VIRT,
353 .pfn = __phys_to_pfn(TRIZEPS4_IRCR_PHYS),
354 .length = 0x00001000,
355 .type = MT_DEVICE
356 },
357 { /* ConXS DCR */
358 .virtual = TRIZEPS4_DICR_VIRT,
359 .pfn = __phys_to_pfn(TRIZEPS4_DICR_PHYS),
360 .length = 0x00001000,
361 .type = MT_DEVICE
362 },
363 { /* ConXS UPSR */
364 .virtual = TRIZEPS4_UPSR_VIRT,
365 .pfn = __phys_to_pfn(TRIZEPS4_UPSR_PHYS),
366 .length = 0x00001000,
367 .type = MT_DEVICE
368 }
369};
370
371static struct pxafb_mach_info sharp_lcd __initdata = {
372 .pixclock = 78000,
373 .xres = 640,
374 .yres = 480,
375 .bpp = 8,
376 .hsync_len = 4,
377 .left_margin = 4,
378 .right_margin = 4,
379 .vsync_len = 2,
380 .upper_margin = 0,
381 .lower_margin = 0,
382 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
383 .cmap_greyscale = 0,
384 .cmap_inverse = 0,
385 .cmap_static = 0,
386 .lccr0 = LCCR0_Color | LCCR0_Pas | LCCR0_Dual,
387 .lccr3 = 0x0340ff02,
388 .pxafb_backlight_power = board_backlight_power,
389};
390
391static void __init trizeps4_fixup(struct machine_desc *desc, struct tag *tags, char **cmdline, struct meminfo *mi)
392{
393}
394
395static void __init trizeps4_init(void)
396{
397 platform_add_devices(trizeps4_devices, ARRAY_SIZE(trizeps4_devices));
398
399 set_pxa_fb_info(&sharp_lcd);
400
401 pxa_set_mci_info(&trizeps4_mci_platform_data);
402 pxa_set_ficp_info(&trizeps4_ficp_platform_data);
403 pxa_set_ohci_info(&trizeps4_ohci_platform_data);
404}
405
406static void __init trizeps4_map_io(void)
407{
408 pxa_map_io();
409 iotable_init(trizeps4_io_desc, ARRAY_SIZE(trizeps4_io_desc));
410
411 /* for DiskOnChip */
412 pxa_gpio_mode(GPIO15_nCS_1_MD);
413
414 /* for off-module PIC on ConXS board */
415 pxa_gpio_mode(GPIO_PIC | GPIO_IN);
416
417 /* UCB1400 irq */
418 pxa_gpio_mode(GPIO_UCB1400 | GPIO_IN);
419
420 /* for DM9000 LAN */
421 pxa_gpio_mode(GPIO78_nCS_2_MD);
422 pxa_gpio_mode(GPIO_DM9000 | GPIO_IN);
423
424 /* for PCMCIA device */
425 pxa_gpio_mode(GPIO_PCD | GPIO_IN);
426 pxa_gpio_mode(GPIO_PRDY | GPIO_IN);
427
428 /* for I2C adapter */
429 pxa_gpio_mode(GPIO117_I2CSCL_MD);
430 pxa_gpio_mode(GPIO118_I2CSDA_MD);
431
432 /* MMC_DET s.o. */
433 pxa_gpio_mode(GPIO_MMC_DET | GPIO_IN);
434
435 /* whats that for ??? */
436 pxa_gpio_mode(GPIO79_nCS_3_MD);
437
438 pxa_gpio_mode( GPIO_SYS_BUSY_LED | GPIO_OUT); /* LED1 */
439 pxa_gpio_mode( GPIO_HEARTBEAT_LED | GPIO_OUT); /* LED2 */
440
441#ifdef CONFIG_MACH_TRIZEPS4_CONXS
442#ifdef CONFIG_IDE_PXA_CF
443 /* if boot direct from compact flash dont disable power */
444 trizeps_conxs_bcr = 0x0009;
445#else
446 /* this is the reset value */
447 trizeps_conxs_bcr = 0x00A0;
448#endif
449 ConXS_BCR = trizeps_conxs_bcr;
450#endif
451
452 PWER = 0x00000002;
453 PFER = 0x00000000;
454 PRER = 0x00000002;
455 PGSR0 = 0x0158C000;
456 PGSR1 = 0x00FF0080;
457 PGSR2 = 0x0001C004;
458 /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
459 PCFR |= PCFR_OPDE;
460}
461
462MACHINE_START(TRIZEPS4, "Keith und Koep Trizeps IV module")
463 /* MAINTAINER("Jürgen Schindele") */
464 .phys_io = 0x40000000,
465 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
466 .boot_params = TRIZEPS4_SDRAM_BASE + 0x100,
467 .fixup = trizeps4_fixup,
468 .init_machine = trizeps4_init,
469 .map_io = trizeps4_map_io,
470 .init_irq = pxa_init_irq,
471 .timer = &pxa_timer,
472MACHINE_END
473
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index d13270c5d7c..da028697382 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -18,7 +18,6 @@
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21#include <linux/config.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/platform_device.h> 22#include <linux/platform_device.h>
24#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
@@ -537,7 +536,7 @@ static irqreturn_t realview_timer_interrupt(int irq, void *dev_id, struct pt_reg
537 536
538static struct irqaction realview_timer_irq = { 537static struct irqaction realview_timer_irq = {
539 .name = "RealView Timer Tick", 538 .name = "RealView Timer Tick",
540 .flags = SA_INTERRUPT | SA_TIMER, 539 .flags = IRQF_DISABLED | IRQF_TIMER,
541 .handler = realview_timer_interrupt, 540 .handler = realview_timer_interrupt,
542}; 541};
543 542
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 693fb1e396e..84a959530fb 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/platform_device.h> 23#include <linux/platform_device.h>
25#include <linux/sysdev.h> 24#include <linux/sysdev.h>
diff --git a/arch/arm/mach-rpc/dma.c b/arch/arm/mach-rpc/dma.c
index bd86ffba881..ac511d41d4d 100644
--- a/arch/arm/mach-rpc/dma.c
+++ b/arch/arm/mach-rpc/dma.c
@@ -128,7 +128,7 @@ static irqreturn_t iomd_dma_handle(int irq, void *dev_id, struct pt_regs *regs)
128static int iomd_request_dma(dmach_t channel, dma_t *dma) 128static int iomd_request_dma(dmach_t channel, dma_t *dma)
129{ 129{
130 return request_irq(dma->dma_irq, iomd_dma_handle, 130 return request_irq(dma->dma_irq, iomd_dma_handle,
131 SA_INTERRUPT, dma->device_id, dma); 131 IRQF_DISABLED, dma->device_id, dma);
132} 132}
133 133
134static void iomd_free_dma(dmach_t channel, dma_t *dma) 134static void iomd_free_dma(dmach_t channel, dma_t *dma)
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c
index fbbeb055300..def4441d244 100644
--- a/arch/arm/mach-s3c2410/bast-irq.c
+++ b/arch/arm/mach-s3c2410/bast-irq.c
@@ -136,8 +136,8 @@ bast_irq_pc104_demux(unsigned int irq,
136 for (i = 0; stat != 0; i++, stat >>= 1) { 136 for (i = 0; stat != 0; i++, stat >>= 1) {
137 if (stat & 1) { 137 if (stat & 1) {
138 irqno = bast_pc104_irqs[i]; 138 irqno = bast_pc104_irqs[i];
139 139 desc = irq_desc + irqno;
140 desc_handle_irq(irqno, irq_desc + irqno, regs); 140 desc_handle_irq(irqno, desc, regs);
141 } 141 }
142 } 142 }
143 } 143 }
@@ -156,7 +156,7 @@ static __init int bast_irq_init(void)
156 156
157 set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux); 157 set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux);
158 158
159 /* reigster our IRQs */ 159 /* register our IRQs */
160 160
161 for (i = 0; i < 4; i++) { 161 for (i = 0; i < 4; i++) {
162 unsigned int irqno = bast_pc104_irqs[i]; 162 unsigned int irqno = bast_pc104_irqs[i];
diff --git a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.h
index fa124ed920e..726e2eaf879 100644
--- a/arch/arm/mach-s3c2410/devs.h
+++ b/arch/arm/mach-s3c2410/devs.h
@@ -14,7 +14,6 @@
14 * 27-Aug-2004 BJD Added timers 0 through 3 14 * 27-Aug-2004 BJD Added timers 0 through 3
15 * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv 15 * 10-Feb-2005 BJD Added camera from guillaume.gourat@nexvision.tv
16*/ 16*/
17#include <linux/config.h>
18#include <linux/platform_device.h> 17#include <linux/platform_device.h>
19 18
20struct s3c24xx_uart_resources { 19struct s3c24xx_uart_resources {
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c
index 4dbd8e758ea..094cc52745c 100644
--- a/arch/arm/mach-s3c2410/dma.c
+++ b/arch/arm/mach-s3c2410/dma.c
@@ -31,7 +31,6 @@
31 * possible DMA function 31 * possible DMA function
32 */ 32 */
33 33
34#include <linux/config.h>
35 34
36#ifdef CONFIG_S3C2410_DMA_DEBUG 35#ifdef CONFIG_S3C2410_DMA_DEBUG
37#define DEBUG 36#define DEBUG
@@ -719,7 +718,7 @@ int s3c2410_dma_request(unsigned int channel, s3c2410_dma_client_t *client,
719 pr_debug("dma%d: %s : requesting irq %d\n", 718 pr_debug("dma%d: %s : requesting irq %d\n",
720 channel, __FUNCTION__, chan->irq); 719 channel, __FUNCTION__, chan->irq);
721 720
722 err = request_irq(chan->irq, s3c2410_dma_irq, SA_INTERRUPT, 721 err = request_irq(chan->irq, s3c2410_dma_irq, IRQF_DISABLED,
723 client->name, (void *)chan); 722 client->name, (void *)chan);
724 723
725 if (err) { 724 if (err) {
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c
index 43e9a550a20..a589fe76d91 100644
--- a/arch/arm/mach-s3c2410/pm.c
+++ b/arch/arm/mach-s3c2410/pm.c
@@ -29,7 +29,6 @@
29 * 10-Mar-2005 LCVR Changed S3C2410_VA_UART to S3C24XX_VA_UART 29 * 10-Mar-2005 LCVR Changed S3C2410_VA_UART to S3C24XX_VA_UART
30*/ 30*/
31 31
32#include <linux/config.h>
33#include <linux/init.h> 32#include <linux/init.h>
34#include <linux/suspend.h> 33#include <linux/suspend.h>
35#include <linux/errno.h> 34#include <linux/errno.h>
diff --git a/arch/arm/mach-s3c2410/sleep.S b/arch/arm/mach-s3c2410/sleep.S
index dc27167f4d5..a7561a79fc8 100644
--- a/arch/arm/mach-s3c2410/sleep.S
+++ b/arch/arm/mach-s3c2410/sleep.S
@@ -24,7 +24,6 @@
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25*/ 25*/
26 26
27#include <linux/config.h>
28#include <linux/linkage.h> 27#include <linux/linkage.h>
29#include <asm/assembler.h> 28#include <asm/assembler.h>
30#include <asm/hardware.h> 29#include <asm/hardware.h>
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c
index 9d7b799ea4a..00d1cfca971 100644
--- a/arch/arm/mach-s3c2410/time.c
+++ b/arch/arm/mach-s3c2410/time.c
@@ -18,11 +18,11 @@
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
24#include <linux/init.h> 23#include <linux/init.h>
25#include <linux/interrupt.h> 24#include <linux/interrupt.h>
25#include <linux/irq.h>
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28 28
@@ -138,7 +138,7 @@ s3c2410_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
138 138
139static struct irqaction s3c2410_timer_irq = { 139static struct irqaction s3c2410_timer_irq = {
140 .name = "S3C2410 Timer Tick", 140 .name = "S3C2410 Timer Tick",
141 .flags = SA_INTERRUPT | SA_TIMER, 141 .flags = IRQF_DISABLED | IRQF_TIMER,
142 .handler = s3c2410_timer_interrupt, 142 .handler = s3c2410_timer_interrupt,
143}; 143};
144 144
diff --git a/arch/arm/mach-s3c2410/usb-simtec.c b/arch/arm/mach-s3c2410/usb-simtec.c
index 495f8c6ffcb..6b22d8f0a00 100644
--- a/arch/arm/mach-s3c2410/usb-simtec.c
+++ b/arch/arm/mach-s3c2410/usb-simtec.c
@@ -85,8 +85,8 @@ static void usb_simtec_enableoc(struct s3c2410_hcd_info *info, int on)
85 85
86 if (on) { 86 if (on) {
87 ret = request_irq(IRQ_USBOC, usb_simtec_ocirq, 87 ret = request_irq(IRQ_USBOC, usb_simtec_ocirq,
88 SA_INTERRUPT | SA_TRIGGER_RISING | 88 IRQF_DISABLED | IRQF_TRIGGER_RISING |
89 SA_TRIGGER_FALLING, 89 IRQF_TRIGGER_FALLING,
90 "USB Over-current", info); 90 "USB Over-current", info);
91 if (ret != 0) { 91 if (ret != 0) {
92 printk(KERN_ERR "failed to request usb oc irq\n"); 92 printk(KERN_ERR "failed to request usb oc irq\n");
diff --git a/arch/arm/mach-sa1100/assabet.c b/arch/arm/mach-sa1100/assabet.c
index c58f12ba7a9..be06d668a3c 100644
--- a/arch/arm/mach-sa1100/assabet.c
+++ b/arch/arm/mach-sa1100/assabet.c
@@ -9,7 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/module.h> 14#include <linux/module.h>
diff --git a/arch/arm/mach-sa1100/cerf.c b/arch/arm/mach-sa1100/cerf.c
index 8269a9ef9af..31afe50d7cd 100644
--- a/arch/arm/mach-sa1100/cerf.c
+++ b/arch/arm/mach-sa1100/cerf.c
@@ -10,11 +10,11 @@
10 * Jan-2004 : Removed io map for flash [FB] 10 * Jan-2004 : Removed io map for flash [FB]
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/tty.h> 15#include <linux/tty.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/irq.h>
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/mtd/partitions.h> 19#include <linux/mtd/partitions.h>
20 20
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 676b5c5b75b..a6bab50dab6 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -17,7 +17,6 @@
17 * 04-16-2001 Lineo Japan,Inc. ... 17 * 04-16-2001 Lineo Japan,Inc. ...
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/tty.h> 22#include <linux/tty.h>
diff --git a/arch/arm/mach-sa1100/collie_pm.c b/arch/arm/mach-sa1100/collie_pm.c
index 696d7d29c8a..45b1e71f111 100644
--- a/arch/arm/mach-sa1100/collie_pm.c
+++ b/arch/arm/mach-sa1100/collie_pm.c
@@ -45,12 +45,12 @@ static void collie_charger_init(void)
45 } 45 }
46 46
47 /* Register interrupt handler. */ 47 /* Register interrupt handler. */
48 if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, SA_INTERRUPT, 48 if ((err = request_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr, IRQF_DISABLED,
49 "ACIN", sharpsl_ac_isr))) { 49 "ACIN", sharpsl_ac_isr))) {
50 printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_AC_IN); 50 printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_AC_IN);
51 return; 51 return;
52 } 52 }
53 if ((err = request_irq(COLLIE_IRQ_GPIO_CO, sharpsl_chrg_full_isr, SA_INTERRUPT, 53 if ((err = request_irq(COLLIE_IRQ_GPIO_CO, sharpsl_chrg_full_isr, IRQF_DISABLED,
54 "CO", sharpsl_chrg_full_isr))) { 54 "CO", sharpsl_chrg_full_isr))) {
55 free_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr); 55 free_irq(COLLIE_IRQ_GPIO_AC_IN, sharpsl_ac_isr);
56 printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_CO); 56 printk("Could not get irq %d.\n", COLLIE_IRQ_GPIO_CO);
diff --git a/arch/arm/mach-sa1100/cpu-sa1110.c b/arch/arm/mach-sa1100/cpu-sa1110.c
index 04c94ab6c18..63959772993 100644
--- a/arch/arm/mach-sa1100/cpu-sa1110.c
+++ b/arch/arm/mach-sa1100/cpu-sa1110.c
@@ -15,7 +15,10 @@
15 * SDRAM reads (rev A0, B0, B1) 15 * SDRAM reads (rev A0, B0, B1)
16 * 16 *
17 * We ignore rev. A0 and B0 devices; I don't think they're worth supporting. 17 * We ignore rev. A0 and B0 devices; I don't think they're worth supporting.
18 *
19 * The SDRAM type can be passed on the command line as cpu_sa1110.sdram=type
18 */ 20 */
21#include <linux/moduleparam.h>
19#include <linux/types.h> 22#include <linux/types.h>
20#include <linux/kernel.h> 23#include <linux/kernel.h>
21#include <linux/sched.h> 24#include <linux/sched.h>
@@ -35,6 +38,7 @@
35static struct cpufreq_driver sa1110_driver; 38static struct cpufreq_driver sa1110_driver;
36 39
37struct sdram_params { 40struct sdram_params {
41 const char name[16];
38 u_char rows; /* bits */ 42 u_char rows; /* bits */
39 u_char cas_latency; /* cycles */ 43 u_char cas_latency; /* cycles */
40 u_char tck; /* clock cycle time (ns) */ 44 u_char tck; /* clock cycle time (ns) */
@@ -50,54 +54,53 @@ struct sdram_info {
50 u_int mdcas[3]; 54 u_int mdcas[3];
51}; 55};
52 56
53static struct sdram_params tc59sm716_cl2_params __initdata = { 57static struct sdram_params sdram_tbl[] __initdata = {
54 .rows = 12, 58 { /* Toshiba TC59SM716 CL2 */
55 .tck = 10, 59 .name = "TC59SM716-CL2",
56 .trcd = 20, 60 .rows = 12,
57 .trp = 20, 61 .tck = 10,
58 .twr = 10, 62 .trcd = 20,
59 .refresh = 64000, 63 .trp = 20,
60 .cas_latency = 2, 64 .twr = 10,
61}; 65 .refresh = 64000,
62 66 .cas_latency = 2,
63static struct sdram_params tc59sm716_cl3_params __initdata = { 67 }, { /* Toshiba TC59SM716 CL3 */
64 .rows = 12, 68 .name = "TC59SM716-CL3",
65 .tck = 8, 69 .rows = 12,
66 .trcd = 20, 70 .tck = 8,
67 .trp = 20, 71 .trcd = 20,
68 .twr = 8, 72 .trp = 20,
69 .refresh = 64000, 73 .twr = 8,
70 .cas_latency = 3, 74 .refresh = 64000,
71}; 75 .cas_latency = 3,
72 76 }, { /* Samsung K4S641632D TC75 */
73static struct sdram_params samsung_k4s641632d_tc75 __initdata = { 77 .name = "K4S641632D",
74 .rows = 14, 78 .rows = 14,
75 .tck = 9, 79 .tck = 9,
76 .trcd = 27, 80 .trcd = 27,
77 .trp = 20, 81 .trp = 20,
78 .twr = 9, 82 .twr = 9,
79 .refresh = 64000, 83 .refresh = 64000,
80 .cas_latency = 3, 84 .cas_latency = 3,
81}; 85 }, { /* Samsung KM416S4030CT */
82 86 .name = "KM416S4030CT",
83static struct sdram_params samsung_km416s4030ct __initdata = { 87 .rows = 13,
84 .rows = 13, 88 .tck = 8,
85 .tck = 8, 89 .trcd = 24, /* 3 CLKs */
86 .trcd = 24, /* 3 CLKs */ 90 .trp = 24, /* 3 CLKs */
87 .trp = 24, /* 3 CLKs */ 91 .twr = 16, /* Trdl: 2 CLKs */
88 .twr = 16, /* Trdl: 2 CLKs */ 92 .refresh = 64000,
89 .refresh = 64000, 93 .cas_latency = 3,
90 .cas_latency = 3, 94 }, { /* Winbond W982516AH75L CL3 */
91}; 95 .name = "W982516AH75L",
92 96 .rows = 16,
93static struct sdram_params wbond_w982516ah75l_cl3_params __initdata = { 97 .tck = 8,
94 .rows = 16, 98 .trcd = 20,
95 .tck = 8, 99 .trp = 20,
96 .trcd = 20, 100 .twr = 8,
97 .trp = 20, 101 .refresh = 64000,
98 .twr = 8, 102 .cas_latency = 3,
99 .refresh = 64000, 103 },
100 .cas_latency = 3,
101}; 104};
102 105
103static struct sdram_params sdram_params; 106static struct sdram_params sdram_params;
@@ -336,19 +339,36 @@ static struct cpufreq_driver sa1110_driver = {
336 .name = "sa1110", 339 .name = "sa1110",
337}; 340};
338 341
342static struct sdram_params *sa1110_find_sdram(const char *name)
343{
344 struct sdram_params *sdram;
345
346 for (sdram = sdram_tbl; sdram < sdram_tbl + ARRAY_SIZE(sdram_tbl); sdram++)
347 if (strcmp(name, sdram->name) == 0)
348 return sdram;
349
350 return NULL;
351}
352
353static char sdram_name[16];
354
339static int __init sa1110_clk_init(void) 355static int __init sa1110_clk_init(void)
340{ 356{
341 struct sdram_params *sdram = NULL; 357 struct sdram_params *sdram;
358 const char *name = sdram_name;
342 359
343 if (machine_is_assabet()) 360 if (!name[0]) {
344 sdram = &tc59sm716_cl3_params; 361 if (machine_is_assabet())
362 name = "TC59SM716-CL3";
345 363
346 if (machine_is_pt_system3()) 364 if (machine_is_pt_system3())
347 sdram = &samsung_k4s641632d_tc75; 365 name = "K4S641632D";
348 366
349 if (machine_is_h3100()) 367 if (machine_is_h3100())
350 sdram = &samsung_km416s4030ct; 368 name = "KM416S4030CT";
369 }
351 370
371 sdram = sa1110_find_sdram(name);
352 if (sdram) { 372 if (sdram) {
353 printk(KERN_DEBUG "SDRAM: tck: %d trcd: %d trp: %d" 373 printk(KERN_DEBUG "SDRAM: tck: %d trcd: %d trp: %d"
354 " twr: %d refresh: %d cas_latency: %d\n", 374 " twr: %d refresh: %d cas_latency: %d\n",
@@ -363,4 +383,5 @@ static int __init sa1110_clk_init(void)
363 return 0; 383 return 0;
364} 384}
365 385
386module_param_string(sdram, sdram_name, sizeof(sdram_name), 0);
366arch_initcall(sa1110_clk_init); 387arch_initcall(sa1110_clk_init);
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
index be0e4427bec..3c6441d4bc5 100644
--- a/arch/arm/mach-sa1100/dma.c
+++ b/arch/arm/mach-sa1100/dma.c
@@ -124,7 +124,7 @@ int sa1100_request_dma (dma_device_t device, const char *device_id,
124 124
125 i = dma - dma_chan; 125 i = dma - dma_chan;
126 regs = (dma_regs_t *)&DDAR(i); 126 regs = (dma_regs_t *)&DDAR(i);
127 err = request_irq(IRQ_DMA0 + i, dma_irq_handler, SA_INTERRUPT, 127 err = request_irq(IRQ_DMA0 + i, dma_irq_handler, IRQF_DISABLED,
128 device_id, regs); 128 device_id, regs);
129 if (err) { 129 if (err) {
130 printk(KERN_ERR 130 printk(KERN_ERR
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c
index 9ea71551fc0..4575f316e14 100644
--- a/arch/arm/mach-sa1100/generic.c
+++ b/arch/arm/mach-sa1100/generic.c
@@ -9,7 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c
index b04d9227102..7364478cec1 100644
--- a/arch/arm/mach-sa1100/h3600.c
+++ b/arch/arm/mach-sa1100/h3600.c
@@ -19,7 +19,6 @@
19 * and abstracted EGPIO interface. 19 * and abstracted EGPIO interface.
20 * 20 *
21 */ 21 */
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/init.h> 23#include <linux/init.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
@@ -741,7 +740,7 @@ static void h3800_IRQ_demux(unsigned int irq, struct irqdesc *desc, struct pt_re
741static struct irqaction h3800_irq = { 740static struct irqaction h3800_irq = {
742 .name = "h3800_asic", 741 .name = "h3800_asic",
743 .handler = h3800_IRQ_demux, 742 .handler = h3800_IRQ_demux,
744 .flags = SA_INTERRUPT | SA_TIMER, 743 .flags = IRQF_DISABLED | IRQF_TIMER,
745}; 744};
746 745
747u32 kpio_int_shadow = 0; 746u32 kpio_int_shadow = 0;
@@ -836,7 +835,7 @@ static void __init h3800_init_irq(void)
836 } 835 }
837#endif 836#endif
838 set_irq_type(IRQ_GPIO_H3800_ASIC, IRQT_RISING); 837 set_irq_type(IRQ_GPIO_H3800_ASIC, IRQT_RISING);
839 set_irq_chained_handler(IRQ_GPIO_H3800_ASIC, &h3800_IRQ_demux); 838 set_irq_chained_handler(IRQ_GPIO_H3800_ASIC, h3800_IRQ_demux);
840} 839}
841 840
842 841
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index b3a56024182..2891b8ca86d 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -11,12 +11,13 @@
11 */ 11 */
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/interrupt.h>
15#include <linux/irq.h>
14#include <linux/ioport.h> 16#include <linux/ioport.h>
15#include <linux/ptrace.h> 17#include <linux/ptrace.h>
16#include <linux/sysdev.h> 18#include <linux/sysdev.h>
17 19
18#include <asm/hardware.h> 20#include <asm/hardware.h>
19#include <asm/irq.h>
20#include <asm/mach/irq.h> 21#include <asm/mach/irq.h>
21 22
22#include "generic.h" 23#include "generic.h"
diff --git a/arch/arm/mach-sa1100/leds-assabet.c b/arch/arm/mach-sa1100/leds-assabet.c
index e9aa9dff211..ee978898987 100644
--- a/arch/arm/mach-sa1100/leds-assabet.c
+++ b/arch/arm/mach-sa1100/leds-assabet.c
@@ -9,7 +9,6 @@
9 * - Green - toggles state every 50 timer interrupts 9 * - Green - toggles state every 50 timer interrupts
10 * - Red - on if system is not idle 10 * - Red - on if system is not idle
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14 13
15#include <asm/hardware.h> 14#include <asm/hardware.h>
diff --git a/arch/arm/mach-sa1100/leds-badge4.c b/arch/arm/mach-sa1100/leds-badge4.c
index 0a8f87bb6c4..280929be972 100644
--- a/arch/arm/mach-sa1100/leds-badge4.c
+++ b/arch/arm/mach-sa1100/leds-badge4.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
16#include <asm/hardware.h> 15#include <asm/hardware.h>
diff --git a/arch/arm/mach-sa1100/leds-cerf.c b/arch/arm/mach-sa1100/leds-cerf.c
index f6635a2d0e8..f38eeddbef1 100644
--- a/arch/arm/mach-sa1100/leds-cerf.c
+++ b/arch/arm/mach-sa1100/leds-cerf.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Author: ??? 4 * Author: ???
5 */ 5 */
6#include <linux/config.h>
7#include <linux/init.h> 6#include <linux/init.h>
8 7
9#include <asm/hardware.h> 8#include <asm/hardware.h>
diff --git a/arch/arm/mach-sa1100/leds-hackkit.c b/arch/arm/mach-sa1100/leds-hackkit.c
index 2e5fa14aa4e..7e91cc90b5a 100644
--- a/arch/arm/mach-sa1100/leds-hackkit.c
+++ b/arch/arm/mach-sa1100/leds-hackkit.c
@@ -9,7 +9,6 @@
9 * The HackKit has two leds (GPIO 22/23). The red led (gpio 22) is used 9 * The HackKit has two leds (GPIO 22/23). The red led (gpio 22) is used
10 * as cpu led, the green one is used as timer led. 10 * as cpu led, the green one is used as timer led.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14 13
15#include <asm/hardware.h> 14#include <asm/hardware.h>
diff --git a/arch/arm/mach-sa1100/leds-lart.c b/arch/arm/mach-sa1100/leds-lart.c
index 18750149071..2d27d76cfc6 100644
--- a/arch/arm/mach-sa1100/leds-lart.c
+++ b/arch/arm/mach-sa1100/leds-lart.c
@@ -9,7 +9,6 @@
9 * time, but in that case the timer events will still dictate the 9 * time, but in that case the timer events will still dictate the
10 * pace of the LED. 10 * pace of the LED.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14 13
15#include <asm/hardware.h> 14#include <asm/hardware.h>
diff --git a/arch/arm/mach-sa1100/leds-simpad.c b/arch/arm/mach-sa1100/leds-simpad.c
index 6a27a2d3220..def090a8738 100644
--- a/arch/arm/mach-sa1100/leds-simpad.c
+++ b/arch/arm/mach-sa1100/leds-simpad.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Author: Juergen Messerer <juergen.messerer@siemens.ch> 4 * Author: Juergen Messerer <juergen.messerer@siemens.ch>
5 */ 5 */
6#include <linux/config.h>
7#include <linux/init.h> 6#include <linux/init.h>
8 7
9#include <asm/hardware.h> 8#include <asm/hardware.h>
diff --git a/arch/arm/mach-sa1100/pleb.c b/arch/arm/mach-sa1100/pleb.c
index 0709ebab531..c7bf7e0038f 100644
--- a/arch/arm/mach-sa1100/pleb.c
+++ b/arch/arm/mach-sa1100/pleb.c
@@ -7,6 +7,7 @@
7#include <linux/tty.h> 7#include <linux/tty.h>
8#include <linux/ioport.h> 8#include <linux/ioport.h>
9#include <linux/platform_device.h> 9#include <linux/platform_device.h>
10#include <linux/irq.h>
10 11
11#include <linux/mtd/partitions.h> 12#include <linux/mtd/partitions.h>
12 13
diff --git a/arch/arm/mach-sa1100/shannon.c b/arch/arm/mach-sa1100/shannon.c
index 5aafe0b5699..8acab7b1e4c 100644
--- a/arch/arm/mach-sa1100/shannon.c
+++ b/arch/arm/mach-sa1100/shannon.c
@@ -2,7 +2,6 @@
2 * linux/arch/arm/mach-sa1100/shannon.c 2 * linux/arch/arm/mach-sa1100/shannon.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/init.h> 5#include <linux/init.h>
7#include <linux/device.h> 6#include <linux/device.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index d2c23b2c34d..a9ae1b581aa 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -2,7 +2,6 @@
2 * linux/arch/arm/mach-sa1100/simpad.c 2 * linux/arch/arm/mach-sa1100/simpad.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/init.h> 6#include <linux/init.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
diff --git a/arch/arm/mach-sa1100/time.c b/arch/arm/mach-sa1100/time.c
index e4b435e634e..49ae716e16c 100644
--- a/arch/arm/mach-sa1100/time.c
+++ b/arch/arm/mach-sa1100/time.c
@@ -11,6 +11,7 @@
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/errno.h> 12#include <linux/errno.h>
13#include <linux/interrupt.h> 13#include <linux/interrupt.h>
14#include <linux/irq.h>
14#include <linux/timex.h> 15#include <linux/timex.h>
15#include <linux/signal.h> 16#include <linux/signal.h>
16 17
@@ -110,7 +111,7 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
110 111
111static struct irqaction sa1100_timer_irq = { 112static struct irqaction sa1100_timer_irq = {
112 .name = "SA11xx Timer Tick", 113 .name = "SA11xx Timer Tick",
113 .flags = SA_INTERRUPT | SA_TIMER, 114 .flags = IRQF_DISABLED | IRQF_TIMER,
114 .handler = sa1100_timer_interrupt, 115 .handler = sa1100_timer_interrupt,
115}; 116};
116 117
diff --git a/arch/arm/mach-shark/core.c b/arch/arm/mach-shark/core.c
index 877600e212d..1095df34fec 100644
--- a/arch/arm/mach-shark/core.c
+++ b/arch/arm/mach-shark/core.c
@@ -6,6 +6,7 @@
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/interrupt.h> 8#include <linux/interrupt.h>
9#include <linux/irq.h>
9#include <linux/sched.h> 10#include <linux/sched.h>
10#include <linux/serial_8250.h> 11#include <linux/serial_8250.h>
11 12
@@ -89,7 +90,7 @@ shark_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
89 90
90static struct irqaction shark_timer_irq = { 91static struct irqaction shark_timer_irq = {
91 .name = "Shark Timer Tick", 92 .name = "Shark Timer Tick",
92 .flags = SA_INTERRUPT | SA_TIMER, 93 .flags = IRQF_DISABLED | IRQF_TIMER,
93 .handler = shark_timer_interrupt, 94 .handler = shark_timer_interrupt,
94}; 95};
95 96
diff --git a/arch/arm/mach-shark/dma.c b/arch/arm/mach-shark/dma.c
index 835989a0291..6774b8d5d13 100644
--- a/arch/arm/mach-shark/dma.c
+++ b/arch/arm/mach-shark/dma.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1998 Phil Blundell 8 * Copyright (C) 1998 Phil Blundell
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13 12
14#include <asm/dma.h> 13#include <asm/dma.h>
diff --git a/arch/arm/mach-shark/leds.c b/arch/arm/mach-shark/leds.c
index 7bdeb70a0c1..7cd86d357a3 100644
--- a/arch/arm/mach-shark/leds.c
+++ b/arch/arm/mach-shark/leds.c
@@ -15,7 +15,6 @@
15 * 15 *
16 * Changelog: 16 * Changelog:
17 */ 17 */
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index cebd48a3dae..a432539cc1b 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -18,7 +18,6 @@
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21#include <linux/config.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/device.h> 22#include <linux/device.h>
24#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
@@ -870,7 +869,7 @@ static irqreturn_t versatile_timer_interrupt(int irq, void *dev_id, struct pt_re
870 869
871static struct irqaction versatile_timer_irq = { 870static struct irqaction versatile_timer_irq = {
872 .name = "Versatile Timer Tick", 871 .name = "Versatile Timer Tick",
873 .flags = SA_INTERRUPT | SA_TIMER, 872 .flags = IRQF_DISABLED | IRQF_TIMER,
874 .handler = versatile_timer_interrupt, 873 .handler = versatile_timer_interrupt,
875}; 874};
876 875
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index 722fbabc9cf..41b370090b6 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -14,7 +14,6 @@
14 * 14/04/2005 Initial version, colin.king@philips.com 14 * 14/04/2005 Initial version, colin.king@philips.com
15 * 15 *
16 */ 16 */
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/pci.h> 18#include <linux/pci.h>
20#include <linux/ptrace.h> 19#include <linux/ptrace.h>
diff --git a/arch/arm/mach-versatile/versatile_ab.c b/arch/arm/mach-versatile/versatile_ab.c
index 1eb59678207..b257ef78ef4 100644
--- a/arch/arm/mach-versatile/versatile_ab.c
+++ b/arch/arm/mach-versatile/versatile_ab.c
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/device.h> 23#include <linux/device.h>
25#include <linux/sysdev.h> 24#include <linux/sysdev.h>
diff --git a/arch/arm/mach-versatile/versatile_pb.c b/arch/arm/mach-versatile/versatile_pb.c
index f17ab4fb548..503725b166f 100644
--- a/arch/arm/mach-versatile/versatile_pb.c
+++ b/arch/arm/mach-versatile/versatile_pb.c
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/device.h> 23#include <linux/device.h>
25#include <linux/sysdev.h> 24#include <linux/sysdev.h>
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index c4bca753165..5f80f184cd3 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -121,8 +121,8 @@ config CPU_ARM925T
121# ARM926T 121# ARM926T
122config CPU_ARM926T 122config CPU_ARM926T
123 bool "Support ARM926T processor" 123 bool "Support ARM926T processor"
124 depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 124 depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || MACH_REALVIEW_EB || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261
125 default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 125 default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX || ARCH_PNX4008 || ARCH_NETX || CPU_S3C2412 || ARCH_AT91SAM9260 || ARCH_AT91SAM9261
126 select CPU_32v5 126 select CPU_32v5
127 select CPU_ABRT_EV5TJ 127 select CPU_ABRT_EV5TJ
128 select CPU_CACHE_VIVT 128 select CPU_CACHE_VIVT
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index 705c98921c3..e0d21bbbe7d 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -11,7 +11,6 @@
11 * it under the terms of the GNU General Public License version 2 as 11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/compiler.h> 14#include <linux/compiler.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/errno.h> 16#include <linux/errno.h>
diff --git a/arch/arm/mm/cache-v4wb.S b/arch/arm/mm/cache-v4wb.S
index 54e3c5bb518..2ebc1b3bf85 100644
--- a/arch/arm/mm/cache-v4wb.S
+++ b/arch/arm/mm/cache-v4wb.S
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <asm/memory.h> 12#include <asm/memory.h>
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 4a884baf3b9..c5e0622c776 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -8,7 +8,6 @@
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/signal.h> 12#include <linux/signal.h>
14#include <linux/ptrace.h> 13#include <linux/ptrace.h>
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 989fd681c82..fe3f7f62500 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/ptrace.h> 12#include <linux/ptrace.h>
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 7691cfdba56..7eac87f0518 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -27,7 +27,16 @@
27 27
28#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
29#include <asm/io.h> 29#include <asm/io.h>
30#include <asm/mmu_context.h>
31#include <asm/pgalloc.h>
30#include <asm/tlbflush.h> 32#include <asm/tlbflush.h>
33#include <asm/sizes.h>
34
35/*
36 * Used by ioremap() and iounmap() code to mark (super)section-mapped
37 * I/O regions in vm_struct->flags field.
38 */
39#define VM_ARM_SECTION_MAPPING 0x80000000
31 40
32static inline void 41static inline void
33remap_area_pte(pte_t * pte, unsigned long address, unsigned long size, 42remap_area_pte(pte_t * pte, unsigned long address, unsigned long size,
@@ -113,10 +122,168 @@ remap_area_pages(unsigned long start, unsigned long pfn,
113 dir++; 122 dir++;
114 } while (address && (address < end)); 123 } while (address && (address < end));
115 124
116 flush_cache_vmap(start, end);
117 return err; 125 return err;
118} 126}
119 127
128
129void __check_kvm_seq(struct mm_struct *mm)
130{
131 unsigned int seq;
132
133 do {
134 seq = init_mm.context.kvm_seq;
135 memcpy(pgd_offset(mm, VMALLOC_START),
136 pgd_offset_k(VMALLOC_START),
137 sizeof(pgd_t) * (pgd_index(VMALLOC_END) -
138 pgd_index(VMALLOC_START)));
139 mm->context.kvm_seq = seq;
140 } while (seq != init_mm.context.kvm_seq);
141}
142
143#ifndef CONFIG_SMP
144/*
145 * Section support is unsafe on SMP - If you iounmap and ioremap a region,
146 * the other CPUs will not see this change until their next context switch.
147 * Meanwhile, (eg) if an interrupt comes in on one of those other CPUs
148 * which requires the new ioremap'd region to be referenced, the CPU will
149 * reference the _old_ region.
150 *
151 * Note that get_vm_area() allocates a guard 4K page, so we need to mask
152 * the size back to 1MB aligned or we will overflow in the loop below.
153 */
154static void unmap_area_sections(unsigned long virt, unsigned long size)
155{
156 unsigned long addr = virt, end = virt + (size & ~SZ_1M);
157 pgd_t *pgd;
158
159 flush_cache_vunmap(addr, end);
160 pgd = pgd_offset_k(addr);
161 do {
162 pmd_t pmd, *pmdp = pmd_offset(pgd, addr);
163
164 pmd = *pmdp;
165 if (!pmd_none(pmd)) {
166 /*
167 * Clear the PMD from the page table, and
168 * increment the kvm sequence so others
169 * notice this change.
170 *
171 * Note: this is still racy on SMP machines.
172 */
173 pmd_clear(pmdp);
174 init_mm.context.kvm_seq++;
175
176 /*
177 * Free the page table, if there was one.
178 */
179 if ((pmd_val(pmd) & PMD_TYPE_MASK) == PMD_TYPE_TABLE)
180 pte_free_kernel(pmd_page_kernel(pmd));
181 }
182
183 addr += PGDIR_SIZE;
184 pgd++;
185 } while (addr < end);
186
187 /*
188 * Ensure that the active_mm is up to date - we want to
189 * catch any use-after-iounmap cases.
190 */
191 if (current->active_mm->context.kvm_seq != init_mm.context.kvm_seq)
192 __check_kvm_seq(current->active_mm);
193
194 flush_tlb_kernel_range(virt, end);
195}
196
197static int
198remap_area_sections(unsigned long virt, unsigned long pfn,
199 unsigned long size, unsigned long flags)
200{
201 unsigned long prot, addr = virt, end = virt + size;
202 pgd_t *pgd;
203
204 /*
205 * Remove and free any PTE-based mapping, and
206 * sync the current kernel mapping.
207 */
208 unmap_area_sections(virt, size);
209
210 prot = PMD_TYPE_SECT | PMD_SECT_AP_WRITE | PMD_DOMAIN(DOMAIN_IO) |
211 (flags & (L_PTE_CACHEABLE | L_PTE_BUFFERABLE));
212
213 /*
214 * ARMv6 and above need XN set to prevent speculative prefetches
215 * hitting IO.
216 */
217 if (cpu_architecture() >= CPU_ARCH_ARMv6)
218 prot |= PMD_SECT_XN;
219
220 pgd = pgd_offset_k(addr);
221 do {
222 pmd_t *pmd = pmd_offset(pgd, addr);
223
224 pmd[0] = __pmd(__pfn_to_phys(pfn) | prot);
225 pfn += SZ_1M >> PAGE_SHIFT;
226 pmd[1] = __pmd(__pfn_to_phys(pfn) | prot);
227 pfn += SZ_1M >> PAGE_SHIFT;
228 flush_pmd_entry(pmd);
229
230 addr += PGDIR_SIZE;
231 pgd++;
232 } while (addr < end);
233
234 return 0;
235}
236
237static int
238remap_area_supersections(unsigned long virt, unsigned long pfn,
239 unsigned long size, unsigned long flags)
240{
241 unsigned long prot, addr = virt, end = virt + size;
242 pgd_t *pgd;
243
244 /*
245 * Remove and free any PTE-based mapping, and
246 * sync the current kernel mapping.
247 */
248 unmap_area_sections(virt, size);
249
250 prot = PMD_TYPE_SECT | PMD_SECT_SUPER | PMD_SECT_AP_WRITE |
251 PMD_DOMAIN(DOMAIN_IO) |
252 (flags & (L_PTE_CACHEABLE | L_PTE_BUFFERABLE));
253
254 /*
255 * ARMv6 and above need XN set to prevent speculative prefetches
256 * hitting IO.
257 */
258 if (cpu_architecture() >= CPU_ARCH_ARMv6)
259 prot |= PMD_SECT_XN;
260
261 pgd = pgd_offset_k(virt);
262 do {
263 unsigned long super_pmd_val, i;
264
265 super_pmd_val = __pfn_to_phys(pfn) | prot;
266 super_pmd_val |= ((pfn >> (32 - PAGE_SHIFT)) & 0xf) << 20;
267
268 for (i = 0; i < 8; i++) {
269 pmd_t *pmd = pmd_offset(pgd, addr);
270
271 pmd[0] = __pmd(super_pmd_val);
272 pmd[1] = __pmd(super_pmd_val);
273 flush_pmd_entry(pmd);
274
275 addr += PGDIR_SIZE;
276 pgd++;
277 }
278
279 pfn += SUPERSECTION_SIZE >> PAGE_SHIFT;
280 } while (addr < end);
281
282 return 0;
283}
284#endif
285
286
120/* 287/*
121 * Remap an arbitrary physical address space into the kernel virtual 288 * Remap an arbitrary physical address space into the kernel virtual
122 * address space. Needed when the kernel wants to access high addresses 289 * address space. Needed when the kernel wants to access high addresses
@@ -133,18 +300,42 @@ void __iomem *
133__ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size, 300__ioremap_pfn(unsigned long pfn, unsigned long offset, size_t size,
134 unsigned long flags) 301 unsigned long flags)
135{ 302{
303 int err;
136 unsigned long addr; 304 unsigned long addr;
137 struct vm_struct * area; 305 struct vm_struct * area;
306 unsigned int cr = get_cr();
307
308 /*
309 * High mappings must be supersection aligned
310 */
311 if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK))
312 return NULL;
138 313
139 area = get_vm_area(size, VM_IOREMAP); 314 area = get_vm_area(size, VM_IOREMAP);
140 if (!area) 315 if (!area)
141 return NULL; 316 return NULL;
142 addr = (unsigned long)area->addr; 317 addr = (unsigned long)area->addr;
143 if (remap_area_pages(addr, pfn, size, flags)) { 318
319#ifndef CONFIG_SMP
320 if ((((cpu_architecture() >= CPU_ARCH_ARMv6) && (cr & CR_XP)) ||
321 cpu_is_xsc3()) &&
322 !((__pfn_to_phys(pfn) | size | addr) & ~SUPERSECTION_MASK)) {
323 area->flags |= VM_ARM_SECTION_MAPPING;
324 err = remap_area_supersections(addr, pfn, size, flags);
325 } else if (!((__pfn_to_phys(pfn) | size | addr) & ~PMD_MASK)) {
326 area->flags |= VM_ARM_SECTION_MAPPING;
327 err = remap_area_sections(addr, pfn, size, flags);
328 } else
329#endif
330 err = remap_area_pages(addr, pfn, size, flags);
331
332 if (err) {
144 vunmap((void *)addr); 333 vunmap((void *)addr);
145 return NULL; 334 return NULL;
146 } 335 }
147 return (void __iomem *) (offset + (char *)addr); 336
337 flush_cache_vmap(addr, addr + size);
338 return (void __iomem *) (offset + addr);
148} 339}
149EXPORT_SYMBOL(__ioremap_pfn); 340EXPORT_SYMBOL(__ioremap_pfn);
150 341
@@ -173,6 +364,34 @@ EXPORT_SYMBOL(__ioremap);
173 364
174void __iounmap(void __iomem *addr) 365void __iounmap(void __iomem *addr)
175{ 366{
176 vunmap((void *)(PAGE_MASK & (unsigned long)addr)); 367 struct vm_struct **p, *tmp;
368 unsigned int section_mapping = 0;
369
370 addr = (void __iomem *)(PAGE_MASK & (unsigned long)addr);
371
372 /*
373 * If this is a section based mapping we need to handle it
374 * specially as the VM subysystem does not know how to handle
375 * such a beast. We need the lock here b/c we need to clear
376 * all the mappings before the area can be reclaimed
377 * by someone else.
378 */
379 write_lock(&vmlist_lock);
380 for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
381 if((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
382 if (tmp->flags & VM_ARM_SECTION_MAPPING) {
383 *p = tmp->next;
384 unmap_area_sections((unsigned long)tmp->addr,
385 tmp->size);
386 kfree(tmp);
387 section_mapping = 1;
388 }
389 break;
390 }
391 }
392 write_unlock(&vmlist_lock);
393
394 if (!section_mapping)
395 vunmap(addr);
177} 396}
178EXPORT_SYMBOL(__iounmap); 397EXPORT_SYMBOL(__iounmap);
diff --git a/arch/arm/mm/mm-armv.c b/arch/arm/mm/mm-armv.c
index 931be179812..38769f5862b 100644
--- a/arch/arm/mm/mm-armv.c
+++ b/arch/arm/mm/mm-armv.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * Page table sludge for ARM v3 and v4 processor architectures. 10 * Page table sludge for ARM v3 and v4 processor architectures.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
15#include <linux/init.h> 14#include <linux/init.h>
@@ -303,16 +302,16 @@ static struct mem_types mem_types[] __initdata = {
303 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | 302 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
304 L_PTE_WRITE, 303 L_PTE_WRITE,
305 .prot_l1 = PMD_TYPE_TABLE, 304 .prot_l1 = PMD_TYPE_TABLE,
306 .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | 305 .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED |
307 PMD_SECT_AP_WRITE, 306 PMD_SECT_AP_WRITE,
308 .domain = DOMAIN_IO, 307 .domain = DOMAIN_IO,
309 }, 308 },
310 [MT_CACHECLEAN] = { 309 [MT_CACHECLEAN] = {
311 .prot_sect = PMD_TYPE_SECT, 310 .prot_sect = PMD_TYPE_SECT | PMD_BIT4,
312 .domain = DOMAIN_KERNEL, 311 .domain = DOMAIN_KERNEL,
313 }, 312 },
314 [MT_MINICLEAN] = { 313 [MT_MINICLEAN] = {
315 .prot_sect = PMD_TYPE_SECT | PMD_SECT_MINICACHE, 314 .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_MINICACHE,
316 .domain = DOMAIN_KERNEL, 315 .domain = DOMAIN_KERNEL,
317 }, 316 },
318 [MT_LOW_VECTORS] = { 317 [MT_LOW_VECTORS] = {
@@ -328,25 +327,25 @@ static struct mem_types mem_types[] __initdata = {
328 .domain = DOMAIN_USER, 327 .domain = DOMAIN_USER,
329 }, 328 },
330 [MT_MEMORY] = { 329 [MT_MEMORY] = {
331 .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, 330 .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_AP_WRITE,
332 .domain = DOMAIN_KERNEL, 331 .domain = DOMAIN_KERNEL,
333 }, 332 },
334 [MT_ROM] = { 333 [MT_ROM] = {
335 .prot_sect = PMD_TYPE_SECT, 334 .prot_sect = PMD_TYPE_SECT | PMD_BIT4,
336 .domain = DOMAIN_KERNEL, 335 .domain = DOMAIN_KERNEL,
337 }, 336 },
338 [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */ 337 [MT_IXP2000_DEVICE] = { /* IXP2400 requires XCB=101 for on-chip I/O */
339 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY | 338 .prot_pte = L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_DIRTY |
340 L_PTE_WRITE, 339 L_PTE_WRITE,
341 .prot_l1 = PMD_TYPE_TABLE, 340 .prot_l1 = PMD_TYPE_TABLE,
342 .prot_sect = PMD_TYPE_SECT | PMD_SECT_UNCACHED | 341 .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_UNCACHED |
343 PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE | 342 PMD_SECT_AP_WRITE | PMD_SECT_BUFFERABLE |
344 PMD_SECT_TEX(1), 343 PMD_SECT_TEX(1),
345 .domain = DOMAIN_IO, 344 .domain = DOMAIN_IO,
346 }, 345 },
347 [MT_NONSHARED_DEVICE] = { 346 [MT_NONSHARED_DEVICE] = {
348 .prot_l1 = PMD_TYPE_TABLE, 347 .prot_l1 = PMD_TYPE_TABLE,
349 .prot_sect = PMD_TYPE_SECT | PMD_SECT_NONSHARED_DEV | 348 .prot_sect = PMD_TYPE_SECT | PMD_BIT4 | PMD_SECT_NONSHARED_DEV |
350 PMD_SECT_AP_WRITE, 349 PMD_SECT_AP_WRITE,
351 .domain = DOMAIN_IO, 350 .domain = DOMAIN_IO,
352 } 351 }
@@ -376,14 +375,21 @@ void __init build_mem_type_table(void)
376 ecc_mask = 0; 375 ecc_mask = 0;
377 } 376 }
378 377
379 if (cpu_arch <= CPU_ARCH_ARMv5TEJ && !cpu_is_xscale()) { 378 /*
380 for (i = 0; i < ARRAY_SIZE(mem_types); i++) { 379 * Xscale must not have PMD bit 4 set for section mappings.
380 */
381 if (cpu_is_xscale())
382 for (i = 0; i < ARRAY_SIZE(mem_types); i++)
383 mem_types[i].prot_sect &= ~PMD_BIT4;
384
385 /*
386 * ARMv5 and lower, excluding Xscale, bit 4 must be set for
387 * page tables.
388 */
389 if (cpu_arch < CPU_ARCH_ARMv6 && !cpu_is_xscale())
390 for (i = 0; i < ARRAY_SIZE(mem_types); i++)
381 if (mem_types[i].prot_l1) 391 if (mem_types[i].prot_l1)
382 mem_types[i].prot_l1 |= PMD_BIT4; 392 mem_types[i].prot_l1 |= PMD_BIT4;
383 if (mem_types[i].prot_sect)
384 mem_types[i].prot_sect |= PMD_BIT4;
385 }
386 }
387 393
388 cp = &cache_policies[cachepolicy]; 394 cp = &cache_policies[cachepolicy];
389 kern_pgprot = user_pgprot = cp->pte; 395 kern_pgprot = user_pgprot = cp->pte;
@@ -407,8 +413,8 @@ void __init build_mem_type_table(void)
407 * bit 4 becomes XN which we must clear for the 413 * bit 4 becomes XN which we must clear for the
408 * kernel memory mapping. 414 * kernel memory mapping.
409 */ 415 */
410 mem_types[MT_MEMORY].prot_sect &= ~PMD_BIT4; 416 mem_types[MT_MEMORY].prot_sect &= ~PMD_SECT_XN;
411 mem_types[MT_ROM].prot_sect &= ~PMD_BIT4; 417 mem_types[MT_ROM].prot_sect &= ~PMD_SECT_XN;
412 418
413 /* 419 /*
414 * Mark cache clean areas and XIP ROM read only 420 * Mark cache clean areas and XIP ROM read only
diff --git a/arch/arm/mm/mmap.c b/arch/arm/mm/mmap.c
index 3de7f84b53c..29e54807c5b 100644
--- a/arch/arm/mm/mmap.c
+++ b/arch/arm/mm/mmap.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * linux/arch/arm/mm/mmap.c 2 * linux/arch/arm/mm/mmap.c
3 */ 3 */
4#include <linux/config.h>
5#include <linux/fs.h> 4#include <linux/fs.h>
6#include <linux/mm.h> 5#include <linux/mm.h>
7#include <linux/mman.h> 6#include <linux/mman.h>
diff --git a/arch/arm/mm/proc-arm1020.S b/arch/arm/mm/proc-arm1020.S
index b9abbafca81..700297ae4a5 100644
--- a/arch/arm/mm/proc-arm1020.S
+++ b/arch/arm/mm/proc-arm1020.S
@@ -26,7 +26,6 @@
26 * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt 26 * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt
27 */ 27 */
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <asm/assembler.h> 30#include <asm/assembler.h>
32#include <asm/asm-offsets.h> 31#include <asm/asm-offsets.h>
@@ -440,11 +439,12 @@ __arm1020_setup:
440#ifdef CONFIG_MMU 439#ifdef CONFIG_MMU
441 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 440 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
442#endif 441#endif
442
443 adr r5, arm1020_crval
444 ldmia r5, {r5, r6}
443 mrc p15, 0, r0, c1, c0 @ get control register v4 445 mrc p15, 0, r0, c1, c0 @ get control register v4
444 ldr r5, arm1020_cr1_clear
445 bic r0, r0, r5 446 bic r0, r0, r5
446 ldr r5, arm1020_cr1_set 447 orr r0, r0, r6
447 orr r0, r0, r5
448#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN 448#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
449 orr r0, r0, #0x4000 @ .R.. .... .... .... 449 orr r0, r0, #0x4000 @ .R.. .... .... ....
450#endif 450#endif
@@ -456,12 +456,9 @@ __arm1020_setup:
456 * .RVI ZFRS BLDP WCAM 456 * .RVI ZFRS BLDP WCAM
457 * .011 1001 ..11 0101 457 * .011 1001 ..11 0101
458 */ 458 */
459 .type arm1020_cr1_clear, #object 459 .type arm1020_crval, #object
460 .type arm1020_cr1_set, #object 460arm1020_crval:
461arm1020_cr1_clear: 461 crval clear=0x0000593f, mmuset=0x00003935, ucset=0x00001930
462 .word 0x593f
463arm1020_cr1_set:
464 .word 0x3935
465 462
466 __INITDATA 463 __INITDATA
467 464
@@ -527,6 +524,9 @@ __arm1020_proc_info:
527 .long PMD_TYPE_SECT | \ 524 .long PMD_TYPE_SECT | \
528 PMD_SECT_AP_WRITE | \ 525 PMD_SECT_AP_WRITE | \
529 PMD_SECT_AP_READ 526 PMD_SECT_AP_READ
527 .long PMD_TYPE_SECT | \
528 PMD_SECT_AP_WRITE | \
529 PMD_SECT_AP_READ
530 b __arm1020_setup 530 b __arm1020_setup
531 .long cpu_arch_name 531 .long cpu_arch_name
532 .long cpu_elf_name 532 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm1020e.S b/arch/arm/mm/proc-arm1020e.S
index bcd5ee022e0..0c33a5ed5a6 100644
--- a/arch/arm/mm/proc-arm1020e.S
+++ b/arch/arm/mm/proc-arm1020e.S
@@ -26,7 +26,6 @@
26 * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt 26 * CONFIG_CPU_ARM1020_CPU_IDLE -> nohlt
27 */ 27 */
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <asm/assembler.h> 30#include <asm/assembler.h>
32#include <asm/asm-offsets.h> 31#include <asm/asm-offsets.h>
@@ -422,11 +421,11 @@ __arm1020e_setup:
422#ifdef CONFIG_MMU 421#ifdef CONFIG_MMU
423 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 422 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
424#endif 423#endif
424 adr r5, arm1020e_crval
425 ldmia r5, {r5, r6}
425 mrc p15, 0, r0, c1, c0 @ get control register v4 426 mrc p15, 0, r0, c1, c0 @ get control register v4
426 ldr r5, arm1020e_cr1_clear
427 bic r0, r0, r5 427 bic r0, r0, r5
428 ldr r5, arm1020e_cr1_set 428 orr r0, r0, r6
429 orr r0, r0, r5
430#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN 429#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
431 orr r0, r0, #0x4000 @ .R.. .... .... .... 430 orr r0, r0, #0x4000 @ .R.. .... .... ....
432#endif 431#endif
@@ -438,12 +437,9 @@ __arm1020e_setup:
438 * .RVI ZFRS BLDP WCAM 437 * .RVI ZFRS BLDP WCAM
439 * .011 1001 ..11 0101 438 * .011 1001 ..11 0101
440 */ 439 */
441 .type arm1020e_cr1_clear, #object 440 .type arm1020e_crval, #object
442 .type arm1020e_cr1_set, #object 441arm1020e_crval:
443arm1020e_cr1_clear: 442 crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930
444 .word 0x5f3f
445arm1020e_cr1_set:
446 .word 0x3935
447 443
448 __INITDATA 444 __INITDATA
449 445
@@ -477,25 +473,7 @@ cpu_elf_name:
477 473
478 .type cpu_arm1020e_name, #object 474 .type cpu_arm1020e_name, #object
479cpu_arm1020e_name: 475cpu_arm1020e_name:
480 .ascii "ARM1020E" 476 .asciz "ARM1020E"
481#ifndef CONFIG_CPU_ICACHE_DISABLE
482 .ascii "i"
483#endif
484#ifndef CONFIG_CPU_DCACHE_DISABLE
485 .ascii "d"
486#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
487 .ascii "(wt)"
488#else
489 .ascii "(wb)"
490#endif
491#endif
492#ifndef CONFIG_CPU_BPREDICT_DISABLE
493 .ascii "B"
494#endif
495#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
496 .ascii "RR"
497#endif
498 .ascii "\0"
499 .size cpu_arm1020e_name, . - cpu_arm1020e_name 477 .size cpu_arm1020e_name, . - cpu_arm1020e_name
500 478
501 .align 479 .align
@@ -510,6 +488,10 @@ __arm1020e_proc_info:
510 PMD_BIT4 | \ 488 PMD_BIT4 | \
511 PMD_SECT_AP_WRITE | \ 489 PMD_SECT_AP_WRITE | \
512 PMD_SECT_AP_READ 490 PMD_SECT_AP_READ
491 .long PMD_TYPE_SECT | \
492 PMD_BIT4 | \
493 PMD_SECT_AP_WRITE | \
494 PMD_SECT_AP_READ
513 b __arm1020e_setup 495 b __arm1020e_setup
514 .long cpu_arch_name 496 .long cpu_arch_name
515 .long cpu_elf_name 497 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm1022.S b/arch/arm/mm/proc-arm1022.S
index b0ccff4fadd..566a5565307 100644
--- a/arch/arm/mm/proc-arm1022.S
+++ b/arch/arm/mm/proc-arm1022.S
@@ -15,7 +15,6 @@
15 * functions on the ARM1022E. 15 * functions on the ARM1022E.
16 */ 16 */
17#include <linux/linkage.h> 17#include <linux/linkage.h>
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <asm/assembler.h> 19#include <asm/assembler.h>
21#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
@@ -404,11 +403,11 @@ __arm1022_setup:
404#ifdef CONFIG_MMU 403#ifdef CONFIG_MMU
405 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 404 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
406#endif 405#endif
406 adr r5, arm1022_crval
407 ldmia r5, {r5, r6}
407 mrc p15, 0, r0, c1, c0 @ get control register v4 408 mrc p15, 0, r0, c1, c0 @ get control register v4
408 ldr r5, arm1022_cr1_clear
409 bic r0, r0, r5 409 bic r0, r0, r5
410 ldr r5, arm1022_cr1_set 410 orr r0, r0, r6
411 orr r0, r0, r5
412#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN 411#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
413 orr r0, r0, #0x4000 @ .R.............. 412 orr r0, r0, #0x4000 @ .R..............
414#endif 413#endif
@@ -421,12 +420,9 @@ __arm1022_setup:
421 * .011 1001 ..11 0101 420 * .011 1001 ..11 0101
422 * 421 *
423 */ 422 */
424 .type arm1022_cr1_clear, #object 423 .type arm1022_crval, #object
425 .type arm1022_cr1_set, #object 424arm1022_crval:
426arm1022_cr1_clear: 425 crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001930
427 .word 0x7f3f
428arm1022_cr1_set:
429 .word 0x3935
430 426
431 __INITDATA 427 __INITDATA
432 428
@@ -460,25 +456,7 @@ cpu_elf_name:
460 456
461 .type cpu_arm1022_name, #object 457 .type cpu_arm1022_name, #object
462cpu_arm1022_name: 458cpu_arm1022_name:
463 .ascii "arm1022" 459 .asciz "ARM1022"
464#ifndef CONFIG_CPU_ICACHE_DISABLE
465 .ascii "i"
466#endif
467#ifndef CONFIG_CPU_DCACHE_DISABLE
468 .ascii "d"
469#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
470 .ascii "(wt)"
471#else
472 .ascii "(wb)"
473#endif
474#endif
475#ifndef CONFIG_CPU_BPREDICT_DISABLE
476 .ascii "B"
477#endif
478#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
479 .ascii "RR"
480#endif
481 .ascii "\0"
482 .size cpu_arm1022_name, . - cpu_arm1022_name 460 .size cpu_arm1022_name, . - cpu_arm1022_name
483 461
484 .align 462 .align
@@ -493,6 +471,10 @@ __arm1022_proc_info:
493 PMD_BIT4 | \ 471 PMD_BIT4 | \
494 PMD_SECT_AP_WRITE | \ 472 PMD_SECT_AP_WRITE | \
495 PMD_SECT_AP_READ 473 PMD_SECT_AP_READ
474 .long PMD_TYPE_SECT | \
475 PMD_BIT4 | \
476 PMD_SECT_AP_WRITE | \
477 PMD_SECT_AP_READ
496 b __arm1022_setup 478 b __arm1022_setup
497 .long cpu_arch_name 479 .long cpu_arch_name
498 .long cpu_elf_name 480 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm1026.S b/arch/arm/mm/proc-arm1026.S
index abe850c9a64..6ea76321d0d 100644
--- a/arch/arm/mm/proc-arm1026.S
+++ b/arch/arm/mm/proc-arm1026.S
@@ -15,7 +15,6 @@
15 * functions on the ARM1026EJ-S. 15 * functions on the ARM1026EJ-S.
16 */ 16 */
17#include <linux/linkage.h> 17#include <linux/linkage.h>
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <asm/assembler.h> 19#include <asm/assembler.h>
21#include <asm/asm-offsets.h> 20#include <asm/asm-offsets.h>
@@ -399,11 +398,11 @@ __arm1026_setup:
399 mov r0, #4 @ explicitly disable writeback 398 mov r0, #4 @ explicitly disable writeback
400 mcr p15, 7, r0, c15, c0, 0 399 mcr p15, 7, r0, c15, c0, 0
401#endif 400#endif
401 adr r5, arm1026_crval
402 ldmia r5, {r5, r6}
402 mrc p15, 0, r0, c1, c0 @ get control register v4 403 mrc p15, 0, r0, c1, c0 @ get control register v4
403 ldr r5, arm1026_cr1_clear
404 bic r0, r0, r5 404 bic r0, r0, r5
405 ldr r5, arm1026_cr1_set 405 orr r0, r0, r6
406 orr r0, r0, r5
407#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN 406#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
408 orr r0, r0, #0x4000 @ .R.. .... .... .... 407 orr r0, r0, #0x4000 @ .R.. .... .... ....
409#endif 408#endif
@@ -416,12 +415,9 @@ __arm1026_setup:
416 * .011 1001 ..11 0101 415 * .011 1001 ..11 0101
417 * 416 *
418 */ 417 */
419 .type arm1026_cr1_clear, #object 418 .type arm1026_crval, #object
420 .type arm1026_cr1_set, #object 419arm1026_crval:
421arm1026_cr1_clear: 420 crval clear=0x00007f3f, mmuset=0x00003935, ucset=0x00001934
422 .word 0x7f3f
423arm1026_cr1_set:
424 .word 0x3935
425 421
426 __INITDATA 422 __INITDATA
427 423
@@ -456,25 +452,7 @@ cpu_elf_name:
456 452
457 .type cpu_arm1026_name, #object 453 .type cpu_arm1026_name, #object
458cpu_arm1026_name: 454cpu_arm1026_name:
459 .ascii "ARM1026EJ-S" 455 .asciz "ARM1026EJ-S"
460#ifndef CONFIG_CPU_ICACHE_DISABLE
461 .ascii "i"
462#endif
463#ifndef CONFIG_CPU_DCACHE_DISABLE
464 .ascii "d"
465#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
466 .ascii "(wt)"
467#else
468 .ascii "(wb)"
469#endif
470#endif
471#ifndef CONFIG_CPU_BPREDICT_DISABLE
472 .ascii "B"
473#endif
474#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
475 .ascii "RR"
476#endif
477 .ascii "\0"
478 .size cpu_arm1026_name, . - cpu_arm1026_name 456 .size cpu_arm1026_name, . - cpu_arm1026_name
479 457
480 .align 458 .align
@@ -489,6 +467,10 @@ __arm1026_proc_info:
489 PMD_BIT4 | \ 467 PMD_BIT4 | \
490 PMD_SECT_AP_WRITE | \ 468 PMD_SECT_AP_WRITE | \
491 PMD_SECT_AP_READ 469 PMD_SECT_AP_READ
470 .long PMD_TYPE_SECT | \
471 PMD_BIT4 | \
472 PMD_SECT_AP_WRITE | \
473 PMD_SECT_AP_READ
492 b __arm1026_setup 474 b __arm1026_setup
493 .long cpu_arch_name 475 .long cpu_arch_name
494 .long cpu_elf_name 476 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S
index 7a705edfa4b..0432e480688 100644
--- a/arch/arm/mm/proc-arm6_7.S
+++ b/arch/arm/mm/proc-arm6_7.S
@@ -355,6 +355,10 @@ __arm6_proc_info:
355 .long 0x41560600 355 .long 0x41560600
356 .long 0xfffffff0 356 .long 0xfffffff0
357 .long 0x00000c1e 357 .long 0x00000c1e
358 .long PMD_TYPE_SECT | \
359 PMD_BIT4 | \
360 PMD_SECT_AP_WRITE | \
361 PMD_SECT_AP_READ
358 b __arm6_setup 362 b __arm6_setup
359 .long cpu_arch_name 363 .long cpu_arch_name
360 .long cpu_elf_name 364 .long cpu_elf_name
@@ -371,6 +375,10 @@ __arm610_proc_info:
371 .long 0x41560610 375 .long 0x41560610
372 .long 0xfffffff0 376 .long 0xfffffff0
373 .long 0x00000c1e 377 .long 0x00000c1e
378 .long PMD_TYPE_SECT | \
379 PMD_BIT4 | \
380 PMD_SECT_AP_WRITE | \
381 PMD_SECT_AP_READ
374 b __arm6_setup 382 b __arm6_setup
375 .long cpu_arch_name 383 .long cpu_arch_name
376 .long cpu_elf_name 384 .long cpu_elf_name
@@ -387,6 +395,10 @@ __arm7_proc_info:
387 .long 0x41007000 395 .long 0x41007000
388 .long 0xffffff00 396 .long 0xffffff00
389 .long 0x00000c1e 397 .long 0x00000c1e
398 .long PMD_TYPE_SECT | \
399 PMD_BIT4 | \
400 PMD_SECT_AP_WRITE | \
401 PMD_SECT_AP_READ
390 b __arm7_setup 402 b __arm7_setup
391 .long cpu_arch_name 403 .long cpu_arch_name
392 .long cpu_elf_name 404 .long cpu_elf_name
@@ -408,6 +420,10 @@ __arm710_proc_info:
408 PMD_BIT4 | \ 420 PMD_BIT4 | \
409 PMD_SECT_AP_WRITE | \ 421 PMD_SECT_AP_WRITE | \
410 PMD_SECT_AP_READ 422 PMD_SECT_AP_READ
423 .long PMD_TYPE_SECT | \
424 PMD_BIT4 | \
425 PMD_SECT_AP_WRITE | \
426 PMD_SECT_AP_READ
411 b __arm7_setup 427 b __arm7_setup
412 .long cpu_arch_name 428 .long cpu_arch_name
413 .long cpu_elf_name 429 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm720.S b/arch/arm/mm/proc-arm720.S
index 86102467d37..c2f0705bfd4 100644
--- a/arch/arm/mm/proc-arm720.S
+++ b/arch/arm/mm/proc-arm720.S
@@ -41,6 +41,8 @@
41#include <asm/procinfo.h> 41#include <asm/procinfo.h>
42#include <asm/ptrace.h> 42#include <asm/ptrace.h>
43 43
44#include "proc-macros.S"
45
44/* 46/*
45 * Function: arm720_proc_init (void) 47 * Function: arm720_proc_init (void)
46 * : arm720_proc_fin (void) 48 * : arm720_proc_fin (void)
@@ -169,11 +171,11 @@ __arm720_setup:
169#ifdef CONFIG_MMU 171#ifdef CONFIG_MMU
170 mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4) 172 mcr p15, 0, r0, c8, c7, 0 @ flush TLB (v4)
171#endif 173#endif
174 adr r5, arm720_crval
175 ldmia r5, {r5, r6}
172 mrc p15, 0, r0, c1, c0 @ get control register 176 mrc p15, 0, r0, c1, c0 @ get control register
173 ldr r5, arm720_cr1_clear
174 bic r0, r0, r5 177 bic r0, r0, r5
175 ldr r5, arm720_cr1_set 178 orr r0, r0, r6
176 orr r0, r0, r5
177 mov pc, lr @ __ret (head.S) 179 mov pc, lr @ __ret (head.S)
178 .size __arm720_setup, . - __arm720_setup 180 .size __arm720_setup, . - __arm720_setup
179 181
@@ -183,12 +185,9 @@ __arm720_setup:
183 * ..1. 1001 ..11 1101 185 * ..1. 1001 ..11 1101
184 * 186 *
185 */ 187 */
186 .type arm720_cr1_clear, #object 188 .type arm720_crval, #object
187 .type arm720_cr1_set, #object 189arm720_crval:
188arm720_cr1_clear: 190 crval clear=0x00002f3f, mmuset=0x0000213d, ucset=0x00000130
189 .word 0x2f3f
190arm720_cr1_set:
191 .word 0x213d
192 191
193 __INITDATA 192 __INITDATA
194 193
@@ -246,6 +245,10 @@ __arm710_proc_info:
246 PMD_BIT4 | \ 245 PMD_BIT4 | \
247 PMD_SECT_AP_WRITE | \ 246 PMD_SECT_AP_WRITE | \
248 PMD_SECT_AP_READ 247 PMD_SECT_AP_READ
248 .long PMD_TYPE_SECT | \
249 PMD_BIT4 | \
250 PMD_SECT_AP_WRITE | \
251 PMD_SECT_AP_READ
249 b __arm710_setup @ cpu_flush 252 b __arm710_setup @ cpu_flush
250 .long cpu_arch_name @ arch_name 253 .long cpu_arch_name @ arch_name
251 .long cpu_elf_name @ elf_name 254 .long cpu_elf_name @ elf_name
@@ -267,6 +270,10 @@ __arm720_proc_info:
267 PMD_BIT4 | \ 270 PMD_BIT4 | \
268 PMD_SECT_AP_WRITE | \ 271 PMD_SECT_AP_WRITE | \
269 PMD_SECT_AP_READ 272 PMD_SECT_AP_READ
273 .long PMD_TYPE_SECT | \
274 PMD_BIT4 | \
275 PMD_SECT_AP_WRITE | \
276 PMD_SECT_AP_READ
270 b __arm720_setup @ cpu_flush 277 b __arm720_setup @ cpu_flush
271 .long cpu_arch_name @ arch_name 278 .long cpu_arch_name @ arch_name
272 .long cpu_elf_name @ elf_name 279 .long cpu_elf_name @ elf_name
diff --git a/arch/arm/mm/proc-arm920.S b/arch/arm/mm/proc-arm920.S
index 31dc839ba07..4adb46b3a4e 100644
--- a/arch/arm/mm/proc-arm920.S
+++ b/arch/arm/mm/proc-arm920.S
@@ -26,7 +26,6 @@
26 * CONFIG_CPU_ARM920_CPU_IDLE -> nohlt 26 * CONFIG_CPU_ARM920_CPU_IDLE -> nohlt
27 */ 27 */
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <asm/assembler.h> 30#include <asm/assembler.h>
32#include <asm/pgtable-hwdef.h> 31#include <asm/pgtable-hwdef.h>
@@ -391,11 +390,11 @@ __arm920_setup:
391#ifdef CONFIG_MMU 390#ifdef CONFIG_MMU
392 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 391 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
393#endif 392#endif
393 adr r5, arm920_crval
394 ldmia r5, {r5, r6}
394 mrc p15, 0, r0, c1, c0 @ get control register v4 395 mrc p15, 0, r0, c1, c0 @ get control register v4
395 ldr r5, arm920_cr1_clear
396 bic r0, r0, r5 396 bic r0, r0, r5
397 ldr r5, arm920_cr1_set 397 orr r0, r0, r6
398 orr r0, r0, r5
399 mov pc, lr 398 mov pc, lr
400 .size __arm920_setup, . - __arm920_setup 399 .size __arm920_setup, . - __arm920_setup
401 400
@@ -405,12 +404,9 @@ __arm920_setup:
405 * ..11 0001 ..11 0101 404 * ..11 0001 ..11 0101
406 * 405 *
407 */ 406 */
408 .type arm920_cr1_clear, #object 407 .type arm920_crval, #object
409 .type arm920_cr1_set, #object 408arm920_crval:
410arm920_cr1_clear: 409 crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130
411 .word 0x3f3f
412arm920_cr1_set:
413 .word 0x3135
414 410
415 __INITDATA 411 __INITDATA
416 412
@@ -444,19 +440,7 @@ cpu_elf_name:
444 440
445 .type cpu_arm920_name, #object 441 .type cpu_arm920_name, #object
446cpu_arm920_name: 442cpu_arm920_name:
447 .ascii "ARM920T" 443 .asciz "ARM920T"
448#ifndef CONFIG_CPU_ICACHE_DISABLE
449 .ascii "i"
450#endif
451#ifndef CONFIG_CPU_DCACHE_DISABLE
452 .ascii "d"
453#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
454 .ascii "(wt)"
455#else
456 .ascii "(wb)"
457#endif
458#endif
459 .ascii "\0"
460 .size cpu_arm920_name, . - cpu_arm920_name 444 .size cpu_arm920_name, . - cpu_arm920_name
461 445
462 .align 446 .align
@@ -473,6 +457,10 @@ __arm920_proc_info:
473 PMD_BIT4 | \ 457 PMD_BIT4 | \
474 PMD_SECT_AP_WRITE | \ 458 PMD_SECT_AP_WRITE | \
475 PMD_SECT_AP_READ 459 PMD_SECT_AP_READ
460 .long PMD_TYPE_SECT | \
461 PMD_BIT4 | \
462 PMD_SECT_AP_WRITE | \
463 PMD_SECT_AP_READ
476 b __arm920_setup 464 b __arm920_setup
477 .long cpu_arch_name 465 .long cpu_arch_name
478 .long cpu_elf_name 466 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm922.S b/arch/arm/mm/proc-arm922.S
index 9e57c34f5c0..571f082f024 100644
--- a/arch/arm/mm/proc-arm922.S
+++ b/arch/arm/mm/proc-arm922.S
@@ -27,7 +27,6 @@
27 * CONFIG_CPU_ARM922_CPU_IDLE -> nohlt 27 * CONFIG_CPU_ARM922_CPU_IDLE -> nohlt
28 */ 28 */
29#include <linux/linkage.h> 29#include <linux/linkage.h>
30#include <linux/config.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <asm/assembler.h> 31#include <asm/assembler.h>
33#include <asm/pgtable-hwdef.h> 32#include <asm/pgtable-hwdef.h>
@@ -395,11 +394,11 @@ __arm922_setup:
395#ifdef CONFIG_MMU 394#ifdef CONFIG_MMU
396 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 395 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
397#endif 396#endif
397 adr r5, arm922_crval
398 ldmia r5, {r5, r6}
398 mrc p15, 0, r0, c1, c0 @ get control register v4 399 mrc p15, 0, r0, c1, c0 @ get control register v4
399 ldr r5, arm922_cr1_clear
400 bic r0, r0, r5 400 bic r0, r0, r5
401 ldr r5, arm922_cr1_set 401 orr r0, r0, r6
402 orr r0, r0, r5
403 mov pc, lr 402 mov pc, lr
404 .size __arm922_setup, . - __arm922_setup 403 .size __arm922_setup, . - __arm922_setup
405 404
@@ -409,12 +408,9 @@ __arm922_setup:
409 * ..11 0001 ..11 0101 408 * ..11 0001 ..11 0101
410 * 409 *
411 */ 410 */
412 .type arm922_cr1_clear, #object 411 .type arm922_crval, #object
413 .type arm922_cr1_set, #object 412arm922_crval:
414arm922_cr1_clear: 413 crval clear=0x00003f3f, mmuset=0x00003135, ucset=0x00001130
415 .word 0x3f3f
416arm922_cr1_set:
417 .word 0x3135
418 414
419 __INITDATA 415 __INITDATA
420 416
@@ -448,19 +444,7 @@ cpu_elf_name:
448 444
449 .type cpu_arm922_name, #object 445 .type cpu_arm922_name, #object
450cpu_arm922_name: 446cpu_arm922_name:
451 .ascii "ARM922T" 447 .asciz "ARM922T"
452#ifndef CONFIG_CPU_ICACHE_DISABLE
453 .ascii "i"
454#endif
455#ifndef CONFIG_CPU_DCACHE_DISABLE
456 .ascii "d"
457#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
458 .ascii "(wt)"
459#else
460 .ascii "(wb)"
461#endif
462#endif
463 .ascii "\0"
464 .size cpu_arm922_name, . - cpu_arm922_name 448 .size cpu_arm922_name, . - cpu_arm922_name
465 449
466 .align 450 .align
@@ -477,6 +461,10 @@ __arm922_proc_info:
477 PMD_BIT4 | \ 461 PMD_BIT4 | \
478 PMD_SECT_AP_WRITE | \ 462 PMD_SECT_AP_WRITE | \
479 PMD_SECT_AP_READ 463 PMD_SECT_AP_READ
464 .long PMD_TYPE_SECT | \
465 PMD_BIT4 | \
466 PMD_SECT_AP_WRITE | \
467 PMD_SECT_AP_READ
480 b __arm922_setup 468 b __arm922_setup
481 .long cpu_arch_name 469 .long cpu_arch_name
482 .long cpu_elf_name 470 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm925.S b/arch/arm/mm/proc-arm925.S
index 8d47c9f3f93..ad15f8503d5 100644
--- a/arch/arm/mm/proc-arm925.S
+++ b/arch/arm/mm/proc-arm925.S
@@ -50,7 +50,6 @@
50 */ 50 */
51 51
52#include <linux/linkage.h> 52#include <linux/linkage.h>
53#include <linux/config.h>
54#include <linux/init.h> 53#include <linux/init.h>
55#include <asm/assembler.h> 54#include <asm/assembler.h>
56#include <asm/pgtable-hwdef.h> 55#include <asm/pgtable-hwdef.h>
@@ -455,11 +454,10 @@ __arm925_setup:
455 mcr p15, 7, r0, c15, c0, 0 454 mcr p15, 7, r0, c15, c0, 0
456#endif 455#endif
457 456
457 adr r5, {r5, r6}
458 mrc p15, 0, r0, c1, c0 @ get control register v4 458 mrc p15, 0, r0, c1, c0 @ get control register v4
459 ldr r5, arm925_cr1_clear
460 bic r0, r0, r5 459 bic r0, r0, r5
461 ldr r5, arm925_cr1_set 460 orr r0, r0, r6
462 orr r0, r0, r5
463#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN 461#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
464 orr r0, r0, #0x4000 @ .1.. .... .... .... 462 orr r0, r0, #0x4000 @ .1.. .... .... ....
465#endif 463#endif
@@ -472,12 +470,9 @@ __arm925_setup:
472 * .011 0001 ..11 1101 470 * .011 0001 ..11 1101
473 * 471 *
474 */ 472 */
475 .type arm925_cr1_clear, #object 473 .type arm925_crval, #object
476 .type arm925_cr1_set, #object 474arm925_crval:
477arm925_cr1_clear: 475 crval clear=0x00007f3f, mmuset=0x0000313d, ucset=0x00001130
478 .word 0x7f3f
479arm925_cr1_set:
480 .word 0x313d
481 476
482 __INITDATA 477 __INITDATA
483 478
@@ -511,22 +506,7 @@ cpu_elf_name:
511 506
512 .type cpu_arm925_name, #object 507 .type cpu_arm925_name, #object
513cpu_arm925_name: 508cpu_arm925_name:
514 .ascii "ARM925T" 509 .asciz "ARM925T"
515#ifndef CONFIG_CPU_ICACHE_DISABLE
516 .ascii "i"
517#endif
518#ifndef CONFIG_CPU_DCACHE_DISABLE
519 .ascii "d"
520#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
521 .ascii "(wt)"
522#else
523 .ascii "(wb)"
524#endif
525#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
526 .ascii "RR"
527#endif
528#endif
529 .ascii "\0"
530 .size cpu_arm925_name, . - cpu_arm925_name 510 .size cpu_arm925_name, . - cpu_arm925_name
531 511
532 .align 512 .align
@@ -541,6 +521,10 @@ __arm925_proc_info:
541 PMD_BIT4 | \ 521 PMD_BIT4 | \
542 PMD_SECT_AP_WRITE | \ 522 PMD_SECT_AP_WRITE | \
543 PMD_SECT_AP_READ 523 PMD_SECT_AP_READ
524 .long PMD_TYPE_SECT | \
525 PMD_BIT4 | \
526 PMD_SECT_AP_WRITE | \
527 PMD_SECT_AP_READ
544 b __arm925_setup 528 b __arm925_setup
545 .long cpu_arch_name 529 .long cpu_arch_name
546 .long cpu_elf_name 530 .long cpu_elf_name
@@ -560,6 +544,10 @@ __arm915_proc_info:
560 PMD_BIT4 | \ 544 PMD_BIT4 | \
561 PMD_SECT_AP_WRITE | \ 545 PMD_SECT_AP_WRITE | \
562 PMD_SECT_AP_READ 546 PMD_SECT_AP_READ
547 .long PMD_TYPE_SECT | \
548 PMD_BIT4 | \
549 PMD_SECT_AP_WRITE | \
550 PMD_SECT_AP_READ
563 b __arm925_setup 551 b __arm925_setup
564 .long cpu_arch_name 552 .long cpu_arch_name
565 .long cpu_elf_name 553 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-arm926.S b/arch/arm/mm/proc-arm926.S
index cb4d8f33d2a..1e89d408047 100644
--- a/arch/arm/mm/proc-arm926.S
+++ b/arch/arm/mm/proc-arm926.S
@@ -26,7 +26,6 @@
26 * CONFIG_CPU_ARM926_CPU_IDLE -> nohlt 26 * CONFIG_CPU_ARM926_CPU_IDLE -> nohlt
27 */ 27 */
28#include <linux/linkage.h> 28#include <linux/linkage.h>
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <asm/assembler.h> 30#include <asm/assembler.h>
32#include <asm/pgtable-hwdef.h> 31#include <asm/pgtable-hwdef.h>
@@ -404,11 +403,11 @@ __arm926_setup:
404 mcr p15, 7, r0, c15, c0, 0 403 mcr p15, 7, r0, c15, c0, 0
405#endif 404#endif
406 405
406 adr r5, arm926_crval
407 ldmia r5, {r5, r6}
407 mrc p15, 0, r0, c1, c0 @ get control register v4 408 mrc p15, 0, r0, c1, c0 @ get control register v4
408 ldr r5, arm926_cr1_clear
409 bic r0, r0, r5 409 bic r0, r0, r5
410 ldr r5, arm926_cr1_set 410 orr r0, r0, r6
411 orr r0, r0, r5
412#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN 411#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
413 orr r0, r0, #0x4000 @ .1.. .... .... .... 412 orr r0, r0, #0x4000 @ .1.. .... .... ....
414#endif 413#endif
@@ -421,12 +420,9 @@ __arm926_setup:
421 * .011 0001 ..11 0101 420 * .011 0001 ..11 0101
422 * 421 *
423 */ 422 */
424 .type arm926_cr1_clear, #object 423 .type arm926_crval, #object
425 .type arm926_cr1_set, #object 424arm926_crval:
426arm926_cr1_clear: 425 crval clear=0x00007f3f, mmuset=0x00003135, ucset=0x00001134
427 .word 0x7f3f
428arm926_cr1_set:
429 .word 0x3135
430 426
431 __INITDATA 427 __INITDATA
432 428
@@ -460,22 +456,7 @@ cpu_elf_name:
460 456
461 .type cpu_arm926_name, #object 457 .type cpu_arm926_name, #object
462cpu_arm926_name: 458cpu_arm926_name:
463 .ascii "ARM926EJ-S" 459 .asciz "ARM926EJ-S"
464#ifndef CONFIG_CPU_ICACHE_DISABLE
465 .ascii "i"
466#endif
467#ifndef CONFIG_CPU_DCACHE_DISABLE
468 .ascii "d"
469#ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
470 .ascii "(wt)"
471#else
472 .ascii "(wb)"
473#endif
474#ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
475 .ascii "RR"
476#endif
477#endif
478 .ascii "\0"
479 .size cpu_arm926_name, . - cpu_arm926_name 460 .size cpu_arm926_name, . - cpu_arm926_name
480 461
481 .align 462 .align
@@ -492,6 +473,10 @@ __arm926_proc_info:
492 PMD_BIT4 | \ 473 PMD_BIT4 | \
493 PMD_SECT_AP_WRITE | \ 474 PMD_SECT_AP_WRITE | \
494 PMD_SECT_AP_READ 475 PMD_SECT_AP_READ
476 .long PMD_TYPE_SECT | \
477 PMD_BIT4 | \
478 PMD_SECT_AP_WRITE | \
479 PMD_SECT_AP_READ
495 b __arm926_setup 480 b __arm926_setup
496 .long cpu_arch_name 481 .long cpu_arch_name
497 .long cpu_elf_name 482 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-macros.S b/arch/arm/mm/proc-macros.S
index 7cfc2604a1e..9e2c89eb211 100644
--- a/arch/arm/mm/proc-macros.S
+++ b/arch/arm/mm/proc-macros.S
@@ -49,3 +49,13 @@
49 .macro asid, rd, rn 49 .macro asid, rd, rn
50 and \rd, \rn, #255 50 and \rd, \rn, #255
51 .endm 51 .endm
52
53 .macro crval, clear, mmuset, ucset
54#ifdef CONFIG_MMU
55 .word \clear
56 .word \mmuset
57#else
58 .word \clear
59 .word \ucset
60#endif
61 .endm
diff --git a/arch/arm/mm/proc-sa110.S b/arch/arm/mm/proc-sa110.S
index 5a760a2c629..c878064e9b8 100644
--- a/arch/arm/mm/proc-sa110.S
+++ b/arch/arm/mm/proc-sa110.S
@@ -23,6 +23,8 @@
23#include <asm/pgtable.h> 23#include <asm/pgtable.h>
24#include <asm/ptrace.h> 24#include <asm/ptrace.h>
25 25
26#include "proc-macros.S"
27
26/* 28/*
27 * the cache line size of the I and D cache 29 * the cache line size of the I and D cache
28 */ 30 */
@@ -185,11 +187,12 @@ __sa110_setup:
185#ifdef CONFIG_MMU 187#ifdef CONFIG_MMU
186 mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4 188 mcr p15, 0, r10, c8, c7 @ invalidate I,D TLBs on v4
187#endif 189#endif
190
191 adr r5, sa110_crval
192 ldmia r5, {r5, r6}
188 mrc p15, 0, r0, c1, c0 @ get control register v4 193 mrc p15, 0, r0, c1, c0 @ get control register v4
189 ldr r5, sa110_cr1_clear
190 bic r0, r0, r5 194 bic r0, r0, r5
191 ldr r5, sa110_cr1_set 195 orr r0, r0, r6
192 orr r0, r0, r5
193 mov pc, lr 196 mov pc, lr
194 .size __sa110_setup, . - __sa110_setup 197 .size __sa110_setup, . - __sa110_setup
195 198
@@ -199,12 +202,9 @@ __sa110_setup:
199 * ..01 0001 ..11 1101 202 * ..01 0001 ..11 1101
200 * 203 *
201 */ 204 */
202 .type sa110_cr1_clear, #object 205 .type sa110_crval, #object
203 .type sa110_cr1_set, #object 206sa110_crval:
204sa110_cr1_clear: 207 crval clear=0x00003f3f, mmuset=0x0000113d, ucset=0x00001130
205 .word 0x3f3f
206sa110_cr1_set:
207 .word 0x113d
208 208
209 __INITDATA 209 __INITDATA
210 210
@@ -255,6 +255,9 @@ __sa110_proc_info:
255 PMD_SECT_CACHEABLE | \ 255 PMD_SECT_CACHEABLE | \
256 PMD_SECT_AP_WRITE | \ 256 PMD_SECT_AP_WRITE | \
257 PMD_SECT_AP_READ 257 PMD_SECT_AP_READ
258 .long PMD_TYPE_SECT | \
259 PMD_SECT_AP_WRITE | \
260 PMD_SECT_AP_READ
258 b __sa110_setup 261 b __sa110_setup
259 .long cpu_arch_name 262 .long cpu_arch_name
260 .long cpu_elf_name 263 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-sa1100.S b/arch/arm/mm/proc-sa1100.S
index 0a2107ad4c3..b23b66a6155 100644
--- a/arch/arm/mm/proc-sa1100.S
+++ b/arch/arm/mm/proc-sa1100.S
@@ -27,6 +27,8 @@
27#include <asm/pgtable-hwdef.h> 27#include <asm/pgtable-hwdef.h>
28#include <asm/pgtable.h> 28#include <asm/pgtable.h>
29 29
30#include "proc-macros.S"
31
30/* 32/*
31 * the cache line size of the I and D cache 33 * the cache line size of the I and D cache
32 */ 34 */
@@ -198,11 +200,11 @@ __sa1100_setup:
198#ifdef CONFIG_MMU 200#ifdef CONFIG_MMU
199 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4 201 mcr p15, 0, r0, c8, c7 @ invalidate I,D TLBs on v4
200#endif 202#endif
203 adr r5, sa1100_crval
204 ldmia r5, {r5, r6}
201 mrc p15, 0, r0, c1, c0 @ get control register v4 205 mrc p15, 0, r0, c1, c0 @ get control register v4
202 ldr r5, sa1100_cr1_clear
203 bic r0, r0, r5 206 bic r0, r0, r5
204 ldr r5, sa1100_cr1_set 207 orr r0, r0, r6
205 orr r0, r0, r5
206 mov pc, lr 208 mov pc, lr
207 .size __sa1100_setup, . - __sa1100_setup 209 .size __sa1100_setup, . - __sa1100_setup
208 210
@@ -212,12 +214,9 @@ __sa1100_setup:
212 * ..11 0001 ..11 1101 214 * ..11 0001 ..11 1101
213 * 215 *
214 */ 216 */
215 .type sa1100_cr1_clear, #object 217 .type sa1100_crval, #object
216 .type sa1100_cr1_set, #object 218sa1100_crval:
217sa1100_cr1_clear: 219 crval clear=0x00003f3f, mmuset=0x0000313d, ucset=0x00001130
218 .word 0x3f3f
219sa1100_cr1_set:
220 .word 0x313d
221 220
222 __INITDATA 221 __INITDATA
223 222
@@ -276,6 +275,9 @@ __sa1100_proc_info:
276 PMD_SECT_CACHEABLE | \ 275 PMD_SECT_CACHEABLE | \
277 PMD_SECT_AP_WRITE | \ 276 PMD_SECT_AP_WRITE | \
278 PMD_SECT_AP_READ 277 PMD_SECT_AP_READ
278 .long PMD_TYPE_SECT | \
279 PMD_SECT_AP_WRITE | \
280 PMD_SECT_AP_READ
279 b __sa1100_setup 281 b __sa1100_setup
280 .long cpu_arch_name 282 .long cpu_arch_name
281 .long cpu_elf_name 283 .long cpu_elf_name
@@ -296,6 +298,9 @@ __sa1110_proc_info:
296 PMD_SECT_CACHEABLE | \ 298 PMD_SECT_CACHEABLE | \
297 PMD_SECT_AP_WRITE | \ 299 PMD_SECT_AP_WRITE | \
298 PMD_SECT_AP_READ 300 PMD_SECT_AP_READ
301 .long PMD_TYPE_SECT | \
302 PMD_SECT_AP_WRITE | \
303 PMD_SECT_AP_READ
299 b __sa1100_setup 304 b __sa1100_setup
300 .long cpu_arch_name 305 .long cpu_arch_name
301 .long cpu_elf_name 306 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index ca13d4d05f6..6f72549f884 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -212,11 +212,11 @@ __v6_setup:
212 orr r0, r0, #(0xf << 20) 212 orr r0, r0, #(0xf << 20)
213 mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP 213 mcr p15, 0, r0, c1, c0, 2 @ Enable full access to VFP
214#endif 214#endif
215 adr r5, v6_crval
216 ldmia r5, {r5, r6}
215 mrc p15, 0, r0, c1, c0, 0 @ read control register 217 mrc p15, 0, r0, c1, c0, 0 @ read control register
216 ldr r5, v6_cr1_clear @ get mask for bits to clear
217 bic r0, r0, r5 @ clear bits them 218 bic r0, r0, r5 @ clear bits them
218 ldr r5, v6_cr1_set @ get mask for bits to set 219 orr r0, r0, r6 @ set them
219 orr r0, r0, r5 @ set them
220 mov pc, lr @ return to head.S:__ret 220 mov pc, lr @ return to head.S:__ret
221 221
222 /* 222 /*
@@ -225,12 +225,9 @@ __v6_setup:
225 * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced 225 * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced
226 * 0 110 0011 1.00 .111 1101 < we want 226 * 0 110 0011 1.00 .111 1101 < we want
227 */ 227 */
228 .type v6_cr1_clear, #object 228 .type v6_crval, #object
229 .type v6_cr1_set, #object 229v6_crval:
230v6_cr1_clear: 230 crval clear=0x01e0fb7f, mmuset=0x00c0387d, ucset=0x00c0187c
231 .word 0x01e0fb7f
232v6_cr1_set:
233 .word 0x00c0387d
234 231
235 .type v6_processor_functions, #object 232 .type v6_processor_functions, #object
236ENTRY(v6_processor_functions) 233ENTRY(v6_processor_functions)
@@ -269,6 +266,10 @@ __v6_proc_info:
269 PMD_SECT_CACHEABLE | \ 266 PMD_SECT_CACHEABLE | \
270 PMD_SECT_AP_WRITE | \ 267 PMD_SECT_AP_WRITE | \
271 PMD_SECT_AP_READ 268 PMD_SECT_AP_READ
269 .long PMD_TYPE_SECT | \
270 PMD_SECT_XN | \
271 PMD_SECT_AP_WRITE | \
272 PMD_SECT_AP_READ
272 b __v6_setup 273 b __v6_setup
273 .long cpu_arch_name 274 .long cpu_arch_name
274 .long cpu_elf_name 275 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-xsc3.S b/arch/arm/mm/proc-xsc3.S
index 8d32e21fe15..4ace2d8090c 100644
--- a/arch/arm/mm/proc-xsc3.S
+++ b/arch/arm/mm/proc-xsc3.S
@@ -426,23 +426,26 @@ __xsc3_setup:
426 orr r0, r0, #(1 << 10) @ enable L2 for LLR cache 426 orr r0, r0, #(1 << 10) @ enable L2 for LLR cache
427#endif 427#endif
428 mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg 428 mcr p15, 0, r0, c1, c0, 1 @ set auxiliary control reg
429
430 adr r5, xsc3_crval
431 ldmia r5, {r5, r6}
429 mrc p15, 0, r0, c1, c0, 0 @ get control register 432 mrc p15, 0, r0, c1, c0, 0 @ get control register
430 bic r0, r0, #0x0002 @ .... .... .... ..A. 433 bic r0, r0, r5 @ .... .... .... ..A.
431 orr r0, r0, #0x0005 @ .... .... .... .C.M 434 orr r0, r0, r6 @ .... .... .... .C.M
432#if BTB_ENABLE 435#if BTB_ENABLE
433 bic r0, r0, #0x0200 @ .... ..R. .... .... 436 orr r0, r0, #0x00000800 @ ..VI Z..S .... ....
434 orr r0, r0, #0x3900 @ ..VI Z..S .... ....
435#else
436 bic r0, r0, #0x0a00 @ .... Z.R. .... ....
437 orr r0, r0, #0x3100 @ ..VI ...S .... ....
438#endif 437#endif
439#if L2_CACHE_ENABLE 438#if L2_CACHE_ENABLE
440 orr r0, r0, #0x4000000 @ L2 enable 439 orr r0, r0, #0x04000000 @ L2 enable
441#endif 440#endif
442 mov pc, lr 441 mov pc, lr
443 442
444 .size __xsc3_setup, . - __xsc3_setup 443 .size __xsc3_setup, . - __xsc3_setup
445 444
445 .type xsc3_crval, #object
446xsc3_crval:
447 crval clear=0x04003b02, mmuset=0x00003105, ucset=0x00001100
448
446 __INITDATA 449 __INITDATA
447 450
448/* 451/*
@@ -487,7 +490,14 @@ cpu_xsc3_name:
487__xsc3_proc_info: 490__xsc3_proc_info:
488 .long 0x69056000 491 .long 0x69056000
489 .long 0xffffe000 492 .long 0xffffe000
490 .long 0x00000c0e 493 .long PMD_TYPE_SECT | \
494 PMD_SECT_BUFFERABLE | \
495 PMD_SECT_CACHEABLE | \
496 PMD_SECT_AP_WRITE | \
497 PMD_SECT_AP_READ
498 .long PMD_TYPE_SECT | \
499 PMD_SECT_AP_WRITE | \
500 PMD_SECT_AP_READ
491 b __xsc3_setup 501 b __xsc3_setup
492 .long cpu_arch_name 502 .long cpu_arch_name
493 .long cpu_elf_name 503 .long cpu_elf_name
diff --git a/arch/arm/mm/proc-xscale.S b/arch/arm/mm/proc-xscale.S
index 29bcc4dd651..521538671f4 100644
--- a/arch/arm/mm/proc-xscale.S
+++ b/arch/arm/mm/proc-xscale.S
@@ -138,17 +138,23 @@ ENTRY(cpu_xscale_proc_fin)
138 * to what would be the reset vector. 138 * to what would be the reset vector.
139 * 139 *
140 * loc: location to jump to for soft reset 140 * loc: location to jump to for soft reset
141 *
142 * Beware PXA270 erratum E7.
141 */ 143 */
142 .align 5 144 .align 5
143ENTRY(cpu_xscale_reset) 145ENTRY(cpu_xscale_reset)
144 mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE 146 mov r1, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
145 msr cpsr_c, r1 @ reset CPSR 147 msr cpsr_c, r1 @ reset CPSR
148 mcr p15, 0, r1, c10, c4, 1 @ unlock I-TLB
149 mcr p15, 0, r1, c8, c5, 0 @ invalidate I-TLB
146 mrc p15, 0, r1, c1, c0, 0 @ ctrl register 150 mrc p15, 0, r1, c1, c0, 0 @ ctrl register
147 bic r1, r1, #0x0086 @ ........B....CA. 151 bic r1, r1, #0x0086 @ ........B....CA.
148 bic r1, r1, #0x3900 @ ..VIZ..S........ 152 bic r1, r1, #0x3900 @ ..VIZ..S........
153 sub pc, pc, #4 @ flush pipeline
154 @ *** cache line aligned ***
149 mcr p15, 0, r1, c1, c0, 0 @ ctrl register 155 mcr p15, 0, r1, c1, c0, 0 @ ctrl register
150 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB
151 bic r1, r1, #0x0001 @ ...............M 156 bic r1, r1, #0x0001 @ ...............M
157 mcr p15, 0, ip, c7, c7, 0 @ invalidate I,D caches & BTB
152 mcr p15, 0, r1, c1, c0, 0 @ ctrl register 158 mcr p15, 0, r1, c1, c0, 0 @ ctrl register
153 @ CAUTION: MMU turned off from this point. We count on the pipeline 159 @ CAUTION: MMU turned off from this point. We count on the pipeline
154 @ already containing those two last instructions to survive. 160 @ already containing those two last instructions to survive.
@@ -475,11 +481,12 @@ __xscale_setup:
475 orr r0, r0, #1 << 6 @ cp6 for IOP3xx and Bulverde 481 orr r0, r0, #1 << 6 @ cp6 for IOP3xx and Bulverde
476 orr r0, r0, #1 << 13 @ Its undefined whether this 482 orr r0, r0, #1 << 13 @ Its undefined whether this
477 mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes 483 mcr p15, 0, r0, c15, c1, 0 @ affects USR or SVC modes
484
485 adr r5, xscale_crval
486 ldmia r5, {r5, r6}
478 mrc p15, 0, r0, c1, c0, 0 @ get control register 487 mrc p15, 0, r0, c1, c0, 0 @ get control register
479 ldr r5, xscale_cr1_clear
480 bic r0, r0, r5 488 bic r0, r0, r5
481 ldr r5, xscale_cr1_set 489 orr r0, r0, r6
482 orr r0, r0, r5
483 mov pc, lr 490 mov pc, lr
484 .size __xscale_setup, . - __xscale_setup 491 .size __xscale_setup, . - __xscale_setup
485 492
@@ -489,12 +496,9 @@ __xscale_setup:
489 * ..11 1.01 .... .101 496 * ..11 1.01 .... .101
490 * 497 *
491 */ 498 */
492 .type xscale_cr1_clear, #object 499 .type xscale_crval, #object
493 .type xscale_cr1_set, #object 500xscale_crval:
494xscale_cr1_clear: 501 crval clear=0x00003b07, mmuset=0x00003905, ucset=0x00001900
495 .word 0x3b07
496xscale_cr1_set:
497 .word 0x3905
498 502
499 __INITDATA 503 __INITDATA
500 504
@@ -595,6 +599,9 @@ __80200_proc_info:
595 PMD_SECT_CACHEABLE | \ 599 PMD_SECT_CACHEABLE | \
596 PMD_SECT_AP_WRITE | \ 600 PMD_SECT_AP_WRITE | \
597 PMD_SECT_AP_READ 601 PMD_SECT_AP_READ
602 .long PMD_TYPE_SECT | \
603 PMD_SECT_AP_WRITE | \
604 PMD_SECT_AP_READ
598 b __xscale_setup 605 b __xscale_setup
599 .long cpu_arch_name 606 .long cpu_arch_name
600 .long cpu_elf_name 607 .long cpu_elf_name
@@ -615,6 +622,9 @@ __8032x_proc_info:
615 PMD_SECT_CACHEABLE | \ 622 PMD_SECT_CACHEABLE | \
616 PMD_SECT_AP_WRITE | \ 623 PMD_SECT_AP_WRITE | \
617 PMD_SECT_AP_READ 624 PMD_SECT_AP_READ
625 .long PMD_TYPE_SECT | \
626 PMD_SECT_AP_WRITE | \
627 PMD_SECT_AP_READ
618 b __xscale_setup 628 b __xscale_setup
619 .long cpu_arch_name 629 .long cpu_arch_name
620 .long cpu_elf_name 630 .long cpu_elf_name
@@ -635,6 +645,9 @@ __8033x_proc_info:
635 PMD_SECT_CACHEABLE | \ 645 PMD_SECT_CACHEABLE | \
636 PMD_SECT_AP_WRITE | \ 646 PMD_SECT_AP_WRITE | \
637 PMD_SECT_AP_READ 647 PMD_SECT_AP_READ
648 .long PMD_TYPE_SECT | \
649 PMD_SECT_AP_WRITE | \
650 PMD_SECT_AP_READ
638 b __xscale_setup 651 b __xscale_setup
639 .long cpu_arch_name 652 .long cpu_arch_name
640 .long cpu_elf_name 653 .long cpu_elf_name
@@ -655,6 +668,9 @@ __pxa250_proc_info:
655 PMD_SECT_CACHEABLE | \ 668 PMD_SECT_CACHEABLE | \
656 PMD_SECT_AP_WRITE | \ 669 PMD_SECT_AP_WRITE | \
657 PMD_SECT_AP_READ 670 PMD_SECT_AP_READ
671 .long PMD_TYPE_SECT | \
672 PMD_SECT_AP_WRITE | \
673 PMD_SECT_AP_READ
658 b __xscale_setup 674 b __xscale_setup
659 .long cpu_arch_name 675 .long cpu_arch_name
660 .long cpu_elf_name 676 .long cpu_elf_name
@@ -675,6 +691,9 @@ __pxa210_proc_info:
675 PMD_SECT_CACHEABLE | \ 691 PMD_SECT_CACHEABLE | \
676 PMD_SECT_AP_WRITE | \ 692 PMD_SECT_AP_WRITE | \
677 PMD_SECT_AP_READ 693 PMD_SECT_AP_READ
694 .long PMD_TYPE_SECT | \
695 PMD_SECT_AP_WRITE | \
696 PMD_SECT_AP_READ
678 b __xscale_setup 697 b __xscale_setup
679 .long cpu_arch_name 698 .long cpu_arch_name
680 .long cpu_elf_name 699 .long cpu_elf_name
@@ -695,6 +714,9 @@ __ixp2400_proc_info:
695 PMD_SECT_CACHEABLE | \ 714 PMD_SECT_CACHEABLE | \
696 PMD_SECT_AP_WRITE | \ 715 PMD_SECT_AP_WRITE | \
697 PMD_SECT_AP_READ 716 PMD_SECT_AP_READ
717 .long PMD_TYPE_SECT | \
718 PMD_SECT_AP_WRITE | \
719 PMD_SECT_AP_READ
698 b __xscale_setup 720 b __xscale_setup
699 .long cpu_arch_name 721 .long cpu_arch_name
700 .long cpu_elf_name 722 .long cpu_elf_name
@@ -715,6 +737,9 @@ __ixp2800_proc_info:
715 PMD_SECT_CACHEABLE | \ 737 PMD_SECT_CACHEABLE | \
716 PMD_SECT_AP_WRITE | \ 738 PMD_SECT_AP_WRITE | \
717 PMD_SECT_AP_READ 739 PMD_SECT_AP_READ
740 .long PMD_TYPE_SECT | \
741 PMD_SECT_AP_WRITE | \
742 PMD_SECT_AP_READ
718 b __xscale_setup 743 b __xscale_setup
719 .long cpu_arch_name 744 .long cpu_arch_name
720 .long cpu_elf_name 745 .long cpu_elf_name
@@ -735,6 +760,9 @@ __ixp42x_proc_info:
735 PMD_SECT_CACHEABLE | \ 760 PMD_SECT_CACHEABLE | \
736 PMD_SECT_AP_WRITE | \ 761 PMD_SECT_AP_WRITE | \
737 PMD_SECT_AP_READ 762 PMD_SECT_AP_READ
763 .long PMD_TYPE_SECT | \
764 PMD_SECT_AP_WRITE | \
765 PMD_SECT_AP_READ
738 b __xscale_setup 766 b __xscale_setup
739 .long cpu_arch_name 767 .long cpu_arch_name
740 .long cpu_elf_name 768 .long cpu_elf_name
@@ -750,7 +778,14 @@ __ixp42x_proc_info:
750__ixp46x_proc_info: 778__ixp46x_proc_info:
751 .long 0x69054200 779 .long 0x69054200
752 .long 0xffffff00 780 .long 0xffffff00
753 .long 0x00000c0e 781 .long PMD_TYPE_SECT | \
782 PMD_SECT_BUFFERABLE | \
783 PMD_SECT_CACHEABLE | \
784 PMD_SECT_AP_WRITE | \
785 PMD_SECT_AP_READ
786 .long PMD_TYPE_SECT | \
787 PMD_SECT_AP_WRITE | \
788 PMD_SECT_AP_READ
754 b __xscale_setup 789 b __xscale_setup
755 .long cpu_arch_name 790 .long cpu_arch_name
756 .long cpu_elf_name 791 .long cpu_elf_name
@@ -771,6 +806,9 @@ __pxa255_proc_info:
771 PMD_SECT_CACHEABLE | \ 806 PMD_SECT_CACHEABLE | \
772 PMD_SECT_AP_WRITE | \ 807 PMD_SECT_AP_WRITE | \
773 PMD_SECT_AP_READ 808 PMD_SECT_AP_READ
809 .long PMD_TYPE_SECT | \
810 PMD_SECT_AP_WRITE | \
811 PMD_SECT_AP_READ
774 b __xscale_setup 812 b __xscale_setup
775 .long cpu_arch_name 813 .long cpu_arch_name
776 .long cpu_elf_name 814 .long cpu_elf_name
@@ -791,6 +829,9 @@ __pxa270_proc_info:
791 PMD_SECT_CACHEABLE | \ 829 PMD_SECT_CACHEABLE | \
792 PMD_SECT_AP_WRITE | \ 830 PMD_SECT_AP_WRITE | \
793 PMD_SECT_AP_READ 831 PMD_SECT_AP_READ
832 .long PMD_TYPE_SECT | \
833 PMD_SECT_AP_WRITE | \
834 PMD_SECT_AP_READ
794 b __xscale_setup 835 b __xscale_setup
795 .long cpu_arch_name 836 .long cpu_arch_name
796 .long cpu_elf_name 837 .long cpu_elf_name
diff --git a/arch/arm/nwfpe/fpa11.c b/arch/arm/nwfpe/fpa11.c
index 7b3d74d73c8..cc60acde84d 100644
--- a/arch/arm/nwfpe/fpa11.c
+++ b/arch/arm/nwfpe/fpa11.c
@@ -26,7 +26,6 @@
26#include "fpmodule.h" 26#include "fpmodule.h"
27#include "fpmodule.inl" 27#include "fpmodule.inl"
28 28
29#include <linux/config.h>
30#include <linux/compiler.h> 29#include <linux/compiler.h>
31#include <linux/string.h> 30#include <linux/string.h>
32#include <asm/system.h> 31#include <asm/system.h>
diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h
index 28cd79a451d..4a4d02c0911 100644
--- a/arch/arm/nwfpe/fpa11.h
+++ b/arch/arm/nwfpe/fpa11.h
@@ -31,7 +31,6 @@
31 */ 31 */
32#define GET_USERREG() ((struct pt_regs *)(THREAD_START_SP + (unsigned long)current_thread_info()) - 1) 32#define GET_USERREG() ((struct pt_regs *)(THREAD_START_SP + (unsigned long)current_thread_info()) - 1)
33 33
34#include <linux/config.h>
35#include <linux/thread_info.h> 34#include <linux/thread_info.h>
36 35
37/* includes */ 36/* includes */
diff --git a/arch/arm/nwfpe/fpa11_cpdo.c b/arch/arm/nwfpe/fpa11_cpdo.c
index 4a31dfd9406..2cebb152960 100644
--- a/arch/arm/nwfpe/fpa11_cpdo.c
+++ b/arch/arm/nwfpe/fpa11_cpdo.c
@@ -20,7 +20,6 @@
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include "fpa11.h" 23#include "fpa11.h"
25#include "fpopcode.h" 24#include "fpopcode.h"
26 25
diff --git a/arch/arm/nwfpe/fpa11_cpdt.c b/arch/arm/nwfpe/fpa11_cpdt.c
index 32859fa8dcf..79f8e67cc6c 100644
--- a/arch/arm/nwfpe/fpa11_cpdt.c
+++ b/arch/arm/nwfpe/fpa11_cpdt.c
@@ -20,7 +20,6 @@
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include "fpa11.h" 23#include "fpa11.h"
25#include "softfloat.h" 24#include "softfloat.h"
26#include "fpopcode.h" 25#include "fpopcode.h"
diff --git a/arch/arm/nwfpe/fpa11_cprt.c b/arch/arm/nwfpe/fpa11_cprt.c
index 7c67023655e..9843dc53304 100644
--- a/arch/arm/nwfpe/fpa11_cprt.c
+++ b/arch/arm/nwfpe/fpa11_cprt.c
@@ -20,7 +20,6 @@
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include "fpa11.h" 23#include "fpa11.h"
25#include "fpopcode.h" 24#include "fpopcode.h"
26#include "fpa11.inl" 25#include "fpa11.inl"
diff --git a/arch/arm/nwfpe/fpmodule.c b/arch/arm/nwfpe/fpmodule.c
index 7d977d23f02..4c0ab50f399 100644
--- a/arch/arm/nwfpe/fpmodule.c
+++ b/arch/arm/nwfpe/fpmodule.c
@@ -24,7 +24,6 @@
24#include "fpa11.h" 24#include "fpa11.h"
25 25
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/config.h>
28 27
29/* XXX */ 28/* XXX */
30#include <linux/errno.h> 29#include <linux/errno.h>
diff --git a/arch/arm/nwfpe/fpopcode.c b/arch/arm/nwfpe/fpopcode.c
index 67ff2ab08ea..922b8110758 100644
--- a/arch/arm/nwfpe/fpopcode.c
+++ b/arch/arm/nwfpe/fpopcode.c
@@ -19,7 +19,6 @@
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20*/ 20*/
21 21
22#include <linux/config.h>
23#include "fpa11.h" 22#include "fpa11.h"
24#include "softfloat.h" 23#include "softfloat.h"
25#include "fpopcode.h" 24#include "fpopcode.h"
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h
index 6528e081c83..ec78e3517fc 100644
--- a/arch/arm/nwfpe/fpopcode.h
+++ b/arch/arm/nwfpe/fpopcode.h
@@ -23,7 +23,6 @@
23#ifndef __FPOPCODE_H__ 23#ifndef __FPOPCODE_H__
24#define __FPOPCODE_H__ 24#define __FPOPCODE_H__
25 25
26#include <linux/config.h>
27 26
28/* 27/*
29ARM Floating Point Instruction Classes 28ARM Floating Point Instruction Classes
diff --git a/arch/arm/nwfpe/softfloat.h b/arch/arm/nwfpe/softfloat.h
index 978c699673c..e1125bc39ee 100644
--- a/arch/arm/nwfpe/softfloat.h
+++ b/arch/arm/nwfpe/softfloat.h
@@ -32,7 +32,6 @@ this code that are retained.
32#ifndef __SOFTFLOAT_H__ 32#ifndef __SOFTFLOAT_H__
33#define __SOFTFLOAT_H__ 33#define __SOFTFLOAT_H__
34 34
35#include <linux/config.h>
36 35
37/* 36/*
38------------------------------------------------------------------------------- 37-------------------------------------------------------------------------------
diff --git a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c
index e0f0b320d76..34fdc733743 100644
--- a/arch/arm/oprofile/op_model_xscale.c
+++ b/arch/arm/oprofile/op_model_xscale.c
@@ -384,7 +384,7 @@ static int xscale_pmu_start(void)
384 int ret; 384 int ret;
385 u32 pmnc = read_pmnc(); 385 u32 pmnc = read_pmnc();
386 386
387 ret = request_irq(XSCALE_PMU_IRQ, xscale_pmu_interrupt, SA_INTERRUPT, 387 ret = request_irq(XSCALE_PMU_IRQ, xscale_pmu_interrupt, IRQF_DISABLED,
388 "XScale PMU", (void *)results); 388 "XScale PMU", (void *)results);
389 389
390 if (ret < 0) { 390 if (ret < 0) {
diff --git a/arch/arm/plat-omap/Kconfig b/arch/arm/plat-omap/Kconfig
index ec49495e651..ec752e16d61 100644
--- a/arch/arm/plat-omap/Kconfig
+++ b/arch/arm/plat-omap/Kconfig
@@ -91,7 +91,7 @@ config OMAP_32K_TIMER_HZ
91 91
92config OMAP_DM_TIMER 92config OMAP_DM_TIMER
93 bool "Use dual-mode timer" 93 bool "Use dual-mode timer"
94 depends on ARCH_OMAP16XX 94 depends on ARCH_OMAP16XX || ARCH_OMAP24XX
95 help 95 help
96 Select this option if you want to use OMAP Dual-Mode timers. 96 Select this option if you want to use OMAP Dual-Mode timers.
97 97
diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c
index 32ec04c58bc..7f45c7c3e67 100644
--- a/arch/arm/plat-omap/clock.c
+++ b/arch/arm/plat-omap/clock.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13#include <linux/version.h> 13#include <linux/version.h>
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/module.h> 16#include <linux/module.h>
@@ -28,9 +27,9 @@
28 27
29#include <asm/arch/clock.h> 28#include <asm/arch/clock.h>
30 29
31LIST_HEAD(clocks); 30static LIST_HEAD(clocks);
32static DEFINE_MUTEX(clocks_mutex); 31static DEFINE_MUTEX(clocks_mutex);
33DEFINE_SPINLOCK(clockfw_lock); 32static DEFINE_SPINLOCK(clockfw_lock);
34 33
35static struct clk_functions *arch_clock; 34static struct clk_functions *arch_clock;
36 35
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index adffc5a859e..57b7b93674a 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
index 98edc9fdd6d..a0c71dca237 100644
--- a/arch/arm/plat-omap/cpu-omap.c
+++ b/arch/arm/plat-omap/cpu-omap.c
@@ -25,6 +25,14 @@
25#include <asm/io.h> 25#include <asm/io.h>
26#include <asm/system.h> 26#include <asm/system.h>
27 27
28#define VERY_HI_RATE 900000000
29
30#ifdef CONFIG_ARCH_OMAP1
31#define MPU_CLK "mpu"
32#else
33#define MPU_CLK "virt_prcm_set"
34#endif
35
28/* TODO: Add support for SDRAM timing changes */ 36/* TODO: Add support for SDRAM timing changes */
29 37
30int omap_verify_speed(struct cpufreq_policy *policy) 38int omap_verify_speed(struct cpufreq_policy *policy)
@@ -36,7 +44,7 @@ int omap_verify_speed(struct cpufreq_policy *policy)
36 44
37 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, 45 cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
38 policy->cpuinfo.max_freq); 46 policy->cpuinfo.max_freq);
39 mpu_clk = clk_get(NULL, "mpu"); 47 mpu_clk = clk_get(NULL, MPU_CLK);
40 if (IS_ERR(mpu_clk)) 48 if (IS_ERR(mpu_clk))
41 return PTR_ERR(mpu_clk); 49 return PTR_ERR(mpu_clk);
42 policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; 50 policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
@@ -56,7 +64,7 @@ unsigned int omap_getspeed(unsigned int cpu)
56 if (cpu) 64 if (cpu)
57 return 0; 65 return 0;
58 66
59 mpu_clk = clk_get(NULL, "mpu"); 67 mpu_clk = clk_get(NULL, MPU_CLK);
60 if (IS_ERR(mpu_clk)) 68 if (IS_ERR(mpu_clk))
61 return 0; 69 return 0;
62 rate = clk_get_rate(mpu_clk) / 1000; 70 rate = clk_get_rate(mpu_clk) / 1000;
@@ -73,7 +81,7 @@ static int omap_target(struct cpufreq_policy *policy,
73 struct cpufreq_freqs freqs; 81 struct cpufreq_freqs freqs;
74 int ret = 0; 82 int ret = 0;
75 83
76 mpu_clk = clk_get(NULL, "mpu"); 84 mpu_clk = clk_get(NULL, MPU_CLK);
77 if (IS_ERR(mpu_clk)) 85 if (IS_ERR(mpu_clk))
78 return PTR_ERR(mpu_clk); 86 return PTR_ERR(mpu_clk);
79 87
@@ -93,7 +101,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy)
93{ 101{
94 struct clk * mpu_clk; 102 struct clk * mpu_clk;
95 103
96 mpu_clk = clk_get(NULL, "mpu"); 104 mpu_clk = clk_get(NULL, MPU_CLK);
97 if (IS_ERR(mpu_clk)) 105 if (IS_ERR(mpu_clk))
98 return PTR_ERR(mpu_clk); 106 return PTR_ERR(mpu_clk);
99 107
@@ -102,7 +110,7 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy)
102 policy->cur = policy->min = policy->max = omap_getspeed(0); 110 policy->cur = policy->min = policy->max = omap_getspeed(0);
103 policy->governor = CPUFREQ_DEFAULT_GOVERNOR; 111 policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
104 policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; 112 policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
105 policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, 216000000) / 1000; 113 policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000;
106 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; 114 policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
107 clk_put(mpu_clk); 115 clk_put(mpu_clk);
108 116
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 5d5d6eb222d..1812f237d12 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
@@ -105,7 +104,7 @@ static void omap_init_kp(void)
105 omap_cfg_reg(E20_1610_KBR3); 104 omap_cfg_reg(E20_1610_KBR3);
106 omap_cfg_reg(E19_1610_KBR4); 105 omap_cfg_reg(E19_1610_KBR4);
107 omap_cfg_reg(N19_1610_KBR5); 106 omap_cfg_reg(N19_1610_KBR5);
108 } else if (machine_is_omap_perseus2()) { 107 } else if (machine_is_omap_perseus2() || machine_is_omap_fsample()) {
109 omap_cfg_reg(E2_730_KBR0); 108 omap_cfg_reg(E2_730_KBR0);
110 omap_cfg_reg(J7_730_KBR1); 109 omap_cfg_reg(J7_730_KBR1);
111 omap_cfg_reg(E1_730_KBR2); 110 omap_cfg_reg(E1_730_KBR2);
@@ -162,8 +161,8 @@ static u64 mmc1_dmamask = 0xffffffff;
162 161
163static struct resource mmc1_resources[] = { 162static struct resource mmc1_resources[] = {
164 { 163 {
165 .start = IO_ADDRESS(OMAP_MMC1_BASE), 164 .start = OMAP_MMC1_BASE,
166 .end = IO_ADDRESS(OMAP_MMC1_BASE) + 0x7f, 165 .end = OMAP_MMC1_BASE + 0x7f,
167 .flags = IORESOURCE_MEM, 166 .flags = IORESOURCE_MEM,
168 }, 167 },
169 { 168 {
@@ -191,8 +190,8 @@ static u64 mmc2_dmamask = 0xffffffff;
191 190
192static struct resource mmc2_resources[] = { 191static struct resource mmc2_resources[] = {
193 { 192 {
194 .start = IO_ADDRESS(OMAP_MMC2_BASE), 193 .start = OMAP_MMC2_BASE,
195 .end = IO_ADDRESS(OMAP_MMC2_BASE) + 0x7f, 194 .end = OMAP_MMC2_BASE + 0x7f,
196 .flags = IORESOURCE_MEM, 195 .flags = IORESOURCE_MEM,
197 }, 196 },
198 { 197 {
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index 5dac4230360..9eddc950714 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -24,9 +24,9 @@
24#include <linux/spinlock.h> 24#include <linux/spinlock.h>
25#include <linux/errno.h> 25#include <linux/errno.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/irq.h>
27 28
28#include <asm/system.h> 29#include <asm/system.h>
29#include <asm/irq.h>
30#include <asm/hardware.h> 30#include <asm/hardware.h>
31#include <asm/dma.h> 31#include <asm/dma.h>
32#include <asm/io.h> 32#include <asm/io.h>
@@ -43,6 +43,7 @@
43 43
44#define OMAP_DMA_ACTIVE 0x01 44#define OMAP_DMA_ACTIVE 0x01
45#define OMAP_DMA_CCR_EN (1 << 7) 45#define OMAP_DMA_CCR_EN (1 << 7)
46#define OMAP2_DMA_CSR_CLEAR_MASK 0xffe
46 47
47#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec) 48#define OMAP_FUNC_MUX_ARM_BASE (0xfffe1000 + 0xec)
48 49
@@ -166,18 +167,24 @@ void omap_set_dma_transfer_params(int lch, int data_type, int elem_count,
166 if (cpu_is_omap24xx() && dma_trigger) { 167 if (cpu_is_omap24xx() && dma_trigger) {
167 u32 val = OMAP_DMA_CCR_REG(lch); 168 u32 val = OMAP_DMA_CCR_REG(lch);
168 169
170 val &= ~(3 << 19);
169 if (dma_trigger > 63) 171 if (dma_trigger > 63)
170 val |= 1 << 20; 172 val |= 1 << 20;
171 if (dma_trigger > 31) 173 if (dma_trigger > 31)
172 val |= 1 << 19; 174 val |= 1 << 19;
173 175
176 val &= ~(0x1f);
174 val |= (dma_trigger & 0x1f); 177 val |= (dma_trigger & 0x1f);
175 178
176 if (sync_mode & OMAP_DMA_SYNC_FRAME) 179 if (sync_mode & OMAP_DMA_SYNC_FRAME)
177 val |= 1 << 5; 180 val |= 1 << 5;
181 else
182 val &= ~(1 << 5);
178 183
179 if (sync_mode & OMAP_DMA_SYNC_BLOCK) 184 if (sync_mode & OMAP_DMA_SYNC_BLOCK)
180 val |= 1 << 18; 185 val |= 1 << 18;
186 else
187 val &= ~(1 << 18);
181 188
182 if (src_or_dst_synch) 189 if (src_or_dst_synch)
183 val |= 1 << 24; /* source synch */ 190 val |= 1 << 24; /* source synch */
@@ -286,22 +293,39 @@ void omap_set_dma_src_data_pack(int lch, int enable)
286 293
287void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) 294void omap_set_dma_src_burst_mode(int lch, enum omap_dma_burst_mode burst_mode)
288{ 295{
296 unsigned int burst = 0;
289 OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 7); 297 OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 7);
290 298
291 switch (burst_mode) { 299 switch (burst_mode) {
292 case OMAP_DMA_DATA_BURST_DIS: 300 case OMAP_DMA_DATA_BURST_DIS:
293 break; 301 break;
294 case OMAP_DMA_DATA_BURST_4: 302 case OMAP_DMA_DATA_BURST_4:
295 OMAP_DMA_CSDP_REG(lch) |= (0x02 << 7); 303 if (cpu_is_omap24xx())
304 burst = 0x1;
305 else
306 burst = 0x2;
296 break; 307 break;
297 case OMAP_DMA_DATA_BURST_8: 308 case OMAP_DMA_DATA_BURST_8:
298 /* not supported by current hardware 309 if (cpu_is_omap24xx()) {
310 burst = 0x2;
311 break;
312 }
313 /* not supported by current hardware on OMAP1
299 * w |= (0x03 << 7); 314 * w |= (0x03 << 7);
300 * fall through 315 * fall through
301 */ 316 */
317 case OMAP_DMA_DATA_BURST_16:
318 if (cpu_is_omap24xx()) {
319 burst = 0x3;
320 break;
321 }
322 /* OMAP1 don't support burst 16
323 * fall through
324 */
302 default: 325 default:
303 BUG(); 326 BUG();
304 } 327 }
328 OMAP_DMA_CSDP_REG(lch) |= (burst << 7);
305} 329}
306 330
307/* Note that dest_port is only for OMAP1 */ 331/* Note that dest_port is only for OMAP1 */
@@ -348,30 +372,49 @@ void omap_set_dma_dest_data_pack(int lch, int enable)
348 372
349void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode) 373void omap_set_dma_dest_burst_mode(int lch, enum omap_dma_burst_mode burst_mode)
350{ 374{
375 unsigned int burst = 0;
351 OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 14); 376 OMAP_DMA_CSDP_REG(lch) &= ~(0x03 << 14);
352 377
353 switch (burst_mode) { 378 switch (burst_mode) {
354 case OMAP_DMA_DATA_BURST_DIS: 379 case OMAP_DMA_DATA_BURST_DIS:
355 break; 380 break;
356 case OMAP_DMA_DATA_BURST_4: 381 case OMAP_DMA_DATA_BURST_4:
357 OMAP_DMA_CSDP_REG(lch) |= (0x02 << 14); 382 if (cpu_is_omap24xx())
383 burst = 0x1;
384 else
385 burst = 0x2;
358 break; 386 break;
359 case OMAP_DMA_DATA_BURST_8: 387 case OMAP_DMA_DATA_BURST_8:
360 OMAP_DMA_CSDP_REG(lch) |= (0x03 << 14); 388 if (cpu_is_omap24xx())
389 burst = 0x2;
390 else
391 burst = 0x3;
361 break; 392 break;
393 case OMAP_DMA_DATA_BURST_16:
394 if (cpu_is_omap24xx()) {
395 burst = 0x3;
396 break;
397 }
398 /* OMAP1 don't support burst 16
399 * fall through
400 */
362 default: 401 default:
363 printk(KERN_ERR "Invalid DMA burst mode\n"); 402 printk(KERN_ERR "Invalid DMA burst mode\n");
364 BUG(); 403 BUG();
365 return; 404 return;
366 } 405 }
406 OMAP_DMA_CSDP_REG(lch) |= (burst << 14);
367} 407}
368 408
369static inline void omap_enable_channel_irq(int lch) 409static inline void omap_enable_channel_irq(int lch)
370{ 410{
371 u32 status; 411 u32 status;
372 412
373 /* Read CSR to make sure it's cleared. */ 413 /* Clear CSR */
374 status = OMAP_DMA_CSR_REG(lch); 414 if (cpu_class_is_omap1())
415 status = OMAP_DMA_CSR_REG(lch);
416 else if (cpu_is_omap24xx())
417 OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK;
375 418
376 /* Enable some nice interrupts. */ 419 /* Enable some nice interrupts. */
377 OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs; 420 OMAP_DMA_CICR_REG(lch) = dma_chan[lch].enabled_irqs;
@@ -470,11 +513,13 @@ int omap_request_dma(int dev_id, const char *dev_name,
470 chan->dev_name = dev_name; 513 chan->dev_name = dev_name;
471 chan->callback = callback; 514 chan->callback = callback;
472 chan->data = data; 515 chan->data = data;
473 chan->enabled_irqs = OMAP_DMA_TOUT_IRQ | OMAP_DMA_DROP_IRQ | 516 chan->enabled_irqs = OMAP_DMA_DROP_IRQ | OMAP_DMA_BLOCK_IRQ;
474 OMAP_DMA_BLOCK_IRQ;
475 517
476 if (cpu_is_omap24xx()) 518 if (cpu_class_is_omap1())
477 chan->enabled_irqs |= OMAP2_DMA_TRANS_ERR_IRQ; 519 chan->enabled_irqs |= OMAP1_DMA_TOUT_IRQ;
520 else if (cpu_is_omap24xx())
521 chan->enabled_irqs |= OMAP2_DMA_MISALIGNED_ERR_IRQ |
522 OMAP2_DMA_TRANS_ERR_IRQ;
478 523
479 if (cpu_is_omap16xx()) { 524 if (cpu_is_omap16xx()) {
480 /* If the sync device is set, configure it dynamically. */ 525 /* If the sync device is set, configure it dynamically. */
@@ -494,7 +539,7 @@ int omap_request_dma(int dev_id, const char *dev_name,
494 539
495 omap_enable_channel_irq(free_ch); 540 omap_enable_channel_irq(free_ch);
496 /* Clear the CSR register and IRQ status register */ 541 /* Clear the CSR register and IRQ status register */
497 OMAP_DMA_CSR_REG(free_ch) = 0x0; 542 OMAP_DMA_CSR_REG(free_ch) = OMAP2_DMA_CSR_CLEAR_MASK;
498 omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0); 543 omap_writel(~0x0, OMAP_DMA4_IRQSTATUS_L0);
499 } 544 }
500 545
@@ -534,7 +579,7 @@ void omap_free_dma(int lch)
534 omap_writel(val, OMAP_DMA4_IRQENABLE_L0); 579 omap_writel(val, OMAP_DMA4_IRQENABLE_L0);
535 580
536 /* Clear the CSR register and IRQ status register */ 581 /* Clear the CSR register and IRQ status register */
537 OMAP_DMA_CSR_REG(lch) = 0x0; 582 OMAP_DMA_CSR_REG(lch) = OMAP2_DMA_CSR_CLEAR_MASK;
538 583
539 val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); 584 val = omap_readl(OMAP_DMA4_IRQSTATUS_L0);
540 val |= 1 << lch; 585 val |= 1 << lch;
@@ -798,7 +843,7 @@ static int omap1_dma_handle_ch(int ch)
798 "%d (CSR %04x)\n", ch, csr); 843 "%d (CSR %04x)\n", ch, csr);
799 return 0; 844 return 0;
800 } 845 }
801 if (unlikely(csr & OMAP_DMA_TOUT_IRQ)) 846 if (unlikely(csr & OMAP1_DMA_TOUT_IRQ))
802 printk(KERN_WARNING "DMA timeout with device %d\n", 847 printk(KERN_WARNING "DMA timeout with device %d\n",
803 dma_chan[ch].dev_id); 848 dma_chan[ch].dev_id);
804 if (unlikely(csr & OMAP_DMA_DROP_IRQ)) 849 if (unlikely(csr & OMAP_DMA_DROP_IRQ))
@@ -846,20 +891,21 @@ static int omap2_dma_handle_ch(int ch)
846 return 0; 891 return 0;
847 if (unlikely(dma_chan[ch].dev_id == -1)) 892 if (unlikely(dma_chan[ch].dev_id == -1))
848 return 0; 893 return 0;
849 /* REVISIT: According to 24xx TRM, there's no TOUT_IE */
850 if (unlikely(status & OMAP_DMA_TOUT_IRQ))
851 printk(KERN_INFO "DMA timeout with device %d\n",
852 dma_chan[ch].dev_id);
853 if (unlikely(status & OMAP_DMA_DROP_IRQ)) 894 if (unlikely(status & OMAP_DMA_DROP_IRQ))
854 printk(KERN_INFO 895 printk(KERN_INFO
855 "DMA synchronization event drop occurred with device " 896 "DMA synchronization event drop occurred with device "
856 "%d\n", dma_chan[ch].dev_id); 897 "%d\n", dma_chan[ch].dev_id);
857
858 if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ)) 898 if (unlikely(status & OMAP2_DMA_TRANS_ERR_IRQ))
859 printk(KERN_INFO "DMA transaction error with device %d\n", 899 printk(KERN_INFO "DMA transaction error with device %d\n",
860 dma_chan[ch].dev_id); 900 dma_chan[ch].dev_id);
901 if (unlikely(status & OMAP2_DMA_SECURE_ERR_IRQ))
902 printk(KERN_INFO "DMA secure error with device %d\n",
903 dma_chan[ch].dev_id);
904 if (unlikely(status & OMAP2_DMA_MISALIGNED_ERR_IRQ))
905 printk(KERN_INFO "DMA misaligned error with device %d\n",
906 dma_chan[ch].dev_id);
861 907
862 OMAP_DMA_CSR_REG(ch) = 0x20; 908 OMAP_DMA_CSR_REG(ch) = OMAP2_DMA_CSR_CLEAR_MASK;
863 909
864 val = omap_readl(OMAP_DMA4_IRQSTATUS_L0); 910 val = omap_readl(OMAP_DMA4_IRQSTATUS_L0);
865 /* ch in this function is from 0-31 while in register it is 1-32 */ 911 /* ch in this function is from 0-31 while in register it is 1-32 */
@@ -893,7 +939,7 @@ static irqreturn_t omap2_dma_irq_handler(int irq, void *dev_id,
893static struct irqaction omap24xx_dma_irq = { 939static struct irqaction omap24xx_dma_irq = {
894 .name = "DMA", 940 .name = "DMA",
895 .handler = omap2_dma_irq_handler, 941 .handler = omap2_dma_irq_handler,
896 .flags = SA_INTERRUPT 942 .flags = IRQF_DISABLED
897}; 943};
898 944
899#else 945#else
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index eba3cb52ad8..50524436de6 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -4,7 +4,8 @@
4 * OMAP Dual-Mode Timers 4 * OMAP Dual-Mode Timers
5 * 5 *
6 * Copyright (C) 2005 Nokia Corporation 6 * Copyright (C) 2005 Nokia Corporation
7 * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> 7 * OMAP2 support by Juha Yrjola
8 * API improvements and OMAP2 clock framework support by Timo Teras
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify it 10 * 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 * under the terms of the GNU General Public License as published by the
@@ -26,15 +27,17 @@
26 */ 27 */
27 28
28#include <linux/init.h> 29#include <linux/init.h>
30#include <linux/spinlock.h>
31#include <linux/errno.h>
32#include <linux/list.h>
33#include <linux/clk.h>
34#include <linux/delay.h>
29#include <asm/hardware.h> 35#include <asm/hardware.h>
30#include <asm/arch/dmtimer.h> 36#include <asm/arch/dmtimer.h>
31#include <asm/io.h> 37#include <asm/io.h>
32#include <asm/arch/irqs.h> 38#include <asm/arch/irqs.h>
33#include <linux/spinlock.h>
34#include <linux/list.h>
35
36#define OMAP_TIMER_COUNT 8
37 39
40/* register offsets */
38#define OMAP_TIMER_ID_REG 0x00 41#define OMAP_TIMER_ID_REG 0x00
39#define OMAP_TIMER_OCP_CFG_REG 0x10 42#define OMAP_TIMER_OCP_CFG_REG 0x10
40#define OMAP_TIMER_SYS_STAT_REG 0x14 43#define OMAP_TIMER_SYS_STAT_REG 0x14
@@ -50,52 +53,196 @@
50#define OMAP_TIMER_CAPTURE_REG 0x3c 53#define OMAP_TIMER_CAPTURE_REG 0x3c
51#define OMAP_TIMER_IF_CTRL_REG 0x40 54#define OMAP_TIMER_IF_CTRL_REG 0x40
52 55
56/* timer control reg bits */
57#define OMAP_TIMER_CTRL_GPOCFG (1 << 14)
58#define OMAP_TIMER_CTRL_CAPTMODE (1 << 13)
59#define OMAP_TIMER_CTRL_PT (1 << 12)
60#define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8)
61#define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8)
62#define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8)
63#define OMAP_TIMER_CTRL_SCPWM (1 << 7)
64#define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */
65#define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */
66#define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */
67#define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */
68#define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */
69
70struct omap_dm_timer {
71 unsigned long phys_base;
72 int irq;
73#ifdef CONFIG_ARCH_OMAP2
74 struct clk *iclk, *fclk;
75#endif
76 void __iomem *io_base;
77 unsigned reserved:1;
78};
53 79
54static struct dmtimer_info_struct { 80#ifdef CONFIG_ARCH_OMAP1
55 struct list_head unused_timers;
56 struct list_head reserved_timers;
57} dm_timer_info;
58 81
59static struct omap_dm_timer dm_timers[] = { 82static struct omap_dm_timer dm_timers[] = {
60 { .base=0xfffb1400, .irq=INT_1610_GPTIMER1 }, 83 { .phys_base = 0xfffb1400, .irq = INT_1610_GPTIMER1 },
61 { .base=0xfffb1c00, .irq=INT_1610_GPTIMER2 }, 84 { .phys_base = 0xfffb1c00, .irq = INT_1610_GPTIMER2 },
62 { .base=0xfffb2400, .irq=INT_1610_GPTIMER3 }, 85 { .phys_base = 0xfffb2400, .irq = INT_1610_GPTIMER3 },
63 { .base=0xfffb2c00, .irq=INT_1610_GPTIMER4 }, 86 { .phys_base = 0xfffb2c00, .irq = INT_1610_GPTIMER4 },
64 { .base=0xfffb3400, .irq=INT_1610_GPTIMER5 }, 87 { .phys_base = 0xfffb3400, .irq = INT_1610_GPTIMER5 },
65 { .base=0xfffb3c00, .irq=INT_1610_GPTIMER6 }, 88 { .phys_base = 0xfffb3c00, .irq = INT_1610_GPTIMER6 },
66 { .base=0xfffb4400, .irq=INT_1610_GPTIMER7 }, 89 { .phys_base = 0xfffb4400, .irq = INT_1610_GPTIMER7 },
67 { .base=0xfffb4c00, .irq=INT_1610_GPTIMER8 }, 90 { .phys_base = 0xfffb4c00, .irq = INT_1610_GPTIMER8 },
68 { .base=0x0 },
69}; 91};
70 92
93#elif defined(CONFIG_ARCH_OMAP2)
94
95static struct omap_dm_timer dm_timers[] = {
96 { .phys_base = 0x48028000, .irq = INT_24XX_GPTIMER1 },
97 { .phys_base = 0x4802a000, .irq = INT_24XX_GPTIMER2 },
98 { .phys_base = 0x48078000, .irq = INT_24XX_GPTIMER3 },
99 { .phys_base = 0x4807a000, .irq = INT_24XX_GPTIMER4 },
100 { .phys_base = 0x4807c000, .irq = INT_24XX_GPTIMER5 },
101 { .phys_base = 0x4807e000, .irq = INT_24XX_GPTIMER6 },
102 { .phys_base = 0x48080000, .irq = INT_24XX_GPTIMER7 },
103 { .phys_base = 0x48082000, .irq = INT_24XX_GPTIMER8 },
104 { .phys_base = 0x48084000, .irq = INT_24XX_GPTIMER9 },
105 { .phys_base = 0x48086000, .irq = INT_24XX_GPTIMER10 },
106 { .phys_base = 0x48088000, .irq = INT_24XX_GPTIMER11 },
107 { .phys_base = 0x4808a000, .irq = INT_24XX_GPTIMER12 },
108};
109
110static const char *dm_source_names[] = {
111 "sys_ck",
112 "func_32k_ck",
113 "alt_ck"
114};
71 115
116static struct clk *dm_source_clocks[3];
117
118#else
119
120#error OMAP architecture not supported!
121
122#endif
123
124static const int dm_timer_count = ARRAY_SIZE(dm_timers);
72static spinlock_t dm_timer_lock; 125static spinlock_t dm_timer_lock;
73 126
127static inline u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg)
128{
129 return readl(timer->io_base + reg);
130}
74 131
75inline void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value) 132static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value)
76{ 133{
77 omap_writel(value, timer->base + reg); 134 writel(value, timer->io_base + reg);
78 while (omap_dm_timer_read_reg(timer, OMAP_TIMER_WRITE_PEND_REG)) 135 while (omap_dm_timer_read_reg(timer, OMAP_TIMER_WRITE_PEND_REG))
79 ; 136 ;
80} 137}
81 138
82u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg) 139static void omap_dm_timer_wait_for_reset(struct omap_dm_timer *timer)
83{ 140{
84 return omap_readl(timer->base + reg); 141 int c;
142
143 c = 0;
144 while (!(omap_dm_timer_read_reg(timer, OMAP_TIMER_SYS_STAT_REG) & 1)) {
145 c++;
146 if (c > 100000) {
147 printk(KERN_ERR "Timer failed to reset\n");
148 return;
149 }
150 }
85} 151}
86 152
87int omap_dm_timers_active(void) 153static void omap_dm_timer_reset(struct omap_dm_timer *timer)
154{
155 u32 l;
156
157 if (timer != &dm_timers[0]) {
158 omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
159 omap_dm_timer_wait_for_reset(timer);
160 }
161 omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_SYS_CLK);
162
163 /* Set to smart-idle mode */
164 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG);
165 l |= 0x02 << 3;
166 omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l);
167}
168
169static void omap_dm_timer_prepare(struct omap_dm_timer *timer)
170{
171#ifdef CONFIG_ARCH_OMAP2
172 clk_enable(timer->iclk);
173 clk_enable(timer->fclk);
174#endif
175 omap_dm_timer_reset(timer);
176}
177
178struct omap_dm_timer *omap_dm_timer_request(void)
179{
180 struct omap_dm_timer *timer = NULL;
181 unsigned long flags;
182 int i;
183
184 spin_lock_irqsave(&dm_timer_lock, flags);
185 for (i = 0; i < dm_timer_count; i++) {
186 if (dm_timers[i].reserved)
187 continue;
188
189 timer = &dm_timers[i];
190 timer->reserved = 1;
191 break;
192 }
193 spin_unlock_irqrestore(&dm_timer_lock, flags);
194
195 if (timer != NULL)
196 omap_dm_timer_prepare(timer);
197
198 return timer;
199}
200
201struct omap_dm_timer *omap_dm_timer_request_specific(int id)
88{ 202{
89 struct omap_dm_timer *timer; 203 struct omap_dm_timer *timer;
204 unsigned long flags;
90 205
91 for (timer = &dm_timers[0]; timer->base; ++timer) 206 spin_lock_irqsave(&dm_timer_lock, flags);
92 if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) & 207 if (id <= 0 || id > dm_timer_count || dm_timers[id-1].reserved) {
93 OMAP_TIMER_CTRL_ST) 208 spin_unlock_irqrestore(&dm_timer_lock, flags);
94 return 1; 209 printk("BUG: warning at %s:%d/%s(): unable to get timer %d\n",
210 __FILE__, __LINE__, __FUNCTION__, id);
211 dump_stack();
212 return NULL;
213 }
95 214
96 return 0; 215 timer = &dm_timers[id-1];
216 timer->reserved = 1;
217 spin_unlock_irqrestore(&dm_timer_lock, flags);
218
219 omap_dm_timer_prepare(timer);
220
221 return timer;
97} 222}
98 223
224void omap_dm_timer_free(struct omap_dm_timer *timer)
225{
226 omap_dm_timer_reset(timer);
227#ifdef CONFIG_ARCH_OMAP2
228 clk_disable(timer->iclk);
229 clk_disable(timer->fclk);
230#endif
231 WARN_ON(!timer->reserved);
232 timer->reserved = 0;
233}
234
235int omap_dm_timer_get_irq(struct omap_dm_timer *timer)
236{
237 return timer->irq;
238}
239
240#if defined(CONFIG_ARCH_OMAP1)
241
242struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
243{
244 BUG();
245}
99 246
100/** 247/**
101 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR 248 * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR
@@ -103,184 +250,229 @@ int omap_dm_timers_active(void)
103 */ 250 */
104__u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) 251__u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
105{ 252{
106 int n; 253 int i;
107 254
108 /* If ARMXOR cannot be idled this function call is unnecessary */ 255 /* If ARMXOR cannot be idled this function call is unnecessary */
109 if (!(inputmask & (1 << 1))) 256 if (!(inputmask & (1 << 1)))
110 return inputmask; 257 return inputmask;
111 258
112 /* If any active timer is using ARMXOR return modified mask */ 259 /* If any active timer is using ARMXOR return modified mask */
113 for (n = 0; dm_timers[n].base; ++n) 260 for (i = 0; i < dm_timer_count; i++) {
114 if (omap_dm_timer_read_reg(&dm_timers[n], OMAP_TIMER_CTRL_REG)& 261 u32 l;
115 OMAP_TIMER_CTRL_ST) { 262
116 if (((omap_readl(MOD_CONF_CTRL_1)>>(n*2)) & 0x03) == 0) 263 l = omap_dm_timer_read_reg(&dm_timers[i], OMAP_TIMER_CTRL_REG);
264 if (l & OMAP_TIMER_CTRL_ST) {
265 if (((omap_readl(MOD_CONF_CTRL_1) >> (i * 2)) & 0x03) == 0)
117 inputmask &= ~(1 << 1); 266 inputmask &= ~(1 << 1);
118 else 267 else
119 inputmask &= ~(1 << 2); 268 inputmask &= ~(1 << 2);
120 } 269 }
270 }
121 271
122 return inputmask; 272 return inputmask;
123} 273}
124 274
275#elif defined(CONFIG_ARCH_OMAP2)
125 276
126void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) 277struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer)
127{ 278{
128 int n = (timer - dm_timers) << 1; 279 return timer->fclk;
129 u32 l; 280}
130 281
131 l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n); 282__u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
132 l |= source << n; 283{
133 omap_writel(l, MOD_CONF_CTRL_1); 284 BUG();
134} 285}
135 286
287#endif
136 288
137static void omap_dm_timer_reset(struct omap_dm_timer *timer) 289void omap_dm_timer_trigger(struct omap_dm_timer *timer)
138{ 290{
139 /* Reset and set posted mode */ 291 omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
140 omap_dm_timer_write_reg(timer, OMAP_TIMER_IF_CTRL_REG, 0x06);
141 omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, 0x02);
142
143 omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_ARMXOR);
144} 292}
145 293
294void omap_dm_timer_start(struct omap_dm_timer *timer)
295{
296 u32 l;
146 297
298 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
299 if (!(l & OMAP_TIMER_CTRL_ST)) {
300 l |= OMAP_TIMER_CTRL_ST;
301 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
302 }
303}
147 304
148struct omap_dm_timer * omap_dm_timer_request(void) 305void omap_dm_timer_stop(struct omap_dm_timer *timer)
149{ 306{
150 struct omap_dm_timer *timer = NULL; 307 u32 l;
151 unsigned long flags;
152 308
153 spin_lock_irqsave(&dm_timer_lock, flags); 309 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
154 if (!list_empty(&dm_timer_info.unused_timers)) { 310 if (l & OMAP_TIMER_CTRL_ST) {
155 timer = (struct omap_dm_timer *) 311 l &= ~0x1;
156 dm_timer_info.unused_timers.next; 312 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
157 list_move_tail((struct list_head *)timer,
158 &dm_timer_info.reserved_timers);
159 } 313 }
160 spin_unlock_irqrestore(&dm_timer_lock, flags);
161
162 return timer;
163} 314}
164 315
316#ifdef CONFIG_ARCH_OMAP1
165 317
166void omap_dm_timer_free(struct omap_dm_timer *timer) 318void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
167{ 319{
168 unsigned long flags; 320 int n = (timer - dm_timers) << 1;
169 321 u32 l;
170 omap_dm_timer_reset(timer);
171 322
172 spin_lock_irqsave(&dm_timer_lock, flags); 323 l = omap_readl(MOD_CONF_CTRL_1) & ~(0x03 << n);
173 list_move_tail((struct list_head *)timer, &dm_timer_info.unused_timers); 324 l |= source << n;
174 spin_unlock_irqrestore(&dm_timer_lock, flags); 325 omap_writel(l, MOD_CONF_CTRL_1);
175} 326}
176 327
177void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, 328#else
178 unsigned int value)
179{
180 omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value);
181}
182 329
183unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) 330void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
184{ 331{
185 return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG); 332 if (source < 0 || source >= 3)
186} 333 return;
187 334
188void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value) 335 clk_disable(timer->fclk);
189{ 336 clk_set_parent(timer->fclk, dm_source_clocks[source]);
190 omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value); 337 clk_enable(timer->fclk);
338
339 /* When the functional clock disappears, too quick writes seem to
340 * cause an abort. */
341 __delay(15000);
191} 342}
192 343
193void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer) 344#endif
345
346void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload,
347 unsigned int load)
194{ 348{
195 u32 l; 349 u32 l;
350
196 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); 351 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
197 l |= OMAP_TIMER_CTRL_AR; 352 if (autoreload)
353 l |= OMAP_TIMER_CTRL_AR;
354 else
355 l &= ~OMAP_TIMER_CTRL_AR;
198 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); 356 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
357 omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
358 omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 0);
199} 359}
200 360
201void omap_dm_timer_trigger(struct omap_dm_timer *timer) 361void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable,
202{ 362 unsigned int match)
203 omap_dm_timer_write_reg(timer, OMAP_TIMER_TRIGGER_REG, 1);
204}
205
206void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value)
207{ 363{
208 u32 l; 364 u32 l;
209 365
210 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); 366 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
211 l |= value & 0x3; 367 if (enable)
368 l |= OMAP_TIMER_CTRL_CE;
369 else
370 l &= ~OMAP_TIMER_CTRL_CE;
212 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); 371 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
372 omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match);
213} 373}
214 374
215void omap_dm_timer_start(struct omap_dm_timer *timer) 375
376void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on,
377 int toggle, int trigger)
216{ 378{
217 u32 l; 379 u32 l;
218 380
219 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); 381 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
220 l |= OMAP_TIMER_CTRL_ST; 382 l &= ~(OMAP_TIMER_CTRL_GPOCFG | OMAP_TIMER_CTRL_SCPWM |
383 OMAP_TIMER_CTRL_PT | (0x03 << 10));
384 if (def_on)
385 l |= OMAP_TIMER_CTRL_SCPWM;
386 if (toggle)
387 l |= OMAP_TIMER_CTRL_PT;
388 l |= trigger << 10;
221 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); 389 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
222} 390}
223 391
224void omap_dm_timer_stop(struct omap_dm_timer *timer) 392void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler)
225{ 393{
226 u32 l; 394 u32 l;
227 395
228 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG); 396 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
229 l &= ~0x1; 397 l &= ~(OMAP_TIMER_CTRL_PRE | (0x07 << 2));
398 if (prescaler >= 0x00 && prescaler <= 0x07) {
399 l |= OMAP_TIMER_CTRL_PRE;
400 l |= prescaler << 2;
401 }
230 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l); 402 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
231} 403}
232 404
233unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer) 405void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer,
406 unsigned int value)
234{ 407{
235 return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG); 408 omap_dm_timer_write_reg(timer, OMAP_TIMER_INT_EN_REG, value);
236} 409}
237 410
238void omap_dm_timer_reset_counter(struct omap_dm_timer *timer) 411unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer)
239{ 412{
240 omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, 0); 413 return omap_dm_timer_read_reg(timer, OMAP_TIMER_STAT_REG);
241} 414}
242 415
243void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load) 416void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value)
244{ 417{
245 omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load); 418 omap_dm_timer_write_reg(timer, OMAP_TIMER_STAT_REG, value);
246} 419}
247 420
248void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match) 421unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer)
249{ 422{
250 omap_dm_timer_write_reg(timer, OMAP_TIMER_MATCH_REG, match); 423 return omap_dm_timer_read_reg(timer, OMAP_TIMER_COUNTER_REG);
251} 424}
252 425
253void omap_dm_timer_enable_compare(struct omap_dm_timer *timer) 426void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value)
254{ 427{
255 u32 l; 428 return omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, value);
256
257 l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
258 l |= OMAP_TIMER_CTRL_CE;
259 omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
260} 429}
261 430
431int omap_dm_timers_active(void)
432{
433 int i;
434
435 for (i = 0; i < dm_timer_count; i++) {
436 struct omap_dm_timer *timer;
437
438 timer = &dm_timers[i];
439 if (omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG) &
440 OMAP_TIMER_CTRL_ST)
441 return 1;
442 }
443 return 0;
444}
262 445
263static inline void __dm_timer_init(void) 446int omap_dm_timer_init(void)
264{ 447{
265 struct omap_dm_timer *timer; 448 struct omap_dm_timer *timer;
449 int i;
450
451 if (!(cpu_is_omap16xx() || cpu_is_omap24xx()))
452 return -ENODEV;
266 453
267 spin_lock_init(&dm_timer_lock); 454 spin_lock_init(&dm_timer_lock);
268 INIT_LIST_HEAD(&dm_timer_info.unused_timers); 455#ifdef CONFIG_ARCH_OMAP2
269 INIT_LIST_HEAD(&dm_timer_info.reserved_timers); 456 for (i = 0; i < ARRAY_SIZE(dm_source_names); i++) {
270 457 dm_source_clocks[i] = clk_get(NULL, dm_source_names[i]);
271 timer = &dm_timers[0]; 458 BUG_ON(dm_source_clocks[i] == NULL);
272 while (timer->base) { 459 }
273 list_add_tail((struct list_head *)timer, &dm_timer_info.unused_timers); 460#endif
274 omap_dm_timer_reset(timer); 461
275 timer++; 462 for (i = 0; i < dm_timer_count; i++) {
463#ifdef CONFIG_ARCH_OMAP2
464 char clk_name[16];
465#endif
466
467 timer = &dm_timers[i];
468 timer->io_base = (void __iomem *) io_p2v(timer->phys_base);
469#ifdef CONFIG_ARCH_OMAP2
470 sprintf(clk_name, "gpt%d_ick", i + 1);
471 timer->iclk = clk_get(NULL, clk_name);
472 sprintf(clk_name, "gpt%d_fck", i + 1);
473 timer->fclk = clk_get(NULL, clk_name);
474#endif
276 } 475 }
277}
278 476
279static int __init omap_dm_timer_init(void)
280{
281 if (cpu_is_omap16xx())
282 __dm_timer_init();
283 return 0; 477 return 0;
284} 478}
285
286arch_initcall(omap_dm_timer_init);
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 305e9b990b7..56acb8720f7 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/kernel.h> 2#include <linux/kernel.h>
4#include <linux/init.h> 3#include <linux/init.h>
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index d3c8ea7eecf..fec7970e564 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
@@ -537,6 +536,49 @@ static inline void _clear_gpio_irqstatus(struct gpio_bank *bank, int gpio)
537 _clear_gpio_irqbank(bank, 1 << get_gpio_index(gpio)); 536 _clear_gpio_irqbank(bank, 1 << get_gpio_index(gpio));
538} 537}
539 538
539static u32 _get_gpio_irqbank_mask(struct gpio_bank *bank)
540{
541 void __iomem *reg = bank->base;
542 int inv = 0;
543 u32 l;
544 u32 mask;
545
546 switch (bank->method) {
547 case METHOD_MPUIO:
548 reg += OMAP_MPUIO_GPIO_MASKIT;
549 mask = 0xffff;
550 inv = 1;
551 break;
552 case METHOD_GPIO_1510:
553 reg += OMAP1510_GPIO_INT_MASK;
554 mask = 0xffff;
555 inv = 1;
556 break;
557 case METHOD_GPIO_1610:
558 reg += OMAP1610_GPIO_IRQENABLE1;
559 mask = 0xffff;
560 break;
561 case METHOD_GPIO_730:
562 reg += OMAP730_GPIO_INT_MASK;
563 mask = 0xffffffff;
564 inv = 1;
565 break;
566 case METHOD_GPIO_24XX:
567 reg += OMAP24XX_GPIO_IRQENABLE1;
568 mask = 0xffffffff;
569 break;
570 default:
571 BUG();
572 return 0;
573 }
574
575 l = __raw_readl(reg);
576 if (inv)
577 l = ~l;
578 l &= mask;
579 return l;
580}
581
540static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable) 582static void _enable_gpio_irqbank(struct gpio_bank *bank, int gpio_mask, int enable)
541{ 583{
542 void __iomem *reg = bank->base; 584 void __iomem *reg = bank->base;
@@ -736,10 +778,12 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
736 u32 isr; 778 u32 isr;
737 unsigned int gpio_irq; 779 unsigned int gpio_irq;
738 struct gpio_bank *bank; 780 struct gpio_bank *bank;
781 u32 retrigger = 0;
782 int unmasked = 0;
739 783
740 desc->chip->ack(irq); 784 desc->chip->ack(irq);
741 785
742 bank = (struct gpio_bank *) desc->data; 786 bank = get_irq_data(irq);
743 if (bank->method == METHOD_MPUIO) 787 if (bank->method == METHOD_MPUIO)
744 isr_reg = bank->base + OMAP_MPUIO_GPIO_INT; 788 isr_reg = bank->base + OMAP_MPUIO_GPIO_INT;
745#ifdef CONFIG_ARCH_OMAP15XX 789#ifdef CONFIG_ARCH_OMAP15XX
@@ -760,18 +804,22 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
760#endif 804#endif
761 while(1) { 805 while(1) {
762 u32 isr_saved, level_mask = 0; 806 u32 isr_saved, level_mask = 0;
807 u32 enabled;
763 808
764 isr_saved = isr = __raw_readl(isr_reg); 809 enabled = _get_gpio_irqbank_mask(bank);
810 isr_saved = isr = __raw_readl(isr_reg) & enabled;
765 811
766 if (cpu_is_omap15xx() && (bank->method == METHOD_MPUIO)) 812 if (cpu_is_omap15xx() && (bank->method == METHOD_MPUIO))
767 isr &= 0x0000ffff; 813 isr &= 0x0000ffff;
768 814
769 if (cpu_is_omap24xx()) 815 if (cpu_is_omap24xx()) {
770 level_mask = 816 level_mask =
771 __raw_readl(bank->base + 817 __raw_readl(bank->base +
772 OMAP24XX_GPIO_LEVELDETECT0) | 818 OMAP24XX_GPIO_LEVELDETECT0) |
773 __raw_readl(bank->base + 819 __raw_readl(bank->base +
774 OMAP24XX_GPIO_LEVELDETECT1); 820 OMAP24XX_GPIO_LEVELDETECT1);
821 level_mask &= enabled;
822 }
775 823
776 /* clear edge sensitive interrupts before handler(s) are 824 /* clear edge sensitive interrupts before handler(s) are
777 called so that we don't miss any interrupt occurred while 825 called so that we don't miss any interrupt occurred while
@@ -782,19 +830,55 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
782 830
783 /* if there is only edge sensitive GPIO pin interrupts 831 /* if there is only edge sensitive GPIO pin interrupts
784 configured, we could unmask GPIO bank interrupt immediately */ 832 configured, we could unmask GPIO bank interrupt immediately */
785 if (!level_mask) 833 if (!level_mask && !unmasked) {
834 unmasked = 1;
786 desc->chip->unmask(irq); 835 desc->chip->unmask(irq);
836 }
787 837
838 isr |= retrigger;
839 retrigger = 0;
788 if (!isr) 840 if (!isr)
789 break; 841 break;
790 842
791 gpio_irq = bank->virtual_irq_start; 843 gpio_irq = bank->virtual_irq_start;
792 for (; isr != 0; isr >>= 1, gpio_irq++) { 844 for (; isr != 0; isr >>= 1, gpio_irq++) {
793 struct irqdesc *d; 845 struct irqdesc *d;
846 int irq_mask;
794 if (!(isr & 1)) 847 if (!(isr & 1))
795 continue; 848 continue;
796 d = irq_desc + gpio_irq; 849 d = irq_desc + gpio_irq;
850 /* Don't run the handler if it's already running
851 * or was disabled lazely.
852 */
853 if (unlikely((d->depth ||
854 (d->status & IRQ_INPROGRESS)))) {
855 irq_mask = 1 <<
856 (gpio_irq - bank->virtual_irq_start);
857 /* The unmasking will be done by
858 * enable_irq in case it is disabled or
859 * after returning from the handler if
860 * it's already running.
861 */
862 _enable_gpio_irqbank(bank, irq_mask, 0);
863 if (!d->depth) {
864 /* Level triggered interrupts
865 * won't ever be reentered
866 */
867 BUG_ON(level_mask & irq_mask);
868 d->status |= IRQ_PENDING;
869 }
870 continue;
871 }
872
797 desc_handle_irq(gpio_irq, d, regs); 873 desc_handle_irq(gpio_irq, d, regs);
874
875 if (unlikely((d->status & IRQ_PENDING) && !d->depth)) {
876 irq_mask = 1 <<
877 (gpio_irq - bank->virtual_irq_start);
878 d->status &= ~IRQ_PENDING;
879 _enable_gpio_irqbank(bank, irq_mask, 1);
880 retrigger |= irq_mask;
881 }
798 } 882 }
799 883
800 if (cpu_is_omap24xx()) { 884 if (cpu_is_omap24xx()) {
@@ -804,13 +888,14 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
804 _enable_gpio_irqbank(bank, isr_saved & level_mask, 1); 888 _enable_gpio_irqbank(bank, isr_saved & level_mask, 1);
805 } 889 }
806 890
807 /* if bank has any level sensitive GPIO pin interrupt
808 configured, we must unmask the bank interrupt only after
809 handler(s) are executed in order to avoid spurious bank
810 interrupt */
811 if (level_mask)
812 desc->chip->unmask(irq);
813 } 891 }
892 /* if bank has any level sensitive GPIO pin interrupt
893 configured, we must unmask the bank interrupt only after
894 handler(s) are executed in order to avoid spurious bank
895 interrupt */
896 if (!unmasked)
897 desc->chip->unmask(irq);
898
814} 899}
815 900
816static void gpio_ack_irq(unsigned int irq) 901static void gpio_ack_irq(unsigned int irq)
diff --git a/arch/arm/plat-omap/mux.c b/arch/arm/plat-omap/mux.c
index 8c1c016aa68..042105ac30b 100644
--- a/arch/arm/plat-omap/mux.c
+++ b/arch/arm/plat-omap/mux.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/arch/arm/plat-omap/ocpi.c b/arch/arm/plat-omap/ocpi.c
index 37792d43738..b5d307026c8 100644
--- a/arch/arm/plat-omap/ocpi.c
+++ b/arch/arm/plat-omap/ocpi.c
@@ -23,7 +23,6 @@
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
diff --git a/arch/arm/plat-omap/pm.c b/arch/arm/plat-omap/pm.c
index 1a24e2c1071..04b4102727a 100644
--- a/arch/arm/plat-omap/pm.c
+++ b/arch/arm/plat-omap/pm.c
@@ -580,7 +580,7 @@ static irqreturn_t omap_wakeup_interrupt(int irq, void * dev,
580 580
581static struct irqaction omap_wakeup_irq = { 581static struct irqaction omap_wakeup_irq = {
582 .name = "peripheral wakeup", 582 .name = "peripheral wakeup",
583 .flags = SA_INTERRUPT, 583 .flags = IRQF_DISABLED,
584 .handler = omap_wakeup_interrupt 584 .handler = omap_wakeup_interrupt
585}; 585};
586 586
diff --git a/arch/arm/plat-omap/sram-fn.S b/arch/arm/plat-omap/sram-fn.S
index 66414cc8e6e..85cffe2c626 100644
--- a/arch/arm/plat-omap/sram-fn.S
+++ b/arch/arm/plat-omap/sram-fn.S
@@ -8,7 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/linkage.h> 11#include <linux/linkage.h>
13#include <asm/assembler.h> 12#include <asm/assembler.h>
14#include <asm/arch/io.h> 13#include <asm/arch/io.h>
diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index b7bf09b1b41..e75718301b0 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
@@ -158,14 +157,12 @@ static struct map_desc omap_sram_io_desc[] __initdata = {
158 { /* .length gets filled in at runtime */ 157 { /* .length gets filled in at runtime */
159 .virtual = OMAP1_SRAM_VA, 158 .virtual = OMAP1_SRAM_VA,
160 .pfn = __phys_to_pfn(OMAP1_SRAM_PA), 159 .pfn = __phys_to_pfn(OMAP1_SRAM_PA),
161 .type = MT_DEVICE 160 .type = MT_MEMORY
162 } 161 }
163}; 162};
164 163
165/* 164/*
166 * In order to use last 2kB of SRAM on 1611b, we must round the size 165 * Note that we cannot use ioremap for SRAM, as clock init needs SRAM early.
167 * up to multiple of PAGE_SIZE. We cannot use ioremap for SRAM, as
168 * clock init needs SRAM early.
169 */ 166 */
170void __init omap_map_sram(void) 167void __init omap_map_sram(void)
171{ 168{
@@ -185,8 +182,7 @@ void __init omap_map_sram(void)
185 omap_sram_io_desc[0].pfn = __phys_to_pfn(base); 182 omap_sram_io_desc[0].pfn = __phys_to_pfn(base);
186 } 183 }
187 184
188 omap_sram_io_desc[0].length = (omap_sram_size + PAGE_SIZE-1)/PAGE_SIZE; 185 omap_sram_io_desc[0].length = 1024 * 1024; /* Use section desc */
189 omap_sram_io_desc[0].length *= PAGE_SIZE;
190 iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc)); 186 iotable_init(omap_sram_io_desc, ARRAY_SIZE(omap_sram_io_desc));
191 187
192 printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n", 188 printk(KERN_INFO "SRAM: Mapped pa 0x%08lx to va 0x%08lx size: 0x%lx\n",
diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index 3461a6c9665..281ecc7fcdf 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -7,6 +7,7 @@
7 * Partial timer rewrite and additional dynamic tick timer support by 7 * Partial timer rewrite and additional dynamic tick timer support by
8 * Tony Lindgen <tony@atomide.com> and 8 * Tony Lindgen <tony@atomide.com> and
9 * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com> 9 * Tuukka Tikkanen <tuukka.tikkanen@elektrobit.com>
10 * OMAP Dual-mode timer framework support by Timo Teras
10 * 11 *
11 * MPU timer code based on the older MPU timer code for OMAP 12 * MPU timer code based on the older MPU timer code for OMAP
12 * Copyright (C) 2000 RidgeRun, Inc. 13 * Copyright (C) 2000 RidgeRun, Inc.
@@ -33,7 +34,6 @@
33 * 675 Mass Ave, Cambridge, MA 02139, USA. 34 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */ 35 */
35 36
36#include <linux/config.h>
37#include <linux/kernel.h> 37#include <linux/kernel.h>
38#include <linux/init.h> 38#include <linux/init.h>
39#include <linux/delay.h> 39#include <linux/delay.h>
@@ -50,6 +50,7 @@
50#include <asm/irq.h> 50#include <asm/irq.h>
51#include <asm/mach/irq.h> 51#include <asm/mach/irq.h>
52#include <asm/mach/time.h> 52#include <asm/mach/time.h>
53#include <asm/arch/dmtimer.h>
53 54
54struct sys_timer omap_timer; 55struct sys_timer omap_timer;
55 56
@@ -79,18 +80,6 @@ struct sys_timer omap_timer;
79#define OMAP1_32K_TIMER_TVR 0x00 80#define OMAP1_32K_TIMER_TVR 0x00
80#define OMAP1_32K_TIMER_TCR 0x04 81#define OMAP1_32K_TIMER_TCR 0x04
81 82
82/* 24xx specific defines */
83#define OMAP2_GP_TIMER_BASE 0x48028000
84#define CM_CLKSEL_WKUP 0x48008440
85#define GP_TIMER_TIDR 0x00
86#define GP_TIMER_TISR 0x18
87#define GP_TIMER_TIER 0x1c
88#define GP_TIMER_TCLR 0x24
89#define GP_TIMER_TCRR 0x28
90#define GP_TIMER_TLDR 0x2c
91#define GP_TIMER_TTGR 0x30
92#define GP_TIMER_TSICR 0x40
93
94#define OMAP_32K_TICKS_PER_HZ (32768 / HZ) 83#define OMAP_32K_TICKS_PER_HZ (32768 / HZ)
95 84
96/* 85/*
@@ -102,54 +91,62 @@ struct sys_timer omap_timer;
102#define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \ 91#define JIFFIES_TO_HW_TICKS(nr_jiffies, clock_rate) \
103 (((nr_jiffies) * (clock_rate)) / HZ) 92 (((nr_jiffies) * (clock_rate)) / HZ)
104 93
94#if defined(CONFIG_ARCH_OMAP1)
95
105static inline void omap_32k_timer_write(int val, int reg) 96static inline void omap_32k_timer_write(int val, int reg)
106{ 97{
107 if (cpu_class_is_omap1()) 98 omap_writew(val, OMAP1_32K_TIMER_BASE + reg);
108 omap_writew(val, OMAP1_32K_TIMER_BASE + reg);
109
110 if (cpu_is_omap24xx())
111 omap_writel(val, OMAP2_GP_TIMER_BASE + reg);
112} 99}
113 100
114static inline unsigned long omap_32k_timer_read(int reg) 101static inline unsigned long omap_32k_timer_read(int reg)
115{ 102{
116 if (cpu_class_is_omap1()) 103 return omap_readl(OMAP1_32K_TIMER_BASE + reg) & 0xffffff;
117 return omap_readl(OMAP1_32K_TIMER_BASE + reg) & 0xffffff; 104}
118 105
119 if (cpu_is_omap24xx()) 106static inline void omap_32k_timer_start(unsigned long load_val)
120 return omap_readl(OMAP2_GP_TIMER_BASE + reg); 107{
108 omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR);
109 omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR);
121} 110}
122 111
123/* 112static inline void omap_32k_timer_stop(void)
124 * The 32KHz synchronized timer is an additional timer on 16xx.
125 * It is always running.
126 */
127static inline unsigned long omap_32k_sync_timer_read(void)
128{ 113{
129 return omap_readl(TIMER_32K_SYNCHRONIZED); 114 omap_32k_timer_write(0x0, OMAP1_32K_TIMER_CR);
130} 115}
131 116
117#define omap_32k_timer_ack_irq()
118
119#elif defined(CONFIG_ARCH_OMAP2)
120
121static struct omap_dm_timer *gptimer;
122
132static inline void omap_32k_timer_start(unsigned long load_val) 123static inline void omap_32k_timer_start(unsigned long load_val)
133{ 124{
134 if (cpu_class_is_omap1()) { 125 omap_dm_timer_set_load(gptimer, 1, 0xffffffff - load_val);
135 omap_32k_timer_write(load_val, OMAP1_32K_TIMER_TVR); 126 omap_dm_timer_set_int_enable(gptimer, OMAP_TIMER_INT_OVERFLOW);
136 omap_32k_timer_write(0x0f, OMAP1_32K_TIMER_CR); 127 omap_dm_timer_start(gptimer);
137 }
138
139 if (cpu_is_omap24xx()) {
140 omap_32k_timer_write(0xffffffff - load_val, GP_TIMER_TCRR);
141 omap_32k_timer_write((1 << 1), GP_TIMER_TIER);
142 omap_32k_timer_write((1 << 1) | 1, GP_TIMER_TCLR);
143 }
144} 128}
145 129
146static inline void omap_32k_timer_stop(void) 130static inline void omap_32k_timer_stop(void)
147{ 131{
148 if (cpu_class_is_omap1()) 132 omap_dm_timer_stop(gptimer);
149 omap_32k_timer_write(0x0, OMAP1_32K_TIMER_CR); 133}
150 134
151 if (cpu_is_omap24xx()) 135static inline void omap_32k_timer_ack_irq(void)
152 omap_32k_timer_write(0x0, GP_TIMER_TCLR); 136{
137 u32 status = omap_dm_timer_read_status(gptimer);
138 omap_dm_timer_write_status(gptimer, status);
139}
140
141#endif
142
143/*
144 * The 32KHz synchronized timer is an additional timer on 16xx.
145 * It is always running.
146 */
147static inline unsigned long omap_32k_sync_timer_read(void)
148{
149 return omap_readl(TIMER_32K_SYNCHRONIZED);
153} 150}
154 151
155/* 152/*
@@ -203,11 +200,7 @@ static irqreturn_t omap_32k_timer_interrupt(int irq, void *dev_id,
203 200
204 write_seqlock_irqsave(&xtime_lock, flags); 201 write_seqlock_irqsave(&xtime_lock, flags);
205 202
206 if (cpu_is_omap24xx()) { 203 omap_32k_timer_ack_irq();
207 u32 status = omap_32k_timer_read(GP_TIMER_TISR);
208 omap_32k_timer_write(status, GP_TIMER_TISR);
209 }
210
211 now = omap_32k_sync_timer_read(); 204 now = omap_32k_sync_timer_read();
212 205
213 while ((signed long)(now - omap_32k_last_tick) 206 while ((signed long)(now - omap_32k_last_tick)
@@ -265,13 +258,10 @@ static struct dyn_tick_timer omap_dyn_tick_timer = {
265 258
266static struct irqaction omap_32k_timer_irq = { 259static struct irqaction omap_32k_timer_irq = {
267 .name = "32KHz timer", 260 .name = "32KHz timer",
268 .flags = SA_INTERRUPT | SA_TIMER, 261 .flags = IRQF_DISABLED | IRQF_TIMER,
269 .handler = omap_32k_timer_interrupt, 262 .handler = omap_32k_timer_interrupt,
270}; 263};
271 264
272static struct clk * gpt1_ick;
273static struct clk * gpt1_fck;
274
275static __init void omap_init_32k_timer(void) 265static __init void omap_init_32k_timer(void)
276{ 266{
277#ifdef CONFIG_NO_IDLE_HZ 267#ifdef CONFIG_NO_IDLE_HZ
@@ -280,32 +270,22 @@ static __init void omap_init_32k_timer(void)
280 270
281 if (cpu_class_is_omap1()) 271 if (cpu_class_is_omap1())
282 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq); 272 setup_irq(INT_OS_TIMER, &omap_32k_timer_irq);
283 if (cpu_is_omap24xx())
284 setup_irq(37, &omap_32k_timer_irq);
285 omap_timer.offset = omap_32k_timer_gettimeoffset; 273 omap_timer.offset = omap_32k_timer_gettimeoffset;
286 omap_32k_last_tick = omap_32k_sync_timer_read(); 274 omap_32k_last_tick = omap_32k_sync_timer_read();
287 275
276#ifdef CONFIG_ARCH_OMAP2
288 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */ 277 /* REVISIT: Check 24xx TIOCP_CFG settings after idle works */
289 if (cpu_is_omap24xx()) { 278 if (cpu_is_omap24xx()) {
290 omap_32k_timer_write(0, GP_TIMER_TCLR); 279 gptimer = omap_dm_timer_request_specific(1);
291 omap_writel(0, CM_CLKSEL_WKUP); /* 32KHz clock source */ 280 BUG_ON(gptimer == NULL);
292 281
293 gpt1_ick = clk_get(NULL, "gpt1_ick"); 282 omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_32_KHZ);
294 if (IS_ERR(gpt1_ick)) 283 setup_irq(omap_dm_timer_get_irq(gptimer), &omap_32k_timer_irq);
295 printk(KERN_ERR "Could not get gpt1_ick\n"); 284 omap_dm_timer_set_int_enable(gptimer,
296 else 285 OMAP_TIMER_INT_CAPTURE | OMAP_TIMER_INT_OVERFLOW |
297 clk_enable(gpt1_ick); 286 OMAP_TIMER_INT_MATCH);
298
299 gpt1_fck = clk_get(NULL, "gpt1_fck");
300 if (IS_ERR(gpt1_fck))
301 printk(KERN_ERR "Could not get gpt1_fck\n");
302 else
303 clk_enable(gpt1_fck);
304
305 mdelay(100); /* Wait for clocks to stabilize */
306
307 omap_32k_timer_write(0x7, GP_TIMER_TISR);
308 } 287 }
288#endif
309 289
310 omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD); 290 omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD);
311} 291}
@@ -317,6 +297,9 @@ static __init void omap_init_32k_timer(void)
317 */ 297 */
318static void __init omap_timer_init(void) 298static void __init omap_timer_init(void)
319{ 299{
300#ifdef CONFIG_OMAP_DM_TIMER
301 omap_dm_timer_init();
302#endif
320 omap_init_32k_timer(); 303 omap_init_32k_timer();
321} 304}
322 305
diff --git a/arch/arm/plat-omap/usb.c b/arch/arm/plat-omap/usb.c
index 00afc7a8c2a..9b815327b6a 100644
--- a/arch/arm/plat-omap/usb.c
+++ b/arch/arm/plat-omap/usb.c
@@ -20,7 +20,6 @@
20 20
21#undef DEBUG 21#undef DEBUG
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 2476f4c2e76..9d265d5e748 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -9,7 +9,6 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/signal.h> 14#include <linux/signal.h>
diff --git a/arch/arm26/Kconfig b/arch/arm26/Kconfig
index cf4ebf4c274..c14fe918bc4 100644
--- a/arch/arm26/Kconfig
+++ b/arch/arm26/Kconfig
@@ -79,7 +79,7 @@ config ARCH_A5K
79 bool "A5000" 79 bool "A5000"
80 select ARCH_MAY_HAVE_PC_FDC 80 select ARCH_MAY_HAVE_PC_FDC
81 help 81 help
82 Say Y here to to support the Acorn A5000. 82 Say Y here to support the Acorn A5000.
83 83
84 Linux can support the 84 Linux can support the
85 internal IDE disk and CD-ROM interface, serial and parallel port, 85 internal IDE disk and CD-ROM interface, serial and parallel port,
@@ -129,7 +129,7 @@ config ZBOOT_ROM_BSS
129config XIP_KERNEL 129config XIP_KERNEL
130 bool "Execute In Place (XIP) kernel image" 130 bool "Execute In Place (XIP) kernel image"
131 help 131 help
132 Select this option to create a kernel that can be programed into 132 Select this option to create a kernel that can be programmed into
133 the OS ROMs. 133 the OS ROMs.
134 134
135comment "At least one math emulation must be selected" 135comment "At least one math emulation must be selected"
@@ -140,7 +140,7 @@ config FPE_NWFPE
140 Say Y to include the NWFPE floating point emulator in the kernel. 140 Say Y to include the NWFPE floating point emulator in the kernel.
141 This is necessary to run most binaries. Linux does not currently 141 This is necessary to run most binaries. Linux does not currently
142 support floating point hardware so you need to say Y here even if 142 support floating point hardware so you need to say Y here even if
143 your machine has an FPA or floating point co-processor podule. 143 your machine has an FPA or floating point co-processor module.
144 144
145 It is also possible to say M to build the emulator as a module 145 It is also possible to say M to build the emulator as a module
146 (nwfpe) or indeed to leave it out altogether. However, unless you 146 (nwfpe) or indeed to leave it out altogether. However, unless you
diff --git a/arch/arm26/boot/compressed/head.S b/arch/arm26/boot/compressed/head.S
index 0307804a607..2a2cda36d83 100644
--- a/arch/arm26/boot/compressed/head.S
+++ b/arch/arm26/boot/compressed/head.S
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12 11
13/* 12/*
diff --git a/arch/arm26/kernel/armksyms.c b/arch/arm26/kernel/armksyms.c
index 9d66c27f272..07907b6ecb6 100644
--- a/arch/arm26/kernel/armksyms.c
+++ b/arch/arm26/kernel/armksyms.c
@@ -8,7 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/user.h> 12#include <linux/user.h>
14#include <linux/string.h> 13#include <linux/string.h>
diff --git a/arch/arm26/kernel/asm-offsets.c b/arch/arm26/kernel/asm-offsets.c
index ac682d5fd03..76d9d7d489a 100644
--- a/arch/arm26/kernel/asm-offsets.c
+++ b/arch/arm26/kernel/asm-offsets.c
@@ -12,7 +12,6 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
18 17
diff --git a/arch/arm26/kernel/compat.c b/arch/arm26/kernel/compat.c
index db0310db899..21e966ff0aa 100644
--- a/arch/arm26/kernel/compat.c
+++ b/arch/arm26/kernel/compat.c
@@ -16,7 +16,6 @@
16 * the kernel for 5 years from now (2001). This will allow boot loaders 16 * the kernel for 5 years from now (2001). This will allow boot loaders
17 * to convert to the new struct tag way. 17 * to convert to the new struct tag way.
18 */ 18 */
19#include <linux/config.h>
20#include <linux/types.h> 19#include <linux/types.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/string.h> 21#include <linux/string.h>
diff --git a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c
index f2278aadac8..047d0a408b9 100644
--- a/arch/arm26/kernel/ecard.c
+++ b/arch/arm26/kernel/ecard.c
@@ -24,7 +24,6 @@
24 */ 24 */
25#define ECARD_C 25#define ECARD_C
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/types.h> 29#include <linux/types.h>
diff --git a/arch/arm26/kernel/fiq.c b/arch/arm26/kernel/fiq.c
index a24272b61f3..c4776c96be6 100644
--- a/arch/arm26/kernel/fiq.c
+++ b/arch/arm26/kernel/fiq.c
@@ -36,7 +36,6 @@
36 * - enables FIQ. 36 * - enables FIQ.
37 * 6. Goto 3 37 * 6. Goto 3
38 */ 38 */
39#include <linux/config.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/mm.h> 40#include <linux/mm.h>
42#include <linux/mman.h> 41#include <linux/mman.h>
diff --git a/arch/arm26/kernel/head.S b/arch/arm26/kernel/head.S
index 8bfc62539ba..93575e0e58f 100644
--- a/arch/arm26/kernel/head.S
+++ b/arch/arm26/kernel/head.S
@@ -10,7 +10,6 @@
10 * 10 *
11 * 26-bit kernel startup code 11 * 26-bit kernel startup code
12 */ 12 */
13#include <linux/config.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/mach-types.h> 14#include <asm/mach-types.h>
16 15
diff --git a/arch/arm26/kernel/irq.c b/arch/arm26/kernel/irq.c
index 0934e6fba60..d87d68b77d6 100644
--- a/arch/arm26/kernel/irq.c
+++ b/arch/arm26/kernel/irq.c
@@ -18,7 +18,6 @@
18 * IRQ's are in fact implemented a bit like signal handlers for the kernel. 18 * IRQ's are in fact implemented a bit like signal handlers for the kernel.
19 * Naturally it's not a 1:1 relation, but there are similarities. 19 * Naturally it's not a 1:1 relation, but there are similarities.
20 */ 20 */
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/ptrace.h> 22#include <linux/ptrace.h>
24#include <linux/kernel_stat.h> 23#include <linux/kernel_stat.h>
@@ -191,7 +190,7 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
191 int ret; 190 int ret;
192 191
193 spin_unlock(&irq_controller_lock); 192 spin_unlock(&irq_controller_lock);
194 if (!(action->flags & SA_INTERRUPT)) 193 if (!(action->flags & IRQF_DISABLED))
195 local_irq_enable(); 194 local_irq_enable();
196 195
197 status = 0; 196 status = 0;
@@ -202,7 +201,7 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
202 action = action->next; 201 action = action->next;
203 } while (action); 202 } while (action);
204 203
205 if (status & SA_SAMPLE_RANDOM) 204 if (status & IRQF_SAMPLE_RANDOM)
206 add_interrupt_randomness(irq); 205 add_interrupt_randomness(irq);
207 206
208 spin_lock_irq(&irq_controller_lock); 207 spin_lock_irq(&irq_controller_lock);
@@ -452,7 +451,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
452 * so we have to be careful not to interfere with a 451 * so we have to be careful not to interfere with a
453 * running system. 452 * running system.
454 */ 453 */
455 if (new->flags & SA_SAMPLE_RANDOM) { 454 if (new->flags & IRQF_SAMPLE_RANDOM) {
456 /* 455 /*
457 * This function might sleep, we want to call it first, 456 * This function might sleep, we want to call it first,
458 * outside of the atomic block. 457 * outside of the atomic block.
@@ -472,7 +471,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
472 p = &desc->action; 471 p = &desc->action;
473 if ((old = *p) != NULL) { 472 if ((old = *p) != NULL) {
474 /* Can't share interrupts unless both agree to */ 473 /* Can't share interrupts unless both agree to */
475 if (!(old->flags & new->flags & SA_SHIRQ)) { 474 if (!(old->flags & new->flags & IRQF_SHARED)) {
476 spin_unlock_irqrestore(&irq_controller_lock, flags); 475 spin_unlock_irqrestore(&irq_controller_lock, flags);
477 return -EBUSY; 476 return -EBUSY;
478 } 477 }
@@ -527,11 +526,11 @@ int setup_irq(unsigned int irq, struct irqaction *new)
527 * 526 *
528 * Flags: 527 * Flags:
529 * 528 *
530 * SA_SHIRQ Interrupt is shared 529 * IRQF_SHARED Interrupt is shared
531 * 530 *
532 * SA_INTERRUPT Disable local interrupts while processing 531 * IRQF_DISABLED Disable local interrupts while processing
533 * 532 *
534 * SA_SAMPLE_RANDOM The interrupt can be used for entropy 533 * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy
535 * 534 *
536 */ 535 */
537 536
@@ -543,7 +542,7 @@ int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_
543 struct irqaction *action; 542 struct irqaction *action;
544 543
545 if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler || 544 if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler ||
546 (irq_flags & SA_SHIRQ && !dev_id)) 545 (irq_flags & IRQF_SHARED && !dev_id))
547 return -EINVAL; 546 return -EINVAL;
548 547
549 action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL); 548 action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL);
diff --git a/arch/arm26/kernel/process.c b/arch/arm26/kernel/process.c
index 38630565917..dcd81e62ff4 100644
--- a/arch/arm26/kernel/process.c
+++ b/arch/arm26/kernel/process.c
@@ -11,7 +11,6 @@
11 */ 11 */
12#include <stdarg.h> 12#include <stdarg.h>
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/arm26/kernel/ptrace.c b/arch/arm26/kernel/ptrace.c
index 282e24d7932..9343889b27f 100644
--- a/arch/arm26/kernel/ptrace.c
+++ b/arch/arm26/kernel/ptrace.c
@@ -9,7 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/arch/arm26/kernel/semaphore.c b/arch/arm26/kernel/semaphore.c
index 3023a53431f..5447a06db3f 100644
--- a/arch/arm26/kernel/semaphore.c
+++ b/arch/arm26/kernel/semaphore.c
@@ -13,7 +13,6 @@
13 * published by the Free Software Foundation. 13 * published by the Free Software Foundation.
14 */ 14 */
15#include <linux/module.h> 15#include <linux/module.h>
16#include <linux/config.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/arch/arm26/kernel/setup.c b/arch/arm26/kernel/setup.c
index 4eb329e3828..843c29fe9af 100644
--- a/arch/arm26/kernel/setup.c
+++ b/arch/arm26/kernel/setup.c
@@ -8,7 +8,6 @@
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/ioport.h> 13#include <linux/ioport.h>
diff --git a/arch/arm26/kernel/signal.c b/arch/arm26/kernel/signal.c
index 2a48c12100c..6a8ef8da6da 100644
--- a/arch/arm26/kernel/signal.c
+++ b/arch/arm26/kernel/signal.c
@@ -10,7 +10,6 @@
10 * it under the terms of the GNU General Public License version 2 as 10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
16#include <linux/smp.h> 15#include <linux/smp.h>
diff --git a/arch/arm26/kernel/time.c b/arch/arm26/kernel/time.c
index 335525339ad..db63d75d071 100644
--- a/arch/arm26/kernel/time.c
+++ b/arch/arm26/kernel/time.c
@@ -18,7 +18,6 @@
18 * "A Kernel Model for Precision Timekeeping" by Dave Mills 18 * "A Kernel Model for Precision Timekeeping" by Dave Mills
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
@@ -206,7 +205,7 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
206 205
207static struct irqaction timer_irq = { 206static struct irqaction timer_irq = {
208 .name = "timer", 207 .name = "timer",
209 .flags = SA_INTERRUPT, 208 .flags = IRQF_DISABLED,
210 .handler = timer_interrupt, 209 .handler = timer_interrupt,
211}; 210};
212 211
diff --git a/arch/arm26/kernel/traps.c b/arch/arm26/kernel/traps.c
index a79de041b50..d594fb59e94 100644
--- a/arch/arm26/kernel/traps.c
+++ b/arch/arm26/kernel/traps.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/signal.h> 20#include <linux/signal.h>
diff --git a/arch/arm26/kernel/vmlinux.lds.S b/arch/arm26/kernel/vmlinux.lds.S
index 811a6904801..1fa39f02e07 100644
--- a/arch/arm26/kernel/vmlinux.lds.S
+++ b/arch/arm26/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#ifdef CONFIG_XIP_KERNEL 2#ifdef CONFIG_XIP_KERNEL
4 3
diff --git a/arch/arm26/lib/backtrace.S b/arch/arm26/lib/backtrace.S
index d793fe4339f..e27feb1e891 100644
--- a/arch/arm26/lib/backtrace.S
+++ b/arch/arm26/lib/backtrace.S
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12#include <asm/assembler.h> 11#include <asm/assembler.h>
13 .text 12 .text
diff --git a/arch/arm26/lib/csumpartialcopyuser.S b/arch/arm26/lib/csumpartialcopyuser.S
index 261dd154c1a..a98eea74305 100644
--- a/arch/arm26/lib/csumpartialcopyuser.S
+++ b/arch/arm26/lib/csumpartialcopyuser.S
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12#include <asm/assembler.h> 11#include <asm/assembler.h>
13#include <asm/errno.h> 12#include <asm/errno.h>
diff --git a/arch/arm26/lib/kbd.c b/arch/arm26/lib/kbd.c
index 22d2c93aaf1..cb56e943e00 100644
--- a/arch/arm26/lib/kbd.c
+++ b/arch/arm26/lib/kbd.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kd.h> 1#include <linux/kd.h>
3//#include <linux/kbd_ll.h> 2//#include <linux/kbd_ll.h>
4#include <linux/kbd_kern.h> 3#include <linux/kbd_kern.h>
diff --git a/arch/arm26/lib/lib1funcs.S b/arch/arm26/lib/lib1funcs.S
index b8f9518db87..0e29970b0e8 100644
--- a/arch/arm26/lib/lib1funcs.S
+++ b/arch/arm26/lib/lib1funcs.S
@@ -39,7 +39,6 @@ Boston, MA 02111-1307, USA. */
39#include <linux/linkage.h> 39#include <linux/linkage.h>
40#include <asm/assembler.h> 40#include <asm/assembler.h>
41#include <asm/hardware.h> 41#include <asm/hardware.h>
42#include <linux/config.h>
43 42
44#define RET movs 43#define RET movs
45#define RETc(x) mov##x##s 44#define RETc(x) mov##x##s
diff --git a/arch/arm26/machine/dma.c b/arch/arm26/machine/dma.c
index cbc7c61d5b3..4402a5a1b78 100644
--- a/arch/arm26/machine/dma.c
+++ b/arch/arm26/machine/dma.c
@@ -10,7 +10,6 @@
10 * 10 *
11 * DMA functions specific to Archimedes and A5000 architecture 11 * DMA functions specific to Archimedes and A5000 architecture
12 */ 12 */
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/init.h> 14#include <linux/init.h>
16 15
diff --git a/arch/arm26/machine/irq.c b/arch/arm26/machine/irq.c
index 4361863f7ed..a60d543edec 100644
--- a/arch/arm26/machine/irq.c
+++ b/arch/arm26/machine/irq.c
@@ -16,7 +16,6 @@
16 * 08-09-2002 IM Brought up to date for 2.5 16 * 08-09-2002 IM Brought up to date for 2.5
17 * 01-06-2003 JMA Removed arc_fiq_chip 17 * 01-06-2003 JMA Removed arc_fiq_chip
18 */ 18 */
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21 20
22#include <asm/irq.h> 21#include <asm/irq.h>
diff --git a/arch/arm26/mm/extable.c b/arch/arm26/mm/extable.c
index 2d9f5b5a78d..38e1958d953 100644
--- a/arch/arm26/mm/extable.c
+++ b/arch/arm26/mm/extable.c
@@ -2,7 +2,6 @@
2 * linux/arch/arm26/mm/extable.c 2 * linux/arch/arm26/mm/extable.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <asm/uaccess.h> 6#include <asm/uaccess.h>
8 7
diff --git a/arch/arm26/mm/fault.c b/arch/arm26/mm/fault.c
index bd6f2db608b..761938b5667 100644
--- a/arch/arm26/mm/fault.c
+++ b/arch/arm26/mm/fault.c
@@ -8,7 +8,6 @@
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/signal.h> 11#include <linux/signal.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/arch/arm26/mm/init.c b/arch/arm26/mm/init.c
index 7da8a520567..562fac12eb9 100644
--- a/arch/arm26/mm/init.c
+++ b/arch/arm26/mm/init.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/signal.h> 10#include <linux/signal.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/arm26/nwfpe/fpmodule.c b/arch/arm26/nwfpe/fpmodule.c
index 5258c6096fb..a8fad92eb44 100644
--- a/arch/arm26/nwfpe/fpmodule.c
+++ b/arch/arm26/nwfpe/fpmodule.c
@@ -25,7 +25,6 @@
25 25
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/version.h> 27#include <linux/version.h>
28#include <linux/config.h>
29 28
30/* XXX */ 29/* XXX */
31#include <linux/errno.h> 30#include <linux/errno.h>
diff --git a/arch/arm26/nwfpe/fpmodule.h b/arch/arm26/nwfpe/fpmodule.h
index ef71aab46a3..f971ddd60cc 100644
--- a/arch/arm26/nwfpe/fpmodule.h
+++ b/arch/arm26/nwfpe/fpmodule.h
@@ -22,7 +22,6 @@
22#ifndef __FPMODULE_H__ 22#ifndef __FPMODULE_H__
23#define __FPMODULE_H__ 23#define __FPMODULE_H__
24 24
25#include <linux/config.h>
26 25
27#define REG_ORIG_R0 16 26#define REG_ORIG_R0 16
28#define REG_CPSR 15 27#define REG_CPSR 15
diff --git a/arch/cris/arch-v10/boot/compressed/head.S b/arch/cris/arch-v10/boot/compressed/head.S
index e73f44c998d..610bdb23755 100644
--- a/arch/cris/arch-v10/boot/compressed/head.S
+++ b/arch/cris/arch-v10/boot/compressed/head.S
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#define ASSEMBLER_MACROS_ONLY 11#define ASSEMBLER_MACROS_ONLY
13#include <asm/arch/sv_addr_ag.h> 12#include <asm/arch/sv_addr_ag.h>
14 13
diff --git a/arch/cris/arch-v10/boot/compressed/misc.c b/arch/cris/arch-v10/boot/compressed/misc.c
index 1b5e83f1f84..ffb8d21b2f8 100644
--- a/arch/cris/arch-v10/boot/compressed/misc.c
+++ b/arch/cris/arch-v10/boot/compressed/misc.c
@@ -20,7 +20,6 @@
20 20
21#define KERNEL_LOAD_ADR 0x40004000 21#define KERNEL_LOAD_ADR 0x40004000
22 22
23#include <linux/config.h>
24 23
25#include <linux/types.h> 24#include <linux/types.h>
26#include <asm/arch/svinto.h> 25#include <asm/arch/svinto.h>
diff --git a/arch/cris/arch-v10/boot/rescue/head.S b/arch/cris/arch-v10/boot/rescue/head.S
index addb2194de0..f223cc0c00b 100644
--- a/arch/cris/arch-v10/boot/rescue/head.S
+++ b/arch/cris/arch-v10/boot/rescue/head.S
@@ -63,7 +63,6 @@
63 * Copyright (C) 1999, 2000, 2001, 2002, 2003 Axis Communications AB 63 * Copyright (C) 1999, 2000, 2001, 2002, 2003 Axis Communications AB
64 */ 64 */
65 65
66#include <linux/config.h>
67#define ASSEMBLER_MACROS_ONLY 66#define ASSEMBLER_MACROS_ONLY
68#include <asm/arch/sv_addr_ag.h> 67#include <asm/arch/sv_addr_ag.h>
69 68
diff --git a/arch/cris/arch-v10/boot/rescue/kimagerescue.S b/arch/cris/arch-v10/boot/rescue/kimagerescue.S
index 264bf7afc9a..cbccd6316d3 100644
--- a/arch/cris/arch-v10/boot/rescue/kimagerescue.S
+++ b/arch/cris/arch-v10/boot/rescue/kimagerescue.S
@@ -6,7 +6,6 @@
6 * 4004000 and after a timeout jump to it. 6 * 4004000 and after a timeout jump to it.
7 */ 7 */
8 8
9#include <linux/config.h>
10#define ASSEMBLER_MACROS_ONLY 9#define ASSEMBLER_MACROS_ONLY
11#include <asm/sv_addr_ag.h> 10#include <asm/sv_addr_ag.h>
12 11
diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c
index 56b038c8d48..4fa81abab0c 100644
--- a/arch/cris/arch-v10/drivers/axisflashmap.c
+++ b/arch/cris/arch-v10/drivers/axisflashmap.c
@@ -138,7 +138,6 @@
138#include <linux/module.h> 138#include <linux/module.h>
139#include <linux/types.h> 139#include <linux/types.h>
140#include <linux/kernel.h> 140#include <linux/kernel.h>
141#include <linux/config.h>
142#include <linux/init.h> 141#include <linux/init.h>
143#include <linux/slab.h> 142#include <linux/slab.h>
144 143
diff --git a/arch/cris/arch-v10/drivers/ds1302.c b/arch/cris/arch-v10/drivers/ds1302.c
index b100f26497c..3cf4f23de1d 100644
--- a/arch/cris/arch-v10/drivers/ds1302.c
+++ b/arch/cris/arch-v10/drivers/ds1302.c
@@ -139,7 +139,6 @@
139*! 139*!
140*!***************************************************************************/ 140*!***************************************************************************/
141 141
142#include <linux/config.h>
143 142
144#include <linux/fs.h> 143#include <linux/fs.h>
145#include <linux/init.h> 144#include <linux/init.h>
diff --git a/arch/cris/arch-v10/drivers/eeprom.c b/arch/cris/arch-v10/drivers/eeprom.c
index 512f16dec06..03758202856 100644
--- a/arch/cris/arch-v10/drivers/eeprom.c
+++ b/arch/cris/arch-v10/drivers/eeprom.c
@@ -93,7 +93,6 @@
93*! (c) 1999 Axis Communications AB, Lund, Sweden 93*! (c) 1999 Axis Communications AB, Lund, Sweden
94*!*****************************************************************************/ 94*!*****************************************************************************/
95 95
96#include <linux/config.h>
97#include <linux/kernel.h> 96#include <linux/kernel.h>
98#include <linux/sched.h> 97#include <linux/sched.h>
99#include <linux/fs.h> 98#include <linux/fs.h>
diff --git a/arch/cris/arch-v10/drivers/gpio.c b/arch/cris/arch-v10/drivers/gpio.c
index 09963fe299a..48fd801792d 100644
--- a/arch/cris/arch-v10/drivers/gpio.c
+++ b/arch/cris/arch-v10/drivers/gpio.c
@@ -135,7 +135,6 @@
135 * 135 *
136 */ 136 */
137 137
138#include <linux/config.h>
139 138
140#include <linux/module.h> 139#include <linux/module.h>
141#include <linux/sched.h> 140#include <linux/sched.h>
@@ -938,11 +937,11 @@ gpio_init(void)
938 * in some tests. 937 * in some tests.
939 */ 938 */
940 if (request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt, 939 if (request_irq(TIMER0_IRQ_NBR, gpio_poll_timer_interrupt,
941 SA_SHIRQ | SA_INTERRUPT,"gpio poll", NULL)) { 940 IRQF_SHARED | IRQF_DISABLED,"gpio poll", NULL)) {
942 printk(KERN_CRIT "err: timer0 irq for gpio\n"); 941 printk(KERN_CRIT "err: timer0 irq for gpio\n");
943 } 942 }
944 if (request_irq(PA_IRQ_NBR, gpio_pa_interrupt, 943 if (request_irq(PA_IRQ_NBR, gpio_pa_interrupt,
945 SA_SHIRQ | SA_INTERRUPT,"gpio PA", NULL)) { 944 IRQF_SHARED | IRQF_DISABLED,"gpio PA", NULL)) {
946 printk(KERN_CRIT "err: PA irq for gpio\n"); 945 printk(KERN_CRIT "err: PA irq for gpio\n");
947 } 946 }
948 947
diff --git a/arch/cris/arch-v10/drivers/i2c.c b/arch/cris/arch-v10/drivers/i2c.c
index b38267d60d3..6114596c3b3 100644
--- a/arch/cris/arch-v10/drivers/i2c.c
+++ b/arch/cris/arch-v10/drivers/i2c.c
@@ -96,7 +96,6 @@
96#include <linux/fs.h> 96#include <linux/fs.h>
97#include <linux/string.h> 97#include <linux/string.h>
98#include <linux/init.h> 98#include <linux/init.h>
99#include <linux/config.h>
100 99
101#include <asm/etraxi2c.h> 100#include <asm/etraxi2c.h>
102 101
diff --git a/arch/cris/arch-v10/drivers/pcf8563.c b/arch/cris/arch-v10/drivers/pcf8563.c
index af517c21038..8c830eefc89 100644
--- a/arch/cris/arch-v10/drivers/pcf8563.c
+++ b/arch/cris/arch-v10/drivers/pcf8563.c
@@ -18,7 +18,6 @@
18 * $Id: pcf8563.c,v 1.11 2005/03/07 13:13:07 starvik Exp $ 18 * $Id: pcf8563.c,v 1.11 2005/03/07 13:13:07 starvik Exp $
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/types.h> 23#include <linux/types.h>
diff --git a/arch/cris/arch-v10/kernel/crisksyms.c b/arch/cris/arch-v10/kernel/crisksyms.c
index b332bf9b312..e6b80135502 100644
--- a/arch/cris/arch-v10/kernel/crisksyms.c
+++ b/arch/cris/arch-v10/kernel/crisksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <asm/io.h> 2#include <asm/io.h>
4#include <asm/arch/svinto.h> 3#include <asm/arch/svinto.h>
diff --git a/arch/cris/arch-v10/kernel/debugport.c b/arch/cris/arch-v10/kernel/debugport.c
index dde813e1629..2b536ca6f44 100644
--- a/arch/cris/arch-v10/kernel/debugport.c
+++ b/arch/cris/arch-v10/kernel/debugport.c
@@ -103,7 +103,6 @@
103 * 103 *
104 */ 104 */
105 105
106#include <linux/config.h>
107#include <linux/console.h> 106#include <linux/console.h>
108#include <linux/init.h> 107#include <linux/init.h>
109#include <linux/major.h> 108#include <linux/major.h>
diff --git a/arch/cris/arch-v10/kernel/entry.S b/arch/cris/arch-v10/kernel/entry.S
index c808005e845..ae45d4522e6 100644
--- a/arch/cris/arch-v10/kernel/entry.S
+++ b/arch/cris/arch-v10/kernel/entry.S
@@ -263,7 +263,6 @@
263 * 263 *
264 */ 264 */
265 265
266#include <linux/config.h>
267#include <linux/linkage.h> 266#include <linux/linkage.h>
268#include <linux/sys.h> 267#include <linux/sys.h>
269#include <asm/unistd.h> 268#include <asm/unistd.h>
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c
index cac05a5e514..8cbdf594b36 100644
--- a/arch/cris/arch-v10/kernel/fasttimer.c
+++ b/arch/cris/arch-v10/kernel/fasttimer.c
@@ -111,7 +111,6 @@
111#include <asm/delay.h> 111#include <asm/delay.h>
112#include <asm/rtc.h> 112#include <asm/rtc.h>
113 113
114#include <linux/config.h>
115 114
116#include <asm/arch/svinto.h> 115#include <asm/arch/svinto.h>
117#include <asm/fasttimer.h> 116#include <asm/fasttimer.h>
diff --git a/arch/cris/arch-v10/kernel/head.S b/arch/cris/arch-v10/kernel/head.S
index f00c145b43f..d946d8b8d27 100644
--- a/arch/cris/arch-v10/kernel/head.S
+++ b/arch/cris/arch-v10/kernel/head.S
@@ -183,7 +183,6 @@
183 * 183 *
184 */ 184 */
185 185
186#include <linux/config.h>
187#define ASSEMBLER_MACROS_ONLY 186#define ASSEMBLER_MACROS_ONLY
188/* The IO_* macros use the ## token concatenation operator, so 187/* The IO_* macros use the ## token concatenation operator, so
189 -traditional must not be used when assembling this file. */ 188 -traditional must not be used when assembling this file. */
diff --git a/arch/cris/arch-v10/kernel/irq.c b/arch/cris/arch-v10/kernel/irq.c
index 2d5be93b519..96094cbf125 100644
--- a/arch/cris/arch-v10/kernel/irq.c
+++ b/arch/cris/arch-v10/kernel/irq.c
@@ -15,7 +15,6 @@
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/config.h>
19 18
20#define mask_irq(irq_nr) (*R_VECT_MASK_CLR = 1 << (irq_nr)); 19#define mask_irq(irq_nr) (*R_VECT_MASK_CLR = 1 << (irq_nr));
21#define unmask_irq(irq_nr) (*R_VECT_MASK_SET = 1 << (irq_nr)); 20#define unmask_irq(irq_nr) (*R_VECT_MASK_SET = 1 << (irq_nr));
diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c
index 0a675ce9e09..b6831ceb6a6 100644
--- a/arch/cris/arch-v10/kernel/process.c
+++ b/arch/cris/arch-v10/kernel/process.c
@@ -11,7 +11,6 @@
11 * This file handles the architecture-dependent parts of process handling.. 11 * This file handles the architecture-dependent parts of process handling..
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/err.h> 15#include <linux/err.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
diff --git a/arch/cris/arch-v10/kernel/setup.c b/arch/cris/arch-v10/kernel/setup.c
index b668d7fb68e..682ef955aec 100644
--- a/arch/cris/arch-v10/kernel/setup.c
+++ b/arch/cris/arch-v10/kernel/setup.c
@@ -10,7 +10,6 @@
10 * This file handles the architecture-dependent parts of initialization 10 * This file handles the architecture-dependent parts of initialization
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/seq_file.h> 13#include <linux/seq_file.h>
15#include <linux/proc_fs.h> 14#include <linux/proc_fs.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
diff --git a/arch/cris/arch-v10/kernel/time.c b/arch/cris/arch-v10/kernel/time.c
index dc3dfe9b4a1..9c22b76e129 100644
--- a/arch/cris/arch-v10/kernel/time.c
+++ b/arch/cris/arch-v10/kernel/time.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/timex.h> 10#include <linux/timex.h>
12#include <linux/time.h> 11#include <linux/time.h>
13#include <linux/jiffies.h> 12#include <linux/jiffies.h>
@@ -252,11 +251,11 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
252 return IRQ_HANDLED; 251 return IRQ_HANDLED;
253} 252}
254 253
255/* timer is SA_SHIRQ so drivers can add stuff to the timer irq chain 254/* timer is IRQF_SHARED so drivers can add stuff to the timer irq chain
256 * it needs to be SA_INTERRUPT to make the jiffies update work properly 255 * it needs to be IRQF_DISABLED to make the jiffies update work properly
257 */ 256 */
258 257
259static struct irqaction irq2 = { timer_interrupt, SA_SHIRQ | SA_INTERRUPT, 258static struct irqaction irq2 = { timer_interrupt, IRQF_SHARED | IRQF_DISABLED,
260 CPU_MASK_NONE, "timer", NULL, NULL}; 259 CPU_MASK_NONE, "timer", NULL, NULL};
261 260
262void __init 261void __init
diff --git a/arch/cris/arch-v10/kernel/traps.c b/arch/cris/arch-v10/kernel/traps.c
index 34a27ea2052..4becc1bcced 100644
--- a/arch/cris/arch-v10/kernel/traps.c
+++ b/arch/cris/arch-v10/kernel/traps.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/ptrace.h> 14#include <linux/ptrace.h>
16#include <asm/uaccess.h> 15#include <asm/uaccess.h>
17#include <asm/arch/sv_addr_ag.h> 16#include <asm/arch/sv_addr_ag.h>
diff --git a/arch/cris/arch-v10/lib/dram_init.S b/arch/cris/arch-v10/lib/dram_init.S
index 2ef4ad5706e..9cf83932cd5 100644
--- a/arch/cris/arch-v10/lib/dram_init.S
+++ b/arch/cris/arch-v10/lib/dram_init.S
@@ -70,7 +70,6 @@
70 * uses this code. 70 * uses this code.
71 */ 71 */
72 72
73#include <linux/config.h>
74 73
75 ;; WARNING! The registers r8 and r9 are used as parameters carrying 74 ;; WARNING! The registers r8 and r9 are used as parameters carrying
76 ;; information from the decompressor (if the kernel was compressed). 75 ;; information from the decompressor (if the kernel was compressed).
diff --git a/arch/cris/arch-v10/mm/init.c b/arch/cris/arch-v10/mm/init.c
index ff3481e76dd..e0fcd1a9bfd 100644
--- a/arch/cris/arch-v10/mm/init.c
+++ b/arch/cris/arch-v10/mm/init.c
@@ -2,7 +2,6 @@
2 * linux/arch/cris/arch-v10/mm/init.c 2 * linux/arch/cris/arch-v10/mm/init.c
3 * 3 *
4 */ 4 */
5#include <linux/config.h>
6#include <linux/mmzone.h> 5#include <linux/mmzone.h>
7#include <linux/init.h> 6#include <linux/init.h>
8#include <linux/bootmem.h> 7#include <linux/bootmem.h>
diff --git a/arch/cris/arch-v10/vmlinux.lds.S b/arch/cris/arch-v10/vmlinux.lds.S
index 71ba736be8f..689729a7e66 100644
--- a/arch/cris/arch-v10/vmlinux.lds.S
+++ b/arch/cris/arch-v10/vmlinux.lds.S
@@ -8,7 +8,6 @@
8 * the kernel has booted. 8 * the kernel has booted.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <asm-generic/vmlinux.lds.h> 11#include <asm-generic/vmlinux.lds.h>
13 12
14jiffies = jiffies_64; 13jiffies = jiffies_64;
diff --git a/arch/cris/arch-v32/boot/compressed/head.S b/arch/cris/arch-v32/boot/compressed/head.S
index 0c55b83b828..34cea10a899 100644
--- a/arch/cris/arch-v32/boot/compressed/head.S
+++ b/arch/cris/arch-v32/boot/compressed/head.S
@@ -5,7 +5,6 @@
5 * Copyright (C) 1999 - 2003, Axis Communications AB 5 * Copyright (C) 1999 - 2003, Axis Communications AB
6 */ 6 */
7 7
8#include <linux/config.h>
9#define ASSEMBLER_MACROS_ONLY 8#define ASSEMBLER_MACROS_ONLY
10#include <asm/arch/hwregs/asm/reg_map_asm.h> 9#include <asm/arch/hwregs/asm/reg_map_asm.h>
11#include <asm/arch/hwregs/asm/gio_defs_asm.h> 10#include <asm/arch/hwregs/asm/gio_defs_asm.h>
diff --git a/arch/cris/arch-v32/boot/compressed/misc.c b/arch/cris/arch-v32/boot/compressed/misc.c
index 54644238ed5..11902697196 100644
--- a/arch/cris/arch-v32/boot/compressed/misc.c
+++ b/arch/cris/arch-v32/boot/compressed/misc.c
@@ -20,7 +20,6 @@
20 20
21#define KERNEL_LOAD_ADR 0x40004000 21#define KERNEL_LOAD_ADR 0x40004000
22 22
23#include <linux/config.h>
24 23
25#include <linux/types.h> 24#include <linux/types.h>
26#include <asm/arch/hwregs/reg_rdwr.h> 25#include <asm/arch/hwregs/reg_rdwr.h>
diff --git a/arch/cris/arch-v32/boot/rescue/head.S b/arch/cris/arch-v32/boot/rescue/head.S
index 61ede5f30f9..8cdb4011bc1 100644
--- a/arch/cris/arch-v32/boot/rescue/head.S
+++ b/arch/cris/arch-v32/boot/rescue/head.S
@@ -4,7 +4,6 @@
4 * RedBoot based RFL instead. Nothing to see here, move along. 4 * RedBoot based RFL instead. Nothing to see here, move along.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/arch/hwregs/reg_map_asm.h> 7#include <asm/arch/hwregs/reg_map_asm.h>
9#include <asm/arch/hwregs/config_defs_asm.h> 8#include <asm/arch/hwregs/config_defs_asm.h>
10 9
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c
index b679f983b90..41952320e00 100644
--- a/arch/cris/arch-v32/drivers/axisflashmap.c
+++ b/arch/cris/arch-v32/drivers/axisflashmap.c
@@ -18,7 +18,6 @@
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/types.h> 19#include <linux/types.h>
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/config.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24 23
diff --git a/arch/cris/arch-v32/drivers/gpio.c b/arch/cris/arch-v32/drivers/gpio.c
index a551237dcb5..00e9167de53 100644
--- a/arch/cris/arch-v32/drivers/gpio.c
+++ b/arch/cris/arch-v32/drivers/gpio.c
@@ -62,7 +62,6 @@
62 * 62 *
63 */ 63 */
64 64
65#include <linux/config.h>
66 65
67#include <linux/module.h> 66#include <linux/module.h>
68#include <linux/sched.h> 67#include <linux/sched.h>
@@ -745,11 +744,11 @@ gpio_init(void)
745 * in some tests. 744 * in some tests.
746 */ 745 */
747 if (request_irq(TIMER_INTR_VECT, gpio_poll_timer_interrupt, 746 if (request_irq(TIMER_INTR_VECT, gpio_poll_timer_interrupt,
748 SA_SHIRQ | SA_INTERRUPT,"gpio poll", &alarmlist)) { 747 IRQF_SHARED | IRQF_DISABLED,"gpio poll", &alarmlist)) {
749 printk("err: timer0 irq for gpio\n"); 748 printk("err: timer0 irq for gpio\n");
750 } 749 }
751 if (request_irq(GEN_IO_INTR_VECT, gpio_pa_interrupt, 750 if (request_irq(GEN_IO_INTR_VECT, gpio_pa_interrupt,
752 SA_SHIRQ | SA_INTERRUPT,"gpio PA", &alarmlist)) { 751 IRQF_SHARED | IRQF_DISABLED,"gpio PA", &alarmlist)) {
753 printk("err: PA irq for gpio\n"); 752 printk("err: PA irq for gpio\n");
754 } 753 }
755 /* enable the gio and timer irq in global config */ 754 /* enable the gio and timer irq in global config */
diff --git a/arch/cris/arch-v32/drivers/i2c.c b/arch/cris/arch-v32/drivers/i2c.c
index 440c20a9496..95f00188c62 100644
--- a/arch/cris/arch-v32/drivers/i2c.c
+++ b/arch/cris/arch-v32/drivers/i2c.c
@@ -33,7 +33,6 @@
33#include <linux/fs.h> 33#include <linux/fs.h>
34#include <linux/string.h> 34#include <linux/string.h>
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/config.h>
37 36
38#include <asm/etraxi2c.h> 37#include <asm/etraxi2c.h>
39 38
diff --git a/arch/cris/arch-v32/drivers/pcf8563.c b/arch/cris/arch-v32/drivers/pcf8563.c
index d788bda3578..ffc6d2572f2 100644
--- a/arch/cris/arch-v32/drivers/pcf8563.c
+++ b/arch/cris/arch-v32/drivers/pcf8563.c
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/types.h> 22#include <linux/types.h>
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c
index c85a6df8558..7c29957f5f0 100644
--- a/arch/cris/arch-v32/drivers/sync_serial.c
+++ b/arch/cris/arch-v32/drivers/sync_serial.c
@@ -9,7 +9,6 @@
9 9
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/major.h> 14#include <linux/major.h>
diff --git a/arch/cris/arch-v32/kernel/arbiter.c b/arch/cris/arch-v32/kernel/arbiter.c
index 3870d2fd516..420a5312ed0 100644
--- a/arch/cris/arch-v32/kernel/arbiter.c
+++ b/arch/cris/arch-v32/kernel/arbiter.c
@@ -1,15 +1,14 @@
1/* 1/*
2 * Memory arbiter functions. Allocates bandwith through the 2 * Memory arbiter functions. Allocates bandwidth through the
3 * arbiter and sets up arbiter breakpoints. 3 * arbiter and sets up arbiter breakpoints.
4 * 4 *
5 * The algorithm first assigns slots to the clients that has specified 5 * The algorithm first assigns slots to the clients that has specified
6 * bandwith (e.g. ethernet) and then the remaining slots are divided 6 * bandwidth (e.g. ethernet) and then the remaining slots are divided
7 * on all the active clients. 7 * on all the active clients.
8 * 8 *
9 * Copyright (c) 2004, 2005 Axis Communications AB. 9 * Copyright (c) 2004, 2005 Axis Communications AB.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/arch/hwregs/reg_map.h> 12#include <asm/arch/hwregs/reg_map.h>
14#include <asm/arch/hwregs/reg_rdwr.h> 13#include <asm/arch/hwregs/reg_rdwr.h>
15#include <asm/arch/hwregs/marb_defs.h> 14#include <asm/arch/hwregs/marb_defs.h>
@@ -120,7 +119,7 @@ static void crisv32_arbiter_init(void)
120 crisv32_arbiter_config(EXT_REGION); 119 crisv32_arbiter_config(EXT_REGION);
121 crisv32_arbiter_config(INT_REGION); 120 crisv32_arbiter_config(INT_REGION);
122 121
123 if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, SA_INTERRUPT, 122 if (request_irq(MEMARB_INTR_VECT, crisv32_arbiter_irq, IRQF_DISABLED,
124 "arbiter", NULL)) 123 "arbiter", NULL))
125 printk(KERN_ERR "Couldn't allocate arbiter IRQ\n"); 124 printk(KERN_ERR "Couldn't allocate arbiter IRQ\n");
126 125
@@ -133,8 +132,8 @@ static void crisv32_arbiter_init(void)
133 132
134 133
135 134
136int crisv32_arbiter_allocate_bandwith(int client, int region, 135int crisv32_arbiter_allocate_bandwidth(int client, int region,
137 unsigned long bandwidth) 136 unsigned long bandwidth)
138{ 137{
139 int i; 138 int i;
140 int total_assigned = 0; 139 int total_assigned = 0;
diff --git a/arch/cris/arch-v32/kernel/crisksyms.c b/arch/cris/arch-v32/kernel/crisksyms.c
index 2c3bb9a0afe..e513da71124 100644
--- a/arch/cris/arch-v32/kernel/crisksyms.c
+++ b/arch/cris/arch-v32/kernel/crisksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/irq.h> 2#include <linux/irq.h>
4#include <asm/arch/dma.h> 3#include <asm/arch/dma.h>
diff --git a/arch/cris/arch-v32/kernel/debugport.c b/arch/cris/arch-v32/kernel/debugport.c
index 3dc587e6201..d1272ad9215 100644
--- a/arch/cris/arch-v32/kernel/debugport.c
+++ b/arch/cris/arch-v32/kernel/debugport.c
@@ -2,7 +2,6 @@
2 * Copyright (C) 2003, Axis Communications AB. 2 * Copyright (C) 2003, Axis Communications AB.
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/console.h> 5#include <linux/console.h>
7#include <linux/init.h> 6#include <linux/init.h>
8#include <linux/major.h> 7#include <linux/major.h>
diff --git a/arch/cris/arch-v32/kernel/dma.c b/arch/cris/arch-v32/kernel/dma.c
index b92e85799b4..570e19128ff 100644
--- a/arch/cris/arch-v32/kernel/dma.c
+++ b/arch/cris/arch-v32/kernel/dma.c
@@ -25,8 +25,8 @@ int crisv32_request_dma(unsigned int dmanr, const char * device_id,
25 reg_config_rw_clk_ctrl clk_ctrl; 25 reg_config_rw_clk_ctrl clk_ctrl;
26 reg_strmux_rw_cfg strmux_cfg; 26 reg_strmux_rw_cfg strmux_cfg;
27 27
28 if (crisv32_arbiter_allocate_bandwith(dmanr, 28 if (crisv32_arbiter_allocate_bandwidth(dmanr,
29 options & DMA_INT_MEM ? INT_REGION : EXT_REGION, 29 options & DMA_INT_MEM ? INT_REGION : EXT_REGION,
30 bandwidth)) 30 bandwidth))
31 return -ENOMEM; 31 return -ENOMEM;
32 32
diff --git a/arch/cris/arch-v32/kernel/entry.S b/arch/cris/arch-v32/kernel/entry.S
index 3bd8503fec6..f9d27807b91 100644
--- a/arch/cris/arch-v32/kernel/entry.S
+++ b/arch/cris/arch-v32/kernel/entry.S
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/linkage.h> 20#include <linux/linkage.h>
22#include <linux/sys.h> 21#include <linux/sys.h>
23#include <asm/unistd.h> 22#include <asm/unistd.h>
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c
index ea2b4a97c8c..5daeb6f7f3b 100644
--- a/arch/cris/arch-v32/kernel/fasttimer.c
+++ b/arch/cris/arch-v32/kernel/fasttimer.c
@@ -120,7 +120,6 @@
120#include <asm/irq.h> 120#include <asm/irq.h>
121#include <asm/system.h> 121#include <asm/system.h>
122 122
123#include <linux/config.h>
124#include <linux/version.h> 123#include <linux/version.h>
125 124
126#include <asm/arch/hwregs/reg_map.h> 125#include <asm/arch/hwregs/reg_map.h>
@@ -982,7 +981,7 @@ void fast_timer_init(void)
982 proc_register_dynamic(&proc_root, &fasttimer_proc_entry); 981 proc_register_dynamic(&proc_root, &fasttimer_proc_entry);
983#endif 982#endif
984#endif /* PROC_FS */ 983#endif /* PROC_FS */
985 if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, SA_INTERRUPT, 984 if(request_irq(TIMER_INTR_VECT, timer_trig_interrupt, IRQF_DISABLED,
986 "fast timer int", NULL)) 985 "fast timer int", NULL))
987 { 986 {
988 printk("err: timer1 irq\n"); 987 printk("err: timer1 irq\n");
diff --git a/arch/cris/arch-v32/kernel/head.S b/arch/cris/arch-v32/kernel/head.S
index 3cfe57dc391..20bd80a84e4 100644
--- a/arch/cris/arch-v32/kernel/head.S
+++ b/arch/cris/arch-v32/kernel/head.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 2003, Axis Communications AB 4 * Copyright (C) 2003, Axis Communications AB
5 */ 5 */
6 6
7#include <linux/config.h>
8 7
9#define ASSEMBLER_MACROS_ONLY 8#define ASSEMBLER_MACROS_ONLY
10 9
diff --git a/arch/cris/arch-v32/kernel/io.c b/arch/cris/arch-v32/kernel/io.c
index 6bc9f263c3d..dfbfcb8d258 100644
--- a/arch/cris/arch-v32/kernel/io.c
+++ b/arch/cris/arch-v32/kernel/io.c
@@ -4,7 +4,6 @@
4 * Copyright (c) 2004 Axis Communications AB. 4 * Copyright (c) 2004 Axis Communications AB.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/types.h> 7#include <linux/types.h>
9#include <linux/errno.h> 8#include <linux/errno.h>
10#include <linux/init.h> 9#include <linux/init.h>
diff --git a/arch/cris/arch-v32/kernel/irq.c b/arch/cris/arch-v32/kernel/irq.c
index 06260874f01..cc361bf578a 100644
--- a/arch/cris/arch-v32/kernel/irq.c
+++ b/arch/cris/arch-v32/kernel/irq.c
@@ -6,7 +6,6 @@
6#include <linux/irq.h> 6#include <linux/irq.h>
7#include <linux/interrupt.h> 7#include <linux/interrupt.h>
8#include <linux/smp.h> 8#include <linux/smp.h>
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/init.h> 11#include <linux/init.h>
@@ -269,7 +268,7 @@ void
269crisv32_do_IRQ(int irq, int block, struct pt_regs* regs) 268crisv32_do_IRQ(int irq, int block, struct pt_regs* regs)
270{ 269{
271 /* Interrupts that may not be moved to another CPU and 270 /* Interrupts that may not be moved to another CPU and
272 * are SA_INTERRUPT may skip blocking. This is currently 271 * are IRQF_DISABLED may skip blocking. This is currently
273 * only valid for the timer IRQ and the IPI and is used 272 * only valid for the timer IRQ and the IPI and is used
274 * for the timer interrupt to avoid watchdog starvation. 273 * for the timer interrupt to avoid watchdog starvation.
275 */ 274 */
diff --git a/arch/cris/arch-v32/kernel/kgdb_asm.S b/arch/cris/arch-v32/kernel/kgdb_asm.S
index b350dd279ed..3e7fa9ef851 100644
--- a/arch/cris/arch-v32/kernel/kgdb_asm.S
+++ b/arch/cris/arch-v32/kernel/kgdb_asm.S
@@ -5,7 +5,6 @@
5 * port exceptions for kernel debugging purposes. 5 * port exceptions for kernel debugging purposes.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <asm/arch/hwregs/intr_vect.h> 8#include <asm/arch/hwregs/intr_vect.h>
10 9
11 ;; Exported functions. 10 ;; Exported functions.
diff --git a/arch/cris/arch-v32/kernel/process.c b/arch/cris/arch-v32/kernel/process.c
index 843513102d3..6326351af25 100644
--- a/arch/cris/arch-v32/kernel/process.c
+++ b/arch/cris/arch-v32/kernel/process.c
@@ -8,7 +8,6 @@
8 * This file handles the architecture-dependent parts of process handling.. 8 * This file handles the architecture-dependent parts of process handling..
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/err.h> 12#include <linux/err.h>
14#include <linux/fs.h> 13#include <linux/fs.h>
diff --git a/arch/cris/arch-v32/kernel/setup.c b/arch/cris/arch-v32/kernel/setup.c
index b17a39a2e16..4662f363df6 100644
--- a/arch/cris/arch-v32/kernel/setup.c
+++ b/arch/cris/arch-v32/kernel/setup.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 2003, Axis Communications AB. 4 * Copyright (C) 2003, Axis Communications AB.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/seq_file.h> 7#include <linux/seq_file.h>
9#include <linux/proc_fs.h> 8#include <linux/proc_fs.h>
10#include <linux/delay.h> 9#include <linux/delay.h>
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index da40d19a151..464ecaec3bc 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -62,7 +62,7 @@ static unsigned long irq_regs[NR_CPUS] =
62 62
63static irqreturn_t crisv32_ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs); 63static irqreturn_t crisv32_ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs);
64static int send_ipi(int vector, int wait, cpumask_t cpu_mask); 64static int send_ipi(int vector, int wait, cpumask_t cpu_mask);
65static struct irqaction irq_ipi = { crisv32_ipi_interrupt, SA_INTERRUPT, 65static struct irqaction irq_ipi = { crisv32_ipi_interrupt, IRQF_DISABLED,
66 CPU_MASK_NONE, "ipi", NULL, NULL}; 66 CPU_MASK_NONE, "ipi", NULL, NULL};
67 67
68extern void cris_mmu_init(void); 68extern void cris_mmu_init(void);
diff --git a/arch/cris/arch-v32/kernel/time.c b/arch/cris/arch-v32/kernel/time.c
index d48e397f5fa..50f3f93293d 100644
--- a/arch/cris/arch-v32/kernel/time.c
+++ b/arch/cris/arch-v32/kernel/time.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/timex.h> 9#include <linux/timex.h>
11#include <linux/time.h> 10#include <linux/time.h>
12#include <linux/jiffies.h> 11#include <linux/jiffies.h>
@@ -242,12 +241,16 @@ timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
242 return IRQ_HANDLED; 241 return IRQ_HANDLED;
243} 242}
244 243
245/* timer is SA_SHIRQ so drivers can add stuff to the timer irq chain 244/* timer is IRQF_SHARED so drivers can add stuff to the timer irq chain
246 * it needs to be SA_INTERRUPT to make the jiffies update work properly 245 * it needs to be IRQF_DISABLED to make the jiffies update work properly
247 */ 246 */
248 247
249static struct irqaction irq_timer = { timer_interrupt, SA_SHIRQ | SA_INTERRUPT, 248static struct irqaction irq_timer = {
250 CPU_MASK_NONE, "timer", NULL, NULL}; 249 .mask = timer_interrupt,
250 .flags = IRQF_SHARED | IRQF_DISABLED,
251 .mask = CPU_MASK_NONE,
252 .name = "timer"
253};
251 254
252void __init 255void __init
253cris_timer_init(void) 256cris_timer_init(void)
diff --git a/arch/cris/arch-v32/kernel/traps.c b/arch/cris/arch-v32/kernel/traps.c
index 6e378704556..2462b1ef1fb 100644
--- a/arch/cris/arch-v32/kernel/traps.c
+++ b/arch/cris/arch-v32/kernel/traps.c
@@ -2,7 +2,6 @@
2 * Copyright (C) 2003, Axis Communications AB. 2 * Copyright (C) 2003, Axis Communications AB.
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/ptrace.h> 5#include <linux/ptrace.h>
7#include <asm/uaccess.h> 6#include <asm/uaccess.h>
8 7
diff --git a/arch/cris/arch-v32/lib/dram_init.S b/arch/cris/arch-v32/lib/dram_init.S
index 47b6cf5f4af..158b3dbb4d9 100644
--- a/arch/cris/arch-v32/lib/dram_init.S
+++ b/arch/cris/arch-v32/lib/dram_init.S
@@ -16,7 +16,6 @@
16 * uses this code. 16 * uses this code.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <asm/arch/hwregs/asm/reg_map_asm.h> 19#include <asm/arch/hwregs/asm/reg_map_asm.h>
21#include <asm/arch/hwregs/asm/bif_core_defs_asm.h> 20#include <asm/arch/hwregs/asm/bif_core_defs_asm.h>
22 21
diff --git a/arch/cris/arch-v32/lib/hw_settings.S b/arch/cris/arch-v32/lib/hw_settings.S
index 5182e8c2cff..fff9443513d 100644
--- a/arch/cris/arch-v32/lib/hw_settings.S
+++ b/arch/cris/arch-v32/lib/hw_settings.S
@@ -10,7 +10,6 @@
10 * Authors: Mikael Starvik (starvik@axis.com) 10 * Authors: Mikael Starvik (starvik@axis.com)
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <asm/arch/hwregs/asm/reg_map_asm.h> 13#include <asm/arch/hwregs/asm/reg_map_asm.h>
15#include <asm/arch/hwregs/asm/bif_core_defs_asm.h> 14#include <asm/arch/hwregs/asm/bif_core_defs_asm.h>
16#include <asm/arch/hwregs/asm/gio_defs_asm.h> 15#include <asm/arch/hwregs/asm/gio_defs_asm.h>
diff --git a/arch/cris/arch-v32/lib/nand_init.S b/arch/cris/arch-v32/lib/nand_init.S
index aba5c751c28..e019816facd 100644
--- a/arch/cris/arch-v32/lib/nand_init.S
+++ b/arch/cris/arch-v32/lib/nand_init.S
@@ -27,7 +27,6 @@
27#include <asm/arch/hwregs/asm/pinmux_defs_asm.h> 27#include <asm/arch/hwregs/asm/pinmux_defs_asm.h>
28#include <asm/arch/hwregs/asm/bif_core_defs_asm.h> 28#include <asm/arch/hwregs/asm/bif_core_defs_asm.h>
29#include <asm/arch/hwregs/asm/config_defs_asm.h> 29#include <asm/arch/hwregs/asm/config_defs_asm.h>
30#include <linux/config.h>
31 30
32;; There are 8-bit NAND flashes and 16-bit NAND flashes. 31;; There are 8-bit NAND flashes and 16-bit NAND flashes.
33;; We need to treat them slightly different. 32;; We need to treat them slightly different.
diff --git a/arch/cris/arch-v32/mm/init.c b/arch/cris/arch-v32/mm/init.c
index f2fba27d822..a84ba7ff22d 100644
--- a/arch/cris/arch-v32/mm/init.c
+++ b/arch/cris/arch-v32/mm/init.c
@@ -6,12 +6,10 @@
6 * Authors: Bjorn Wesen <bjornw@axis.com> 6 * Authors: Bjorn Wesen <bjornw@axis.com>
7 * Tobias Anderberg <tobiasa@axis.com>, CRISv32 port. 7 * Tobias Anderberg <tobiasa@axis.com>, CRISv32 port.
8 */ 8 */
9#include <linux/config.h>
10#include <linux/mmzone.h> 9#include <linux/mmzone.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/bootmem.h> 11#include <linux/bootmem.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/config.h>
15#include <asm/pgtable.h> 13#include <asm/pgtable.h>
16#include <asm/page.h> 14#include <asm/page.h>
17#include <asm/types.h> 15#include <asm/types.h>
diff --git a/arch/cris/arch-v32/vmlinux.lds.S b/arch/cris/arch-v32/vmlinux.lds.S
index adb94605d92..472d4b3c4cf 100644
--- a/arch/cris/arch-v32/vmlinux.lds.S
+++ b/arch/cris/arch-v32/vmlinux.lds.S
@@ -8,7 +8,6 @@
8 * the kernel has booted. 8 * the kernel has booted.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <asm-generic/vmlinux.lds.h> 11#include <asm-generic/vmlinux.lds.h>
13 12
14jiffies = jiffies_64; 13jiffies = jiffies_64;
diff --git a/arch/cris/kernel/crisksyms.c b/arch/cris/kernel/crisksyms.c
index d57859053ce..1f20c16ac2a 100644
--- a/arch/cris/kernel/crisksyms.c
+++ b/arch/cris/kernel/crisksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/user.h> 2#include <linux/user.h>
4#include <linux/elfcore.h> 3#include <linux/elfcore.h>
diff --git a/arch/cris/kernel/irq.c b/arch/cris/kernel/irq.c
index 6547bb64636..903ea62c6e2 100644
--- a/arch/cris/kernel/irq.c
+++ b/arch/cris/kernel/irq.c
@@ -19,7 +19,6 @@
19 * Naturally it's not a 1:1 relation, but there are similarities. 19 * Naturally it's not a 1:1 relation, but there are similarities.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/ptrace.h> 23#include <linux/ptrace.h>
25#include <linux/irq.h> 24#include <linux/irq.h>
@@ -86,7 +85,7 @@ skip:
86/* called by the assembler IRQ entry functions defined in irq.h 85/* called by the assembler IRQ entry functions defined in irq.h
87 * to dispatch the interrupts to registred handlers 86 * to dispatch the interrupts to registred handlers
88 * interrupts are disabled upon entry - depending on if the 87 * interrupts are disabled upon entry - depending on if the
89 * interrupt was registred with SA_INTERRUPT or not, interrupts 88 * interrupt was registred with IRQF_DISABLED or not, interrupts
90 * are re-enabled or not. 89 * are re-enabled or not.
91 */ 90 */
92 91
diff --git a/arch/cris/kernel/setup.c b/arch/cris/kernel/setup.c
index 619a6eefd89..6d941fb9f37 100644
--- a/arch/cris/kernel/setup.c
+++ b/arch/cris/kernel/setup.c
@@ -10,7 +10,6 @@
10 * This file handles the architecture-dependent parts of initialization 10 * This file handles the architecture-dependent parts of initialization
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
16#include <linux/bootmem.h> 15#include <linux/bootmem.h>
diff --git a/arch/frv/kernel/break.S b/arch/frv/kernel/break.S
index 687c48d62dd..ea161f0ca42 100644
--- a/arch/frv/kernel/break.S
+++ b/arch/frv/kernel/break.S
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/sys.h> 12#include <linux/sys.h>
13#include <linux/config.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/setup.h> 14#include <asm/setup.h>
16#include <asm/segment.h> 15#include <asm/segment.h>
diff --git a/arch/frv/kernel/cmode.S b/arch/frv/kernel/cmode.S
index 6591e6a37ae..81ba28ad220 100644
--- a/arch/frv/kernel/cmode.S
+++ b/arch/frv/kernel/cmode.S
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/sys.h> 13#include <linux/sys.h>
14#include <linux/config.h>
15#include <linux/linkage.h> 14#include <linux/linkage.h>
16#include <asm/setup.h> 15#include <asm/setup.h>
17#include <asm/segment.h> 16#include <asm/segment.h>
diff --git a/arch/frv/kernel/entry-table.S b/arch/frv/kernel/entry-table.S
index 81568acea9c..d3b9253d862 100644
--- a/arch/frv/kernel/entry-table.S
+++ b/arch/frv/kernel/entry-table.S
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/sys.h> 13#include <linux/sys.h>
14#include <linux/config.h>
15#include <linux/linkage.h> 14#include <linux/linkage.h>
16#include <asm/spr-regs.h> 15#include <asm/spr-regs.h>
17 16
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 81d94e41a18..2a1ff1ff869 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -28,7 +28,6 @@
28 */ 28 */
29 29
30#include <linux/sys.h> 30#include <linux/sys.h>
31#include <linux/config.h>
32#include <linux/linkage.h> 31#include <linux/linkage.h>
33#include <asm/thread_info.h> 32#include <asm/thread_info.h>
34#include <asm/setup.h> 33#include <asm/setup.h>
diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c
index dee637fffda..f772704b3d2 100644
--- a/arch/frv/kernel/frv_ksyms.c
+++ b/arch/frv/kernel/frv_ksyms.c
@@ -7,7 +7,6 @@
7#include <linux/elfcore.h> 7#include <linux/elfcore.h>
8#include <linux/in6.h> 8#include <linux/in6.h>
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/config.h>
11 10
12#include <asm/setup.h> 11#include <asm/setup.h>
13#include <asm/pgalloc.h> 12#include <asm/pgalloc.h>
diff --git a/arch/frv/kernel/head-mmu-fr451.S b/arch/frv/kernel/head-mmu-fr451.S
index a143c2f66ee..c8f210d84ff 100644
--- a/arch/frv/kernel/head-mmu-fr451.S
+++ b/arch/frv/kernel/head-mmu-fr451.S
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/ptrace.h> 14#include <asm/ptrace.h>
diff --git a/arch/frv/kernel/head-uc-fr401.S b/arch/frv/kernel/head-uc-fr401.S
index 4ccf8414ae4..ee282be20ff 100644
--- a/arch/frv/kernel/head-uc-fr401.S
+++ b/arch/frv/kernel/head-uc-fr401.S
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/ptrace.h> 14#include <asm/ptrace.h>
diff --git a/arch/frv/kernel/head-uc-fr451.S b/arch/frv/kernel/head-uc-fr451.S
index 31cb54a6f08..b10d9c8295d 100644
--- a/arch/frv/kernel/head-uc-fr451.S
+++ b/arch/frv/kernel/head-uc-fr451.S
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/ptrace.h> 14#include <asm/ptrace.h>
diff --git a/arch/frv/kernel/head-uc-fr555.S b/arch/frv/kernel/head-uc-fr555.S
index d088db2699b..39937c19b46 100644
--- a/arch/frv/kernel/head-uc-fr555.S
+++ b/arch/frv/kernel/head-uc-fr555.S
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/ptrace.h> 14#include <asm/ptrace.h>
diff --git a/arch/frv/kernel/head.S b/arch/frv/kernel/head.S
index 29a5265489b..47c990af2e0 100644
--- a/arch/frv/kernel/head.S
+++ b/arch/frv/kernel/head.S
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/ptrace.h> 14#include <asm/ptrace.h>
diff --git a/arch/frv/kernel/irq-mb93091.c b/arch/frv/kernel/irq-mb93091.c
index 9778e0ff7c1..1381abcd5cc 100644
--- a/arch/frv/kernel/irq-mb93091.c
+++ b/arch/frv/kernel/irq-mb93091.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/ptrace.h> 12#include <linux/ptrace.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/signal.h> 14#include <linux/signal.h>
diff --git a/arch/frv/kernel/irq-mb93093.c b/arch/frv/kernel/irq-mb93093.c
index 21ca2b29824..48b2a642088 100644
--- a/arch/frv/kernel/irq-mb93093.c
+++ b/arch/frv/kernel/irq-mb93093.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/ptrace.h> 12#include <linux/ptrace.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/signal.h> 14#include <linux/signal.h>
diff --git a/arch/frv/kernel/irq-mb93493.c b/arch/frv/kernel/irq-mb93493.c
index c003ae5e2b3..988d035640e 100644
--- a/arch/frv/kernel/irq-mb93493.c
+++ b/arch/frv/kernel/irq-mb93493.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/ptrace.h> 12#include <linux/ptrace.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/signal.h> 14#include <linux/signal.h>
diff --git a/arch/frv/kernel/irq-routing.c b/arch/frv/kernel/irq-routing.c
index b90b70a761d..53886adf47d 100644
--- a/arch/frv/kernel/irq-routing.c
+++ b/arch/frv/kernel/irq-routing.c
@@ -81,7 +81,7 @@ void distribute_irqs(struct irq_group *group, unsigned long irqmask)
81 if (action) { 81 if (action) {
82 int status = 0; 82 int status = 0;
83 83
84// if (!(action->flags & SA_INTERRUPT)) 84// if (!(action->flags & IRQF_DISABLED))
85// local_irq_enable(); 85// local_irq_enable();
86 86
87 do { 87 do {
@@ -90,7 +90,7 @@ void distribute_irqs(struct irq_group *group, unsigned long irqmask)
90 action = action->next; 90 action = action->next;
91 } while (action); 91 } while (action);
92 92
93 if (status & SA_SAMPLE_RANDOM) 93 if (status & IRQF_SAMPLE_RANDOM)
94 add_interrupt_randomness(irq); 94 add_interrupt_randomness(irq);
95 local_irq_disable(); 95 local_irq_disable();
96 } 96 }
diff --git a/arch/frv/kernel/irq.c b/arch/frv/kernel/irq.c
index 8b112b36191..08967010be0 100644
--- a/arch/frv/kernel/irq.c
+++ b/arch/frv/kernel/irq.c
@@ -16,7 +16,6 @@
16 * Naturally it's not a 1:1 relation, but there are similarities. 16 * Naturally it's not a 1:1 relation, but there are similarities.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/ptrace.h> 19#include <linux/ptrace.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
22#include <linux/signal.h> 21#include <linux/signal.h>
@@ -342,11 +341,11 @@ asmlinkage void do_NMI(void)
342 * 341 *
343 * Flags: 342 * Flags:
344 * 343 *
345 * SA_SHIRQ Interrupt is shared 344 * IRQF_SHARED Interrupt is shared
346 * 345 *
347 * SA_INTERRUPT Disable local interrupts while processing 346 * IRQF_DISABLED Disable local interrupts while processing
348 * 347 *
349 * SA_SAMPLE_RANDOM The interrupt can be used for entropy 348 * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy
350 * 349 *
351 */ 350 */
352 351
@@ -366,7 +365,7 @@ int request_irq(unsigned int irq,
366 * to figure out which interrupt is which (messes up the 365 * to figure out which interrupt is which (messes up the
367 * interrupt freeing logic etc). 366 * interrupt freeing logic etc).
368 */ 367 */
369 if (irqflags & SA_SHIRQ) { 368 if (irqflags & IRQF_SHARED) {
370 if (!dev_id) 369 if (!dev_id)
371 printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n", 370 printk("Bad boy: %s (at 0x%x) called us without a dev_id!\n",
372 devname, (&irq)[-1]); 371 devname, (&irq)[-1]);
@@ -577,7 +576,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
577 * so we have to be careful not to interfere with a 576 * so we have to be careful not to interfere with a
578 * running system. 577 * running system.
579 */ 578 */
580 if (new->flags & SA_SAMPLE_RANDOM) { 579 if (new->flags & IRQF_SAMPLE_RANDOM) {
581 /* 580 /*
582 * This function might sleep, we want to call it first, 581 * This function might sleep, we want to call it first,
583 * outside of the atomic block. 582 * outside of the atomic block.
@@ -593,7 +592,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
593 spin_lock_irqsave(&level->lock, flags); 592 spin_lock_irqsave(&level->lock, flags);
594 593
595 /* can't share interrupts unless all parties agree to */ 594 /* can't share interrupts unless all parties agree to */
596 if (level->usage != 0 && !(level->flags & new->flags & SA_SHIRQ)) { 595 if (level->usage != 0 && !(level->flags & new->flags & IRQF_SHARED)) {
597 spin_unlock_irqrestore(&level->lock,flags); 596 spin_unlock_irqrestore(&level->lock,flags);
598 return -EBUSY; 597 return -EBUSY;
599 } 598 }
diff --git a/arch/frv/kernel/pm-mb93093.c b/arch/frv/kernel/pm-mb93093.c
index 34d01d7dcc3..eaa7b582ef5 100644
--- a/arch/frv/kernel/pm-mb93093.c
+++ b/arch/frv/kernel/pm-mb93093.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/pm.h> 14#include <linux/pm.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c
index 43ce28a13a5..e65a9f1c0c2 100644
--- a/arch/frv/kernel/pm.c
+++ b/arch/frv/kernel/pm.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/pm.h> 16#include <linux/pm.h>
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 489e6c489cb..eeeb1e2641d 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
index f953484e7d5..fcff819b434 100644
--- a/arch/frv/kernel/ptrace.c
+++ b/arch/frv/kernel/ptrace.c
@@ -18,7 +18,6 @@
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/ptrace.h> 19#include <linux/ptrace.h>
20#include <linux/user.h> 20#include <linux/user.h>
21#include <linux/config.h>
22#include <linux/security.h> 21#include <linux/security.h>
23#include <linux/signal.h> 22#include <linux/signal.h>
24 23
diff --git a/arch/frv/kernel/semaphore.c b/arch/frv/kernel/semaphore.c
index 7971d680ae2..f278cdf3a72 100644
--- a/arch/frv/kernel/semaphore.c
+++ b/arch/frv/kernel/semaphore.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <asm/semaphore.h> 15#include <asm/semaphore.h>
diff --git a/arch/frv/kernel/setup.c b/arch/frv/kernel/setup.c
index 1f7d65f29e7..5db3d4eff90 100644
--- a/arch/frv/kernel/setup.c
+++ b/arch/frv/kernel/setup.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/version.h> 13#include <linux/version.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/arch/frv/kernel/sleep.S b/arch/frv/kernel/sleep.S
index e6079b8cac6..c9b2d51ab9a 100644
--- a/arch/frv/kernel/sleep.S
+++ b/arch/frv/kernel/sleep.S
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/sys.h> 13#include <linux/sys.h>
14#include <linux/config.h>
15#include <linux/linkage.h> 14#include <linux/linkage.h>
16#include <asm/setup.h> 15#include <asm/setup.h>
17#include <asm/segment.h> 16#include <asm/segment.h>
diff --git a/arch/frv/kernel/switch_to.S b/arch/frv/kernel/switch_to.S
index 1703dc20174..9e5a583991a 100644
--- a/arch/frv/kernel/switch_to.S
+++ b/arch/frv/kernel/switch_to.S
@@ -11,7 +11,6 @@
11# 2 of the License, or (at your option) any later version. 11# 2 of the License, or (at your option) any later version.
12# 12#
13############################################################################### 13###############################################################################
14#include <linux/config.h>
15#include <linux/linkage.h> 14#include <linux/linkage.h>
16#include <asm/thread_info.h> 15#include <asm/thread_info.h>
17#include <asm/processor.h> 16#include <asm/processor.h>
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c
index b908863d659..ce676803eb6 100644
--- a/arch/frv/kernel/sysctl.c
+++ b/arch/frv/kernel/sysctl.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/sysctl.h> 13#include <linux/sysctl.h>
15#include <linux/proc_fs.h> 14#include <linux/proc_fs.h>
diff --git a/arch/frv/kernel/time.c b/arch/frv/kernel/time.c
index 24cf85f89e4..d5b64e193d9 100644
--- a/arch/frv/kernel/time.c
+++ b/arch/frv/kernel/time.c
@@ -47,7 +47,7 @@ unsigned long __delay_loops_MHz;
47static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs); 47static irqreturn_t timer_interrupt(int irq, void *dummy, struct pt_regs *regs);
48 48
49static struct irqaction timer_irq = { 49static struct irqaction timer_irq = {
50 timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL 50 timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL
51}; 51};
52 52
53static inline int set_rtc_mmss(unsigned long nowtime) 53static inline int set_rtc_mmss(unsigned long nowtime)
diff --git a/arch/frv/kernel/traps.c b/arch/frv/kernel/traps.c
index 9eb84b2e6ab..98ce3628ebd 100644
--- a/arch/frv/kernel/traps.c
+++ b/arch/frv/kernel/traps.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/signal.h> 13#include <linux/signal.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
index 45ae39d84b6..2278c80bd88 100644
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -5,7 +5,6 @@
5 * derived from: arch/i386/kernel/pci-irq.c: (c) 1999--2000 Martin Mares <mj@suse.cz> 5 * derived from: arch/i386/kernel/pci-irq.c: (c) 1999--2000 Martin Mares <mj@suse.cz>
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/pci.h> 10#include <linux/pci.h>
diff --git a/arch/frv/mb93090-mb00/pci-vdk.c b/arch/frv/mb93090-mb00/pci-vdk.c
index c8817f7b860..fb98e90c579 100644
--- a/arch/frv/mb93090-mb00/pci-vdk.c
+++ b/arch/frv/mb93090-mb00/pci-vdk.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
diff --git a/arch/frv/mm/dma-alloc.c b/arch/frv/mm/dma-alloc.c
index 636b2f8b5d9..dc6522c464d 100644
--- a/arch/frv/mm/dma-alloc.c
+++ b/arch/frv/mm/dma-alloc.c
@@ -21,7 +21,6 @@
21 * published by the Free Software Foundation. 21 * published by the Free Software Foundation.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/signal.h> 25#include <linux/signal.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
diff --git a/arch/frv/mm/extable.c b/arch/frv/mm/extable.c
index caacf030ac7..6aea124f574 100644
--- a/arch/frv/mm/extable.c
+++ b/arch/frv/mm/extable.c
@@ -2,7 +2,6 @@
2 * linux/arch/frv/mm/extable.c 2 * linux/arch/frv/mm/extable.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/spinlock.h> 6#include <linux/spinlock.h>
8#include <asm/uaccess.h> 7#include <asm/uaccess.h>
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c
index 8899aa1a4f0..b5b4286f9dd 100644
--- a/arch/frv/mm/init.c
+++ b/arch/frv/mm/init.c
@@ -16,7 +16,6 @@
16 * - Copyright (C) 1995 Hamish Macdonald 16 * - Copyright (C) 1995 Hamish Macdonald
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/signal.h> 19#include <linux/signal.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/pagemap.h> 21#include <linux/pagemap.h>
diff --git a/arch/frv/mm/kmap.c b/arch/frv/mm/kmap.c
index 40b62c5c295..fb78be38ea0 100644
--- a/arch/frv/mm/kmap.c
+++ b/arch/frv/mm/kmap.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/string.h> 15#include <linux/string.h>
diff --git a/arch/frv/mm/tlb-flush.S b/arch/frv/mm/tlb-flush.S
index 6f43c74c5d9..79b3c70910a 100644
--- a/arch/frv/mm/tlb-flush.S
+++ b/arch/frv/mm/tlb-flush.S
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/sys.h> 12#include <linux/sys.h>
13#include <linux/config.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/page.h> 14#include <asm/page.h>
16#include <asm/ptrace.h> 15#include <asm/ptrace.h>
diff --git a/arch/frv/mm/tlb-miss.S b/arch/frv/mm/tlb-miss.S
index 8729f7d7c6e..04da6746837 100644
--- a/arch/frv/mm/tlb-miss.S
+++ b/arch/frv/mm/tlb-miss.S
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/sys.h> 12#include <linux/sys.h>
13#include <linux/config.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <asm/page.h> 14#include <asm/page.h>
16#include <asm/pgtable.h> 15#include <asm/pgtable.h>
diff --git a/arch/frv/mm/unaligned.c b/arch/frv/mm/unaligned.c
index 09b361443fc..8f0375fc15a 100644
--- a/arch/frv/mm/unaligned.c
+++ b/arch/frv/mm/unaligned.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/signal.h> 13#include <linux/signal.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/h8300/kernel/gpio.c b/arch/h8300/kernel/gpio.c
index d195568ca8a..6a25dd5530e 100644
--- a/arch/h8300/kernel/gpio.c
+++ b/arch/h8300/kernel/gpio.c
@@ -9,7 +9,6 @@
9 * Internal I/O Port Management 9 * Internal I/O Port Management
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/h8300/kernel/h8300_ksyms.c b/arch/h8300/kernel/h8300_ksyms.c
index f8d6dee8478..9b4be053de3 100644
--- a/arch/h8300/kernel/h8300_ksyms.c
+++ b/arch/h8300/kernel/h8300_ksyms.c
@@ -7,7 +7,6 @@
7#include <linux/elfcore.h> 7#include <linux/elfcore.h>
8#include <linux/in6.h> 8#include <linux/in6.h>
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/config.h>
11 10
12#include <asm/setup.h> 11#include <asm/setup.h>
13#include <asm/pgalloc.h> 12#include <asm/pgalloc.h>
diff --git a/arch/h8300/kernel/ints.c b/arch/h8300/kernel/ints.c
index edb3c417001..1488b6ace18 100644
--- a/arch/h8300/kernel/ints.c
+++ b/arch/h8300/kernel/ints.c
@@ -158,7 +158,7 @@ int request_irq(unsigned int irq,
158 irq_handle->devname = devname; 158 irq_handle->devname = devname;
159 irq_list[irq] = irq_handle; 159 irq_list[irq] = irq_handle;
160 160
161 if (irq_handle->flags & SA_SAMPLE_RANDOM) 161 if (irq_handle->flags & IRQF_SAMPLE_RANDOM)
162 rand_initialize_irq(irq); 162 rand_initialize_irq(irq);
163 163
164 enable_irq(irq); 164 enable_irq(irq);
@@ -222,7 +222,7 @@ asmlinkage void process_int(int irq, struct pt_regs *fp)
222 if (irq_list[irq]) { 222 if (irq_list[irq]) {
223 irq_list[irq]->handler(irq, irq_list[irq]->dev_id, fp); 223 irq_list[irq]->handler(irq, irq_list[irq]->dev_id, fp);
224 irq_list[irq]->count++; 224 irq_list[irq]->count++;
225 if (irq_list[irq]->flags & SA_SAMPLE_RANDOM) 225 if (irq_list[irq]->flags & IRQF_SAMPLE_RANDOM)
226 add_interrupt_randomness(irq); 226 add_interrupt_randomness(irq);
227 } 227 }
228 } else { 228 } else {
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c
index 16ccddc69c2..e061b63a003 100644
--- a/arch/h8300/kernel/process.c
+++ b/arch/h8300/kernel/process.c
@@ -22,7 +22,6 @@
22 * This file handles the architecture-dependent parts of process handling.. 22 * This file handles the architecture-dependent parts of process handling..
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
diff --git a/arch/h8300/kernel/ptrace.c b/arch/h8300/kernel/ptrace.c
index 0ff6f79b0fe..f6031373dc2 100644
--- a/arch/h8300/kernel/ptrace.c
+++ b/arch/h8300/kernel/ptrace.c
@@ -23,7 +23,6 @@
23#include <linux/errno.h> 23#include <linux/errno.h>
24#include <linux/ptrace.h> 24#include <linux/ptrace.h>
25#include <linux/user.h> 25#include <linux/user.h>
26#include <linux/config.h>
27#include <linux/signal.h> 26#include <linux/signal.h>
28 27
29#include <asm/uaccess.h> 28#include <asm/uaccess.h>
diff --git a/arch/h8300/kernel/semaphore.c b/arch/h8300/kernel/semaphore.c
index 1ebb79baaa8..d12cbbfe6eb 100644
--- a/arch/h8300/kernel/semaphore.c
+++ b/arch/h8300/kernel/semaphore.c
@@ -3,7 +3,6 @@
3 * specific changes in <asm/semaphore-helper.h> 3 * specific changes in <asm/semaphore-helper.h>
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <asm/semaphore-helper.h> 8#include <asm/semaphore-helper.h>
diff --git a/arch/h8300/kernel/setup.c b/arch/h8300/kernel/setup.c
index f469d916073..1077b71d522 100644
--- a/arch/h8300/kernel/setup.c
+++ b/arch/h8300/kernel/setup.c
@@ -16,7 +16,6 @@
16 * This file handles the architecture-dependent parts of system setup 16 * This file handles the architecture-dependent parts of system setup
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
diff --git a/arch/h8300/kernel/syscalls.S b/arch/h8300/kernel/syscalls.S
index 79b3bda5c6e..dab98fd99e6 100644
--- a/arch/h8300/kernel/syscalls.S
+++ b/arch/h8300/kernel/syscalls.S
@@ -1,5 +1,4 @@
1/* Systemcall Entry Table */ 1/* Systemcall Entry Table */
2#include <linux/config.h>
3#include <linux/sys.h> 2#include <linux/sys.h>
4#include <asm/linkage.h> 3#include <asm/linkage.h>
5#include <asm/unistd.h> 4#include <asm/unistd.h>
diff --git a/arch/h8300/kernel/vmlinux.lds.S b/arch/h8300/kernel/vmlinux.lds.S
index 17fa11da1e4..6406c388f88 100644
--- a/arch/h8300/kernel/vmlinux.lds.S
+++ b/arch/h8300/kernel/vmlinux.lds.S
@@ -1,6 +1,5 @@
1#define VMLINUX_SYMBOL(_sym_) _##_sym_ 1#define VMLINUX_SYMBOL(_sym_) _##_sym_
2#include <asm-generic/vmlinux.lds.h> 2#include <asm-generic/vmlinux.lds.h>
3#include <linux/config.h>
4 3
5/* target memory map */ 4/* target memory map */
6#ifdef CONFIG_H8300H_GENERIC 5#ifdef CONFIG_H8300H_GENERIC
diff --git a/arch/h8300/lib/romfs.S b/arch/h8300/lib/romfs.S
index b72f93a47e3..68910d8e1ff 100644
--- a/arch/h8300/lib/romfs.S
+++ b/arch/h8300/lib/romfs.S
@@ -1,7 +1,6 @@
1/* romfs move to __ebss */ 1/* romfs move to __ebss */
2 2
3#include <asm/linkage.h> 3#include <asm/linkage.h>
4#include <linux/config.h>
5 4
6#if defined(__H8300H__) 5#if defined(__H8300H__)
7 .h8300h 6 .h8300h
diff --git a/arch/h8300/mm/init.c b/arch/h8300/mm/init.c
index 09efc4b1f03..d3d40bdc2d6 100644
--- a/arch/h8300/mm/init.c
+++ b/arch/h8300/mm/init.c
@@ -16,7 +16,6 @@
16 * DEC/2000 -- linux 2.4 support <davidm@snapgear.com> 16 * DEC/2000 -- linux 2.4 support <davidm@snapgear.com>
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/signal.h> 19#include <linux/signal.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/arch/h8300/mm/kmap.c b/arch/h8300/mm/kmap.c
index 4101ab54fc1..26ab17286a5 100644
--- a/arch/h8300/mm/kmap.c
+++ b/arch/h8300/mm/kmap.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 2000-2002 David McCullough <davidm@snapgear.com> 8 * Copyright (C) 2000-2002 David McCullough <davidm@snapgear.com>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/string.h> 13#include <linux/string.h>
diff --git a/arch/h8300/mm/memory.c b/arch/h8300/mm/memory.c
index 81eace93f86..ccd6ade816d 100644
--- a/arch/h8300/mm/memory.c
+++ b/arch/h8300/mm/memory.c
@@ -17,7 +17,6 @@
17 * Copyright (C) 1995 Hamish Macdonald 17 * Copyright (C) 1995 Hamish Macdonald
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/mm.h> 20#include <linux/mm.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/string.h> 22#include <linux/string.h>
diff --git a/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S b/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S
index 31c3703d8d6..ecaeb31ae9a 100644
--- a/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S
+++ b/arch/h8300/platform/h8300h/aki3068net/crt0_ram.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15 14
16#if !defined(CONFIG_BLKDEV_RESERVE) 15#if !defined(CONFIG_BLKDEV_RESERVE)
diff --git a/arch/h8300/platform/h8300h/aki3068net/timer.c b/arch/h8300/platform/h8300h/aki3068net/timer.c
index 086efb1fd28..27cd85d5612 100644
--- a/arch/h8300/platform/h8300h/aki3068net/timer.c
+++ b/arch/h8300/platform/h8300h/aki3068net/timer.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/h8300/platform/h8300h/entry.S b/arch/h8300/platform/h8300h/entry.S
index 2052dbb9483..d2dea2432fb 100644
--- a/arch/h8300/platform/h8300h/entry.S
+++ b/arch/h8300/platform/h8300h/entry.S
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16#include <linux/sys.h> 16#include <linux/sys.h>
17#include <linux/config.h>
18#include <asm/unistd.h> 17#include <asm/unistd.h>
19#include <asm/setup.h> 18#include <asm/setup.h>
20#include <asm/segment.h> 19#include <asm/segment.h>
diff --git a/arch/h8300/platform/h8300h/generic/crt0_ram.S b/arch/h8300/platform/h8300h/generic/crt0_ram.S
index b735042a7c3..80d0e16a449 100644
--- a/arch/h8300/platform/h8300h/generic/crt0_ram.S
+++ b/arch/h8300/platform/h8300h/generic/crt0_ram.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15 14
16#if !defined(CONFIG_BLKDEV_RESERVE) 15#if !defined(CONFIG_BLKDEV_RESERVE)
diff --git a/arch/h8300/platform/h8300h/generic/crt0_rom.S b/arch/h8300/platform/h8300h/generic/crt0_rom.S
index 2e32d8179db..120add7ca83 100644
--- a/arch/h8300/platform/h8300h/generic/crt0_rom.S
+++ b/arch/h8300/platform/h8300h/generic/crt0_rom.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15 14
16 .global SYMBOL_NAME(_start) 15 .global SYMBOL_NAME(_start)
diff --git a/arch/h8300/platform/h8300h/generic/timer.c b/arch/h8300/platform/h8300h/generic/timer.c
index 6590f89e521..6f5cefe0cce 100644
--- a/arch/h8300/platform/h8300h/generic/timer.c
+++ b/arch/h8300/platform/h8300h/generic/timer.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/h8300/platform/h8300h/h8max/crt0_ram.S b/arch/h8300/platform/h8300h/h8max/crt0_ram.S
index a5c5a9156e0..efcbefb91b6 100644
--- a/arch/h8300/platform/h8300h/h8max/crt0_ram.S
+++ b/arch/h8300/platform/h8300h/h8max/crt0_ram.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15 14
16#if !defined(CONFIG_BLKDEV_RESERVE) 15#if !defined(CONFIG_BLKDEV_RESERVE)
diff --git a/arch/h8300/platform/h8300h/h8max/timer.c b/arch/h8300/platform/h8300h/h8max/timer.c
index 9ac9fa6691c..85a574afe9d 100644
--- a/arch/h8300/platform/h8300h/h8max/timer.c
+++ b/arch/h8300/platform/h8300h/h8max/timer.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/h8300/platform/h8300h/ints_h8300h.c b/arch/h8300/platform/h8300h/ints_h8300h.c
index 86a15547916..f1777119b87 100644
--- a/arch/h8300/platform/h8300h/ints_h8300h.c
+++ b/arch/h8300/platform/h8300h/ints_h8300h.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12 11
diff --git a/arch/h8300/platform/h8s/edosk2674/crt0_ram.S b/arch/h8300/platform/h8s/edosk2674/crt0_ram.S
index 8105dc17d73..d12b0debe47 100644
--- a/arch/h8300/platform/h8s/edosk2674/crt0_ram.S
+++ b/arch/h8300/platform/h8s/edosk2674/crt0_ram.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15#include <asm/regs267x.h> 14#include <asm/regs267x.h>
16 15
diff --git a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S b/arch/h8300/platform/h8s/edosk2674/crt0_rom.S
index 65748bf1855..c03d23c6fe1 100644
--- a/arch/h8300/platform/h8s/edosk2674/crt0_rom.S
+++ b/arch/h8300/platform/h8s/edosk2674/crt0_rom.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15#include <asm/regs267x.h> 14#include <asm/regs267x.h>
16 15
diff --git a/arch/h8300/platform/h8s/edosk2674/timer.c b/arch/h8300/platform/h8s/edosk2674/timer.c
index 9441a4f1631..bfb1424482f 100644
--- a/arch/h8300/platform/h8s/edosk2674/timer.c
+++ b/arch/h8300/platform/h8s/edosk2674/timer.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/h8300/platform/h8s/entry.S b/arch/h8300/platform/h8s/entry.S
index a7a53c84c80..aeb2e9faa9b 100644
--- a/arch/h8300/platform/h8s/entry.S
+++ b/arch/h8300/platform/h8s/entry.S
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/sys.h> 17#include <linux/sys.h>
18#include <linux/config.h>
19#include <asm/unistd.h> 18#include <asm/unistd.h>
20#include <asm/setup.h> 19#include <asm/setup.h>
21#include <asm/segment.h> 20#include <asm/segment.h>
diff --git a/arch/h8300/platform/h8s/generic/crt0_ram.S b/arch/h8300/platform/h8s/generic/crt0_ram.S
index 86f45017846..b0454106997 100644
--- a/arch/h8300/platform/h8s/generic/crt0_ram.S
+++ b/arch/h8300/platform/h8s/generic/crt0_ram.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15#include <asm/regs267x.h> 14#include <asm/regs267x.h>
16 15
diff --git a/arch/h8300/platform/h8s/generic/crt0_rom.S b/arch/h8300/platform/h8s/generic/crt0_rom.S
index e18e4120228..95b6f2898f5 100644
--- a/arch/h8300/platform/h8s/generic/crt0_rom.S
+++ b/arch/h8300/platform/h8s/generic/crt0_rom.S
@@ -10,7 +10,6 @@
10 10
11#define ASSEMBLY 11#define ASSEMBLY
12 12
13#include <linux/config.h>
14#include <asm/linkage.h> 13#include <asm/linkage.h>
15#include <asm/regs267x.h> 14#include <asm/regs267x.h>
16 15
diff --git a/arch/h8300/platform/h8s/generic/timer.c b/arch/h8300/platform/h8s/generic/timer.c
index 633cd8e1c21..c2211c6e79d 100644
--- a/arch/h8300/platform/h8s/generic/timer.c
+++ b/arch/h8300/platform/h8s/generic/timer.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/h8300/platform/h8s/ints.c b/arch/h8300/platform/h8s/ints.c
index f6ed663bdde..270440de461 100644
--- a/arch/h8300/platform/h8s/ints.c
+++ b/arch/h8300/platform/h8s/ints.c
@@ -192,7 +192,7 @@ int request_irq(unsigned int irq,
192 irq_handle->dev_id = dev_id; 192 irq_handle->dev_id = dev_id;
193 irq_handle->devname = devname; 193 irq_handle->devname = devname;
194 irq_list[irq] = irq_handle; 194 irq_list[irq] = irq_handle;
195 if (irq_handle->flags & SA_SAMPLE_RANDOM) 195 if (irq_handle->flags & IRQF_SAMPLE_RANDOM)
196 rand_initialize_irq(irq); 196 rand_initialize_irq(irq);
197 197
198 /* enable interrupt */ 198 /* enable interrupt */
@@ -270,7 +270,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
270 if (irq_list[vec]) { 270 if (irq_list[vec]) {
271 irq_list[vec]->handler(vec, irq_list[vec]->dev_id, fp); 271 irq_list[vec]->handler(vec, irq_list[vec]->dev_id, fp);
272 irq_list[vec]->count++; 272 irq_list[vec]->count++;
273 if (irq_list[vec]->flags & SA_SAMPLE_RANDOM) 273 if (irq_list[vec]->flags & IRQF_SAMPLE_RANDOM)
274 add_interrupt_randomness(vec); 274 add_interrupt_randomness(vec);
275 } 275 }
276 } else { 276 } else {
diff --git a/arch/h8300/platform/h8s/ints_h8s.c b/arch/h8300/platform/h8s/ints_h8s.c
index 8268dfd12f1..93395d2a8a0 100644
--- a/arch/h8300/platform/h8s/ints_h8s.c
+++ b/arch/h8300/platform/h8s/ints_h8s.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig
index 1718429286d..27d8dddbaa4 100644
--- a/arch/i386/Kconfig
+++ b/arch/i386/Kconfig
@@ -176,7 +176,7 @@ endchoice
176config ACPI_SRAT 176config ACPI_SRAT
177 bool 177 bool
178 default y 178 default y
179 depends on NUMA && (X86_SUMMIT || X86_GENERICARCH) 179 depends on ACPI && NUMA && (X86_SUMMIT || X86_GENERICARCH)
180 select ACPI_NUMA 180 select ACPI_NUMA
181 181
182config HAVE_ARCH_PARSE_SRAT 182config HAVE_ARCH_PARSE_SRAT
diff --git a/arch/i386/boot/setup.S b/arch/i386/boot/setup.S
index ca668d9df16..0a5a3be6d69 100644
--- a/arch/i386/boot/setup.S
+++ b/arch/i386/boot/setup.S
@@ -46,7 +46,6 @@
46 * by Robert Schwebel, December 2001 <robert@schwebel.de> 46 * by Robert Schwebel, December 2001 <robert@schwebel.de>
47 */ 47 */
48 48
49#include <linux/config.h>
50#include <asm/segment.h> 49#include <asm/segment.h>
51#include <linux/version.h> 50#include <linux/version.h>
52#include <linux/compile.h> 51#include <linux/compile.h>
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile
index 5e70c2fb273..cbc1184e947 100644
--- a/arch/i386/kernel/Makefile
+++ b/arch/i386/kernel/Makefile
@@ -38,6 +38,7 @@ obj-$(CONFIG_VM86) += vm86.o
38obj-$(CONFIG_EARLY_PRINTK) += early_printk.o 38obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
39obj-$(CONFIG_HPET_TIMER) += hpet.o 39obj-$(CONFIG_HPET_TIMER) += hpet.o
40obj-$(CONFIG_K8_NB) += k8.o 40obj-$(CONFIG_K8_NB) += k8.o
41obj-$(CONFIG_AUDIT) += audit.o
41 42
42EXTRA_AFLAGS := -traditional 43EXTRA_AFLAGS := -traditional
43 44
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c
index 97ca17189af..0db6387025c 100644
--- a/arch/i386/kernel/acpi/boot.c
+++ b/arch/i386/kernel/acpi/boot.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/config.h>
28#include <linux/acpi.h> 27#include <linux/acpi.h>
29#include <linux/efi.h> 28#include <linux/efi.h>
30#include <linux/module.h> 29#include <linux/module.h>
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index 50eb0e03777..7b421b3a053 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -168,6 +168,8 @@ void apply_alternatives(struct alt_instr *start, struct alt_instr *end)
168 } 168 }
169} 169}
170 170
171#ifdef CONFIG_SMP
172
171static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end) 173static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
172{ 174{
173 struct alt_instr *a; 175 struct alt_instr *a;
@@ -328,6 +330,8 @@ void alternatives_smp_switch(int smp)
328 spin_unlock_irqrestore(&smp_alt, flags); 330 spin_unlock_irqrestore(&smp_alt, flags);
329} 331}
330 332
333#endif
334
331void __init alternative_instructions(void) 335void __init alternative_instructions(void)
332{ 336{
333 if (no_replacement) { 337 if (no_replacement) {
@@ -349,6 +353,7 @@ void __init alternative_instructions(void)
349 smp_alt_once = 1; 353 smp_alt_once = 1;
350#endif 354#endif
351 355
356#ifdef CONFIG_SMP
352 if (smp_alt_once) { 357 if (smp_alt_once) {
353 if (1 == num_possible_cpus()) { 358 if (1 == num_possible_cpus()) {
354 printk(KERN_INFO "SMP alternatives: switching to UP code\n"); 359 printk(KERN_INFO "SMP alternatives: switching to UP code\n");
@@ -370,4 +375,5 @@ void __init alternative_instructions(void)
370 _text, _etext); 375 _text, _etext);
371 alternatives_smp_switch(0); 376 alternatives_smp_switch(0);
372 } 377 }
378#endif
373} 379}
diff --git a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
index 7ce09492fc0..8c844d07862 100644
--- a/arch/i386/kernel/apic.c
+++ b/arch/i386/kernel/apic.c
@@ -14,7 +14,6 @@
14 * Mikael Pettersson : PM converted to driver model. 14 * Mikael Pettersson : PM converted to driver model.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19 18
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c
index 7c5729d1fd0..8591f2fa920 100644
--- a/arch/i386/kernel/apm.c
+++ b/arch/i386/kernel/apm.c
@@ -201,7 +201,6 @@
201 * http://www.microsoft.com/hwdev/busbios/amp_12.htm] 201 * http://www.microsoft.com/hwdev/busbios/amp_12.htm]
202 */ 202 */
203 203
204#include <linux/config.h>
205#include <linux/module.h> 204#include <linux/module.h>
206 205
207#include <linux/poll.h> 206#include <linux/poll.h>
diff --git a/arch/i386/kernel/audit.c b/arch/i386/kernel/audit.c
new file mode 100644
index 00000000000..5a53c6f371f
--- /dev/null
+++ b/arch/i386/kernel/audit.c
@@ -0,0 +1,23 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned chattr_class[] = {
12#include <asm-generic/audit_change_attr.h>
13~0U
14};
15
16static int __init audit_classes_init(void)
17{
18 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
19 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
20 return 0;
21}
22
23__initcall(audit_classes_init);
diff --git a/arch/i386/kernel/bootflag.c b/arch/i386/kernel/bootflag.c
index 4c30ed01f4e..0b9860530a6 100644
--- a/arch/i386/kernel/bootflag.c
+++ b/arch/i386/kernel/bootflag.c
@@ -3,7 +3,6 @@
3 */ 3 */
4 4
5 5
6#include <linux/config.h>
7#include <linux/types.h> 6#include <linux/types.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/init.h> 8#include <linux/init.h>
diff --git a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
index 5fd65325b81..567b39bea07 100644
--- a/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
+++ b/arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
@@ -24,7 +24,6 @@
24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/init.h> 29#include <linux/init.h>
@@ -418,8 +417,14 @@ acpi_cpufreq_cpu_init (
418 goto err_free; 417 goto err_free;
419 418
420 perf = data->acpi_data; 419 perf = data->acpi_data;
421 policy->cpus = perf->shared_cpu_map;
422 policy->shared_type = perf->shared_type; 420 policy->shared_type = perf->shared_type;
421 /*
422 * Will let policy->cpus know about dependency only when software
423 * coordination is required.
424 */
425 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
426 policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
427 policy->cpus = perf->shared_cpu_map;
423 428
424 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) { 429 if (cpu_has(c, X86_FEATURE_CONSTANT_TSC)) {
425 acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS; 430 acpi_cpufreq_driver.flags |= CPUFREQ_CONST_LOOPS;
diff --git a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
index ab6504efd80..304d2eaa4a1 100644
--- a/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
+++ b/arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
index 694d4793bf6..54382760983 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c
@@ -12,7 +12,6 @@
12 * - We disable half multipliers if ACPI is used on A0 stepping CPUs. 12 * - We disable half multipliers if ACPI is used on A0 stepping CPUs.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/moduleparam.h> 17#include <linux/moduleparam.h>
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
index f7e4356f682..b77f1358bd7 100644
--- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
+++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
@@ -17,7 +17,6 @@
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/cpufreq.h> 19#include <linux/cpufreq.h>
20#include <linux/config.h>
21#include <linux/sched.h> /* current */ 20#include <linux/sched.h> /* current */
22#include <linux/delay.h> 21#include <linux/delay.h>
23#include <linux/compiler.h> 22#include <linux/compiler.h>
@@ -399,8 +398,14 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
399 dprintk(PFX "obtaining ACPI data failed\n"); 398 dprintk(PFX "obtaining ACPI data failed\n");
400 return -EIO; 399 return -EIO;
401 } 400 }
402 policy->cpus = p->shared_cpu_map;
403 policy->shared_type = p->shared_type; 401 policy->shared_type = p->shared_type;
402 /*
403 * Will let policy->cpus know about dependency only when software
404 * coordination is required.
405 */
406 if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
407 policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
408 policy->cpus = p->shared_cpu_map;
404 409
405 /* verify the acpi_data */ 410 /* verify the acpi_data */
406 if (p->state_count <= 1) { 411 if (p->state_count <= 1) {
diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c
index 10afc645c54..5a2e270924b 100644
--- a/arch/i386/kernel/cpu/intel.c
+++ b/arch/i386/kernel/cpu/intel.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/init.h> 1#include <linux/init.h>
3#include <linux/kernel.h> 2#include <linux/kernel.h>
4 3
diff --git a/arch/i386/kernel/cpu/mcheck/k7.c b/arch/i386/kernel/cpu/mcheck/k7.c
index fc5d5215e23..b0862af595a 100644
--- a/arch/i386/kernel/cpu/mcheck/k7.c
+++ b/arch/i386/kernel/cpu/mcheck/k7.c
@@ -6,7 +6,6 @@
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/config.h>
10#include <linux/interrupt.h> 9#include <linux/interrupt.h>
11#include <linux/smp.h> 10#include <linux/smp.h>
12 11
diff --git a/arch/i386/kernel/cpu/mcheck/mce.c b/arch/i386/kernel/cpu/mcheck/mce.c
index afa0888f9a1..d555bec0db9 100644
--- a/arch/i386/kernel/cpu/mcheck/mce.c
+++ b/arch/i386/kernel/cpu/mcheck/mce.c
@@ -6,7 +6,6 @@
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/types.h> 7#include <linux/types.h>
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/smp.h> 10#include <linux/smp.h>
12#include <linux/thread_info.h> 11#include <linux/thread_info.h>
diff --git a/arch/i386/kernel/cpu/mcheck/non-fatal.c b/arch/i386/kernel/cpu/mcheck/non-fatal.c
index 82dffe0d495..1f9153ae5b0 100644
--- a/arch/i386/kernel/cpu/mcheck/non-fatal.c
+++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c
@@ -11,7 +11,6 @@
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/jiffies.h> 13#include <linux/jiffies.h>
14#include <linux/config.h>
15#include <linux/workqueue.h> 14#include <linux/workqueue.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <linux/smp.h> 16#include <linux/smp.h>
diff --git a/arch/i386/kernel/cpu/mcheck/p4.c b/arch/i386/kernel/cpu/mcheck/p4.c
index fd2c459a31e..b95f1b3d53a 100644
--- a/arch/i386/kernel/cpu/mcheck/p4.c
+++ b/arch/i386/kernel/cpu/mcheck/p4.c
@@ -5,7 +5,6 @@
5#include <linux/init.h> 5#include <linux/init.h>
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/kernel.h> 7#include <linux/kernel.h>
8#include <linux/config.h>
9#include <linux/interrupt.h> 8#include <linux/interrupt.h>
10#include <linux/smp.h> 9#include <linux/smp.h>
11 10
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c
index f6dfa9fb675..a8d3ecdc389 100644
--- a/arch/i386/kernel/cpuid.c
+++ b/arch/i386/kernel/cpuid.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/config.h>
28 27
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
index 8beb0f07d99..fe158042110 100644
--- a/arch/i386/kernel/efi.c
+++ b/arch/i386/kernel/efi.c
@@ -19,7 +19,6 @@
19 * Skip non-WB memory and ignore empty memory ranges. 19 * Skip non-WB memory and ignore empty memory ranges.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/init.h> 23#include <linux/init.h>
25#include <linux/mm.h> 24#include <linux/mm.h>
diff --git a/arch/i386/kernel/efi_stub.S b/arch/i386/kernel/efi_stub.S
index 08c0312d9b6..d3ee73a3eee 100644
--- a/arch/i386/kernel/efi_stub.S
+++ b/arch/i386/kernel/efi_stub.S
@@ -5,7 +5,6 @@
5 * turned off. 5 * turned off.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/linkage.h> 8#include <linux/linkage.h>
10#include <asm/page.h> 9#include <asm/page.h>
11#include <asm/pgtable.h> 10#include <asm/pgtable.h>
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S
index fbdb933251b..787190c45fd 100644
--- a/arch/i386/kernel/entry.S
+++ b/arch/i386/kernel/entry.S
@@ -40,7 +40,6 @@
40 * "current" is in register %ebx during any slow entries. 40 * "current" is in register %ebx during any slow entries.
41 */ 41 */
42 42
43#include <linux/config.h>
44#include <linux/linkage.h> 43#include <linux/linkage.h>
45#include <asm/thread_info.h> 44#include <asm/thread_info.h>
46#include <asm/errno.h> 45#include <asm/errno.h>
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index 3debc2e2654..eb79aa2fa8b 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10.text 10.text
11#include <linux/config.h>
12#include <linux/threads.h> 11#include <linux/threads.h>
13#include <linux/linkage.h> 12#include <linux/linkage.h>
14#include <asm/segment.h> 13#include <asm/segment.h>
diff --git a/arch/i386/kernel/i386_ksyms.c b/arch/i386/kernel/i386_ksyms.c
index 036a9857936..e3d4b73bfdb 100644
--- a/arch/i386/kernel/i386_ksyms.c
+++ b/arch/i386/kernel/i386_ksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <asm/checksum.h> 2#include <asm/checksum.h>
4#include <asm/desc.h> 3#include <asm/desc.h>
diff --git a/arch/i386/kernel/i387.c b/arch/i386/kernel/i387.c
index c4351972d9a..665847281ed 100644
--- a/arch/i386/kernel/i387.c
+++ b/arch/i386/kernel/i387.c
@@ -8,7 +8,6 @@
8 * Gareth Hughes <gareth@valinux.com>, May 2000 8 * Gareth Hughes <gareth@valinux.com>, May 2000
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <asm/processor.h> 13#include <asm/processor.h>
diff --git a/arch/i386/kernel/i8259.c b/arch/i386/kernel/i8259.c
index 3c6063671a9..d4756d154f4 100644
--- a/arch/i386/kernel/i8259.c
+++ b/arch/i386/kernel/i8259.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/errno.h> 1#include <linux/errno.h>
3#include <linux/signal.h> 2#include <linux/signal.h>
4#include <linux/sched.h> 3#include <linux/sched.h>
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
index ec9ea0269d3..4fb32c551fe 100644
--- a/arch/i386/kernel/io_apic.c
+++ b/arch/i386/kernel/io_apic.c
@@ -25,7 +25,6 @@
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/sched.h> 27#include <linux/sched.h>
28#include <linux/config.h>
29#include <linux/smp_lock.h> 28#include <linux/smp_lock.h>
30#include <linux/mc146818rtc.h> 29#include <linux/mc146818rtc.h>
31#include <linux/compiler.h> 30#include <linux/compiler.h>
diff --git a/arch/i386/kernel/kprobes.c b/arch/i386/kernel/kprobes.c
index 727e419ad78..de2e16e561c 100644
--- a/arch/i386/kernel/kprobes.c
+++ b/arch/i386/kernel/kprobes.c
@@ -28,7 +28,6 @@
28 * <prasanna@in.ibm.com> added function-return probes. 28 * <prasanna@in.ibm.com> added function-return probes.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/kprobes.h> 31#include <linux/kprobes.h>
33#include <linux/ptrace.h> 32#include <linux/ptrace.h>
34#include <linux/preempt.h> 33#include <linux/preempt.h>
diff --git a/arch/i386/kernel/mca.c b/arch/i386/kernel/mca.c
index 558bb207720..cd5456f14af 100644
--- a/arch/i386/kernel/mca.c
+++ b/arch/i386/kernel/mca.c
@@ -46,7 +46,6 @@
46#include <asm/io.h> 46#include <asm/io.h>
47#include <linux/proc_fs.h> 47#include <linux/proc_fs.h>
48#include <linux/mman.h> 48#include <linux/mman.h>
49#include <linux/config.h>
50#include <linux/mm.h> 49#include <linux/mm.h>
51#include <linux/pagemap.h> 50#include <linux/pagemap.h>
52#include <linux/ioport.h> 51#include <linux/ioport.h>
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c
index 6b1392d33ed..a70b5fa0ef0 100644
--- a/arch/i386/kernel/mpparse.c
+++ b/arch/i386/kernel/mpparse.c
@@ -17,7 +17,6 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/acpi.h> 18#include <linux/acpi.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <linux/config.h>
21#include <linux/bootmem.h> 20#include <linux/bootmem.h>
22#include <linux/smp_lock.h> 21#include <linux/smp_lock.h>
23#include <linux/kernel_stat.h> 22#include <linux/kernel_stat.h>
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c
index 5c29a9fb4a4..d535cdbbfd2 100644
--- a/arch/i386/kernel/msr.c
+++ b/arch/i386/kernel/msr.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/config.h>
28 27
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
diff --git a/arch/i386/kernel/numaq.c b/arch/i386/kernel/numaq.c
index 0caf14652ba..9000d82c6dc 100644
--- a/arch/i386/kernel/numaq.c
+++ b/arch/i386/kernel/numaq.c
@@ -23,7 +23,6 @@
23 * Send feedback to <gone@us.ibm.com> 23 * Send feedback to <gone@us.ibm.com>
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/bootmem.h> 27#include <linux/bootmem.h>
29#include <linux/mmzone.h> 28#include <linux/mmzone.h>
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c
index 6946b06e278..94e2c87edea 100644
--- a/arch/i386/kernel/process.c
+++ b/arch/i386/kernel/process.c
@@ -28,7 +28,6 @@
28#include <linux/user.h> 28#include <linux/user.h>
29#include <linux/a.out.h> 29#include <linux/a.out.h>
30#include <linux/interrupt.h> 30#include <linux/interrupt.h>
31#include <linux/config.h>
32#include <linux/utsname.h> 31#include <linux/utsname.h>
33#include <linux/delay.h> 32#include <linux/delay.h>
34#include <linux/reboot.h> 33#include <linux/reboot.h>
diff --git a/arch/i386/kernel/quirks.c b/arch/i386/kernel/quirks.c
index 87ccdac8492..9f6ab1789bb 100644
--- a/arch/i386/kernel/quirks.c
+++ b/arch/i386/kernel/quirks.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * This file contains work-arounds for x86 and x86_64 platform bugs. 2 * This file contains work-arounds for x86 and x86_64 platform bugs.
3 */ 3 */
4#include <linux/config.h>
5#include <linux/pci.h> 4#include <linux/pci.h>
6#include <linux/irq.h> 5#include <linux/irq.h>
7 6
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c
index d207242976d..54cfeabbc5e 100644
--- a/arch/i386/kernel/reboot.c
+++ b/arch/i386/kernel/reboot.c
@@ -2,7 +2,6 @@
2 * linux/arch/i386/kernel/reboot.c 2 * linux/arch/i386/kernel/reboot.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/mm.h> 5#include <linux/mm.h>
7#include <linux/module.h> 6#include <linux/module.h>
8#include <linux/delay.h> 7#include <linux/delay.h>
diff --git a/arch/i386/kernel/scx200.c b/arch/i386/kernel/scx200.c
index 9bf590cefc7..c7d3df23f58 100644
--- a/arch/i386/kernel/scx200.c
+++ b/arch/i386/kernel/scx200.c
@@ -4,7 +4,6 @@
4 4
5 National Semiconductor SCx200 support. */ 5 National Semiconductor SCx200 support. */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/errno.h> 8#include <linux/errno.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
diff --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c
index 967dc74df9e..98352c374c7 100644
--- a/arch/i386/kernel/semaphore.c
+++ b/arch/i386/kernel/semaphore.c
@@ -12,7 +12,6 @@
12 * 12 *
13 * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org> 13 * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org>
14 */ 14 */
15#include <linux/config.h>
16#include <asm/semaphore.h> 15#include <asm/semaphore.h>
17 16
18/* 17/*
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index 6712f0d2eb3..08c00d20f16 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -23,7 +23,6 @@
23 * This file handles the architecture-dependent parts of initialization 23 * This file handles the architecture-dependent parts of initialization
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/mm.h> 27#include <linux/mm.h>
29#include <linux/mmzone.h> 28#include <linux/mmzone.h>
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 89e7315e539..6f5fea05f1d 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -34,7 +34,6 @@
34* Rusty Russell : Hacked into shape for new "hotplug" boot process. */ 34* Rusty Russell : Hacked into shape for new "hotplug" boot process. */
35 35
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/config.h>
38#include <linux/init.h> 37#include <linux/init.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40 39
diff --git a/arch/i386/kernel/srat.c b/arch/i386/kernel/srat.c
index 989c85255db..b1809c9a089 100644
--- a/arch/i386/kernel/srat.c
+++ b/arch/i386/kernel/srat.c
@@ -23,7 +23,6 @@
23 * 23 *
24 * Send feedback to Pat Gaughen <gone@us.ibm.com> 24 * Send feedback to Pat Gaughen <gone@us.ibm.com>
25 */ 25 */
26#include <linux/config.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/bootmem.h> 27#include <linux/bootmem.h>
29#include <linux/mmzone.h> 28#include <linux/mmzone.h>
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
index 5f43d041012..316421a7f56 100644
--- a/arch/i386/kernel/time.c
+++ b/arch/i386/kernel/time.c
@@ -60,7 +60,6 @@
60#include "mach_time.h" 60#include "mach_time.h"
61 61
62#include <linux/timex.h> 62#include <linux/timex.h>
63#include <linux/config.h>
64 63
65#include <asm/hpet.h> 64#include <asm/hpet.h>
66 65
diff --git a/arch/i386/kernel/time_hpet.c b/arch/i386/kernel/time_hpet.c
index a529f0cdce1..14a1376fedd 100644
--- a/arch/i386/kernel/time_hpet.c
+++ b/arch/i386/kernel/time_hpet.c
@@ -18,7 +18,6 @@
18#include <asm/apic.h> 18#include <asm/apic.h>
19 19
20#include <linux/timex.h> 20#include <linux/timex.h>
21#include <linux/config.h>
22 21
23#include <asm/hpet.h> 22#include <asm/hpet.h>
24#include <linux/hpet.h> 23#include <linux/hpet.h>
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index 78464097470..e8c6086b2aa 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -11,7 +11,6 @@
11 * 'Traps.c' handles hardware traps and faults after we have saved some 11 * 'Traps.c' handles hardware traps and faults after we have saved some
12 * state in 'asm.s'. 12 * state in 'asm.s'.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/string.h> 16#include <linux/string.h>
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c
index 00e0118e717..8355d8d87d1 100644
--- a/arch/i386/kernel/vm86.c
+++ b/arch/i386/kernel/vm86.c
@@ -31,7 +31,6 @@
31 */ 31 */
32 32
33#include <linux/capability.h> 33#include <linux/capability.h>
34#include <linux/config.h>
35#include <linux/errno.h> 34#include <linux/errno.h>
36#include <linux/interrupt.h> 35#include <linux/interrupt.h>
37#include <linux/sched.h> 36#include <linux/sched.h>
diff --git a/arch/i386/lib/checksum.S b/arch/i386/lib/checksum.S
index 94c7867ddc3..75ffd02654f 100644
--- a/arch/i386/lib/checksum.S
+++ b/arch/i386/lib/checksum.S
@@ -25,7 +25,6 @@
25 * 2 of the License, or (at your option) any later version. 25 * 2 of the License, or (at your option) any later version.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <asm/errno.h> 28#include <asm/errno.h>
30 29
31/* 30/*
diff --git a/arch/i386/lib/memcpy.c b/arch/i386/lib/memcpy.c
index 891b2359d18..8ac51b82a63 100644
--- a/arch/i386/lib/memcpy.c
+++ b/arch/i386/lib/memcpy.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/string.h> 1#include <linux/string.h>
3#include <linux/module.h> 2#include <linux/module.h>
4 3
diff --git a/arch/i386/lib/mmx.c b/arch/i386/lib/mmx.c
index 2afda94dffd..28084d2e8dd 100644
--- a/arch/i386/lib/mmx.c
+++ b/arch/i386/lib/mmx.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/types.h> 1#include <linux/types.h>
3#include <linux/string.h> 2#include <linux/string.h>
4#include <linux/sched.h> 3#include <linux/sched.h>
diff --git a/arch/i386/lib/usercopy.c b/arch/i386/lib/usercopy.c
index c5aa65f7c02..4b75212ab6d 100644
--- a/arch/i386/lib/usercopy.c
+++ b/arch/i386/lib/usercopy.c
@@ -5,7 +5,6 @@
5 * Copyright 1997 Andi Kleen <ak@muc.de> 5 * Copyright 1997 Andi Kleen <ak@muc.de>
6 * Copyright 1997 Linus Torvalds 6 * Copyright 1997 Linus Torvalds
7 */ 7 */
8#include <linux/config.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/highmem.h> 9#include <linux/highmem.h>
11#include <linux/blkdev.h> 10#include <linux/blkdev.h>
diff --git a/arch/i386/mach-default/setup.c b/arch/i386/mach-default/setup.c
index 004837c5879..c511705c386 100644
--- a/arch/i386/mach-default/setup.c
+++ b/arch/i386/mach-default/setup.c
@@ -2,7 +2,6 @@
2 * Machine specific setup for generic 2 * Machine specific setup for generic
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/smp.h> 5#include <linux/smp.h>
7#include <linux/init.h> 6#include <linux/init.h>
8#include <linux/interrupt.h> 7#include <linux/interrupt.h>
@@ -80,7 +79,7 @@ void __init trap_init_hook(void)
80{ 79{
81} 80}
82 81
83static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; 82static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL};
84 83
85/** 84/**
86 * time_init_hook - do any specific initialisations for the system timer. 85 * time_init_hook - do any specific initialisations for the system timer.
diff --git a/arch/i386/mach-generic/bigsmp.c b/arch/i386/mach-generic/bigsmp.c
index 037b2af1a1f..ef7a6e6fcb9 100644
--- a/arch/i386/mach-generic/bigsmp.c
+++ b/arch/i386/mach-generic/bigsmp.c
@@ -3,7 +3,6 @@
3 * Drives the local APIC in "clustered mode". 3 * Drives the local APIC in "clustered mode".
4 */ 4 */
5#define APIC_DEFINITION 1 5#define APIC_DEFINITION 1
6#include <linux/config.h>
7#include <linux/threads.h> 6#include <linux/threads.h>
8#include <linux/cpumask.h> 7#include <linux/cpumask.h>
9#include <asm/mpspec.h> 8#include <asm/mpspec.h>
diff --git a/arch/i386/mach-generic/default.c b/arch/i386/mach-generic/default.c
index 7da14e9a79c..96c19821e47 100644
--- a/arch/i386/mach-generic/default.c
+++ b/arch/i386/mach-generic/default.c
@@ -2,7 +2,6 @@
2 * Default generic APIC driver. This handles upto 8 CPUs. 2 * Default generic APIC driver. This handles upto 8 CPUs.
3 */ 3 */
4#define APIC_DEFINITION 1 4#define APIC_DEFINITION 1
5#include <linux/config.h>
6#include <linux/threads.h> 5#include <linux/threads.h>
7#include <linux/cpumask.h> 6#include <linux/cpumask.h>
8#include <asm/mpspec.h> 7#include <asm/mpspec.h>
diff --git a/arch/i386/mach-generic/es7000.c b/arch/i386/mach-generic/es7000.c
index 48d3ec37241..845cdd0b359 100644
--- a/arch/i386/mach-generic/es7000.c
+++ b/arch/i386/mach-generic/es7000.c
@@ -2,7 +2,6 @@
2 * APIC driver for the Unisys ES7000 chipset. 2 * APIC driver for the Unisys ES7000 chipset.
3 */ 3 */
4#define APIC_DEFINITION 1 4#define APIC_DEFINITION 1
5#include <linux/config.h>
6#include <linux/threads.h> 5#include <linux/threads.h>
7#include <linux/cpumask.h> 6#include <linux/cpumask.h>
8#include <asm/mpspec.h> 7#include <asm/mpspec.h>
diff --git a/arch/i386/mach-generic/probe.c b/arch/i386/mach-generic/probe.c
index d55fa7b187a..bcd1bcfaa72 100644
--- a/arch/i386/mach-generic/probe.c
+++ b/arch/i386/mach-generic/probe.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Generic x86 APIC driver probe layer. 4 * Generic x86 APIC driver probe layer.
5 */ 5 */
6#include <linux/config.h>
7#include <linux/threads.h> 6#include <linux/threads.h>
8#include <linux/cpumask.h> 7#include <linux/cpumask.h>
9#include <linux/string.h> 8#include <linux/string.h>
diff --git a/arch/i386/mach-generic/summit.c b/arch/i386/mach-generic/summit.c
index 65ddf74d7f2..b73501ddd65 100644
--- a/arch/i386/mach-generic/summit.c
+++ b/arch/i386/mach-generic/summit.c
@@ -2,7 +2,6 @@
2 * APIC driver for the IBM "Summit" chipset. 2 * APIC driver for the IBM "Summit" chipset.
3 */ 3 */
4#define APIC_DEFINITION 1 4#define APIC_DEFINITION 1
5#include <linux/config.h>
6#include <linux/threads.h> 5#include <linux/threads.h>
7#include <linux/cpumask.h> 6#include <linux/cpumask.h>
8#include <asm/mpspec.h> 7#include <asm/mpspec.h>
diff --git a/arch/i386/mach-visws/mpparse.c b/arch/i386/mach-visws/mpparse.c
index 5f3d7e6de37..f3c74fab8b9 100644
--- a/arch/i386/mach-visws/mpparse.c
+++ b/arch/i386/mach-visws/mpparse.c
@@ -1,5 +1,4 @@
1 1
2#include <linux/config.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include <linux/smp.h> 3#include <linux/smp.h>
5 4
diff --git a/arch/i386/mach-visws/setup.c b/arch/i386/mach-visws/setup.c
index 1f84cdb2477..885c7cbfd47 100644
--- a/arch/i386/mach-visws/setup.c
+++ b/arch/i386/mach-visws/setup.c
@@ -115,7 +115,7 @@ void __init pre_setup_arch_hook()
115 115
116static struct irqaction irq0 = { 116static struct irqaction irq0 = {
117 .handler = timer_interrupt, 117 .handler = timer_interrupt,
118 .flags = SA_INTERRUPT, 118 .flags = IRQF_DISABLED,
119 .name = "timer", 119 .name = "timer",
120}; 120};
121 121
diff --git a/arch/i386/mach-visws/traps.c b/arch/i386/mach-visws/traps.c
index 96435399203..5199bd03254 100644
--- a/arch/i386/mach-visws/traps.c
+++ b/arch/i386/mach-visws/traps.c
@@ -1,6 +1,5 @@
1/* VISWS traps */ 1/* VISWS traps */
2 2
3#include <linux/config.h>
4#include <linux/sched.h> 3#include <linux/sched.h>
5#include <linux/kernel.h> 4#include <linux/kernel.h>
6#include <linux/init.h> 5#include <linux/init.h>
diff --git a/arch/i386/mach-visws/visws_apic.c b/arch/i386/mach-visws/visws_apic.c
index c418521dd55..828522541a8 100644
--- a/arch/i386/mach-visws/visws_apic.c
+++ b/arch/i386/mach-visws/visws_apic.c
@@ -16,7 +16,6 @@
16 * 25/11/2002 - Updated for 2.5 by Andrey Panin <pazke@orbita1.ru> 16 * 25/11/2002 - Updated for 2.5 by Andrey Panin <pazke@orbita1.ru>
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/kernel_stat.h> 19#include <linux/kernel_stat.h>
21#include <linux/interrupt.h> 20#include <linux/interrupt.h>
22#include <linux/smp_lock.h> 21#include <linux/smp_lock.h>
diff --git a/arch/i386/mach-voyager/setup.c b/arch/i386/mach-voyager/setup.c
index defc6ebbd56..cfa16c151c8 100644
--- a/arch/i386/mach-voyager/setup.c
+++ b/arch/i386/mach-voyager/setup.c
@@ -2,7 +2,6 @@
2 * Machine specific setup for generic 2 * Machine specific setup for generic
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/init.h> 5#include <linux/init.h>
7#include <linux/interrupt.h> 6#include <linux/interrupt.h>
8#include <asm/arch_hooks.h> 7#include <asm/arch_hooks.h>
@@ -41,7 +40,7 @@ void __init trap_init_hook(void)
41{ 40{
42} 41}
43 42
44static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; 43static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL};
45 44
46void __init time_init_hook(void) 45void __init time_init_hook(void)
47{ 46{
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c
index b584060ec00..80b7f2fc4f4 100644
--- a/arch/i386/mach-voyager/voyager_basic.c
+++ b/arch/i386/mach-voyager/voyager_basic.c
@@ -12,7 +12,6 @@
12 * voyager_smp.c - Voyager SMP hal (emulates linux smp.c) 12 * voyager_smp.c - Voyager SMP hal (emulates linux smp.c)
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/arch/i386/mach-voyager/voyager_cat.c b/arch/i386/mach-voyager/voyager_cat.c
index 10d21df1453..f50c6c6ad68 100644
--- a/arch/i386/mach-voyager/voyager_cat.c
+++ b/arch/i386/mach-voyager/voyager_cat.c
@@ -16,7 +16,6 @@
16 * of bit shift manipulations to send and receive packets on the 16 * of bit shift manipulations to send and receive packets on the
17 * serial bus */ 17 * serial bus */
18 18
19#include <linux/config.h>
20#include <linux/types.h> 19#include <linux/types.h>
21#include <linux/completion.h> 20#include <linux/completion.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c
index 6e9e494c6c3..6c86575ffdc 100644
--- a/arch/i386/mach-voyager/voyager_smp.c
+++ b/arch/i386/mach-voyager/voyager_smp.c
@@ -9,7 +9,6 @@
9 * This file provides all the same external entries as smp.c but uses 9 * This file provides all the same external entries as smp.c but uses
10 * the voyager hal to provide the functionality 10 * the voyager hal to provide the functionality
11 */ 11 */
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
15#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
diff --git a/arch/i386/mach-voyager/voyager_thread.c b/arch/i386/mach-voyager/voyager_thread.c
index 2b03884fdb2..50f6de6ff64 100644
--- a/arch/i386/mach-voyager/voyager_thread.c
+++ b/arch/i386/mach-voyager/voyager_thread.c
@@ -14,7 +14,6 @@
14 * */ 14 * */
15 15
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/config.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
19#include <linux/kernel_stat.h> 18#include <linux/kernel_stat.h>
20#include <linux/delay.h> 19#include <linux/delay.h>
diff --git a/arch/i386/mm/boot_ioremap.c b/arch/i386/mm/boot_ioremap.c
index 523b30634e0..5d44f4f5ff5 100644
--- a/arch/i386/mm/boot_ioremap.c
+++ b/arch/i386/mm/boot_ioremap.c
@@ -15,7 +15,6 @@
15 * boot_pte_t is defined only if this all works correctly 15 * boot_pte_t is defined only if this all works correctly
16 */ 16 */
17 17
18#include <linux/config.h>
19#undef CONFIG_X86_PAE 18#undef CONFIG_X86_PAE
20#include <asm/page.h> 19#include <asm/page.h>
21#include <asm/pgtable.h> 20#include <asm/pgtable.h>
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index fe6eb901326..7c392dc553b 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/mm.h> 25#include <linux/mm.h>
27#include <linux/bootmem.h> 26#include <linux/bootmem.h>
28#include <linux/mmzone.h> 27#include <linux/mmzone.h>
@@ -43,7 +42,7 @@ EXPORT_SYMBOL(node_data);
43bootmem_data_t node0_bdata; 42bootmem_data_t node0_bdata;
44 43
45/* 44/*
46 * numa interface - we expect the numa architecture specfic code to have 45 * numa interface - we expect the numa architecture specific code to have
47 * populated the following initialisation. 46 * populated the following initialisation.
48 * 47 *
49 * 1) node_online_map - the map of all nodes configured (online) in the system 48 * 1) node_online_map - the map of all nodes configured (online) in the system
diff --git a/arch/i386/mm/extable.c b/arch/i386/mm/extable.c
index f706449319c..de03c5430ab 100644
--- a/arch/i386/mm/extable.c
+++ b/arch/i386/mm/extable.c
@@ -2,7 +2,6 @@
2 * linux/arch/i386/mm/extable.c 2 * linux/arch/i386/mm/extable.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/spinlock.h> 6#include <linux/spinlock.h>
8#include <asm/uaccess.h> 7#include <asm/uaccess.h>
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c
index 6ee7faaf2c1..f7279468323 100644
--- a/arch/i386/mm/fault.c
+++ b/arch/i386/mm/fault.c
@@ -389,7 +389,7 @@ fastcall void __kprobes do_page_fault(struct pt_regs *regs,
389 /* When running in the kernel we expect faults to occur only to 389 /* When running in the kernel we expect faults to occur only to
390 * addresses in user space. All other faults represent errors in the 390 * addresses in user space. All other faults represent errors in the
391 * kernel and should generate an OOPS. Unfortunatly, in the case of an 391 * kernel and should generate an OOPS. Unfortunatly, in the case of an
392 * erroneous fault occuring in a code path which already holds mmap_sem 392 * erroneous fault occurring in a code path which already holds mmap_sem
393 * we will deadlock attempting to validate the fault against the 393 * we will deadlock attempting to validate the fault against the
394 * address space. Luckily the kernel only validly references user 394 * address space. Luckily the kernel only validly references user
395 * space from well defined areas of code, which are listed in the 395 * space from well defined areas of code, which are listed in the
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c
index a7d89158541..1719a8141f8 100644
--- a/arch/i386/mm/hugetlbpage.c
+++ b/arch/i386/mm/hugetlbpage.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 2002, Rohit Seth <rohit.seth@intel.com> 4 * Copyright (C) 2002, Rohit Seth <rohit.seth@intel.com>
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/fs.h> 8#include <linux/fs.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index f84b16e007f..89e8486aac3 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -6,7 +6,6 @@
6 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999 6 * Support of BIGMEM added by Gerhard Wichert, Siemens AG, July 1999
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/signal.h> 10#include <linux/signal.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
@@ -726,16 +725,15 @@ static int noinline do_test_wp_bit(void)
726 725
727#ifdef CONFIG_DEBUG_RODATA 726#ifdef CONFIG_DEBUG_RODATA
728 727
729extern char __start_rodata, __end_rodata;
730void mark_rodata_ro(void) 728void mark_rodata_ro(void)
731{ 729{
732 unsigned long addr = (unsigned long)&__start_rodata; 730 unsigned long addr = (unsigned long)__start_rodata;
733 731
734 for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) 732 for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE)
735 change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO); 733 change_page_attr(virt_to_page(addr), 1, PAGE_KERNEL_RO);
736 734
737 printk ("Write protecting the kernel read-only data: %luk\n", 735 printk("Write protecting the kernel read-only data: %uk\n",
738 (unsigned long)(&__end_rodata - &__start_rodata) >> 10); 736 (__end_rodata - __start_rodata) >> 10);
739 737
740 /* 738 /*
741 * change_page_attr() requires a global_flush_tlb() call after it. 739 * change_page_attr() requires a global_flush_tlb() call after it.
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c
index 353a836ed63..8564b6ae17e 100644
--- a/arch/i386/mm/pageattr.c
+++ b/arch/i386/mm/pageattr.c
@@ -3,7 +3,6 @@
3 * Thanks to Ben LaHaise for precious feedback. 3 * Thanks to Ben LaHaise for precious feedback.
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/mm.h> 6#include <linux/mm.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/highmem.h> 8#include <linux/highmem.h>
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c
index 5e735ff90e8..bd98768d876 100644
--- a/arch/i386/mm/pgtable.c
+++ b/arch/i386/mm/pgtable.c
@@ -2,7 +2,6 @@
2 * linux/arch/i386/mm/pgtable.c 2 * linux/arch/i386/mm/pgtable.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/sched.h> 5#include <linux/sched.h>
7#include <linux/kernel.h> 6#include <linux/kernel.h>
8#include <linux/errno.h> 7#include <linux/errno.h>
diff --git a/arch/i386/pci/init.c b/arch/i386/pci/init.c
index f9156d3ac72..c7650a7e0b0 100644
--- a/arch/i386/pci/init.c
+++ b/arch/i386/pci/init.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/pci.h> 1#include <linux/pci.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include "pci.h" 3#include "pci.h"
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index 8ce69508f3c..4a8995c9c76 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -4,7 +4,6 @@
4 * (c) 1999--2000 Martin Mares <mj@ucw.cz> 4 * (c) 1999--2000 Martin Mares <mj@ucw.cz>
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/types.h> 7#include <linux/types.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/pci.h> 9#include <linux/pci.h>
@@ -865,7 +864,7 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
865 for (i = 0; i < 16; i++) { 864 for (i = 0; i < 16; i++) {
866 if (!(mask & (1 << i))) 865 if (!(mask & (1 << i)))
867 continue; 866 continue;
868 if (pirq_penalty[i] < pirq_penalty[newirq] && can_request_irq(i, SA_SHIRQ)) 867 if (pirq_penalty[i] < pirq_penalty[newirq] && can_request_irq(i, IRQF_SHARED))
869 newirq = i; 868 newirq = i;
870 } 869 }
871 } 870 }
diff --git a/arch/i386/pci/visws.c b/arch/i386/pci/visws.c
index 6c17433fdf7..f1b486d4190 100644
--- a/arch/i386/pci/visws.c
+++ b/arch/i386/pci/visws.c
@@ -4,7 +4,6 @@
4 * (c) 1999--2000 Martin Mares <mj@ucw.cz> 4 * (c) 1999--2000 Martin Mares <mj@ucw.cz>
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/pci.h> 8#include <linux/pci.h>
10#include <linux/init.h> 9#include <linux/init.h>
diff --git a/arch/i386/power/cpu.c b/arch/i386/power/cpu.c
index e6517915fe3..5a1abeff033 100644
--- a/arch/i386/power/cpu.c
+++ b/arch/i386/power/cpu.c
@@ -7,7 +7,6 @@
7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> 7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org>
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/suspend.h> 11#include <linux/suspend.h>
13#include <asm/mtrr.h> 12#include <asm/mtrr.h>
diff --git a/arch/ia64/dig/setup.c b/arch/ia64/dig/setup.c
index 38aa9c10885..5ab12b8351d 100644
--- a/arch/ia64/dig/setup.c
+++ b/arch/ia64/dig/setup.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com> 8 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
9 * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com> 9 * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
10 */ 10 */
11#include <linux/config.h>
12 11
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 5825ddee58d..db8e1fcfa04 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -19,7 +19,6 @@
19** 19**
20*/ 20*/
21 21
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
diff --git a/arch/ia64/hp/sim/boot/bootloader.c b/arch/ia64/hp/sim/boot/bootloader.c
index 51a7b7b4dd0..c5e9baafafe 100644
--- a/arch/ia64/hp/sim/boot/bootloader.c
+++ b/arch/ia64/hp/sim/boot/bootloader.c
@@ -11,7 +11,6 @@
11 */ 11 */
12struct task_struct; /* forward declaration for elf.h */ 12struct task_struct; /* forward declaration for elf.h */
13 13
14#include <linux/config.h>
15#include <linux/elf.h> 14#include <linux/elf.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/ia64/hp/sim/boot/fw-emu.c b/arch/ia64/hp/sim/boot/fw-emu.c
index 30fdfb1d0a5..5a0a7afcfc3 100644
--- a/arch/ia64/hp/sim/boot/fw-emu.c
+++ b/arch/ia64/hp/sim/boot/fw-emu.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1998-2001 Hewlett-Packard Co 4 * Copyright (C) 1998-2001 Hewlett-Packard Co
5 * David Mosberger-Tang <davidm@hpl.hp.com> 5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 */ 6 */
7#include <linux/config.h>
8 7
9#ifdef CONFIG_PCI 8#ifdef CONFIG_PCI
10# include <linux/pci.h> 9# include <linux/pci.h>
diff --git a/arch/ia64/hp/sim/hpsim_console.c b/arch/ia64/hp/sim/hpsim_console.c
index 5deff21e587..6e149c8ab83 100644
--- a/arch/ia64/hp/sim/hpsim_console.c
+++ b/arch/ia64/hp/sim/hpsim_console.c
@@ -5,7 +5,6 @@
5 * David Mosberger-Tang <davidm@hpl.hp.com> 5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com> 6 * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
7 */ 7 */
8#include <linux/config.h>
9 8
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
diff --git a/arch/ia64/hp/sim/hpsim_setup.c b/arch/ia64/hp/sim/hpsim_setup.c
index 694fc86bfbd..f2297192a58 100644
--- a/arch/ia64/hp/sim/hpsim_setup.c
+++ b/arch/ia64/hp/sim/hpsim_setup.c
@@ -5,7 +5,6 @@
5 * David Mosberger-Tang <davidm@hpl.hp.com> 5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com> 6 * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
7 */ 7 */
8#include <linux/config.h>
9#include <linux/console.h> 8#include <linux/console.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/kdev_t.h> 10#include <linux/kdev_t.h>
diff --git a/arch/ia64/hp/sim/simeth.c b/arch/ia64/hp/sim/simeth.c
index 0639ec0ed01..b5195be6281 100644
--- a/arch/ia64/hp/sim/simeth.c
+++ b/arch/ia64/hp/sim/simeth.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1999-2001, 2003 Hewlett-Packard Co 4 * Copyright (C) 1999-2001, 2003 Hewlett-Packard Co
5 * Stephane Eranian <eranian@hpl.hp.com> 5 * Stephane Eranian <eranian@hpl.hp.com>
6 */ 6 */
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/sched.h> 8#include <linux/sched.h>
10#include <linux/types.h> 9#include <linux/types.h>
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c
index 0e5c6ae5022..0daacc20ed3 100644
--- a/arch/ia64/hp/sim/simserial.c
+++ b/arch/ia64/hp/sim/simserial.c
@@ -16,7 +16,6 @@
16 * 07/30/02 D. Mosberger Replace sti()/cli() with explicit spinlocks & local irq masking 16 * 07/30/02 D. Mosberger Replace sti()/cli() with explicit spinlocks & local irq masking
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
@@ -47,7 +46,7 @@
47 46
48#define NR_PORTS 1 /* only one port for now */ 47#define NR_PORTS 1 /* only one port for now */
49 48
50#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) 49#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED)
51 50
52#define SSC_GETCHAR 21 51#define SSC_GETCHAR 21
53 52
diff --git a/arch/ia64/ia32/Makefile b/arch/ia64/ia32/Makefile
index 61cb60affd9..baad8c7699c 100644
--- a/arch/ia64/ia32/Makefile
+++ b/arch/ia64/ia32/Makefile
@@ -4,6 +4,7 @@
4 4
5obj-y := ia32_entry.o sys_ia32.o ia32_signal.o \ 5obj-y := ia32_entry.o sys_ia32.o ia32_signal.o \
6 ia32_support.o ia32_traps.o binfmt_elf32.o ia32_ldt.o 6 ia32_support.o ia32_traps.o binfmt_elf32.o ia32_ldt.o
7obj-$(CONFIG_AUDIT) += audit.o
7 8
8# Don't let GCC uses f16-f31 so that save_ia32_fpstate_live() and 9# Don't let GCC uses f16-f31 so that save_ia32_fpstate_live() and
9# restore_ia32_fpstate_live() can be sure the live register contain user-level state. 10# restore_ia32_fpstate_live() can be sure the live register contain user-level state.
diff --git a/arch/ia64/ia32/audit.c b/arch/ia64/ia32/audit.c
new file mode 100644
index 00000000000..ab94f2e58cd
--- /dev/null
+++ b/arch/ia64/ia32/audit.c
@@ -0,0 +1,11 @@
1#include <asm-i386/unistd.h>
2
3unsigned ia32_dir_class[] = {
4#include <asm-generic/audit_dir_write.h>
5~0U
6};
7
8unsigned ia32_chattr_class[] = {
9#include <asm-generic/audit_change_attr.h>
10~0U
11};
diff --git a/arch/ia64/ia32/binfmt_elf32.c b/arch/ia64/ia32/binfmt_elf32.c
index da03c06744f..daa6b91bc92 100644
--- a/arch/ia64/ia32/binfmt_elf32.c
+++ b/arch/ia64/ia32/binfmt_elf32.c
@@ -9,7 +9,6 @@
9 * 04/13/01 D. Mosberger dropped saving tssd in ar.k1---it's not needed 9 * 04/13/01 D. Mosberger dropped saving tssd in ar.k1---it's not needed
10 * 09/14/01 D. Mosberger fixed memory management for gdt/tss page 10 * 09/14/01 D. Mosberger fixed memory management for gdt/tss page
11 */ 11 */
12#include <linux/config.h>
13 12
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h
index ccb98ed48e5..703a67c934f 100644
--- a/arch/ia64/ia32/ia32priv.h
+++ b/arch/ia64/ia32/ia32priv.h
@@ -1,7 +1,6 @@
1#ifndef _ASM_IA64_IA32_PRIV_H 1#ifndef _ASM_IA64_IA32_PRIV_H
2#define _ASM_IA64_IA32_PRIV_H 2#define _ASM_IA64_IA32_PRIV_H
3 3
4#include <linux/config.h>
5 4
6#include <asm/ia32.h> 5#include <asm/ia32.h>
7 6
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 5366b3b23d0..6aa3c51619c 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -14,7 +14,6 @@
14 * environment. 14 * environment.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/syscalls.h> 18#include <linux/syscalls.h>
20#include <linux/sysctl.h> 19#include <linux/sysctl.h>
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 09a0dbc17fb..0e4553f320b 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -29,6 +29,7 @@ obj-$(CONFIG_CPU_FREQ) += cpufreq/
29obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o 29obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o
30obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o 30obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o
31obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o 31obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o
32obj-$(CONFIG_AUDIT) += audit.o
32mca_recovery-y += mca_drv.o mca_drv_asm.o 33mca_recovery-y += mca_drv.o mca_drv_asm.o
33 34
34# The gate DSO image is built using a special linker script. 35# The gate DSO image is built using a special linker script.
diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c
index fff82929d22..2a1ef742e22 100644
--- a/arch/ia64/kernel/acpi-ext.c
+++ b/arch/ia64/kernel/acpi-ext.c
@@ -8,7 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/acpi.h> 13#include <linux/acpi.h>
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index ca16d9556bd..ccdef199d91 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -32,7 +32,6 @@
32 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/init.h> 36#include <linux/init.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
diff --git a/arch/ia64/kernel/asm-offsets.c b/arch/ia64/kernel/asm-offsets.c
index 16e7b6600ae..75a2a2c1225 100644
--- a/arch/ia64/kernel/asm-offsets.c
+++ b/arch/ia64/kernel/asm-offsets.c
@@ -5,7 +5,6 @@
5 */ 5 */
6 6
7#define ASM_OFFSETS_C 1 7#define ASM_OFFSETS_C 1
8#include <linux/config.h>
9 8
10#include <linux/sched.h> 9#include <linux/sched.h>
11 10
diff --git a/arch/ia64/kernel/audit.c b/arch/ia64/kernel/audit.c
new file mode 100644
index 00000000000..f2512931cca
--- /dev/null
+++ b/arch/ia64/kernel/audit.c
@@ -0,0 +1,29 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned chattr_class[] = {
12#include <asm-generic/audit_change_attr.h>
13~0U
14};
15
16static int __init audit_classes_init(void)
17{
18#ifdef CONFIG_IA32_SUPPORT
19 extern __u32 ia32_dir_class[];
20 extern __u32 ia32_chattr_class[];
21 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class);
22 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class);
23#endif
24 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
25 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
26 return 0;
27}
28
29__initcall(audit_classes_init);
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
index 5a1bf815282..86faf221a07 100644
--- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
+++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c
@@ -9,7 +9,6 @@
9 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 9 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c
index c33d0ba7e30..b13c0555c3b 100644
--- a/arch/ia64/kernel/efi.c
+++ b/arch/ia64/kernel/efi.c
@@ -20,7 +20,6 @@
20 * Goutham Rao: <goutham.rao@intel.com> 20 * Goutham Rao: <goutham.rao@intel.com>
21 * Skip non-WB memory and ignore empty memory ranges. 21 * Skip non-WB memory and ignore empty memory ranges.
22 */ 22 */
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index 32c999f58d1..12701cf32d9 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -31,7 +31,6 @@
31 * pNonSys: !pSys 31 * pNonSys: !pSys
32 */ 32 */
33 33
34#include <linux/config.h>
35 34
36#include <asm/asmmacro.h> 35#include <asm/asmmacro.h>
37#include <asm/cache.h> 36#include <asm/cache.h>
diff --git a/arch/ia64/kernel/entry.h b/arch/ia64/kernel/entry.h
index ebc3dfb8882..b83edac0296 100644
--- a/arch/ia64/kernel/entry.h
+++ b/arch/ia64/kernel/entry.h
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3/* 2/*
4 * Preserved registers that are shared between code in ivt.S and 3 * Preserved registers that are shared between code in ivt.S and
diff --git a/arch/ia64/kernel/gate.S b/arch/ia64/kernel/gate.S
index 86064ca9895..3274850cf27 100644
--- a/arch/ia64/kernel/gate.S
+++ b/arch/ia64/kernel/gate.S
@@ -6,7 +6,6 @@
6 * David Mosberger-Tang <davidm@hpl.hp.com> 6 * David Mosberger-Tang <davidm@hpl.hp.com>
7 */ 7 */
8 8
9#include <linux/config.h>
10 9
11#include <asm/asmmacro.h> 10#include <asm/asmmacro.h>
12#include <asm/errno.h> 11#include <asm/errno.h>
diff --git a/arch/ia64/kernel/gate.lds.S b/arch/ia64/kernel/gate.lds.S
index 7c99e6ec3da..cc35cddfd4c 100644
--- a/arch/ia64/kernel/gate.lds.S
+++ b/arch/ia64/kernel/gate.lds.S
@@ -4,7 +4,6 @@
4 * in one page). This script controls its layout. 4 * in one page). This script controls its layout.
5 */ 5 */
6 6
7#include <linux/config.h>
8 7
9#include <asm/system.h> 8#include <asm/system.h>
10 9
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S
index f1778a84ea6..561b8f1d3bc 100644
--- a/arch/ia64/kernel/head.S
+++ b/arch/ia64/kernel/head.S
@@ -19,7 +19,6 @@
19 * Support for CPU Hotplug 19 * Support for CPU Hotplug
20 */ 20 */
21 21
22#include <linux/config.h>
23 22
24#include <asm/asmmacro.h> 23#include <asm/asmmacro.h>
25#include <asm/fpu.h> 24#include <asm/fpu.h>
diff --git a/arch/ia64/kernel/ia64_ksyms.c b/arch/ia64/kernel/ia64_ksyms.c
index bbcfd08378a..b7cf651ceb1 100644
--- a/arch/ia64/kernel/ia64_ksyms.c
+++ b/arch/ia64/kernel/ia64_ksyms.c
@@ -5,7 +5,6 @@
5 * All other exports should be put directly after the definition. 5 * All other exports should be put directly after the definition.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10 9
11#include <linux/string.h> 10#include <linux/string.h>
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c
index efc7df4b0fd..9bf15fefa7e 100644
--- a/arch/ia64/kernel/iosapic.c
+++ b/arch/ia64/kernel/iosapic.c
@@ -79,7 +79,6 @@
79 * describeinterrupts. Now we use "IRQ" only for Linux IRQ's. ISA IRQ 79 * describeinterrupts. Now we use "IRQ" only for Linux IRQ's. ISA IRQ
80 * (isa_irq) is the only exception in this source code. 80 * (isa_irq) is the only exception in this source code.
81 */ 81 */
82#include <linux/config.h>
83 82
84#include <linux/acpi.h> 83#include <linux/acpi.h>
85#include <linux/init.h> 84#include <linux/init.h>
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
index f5035304594..a041367f043 100644
--- a/arch/ia64/kernel/irq_ia64.c
+++ b/arch/ia64/kernel/irq_ia64.c
@@ -14,7 +14,6 @@
14 * Added CPU Hotplug handling for IPF. 14 * Added CPU Hotplug handling for IPF.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19 18
20#include <linux/jiffies.h> 19#include <linux/jiffies.h>
@@ -236,7 +235,7 @@ extern irqreturn_t handle_IPI (int irq, void *dev_id, struct pt_regs *regs);
236 235
237static struct irqaction ipi_irqaction = { 236static struct irqaction ipi_irqaction = {
238 .handler = handle_IPI, 237 .handler = handle_IPI,
239 .flags = SA_INTERRUPT, 238 .flags = IRQF_DISABLED,
240 .name = "IPI" 239 .name = "IPI"
241}; 240};
242#endif 241#endif
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index 829a43cab79..6b7fcbd3f6f 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -38,7 +38,6 @@
38 * Table is based upon EAS2.6 (Oct 1999) 38 * Table is based upon EAS2.6 (Oct 1999)
39 */ 39 */
40 40
41#include <linux/config.h>
42 41
43#include <asm/asmmacro.h> 42#include <asm/asmmacro.h>
44#include <asm/break.h> 43#include <asm/break.h>
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index f9039f88d01..00d9c83b802 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -23,7 +23,6 @@
23 * <anil.s.keshavamurthy@intel.com> adapted from i386 23 * <anil.s.keshavamurthy@intel.com> adapted from i386
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/kprobes.h> 26#include <linux/kprobes.h>
28#include <linux/ptrace.h> 27#include <linux/ptrace.h>
29#include <linux/string.h> 28#include <linux/string.h>
diff --git a/arch/ia64/kernel/machvec.c b/arch/ia64/kernel/machvec.c
index 4b0b71d5aef..d4a546aa504 100644
--- a/arch/ia64/kernel/machvec.c
+++ b/arch/ia64/kernel/machvec.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3 2
4#include <asm/machvec.h> 3#include <asm/machvec.h>
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c
index d7dc5e63de6..eb8e8dc5ac8 100644
--- a/arch/ia64/kernel/mca.c
+++ b/arch/ia64/kernel/mca.c
@@ -55,7 +55,6 @@
55 * 2005-10-07 Keith Owens <kaos@sgi.com> 55 * 2005-10-07 Keith Owens <kaos@sgi.com>
56 * Add notify_die() hooks. 56 * Add notify_die() hooks.
57 */ 57 */
58#include <linux/config.h>
59#include <linux/types.h> 58#include <linux/types.h>
60#include <linux/init.h> 59#include <linux/init.h>
61#include <linux/sched.h> 60#include <linux/sched.h>
@@ -1458,38 +1457,38 @@ __setup("disable_cpe_poll", ia64_mca_disable_cpe_polling);
1458 1457
1459static struct irqaction cmci_irqaction = { 1458static struct irqaction cmci_irqaction = {
1460 .handler = ia64_mca_cmc_int_handler, 1459 .handler = ia64_mca_cmc_int_handler,
1461 .flags = SA_INTERRUPT, 1460 .flags = IRQF_DISABLED,
1462 .name = "cmc_hndlr" 1461 .name = "cmc_hndlr"
1463}; 1462};
1464 1463
1465static struct irqaction cmcp_irqaction = { 1464static struct irqaction cmcp_irqaction = {
1466 .handler = ia64_mca_cmc_int_caller, 1465 .handler = ia64_mca_cmc_int_caller,
1467 .flags = SA_INTERRUPT, 1466 .flags = IRQF_DISABLED,
1468 .name = "cmc_poll" 1467 .name = "cmc_poll"
1469}; 1468};
1470 1469
1471static struct irqaction mca_rdzv_irqaction = { 1470static struct irqaction mca_rdzv_irqaction = {
1472 .handler = ia64_mca_rendez_int_handler, 1471 .handler = ia64_mca_rendez_int_handler,
1473 .flags = SA_INTERRUPT, 1472 .flags = IRQF_DISABLED,
1474 .name = "mca_rdzv" 1473 .name = "mca_rdzv"
1475}; 1474};
1476 1475
1477static struct irqaction mca_wkup_irqaction = { 1476static struct irqaction mca_wkup_irqaction = {
1478 .handler = ia64_mca_wakeup_int_handler, 1477 .handler = ia64_mca_wakeup_int_handler,
1479 .flags = SA_INTERRUPT, 1478 .flags = IRQF_DISABLED,
1480 .name = "mca_wkup" 1479 .name = "mca_wkup"
1481}; 1480};
1482 1481
1483#ifdef CONFIG_ACPI 1482#ifdef CONFIG_ACPI
1484static struct irqaction mca_cpe_irqaction = { 1483static struct irqaction mca_cpe_irqaction = {
1485 .handler = ia64_mca_cpe_int_handler, 1484 .handler = ia64_mca_cpe_int_handler,
1486 .flags = SA_INTERRUPT, 1485 .flags = IRQF_DISABLED,
1487 .name = "cpe_hndlr" 1486 .name = "cpe_hndlr"
1488}; 1487};
1489 1488
1490static struct irqaction mca_cpep_irqaction = { 1489static struct irqaction mca_cpep_irqaction = {
1491 .handler = ia64_mca_cpe_int_caller, 1490 .handler = ia64_mca_cpe_int_caller,
1492 .flags = SA_INTERRUPT, 1491 .flags = IRQF_DISABLED,
1493 .name = "cpe_poll" 1492 .name = "cpe_poll"
1494}; 1493};
1495#endif /* CONFIG_ACPI */ 1494#endif /* CONFIG_ACPI */
diff --git a/arch/ia64/kernel/mca_asm.S b/arch/ia64/kernel/mca_asm.S
index c1bd1feffab..96047491d1b 100644
--- a/arch/ia64/kernel/mca_asm.S
+++ b/arch/ia64/kernel/mca_asm.S
@@ -19,7 +19,6 @@
19// 12/08/05 Keith Owens <kaos@sgi.com> 19// 12/08/05 Keith Owens <kaos@sgi.com>
20// Use per cpu MCA/INIT stacks for all data. 20// Use per cpu MCA/INIT stacks for all data.
21// 21//
22#include <linux/config.h>
23#include <linux/threads.h> 22#include <linux/threads.h>
24 23
25#include <asm/asmmacro.h> 24#include <asm/asmmacro.h>
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c
index ca6666b51cc..8db6e0cedad 100644
--- a/arch/ia64/kernel/mca_drv.c
+++ b/arch/ia64/kernel/mca_drv.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 2005 Keith Owens <kaos@sgi.com> 8 * Copyright (C) 2005 Keith Owens <kaos@sgi.com>
9 * Copyright (C) 2006 Russ Anderson <rja@sgi.com> 9 * Copyright (C) 2006 Russ Anderson <rja@sgi.com>
10 */ 10 */
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S
index e6a580d354b..f2d4900751b 100644
--- a/arch/ia64/kernel/mca_drv_asm.S
+++ b/arch/ia64/kernel/mca_drv_asm.S
@@ -5,7 +5,6 @@
5 * Copyright (C) 2004 FUJITSU LIMITED 5 * Copyright (C) 2004 FUJITSU LIMITED
6 * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) 6 * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com)
7 */ 7 */
8#include <linux/config.h>
9#include <linux/threads.h> 8#include <linux/threads.h>
10 9
11#include <asm/asmmacro.h> 10#include <asm/asmmacro.h>
diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h
index 85ed54179af..c9ac8bada78 100644
--- a/arch/ia64/kernel/minstate.h
+++ b/arch/ia64/kernel/minstate.h
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#include <asm/cache.h> 2#include <asm/cache.h>
4 3
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c
index 3a30cfc9574..158e3c51bb7 100644
--- a/arch/ia64/kernel/module.c
+++ b/arch/ia64/kernel/module.c
@@ -25,7 +25,6 @@
25 SEGREL64LSB 25 SEGREL64LSB
26 */ 26 */
27 27
28#include <linux/config.h>
29 28
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/sched.h> 30#include <linux/sched.h>
diff --git a/arch/ia64/kernel/numa.c b/arch/ia64/kernel/numa.c
index 0766493d4d0..1cc360c83e7 100644
--- a/arch/ia64/kernel/numa.c
+++ b/arch/ia64/kernel/numa.c
@@ -19,7 +19,6 @@
19 * Copyright (C) 2004 Silicon Graphics, Inc. 19 * Copyright (C) 2004 Silicon Graphics, Inc.
20 * Jesse Barnes <jbarnes@sgi.com> 20 * Jesse Barnes <jbarnes@sgi.com>
21 */ 21 */
22#include <linux/config.h>
23#include <linux/topology.h> 22#include <linux/topology.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <asm/processor.h> 24#include <asm/processor.h>
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index 8a120841913..3f5bac59209 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -17,7 +17,6 @@
17 * 10/23/2001 S.Eranian updated pal_perf_mon_info bug fixes 17 * 10/23/2001 S.Eranian updated pal_perf_mon_info bug fixes
18 * 03/24/2004 Ashok Raj updated to work with CPU Hotplug 18 * 03/24/2004 Ashok Raj updated to work with CPU Hotplug
19 */ 19 */
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
23#include <linux/init.h> 22#include <linux/init.h>
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index a0055d3d695..c7ccd6ee1dd 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -19,7 +19,6 @@
19 * http://www.hpl.hp.com/research/linux/perfmon 19 * http://www.hpl.hp.com/research/linux/perfmon
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
@@ -6440,7 +6439,7 @@ pfm_flush_pmds(struct task_struct *task, pfm_context_t *ctx)
6440 6439
6441static struct irqaction perfmon_irqaction = { 6440static struct irqaction perfmon_irqaction = {
6442 .handler = pfm_interrupt_handler, 6441 .handler = pfm_interrupt_handler,
6443 .flags = SA_INTERRUPT, 6442 .flags = IRQF_DISABLED,
6444 .name = "perfmon" 6443 .name = "perfmon"
6445}; 6444};
6446 6445
diff --git a/arch/ia64/kernel/perfmon_default_smpl.c b/arch/ia64/kernel/perfmon_default_smpl.c
index 344941db0a9..ff80eab83b3 100644
--- a/arch/ia64/kernel/perfmon_default_smpl.c
+++ b/arch/ia64/kernel/perfmon_default_smpl.c
@@ -8,7 +8,6 @@
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/types.h> 9#include <linux/types.h>
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <asm/delay.h> 12#include <asm/delay.h>
14#include <linux/smp.h> 13#include <linux/smp.h>
diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
index b045c279136..ea914cc6812 100644
--- a/arch/ia64/kernel/process.c
+++ b/arch/ia64/kernel/process.c
@@ -9,7 +9,6 @@
9 * Add notify_die() hooks. 9 * Add notify_die() hooks.
10 */ 10 */
11#define __KERNEL_SYSCALLS__ /* see <asm/unistd.h> */ 11#define __KERNEL_SYSCALLS__ /* see <asm/unistd.h> */
12#include <linux/config.h>
13 12
14#include <linux/cpu.h> 13#include <linux/cpu.h>
15#include <linux/pm.h> 14#include <linux/pm.h>
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index e61e15e28d8..aa705e46b97 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Derived from the x86 and Alpha versions. 7 * Derived from the x86 and Alpha versions.
8 */ 8 */
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
12#include <linux/slab.h> 11#include <linux/slab.h>
diff --git a/arch/ia64/kernel/sal.c b/arch/ia64/kernel/sal.c
index 77fa65903d9..642fdc7b969 100644
--- a/arch/ia64/kernel/sal.c
+++ b/arch/ia64/kernel/sal.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1999 VA Linux Systems 6 * Copyright (C) 1999 VA Linux Systems
7 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com> 7 * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
8 */ 8 */
9#include <linux/config.h>
10 9
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c
index 6dba2d63f24..6a33f414de5 100644
--- a/arch/ia64/kernel/setup.c
+++ b/arch/ia64/kernel/setup.c
@@ -22,7 +22,6 @@
22 * 06/24/99 W.Drummond added boot_cpu_data. 22 * 06/24/99 W.Drummond added boot_cpu_data.
23 * 05/28/05 Z. Menyhart Dynamic stride size for "flush_icache_range()" 23 * 05/28/05 Z. Menyhart Dynamic stride size for "flush_icache_range()"
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/init.h> 26#include <linux/init.h>
28 27
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index 1d7903ee212..77f8b49c788 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -7,7 +7,6 @@
7 * Derived from i386 and Alpha versions. 7 * Derived from i386 and Alpha versions.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 5203df78f15..e1960979be2 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -21,7 +21,6 @@
21 * 05/01/30 Suresh Siddha <suresh.b.siddha@intel.com> 21 * 05/01/30 Suresh Siddha <suresh.b.siddha@intel.com>
22 * Setup cpu_sibling_map and cpu_core_map 22 * Setup cpu_sibling_map and cpu_core_map
23 */ 23 */
24#include <linux/config.h>
25 24
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/acpi.h> 26#include <linux/acpi.h>
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
index c7b943f1019..40722d88607 100644
--- a/arch/ia64/kernel/sys_ia64.c
+++ b/arch/ia64/kernel/sys_ia64.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1999-2000, 2002-2003, 2005 Hewlett-Packard Co 5 * Copyright (C) 1999-2000, 2002-2003, 2005 Hewlett-Packard Co
6 * David Mosberger-Tang <davidm@hpl.hp.com> 6 * David Mosberger-Tang <davidm@hpl.hp.com>
7 */ 7 */
8#include <linux/config.h>
9#include <linux/errno.h> 8#include <linux/errno.h>
10#include <linux/fs.h> 9#include <linux/fs.h>
11#include <linux/mm.h> 10#include <linux/mm.h>
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index 49958904045..6928ef0d64d 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1999-2000 VA Linux Systems 8 * Copyright (C) 1999-2000 VA Linux Systems
9 * Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com> 9 * Copyright (C) 1999-2000 Walt Drummond <drummond@valinux.com>
10 */ 10 */
11#include <linux/config.h>
12 11
13#include <linux/cpu.h> 12#include <linux/cpu.h>
14#include <linux/init.h> 13#include <linux/init.h>
@@ -232,7 +231,7 @@ ia64_init_itm (void)
232 231
233static struct irqaction timer_irqaction = { 232static struct irqaction timer_irqaction = {
234 .handler = timer_interrupt, 233 .handler = timer_interrupt,
235 .flags = SA_INTERRUPT, 234 .flags = IRQF_DISABLED,
236 .name = "timer" 235 .name = "timer"
237}; 236};
238 237
diff --git a/arch/ia64/kernel/topology.c b/arch/ia64/kernel/topology.c
index 5511d9c6c70..b146f1cfad3 100644
--- a/arch/ia64/kernel/topology.c
+++ b/arch/ia64/kernel/topology.c
@@ -13,7 +13,6 @@
13 * Populate cpu cache entries in sysfs for cpu cache info 13 * Populate cpu cache entries in sysfs for cpu cache info
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/cpu.h> 16#include <linux/cpu.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c
index 7c1ddc8ac44..e7bbb0f40aa 100644
--- a/arch/ia64/kernel/traps.c
+++ b/arch/ia64/kernel/traps.c
@@ -7,7 +7,6 @@
7 * 05/12/00 grao <goutham.rao@intel.com> : added isr in siginfo for SIGFPE 7 * 05/12/00 grao <goutham.rao@intel.com> : added isr in siginfo for SIGFPE
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S
index 783600fe52b..5b0d5f64a9b 100644
--- a/arch/ia64/kernel/vmlinux.lds.S
+++ b/arch/ia64/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#include <asm/cache.h> 2#include <asm/cache.h>
4#include <asm/ptrace.h> 3#include <asm/ptrace.h>
diff --git a/arch/ia64/lib/clear_page.S b/arch/ia64/lib/clear_page.S
index d4987061dda..2d814e7ed19 100644
--- a/arch/ia64/lib/clear_page.S
+++ b/arch/ia64/lib/clear_page.S
@@ -8,7 +8,6 @@
8 * 2/12/02 kchen Tuned for both Itanium and McKinley 8 * 2/12/02 kchen Tuned for both Itanium and McKinley
9 * 3/08/02 davidm Some more tweaking 9 * 3/08/02 davidm Some more tweaking
10 */ 10 */
11#include <linux/config.h>
12 11
13#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
14#include <asm/page.h> 13#include <asm/page.h>
diff --git a/arch/ia64/lib/io.c b/arch/ia64/lib/io.c
index 8949e44091a..bcd16f8ad9d 100644
--- a/arch/ia64/lib/io.c
+++ b/arch/ia64/lib/io.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/types.h> 2#include <linux/types.h>
4 3
diff --git a/arch/ia64/lib/memcpy_mck.S b/arch/ia64/lib/memcpy_mck.S
index 9e534d52b1d..ab0f8763972 100644
--- a/arch/ia64/lib/memcpy_mck.S
+++ b/arch/ia64/lib/memcpy_mck.S
@@ -13,7 +13,6 @@
13 * Copyright (C) 2002 Intel Corp. 13 * Copyright (C) 2002 Intel Corp.
14 * Copyright (C) 2002 Ken Chen <kenneth.w.chen@intel.com> 14 * Copyright (C) 2002 Ken Chen <kenneth.w.chen@intel.com>
15 */ 15 */
16#include <linux/config.h>
17#include <asm/asmmacro.h> 16#include <asm/asmmacro.h>
18#include <asm/page.h> 17#include <asm/page.h>
19 18
diff --git a/arch/ia64/mm/contig.c b/arch/ia64/mm/contig.c
index 84fd1c14c8a..2a88cdd6d92 100644
--- a/arch/ia64/mm/contig.c
+++ b/arch/ia64/mm/contig.c
@@ -14,7 +14,6 @@
14 * Routines used by ia64 machines with contiguous (or virtually contiguous) 14 * Routines used by ia64 machines with contiguous (or virtually contiguous)
15 * memory. 15 * memory.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/bootmem.h> 17#include <linux/bootmem.h>
19#include <linux/efi.h> 18#include <linux/efi.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/ia64/mm/extable.c b/arch/ia64/mm/extable.c
index 6d259e34f35..71c50dd8f87 100644
--- a/arch/ia64/mm/extable.c
+++ b/arch/ia64/mm/extable.c
@@ -5,7 +5,6 @@
5 * David Mosberger-Tang <davidm@hpl.hp.com> 5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/sort.h> 8#include <linux/sort.h>
10 9
11#include <asm/uaccess.h> 10#include <asm/uaccess.h>
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c
index 8d506710fdb..eee5c1cfbe3 100644
--- a/arch/ia64/mm/hugetlbpage.c
+++ b/arch/ia64/mm/hugetlbpage.c
@@ -8,7 +8,6 @@
8 * Feb, 2004: dynamic hugetlb page size via boot parameter 8 * Feb, 2004: dynamic hugetlb page size via boot parameter
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 38306e98f04..2f50c064513 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1998-2003 Hewlett-Packard Co 4 * Copyright (C) 1998-2003 Hewlett-Packard Co
5 * David Mosberger-Tang <davidm@hpl.hp.com> 5 * David Mosberger-Tang <davidm@hpl.hp.com>
6 */ 6 */
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/init.h> 8#include <linux/init.h>
10 9
diff --git a/arch/ia64/mm/numa.c b/arch/ia64/mm/numa.c
index 4e5c8b36ad9..64e4c21f311 100644
--- a/arch/ia64/mm/numa.c
+++ b/arch/ia64/mm/numa.c
@@ -10,7 +10,6 @@
10 * 2002/08/07 Erich Focht <efocht@ess.nec.de> 10 * 2002/08/07 Erich Focht <efocht@ess.nec.de>
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/cpu.h> 13#include <linux/cpu.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/ia64/mm/tlb.c b/arch/ia64/mm/tlb.c
index 4dbbca0b5e9..ffad7624436 100644
--- a/arch/ia64/mm/tlb.c
+++ b/arch/ia64/mm/tlb.c
@@ -11,7 +11,6 @@
11 * Rohit Seth <rohit.seth@intel.com> 11 * Rohit Seth <rohit.seth@intel.com>
12 * Ken Chen <kenneth.w.chen@intel.com> 12 * Ken Chen <kenneth.w.chen@intel.com>
13 */ 13 */
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/ia64/oprofile/perfmon.c b/arch/ia64/oprofile/perfmon.c
index b7975a469fb..bc41dd32fec 100644
--- a/arch/ia64/oprofile/perfmon.c
+++ b/arch/ia64/oprofile/perfmon.c
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/config.h>
12#include <linux/oprofile.h> 11#include <linux/oprofile.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <asm/perfmon.h> 13#include <asm/perfmon.h>
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 5bef0e3603f..276512fd892 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -10,7 +10,6 @@
10 * 10 *
11 * Note: Above list of copyright holders is incomplete... 11 * Note: Above list of copyright holders is incomplete...
12 */ 12 */
13#include <linux/config.h>
14 13
15#include <linux/acpi.h> 14#include <linux/acpi.h>
16#include <linux/types.h> 15#include <linux/types.h>
diff --git a/arch/ia64/sn/kernel/bte.c b/arch/ia64/sn/kernel/bte.c
index e952ef4f6d9..27dee458406 100644
--- a/arch/ia64/sn/kernel/bte.c
+++ b/arch/ia64/sn/kernel/bte.c
@@ -6,7 +6,6 @@
6 * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved. 6 * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <asm/sn/nodepda.h> 10#include <asm/sn/nodepda.h>
12#include <asm/sn/addrs.h> 11#include <asm/sn/addrs.h>
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c
index 56ab6bae00e..96fb81e6321 100644
--- a/arch/ia64/sn/kernel/huberror.c
+++ b/arch/ia64/sn/kernel/huberror.c
@@ -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, SA_SHIRQ, 181 if (request_irq(SGI_II_ERROR, (void *)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);
@@ -196,7 +196,7 @@ void hub_error_init(struct hubdev_info *hubdev_info)
196void ice_error_init(struct hubdev_info *hubdev_info) 196void ice_error_init(struct hubdev_info *hubdev_info)
197{ 197{
198 if (request_irq 198 if (request_irq
199 (SGI_TIO_ERROR, (void *)hub_eint_handler, SA_SHIRQ, "SN_TIO_error", 199 (SGI_TIO_ERROR, (void *)hub_eint_handler, IRQF_SHARED, "SN_TIO_error",
200 (void *)hubdev_info)) 200 (void *)hubdev_info))
201 printk("ice_error_init: request_irq() error hubdev_info 0x%p\n", 201 printk("ice_error_init: request_irq() error hubdev_info 0x%p\n",
202 hubdev_info); 202 hubdev_info);
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 3bfccf35434..dd6bcf4d58b 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All rights reserved. 6 * Copyright (C) 1999,2001-2006 Silicon Graphics, Inc. All rights reserved.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/delay.h> 11#include <linux/delay.h>
diff --git a/arch/ia64/sn/kernel/sn2/prominfo_proc.c b/arch/ia64/sn/kernel/sn2/prominfo_proc.c
index 6ae276d5d50..4dcce3d0e04 100644
--- a/arch/ia64/sn/kernel/sn2/prominfo_proc.c
+++ b/arch/ia64/sn/kernel/sn2/prominfo_proc.c
@@ -8,7 +8,6 @@
8 * Module to export the system's Firmware Interface Tables, including 8 * Module to export the system's Firmware Interface Tables, including
9 * PROM revision numbers and banners, in /proc 9 * PROM revision numbers and banners, in /proc
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
diff --git a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
index 5100261310f..43ddc2eccb9 100644
--- a/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
+++ b/arch/ia64/sn/kernel/sn2/sn_proc_fs.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved. 6 * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved.
7 */ 7 */
8#include <linux/config.h>
9 8
10#ifdef CONFIG_PROC_FS 9#ifdef CONFIG_PROC_FS
11#include <linux/proc_fs.h> 10#include <linux/proc_fs.h>
diff --git a/arch/ia64/sn/kernel/xpc_channel.c b/arch/ia64/sn/kernel/xpc_channel.c
index 8255a9be463..c2f69f7942a 100644
--- a/arch/ia64/sn/kernel/xpc_channel.c
+++ b/arch/ia64/sn/kernel/xpc_channel.c
@@ -202,7 +202,7 @@ xpc_setup_infrastructure(struct xpc_partition *part)
202 init_waitqueue_head(&part->channel_mgr_wq); 202 init_waitqueue_head(&part->channel_mgr_wq);
203 203
204 sprintf(part->IPI_owner, "xpc%02d", partid); 204 sprintf(part->IPI_owner, "xpc%02d", partid);
205 ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, SA_SHIRQ, 205 ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, IRQF_SHARED,
206 part->IPI_owner, (void *) (u64) partid); 206 part->IPI_owner, (void *) (u64) partid);
207 if (ret != 0) { 207 if (ret != 0) {
208 dev_err(xpc_chan, "can't register NOTIFY IRQ handler, " 208 dev_err(xpc_chan, "can't register NOTIFY IRQ handler, "
diff --git a/arch/ia64/sn/kernel/xpnet.c b/arch/ia64/sn/kernel/xpnet.c
index e5c6d3c0a8e..007703c494a 100644
--- a/arch/ia64/sn/kernel/xpnet.c
+++ b/arch/ia64/sn/kernel/xpnet.c
@@ -22,7 +22,6 @@
22 */ 22 */
23 23
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/pci.h> 27#include <linux/pci.h>
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
index ab1211ef017..838c93c9a16 100644
--- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c
+++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c
@@ -139,7 +139,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
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, (void *)pcibr_error_intr_handler,
142 SA_SHIRQ, "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");
145 } 145 }
diff --git a/arch/ia64/sn/pci/tioca_provider.c b/arch/ia64/sn/pci/tioca_provider.c
index e4aa839d018..c36b0f5affb 100644
--- a/arch/ia64/sn/pci/tioca_provider.c
+++ b/arch/ia64/sn/pci/tioca_provider.c
@@ -646,7 +646,7 @@ tioca_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
646 646
647 if (request_irq(SGI_TIOCA_ERROR, 647 if (request_irq(SGI_TIOCA_ERROR,
648 tioca_error_intr_handler, 648 tioca_error_intr_handler,
649 SA_SHIRQ, "TIOCA error", (void *)tioca_common)) 649 IRQF_SHARED, "TIOCA error", (void *)tioca_common))
650 printk(KERN_WARNING 650 printk(KERN_WARNING
651 "%s: Unable to get irq %d. " 651 "%s: Unable to get irq %d. "
652 "Error interrupts won't be routed for TIOCA bus %d\n", 652 "Error interrupts won't be routed for TIOCA bus %d\n",
diff --git a/arch/ia64/sn/pci/tioce_provider.c b/arch/ia64/sn/pci/tioce_provider.c
index 2d7948567eb..17cd3428488 100644
--- a/arch/ia64/sn/pci/tioce_provider.c
+++ b/arch/ia64/sn/pci/tioce_provider.c
@@ -1027,7 +1027,7 @@ tioce_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
1027 1027
1028 if (request_irq(SGI_PCIASIC_ERROR, 1028 if (request_irq(SGI_PCIASIC_ERROR,
1029 tioce_error_intr_handler, 1029 tioce_error_intr_handler,
1030 SA_SHIRQ, "TIOCE error", (void *)tioce_common)) 1030 IRQF_SHARED, "TIOCE error", (void *)tioce_common))
1031 printk(KERN_WARNING 1031 printk(KERN_WARNING
1032 "%s: Unable to get irq %d. " 1032 "%s: Unable to get irq %d. "
1033 "Error interrupts won't be routed for " 1033 "Error interrupts won't be routed for "
diff --git a/arch/m32r/boot/compressed/head.S b/arch/m32r/boot/compressed/head.S
index 234d8b1e0ac..95a0563ff07 100644
--- a/arch/m32r/boot/compressed/head.S
+++ b/arch/m32r/boot/compressed/head.S
@@ -7,7 +7,6 @@
7 */ 7 */
8 8
9 .text 9 .text
10#include <linux/config.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12#include <asm/addrspace.h> 11#include <asm/addrspace.h>
13#include <asm/page.h> 12#include <asm/page.h>
diff --git a/arch/m32r/boot/compressed/m32r_sio.c b/arch/m32r/boot/compressed/m32r_sio.c
index 8f9a57271f8..bce8af5e3bb 100644
--- a/arch/m32r/boot/compressed/m32r_sio.c
+++ b/arch/m32r/boot/compressed/m32r_sio.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <asm/processor.h> 8#include <asm/processor.h>
10 9
11static void putc(char c); 10static void putc(char c);
diff --git a/arch/m32r/boot/compressed/misc.c b/arch/m32r/boot/compressed/misc.c
index 70fa799005c..600d40e3349 100644
--- a/arch/m32r/boot/compressed/misc.c
+++ b/arch/m32r/boot/compressed/misc.c
@@ -12,7 +12,6 @@
12 * This is based on arch/sh/boot/compressed/misc.c. 12 * This is based on arch/sh/boot/compressed/misc.c.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/string.h> 15#include <linux/string.h>
17 16
18/* 17/*
diff --git a/arch/m32r/boot/compressed/vmlinux.lds.S b/arch/m32r/boot/compressed/vmlinux.lds.S
index a1843175963..dd11963f693 100644
--- a/arch/m32r/boot/compressed/vmlinux.lds.S
+++ b/arch/m32r/boot/compressed/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3OUTPUT_ARCH(m32r) 2OUTPUT_ARCH(m32r)
4ENTRY(startup) 3ENTRY(startup)
diff --git a/arch/m32r/boot/setup.S b/arch/m32r/boot/setup.S
index 398542507d8..ef843d63083 100644
--- a/arch/m32r/boot/setup.S
+++ b/arch/m32r/boot/setup.S
@@ -11,7 +11,6 @@
11#include <asm/page.h> 11#include <asm/page.h>
12#include <asm/pgtable.h> 12#include <asm/pgtable.h>
13 13
14#include <linux/config.h>
15#include <asm/assembler.h> 14#include <asm/assembler.h>
16#include <asm/mmu_context.h> 15#include <asm/mmu_context.h>
17#include <asm/m32r.h> 16#include <asm/m32r.h>
diff --git a/arch/m32r/kernel/align.c b/arch/m32r/kernel/align.c
index 48ec2971423..ab871ccd33f 100644
--- a/arch/m32r/kernel/align.c
+++ b/arch/m32r/kernel/align.c
@@ -4,7 +4,6 @@
4 * Copyright (c) 2003 Hitoshi Yamamoto 4 * Copyright (c) 2003 Hitoshi Yamamoto
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/ptrace.h> 7#include <asm/ptrace.h>
9#include <asm/uaccess.h> 8#include <asm/uaccess.h>
10 9
diff --git a/arch/m32r/kernel/entry.S b/arch/m32r/kernel/entry.S
index 920bb742b7a..ac6d840b382 100644
--- a/arch/m32r/kernel/entry.S
+++ b/arch/m32r/kernel/entry.S
@@ -54,7 +54,6 @@
54 * @(0x6c,sp) - orig_r0 ditto 54 * @(0x6c,sp) - orig_r0 ditto
55 */ 55 */
56 56
57#include <linux/config.h>
58#include <linux/linkage.h> 57#include <linux/linkage.h>
59#include <asm/irq.h> 58#include <asm/irq.h>
60#include <asm/unistd.h> 59#include <asm/unistd.h>
diff --git a/arch/m32r/kernel/head.S b/arch/m32r/kernel/head.S
index 3e83173995c..0d3c8ee0e03 100644
--- a/arch/m32r/kernel/head.S
+++ b/arch/m32r/kernel/head.S
@@ -14,7 +14,6 @@ __INIT
14__INITDATA 14__INITDATA
15 15
16 .text 16 .text
17#include <linux/config.h>
18#include <linux/linkage.h> 17#include <linux/linkage.h>
19#include <asm/segment.h> 18#include <asm/segment.h>
20#include <asm/page.h> 19#include <asm/page.h>
diff --git a/arch/m32r/kernel/io_m32104ut.c b/arch/m32r/kernel/io_m32104ut.c
index d26adab9586..2189eca30b5 100644
--- a/arch/m32r/kernel/io_m32104ut.c
+++ b/arch/m32r/kernel/io_m32104ut.c
@@ -8,7 +8,6 @@
8 * Naoto Sugai, Hayato Fujiwara 8 * Naoto Sugai, Hayato Fujiwara
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <asm/m32r.h> 11#include <asm/m32r.h>
13#include <asm/page.h> 12#include <asm/page.h>
14#include <asm/io.h> 13#include <asm/io.h>
diff --git a/arch/m32r/kernel/io_m32700ut.c b/arch/m32r/kernel/io_m32700ut.c
index 939932d6cc0..5898f4031a0 100644
--- a/arch/m32r/kernel/io_m32700ut.c
+++ b/arch/m32r/kernel/io_m32700ut.c
@@ -11,7 +11,6 @@
11 * archive for more details. 11 * archive for more details.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <asm/m32r.h> 14#include <asm/m32r.h>
16#include <asm/page.h> 15#include <asm/page.h>
17#include <asm/io.h> 16#include <asm/io.h>
diff --git a/arch/m32r/kernel/io_mappi.c b/arch/m32r/kernel/io_mappi.c
index a662b537c5b..31396789ab1 100644
--- a/arch/m32r/kernel/io_mappi.c
+++ b/arch/m32r/kernel/io_mappi.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto 7 * Hitoshi Yamamoto
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <asm/m32r.h> 10#include <asm/m32r.h>
12#include <asm/page.h> 11#include <asm/page.h>
13#include <asm/io.h> 12#include <asm/io.h>
diff --git a/arch/m32r/kernel/io_mappi2.c b/arch/m32r/kernel/io_mappi2.c
index e72d725606a..ecc6aa88f9a 100644
--- a/arch/m32r/kernel/io_mappi2.c
+++ b/arch/m32r/kernel/io_mappi2.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto, Mamoru Sakugawa 7 * Hitoshi Yamamoto, Mamoru Sakugawa
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <asm/m32r.h> 10#include <asm/m32r.h>
12#include <asm/page.h> 11#include <asm/page.h>
13#include <asm/io.h> 12#include <asm/io.h>
diff --git a/arch/m32r/kernel/io_mappi3.c b/arch/m32r/kernel/io_mappi3.c
index ed6da930bc6..a13b5f6b07e 100644
--- a/arch/m32r/kernel/io_mappi3.c
+++ b/arch/m32r/kernel/io_mappi3.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto, Mamoru Sakugawa 7 * Hitoshi Yamamoto, Mamoru Sakugawa
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <asm/m32r.h> 10#include <asm/m32r.h>
12#include <asm/page.h> 11#include <asm/page.h>
13#include <asm/io.h> 12#include <asm/io.h>
diff --git a/arch/m32r/kernel/io_oaks32r.c b/arch/m32r/kernel/io_oaks32r.c
index 910dd131c22..068bf47060f 100644
--- a/arch/m32r/kernel/io_oaks32r.c
+++ b/arch/m32r/kernel/io_oaks32r.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto, Mamoru Sakugawa 7 * Hitoshi Yamamoto, Mamoru Sakugawa
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <asm/m32r.h> 10#include <asm/m32r.h>
12#include <asm/page.h> 11#include <asm/page.h>
13#include <asm/io.h> 12#include <asm/io.h>
diff --git a/arch/m32r/kernel/io_opsput.c b/arch/m32r/kernel/io_opsput.c
index bec69297db3..da6c5f5c1f8 100644
--- a/arch/m32r/kernel/io_opsput.c
+++ b/arch/m32r/kernel/io_opsput.c
@@ -11,7 +11,6 @@
11 * archive for more details. 11 * archive for more details.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <asm/m32r.h> 14#include <asm/m32r.h>
16#include <asm/page.h> 15#include <asm/page.h>
17#include <asm/io.h> 16#include <asm/io.h>
diff --git a/arch/m32r/kernel/io_usrv.c b/arch/m32r/kernel/io_usrv.c
index 39a379af40b..a8c0e2eceb4 100644
--- a/arch/m32r/kernel/io_usrv.c
+++ b/arch/m32r/kernel/io_usrv.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <asm/m32r.h> 15#include <asm/m32r.h>
17#include <asm/page.h> 16#include <asm/page.h>
18#include <asm/io.h> 17#include <asm/io.h>
diff --git a/arch/m32r/kernel/m32r_ksyms.c b/arch/m32r/kernel/m32r_ksyms.c
index c50330fa83b..8cbbb0b11e0 100644
--- a/arch/m32r/kernel/m32r_ksyms.c
+++ b/arch/m32r/kernel/m32r_ksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/smp.h> 2#include <linux/smp.h>
4#include <linux/user.h> 3#include <linux/user.h>
diff --git a/arch/m32r/kernel/module.c b/arch/m32r/kernel/module.c
index f6a79a016ce..8d420579438 100644
--- a/arch/m32r/kernel/module.c
+++ b/arch/m32r/kernel/module.c
@@ -15,7 +15,6 @@
15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16*/ 16*/
17 17
18#include <linux/config.h>
19#include <linux/moduleloader.h> 18#include <linux/moduleloader.h>
20#include <linux/elf.h> 19#include <linux/elf.h>
21#include <linux/vmalloc.h> 20#include <linux/vmalloc.h>
diff --git a/arch/m32r/kernel/process.c b/arch/m32r/kernel/process.c
index 065f5e71905..44cbe0ce0f8 100644
--- a/arch/m32r/kernel/process.c
+++ b/arch/m32r/kernel/process.c
@@ -21,7 +21,6 @@
21 */ 21 */
22 22
23#include <linux/fs.h> 23#include <linux/fs.h>
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/ptrace.h> 25#include <linux/ptrace.h>
27#include <linux/unistd.h> 26#include <linux/unistd.h>
diff --git a/arch/m32r/kernel/ptrace.c b/arch/m32r/kernel/ptrace.c
index 340a3bf59b8..5f02b314487 100644
--- a/arch/m32r/kernel/ptrace.c
+++ b/arch/m32r/kernel/ptrace.c
@@ -14,7 +14,6 @@
14 * Copyright (C) 2000 Russell King 14 * Copyright (C) 2000 Russell King
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/m32r/kernel/semaphore.c b/arch/m32r/kernel/semaphore.c
index 9a6e6d754dd..940c2d37cfd 100644
--- a/arch/m32r/kernel/semaphore.c
+++ b/arch/m32r/kernel/semaphore.c
@@ -21,7 +21,6 @@
21 * 21 *
22 * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org> 22 * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org>
23 */ 23 */
24#include <linux/config.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/err.h> 25#include <linux/err.h>
27#include <linux/init.h> 26#include <linux/init.h>
diff --git a/arch/m32r/kernel/setup.c b/arch/m32r/kernel/setup.c
index 1ff483c8a4c..0a6c6e677af 100644
--- a/arch/m32r/kernel/setup.c
+++ b/arch/m32r/kernel/setup.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto 7 * Hitoshi Yamamoto
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
diff --git a/arch/m32r/kernel/setup_m32104ut.c b/arch/m32r/kernel/setup_m32104ut.c
index f9f56c27019..1692b321f47 100644
--- a/arch/m32r/kernel/setup_m32104ut.c
+++ b/arch/m32r/kernel/setup_m32104ut.c
@@ -8,7 +8,6 @@
8 * Naoto Sugai, Hayato Fujiwara 8 * Naoto Sugai, Hayato Fujiwara
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/irq.h> 11#include <linux/irq.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/arch/m32r/kernel/setup_m32700ut.c b/arch/m32r/kernel/setup_m32700ut.c
index b6ab00eff58..7efc145c74c 100644
--- a/arch/m32r/kernel/setup_m32700ut.c
+++ b/arch/m32r/kernel/setup_m32700ut.c
@@ -11,7 +11,6 @@
11 * archive for more details. 11 * archive for more details.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/irq.h> 14#include <linux/irq.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/m32r/kernel/setup_mappi.c b/arch/m32r/kernel/setup_mappi.c
index c268044185f..67dbbdc9d11 100644
--- a/arch/m32r/kernel/setup_mappi.c
+++ b/arch/m32r/kernel/setup_mappi.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto 7 * Hitoshi Yamamoto
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/irq.h> 10#include <linux/irq.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/m32r/kernel/setup_mappi2.c b/arch/m32r/kernel/setup_mappi2.c
index bd2327d5cca..55abb210275 100644
--- a/arch/m32r/kernel/setup_mappi2.c
+++ b/arch/m32r/kernel/setup_mappi2.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto, Mamoru Sakugawa 7 * Hitoshi Yamamoto, Mamoru Sakugawa
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/irq.h> 10#include <linux/irq.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/m32r/kernel/setup_mappi3.c b/arch/m32r/kernel/setup_mappi3.c
index 014b51d1750..93dc010c7fc 100644
--- a/arch/m32r/kernel/setup_mappi3.c
+++ b/arch/m32r/kernel/setup_mappi3.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto, Mamoru Sakugawa 7 * Hitoshi Yamamoto, Mamoru Sakugawa
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/irq.h> 10#include <linux/irq.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/m32r/kernel/setup_oaks32r.c b/arch/m32r/kernel/setup_oaks32r.c
index ea64831aef7..cd62598e3ce 100644
--- a/arch/m32r/kernel/setup_oaks32r.c
+++ b/arch/m32r/kernel/setup_oaks32r.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto, Mamoru Sakugawa 7 * Hitoshi Yamamoto, Mamoru Sakugawa
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/irq.h> 10#include <linux/irq.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/m32r/kernel/setup_opsput.c b/arch/m32r/kernel/setup_opsput.c
index 55e8972d455..61d3b01cbe0 100644
--- a/arch/m32r/kernel/setup_opsput.c
+++ b/arch/m32r/kernel/setup_opsput.c
@@ -12,7 +12,6 @@
12 * archive for more details. 12 * archive for more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/irq.h> 15#include <linux/irq.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/m32r/kernel/setup_usrv.c b/arch/m32r/kernel/setup_usrv.c
index 7fa12d8f66b..f5b4b5ac31e 100644
--- a/arch/m32r/kernel/setup_usrv.c
+++ b/arch/m32r/kernel/setup_usrv.c
@@ -7,7 +7,6 @@
7 * Hitoshi Yamamoto 7 * Hitoshi Yamamoto
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/irq.h> 10#include <linux/irq.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/m32r/kernel/signal.c b/arch/m32r/kernel/signal.c
index 6498ee70bb7..a9174efe80c 100644
--- a/arch/m32r/kernel/signal.c
+++ b/arch/m32r/kernel/signal.c
@@ -10,7 +10,6 @@
10 * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes 10 * 2000-06-20 Pentium III FXSR, SSE support by Gareth Hughes
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
16#include <linux/smp.h> 15#include <linux/smp.h>
diff --git a/arch/m32r/kernel/smpboot.c b/arch/m32r/kernel/smpboot.c
index 840b4348bf0..fa786560949 100644
--- a/arch/m32r/kernel/smpboot.c
+++ b/arch/m32r/kernel/smpboot.c
@@ -40,7 +40,6 @@
40 */ 40 */
41 41
42#include <linux/module.h> 42#include <linux/module.h>
43#include <linux/config.h>
44#include <linux/init.h> 43#include <linux/init.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
46#include <linux/mm.h> 45#include <linux/mm.h>
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index 670cb49210a..a9cea32eb82 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -7,7 +7,6 @@
7 * Taken from i386 version. 7 * Taken from i386 version.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
diff --git a/arch/m32r/kernel/time.c b/arch/m32r/kernel/time.c
index b8e68b54230..ded0be07a47 100644
--- a/arch/m32r/kernel/time.c
+++ b/arch/m32r/kernel/time.c
@@ -17,7 +17,6 @@
17 17
18#undef DEBUG_TIMER 18#undef DEBUG_TIMER
19 19
20#include <linux/config.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/module.h> 22#include <linux/module.h>
@@ -238,7 +237,7 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
238 return IRQ_HANDLED; 237 return IRQ_HANDLED;
239} 238}
240 239
241struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, 240struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE,
242 "MFT2", NULL, NULL }; 241 "MFT2", NULL, NULL };
243 242
244void __init time_init(void) 243void __init time_init(void)
diff --git a/arch/m32r/kernel/traps.c b/arch/m32r/kernel/traps.c
index 5fe8ed6d62d..c1daf2c40c7 100644
--- a/arch/m32r/kernel/traps.c
+++ b/arch/m32r/kernel/traps.c
@@ -9,7 +9,6 @@
9 * 'traps.c' handles hardware traps and faults after we have saved some 9 * 'traps.c' handles hardware traps and faults after we have saved some
10 * state in 'entry.S'. 10 * state in 'entry.S'.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/kallsyms.h> 14#include <linux/kallsyms.h>
diff --git a/arch/m32r/kernel/vmlinux.lds.S b/arch/m32r/kernel/vmlinux.lds.S
index 729a2645a03..13c7bb698e3 100644
--- a/arch/m32r/kernel/vmlinux.lds.S
+++ b/arch/m32r/kernel/vmlinux.lds.S
@@ -1,7 +1,6 @@
1/* ld script to make M32R Linux kernel 1/* ld script to make M32R Linux kernel
2 */ 2 */
3 3
4#include <linux/config.h>
5#include <asm-generic/vmlinux.lds.h> 4#include <asm-generic/vmlinux.lds.h>
6#include <asm/addrspace.h> 5#include <asm/addrspace.h>
7#include <asm/page.h> 6#include <asm/page.h>
diff --git a/arch/m32r/lib/ashxdi3.S b/arch/m32r/lib/ashxdi3.S
index 78effca9d97..107594b65d5 100644
--- a/arch/m32r/lib/ashxdi3.S
+++ b/arch/m32r/lib/ashxdi3.S
@@ -6,7 +6,6 @@
6 */ 6 */
7/* $Id$ */ 7/* $Id$ */
8 8
9#include <linux/config.h>
10 9
11; 10;
12; input (r0,r1) src 11; input (r0,r1) src
diff --git a/arch/m32r/lib/checksum.S b/arch/m32r/lib/checksum.S
index f6fc1bdb87e..cfbe00e5184 100644
--- a/arch/m32r/lib/checksum.S
+++ b/arch/m32r/lib/checksum.S
@@ -28,7 +28,6 @@
28/* $Id$ */ 28/* $Id$ */
29 29
30 30
31#include <linux/config.h>
32#include <linux/linkage.h> 31#include <linux/linkage.h>
33#include <asm/assembler.h> 32#include <asm/assembler.h>
34#include <asm/errno.h> 33#include <asm/errno.h>
diff --git a/arch/m32r/lib/delay.c b/arch/m32r/lib/delay.c
index fb29632c7ea..06382a38c31 100644
--- a/arch/m32r/lib/delay.c
+++ b/arch/m32r/lib/delay.c
@@ -7,7 +7,6 @@
7 7
8/* $Id$ */ 8/* $Id$ */
9 9
10#include <linux/config.h>
11#include <linux/param.h> 10#include <linux/param.h>
12#ifdef CONFIG_SMP 11#ifdef CONFIG_SMP
13#include <linux/sched.h> 12#include <linux/sched.h>
diff --git a/arch/m32r/lib/memcpy.S b/arch/m32r/lib/memcpy.S
index 800898a2d2e..2089a215314 100644
--- a/arch/m32r/lib/memcpy.S
+++ b/arch/m32r/lib/memcpy.S
@@ -14,7 +14,6 @@
14 14
15 15
16 .text 16 .text
17#include <linux/config.h>
18#include <linux/linkage.h> 17#include <linux/linkage.h>
19#include <asm/assembler.h> 18#include <asm/assembler.h>
20 19
diff --git a/arch/m32r/lib/memset.S b/arch/m32r/lib/memset.S
index 6e26df120ac..b47fa3537aa 100644
--- a/arch/m32r/lib/memset.S
+++ b/arch/m32r/lib/memset.S
@@ -14,7 +14,6 @@
14 */ 14 */
15/* $Id$ */ 15/* $Id$ */
16 16
17#include <linux/config.h>
18 17
19 .text 18 .text
20 .global memset 19 .global memset
diff --git a/arch/m32r/lib/strlen.S b/arch/m32r/lib/strlen.S
index 8d23cfbd600..5f41aacd7b3 100644
--- a/arch/m32r/lib/strlen.S
+++ b/arch/m32r/lib/strlen.S
@@ -9,7 +9,6 @@
9/* $Id$ */ 9/* $Id$ */
10 10
11 11
12#include <linux/config.h>
13#include <linux/linkage.h> 12#include <linux/linkage.h>
14#include <asm/assembler.h> 13#include <asm/assembler.h>
15 14
diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c
index 2d1dd2106c4..896cef1aca5 100644
--- a/arch/m32r/lib/usercopy.c
+++ b/arch/m32r/lib/usercopy.c
@@ -6,7 +6,6 @@
6 * Copyright 1997 Linus Torvalds 6 * Copyright 1997 Linus Torvalds
7 * Copyright 2001, 2002, 2004 Hirokazu Takata 7 * Copyright 2001, 2002, 2004 Hirokazu Takata
8 */ 8 */
9#include <linux/config.h>
10#include <linux/prefetch.h> 9#include <linux/prefetch.h>
11#include <linux/string.h> 10#include <linux/string.h>
12#include <linux/thread_info.h> 11#include <linux/thread_info.h>
diff --git a/arch/m32r/mm/cache.c b/arch/m32r/mm/cache.c
index 9f54dd93701..fac75958487 100644
--- a/arch/m32r/mm/cache.c
+++ b/arch/m32r/mm/cache.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 2002-2005 Hirokazu Takata, Hayato Fujiwara 4 * Copyright (C) 2002-2005 Hirokazu Takata, Hayato Fujiwara
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/pgtable.h> 7#include <asm/pgtable.h>
9 8
10#undef MCCR 9#undef MCCR
diff --git a/arch/m32r/mm/discontig.c b/arch/m32r/mm/discontig.c
index cf610a7c5ff..abb34ccd598 100644
--- a/arch/m32r/mm/discontig.c
+++ b/arch/m32r/mm/discontig.c
@@ -6,7 +6,6 @@
6 * Copyright (c) 2003 Hitoshi Yamamoto 6 * Copyright (c) 2003 Hitoshi Yamamoto
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/bootmem.h> 10#include <linux/bootmem.h>
12#include <linux/mmzone.h> 11#include <linux/mmzone.h>
diff --git a/arch/m32r/mm/fault-nommu.c b/arch/m32r/mm/fault-nommu.c
index d9d488d782e..03fc4c858e0 100644
--- a/arch/m32r/mm/fault-nommu.c
+++ b/arch/m32r/mm/fault-nommu.c
@@ -9,7 +9,6 @@
9 9
10/* $Id: fault-nommu.c,v 1.1 2004/03/30 06:40:59 sakugawa Exp $ */ 10/* $Id: fault-nommu.c,v 1.1 2004/03/30 06:40:59 sakugawa Exp $ */
11 11
12#include <linux/config.h>
13#include <linux/signal.h> 12#include <linux/signal.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/m32r/mm/fault.c b/arch/m32r/mm/fault.c
index bf7fb58ef02..dc18a33eefe 100644
--- a/arch/m32r/mm/fault.c
+++ b/arch/m32r/mm/fault.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1995 Linus Torvalds 8 * Copyright (C) 1995 Linus Torvalds
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/signal.h> 11#include <linux/signal.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
@@ -148,7 +147,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long error_code,
148 /* When running in the kernel we expect faults to occur only to 147 /* When running in the kernel we expect faults to occur only to
149 * addresses in user space. All other faults represent errors in the 148 * addresses in user space. All other faults represent errors in the
150 * kernel and should generate an OOPS. Unfortunatly, in the case of an 149 * kernel and should generate an OOPS. Unfortunatly, in the case of an
151 * erroneous fault occuring in a code path which already holds mmap_sem 150 * erroneous fault occurring in a code path which already holds mmap_sem
152 * we will deadlock attempting to validate the fault against the 151 * we will deadlock attempting to validate the fault against the
153 * address space. Luckily the kernel only validly references user 152 * address space. Luckily the kernel only validly references user
154 * space from well defined areas of code, which are listed in the 153 * space from well defined areas of code, which are listed in the
diff --git a/arch/m68k/amiga/amiga_ksyms.c b/arch/m68k/amiga/amiga_ksyms.c
index 8f2e0587ae2..7fdcf6bf3ad 100644
--- a/arch/m68k/amiga/amiga_ksyms.c
+++ b/arch/m68k/amiga/amiga_ksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/types.h> 2#include <linux/types.h>
4#include <asm/ptrace.h> 3#include <asm/ptrace.h>
diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index f9403f4640a..96c79d840cf 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -22,7 +22,7 @@
22 * 22 *
23 * 07/08/99: rewamp of the interrupt handling - we now have two types of 23 * 07/08/99: rewamp of the interrupt handling - we now have two types of
24 * interrupts, normal and fast handlers, fast handlers being 24 * interrupts, normal and fast handlers, fast handlers being
25 * marked with SA_INTERRUPT and runs with all other interrupts 25 * marked with IRQF_DISABLED and runs with all other interrupts
26 * disabled. Normal interrupts disable their own source but 26 * disabled. Normal interrupts disable their own source but
27 * run with all other interrupt sources enabled. 27 * run with all other interrupt sources enabled.
28 * PORTS and EXTER interrupts are always shared even if the 28 * PORTS and EXTER interrupts are always shared even if the
diff --git a/arch/m68k/amiga/amisound.c b/arch/m68k/amiga/amisound.c
index ae94db5d93b..1f5bfb58429 100644
--- a/arch/m68k/amiga/amisound.c
+++ b/arch/m68k/amiga/amisound.c
@@ -8,7 +8,6 @@
8 * for more details. 8 * for more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/jiffies.h> 11#include <linux/jiffies.h>
13#include <linux/timer.h> 12#include <linux/timer.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/arch/m68k/amiga/chipram.c b/arch/m68k/amiga/chipram.c
index 558d5fd2d2b..de1304c9111 100644
--- a/arch/m68k/amiga/chipram.c
+++ b/arch/m68k/amiga/chipram.c
@@ -7,7 +7,6 @@
7** Rewritten 15/9/2000 by Geert to use resource management 7** Rewritten 15/9/2000 by Geert to use resource management
8*/ 8*/
9 9
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/m68k/amiga/cia.c b/arch/m68k/amiga/cia.c
index 0956e45399e..dbad3005472 100644
--- a/arch/m68k/amiga/cia.c
+++ b/arch/m68k/amiga/cia.c
@@ -176,5 +176,5 @@ void __init cia_init_IRQ(struct ciabase *base)
176 /* override auto int and install CIA handler */ 176 /* override auto int and install CIA handler */
177 m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1); 177 m68k_setup_irq_controller(&auto_irq_controller, base->handler_irq, 1);
178 m68k_irq_startup(base->handler_irq); 178 m68k_irq_startup(base->handler_irq);
179 request_irq(base->handler_irq, cia_handler, SA_SHIRQ, base->name, base); 179 request_irq(base->handler_irq, cia_handler, IRQF_SHARED, base->name, base);
180} 180}
diff --git a/arch/m68k/amiga/config.c b/arch/m68k/amiga/config.c
index b5b8a416a07..092e50d2cb1 100644
--- a/arch/m68k/amiga/config.c
+++ b/arch/m68k/amiga/config.c
@@ -12,7 +12,6 @@
12 * Miscellaneous Amiga stuff 12 * Miscellaneous Amiga stuff
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c
index 99c70978aaf..6f4581575fb 100644
--- a/arch/m68k/apollo/config.c
+++ b/arch/m68k/apollo/config.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/types.h> 1#include <linux/types.h>
3#include <linux/kernel.h> 2#include <linux/kernel.h>
4#include <linux/mm.h> 3#include <linux/mm.h>
diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c
index 727289acad7..b2079252a95 100644
--- a/arch/m68k/atari/config.c
+++ b/arch/m68k/atari/config.c
@@ -24,7 +24,6 @@
24 * Miscellaneous atari stuff 24 * Miscellaneous atari stuff
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/mm.h> 28#include <linux/mm.h>
30#include <linux/console.h> 29#include <linux/console.h>
diff --git a/arch/m68k/atari/debug.c b/arch/m68k/atari/debug.c
index ace05f79d96..4ae01004d8d 100644
--- a/arch/m68k/atari/debug.c
+++ b/arch/m68k/atari/debug.c
@@ -10,7 +10,6 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/tty.h> 14#include <linux/tty.h>
16#include <linux/console.h> 15#include <linux/console.h>
diff --git a/arch/m68k/atari/hades-pci.c b/arch/m68k/atari/hades-pci.c
index 8888debf71e..6ca57b6564d 100644
--- a/arch/m68k/atari/hades-pci.c
+++ b/arch/m68k/atari/hades-pci.c
@@ -4,7 +4,6 @@
4 * Written by Wout Klaren. 4 * Written by Wout Klaren.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <asm/io.h> 9#include <asm/io.h>
diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c
index 22e0481a5f7..bf4588cbe37 100644
--- a/arch/m68k/atari/stram.c
+++ b/arch/m68k/atari/stram.c
@@ -8,7 +8,6 @@
8 * for more details. 8 * for more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c
index 2ef271cd818..1c05a626054 100644
--- a/arch/m68k/hp300/config.c
+++ b/arch/m68k/hp300/config.c
@@ -7,7 +7,6 @@
7 * called by setup.c. 7 * called by setup.c.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/string.h> 12#include <linux/string.h>
diff --git a/arch/m68k/kernel/bios32.c b/arch/m68k/kernel/bios32.c
index a901685eb6a..af170c2be73 100644
--- a/arch/m68k/kernel/bios32.c
+++ b/arch/m68k/kernel/bios32.c
@@ -6,7 +6,6 @@
6 * Based on the DEC Alpha bios32.c by Dave Rusling and David Mosberger. 6 * Based on the DEC Alpha bios32.c by Dave Rusling and David Mosberger.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12 11
diff --git a/arch/m68k/kernel/entry.S b/arch/m68k/kernel/entry.S
index 449b62b30f4..9083c8b7659 100644
--- a/arch/m68k/kernel/entry.S
+++ b/arch/m68k/kernel/entry.S
@@ -33,7 +33,6 @@
33 * for 68040 33 * for 68040
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/linkage.h> 36#include <linux/linkage.h>
38#include <asm/entry.h> 37#include <asm/entry.h>
39#include <asm/errno.h> 38#include <asm/errno.h>
diff --git a/arch/m68k/kernel/head.S b/arch/m68k/kernel/head.S
index 70002c146ee..6739e87fe82 100644
--- a/arch/m68k/kernel/head.S
+++ b/arch/m68k/kernel/head.S
@@ -255,7 +255,6 @@
255 * MAC_USE_SCC_B: Use the SCC port B (printer) for serial debug (default). 255 * MAC_USE_SCC_B: Use the SCC port B (printer) for serial debug (default).
256 */ 256 */
257 257
258#include <linux/config.h>
259#include <linux/linkage.h> 258#include <linux/linkage.h>
260#include <linux/init.h> 259#include <linux/init.h>
261#include <asm/bootinfo.h> 260#include <asm/bootinfo.h>
diff --git a/arch/m68k/kernel/ints.c b/arch/m68k/kernel/ints.c
index 5a8344b9354..b33e37fb7b0 100644
--- a/arch/m68k/kernel/ints.c
+++ b/arch/m68k/kernel/ints.c
@@ -25,7 +25,6 @@
25 * which must be served /Roman Zippel 25 * which must be served /Roman Zippel
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/types.h> 29#include <linux/types.h>
31#include <linux/sched.h> 30#include <linux/sched.h>
@@ -193,7 +192,7 @@ int setup_irq(unsigned int irq, struct irq_node *node)
193 prev = irq_list + irq; 192 prev = irq_list + irq;
194 if (*prev) { 193 if (*prev) {
195 /* Can't share interrupts unless both agree to */ 194 /* Can't share interrupts unless both agree to */
196 if (!((*prev)->flags & node->flags & SA_SHIRQ)) { 195 if (!((*prev)->flags & node->flags & IRQF_SHARED)) {
197 spin_unlock_irqrestore(&contr->lock, flags); 196 spin_unlock_irqrestore(&contr->lock, flags);
198 return -EBUSY; 197 return -EBUSY;
199 } 198 }
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c
index 1f5e1b5aeda..aff26a52167 100644
--- a/arch/m68k/kernel/m68k_ksyms.c
+++ b/arch/m68k/kernel/m68k_ksyms.c
@@ -7,7 +7,6 @@
7#include <linux/elfcore.h> 7#include <linux/elfcore.h>
8#include <linux/in6.h> 8#include <linux/in6.h>
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/config.h>
11 10
12#include <asm/setup.h> 11#include <asm/setup.h>
13#include <asm/machdep.h> 12#include <asm/machdep.h>
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index 33648efb772..45a46646c1b 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -10,7 +10,6 @@
10 * This file handles the architecture-dependent parts of process handling.. 10 * This file handles the architecture-dependent parts of process handling..
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c
index 540638ca81f..ef89060ea32 100644
--- a/arch/m68k/kernel/ptrace.c
+++ b/arch/m68k/kernel/ptrace.c
@@ -18,7 +18,6 @@
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/ptrace.h> 19#include <linux/ptrace.h>
20#include <linux/user.h> 20#include <linux/user.h>
21#include <linux/config.h>
22#include <linux/signal.h> 21#include <linux/signal.h>
23 22
24#include <asm/uaccess.h> 23#include <asm/uaccess.h>
diff --git a/arch/m68k/kernel/semaphore.c b/arch/m68k/kernel/semaphore.c
index 1ebb79baaa8..d12cbbfe6eb 100644
--- a/arch/m68k/kernel/semaphore.c
+++ b/arch/m68k/kernel/semaphore.c
@@ -3,7 +3,6 @@
3 * specific changes in <asm/semaphore-helper.h> 3 * specific changes in <asm/semaphore-helper.h>
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <asm/semaphore-helper.h> 8#include <asm/semaphore-helper.h>
diff --git a/arch/m68k/kernel/setup.c b/arch/m68k/kernel/setup.c
index 214a95f9f3a..f2d7ee0ee18 100644
--- a/arch/m68k/kernel/setup.c
+++ b/arch/m68k/kernel/setup.c
@@ -8,7 +8,6 @@
8 * This file handles the architecture-dependent parts of system setup 8 * This file handles the architecture-dependent parts of system setup
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/m68k/kernel/traps.c b/arch/m68k/kernel/traps.c
index e86de7b061c..4569406a2e1 100644
--- a/arch/m68k/kernel/traps.c
+++ b/arch/m68k/kernel/traps.c
@@ -18,7 +18,6 @@
18 * Sets up all exception vectors 18 * Sets up all exception vectors
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
23#include <linux/signal.h> 22#include <linux/signal.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/arch/m68k/kernel/vmlinux.lds.S b/arch/m68k/kernel/vmlinux.lds.S
index 497b924f3c8..99ba315bd0a 100644
--- a/arch/m68k/kernel/vmlinux.lds.S
+++ b/arch/m68k/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2PHDRS 1PHDRS
3{ 2{
4 text PT_LOAD FILEHDR PHDRS FLAGS (7); 3 text PT_LOAD FILEHDR PHDRS FLAGS (7);
diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c
index 5a9990e436b..85dda1095b1 100644
--- a/arch/m68k/mac/config.c
+++ b/arch/m68k/mac/config.c
@@ -10,7 +10,6 @@
10 * Miscellaneous linux stuff 10 * Miscellaneous linux stuff
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/m68k/mac/debug.c b/arch/m68k/mac/debug.c
index cc62ed61cda..4eeb09dc0e8 100644
--- a/arch/m68k/mac/debug.c
+++ b/arch/m68k/mac/debug.c
@@ -14,7 +14,6 @@
14 * for more details. 14 * for more details.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/tty.h> 19#include <linux/tty.h>
diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c
index 4c8ece7e64a..bc657b1057a 100644
--- a/arch/m68k/mac/iop.c
+++ b/arch/m68k/mac/iop.c
@@ -104,7 +104,6 @@
104 * should execute quickly.) 104 * should execute quickly.)
105 */ 105 */
106 106
107#include <linux/config.h>
108#include <linux/types.h> 107#include <linux/types.h>
109#include <linux/kernel.h> 108#include <linux/kernel.h>
110#include <linux/mm.h> 109#include <linux/mm.h>
diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c
index bbb0c3b95e9..56d1f5676ad 100644
--- a/arch/m68k/mac/misc.c
+++ b/arch/m68k/mac/misc.c
@@ -2,7 +2,6 @@
2 * Miscellaneous Mac68K-specific stuff 2 * Miscellaneous Mac68K-specific stuff
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/types.h> 5#include <linux/types.h>
7#include <linux/errno.h> 6#include <linux/errno.h>
8#include <linux/miscdevice.h> 7#include <linux/miscdevice.h>
diff --git a/arch/m68k/math-emu/fp_entry.S b/arch/m68k/math-emu/fp_entry.S
index 5ec2d9101ea..954b4f304a7 100644
--- a/arch/m68k/math-emu/fp_entry.S
+++ b/arch/m68k/math-emu/fp_entry.S
@@ -35,7 +35,6 @@
35 * OF THE POSSIBILITY OF SUCH DAMAGE. 35 * OF THE POSSIBILITY OF SUCH DAMAGE.
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/linkage.h> 38#include <linux/linkage.h>
40#include <asm/entry.h> 39#include <asm/entry.h>
41 40
diff --git a/arch/m68k/math-emu/fp_util.S b/arch/m68k/math-emu/fp_util.S
index a9f7f012906..b093b85fcdd 100644
--- a/arch/m68k/math-emu/fp_util.S
+++ b/arch/m68k/math-emu/fp_util.S
@@ -35,7 +35,6 @@
35 * OF THE POSSIBILITY OF SUCH DAMAGE. 35 * OF THE POSSIBILITY OF SUCH DAMAGE.
36 */ 36 */
37 37
38#include <linux/config.h>
39#include "fp_emu.h" 38#include "fp_emu.h"
40 39
41/* 40/*
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index a190e39c907..ab90213e5c5 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -7,7 +7,6 @@
7 * to motorola.c and sun3mmu.c 7 * to motorola.c and sun3mmu.c
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/signal.h> 10#include <linux/signal.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
index 43ffab04872..f46f049d29f 100644
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -7,7 +7,6 @@
7 * used by other architectures /Roman Zippel 7 * used by other architectures /Roman Zippel
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/mm.h> 10#include <linux/mm.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/string.h> 12#include <linux/string.h>
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c
index a226668f20c..a0c095e1722 100644
--- a/arch/m68k/mm/memory.c
+++ b/arch/m68k/mm/memory.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1995 Hamish Macdonald 4 * Copyright (C) 1995 Hamish Macdonald
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/mm.h> 7#include <linux/mm.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/string.h> 9#include <linux/string.h>
diff --git a/arch/m68k/mm/motorola.c b/arch/m68k/mm/motorola.c
index bdb11103694..49015e32d8f 100644
--- a/arch/m68k/mm/motorola.c
+++ b/arch/m68k/mm/motorola.c
@@ -8,7 +8,6 @@
8 * Moved 8/20/1999 Sam Creasey 8 * Moved 8/20/1999 Sam Creasey
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/signal.h> 12#include <linux/signal.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c
index efa52d302d6..9a182787640 100644
--- a/arch/m68k/q40/config.c
+++ b/arch/m68k/q40/config.c
@@ -12,7 +12,6 @@
12 * for more details. 12 * for more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
diff --git a/arch/m68k/sun3/config.c b/arch/m68k/sun3/config.c
index 553c304aa2c..d09d03b3d95 100644
--- a/arch/m68k/sun3/config.c
+++ b/arch/m68k/sun3/config.c
@@ -8,7 +8,6 @@
8 * for more details. 8 * for more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/m68k/sun3/prom/init.c b/arch/m68k/sun3/prom/init.c
index 2e6ae56aec1..202adfcc316 100644
--- a/arch/m68k/sun3/prom/init.c
+++ b/arch/m68k/sun3/prom/init.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/init.h> 9#include <linux/init.h>
11 10
diff --git a/arch/m68k/sun3/prom/printf.c b/arch/m68k/sun3/prom/printf.c
index e6ee1006344..e7bfde377b5 100644
--- a/arch/m68k/sun3/prom/printf.c
+++ b/arch/m68k/sun3/prom/printf.c
@@ -8,7 +8,6 @@
8 * about or use it! It's simple and smelly anyway.... 8 * about or use it! It's simple and smelly anyway....
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13 12
14#include <asm/openprom.h> 13#include <asm/openprom.h>
diff --git a/arch/m68k/sun3/sun3dvma.c b/arch/m68k/sun3/sun3dvma.c
index 97c7bfde8ae..6c265222cbc 100644
--- a/arch/m68k/sun3/sun3dvma.c
+++ b/arch/m68k/sun3/sun3dvma.c
@@ -6,7 +6,6 @@
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/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/mm.h> 10#include <linux/mm.h>
12#include <linux/list.h> 11#include <linux/list.h>
diff --git a/arch/m68k/sun3/sun3ints.c b/arch/m68k/sun3/sun3ints.c
index 0912435e9e9..f18b9d3ef16 100644
--- a/arch/m68k/sun3/sun3ints.c
+++ b/arch/m68k/sun3/sun3ints.c
@@ -6,7 +6,6 @@
6 * for more details. 6 * for more details.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/m68k/sun3x/config.c b/arch/m68k/sun3x/config.c
index 52fb1740886..987891783a4 100644
--- a/arch/m68k/sun3x/config.c
+++ b/arch/m68k/sun3x/config.c
@@ -6,7 +6,6 @@
6 * based on code from Oliver Jowett <oliver@jowett.manawatu.gen.nz> 6 * based on code from Oliver Jowett <oliver@jowett.manawatu.gen.nz>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/mm.h> 10#include <linux/mm.h>
12#include <linux/console.h> 11#include <linux/console.h>
diff --git a/arch/m68knommu/kernel/comempci.c b/arch/m68knommu/kernel/comempci.c
index db7a0c1ceba..6ee00effbad 100644
--- a/arch/m68knommu/kernel/comempci.c
+++ b/arch/m68knommu/kernel/comempci.c
@@ -9,7 +9,6 @@
9 9
10/*****************************************************************************/ 10/*****************************************************************************/
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/pci.h> 14#include <linux/pci.h>
diff --git a/arch/m68knommu/kernel/entry.S b/arch/m68knommu/kernel/entry.S
index 8b1f47239b9..1e7ea6a3e1a 100644
--- a/arch/m68knommu/kernel/entry.S
+++ b/arch/m68knommu/kernel/entry.S
@@ -24,7 +24,6 @@
24 * linux 2.4 support David McCullough <davidm@snapgear.com> 24 * linux 2.4 support David McCullough <davidm@snapgear.com>
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/sys.h> 27#include <linux/sys.h>
29#include <linux/linkage.h> 28#include <linux/linkage.h>
30#include <asm/thread_info.h> 29#include <asm/thread_info.h>
diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c
index 4320d5dcc9c..1e62150f358 100644
--- a/arch/m68knommu/kernel/m68k_ksyms.c
+++ b/arch/m68knommu/kernel/m68k_ksyms.c
@@ -7,7 +7,6 @@
7#include <linux/elfcore.h> 7#include <linux/elfcore.h>
8#include <linux/in6.h> 8#include <linux/in6.h>
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/config.h>
11 10
12#include <asm/setup.h> 11#include <asm/setup.h>
13#include <asm/machdep.h> 12#include <asm/machdep.h>
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c
index f861755ec88..c18a8330695 100644
--- a/arch/m68knommu/kernel/process.c
+++ b/arch/m68knommu/kernel/process.c
@@ -13,7 +13,6 @@
13 * This file handles the architecture-dependent parts of process handling.. 13 * This file handles the architecture-dependent parts of process handling..
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
diff --git a/arch/m68knommu/kernel/ptrace.c b/arch/m68knommu/kernel/ptrace.c
index 382ca5797b9..9130119537b 100644
--- a/arch/m68knommu/kernel/ptrace.c
+++ b/arch/m68knommu/kernel/ptrace.c
@@ -18,7 +18,6 @@
18#include <linux/errno.h> 18#include <linux/errno.h>
19#include <linux/ptrace.h> 19#include <linux/ptrace.h>
20#include <linux/user.h> 20#include <linux/user.h>
21#include <linux/config.h>
22#include <linux/signal.h> 21#include <linux/signal.h>
23 22
24#include <asm/uaccess.h> 23#include <asm/uaccess.h>
diff --git a/arch/m68knommu/kernel/semaphore.c b/arch/m68knommu/kernel/semaphore.c
index c083f4772ad..bce2bc7d87c 100644
--- a/arch/m68knommu/kernel/semaphore.c
+++ b/arch/m68knommu/kernel/semaphore.c
@@ -3,7 +3,6 @@
3 * specific changes in <asm/semaphore-helper.h> 3 * specific changes in <asm/semaphore-helper.h>
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
8#include <linux/err.h> 7#include <linux/err.h>
9#include <linux/init.h> 8#include <linux/init.h>
diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
index 99d038e9ab3..bde9811cf98 100644
--- a/arch/m68knommu/kernel/setup.c
+++ b/arch/m68knommu/kernel/setup.c
@@ -16,7 +16,6 @@
16 * This file handles the architecture-dependent parts of system setup 16 * This file handles the architecture-dependent parts of system setup
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
diff --git a/arch/m68knommu/kernel/syscalltable.S b/arch/m68knommu/kernel/syscalltable.S
index 897deaa06b0..617e43ec95a 100644
--- a/arch/m68knommu/kernel/syscalltable.S
+++ b/arch/m68knommu/kernel/syscalltable.S
@@ -11,7 +11,6 @@
11 * Copyright (C) 1991, 1992 Linus Torvalds 11 * Copyright (C) 1991, 1992 Linus Torvalds
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/sys.h> 14#include <linux/sys.h>
16#include <linux/linkage.h> 15#include <linux/linkage.h>
17#include <asm/unistd.h> 16#include <asm/unistd.h>
diff --git a/arch/m68knommu/kernel/time.c b/arch/m68knommu/kernel/time.c
index b9d8abb4543..1db98727222 100644
--- a/arch/m68knommu/kernel/time.c
+++ b/arch/m68knommu/kernel/time.c
@@ -10,7 +10,6 @@
10 * "A Kernel Model for Precision Timekeeping" by Dave Mills 10 * "A Kernel Model for Precision Timekeeping" by Dave Mills
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
index 44ff74e643b..17649d2543e 100644
--- a/arch/m68knommu/kernel/traps.c
+++ b/arch/m68knommu/kernel/traps.c
@@ -16,7 +16,6 @@
16/* 16/*
17 * Sets up all exception vectors 17 * Sets up all exception vectors
18 */ 18 */
19#include <linux/config.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/signal.h> 20#include <linux/signal.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
index 59ced831b79..ccd2ceb05cf 100644
--- a/arch/m68knommu/kernel/vmlinux.lds.S
+++ b/arch/m68knommu/kernel/vmlinux.lds.S
@@ -7,7 +7,6 @@
7 * run kernels. 7 * run kernels.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <asm-generic/vmlinux.lds.h> 10#include <asm-generic/vmlinux.lds.h>
12 11
13#if defined(CONFIG_RAMKERNEL) 12#if defined(CONFIG_RAMKERNEL)
diff --git a/arch/m68knommu/lib/semaphore.S b/arch/m68knommu/lib/semaphore.S
index 76765362fea..87c74603437 100644
--- a/arch/m68knommu/lib/semaphore.S
+++ b/arch/m68knommu/lib/semaphore.S
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/linkage.h> 11#include <linux/linkage.h>
12#include <linux/config.h>
13#include <asm/semaphore.h> 12#include <asm/semaphore.h>
14 13
15/* 14/*
diff --git a/arch/m68knommu/mm/init.c b/arch/m68knommu/mm/init.c
index 70d1653be3d..e4c233eef19 100644
--- a/arch/m68knommu/mm/init.c
+++ b/arch/m68knommu/mm/init.c
@@ -15,7 +15,6 @@
15 * DEC/2000 -- linux 2.4 support <davidm@snapgear.com> 15 * DEC/2000 -- linux 2.4 support <davidm@snapgear.com>
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/signal.h> 18#include <linux/signal.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/arch/m68knommu/mm/kmap.c b/arch/m68knommu/mm/kmap.c
index 04213e1c1e5..bc32f38843f 100644
--- a/arch/m68knommu/mm/kmap.c
+++ b/arch/m68knommu/mm/kmap.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 2000-2002 David McCullough <davidm@snapgear.com> 5 * Copyright (C) 2000-2002 David McCullough <davidm@snapgear.com>
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/string.h> 10#include <linux/string.h>
diff --git a/arch/m68knommu/mm/memory.c b/arch/m68knommu/mm/memory.c
index 0eef72915e6..411e45248e5 100644
--- a/arch/m68knommu/mm/memory.c
+++ b/arch/m68knommu/mm/memory.c
@@ -11,7 +11,6 @@
11 * Copyright (C) 1995 Hamish Macdonald 11 * Copyright (C) 1995 Hamish Macdonald
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/string.h> 16#include <linux/string.h>
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c
index 987c91a9a20..34657f85e70 100644
--- a/arch/m68knommu/platform/5206/config.c
+++ b/arch/m68knommu/platform/5206/config.c
@@ -9,7 +9,6 @@
9 9
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/param.h> 14#include <linux/param.h>
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
index f35b8606c1e..48e4d626650 100644
--- a/arch/m68knommu/platform/5206e/config.c
+++ b/arch/m68knommu/platform/5206e/config.c
@@ -8,7 +8,6 @@
8 8
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
diff --git a/arch/m68knommu/platform/520x/config.c b/arch/m68knommu/platform/520x/config.c
index 71dea2e0f45..823f561f35b 100644
--- a/arch/m68knommu/platform/520x/config.c
+++ b/arch/m68knommu/platform/520x/config.c
@@ -11,7 +11,6 @@
11 11
12/***************************************************************************/ 12/***************************************************************************/
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/param.h> 15#include <linux/param.h>
17#include <asm/machdep.h> 16#include <asm/machdep.h>
diff --git a/arch/m68knommu/platform/523x/config.c b/arch/m68knommu/platform/523x/config.c
index 22767ce506e..85de817e9ec 100644
--- a/arch/m68knommu/platform/523x/config.c
+++ b/arch/m68knommu/platform/523x/config.c
@@ -12,7 +12,6 @@
12 12
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/param.h> 17#include <linux/param.h>
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c
index 289c1821b84..9d19d5bdb8a 100644
--- a/arch/m68knommu/platform/5249/config.c
+++ b/arch/m68knommu/platform/5249/config.c
@@ -8,7 +8,6 @@
8 8
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
index cf36e7d007b..d500e27eda5 100644
--- a/arch/m68knommu/platform/5272/config.c
+++ b/arch/m68knommu/platform/5272/config.c
@@ -9,7 +9,6 @@
9 9
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/param.h> 14#include <linux/param.h>
diff --git a/arch/m68knommu/platform/527x/config.c b/arch/m68knommu/platform/527x/config.c
index 804de33cd6b..bbae5159745 100644
--- a/arch/m68knommu/platform/527x/config.c
+++ b/arch/m68knommu/platform/527x/config.c
@@ -12,7 +12,6 @@
12 12
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/param.h> 17#include <linux/param.h>
diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
index a5d2aa38a27..18dad904614 100644
--- a/arch/m68knommu/platform/528x/config.c
+++ b/arch/m68knommu/platform/528x/config.c
@@ -12,7 +12,6 @@
12 12
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/param.h> 17#include <linux/param.h>
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
index 7ed5782e923..8074ac56f47 100644
--- a/arch/m68knommu/platform/5307/config.c
+++ b/arch/m68knommu/platform/5307/config.c
@@ -9,7 +9,6 @@
9 9
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/param.h> 14#include <linux/param.h>
diff --git a/arch/m68knommu/platform/5307/entry.S b/arch/m68knommu/platform/5307/entry.S
index 9ddf5476ef8..f0dba84d910 100644
--- a/arch/m68knommu/platform/5307/entry.S
+++ b/arch/m68knommu/platform/5307/entry.S
@@ -26,7 +26,6 @@
26 * Bug, speed and maintainability fixes by Philippe De Muyter <phdm@macqel.be> 26 * Bug, speed and maintainability fixes by Philippe De Muyter <phdm@macqel.be>
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/sys.h> 29#include <linux/sys.h>
31#include <linux/linkage.h> 30#include <linux/linkage.h>
32#include <asm/unistd.h> 31#include <asm/unistd.h>
diff --git a/arch/m68knommu/platform/5307/head.S b/arch/m68knommu/platform/5307/head.S
index 1d9eb301d7a..f2edb6498cd 100644
--- a/arch/m68knommu/platform/5307/head.S
+++ b/arch/m68knommu/platform/5307/head.S
@@ -8,7 +8,6 @@
8 8
9/*****************************************************************************/ 9/*****************************************************************************/
10 10
11#include <linux/config.h>
12#include <linux/sys.h> 11#include <linux/sys.h>
13#include <linux/linkage.h> 12#include <linux/linkage.h>
14#include <asm/asm-offsets.h> 13#include <asm/asm-offsets.h>
diff --git a/arch/m68knommu/platform/5307/ints.c b/arch/m68knommu/platform/5307/ints.c
index a134fb2f056..b4b55093ae7 100644
--- a/arch/m68knommu/platform/5307/ints.c
+++ b/arch/m68knommu/platform/5307/ints.c
@@ -21,7 +21,6 @@
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/kernel_stat.h> 22#include <linux/kernel_stat.h>
23#include <linux/errno.h> 23#include <linux/errno.h>
24#include <linux/config.h>
25#include <linux/seq_file.h> 24#include <linux/seq_file.h>
26 25
27#include <asm/system.h> 26#include <asm/system.h>
diff --git a/arch/m68knommu/platform/5307/pit.c b/arch/m68knommu/platform/5307/pit.c
index ef174748825..9dc5688f71b 100644
--- a/arch/m68knommu/platform/5307/pit.c
+++ b/arch/m68knommu/platform/5307/pit.c
@@ -12,7 +12,6 @@
12 12
13/***************************************************************************/ 13/***************************************************************************/
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/param.h> 17#include <linux/param.h>
@@ -49,7 +48,7 @@ void coldfire_pit_init(irqreturn_t (*handler)(int, void *, struct pt_regs *))
49 volatile unsigned char *icrp; 48 volatile unsigned char *icrp;
50 volatile unsigned long *imrp; 49 volatile unsigned long *imrp;
51 50
52 request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, SA_INTERRUPT, 51 request_irq(MCFINT_VECBASE + MCFINT_PIT1, handler, IRQF_DISABLED,
53 "ColdFire Timer", NULL); 52 "ColdFire Timer", NULL);
54 53
55 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 + 54 icrp = (volatile unsigned char *) (MCF_IPSBAR + MCFICM_INTC0 +
diff --git a/arch/m68knommu/platform/5307/timers.c b/arch/m68knommu/platform/5307/timers.c
index 83b8b89dfa0..24781f00933 100644
--- a/arch/m68knommu/platform/5307/timers.c
+++ b/arch/m68knommu/platform/5307/timers.c
@@ -8,7 +8,6 @@
8 8
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
@@ -62,7 +61,7 @@ void coldfire_timer_init(irqreturn_t (*handler)(int, void *, struct pt_regs *))
62 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 61 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
63 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR)); 62 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, TA(MCFTIMER_TMR));
64 63
65 request_irq(mcf_timervector, handler, SA_INTERRUPT, "timer", NULL); 64 request_irq(mcf_timervector, handler, IRQF_DISABLED, "timer", NULL);
66 mcf_settimericr(1, mcf_timerlevel); 65 mcf_settimericr(1, mcf_timerlevel);
67 66
68#ifdef CONFIG_HIGHPROFILE 67#ifdef CONFIG_HIGHPROFILE
@@ -126,7 +125,7 @@ void coldfire_profile_init(void)
126 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); 125 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
127 126
128 request_irq(mcf_profilevector, coldfire_profile_tick, 127 request_irq(mcf_profilevector, coldfire_profile_tick,
129 (SA_INTERRUPT | IRQ_FLG_FAST), "profile timer", NULL); 128 (IRQF_DISABLED | IRQ_FLG_FAST), "profile timer", NULL);
130 mcf_settimericr(2, 7); 129 mcf_settimericr(2, 7);
131} 130}
132 131
diff --git a/arch/m68knommu/platform/5307/vectors.c b/arch/m68knommu/platform/5307/vectors.c
index ac313a160d8..2a8b0d044ce 100644
--- a/arch/m68knommu/platform/5307/vectors.c
+++ b/arch/m68knommu/platform/5307/vectors.c
@@ -8,7 +8,6 @@
8 8
9/***************************************************************************/ 9/***************************************************************************/
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/param.h> 13#include <linux/param.h>
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c
index f7c9018b85a..5aad2645f0f 100644
--- a/arch/m68knommu/platform/5407/config.c
+++ b/arch/m68knommu/platform/5407/config.c
@@ -9,7 +9,6 @@
9 9
10/***************************************************************************/ 10/***************************************************************************/
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/param.h> 14#include <linux/param.h>
diff --git a/arch/m68knommu/platform/68328/config.c b/arch/m68knommu/platform/68328/config.c
index bcfa5d7fe1e..26ffeba2864 100644
--- a/arch/m68knommu/platform/68328/config.c
+++ b/arch/m68knommu/platform/68328/config.c
@@ -17,7 +17,6 @@
17 17
18#include <asm/dbg.h> 18#include <asm/dbg.h>
19#include <stdarg.h> 19#include <stdarg.h>
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/mm.h> 22#include <linux/mm.h>
diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S
index 7d8990d784a..f9786271545 100644
--- a/arch/m68knommu/platform/68328/entry.S
+++ b/arch/m68knommu/platform/68328/entry.S
@@ -10,7 +10,6 @@
10 * Linux/m68k support by Hamish Macdonald 10 * Linux/m68k support by Hamish Macdonald
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/sys.h> 13#include <linux/sys.h>
15#include <linux/linkage.h> 14#include <linux/linkage.h>
16#include <asm/thread_info.h> 15#include <asm/thread_info.h>
diff --git a/arch/m68knommu/platform/68328/head-de2.S b/arch/m68knommu/platform/68328/head-de2.S
index 94c5a1609a7..92d96456d36 100644
--- a/arch/m68knommu/platform/68328/head-de2.S
+++ b/arch/m68knommu/platform/68328/head-de2.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#if defined(CONFIG_RAM32MB) 2#if defined(CONFIG_RAM32MB)
4#define MEM_END 0x02000000 /* Memory size 32Mb */ 3#define MEM_END 0x02000000 /* Memory size 32Mb */
diff --git a/arch/m68knommu/platform/68328/head-pilot.S b/arch/m68knommu/platform/68328/head-pilot.S
index 46b3604f999..9e07faa3e81 100644
--- a/arch/m68knommu/platform/68328/head-pilot.S
+++ b/arch/m68knommu/platform/68328/head-pilot.S
@@ -15,7 +15,6 @@
15#define IMMED # 15#define IMMED #
16#define DBG_PUTC(x) moveb IMMED x, 0xfffff907 16#define DBG_PUTC(x) moveb IMMED x, 0xfffff907
17 17
18#include <linux/config.h>
19 18
20.global _stext 19.global _stext
21.global _start 20.global _start
diff --git a/arch/m68knommu/platform/68328/head-ram.S b/arch/m68knommu/platform/68328/head-ram.S
index e8dc9241ff9..252b80b0203 100644
--- a/arch/m68knommu/platform/68328/head-ram.S
+++ b/arch/m68knommu/platform/68328/head-ram.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3 .global __main 2 .global __main
4 .global __rom_start 3 .global __rom_start
diff --git a/arch/m68knommu/platform/68328/head-rom.S b/arch/m68knommu/platform/68328/head-rom.S
index 234430b9551..6ec77d3ea0b 100644
--- a/arch/m68knommu/platform/68328/head-rom.S
+++ b/arch/m68knommu/platform/68328/head-rom.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3 .global _start 2 .global _start
4 .global _stext 3 .global _stext
diff --git a/arch/m68knommu/platform/68328/timers.c b/arch/m68knommu/platform/68328/timers.c
index 68c2cd6b003..438ef6ee972 100644
--- a/arch/m68knommu/platform/68328/timers.c
+++ b/arch/m68knommu/platform/68328/timers.c
@@ -14,7 +14,6 @@
14 14
15/***************************************************************************/ 15/***************************************************************************/
16 16
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/m68knommu/platform/68360/config.c b/arch/m68knommu/platform/68360/config.c
index 69c670dfd62..c5482e3622e 100644
--- a/arch/m68knommu/platform/68360/config.c
+++ b/arch/m68knommu/platform/68360/config.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <stdarg.h> 13#include <stdarg.h>
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
diff --git a/arch/m68knommu/platform/68360/entry.S b/arch/m68knommu/platform/68360/entry.S
index 8ff48adf24a..f1af8977f29 100644
--- a/arch/m68knommu/platform/68360/entry.S
+++ b/arch/m68knommu/platform/68360/entry.S
@@ -12,7 +12,6 @@
12 * M68360 Port by SED Systems, and Lineo. 12 * M68360 Port by SED Systems, and Lineo.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/sys.h> 15#include <linux/sys.h>
17#include <linux/linkage.h> 16#include <linux/linkage.h>
18#include <asm/thread_info.h> 17#include <asm/thread_info.h>
diff --git a/arch/m68knommu/platform/68360/head-ram.S b/arch/m68knommu/platform/68360/head-ram.S
index f497713a4ec..2ea51479f13 100644
--- a/arch/m68knommu/platform/68360/head-ram.S
+++ b/arch/m68knommu/platform/68360/head-ram.S
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14#define ASSEMBLY 14#define ASSEMBLY
15#include <linux/config.h>
16 15
17.global _stext 16.global _stext
18.global _start 17.global _start
diff --git a/arch/m68knommu/platform/68360/head-rom.S b/arch/m68knommu/platform/68360/head-rom.S
index 2d28c3e19a8..62ecf4144b3 100644
--- a/arch/m68knommu/platform/68360/head-rom.S
+++ b/arch/m68knommu/platform/68360/head-rom.S
@@ -11,7 +11,6 @@
11 * Copyright (C) 1998 D. Jeff Dionne <jeff@uclinux.org>, 11 * Copyright (C) 1998 D. Jeff Dionne <jeff@uclinux.org>,
12 * 12 *
13 */ 13 */
14#include <linux/config.h>
15 14
16.global _stext 15.global _stext
17.global _sbss 16.global _sbss
diff --git a/arch/m68knommu/platform/68360/ints.c b/arch/m68knommu/platform/68360/ints.c
index 0245fc4a478..4df3c146eb7 100644
--- a/arch/m68knommu/platform/68360/ints.c
+++ b/arch/m68knommu/platform/68360/ints.c
@@ -10,7 +10,6 @@
10 * Copyright (c) 1999 D. Jeff Dionne <jeff@uclinux.org> 10 * Copyright (c) 1999 D. Jeff Dionne <jeff@uclinux.org>
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/arch/m68knommu/platform/68EZ328/config.c b/arch/m68knommu/platform/68EZ328/config.c
index 15a14a67c2b..659b80aca11 100644
--- a/arch/m68knommu/platform/68EZ328/config.c
+++ b/arch/m68knommu/platform/68EZ328/config.c
@@ -14,7 +14,6 @@
14/***************************************************************************/ 14/***************************************************************************/
15 15
16#include <stdarg.h> 16#include <stdarg.h>
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/m68knommu/platform/68VZ328/config.c b/arch/m68knommu/platform/68VZ328/config.c
index 4058de5c8fa..fcd100b7594 100644
--- a/arch/m68knommu/platform/68VZ328/config.c
+++ b/arch/m68knommu/platform/68VZ328/config.c
@@ -14,7 +14,6 @@
14 14
15/***************************************************************************/ 15/***************************************************************************/
16 16
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/mips/arc/identify.c b/arch/mips/arc/identify.c
index 1bd6199e174..3ba7c47f9f2 100644
--- a/arch/mips/arc/identify.c
+++ b/arch/mips/arc/identify.c
@@ -11,7 +11,6 @@
11 * 11 *
12 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) 12 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
13 */ 13 */
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/types.h> 16#include <linux/types.h>
diff --git a/arch/mips/au1000/common/au1xxx_irqmap.c b/arch/mips/au1000/common/au1xxx_irqmap.c
index 5a1e3687caf..7acfe9bf5fc 100644
--- a/arch/mips/au1000/common/au1xxx_irqmap.c
+++ b/arch/mips/au1000/common/au1xxx_irqmap.c
@@ -25,7 +25,6 @@
25 * with this program; if not, write to the Free Software Foundation, Inc., 25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */ 27 */
28#include <linux/config.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <linux/irq.h> 30#include <linux/irq.h>
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c
index a547e47dd5f..98244d51c15 100644
--- a/arch/mips/au1000/common/dbdma.c
+++ b/arch/mips/au1000/common/dbdma.c
@@ -30,7 +30,6 @@
30 * 30 *
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/errno.h> 34#include <linux/errno.h>
36#include <linux/sched.h> 35#include <linux/sched.h>
@@ -893,7 +892,7 @@ static void au1xxx_dbdma_init(void)
893 #error Unknown Au1x00 SOC 892 #error Unknown Au1x00 SOC
894#endif 893#endif
895 894
896 if (request_irq(irq_nr, dbdma_interrupt, SA_INTERRUPT, 895 if (request_irq(irq_nr, dbdma_interrupt, IRQF_DISABLED,
897 "Au1xxx dbdma", (void *)dbdma_gptr)) 896 "Au1xxx dbdma", (void *)dbdma_gptr))
898 printk("Can't get 1550 dbdma irq"); 897 printk("Can't get 1550 dbdma irq");
899} 898}
diff --git a/arch/mips/au1000/common/dbg_io.c b/arch/mips/au1000/common/dbg_io.c
index 7bc768e558d..0a50af7f34b 100644
--- a/arch/mips/au1000/common/dbg_io.c
+++ b/arch/mips/au1000/common/dbg_io.c
@@ -1,5 +1,4 @@
1 1
2#include <linux/config.h>
3#include <asm/io.h> 2#include <asm/io.h>
4#include <asm/mach-au1x00/au1000.h> 3#include <asm/mach-au1x00/au1000.h>
5 4
diff --git a/arch/mips/au1000/common/dma.c b/arch/mips/au1000/common/dma.c
index 1d82f227751..fb7c47c1585 100644
--- a/arch/mips/au1000/common/dma.c
+++ b/arch/mips/au1000/common/dma.c
@@ -30,7 +30,6 @@
30 * 675 Mass Ave, Cambridge, MA 02139, USA. 30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 * 31 *
32 */ 32 */
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
36#include <linux/errno.h> 35#include <linux/errno.h>
diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c
index 5f5915b8314..ce55297dcb8 100644
--- a/arch/mips/au1000/common/gpio.c
+++ b/arch/mips/au1000/common/gpio.c
@@ -19,7 +19,6 @@
19 * with this program; if not, write to the Free Software Foundation, Inc., 19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 675 Mass Ave, Cambridge, MA 02139, USA. 20 * 675 Mass Ave, Cambridge, MA 02139, USA.
21 */ 21 */
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <au1000.h> 23#include <au1000.h>
25#include <au1xxx_gpio.h> 24#include <au1xxx_gpio.h>
diff --git a/arch/mips/au1000/common/irq.c b/arch/mips/au1000/common/irq.c
index 12d6edee895..29d6f8178ba 100644
--- a/arch/mips/au1000/common/irq.c
+++ b/arch/mips/au1000/common/irq.c
@@ -26,7 +26,6 @@
26 * with this program; if not, write to the Free Software Foundation, Inc., 26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA. 27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */ 28 */
29#include <linux/config.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/irq.h> 31#include <linux/irq.h>
@@ -310,7 +309,7 @@ void startup_match20_interrupt(irqreturn_t (*handler)(int, void *, struct pt_reg
310 * can avoid it. --cgray 309 * can avoid it. --cgray
311 */ 310 */
312 action.dev_id = handler; 311 action.dev_id = handler;
313 action.flags = SA_INTERRUPT; 312 action.flags = IRQF_DISABLED;
314 cpus_clear(action.mask); 313 cpus_clear(action.mask);
315 action.name = "Au1xxx TOY"; 314 action.name = "Au1xxx TOY";
316 action.handler = handler; 315 action.handler = handler;
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c
index b1392abac80..da591f67489 100644
--- a/arch/mips/au1000/common/pci.c
+++ b/arch/mips/au1000/common/pci.c
@@ -30,7 +30,6 @@
30 * with this program; if not, write to the Free Software Foundation, Inc., 30 * with this program; if not, write to the Free Software Foundation, Inc.,
31 * 675 Mass Ave, Cambridge, MA 02139, USA. 31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 */ 32 */
33#include <linux/config.h>
34#include <linux/types.h> 33#include <linux/types.h>
35#include <linux/pci.h> 34#include <linux/pci.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
diff --git a/arch/mips/au1000/common/platform.c b/arch/mips/au1000/common/platform.c
index 32702e5fbf6..8fd203d4a33 100644
--- a/arch/mips/au1000/common/platform.c
+++ b/arch/mips/au1000/common/platform.c
@@ -7,7 +7,6 @@
7 * License version 2. This program is licensed "as is" without any 7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied. 8 * warranty of any kind, whether express or implied.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/device.h> 10#include <linux/device.h>
12#include <linux/platform_device.h> 11#include <linux/platform_device.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c
index b035513fe30..7504a636461 100644
--- a/arch/mips/au1000/common/power.c
+++ b/arch/mips/au1000/common/power.c
@@ -29,7 +29,6 @@
29 * with this program; if not, write to the Free Software Foundation, Inc., 29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA. 30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 */ 31 */
32#include <linux/config.h>
33#include <linux/init.h> 32#include <linux/init.h>
34#include <linux/pm.h> 33#include <linux/pm.h>
35#include <linux/pm_legacy.h> 34#include <linux/pm_legacy.h>
diff --git a/arch/mips/au1000/common/reset.c b/arch/mips/au1000/common/reset.c
index c93af224c1b..de5447e8384 100644
--- a/arch/mips/au1000/common/reset.c
+++ b/arch/mips/au1000/common/reset.c
@@ -27,7 +27,6 @@
27 * with this program; if not, write to the Free Software Foundation, Inc., 27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30#include <linux/config.h>
31#include <linux/sched.h> 30#include <linux/sched.h>
32#include <linux/mm.h> 31#include <linux/mm.h>
33#include <asm/io.h> 32#include <asm/io.h>
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c
index 97165b6b389..cc5138ce9c9 100644
--- a/arch/mips/au1000/common/setup.c
+++ b/arch/mips/au1000/common/setup.c
@@ -25,7 +25,6 @@
25 * with this program; if not, write to the Free Software Foundation, Inc., 25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */ 27 */
28#include <linux/config.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/sched.h> 29#include <linux/sched.h>
31#include <linux/ioport.h> 30#include <linux/ioport.h>
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c
index 842e1b5ac4a..7e988b0b013 100644
--- a/arch/mips/au1000/common/time.c
+++ b/arch/mips/au1000/common/time.c
@@ -33,7 +33,6 @@
33 */ 33 */
34 34
35#include <linux/types.h> 35#include <linux/types.h>
36#include <linux/config.h>
37#include <linux/init.h> 36#include <linux/init.h>
38#include <linux/kernel_stat.h> 37#include <linux/kernel_stat.h>
39#include <linux/sched.h> 38#include <linux/sched.h>
diff --git a/arch/mips/au1000/common/usbdev.c b/arch/mips/au1000/common/usbdev.c
index 2cab7629702..63bcb3a95dc 100644
--- a/arch/mips/au1000/common/usbdev.c
+++ b/arch/mips/au1000/common/usbdev.c
@@ -1465,14 +1465,14 @@ usbdev_init(struct usb_device_descriptor* dev_desc,
1465 */ 1465 */
1466 1466
1467 /* request the USB device transfer complete interrupt */ 1467 /* request the USB device transfer complete interrupt */
1468 if (request_irq(AU1000_USB_DEV_REQ_INT, req_sus_intr, SA_INTERRUPT, 1468 if (request_irq(AU1000_USB_DEV_REQ_INT, req_sus_intr, IRQF_DISABLED,
1469 "USBdev req", &usbdev)) { 1469 "USBdev req", &usbdev)) {
1470 err("Can't get device request intr"); 1470 err("Can't get device request intr");
1471 ret = -ENXIO; 1471 ret = -ENXIO;
1472 goto out; 1472 goto out;
1473 } 1473 }
1474 /* request the USB device suspend interrupt */ 1474 /* request the USB device suspend interrupt */
1475 if (request_irq(AU1000_USB_DEV_SUS_INT, req_sus_intr, SA_INTERRUPT, 1475 if (request_irq(AU1000_USB_DEV_SUS_INT, req_sus_intr, IRQF_DISABLED,
1476 "USBdev sus", &usbdev)) { 1476 "USBdev sus", &usbdev)) {
1477 err("Can't get device suspend intr"); 1477 err("Can't get device suspend intr");
1478 ret = -ENXIO; 1478 ret = -ENXIO;
@@ -1483,7 +1483,7 @@ usbdev_init(struct usb_device_descriptor* dev_desc,
1483 if ((ep0->indma = request_au1000_dma(ep_dma_id[0].id, 1483 if ((ep0->indma = request_au1000_dma(ep_dma_id[0].id,
1484 ep_dma_id[0].str, 1484 ep_dma_id[0].str,
1485 dma_done_ep0_intr, 1485 dma_done_ep0_intr,
1486 SA_INTERRUPT, 1486 IRQF_DISABLED,
1487 &usbdev)) < 0) { 1487 &usbdev)) < 0) {
1488 err("Can't get %s DMA", ep_dma_id[0].str); 1488 err("Can't get %s DMA", ep_dma_id[0].str);
1489 ret = -ENXIO; 1489 ret = -ENXIO;
@@ -1516,7 +1516,7 @@ usbdev_init(struct usb_device_descriptor* dev_desc,
1516 request_au1000_dma(ep_dma_id[ep->address].id, 1516 request_au1000_dma(ep_dma_id[ep->address].id,
1517 ep_dma_id[ep->address].str, 1517 ep_dma_id[ep->address].str,
1518 dma_done_ep_intr, 1518 dma_done_ep_intr,
1519 SA_INTERRUPT, 1519 IRQF_DISABLED,
1520 &usbdev); 1520 &usbdev);
1521 if (ep->indma < 0) { 1521 if (ep->indma < 0) {
1522 err("Can't get %s DMA", 1522 err("Can't get %s DMA",
diff --git a/arch/mips/au1000/csb250/board_setup.c b/arch/mips/au1000/csb250/board_setup.c
index 1c55c5f59d7..348c3024d3d 100644
--- a/arch/mips/au1000/csb250/board_setup.c
+++ b/arch/mips/au1000/csb250/board_setup.c
@@ -26,7 +26,6 @@
26 * with this program; if not, write to the Free Software Foundation, Inc., 26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA. 27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */ 28 */
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <linux/sched.h> 30#include <linux/sched.h>
32#include <linux/ioport.h> 31#include <linux/ioport.h>
diff --git a/arch/mips/au1000/db1x00/board_setup.c b/arch/mips/au1000/db1x00/board_setup.c
index f00ec3b175d..7a79293f852 100644
--- a/arch/mips/au1000/db1x00/board_setup.c
+++ b/arch/mips/au1000/db1x00/board_setup.c
@@ -27,7 +27,6 @@
27 * with this program; if not, write to the Free Software Foundation, Inc., 27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30#include <linux/config.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/sched.h> 31#include <linux/sched.h>
33#include <linux/ioport.h> 32#include <linux/ioport.h>
diff --git a/arch/mips/au1000/db1x00/init.c b/arch/mips/au1000/db1x00/init.c
index 41e0522f3cf..0a3f025eb02 100644
--- a/arch/mips/au1000/db1x00/init.c
+++ b/arch/mips/au1000/db1x00/init.c
@@ -33,7 +33,6 @@
33#include <linux/bootmem.h> 33#include <linux/bootmem.h>
34#include <asm/addrspace.h> 34#include <asm/addrspace.h>
35#include <asm/bootinfo.h> 35#include <asm/bootinfo.h>
36#include <linux/config.h>
37#include <linux/string.h> 36#include <linux/string.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
39 38
diff --git a/arch/mips/au1000/db1x00/irqmap.c b/arch/mips/au1000/db1x00/irqmap.c
index 0138c5b7c86..3e5729145c2 100644
--- a/arch/mips/au1000/db1x00/irqmap.c
+++ b/arch/mips/au1000/db1x00/irqmap.c
@@ -25,7 +25,6 @@
25 * with this program; if not, write to the Free Software Foundation, Inc., 25 * with this program; if not, write to the Free Software Foundation, Inc.,
26 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
27 */ 27 */
28#include <linux/config.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <linux/irq.h> 30#include <linux/irq.h>
diff --git a/arch/mips/au1000/db1x00/mirage_ts.c b/arch/mips/au1000/db1x00/mirage_ts.c
index c29852c24b4..0942dcf6951 100644
--- a/arch/mips/au1000/db1x00/mirage_ts.c
+++ b/arch/mips/au1000/db1x00/mirage_ts.c
@@ -31,7 +31,6 @@
31 * 675 Mass Ave, Cambridge, MA 02139, USA. 31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/types.h> 34#include <linux/types.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/sched.h> 36#include <linux/sched.h>
diff --git a/arch/mips/au1000/hydrogen3/board_setup.c b/arch/mips/au1000/hydrogen3/board_setup.c
index 2efae106464..d081640e2e0 100644
--- a/arch/mips/au1000/hydrogen3/board_setup.c
+++ b/arch/mips/au1000/hydrogen3/board_setup.c
@@ -27,7 +27,6 @@
27 * with this program; if not, write to the Free Software Foundation, Inc., 27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30#include <linux/config.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/sched.h> 31#include <linux/sched.h>
33#include <linux/ioport.h> 32#include <linux/ioport.h>
diff --git a/arch/mips/au1000/hydrogen3/init.c b/arch/mips/au1000/hydrogen3/init.c
index 01ab2848395..8f02bb80a55 100644
--- a/arch/mips/au1000/hydrogen3/init.c
+++ b/arch/mips/au1000/hydrogen3/init.c
@@ -34,7 +34,6 @@
34#include <linux/bootmem.h> 34#include <linux/bootmem.h>
35#include <asm/addrspace.h> 35#include <asm/addrspace.h>
36#include <asm/bootinfo.h> 36#include <asm/bootinfo.h>
37#include <linux/config.h>
38#include <linux/string.h> 37#include <linux/string.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40 39
diff --git a/arch/mips/au1000/mtx-1/board_setup.c b/arch/mips/au1000/mtx-1/board_setup.c
index 638de7bb43f..e917e54fc68 100644
--- a/arch/mips/au1000/mtx-1/board_setup.c
+++ b/arch/mips/au1000/mtx-1/board_setup.c
@@ -28,7 +28,6 @@
28 * with this program; if not, write to the Free Software Foundation, Inc., 28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 675 Mass Ave, Cambridge, MA 02139, USA. 29 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 */ 30 */
31#include <linux/config.h>
32#include <linux/init.h> 31#include <linux/init.h>
33#include <linux/sched.h> 32#include <linux/sched.h>
34#include <linux/ioport.h> 33#include <linux/ioport.h>
diff --git a/arch/mips/au1000/pb1000/board_setup.c b/arch/mips/au1000/pb1000/board_setup.c
index 0b4807dc9f4..1cf18e16ab5 100644
--- a/arch/mips/au1000/pb1000/board_setup.c
+++ b/arch/mips/au1000/pb1000/board_setup.c
@@ -23,7 +23,6 @@
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
29#include <linux/ioport.h> 28#include <linux/ioport.h>
diff --git a/arch/mips/au1000/pb1100/board_setup.c b/arch/mips/au1000/pb1100/board_setup.c
index 13c2f6ca7e3..db27b9331ff 100644
--- a/arch/mips/au1000/pb1100/board_setup.c
+++ b/arch/mips/au1000/pb1100/board_setup.c
@@ -23,7 +23,6 @@
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
29#include <linux/ioport.h> 28#include <linux/ioport.h>
diff --git a/arch/mips/au1000/pb1200/board_setup.c b/arch/mips/au1000/pb1200/board_setup.c
index a45b17538ac..8b953b9fc25 100644
--- a/arch/mips/au1000/pb1200/board_setup.c
+++ b/arch/mips/au1000/pb1200/board_setup.c
@@ -23,7 +23,6 @@
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
29#include <linux/ioport.h> 28#include <linux/ioport.h>
diff --git a/arch/mips/au1000/pb1200/irqmap.c b/arch/mips/au1000/pb1200/irqmap.c
index 5dd164fc188..2d49f32f462 100644
--- a/arch/mips/au1000/pb1200/irqmap.c
+++ b/arch/mips/au1000/pb1200/irqmap.c
@@ -22,7 +22,6 @@
22 * with this program; if not, write to the Free Software Foundation, Inc., 22 * with this program; if not, write to the Free Software Foundation, Inc.,
23 * 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 */ 24 */
25#include <linux/config.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/irq.h> 27#include <linux/irq.h>
diff --git a/arch/mips/au1000/pb1500/board_setup.c b/arch/mips/au1000/pb1500/board_setup.c
index 30bb87282b1..1a9a293de6a 100644
--- a/arch/mips/au1000/pb1500/board_setup.c
+++ b/arch/mips/au1000/pb1500/board_setup.c
@@ -23,7 +23,6 @@
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
29#include <linux/ioport.h> 28#include <linux/ioport.h>
diff --git a/arch/mips/au1000/xxs1500/board_setup.c b/arch/mips/au1000/xxs1500/board_setup.c
index 1e59433dfd6..ae3d6b19e94 100644
--- a/arch/mips/au1000/xxs1500/board_setup.c
+++ b/arch/mips/au1000/xxs1500/board_setup.c
@@ -23,7 +23,6 @@
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
29#include <linux/ioport.h> 28#include <linux/ioport.h>
diff --git a/arch/mips/basler/excite/excite_iodev.c b/arch/mips/basler/excite/excite_iodev.c
index 91121e52304..b288151b532 100644
--- a/arch/mips/basler/excite/excite_iodev.c
+++ b/arch/mips/basler/excite/excite_iodev.c
@@ -113,7 +113,7 @@ static int __exit iodev_remove(struct device *dev)
113 113
114static int iodev_open(struct inode *i, struct file *f) 114static int iodev_open(struct inode *i, struct file *f)
115{ 115{
116 return request_irq(iodev_irq, iodev_irqhdl, SA_INTERRUPT, 116 return request_irq(iodev_irq, iodev_irqhdl, IRQF_DISABLED,
117 iodev_name, &miscdev); 117 iodev_name, &miscdev);
118} 118}
119 119
diff --git a/arch/mips/cobalt/console.c b/arch/mips/cobalt/console.c
index 300797d5f55..46c23b66bc1 100644
--- a/arch/mips/cobalt/console.c
+++ b/arch/mips/cobalt/console.c
@@ -2,7 +2,6 @@
2 * (C) P. Horton 2006 2 * (C) P. Horton 2006
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/init.h> 5#include <linux/init.h>
7#include <linux/kernel.h> 6#include <linux/kernel.h>
8#include <linux/console.h> 7#include <linux/console.h>
diff --git a/arch/mips/cobalt/setup.c b/arch/mips/cobalt/setup.c
index ca719d6398b..c99714587ce 100644
--- a/arch/mips/cobalt/setup.c
+++ b/arch/mips/cobalt/setup.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv) 9 * Copyright (C) 2001, 2002, 2003 by Liam Davies (ldavies@agile.tv)
10 * 10 *
11 */ 11 */
12#include <linux/config.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <linux/pci.h> 13#include <linux/pci.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/mips/ddb5xxx/common/prom.c b/arch/mips/ddb5xxx/common/prom.c
index 20c845c84d4..efef0f57ce1 100644
--- a/arch/mips/ddb5xxx/common/prom.c
+++ b/arch/mips/ddb5xxx/common/prom.c
@@ -7,7 +7,6 @@
7 * Free Software Foundation; either version 2 of the License, or (at your 7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. 8 * option) any later version.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c
index de433cf9fb5..22fb94b7c44 100644
--- a/arch/mips/ddb5xxx/ddb5477/irq.c
+++ b/arch/mips/ddb5xxx/ddb5477/irq.c
@@ -10,7 +10,6 @@
10 * Free Software Foundation; either version 2 of the License, or (at your 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
16#include <linux/irq.h> 15#include <linux/irq.h>
diff --git a/arch/mips/ddb5xxx/ddb5477/setup.c b/arch/mips/ddb5xxx/ddb5477/setup.c
index 93167ecdb42..47ba0b6f210 100644
--- a/arch/mips/ddb5xxx/ddb5477/setup.c
+++ b/arch/mips/ddb5xxx/ddb5477/setup.c
@@ -13,7 +13,6 @@
13 * Free Software Foundation; either version 2 of the License, or (at your 13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version. 14 * option) any later version.
15 */ 15 */
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/types.h> 18#include <linux/types.h>
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S
index e8ec93e33fe..455a65b91cb 100644
--- a/arch/mips/dec/int-handler.S
+++ b/arch/mips/dec/int-handler.S
@@ -13,7 +13,6 @@
13 * Rewritten extensively for controller-driven IRQ support 13 * Rewritten extensively for controller-driven IRQ support
14 * by Maciej W. Rozycki. 14 * by Maciej W. Rozycki.
15 */ 15 */
16#include <linux/config.h>
17 16
18#include <asm/addrspace.h> 17#include <asm/addrspace.h>
19#include <asm/asm.h> 18#include <asm/asm.h>
diff --git a/arch/mips/dec/prom/init.c b/arch/mips/dec/prom/init.c
index 32a7cc7e4c6..bf2858071f1 100644
--- a/arch/mips/dec/prom/init.c
+++ b/arch/mips/dec/prom/init.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1998 Harald Koerfgen 4 * Copyright (C) 1998 Harald Koerfgen
5 * Copyright (C) 2002, 2004 Maciej W. Rozycki 5 * Copyright (C) 2002, 2004 Maciej W. Rozycki
6 */ 6 */
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/linkage.h> 9#include <linux/linkage.h>
diff --git a/arch/mips/dec/prom/memory.c b/arch/mips/dec/prom/memory.c
index 1edaf3074ee..3027ce78279 100644
--- a/arch/mips/dec/prom/memory.c
+++ b/arch/mips/dec/prom/memory.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1998 Harald Koerfgen, Frieder Streffer and Paul M. Antoine 4 * Copyright (C) 1998 Harald Koerfgen, Frieder Streffer and Paul M. Antoine
5 * Copyright (C) 2000, 2002 Maciej W. Rozycki 5 * Copyright (C) 2000, 2002 Maciej W. Rozycki
6 */ 6 */
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
diff --git a/arch/mips/dec/setup.c b/arch/mips/dec/setup.c
index 9c707b9ceb6..2684f121784 100644
--- a/arch/mips/dec/setup.c
+++ b/arch/mips/dec/setup.c
@@ -105,7 +105,7 @@ static struct irqaction fpuirq = {
105}; 105};
106 106
107static struct irqaction busirq = { 107static struct irqaction busirq = {
108 .flags = SA_INTERRUPT, 108 .flags = IRQF_DISABLED,
109 .name = "bus error", 109 .name = "bus error",
110}; 110};
111 111
@@ -124,7 +124,7 @@ static void __init dec_be_init(void)
124 case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */ 124 case MACH_DS23100: /* DS2100/DS3100 Pmin/Pmax */
125 board_be_handler = dec_kn01_be_handler; 125 board_be_handler = dec_kn01_be_handler;
126 busirq.handler = dec_kn01_be_interrupt; 126 busirq.handler = dec_kn01_be_interrupt;
127 busirq.flags |= SA_SHIRQ; 127 busirq.flags |= IRQF_SHARED;
128 dec_kn01_be_init(); 128 dec_kn01_be_init();
129 break; 129 break;
130 case MACH_DS5000_1XX: /* DS5000/1xx 3min */ 130 case MACH_DS5000_1XX: /* DS5000/1xx 3min */
diff --git a/arch/mips/galileo-boards/ev96100/setup.c b/arch/mips/galileo-boards/ev96100/setup.c
index a04aea6123d..639ad5562c6 100644
--- a/arch/mips/galileo-boards/ev96100/setup.c
+++ b/arch/mips/galileo-boards/ev96100/setup.c
@@ -32,7 +32,6 @@
32 * with this program; if not, write to the Free Software Foundation, Inc., 32 * with this program; if not, write to the Free Software Foundation, Inc.,
33 * 675 Mass Ave, Cambridge, MA 02139, USA. 33 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */ 34 */
35#include <linux/config.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/sched.h> 36#include <linux/sched.h>
38#include <linux/ioport.h> 37#include <linux/ioport.h>
diff --git a/arch/mips/galileo-boards/ev96100/time.c b/arch/mips/galileo-boards/ev96100/time.c
index bff5b1c174e..8cbe8426491 100644
--- a/arch/mips/galileo-boards/ev96100/time.c
+++ b/arch/mips/galileo-boards/ev96100/time.c
@@ -32,7 +32,6 @@
32 * with this program; if not, write to the Free Software Foundation, Inc., 32 * with this program; if not, write to the Free Software Foundation, Inc.,
33 * 675 Mass Ave, Cambridge, MA 02139, USA. 33 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */ 34 */
35#include <linux/config.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/kernel_stat.h> 36#include <linux/kernel_stat.h>
38#include <linux/module.h> 37#include <linux/module.h>
diff --git a/arch/mips/gt64120/common/time.c b/arch/mips/gt64120/common/time.c
index 2287b59536e..d837b26fbe5 100644
--- a/arch/mips/gt64120/common/time.c
+++ b/arch/mips/gt64120/common/time.c
@@ -8,7 +8,6 @@
8 */ 8 */
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/config.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/kernel_stat.h> 12#include <linux/kernel_stat.h>
14#include <asm/ptrace.h> 13#include <asm/ptrace.h>
@@ -78,7 +77,7 @@ void gt64120_time_init(void)
78 * the values to the correct interrupt line. 77 * the values to the correct interrupt line.
79 */ 78 */
80 timer.handler = gt64120_irq; 79 timer.handler = gt64120_irq;
81 timer.flags = SA_SHIRQ | SA_INTERRUPT; 80 timer.flags = IRQF_SHARED | IRQF_DISABLED;
82 timer.name = "timer"; 81 timer.name = "timer";
83 timer.dev_id = NULL; 82 timer.dev_id = NULL;
84 timer.next = NULL; 83 timer.next = NULL;
diff --git a/arch/mips/gt64120/momenco_ocelot/dbg_io.c b/arch/mips/gt64120/momenco_ocelot/dbg_io.c
index f0a6a38fcf4..2128684584f 100644
--- a/arch/mips/gt64120/momenco_ocelot/dbg_io.c
+++ b/arch/mips/gt64120/momenco_ocelot/dbg_io.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#ifdef CONFIG_KGDB 2#ifdef CONFIG_KGDB
4 3
diff --git a/arch/mips/ite-boards/generic/dbg_io.c b/arch/mips/ite-boards/generic/dbg_io.c
index 6a7ccaf9350..8e9cd8a9670 100644
--- a/arch/mips/ite-boards/generic/dbg_io.c
+++ b/arch/mips/ite-boards/generic/dbg_io.c
@@ -1,5 +1,4 @@
1 1
2#include <linux/config.h>
3 2
4#ifdef CONFIG_KGDB 3#ifdef CONFIG_KGDB
5 4
diff --git a/arch/mips/ite-boards/generic/it8172_cir.c b/arch/mips/ite-boards/generic/it8172_cir.c
index 19deb153d00..bfc25adcfec 100644
--- a/arch/mips/ite-boards/generic/it8172_cir.c
+++ b/arch/mips/ite-boards/generic/it8172_cir.c
@@ -28,7 +28,6 @@
28 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30 30
31#include <linux/config.h>
32 31
33#ifdef CONFIG_IT8172_CIR 32#ifdef CONFIG_IT8172_CIR
34 33
diff --git a/arch/mips/ite-boards/generic/it8172_setup.c b/arch/mips/ite-boards/generic/it8172_setup.c
index da6ae099119..a4615a5904a 100644
--- a/arch/mips/ite-boards/generic/it8172_setup.c
+++ b/arch/mips/ite-boards/generic/it8172_setup.c
@@ -26,7 +26,6 @@
26 * with this program; if not, write to the Free Software Foundation, Inc., 26 * with this program; if not, write to the Free Software Foundation, Inc.,
27 * 675 Mass Ave, Cambridge, MA 02139, USA. 27 * 675 Mass Ave, Cambridge, MA 02139, USA.
28 */ 28 */
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <linux/sched.h> 30#include <linux/sched.h>
32#include <linux/ioport.h> 31#include <linux/ioport.h>
diff --git a/arch/mips/ite-boards/generic/pmon_prom.c b/arch/mips/ite-boards/generic/pmon_prom.c
index 6e505af0cc0..7d0a79be34d 100644
--- a/arch/mips/ite-boards/generic/pmon_prom.c
+++ b/arch/mips/ite-boards/generic/pmon_prom.c
@@ -35,7 +35,6 @@
35 * 675 Mass Ave, Cambridge, MA 02139, USA. 35 * 675 Mass Ave, Cambridge, MA 02139, USA.
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40#include <linux/init.h> 39#include <linux/init.h>
41#include <linux/string.h> 40#include <linux/string.h>
diff --git a/arch/mips/jazz/setup.c b/arch/mips/jazz/setup.c
index c8d0df7d0c3..385413e30fd 100644
--- a/arch/mips/jazz/setup.c
+++ b/arch/mips/jazz/setup.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1996, 1997, 1998, 2001 by Ralf Baechle 8 * Copyright (C) 1996, 1997, 1998, 2001 by Ralf Baechle
9 * Copyright (C) 2001 MIPS Technologies, Inc. 9 * Copyright (C) 2001 MIPS Technologies, Inc.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/eisa.h> 11#include <linux/eisa.h>
13#include <linux/hdreg.h> 12#include <linux/hdreg.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/arch/mips/jmr3927/rbhma3100/init.c b/arch/mips/jmr3927/rbhma3100/init.c
index a0674d73962..a55cb4572de 100644
--- a/arch/mips/jmr3927/rbhma3100/init.c
+++ b/arch/mips/jmr3927/rbhma3100/init.c
@@ -27,7 +27,6 @@
27 * with this program; if not, write to the Free Software Foundation, Inc., 27 * with this program; if not, write to the Free Software Foundation, Inc.,
28 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30#include <linux/config.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/mm.h> 31#include <linux/mm.h>
33#include <linux/sched.h> 32#include <linux/sched.h>
diff --git a/arch/mips/jmr3927/rbhma3100/irq.c b/arch/mips/jmr3927/rbhma3100/irq.c
index 380046ea1db..9c43702e7a9 100644
--- a/arch/mips/jmr3927/rbhma3100/irq.c
+++ b/arch/mips/jmr3927/rbhma3100/irq.c
@@ -29,7 +29,6 @@
29 * with this program; if not, write to the Free Software Foundation, Inc., 29 * with this program; if not, write to the Free Software Foundation, Inc.,
30 * 675 Mass Ave, Cambridge, MA 02139, USA. 30 * 675 Mass Ave, Cambridge, MA 02139, USA.
31 */ 31 */
32#include <linux/config.h>
33#include <linux/init.h> 32#include <linux/init.h>
34 33
35#include <linux/errno.h> 34#include <linux/errno.h>
diff --git a/arch/mips/jmr3927/rbhma3100/setup.c b/arch/mips/jmr3927/rbhma3100/setup.c
index 308e6cdcd24..6d4635d89d9 100644
--- a/arch/mips/jmr3927/rbhma3100/setup.c
+++ b/arch/mips/jmr3927/rbhma3100/setup.c
@@ -33,7 +33,6 @@
33 *********************************************************************** 33 ***********************************************************************
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/init.h> 36#include <linux/init.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
39#include <linux/kdev_t.h> 38#include <linux/kdev_t.h>
diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c
index f1bb6a2dc5f..ec28077d5ee 100644
--- a/arch/mips/kernel/asm-offsets.c
+++ b/arch/mips/kernel/asm-offsets.c
@@ -8,7 +8,6 @@
8 * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com 8 * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
9 * Copyright (C) 2000 MIPS Technologies, Inc. 9 * Copyright (C) 2000 MIPS Technologies, Inc.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/compat.h> 11#include <linux/compat.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c
index d268827c62b..c09337b947b 100644
--- a/arch/mips/kernel/cpu-bugs64.c
+++ b/arch/mips/kernel/cpu-bugs64.c
@@ -6,7 +6,6 @@
6 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 */ 8 */
9#include <linux/config.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/ptrace.h> 11#include <linux/ptrace.h>
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c
index e045aba4ebd..ba08f055feb 100644
--- a/arch/mips/kernel/cpu-probe.c
+++ b/arch/mips/kernel/cpu-probe.c
@@ -11,7 +11,6 @@
11 * as published by the Free Software Foundation; either version 11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/ptrace.h> 16#include <linux/ptrace.h>
diff --git a/arch/mips/kernel/entry.S b/arch/mips/kernel/entry.S
index 457565162dd..ecfd637d702 100644
--- a/arch/mips/kernel/entry.S
+++ b/arch/mips/kernel/entry.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 */ 9 */
10#include <linux/config.h>
11 10
12#include <asm/asm.h> 11#include <asm/asm.h>
13#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S
index 8760131f89d..666bc9014cb 100644
--- a/arch/mips/kernel/gdb-low.S
+++ b/arch/mips/kernel/gdb-low.S
@@ -3,7 +3,6 @@
3 * 3 *
4 * Copyright (C) 1995 Andreas Busse 4 * Copyright (C) 1995 Andreas Busse
5 */ 5 */
6#include <linux/config.h>
7#include <linux/sys.h> 6#include <linux/sys.h>
8 7
9#include <asm/asm.h> 8#include <asm/asm.h>
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c
index 6ecbdc1fefd..719d26968cb 100644
--- a/arch/mips/kernel/gdb-stub.c
+++ b/arch/mips/kernel/gdb-stub.c
@@ -120,7 +120,6 @@
120 * breakpoints, single stepping, 120 * breakpoints, single stepping,
121 * printing variables, etc. 121 * printing variables, etc.
122 */ 122 */
123#include <linux/config.h>
124#include <linux/string.h> 123#include <linux/string.h>
125#include <linux/kernel.h> 124#include <linux/kernel.h>
126#include <linux/signal.h> 125#include <linux/signal.h>
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S
index 6888cde560a..5254a2222d2 100644
--- a/arch/mips/kernel/genex.S
+++ b/arch/mips/kernel/genex.S
@@ -8,7 +8,6 @@
8 * Copyright (C) 2001 MIPS Technologies, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 * Copyright (C) 2002 Maciej W. Rozycki 9 * Copyright (C) 2002 Maciej W. Rozycki
10 */ 10 */
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13 12
14#include <asm/asm.h> 13#include <asm/asm.h>
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S
index c018098c9a5..476c1eb33c9 100644
--- a/arch/mips/kernel/head.S
+++ b/arch/mips/kernel/head.S
@@ -13,7 +13,6 @@
13 * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com 13 * Kevin Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
14 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. 14 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
15 */ 15 */
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/threads.h> 17#include <linux/threads.h>
19 18
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index 5c9dcd5eed5..cde5e5afa17 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1992 Linus Torvalds 8 * Copyright (C) 1992 Linus Torvalds
9 * Copyright (C) 1994 - 2000 Ralf Baechle 9 * Copyright (C) 1994 - 2000 Ralf Baechle
10 */ 10 */
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/delay.h> 12#include <linux/delay.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c
index a7d2bb3cf83..450ac592da5 100644
--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -5,7 +5,6 @@
5 * Written by Ulf Carlsson (ulfc@engr.sgi.com) 5 * Written by Ulf Carlsson (ulfc@engr.sgi.com)
6 * sys32_execve from ia64/ia32 code, Feb 2000, Kanoj Sarcar (kanoj@sgi.com) 6 * sys32_execve from ia64/ia32 code, Feb 2000, Kanoj Sarcar (kanoj@sgi.com)
7 */ 7 */
8#include <linux/config.h>
9#include <linux/compiler.h> 8#include <linux/compiler.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c
index 0a71a4c3371..f44a01357ad 100644
--- a/arch/mips/kernel/mips_ksyms.c
+++ b/arch/mips/kernel/mips_ksyms.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1996, 97, 98, 99, 2000, 01, 03, 04, 05 by Ralf Baechle 8 * Copyright (C) 1996, 97, 98, 99, 2000, 01, 03, 04, 05 by Ralf Baechle
9 * Copyright (C) 1999, 2000, 01 Silicon Graphics, Inc. 9 * Copyright (C) 1999, 2000, 01 Silicon Graphics, Inc.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/interrupt.h> 11#include <linux/interrupt.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <asm/checksum.h> 13#include <asm/checksum.h>
diff --git a/arch/mips/kernel/proc.c b/arch/mips/kernel/proc.c
index 9def554f335..d8beef10790 100644
--- a/arch/mips/kernel/proc.c
+++ b/arch/mips/kernel/proc.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 2001, 2004 MIPS Technologies, Inc. 5 * Copyright (C) 2001, 2004 MIPS Technologies, Inc.
6 * Copyright (C) 2004 Maciej W. Rozycki 6 * Copyright (C) 2004 Maciej W. Rozycki
7 */ 7 */
8#include <linux/config.h>
9#include <linux/delay.h> 8#include <linux/delay.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 199a06e873c..7ab67f786bf 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9 * Copyright (C) 2004 Thiemo Seufer 9 * Copyright (C) 2004 Thiemo Seufer
10 */ 10 */
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 1d44025188d..362d1728e53 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -14,7 +14,6 @@
14 * At this time Linux/MIPS64 only supports syscall tracing, even for 32-bit 14 * At this time Linux/MIPS64 only supports syscall tracing, even for 32-bit
15 * binaries. 15 * binaries.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/compiler.h> 17#include <linux/compiler.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S
index 0d9c4a32a9c..656bde2e11b 100644
--- a/arch/mips/kernel/r2300_switch.S
+++ b/arch/mips/kernel/r2300_switch.S
@@ -10,7 +10,6 @@
10 * Further modifications to make this work: 10 * Further modifications to make this work:
11 * Copyright (c) 1998-2000 Harald Koerfgen 11 * Copyright (c) 1998-2000 Harald Koerfgen
12 */ 12 */
13#include <linux/config.h>
14#include <asm/asm.h> 13#include <asm/asm.h>
15#include <asm/cachectl.h> 14#include <asm/cachectl.h>
16#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S
index 283a98508fc..880fa6e841e 100644
--- a/arch/mips/kernel/r4k_fpu.S
+++ b/arch/mips/kernel/r4k_fpu.S
@@ -12,7 +12,6 @@
12 * Copyright (C) 2000 MIPS Technologies, Inc. 12 * Copyright (C) 2000 MIPS Technologies, Inc.
13 * Copyright (C) 1999, 2001 Silicon Graphics, Inc. 13 * Copyright (C) 1999, 2001 Silicon Graphics, Inc.
14 */ 14 */
15#include <linux/config.h>
16#include <asm/asm.h> 15#include <asm/asm.h>
17#include <asm/errno.h> 16#include <asm/errno.h>
18#include <asm/fpregdef.h> 17#include <asm/fpregdef.h>
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S
index e1b85e6c486..d5c8b82fed7 100644
--- a/arch/mips/kernel/r4k_switch.S
+++ b/arch/mips/kernel/r4k_switch.S
@@ -10,7 +10,6 @@
10 * Copyright (C) 2000 MIPS Technologies, Inc. 10 * Copyright (C) 2000 MIPS Technologies, Inc.
11 * written by Carsten Langgaard, carstenl@mips.com 11 * written by Carsten Langgaard, carstenl@mips.com
12 */ 12 */
13#include <linux/config.h>
14#include <asm/asm.h> 13#include <asm/asm.h>
15#include <asm/cachectl.h> 14#include <asm/cachectl.h>
16#include <asm/fpregdef.h> 15#include <asm/fpregdef.h>
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c
index caf777f8328..cdab1b2cd13 100644
--- a/arch/mips/kernel/rtlx.c
+++ b/arch/mips/kernel/rtlx.c
@@ -487,7 +487,7 @@ static struct file_operations rtlx_fops = {
487 487
488static struct irqaction rtlx_irq = { 488static struct irqaction rtlx_irq = {
489 .handler = rtlx_interrupt, 489 .handler = rtlx_interrupt,
490 .flags = SA_INTERRUPT, 490 .flags = IRQF_DISABLED,
491 .name = "RTLX", 491 .name = "RTLX",
492}; 492};
493 493
diff --git a/arch/mips/kernel/scall32-o32.S b/arch/mips/kernel/scall32-o32.S
index 6344be46ca8..8f8101f878c 100644
--- a/arch/mips/kernel/scall32-o32.S
+++ b/arch/mips/kernel/scall32-o32.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 2001 MIPS Technologies, Inc. 7 * Copyright (C) 2001 MIPS Technologies, Inc.
8 * Copyright (C) 2004 Thiemo Seufer 8 * Copyright (C) 2004 Thiemo Seufer
9 */ 9 */
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <asm/asm.h> 11#include <asm/asm.h>
13#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
diff --git a/arch/mips/kernel/scall64-64.S b/arch/mips/kernel/scall64-64.S
index 12d96c7d0bb..b4a34a625a2 100644
--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <asm/asm.h> 11#include <asm/asm.h>
13#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
diff --git a/arch/mips/kernel/scall64-n32.S b/arch/mips/kernel/scall64-n32.S
index 685698554a8..df8c4f8ccd6 100644
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <asm/asm.h> 11#include <asm/asm.h>
13#include <asm/asmmacro.h> 12#include <asm/asmmacro.h>
diff --git a/arch/mips/kernel/scall64-o32.S b/arch/mips/kernel/scall64-o32.S
index 0e632934cb7..f04fe4f085c 100644
--- a/arch/mips/kernel/scall64-o32.S
+++ b/arch/mips/kernel/scall64-o32.S
@@ -13,7 +13,6 @@
13 * to ABI64 calling convention. 64-bit syscalls are also processed 13 * to ABI64 calling convention. 64-bit syscalls are also processed
14 * here for now. 14 * here for now.
15 */ 15 */
16#include <linux/config.h>
17#include <linux/errno.h> 16#include <linux/errno.h>
18#include <asm/asm.h> 17#include <asm/asm.h>
19#include <asm/asmmacro.h> 18#include <asm/asmmacro.h>
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
index d3e08711502..5edd8d4bb66 100644
--- a/arch/mips/kernel/setup.c
+++ b/arch/mips/kernel/setup.c
@@ -10,7 +10,6 @@
10 * Copyright (C) 1999 Silicon Graphics, Inc. 10 * Copyright (C) 1999 Silicon Graphics, Inc.
11 * Copyright (C) 2000 2001, 2002 Maciej W. Rozycki 11 * Copyright (C) 2000 2001, 2002 Maciej W. Rozycki
12 */ 12 */
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/ioport.h> 15#include <linux/ioport.h>
diff --git a/arch/mips/kernel/signal-common.h b/arch/mips/kernel/signal-common.h
index ce6cb915c0a..b1f09d54ebe 100644
--- a/arch/mips/kernel/signal-common.h
+++ b/arch/mips/kernel/signal-common.h
@@ -8,7 +8,6 @@
8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9 */ 9 */
10 10
11#include <linux/config.h>
12 11
13static inline int 12static inline int
14setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc) 13setup_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc)
diff --git a/arch/mips/kernel/signal.c b/arch/mips/kernel/signal.c
index 402efd27c79..6b4d9be3161 100644
--- a/arch/mips/kernel/signal.c
+++ b/arch/mips/kernel/signal.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1994 - 2000 Ralf Baechle 7 * Copyright (C) 1994 - 2000 Ralf Baechle
8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/cache.h> 10#include <linux/cache.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
diff --git a/arch/mips/kernel/smp-mt.c b/arch/mips/kernel/smp-mt.c
index 57770902b9a..93429a4d301 100644
--- a/arch/mips/kernel/smp-mt.c
+++ b/arch/mips/kernel/smp-mt.c
@@ -130,13 +130,13 @@ irqreturn_t ipi_call_interrupt(int irq, void *dev_id, struct pt_regs *regs)
130 130
131static struct irqaction irq_resched = { 131static struct irqaction irq_resched = {
132 .handler = ipi_resched_interrupt, 132 .handler = ipi_resched_interrupt,
133 .flags = SA_INTERRUPT, 133 .flags = IRQF_DISABLED,
134 .name = "IPI_resched" 134 .name = "IPI_resched"
135}; 135};
136 136
137static struct irqaction irq_call = { 137static struct irqaction irq_call = {
138 .handler = ipi_call_interrupt, 138 .handler = ipi_call_interrupt,
139 .flags = SA_INTERRUPT, 139 .flags = IRQF_DISABLED,
140 .name = "IPI_call" 140 .name = "IPI_call"
141}; 141};
142 142
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c
index 70cf09afdf5..a48d9e55308 100644
--- a/arch/mips/kernel/smtc.c
+++ b/arch/mips/kernel/smtc.c
@@ -1002,7 +1002,7 @@ void setup_cross_vpe_interrupts(void)
1002 set_vi_handler(MIPS_CPU_IPI_IRQ, ipi_irq_dispatch); 1002 set_vi_handler(MIPS_CPU_IPI_IRQ, ipi_irq_dispatch);
1003 1003
1004 irq_ipi.handler = ipi_interrupt; 1004 irq_ipi.handler = ipi_interrupt;
1005 irq_ipi.flags = SA_INTERRUPT; 1005 irq_ipi.flags = IRQF_DISABLED;
1006 irq_ipi.name = "SMTC_IPI"; 1006 irq_ipi.name = "SMTC_IPI";
1007 1007
1008 setup_irq_smtc(cpu_ipi_irq, &irq_ipi, (0x100 << MIPS_CPU_IPI_IRQ)); 1008 setup_irq_smtc(cpu_ipi_irq, &irq_ipi, (0x100 << MIPS_CPU_IPI_IRQ));
diff --git a/arch/mips/kernel/syscall.c b/arch/mips/kernel/syscall.c
index 6da8c68e89d..0721314db65 100644
--- a/arch/mips/kernel/syscall.c
+++ b/arch/mips/kernel/syscall.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2001 MIPS Technologies, Inc. 8 * Copyright (C) 2001 MIPS Technologies, Inc.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/a.out.h> 10#include <linux/a.out.h>
12#include <linux/capability.h> 11#include <linux/capability.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c
index 13ff4da598c..2393c11d5a2 100644
--- a/arch/mips/kernel/time.c
+++ b/arch/mips/kernel/time.c
@@ -11,7 +11,6 @@
11 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
@@ -580,7 +579,7 @@ unsigned int mips_hpt_frequency;
580 579
581static struct irqaction timer_irqaction = { 580static struct irqaction timer_irqaction = {
582 .handler = timer_interrupt, 581 .handler = timer_interrupt,
583 .flags = SA_INTERRUPT, 582 .flags = IRQF_DISABLED,
584 .name = "timer", 583 .name = "timer",
585}; 584};
586 585
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index 67971938a2c..8b95eca9ac7 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -11,7 +11,6 @@
11 * Copyright (C) 2000, 01 MIPS Technologies, Inc. 11 * Copyright (C) 2000, 01 MIPS Technologies, Inc.
12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki 12 * Copyright (C) 2002, 2003, 2004, 2005 Maciej W. Rozycki
13 */ 13 */
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/module.h> 16#include <linux/module.h>
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c
index 5b5a3736cbb..7e7d5482348 100644
--- a/arch/mips/kernel/unaligned.c
+++ b/arch/mips/kernel/unaligned.c
@@ -72,7 +72,6 @@
72 * A store crossing a page boundary might be executed only partially. 72 * A store crossing a page boundary might be executed only partially.
73 * Undo the partial store in this case. 73 * Undo the partial store in this case.
74 */ 74 */
75#include <linux/config.h>
76#include <linux/mm.h> 75#include <linux/mm.h>
77#include <linux/module.h> 76#include <linux/module.h>
78#include <linux/signal.h> 77#include <linux/signal.h>
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S
index b84d1f9ce28..0bb9cd88945 100644
--- a/arch/mips/kernel/vmlinux.lds.S
+++ b/arch/mips/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <asm/asm-offsets.h> 1#include <asm/asm-offsets.h>
3#include <asm-generic/vmlinux.lds.h> 2#include <asm-generic/vmlinux.lds.h>
4 3
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c
index fc9b0e2a6be..d425120b028 100644
--- a/arch/mips/lasat/lasat_board.c
+++ b/arch/mips/lasat/lasat_board.c
@@ -17,7 +17,6 @@
17 * 17 *
18 * Routines specific to the LASAT boards 18 * Routines specific to the LASAT boards
19 */ 19 */
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/crc32.h> 21#include <linux/crc32.h>
23#include <asm/lasat/lasat.h> 22#include <asm/lasat/lasat.h>
diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c
index 181bf68175f..9e22acf0308 100644
--- a/arch/mips/lasat/reset.c
+++ b/arch/mips/lasat/reset.c
@@ -17,7 +17,6 @@
17 * 17 *
18 * Reset the LASAT board. 18 * Reset the LASAT board.
19 */ 19 */
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/pm.h> 21#include <linux/pm.h>
23 22
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c
index 3f64277429e..2187e63c6d8 100644
--- a/arch/mips/lasat/setup.c
+++ b/arch/mips/lasat/setup.c
@@ -22,7 +22,6 @@
22 * 22 *
23 * Lasat specific setup. 23 * Lasat specific setup.
24 */ 24 */
25#include <linux/config.h>
26#include <linux/init.h> 25#include <linux/init.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/pci.h> 27#include <linux/pci.h>
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c
index e3d5aaa90f0..6dd7ae1b7c2 100644
--- a/arch/mips/lasat/sysctl.c
+++ b/arch/mips/lasat/sysctl.c
@@ -20,7 +20,6 @@
20#include <linux/types.h> 20#include <linux/types.h>
21#include <asm/lasat/lasat.h> 21#include <asm/lasat/lasat.h>
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/sysctl.h> 24#include <linux/sysctl.h>
26#include <linux/stddef.h> 25#include <linux/stddef.h>
diff --git a/arch/mips/lib-32/dump_tlb.c b/arch/mips/lib-32/dump_tlb.c
index c49a925d016..6a68deb51aa 100644
--- a/arch/mips/lib-32/dump_tlb.c
+++ b/arch/mips/lib-32/dump_tlb.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle. 4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc. 5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */ 6 */
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
diff --git a/arch/mips/lib-64/dump_tlb.c b/arch/mips/lib-64/dump_tlb.c
index 11a5f015f04..be8261be679 100644
--- a/arch/mips/lib-64/dump_tlb.c
+++ b/arch/mips/lib-64/dump_tlb.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle. 4 * Copyright (C) 1994, 1995 by Waldorf Electronics, written by Ralf Baechle.
5 * Copyright (C) 1999 by Silicon Graphics, Inc. 5 * Copyright (C) 1999 by Silicon Graphics, Inc.
6 */ 6 */
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S
index 7f9aafa4d80..a526c62cb76 100644
--- a/arch/mips/lib/memcpy.S
+++ b/arch/mips/lib/memcpy.S
@@ -12,7 +12,6 @@
12 * 12 *
13 * Mnemonic names for arguments to memcpy/__copy_user 13 * Mnemonic names for arguments to memcpy/__copy_user
14 */ 14 */
15#include <linux/config.h>
16 15
17/* 16/*
18 * Hack to resolve longstanding prefetch issue 17 * Hack to resolve longstanding prefetch issue
diff --git a/arch/mips/math-emu/kernel_linkage.c b/arch/mips/math-emu/kernel_linkage.c
index 56ca0c6a717..5b3390f6491 100644
--- a/arch/mips/math-emu/kernel_linkage.c
+++ b/arch/mips/math-emu/kernel_linkage.c
@@ -19,7 +19,6 @@
19 * manipulation primitives for the Algorithmics MIPS 19 * manipulation primitives for the Algorithmics MIPS
20 * FPU Emulator 20 * FPU Emulator
21 */ 21 */
22#include <linux/config.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
24#include <asm/processor.h> 23#include <asm/processor.h>
25#include <asm/signal.h> 24#include <asm/signal.h>
diff --git a/arch/mips/mips-boards/atlas/atlas_setup.c b/arch/mips/mips-boards/atlas/atlas_setup.c
index 8cc9effcb83..3a7c3d28aa0 100644
--- a/arch/mips/mips-boards/atlas/atlas_setup.c
+++ b/arch/mips/mips-boards/atlas/atlas_setup.c
@@ -15,7 +15,6 @@
15 * with this program; if not, write to the Free Software Foundation, Inc., 15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/interrupt.h> 19#include <linux/interrupt.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c
index df4e9473560..58a0fe88359 100644
--- a/arch/mips/mips-boards/generic/init.c
+++ b/arch/mips/mips-boards/generic/init.c
@@ -19,7 +19,6 @@
19 * 19 *
20 * PROM library initialisation code. 20 * PROM library initialisation code.
21 */ 21 */
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/string.h> 23#include <linux/string.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
diff --git a/arch/mips/mips-boards/generic/memory.c b/arch/mips/mips-boards/generic/memory.c
index fd492562584..c89fcf9e9c2 100644
--- a/arch/mips/mips-boards/generic/memory.c
+++ b/arch/mips/mips-boards/generic/memory.c
@@ -18,7 +18,6 @@
18 * PROM library functions for acquiring/using memory descriptors given to 18 * PROM library functions for acquiring/using memory descriptors given to
19 * us from the YAMON. 19 * us from the YAMON.
20 */ 20 */
21#include <linux/config.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/mm.h> 22#include <linux/mm.h>
24#include <linux/bootmem.h> 23#include <linux/bootmem.h>
diff --git a/arch/mips/mips-boards/generic/printf.c b/arch/mips/mips-boards/generic/printf.c
index 2c1ab1f19fd..1a711bd79b5 100644
--- a/arch/mips/mips-boards/generic/printf.c
+++ b/arch/mips/mips-boards/generic/printf.c
@@ -17,7 +17,6 @@
17 * 17 *
18 * Putting things on the screen/serial line using YAMONs facilities. 18 * Putting things on the screen/serial line using YAMONs facilities.
19 */ 19 */
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/serial_reg.h> 22#include <linux/serial_reg.h>
diff --git a/arch/mips/mips-boards/generic/reset.c b/arch/mips/mips-boards/generic/reset.c
index 7213c395fb6..0996ba368b2 100644
--- a/arch/mips/mips-boards/generic/reset.c
+++ b/arch/mips/mips-boards/generic/reset.c
@@ -22,7 +22,6 @@
22 * Reset the MIPS boards. 22 * Reset the MIPS boards.
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/pm.h> 25#include <linux/pm.h>
27 26
28#include <asm/io.h> 27#include <asm/io.h>
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c
index a9f6124b3a2..5e207760826 100644
--- a/arch/mips/mips-boards/generic/time.c
+++ b/arch/mips/mips-boards/generic/time.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/kernel_stat.h> 23#include <linux/kernel_stat.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c
index 0766e434b6b..bc4ac6f0187 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -15,7 +15,6 @@
15 * with this program; if not, write to the Free Software Foundation, Inc., 15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 16 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/ioport.h> 20#include <linux/ioport.h>
diff --git a/arch/mips/mips-boards/sead/sead_setup.c b/arch/mips/mips-boards/sead/sead_setup.c
index 6430f11f3a9..a856bd66487 100644
--- a/arch/mips/mips-boards/sead/sead_setup.c
+++ b/arch/mips/mips-boards/sead/sead_setup.c
@@ -17,7 +17,6 @@
17 * 17 *
18 * SEAD specific setup. 18 * SEAD specific setup.
19 */ 19 */
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
23#include <linux/ioport.h> 22#include <linux/ioport.h>
diff --git a/arch/mips/mips-boards/sim/sim_IRQ.c b/arch/mips/mips-boards/sim/sim_IRQ.c
index 5b84c7fe102..ec549f3e201 100644
--- a/arch/mips/mips-boards/sim/sim_IRQ.c
+++ b/arch/mips/mips-boards/sim/sim_IRQ.c
@@ -17,7 +17,6 @@
17 * 17 *
18 * Interrupt exception dispatch code. 18 * Interrupt exception dispatch code.
19 */ 19 */
20#include <linux/config.h>
21 20
22#include <asm/asm.h> 21#include <asm/asm.h>
23#include <asm/mipsregs.h> 22#include <asm/mipsregs.h>
diff --git a/arch/mips/mips-boards/sim/sim_irq.S b/arch/mips/mips-boards/sim/sim_irq.S
index d16cf382207..b7444e74a6a 100644
--- a/arch/mips/mips-boards/sim/sim_irq.S
+++ b/arch/mips/mips-boards/sim/sim_irq.S
@@ -17,7 +17,6 @@
17 * Interrupt exception dispatch code. 17 * Interrupt exception dispatch code.
18 * 18 *
19 */ 19 */
20#include <linux/config.h>
21 20
22#include <asm/asm.h> 21#include <asm/asm.h>
23#include <asm/mipsregs.h> 22#include <asm/mipsregs.h>
diff --git a/arch/mips/mips-boards/sim/sim_setup.c b/arch/mips/mips-boards/sim/sim_setup.c
index 15a5dac4ae1..3d4a785b565 100644
--- a/arch/mips/mips-boards/sim/sim_setup.c
+++ b/arch/mips/mips-boards/sim/sim_setup.c
@@ -16,7 +16,6 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/arch/mips/mips-boards/sim/sim_smp.c b/arch/mips/mips-boards/sim/sim_smp.c
index 004070956cc..cb47863ecf1 100644
--- a/arch/mips/mips-boards/sim/sim_smp.c
+++ b/arch/mips/mips-boards/sim/sim_smp.c
@@ -18,7 +18,6 @@
18/* 18/*
19 * Simulator Platform-specific hooks for SMP operation 19 * Simulator Platform-specific hooks for SMP operation
20 */ 20 */
21#include <linux/config.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
24#include <linux/cpumask.h> 23#include <linux/cpumask.h>
diff --git a/arch/mips/mips-boards/sim/sim_time.c b/arch/mips/mips-boards/sim/sim_time.c
index 18b968c696d..e7f6003357f 100644
--- a/arch/mips/mips-boards/sim/sim_time.c
+++ b/arch/mips/mips-boards/sim/sim_time.c
@@ -1,5 +1,4 @@
1#include <linux/types.h> 1#include <linux/types.h>
2#include <linux/config.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include <linux/kernel_stat.h> 3#include <linux/kernel_stat.h>
5#include <linux/sched.h> 4#include <linux/sched.h>
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c
index 75d887e8973..857b726f4d4 100644
--- a/arch/mips/mm/c-r4k.c
+++ b/arch/mips/mm/c-r4k.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org) 7 * Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Ralf Baechle (ralf@gnu.org)
8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 8 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c
index f9b129491b1..2d71efb82ac 100644
--- a/arch/mips/mm/c-sb1.c
+++ b/arch/mips/mm/c-sb1.c
@@ -18,7 +18,6 @@
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 */ 20 */
21#include <linux/config.h>
22#include <linux/init.h> 21#include <linux/init.h>
23 22
24#include <asm/asm.h> 23#include <asm/asm.h>
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 83a56296be8..ddd3a2de1d7 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * Copyright (C) 1994 - 2003 by Ralf Baechle 6 * Copyright (C) 1994 - 2003 by Ralf Baechle
7 */ 7 */
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/module.h> 10#include <linux/module.h>
diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c
index 1cf3c6006cc..e19fbb9ee47 100644
--- a/arch/mips/mm/cerr-sb1.c
+++ b/arch/mips/mm/cerr-sb1.c
@@ -15,7 +15,6 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <asm/mipsregs.h> 19#include <asm/mipsregs.h>
21#include <asm/sibyte/sb1250.h> 20#include <asm/sibyte/sb1250.h>
diff --git a/arch/mips/mm/dma-coherent.c b/arch/mips/mm/dma-coherent.c
index f6b3c722230..7fa5fd16e46 100644
--- a/arch/mips/mm/dma-coherent.c
+++ b/arch/mips/mm/dma-coherent.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org> 7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org>
8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. 8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/dma-mapping.h> 11#include <linux/dma-mapping.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c
index cd4ea8474f8..2eeffe5c2a3 100644
--- a/arch/mips/mm/dma-noncoherent.c
+++ b/arch/mips/mm/dma-noncoherent.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org> 7 * Copyright (C) 2000, 2001 Ralf Baechle <ralf@gnu.org>
8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf. 8 * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
13#include <linux/module.h> 12#include <linux/module.h>
diff --git a/arch/mips/mm/highmem.c b/arch/mips/mm/highmem.c
index 0c544375b85..99ebf3ccc22 100644
--- a/arch/mips/mm/highmem.c
+++ b/arch/mips/mm/highmem.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/highmem.h> 2#include <linux/highmem.h>
4#include <asm/tlbflush.h> 3#include <asm/tlbflush.h>
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index 33f6e1cdfd5..802bdd32aa2 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -8,7 +8,6 @@
8 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com 8 * Kevin D. Kissell, kevink@mips.com and Carsten Langgaard, carstenl@mips.com
9 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. 9 * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/signal.h> 13#include <linux/signal.h>
diff --git a/arch/mips/mm/pg-sb1.c b/arch/mips/mm/pg-sb1.c
index 148c65b9cd8..fc3c7878fb4 100644
--- a/arch/mips/mm/pg-sb1.c
+++ b/arch/mips/mm/pg-sb1.c
@@ -22,7 +22,6 @@
22 * along with this program; if not, write to the Free Software 22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/smp.h> 27#include <linux/smp.h>
diff --git a/arch/mips/mm/pgtable-32.c b/arch/mips/mm/pgtable-32.c
index 4a3c4919e31..4bdaa05f485 100644
--- a/arch/mips/mm/pgtable-32.c
+++ b/arch/mips/mm/pgtable-32.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * Copyright (C) 2003 by Ralf Baechle 6 * Copyright (C) 2003 by Ralf Baechle
7 */ 7 */
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/bootmem.h> 10#include <linux/bootmem.h>
diff --git a/arch/mips/mm/pgtable.c b/arch/mips/mm/pgtable.c
index 3fe94202da8..792c6eb4423 100644
--- a/arch/mips/mm/pgtable.c
+++ b/arch/mips/mm/pgtable.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/mm.h> 2#include <linux/mm.h>
4#include <linux/swap.h> 3#include <linux/swap.h>
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c
index 965cb4c4359..2cde1b77244 100644
--- a/arch/mips/mm/tlb-r4k.c
+++ b/arch/mips/mm/tlb-r4k.c
@@ -8,7 +8,6 @@
8 * Carsten Langgaard, carstenl@mips.com 8 * Carsten Langgaard, carstenl@mips.com
9 * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved. 9 * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/mips/mm/tlb-r8k.c b/arch/mips/mm/tlb-r8k.c
index 1bfb09198ce..266a47d65ee 100644
--- a/arch/mips/mm/tlb-r8k.c
+++ b/arch/mips/mm/tlb-r8k.c
@@ -8,7 +8,6 @@
8 * Carsten Langgaard, carstenl@mips.com 8 * Carsten Langgaard, carstenl@mips.com
9 * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved. 9 * Copyright (C) 2002 MIPS Technologies, Inc. All rights reserved.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c
index 54507be2ab5..e1a8139fc8f 100644
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -21,7 +21,6 @@
21 21
22#include <stdarg.h> 22#include <stdarg.h>
23 23
24#include <linux/config.h>
25#include <linux/mm.h> 24#include <linux/mm.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/types.h> 26#include <linux/types.h>
diff --git a/arch/mips/momentum/jaguar_atx/dbg_io.c b/arch/mips/momentum/jaguar_atx/dbg_io.c
index d7dea0a136a..b85a6521f72 100644
--- a/arch/mips/momentum/jaguar_atx/dbg_io.c
+++ b/arch/mips/momentum/jaguar_atx/dbg_io.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#if defined(CONFIG_REMOTE_DEBUG) 2#if defined(CONFIG_REMOTE_DEBUG)
4 3
diff --git a/arch/mips/momentum/jaguar_atx/irq.c b/arch/mips/momentum/jaguar_atx/irq.c
index ec4032b38f1..f9067469a65 100644
--- a/arch/mips/momentum/jaguar_atx/irq.c
+++ b/arch/mips/momentum/jaguar_atx/irq.c
@@ -71,7 +71,7 @@ asmlinkage void plat_irq_dispatch(struct pt_regs *regs)
71} 71}
72 72
73static struct irqaction cascade_mv64340 = { 73static struct irqaction cascade_mv64340 = {
74 no_action, SA_INTERRUPT, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL 74 no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL
75}; 75};
76 76
77void __init arch_init_irq(void) 77void __init arch_init_irq(void)
diff --git a/arch/mips/momentum/jaguar_atx/prom.c b/arch/mips/momentum/jaguar_atx/prom.c
index 1cadaa92946..3d271292929 100644
--- a/arch/mips/momentum/jaguar_atx/prom.c
+++ b/arch/mips/momentum/jaguar_atx/prom.c
@@ -16,7 +16,6 @@
16 * 16 *
17 * Added changes for SMP - Manish Lachwani (lachwani@pmc-sierra.com) 17 * Added changes for SMP - Manish Lachwani (lachwani@pmc-sierra.com)
18 */ 18 */
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/mm.h> 20#include <linux/mm.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
diff --git a/arch/mips/momentum/jaguar_atx/reset.c b/arch/mips/momentum/jaguar_atx/reset.c
index ce9fb2e3d95..c73b0897dc5 100644
--- a/arch/mips/momentum/jaguar_atx/reset.c
+++ b/arch/mips/momentum/jaguar_atx/reset.c
@@ -14,7 +14,6 @@
14 * Louis Hamilton, Red Hat, Inc. 14 * Louis Hamilton, Red Hat, Inc.
15 * hamilton@redhat.com [MIPS64 modifications] 15 * hamilton@redhat.com [MIPS64 modifications]
16 */ 16 */
17#include <linux/config.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
20#include <asm/io.h> 19#include <asm/io.h>
diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c
index d0419480b09..b08e6a0456c 100644
--- a/arch/mips/momentum/jaguar_atx/setup.c
+++ b/arch/mips/momentum/jaguar_atx/setup.c
@@ -39,7 +39,6 @@
39 * with this program; if not, write to the Free Software Foundation, Inc., 39 * with this program; if not, write to the Free Software Foundation, Inc.,
40 * 675 Mass Ave, Cambridge, MA 02139, USA. 40 * 675 Mass Ave, Cambridge, MA 02139, USA.
41 */ 41 */
42#include <linux/config.h>
43#include <linux/bcd.h> 42#include <linux/bcd.h>
44#include <linux/init.h> 43#include <linux/init.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
diff --git a/arch/mips/momentum/ocelot_3/irq.c b/arch/mips/momentum/ocelot_3/irq.c
index 87c63c340ae..793782a9c19 100644
--- a/arch/mips/momentum/ocelot_3/irq.c
+++ b/arch/mips/momentum/ocelot_3/irq.c
@@ -54,7 +54,7 @@
54#include <asm/system.h> 54#include <asm/system.h>
55 55
56static struct irqaction cascade_mv64340 = { 56static struct irqaction cascade_mv64340 = {
57 no_action, SA_INTERRUPT, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL 57 no_action, IRQF_DISABLED, CPU_MASK_NONE, "MV64340-Cascade", NULL, NULL
58}; 58};
59 59
60void __init arch_init_irq(void) 60void __init arch_init_irq(void)
diff --git a/arch/mips/momentum/ocelot_3/prom.c b/arch/mips/momentum/ocelot_3/prom.c
index 9803daa2a79..296d945bc24 100644
--- a/arch/mips/momentum/ocelot_3/prom.c
+++ b/arch/mips/momentum/ocelot_3/prom.c
@@ -21,7 +21,6 @@
21 * Author: Manish Lachwani, mlachwani@mvista.com 21 * Author: Manish Lachwani, mlachwani@mvista.com
22 * 22 *
23 */ 23 */
24#include <linux/config.h>
25#include <linux/init.h> 24#include <linux/init.h>
26#include <linux/bootmem.h> 25#include <linux/bootmem.h>
27#include <linux/mv643xx.h> 26#include <linux/mv643xx.h>
diff --git a/arch/mips/momentum/ocelot_c/dbg_io.c b/arch/mips/momentum/ocelot_c/dbg_io.c
index f0a6a38fcf4..2128684584f 100644
--- a/arch/mips/momentum/ocelot_c/dbg_io.c
+++ b/arch/mips/momentum/ocelot_c/dbg_io.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#ifdef CONFIG_KGDB 2#ifdef CONFIG_KGDB
4 3
diff --git a/arch/mips/momentum/ocelot_c/irq.c b/arch/mips/momentum/ocelot_c/irq.c
index 86f61ce59e5..9d44ae1e156 100644
--- a/arch/mips/momentum/ocelot_c/irq.c
+++ b/arch/mips/momentum/ocelot_c/irq.c
@@ -52,11 +52,11 @@ extern void uart_irq_init(void);
52extern void cpci_irq_init(void); 52extern void cpci_irq_init(void);
53 53
54static struct irqaction cascade_fpga = { 54static struct irqaction cascade_fpga = {
55 no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL 55 no_action, IRQF_DISABLED, CPU_MASK_NONE, "cascade via FPGA", NULL, NULL
56}; 56};
57 57
58static struct irqaction cascade_mv64340 = { 58static struct irqaction cascade_mv64340 = {
59 no_action, SA_INTERRUPT, 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(struct pt_regs *regs);
diff --git a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h b/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
index 97fb77dad72..7228cd19e5e 100644
--- a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
+++ b/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h
@@ -30,7 +30,6 @@
30#ifndef __OCELOT_C_FPGA_H__ 30#ifndef __OCELOT_C_FPGA_H__
31#define __OCELOT_C_FPGA_H__ 31#define __OCELOT_C_FPGA_H__
32 32
33#include <linux/config.h>
34 33
35#ifdef CONFIG_64BIT 34#ifdef CONFIG_64BIT
36#define OCELOT_C_CS0_ADDR (0xfffffffffc000000) 35#define OCELOT_C_CS0_ADDR (0xfffffffffc000000)
diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c
index e92364482c7..4c50a147f42 100644
--- a/arch/mips/momentum/ocelot_c/prom.c
+++ b/arch/mips/momentum/ocelot_c/prom.c
@@ -14,7 +14,6 @@
14 * Free Software Foundation; either version 2 of the License, or (at your 14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. 15 * option) any later version.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
diff --git a/arch/mips/momentum/ocelot_c/reset.c b/arch/mips/momentum/ocelot_c/reset.c
index 9dcd154c776..3fdcb64ff1e 100644
--- a/arch/mips/momentum/ocelot_c/reset.c
+++ b/arch/mips/momentum/ocelot_c/reset.c
@@ -14,7 +14,6 @@
14 * Louis Hamilton, Red Hat, Inc. 14 * Louis Hamilton, Red Hat, Inc.
15 * hamilton@redhat.com [MIPS64 modifications] 15 * hamilton@redhat.com [MIPS64 modifications]
16 */ 16 */
17#include <linux/config.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
20#include <asm/io.h> 19#include <asm/io.h>
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c
index a0ee006d75c..6a4519936ee 100644
--- a/arch/mips/momentum/ocelot_c/setup.c
+++ b/arch/mips/momentum/ocelot_c/setup.c
@@ -40,7 +40,6 @@
40 * 675 Mass Ave, Cambridge, MA 02139, USA. 40 * 675 Mass Ave, Cambridge, MA 02139, USA.
41 * 41 *
42 */ 42 */
43#include <linux/config.h>
44#include <linux/bcd.h> 43#include <linux/bcd.h>
45#include <linux/init.h> 44#include <linux/init.h>
46#include <linux/kernel.h> 45#include <linux/kernel.h>
diff --git a/arch/mips/momentum/ocelot_g/dbg_io.c b/arch/mips/momentum/ocelot_g/dbg_io.c
index f0a6a38fcf4..2128684584f 100644
--- a/arch/mips/momentum/ocelot_g/dbg_io.c
+++ b/arch/mips/momentum/ocelot_g/dbg_io.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#ifdef CONFIG_KGDB 2#ifdef CONFIG_KGDB
4 3
diff --git a/arch/mips/momentum/ocelot_g/gt-irq.c b/arch/mips/momentum/ocelot_g/gt-irq.c
index 8bd9b844fa9..9fb2493fff0 100644
--- a/arch/mips/momentum/ocelot_g/gt-irq.c
+++ b/arch/mips/momentum/ocelot_g/gt-irq.c
@@ -11,7 +11,6 @@
11 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/interrupt.h> 15#include <linux/interrupt.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
@@ -174,7 +173,7 @@ void gt64240_time_init(void)
174 * the values to the correct interrupt line. 173 * the values to the correct interrupt line.
175 */ 174 */
176 timer.handler = &gt64240_p0int_irq; 175 timer.handler = &gt64240_p0int_irq;
177 timer.flags = SA_SHIRQ | SA_INTERRUPT; 176 timer.flags = IRQF_SHARED | IRQF_DISABLED;
178 timer.name = "timer"; 177 timer.name = "timer";
179 timer.dev_id = NULL; 178 timer.dev_id = NULL;
180 timer.next = NULL; 179 timer.next = NULL;
diff --git a/arch/mips/momentum/ocelot_g/prom.c b/arch/mips/momentum/ocelot_g/prom.c
index 6b4f577c275..6509a9c9863 100644
--- a/arch/mips/momentum/ocelot_g/prom.c
+++ b/arch/mips/momentum/ocelot_g/prom.c
@@ -11,7 +11,6 @@
11 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
diff --git a/arch/mips/momentum/ocelot_g/setup.c b/arch/mips/momentum/ocelot_g/setup.c
index 39da02b4e07..c580b1de33b 100644
--- a/arch/mips/momentum/ocelot_g/setup.c
+++ b/arch/mips/momentum/ocelot_g/setup.c
@@ -37,7 +37,6 @@
37 * 675 Mass Ave, Cambridge, MA 02139, USA. 37 * 675 Mass Ave, Cambridge, MA 02139, USA.
38 * 38 *
39 */ 39 */
40#include <linux/config.h>
41#include <linux/init.h> 40#include <linux/init.h>
42#include <linux/kernel.h> 41#include <linux/kernel.h>
43#include <linux/types.h> 42#include <linux/types.h>
diff --git a/arch/mips/pci/fixup-atlas.c b/arch/mips/pci/fixup-atlas.c
index 87920b24593..439510af303 100644
--- a/arch/mips/pci/fixup-atlas.c
+++ b/arch/mips/pci/fixup-atlas.c
@@ -16,7 +16,6 @@
16 * with this program; if not, write to the Free Software Foundation, Inc., 16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 17 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
18 */ 18 */
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/pci.h> 20#include <linux/pci.h>
22 21
diff --git a/arch/mips/pci/fixup-vr4133.c b/arch/mips/pci/fixup-vr4133.c
index a8a47b494b2..8e01d0c1b76 100644
--- a/arch/mips/pci/fixup-vr4133.c
+++ b/arch/mips/pci/fixup-vr4133.c
@@ -15,7 +15,6 @@
15 * Author: Manish Lachwani (mlachwani@mvista.com) 15 * Author: Manish Lachwani (mlachwani@mvista.com)
16 * 16 *
17 */ 17 */
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/pci.h> 19#include <linux/pci.h>
21 20
diff --git a/arch/mips/pci/ops-au1000.c b/arch/mips/pci/ops-au1000.c
index be1420126c4..0c0c1e6519f 100644
--- a/arch/mips/pci/ops-au1000.c
+++ b/arch/mips/pci/ops-au1000.c
@@ -28,7 +28,6 @@
28 * with this program; if not, write to the Free Software Foundation, Inc., 28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 675 Mass Ave, Cambridge, MA 02139, USA. 29 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 */ 30 */
31#include <linux/config.h>
32#include <linux/types.h> 31#include <linux/types.h>
33#include <linux/pci.h> 32#include <linux/pci.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c
index f4ef1a35ca1..f6774f54cd3 100644
--- a/arch/mips/pci/pci-bcm1480.c
+++ b/arch/mips/pci/pci-bcm1480.c
@@ -32,7 +32,6 @@
32 * 32 *
33 * XXX: AT THIS TIME, ONLY the NATIVE PCI-X INTERFACE IS SUPPORTED. 33 * XXX: AT THIS TIME, ONLY the NATIVE PCI-X INTERFACE IS SUPPORTED.
34 */ 34 */
35#include <linux/config.h>
36#include <linux/types.h> 35#include <linux/types.h>
37#include <linux/pci.h> 36#include <linux/pci.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
diff --git a/arch/mips/pci/pci-bcm1480ht.c b/arch/mips/pci/pci-bcm1480ht.c
index a3eebe5890a..ba2e34b0923 100644
--- a/arch/mips/pci/pci-bcm1480ht.c
+++ b/arch/mips/pci/pci-bcm1480ht.c
@@ -31,7 +31,6 @@
31 * problem. 31 * problem.
32 * 32 *
33 */ 33 */
34#include <linux/config.h>
35#include <linux/types.h> 34#include <linux/types.h>
36#include <linux/pci.h> 35#include <linux/pci.h>
37#include <linux/kernel.h> 36#include <linux/kernel.h>
diff --git a/arch/mips/pci/pci-ip32.c b/arch/mips/pci/pci-ip32.c
index 180af89bcb1..17c7932cf0a 100644
--- a/arch/mips/pci/pci-ip32.c
+++ b/arch/mips/pci/pci-ip32.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 2000, 2001 Keith M Wesolowski 6 * Copyright (C) 2000, 2001 Keith M Wesolowski
7 * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) 7 * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/interrupt.h> 11#include <linux/interrupt.h>
diff --git a/arch/mips/pci/pci-sb1250.c b/arch/mips/pci/pci-sb1250.c
index 7cca3bde59b..80f5e8c4bcd 100644
--- a/arch/mips/pci/pci-sb1250.c
+++ b/arch/mips/pci/pci-sb1250.c
@@ -30,7 +30,6 @@
30 * kernel mapped memory. Hopefully neither of these should be a huge 30 * kernel mapped memory. Hopefully neither of these should be a huge
31 * problem. 31 * problem.
32 */ 32 */
33#include <linux/config.h>
34#include <linux/types.h> 33#include <linux/types.h>
35#include <linux/pci.h> 34#include <linux/pci.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index ba66f8c9bd4..5ace368657a 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org) 7 * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/mm.h> 10#include <linux/mm.h>
12#include <linux/bootmem.h> 11#include <linux/bootmem.h>
diff --git a/arch/mips/philips/pnx8550/common/int.c b/arch/mips/philips/pnx8550/common/int.c
index 8f18764a235..8aca317d462 100644
--- a/arch/mips/philips/pnx8550/common/int.c
+++ b/arch/mips/philips/pnx8550/common/int.c
@@ -23,7 +23,6 @@
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/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/irq.h> 27#include <linux/irq.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
@@ -220,13 +219,13 @@ static struct hw_interrupt_type level_irq_type = {
220 219
221static struct irqaction gic_action = { 220static struct irqaction gic_action = {
222 .handler = no_action, 221 .handler = no_action,
223 .flags = SA_INTERRUPT, 222 .flags = IRQF_DISABLED,
224 .name = "GIC", 223 .name = "GIC",
225}; 224};
226 225
227static struct irqaction timer_action = { 226static struct irqaction timer_action = {
228 .handler = no_action, 227 .handler = no_action,
229 .flags = SA_INTERRUPT, 228 .flags = IRQF_DISABLED,
230 .name = "Timer", 229 .name = "Timer",
231}; 230};
232 231
diff --git a/arch/mips/philips/pnx8550/common/setup.c b/arch/mips/philips/pnx8550/common/setup.c
index 0e791f4f6ea..8ac81a9dc29 100644
--- a/arch/mips/philips/pnx8550/common/setup.c
+++ b/arch/mips/philips/pnx8550/common/setup.c
@@ -17,7 +17,6 @@
17 * with this program; if not, write to the Free Software Foundation, Inc., 17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 18 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
19 */ 19 */
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
23#include <linux/ioport.h> 22#include <linux/ioport.h>
diff --git a/arch/mips/pmc-sierra/yosemite/ht.c b/arch/mips/pmc-sierra/yosemite/ht.c
index fb523ebcafa..1f7c999eb7c 100644
--- a/arch/mips/pmc-sierra/yosemite/ht.c
+++ b/arch/mips/pmc-sierra/yosemite/ht.c
@@ -23,7 +23,6 @@
23 * 675 Mass Ave, Cambridge, MA 02139, USA. 23 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/types.h> 26#include <linux/types.h>
28#include <linux/pci.h> 27#include <linux/pci.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
diff --git a/arch/mips/pmc-sierra/yosemite/irq.c b/arch/mips/pmc-sierra/yosemite/irq.c
index a1f524fc4c1..b91d0aa3b7e 100644
--- a/arch/mips/pmc-sierra/yosemite/irq.c
+++ b/arch/mips/pmc-sierra/yosemite/irq.c
@@ -26,7 +26,6 @@
26 * 26 *
27 * Second level Interrupt handlers for the PMC-Sierra Titan/Yosemite board 27 * Second level Interrupt handlers for the PMC-Sierra Titan/Yosemite board
28 */ 28 */
29#include <linux/config.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/kernel_stat.h> 31#include <linux/kernel_stat.h>
diff --git a/arch/mips/pmc-sierra/yosemite/prom.c b/arch/mips/pmc-sierra/yosemite/prom.c
index 165275c00cb..9fe4973377c 100644
--- a/arch/mips/pmc-sierra/yosemite/prom.c
+++ b/arch/mips/pmc-sierra/yosemite/prom.c
@@ -8,7 +8,6 @@
8 * Author: Manish Lachwani (lachwani@pmc-sierra.com) 8 * Author: Manish Lachwani (lachwani@pmc-sierra.com)
9 * Copyright (C) 2004 Ralf Baechle 9 * Copyright (C) 2004 Ralf Baechle
10 */ 10 */
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c
index 989167b49ce..ce8e4a7869b 100644
--- a/arch/mips/sgi-ip22/ip22-eisa.c
+++ b/arch/mips/sgi-ip22/ip22-eisa.c
@@ -19,7 +19,6 @@
19 * - Fix more bugs. 19 * - Fix more bugs.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/eisa.h> 22#include <linux/eisa.h>
24#include <linux/types.h> 23#include <linux/types.h>
25#include <linux/init.h> 24#include <linux/init.h>
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c
index 18906af6969..2d8762818d9 100644
--- a/arch/mips/sgi-ip22/ip22-int.c
+++ b/arch/mips/sgi-ip22/ip22-int.c
@@ -9,7 +9,6 @@
9 * - Interrupt handling fixes 9 * - Interrupt handling fixes
10 * Copyright (C) 2001, 2003 Ladislav Michl (ladis@linux-mips.org) 10 * Copyright (C) 2001, 2003 Ladislav Michl (ladis@linux-mips.org)
11 */ 11 */
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
@@ -273,32 +272,32 @@ static void indy_buserror_irq(struct pt_regs *regs)
273 272
274static struct irqaction local0_cascade = { 273static struct irqaction local0_cascade = {
275 .handler = no_action, 274 .handler = no_action,
276 .flags = SA_INTERRUPT, 275 .flags = IRQF_DISABLED,
277 .name = "local0 cascade", 276 .name = "local0 cascade",
278}; 277};
279 278
280static struct irqaction local1_cascade = { 279static struct irqaction local1_cascade = {
281 .handler = no_action, 280 .handler = no_action,
282 .flags = SA_INTERRUPT, 281 .flags = IRQF_DISABLED,
283 .name = "local1 cascade", 282 .name = "local1 cascade",
284}; 283};
285 284
286static struct irqaction buserr = { 285static struct irqaction buserr = {
287 .handler = no_action, 286 .handler = no_action,
288 .flags = SA_INTERRUPT, 287 .flags = IRQF_DISABLED,
289 .name = "Bus Error", 288 .name = "Bus Error",
290}; 289};
291 290
292static struct irqaction map0_cascade = { 291static struct irqaction map0_cascade = {
293 .handler = no_action, 292 .handler = no_action,
294 .flags = SA_INTERRUPT, 293 .flags = IRQF_DISABLED,
295 .name = "mapable0 cascade", 294 .name = "mapable0 cascade",
296}; 295};
297 296
298#ifdef USE_LIO3_IRQ 297#ifdef USE_LIO3_IRQ
299static struct irqaction map1_cascade = { 298static struct irqaction map1_cascade = {
300 .handler = no_action, 299 .handler = no_action,
301 .flags = SA_INTERRUPT, 300 .flags = IRQF_DISABLED,
302 .name = "mapable1 cascade", 301 .name = "mapable1 cascade",
303}; 302};
304#define SGI_INTERRUPTS SGINT_END 303#define SGI_INTERRUPTS SGINT_END
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c
index d7138906eb1..25097ecc9ba 100644
--- a/arch/mips/sgi-ip22/ip22-setup.c
+++ b/arch/mips/sgi-ip22/ip22-setup.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com) 4 * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
5 * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org) 5 * Copyright (C) 1997, 1998 Ralf Baechle (ralf@gnu.org)
6 */ 6 */
7#include <linux/config.h>
8#include <linux/ds1286.h> 7#include <linux/ds1286.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c
index a6b490e9970..9094baf31d0 100644
--- a/arch/mips/sgi-ip27/ip27-init.c
+++ b/arch/mips/sgi-ip27/ip27-init.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com) 6 * Copyright (C) 2000 - 2001 by Kanoj Sarcar (kanoj@sgi.com)
7 * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc. 7 * Copyright (C) 2000 - 2001 by Silicon Graphics, Inc.
8 */ 8 */
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/mips/sgi-ip27/ip27-irq.c b/arch/mips/sgi-ip27/ip27-irq.c
index 869566c360a..597ec73359b 100644
--- a/arch/mips/sgi-ip27/ip27-irq.c
+++ b/arch/mips/sgi-ip27/ip27-irq.c
@@ -8,7 +8,6 @@
8 8
9#undef DEBUG 9#undef DEBUG
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/irq.h> 12#include <linux/irq.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
@@ -119,7 +118,7 @@ static int ms1bit(unsigned long x)
119} 118}
120 119
121/* 120/*
122 * This code is unnecessarily complex, because we do SA_INTERRUPT 121 * This code is unnecessarily complex, because we do IRQF_DISABLED
123 * intr enabling. Basically, once we grab the set of intrs we need 122 * intr enabling. Basically, once we grab the set of intrs we need
124 * to service, we must mask _all_ these interrupts; firstly, to make 123 * to service, we must mask _all_ these interrupts; firstly, to make
125 * sure the same intr does not intr again, causing recursion that 124 * sure the same intr does not intr again, causing recursion that
diff --git a/arch/mips/sgi-ip27/ip27-klnuma.c b/arch/mips/sgi-ip27/ip27-klnuma.c
index 41c3f405e00..d777b7d1a9f 100644
--- a/arch/mips/sgi-ip27/ip27-klnuma.c
+++ b/arch/mips/sgi-ip27/ip27-klnuma.c
@@ -3,7 +3,6 @@
3 * Copyright 2000 - 2001 Silicon Graphics, Inc. 3 * Copyright 2000 - 2001 Silicon Graphics, Inc.
4 * Copyright 2000 - 2001 Kanoj Sarcar (kanoj@sgi.com) 4 * Copyright 2000 - 2001 Kanoj Sarcar (kanoj@sgi.com)
5 */ 5 */
6#include <linux/config.h>
7#include <linux/init.h> 6#include <linux/init.h>
8#include <linux/mmzone.h> 7#include <linux/mmzone.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c
index 6c00dce9f73..efe6971fc80 100644
--- a/arch/mips/sgi-ip27/ip27-memory.c
+++ b/arch/mips/sgi-ip27/ip27-memory.c
@@ -10,7 +10,6 @@
10 * On SGI IP27 the ARC memory configuration data is completly bogus but 10 * On SGI IP27 the ARC memory configuration data is completly bogus but
11 * alternate easier to use mechanisms are available. 11 * alternate easier to use mechanisms are available.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/mips/sgi-ip27/ip27-reset.c b/arch/mips/sgi-ip27/ip27-reset.c
index 4322db57d3c..c17076108d4 100644
--- a/arch/mips/sgi-ip27/ip27-reset.c
+++ b/arch/mips/sgi-ip27/ip27-reset.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1997, 1998, 1999, 2000, 06 by Ralf Baechle 8 * Copyright (C) 1997, 1998, 1999, 2000, 06 by Ralf Baechle
9 * Copyright (C) 1999, 2000 Silicon Graphics, Inc. 9 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/timer.h> 13#include <linux/timer.h>
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c
index 1fb860c7ac6..3ca614a851e 100644
--- a/arch/mips/sgi-ip27/ip27-timer.c
+++ b/arch/mips/sgi-ip27/ip27-timer.c
@@ -217,7 +217,7 @@ static struct hw_interrupt_type rt_irq_type = {
217 217
218static struct irqaction rt_irqaction = { 218static struct irqaction rt_irqaction = {
219 .handler = ip27_rt_timer_interrupt, 219 .handler = ip27_rt_timer_interrupt,
220 .flags = SA_INTERRUPT, 220 .flags = IRQF_DISABLED,
221 .mask = CPU_MASK_NONE, 221 .mask = CPU_MASK_NONE,
222 .name = "timer" 222 .name = "timer"
223}; 223};
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c
index 00b94aaf637..3b7e74b6222 100644
--- a/arch/mips/sgi-ip32/ip32-irq.c
+++ b/arch/mips/sgi-ip32/ip32-irq.c
@@ -125,9 +125,9 @@ extern irqreturn_t crime_memerr_intr (int irq, void *dev_id,
125extern 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); 126 struct pt_regs *regs);
127 127
128struct irqaction memerr_irq = { crime_memerr_intr, SA_INTERRUPT, 128struct irqaction memerr_irq = { crime_memerr_intr, IRQF_DISABLED,
129 CPU_MASK_NONE, "CRIME memory error", NULL, NULL }; 129 CPU_MASK_NONE, "CRIME memory error", NULL, NULL };
130struct irqaction cpuerr_irq = { crime_cpuerr_intr, SA_INTERRUPT, 130struct irqaction cpuerr_irq = { crime_cpuerr_intr, IRQF_DISABLED,
131 CPU_MASK_NONE, "CRIME CPU error", NULL, NULL }; 131 CPU_MASK_NONE, "CRIME CPU error", NULL, NULL };
132 132
133/* 133/*
@@ -316,9 +316,9 @@ static struct hw_interrupt_type ip32_macepci_interrupt = {
316 MACEISA_KEYB_POLL_INT | \ 316 MACEISA_KEYB_POLL_INT | \
317 MACEISA_MOUSE_INT | \ 317 MACEISA_MOUSE_INT | \
318 MACEISA_MOUSE_POLL_INT | \ 318 MACEISA_MOUSE_POLL_INT | \
319 MACEISA_TIMER0_INT | \ 319 MACEIIRQF_TIMER0_INT | \
320 MACEISA_TIMER1_INT | \ 320 MACEIIRQF_TIMER1_INT | \
321 MACEISA_TIMER2_INT) 321 MACEIIRQF_TIMER2_INT)
322#define MACEISA_SUPERIO_INT (MACEISA_PARALLEL_INT | \ 322#define MACEISA_SUPERIO_INT (MACEISA_PARALLEL_INT | \
323 MACEISA_PAR_CTXA_INT | \ 323 MACEISA_PAR_CTXA_INT | \
324 MACEISA_PAR_CTXB_INT | \ 324 MACEISA_PAR_CTXB_INT | \
@@ -349,7 +349,7 @@ static void enable_maceisa_irq (unsigned int irq)
349 case MACEISA_AUDIO_SW_IRQ ... MACEISA_AUDIO3_MERR_IRQ: 349 case MACEISA_AUDIO_SW_IRQ ... MACEISA_AUDIO3_MERR_IRQ:
350 crime_int = MACE_AUDIO_INT; 350 crime_int = MACE_AUDIO_INT;
351 break; 351 break;
352 case MACEISA_RTC_IRQ ... MACEISA_TIMER2_IRQ: 352 case MACEISA_RTC_IRQ ... MACEIIRQF_TIMER2_IRQ:
353 crime_int = MACE_MISC_INT; 353 crime_int = MACE_MISC_INT;
354 break; 354 break;
355 case MACEISA_PARALLEL_IRQ ... MACEISA_SERIAL2_RDMAOR_IRQ: 355 case MACEISA_PARALLEL_IRQ ... MACEISA_SERIAL2_RDMAOR_IRQ:
diff --git a/arch/mips/sgi-ip32/ip32-setup.c b/arch/mips/sgi-ip32/ip32-setup.c
index acbdad06fac..240a2f981d0 100644
--- a/arch/mips/sgi-ip32/ip32-setup.c
+++ b/arch/mips/sgi-ip32/ip32-setup.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 2000 Harald Koerfgen 8 * Copyright (C) 2000 Harald Koerfgen
9 * Copyright (C) 2002, 2003, 2005 Ilya A. Volynets 9 * Copyright (C) 2002, 2003, 2005 Ilya A. Volynets
10 */ 10 */
11#include <linux/config.h>
12#include <linux/console.h> 11#include <linux/console.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/interrupt.h> 13#include <linux/interrupt.h>
diff --git a/arch/mips/sibyte/bcm1480/irq.c b/arch/mips/sibyte/bcm1480/irq.c
index 610df40cb82..29d3bbb5847 100644
--- a/arch/mips/sibyte/bcm1480/irq.c
+++ b/arch/mips/sibyte/bcm1480/irq.c
@@ -15,7 +15,6 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/linkage.h> 20#include <linux/linkage.h>
diff --git a/arch/mips/sibyte/bcm1480/setup.c b/arch/mips/sibyte/bcm1480/setup.c
index d90a0b87874..8236d0c4854 100644
--- a/arch/mips/sibyte/bcm1480/setup.c
+++ b/arch/mips/sibyte/bcm1480/setup.c
@@ -15,7 +15,6 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/reboot.h> 19#include <linux/reboot.h>
21#include <linux/string.h> 20#include <linux/string.h>
diff --git a/arch/mips/sibyte/bcm1480/time.c b/arch/mips/sibyte/bcm1480/time.c
index efaf83efd2e..7e088f6c4a8 100644
--- a/arch/mips/sibyte/bcm1480/time.c
+++ b/arch/mips/sibyte/bcm1480/time.c
@@ -25,7 +25,6 @@
25 * code to do general bookkeeping (e.g. update jiffies, run 25 * code to do general bookkeeping (e.g. update jiffies, run
26 * bottom halves, etc.) 26 * bottom halves, etc.)
27 */ 27 */
28#include <linux/config.h>
29#include <linux/interrupt.h> 28#include <linux/interrupt.h>
30#include <linux/sched.h> 29#include <linux/sched.h>
31#include <linux/spinlock.h> 30#include <linux/spinlock.h>
diff --git a/arch/mips/sibyte/cfe/console.c b/arch/mips/sibyte/cfe/console.c
index 7721100d027..c6ec748175b 100644
--- a/arch/mips/sibyte/cfe/console.c
+++ b/arch/mips/sibyte/cfe/console.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/init.h> 1#include <linux/init.h>
3#include <linux/errno.h> 2#include <linux/errno.h>
4#include <linux/console.h> 3#include <linux/console.h>
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c
index ea308029450..6e8952da6e2 100644
--- a/arch/mips/sibyte/cfe/setup.c
+++ b/arch/mips/sibyte/cfe/setup.c
@@ -16,7 +16,6 @@
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/linkage.h> 21#include <linux/linkage.h>
diff --git a/arch/mips/sibyte/sb1250/bus_watcher.c b/arch/mips/sibyte/sb1250/bus_watcher.c
index 482dee054e6..bb90649fbc4 100644
--- a/arch/mips/sibyte/sb1250/bus_watcher.c
+++ b/arch/mips/sibyte/sb1250/bus_watcher.c
@@ -25,7 +25,6 @@
25 * /proc/bus_watcher if PROC_FS is on. 25 * /proc/bus_watcher if PROC_FS is on.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/interrupt.h> 30#include <linux/interrupt.h>
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c
index fcc61940f1f..1d280aabcf6 100644
--- a/arch/mips/sibyte/sb1250/irq.c
+++ b/arch/mips/sibyte/sb1250/irq.c
@@ -15,7 +15,6 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/linkage.h> 20#include <linux/linkage.h>
diff --git a/arch/mips/sibyte/sb1250/prom.c b/arch/mips/sibyte/sb1250/prom.c
index 742043f8d75..3c33a4517bc 100644
--- a/arch/mips/sibyte/sb1250/prom.c
+++ b/arch/mips/sibyte/sb1250/prom.c
@@ -16,7 +16,6 @@
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/mm.h> 21#include <linux/mm.h>
diff --git a/arch/mips/sibyte/sb1250/setup.c b/arch/mips/sibyte/sb1250/setup.c
index fde4751c84f..d0ee1d5b822 100644
--- a/arch/mips/sibyte/sb1250/setup.c
+++ b/arch/mips/sibyte/sb1250/setup.c
@@ -15,7 +15,6 @@
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 */ 17 */
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/reboot.h> 20#include <linux/reboot.h>
diff --git a/arch/mips/sibyte/sb1250/time.c b/arch/mips/sibyte/sb1250/time.c
index 1588f6debd9..4b669dc86ef 100644
--- a/arch/mips/sibyte/sb1250/time.c
+++ b/arch/mips/sibyte/sb1250/time.c
@@ -25,7 +25,6 @@
25 * code to do general bookkeeping (e.g. update jiffies, run 25 * code to do general bookkeeping (e.g. update jiffies, run
26 * bottom halves, etc.) 26 * bottom halves, etc.)
27 */ 27 */
28#include <linux/config.h>
29#include <linux/interrupt.h> 28#include <linux/interrupt.h>
30#include <linux/sched.h> 29#include <linux/sched.h>
31#include <linux/spinlock.h> 30#include <linux/spinlock.h>
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c
index f9e694988cd..a9a6dbc0684 100644
--- a/arch/mips/sibyte/swarm/setup.c
+++ b/arch/mips/sibyte/swarm/setup.c
@@ -21,7 +21,6 @@
21 * Setup code for the SWARM board 21 * Setup code for the SWARM board
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/spinlock.h> 24#include <linux/spinlock.h>
26#include <linux/mm.h> 25#include <linux/mm.h>
27#include <linux/bootmem.h> 26#include <linux/bootmem.h>
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c
index a050bb6ae70..870486d6cd7 100644
--- a/arch/mips/sni/setup.c
+++ b/arch/mips/sni/setup.c
@@ -7,7 +7,6 @@
7 * 7 *
8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org) 8 * Copyright (C) 1996, 97, 98, 2000, 03, 04, 06 Ralf Baechle (ralf@linux-mips.org)
9 */ 9 */
10#include <linux/config.h>
11#include <linux/eisa.h> 10#include <linux/eisa.h>
12#include <linux/hdreg.h> 11#include <linux/hdreg.h>
13#include <linux/ioport.h> 12#include <linux/ioport.h>
diff --git a/arch/mips/tx4927/common/tx4927_irq.c b/arch/mips/tx4927/common/tx4927_irq.c
index a42be00483e..ae9d5653a86 100644
--- a/arch/mips/tx4927/common/tx4927_irq.c
+++ b/arch/mips/tx4927/common/tx4927_irq.c
@@ -23,7 +23,6 @@
23 * with this program; if not, write to the Free Software Foundation, Inc., 23 * with this program; if not, write to the Free Software Foundation, Inc.,
24 * 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26#include <linux/config.h>
27#include <linux/errno.h> 26#include <linux/errno.h>
28#include <linux/init.h> 27#include <linux/init.h>
29#include <linux/kernel_stat.h> 28#include <linux/kernel_stat.h>
diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c
index 81a5acfe8c4..64a1b394b25 100644
--- a/arch/mips/tx4927/common/tx4927_setup.c
+++ b/arch/mips/tx4927/common/tx4927_setup.c
@@ -24,7 +24,6 @@
24 * with this program; if not, write to the Free Software Foundation, Inc., 24 * with this program; if not, write to the Free Software Foundation, Inc.,
25 * 675 Mass Ave, Cambridge, MA 02139, USA. 25 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */ 26 */
27#include <linux/config.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/kernel_stat.h> 29#include <linux/kernel_stat.h>
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
index c67978b6dae..ec0a0de3083 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
@@ -111,7 +111,6 @@ SuperIO/PS2/Mouse, using INTR via ISA IRQ12 (mouse not currently supported)
111JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthBridge, JP4, JP5, JP6 111JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthBridge, JP4, JP5, JP6
112*/ 112*/
113 113
114#include <linux/config.h>
115#include <linux/init.h> 114#include <linux/init.h>
116#include <linux/kernel.h> 115#include <linux/kernel.h>
117#include <linux/types.h> 116#include <linux/types.h>
@@ -338,7 +337,7 @@ int toshiba_rbtx4927_irq_nested(int sw_irq)
338} 337}
339 338
340//#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL } 339//#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, 0, CPU_MASK_NONE, s, NULL, NULL }
341#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, SA_SHIRQ, CPU_MASK_NONE, s, NULL, NULL } 340#define TOSHIBA_RBTX4927_PIC_ACTION(s) { no_action, IRQF_SHARED, CPU_MASK_NONE, s, NULL, NULL }
342static struct irqaction toshiba_rbtx4927_irq_ioc_action = 341static struct irqaction toshiba_rbtx4927_irq_ioc_action =
343TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME); 342TOSHIBA_RBTX4927_PIC_ACTION(TOSHIBA_RBTX4927_IOC_NAME);
344#ifdef CONFIG_TOSHIBA_FPCIB0 343#ifdef CONFIG_TOSHIBA_FPCIB0
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
index 6dcf077f61a..f0d70c47600 100644
--- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
+++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
@@ -42,7 +42,6 @@
42 * with this program; if not, write to the Free Software Foundation, Inc., 42 * with this program; if not, write to the Free Software Foundation, Inc.,
43 * 675 Mass Ave, Cambridge, MA 02139, USA. 43 * 675 Mass Ave, Cambridge, MA 02139, USA.
44 */ 44 */
45#include <linux/config.h>
46#include <linux/init.h> 45#include <linux/init.h>
47#include <linux/kernel.h> 46#include <linux/kernel.h>
48#include <linux/types.h> 47#include <linux/types.h>
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/prom.c b/arch/mips/tx4938/toshiba_rbtx4938/prom.c
index 7df8b32ba26..e44daf30a7c 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/prom.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/prom.c
@@ -12,7 +12,6 @@
12 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 12 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
index 96e833cd4c1..66163ba452c 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -11,7 +11,6 @@
11 * 11 *
12 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 12 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
13 */ 13 */
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/ioport.h> 16#include <linux/ioport.h>
diff --git a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
index 951a208ee9b..89596e62f90 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/spi_eeprom.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com) 10 * Support for TX4938 in 2.6 - Manish Lachwani (mlachwani@mvista.com)
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
15#include <linux/proc_fs.h> 14#include <linux/proc_fs.h>
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/init.c b/arch/mips/vr41xx/nec-cmbvr4133/init.c
index be590edb0b8..ae1af6b21c4 100644
--- a/arch/mips/vr41xx/nec-cmbvr4133/init.c
+++ b/arch/mips/vr41xx/nec-cmbvr4133/init.c
@@ -15,7 +15,6 @@
15 * Support for NEC-CMBVR4133 in 2.6 15 * Support for NEC-CMBVR4133 in 2.6
16 * Manish Lachwani (mlachwani@mvista.com) 16 * Manish Lachwani (mlachwani@mvista.com)
17 */ 17 */
18#include <linux/config.h>
19 18
20#ifdef CONFIG_ROCKHOPPER 19#ifdef CONFIG_ROCKHOPPER
21#include <asm/io.h> 20#include <asm/io.h>
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c b/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c
index 1f6b24ef869..f45caccedc0 100644
--- a/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c
+++ b/arch/mips/vr41xx/nec-cmbvr4133/m1535plus.c
@@ -14,7 +14,6 @@
14 * Support for NEC-CMBVR4133 in 2.6 14 * Support for NEC-CMBVR4133 in 2.6
15 * Author: Manish Lachwani (mlachwani@mvista.com) 15 * Author: Manish Lachwani (mlachwani@mvista.com)
16 */ 16 */
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/serial.h> 19#include <linux/serial.h>
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/setup.c b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
index 53272a5c3cb..b20b93b2b95 100644
--- a/arch/mips/vr41xx/nec-cmbvr4133/setup.c
+++ b/arch/mips/vr41xx/nec-cmbvr4133/setup.c
@@ -14,7 +14,6 @@
14 * Support for CMBVR4133 board in 2.6 14 * Support for CMBVR4133 board in 2.6
15 * Author: Manish Lachwani (mlachwani@mvista.com) 15 * Author: Manish Lachwani (mlachwani@mvista.com)
16 */ 16 */
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/ide.h> 18#include <linux/ide.h>
20#include <linux/ioport.h> 19#include <linux/ioport.h>
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index 630730c32a5..95c1b8ec428 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <asm/asm-offsets.h> 25#include <asm/asm-offsets.h>
27 26
28/* we have the following possibilities to act on an interruption: 27/* we have the following possibilities to act on an interruption:
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 82fe6ba2972..5b8803cc3d6 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */ 23 */
24#include <linux/bitops.h> 24#include <linux/bitops.h>
25#include <linux/config.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/interrupt.h> 27#include <linux/interrupt.h>
@@ -367,14 +366,14 @@ void do_cpu_irq_mask(struct pt_regs *regs)
367static struct irqaction timer_action = { 366static struct irqaction timer_action = {
368 .handler = timer_interrupt, 367 .handler = timer_interrupt,
369 .name = "timer", 368 .name = "timer",
370 .flags = SA_INTERRUPT, 369 .flags = IRQF_DISABLED,
371}; 370};
372 371
373#ifdef CONFIG_SMP 372#ifdef CONFIG_SMP
374static struct irqaction ipi_action = { 373static struct irqaction ipi_action = {
375 .handler = ipi_interrupt, 374 .handler = ipi_interrupt,
376 .name = "IPI", 375 .name = "IPI",
377 .flags = SA_INTERRUPT, 376 .flags = IRQF_DISABLED,
378}; 377};
379#endif 378#endif
380 379
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S
index f600556414d..e81c9937d10 100644
--- a/arch/parisc/kernel/pacache.S
+++ b/arch/parisc/kernel/pacache.S
@@ -40,7 +40,6 @@
40 .level 2.0 40 .level 2.0
41#endif 41#endif
42 42
43#include <linux/config.h>
44 43
45#include <asm/psw.h> 44#include <asm/psw.h>
46#include <asm/assembly.h> 45#include <asm/assembly.h>
diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c
index fc107add627..6d57553d8ef 100644
--- a/arch/parisc/kernel/parisc_ksyms.c
+++ b/arch/parisc/kernel/parisc_ksyms.c
@@ -24,7 +24,6 @@
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/syscalls.h> 29#include <linux/syscalls.h>
diff --git a/arch/parisc/kernel/pci.c b/arch/parisc/kernel/pci.c
index 7d6967ee367..d3b8fc52dfc 100644
--- a/arch/parisc/kernel/pci.c
+++ b/arch/parisc/kernel/pci.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1999-2001 Hewlett-Packard Company 9 * Copyright (C) 1999-2001 Hewlett-Packard Company
10 * Copyright (C) 1999-2001 Grant Grundler 10 * Copyright (C) 1999-2001 Grant Grundler
11 */ 11 */
12#include <linux/config.h>
13#include <linux/eisa.h> 12#include <linux/eisa.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/module.h> 14#include <linux/module.h>
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c
index 215d78c87bc..ce78f412ff2 100644
--- a/arch/parisc/kernel/pdc_cons.c
+++ b/arch/parisc/kernel/pdc_cons.c
@@ -44,7 +44,6 @@
44#define EARLY_BOOTUP_DEBUG 44#define EARLY_BOOTUP_DEBUG
45 45
46 46
47#include <linux/config.h>
48#include <linux/kernel.h> 47#include <linux/kernel.h>
49#include <linux/console.h> 48#include <linux/console.h>
50#include <linux/string.h> 49#include <linux/string.h>
diff --git a/arch/parisc/kernel/perf_asm.S b/arch/parisc/kernel/perf_asm.S
index adb3c644491..5e7bb90e7e0 100644
--- a/arch/parisc/kernel/perf_asm.S
+++ b/arch/parisc/kernel/perf_asm.S
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <asm/assembly.h> 22#include <asm/assembly.h>
24 23
25#ifdef CONFIG_64BIT 24#ifdef CONFIG_64BIT
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index 6df9f62cecb..99d7fca9310 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -26,7 +26,6 @@
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 * 27 *
28 */ 28 */
29#include <linux/config.h>
30#include <linux/delay.h> 29#include <linux/delay.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/mm.h> 31#include <linux/mm.h>
diff --git a/arch/parisc/kernel/real2.S b/arch/parisc/kernel/real2.S
index 453d01a9f97..789061f6ceb 100644
--- a/arch/parisc/kernel/real2.S
+++ b/arch/parisc/kernel/real2.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 2000 Hewlett Packard (Paul Bame bame@puffin.external.hp.com) 7 * Copyright (C) 2000 Hewlett Packard (Paul Bame bame@puffin.external.hp.com)
8 * 8 *
9 */ 9 */
10#include <linux/config.h>
11 10
12#include <asm/psw.h> 11#include <asm/psw.h>
13#include <asm/assembly.h> 12#include <asm/assembly.h>
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index 278f4b9f6a3..3c7a3faf78e 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/initrd.h> 31#include <linux/initrd.h>
33#include <linux/init.h> 32#include <linux/init.h>
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index d6ac1c60a47..98e40959a56 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -18,7 +18,6 @@
18*/ 18*/
19#undef ENTRY_SYS_CPUS /* syscall support for iCOD-like functionality */ 19#undef ENTRY_SYS_CPUS /* syscall support for iCOD-like functionality */
20 20
21#include <linux/config.h>
22 21
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/spinlock.h> 23#include <linux/spinlock.h>
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index d286f68a3d3..b7486980308 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -9,7 +9,6 @@
9 * environment. Based heavily on sys_ia32.c and sys_sparc32.c. 9 * environment. Based heavily on sys_ia32.c and sys_sparc32.c.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/compat.h> 12#include <linux/compat.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
diff --git a/arch/parisc/kernel/time.c b/arch/parisc/kernel/time.c
index eb35e1c0bb5..5facc9bff4e 100644
--- a/arch/parisc/kernel/time.c
+++ b/arch/parisc/kernel/time.c
@@ -10,7 +10,6 @@
10 * 1998-12-20 Updated NTP code according to technical memorandum Jan '96 10 * 1998-12-20 Updated NTP code according to technical memorandum Jan '96
11 * "A Kernel Model for Precision Timekeeping" by Dave Mills 11 * "A Kernel Model for Precision Timekeeping" by Dave Mills
12 */ 12 */
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 348344a84bf..77b28cb8aca 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -10,7 +10,6 @@
10 * state in 'asm.s'. 10 * state in 'asm.s'.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/string.h> 15#include <linux/string.h>
diff --git a/arch/parisc/kernel/unaligned.c b/arch/parisc/kernel/unaligned.c
index 92328fbddb3..bd2230d6a2a 100644
--- a/arch/parisc/kernel/unaligned.c
+++ b/arch/parisc/kernel/unaligned.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <asm/uaccess.h> 25#include <asm/uaccess.h>
diff --git a/arch/parisc/kernel/unwind.c b/arch/parisc/kernel/unwind.c
index cc1c1afc318..920bdbf8404 100644
--- a/arch/parisc/kernel/unwind.c
+++ b/arch/parisc/kernel/unwind.c
@@ -8,7 +8,6 @@
8 * understand what is happening here 8 * understand what is happening here
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 94dcc03a28e..9989495a51d 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -23,7 +23,6 @@
23 * along with this program; if not, write to the Free Software 23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */ 25 */
26#include <linux/config.h>
27#include <asm-generic/vmlinux.lds.h> 26#include <asm-generic/vmlinux.lds.h>
28/* needed for the processor specific cache alignment size */ 27/* needed for the processor specific cache alignment size */
29#include <asm/cache.h> 28#include <asm/cache.h>
diff --git a/arch/parisc/lib/bitops.c b/arch/parisc/lib/bitops.c
index 90f400b1028..f352666b5b2 100644
--- a/arch/parisc/lib/bitops.c
+++ b/arch/parisc/lib/bitops.c
@@ -6,7 +6,6 @@
6 * Copyright 2000 Grant Grundler (grundler@cup.hp.com) 6 * Copyright 2000 Grant Grundler (grundler@cup.hp.com)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/spinlock.h> 10#include <linux/spinlock.h>
12#include <asm/system.h> 11#include <asm/system.h>
diff --git a/arch/parisc/lib/fixup.S b/arch/parisc/lib/fixup.S
index e0661c2978e..ecce3d35401 100644
--- a/arch/parisc/lib/fixup.S
+++ b/arch/parisc/lib/fixup.S
@@ -19,7 +19,6 @@
19 * 19 *
20 * Fixup routines for kernel exception handling. 20 * Fixup routines for kernel exception handling.
21 */ 21 */
22#include <linux/config.h>
23#include <asm/asm-offsets.h> 22#include <asm/asm-offsets.h>
24#include <asm/assembly.h> 23#include <asm/assembly.h>
25#include <asm/errno.h> 24#include <asm/errno.h>
diff --git a/arch/parisc/lib/memcpy.c b/arch/parisc/lib/memcpy.c
index b7098035321..5575e41f9d6 100644
--- a/arch/parisc/lib/memcpy.c
+++ b/arch/parisc/lib/memcpy.c
@@ -53,7 +53,6 @@
53 */ 53 */
54 54
55#ifdef __KERNEL__ 55#ifdef __KERNEL__
56#include <linux/config.h>
57#include <linux/module.h> 56#include <linux/module.h>
58#include <linux/compiler.h> 57#include <linux/compiler.h>
59#include <asm/uaccess.h> 58#include <asm/uaccess.h>
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 63171256265..f2b96f1e0da 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14 13
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
@@ -28,6 +27,7 @@
28#include <asm/tlb.h> 27#include <asm/tlb.h>
29#include <asm/pdc_chassis.h> 28#include <asm/pdc_chassis.h>
30#include <asm/mmzone.h> 29#include <asm/mmzone.h>
30#include <asm/sections.h>
31 31
32DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 32DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
33 33
@@ -418,11 +418,10 @@ void free_initmem(void)
418#ifdef CONFIG_DEBUG_RODATA 418#ifdef CONFIG_DEBUG_RODATA
419void mark_rodata_ro(void) 419void mark_rodata_ro(void)
420{ 420{
421 extern char __start_rodata, __end_rodata;
422 /* rodata memory was already mapped with KERNEL_RO access rights by 421 /* rodata memory was already mapped with KERNEL_RO access rights by
423 pagetable_init() and map_pages(). No need to do additional stuff here */ 422 pagetable_init() and map_pages(). No need to do additional stuff here */
424 printk (KERN_INFO "Write protecting the kernel read-only data: %luk\n", 423 printk (KERN_INFO "Write protecting the kernel read-only data: %luk\n",
425 (unsigned long)(&__end_rodata - &__start_rodata) >> 10); 424 (unsigned long)(__end_rodata - __start_rodata) >> 10);
426} 425}
427#endif 426#endif
428 427
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index ff294054892..7ee84968087 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -13,7 +13,6 @@
13 * 2 of the License, or (at your option) any later version. 13 * 2 of the License, or (at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/signal.h> 16#include <linux/signal.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/arch/powerpc/kernel/binfmt_elf32.c b/arch/powerpc/kernel/binfmt_elf32.c
index 8ad6b0f3365..5cb58757e1b 100644
--- a/arch/powerpc/kernel/binfmt_elf32.c
+++ b/arch/powerpc/kernel/binfmt_elf32.c
@@ -19,7 +19,6 @@
19 19
20#include <asm/processor.h> 20#include <asm/processor.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/config.h>
23#include <linux/elfcore.h> 22#include <linux/elfcore.h>
24#include <linux/compat.h> 23#include <linux/compat.h>
25 24
diff --git a/arch/powerpc/kernel/btext.c b/arch/powerpc/kernel/btext.c
index 6223d39177c..a6920919d68 100644
--- a/arch/powerpc/kernel/btext.c
+++ b/arch/powerpc/kernel/btext.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Benjamin Herrenschmidt <benh@kernel.crashing.org> 4 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 */ 5 */
6#include <linux/config.h>
7#include <linux/kernel.h> 6#include <linux/kernel.h>
8#include <linux/string.h> 7#include <linux/string.h>
9#include <linux/init.h> 8#include <linux/init.h>
diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S b/arch/powerpc/kernel/cpu_setup_6xx.S
index 365381fcb27..8b4a4ee85ec 100644
--- a/arch/powerpc/kernel/cpu_setup_6xx.S
+++ b/arch/powerpc/kernel/cpu_setup_6xx.S
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/processor.h> 12#include <asm/processor.h>
14#include <asm/page.h> 13#include <asm/page.h>
15#include <asm/cputable.h> 14#include <asm/cputable.h>
diff --git a/arch/powerpc/kernel/cpu_setup_power4.S b/arch/powerpc/kernel/cpu_setup_power4.S
index 1fc86326100..f69af2c5d7b 100644
--- a/arch/powerpc/kernel/cpu_setup_power4.S
+++ b/arch/powerpc/kernel/cpu_setup_power4.S
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/processor.h> 12#include <asm/processor.h>
14#include <asm/page.h> 13#include <asm/page.h>
15#include <asm/cputable.h> 14#include <asm/cputable.h>
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index abf7d42a8b0..272e43622fd 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/string.h> 13#include <linux/string.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/threads.h> 15#include <linux/threads.h>
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 8866fd26c6b..c03e829fee3 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
24#include <linux/sys.h> 23#include <linux/sys.h>
25#include <linux/threads.h> 24#include <linux/threads.h>
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 221062c960c..54d9f5cdaab 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -18,7 +18,6 @@
18 * 2 of the License, or (at your option) any later version. 18 * 2 of the License, or (at your option) any later version.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
23#include <asm/unistd.h> 22#include <asm/unistd.h>
24#include <asm/processor.h> 23#include <asm/processor.h>
diff --git a/arch/powerpc/kernel/firmware.c b/arch/powerpc/kernel/firmware.c
index 0bfe9061720..1679a70bbca 100644
--- a/arch/powerpc/kernel/firmware.c
+++ b/arch/powerpc/kernel/firmware.c
@@ -13,7 +13,6 @@
13 * 2 of the License, or (at your option) any later version. 13 * 2 of the License, or (at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18 17
19#include <asm/firmware.h> 18#include <asm/firmware.h>
diff --git a/arch/powerpc/kernel/fpu.S b/arch/powerpc/kernel/fpu.S
index 01f71200c60..7e2c9fe44ac 100644
--- a/arch/powerpc/kernel/fpu.S
+++ b/arch/powerpc/kernel/fpu.S
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/reg.h> 12#include <asm/reg.h>
14#include <asm/page.h> 13#include <asm/page.h>
15#include <asm/mmu.h> 14#include <asm/mmu.h>
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index b25b25902d1..d88e182e40b 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <asm/reg.h> 25#include <asm/reg.h>
27#include <asm/page.h> 26#include <asm/page.h>
28#include <asm/mmu.h> 27#include <asm/mmu.h>
diff --git a/arch/powerpc/kernel/head_44x.S b/arch/powerpc/kernel/head_44x.S
index 47c7fa148c9..accb39d4991 100644
--- a/arch/powerpc/kernel/head_44x.S
+++ b/arch/powerpc/kernel/head_44x.S
@@ -28,7 +28,6 @@
28 * option) any later version. 28 * option) any later version.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <asm/processor.h> 31#include <asm/processor.h>
33#include <asm/page.h> 32#include <asm/page.h>
34#include <asm/mmu.h> 33#include <asm/mmu.h>
diff --git a/arch/powerpc/kernel/head_4xx.S b/arch/powerpc/kernel/head_4xx.S
index 2590e97f553..adc7f8097cd 100644
--- a/arch/powerpc/kernel/head_4xx.S
+++ b/arch/powerpc/kernel/head_4xx.S
@@ -31,7 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <asm/processor.h> 34#include <asm/processor.h>
36#include <asm/page.h> 35#include <asm/page.h>
37#include <asm/mmu.h> 36#include <asm/mmu.h>
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 8cfd040d1f5..e16eb2a3317 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -21,7 +21,6 @@
21 * 2 of the License, or (at your option) any later version. 21 * 2 of the License, or (at your option) any later version.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/threads.h> 24#include <linux/threads.h>
26#include <asm/reg.h> 25#include <asm/reg.h>
27#include <asm/page.h> 26#include <asm/page.h>
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S
index 28941f5ce67..901be47a02a 100644
--- a/arch/powerpc/kernel/head_8xx.S
+++ b/arch/powerpc/kernel/head_8xx.S
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <asm/processor.h> 22#include <asm/processor.h>
24#include <asm/page.h> 23#include <asm/page.h>
25#include <asm/mmu.h> 24#include <asm/mmu.h>
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index dd86bbed762..66877bdfe0b 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -30,7 +30,6 @@
30 * option) any later version. 30 * option) any later version.
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/threads.h> 33#include <linux/threads.h>
35#include <asm/processor.h> 34#include <asm/processor.h>
36#include <asm/page.h> 35#include <asm/page.h>
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index d491052c8e0..4180c3998b3 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -19,7 +19,6 @@
19 * 2 of the License, or (at your option) any later version. 19 * 2 of the License, or (at your option) any later version.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/smp.h> 24#include <linux/smp.h>
diff --git a/arch/powerpc/kernel/idle_6xx.S b/arch/powerpc/kernel/idle_6xx.S
index b45fa0e3721..01bcd52bbf8 100644
--- a/arch/powerpc/kernel/idle_6xx.S
+++ b/arch/powerpc/kernel/idle_6xx.S
@@ -13,7 +13,6 @@
13 * 2 of the License, or (at your option) any later version. 13 * 2 of the License, or (at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/threads.h> 16#include <linux/threads.h>
18#include <asm/reg.h> 17#include <asm/reg.h>
19#include <asm/page.h> 18#include <asm/page.h>
diff --git a/arch/powerpc/kernel/idle_power4.S b/arch/powerpc/kernel/idle_power4.S
index d85c7c938ee..30de81da7b4 100644
--- a/arch/powerpc/kernel/idle_power4.S
+++ b/arch/powerpc/kernel/idle_power4.S
@@ -7,7 +7,6 @@
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/threads.h> 10#include <linux/threads.h>
12#include <asm/processor.h> 11#include <asm/processor.h>
13#include <asm/page.h> 12#include <asm/page.h>
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index 3d677ac9965..ba069407172 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -23,7 +23,6 @@
23 */ 23 */
24 24
25 25
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 24f6050aa4a..525baab45d2 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -38,7 +38,6 @@
38#include <linux/ioport.h> 38#include <linux/ioport.h>
39#include <linux/interrupt.h> 39#include <linux/interrupt.h>
40#include <linux/timex.h> 40#include <linux/timex.h>
41#include <linux/config.h>
42#include <linux/init.h> 41#include <linux/init.h>
43#include <linux/slab.h> 42#include <linux/slab.h>
44#include <linux/delay.h> 43#include <linux/delay.h>
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index f78866367b7..9f0898c8975 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -26,7 +26,6 @@
26 * for PPC64 26 * for PPC64
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/kprobes.h> 29#include <linux/kprobes.h>
31#include <linux/ptrace.h> 30#include <linux/ptrace.h>
32#include <linux/preempt.h> 31#include <linux/preempt.h>
diff --git a/arch/powerpc/kernel/l2cr_6xx.S b/arch/powerpc/kernel/l2cr_6xx.S
index d7f4e982b53..858f28ac8a0 100644
--- a/arch/powerpc/kernel/l2cr_6xx.S
+++ b/arch/powerpc/kernel/l2cr_6xx.S
@@ -40,7 +40,6 @@
40 Author: Terry Greeniaus (tgree@phys.ualberta.ca) 40 Author: Terry Greeniaus (tgree@phys.ualberta.ca)
41 Please e-mail updates to this file to me, thanks! 41 Please e-mail updates to this file to me, thanks!
42*/ 42*/
43#include <linux/config.h>
44#include <asm/processor.h> 43#include <asm/processor.h>
45#include <asm/cputable.h> 44#include <asm/cputable.h>
46#include <asm/ppc_asm.h> 45#include <asm/ppc_asm.h>
diff --git a/arch/powerpc/kernel/legacy_serial.c b/arch/powerpc/kernel/legacy_serial.c
index 3a9b78d0354..4cf0b971976 100644
--- a/arch/powerpc/kernel/legacy_serial.c
+++ b/arch/powerpc/kernel/legacy_serial.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/serial.h> 2#include <linux/serial.h>
4#include <linux/serial_8250.h> 3#include <linux/serial_8250.h>
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 73edc3c1613..23f34daa044 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -18,7 +18,6 @@
18 * keyword - value pairs that specify the configuration of the partition. 18 * keyword - value pairs that specify the configuration of the partition.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/errno.h> 23#include <linux/errno.h>
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index c74774e2175..58758d88336 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -16,7 +16,6 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/sys.h> 19#include <linux/sys.h>
21#include <asm/unistd.h> 20#include <asm/unistd.h>
22#include <asm/errno.h> 21#include <asm/errno.h>
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 580891cb8cc..0c3c70d115c 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -14,7 +14,6 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/sys.h> 17#include <linux/sys.h>
19#include <asm/unistd.h> 18#include <asm/unistd.h>
20#include <asm/errno.h> 19#include <asm/errno.h>
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index 9feeeef5a87..3262b73a3a6 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/string.h> 1#include <linux/string.h>
3#include <linux/kernel.h> 2#include <linux/kernel.h>
4#include <linux/init.h> 3#include <linux/init.h>
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index a0bb354c1c0..c68741fed14 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -7,7 +7,6 @@
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/threads.h> 11#include <linux/threads.h>
13#include <linux/module.h> 12#include <linux/module.h>
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index 8474355a1a4..1333335c474 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -2,7 +2,6 @@
2 * Common pmac/prep/chrp pci routines. -- Cort 2 * Common pmac/prep/chrp pci routines. -- Cort
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7#include <linux/pci.h> 6#include <linux/pci.h>
8#include <linux/delay.h> 7#include <linux/delay.h>
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 286aa52aae3..bea8451fb57 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -13,7 +13,6 @@
13 13
14#undef DEBUG 14#undef DEBUG
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/pci.h> 17#include <linux/pci.h>
19#include <linux/string.h> 18#include <linux/string.h>
diff --git a/arch/powerpc/kernel/perfmon_fsl_booke.c b/arch/powerpc/kernel/perfmon_fsl_booke.c
index 32455dfcc36..bdc3977a7b0 100644
--- a/arch/powerpc/kernel/perfmon_fsl_booke.c
+++ b/arch/powerpc/kernel/perfmon_fsl_booke.c
@@ -21,7 +21,6 @@
21#include <linux/user.h> 21#include <linux/user.h>
22#include <linux/a.out.h> 22#include <linux/a.out.h>
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/config.h>
25#include <linux/init.h> 24#include <linux/init.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/prctl.h> 26#include <linux/prctl.h>
diff --git a/arch/powerpc/kernel/pmc.c b/arch/powerpc/kernel/pmc.c
index e6fb194fe53..a0a2efadeab 100644
--- a/arch/powerpc/kernel/pmc.c
+++ b/arch/powerpc/kernel/pmc.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/spinlock.h> 16#include <linux/spinlock.h>
18#include <linux/module.h> 17#include <linux/module.h>
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index 4b052ae5dc3..e3b80f71748 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/threads.h> 2#include <linux/threads.h>
4#include <linux/smp.h> 3#include <linux/smp.h>
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c
index 2ab8f2be911..f598cb51953 100644
--- a/arch/powerpc/kernel/proc_ppc64.c
+++ b/arch/powerpc/kernel/proc_ppc64.c
@@ -16,7 +16,6 @@
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/mm.h> 20#include <linux/mm.h>
22#include <linux/proc_fs.h> 21#include <linux/proc_fs.h>
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index e4732459c48..a127a1e3c09 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -14,7 +14,6 @@
14 * 2 of the License, or (at your option) any later version. 14 * 2 of the License, or (at your option) any later version.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 320c913435c..4c524cb5218 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -16,7 +16,6 @@
16#undef DEBUG 16#undef DEBUG
17 17
18#include <stdarg.h> 18#include <stdarg.h>
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/init.h> 21#include <linux/init.h>
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 8c28eb0cbda..1e95a9f8cda 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -16,7 +16,6 @@
16#undef DEBUG_PROM 16#undef DEBUG_PROM
17 17
18#include <stdarg.h> 18#include <stdarg.h>
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/init.h> 21#include <linux/init.h>
@@ -988,7 +987,7 @@ static void reserve_mem(u64 base, u64 size)
988} 987}
989 988
990/* 989/*
991 * Initialize memory allocation mecanism, parse "memory" nodes and 990 * Initialize memory allocation mechanism, parse "memory" nodes and
992 * obtain that way the top of memory and RMO to setup out local allocator 991 * obtain that way the top of memory and RMO to setup out local allocator
993 */ 992 */
994static void __init prom_init_mem(void) 993static void __init prom_init_mem(void)
diff --git a/arch/powerpc/kernel/ptrace-common.h b/arch/powerpc/kernel/ptrace-common.h
index c42a860c8d2..8797ae737a7 100644
--- a/arch/powerpc/kernel/ptrace-common.h
+++ b/arch/powerpc/kernel/ptrace-common.h
@@ -10,7 +10,6 @@
10#ifndef _PPC64_PTRACE_COMMON_H 10#ifndef _PPC64_PTRACE_COMMON_H
11#define _PPC64_PTRACE_COMMON_H 11#define _PPC64_PTRACE_COMMON_H
12 12
13#include <linux/config.h>
14#include <asm/system.h> 13#include <asm/system.h>
15 14
16/* 15/*
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 5563e2e7d89..dea75d73f98 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -15,7 +15,6 @@
15 * this archive for more details. 15 * this archive for more details.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/mm.h> 20#include <linux/mm.h>
diff --git a/arch/powerpc/kernel/ptrace32.c b/arch/powerpc/kernel/ptrace32.c
index 826ee3d056d..9b9a230349b 100644
--- a/arch/powerpc/kernel/ptrace32.c
+++ b/arch/powerpc/kernel/ptrace32.c
@@ -17,7 +17,6 @@
17 * this archive for more details. 17 * this archive for more details.
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
23#include <linux/mm.h> 22#include <linux/mm.h>
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index bd328123af7..c6d7b98af7d 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -12,7 +12,6 @@
12 12
13#undef DEBUG 13#undef DEBUG
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/string.h> 16#include <linux/string.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 0932a62a1c9..ba7cd50d820 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -2,7 +2,6 @@
2 * Common prep/pmac/chrp boot and setup code. 2 * Common prep/pmac/chrp boot and setup code.
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/string.h> 6#include <linux/string.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 175539c9afa..ac7276c4068 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -12,7 +12,6 @@
12 12
13#undef DEBUG 13#undef DEBUG
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/string.h> 16#include <linux/string.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index d73b25e22fc..320353f0926 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -17,7 +17,6 @@
17 * 2 of the License, or (at your option) any later version. 17 * 2 of the License, or (at your option) any later version.
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/mm.h> 21#include <linux/mm.h>
23#include <linux/smp.h> 22#include <linux/smp.h>
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c
index 6e75d7ab6d4..f72e8e823d7 100644
--- a/arch/powerpc/kernel/signal_64.c
+++ b/arch/powerpc/kernel/signal_64.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
18#include <linux/smp.h> 17#include <linux/smp.h>
diff --git a/arch/powerpc/kernel/smp-tbsync.c b/arch/powerpc/kernel/smp-tbsync.c
index 9adef3bddad..f19e2e0e61e 100644
--- a/arch/powerpc/kernel/smp-tbsync.c
+++ b/arch/powerpc/kernel/smp-tbsync.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11#include <linux/smp.h> 10#include <linux/smp.h>
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index c5d179d4f81..46c56cfd1b2 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -17,7 +17,6 @@
17 17
18#undef DEBUG 18#undef DEBUG
19 19
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S
index 69773cc1a85..7369f9a6ad2 100644
--- a/arch/powerpc/kernel/swsusp_32.S
+++ b/arch/powerpc/kernel/swsusp_32.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/threads.h> 1#include <linux/threads.h>
3#include <asm/processor.h> 2#include <asm/processor.h>
4#include <asm/page.h> 3#include <asm/page.h>
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c
index ec274e68881..2e292863e98 100644
--- a/arch/powerpc/kernel/sys_ppc32.c
+++ b/arch/powerpc/kernel/sys_ppc32.c
@@ -14,7 +14,6 @@
14 * 2 of the License, or (at your option) any later version. 14 * 2 of the License, or (at your option) any later version.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/fs.h> 19#include <linux/fs.h>
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 4662b580efa..01043509555 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/sysdev.h> 1#include <linux/sysdev.h>
3#include <linux/cpu.h> 2#include <linux/cpu.h>
4#include <linux/smp.h> 3#include <linux/smp.h>
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index ee75ccf1a80..579de70e0b4 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -14,7 +14,6 @@
14 * 2 of the License, or (at your option) any later version. 14 * 2 of the License, or (at your option) any later version.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <asm/ppc_asm.h> 17#include <asm/ppc_asm.h>
19 18
20#ifdef CONFIG_PPC64 19#ifdef CONFIG_PPC64
diff --git a/arch/powerpc/kernel/tau_6xx.c b/arch/powerpc/kernel/tau_6xx.c
index 26bd8ea35a4..368a4934f7e 100644
--- a/arch/powerpc/kernel/tau_6xx.c
+++ b/arch/powerpc/kernel/tau_6xx.c
@@ -11,7 +11,6 @@
11 * life in portables, and add a 'performance/watt' metric somewhere in /proc 11 * life in portables, and add a 'performance/watt' metric somewhere in /proc
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/jiffies.h> 15#include <linux/jiffies.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 7dd5dab789a..774c0a3c501 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -32,7 +32,6 @@
32 * 2 of the License, or (at your option) any later version. 32 * 2 of the License, or (at your option) any later version.
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/errno.h> 35#include <linux/errno.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/sched.h> 37#include <linux/sched.h>
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index fa6bd97b6b9..3c668078e52 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -14,7 +14,6 @@
14 * This file handles the architecture-dependent parts of hardware exceptions 14 * This file handles the architecture-dependent parts of hardware exceptions
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 759afd5e0d8..5730906b23d 100644
--- a/arch/powerpc/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <stdarg.h> 12#include <stdarg.h>
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/console.h> 15#include <linux/console.h>
diff --git a/arch/powerpc/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 5d29dcca523..0835b4841de 100644
--- a/arch/powerpc/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
@@ -8,7 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <asm/udbg.h> 12#include <asm/udbg.h>
14#include <asm/io.h> 13#include <asm/io.h>
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index bc3e15be308..1a7e19cdab3 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -8,7 +8,6 @@
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#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/powerpc/kernel/vdso32/cacheflush.S b/arch/powerpc/kernel/vdso32/cacheflush.S
index 09629aea3e4..9cb319992c3 100644
--- a/arch/powerpc/kernel/vdso32/cacheflush.S
+++ b/arch/powerpc/kernel/vdso32/cacheflush.S
@@ -9,7 +9,6 @@
9 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12#include <linux/config.h>
13#include <asm/processor.h> 12#include <asm/processor.h>
14#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
15#include <asm/vdso.h> 14#include <asm/vdso.h>
diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
index 4709f1d9542..dc21e891d2e 100644
--- a/arch/powerpc/kernel/vdso32/datapage.S
+++ b/arch/powerpc/kernel/vdso32/datapage.S
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/processor.h> 12#include <asm/processor.h>
14#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
15#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
index 7eebff03a04..05909f75430 100644
--- a/arch/powerpc/kernel/vdso32/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -10,7 +10,6 @@
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 */ 12 */
13#include <linux/config.h>
14#include <asm/processor.h> 13#include <asm/processor.h>
15#include <asm/ppc_asm.h> 14#include <asm/ppc_asm.h>
16#include <asm/vdso.h> 15#include <asm/vdso.h>
diff --git a/arch/powerpc/kernel/vdso32/sigtramp.S b/arch/powerpc/kernel/vdso32/sigtramp.S
index 0c6a37b29dd..68d49dd71dc 100644
--- a/arch/powerpc/kernel/vdso32/sigtramp.S
+++ b/arch/powerpc/kernel/vdso32/sigtramp.S
@@ -10,7 +10,6 @@
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 */ 12 */
13#include <linux/config.h>
14#include <asm/processor.h> 13#include <asm/processor.h>
15#include <asm/ppc_asm.h> 14#include <asm/ppc_asm.h>
16#include <asm/unistd.h> 15#include <asm/unistd.h>
diff --git a/arch/powerpc/kernel/vdso64/cacheflush.S b/arch/powerpc/kernel/vdso64/cacheflush.S
index cb4ae0a5edd..66a36d3cc6a 100644
--- a/arch/powerpc/kernel/vdso64/cacheflush.S
+++ b/arch/powerpc/kernel/vdso64/cacheflush.S
@@ -9,7 +9,6 @@
9 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12#include <linux/config.h>
13#include <asm/processor.h> 12#include <asm/processor.h>
14#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
15#include <asm/vdso.h> 14#include <asm/vdso.h>
diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
index 3b2dd7d0c1e..79796de1173 100644
--- a/arch/powerpc/kernel/vdso64/datapage.S
+++ b/arch/powerpc/kernel/vdso64/datapage.S
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/processor.h> 12#include <asm/processor.h>
14#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
15#include <asm/asm-offsets.h> 14#include <asm/asm-offsets.h>
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
index 4ee871f1cad..56e76ff5498 100644
--- a/arch/powerpc/kernel/vdso64/gettimeofday.S
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -11,7 +11,6 @@
11 * as published by the Free Software Foundation; either version 11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14#include <linux/config.h>
15#include <asm/processor.h> 14#include <asm/processor.h>
16#include <asm/ppc_asm.h> 15#include <asm/ppc_asm.h>
17#include <asm/vdso.h> 16#include <asm/vdso.h>
diff --git a/arch/powerpc/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S
index 7479edb101b..17a83fa6dc5 100644
--- a/arch/powerpc/kernel/vdso64/sigtramp.S
+++ b/arch/powerpc/kernel/vdso64/sigtramp.S
@@ -10,7 +10,6 @@
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 */ 12 */
13#include <linux/config.h>
14#include <asm/processor.h> 13#include <asm/processor.h>
15#include <asm/ppc_asm.h> 14#include <asm/ppc_asm.h>
16#include <asm/unistd.h> 15#include <asm/unistd.h>
diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S
index 9416b4ab92e..49ac3d6e139 100644
--- a/arch/powerpc/kernel/vector.S
+++ b/arch/powerpc/kernel/vector.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <asm/ppc_asm.h> 1#include <asm/ppc_asm.h>
3#include <asm/reg.h> 2#include <asm/reg.h>
4 3
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 8b25953dc4f..02665a02130 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#ifdef CONFIG_PPC64 1#ifdef CONFIG_PPC64
3#include <asm/page.h> 2#include <asm/page.h>
4#define PROVIDE32(x) PROVIDE(__unused__##x) 3#define PROVIDE32(x) PROVIDE(__unused__##x)
diff --git a/arch/powerpc/lib/copy_32.S b/arch/powerpc/lib/copy_32.S
index bee51414812..c657de59abc 100644
--- a/arch/powerpc/lib/copy_32.S
+++ b/arch/powerpc/lib/copy_32.S
@@ -8,7 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/config.h>
12#include <asm/processor.h> 11#include <asm/processor.h>
13#include <asm/cache.h> 12#include <asm/cache.h>
14#include <asm/errno.h> 13#include <asm/errno.h>
diff --git a/arch/powerpc/lib/locks.c b/arch/powerpc/lib/locks.c
index 8362fa272ca..077bed7dc52 100644
--- a/arch/powerpc/lib/locks.c
+++ b/arch/powerpc/lib/locks.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/spinlock.h> 16#include <linux/spinlock.h>
18#include <linux/module.h> 17#include <linux/module.h>
diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
index c251d993661..9590ba780b9 100644
--- a/arch/powerpc/lib/sstep.c
+++ b/arch/powerpc/lib/sstep.c
@@ -10,7 +10,6 @@
10 */ 10 */
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/ptrace.h> 12#include <linux/ptrace.h>
13#include <linux/config.h>
14#include <asm/sstep.h> 13#include <asm/sstep.h>
15#include <asm/processor.h> 14#include <asm/processor.h>
16 15
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S
index b9ca84ed892..c4c622d8e6a 100644
--- a/arch/powerpc/lib/string.S
+++ b/arch/powerpc/lib/string.S
@@ -8,7 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/config.h>
12#include <asm/processor.h> 11#include <asm/processor.h>
13#include <asm/errno.h> 12#include <asm/errno.h>
14#include <asm/ppc_asm.h> 13#include <asm/ppc_asm.h>
diff --git a/arch/powerpc/math-emu/math.c b/arch/powerpc/math-emu/math.c
index 58915347276..69058b2873d 100644
--- a/arch/powerpc/math-emu/math.c
+++ b/arch/powerpc/math-emu/math.c
@@ -2,7 +2,6 @@
2 * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com) 2 * Copyright (C) 1999 Eddie C. Dost (ecd@atecom.com)
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/types.h> 5#include <linux/types.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
8 7
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index 3d79ce281b6..376829ed221 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -24,7 +24,6 @@
24 * 24 *
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/signal.h> 27#include <linux/signal.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/4xx_mmu.c b/arch/powerpc/mm/4xx_mmu.c
index 4d006aa1a0d..838e09db71d 100644
--- a/arch/powerpc/mm/4xx_mmu.c
+++ b/arch/powerpc/mm/4xx_mmu.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/signal.h> 24#include <linux/signal.h>
26#include <linux/sched.h> 25#include <linux/sched.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index a0a9e1e0061..78a0d59903e 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -15,7 +15,6 @@
15 * 2 of the License, or (at your option) any later version. 15 * 2 of the License, or (at your option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/signal.h> 18#include <linux/signal.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index 5d581bb3aa1..123da03ab11 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/signal.h> 29#include <linux/signal.h>
31#include <linux/sched.h> 30#include <linux/sched.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/hash_low_32.S b/arch/powerpc/mm/hash_low_32.S
index 94255beeecd..bd68df5fa78 100644
--- a/arch/powerpc/mm/hash_low_32.S
+++ b/arch/powerpc/mm/hash_low_32.S
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <asm/reg.h> 24#include <asm/reg.h>
26#include <asm/page.h> 25#include <asm/page.h>
27#include <asm/pgtable.h> 26#include <asm/pgtable.h>
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S
index 52e91423895..9bc0a9c2b9b 100644
--- a/arch/powerpc/mm/hash_low_64.S
+++ b/arch/powerpc/mm/hash_low_64.S
@@ -10,7 +10,6 @@
10 * described in the kernel's COPYING file. 10 * described in the kernel's COPYING file.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <asm/reg.h> 13#include <asm/reg.h>
15#include <asm/pgtable.h> 14#include <asm/pgtable.h>
16#include <asm/mmu.h> 15#include <asm/mmu.h>
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 3cc6d68f711..1915661c2c8 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -21,7 +21,6 @@
21#undef DEBUG 21#undef DEBUG
22#undef DEBUG_LOW 22#undef DEBUG_LOW
23 23
24#include <linux/config.h>
25#include <linux/spinlock.h> 24#include <linux/spinlock.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
diff --git a/arch/powerpc/mm/init_32.c b/arch/powerpc/mm/init_32.c
index b57fb3a2b7b..0e53ca8f02f 100644
--- a/arch/powerpc/mm/init_32.c
+++ b/arch/powerpc/mm/init_32.c
@@ -18,7 +18,6 @@
18 * 18 *
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index d454caada26..3ff374697e3 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -22,7 +22,6 @@
22 22
23#undef DEBUG 23#undef DEBUG
24 24
25#include <linux/config.h>
26#include <linux/signal.h> 25#include <linux/signal.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/lmb.c b/arch/powerpc/mm/lmb.c
index 8b6f522655a..4b17a735992 100644
--- a/arch/powerpc/mm/lmb.c
+++ b/arch/powerpc/mm/lmb.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/bitops.h> 15#include <linux/bitops.h>
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 089d939a0b3..eebd8b83a6b 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -18,7 +18,6 @@
18 * 18 *
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/mmu_context_32.c b/arch/powerpc/mm/mmu_context_32.c
index e326e4249e1..792086b0100 100644
--- a/arch/powerpc/mm/mmu_context_32.c
+++ b/arch/powerpc/mm/mmu_context_32.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/init.h> 27#include <linux/init.h>
29 28
diff --git a/arch/powerpc/mm/mmu_context_64.c b/arch/powerpc/mm/mmu_context_64.c
index e2051efa09c..90a06ac02d5 100644
--- a/arch/powerpc/mm/mmu_context_64.c
+++ b/arch/powerpc/mm/mmu_context_64.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index 90628601fac..8fcacb0239d 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index 7b278d83739..b1da0316549 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/signal.h> 25#include <linux/signal.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/arch/powerpc/mm/ppc_mmu_32.c b/arch/powerpc/mm/ppc_mmu_32.c
index 2ed43a493b3..7cceb2c44cb 100644
--- a/arch/powerpc/mm/ppc_mmu_32.c
+++ b/arch/powerpc/mm/ppc_mmu_32.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/mm.h> 27#include <linux/mm.h>
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 6a8bf6c6000..de0c8842415 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -16,7 +16,6 @@
16 16
17#undef DEBUG 17#undef DEBUG
18 18
19#include <linux/config.h>
20#include <asm/pgtable.h> 19#include <asm/pgtable.h>
21#include <asm/mmu.h> 20#include <asm/mmu.h>
22#include <asm/mmu_context.h> 21#include <asm/mmu_context.h>
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
index 8548dcf8ef8..dbc1abbde03 100644
--- a/arch/powerpc/mm/slb_low.S
+++ b/arch/powerpc/mm/slb_low.S
@@ -14,7 +14,6 @@
14 * 2 of the License, or (at your option) any later version. 14 * 2 of the License, or (at your option) any later version.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <asm/processor.h> 17#include <asm/processor.h>
19#include <asm/ppc_asm.h> 18#include <asm/ppc_asm.h>
20#include <asm/asm-offsets.h> 19#include <asm/asm-offsets.h>
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c
index 691320c90b7..eeeacab548e 100644
--- a/arch/powerpc/mm/stab.c
+++ b/arch/powerpc/mm/stab.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <asm/pgtable.h> 15#include <asm/pgtable.h>
17#include <asm/mmu.h> 16#include <asm/mmu.h>
18#include <asm/mmu_context.h> 17#include <asm/mmu_context.h>
diff --git a/arch/powerpc/mm/tlb_32.c b/arch/powerpc/mm/tlb_32.c
index 02eb23e036d..925ff70be8b 100644
--- a/arch/powerpc/mm/tlb_32.c
+++ b/arch/powerpc/mm/tlb_32.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/mm.h> 27#include <linux/mm.h>
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c
index e7449b068c8..f6eef78efd2 100644
--- a/arch/powerpc/mm/tlb_64.c
+++ b/arch/powerpc/mm/tlb_64.c
@@ -22,7 +22,6 @@
22 * 2 of the License, or (at your option) any later version. 22 * 2 of the License, or (at your option) any later version.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/init.h> 27#include <linux/init.h>
diff --git a/arch/powerpc/platforms/83xx/misc.c b/arch/powerpc/platforms/83xx/misc.c
index 1455bcef489..f0c6df61faa 100644
--- a/arch/powerpc/platforms/83xx/misc.c
+++ b/arch/powerpc/platforms/83xx/misc.c
@@ -9,7 +9,6 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15 14
diff --git a/arch/powerpc/platforms/83xx/mpc834x_sys.c b/arch/powerpc/platforms/83xx/mpc834x_sys.c
index 7e789d2420b..3e1c16eb4a6 100644
--- a/arch/powerpc/platforms/83xx/mpc834x_sys.c
+++ b/arch/powerpc/platforms/83xx/mpc834x_sys.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/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c
index 3baceb00fef..3b5e563c279 100644
--- a/arch/powerpc/platforms/83xx/pci.c
+++ b/arch/powerpc/platforms/83xx/pci.c
@@ -9,7 +9,6 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/powerpc/platforms/85xx/mpc8540_ads.h b/arch/powerpc/platforms/85xx/mpc8540_ads.h
index f770cadb208..c0d56d2bb5a 100644
--- a/arch/powerpc/platforms/85xx/mpc8540_ads.h
+++ b/arch/powerpc/platforms/85xx/mpc8540_ads.h
@@ -17,7 +17,6 @@
17#ifndef __MACH_MPC8540ADS_H__ 17#ifndef __MACH_MPC8540ADS_H__
18#define __MACH_MPC8540ADS_H__ 18#define __MACH_MPC8540ADS_H__
19 19
20#include <linux/config.h>
21#include <linux/initrd.h> 20#include <linux/initrd.h>
22 21
23#define BOARD_CCSRBAR ((uint)0xe0000000) 22#define BOARD_CCSRBAR ((uint)0xe0000000)
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ads.c b/arch/powerpc/platforms/85xx/mpc85xx_ads.c
index 5eeff370f5f..06a497676c9 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ads.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ads.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/pci.h> 16#include <linux/pci.h>
diff --git a/arch/powerpc/platforms/85xx/pci.c b/arch/powerpc/platforms/85xx/pci.c
index 48c8849c07c..1d51f3242ab 100644
--- a/arch/powerpc/platforms/85xx/pci.c
+++ b/arch/powerpc/platforms/85xx/pci.c
@@ -9,7 +9,6 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 7bff3cbc572..22da1335445 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -20,7 +20,6 @@
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/interrupt.h> 23#include <linux/interrupt.h>
25#include <linux/irq.h> 24#include <linux/irq.h>
26#include <linux/module.h> 25#include <linux/module.h>
@@ -305,11 +304,11 @@ static void iic_request_ipi(int ipi, const char *name)
305 int irq; 304 int irq;
306 305
307 irq = iic_ipi_to_irq(ipi); 306 irq = iic_ipi_to_irq(ipi);
308 /* IPIs are marked SA_INTERRUPT as they must run with irqs 307 /* IPIs are marked IRQF_DISABLED as they must run with irqs
309 * disabled */ 308 * disabled */
310 get_irq_desc(irq)->chip = &iic_pic; 309 get_irq_desc(irq)->chip = &iic_pic;
311 get_irq_desc(irq)->status |= IRQ_PER_CPU; 310 get_irq_desc(irq)->status |= IRQ_PER_CPU;
312 request_irq(irq, iic_ipi_action, SA_INTERRUPT, name, NULL); 311 request_irq(irq, iic_ipi_action, IRQF_DISABLED, name, NULL);
313} 312}
314 313
315void iic_request_IPIs(void) 314void iic_request_IPIs(void)
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c
index 695ac4e1617..9f2e4ed20a5 100644
--- a/arch/powerpc/platforms/cell/pervasive.c
+++ b/arch/powerpc/platforms/cell/pervasive.c
@@ -23,7 +23,6 @@
23 23
24#undef DEBUG 24#undef DEBUG
25 25
26#include <linux/config.h>
27#include <linux/interrupt.h> 26#include <linux/interrupt.h>
28#include <linux/irq.h> 27#include <linux/irq.h>
29#include <linux/percpu.h> 28#include <linux/percpu.h>
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index 00d112f9227..d8c2a29b3c1 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -14,7 +14,6 @@
14 */ 14 */
15#undef DEBUG 15#undef DEBUG
16 16
17#include <linux/config.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index bdf6c5fe58c..46aef064074 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -14,7 +14,6 @@
14 14
15#undef DEBUG 15#undef DEBUG
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index b306723abb8..656c1ef5f4a 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -274,19 +274,19 @@ spu_request_irqs(struct spu *spu)
274 274
275 snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", spu->number); 275 snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", spu->number);
276 ret = request_irq(irq_base + spu->isrc, 276 ret = request_irq(irq_base + spu->isrc,
277 spu_irq_class_0, SA_INTERRUPT, spu->irq_c0, spu); 277 spu_irq_class_0, IRQF_DISABLED, spu->irq_c0, spu);
278 if (ret) 278 if (ret)
279 goto out; 279 goto out;
280 280
281 snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", spu->number); 281 snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", spu->number);
282 ret = request_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc, 282 ret = request_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc,
283 spu_irq_class_1, SA_INTERRUPT, spu->irq_c1, spu); 283 spu_irq_class_1, IRQF_DISABLED, spu->irq_c1, spu);
284 if (ret) 284 if (ret)
285 goto out1; 285 goto out1;
286 286
287 snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", spu->number); 287 snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", spu->number);
288 ret = request_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc, 288 ret = request_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc,
289 spu_irq_class_2, SA_INTERRUPT, spu->irq_c2, spu); 289 spu_irq_class_2, IRQF_DISABLED, spu->irq_c2, spu);
290 if (ret) 290 if (ret)
291 goto out2; 291 goto out2;
292 goto out; 292 goto out;
diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index f1d35ddc9df..2d22cd59d6f 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -21,7 +21,6 @@
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/cell/spufs/hw_ops.c b/arch/powerpc/platforms/cell/spufs/hw_ops.c
index ede2cac46b6..c8670f51973 100644
--- a/arch/powerpc/platforms/cell/spufs/hw_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/hw_ops.c
@@ -18,7 +18,6 @@
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c
index 3dcc5d8d66b..1350294484b 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -26,7 +26,6 @@
26 26
27#undef DEBUG 27#undef DEBUG
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/errno.h> 30#include <linux/errno.h>
32#include <linux/sched.h> 31#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/cell/spufs/switch.c b/arch/powerpc/platforms/cell/spufs/switch.c
index c7fea2cca53..9d9d82dd32b 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -32,7 +32,6 @@
32 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 32 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/errno.h> 36#include <linux/errno.h>
38#include <linux/sched.h> 37#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c
index 53515daf01b..66c25349880 100644
--- a/arch/powerpc/platforms/chrp/pci.c
+++ b/arch/powerpc/platforms/chrp/pci.c
@@ -2,7 +2,6 @@
2 * CHRP pci routines. 2 * CHRP pci routines.
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7#include <linux/pci.h> 6#include <linux/pci.h>
8#include <linux/delay.h> 7#include <linux/delay.h>
diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index 18d89f38796..1f1771b212b 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -8,7 +8,6 @@
8 * bootup setup stuff.. 8 * bootup setup stuff..
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
index b616053bc33..c298ca1ea68 100644
--- a/arch/powerpc/platforms/chrp/smp.c
+++ b/arch/powerpc/platforms/chrp/smp.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/smp.h> 13#include <linux/smp.h>
diff --git a/arch/powerpc/platforms/iseries/irq.c b/arch/powerpc/platforms/iseries/irq.c
index 33bb4aa0e1e..f70e820e730 100644
--- a/arch/powerpc/platforms/iseries/irq.c
+++ b/arch/powerpc/platforms/iseries/irq.c
@@ -23,7 +23,6 @@
23 * Created, December 13, 2000 by Wayne Holm 23 * Created, December 13, 2000 by Wayne Holm
24 * End Change Activity 24 * End Change Activity
25 */ 25 */
26#include <linux/config.h>
27#include <linux/pci.h> 26#include <linux/pci.h>
28#include <linux/init.h> 27#include <linux/init.h>
29#include <linux/threads.h> 28#include <linux/threads.h>
diff --git a/arch/powerpc/platforms/iseries/lpardata.c b/arch/powerpc/platforms/iseries/lpardata.c
index 438e2dba63b..a7769445d6c 100644
--- a/arch/powerpc/platforms/iseries/lpardata.c
+++ b/arch/powerpc/platforms/iseries/lpardata.c
@@ -6,7 +6,6 @@
6 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 */ 8 */
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/threads.h> 10#include <linux/threads.h>
12#include <linux/module.h> 11#include <linux/module.h>
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 66c77e4f8ec..c877074745b 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -16,7 +16,6 @@
16 16
17#undef DEBUG 17#undef DEBUG
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/threads.h> 20#include <linux/threads.h>
22#include <linux/smp.h> 21#include <linux/smp.h>
diff --git a/arch/powerpc/platforms/iseries/smp.c b/arch/powerpc/platforms/iseries/smp.c
index 6f9d407a709..2eb095edb47 100644
--- a/arch/powerpc/platforms/iseries/smp.c
+++ b/arch/powerpc/platforms/iseries/smp.c
@@ -14,7 +14,6 @@
14 14
15#undef DEBUG 15#undef DEBUG
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/maple/setup.c b/arch/powerpc/platforms/maple/setup.c
index 4e32a5417fd..5cf90c28b14 100644
--- a/arch/powerpc/platforms/maple/setup.c
+++ b/arch/powerpc/platforms/maple/setup.c
@@ -13,7 +13,6 @@
13 13
14#define DEBUG 14#define DEBUG
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/maple/time.c b/arch/powerpc/platforms/maple/time.c
index b9a2b3d4bf3..9f7579b38c7 100644
--- a/arch/powerpc/platforms/maple/time.c
+++ b/arch/powerpc/platforms/maple/time.c
@@ -11,7 +11,6 @@
11 11
12#undef DEBUG 12#undef DEBUG
13 13
14#include <linux/config.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/powerpc/platforms/powermac/backlight.c b/arch/powerpc/platforms/powermac/backlight.c
index c7a27eddca6..69f65e215a5 100644
--- a/arch/powerpc/platforms/powermac/backlight.c
+++ b/arch/powerpc/platforms/powermac/backlight.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/fb.h> 11#include <linux/fb.h>
13#include <linux/backlight.h> 12#include <linux/backlight.h>
diff --git a/arch/powerpc/platforms/powermac/bootx_init.c b/arch/powerpc/platforms/powermac/bootx_init.c
index eacbfd9beab..cb257aeb91f 100644
--- a/arch/powerpc/platforms/powermac/bootx_init.c
+++ b/arch/powerpc/platforms/powermac/bootx_init.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/string.h> 13#include <linux/string.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/powerpc/platforms/powermac/cache.S b/arch/powerpc/platforms/powermac/cache.S
index fb977de6b70..6be1a4af335 100644
--- a/arch/powerpc/platforms/powermac/cache.S
+++ b/arch/powerpc/platforms/powermac/cache.S
@@ -14,7 +14,6 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <asm/processor.h> 17#include <asm/processor.h>
19#include <asm/ppc_asm.h> 18#include <asm/ppc_asm.h>
20#include <asm/cputable.h> 19#include <asm/cputable.h>
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index af2a8f9f122..62926248bdb 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
@@ -68,7 +67,7 @@ static unsigned int cur_freq;
68static unsigned int sleep_freq; 67static unsigned int sleep_freq;
69 68
70/* 69/*
71 * Different models uses different mecanisms to switch the frequency 70 * Different models uses different mechanisms to switch the frequency
72 */ 71 */
73static int (*set_speed_proc)(int low_speed); 72static int (*set_speed_proc)(int low_speed);
74static unsigned int (*get_speed_proc)(void); 73static unsigned int (*get_speed_proc)(void);
@@ -268,7 +267,7 @@ static int pmu_set_cpu_speed(int low_speed)
268 267
269 /* Make sure the decrementer won't interrupt us */ 268 /* Make sure the decrementer won't interrupt us */
270 asm volatile("mtdec %0" : : "r" (0x7fffffff)); 269 asm volatile("mtdec %0" : : "r" (0x7fffffff));
271 /* Make sure any pending DEC interrupt occuring while we did 270 /* Make sure any pending DEC interrupt occurring while we did
272 * the above didn't re-enable the DEC */ 271 * the above didn't re-enable the DEC */
273 mb(); 272 mb();
274 asm volatile("mtdec %0" : : "r" (0x7fffffff)); 273 asm volatile("mtdec %0" : : "r" (0x7fffffff));
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index b57e465a1b7..f08a1451613 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -10,7 +10,6 @@
10 * that is iMac G5 and latest single CPU desktop. 10 * that is iMac G5 and latest single CPU desktop.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index 85e00cb0006..f8313bf9a9f 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -16,7 +16,6 @@
16 * - Split split split... 16 * - Split split split...
17 * 17 *
18 */ 18 */
19#include <linux/config.h>
20#include <linux/types.h> 19#include <linux/types.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index c896ce83d41..ceafaf52a66 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -30,7 +30,6 @@
30#undef DEBUG 30#undef DEBUG
31#undef DEBUG_LOW 31#undef DEBUG_LOW
32 32
33#include <linux/config.h>
34#include <linux/types.h> 33#include <linux/types.h>
35#include <linux/sched.h> 34#include <linux/sched.h>
36#include <linux/init.h> 35#include <linux/init.h>
diff --git a/arch/powerpc/platforms/powermac/nvram.c b/arch/powerpc/platforms/powermac/nvram.c
index 262f967b880..41fa2409482 100644
--- a/arch/powerpc/platforms/powermac/nvram.c
+++ b/arch/powerpc/platforms/powermac/nvram.c
@@ -8,7 +8,6 @@
8 * 8 *
9 * Todo: - add support for the OF persistent properties 9 * Todo: - add support for the OF persistent properties
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/stddef.h> 13#include <linux/stddef.h>
diff --git a/arch/powerpc/platforms/powermac/pfunc_base.c b/arch/powerpc/platforms/powermac/pfunc_base.c
index a3bd3e728fa..d6eab8b3f7d 100644
--- a/arch/powerpc/platforms/powermac/pfunc_base.c
+++ b/arch/powerpc/platforms/powermac/pfunc_base.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/types.h> 1#include <linux/types.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include <linux/delay.h> 3#include <linux/delay.h>
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c
index 93e7505debc..b117adbf957 100644
--- a/arch/powerpc/platforms/powermac/pfunc_core.c
+++ b/arch/powerpc/platforms/powermac/pfunc_core.c
@@ -5,7 +5,6 @@
5 * FIXME: LOCKING !!! 5 * FIXME: LOCKING !!!
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/delay.h> 9#include <linux/delay.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c
index 9f6189af6dd..c9b09a9e605 100644
--- a/arch/powerpc/platforms/powermac/pic.c
+++ b/arch/powerpc/platforms/powermac/pic.c
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/stddef.h> 18#include <linux/stddef.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
@@ -382,7 +381,7 @@ static struct irqaction xmon_action = {
382 381
383static struct irqaction gatwick_cascade_action = { 382static struct irqaction gatwick_cascade_action = {
384 .handler = gatwick_action, 383 .handler = gatwick_action,
385 .flags = SA_INTERRUPT, 384 .flags = IRQF_DISABLED,
386 .mask = CPU_MASK_NONE, 385 .mask = CPU_MASK_NONE,
387 .name = "cascade", 386 .name = "cascade",
388}; 387};
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 89c5775f83b..8654b5f0783 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -23,7 +23,6 @@
23 * bootup setup stuff.. 23 * bootup setup stuff..
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/powermac/sleep.S b/arch/powerpc/platforms/powermac/sleep.S
index 22b113d19b2..1174ca128ef 100644
--- a/arch/powerpc/platforms/powermac/sleep.S
+++ b/arch/powerpc/platforms/powermac/sleep.S
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <asm/processor.h> 13#include <asm/processor.h>
15#include <asm/page.h> 14#include <asm/page.h>
16#include <asm/ppc_asm.h> 15#include <asm/ppc_asm.h>
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index 1065d87fc27..827b7121ffb 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -21,7 +21,6 @@
21 * as published by the Free Software Foundation; either version 21 * as published by the Free Software Foundation; either version
22 * 2 of the License, or (at your option) any later version. 22 * 2 of the License, or (at your option) any later version.
23 */ 23 */
24#include <linux/config.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/sched.h> 25#include <linux/sched.h>
27#include <linux/smp.h> 26#include <linux/smp.h>
@@ -378,7 +377,7 @@ static void __init psurge_dual_sync_tb(int cpu_nr)
378 377
379static struct irqaction psurge_irqaction = { 378static struct irqaction psurge_irqaction = {
380 .handler = psurge_primary_intr, 379 .handler = psurge_primary_intr,
381 .flags = SA_INTERRUPT, 380 .flags = IRQF_DISABLED,
382 .mask = CPU_MASK_NONE, 381 .mask = CPU_MASK_NONE,
383 .name = "primary IPI", 382 .name = "primary IPI",
384}; 383};
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index 890758aa966..a4173906e94 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 2003-2005 Benjamin Herrenschmidt. 9 * Copyright (C) 2003-2005 Benjamin Herrenschmidt.
10 * 10 *
11 */ 11 */
12#include <linux/config.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/powerpc/platforms/powermac/udbg_adb.c b/arch/powerpc/platforms/powermac/udbg_adb.c
index 06c8265c2ba..6124e59e103 100644
--- a/arch/powerpc/platforms/powermac/udbg_adb.c
+++ b/arch/powerpc/platforms/powermac/udbg_adb.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/string.h> 1#include <linux/string.h>
3#include <linux/kernel.h> 2#include <linux/kernel.h>
4#include <linux/errno.h> 3#include <linux/errno.h>
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index b4fa9f03b46..37e5b1eff91 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -8,7 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <asm/udbg.h> 12#include <asm/udbg.h>
14#include <asm/processor.h> 13#include <asm/processor.h>
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 0ec9a5445b9..aaad2c0afcb 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -175,7 +175,7 @@ static void eeh_report_failure(struct pci_dev *dev, void *userdata)
175 * 175 *
176 * pSeries systems will isolate a PCI slot if the PCI-Host 176 * pSeries systems will isolate a PCI slot if the PCI-Host
177 * bridge detects address or data parity errors, DMA's 177 * bridge detects address or data parity errors, DMA's
178 * occuring to wild addresses (which usually happen due to 178 * occurring to wild addresses (which usually happen due to
179 * bugs in device drivers or in PCI adapter firmware). 179 * bugs in device drivers or in PCI adapter firmware).
180 * Slot isolations also occur if #SERR, #PERR or other misc 180 * Slot isolations also occur if #SERR, #PERR or other misc
181 * PCI-related errors are detected. 181 * PCI-related errors are detected.
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 8cfb5706790..d67af2c6575 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -24,7 +24,6 @@
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/init.h> 27#include <linux/init.h>
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/slab.h> 29#include <linux/slab.h>
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 27480705996..3aeb4069904 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -21,7 +21,6 @@
21 21
22#undef DEBUG_LOW 22#undef DEBUG_LOW
23 23
24#include <linux/config.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/dma-mapping.h> 25#include <linux/dma-mapping.h>
27#include <linux/console.h> 26#include <linux/console.h>
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index b3197ff156c..999509d28af 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -18,7 +18,6 @@
18 18
19#undef DEBUG 19#undef DEBUG
20 20
21#include <linux/config.h>
22#include <linux/cpu.h> 21#include <linux/cpu.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 3cf78a6cd27..4ad144df49c 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -14,7 +14,6 @@
14 14
15#undef DEBUG 15#undef DEBUG
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index 19c03dd4300..2ffebe31cb2 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -8,7 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
@@ -60,7 +59,7 @@ static struct radix_tree_root irq_map = RADIX_TREE_INIT(GFP_ATOMIC);
60 59
61/* 60/*
62 * Mark IPIs as higher priority so we can take them inside interrupts that 61 * Mark IPIs as higher priority so we can take them inside interrupts that
63 * arent marked SA_INTERRUPT 62 * arent marked IRQF_DISABLED
64 */ 63 */
65#define IPI_PRIORITY 4 64#define IPI_PRIORITY 4
66 65
@@ -587,9 +586,12 @@ void xics_request_IPIs(void)
587{ 586{
588 virt_irq_to_real_map[XICS_IPI] = XICS_IPI; 587 virt_irq_to_real_map[XICS_IPI] = XICS_IPI;
589 588
590 /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ 589 /*
591 request_irq(irq_offset_up(XICS_IPI), xics_ipi_action, SA_INTERRUPT, 590 * IPIs are marked IRQF_DISABLED as they must run with irqs
592 "IPI", NULL); 591 * disabled
592 */
593 request_irq(irq_offset_up(XICS_IPI), xics_ipi_action,
594 IRQF_DISABLED, "IPI", NULL);
593 get_irq_desc(irq_offset_up(XICS_IPI))->status |= IRQ_PER_CPU; 595 get_irq_desc(irq_offset_up(XICS_IPI))->status |= IRQ_PER_CPU;
594} 596}
595#endif 597#endif
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index 7c7f34ce498..e32fadde1f7 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -27,7 +27,6 @@
27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/types.h> 31#include <linux/types.h>
33#include <linux/slab.h> 32#include <linux/slab.h>
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c
index 71a3275935e..e983972132d 100644
--- a/arch/powerpc/sysdev/fsl_soc.c
+++ b/arch/powerpc/sysdev/fsl_soc.c
@@ -9,7 +9,6 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c
index 2bff30f6d63..1a3ef1ab9d6 100644
--- a/arch/powerpc/sysdev/i8259.c
+++ b/arch/powerpc/sysdev/i8259.c
@@ -167,7 +167,7 @@ static struct resource pic_edgectrl_iores = {
167 167
168static struct irqaction i8259_irqaction = { 168static struct irqaction i8259_irqaction = {
169 .handler = no_action, 169 .handler = no_action,
170 .flags = SA_INTERRUPT, 170 .flags = IRQF_DISABLED,
171 .mask = CPU_MASK_NONE, 171 .mask = CPU_MASK_NONE,
172 .name = "82c59 secondary cascade", 172 .name = "82c59 secondary cascade",
173}; 173};
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 28df9c827ca..7e469358895 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -17,7 +17,6 @@
17#undef DEBUG_IRQ 17#undef DEBUG_IRQ
18#undef DEBUG_LOW 18#undef DEBUG_LOW
19 19
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/init.h> 22#include <linux/init.h>
@@ -541,7 +540,7 @@ static void mpic_end_ipi(unsigned int irq)
541 * IPIs are marked IRQ_PER_CPU. This has the side effect of 540 * IPIs are marked IRQ_PER_CPU. This has the side effect of
542 * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from 541 * preventing the IRQ_PENDING/IRQ_INPROGRESS logic from
543 * applying to them. We EOI them late to avoid re-entering. 542 * applying to them. We EOI them late to avoid re-entering.
544 * We mark IPI's with SA_INTERRUPT as they must run with 543 * We mark IPI's with IRQF_DISABLED as they must run with
545 * irqs disabled. 544 * irqs disabled.
546 */ 545 */
547 mpic_eoi(mpic); 546 mpic_eoi(mpic);
@@ -1028,14 +1027,17 @@ void mpic_request_ipis(void)
1028 1027
1029 printk("requesting IPIs ... \n"); 1028 printk("requesting IPIs ... \n");
1030 1029
1031 /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ 1030 /*
1032 request_irq(mpic->ipi_offset+0, mpic_ipi_action, SA_INTERRUPT, 1031 * IPIs are marked IRQF_DISABLED as they must run with irqs
1032 * disabled
1033 */
1034 request_irq(mpic->ipi_offset+0, mpic_ipi_action, IRQF_DISABLED,
1033 "IPI0 (call function)", mpic); 1035 "IPI0 (call function)", mpic);
1034 request_irq(mpic->ipi_offset+1, mpic_ipi_action, SA_INTERRUPT, 1036 request_irq(mpic->ipi_offset+1, mpic_ipi_action, IRQF_DISABLED,
1035 "IPI1 (reschedule)", mpic); 1037 "IPI1 (reschedule)", mpic);
1036 request_irq(mpic->ipi_offset+2, mpic_ipi_action, SA_INTERRUPT, 1038 request_irq(mpic->ipi_offset+2, mpic_ipi_action, IRQF_DISABLED,
1037 "IPI2 (unused)", mpic); 1039 "IPI2 (unused)", mpic);
1038 request_irq(mpic->ipi_offset+3, mpic_ipi_action, SA_INTERRUPT, 1040 request_irq(mpic->ipi_offset+3, mpic_ipi_action, IRQF_DISABLED,
1039 "IPI3 (debugger break)", mpic); 1041 "IPI3 (debugger break)", mpic);
1040 1042
1041 printk("IPIs requested... \n"); 1043 printk("IPIs requested... \n");
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 0741df8c41b..179b10ced8c 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -8,7 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/smp.h> 13#include <linux/smp.h>
diff --git a/arch/ppc/4xx_io/serial_sicc.c b/arch/ppc/4xx_io/serial_sicc.c
index 1e113d0f59b..b81a367dc27 100644
--- a/arch/ppc/4xx_io/serial_sicc.c
+++ b/arch/ppc/4xx_io/serial_sicc.c
@@ -28,7 +28,6 @@
28 * is compatible with normal ttyS* devices. 28 * is compatible with normal ttyS* devices.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/errno.h> 33#include <linux/errno.h>
diff --git a/arch/ppc/8260_io/fcc_enet.c b/arch/ppc/8260_io/fcc_enet.c
index 4edeede9ccf..e347fe88316 100644
--- a/arch/ppc/8260_io/fcc_enet.c
+++ b/arch/ppc/8260_io/fcc_enet.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/sched.h> 25#include <linux/sched.h>
27#include <linux/string.h> 26#include <linux/string.h>
@@ -2117,7 +2116,7 @@ init_fcc_startup(fcc_info_t *fip, struct net_device *dev)
2117 2116
2118#ifdef PHY_INTERRUPT 2117#ifdef PHY_INTERRUPT
2119#ifdef CONFIG_ADS8272 2118#ifdef CONFIG_ADS8272
2120 if (request_irq(PHY_INTERRUPT, mii_link_interrupt, SA_SHIRQ, 2119 if (request_irq(PHY_INTERRUPT, mii_link_interrupt, IRQF_SHARED,
2121 "mii", dev) < 0) 2120 "mii", dev) < 0)
2122 printk(KERN_CRIT "Can't get MII IRQ %d\n", PHY_INTERRUPT); 2121 printk(KERN_CRIT "Can't get MII IRQ %d\n", PHY_INTERRUPT);
2123#else 2122#else
diff --git a/arch/ppc/8xx_io/cs4218.h b/arch/ppc/8xx_io/cs4218.h
index f1c7392255f..e5f943045af 100644
--- a/arch/ppc/8xx_io/cs4218.h
+++ b/arch/ppc/8xx_io/cs4218.h
@@ -13,7 +13,6 @@
13#define _cs4218_h_ 13#define _cs4218_h_
14 14
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/config.h>
17 16
18#define SND_NDEVS 256 /* Number of supported devices */ 17#define SND_NDEVS 256 /* Number of supported devices */
19#define SND_DEV_CTL 0 /* Control port /dev/mixer */ 18#define SND_DEV_CTL 0 /* Control port /dev/mixer */
diff --git a/arch/ppc/8xx_io/cs4218_tdm.c b/arch/ppc/8xx_io/cs4218_tdm.c
index a892356d5c3..f5f300fc213 100644
--- a/arch/ppc/8xx_io/cs4218_tdm.c
+++ b/arch/ppc/8xx_io/cs4218_tdm.c
@@ -14,7 +14,6 @@
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/timer.h> 15#include <linux/timer.h>
16#include <linux/major.h> 16#include <linux/major.h>
17#include <linux/config.h>
18#include <linux/fcntl.h> 17#include <linux/fcntl.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/ppc/8xx_io/enet.c b/arch/ppc/8xx_io/enet.c
index ece6a9fbe09..a695375c3e4 100644
--- a/arch/ppc/8xx_io/enet.c
+++ b/arch/ppc/8xx_io/enet.c
@@ -22,7 +22,6 @@
22 * small packets. 22 * small packets.
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/string.h> 27#include <linux/string.h>
diff --git a/arch/ppc/8xx_io/fec.c b/arch/ppc/8xx_io/fec.c
index 62f68d6181c..8b6295bbb56 100644
--- a/arch/ppc/8xx_io/fec.c
+++ b/arch/ppc/8xx_io/fec.c
@@ -28,7 +28,6 @@
28 * Thomas Lange, thomas@corelatus.com 28 * Thomas Lange, thomas@corelatus.com
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/sched.h> 32#include <linux/sched.h>
34#include <linux/string.h> 33#include <linux/string.h>
diff --git a/arch/ppc/8xx_io/micropatch.c b/arch/ppc/8xx_io/micropatch.c
index 312af0776c3..cfad46ba17e 100644
--- a/arch/ppc/8xx_io/micropatch.c
+++ b/arch/ppc/8xx_io/micropatch.c
@@ -4,7 +4,6 @@
4 * also relocates SMC2, but this would require additional changes 4 * also relocates SMC2, but this would require additional changes
5 * to uart.c, so I am holding off on that for a moment. 5 * to uart.c, so I am holding off on that for a moment.
6 */ 6 */
7#include <linux/config.h>
8#include <linux/errno.h> 7#include <linux/errno.h>
9#include <linux/sched.h> 8#include <linux/sched.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c
index b2bba052ab9..265fcd3c6ab 100644
--- a/arch/ppc/amiga/amiints.c
+++ b/arch/ppc/amiga/amiints.c
@@ -35,7 +35,6 @@
35 * /Jes 35 * /Jes
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/types.h> 38#include <linux/types.h>
40#include <linux/kernel.h> 39#include <linux/kernel.h>
41#include <linux/sched.h> 40#include <linux/sched.h>
diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c
index bbe47c9bd70..bc50ed11957 100644
--- a/arch/ppc/amiga/config.c
+++ b/arch/ppc/amiga/config.c
@@ -12,7 +12,6 @@
12 * Miscellaneous Amiga stuff 12 * Miscellaneous Amiga stuff
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
diff --git a/arch/ppc/boot/common/crt0.S b/arch/ppc/boot/common/crt0.S
index 4d31b824bbd..8f0ef04b8de 100644
--- a/arch/ppc/boot/common/crt0.S
+++ b/arch/ppc/boot/common/crt0.S
@@ -18,7 +18,6 @@
18 * 2 of the License, or (at your option) any later version. 18 * 2 of the License, or (at your option) any later version.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <asm/ppc_asm.h> 21#include <asm/ppc_asm.h>
23 22
24 .text 23 .text
diff --git a/arch/ppc/boot/common/misc-common.c b/arch/ppc/boot/common/misc-common.c
index 073830a8559..8e1fccd96fc 100644
--- a/arch/ppc/boot/common/misc-common.c
+++ b/arch/ppc/boot/common/misc-common.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15#include <stdarg.h> /* for va_ bits */ 15#include <stdarg.h> /* for va_ bits */
16#include <linux/config.h>
17#include <linux/string.h> 16#include <linux/string.h>
18#include <linux/zlib.h> 17#include <linux/zlib.h>
19#include "nonstdio.h" 18#include "nonstdio.h"
diff --git a/arch/ppc/boot/common/ns16550.c b/arch/ppc/boot/common/ns16550.c
index 4f00c93ac87..fc5b7204194 100644
--- a/arch/ppc/boot/common/ns16550.c
+++ b/arch/ppc/boot/common/ns16550.c
@@ -2,7 +2,6 @@
2 * COM1 NS16550 support 2 * COM1 NS16550 support
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/types.h> 5#include <linux/types.h>
7#include <linux/serial.h> 6#include <linux/serial.h>
8#include <linux/serial_reg.h> 7#include <linux/serial_reg.h>
diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c
index 3a51b106294..840bff2a45f 100644
--- a/arch/ppc/boot/simple/embed_config.c
+++ b/arch/ppc/boot/simple/embed_config.c
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#include <linux/types.h> 10#include <linux/types.h>
11#include <linux/config.h>
12#include <linux/string.h> 11#include <linux/string.h>
13#include <asm/reg.h> 12#include <asm/reg.h>
14#ifdef CONFIG_8xx 13#ifdef CONFIG_8xx
diff --git a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S
index 160da1006ff..1b4d7b1d4ec 100644
--- a/arch/ppc/boot/simple/head.S
+++ b/arch/ppc/boot/simple/head.S
@@ -11,7 +11,6 @@
11 * or implied. 11 * or implied.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <asm/reg.h> 14#include <asm/reg.h>
16#include <asm/cache.h> 15#include <asm/cache.h>
17#include <asm/ppc_asm.h> 16#include <asm/ppc_asm.h>
diff --git a/arch/ppc/boot/simple/m8xx_tty.c b/arch/ppc/boot/simple/m8xx_tty.c
index 1d2778e248c..cacc40fdbcf 100644
--- a/arch/ppc/boot/simple/m8xx_tty.c
+++ b/arch/ppc/boot/simple/m8xx_tty.c
@@ -8,7 +8,6 @@
8 * use COM1 instead of SMC1 as the console port. This kinda sucks 8 * use COM1 instead of SMC1 as the console port. This kinda sucks
9 * for the rest of the kernel, so here we force the use of SMC1 again. 9 * for the rest of the kernel, so here we force the use of SMC1 again.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <asm/uaccess.h> 12#include <asm/uaccess.h>
14#include <asm/mpc8xx.h> 13#include <asm/mpc8xx.h>
diff --git a/arch/ppc/boot/simple/misc-chestnut.c b/arch/ppc/boot/simple/misc-chestnut.c
index b94e142ad89..14a4b56d4f8 100644
--- a/arch/ppc/boot/simple/misc-chestnut.c
+++ b/arch/ppc/boot/simple/misc-chestnut.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <asm/io.h> 13#include <asm/io.h>
15#include <asm/mv64x60_defs.h> 14#include <asm/mv64x60_defs.h>
diff --git a/arch/ppc/boot/simple/misc-embedded.c b/arch/ppc/boot/simple/misc-embedded.c
index 3865f3f8dcd..10219eeca05 100644
--- a/arch/ppc/boot/simple/misc-embedded.c
+++ b/arch/ppc/boot/simple/misc-embedded.c
@@ -6,7 +6,6 @@
6 * Currently maintained by: Tom Rini <trini@kernel.crashing.org> 6 * Currently maintained by: Tom Rini <trini@kernel.crashing.org>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/string.h> 10#include <linux/string.h>
12#include <asm/bootinfo.h> 11#include <asm/bootinfo.h>
diff --git a/arch/ppc/boot/simple/misc-ev64260.c b/arch/ppc/boot/simple/misc-ev64260.c
index 2678c224af2..0b3978632ac 100644
--- a/arch/ppc/boot/simple/misc-ev64260.c
+++ b/arch/ppc/boot/simple/misc-ev64260.c
@@ -10,7 +10,6 @@
10 * or implied. 10 * or implied.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <asm/reg.h> 14#include <asm/reg.h>
16#include <asm/io.h> 15#include <asm/io.h>
diff --git a/arch/ppc/boot/simple/misc-ev64360.c b/arch/ppc/boot/simple/misc-ev64360.c
index a212b5b988c..96eaebb78df 100644
--- a/arch/ppc/boot/simple/misc-ev64360.c
+++ b/arch/ppc/boot/simple/misc-ev64360.c
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <asm/io.h> 23#include <asm/io.h>
25#include <asm/mv64x60_defs.h> 24#include <asm/mv64x60_defs.h>
diff --git a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c
index d97f2ee6f04..79a1bbcbc6c 100644
--- a/arch/ppc/boot/simple/misc-katana.c
+++ b/arch/ppc/boot/simple/misc-katana.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <asm/io.h> 13#include <asm/io.h>
15#include <asm/mv64x60_defs.h> 14#include <asm/mv64x60_defs.h>
diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c
index 71ff20fd494..28b3108083e 100644
--- a/arch/ppc/boot/simple/misc-mv64x60.c
+++ b/arch/ppc/boot/simple/misc-mv64x60.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <asm/io.h> 13#include <asm/io.h>
15#include <asm/mv64x60_defs.h> 14#include <asm/mv64x60_defs.h>
diff --git a/arch/ppc/boot/simple/misc-prep.c b/arch/ppc/boot/simple/misc-prep.c
index 63def9d13d7..0086e1cfb48 100644
--- a/arch/ppc/boot/simple/misc-prep.c
+++ b/arch/ppc/boot/simple/misc-prep.c
@@ -4,7 +4,6 @@
4 * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu> 4 * In the past: Gary Thomas, Cort Dougan <cort@cs.nmt.edu>
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/pci_ids.h> 7#include <linux/pci_ids.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <asm/residual.h> 9#include <asm/residual.h>
diff --git a/arch/ppc/boot/simple/misc-spruce.c b/arch/ppc/boot/simple/misc-spruce.c
index 0cad2f557a1..5b3a6c6f113 100644
--- a/arch/ppc/boot/simple/misc-spruce.c
+++ b/arch/ppc/boot/simple/misc-spruce.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/config.h>
17#include <linux/pci.h> 16#include <linux/pci.h>
18 17
19#include <asm/bootinfo.h> 18#include <asm/bootinfo.h>
diff --git a/arch/ppc/boot/simple/misc.c b/arch/ppc/boot/simple/misc.c
index 3d78571ad94..a5df0896369 100644
--- a/arch/ppc/boot/simple/misc.c
+++ b/arch/ppc/boot/simple/misc.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/config.h>
19#include <linux/string.h> 18#include <linux/string.h>
20 19
21#include <asm/page.h> 20#include <asm/page.h>
diff --git a/arch/ppc/boot/simple/mpc52xx_tty.c b/arch/ppc/boot/simple/mpc52xx_tty.c
index 1964493cf3b..7b5924cc3c0 100644
--- a/arch/ppc/boot/simple/mpc52xx_tty.c
+++ b/arch/ppc/boot/simple/mpc52xx_tty.c
@@ -9,7 +9,6 @@
9 * "as is" without any warranty of any kind, whether express or implied. 9 * "as is" without any warranty of any kind, whether express or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <asm/uaccess.h> 13#include <asm/uaccess.h>
15#include <asm/mpc52xx.h> 14#include <asm/mpc52xx.h>
diff --git a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c
index 0c52f5c784a..781e040a97d 100644
--- a/arch/ppc/boot/simple/mv64x60_tty.c
+++ b/arch/ppc/boot/simple/mv64x60_tty.c
@@ -12,7 +12,6 @@
12 12
13/* This code assumes that the data cache has been disabled (L1, L2, L3). */ 13/* This code assumes that the data cache has been disabled (L1, L2, L3). */
14 14
15#include <linux/config.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/serial_reg.h> 16#include <linux/serial_reg.h>
18#include <asm/serial.h> 17#include <asm/serial.h>
diff --git a/arch/ppc/boot/simple/openbios.c b/arch/ppc/boot/simple/openbios.c
index 3f2ed53f793..6ff2701598f 100644
--- a/arch/ppc/boot/simple/openbios.c
+++ b/arch/ppc/boot/simple/openbios.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/config.h>
16#include <linux/string.h> 15#include <linux/string.h>
17#include <asm/ppcboot.h> 16#include <asm/ppcboot.h>
18#include <asm/ibm4xx.h> 17#include <asm/ibm4xx.h>
diff --git a/arch/ppc/boot/simple/pibs.c b/arch/ppc/boot/simple/pibs.c
index 67222d57c34..f39d01e0619 100644
--- a/arch/ppc/boot/simple/pibs.c
+++ b/arch/ppc/boot/simple/pibs.c
@@ -6,7 +6,6 @@
6 */ 6 */
7 7
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/config.h>
10#include <linux/string.h> 9#include <linux/string.h>
11#include <linux/ctype.h> 10#include <linux/ctype.h>
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
diff --git a/arch/ppc/boot/simple/relocate.S b/arch/ppc/boot/simple/relocate.S
index 2533113c1cc..0c021556d78 100644
--- a/arch/ppc/boot/simple/relocate.S
+++ b/arch/ppc/boot/simple/relocate.S
@@ -13,7 +13,6 @@
13 * or implied. 13 * or implied.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <asm/cache.h> 16#include <asm/cache.h>
18#include <asm/ppc_asm.h> 17#include <asm/ppc_asm.h>
19 18
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c
index 2f5c5e15761..1f91eca2f3d 100644
--- a/arch/ppc/kernel/asm-offsets.c
+++ b/arch/ppc/kernel/asm-offsets.c
@@ -8,7 +8,6 @@
8 * #defines from the assembly-language output. 8 * #defines from the assembly-language output.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/signal.h> 11#include <linux/signal.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/arch/ppc/kernel/cpu_setup_power4.S b/arch/ppc/kernel/cpu_setup_power4.S
index d7bfd60e21f..6a674e834ee 100644
--- a/arch/ppc/kernel/cpu_setup_power4.S
+++ b/arch/ppc/kernel/cpu_setup_power4.S
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/processor.h> 12#include <asm/processor.h>
14#include <asm/page.h> 13#include <asm/page.h>
15#include <asm/ppc_asm.h> 14#include <asm/ppc_asm.h>
diff --git a/arch/ppc/kernel/dma-mapping.c b/arch/ppc/kernel/dma-mapping.c
index 61465ec88bc..10fec736396 100644
--- a/arch/ppc/kernel/dma-mapping.c
+++ b/arch/ppc/kernel/dma-mapping.c
@@ -22,7 +22,6 @@
22 * published by the Free Software Foundation. 22 * published by the Free Software Foundation.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/signal.h> 26#include <linux/signal.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
index 1adc9145516..a9d455369dc 100644
--- a/arch/ppc/kernel/entry.S
+++ b/arch/ppc/kernel/entry.S
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
24#include <linux/sys.h> 23#include <linux/sys.h>
25#include <linux/threads.h> 24#include <linux/threads.h>
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
index 01303efedda..100052aaea9 100644
--- a/arch/ppc/kernel/head.S
+++ b/arch/ppc/kernel/head.S
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <asm/processor.h> 25#include <asm/processor.h>
27#include <asm/page.h> 26#include <asm/page.h>
28#include <asm/mmu.h> 27#include <asm/mmu.h>
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S
index 0d8b88219d3..7e44de5a26d 100644
--- a/arch/ppc/kernel/head_44x.S
+++ b/arch/ppc/kernel/head_44x.S
@@ -28,7 +28,6 @@
28 * option) any later version. 28 * option) any later version.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <asm/processor.h> 31#include <asm/processor.h>
33#include <asm/page.h> 32#include <asm/page.h>
34#include <asm/mmu.h> 33#include <asm/mmu.h>
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S
index 10c261c6702..51da157a629 100644
--- a/arch/ppc/kernel/head_4xx.S
+++ b/arch/ppc/kernel/head_4xx.S
@@ -31,7 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <asm/processor.h> 34#include <asm/processor.h>
36#include <asm/page.h> 35#include <asm/page.h>
37#include <asm/mmu.h> 36#include <asm/mmu.h>
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S
index 7a2f20583be..944c35c2427 100644
--- a/arch/ppc/kernel/head_8xx.S
+++ b/arch/ppc/kernel/head_8xx.S
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <asm/processor.h> 22#include <asm/processor.h>
24#include <asm/page.h> 23#include <asm/page.h>
25#include <asm/mmu.h> 24#include <asm/mmu.h>
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S
index dd86bbed762..66877bdfe0b 100644
--- a/arch/ppc/kernel/head_fsl_booke.S
+++ b/arch/ppc/kernel/head_fsl_booke.S
@@ -30,7 +30,6 @@
30 * option) any later version. 30 * option) any later version.
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/threads.h> 33#include <linux/threads.h>
35#include <asm/processor.h> 34#include <asm/processor.h>
36#include <asm/page.h> 35#include <asm/page.h>
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index 5a936566fd6..2fa0075f2b5 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/sys.h> 15#include <linux/sys.h>
17#include <asm/unistd.h> 16#include <asm/unistd.h>
18#include <asm/errno.h> 17#include <asm/errno.h>
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c
index 242bb052be6..63808e01cb0 100644
--- a/arch/ppc/kernel/pci.c
+++ b/arch/ppc/kernel/pci.c
@@ -2,7 +2,6 @@
2 * Common prep/chrp pci routines. -- Cort 2 * Common prep/chrp pci routines. -- Cort
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7#include <linux/pci.h> 6#include <linux/pci.h>
8#include <linux/delay.h> 7#include <linux/delay.h>
diff --git a/arch/ppc/kernel/ppc-stub.c b/arch/ppc/kernel/ppc-stub.c
index d61889c2404..5f9ee7bb67e 100644
--- a/arch/ppc/kernel/ppc-stub.c
+++ b/arch/ppc/kernel/ppc-stub.c
@@ -99,7 +99,6 @@
99 * 99 *
100 ****************************************************************************/ 100 ****************************************************************************/
101 101
102#include <linux/config.h>
103#include <linux/kernel.h> 102#include <linux/kernel.h>
104#include <linux/string.h> 103#include <linux/string.h>
105#include <linux/mm.h> 104#include <linux/mm.h>
diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c
index 75c64504374..bd129d3c2cc 100644
--- a/arch/ppc/kernel/ppc_htab.c
+++ b/arch/ppc/kernel/ppc_htab.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/proc_fs.h> 15#include <linux/proc_fs.h>
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c
index b250b1b539b..50c1b4739ca 100644
--- a/arch/ppc/kernel/ppc_ksyms.c
+++ b/arch/ppc/kernel/ppc_ksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/threads.h> 2#include <linux/threads.h>
4#include <linux/smp.h> 3#include <linux/smp.h>
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 4b4607d89bf..faf2940300b 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -2,7 +2,6 @@
2 * Common prep boot and setup code. 2 * Common prep boot and setup code.
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/string.h> 6#include <linux/string.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
diff --git a/arch/ppc/kernel/smp-tbsync.c b/arch/ppc/kernel/smp-tbsync.c
index 6a5694fcc71..1576758deba 100644
--- a/arch/ppc/kernel/smp-tbsync.c
+++ b/arch/ppc/kernel/smp-tbsync.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11#include <linux/smp.h> 10#include <linux/smp.h>
diff --git a/arch/ppc/kernel/smp.c b/arch/ppc/kernel/smp.c
index f77795a64da..ca57e896a36 100644
--- a/arch/ppc/kernel/smp.c
+++ b/arch/ppc/kernel/smp.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/ppc/kernel/time.c b/arch/ppc/kernel/time.c
index 53ea723af60..6ab8cc7226a 100644
--- a/arch/ppc/kernel/time.c
+++ b/arch/ppc/kernel/time.c
@@ -42,7 +42,6 @@
42 * "A Kernel Model for Precision Timekeeping" by Dave Mills 42 * "A Kernel Model for Precision Timekeeping" by Dave Mills
43 */ 43 */
44 44
45#include <linux/config.h>
46#include <linux/errno.h> 45#include <linux/errno.h>
47#include <linux/sched.h> 46#include <linux/sched.h>
48#include <linux/kernel.h> 47#include <linux/kernel.h>
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c
index 1c0d68026ab..d7a433049b4 100644
--- a/arch/ppc/kernel/traps.c
+++ b/arch/ppc/kernel/traps.c
@@ -25,7 +25,6 @@
25#include <linux/user.h> 25#include <linux/user.h>
26#include <linux/a.out.h> 26#include <linux/a.out.h>
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/config.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/prctl.h> 30#include <linux/prctl.h>
diff --git a/arch/ppc/lib/locks.c b/arch/ppc/lib/locks.c
index c450dc4b766..ea4aee6b20e 100644
--- a/arch/ppc/lib/locks.c
+++ b/arch/ppc/lib/locks.c
@@ -4,7 +4,6 @@
4 * Written by Cort Dougan (cort@cs.nmt.edu) 4 * Written by Cort Dougan (cort@cs.nmt.edu)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/spinlock.h> 8#include <linux/spinlock.h>
10#include <linux/module.h> 9#include <linux/module.h>
diff --git a/arch/ppc/lib/string.S b/arch/ppc/lib/string.S
index 2e258c49e8b..84ed33ab4c2 100644
--- a/arch/ppc/lib/string.S
+++ b/arch/ppc/lib/string.S
@@ -8,7 +8,6 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11#include <linux/config.h>
12#include <asm/processor.h> 11#include <asm/processor.h>
13#include <asm/cache.h> 12#include <asm/cache.h>
14#include <asm/errno.h> 13#include <asm/errno.h>
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c
index e0152a9b26e..0a0a0487b33 100644
--- a/arch/ppc/mm/44x_mmu.c
+++ b/arch/ppc/mm/44x_mmu.c
@@ -24,7 +24,6 @@
24 * 24 *
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/signal.h> 27#include <linux/signal.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
diff --git a/arch/ppc/mm/4xx_mmu.c b/arch/ppc/mm/4xx_mmu.c
index 4d006aa1a0d..838e09db71d 100644
--- a/arch/ppc/mm/4xx_mmu.c
+++ b/arch/ppc/mm/4xx_mmu.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/signal.h> 24#include <linux/signal.h>
26#include <linux/sched.h> 25#include <linux/sched.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index 8e08ca32531..5cdfb71fcb0 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -13,7 +13,6 @@
13 * 2 of the License, or (at your option) any later version. 13 * 2 of the License, or (at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/signal.h> 16#include <linux/signal.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/arch/ppc/mm/fsl_booke_mmu.c b/arch/ppc/mm/fsl_booke_mmu.c
index 5d581bb3aa1..123da03ab11 100644
--- a/arch/ppc/mm/fsl_booke_mmu.c
+++ b/arch/ppc/mm/fsl_booke_mmu.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/signal.h> 29#include <linux/signal.h>
31#include <linux/sched.h> 30#include <linux/sched.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
diff --git a/arch/ppc/mm/hashtable.S b/arch/ppc/mm/hashtable.S
index 31d0a924317..e756942e65c 100644
--- a/arch/ppc/mm/hashtable.S
+++ b/arch/ppc/mm/hashtable.S
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <asm/processor.h> 24#include <asm/processor.h>
26#include <asm/page.h> 25#include <asm/page.h>
27#include <asm/pgtable.h> 26#include <asm/pgtable.h>
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c
index c9bd184a295..523392d460f 100644
--- a/arch/ppc/mm/init.c
+++ b/arch/ppc/mm/init.c
@@ -18,7 +18,6 @@
18 * 18 *
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/arch/ppc/mm/mem_pieces.c b/arch/ppc/mm/mem_pieces.c
index 3d639052017..6030a0ddfbb 100644
--- a/arch/ppc/mm/mem_pieces.c
+++ b/arch/ppc/mm/mem_pieces.c
@@ -14,7 +14,6 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/stddef.h> 18#include <linux/stddef.h>
20#include <linux/init.h> 19#include <linux/init.h>
diff --git a/arch/ppc/mm/mmu_context.c b/arch/ppc/mm/mmu_context.c
index 8784f371503..85afa7f8aa7 100644
--- a/arch/ppc/mm/mmu_context.c
+++ b/arch/ppc/mm/mmu_context.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/init.h> 27#include <linux/init.h>
29 28
diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c
index 706bca8eb14..354a9408f02 100644
--- a/arch/ppc/mm/pgtable.c
+++ b/arch/ppc/mm/pgtable.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/arch/ppc/mm/ppc_mmu.c b/arch/ppc/mm/ppc_mmu.c
index 25bb6f3347c..973f1e6afa5 100644
--- a/arch/ppc/mm/ppc_mmu.c
+++ b/arch/ppc/mm/ppc_mmu.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/mm.h> 27#include <linux/mm.h>
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/arch/ppc/mm/tlb.c b/arch/ppc/mm/tlb.c
index 606b023196a..fa29740a28f 100644
--- a/arch/ppc/mm/tlb.c
+++ b/arch/ppc/mm/tlb.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/mm.h> 27#include <linux/mm.h>
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c
index b940cfd646c..349660b84a0 100644
--- a/arch/ppc/platforms/4xx/bamboo.c
+++ b/arch/ppc/platforms/4xx/bamboo.c
@@ -10,7 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/stddef.h> 13#include <linux/stddef.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
diff --git a/arch/ppc/platforms/4xx/bamboo.h b/arch/ppc/platforms/4xx/bamboo.h
index 31c0dd6a26c..dcd3d09a0a7 100644
--- a/arch/ppc/platforms/4xx/bamboo.h
+++ b/arch/ppc/platforms/4xx/bamboo.h
@@ -15,7 +15,6 @@
15#ifndef __ASM_BAMBOO_H__ 15#ifndef __ASM_BAMBOO_H__
16#define __ASM_BAMBOO_H__ 16#define __ASM_BAMBOO_H__
17 17
18#include <linux/config.h>
19#include <platforms/4xx/ibm440ep.h> 18#include <platforms/4xx/ibm440ep.h>
20 19
21/* F/W TLB mapping used in bootloader glue to reset EMAC */ 20/* F/W TLB mapping used in bootloader glue to reset EMAC */
diff --git a/arch/ppc/platforms/4xx/bubinga.c b/arch/ppc/platforms/4xx/bubinga.c
index ce48a4f08cb..4009f4983ca 100644
--- a/arch/ppc/platforms/4xx/bubinga.c
+++ b/arch/ppc/platforms/4xx/bubinga.c
@@ -10,7 +10,6 @@
10 * or implied. 10 * or implied.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/smp.h> 14#include <linux/smp.h>
16#include <linux/threads.h> 15#include <linux/threads.h>
diff --git a/arch/ppc/platforms/4xx/bubinga.h b/arch/ppc/platforms/4xx/bubinga.h
index 606aa9fa5ca..5c408060eb3 100644
--- a/arch/ppc/platforms/4xx/bubinga.h
+++ b/arch/ppc/platforms/4xx/bubinga.h
@@ -19,7 +19,6 @@
19#ifndef __BUBINGA_H__ 19#ifndef __BUBINGA_H__
20#define __BUBINGA_H__ 20#define __BUBINGA_H__
21 21
22#include <linux/config.h>
23#include <platforms/4xx/ibm405ep.h> 22#include <platforms/4xx/ibm405ep.h>
24#include <asm/ppcboot.h> 23#include <asm/ppcboot.h>
25 24
diff --git a/arch/ppc/platforms/4xx/cpci405.c b/arch/ppc/platforms/4xx/cpci405.c
index 970b69831e6..367430998fc 100644
--- a/arch/ppc/platforms/4xx/cpci405.c
+++ b/arch/ppc/platforms/4xx/cpci405.c
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/pci.h> 19#include <linux/pci.h>
21#include <asm/system.h> 20#include <asm/system.h>
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
index b4ecb9c7985..f0f9cc8480c 100644
--- a/arch/ppc/platforms/4xx/ebony.c
+++ b/arch/ppc/platforms/4xx/ebony.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/stddef.h> 16#include <linux/stddef.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/arch/ppc/platforms/4xx/ebony.h b/arch/ppc/platforms/4xx/ebony.h
index 27b2e77c7c8..f40e33d39d7 100644
--- a/arch/ppc/platforms/4xx/ebony.h
+++ b/arch/ppc/platforms/4xx/ebony.h
@@ -15,7 +15,6 @@
15#ifndef __ASM_EBONY_H__ 15#ifndef __ASM_EBONY_H__
16#define __ASM_EBONY_H__ 16#define __ASM_EBONY_H__
17 17
18#include <linux/config.h>
19#include <platforms/4xx/ibm440gp.h> 18#include <platforms/4xx/ibm440gp.h>
20 19
21/* F/W TLB mapping used in bootloader glue to reset EMAC */ 20/* F/W TLB mapping used in bootloader glue to reset EMAC */
diff --git a/arch/ppc/platforms/4xx/ep405.c b/arch/ppc/platforms/4xx/ep405.c
index 6efa91ff9c0..ae5c82081c9 100644
--- a/arch/ppc/platforms/4xx/ep405.c
+++ b/arch/ppc/platforms/4xx/ep405.c
@@ -9,7 +9,6 @@
9 * is licensed "as is" without any warranty of any kind, whether express 9 * is licensed "as is" without any warranty of any kind, whether express
10 * or implied. 10 * or implied.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/pci.h> 13#include <linux/pci.h>
15#include <asm/system.h> 14#include <asm/system.h>
diff --git a/arch/ppc/platforms/4xx/ibm405ep.c b/arch/ppc/platforms/4xx/ibm405ep.c
index 55af769a6e7..fb3630a1608 100644
--- a/arch/ppc/platforms/4xx/ibm405ep.c
+++ b/arch/ppc/platforms/4xx/ibm405ep.c
@@ -10,7 +10,6 @@
10 * or implied. 10 * or implied.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/smp.h> 14#include <linux/smp.h>
16#include <linux/threads.h> 15#include <linux/threads.h>
diff --git a/arch/ppc/platforms/4xx/ibm405ep.h b/arch/ppc/platforms/4xx/ibm405ep.h
index fe46640de15..3ef20a54708 100644
--- a/arch/ppc/platforms/4xx/ibm405ep.h
+++ b/arch/ppc/platforms/4xx/ibm405ep.h
@@ -14,7 +14,6 @@
14#ifndef __ASM_IBM405EP_H__ 14#ifndef __ASM_IBM405EP_H__
15#define __ASM_IBM405EP_H__ 15#define __ASM_IBM405EP_H__
16 16
17#include <linux/config.h>
18 17
19/* ibm405.h at bottom of this file */ 18/* ibm405.h at bottom of this file */
20 19
diff --git a/arch/ppc/platforms/4xx/ibm405gp.c b/arch/ppc/platforms/4xx/ibm405gp.c
index e5700469a68..2ac67a2f0ba 100644
--- a/arch/ppc/platforms/4xx/ibm405gp.c
+++ b/arch/ppc/platforms/4xx/ibm405gp.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/smp.h> 17#include <linux/smp.h>
19#include <linux/threads.h> 18#include <linux/threads.h>
diff --git a/arch/ppc/platforms/4xx/ibm405gp.h b/arch/ppc/platforms/4xx/ibm405gp.h
index eaf0ef57028..9f15e551871 100644
--- a/arch/ppc/platforms/4xx/ibm405gp.h
+++ b/arch/ppc/platforms/4xx/ibm405gp.h
@@ -11,7 +11,6 @@
11#ifndef __ASM_IBM405GP_H__ 11#ifndef __ASM_IBM405GP_H__
12#define __ASM_IBM405GP_H__ 12#define __ASM_IBM405GP_H__
13 13
14#include <linux/config.h>
15 14
16/* ibm405.h at bottom of this file */ 15/* ibm405.h at bottom of this file */
17 16
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c
index 49da61f6854..9f4dacffdbb 100644
--- a/arch/ppc/platforms/4xx/ibm405gpr.c
+++ b/arch/ppc/platforms/4xx/ibm405gpr.c
@@ -7,7 +7,6 @@
7 * or implied. 7 * or implied.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/smp.h> 11#include <linux/smp.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.h b/arch/ppc/platforms/4xx/ibm405gpr.h
index e90c5dde01d..9e01f1515de 100644
--- a/arch/ppc/platforms/4xx/ibm405gpr.h
+++ b/arch/ppc/platforms/4xx/ibm405gpr.h
@@ -11,7 +11,6 @@
11#ifndef __ASM_IBM405GPR_H__ 11#ifndef __ASM_IBM405GPR_H__
12#define __ASM_IBM405GPR_H__ 12#define __ASM_IBM405GPR_H__
13 13
14#include <linux/config.h>
15 14
16/* ibm405.h at bottom of this file */ 15/* ibm405.h at bottom of this file */
17 16
diff --git a/arch/ppc/platforms/4xx/ibm440ep.h b/arch/ppc/platforms/4xx/ibm440ep.h
index 61717e8a799..d92572727d2 100644
--- a/arch/ppc/platforms/4xx/ibm440ep.h
+++ b/arch/ppc/platforms/4xx/ibm440ep.h
@@ -17,7 +17,6 @@
17#ifndef __PPC_PLATFORMS_IBM440EP_H 17#ifndef __PPC_PLATFORMS_IBM440EP_H
18#define __PPC_PLATFORMS_IBM440EP_H 18#define __PPC_PLATFORMS_IBM440EP_H
19 19
20#include <linux/config.h>
21#include <asm/ibm44x.h> 20#include <asm/ibm44x.h>
22 21
23/* UART */ 22/* UART */
diff --git a/arch/ppc/platforms/4xx/ibm440gp.h b/arch/ppc/platforms/4xx/ibm440gp.h
index 7b2763b6024..391c90e1f5e 100644
--- a/arch/ppc/platforms/4xx/ibm440gp.h
+++ b/arch/ppc/platforms/4xx/ibm440gp.h
@@ -18,7 +18,6 @@
18#ifndef __PPC_PLATFORMS_IBM440GP_H 18#ifndef __PPC_PLATFORMS_IBM440GP_H
19#define __PPC_PLATFORMS_IBM440GP_H 19#define __PPC_PLATFORMS_IBM440GP_H
20 20
21#include <linux/config.h>
22 21
23/* UART */ 22/* UART */
24#define PPC440GP_UART0_ADDR 0x0000000140000200ULL 23#define PPC440GP_UART0_ADDR 0x0000000140000200ULL
diff --git a/arch/ppc/platforms/4xx/ibm440gx.h b/arch/ppc/platforms/4xx/ibm440gx.h
index 070a34efe1c..599c4289b9c 100644
--- a/arch/ppc/platforms/4xx/ibm440gx.h
+++ b/arch/ppc/platforms/4xx/ibm440gx.h
@@ -17,7 +17,6 @@
17#ifndef __PPC_PLATFORMS_IBM440GX_H 17#ifndef __PPC_PLATFORMS_IBM440GX_H
18#define __PPC_PLATFORMS_IBM440GX_H 18#define __PPC_PLATFORMS_IBM440GX_H
19 19
20#include <linux/config.h>
21 20
22#include <asm/ibm44x.h> 21#include <asm/ibm44x.h>
23 22
diff --git a/arch/ppc/platforms/4xx/ibm440sp.h b/arch/ppc/platforms/4xx/ibm440sp.h
index 77e8bb22c52..2978682f172 100644
--- a/arch/ppc/platforms/4xx/ibm440sp.h
+++ b/arch/ppc/platforms/4xx/ibm440sp.h
@@ -15,7 +15,6 @@
15#ifndef __PPC_PLATFORMS_IBM440SP_H 15#ifndef __PPC_PLATFORMS_IBM440SP_H
16#define __PPC_PLATFORMS_IBM440SP_H 16#define __PPC_PLATFORMS_IBM440SP_H
17 17
18#include <linux/config.h>
19 18
20#include <asm/ibm44x.h> 19#include <asm/ibm44x.h>
21 20
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.c b/arch/ppc/platforms/4xx/ibmnp405h.c
index f1dcb0ac15b..1afc3642e5b 100644
--- a/arch/ppc/platforms/4xx/ibmnp405h.c
+++ b/arch/ppc/platforms/4xx/ibmnp405h.c
@@ -7,7 +7,6 @@
7 * or implied. 7 * or implied.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <asm/ocp.h> 11#include <asm/ocp.h>
13#include <platforms/4xx/ibmnp405h.h> 12#include <platforms/4xx/ibmnp405h.h>
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.h b/arch/ppc/platforms/4xx/ibmnp405h.h
index 2c683f6aaa6..4aa8821b478 100644
--- a/arch/ppc/platforms/4xx/ibmnp405h.h
+++ b/arch/ppc/platforms/4xx/ibmnp405h.h
@@ -11,7 +11,6 @@
11#ifndef __ASM_IBMNP405H_H__ 11#ifndef __ASM_IBMNP405H_H__
12#define __ASM_IBMNP405H_H__ 12#define __ASM_IBMNP405H_H__
13 13
14#include <linux/config.h>
15 14
16/* ibm405.h at bottom of this file */ 15/* ibm405.h at bottom of this file */
17 16
diff --git a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h
index 9de42659735..31a08abaa4a 100644
--- a/arch/ppc/platforms/4xx/ibmstb4.h
+++ b/arch/ppc/platforms/4xx/ibmstb4.h
@@ -11,7 +11,6 @@
11#ifndef __ASM_IBMSTB4_H__ 11#ifndef __ASM_IBMSTB4_H__
12#define __ASM_IBMSTB4_H__ 12#define __ASM_IBMSTB4_H__
13 13
14#include <linux/config.h>
15 14
16/* serial port defines */ 15/* serial port defines */
17#define STB04xxx_IO_BASE ((uint)0xe0000000) 16#define STB04xxx_IO_BASE ((uint)0xe0000000)
diff --git a/arch/ppc/platforms/4xx/ibmstbx25.h b/arch/ppc/platforms/4xx/ibmstbx25.h
index 6884a49d348..31b63343e64 100644
--- a/arch/ppc/platforms/4xx/ibmstbx25.h
+++ b/arch/ppc/platforms/4xx/ibmstbx25.h
@@ -11,7 +11,6 @@
11#ifndef __ASM_IBMSTBX25_H__ 11#ifndef __ASM_IBMSTBX25_H__
12#define __ASM_IBMSTBX25_H__ 12#define __ASM_IBMSTBX25_H__
13 13
14#include <linux/config.h>
15 14
16/* serial port defines */ 15/* serial port defines */
17#define STBx25xx_IO_BASE ((uint)0xe0000000) 16#define STBx25xx_IO_BASE ((uint)0xe0000000)
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index 5c37de28e13..61706ef3711 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.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/ppc/platforms/4xx/luan.h b/arch/ppc/platforms/4xx/luan.h
index e0db6a810fe..68dd46b0a5c 100644
--- a/arch/ppc/platforms/4xx/luan.h
+++ b/arch/ppc/platforms/4xx/luan.h
@@ -16,7 +16,6 @@
16#ifndef __ASM_LUAN_H__ 16#ifndef __ASM_LUAN_H__
17#define __ASM_LUAN_H__ 17#define __ASM_LUAN_H__
18 18
19#include <linux/config.h>
20#include <platforms/4xx/ibm440sp.h> 19#include <platforms/4xx/ibm440sp.h>
21 20
22/* F/W TLB mapping used in bootloader glue to reset EMAC */ 21/* F/W TLB mapping used in bootloader glue to reset EMAC */
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
index 554776d4b8a..84e999d9a7b 100644
--- a/arch/ppc/platforms/4xx/ocotea.c
+++ b/arch/ppc/platforms/4xx/ocotea.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/ppc/platforms/4xx/ocotea.h b/arch/ppc/platforms/4xx/ocotea.h
index 7c799a9ff82..89730ce2322 100644
--- a/arch/ppc/platforms/4xx/ocotea.h
+++ b/arch/ppc/platforms/4xx/ocotea.h
@@ -16,7 +16,6 @@
16#ifndef __ASM_OCOTEA_H__ 16#ifndef __ASM_OCOTEA_H__
17#define __ASM_OCOTEA_H__ 17#define __ASM_OCOTEA_H__
18 18
19#include <linux/config.h>
20#include <platforms/4xx/ibm440gx.h> 19#include <platforms/4xx/ibm440gx.h>
21 20
22/* F/W TLB mapping used in bootloader glue to reset EMAC */ 21/* F/W TLB mapping used in bootloader glue to reset EMAC */
diff --git a/arch/ppc/platforms/4xx/ppc440spe.h b/arch/ppc/platforms/4xx/ppc440spe.h
index d3a620ddcde..f1e867c4c9f 100644
--- a/arch/ppc/platforms/4xx/ppc440spe.h
+++ b/arch/ppc/platforms/4xx/ppc440spe.h
@@ -17,7 +17,6 @@
17#ifndef __PPC_PLATFORMS_PPC440SPE_H 17#ifndef __PPC_PLATFORMS_PPC440SPE_H
18#define __PPC_PLATFORMS_PPC440SPE_H 18#define __PPC_PLATFORMS_PPC440SPE_H
19 19
20#include <linux/config.h>
21 20
22#include <asm/ibm44x.h> 21#include <asm/ibm44x.h>
23 22
diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c
index 53da2b4f7c2..edf4d37d1a5 100644
--- a/arch/ppc/platforms/4xx/redwood5.c
+++ b/arch/ppc/platforms/4xx/redwood5.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/pagemap.h> 13#include <linux/pagemap.h>
15#include <linux/platform_device.h> 14#include <linux/platform_device.h>
diff --git a/arch/ppc/platforms/4xx/redwood6.c b/arch/ppc/platforms/4xx/redwood6.c
index 41b27d106fa..006e29f83a1 100644
--- a/arch/ppc/platforms/4xx/redwood6.c
+++ b/arch/ppc/platforms/4xx/redwood6.c
@@ -7,7 +7,6 @@
7 * or implied. 7 * or implied.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/pagemap.h> 11#include <linux/pagemap.h>
13#include <linux/platform_device.h> 12#include <linux/platform_device.h>
diff --git a/arch/ppc/platforms/4xx/sycamore.c b/arch/ppc/platforms/4xx/sycamore.c
index bab31eb3068..c47493e344c 100644
--- a/arch/ppc/platforms/4xx/sycamore.c
+++ b/arch/ppc/platforms/4xx/sycamore.c
@@ -9,7 +9,6 @@
9 * is licensed "as is" without any warranty of any kind, whether express 9 * is licensed "as is" without any warranty of any kind, whether express
10 * or implied. 10 * or implied.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/smp.h> 13#include <linux/smp.h>
15#include <linux/threads.h> 14#include <linux/threads.h>
diff --git a/arch/ppc/platforms/4xx/sycamore.h b/arch/ppc/platforms/4xx/sycamore.h
index dae01620227..69b169eac05 100644
--- a/arch/ppc/platforms/4xx/sycamore.h
+++ b/arch/ppc/platforms/4xx/sycamore.h
@@ -19,7 +19,6 @@
19#ifndef __ASM_SYCAMORE_H__ 19#ifndef __ASM_SYCAMORE_H__
20#define __ASM_SYCAMORE_H__ 20#define __ASM_SYCAMORE_H__
21 21
22#include <linux/config.h>
23#include <platforms/4xx/ibm405gpr.h> 22#include <platforms/4xx/ibm405gpr.h>
24#include <asm/ppcboot.h> 23#include <asm/ppcboot.h>
25 24
diff --git a/arch/ppc/platforms/4xx/walnut.c b/arch/ppc/platforms/4xx/walnut.c
index 6bd77902b9a..f414d2d4c58 100644
--- a/arch/ppc/platforms/4xx/walnut.c
+++ b/arch/ppc/platforms/4xx/walnut.c
@@ -11,7 +11,6 @@
11 * is licensed "as is" without any warranty of any kind, whether express 11 * is licensed "as is" without any warranty of any kind, whether express
12 * or implied. 12 * or implied.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/smp.h> 15#include <linux/smp.h>
17#include <linux/threads.h> 16#include <linux/threads.h>
diff --git a/arch/ppc/platforms/4xx/walnut.h b/arch/ppc/platforms/4xx/walnut.h
index f13a577f0a4..d9c4eb78894 100644
--- a/arch/ppc/platforms/4xx/walnut.h
+++ b/arch/ppc/platforms/4xx/walnut.h
@@ -21,7 +21,6 @@
21#ifndef __ASM_WALNUT_H__ 21#ifndef __ASM_WALNUT_H__
22#define __ASM_WALNUT_H__ 22#define __ASM_WALNUT_H__
23 23
24#include <linux/config.h>
25#include <platforms/4xx/ibm405gp.h> 24#include <platforms/4xx/ibm405gp.h>
26#include <asm/ppcboot.h> 25#include <asm/ppcboot.h>
27 26
diff --git a/arch/ppc/platforms/4xx/xilinx_ml300.c b/arch/ppc/platforms/4xx/xilinx_ml300.c
index d97a7f269f9..fb5f0b5e13d 100644
--- a/arch/ppc/platforms/4xx/xilinx_ml300.c
+++ b/arch/ppc/platforms/4xx/xilinx_ml300.c
@@ -9,7 +9,6 @@
9 * "as is" without any warranty of any kind, whether express or implied. 9 * "as is" without any warranty of any kind, whether express or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15#include <linux/tty.h> 14#include <linux/tty.h>
diff --git a/arch/ppc/platforms/4xx/xilinx_ml403.c b/arch/ppc/platforms/4xx/xilinx_ml403.c
index 4c0c7e4c111..cb3bf7a2bcb 100644
--- a/arch/ppc/platforms/4xx/xilinx_ml403.c
+++ b/arch/ppc/platforms/4xx/xilinx_ml403.c
@@ -13,7 +13,6 @@
13 * kind, whether express or implied. 13 * kind, whether express or implied.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/irq.h> 17#include <linux/irq.h>
19#include <linux/tty.h> 18#include <linux/tty.h>
diff --git a/arch/ppc/platforms/4xx/xparameters/xparameters.h b/arch/ppc/platforms/4xx/xparameters/xparameters.h
index 4cf21f25635..cd7d0e7d986 100644
--- a/arch/ppc/platforms/4xx/xparameters/xparameters.h
+++ b/arch/ppc/platforms/4xx/xparameters/xparameters.h
@@ -12,7 +12,6 @@
12 * "as is" without any warranty of any kind, whether express or implied. 12 * "as is" without any warranty of any kind, whether express or implied.
13 */ 13 */
14 14
15#include <linux/config.h>
16 15
17#if defined(CONFIG_XILINX_ML300) 16#if defined(CONFIG_XILINX_ML300)
18 #include "xparameters_ml300.h" 17 #include "xparameters_ml300.h"
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c
index f287dcdbffc..346787df0dd 100644
--- a/arch/ppc/platforms/4xx/yucca.c
+++ b/arch/ppc/platforms/4xx/yucca.c
@@ -12,7 +12,6 @@
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/stddef.h> 15#include <linux/stddef.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/ppc/platforms/4xx/yucca.h b/arch/ppc/platforms/4xx/yucca.h
index 7ae23012237..bc9684e66a8 100644
--- a/arch/ppc/platforms/4xx/yucca.h
+++ b/arch/ppc/platforms/4xx/yucca.h
@@ -17,7 +17,6 @@
17#ifndef __ASM_YUCCA_H__ 17#ifndef __ASM_YUCCA_H__
18#define __ASM_YUCCA_H__ 18#define __ASM_YUCCA_H__
19 19
20#include <linux/config.h>
21#include <platforms/4xx/ppc440spe.h> 20#include <platforms/4xx/ppc440spe.h>
22 21
23/* F/W TLB mapping used in bootloader glue to reset EMAC */ 22/* F/W TLB mapping used in bootloader glue to reset EMAC */
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
index 11626dd9090..3397f0de159 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.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/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h
index 6727bbdc36e..d2e06c95b08 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.h
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.h
@@ -15,7 +15,6 @@
15#ifndef __MACH_MPC83XX_SYS_H__ 15#ifndef __MACH_MPC83XX_SYS_H__
16#define __MACH_MPC83XX_SYS_H__ 16#define __MACH_MPC83XX_SYS_H__
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <syslib/ppc83xx_setup.h> 19#include <syslib/ppc83xx_setup.h>
21#include <asm/ppcboot.h> 20#include <asm/ppcboot.h>
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c
index 9b014df516b..4f839da6782 100644
--- a/arch/ppc/platforms/85xx/mpc8540_ads.c
+++ b/arch/ppc/platforms/85xx/mpc8540_ads.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/ppc/platforms/85xx/mpc8540_ads.h b/arch/ppc/platforms/85xx/mpc8540_ads.h
index 0b5e7ff856f..7559f9e6fc2 100644
--- a/arch/ppc/platforms/85xx/mpc8540_ads.h
+++ b/arch/ppc/platforms/85xx/mpc8540_ads.h
@@ -15,7 +15,6 @@
15#ifndef __MACH_MPC8540ADS_H__ 15#ifndef __MACH_MPC8540ADS_H__
16#define __MACH_MPC8540ADS_H__ 16#define __MACH_MPC8540ADS_H__
17 17
18#include <linux/config.h>
19#include <linux/initrd.h> 18#include <linux/initrd.h>
20#include <syslib/ppc85xx_setup.h> 19#include <syslib/ppc85xx_setup.h>
21#include <platforms/85xx/mpc85xx_ads_common.h> 20#include <platforms/85xx/mpc85xx_ads_common.h>
diff --git a/arch/ppc/platforms/85xx/mpc8555_cds.h b/arch/ppc/platforms/85xx/mpc8555_cds.h
index 9754dbd5d18..4f79c372c4e 100644
--- a/arch/ppc/platforms/85xx/mpc8555_cds.h
+++ b/arch/ppc/platforms/85xx/mpc8555_cds.h
@@ -15,7 +15,6 @@
15#ifndef __MACH_MPC8555CDS_H__ 15#ifndef __MACH_MPC8555CDS_H__
16#define __MACH_MPC8555CDS_H__ 16#define __MACH_MPC8555CDS_H__
17 17
18#include <linux/config.h>
19#include <syslib/ppc85xx_setup.h> 18#include <syslib/ppc85xx_setup.h>
20#include <platforms/85xx/mpc85xx_cds_common.h> 19#include <platforms/85xx/mpc85xx_cds_common.h>
21 20
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c
index 0cb2e86470e..d90cd24d018 100644
--- a/arch/ppc/platforms/85xx/mpc8560_ads.c
+++ b/arch/ppc/platforms/85xx/mpc8560_ads.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>
@@ -132,7 +131,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
132 131
133static struct irqaction cpm2_irqaction = { 132static struct irqaction cpm2_irqaction = {
134 .handler = cpm2_cascade, 133 .handler = cpm2_cascade,
135 .flags = SA_INTERRUPT, 134 .flags = IRQF_DISABLED,
136 .mask = CPU_MASK_NONE, 135 .mask = CPU_MASK_NONE,
137 .name = "cpm2_cascade", 136 .name = "cpm2_cascade",
138}; 137};
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.h b/arch/ppc/platforms/85xx/mpc8560_ads.h
index c2247c21fc5..9f185ab2e01 100644
--- a/arch/ppc/platforms/85xx/mpc8560_ads.h
+++ b/arch/ppc/platforms/85xx/mpc8560_ads.h
@@ -15,7 +15,6 @@
15#ifndef __MACH_MPC8560ADS_H 15#ifndef __MACH_MPC8560ADS_H
16#define __MACH_MPC8560ADS_H 16#define __MACH_MPC8560ADS_H
17 17
18#include <linux/config.h>
19#include <syslib/ppc85xx_setup.h> 18#include <syslib/ppc85xx_setup.h>
20#include <platforms/85xx/mpc85xx_ads_common.h> 19#include <platforms/85xx/mpc85xx_ads_common.h>
21 20
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c b/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
index 8fd9d763f58..674806e001f 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.c
+++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.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/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
index de8d41aafe1..abf32281655 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
+++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h
@@ -15,7 +15,6 @@
15#ifndef __MACH_MPC85XX_ADS_H__ 15#ifndef __MACH_MPC85XX_ADS_H__
16#define __MACH_MPC85XX_ADS_H__ 16#define __MACH_MPC85XX_ADS_H__
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <asm/ppcboot.h> 19#include <asm/ppcboot.h>
21 20
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
index 4368dc3f3c3..75204588a3e 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.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>
@@ -137,7 +136,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
137 136
138static struct irqaction cpm2_irqaction = { 137static struct irqaction cpm2_irqaction = {
139 .handler = cpm2_cascade, 138 .handler = cpm2_cascade,
140 .flags = SA_INTERRUPT, 139 .flags = IRQF_DISABLED,
141 .mask = CPU_MASK_NONE, 140 .mask = CPU_MASK_NONE,
142 .name = "cpm2_cascade", 141 .name = "cpm2_cascade",
143}; 142};
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h
index 62df54f61ae..32c5455c8b8 100644
--- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h
+++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h
@@ -15,7 +15,6 @@
15#ifndef __MACH_MPC85XX_CDS_H__ 15#ifndef __MACH_MPC85XX_CDS_H__
16#define __MACH_MPC85XX_CDS_H__ 16#define __MACH_MPC85XX_CDS_H__
17 17
18#include <linux/config.h>
19#include <linux/serial.h> 18#include <linux/serial.h>
20#include <asm/ppcboot.h> 19#include <asm/ppcboot.h>
21#include <linux/initrd.h> 20#include <linux/initrd.h>
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c
index b73778ecf82..764d580ff53 100644
--- a/arch/ppc/platforms/85xx/sbc8560.c
+++ b/arch/ppc/platforms/85xx/sbc8560.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/ppc/platforms/85xx/sbc8560.h b/arch/ppc/platforms/85xx/sbc8560.h
index 44ffaa2d2c8..c7d61cf3a44 100644
--- a/arch/ppc/platforms/85xx/sbc8560.h
+++ b/arch/ppc/platforms/85xx/sbc8560.h
@@ -13,7 +13,6 @@
13#ifndef __MACH_SBC8560_H__ 13#ifndef __MACH_SBC8560_H__
14#define __MACH_SBC8560_H__ 14#define __MACH_SBC8560_H__
15 15
16#include <linux/config.h>
17#include <platforms/85xx/sbc85xx.h> 16#include <platforms/85xx/sbc85xx.h>
18 17
19#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET) 18#define CPM_MAP_ADDR (CCSRBAR + MPC85xx_CPM_OFFSET)
diff --git a/arch/ppc/platforms/85xx/sbc85xx.c b/arch/ppc/platforms/85xx/sbc85xx.c
index d3ff280510f..2c587ca97bc 100644
--- a/arch/ppc/platforms/85xx/sbc85xx.c
+++ b/arch/ppc/platforms/85xx/sbc85xx.c
@@ -10,7 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/stddef.h> 13#include <linux/stddef.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
diff --git a/arch/ppc/platforms/85xx/sbc85xx.h b/arch/ppc/platforms/85xx/sbc85xx.h
index 5dd8b6a98c9..21ea7a55639 100644
--- a/arch/ppc/platforms/85xx/sbc85xx.h
+++ b/arch/ppc/platforms/85xx/sbc85xx.h
@@ -14,7 +14,6 @@
14#ifndef __PLATFORMS_85XX_SBC85XX_H__ 14#ifndef __PLATFORMS_85XX_SBC85XX_H__
15#define __PLATFORMS_85XX_SBC85XX_H__ 15#define __PLATFORMS_85XX_SBC85XX_H__
16 16
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/seq_file.h> 18#include <linux/seq_file.h>
20#include <asm/ppcboot.h> 19#include <asm/ppcboot.h>
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c
index 8d7baa9a397..495aa79bb3a 100644
--- a/arch/ppc/platforms/85xx/stx_gp3.c
+++ b/arch/ppc/platforms/85xx/stx_gp3.c
@@ -16,7 +16,6 @@
16 * option) any later version. 16 * option) any later version.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/stddef.h> 19#include <linux/stddef.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/init.h> 21#include <linux/init.h>
@@ -167,7 +166,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
167 166
168static struct irqaction cpm2_irqaction = { 167static struct irqaction cpm2_irqaction = {
169 .handler = cpm2_cascade, 168 .handler = cpm2_cascade,
170 .flags = SA_INTERRUPT, 169 .flags = IRQF_DISABLED,
171 .mask = CPU_MASK_NONE, 170 .mask = CPU_MASK_NONE,
172 .name = "cpm2_cascade", 171 .name = "cpm2_cascade",
173}; 172};
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h
index 3f71f8f5937..c6e34c09e97 100644
--- a/arch/ppc/platforms/85xx/stx_gp3.h
+++ b/arch/ppc/platforms/85xx/stx_gp3.h
@@ -17,7 +17,6 @@
17#ifndef __MACH_STX_GP3_H 17#ifndef __MACH_STX_GP3_H
18#define __MACH_STX_GP3_H 18#define __MACH_STX_GP3_H
19 19
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <asm/ppcboot.h> 21#include <asm/ppcboot.h>
23 22
diff --git a/arch/ppc/platforms/85xx/tqm85xx.c b/arch/ppc/platforms/85xx/tqm85xx.c
index 00af132262b..189ed4175f9 100644
--- a/arch/ppc/platforms/85xx/tqm85xx.c
+++ b/arch/ppc/platforms/85xx/tqm85xx.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>
@@ -191,7 +190,7 @@ static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
191 190
192static struct irqaction cpm2_irqaction = { 191static struct irqaction cpm2_irqaction = {
193 .handler = cpm2_cascade, 192 .handler = cpm2_cascade,
194 .flags = SA_INTERRUPT, 193 .flags = IRQF_DISABLED,
195 .mask = CPU_MASK_NONE, 194 .mask = CPU_MASK_NONE,
196 .name = "cpm2_cascade", 195 .name = "cpm2_cascade",
197}; 196};
diff --git a/arch/ppc/platforms/85xx/tqm85xx.h b/arch/ppc/platforms/85xx/tqm85xx.h
index 612d80504f9..57284e68f67 100644
--- a/arch/ppc/platforms/85xx/tqm85xx.h
+++ b/arch/ppc/platforms/85xx/tqm85xx.h
@@ -14,7 +14,6 @@
14#ifndef __MACH_TQM85XX_H 14#ifndef __MACH_TQM85XX_H
15#define __MACH_TQM85XX_H 15#define __MACH_TQM85XX_H
16 16
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <asm/ppcboot.h> 18#include <asm/ppcboot.h>
20 19
diff --git a/arch/ppc/platforms/apus_pci.c b/arch/ppc/platforms/apus_pci.c
index 33dad6db824..dc165f0c890 100644
--- a/arch/ppc/platforms/apus_pci.c
+++ b/arch/ppc/platforms/apus_pci.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#ifdef CONFIG_AMIGA 13#ifdef CONFIG_AMIGA
15 14
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/arch/ppc/platforms/apus_setup.c b/arch/ppc/platforms/apus_setup.c
index 5c4118a459f..1d034ead2c9 100644
--- a/arch/ppc/platforms/apus_setup.c
+++ b/arch/ppc/platforms/apus_setup.c
@@ -11,7 +11,6 @@
11 * Amiga specific stuff into mach/amiga. 11 * Amiga specific stuff into mach/amiga.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/ppc/platforms/ccm.h b/arch/ppc/platforms/ccm.h
index edb87b57383..69000b1c7a4 100644
--- a/arch/ppc/platforms/ccm.h
+++ b/arch/ppc/platforms/ccm.h
@@ -7,7 +7,6 @@
7#ifndef __MACH_CCM_H 7#ifndef __MACH_CCM_H
8#define __MACH_CCM_H 8#define __MACH_CCM_H
9 9
10#include <linux/config.h>
11 10
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
13 12
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c
index f324f757cae..a764ae71cbc 100644
--- a/arch/ppc/platforms/chestnut.c
+++ b/arch/ppc/platforms/chestnut.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c
index 790475c22fd..e78bccf96c9 100644
--- a/arch/ppc/platforms/cpci690.c
+++ b/arch/ppc/platforms/cpci690.c
@@ -8,7 +8,6 @@
8 * is licensed "as is" without any warranty of any kind, whether express 8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied. 9 * or implied.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/delay.h> 11#include <linux/delay.h>
13#include <linux/pci.h> 12#include <linux/pci.h>
14#include <linux/ide.h> 13#include <linux/ide.h>
diff --git a/arch/ppc/platforms/ev64260.c b/arch/ppc/platforms/ev64260.c
index 31e8e21e1d5..4957a7bcde2 100644
--- a/arch/ppc/platforms/ev64260.c
+++ b/arch/ppc/platforms/ev64260.c
@@ -20,7 +20,6 @@
20 * Note: The 750CXe and 7450 are not stable with a 125MHz or 133MHz TCLK/SYSCLK. 20 * Note: The 750CXe and 7450 are not stable with a 125MHz or 133MHz TCLK/SYSCLK.
21 * At 100MHz, they are solid. 21 * At 100MHz, they are solid.
22 */ 22 */
23#include <linux/config.h>
24 23
25#include <linux/delay.h> 24#include <linux/delay.h>
26#include <linux/pci.h> 25#include <linux/pci.h>
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c
index 104ac9b16e8..90ed375c9b9 100644
--- a/arch/ppc/platforms/ev64360.c
+++ b/arch/ppc/platforms/ev64360.c
@@ -11,7 +11,6 @@
11 * Free Software Foundation; either version 2 of the License, or (at your 11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/pci.h> 15#include <linux/pci.h>
17#include <linux/kdev_t.h> 16#include <linux/kdev_t.h>
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h
index e1c0b1b6dcb..2f9f0f60e3f 100644
--- a/arch/ppc/platforms/fads.h
+++ b/arch/ppc/platforms/fads.h
@@ -19,7 +19,6 @@
19#ifndef __ASM_FADS_H__ 19#ifndef __ASM_FADS_H__
20#define __ASM_FADS_H__ 20#define __ASM_FADS_H__
21 21
22#include <linux/config.h>
23 22
24#include <asm/ppcboot.h> 23#include <asm/ppcboot.h>
25 24
diff --git a/arch/ppc/platforms/gemini_prom.S b/arch/ppc/platforms/gemini_prom.S
index b181f210800..e8c84d24f01 100644
--- a/arch/ppc/platforms/gemini_prom.S
+++ b/arch/ppc/platforms/gemini_prom.S
@@ -6,7 +6,6 @@
6 * ---Dan 6 * ---Dan
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <asm/reg.h> 9#include <asm/reg.h>
11#include <asm/page.h> 10#include <asm/page.h>
12#include <platforms/gemini.h> 11#include <platforms/gemini.h>
diff --git a/arch/ppc/platforms/gemini_serial.h b/arch/ppc/platforms/gemini_serial.h
index 69855aeec88..b915eff79fd 100644
--- a/arch/ppc/platforms/gemini_serial.h
+++ b/arch/ppc/platforms/gemini_serial.h
@@ -2,7 +2,6 @@
2#ifndef __ASMPPC_GEMINI_SERIAL_H 2#ifndef __ASMPPC_GEMINI_SERIAL_H
3#define __ASMPPC_GEMINI_SERIAL_H 3#define __ASMPPC_GEMINI_SERIAL_H
4 4
5#include <linux/config.h>
6#include <platforms/gemini.h> 5#include <platforms/gemini.h>
7 6
8#ifdef CONFIG_SERIAL_MANY_PORTS 7#ifdef CONFIG_SERIAL_MANY_PORTS
diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c
index 0090ff15460..f48048f362a 100644
--- a/arch/ppc/platforms/gemini_setup.c
+++ b/arch/ppc/platforms/gemini_setup.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/stddef.h> 9#include <linux/stddef.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c
index 75dc2ee87d2..e0f112a1fd0 100644
--- a/arch/ppc/platforms/hdpu.c
+++ b/arch/ppc/platforms/hdpu.c
@@ -12,7 +12,6 @@
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16 15
17#include <linux/pci.h> 16#include <linux/pci.h>
18#include <linux/delay.h> 17#include <linux/delay.h>
@@ -838,7 +837,7 @@ static void smp_hdpu_setup_cpu(int cpu_nr)
838 mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, 0xff); 837 mv64x60_write(&bh, MV64360_CPU0_DOORBELL_CLR, 0xff);
839 mv64x60_write(&bh, MV64360_CPU0_DOORBELL_MASK, 0xff); 838 mv64x60_write(&bh, MV64360_CPU0_DOORBELL_MASK, 0xff);
840 request_irq(60, hdpu_smp_cpu0_int_handler, 839 request_irq(60, hdpu_smp_cpu0_int_handler,
841 SA_INTERRUPT, hdpu_smp0, 0); 840 IRQF_DISABLED, hdpu_smp0, 0);
842 } 841 }
843 842
844 if (cpu_nr == 1) { 843 if (cpu_nr == 1) {
@@ -858,7 +857,7 @@ static void smp_hdpu_setup_cpu(int cpu_nr)
858 mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, 0x0); 857 mv64x60_write(&bh, MV64360_CPU1_DOORBELL_CLR, 0x0);
859 mv64x60_write(&bh, MV64360_CPU1_DOORBELL_MASK, 0xff); 858 mv64x60_write(&bh, MV64360_CPU1_DOORBELL_MASK, 0xff);
860 request_irq(28, hdpu_smp_cpu1_int_handler, 859 request_irq(28, hdpu_smp_cpu1_int_handler,
861 SA_INTERRUPT, hdpu_smp1, 0); 860 IRQF_DISABLED, hdpu_smp1, 0);
862 } 861 }
863 862
864} 863}
diff --git a/arch/ppc/platforms/hermes.h b/arch/ppc/platforms/hermes.h
index 198fc590b9f..de91afff8ca 100644
--- a/arch/ppc/platforms/hermes.h
+++ b/arch/ppc/platforms/hermes.h
@@ -7,7 +7,6 @@
7#ifndef __MACH_HERMES_H 7#ifndef __MACH_HERMES_H
8#define __MACH_HERMES_H 8#define __MACH_HERMES_H
9 9
10#include <linux/config.h>
11 10
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
13 12
diff --git a/arch/ppc/platforms/ip860.h b/arch/ppc/platforms/ip860.h
index 8c3836c5f05..2f1f86ce144 100644
--- a/arch/ppc/platforms/ip860.h
+++ b/arch/ppc/platforms/ip860.h
@@ -7,7 +7,6 @@
7#ifndef __MACH_IP860_H 7#ifndef __MACH_IP860_H
8#define __MACH_IP860_H 8#define __MACH_IP860_H
9 9
10#include <linux/config.h>
11 10
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
13 12
diff --git a/arch/ppc/platforms/ivms8.h b/arch/ppc/platforms/ivms8.h
index d4be310f808..9109e684ad9 100644
--- a/arch/ppc/platforms/ivms8.h
+++ b/arch/ppc/platforms/ivms8.h
@@ -13,7 +13,6 @@
13#ifndef __ASM_IVMS8_H__ 13#ifndef __ASM_IVMS8_H__
14#define __ASM_IVMS8_H__ 14#define __ASM_IVMS8_H__
15 15
16#include <linux/config.h>
17 16
18#include <asm/ppcboot.h> 17#include <asm/ppcboot.h>
19 18
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c
index ad21280e892..720f8b3e2fb 100644
--- a/arch/ppc/platforms/katana.c
+++ b/arch/ppc/platforms/katana.c
@@ -16,7 +16,6 @@
16 * Supports the Artesyn 750i, 752i, and 3750. The 752i is virtually identical 16 * Supports the Artesyn 750i, 752i, and 3750. The 752i is virtually identical
17 * to the 750i except that it has an mv64460 bridge. 17 * to the 750i except that it has an mv64460 bridge.
18 */ 18 */
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/pci.h> 20#include <linux/pci.h>
22#include <linux/kdev_t.h> 21#include <linux/kdev_t.h>
diff --git a/arch/ppc/platforms/lantec.h b/arch/ppc/platforms/lantec.h
index 8c87642c510..5e5eb6d0f6a 100644
--- a/arch/ppc/platforms/lantec.h
+++ b/arch/ppc/platforms/lantec.h
@@ -7,7 +7,6 @@
7#ifndef __MACH_LANTEC_H 7#ifndef __MACH_LANTEC_H
8#define __MACH_LANTEC_H 8#define __MACH_LANTEC_H
9 9
10#include <linux/config.h>
11 10
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
13 12
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c
index fecbe9adc9e..b9e9db63f65 100644
--- a/arch/ppc/platforms/lite5200.c
+++ b/arch/ppc/platforms/lite5200.c
@@ -21,7 +21,6 @@
21 * kind, whether express or implied. 21 * kind, whether express or implied.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/initrd.h> 24#include <linux/initrd.h>
26#include <linux/seq_file.h> 25#include <linux/seq_file.h>
27#include <linux/kdev_t.h> 26#include <linux/kdev_t.h>
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c
index c6445a727ca..18dc6e8dd4f 100644
--- a/arch/ppc/platforms/lopec.c
+++ b/arch/ppc/platforms/lopec.c
@@ -10,7 +10,6 @@
10 * or implied. 10 * or implied.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/delay.h> 14#include <linux/delay.h>
16#include <linux/pci_ids.h> 15#include <linux/pci_ids.h>
diff --git a/arch/ppc/platforms/lwmon.h b/arch/ppc/platforms/lwmon.h
index 995bf5112df..e63f3b07a5d 100644
--- a/arch/ppc/platforms/lwmon.h
+++ b/arch/ppc/platforms/lwmon.h
@@ -7,7 +7,6 @@
7#ifndef __MACH_LWMON_H 7#ifndef __MACH_LWMON_H
8#define __MACH_LWMON_H 8#define __MACH_LWMON_H
9 9
10#include <linux/config.h>
11 10
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
13 12
diff --git a/arch/ppc/platforms/mpc866ads_setup.c b/arch/ppc/platforms/mpc866ads_setup.c
index d919dab6134..f19b6167c77 100644
--- a/arch/ppc/platforms/mpc866ads_setup.c
+++ b/arch/ppc/platforms/mpc866ads_setup.c
@@ -11,7 +11,6 @@
11 * kind, whether express or implied. 11 * kind, whether express or implied.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/param.h> 16#include <linux/param.h>
diff --git a/arch/ppc/platforms/mpc885ads.h b/arch/ppc/platforms/mpc885ads.h
index a80b7d116b4..d3bbbb3c9a1 100644
--- a/arch/ppc/platforms/mpc885ads.h
+++ b/arch/ppc/platforms/mpc885ads.h
@@ -15,7 +15,6 @@
15#ifndef __ASM_MPC885ADS_H__ 15#ifndef __ASM_MPC885ADS_H__
16#define __ASM_MPC885ADS_H__ 16#define __ASM_MPC885ADS_H__
17 17
18#include <linux/config.h>
19 18
20#include <asm/ppcboot.h> 19#include <asm/ppcboot.h>
21 20
diff --git a/arch/ppc/platforms/mpc885ads_setup.c b/arch/ppc/platforms/mpc885ads_setup.c
index 4b88679cd31..c1fc4a16fea 100644
--- a/arch/ppc/platforms/mpc885ads_setup.c
+++ b/arch/ppc/platforms/mpc885ads_setup.c
@@ -11,7 +11,6 @@
11 * kind, whether express or implied. 11 * kind, whether express or implied.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/param.h> 16#include <linux/param.h>
diff --git a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c
index c717cd92c02..bb8d4a45437 100644
--- a/arch/ppc/platforms/mvme5100.c
+++ b/arch/ppc/platforms/mvme5100.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/ppc/platforms/pal4_setup.c b/arch/ppc/platforms/pal4_setup.c
index 3c3d881df00..3da47d9ec7a 100644
--- a/arch/ppc/platforms/pal4_setup.c
+++ b/arch/ppc/platforms/pal4_setup.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/types.h> 14#include <linux/types.h>
diff --git a/arch/ppc/platforms/pcu_e.h b/arch/ppc/platforms/pcu_e.h
index 91a820a6fbc..a2c03a22875 100644
--- a/arch/ppc/platforms/pcu_e.h
+++ b/arch/ppc/platforms/pcu_e.h
@@ -7,7 +7,6 @@
7#ifndef __MACH_PCU_E_H 7#ifndef __MACH_PCU_E_H
8#define __MACH_PCU_E_H 8#define __MACH_PCU_E_H
9 9
10#include <linux/config.h>
11 10
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
13 12
diff --git a/arch/ppc/platforms/powerpmc250.c b/arch/ppc/platforms/powerpmc250.c
index c3a86be11fb..4d46650e07f 100644
--- a/arch/ppc/platforms/powerpmc250.c
+++ b/arch/ppc/platforms/powerpmc250.c
@@ -11,7 +11,6 @@
11 * or implied. 11 * or implied.
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/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c
index de2761ebe0d..9778105d4df 100644
--- a/arch/ppc/platforms/pplus.c
+++ b/arch/ppc/platforms/pplus.c
@@ -13,7 +13,6 @@
13 * or implied. 13 * or implied.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/interrupt.h> 17#include <linux/interrupt.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h
index 6b26dd36c64..2b287f4e0ca 100644
--- a/arch/ppc/platforms/pq2ads.h
+++ b/arch/ppc/platforms/pq2ads.h
@@ -9,7 +9,6 @@
9#ifndef __MACH_ADS8260_DEFS 9#ifndef __MACH_ADS8260_DEFS
10#define __MACH_ADS8260_DEFS 10#define __MACH_ADS8260_DEFS
11 11
12#include <linux/config.h>
13 12
14#include <asm/ppcboot.h> 13#include <asm/ppcboot.h>
15 14
diff --git a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c
index e50b9996848..c627ba41335 100644
--- a/arch/ppc/platforms/prep_pci.c
+++ b/arch/ppc/platforms/prep_pci.c
@@ -6,7 +6,6 @@
6 * The motherboard routes/maps will disappear shortly. -- Cort 6 * The motherboard routes/maps will disappear shortly. -- Cort
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/pci.h> 10#include <linux/pci.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index e86f6156d58..6436beffdc9 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -11,7 +11,6 @@
11 * bootup setup stuff.. 11 * bootup setup stuff..
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/delay.h> 14#include <linux/delay.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/errno.h> 16#include <linux/errno.h>
diff --git a/arch/ppc/platforms/prpmc750.c b/arch/ppc/platforms/prpmc750.c
index cdd9cfb13ee..fcab513e206 100644
--- a/arch/ppc/platforms/prpmc750.c
+++ b/arch/ppc/platforms/prpmc750.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/ppc/platforms/prpmc800.c b/arch/ppc/platforms/prpmc800.c
index e459a199fb1..f4ade5cd7a8 100644
--- a/arch/ppc/platforms/prpmc800.c
+++ b/arch/ppc/platforms/prpmc800.c
@@ -7,7 +7,6 @@
7 * or implied. 7 * or implied.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/stddef.h> 10#include <linux/stddef.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index bc26b6d71c1..3bb530af029 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -18,7 +18,6 @@
18 * SCSI / VGA. 18 * SCSI / VGA.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/stddef.h> 21#include <linux/stddef.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/init.h> 23#include <linux/init.h>
@@ -1311,7 +1310,7 @@ static void ppc7d_init2(void)
1311 1310
1312 /* Hook up i8259 interrupt which is connected to GPP28 */ 1311 /* Hook up i8259 interrupt which is connected to GPP28 */
1313 request_irq(mv64360_irq_base + MV64x60_IRQ_GPP28, ppc7d_i8259_intr, 1312 request_irq(mv64360_irq_base + MV64x60_IRQ_GPP28, ppc7d_i8259_intr,
1314 SA_INTERRUPT, "I8259 (GPP28) interrupt", (void *)0); 1313 IRQF_DISABLED, "I8259 (GPP28) interrupt", (void *)0);
1315 1314
1316 /* Configure MPP16 as watchdog NMI, MPP17 as watchdog WDE */ 1315 /* Configure MPP16 as watchdog NMI, MPP17 as watchdog WDE */
1317 spin_lock_irqsave(&mv64x60_lock, flags); 1316 spin_lock_irqsave(&mv64x60_lock, flags);
diff --git a/arch/ppc/platforms/rpxclassic.h b/arch/ppc/platforms/rpxclassic.h
index 6daa109491c..57a2a55dab8 100644
--- a/arch/ppc/platforms/rpxclassic.h
+++ b/arch/ppc/platforms/rpxclassic.h
@@ -8,7 +8,6 @@
8#ifndef __MACH_RPX_DEFS 8#ifndef __MACH_RPX_DEFS
9#define __MACH_RPX_DEFS 9#define __MACH_RPX_DEFS
10 10
11#include <linux/config.h>
12 11
13#ifndef __ASSEMBLY__ 12#ifndef __ASSEMBLY__
14/* A Board Information structure that is given to a program when 13/* A Board Information structure that is given to a program when
diff --git a/arch/ppc/platforms/rpxlite.h b/arch/ppc/platforms/rpxlite.h
index deee5bd36aa..71978064627 100644
--- a/arch/ppc/platforms/rpxlite.h
+++ b/arch/ppc/platforms/rpxlite.h
@@ -8,7 +8,6 @@
8#ifndef __MACH_RPX_DEFS 8#ifndef __MACH_RPX_DEFS
9#define __MACH_RPX_DEFS 9#define __MACH_RPX_DEFS
10 10
11#include <linux/config.h>
12 11
13#ifndef __ASSEMBLY__ 12#ifndef __ASSEMBLY__
14/* A Board Information structure that is given to a program when 13/* A Board Information structure that is given to a program when
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c
index 6dc459decb2..a76002af686 100644
--- a/arch/ppc/platforms/sandpoint.c
+++ b/arch/ppc/platforms/sandpoint.c
@@ -60,7 +60,6 @@
60 * found, we can hopefully stop hardcoding 32MB of RAM. 60 * found, we can hopefully stop hardcoding 32MB of RAM.
61 */ 61 */
62 62
63#include <linux/config.h>
64#include <linux/stddef.h> 63#include <linux/stddef.h>
65#include <linux/kernel.h> 64#include <linux/kernel.h>
66#include <linux/init.h> 65#include <linux/init.h>
diff --git a/arch/ppc/platforms/sbc82xx.c b/arch/ppc/platforms/sbc82xx.c
index 41006d2b4b3..60b769c7f3f 100644
--- a/arch/ppc/platforms/sbc82xx.c
+++ b/arch/ppc/platforms/sbc82xx.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/stddef.h> 16#include <linux/stddef.h>
18#include <linux/interrupt.h> 17#include <linux/interrupt.h>
19#include <linux/irq.h> 18#include <linux/irq.h>
@@ -146,7 +145,7 @@ static irqreturn_t sbc82xx_i8259_demux(int irq, void *dev_id, struct pt_regs *re
146 145
147static struct irqaction sbc82xx_i8259_irqaction = { 146static struct irqaction sbc82xx_i8259_irqaction = {
148 .handler = sbc82xx_i8259_demux, 147 .handler = sbc82xx_i8259_demux,
149 .flags = SA_INTERRUPT, 148 .flags = IRQF_DISABLED,
150 .mask = CPU_MASK_NONE, 149 .mask = CPU_MASK_NONE,
151 .name = "i8259 demux", 150 .name = "i8259 demux",
152}; 151};
diff --git a/arch/ppc/platforms/spruce.c b/arch/ppc/platforms/spruce.c
index 3783deccd9b..3c784278487 100644
--- a/arch/ppc/platforms/spruce.c
+++ b/arch/ppc/platforms/spruce.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/ppc/platforms/tqm8260.h b/arch/ppc/platforms/tqm8260.h
index c7a78a646c6..7f8c9a6928f 100644
--- a/arch/ppc/platforms/tqm8260.h
+++ b/arch/ppc/platforms/tqm8260.h
@@ -7,7 +7,6 @@
7#ifndef __TQM8260_PLATFORM 7#ifndef __TQM8260_PLATFORM
8#define __TQM8260_PLATFORM 8#define __TQM8260_PLATFORM
9 9
10#include <linux/config.h>
11 10
12#include <asm/ppcboot.h> 11#include <asm/ppcboot.h>
13 12
diff --git a/arch/ppc/platforms/tqm8xx.h b/arch/ppc/platforms/tqm8xx.h
index 43ac064ebe5..662131d0eb3 100644
--- a/arch/ppc/platforms/tqm8xx.h
+++ b/arch/ppc/platforms/tqm8xx.h
@@ -8,7 +8,6 @@
8#ifndef __MACH_TQM8xx_H 8#ifndef __MACH_TQM8xx_H
9#define __MACH_TQM8xx_H 9#define __MACH_TQM8xx_H
10 10
11#include <linux/config.h>
12 11
13#include <asm/ppcboot.h> 12#include <asm/ppcboot.h>
14 13
diff --git a/arch/ppc/syslib/btext.c b/arch/ppc/syslib/btext.c
index 12fa83e6774..51ab6e90fe2 100644
--- a/arch/ppc/syslib/btext.c
+++ b/arch/ppc/syslib/btext.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Benjamin Herrenschmidt <benh@kernel.crashing.org> 4 * Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 */ 5 */
6#include <linux/config.h>
7#include <linux/kernel.h> 6#include <linux/kernel.h>
8#include <linux/string.h> 7#include <linux/string.h>
9#include <linux/init.h> 8#include <linux/init.h>
diff --git a/arch/ppc/syslib/gen550_dbg.c b/arch/ppc/syslib/gen550_dbg.c
index 9fcff74bfdd..9293f5c5909 100644
--- a/arch/ppc/syslib/gen550_dbg.c
+++ b/arch/ppc/syslib/gen550_dbg.c
@@ -14,7 +14,6 @@
14 * or implied. 14 * or implied.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/serial.h> 18#include <linux/serial.h>
20#include <linux/tty.h> /* For linux/serial_core.h */ 19#include <linux/tty.h> /* For linux/serial_core.h */
diff --git a/arch/ppc/syslib/gen550_kgdb.c b/arch/ppc/syslib/gen550_kgdb.c
index 874078a7664..987cc0414e6 100644
--- a/arch/ppc/syslib/gen550_kgdb.c
+++ b/arch/ppc/syslib/gen550_kgdb.c
@@ -15,7 +15,6 @@
15 * or implied. 15 * or implied.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21 20
diff --git a/arch/ppc/syslib/gt64260_pic.c b/arch/ppc/syslib/gt64260_pic.c
index 91096b38ae7..7fd550a7d58 100644
--- a/arch/ppc/syslib/gt64260_pic.c
+++ b/arch/ppc/syslib/gt64260_pic.c
@@ -297,7 +297,7 @@ gt64260_register_hdlrs(void)
297 297
298 /* Register CPU interface error interrupt handler */ 298 /* Register CPU interface error interrupt handler */
299 if ((rc = request_irq(MV64x60_IRQ_CPU_ERR, 299 if ((rc = request_irq(MV64x60_IRQ_CPU_ERR,
300 gt64260_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) 300 gt64260_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0)))
301 printk(KERN_WARNING "Can't register cpu error handler: %d", rc); 301 printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
302 302
303 mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); 303 mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
@@ -305,7 +305,7 @@ gt64260_register_hdlrs(void)
305 305
306 /* Register PCI 0 error interrupt handler */ 306 /* Register PCI 0 error interrupt handler */
307 if ((rc = request_irq(MV64360_IRQ_PCI0, gt64260_pci_error_int_handler, 307 if ((rc = request_irq(MV64360_IRQ_PCI0, gt64260_pci_error_int_handler,
308 SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) 308 IRQF_DISABLED, PCI0_INTR_STR, (void *)0)))
309 printk(KERN_WARNING "Can't register pci 0 error handler: %d", 309 printk(KERN_WARNING "Can't register pci 0 error handler: %d",
310 rc); 310 rc);
311 311
@@ -314,7 +314,7 @@ gt64260_register_hdlrs(void)
314 314
315 /* Register PCI 1 error interrupt handler */ 315 /* Register PCI 1 error interrupt handler */
316 if ((rc = request_irq(MV64360_IRQ_PCI1, gt64260_pci_error_int_handler, 316 if ((rc = request_irq(MV64360_IRQ_PCI1, gt64260_pci_error_int_handler,
317 SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) 317 IRQF_DISABLED, PCI1_INTR_STR, (void *)1)))
318 printk(KERN_WARNING "Can't register pci 1 error handler: %d", 318 printk(KERN_WARNING "Can't register pci 1 error handler: %d",
319 rc); 319 rc);
320 320
diff --git a/arch/ppc/syslib/ibm440gp_common.c b/arch/ppc/syslib/ibm440gp_common.c
index fbaae5f6d83..a3927ec9b5d 100644
--- a/arch/ppc/syslib/ibm440gp_common.c
+++ b/arch/ppc/syslib/ibm440gp_common.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <asm/reg.h> 17#include <asm/reg.h>
19#include <asm/ibm44x.h> 18#include <asm/ibm44x.h>
diff --git a/arch/ppc/syslib/ibm440gp_common.h b/arch/ppc/syslib/ibm440gp_common.h
index f48529f3c23..94d7835038a 100644
--- a/arch/ppc/syslib/ibm440gp_common.h
+++ b/arch/ppc/syslib/ibm440gp_common.h
@@ -16,7 +16,6 @@
16 16
17#ifndef __ASSEMBLY__ 17#ifndef __ASSEMBLY__
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <syslib/ibm44x_common.h> 20#include <syslib/ibm44x_common.h>
22 21
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c
index f6cc1688852..4b77e6c8c87 100644
--- a/arch/ppc/syslib/ibm440gx_common.c
+++ b/arch/ppc/syslib/ibm440gx_common.c
@@ -10,7 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 * 11 *
12 */ 12 */
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
16#include <asm/ibm44x.h> 15#include <asm/ibm44x.h>
@@ -150,7 +149,7 @@ void __init ibm440gx_l2c_enable(void){
150 unsigned long flags; 149 unsigned long flags;
151 150
152 /* Install error handler */ 151 /* Install error handler */
153 if (request_irq(87, l2c_error_handler, SA_INTERRUPT, "L2C", 0) < 0){ 152 if (request_irq(87, l2c_error_handler, IRQF_DISABLED, "L2C", 0) < 0){
154 printk(KERN_ERR "Cannot install L2C error handler, cache is not enabled\n"); 153 printk(KERN_ERR "Cannot install L2C error handler, cache is not enabled\n");
155 return; 154 return;
156 } 155 }
diff --git a/arch/ppc/syslib/ibm440gx_common.h b/arch/ppc/syslib/ibm440gx_common.h
index a03ec6022e8..8d6f203e7a1 100644
--- a/arch/ppc/syslib/ibm440gx_common.h
+++ b/arch/ppc/syslib/ibm440gx_common.h
@@ -16,7 +16,6 @@
16 16
17#ifndef __ASSEMBLY__ 17#ifndef __ASSEMBLY__
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/seq_file.h> 20#include <linux/seq_file.h>
22#include <syslib/ibm44x_common.h> 21#include <syslib/ibm44x_common.h>
diff --git a/arch/ppc/syslib/ibm440sp_common.c b/arch/ppc/syslib/ibm440sp_common.c
index 293e4138d17..571f8bcf78e 100644
--- a/arch/ppc/syslib/ibm440sp_common.c
+++ b/arch/ppc/syslib/ibm440sp_common.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/serial.h> 17#include <linux/serial.h>
19 18
diff --git a/arch/ppc/syslib/ibm44x_common.c b/arch/ppc/syslib/ibm44x_common.c
index 14a981a5cea..01f99b4a664 100644
--- a/arch/ppc/syslib/ibm44x_common.c
+++ b/arch/ppc/syslib/ibm44x_common.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/time.h> 16#include <linux/time.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/serial.h> 18#include <linux/serial.h>
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c
index 99e4bc0e42a..974581ea484 100644
--- a/arch/ppc/syslib/m8260_pci_erratum9.c
+++ b/arch/ppc/syslib/m8260_pci_erratum9.c
@@ -15,7 +15,6 @@
15 * or implied. 15 * or implied.
16 */ 16 */
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/pci.h> 19#include <linux/pci.h>
21#include <linux/types.h> 20#include <linux/types.h>
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c
index b7a6cb2d8d5..15f0d732353 100644
--- a/arch/ppc/syslib/m8260_setup.c
+++ b/arch/ppc/syslib/m8260_setup.c
@@ -6,7 +6,6 @@
6 * Further modified for generic 8xx and 8260 by Dan. 6 * Further modified for generic 8xx and 8260 by Dan.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c
index 63fa5b31339..d3fa264e179 100644
--- a/arch/ppc/syslib/m82xx_pci.c
+++ b/arch/ppc/syslib/m82xx_pci.c
@@ -139,7 +139,7 @@ pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs)
139 139
140static struct irqaction pq2pci_irqaction = { 140static struct irqaction pq2pci_irqaction = {
141 .handler = pq2pci_irq_demux, 141 .handler = pq2pci_irq_demux,
142 .flags = SA_INTERRUPT, 142 .flags = IRQF_DISABLED,
143 .mask = CPU_MASK_NONE, 143 .mask = CPU_MASK_NONE,
144 .name = "PQ2 PCI cascade", 144 .name = "PQ2 PCI cascade",
145}; 145};
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index 0c4c0de7c59..54303a7b4e6 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -10,7 +10,6 @@
10 * bootup setup stuff.. 10 * bootup setup stuff..
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/arch/ppc/syslib/mpc52xx_pci.c b/arch/ppc/syslib/mpc52xx_pci.c
index 5a5a7a9cd24..20a0eac0dc3 100644
--- a/arch/ppc/syslib/mpc52xx_pci.c
+++ b/arch/ppc/syslib/mpc52xx_pci.c
@@ -11,7 +11,6 @@
11 * kind, whether express or implied. 11 * kind, whether express or implied.
12 */ 12 */
13 13
14#include <linux/config.h>
15 14
16#include <asm/pci.h> 15#include <asm/pci.h>
17 16
diff --git a/arch/ppc/syslib/mpc52xx_setup.c b/arch/ppc/syslib/mpc52xx_setup.c
index ee6379bb415..80c609019bd 100644
--- a/arch/ppc/syslib/mpc52xx_setup.c
+++ b/arch/ppc/syslib/mpc52xx_setup.c
@@ -15,7 +15,6 @@
15 * kind, whether express or implied. 15 * kind, whether express or implied.
16 */ 16 */
17 17
18#include <linux/config.h>
19 18
20#include <asm/io.h> 19#include <asm/io.h>
21#include <asm/time.h> 20#include <asm/time.h>
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c
index a4244d46838..3f6d162f87c 100644
--- a/arch/ppc/syslib/mv64360_pic.c
+++ b/arch/ppc/syslib/mv64360_pic.c
@@ -380,7 +380,7 @@ mv64360_register_hdlrs(void)
380 /* Clear old errors and register CPU interface error intr handler */ 380 /* Clear old errors and register CPU interface error intr handler */
381 mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); 381 mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
382 if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, 382 if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base,
383 mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0))) 383 mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0)))
384 printk(KERN_WARNING "Can't register cpu error handler: %d", rc); 384 printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
385 385
386 mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); 386 mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
@@ -389,14 +389,14 @@ mv64360_register_hdlrs(void)
389 /* Clear old errors and register internal SRAM error intr handler */ 389 /* Clear old errors and register internal SRAM error intr handler */
390 mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); 390 mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0);
391 if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, 391 if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base,
392 mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) 392 mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, 0)))
393 printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); 393 printk(KERN_WARNING "Can't register SRAM error handler: %d",rc);
394 394
395 /* Clear old errors and register PCI 0 error intr handler */ 395 /* Clear old errors and register PCI 0 error intr handler */
396 mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); 396 mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0);
397 if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, 397 if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base,
398 mv64360_pci_error_int_handler, 398 mv64360_pci_error_int_handler,
399 SA_INTERRUPT, PCI0_INTR_STR, (void *)0))) 399 IRQF_DISABLED, PCI0_INTR_STR, (void *)0)))
400 printk(KERN_WARNING "Can't register pci 0 error handler: %d", 400 printk(KERN_WARNING "Can't register pci 0 error handler: %d",
401 rc); 401 rc);
402 402
@@ -411,7 +411,7 @@ mv64360_register_hdlrs(void)
411 mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); 411 mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0);
412 if ((rc = request_irq(MV64360_IRQ_PCI1 + mv64360_irq_base, 412 if ((rc = request_irq(MV64360_IRQ_PCI1 + mv64360_irq_base,
413 mv64360_pci_error_int_handler, 413 mv64360_pci_error_int_handler,
414 SA_INTERRUPT, PCI1_INTR_STR, (void *)1))) 414 IRQF_DISABLED, PCI1_INTR_STR, (void *)1)))
415 printk(KERN_WARNING "Can't register pci 1 error handler: %d", 415 printk(KERN_WARNING "Can't register pci 1 error handler: %d",
416 rc); 416 rc);
417 417
diff --git a/arch/ppc/syslib/mv64x60_dbg.c b/arch/ppc/syslib/mv64x60_dbg.c
index 9cf18764a1a..e1876261e5d 100644
--- a/arch/ppc/syslib/mv64x60_dbg.c
+++ b/arch/ppc/syslib/mv64x60_dbg.c
@@ -18,7 +18,6 @@
18 */ 18 */
19 19
20 20
21#include <linux/config.h>
22#include <linux/irq.h> 21#include <linux/irq.h>
23#include <asm/delay.h> 22#include <asm/delay.h>
24#include <asm/mv64x60.h> 23#include <asm/mv64x60.h>
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c
index a4ecc2ee579..50c55622ece 100644
--- a/arch/ppc/syslib/ocp.c
+++ b/arch/ppc/syslib/ocp.c
@@ -36,7 +36,6 @@
36 */ 36 */
37 37
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/config.h>
40#include <linux/list.h> 39#include <linux/list.h>
41#include <linux/miscdevice.h> 40#include <linux/miscdevice.h>
42#include <linux/slab.h> 41#include <linux/slab.h>
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c
index 767a0bc9581..aa0b9578870 100644
--- a/arch/ppc/syslib/open_pic.c
+++ b/arch/ppc/syslib/open_pic.c
@@ -6,7 +6,6 @@
6 * for more details. 6 * for more details.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
@@ -576,18 +575,21 @@ void openpic_request_IPIs(void)
576 if (OpenPIC == NULL) 575 if (OpenPIC == NULL)
577 return; 576 return;
578 577
579 /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */ 578 /*
579 * IPIs are marked IRQF_DISABLED as they must run with irqs
580 * disabled
581 */
580 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset, 582 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset,
581 openpic_ipi_action, SA_INTERRUPT, 583 openpic_ipi_action, IRQF_DISABLED,
582 "IPI0 (call function)", NULL); 584 "IPI0 (call function)", NULL);
583 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+1, 585 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+1,
584 openpic_ipi_action, SA_INTERRUPT, 586 openpic_ipi_action, IRQF_DISABLED,
585 "IPI1 (reschedule)", NULL); 587 "IPI1 (reschedule)", NULL);
586 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+2, 588 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+2,
587 openpic_ipi_action, SA_INTERRUPT, 589 openpic_ipi_action, IRQF_DISABLED,
588 "IPI2 (invalidate tlb)", NULL); 590 "IPI2 (invalidate tlb)", NULL);
589 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+3, 591 request_irq(OPENPIC_VEC_IPI+open_pic_irq_offset+3,
590 openpic_ipi_action, SA_INTERRUPT, 592 openpic_ipi_action, IRQF_DISABLED,
591 "IPI3 (xmon break)", NULL); 593 "IPI3 (xmon break)", NULL);
592 594
593 for ( i = 0; i < OPENPIC_NUM_IPI ; i++ ) 595 for ( i = 0; i < OPENPIC_NUM_IPI ; i++ )
@@ -692,7 +694,7 @@ openpic_init_nmi_irq(u_int irq)
692 694
693static struct irqaction openpic_cascade_irqaction = { 695static struct irqaction openpic_cascade_irqaction = {
694 .handler = no_action, 696 .handler = no_action,
695 .flags = SA_INTERRUPT, 697 .flags = IRQF_DISABLED,
696 .mask = CPU_MASK_NONE, 698 .mask = CPU_MASK_NONE,
697}; 699};
698 700
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c
index b8154efff6e..e1ff971539e 100644
--- a/arch/ppc/syslib/open_pic2.c
+++ b/arch/ppc/syslib/open_pic2.c
@@ -10,7 +10,6 @@
10 * register accesses 10 * register accesses
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/arch/ppc/syslib/ppc440spe_pcie.c b/arch/ppc/syslib/ppc440spe_pcie.c
index 1509fc1ddfb..dd5d4b958c3 100644
--- a/arch/ppc/syslib/ppc440spe_pcie.c
+++ b/arch/ppc/syslib/ppc440spe_pcie.c
@@ -8,7 +8,6 @@
8 * option) any later version. 8 * option) any later version.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/delay.h> 12#include <linux/delay.h>
14#include <linux/pci.h> 13#include <linux/pci.h>
diff --git a/arch/ppc/syslib/ppc4xx_dma.c b/arch/ppc/syslib/ppc4xx_dma.c
index b40b96a8c60..1eef4ffed4f 100644
--- a/arch/ppc/syslib/ppc4xx_dma.c
+++ b/arch/ppc/syslib/ppc4xx_dma.c
@@ -19,7 +19,6 @@
19 * 675 Mass Ave, Cambridge, MA 02139, USA. 19 * 675 Mass Ave, Cambridge, MA 02139, USA.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
25#include <linux/miscdevice.h> 24#include <linux/miscdevice.h>
diff --git a/arch/ppc/syslib/ppc4xx_pic.c b/arch/ppc/syslib/ppc4xx_pic.c
index e669c1335d4..745685df598 100644
--- a/arch/ppc/syslib/ppc4xx_pic.c
+++ b/arch/ppc/syslib/ppc4xx_pic.c
@@ -13,7 +13,6 @@
13 * Free Software Foundation; either version 2 of the License, or (at your 13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version. 14 * option) any later version.
15*/ 15*/
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/signal.h> 18#include <linux/signal.h>
diff --git a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c
index e83a83fd95e..debe14c083a 100644
--- a/arch/ppc/syslib/ppc4xx_setup.c
+++ b/arch/ppc/syslib/ppc4xx_setup.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/smp.h> 17#include <linux/smp.h>
19#include <linux/threads.h> 18#include <linux/threads.h>
diff --git a/arch/ppc/syslib/ppc4xx_sgdma.c b/arch/ppc/syslib/ppc4xx_sgdma.c
index 280ea010a9c..2f83e162971 100644
--- a/arch/ppc/syslib/ppc4xx_sgdma.c
+++ b/arch/ppc/syslib/ppc4xx_sgdma.c
@@ -19,7 +19,6 @@
19 * 675 Mass Ave, Cambridge, MA 02139, USA. 19 * 675 Mass Ave, Cambridge, MA 02139, USA.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
25#include <linux/init.h> 24#include <linux/init.h>
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c
index 26afd637dc8..ec466db5211 100644
--- a/arch/ppc/syslib/ppc83xx_setup.c
+++ b/arch/ppc/syslib/ppc83xx_setup.c
@@ -22,7 +22,6 @@
22 * Added PCI support -- Tony Li <tony.li@freescale.com> 22 * Added PCI support -- Tony Li <tony.li@freescale.com>
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/types.h> 25#include <linux/types.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/init.h> 27#include <linux/init.h>
diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h
index 478b011cd96..b918a2d245e 100644
--- a/arch/ppc/syslib/ppc83xx_setup.h
+++ b/arch/ppc/syslib/ppc83xx_setup.h
@@ -23,7 +23,6 @@
23#ifndef __PPC_SYSLIB_PPC83XX_SETUP_H 23#ifndef __PPC_SYSLIB_PPC83XX_SETUP_H
24#define __PPC_SYSLIB_PPC83XX_SETUP_H 24#define __PPC_SYSLIB_PPC83XX_SETUP_H
25 25
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28 27
29extern unsigned long mpc83xx_find_end_of_memory(void) __init; 28extern unsigned long mpc83xx_find_end_of_memory(void) __init;
diff --git a/arch/ppc/syslib/ppc85xx_common.c b/arch/ppc/syslib/ppc85xx_common.c
index 0145c968f9a..e5ac699e731 100644
--- a/arch/ppc/syslib/ppc85xx_common.c
+++ b/arch/ppc/syslib/ppc85xx_common.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/types.h> 14#include <linux/types.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/ppc/syslib/ppc85xx_common.h b/arch/ppc/syslib/ppc85xx_common.h
index 182744a1321..4fc40542511 100644
--- a/arch/ppc/syslib/ppc85xx_common.h
+++ b/arch/ppc/syslib/ppc85xx_common.h
@@ -14,7 +14,6 @@
14#ifndef __PPC_SYSLIB_PPC85XX_COMMON_H 14#ifndef __PPC_SYSLIB_PPC85XX_COMMON_H
15#define __PPC_SYSLIB_PPC85XX_COMMON_H 15#define __PPC_SYSLIB_PPC85XX_COMMON_H
16 16
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19 18
20/* Provide access to ccsrbar for any modules, etc */ 19/* Provide access to ccsrbar for any modules, etc */
diff --git a/arch/ppc/syslib/ppc85xx_rio.c b/arch/ppc/syslib/ppc85xx_rio.c
index 297f3b54917..d9b471b4d69 100644
--- a/arch/ppc/syslib/ppc85xx_rio.c
+++ b/arch/ppc/syslib/ppc85xx_rio.c
@@ -10,7 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/types.h> 15#include <linux/types.h>
diff --git a/arch/ppc/syslib/ppc85xx_rio.h b/arch/ppc/syslib/ppc85xx_rio.h
index c0827a2c3ee..6d3ff30b157 100644
--- a/arch/ppc/syslib/ppc85xx_rio.h
+++ b/arch/ppc/syslib/ppc85xx_rio.h
@@ -13,7 +13,6 @@
13#ifndef __PPC_SYSLIB_PPC85XX_RIO_H 13#ifndef __PPC_SYSLIB_PPC85XX_RIO_H
14#define __PPC_SYSLIB_PPC85XX_RIO_H 14#define __PPC_SYSLIB_PPC85XX_RIO_H
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18 17
19extern void mpc85xx_rio_setup(int law_start, int law_size); 18extern void mpc85xx_rio_setup(int law_start, int law_size);
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c
index 79b7089d750..2475ec6600f 100644
--- a/arch/ppc/syslib/ppc85xx_setup.c
+++ b/arch/ppc/syslib/ppc85xx_setup.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/types.h> 14#include <linux/types.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/ppc/syslib/ppc85xx_setup.h b/arch/ppc/syslib/ppc85xx_setup.h
index f55b8032d3d..6ff79995210 100644
--- a/arch/ppc/syslib/ppc85xx_setup.h
+++ b/arch/ppc/syslib/ppc85xx_setup.h
@@ -15,7 +15,6 @@
15#ifndef __PPC_SYSLIB_PPC85XX_SETUP_H 15#ifndef __PPC_SYSLIB_PPC85XX_SETUP_H
16#define __PPC_SYSLIB_PPC85XX_SETUP_H 16#define __PPC_SYSLIB_PPC85XX_SETUP_H
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <asm/ppcboot.h> 19#include <asm/ppcboot.h>
21 20
diff --git a/arch/ppc/syslib/ppc8xx_pic.c b/arch/ppc/syslib/ppc8xx_pic.c
index 3e6f51a61d4..d6c25fe2501 100644
--- a/arch/ppc/syslib/ppc8xx_pic.c
+++ b/arch/ppc/syslib/ppc8xx_pic.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/stddef.h> 2#include <linux/stddef.h>
4#include <linux/init.h> 3#include <linux/init.h>
diff --git a/arch/ppc/syslib/ppc8xx_pic.h b/arch/ppc/syslib/ppc8xx_pic.h
index 784935eac36..d7d9f651a91 100644
--- a/arch/ppc/syslib/ppc8xx_pic.h
+++ b/arch/ppc/syslib/ppc8xx_pic.h
@@ -1,7 +1,6 @@
1#ifndef _PPC_KERNEL_PPC8xx_H 1#ifndef _PPC_KERNEL_PPC8xx_H
2#define _PPC_KERNEL_PPC8xx_H 2#define _PPC_KERNEL_PPC8xx_H
3 3
4#include <linux/config.h>
5#include <linux/irq.h> 4#include <linux/irq.h>
6#include <linux/interrupt.h> 5#include <linux/interrupt.h>
7 6
diff --git a/arch/ppc/syslib/qspan_pci.c b/arch/ppc/syslib/qspan_pci.c
index 0970b5d3039..85053b2816a 100644
--- a/arch/ppc/syslib/qspan_pci.c
+++ b/arch/ppc/syslib/qspan_pci.c
@@ -15,7 +15,6 @@
15 * we have switched the chip select. 15 * we have switched the chip select.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/pci.h> 19#include <linux/pci.h>
21#include <linux/delay.h> 20#include <linux/delay.h>
diff --git a/arch/ppc/xmon/privinst.h b/arch/ppc/xmon/privinst.h
index 93978c027ca..c492a35687b 100644
--- a/arch/ppc/xmon/privinst.h
+++ b/arch/ppc/xmon/privinst.h
@@ -1,7 +1,6 @@
1/* 1/*
2 * Copyright (C) 1996 Paul Mackerras. 2 * Copyright (C) 1996 Paul Mackerras.
3 */ 3 */
4#include <linux/config.h>
5 4
6#define GETREG(reg) \ 5#define GETREG(reg) \
7 static inline int get_ ## reg (void) \ 6 static inline int get_ ## reg (void) \
diff --git a/arch/ppc/xmon/start.c b/arch/ppc/xmon/start.c
index cfc2d6ad464..f7e92986952 100644
--- a/arch/ppc/xmon/start.c
+++ b/arch/ppc/xmon/start.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * Copyright (C) 1996 Paul Mackerras. 2 * Copyright (C) 1996 Paul Mackerras.
3 */ 3 */
4#include <linux/config.h>
5#include <linux/string.h> 4#include <linux/string.h>
6#include <asm/machdep.h> 5#include <asm/machdep.h>
7#include <asm/io.h> 6#include <asm/io.h>
diff --git a/arch/ppc/xmon/xmon.c b/arch/ppc/xmon/xmon.c
index 06fa44b5c64..37d234f9339 100644
--- a/arch/ppc/xmon/xmon.c
+++ b/arch/ppc/xmon/xmon.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Copyright (C) 1996 Paul Mackerras. 4 * Copyright (C) 1996 Paul Mackerras.
5 */ 5 */
6#include <linux/config.h>
7#include <linux/errno.h> 6#include <linux/errno.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/smp.h> 8#include <linux/smp.h>
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c
index 2476ca739c1..d0f82c995af 100644
--- a/arch/s390/appldata/appldata_base.c
+++ b/arch/s390/appldata/appldata_base.c
@@ -10,7 +10,6 @@
10 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> 10 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c
index 4811e2dac86..ab3b0765a64 100644
--- a/arch/s390/appldata/appldata_mem.c
+++ b/arch/s390/appldata/appldata_mem.c
@@ -9,7 +9,6 @@
9 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> 9 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c
index 39b7bdecbf0..075e619bf37 100644
--- a/arch/s390/appldata/appldata_net_sum.c
+++ b/arch/s390/appldata/appldata_net_sum.c
@@ -10,7 +10,6 @@
10 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> 10 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c
index f2b44a2f1de..161acc5c8a1 100644
--- a/arch/s390/appldata/appldata_os.c
+++ b/arch/s390/appldata/appldata_os.c
@@ -9,7 +9,6 @@
9 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com> 9 * Author: Gerald Schaefer <gerald.schaefer@de.ibm.com>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/arch/s390/kernel/asm-offsets.c b/arch/s390/kernel/asm-offsets.c
index 3f7018e9dbe..ec514fe5ccd 100644
--- a/arch/s390/kernel/asm-offsets.c
+++ b/arch/s390/kernel/asm-offsets.c
@@ -4,7 +4,6 @@
4 * and format the required data. 4 * and format the required data.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9 8
10/* Use marker if you need to separate the values later */ 9/* Use marker if you need to separate the values later */
diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c
index 12a6311e983..9565a2dcfad 100644
--- a/arch/s390/kernel/binfmt_elf32.c
+++ b/arch/s390/kernel/binfmt_elf32.c
@@ -135,7 +135,6 @@ static inline int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
135 135
136#include <asm/processor.h> 136#include <asm/processor.h>
137#include <linux/module.h> 137#include <linux/module.h>
138#include <linux/config.h>
139#include <linux/elfcore.h> 138#include <linux/elfcore.h>
140#include <linux/binfmts.h> 139#include <linux/binfmts.h>
141#include <linux/compat.h> 140#include <linux/compat.h>
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c
index 5e14de37c17..cabb4ff54cd 100644
--- a/arch/s390/kernel/compat_linux.c
+++ b/arch/s390/kernel/compat_linux.c
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h
index 3898f66d0b2..1a18e29668e 100644
--- a/arch/s390/kernel/compat_linux.h
+++ b/arch/s390/kernel/compat_linux.h
@@ -1,7 +1,6 @@
1#ifndef _ASM_S390X_S390_H 1#ifndef _ASM_S390X_S390_H
2#define _ASM_S390X_S390_H 2#define _ASM_S390X_S390_H
3 3
4#include <linux/config.h>
5#include <linux/compat.h> 4#include <linux/compat.h>
6#include <linux/socket.h> 5#include <linux/socket.h>
7#include <linux/syscalls.h> 6#include <linux/syscalls.h>
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c
index b4c815d8ef7..d49b876a83b 100644
--- a/arch/s390/kernel/compat_signal.c
+++ b/arch/s390/kernel/compat_signal.c
@@ -10,7 +10,6 @@
10 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson 10 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/compat.h> 13#include <linux/compat.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c
index 06a3fbc1253..7ba20922a53 100644
--- a/arch/s390/kernel/debug.c
+++ b/arch/s390/kernel/debug.c
@@ -10,7 +10,6 @@
10 * Bugreports to: <Linux390@de.ibm.com> 10 * Bugreports to: <Linux390@de.ibm.com>
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/stddef.h> 13#include <linux/stddef.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index aa8b52c2140..d8948c342ca 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -11,7 +11,6 @@
11 11
12#include <linux/sys.h> 12#include <linux/sys.h>
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <linux/config.h>
15#include <asm/cache.h> 14#include <asm/cache.h>
16#include <asm/lowcore.h> 15#include <asm/lowcore.h>
17#include <asm/errno.h> 16#include <asm/errno.h>
@@ -229,8 +228,9 @@ sysc_do_svc:
229sysc_nr_ok: 228sysc_nr_ok:
230 mvc SP_ARGS(4,%r15),SP_R7(%r15) 229 mvc SP_ARGS(4,%r15),SP_R7(%r15)
231sysc_do_restart: 230sysc_do_restart:
231 l %r8,BASED(.Lsysc_table)
232 tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT) 232 tm __TI_flags+3(%r9),(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)
233 l %r8,sys_call_table-system_call(%r7,%r13) # get system call addr. 233 l %r8,0(%r7,%r8) # get system call addr.
234 bnz BASED(sysc_tracesys) 234 bnz BASED(sysc_tracesys)
235 basr %r14,%r8 # call sys_xxxx 235 basr %r14,%r8 # call sys_xxxx
236 st %r2,SP_R2(%r15) # store return value (change R2 on stack) 236 st %r2,SP_R2(%r15) # store return value (change R2 on stack)
@@ -331,9 +331,10 @@ sysc_tracesys:
331 basr %r14,%r1 331 basr %r14,%r1
332 clc SP_R2(4,%r15),BASED(.Lnr_syscalls) 332 clc SP_R2(4,%r15),BASED(.Lnr_syscalls)
333 bnl BASED(sysc_tracenogo) 333 bnl BASED(sysc_tracenogo)
334 l %r8,BASED(.Lsysc_table)
334 l %r7,SP_R2(%r15) # strace might have changed the 335 l %r7,SP_R2(%r15) # strace might have changed the
335 sll %r7,2 # system call 336 sll %r7,2 # system call
336 l %r8,sys_call_table-system_call(%r7,%r13) 337 l %r8,0(%r7,%r8)
337sysc_tracego: 338sysc_tracego:
338 lm %r3,%r6,SP_R3(%r15) 339 lm %r3,%r6,SP_R3(%r15)
339 l %r2,SP_ORIG_R2(%r15) 340 l %r2,SP_ORIG_R2(%r15)
@@ -1010,6 +1011,7 @@ cleanup_io_leave_insn:
1010.Ltrace: .long syscall_trace 1011.Ltrace: .long syscall_trace
1011.Lvfork: .long sys_vfork 1012.Lvfork: .long sys_vfork
1012.Lschedtail: .long schedule_tail 1013.Lschedtail: .long schedule_tail
1014.Lsysc_table: .long sys_call_table
1013 1015
1014.Lcritical_start: 1016.Lcritical_start:
1015 .long __critical_start + 0x80000000 1017 .long __critical_start + 0x80000000
@@ -1018,8 +1020,8 @@ cleanup_io_leave_insn:
1018.Lcleanup_critical: 1020.Lcleanup_critical:
1019 .long cleanup_critical 1021 .long cleanup_critical
1020 1022
1023 .section .rodata, "a"
1021#define SYSCALL(esa,esame,emu) .long esa 1024#define SYSCALL(esa,esame,emu) .long esa
1022sys_call_table: 1025sys_call_table:
1023#include "syscalls.S" 1026#include "syscalls.S"
1024#undef SYSCALL 1027#undef SYSCALL
1025
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index f3222a1b286..1ca499fa54b 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -11,7 +11,6 @@
11 11
12#include <linux/sys.h> 12#include <linux/sys.h>
13#include <linux/linkage.h> 13#include <linux/linkage.h>
14#include <linux/config.h>
15#include <asm/cache.h> 14#include <asm/cache.h>
16#include <asm/lowcore.h> 15#include <asm/lowcore.h>
17#include <asm/errno.h> 16#include <asm/errno.h>
@@ -992,6 +991,7 @@ cleanup_io_leave_insn:
992.Lcritical_end: 991.Lcritical_end:
993 .quad __critical_end 992 .quad __critical_end
994 993
994 .section .rodata, "a"
995#define SYSCALL(esa,esame,emu) .long esame 995#define SYSCALL(esa,esame,emu) .long esame
996sys_call_table: 996sys_call_table:
997#include "syscalls.S" 997#include "syscalls.S"
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index 538c82da49b..adad8863ee2 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <asm/setup.h> 26#include <asm/setup.h>
28#include <asm/lowcore.h> 27#include <asm/lowcore.h>
29#include <asm/asm-offsets.h> 28#include <asm/asm-offsets.h>
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c
index 4a0f5a1551e..1f939919179 100644
--- a/arch/s390/kernel/process.c
+++ b/arch/s390/kernel/process.c
@@ -15,7 +15,6 @@
15 * This file handles the architecture-dependent parts of process handling.. 15 * This file handles the architecture-dependent parts of process handling..
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/compiler.h> 18#include <linux/compiler.h>
20#include <linux/cpu.h> 19#include <linux/cpu.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
diff --git a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c
index 0886e739d12..c73a45467fa 100644
--- a/arch/s390/kernel/s390_ksyms.c
+++ b/arch/s390/kernel/s390_ksyms.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * S390 version 4 * S390 version
5 */ 5 */
6#include <linux/config.h>
7#include <linux/highuid.h> 6#include <linux/highuid.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 2b2551e3510..1ca34f54ea8 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -28,7 +28,6 @@
28#include <linux/tty.h> 28#include <linux/tty.h>
29#include <linux/ioport.h> 29#include <linux/ioport.h>
30#include <linux/delay.h> 30#include <linux/delay.h>
31#include <linux/config.h>
32#include <linux/init.h> 31#include <linux/init.h>
33#include <linux/initrd.h> 32#include <linux/initrd.h>
34#include <linux/bootmem.h> 33#include <linux/bootmem.h>
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c
index d48cfc726b6..a887b686f27 100644
--- a/arch/s390/kernel/signal.c
+++ b/arch/s390/kernel/signal.c
@@ -11,7 +11,6 @@
11 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson 11 * 1997-11-28 Modified for POSIX.1b signals by Richard Henderson
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/smp.h> 16#include <linux/smp.h>
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c
index 2a6c6efb686..f7fe9bc4339 100644
--- a/arch/s390/kernel/time.c
+++ b/arch/s390/kernel/time.c
@@ -12,7 +12,6 @@
12 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 12 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c
index b7630436f69..12240c03a6d 100644
--- a/arch/s390/kernel/traps.c
+++ b/arch/s390/kernel/traps.c
@@ -14,7 +14,6 @@
14 * 'Traps.c' handles hardware traps and faults after we have saved some 14 * 'Traps.c' handles hardware traps and faults after we have saved some
15 * state in 'asm.s'. 15 * state in 'asm.s'.
16 */ 16 */
17#include <linux/config.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/string.h> 19#include <linux/string.h>
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S
index 9f34bb54c05..ff5f7bb34f7 100644
--- a/arch/s390/kernel/vmlinux.lds.S
+++ b/arch/s390/kernel/vmlinux.lds.S
@@ -3,7 +3,6 @@
3 */ 3 */
4 4
5#include <asm-generic/vmlinux.lds.h> 5#include <asm-generic/vmlinux.lds.h>
6#include <linux/config.h>
7 6
8#ifndef CONFIG_64BIT 7#ifndef CONFIG_64BIT
9OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390") 8OUTPUT_FORMAT("elf32-s390", "elf32-s390", "elf32-s390")
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 1f0439dc245..2306cd83fca 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -7,7 +7,6 @@
7 * Author(s): Jan Glauber <jan.glauber@de.ibm.com> 7 * Author(s): Jan Glauber <jan.glauber@de.ibm.com>
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/time.h> 12#include <linux/time.h>
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c
index 71f0a2fb307..468f4ea33f9 100644
--- a/arch/s390/lib/delay.c
+++ b/arch/s390/lib/delay.c
@@ -11,7 +11,6 @@
11 * Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz> 11 * Copyright (C) 1997 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
17 16
diff --git a/arch/s390/math-emu/math.c b/arch/s390/math-emu/math.c
index 648df714033..b4957c84e4d 100644
--- a/arch/s390/math-emu/math.c
+++ b/arch/s390/math-emu/math.c
@@ -9,7 +9,6 @@
9 * that does not have the IEEE fpu (all processors before G5). 9 * that does not have the IEEE fpu (all processors before G5).
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c
index 51596f42923..81be2fec7dc 100644
--- a/arch/s390/mm/cmm.c
+++ b/arch/s390/mm/cmm.c
@@ -8,7 +8,6 @@
8 * Collaborative memory management interface. 8 * Collaborative memory management interface.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 81ade401b07..833d5941746 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -10,7 +10,6 @@
10 * Copyright (C) 1995 Linus Torvalds 10 * Copyright (C) 1995 Linus Torvalds
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/signal.h> 13#include <linux/signal.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/arch/s390/mm/init.c b/arch/s390/mm/init.c
index a055894f3bd..eb6ebfef134 100644
--- a/arch/s390/mm/init.c
+++ b/arch/s390/mm/init.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1995 Linus Torvalds 9 * Copyright (C) 1995 Linus Torvalds
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/signal.h> 12#include <linux/signal.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
@@ -24,6 +23,7 @@
24#include <linux/init.h> 23#include <linux/init.h>
25#include <linux/pagemap.h> 24#include <linux/pagemap.h>
26#include <linux/bootmem.h> 25#include <linux/bootmem.h>
26#include <linux/pfn.h>
27 27
28#include <asm/processor.h> 28#include <asm/processor.h>
29#include <asm/system.h> 29#include <asm/system.h>
@@ -34,6 +34,7 @@
34#include <asm/lowcore.h> 34#include <asm/lowcore.h>
35#include <asm/tlb.h> 35#include <asm/tlb.h>
36#include <asm/tlbflush.h> 36#include <asm/tlbflush.h>
37#include <asm/sections.h>
37 38
38DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 39DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
39 40
@@ -90,17 +91,6 @@ void show_mem(void)
90 printk("%d pages swap cached\n",cached); 91 printk("%d pages swap cached\n",cached);
91} 92}
92 93
93/* References to section boundaries */
94
95extern unsigned long _text;
96extern unsigned long _etext;
97extern unsigned long _edata;
98extern unsigned long __bss_start;
99extern unsigned long _end;
100
101extern unsigned long __init_begin;
102extern unsigned long __init_end;
103
104extern unsigned long __initdata zholes_size[]; 94extern unsigned long __initdata zholes_size[];
105/* 95/*
106 * paging_init() sets up the page tables 96 * paging_init() sets up the page tables
@@ -117,6 +107,10 @@ void __init paging_init(void)
117 unsigned long pfn = 0; 107 unsigned long pfn = 0;
118 unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE; 108 unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | _KERNSEG_TABLE;
119 static const int ssm_mask = 0x04000000L; 109 static const int ssm_mask = 0x04000000L;
110 unsigned long ro_start_pfn, ro_end_pfn;
111
112 ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata);
113 ro_end_pfn = PFN_UP((unsigned long)&__end_rodata);
120 114
121 /* unmap whole virtual address space */ 115 /* unmap whole virtual address space */
122 116
@@ -144,7 +138,10 @@ void __init paging_init(void)
144 pg_dir++; 138 pg_dir++;
145 139
146 for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) { 140 for (tmp = 0 ; tmp < PTRS_PER_PTE ; tmp++,pg_table++) {
147 pte = pfn_pte(pfn, PAGE_KERNEL); 141 if (pfn >= ro_start_pfn && pfn < ro_end_pfn)
142 pte = pfn_pte(pfn, __pgprot(_PAGE_RO));
143 else
144 pte = pfn_pte(pfn, PAGE_KERNEL);
148 if (pfn >= max_low_pfn) 145 if (pfn >= max_low_pfn)
149 pte_clear(&init_mm, 0, &pte); 146 pte_clear(&init_mm, 0, &pte);
150 set_pte(pg_table, pte); 147 set_pte(pg_table, pte);
@@ -176,6 +173,7 @@ void __init paging_init(void)
176} 173}
177 174
178#else /* CONFIG_64BIT */ 175#else /* CONFIG_64BIT */
176
179void __init paging_init(void) 177void __init paging_init(void)
180{ 178{
181 pgd_t * pg_dir; 179 pgd_t * pg_dir;
@@ -187,13 +185,15 @@ void __init paging_init(void)
187 unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) | 185 unsigned long pgdir_k = (__pa(swapper_pg_dir) & PAGE_MASK) |
188 _KERN_REGION_TABLE; 186 _KERN_REGION_TABLE;
189 static const int ssm_mask = 0x04000000L; 187 static const int ssm_mask = 0x04000000L;
190
191 unsigned long zones_size[MAX_NR_ZONES]; 188 unsigned long zones_size[MAX_NR_ZONES];
192 unsigned long dma_pfn, high_pfn; 189 unsigned long dma_pfn, high_pfn;
190 unsigned long ro_start_pfn, ro_end_pfn;
193 191
194 memset(zones_size, 0, sizeof(zones_size)); 192 memset(zones_size, 0, sizeof(zones_size));
195 dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT; 193 dma_pfn = MAX_DMA_ADDRESS >> PAGE_SHIFT;
196 high_pfn = max_low_pfn; 194 high_pfn = max_low_pfn;
195 ro_start_pfn = PFN_DOWN((unsigned long)&__start_rodata);
196 ro_end_pfn = PFN_UP((unsigned long)&__end_rodata);
197 197
198 if (dma_pfn > high_pfn) 198 if (dma_pfn > high_pfn)
199 zones_size[ZONE_DMA] = high_pfn; 199 zones_size[ZONE_DMA] = high_pfn;
@@ -232,7 +232,10 @@ void __init paging_init(void)
232 pmd_populate_kernel(&init_mm, pm_dir, pt_dir); 232 pmd_populate_kernel(&init_mm, pm_dir, pt_dir);
233 233
234 for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) { 234 for (k = 0 ; k < PTRS_PER_PTE ; k++,pt_dir++) {
235 pte = pfn_pte(pfn, PAGE_KERNEL); 235 if (pfn >= ro_start_pfn && pfn < ro_end_pfn)
236 pte = pfn_pte(pfn, __pgprot(_PAGE_RO));
237 else
238 pte = pfn_pte(pfn, PAGE_KERNEL);
236 if (pfn >= max_low_pfn) { 239 if (pfn >= max_low_pfn) {
237 pte_clear(&init_mm, 0, &pte); 240 pte_clear(&init_mm, 0, &pte);
238 continue; 241 continue;
@@ -283,6 +286,9 @@ void __init mem_init(void)
283 reservedpages << (PAGE_SHIFT-10), 286 reservedpages << (PAGE_SHIFT-10),
284 datasize >>10, 287 datasize >>10,
285 initsize >> 10); 288 initsize >> 10);
289 printk("Write protected kernel read-only data: %#lx - %#lx\n",
290 (unsigned long)&__start_rodata,
291 PFN_ALIGN((unsigned long)&__end_rodata) - 1);
286} 292}
287 293
288void free_initmem(void) 294void free_initmem(void)
diff --git a/arch/sh/boards/adx/irq_maskreg.c b/arch/sh/boards/adx/irq_maskreg.c
index 357fab1bac2..4b2abe5eb16 100644
--- a/arch/sh/boards/adx/irq_maskreg.c
+++ b/arch/sh/boards/adx/irq_maskreg.c
@@ -13,7 +13,6 @@
13 * Each bit of the register is for masking each interrupt. 13 * Each bit of the register is for masking each interrupt.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/irq.h> 18#include <linux/irq.h>
diff --git a/arch/sh/boards/bigsur/io.c b/arch/sh/boards/bigsur/io.c
index a9fde781b21..6835381da5f 100644
--- a/arch/sh/boards/bigsur/io.c
+++ b/arch/sh/boards/bigsur/io.c
@@ -14,7 +14,6 @@
14 * IO functions for a Hitachi Big Sur Evaluation Board. 14 * IO functions for a Hitachi Big Sur Evaluation Board.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <asm/machvec.h> 19#include <asm/machvec.h>
diff --git a/arch/sh/boards/bigsur/irq.c b/arch/sh/boards/bigsur/irq.c
index 1d32425782c..ac946a2201c 100644
--- a/arch/sh/boards/bigsur/irq.c
+++ b/arch/sh/boards/bigsur/irq.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
diff --git a/arch/sh/boards/bigsur/led.c b/arch/sh/boards/bigsur/led.c
index 0a2339c6944..6b08c0e1c45 100644
--- a/arch/sh/boards/bigsur/led.c
+++ b/arch/sh/boards/bigsur/led.c
@@ -11,7 +11,6 @@
11 * This file contains Big Sur specific LED code. 11 * This file contains Big Sur specific LED code.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <asm/io.h> 14#include <asm/io.h>
16#include <asm/bigsur/bigsur.h> 15#include <asm/bigsur/bigsur.h>
17 16
diff --git a/arch/sh/boards/bigsur/setup.c b/arch/sh/boards/bigsur/setup.c
index e69be05195f..dfeede9da50 100644
--- a/arch/sh/boards/bigsur/setup.c
+++ b/arch/sh/boards/bigsur/setup.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
diff --git a/arch/sh/boards/cat68701/setup.c b/arch/sh/boards/cat68701/setup.c
index ae8a350ade5..90e5175df22 100644
--- a/arch/sh/boards/cat68701/setup.c
+++ b/arch/sh/boards/cat68701/setup.c
@@ -15,7 +15,6 @@
15#include <asm/io.h> 15#include <asm/io.h>
16#include <asm/machvec.h> 16#include <asm/machvec.h>
17#include <asm/mach/io.h> 17#include <asm/mach/io.h>
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
diff --git a/arch/sh/boards/cqreek/setup.c b/arch/sh/boards/cqreek/setup.c
index 29b537cd654..eff4ed93599 100644
--- a/arch/sh/boards/cqreek/setup.c
+++ b/arch/sh/boards/cqreek/setup.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
diff --git a/arch/sh/boards/harp/irq.c b/arch/sh/boards/harp/irq.c
index 701fa55d529..96bb41c9fc5 100644
--- a/arch/sh/boards/harp/irq.c
+++ b/arch/sh/boards/harp/irq.c
@@ -9,7 +9,6 @@
9 * Bases on the IPR irq system 9 * Bases on the IPR irq system
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15 14
diff --git a/arch/sh/boards/harp/led.c b/arch/sh/boards/harp/led.c
index 76ca4ccac70..aeb7b392b19 100644
--- a/arch/sh/boards/harp/led.c
+++ b/arch/sh/boards/harp/led.c
@@ -9,7 +9,6 @@
9 * This file contains ST40STB1 HARP and compatible code. 9 * This file contains ST40STB1 HARP and compatible code.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/io.h> 12#include <asm/io.h>
14#include <asm/harp/harp.h> 13#include <asm/harp/harp.h>
15 14
diff --git a/arch/sh/boards/harp/setup.c b/arch/sh/boards/harp/setup.c
index 05b01b8f40a..886e450ab63 100644
--- a/arch/sh/boards/harp/setup.c
+++ b/arch/sh/boards/harp/setup.c
@@ -9,7 +9,6 @@
9 * STMicroelectronics ST40STB1 HARP and compatible support. 9 * STMicroelectronics ST40STB1 HARP and compatible support.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <asm/io.h> 14#include <asm/io.h>
diff --git a/arch/sh/boards/hp6xx/setup.c b/arch/sh/boards/hp6xx/setup.c
index 6d94a8e2e67..71f315663cc 100644
--- a/arch/sh/boards/hp6xx/setup.c
+++ b/arch/sh/boards/hp6xx/setup.c
@@ -9,7 +9,6 @@
9 * Setup code for an HP680 (internal peripherials only) 9 * Setup code for an HP680 (internal peripherials only)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <asm/io.h> 13#include <asm/io.h>
15#include <asm/hd64461.h> 14#include <asm/hd64461.h>
diff --git a/arch/sh/boards/mpc1211/led.c b/arch/sh/boards/mpc1211/led.c
index 0a31beec346..1fe36927f69 100644
--- a/arch/sh/boards/mpc1211/led.c
+++ b/arch/sh/boards/mpc1211/led.c
@@ -6,7 +6,6 @@
6 * This file contains Interface MPC-1211 specific LED code. 6 * This file contains Interface MPC-1211 specific LED code.
7 */ 7 */
8 8
9#include <linux/config.h>
10 9
11static void mach_led(int position, int value) 10static void mach_led(int position, int value)
12{ 11{
diff --git a/arch/sh/boards/mpc1211/pci.c b/arch/sh/boards/mpc1211/pci.c
index 9f7ccd33ffb..4ed1a95c6d5 100644
--- a/arch/sh/boards/mpc1211/pci.c
+++ b/arch/sh/boards/mpc1211/pci.c
@@ -11,7 +11,6 @@
11 * License. See linux/COPYING for more information. 11 * License. See linux/COPYING for more information.
12 * 12 *
13 */ 13 */
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.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/sh/boards/mpc1211/setup.c b/arch/sh/boards/mpc1211/setup.c
index b72f009c52c..2bfb221cc35 100644
--- a/arch/sh/boards/mpc1211/setup.c
+++ b/arch/sh/boards/mpc1211/setup.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/irq.h> 9#include <linux/irq.h>
11#include <linux/hdreg.h> 10#include <linux/hdreg.h>
diff --git a/arch/sh/boards/overdrive/fpga.c b/arch/sh/boards/overdrive/fpga.c
index 3a1ec940344..956c2390122 100644
--- a/arch/sh/boards/overdrive/fpga.c
+++ b/arch/sh/boards/overdrive/fpga.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/smp.h> 14#include <linux/smp.h>
16#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
diff --git a/arch/sh/boards/overdrive/galileo.c b/arch/sh/boards/overdrive/galileo.c
index b055809d2ac..29e48971bba 100644
--- a/arch/sh/boards/overdrive/galileo.c
+++ b/arch/sh/boards/overdrive/galileo.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/smp.h> 13#include <linux/smp.h>
15#include <linux/smp_lock.h> 14#include <linux/smp_lock.h>
diff --git a/arch/sh/boards/overdrive/io.c b/arch/sh/boards/overdrive/io.c
index 65f3fd0563d..4671b6b047b 100644
--- a/arch/sh/boards/overdrive/io.c
+++ b/arch/sh/boards/overdrive/io.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/delay.h> 12#include <linux/delay.h>
14#include <asm/processor.h> 13#include <asm/processor.h>
diff --git a/arch/sh/boards/overdrive/irq.c b/arch/sh/boards/overdrive/irq.c
index 2c13a7de6b2..5d730c70389 100644
--- a/arch/sh/boards/overdrive/irq.c
+++ b/arch/sh/boards/overdrive/irq.c
@@ -9,7 +9,6 @@
9 * Bases on the IPR irq system 9 * Bases on the IPR irq system
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15 14
diff --git a/arch/sh/boards/overdrive/led.c b/arch/sh/boards/overdrive/led.c
index 734742e9227..860d7f204a4 100644
--- a/arch/sh/boards/overdrive/led.c
+++ b/arch/sh/boards/overdrive/led.c
@@ -9,7 +9,6 @@
9 * This file contains an Overdrive specific LED feature. 9 * This file contains an Overdrive specific LED feature.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/system.h> 12#include <asm/system.h>
14#include <asm/io.h> 13#include <asm/io.h>
15#include <asm/overdrive/overdrive.h> 14#include <asm/overdrive/overdrive.h>
diff --git a/arch/sh/boards/overdrive/setup.c b/arch/sh/boards/overdrive/setup.c
index 94f6165d33b..a3a7744c204 100644
--- a/arch/sh/boards/overdrive/setup.c
+++ b/arch/sh/boards/overdrive/setup.c
@@ -9,7 +9,6 @@
9 * STMicroelectronics Overdrive Support. 9 * STMicroelectronics Overdrive Support.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <asm/io.h> 14#include <asm/io.h>
diff --git a/arch/sh/boards/renesas/edosk7705/setup.c b/arch/sh/boards/renesas/edosk7705/setup.c
index 8b6f0c2af09..ba143fa4afa 100644
--- a/arch/sh/boards/renesas/edosk7705/setup.c
+++ b/arch/sh/boards/renesas/edosk7705/setup.c
@@ -9,7 +9,6 @@
9 * board by S. Dunn, 2003. 9 * board by S. Dunn, 2003.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <asm/machvec.h> 13#include <asm/machvec.h>
15#include <asm/machvec_init.h> 14#include <asm/machvec_init.h>
diff --git a/arch/sh/boards/renesas/hs7751rvoip/io.c b/arch/sh/boards/renesas/hs7751rvoip/io.c
index 456753d2649..3a1abfa2fef 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/io.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/io.c
@@ -11,7 +11,6 @@
11 * expectation of later SuperIO and PCMCIA access. 11 * expectation of later SuperIO and PCMCIA access.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <asm/io.h> 16#include <asm/io.h>
diff --git a/arch/sh/boards/renesas/hs7751rvoip/irq.c b/arch/sh/boards/renesas/hs7751rvoip/irq.c
index 52a98b524e1..705b7ddcb0d 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/irq.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/irq.c
@@ -10,7 +10,6 @@
10 * Lineo uSolutions, Inc. 2003. 10 * Lineo uSolutions, Inc. 2003.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/irq.h> 14#include <linux/irq.h>
16#include <asm/io.h> 15#include <asm/io.h>
diff --git a/arch/sh/boards/renesas/hs7751rvoip/led.c b/arch/sh/boards/renesas/hs7751rvoip/led.c
index 18a13c8da8a..b6608fff9f3 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/led.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/led.c
@@ -10,7 +10,6 @@
10 * Lineo uSolutions, Inc. 2003. 10 * Lineo uSolutions, Inc. 2003.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <asm/io.h> 13#include <asm/io.h>
15#include <asm/hs7751rvoip/hs7751rvoip.h> 14#include <asm/hs7751rvoip/hs7751rvoip.h>
16 15
diff --git a/arch/sh/boards/renesas/hs7751rvoip/mach.c b/arch/sh/boards/renesas/hs7751rvoip/mach.c
index 8bbed60220c..caf967f77c6 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/mach.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/mach.c
@@ -9,7 +9,6 @@
9 * Machine vector for the Renesas Technology sales HS7751RVoIP 9 * Machine vector for the Renesas Technology sales HS7751RVoIP
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14 13
15#include <asm/machvec.h> 14#include <asm/machvec.h>
diff --git a/arch/sh/boards/renesas/hs7751rvoip/pci.c b/arch/sh/boards/renesas/hs7751rvoip/pci.c
index 7a442d1eca4..7e5786b5811 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/pci.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/pci.c
@@ -11,7 +11,6 @@
11 * PCI initialization for the Renesas SH7751R HS7751RVoIP board 11 * PCI initialization for the Renesas SH7751R HS7751RVoIP board
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/sh/boards/renesas/hs7751rvoip/setup.c b/arch/sh/boards/renesas/hs7751rvoip/setup.c
index f1a78b6c714..29fb5ff70fb 100644
--- a/arch/sh/boards/renesas/hs7751rvoip/setup.c
+++ b/arch/sh/boards/renesas/hs7751rvoip/setup.c
@@ -10,7 +10,6 @@
10 * Lineo uSolutions, Inc. 2003. 10 * Lineo uSolutions, Inc. 2003.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/irq.h> 14#include <linux/irq.h>
16 15
diff --git a/arch/sh/boards/renesas/rts7751r2d/irq.c b/arch/sh/boards/renesas/rts7751r2d/irq.c
index e16915d9cda..154535440bb 100644
--- a/arch/sh/boards/renesas/rts7751r2d/irq.c
+++ b/arch/sh/boards/renesas/rts7751r2d/irq.c
@@ -9,7 +9,6 @@
9 * Atom Create Engineering Co., Ltd. 2002. 9 * Atom Create Engineering Co., Ltd. 2002.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15#include <asm/io.h> 14#include <asm/io.h>
diff --git a/arch/sh/boards/renesas/rts7751r2d/led.c b/arch/sh/boards/renesas/rts7751r2d/led.c
index 9993259a894..4d16de71fac 100644
--- a/arch/sh/boards/renesas/rts7751r2d/led.c
+++ b/arch/sh/boards/renesas/rts7751r2d/led.c
@@ -9,7 +9,6 @@
9 * This file contains Renesas Technology Sales RTS7751R2D specific LED code. 9 * This file contains Renesas Technology Sales RTS7751R2D specific LED code.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/io.h> 12#include <asm/io.h>
14#include <asm/rts7751r2d/rts7751r2d.h> 13#include <asm/rts7751r2d/rts7751r2d.h>
15 14
diff --git a/arch/sh/boards/renesas/rts7751r2d/mach.c b/arch/sh/boards/renesas/rts7751r2d/mach.c
index 610740512d5..5ed9e97ea19 100644
--- a/arch/sh/boards/renesas/rts7751r2d/mach.c
+++ b/arch/sh/boards/renesas/rts7751r2d/mach.c
@@ -9,7 +9,6 @@
9 * Machine vector for the Renesas Technology sales RTS7751R2D 9 * Machine vector for the Renesas Technology sales RTS7751R2D
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/types.h> 13#include <linux/types.h>
15 14
diff --git a/arch/sh/boards/renesas/systemh/irq.c b/arch/sh/boards/renesas/systemh/irq.c
index 84597918105..8372d967f60 100644
--- a/arch/sh/boards/renesas/systemh/irq.c
+++ b/arch/sh/boards/renesas/systemh/irq.c
@@ -9,7 +9,6 @@
9 * Jonathan Short. 9 * Jonathan Short.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15 14
diff --git a/arch/sh/boards/se/7300/io.c b/arch/sh/boards/se/7300/io.c
index 3c89def4648..f449a94ddff 100644
--- a/arch/sh/boards/se/7300/io.c
+++ b/arch/sh/boards/se/7300/io.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <asm/mach/se7300.h> 12#include <asm/mach/se7300.h>
14#include <asm/io.h> 13#include <asm/io.h>
diff --git a/arch/sh/boards/se/7300/irq.c b/arch/sh/boards/se/7300/irq.c
index 96c8c23d6c9..216a78d1a10 100644
--- a/arch/sh/boards/se/7300/irq.c
+++ b/arch/sh/boards/se/7300/irq.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/irq.h> 11#include <linux/irq.h>
13#include <asm/irq.h> 12#include <asm/irq.h>
diff --git a/arch/sh/boards/se/7300/led.c b/arch/sh/boards/se/7300/led.c
index 02c7f846c84..ad51f0a9c1e 100644
--- a/arch/sh/boards/se/7300/led.c
+++ b/arch/sh/boards/se/7300/led.c
@@ -11,7 +11,6 @@
11 * This file contains Solution Engine specific LED code. 11 * This file contains Solution Engine specific LED code.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <asm/mach/se7300.h> 15#include <asm/mach/se7300.h>
17 16
diff --git a/arch/sh/boards/se/7300/setup.c b/arch/sh/boards/se/7300/setup.c
index 08536bc224d..ebcd98d4c08 100644
--- a/arch/sh/boards/se/7300/setup.c
+++ b/arch/sh/boards/se/7300/setup.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <asm/machvec.h> 11#include <asm/machvec.h>
13#include <asm/machvec_init.h> 12#include <asm/machvec_init.h>
diff --git a/arch/sh/boards/se/73180/io.c b/arch/sh/boards/se/73180/io.c
index 73648cbe367..755df5ac4a4 100644
--- a/arch/sh/boards/se/73180/io.c
+++ b/arch/sh/boards/se/73180/io.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <asm/mach/se73180.h> 12#include <asm/mach/se73180.h>
14#include <asm/io.h> 13#include <asm/io.h>
diff --git a/arch/sh/boards/se/73180/irq.c b/arch/sh/boards/se/73180/irq.c
index 402735c7c89..4344d0ef24a 100644
--- a/arch/sh/boards/se/73180/irq.c
+++ b/arch/sh/boards/se/73180/irq.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/irq.h> 14#include <linux/irq.h>
16#include <asm/irq.h> 15#include <asm/irq.h>
diff --git a/arch/sh/boards/se/73180/led.c b/arch/sh/boards/se/73180/led.c
index 1e8f1cf3e10..610439fde6e 100644
--- a/arch/sh/boards/se/73180/led.c
+++ b/arch/sh/boards/se/73180/led.c
@@ -11,7 +11,6 @@
11 * This file contains Solution Engine specific LED code. 11 * This file contains Solution Engine specific LED code.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <asm/mach/se73180.h> 15#include <asm/mach/se73180.h>
17 16
diff --git a/arch/sh/boards/se/73180/setup.c b/arch/sh/boards/se/73180/setup.c
index 07fa90c38a0..cdb7b5f8d94 100644
--- a/arch/sh/boards/se/73180/setup.c
+++ b/arch/sh/boards/se/73180/setup.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <asm/machvec.h> 13#include <asm/machvec.h>
15#include <asm/machvec_init.h> 14#include <asm/machvec_init.h>
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c
index 210897b315f..3e558716ce1 100644
--- a/arch/sh/boards/se/770x/irq.c
+++ b/arch/sh/boards/se/770x/irq.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/irq.h> 11#include <linux/irq.h>
13#include <asm/irq.h> 12#include <asm/irq.h>
diff --git a/arch/sh/boards/se/770x/led.c b/arch/sh/boards/se/770x/led.c
index 5c64e8ab2cf..3cddbda025f 100644
--- a/arch/sh/boards/se/770x/led.c
+++ b/arch/sh/boards/se/770x/led.c
@@ -9,7 +9,6 @@
9 * This file contains Solution Engine specific LED code. 9 * This file contains Solution Engine specific LED code.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/se/se.h> 12#include <asm/se/se.h>
14 13
15static void mach_led(int position, int value) 14static void mach_led(int position, int value)
diff --git a/arch/sh/boards/se/770x/mach.c b/arch/sh/boards/se/770x/mach.c
index f9b4c56cc47..6ec07bd3dcf 100644
--- a/arch/sh/boards/se/770x/mach.c
+++ b/arch/sh/boards/se/770x/mach.c
@@ -9,7 +9,6 @@
9 * Machine vector for the Hitachi SolutionEngine 9 * Machine vector for the Hitachi SolutionEngine
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14 13
15#include <asm/machvec.h> 14#include <asm/machvec.h>
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c
index 2bed46fb607..7d1a071727c 100644
--- a/arch/sh/boards/se/770x/setup.c
+++ b/arch/sh/boards/se/770x/setup.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/irq.h> 12#include <linux/irq.h>
14 13
diff --git a/arch/sh/boards/se/7751/irq.c b/arch/sh/boards/se/7751/irq.c
index ad71f3e66c1..bf6c023615d 100644
--- a/arch/sh/boards/se/7751/irq.c
+++ b/arch/sh/boards/se/7751/irq.c
@@ -9,7 +9,6 @@
9 * Ian da Silva and Jeremy Siegel, 2001. 9 * Ian da Silva and Jeremy Siegel, 2001.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15#include <asm/irq.h> 14#include <asm/irq.h>
diff --git a/arch/sh/boards/se/7751/led.c b/arch/sh/boards/se/7751/led.c
index 0c788230cf8..a878726d3c7 100644
--- a/arch/sh/boards/se/7751/led.c
+++ b/arch/sh/boards/se/7751/led.c
@@ -9,7 +9,6 @@
9 * This file contains Solution Engine specific LED code. 9 * This file contains Solution Engine specific LED code.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/se7751/se7751.h> 12#include <asm/se7751/se7751.h>
14 13
15static void mach_led(int position, int value) 14static void mach_led(int position, int value)
diff --git a/arch/sh/boards/se/7751/mach.c b/arch/sh/boards/se/7751/mach.c
index 16d386b7e3b..62d8d3e6259 100644
--- a/arch/sh/boards/se/7751/mach.c
+++ b/arch/sh/boards/se/7751/mach.c
@@ -9,7 +9,6 @@
9 * Machine vector for the Hitachi 7751 SolutionEngine 9 * Machine vector for the Hitachi 7751 SolutionEngine
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14 13
15#include <asm/machvec.h> 14#include <asm/machvec.h>
diff --git a/arch/sh/boards/se/7751/pci.c b/arch/sh/boards/se/7751/pci.c
index 1f273efd2cf..3ee03014dea 100644
--- a/arch/sh/boards/se/7751/pci.c
+++ b/arch/sh/boards/se/7751/pci.c
@@ -11,7 +11,6 @@
11 * PCI initialization for the Hitachi SH7751 Solution Engine board (MS7751SE01) 11 * PCI initialization for the Hitachi SH7751 Solution Engine board (MS7751SE01)
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/sh/boards/se/7751/setup.c b/arch/sh/boards/se/7751/setup.c
index 9d111bb884f..48dc5aee67d 100644
--- a/arch/sh/boards/se/7751/setup.c
+++ b/arch/sh/boards/se/7751/setup.c
@@ -9,7 +9,6 @@
9 * Ian da Silva and Jeremy Siegel, 2001. 9 * Ian da Silva and Jeremy Siegel, 2001.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15 14
diff --git a/arch/sh/boards/sh03/led.c b/arch/sh/boards/sh03/led.c
index c851b0bec80..d38562ad6be 100644
--- a/arch/sh/boards/sh03/led.c
+++ b/arch/sh/boards/sh03/led.c
@@ -6,7 +6,6 @@
6 * This file contains Interface CTP/PCI-SH03 specific LED code. 6 * This file contains Interface CTP/PCI-SH03 specific LED code.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11 10
12/* Cycle the LED's in the clasic Knightrider/Sun pattern */ 11/* Cycle the LED's in the clasic Knightrider/Sun pattern */
diff --git a/arch/sh/boards/sh03/setup.c b/arch/sh/boards/sh03/setup.c
index d2a08ca5eb8..60290f8f289 100644
--- a/arch/sh/boards/sh03/setup.c
+++ b/arch/sh/boards/sh03/setup.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/irq.h> 9#include <linux/irq.h>
11#include <linux/hdreg.h> 10#include <linux/hdreg.h>
diff --git a/arch/sh/boards/sh2000/setup.c b/arch/sh/boards/sh2000/setup.c
index a290b1d09fb..2fe6a11765e 100644
--- a/arch/sh/boards/sh2000/setup.c
+++ b/arch/sh/boards/sh2000/setup.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/irq.h> 11#include <linux/irq.h>
13 12
diff --git a/arch/sh/boards/snapgear/setup.c b/arch/sh/boards/snapgear/setup.c
index 08fc98342a0..f1f7c70c940 100644
--- a/arch/sh/boards/snapgear/setup.c
+++ b/arch/sh/boards/snapgear/setup.c
@@ -14,7 +14,6 @@
14 */ 14 */
15/****************************************************************************/ 15/****************************************************************************/
16 16
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/irq.h> 18#include <linux/irq.h>
20#include <linux/interrupt.h> 19#include <linux/interrupt.h>
@@ -51,7 +50,7 @@ static int __init eraseconfig_init(void)
51{ 50{
52 printk("SnapGear: EraseConfig init\n"); 51 printk("SnapGear: EraseConfig init\n");
53 /* Setup "EraseConfig" switch on external IRQ 0 */ 52 /* Setup "EraseConfig" switch on external IRQ 0 */
54 if (request_irq(IRL0_IRQ, eraseconfig_interrupt, SA_INTERRUPT, 53 if (request_irq(IRL0_IRQ, eraseconfig_interrupt, IRQF_DISABLED,
55 "Erase Config", NULL)) 54 "Erase Config", NULL))
56 printk("SnapGear: failed to register IRQ%d for Reset witch\n", 55 printk("SnapGear: failed to register IRQ%d for Reset witch\n",
57 IRL0_IRQ); 56 IRL0_IRQ);
diff --git a/arch/sh/boards/superh/microdev/io.c b/arch/sh/boards/superh/microdev/io.c
index 1ed7f880b8c..4836b9422e2 100644
--- a/arch/sh/boards/superh/microdev/io.c
+++ b/arch/sh/boards/superh/microdev/io.c
@@ -11,7 +11,6 @@
11 * License. See linux/COPYING for more information. 11 * License. See linux/COPYING for more information.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/pci.h> 15#include <linux/pci.h>
17#include <linux/wait.h> 16#include <linux/wait.h>
diff --git a/arch/sh/boards/superh/microdev/irq.c b/arch/sh/boards/superh/microdev/irq.c
index cb5999425d1..236398fbc08 100644
--- a/arch/sh/boards/superh/microdev/irq.c
+++ b/arch/sh/boards/superh/microdev/irq.c
@@ -9,7 +9,6 @@
9 * License. See linux/COPYING for more information. 9 * License. See linux/COPYING for more information.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/irq.h> 13#include <linux/irq.h>
15 14
diff --git a/arch/sh/boards/superh/microdev/led.c b/arch/sh/boards/superh/microdev/led.c
index 52a98e69d3f..a38f5351bd1 100644
--- a/arch/sh/boards/superh/microdev/led.c
+++ b/arch/sh/boards/superh/microdev/led.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/io.h> 12#include <asm/io.h>
14 13
15#define LED_REGISTER 0xa6104d20 14#define LED_REGISTER 0xa6104d20
diff --git a/arch/sh/boards/superh/microdev/setup.c b/arch/sh/boards/superh/microdev/setup.c
index 892b14d3140..61b402a3f5d 100644
--- a/arch/sh/boards/superh/microdev/setup.c
+++ b/arch/sh/boards/superh/microdev/setup.c
@@ -11,7 +11,6 @@
11 * License. See linux/COPYING for more information. 11 * License. See linux/COPYING for more information.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/platform_device.h> 15#include <linux/platform_device.h>
17#include <linux/ioport.h> 16#include <linux/ioport.h>
diff --git a/arch/sh/boards/unknown/setup.c b/arch/sh/boards/unknown/setup.c
index 02e84f03f45..c5e4ed10876 100644
--- a/arch/sh/boards/unknown/setup.c
+++ b/arch/sh/boards/unknown/setup.c
@@ -12,7 +12,6 @@
12 * method to start debugging a new board during bring-up until proper board 12 * method to start debugging a new board during bring-up until proper board
13 * setup code is written. 13 * setup code is written.
14 */ 14 */
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <asm/machvec.h> 16#include <asm/machvec.h>
18#include <asm/irq.h> 17#include <asm/irq.h>
diff --git a/arch/sh/boot/compressed/head.S b/arch/sh/boot/compressed/head.S
index 88db04d325f..4c26a192277 100644
--- a/arch/sh/boot/compressed/head.S
+++ b/arch/sh/boot/compressed/head.S
@@ -7,7 +7,6 @@
7 7
8.text 8.text
9 9
10#include <linux/config.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12 11
13 .global startup 12 .global startup
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
index 211e9110074..f2fed5ce5cc 100644
--- a/arch/sh/boot/compressed/misc.c
+++ b/arch/sh/boot/compressed/misc.c
@@ -11,7 +11,6 @@
11 * Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000 11 * Modified to use standard LinuxSH BIOS by Greg Banks 7Jul2000
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <asm/uaccess.h> 14#include <asm/uaccess.h>
16#ifdef CONFIG_SH_STANDARD_BIOS 15#ifdef CONFIG_SH_STANDARD_BIOS
17#include <asm/sh_bios.h> 16#include <asm/sh_bios.h>
diff --git a/arch/sh/cchips/hd6446x/hd64461/io.c b/arch/sh/cchips/hd6446x/hd64461/io.c
index 4c062d6b7a9..ac3062671db 100644
--- a/arch/sh/cchips/hd6446x/hd64461/io.c
+++ b/arch/sh/cchips/hd6446x/hd64461/io.c
@@ -4,7 +4,6 @@
4 * Typical I/O routines for HD64461 system. 4 * Typical I/O routines for HD64461 system.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/io.h> 7#include <asm/io.h>
9#include <asm/hd64461/hd64461.h> 8#include <asm/hd64461/hd64461.h>
10 9
diff --git a/arch/sh/cchips/hd6446x/hd64461/setup.c b/arch/sh/cchips/hd6446x/hd64461/setup.c
index 724db04cb39..ad126016720 100644
--- a/arch/sh/cchips/hd6446x/hd64461/setup.c
+++ b/arch/sh/cchips/hd6446x/hd64461/setup.c
@@ -4,7 +4,6 @@
4 * Hitachi HD64461 companion chip support 4 * Hitachi HD64461 companion chip support
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
@@ -134,7 +133,7 @@ int hd64461_irq_demux(int irq)
134 return __irq_demux(irq); 133 return __irq_demux(irq);
135} 134}
136 135
137static struct irqaction irq0 = { hd64461_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64461", NULL, NULL }; 136static struct irqaction irq0 = { hd64461_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "HD64461", NULL, NULL };
138 137
139int __init setup_hd64461(void) 138int __init setup_hd64461(void)
140{ 139{
diff --git a/arch/sh/cchips/hd6446x/hd64465/gpio.c b/arch/sh/cchips/hd6446x/hd64465/gpio.c
index 9785fdef868..72320d02d69 100644
--- a/arch/sh/cchips/hd6446x/hd64465/gpio.c
+++ b/arch/sh/cchips/hd6446x/hd64465/gpio.c
@@ -170,7 +170,7 @@ static int __init hd64465_gpio_init(void)
170 if (!request_region(HD64465_REG_GPACR, 0x1000, MODNAME)) 170 if (!request_region(HD64465_REG_GPACR, 0x1000, MODNAME))
171 return -EBUSY; 171 return -EBUSY;
172 if (request_irq(HD64465_IRQ_GPIO, hd64465_gpio_interrupt, 172 if (request_irq(HD64465_IRQ_GPIO, hd64465_gpio_interrupt,
173 SA_INTERRUPT, MODNAME, 0)) 173 IRQF_DISABLED, MODNAME, 0))
174 goto out_irqfailed; 174 goto out_irqfailed;
175 175
176 printk("HD64465 GPIO layer on irq %d\n", HD64465_IRQ_GPIO); 176 printk("HD64465 GPIO layer on irq %d\n", HD64465_IRQ_GPIO);
diff --git a/arch/sh/cchips/hd6446x/hd64465/io.c b/arch/sh/cchips/hd6446x/hd64465/io.c
index 84cb142def0..58704d066ae 100644
--- a/arch/sh/cchips/hd6446x/hd64465/io.c
+++ b/arch/sh/cchips/hd6446x/hd64465/io.c
@@ -9,7 +9,6 @@
9 * Typical I/O routines for HD64465 system. 9 * Typical I/O routines for HD64465 system.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <asm/io.h> 14#include <asm/io.h>
diff --git a/arch/sh/cchips/hd6446x/hd64465/setup.c b/arch/sh/cchips/hd6446x/hd64465/setup.c
index cf9142c620b..d2b2851bc44 100644
--- a/arch/sh/cchips/hd6446x/hd64465/setup.c
+++ b/arch/sh/cchips/hd6446x/hd64465/setup.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 2000 YAEGASHI Takeshi 9 * Copyright (C) 2000 YAEGASHI Takeshi
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
@@ -154,7 +153,7 @@ int hd64465_irq_demux(int irq)
154 return irq; 153 return irq;
155} 154}
156 155
157static struct irqaction irq0 = { hd64465_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "HD64465", NULL, NULL}; 156static struct irqaction irq0 = { hd64465_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "HD64465", NULL, NULL};
158 157
159 158
160static int __init setup_hd64465(void) 159static int __init setup_hd64465(void)
diff --git a/arch/sh/cchips/voyagergx/irq.c b/arch/sh/cchips/voyagergx/irq.c
index 892214bade1..0dc1fb8f968 100644
--- a/arch/sh/cchips/voyagergx/irq.c
+++ b/arch/sh/cchips/voyagergx/irq.c
@@ -21,7 +21,6 @@
21 21
22#undef DEBUG 22#undef DEBUG
23 23
24#include <linux/config.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
@@ -166,7 +165,7 @@ int voyagergx_irq_demux(int irq)
166static struct irqaction irq0 = { 165static struct irqaction irq0 = {
167 .name = "voyagergx", 166 .name = "voyagergx",
168 .handler = voyagergx_interrupt, 167 .handler = voyagergx_interrupt,
169 .flags = SA_INTERRUPT, 168 .flags = IRQF_DISABLED,
170 .mask = CPU_MASK_NONE, 169 .mask = CPU_MASK_NONE,
171}; 170};
172 171
diff --git a/arch/sh/drivers/dma/dma-g2.c b/arch/sh/drivers/dma/dma-g2.c
index 5afab6f56ec..0f866f8789f 100644
--- a/arch/sh/drivers/dma/dma-g2.c
+++ b/arch/sh/drivers/dma/dma-g2.c
@@ -56,7 +56,7 @@ static irqreturn_t g2_dma_interrupt(int irq, void *dev_id, struct pt_regs *regs)
56static struct irqaction g2_dma_irq = { 56static struct irqaction g2_dma_irq = {
57 .name = "g2 DMA handler", 57 .name = "g2 DMA handler",
58 .handler = g2_dma_interrupt, 58 .handler = g2_dma_interrupt,
59 .flags = SA_INTERRUPT, 59 .flags = IRQF_DISABLED,
60}; 60};
61 61
62static int g2_enable_dma(struct dma_channel *chan) 62static int g2_enable_dma(struct dma_channel *chan)
diff --git a/arch/sh/drivers/dma/dma-pvr2.c b/arch/sh/drivers/dma/dma-pvr2.c
index df604975ccc..30a580aa7cb 100644
--- a/arch/sh/drivers/dma/dma-pvr2.c
+++ b/arch/sh/drivers/dma/dma-pvr2.c
@@ -70,7 +70,7 @@ static int pvr2_xfer_dma(struct dma_channel *chan)
70static struct irqaction pvr2_dma_irq = { 70static struct irqaction pvr2_dma_irq = {
71 .name = "pvr2 DMA handler", 71 .name = "pvr2 DMA handler",
72 .handler = pvr2_dma_interrupt, 72 .handler = pvr2_dma_interrupt,
73 .flags = SA_INTERRUPT, 73 .flags = IRQF_DISABLED,
74}; 74};
75 75
76static struct dma_ops pvr2_dma_ops = { 76static struct dma_ops pvr2_dma_ops = {
diff --git a/arch/sh/drivers/dma/dma-sh.c b/arch/sh/drivers/dma/dma-sh.c
index cca26c4c9d1..e028a2d2a4e 100644
--- a/arch/sh/drivers/dma/dma-sh.c
+++ b/arch/sh/drivers/dma/dma-sh.c
@@ -12,7 +12,6 @@
12 * for more details. 12 * for more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/irq.h> 16#include <linux/irq.h>
18#include <linux/interrupt.h> 17#include <linux/interrupt.h>
@@ -91,7 +90,7 @@ static int sh_dmac_request_dma(struct dma_channel *chan)
91 chan->chan); 90 chan->chan);
92 91
93 return request_irq(get_dmte_irq(chan->chan), dma_tei, 92 return request_irq(get_dmte_irq(chan->chan), dma_tei,
94 SA_INTERRUPT, name, chan); 93 IRQF_DISABLED, name, chan);
95} 94}
96 95
97static void sh_dmac_free_dma(struct dma_channel *chan) 96static void sh_dmac_free_dma(struct dma_channel *chan)
@@ -259,7 +258,7 @@ static int __init sh_dmac_init(void)
259 258
260#ifdef CONFIG_CPU_SH4 259#ifdef CONFIG_CPU_SH4
261 make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY); 260 make_ipr_irq(DMAE_IRQ, DMA_IPR_ADDR, DMA_IPR_POS, DMA_PRIORITY);
262 i = request_irq(DMAE_IRQ, dma_err, SA_INTERRUPT, "DMAC Address Error", 0); 261 i = request_irq(DMAE_IRQ, dma_err, IRQF_DISABLED, "DMAC Address Error", 0);
263 if (i < 0) 262 if (i < 0)
264 return i; 263 return i;
265#endif 264#endif
diff --git a/arch/sh/drivers/pci/dma-dreamcast.c b/arch/sh/drivers/pci/dma-dreamcast.c
index e12418bb1fa..6acf02b9375 100644
--- a/arch/sh/drivers/pci/dma-dreamcast.c
+++ b/arch/sh/drivers/pci/dma-dreamcast.c
@@ -15,7 +15,6 @@
15 * for more details. 15 * for more details.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/param.h> 20#include <linux/param.h>
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c
index cf30e2fa51b..63b1c6f4b8d 100644
--- a/arch/sh/drivers/pci/fixups-dreamcast.c
+++ b/arch/sh/drivers/pci/fixups-dreamcast.c
@@ -15,7 +15,6 @@
15 * for more details. 15 * for more details.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/param.h> 20#include <linux/param.h>
diff --git a/arch/sh/drivers/pci/ops-bigsur.c b/arch/sh/drivers/pci/ops-bigsur.c
index 9b43da67804..ae82c6ca05e 100644
--- a/arch/sh/drivers/pci/ops-bigsur.c
+++ b/arch/sh/drivers/pci/ops-bigsur.c
@@ -11,7 +11,6 @@
11 * PCI initialization for the Hitachi Big Sur Evaluation Board 11 * PCI initialization for the Hitachi Big Sur Evaluation Board
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/sh/drivers/pci/ops-dreamcast.c b/arch/sh/drivers/pci/ops-dreamcast.c
index 69af80b93e3..23d52791917 100644
--- a/arch/sh/drivers/pci/ops-dreamcast.c
+++ b/arch/sh/drivers/pci/ops-dreamcast.c
@@ -15,7 +15,6 @@
15 * for more details. 15 * for more details.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/param.h> 20#include <linux/param.h>
diff --git a/arch/sh/drivers/pci/ops-rts7751r2d.c b/arch/sh/drivers/pci/ops-rts7751r2d.c
index beafa11f4d0..83171d10141 100644
--- a/arch/sh/drivers/pci/ops-rts7751r2d.c
+++ b/arch/sh/drivers/pci/ops-rts7751r2d.c
@@ -11,7 +11,6 @@
11 * PCI initialization for the Renesas SH7751R RTS7751R2D board 11 * PCI initialization for the Renesas SH7751R RTS7751R2D board
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/sh/drivers/pci/ops-sh03.c b/arch/sh/drivers/pci/ops-sh03.c
index df219973234..e58d556e5f9 100644
--- a/arch/sh/drivers/pci/ops-sh03.c
+++ b/arch/sh/drivers/pci/ops-sh03.c
@@ -4,7 +4,6 @@
4 * PCI initialization for the Interface CTP/PCI-SH03 board 4 * PCI initialization for the Interface CTP/PCI-SH03 board
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <linux/init.h> 9#include <linux/init.h>
diff --git a/arch/sh/drivers/pci/ops-snapgear.c b/arch/sh/drivers/pci/ops-snapgear.c
index 6fdb9765c99..3cbd14dd28f 100644
--- a/arch/sh/drivers/pci/ops-snapgear.c
+++ b/arch/sh/drivers/pci/ops-snapgear.c
@@ -13,7 +13,6 @@
13 * PCI initialization for the SnapGear boards 13 * PCI initialization for the SnapGear boards
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/arch/sh/drivers/pci/pci-sh7751.c b/arch/sh/drivers/pci/pci-sh7751.c
index 30b14ac7ae5..682f3dae305 100644
--- a/arch/sh/drivers/pci/pci-sh7751.c
+++ b/arch/sh/drivers/pci/pci-sh7751.c
@@ -15,7 +15,6 @@
15 15
16#undef DEBUG 16#undef DEBUG
17 17
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/init.h> 20#include <linux/init.h>
diff --git a/arch/sh/drivers/pci/pci-st40.c b/arch/sh/drivers/pci/pci-st40.c
index cb675213115..7c81b8b65bb 100644
--- a/arch/sh/drivers/pci/pci-st40.c
+++ b/arch/sh/drivers/pci/pci-st40.c
@@ -7,7 +7,6 @@
7 * Support functions for the ST40 PCI hardware. 7 * Support functions for the ST40 PCI hardware.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/smp.h> 11#include <linux/smp.h>
13#include <linux/smp_lock.h> 12#include <linux/smp_lock.h>
@@ -448,7 +447,7 @@ static int __init pcibios_init(void)
448 PHYSADDR(memory_end) - PHYSADDR(memory_start)); 447 PHYSADDR(memory_end) - PHYSADDR(memory_start));
449 448
450 if (request_irq(ST40PCI_ERR_IRQ, st40_pci_irq, 449 if (request_irq(ST40PCI_ERR_IRQ, st40_pci_irq,
451 SA_INTERRUPT, "st40pci", NULL)) { 450 IRQF_DISABLED, "st40pci", NULL)) {
452 printk(KERN_ERR "st40pci: Cannot hook interrupt\n"); 451 printk(KERN_ERR "st40pci: Cannot hook interrupt\n");
453 return -EIO; 452 return -EIO;
454 } 453 }
diff --git a/arch/sh/kernel/cf-enabler.c b/arch/sh/kernel/cf-enabler.c
index 7a3b18faa27..f1f9ab87f0b 100644
--- a/arch/sh/kernel/cf-enabler.c
+++ b/arch/sh/kernel/cf-enabler.c
@@ -9,7 +9,6 @@
9 * Enable the CF configuration. 9 * Enable the CF configuration.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14 13
15#include <asm/io.h> 14#include <asm/io.h>
diff --git a/arch/sh/kernel/cpu/irq/ipr.c b/arch/sh/kernel/cpu/irq/ipr.c
index 0373b65c77f..0f545941fb4 100644
--- a/arch/sh/kernel/cpu/irq/ipr.c
+++ b/arch/sh/kernel/cpu/irq/ipr.c
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/irq.h> 19#include <linux/irq.h>
21#include <linux/module.h> 20#include <linux/module.h>
diff --git a/arch/sh/kernel/cpu/irq/pint.c b/arch/sh/kernel/cpu/irq/pint.c
index 714963a25bb..80cd8108d36 100644
--- a/arch/sh/kernel/cpu/irq/pint.c
+++ b/arch/sh/kernel/cpu/irq/pint.c
@@ -10,7 +10,6 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/irq.h> 14#include <linux/irq.h>
16#include <linux/module.h> 15#include <linux/module.h>
diff --git a/arch/sh/kernel/cpu/sh3/ex.S b/arch/sh/kernel/cpu/sh3/ex.S
index 966c0858b71..cc04e9e239f 100644
--- a/arch/sh/kernel/cpu/sh3/ex.S
+++ b/arch/sh/kernel/cpu/sh3/ex.S
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15#include <linux/config.h>
16 15
17 .align 2 16 .align 2
18 .data 17 .data
diff --git a/arch/sh/kernel/cpu/sh4/ex.S b/arch/sh/kernel/cpu/sh4/ex.S
index 8221e9d1551..26a27df0650 100644
--- a/arch/sh/kernel/cpu/sh4/ex.S
+++ b/arch/sh/kernel/cpu/sh4/ex.S
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14#include <linux/linkage.h> 14#include <linux/linkage.h>
15#include <linux/config.h>
16 15
17 .align 2 16 .align 2
18 .data 17 .data
diff --git a/arch/sh/kernel/cpu/sh4/sq.c b/arch/sh/kernel/cpu/sh4/sq.c
index 83a4f91bce5..781dbb11c03 100644
--- a/arch/sh/kernel/cpu/sh4/sq.c
+++ b/arch/sh/kernel/cpu/sh4/sq.c
@@ -19,7 +19,6 @@
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/config.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include <linux/list.h> 23#include <linux/list.h>
25#include <linux/proc_fs.h> 24#include <linux/proc_fs.h>
diff --git a/arch/sh/kernel/entry.S b/arch/sh/kernel/entry.S
index a440d36ee61..7dfd2ba75f7 100644
--- a/arch/sh/kernel/entry.S
+++ b/arch/sh/kernel/entry.S
@@ -13,7 +13,6 @@
13 13
14#include <linux/sys.h> 14#include <linux/sys.h>
15#include <linux/linkage.h> 15#include <linux/linkage.h>
16#include <linux/config.h>
17#include <asm/asm-offsets.h> 16#include <asm/asm-offsets.h>
18#include <asm/thread_info.h> 17#include <asm/thread_info.h>
19#include <asm/cpu/mmu_context.h> 18#include <asm/cpu/mmu_context.h>
diff --git a/arch/sh/kernel/ptrace.c b/arch/sh/kernel/ptrace.c
index 3887b4f6feb..f7eebbde329 100644
--- a/arch/sh/kernel/ptrace.c
+++ b/arch/sh/kernel/ptrace.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/arch/sh/kernel/relocate_kernel.S b/arch/sh/kernel/relocate_kernel.S
index b0695cffec6..8221b37c977 100644
--- a/arch/sh/kernel/relocate_kernel.S
+++ b/arch/sh/kernel/relocate_kernel.S
@@ -8,7 +8,6 @@
8 * Version 2. See the file COPYING for more details. 8 * Version 2. See the file COPYING for more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/linkage.h> 11#include <linux/linkage.h>
13 12
14#define PAGE_SIZE 4096 /* must be same value as in <asm/page.h> */ 13#define PAGE_SIZE 4096 /* must be same value as in <asm/page.h> */
diff --git a/arch/sh/kernel/sh_ksyms.c b/arch/sh/kernel/sh_ksyms.c
index d5d032533a8..245ed8f945e 100644
--- a/arch/sh/kernel/sh_ksyms.c
+++ b/arch/sh/kernel/sh_ksyms.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/smp.h> 2#include <linux/smp.h>
4#include <linux/user.h> 3#include <linux/user.h>
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 62c7d1c0ad7..6c0fb7c4af1 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -10,7 +10,6 @@
10 * Free Software Foundation; either version 2 of the License, or (at your 10 * Free Software Foundation; either version 2 of the License, or (at your
11 * option) any later version. 11 * option) any later version.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/cache.h> 13#include <linux/cache.h>
15#include <linux/cpumask.h> 14#include <linux/cpumask.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 314a275c04e..a1589f85499 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -10,7 +10,6 @@
10 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 10 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/init.h> 15#include <linux/init.h>
diff --git a/arch/sh/kernel/timers/timer-tmu.c b/arch/sh/kernel/timers/timer-tmu.c
index 96a64cb1310..d4212add53b 100644
--- a/arch/sh/kernel/timers/timer-tmu.c
+++ b/arch/sh/kernel/timers/timer-tmu.c
@@ -107,7 +107,7 @@ static irqreturn_t tmu_timer_interrupt(int irq, void *dev_id,
107static struct irqaction tmu_irq = { 107static struct irqaction tmu_irq = {
108 .name = "timer", 108 .name = "timer",
109 .handler = tmu_timer_interrupt, 109 .handler = tmu_timer_interrupt,
110 .flags = SA_INTERRUPT, 110 .flags = IRQF_DISABLED,
111 .mask = CPU_MASK_NONE, 111 .mask = CPU_MASK_NONE,
112}; 112};
113 113
diff --git a/arch/sh/kernel/traps.c b/arch/sh/kernel/traps.c
index 7eb06719d84..d9db1180f77 100644
--- a/arch/sh/kernel/traps.c
+++ b/arch/sh/kernel/traps.c
@@ -12,7 +12,6 @@
12 * 'Traps.c' handles hardware traps and faults after we have saved some 12 * 'Traps.c' handles hardware traps and faults after we have saved some
13 * state in 'entry.S'. 13 * state in 'entry.S'.
14 */ 14 */
15#include <linux/config.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/string.h> 17#include <linux/string.h>
diff --git a/arch/sh/kernel/vmlinux.lds.S b/arch/sh/kernel/vmlinux.lds.S
index 51bdc1cf783..95fdd9135fc 100644
--- a/arch/sh/kernel/vmlinux.lds.S
+++ b/arch/sh/kernel/vmlinux.lds.S
@@ -2,7 +2,6 @@
2 * ld script to make SuperH Linux kernel 2 * ld script to make SuperH Linux kernel
3 * Written by Niibe Yutaka 3 * Written by Niibe Yutaka
4 */ 4 */
5#include <linux/config.h>
6#include <asm-generic/vmlinux.lds.h> 5#include <asm-generic/vmlinux.lds.h>
7 6
8#ifdef CONFIG_CPU_LITTLE_ENDIAN 7#ifdef CONFIG_CPU_LITTLE_ENDIAN
diff --git a/arch/sh/lib/memcpy-sh4.S b/arch/sh/lib/memcpy-sh4.S
index 55f227441f9..db6b736537a 100644
--- a/arch/sh/lib/memcpy-sh4.S
+++ b/arch/sh/lib/memcpy-sh4.S
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <linux/config.h>
12 11
13/* 12/*
14 * void *memcpy(void *dst, const void *src, size_t n); 13 * void *memcpy(void *dst, const void *src, size_t n);
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c
index ab833adf28c..524cea5b47f 100644
--- a/arch/sh/mm/cache-sh4.c
+++ b/arch/sh/mm/cache-sh4.c
@@ -10,7 +10,6 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/mman.h> 14#include <linux/mman.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
diff --git a/arch/sh/mm/clear_page.S b/arch/sh/mm/clear_page.S
index ae58a61f0e6..08acead7b2a 100644
--- a/arch/sh/mm/clear_page.S
+++ b/arch/sh/mm/clear_page.S
@@ -6,7 +6,6 @@
6 * Copyright (C) 2001, 2002 Niibe Yutaka 6 * Copyright (C) 2001, 2002 Niibe Yutaka
7 * 7 *
8 */ 8 */
9#include <linux/config.h>
10#include <linux/linkage.h> 9#include <linux/linkage.h>
11 10
12/* 11/*
diff --git a/arch/sh/mm/extable.c b/arch/sh/mm/extable.c
index 505ede7c21b..c1cf4463d09 100644
--- a/arch/sh/mm/extable.c
+++ b/arch/sh/mm/extable.c
@@ -4,7 +4,6 @@
4 * linux/arch/i386/mm/extable.c 4 * linux/arch/i386/mm/extable.c
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <asm/uaccess.h> 8#include <asm/uaccess.h>
10 9
diff --git a/arch/sh/mm/hugetlbpage.c b/arch/sh/mm/hugetlbpage.c
index a3568fd5150..2a85bc15a41 100644
--- a/arch/sh/mm/hugetlbpage.c
+++ b/arch/sh/mm/hugetlbpage.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com) 8 * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com)
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/sh/mm/init.c b/arch/sh/mm/init.c
index 77b4a838fe1..8ea27ca4b70 100644
--- a/arch/sh/mm/init.c
+++ b/arch/sh/mm/init.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1995 Linus Torvalds 9 * Copyright (C) 1995 Linus Torvalds
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/signal.h> 12#include <linux/signal.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/sh/mm/pg-sh4.c b/arch/sh/mm/pg-sh4.c
index e5907c7330e..c776b60fc25 100644
--- a/arch/sh/mm/pg-sh4.c
+++ b/arch/sh/mm/pg-sh4.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Released under the terms of the GNU GPL v2.0. 7 * Released under the terms of the GNU GPL v2.0.
8 */ 8 */
9#include <linux/config.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/mman.h> 10#include <linux/mman.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
diff --git a/arch/sh64/boot/compressed/misc.c b/arch/sh64/boot/compressed/misc.c
index 89dbf45df3c..ee7a1b6acb8 100644
--- a/arch/sh64/boot/compressed/misc.c
+++ b/arch/sh64/boot/compressed/misc.c
@@ -9,7 +9,6 @@
9 * Adapted for SHmedia from sh by Stuart Menefy, May 2002 9 * Adapted for SHmedia from sh by Stuart Menefy, May 2002
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <asm/uaccess.h> 12#include <asm/uaccess.h>
14 13
15/* cache.c */ 14/* cache.c */
diff --git a/arch/sh64/boot/compressed/vmlinux.lds.S b/arch/sh64/boot/compressed/vmlinux.lds.S
index 15a737d9bba..59c2ef4aeda 100644
--- a/arch/sh64/boot/compressed/vmlinux.lds.S
+++ b/arch/sh64/boot/compressed/vmlinux.lds.S
@@ -4,7 +4,6 @@
4 * Modified by Stuart Menefy from arch/sh/vmlinux.lds.S written by Niibe Yutaka 4 * Modified by Stuart Menefy from arch/sh/vmlinux.lds.S written by Niibe Yutaka
5 */ 5 */
6 6
7#include <linux/config.h>
8 7
9#ifdef CONFIG_LITTLE_ENDIAN 8#ifdef CONFIG_LITTLE_ENDIAN
10/* OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") */ 9/* OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") */
diff --git a/arch/sh64/kernel/alphanum.c b/arch/sh64/kernel/alphanum.c
index 56d6f9f7152..9079d1e94f2 100644
--- a/arch/sh64/kernel/alphanum.c
+++ b/arch/sh64/kernel/alphanum.c
@@ -9,7 +9,6 @@
9 * Machine-independent functions for handling 8-digit alphanumeric display 9 * Machine-independent functions for handling 8-digit alphanumeric display
10 * (e.g. Agilent HDSP-253x) 10 * (e.g. Agilent HDSP-253x)
11 */ 11 */
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15 14
diff --git a/arch/sh64/kernel/dma.c b/arch/sh64/kernel/dma.c
index 09cd9f4670b..32c6f0549bf 100644
--- a/arch/sh64/kernel/dma.c
+++ b/arch/sh64/kernel/dma.c
@@ -115,7 +115,7 @@ static irqreturn_t dma_mte(int irq, void *dev_id, struct pt_regs *regs)
115 115
116static struct irqaction irq_dmte = { 116static struct irqaction irq_dmte = {
117 .handler = dma_mte, 117 .handler = dma_mte,
118 .flags = SA_INTERRUPT, 118 .flags = IRQF_DISABLED,
119 .name = "DMA MTE", 119 .name = "DMA MTE",
120}; 120};
121 121
@@ -152,7 +152,7 @@ static irqreturn_t dma_err(int irq, void *dev_id, struct pt_regs *regs)
152 152
153static struct irqaction irq_derr = { 153static struct irqaction irq_derr = {
154 .handler = dma_err, 154 .handler = dma_err,
155 .flags = SA_INTERRUPT, 155 .flags = IRQF_DISABLED,
156 .name = "DMA Error", 156 .name = "DMA Error",
157}; 157};
158 158
diff --git a/arch/sh64/kernel/entry.S b/arch/sh64/kernel/entry.S
index 2e2cfe20b42..40d45346248 100644
--- a/arch/sh64/kernel/entry.S
+++ b/arch/sh64/kernel/entry.S
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/sys.h> 15#include <linux/sys.h>
17 16
diff --git a/arch/sh64/kernel/head.S b/arch/sh64/kernel/head.S
index cc0b628a9ea..f3740ddbc47 100644
--- a/arch/sh64/kernel/head.S
+++ b/arch/sh64/kernel/head.S
@@ -20,7 +20,6 @@
20 * Add early SCIF console DTLB mapping. 20 * Add early SCIF console DTLB mapping.
21 */ 21 */
22 22
23#include <linux/config.h>
24 23
25#include <asm/page.h> 24#include <asm/page.h>
26#include <asm/mmu_context.h> 25#include <asm/mmu_context.h>
diff --git a/arch/sh64/kernel/irq.c b/arch/sh64/kernel/irq.c
index 675776a5477..e7e07f8749c 100644
--- a/arch/sh64/kernel/irq.c
+++ b/arch/sh64/kernel/irq.c
@@ -15,7 +15,6 @@
15 * Naturally it's not a 1:1 relation, but there are similarities. 15 * Naturally it's not a 1:1 relation, but there are similarities.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/kernel_stat.h> 19#include <linux/kernel_stat.h>
21#include <linux/signal.h> 20#include <linux/signal.h>
diff --git a/arch/sh64/kernel/irq_intc.c b/arch/sh64/kernel/irq_intc.c
index fa730f5fe2e..42c07d2e71d 100644
--- a/arch/sh64/kernel/irq_intc.c
+++ b/arch/sh64/kernel/irq_intc.c
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/irq.h> 19#include <linux/irq.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/arch/sh64/kernel/led.c b/arch/sh64/kernel/led.c
index cf993c4a9fd..e35d3f667fb 100644
--- a/arch/sh64/kernel/led.c
+++ b/arch/sh64/kernel/led.c
@@ -8,7 +8,6 @@
8 * 8 *
9 * Flash the LEDs 9 * Flash the LEDs
10 */ 10 */
11#include <linux/config.h>
12#include <linux/stddef.h> 11#include <linux/stddef.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14 13
diff --git a/arch/sh64/kernel/pci_sh5.c b/arch/sh64/kernel/pci_sh5.c
index 6197879e857..9dae689b6a9 100644
--- a/arch/sh64/kernel/pci_sh5.c
+++ b/arch/sh64/kernel/pci_sh5.c
@@ -9,7 +9,6 @@
9 * Support functions for the SH5 PCI hardware. 9 * Support functions for the SH5 PCI hardware.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/rwsem.h> 13#include <linux/rwsem.h>
15#include <linux/smp.h> 14#include <linux/smp.h>
@@ -474,13 +473,13 @@ static void __init pcibios_size_bridges(void)
474static int __init pcibios_init(void) 473static int __init pcibios_init(void)
475{ 474{
476 if (request_irq(IRQ_ERR, pcish5_err_irq, 475 if (request_irq(IRQ_ERR, pcish5_err_irq,
477 SA_INTERRUPT, "PCI Error",NULL) < 0) { 476 IRQF_DISABLED, "PCI Error",NULL) < 0) {
478 printk(KERN_ERR "PCISH5: Cannot hook PCI_PERR interrupt\n"); 477 printk(KERN_ERR "PCISH5: Cannot hook PCI_PERR interrupt\n");
479 return -EINVAL; 478 return -EINVAL;
480 } 479 }
481 480
482 if (request_irq(IRQ_SERR, pcish5_serr_irq, 481 if (request_irq(IRQ_SERR, pcish5_serr_irq,
483 SA_INTERRUPT, "PCI SERR interrupt", NULL) < 0) { 482 IRQF_DISABLED, "PCI SERR interrupt", NULL) < 0) {
484 printk(KERN_ERR "PCISH5: Cannot hook PCI_SERR interrupt\n"); 483 printk(KERN_ERR "PCISH5: Cannot hook PCI_SERR interrupt\n");
485 return -EINVAL; 484 return -EINVAL;
486 } 485 }
diff --git a/arch/sh64/kernel/process.c b/arch/sh64/kernel/process.c
index 1da9c61d682..dba8e14013b 100644
--- a/arch/sh64/kernel/process.c
+++ b/arch/sh64/kernel/process.c
@@ -35,7 +35,6 @@
35#define __KERNEL_SYSCALLS__ 35#define __KERNEL_SYSCALLS__
36#include <stdarg.h> 36#include <stdarg.h>
37 37
38#include <linux/config.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40#include <linux/rwsem.h> 39#include <linux/rwsem.h>
41#include <linux/mm.h> 40#include <linux/mm.h>
diff --git a/arch/sh64/kernel/ptrace.c b/arch/sh64/kernel/ptrace.c
index cd22e947131..4e95e18b46d 100644
--- a/arch/sh64/kernel/ptrace.c
+++ b/arch/sh64/kernel/ptrace.c
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/rwsem.h> 21#include <linux/rwsem.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
diff --git a/arch/sh64/kernel/setup.c b/arch/sh64/kernel/setup.c
index da98d8dbcf9..0359fa647bb 100644
--- a/arch/sh64/kernel/setup.c
+++ b/arch/sh64/kernel/setup.c
@@ -39,7 +39,6 @@
39#include <linux/tty.h> 39#include <linux/tty.h>
40#include <linux/ioport.h> 40#include <linux/ioport.h>
41#include <linux/delay.h> 41#include <linux/delay.h>
42#include <linux/config.h>
43#include <linux/init.h> 42#include <linux/init.h>
44#include <linux/seq_file.h> 43#include <linux/seq_file.h>
45#include <linux/blkdev.h> 44#include <linux/blkdev.h>
diff --git a/arch/sh64/kernel/sh_ksyms.c b/arch/sh64/kernel/sh_ksyms.c
index 6f3a1c94633..6efdfa2c399 100644
--- a/arch/sh64/kernel/sh_ksyms.c
+++ b/arch/sh64/kernel/sh_ksyms.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/rwsem.h> 12#include <linux/rwsem.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/smp.h> 14#include <linux/smp.h>
diff --git a/arch/sh64/kernel/time.c b/arch/sh64/kernel/time.c
index 6b8f4d22abc..b8162e59030 100644
--- a/arch/sh64/kernel/time.c
+++ b/arch/sh64/kernel/time.c
@@ -15,7 +15,6 @@
15 * Copyright (C) 1991, 1992, 1995 Linus Torvalds 15 * Copyright (C) 1991, 1992, 1995 Linus Torvalds
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/rwsem.h> 19#include <linux/rwsem.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
@@ -485,8 +484,8 @@ static irqreturn_t sh64_rtc_interrupt(int irq, void *dev_id,
485 return IRQ_HANDLED; 484 return IRQ_HANDLED;
486} 485}
487 486
488static struct irqaction irq0 = { timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL}; 487static struct irqaction irq0 = { timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL};
489static struct irqaction irq1 = { sh64_rtc_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "rtc", NULL, NULL}; 488static struct irqaction irq1 = { sh64_rtc_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "rtc", NULL, NULL};
490 489
491void __init time_init(void) 490void __init time_init(void)
492{ 491{
diff --git a/arch/sh64/kernel/vmlinux.lds.S b/arch/sh64/kernel/vmlinux.lds.S
index 7d9f7a6339a..a8fcc3a7158 100644
--- a/arch/sh64/kernel/vmlinux.lds.S
+++ b/arch/sh64/kernel/vmlinux.lds.S
@@ -22,7 +22,6 @@
22 * Remove support for ancient toolchains. 22 * Remove support for ancient toolchains.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <asm/page.h> 25#include <asm/page.h>
27#include <asm/cache.h> 26#include <asm/cache.h>
28#include <asm/processor.h> 27#include <asm/processor.h>
diff --git a/arch/sh64/lib/c-checksum.c b/arch/sh64/lib/c-checksum.c
index a82d8f1a7a6..53c1cabb342 100644
--- a/arch/sh64/lib/c-checksum.c
+++ b/arch/sh64/lib/c-checksum.c
@@ -7,7 +7,6 @@
7 7
8#undef DEBUG 8#undef DEBUG
9 9
10#include <linux/config.h>
11#include <linux/string.h> 10#include <linux/string.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/arch/sh64/lib/dbg.c b/arch/sh64/lib/dbg.c
index 58087331b8a..1326f45f31e 100644
--- a/arch/sh64/lib/dbg.c
+++ b/arch/sh64/lib/dbg.c
@@ -8,7 +8,6 @@
8-- Copyright 2004 Richard Curnow (evt_debug etc) 8-- Copyright 2004 Richard Curnow (evt_debug etc)
9-- 9--
10--------------------------------------------------------------------------*/ 10--------------------------------------------------------------------------*/
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/arch/sh64/lib/io.c b/arch/sh64/lib/io.c
index 277e11b10c2..587baa3dffb 100644
--- a/arch/sh64/lib/io.c
+++ b/arch/sh64/lib/io.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
diff --git a/arch/sh64/lib/iomap.c b/arch/sh64/lib/iomap.c
index 83c5f0c0495..5cd3d5e9c76 100644
--- a/arch/sh64/lib/iomap.c
+++ b/arch/sh64/lib/iomap.c
@@ -9,7 +9,6 @@
9 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details. 10 * for more details.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/pci.h> 12#include <linux/pci.h>
14#include <asm/io.h> 13#include <asm/io.h>
15 14
diff --git a/arch/sh64/lib/memcpy.c b/arch/sh64/lib/memcpy.c
index c785d0aa194..fba436a92bf 100644
--- a/arch/sh64/lib/memcpy.c
+++ b/arch/sh64/lib/memcpy.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <asm/string.h> 10#include <asm/string.h>
12 11
diff --git a/arch/sh64/lib/udelay.c b/arch/sh64/lib/udelay.c
index dad2f254efe..32765391400 100644
--- a/arch/sh64/lib/udelay.c
+++ b/arch/sh64/lib/udelay.c
@@ -10,7 +10,6 @@
10 * License. See the file "COPYING" in the main directory of this archive 10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details. 11 * for more details.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15#include <asm/param.h> 14#include <asm/param.h>
16 15
diff --git a/arch/sh64/mach-cayman/iomap.c b/arch/sh64/mach-cayman/iomap.c
index d6a538c7070..2d06e9a5513 100644
--- a/arch/sh64/mach-cayman/iomap.c
+++ b/arch/sh64/mach-cayman/iomap.c
@@ -9,7 +9,6 @@
9 * License. See the file "COPYING" in the main directory of this archive 9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details. 10 * for more details.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/pci.h> 12#include <linux/pci.h>
14#include <asm/io.h> 13#include <asm/io.h>
15#include <asm/cayman.h> 14#include <asm/cayman.h>
diff --git a/arch/sh64/mach-cayman/irq.c b/arch/sh64/mach-cayman/irq.c
index 05eb7cdc26f..228ce61c351 100644
--- a/arch/sh64/mach-cayman/irq.c
+++ b/arch/sh64/mach-cayman/irq.c
@@ -12,7 +12,6 @@
12 * Copyright (C) 2002 Stuart Menefy 12 * Copyright (C) 2002 Stuart Menefy
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <asm/irq.h> 15#include <asm/irq.h>
17#include <asm/page.h> 16#include <asm/page.h>
18#include <asm/io.h> 17#include <asm/io.h>
@@ -45,13 +44,13 @@ static irqreturn_t cayman_interrupt_pci2(int irq, void *dev_id, struct pt_regs *
45static struct irqaction cayman_action_smsc = { 44static struct irqaction cayman_action_smsc = {
46 .name = "Cayman SMSC Mux", 45 .name = "Cayman SMSC Mux",
47 .handler = cayman_interrupt_smsc, 46 .handler = cayman_interrupt_smsc,
48 .flags = SA_INTERRUPT, 47 .flags = IRQF_DISABLED,
49}; 48};
50 49
51static struct irqaction cayman_action_pci2 = { 50static struct irqaction cayman_action_pci2 = {
52 .name = "Cayman PCI2 Mux", 51 .name = "Cayman PCI2 Mux",
53 .handler = cayman_interrupt_pci2, 52 .handler = cayman_interrupt_pci2,
54 .flags = SA_INTERRUPT, 53 .flags = IRQF_DISABLED,
55}; 54};
56 55
57static void enable_cayman_irq(unsigned int irq) 56static void enable_cayman_irq(unsigned int irq)
diff --git a/arch/sh64/mach-cayman/setup.c b/arch/sh64/mach-cayman/setup.c
index c793245629a..d84895dda3c 100644
--- a/arch/sh64/mach-cayman/setup.c
+++ b/arch/sh64/mach-cayman/setup.c
@@ -21,7 +21,6 @@
21 21
22#include <linux/stddef.h> 22#include <linux/stddef.h>
23#include <linux/init.h> 23#include <linux/init.h>
24#include <linux/config.h>
25#include <linux/mm.h> 24#include <linux/mm.h>
26#include <linux/bootmem.h> 25#include <linux/bootmem.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
diff --git a/arch/sh64/mach-harp/setup.c b/arch/sh64/mach-harp/setup.c
index 3938a65c4b2..fcd90afac29 100644
--- a/arch/sh64/mach-harp/setup.c
+++ b/arch/sh64/mach-harp/setup.c
@@ -20,7 +20,6 @@
20 20
21#include <linux/stddef.h> 21#include <linux/stddef.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/config.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
25#include <linux/bootmem.h> 24#include <linux/bootmem.h>
26#include <linux/delay.h> 25#include <linux/delay.h>
diff --git a/arch/sh64/mach-romram/setup.c b/arch/sh64/mach-romram/setup.c
index a9ba03fc5be..eb98a1640cc 100644
--- a/arch/sh64/mach-romram/setup.c
+++ b/arch/sh64/mach-romram/setup.c
@@ -23,7 +23,6 @@
23 23
24#include <linux/stddef.h> 24#include <linux/stddef.h>
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/config.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/bootmem.h> 27#include <linux/bootmem.h>
29#include <linux/delay.h> 28#include <linux/delay.h>
diff --git a/arch/sh64/mach-sim/setup.c b/arch/sh64/mach-sim/setup.c
index a68639cb4e5..f09400c1ad1 100644
--- a/arch/sh64/mach-sim/setup.c
+++ b/arch/sh64/mach-sim/setup.c
@@ -17,7 +17,6 @@
17 17
18#include <linux/stddef.h> 18#include <linux/stddef.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/config.h>
21#include <linux/mm.h> 20#include <linux/mm.h>
22#include <linux/bootmem.h> 21#include <linux/bootmem.h>
23#include <linux/delay.h> 22#include <linux/delay.h>
diff --git a/arch/sh64/mm/cache.c b/arch/sh64/mm/cache.c
index c0c1b21350d..421487cfff4 100644
--- a/arch/sh64/mm/cache.c
+++ b/arch/sh64/mm/cache.c
@@ -13,7 +13,6 @@
13 13
14/****************************************************************************/ 14/****************************************************************************/
15 15
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/mman.h> 17#include <linux/mman.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
diff --git a/arch/sh64/mm/extable.c b/arch/sh64/mm/extable.c
index 9da50e28b3f..a2e6e056377 100644
--- a/arch/sh64/mm/extable.c
+++ b/arch/sh64/mm/extable.c
@@ -10,7 +10,6 @@
10 * 10 *
11 * Cloned from the 2.5 SH version.. 11 * Cloned from the 2.5 SH version..
12 */ 12 */
13#include <linux/config.h>
14#include <linux/rwsem.h> 13#include <linux/rwsem.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <asm/uaccess.h> 15#include <asm/uaccess.h>
diff --git a/arch/sh64/mm/hugetlbpage.c b/arch/sh64/mm/hugetlbpage.c
index 3d89f2a6c78..187cf01750b 100644
--- a/arch/sh64/mm/hugetlbpage.c
+++ b/arch/sh64/mm/hugetlbpage.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com) 8 * Copyright (C) 2002, 2003 David S. Miller (davem@redhat.com)
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c
index 1f55231f07d..29d7cfd1c97 100644
--- a/arch/sparc/kernel/asm-offsets.c
+++ b/arch/sparc/kernel/asm-offsets.c
@@ -10,7 +10,6 @@
10 * On sparc, thread_info data is static and TI_XXX offsets are computed by hand. 10 * On sparc, thread_info data is static and TI_XXX offsets are computed by hand.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
15// #include <linux/mm.h> 14// #include <linux/mm.h>
16 15
diff --git a/arch/sparc/kernel/auxio.c b/arch/sparc/kernel/auxio.c
index d3b3648362c..118f3eca373 100644
--- a/arch/sparc/kernel/auxio.c
+++ b/arch/sparc/kernel/auxio.c
@@ -5,7 +5,6 @@
5 5
6#include <linux/stddef.h> 6#include <linux/stddef.h>
7#include <linux/init.h> 7#include <linux/init.h>
8#include <linux/config.h>
9#include <linux/spinlock.h> 8#include <linux/spinlock.h>
10#include <asm/oplib.h> 9#include <asm/oplib.h>
11#include <asm/io.h> 10#include <asm/io.h>
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
index d7bfc61d287..259a559d4ce 100644
--- a/arch/sparc/kernel/cpu.c
+++ b/arch/sparc/kernel/cpu.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/smp.h> 9#include <linux/smp.h>
diff --git a/arch/sparc/kernel/devices.c b/arch/sparc/kernel/devices.c
index fcb0c049c3f..adba9dfee35 100644
--- a/arch/sparc/kernel/devices.c
+++ b/arch/sparc/kernel/devices.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 7 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/threads.h> 11#include <linux/threads.h>
13#include <linux/string.h> 12#include <linux/string.h>
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c
index a7a4892956c..81c0cbd96ff 100644
--- a/arch/sparc/kernel/ebus.c
+++ b/arch/sparc/kernel/ebus.c
@@ -7,7 +7,6 @@
7 * Fixes for different platforms by Pete Zaitcev. 7 * Fixes for different platforms by Pete Zaitcev.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/init.h> 12#include <linux/init.h>
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S
index 887f6a160c5..a4edff4c3be 100644
--- a/arch/sparc/kernel/entry.S
+++ b/arch/sparc/kernel/entry.S
@@ -8,7 +8,6 @@
8 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au) 8 * Copyright (C) 1997 Anton Blanchard (anton@progsoc.uts.edu.au)
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13 12
14#include <asm/head.h> 13#include <asm/head.h>
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
index 42d3de59d19..9a219e8b5dd 100644
--- a/arch/sparc/kernel/head.S
+++ b/arch/sparc/kernel/head.S
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/version.h> 13#include <linux/version.h>
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16 15
17#include <asm/head.h> 16#include <asm/head.h>
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c
index 2e1b0f6e99d..3a5bad52539 100644
--- a/arch/sparc/kernel/idprom.c
+++ b/arch/sparc/kernel/idprom.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/init.h> 10#include <linux/init.h>
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index aac8af5aae5..cde73327ca9 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -11,7 +11,6 @@
11 * Copyright (C) 1998-2000 Anton Blanchard (anton@samba.org) 11 * Copyright (C) 1998-2000 Anton Blanchard (anton@samba.org)
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/ptrace.h> 16#include <linux/ptrace.h>
@@ -192,11 +191,11 @@ int show_interrupts(struct seq_file *p, void *v)
192 } 191 }
193#endif 192#endif
194 seq_printf(p, " %c %s", 193 seq_printf(p, " %c %s",
195 (action->flags & SA_INTERRUPT) ? '+' : ' ', 194 (action->flags & IRQF_DISABLED) ? '+' : ' ',
196 action->name); 195 action->name);
197 for (action=action->next; action; action = action->next) { 196 for (action=action->next; action; action = action->next) {
198 seq_printf(p, ",%s %s", 197 seq_printf(p, ",%s %s",
199 (action->flags & SA_INTERRUPT) ? " +" : "", 198 (action->flags & IRQF_DISABLED) ? " +" : "",
200 action->name); 199 action->name);
201 } 200 }
202 seq_putc(p, '\n'); 201 seq_putc(p, '\n');
@@ -244,7 +243,7 @@ void free_irq(unsigned int irq, void *dev_id)
244 printk("Trying to free free shared IRQ%d\n",irq); 243 printk("Trying to free free shared IRQ%d\n",irq);
245 goto out_unlock; 244 goto out_unlock;
246 } 245 }
247 } else if (action->flags & SA_SHIRQ) { 246 } else if (action->flags & IRQF_SHARED) {
248 printk("Trying to free shared IRQ%d with NULL device ID\n", irq); 247 printk("Trying to free shared IRQ%d with NULL device ID\n", irq);
249 goto out_unlock; 248 goto out_unlock;
250 } 249 }
@@ -396,9 +395,9 @@ int request_fast_irq(unsigned int irq,
396 395
397 action = sparc_irq[cpu_irq].action; 396 action = sparc_irq[cpu_irq].action;
398 if(action) { 397 if(action) {
399 if(action->flags & SA_SHIRQ) 398 if(action->flags & IRQF_SHARED)
400 panic("Trying to register fast irq when already shared.\n"); 399 panic("Trying to register fast irq when already shared.\n");
401 if(irqflags & SA_SHIRQ) 400 if(irqflags & IRQF_SHARED)
402 panic("Trying to register fast irq as shared.\n"); 401 panic("Trying to register fast irq as shared.\n");
403 402
404 /* Anyway, someone already owns it so cannot be made fast. */ 403 /* Anyway, someone already owns it so cannot be made fast. */
@@ -498,11 +497,11 @@ int request_irq(unsigned int irq,
498 actionp = &sparc_irq[cpu_irq].action; 497 actionp = &sparc_irq[cpu_irq].action;
499 action = *actionp; 498 action = *actionp;
500 if (action) { 499 if (action) {
501 if (!(action->flags & SA_SHIRQ) || !(irqflags & SA_SHIRQ)) { 500 if (!(action->flags & IRQF_SHARED) || !(irqflags & IRQF_SHARED)) {
502 ret = -EBUSY; 501 ret = -EBUSY;
503 goto out_unlock; 502 goto out_unlock;
504 } 503 }
505 if ((action->flags & SA_INTERRUPT) != (irqflags & SA_INTERRUPT)) { 504 if ((action->flags & IRQF_DISABLED) != (irqflags & IRQF_DISABLED)) {
506 printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); 505 printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq);
507 ret = -EBUSY; 506 ret = -EBUSY;
508 goto out_unlock; 507 goto out_unlock;
diff --git a/arch/sparc/kernel/pcic.c b/arch/sparc/kernel/pcic.c
index 5df3ebdc0ab..bfd31aac2df 100644
--- a/arch/sparc/kernel/pcic.c
+++ b/arch/sparc/kernel/pcic.c
@@ -10,7 +10,6 @@
10 * CP-1200 by Eric Brower. 10 * CP-1200 by Eric Brower.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/init.h> 15#include <linux/init.h>
@@ -746,7 +745,7 @@ void __init pci_time_init(void)
746 writel (PCI_COUNTER_IRQ_SET(timer_irq, 0), 745 writel (PCI_COUNTER_IRQ_SET(timer_irq, 0),
747 pcic->pcic_regs+PCI_COUNTER_IRQ); 746 pcic->pcic_regs+PCI_COUNTER_IRQ);
748 irq = request_irq(timer_irq, pcic_timer_handler, 747 irq = request_irq(timer_irq, pcic_timer_handler,
749 (SA_INTERRUPT | SA_STATIC_ALLOC), "timer", NULL); 748 (IRQF_DISABLED | SA_STATIC_ALLOC), "timer", NULL);
750 if (irq) { 749 if (irq) {
751 prom_printf("time_init: unable to attach IRQ%d\n", timer_irq); 750 prom_printf("time_init: unable to attach IRQ%d\n", timer_irq);
752 prom_halt(); 751 prom_halt();
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 118cac84a0f..89a28cc018c 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -22,7 +22,6 @@
22#include <linux/slab.h> 22#include <linux/slab.h>
23#include <linux/user.h> 23#include <linux/user.h>
24#include <linux/a.out.h> 24#include <linux/a.out.h>
25#include <linux/config.h>
26#include <linux/smp.h> 25#include <linux/smp.h>
27#include <linux/smp_lock.h> 26#include <linux/smp_lock.h>
28#include <linux/reboot.h> 27#include <linux/reboot.h>
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c
index 2e5d08ce217..8606ef4e52e 100644
--- a/arch/sparc/kernel/setup.c
+++ b/arch/sparc/kernel/setup.c
@@ -19,7 +19,6 @@
19#include <linux/a.out.h> 19#include <linux/a.out.h>
20#include <linux/tty.h> 20#include <linux/tty.h>
21#include <linux/delay.h> 21#include <linux/delay.h>
22#include <linux/config.h>
23#include <linux/fs.h> 22#include <linux/fs.h>
24#include <linux/seq_file.h> 23#include <linux/seq_file.h>
25#include <linux/syscalls.h> 24#include <linux/syscalls.h>
diff --git a/arch/sparc/kernel/signal.c b/arch/sparc/kernel/signal.c
index 0748d8147bb..c9301b9143c 100644
--- a/arch/sparc/kernel/signal.c
+++ b/arch/sparc/kernel/signal.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 7 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/signal.h> 12#include <linux/signal.h>
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c
index fd7deabf998..5fb987fc3d6 100644
--- a/arch/sparc/kernel/sparc_ksyms.c
+++ b/arch/sparc/kernel/sparc_ksyms.c
@@ -9,7 +9,6 @@
9#define EXPORT_SYMTAB_STROPS 9#define EXPORT_SYMTAB_STROPS
10#define PROMLIB_INTERNAL 10#define PROMLIB_INTERNAL
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/smp.h> 14#include <linux/smp.h>
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c
index 0f2d8d9cbdb..4be2c86ea54 100644
--- a/arch/sparc/kernel/sun4c_irq.c
+++ b/arch/sparc/kernel/sun4c_irq.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk) 9 * Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
@@ -180,7 +179,7 @@ static void __init sun4c_init_timers(irqreturn_t (*counter_fn)(int, void *, stru
180 179
181 irq = request_irq(TIMER_IRQ, 180 irq = request_irq(TIMER_IRQ,
182 counter_fn, 181 counter_fn,
183 (SA_INTERRUPT | SA_STATIC_ALLOC), 182 (IRQF_DISABLED | SA_STATIC_ALLOC),
184 "timer", NULL); 183 "timer", NULL);
185 if (irq) { 184 if (irq) {
186 prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); 185 prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ);
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 9c30e35c88f..74eed9775ac 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -6,7 +6,6 @@
6 * Heavily based on arch/sparc/kernel/irq.c. 6 * Heavily based on arch/sparc/kernel/irq.c.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/linkage.h> 10#include <linux/linkage.h>
12#include <linux/kernel_stat.h> 11#include <linux/kernel_stat.h>
@@ -108,13 +107,13 @@ found_it: seq_printf(p, "%3d: ", i);
108 kstat_cpu(cpu_logical_map(x)).irqs[i]); 107 kstat_cpu(cpu_logical_map(x)).irqs[i]);
109#endif 108#endif
110 seq_printf(p, "%c %s", 109 seq_printf(p, "%c %s",
111 (action->flags & SA_INTERRUPT) ? '+' : ' ', 110 (action->flags & IRQF_DISABLED) ? '+' : ' ',
112 action->name); 111 action->name);
113 action = action->next; 112 action = action->next;
114 for (;;) { 113 for (;;) {
115 for (; action; action = action->next) { 114 for (; action; action = action->next) {
116 seq_printf(p, ",%s %s", 115 seq_printf(p, ",%s %s",
117 (action->flags & SA_INTERRUPT) ? " +" : "", 116 (action->flags & IRQF_DISABLED) ? " +" : "",
118 action->name); 117 action->name);
119 } 118 }
120 if (!sbusl) break; 119 if (!sbusl) break;
@@ -161,7 +160,7 @@ void sun4d_free_irq(unsigned int irq, void *dev_id)
161 printk("Trying to free free shared IRQ%d\n",irq); 160 printk("Trying to free free shared IRQ%d\n",irq);
162 goto out_unlock; 161 goto out_unlock;
163 } 162 }
164 } else if (action->flags & SA_SHIRQ) { 163 } else if (action->flags & IRQF_SHARED) {
165 printk("Trying to free shared IRQ%d with NULL device ID\n", irq); 164 printk("Trying to free shared IRQ%d with NULL device ID\n", irq);
166 goto out_unlock; 165 goto out_unlock;
167 } 166 }
@@ -299,13 +298,13 @@ int sun4d_request_irq(unsigned int irq,
299 action = *actionp; 298 action = *actionp;
300 299
301 if (action) { 300 if (action) {
302 if ((action->flags & SA_SHIRQ) && (irqflags & SA_SHIRQ)) { 301 if ((action->flags & IRQF_SHARED) && (irqflags & IRQF_SHARED)) {
303 for (tmp = action; tmp->next; tmp = tmp->next); 302 for (tmp = action; tmp->next; tmp = tmp->next);
304 } else { 303 } else {
305 ret = -EBUSY; 304 ret = -EBUSY;
306 goto out_unlock; 305 goto out_unlock;
307 } 306 }
308 if ((action->flags & SA_INTERRUPT) ^ (irqflags & SA_INTERRUPT)) { 307 if ((action->flags & IRQF_DISABLED) ^ (irqflags & IRQF_DISABLED)) {
309 printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq); 308 printk("Attempt to mix fast and slow interrupts on IRQ%d denied\n", irq);
310 ret = -EBUSY; 309 ret = -EBUSY;
311 goto out_unlock; 310 goto out_unlock;
@@ -491,7 +490,7 @@ static void __init sun4d_init_timers(irqreturn_t (*counter_fn)(int, void *, stru
491 490
492 irq = request_irq(TIMER_IRQ, 491 irq = request_irq(TIMER_IRQ,
493 counter_fn, 492 counter_fn,
494 (SA_INTERRUPT | SA_STATIC_ALLOC), 493 (IRQF_DISABLED | SA_STATIC_ALLOC),
495 "timer", NULL); 494 "timer", NULL);
496 if (irq) { 495 if (irq) {
497 prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); 496 prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ);
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c
index a296c13ac18..7cefa301efe 100644
--- a/arch/sparc/kernel/sun4m_irq.c
+++ b/arch/sparc/kernel/sun4m_irq.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk) 9 * Copyright (C) 1996 Dave Redman (djhr@tadpole.co.uk)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/linkage.h> 13#include <linux/linkage.h>
15#include <linux/kernel_stat.h> 14#include <linux/kernel_stat.h>
@@ -279,7 +278,7 @@ static void __init sun4m_init_timers(irqreturn_t (*counter_fn)(int, void *, stru
279 278
280 irq = request_irq(TIMER_IRQ, 279 irq = request_irq(TIMER_IRQ,
281 counter_fn, 280 counter_fn,
282 (SA_INTERRUPT | SA_STATIC_ALLOC), 281 (IRQF_DISABLED | SA_STATIC_ALLOC),
283 "timer", NULL); 282 "timer", NULL);
284 if (irq) { 283 if (irq) {
285 prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ); 284 prom_printf("time_init: unable to attach IRQ%d\n",TIMER_IRQ);
diff --git a/arch/sparc/kernel/sys_solaris.c b/arch/sparc/kernel/sys_solaris.c
index fb7578554c7..c09afd96dd9 100644
--- a/arch/sparc/kernel/sys_solaris.c
+++ b/arch/sparc/kernel/sys_solaris.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx) 4 * Copyright (C) 1996 Miguel de Icaza (miguel@nuclecu.unam.mx)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/string.h> 9#include <linux/string.h>
diff --git a/arch/sparc/kernel/systbls.S b/arch/sparc/kernel/systbls.S
index 2856551bddf..10df38eeae0 100644
--- a/arch/sparc/kernel/systbls.S
+++ b/arch/sparc/kernel/systbls.S
@@ -9,7 +9,6 @@
9 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) 9 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
10 */ 10 */
11 11
12#include <linux/config.h>
13 12
14 .data 13 .data
15 .align 4 14 .align 4
diff --git a/arch/sparc/kernel/tick14.c b/arch/sparc/kernel/tick14.c
index 591547af4c6..d3b4daac705 100644
--- a/arch/sparc/kernel/tick14.c
+++ b/arch/sparc/kernel/tick14.c
@@ -74,7 +74,7 @@ void claim_ticker14(irqreturn_t (*handler)(int, void *, struct pt_regs *),
74 74
75 if (!request_irq(irq_nr, 75 if (!request_irq(irq_nr,
76 handler, 76 handler,
77 (SA_INTERRUPT | SA_STATIC_ALLOC), 77 (IRQF_DISABLED | SA_STATIC_ALLOC),
78 "counter14", 78 "counter14",
79 NULL)) { 79 NULL)) {
80 install_linux_ticker(); 80 install_linux_ticker();
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index 9631e8f4ae6..04eb1eab6e3 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -15,7 +15,6 @@
15 * 1997-09-10 Updated NTP code according to technical memorandum Jan '96 15 * 1997-09-10 Updated NTP code according to technical memorandum Jan '96
16 * "A Kernel Model for Precision Timekeeping" by Dave Mills 16 * "A Kernel Model for Precision Timekeeping" by Dave Mills
17 */ 17 */
18#include <linux/config.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
index 41d45c298fb..6a70d215fd0 100644
--- a/arch/sparc/kernel/traps.c
+++ b/arch/sparc/kernel/traps.c
@@ -9,7 +9,6 @@
9 * I hate traps on the sparc, grrr... 9 * I hate traps on the sparc, grrr...
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/sched.h> /* for jiffies */ 12#include <linux/sched.h> /* for jiffies */
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/kallsyms.h> 14#include <linux/kallsyms.h>
diff --git a/arch/sparc/lib/atomic.S b/arch/sparc/lib/atomic.S
index f48ad0c4dad..178cbb8ae1b 100644
--- a/arch/sparc/lib/atomic.S
+++ b/arch/sparc/lib/atomic.S
@@ -3,7 +3,6 @@
3 * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu) 3 * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <asm/ptrace.h> 6#include <asm/ptrace.h>
8#include <asm/psr.h> 7#include <asm/psr.h>
9 8
diff --git a/arch/sparc/lib/bitops.S b/arch/sparc/lib/bitops.S
index 3e939976907..cb7fb66a40c 100644
--- a/arch/sparc/lib/bitops.S
+++ b/arch/sparc/lib/bitops.S
@@ -3,7 +3,6 @@
3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <asm/ptrace.h> 6#include <asm/ptrace.h>
8#include <asm/psr.h> 7#include <asm/psr.h>
9 8
diff --git a/arch/sparc/lib/rwsem.S b/arch/sparc/lib/rwsem.S
index e7578dc600b..20657744c86 100644
--- a/arch/sparc/lib/rwsem.S
+++ b/arch/sparc/lib/rwsem.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com) 4 * Copyright (C) 1999 Jakub Jelinek (jakub@redhat.com)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/ptrace.h> 7#include <asm/ptrace.h>
9#include <asm/psr.h> 8#include <asm/psr.h>
10 9
diff --git a/arch/sparc/mm/btfixup.c b/arch/sparc/mm/btfixup.c
index f147a44c978..ec4231c2855 100644
--- a/arch/sparc/mm/btfixup.c
+++ b/arch/sparc/mm/btfixup.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 6 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <asm/btfixup.h> 11#include <asm/btfixup.h>
diff --git a/arch/sparc/mm/extable.c b/arch/sparc/mm/extable.c
index c9845c71f42..16cc28935e3 100644
--- a/arch/sparc/mm/extable.c
+++ b/arch/sparc/mm/extable.c
@@ -2,7 +2,6 @@
2 * linux/arch/sparc/mm/extable.c 2 * linux/arch/sparc/mm/extable.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <asm/uaccess.h> 6#include <asm/uaccess.h>
8 7
diff --git a/arch/sparc/mm/hypersparc.S b/arch/sparc/mm/hypersparc.S
index a231cca3721..d29cc24c5bb 100644
--- a/arch/sparc/mm/hypersparc.S
+++ b/arch/sparc/mm/hypersparc.S
@@ -10,7 +10,6 @@
10#include <asm/asi.h> 10#include <asm/asi.h>
11#include <asm/page.h> 11#include <asm/page.h>
12#include <asm/pgtsrmmu.h> 12#include <asm/pgtsrmmu.h>
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
16 .text 15 .text
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c
index cfa7d345663..c85ddf31274 100644
--- a/arch/sparc/mm/init.c
+++ b/arch/sparc/mm/init.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 2000 Anton Blanchard (anton@samba.org) 7 * Copyright (C) 2000 Anton Blanchard (anton@samba.org)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/signal.h> 11#include <linux/signal.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
diff --git a/arch/sparc/mm/io-unit.c b/arch/sparc/mm/io-unit.c
index eefffa1dc5d..42c1c700c0a 100644
--- a/arch/sparc/mm/io-unit.c
+++ b/arch/sparc/mm/io-unit.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/slab.h> 9#include <linux/slab.h>
diff --git a/arch/sparc/mm/iommu.c b/arch/sparc/mm/iommu.c
index 7215849db39..be042efd1ba 100644
--- a/arch/sparc/mm/iommu.c
+++ b/arch/sparc/mm/iommu.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 7 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 58c65cc8d0d..16e13f663ab 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1999,2000 Anton Blanchard (anton@samba.org) 8 * Copyright (C) 1999,2000 Anton Blanchard (anton@samba.org)
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c
index 49f28c1bdc6..7fdddf3c7e1 100644
--- a/arch/sparc/mm/sun4c.c
+++ b/arch/sparc/mm/sun4c.c
@@ -10,7 +10,6 @@
10 10
11#define NR_TASK_BUCKETS 512 11#define NR_TASK_BUCKETS 512
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
16#include <linux/init.h> 15#include <linux/init.h>
diff --git a/arch/sparc/mm/swift.S b/arch/sparc/mm/swift.S
index cd90f3fdc4e..9f4cd396a0f 100644
--- a/arch/sparc/mm/swift.S
+++ b/arch/sparc/mm/swift.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/psr.h> 7#include <asm/psr.h>
9#include <asm/asi.h> 8#include <asm/asi.h>
10#include <asm/page.h> 9#include <asm/page.h>
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S
index 697af617594..4988e6a310b 100644
--- a/arch/sparc/mm/tsunami.S
+++ b/arch/sparc/mm/tsunami.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/ptrace.h> 7#include <asm/ptrace.h>
9#include <asm/asm-offsets.h> 8#include <asm/asm-offsets.h>
10#include <asm/psr.h> 9#include <asm/psr.h>
diff --git a/arch/sparc/mm/viking.S b/arch/sparc/mm/viking.S
index 3cbd6de18dd..754c622548a 100644
--- a/arch/sparc/mm/viking.S
+++ b/arch/sparc/mm/viking.S
@@ -6,7 +6,6 @@
6 * Copyright (C) 1999 Pavel Semerad (semerad@ss1000.ms.mff.cuni.cz) 6 * Copyright (C) 1999 Pavel Semerad (semerad@ss1000.ms.mff.cuni.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <asm/ptrace.h> 9#include <asm/ptrace.h>
11#include <asm/psr.h> 10#include <asm/psr.h>
12#include <asm/asm-offsets.h> 11#include <asm/asm-offsets.h>
diff --git a/arch/sparc/prom/init.c b/arch/sparc/prom/init.c
index b83409c8191..50abfb1b880 100644
--- a/arch/sparc/prom/init.c
+++ b/arch/sparc/prom/init.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 6 * Copyright (C) 1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/init.h> 10#include <linux/init.h>
12 11
diff --git a/arch/sparc/prom/memory.c b/arch/sparc/prom/memory.c
index c20e5309f8a..b0c0f9c4fc1 100644
--- a/arch/sparc/prom/memory.c
+++ b/arch/sparc/prom/memory.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1997 Michael A. Griffith (grif@acm.org) 6 * Copyright (C) 1997 Michael A. Griffith (grif@acm.org)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/init.h> 10#include <linux/init.h>
12 11
diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c
index c840c206234..1942c7c05cb 100644
--- a/arch/sparc/prom/misc.c
+++ b/arch/sparc/prom/misc.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 5 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
index 8a2abcce273..a98f3ae175a 100644
--- a/arch/sparc64/kernel/binfmt_elf32.c
+++ b/arch/sparc64/kernel/binfmt_elf32.c
@@ -84,7 +84,6 @@ typedef struct {
84 84
85#include <asm/processor.h> 85#include <asm/processor.h>
86#include <linux/module.h> 86#include <linux/module.h>
87#include <linux/config.h>
88#include <linux/elfcore.h> 87#include <linux/elfcore.h>
89#include <linux/compat.h> 88#include <linux/compat.h>
90 89
diff --git a/arch/sparc64/kernel/cpu.c b/arch/sparc64/kernel/cpu.c
index 11cc0caef59..7eb81d3954d 100644
--- a/arch/sparc64/kernel/cpu.c
+++ b/arch/sparc64/kernel/cpu.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/devices.c b/arch/sparc64/kernel/devices.c
index 389301c95cb..f8ef2f2b9b3 100644
--- a/arch/sparc64/kernel/devices.c
+++ b/arch/sparc64/kernel/devices.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/threads.h> 8#include <linux/threads.h>
10#include <linux/init.h> 9#include <linux/init.h>
@@ -21,8 +20,6 @@
21#include <asm/spitfire.h> 20#include <asm/spitfire.h>
22#include <asm/timer.h> 21#include <asm/timer.h>
23#include <asm/cpudata.h> 22#include <asm/cpudata.h>
24#include <asm/vdev.h>
25#include <asm/irq.h>
26 23
27/* Used to synchronize acceses to NatSemi SUPER I/O chip configure 24/* Used to synchronize acceses to NatSemi SUPER I/O chip configure
28 * operations in asm/ns87303.h 25 * operations in asm/ns87303.h
@@ -32,100 +29,6 @@ DEFINE_SPINLOCK(ns87303_lock);
32extern void cpu_probe(void); 29extern void cpu_probe(void);
33extern void central_probe(void); 30extern void central_probe(void);
34 31
35u32 sun4v_vdev_devhandle;
36struct device_node *sun4v_vdev_root;
37
38struct vdev_intmap {
39 unsigned int phys;
40 unsigned int irq;
41 unsigned int cnode;
42 unsigned int cinterrupt;
43};
44
45struct vdev_intmask {
46 unsigned int phys;
47 unsigned int interrupt;
48 unsigned int __unused;
49};
50
51static struct vdev_intmap *vdev_intmap;
52static int vdev_num_intmap;
53static struct vdev_intmask *vdev_intmask;
54
55static void __init sun4v_virtual_device_probe(void)
56{
57 struct linux_prom64_registers *regs;
58 struct property *prop;
59 struct device_node *dp;
60 int sz;
61
62 if (tlb_type != hypervisor)
63 return;
64
65 dp = of_find_node_by_name(NULL, "virtual-devices");
66 if (!dp) {
67 prom_printf("SUN4V: Fatal error, no virtual-devices node.\n");
68 prom_halt();
69 }
70
71 sun4v_vdev_root = dp;
72
73 prop = of_find_property(dp, "reg", NULL);
74 regs = prop->value;
75 sun4v_vdev_devhandle = (regs[0].phys_addr >> 32UL) & 0x0fffffff;
76
77 prop = of_find_property(dp, "interrupt-map", &sz);
78 vdev_intmap = prop->value;
79 vdev_num_intmap = sz / sizeof(struct vdev_intmap);
80
81 prop = of_find_property(dp, "interrupt-map-mask", NULL);
82 vdev_intmask = prop->value;
83
84 printk("%s: Virtual Device Bus devhandle[%x]\n",
85 dp->full_name, sun4v_vdev_devhandle);
86}
87
88unsigned int sun4v_vdev_device_interrupt(struct device_node *dev_node)
89{
90 struct property *prop;
91 unsigned int irq, reg;
92 int i;
93
94 prop = of_find_property(dev_node, "interrupts", NULL);
95 if (!prop) {
96 printk("VDEV: Cannot get \"interrupts\" "
97 "property for OBP node %s\n",
98 dev_node->full_name);
99 return 0;
100 }
101 irq = *(unsigned int *) prop->value;
102
103 prop = of_find_property(dev_node, "reg", NULL);
104 if (!prop) {
105 printk("VDEV: Cannot get \"reg\" "
106 "property for OBP node %s\n",
107 dev_node->full_name);
108 return 0;
109 }
110 reg = *(unsigned int *) prop->value;
111
112 for (i = 0; i < vdev_num_intmap; i++) {
113 if (vdev_intmap[i].phys == (reg & vdev_intmask->phys) &&
114 vdev_intmap[i].irq == (irq & vdev_intmask->interrupt)) {
115 irq = vdev_intmap[i].cinterrupt;
116 break;
117 }
118 }
119
120 if (i == vdev_num_intmap) {
121 printk("VDEV: No matching interrupt map entry "
122 "for OBP node %s\n", dev_node->full_name);
123 return 0;
124 }
125
126 return sun4v_build_irq(sun4v_vdev_devhandle, irq);
127}
128
129static const char *cpu_mid_prop(void) 32static const char *cpu_mid_prop(void)
130{ 33{
131 if (tlb_type == spitfire) 34 if (tlb_type == spitfire)
@@ -290,7 +193,6 @@ void __init device_scan(void)
290 } 193 }
291#endif 194#endif
292 195
293 sun4v_virtual_device_probe();
294 central_probe(); 196 central_probe();
295 197
296 cpu_probe(); 198 cpu_probe();
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c
index aac014d15ad..8a9b470e1b6 100644
--- a/arch/sparc64/kernel/ebus.c
+++ b/arch/sparc64/kernel/ebus.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 5 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/types.h> 10#include <linux/types.h>
@@ -141,7 +140,7 @@ int ebus_dma_irq_enable(struct ebus_dma_info *p, int on)
141 140
142 if (on) { 141 if (on) {
143 if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) { 142 if (p->flags & EBUS_DMA_FLAG_USE_EBDMA_HANDLER) {
144 if (request_irq(p->irq, ebus_dma_irq, SA_SHIRQ, p->name, p)) 143 if (request_irq(p->irq, ebus_dma_irq, IRQF_SHARED, p->name, p))
145 return -EBUSY; 144 return -EBUSY;
146 } 145 }
147 146
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S
index be85ce2a4ad..0aaa35fc5a9 100644
--- a/arch/sparc64/kernel/entry.S
+++ b/arch/sparc64/kernel/entry.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 7 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12 11
13#include <asm/head.h> 12#include <asm/head.h>
diff --git a/arch/sparc64/kernel/etrap.S b/arch/sparc64/kernel/etrap.S
index 149383835c2..4b2bf9eb447 100644
--- a/arch/sparc64/kernel/etrap.S
+++ b/arch/sparc64/kernel/etrap.S
@@ -5,7 +5,6 @@
5 * Copyright (C) 1997, 1998, 1999 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1997, 1998, 1999 Jakub Jelinek (jj@ultra.linux.cz)
6 */ 6 */
7 7
8#include <linux/config.h>
9 8
10#include <asm/asi.h> 9#include <asm/asi.h>
11#include <asm/pstate.h> 10#include <asm/pstate.h>
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 31c5892f5ac..75684b56767 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -7,7 +7,6 @@
7 * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx) 7 * Copyright (C) 1997 Miguel de Icaza (miguel@nuclecu.unam.mx)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/version.h> 10#include <linux/version.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index eebe02f3f4c..4e64724cb9a 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) 6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
12#include <linux/ptrace.h> 11#include <linux/ptrace.h>
diff --git a/arch/sparc64/kernel/kprobes.c b/arch/sparc64/kernel/kprobes.c
index 2e1c824c1cc..8e75ed762fd 100644
--- a/arch/sparc64/kernel/kprobes.c
+++ b/arch/sparc64/kernel/kprobes.c
@@ -3,7 +3,6 @@
3 * Copyright (C) 2004 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2004 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/kernel.h> 6#include <linux/kernel.h>
8#include <linux/kprobes.h> 7#include <linux/kprobes.h>
9#include <linux/module.h> 8#include <linux/module.h>
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S
index 31da1e564c9..e492db845ea 100644
--- a/arch/sparc64/kernel/ktlb.S
+++ b/arch/sparc64/kernel/ktlb.S
@@ -6,7 +6,6 @@
6 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 6 * Copyright (C) 1996,98,99 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <asm/head.h> 9#include <asm/head.h>
11#include <asm/asi.h> 10#include <asm/asi.h>
12#include <asm/page.h> 11#include <asm/page.h>
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index 3670dc8a7d5..169b017eec0 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -602,6 +602,9 @@ static void __init build_device_resources(struct of_device *op,
602 build_res: 602 build_res:
603 memset(r, 0, sizeof(*r)); 603 memset(r, 0, sizeof(*r));
604 if (result != OF_BAD_ADDR) { 604 if (result != OF_BAD_ADDR) {
605 if (tlb_type == hypervisor)
606 result &= 0x0fffffffffffffffUL;
607
605 r->start = result; 608 r->start = result;
606 r->end = result + size - 1; 609 r->end = result + size - 1;
607 r->flags = flags; 610 r->flags = flags;
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c
index 04ea6c2eb7a..e02f01b644a 100644
--- a/arch/sparc64/kernel/pci.c
+++ b/arch/sparc64/kernel/pci.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz) 6 * Copyright (C) 1999 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/string.h> 11#include <linux/string.h>
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index bf7b32b3670..197a7ffd57e 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -863,11 +863,11 @@ static void psycho_register_error_handlers(struct pci_controller_info *p)
863 if (op->num_irqs < 6) 863 if (op->num_irqs < 6)
864 return; 864 return;
865 865
866 request_irq(op->irqs[1], psycho_ue_intr, SA_SHIRQ, "PSYCHO UE", p); 866 request_irq(op->irqs[1], psycho_ue_intr, IRQF_SHARED, "PSYCHO UE", p);
867 request_irq(op->irqs[2], psycho_ce_intr, SA_SHIRQ, "PSYCHO CE", p); 867 request_irq(op->irqs[2], psycho_ce_intr, IRQF_SHARED, "PSYCHO CE", p);
868 request_irq(op->irqs[5], psycho_pcierr_intr, SA_SHIRQ, 868 request_irq(op->irqs[5], psycho_pcierr_intr, IRQF_SHARED,
869 "PSYCHO PCIERR-A", &p->pbm_A); 869 "PSYCHO PCIERR-A", &p->pbm_A);
870 request_irq(op->irqs[0], psycho_pcierr_intr, SA_SHIRQ, 870 request_irq(op->irqs[0], psycho_pcierr_intr, IRQF_SHARED,
871 "PSYCHO PCIERR-B", &p->pbm_B); 871 "PSYCHO PCIERR-B", &p->pbm_B);
872 872
873 /* Enable UE and CE interrupts for controller. */ 873 /* Enable UE and CE interrupts for controller. */
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
index 5e087b0fb4c..45891850b90 100644
--- a/arch/sparc64/kernel/pci_sabre.c
+++ b/arch/sparc64/kernel/pci_sabre.c
@@ -854,14 +854,14 @@ static void sabre_register_error_handlers(struct pci_controller_info *p)
854 SABRE_UEAFSR_SDRD | SABRE_UEAFSR_SDWR | 854 SABRE_UEAFSR_SDRD | SABRE_UEAFSR_SDWR |
855 SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE)); 855 SABRE_UEAFSR_SDTE | SABRE_UEAFSR_PDTE));
856 856
857 request_irq(op->irqs[1], sabre_ue_intr, SA_SHIRQ, "SABRE UE", p); 857 request_irq(op->irqs[1], sabre_ue_intr, IRQF_SHARED, "SABRE UE", p);
858 858
859 sabre_write(base + SABRE_CE_AFSR, 859 sabre_write(base + SABRE_CE_AFSR,
860 (SABRE_CEAFSR_PDRD | SABRE_CEAFSR_PDWR | 860 (SABRE_CEAFSR_PDRD | SABRE_CEAFSR_PDWR |
861 SABRE_CEAFSR_SDRD | SABRE_CEAFSR_SDWR)); 861 SABRE_CEAFSR_SDRD | SABRE_CEAFSR_SDWR));
862 862
863 request_irq(op->irqs[2], sabre_ce_intr, SA_SHIRQ, "SABRE CE", p); 863 request_irq(op->irqs[2], sabre_ce_intr, IRQF_SHARED, "SABRE CE", p);
864 request_irq(op->irqs[0], sabre_pcierr_intr, SA_SHIRQ, 864 request_irq(op->irqs[0], sabre_pcierr_intr, IRQF_SHARED,
865 "SABRE PCIERR", p); 865 "SABRE PCIERR", p);
866 866
867 tmp = sabre_read(base + SABRE_PCICTRL); 867 tmp = sabre_read(base + SABRE_PCICTRL);
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index 5c6e2a9b91f..75ade83ecc6 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -998,32 +998,32 @@ static void tomatillo_register_error_handlers(struct pci_controller_info *p)
998 pbm = pbm_for_ino(p, SCHIZO_UE_INO); 998 pbm = pbm_for_ino(p, SCHIZO_UE_INO);
999 op = of_find_device_by_node(pbm->prom_node); 999 op = of_find_device_by_node(pbm->prom_node);
1000 if (op) 1000 if (op)
1001 request_irq(op->irqs[1], schizo_ue_intr, SA_SHIRQ, 1001 request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED,
1002 "TOMATILLO_UE", p); 1002 "TOMATILLO_UE", p);
1003 1003
1004 pbm = pbm_for_ino(p, SCHIZO_CE_INO); 1004 pbm = pbm_for_ino(p, SCHIZO_CE_INO);
1005 op = of_find_device_by_node(pbm->prom_node); 1005 op = of_find_device_by_node(pbm->prom_node);
1006 if (op) 1006 if (op)
1007 request_irq(op->irqs[2], schizo_ce_intr, SA_SHIRQ, 1007 request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED,
1008 "TOMATILLO CE", p); 1008 "TOMATILLO CE", p);
1009 1009
1010 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); 1010 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO);
1011 op = of_find_device_by_node(pbm->prom_node); 1011 op = of_find_device_by_node(pbm->prom_node);
1012 if (op) 1012 if (op)
1013 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1013 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1014 "TOMATILLO PCIERR-A", pbm); 1014 "TOMATILLO PCIERR-A", pbm);
1015 1015
1016 1016
1017 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); 1017 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO);
1018 op = of_find_device_by_node(pbm->prom_node); 1018 op = of_find_device_by_node(pbm->prom_node);
1019 if (op) 1019 if (op)
1020 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1020 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1021 "TOMATILLO PCIERR-B", pbm); 1021 "TOMATILLO PCIERR-B", pbm);
1022 1022
1023 pbm = pbm_for_ino(p, SCHIZO_SERR_INO); 1023 pbm = pbm_for_ino(p, SCHIZO_SERR_INO);
1024 op = of_find_device_by_node(pbm->prom_node); 1024 op = of_find_device_by_node(pbm->prom_node);
1025 if (op) 1025 if (op)
1026 request_irq(op->irqs[3], schizo_safarierr_intr, SA_SHIRQ, 1026 request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED,
1027 "TOMATILLO SERR", p); 1027 "TOMATILLO SERR", p);
1028 1028
1029 /* Enable UE and CE interrupts for controller. */ 1029 /* Enable UE and CE interrupts for controller. */
@@ -1106,32 +1106,32 @@ static void schizo_register_error_handlers(struct pci_controller_info *p)
1106 pbm = pbm_for_ino(p, SCHIZO_UE_INO); 1106 pbm = pbm_for_ino(p, SCHIZO_UE_INO);
1107 op = of_find_device_by_node(pbm->prom_node); 1107 op = of_find_device_by_node(pbm->prom_node);
1108 if (op) 1108 if (op)
1109 request_irq(op->irqs[1], schizo_ue_intr, SA_SHIRQ, 1109 request_irq(op->irqs[1], schizo_ue_intr, IRQF_SHARED,
1110 "SCHIZO_UE", p); 1110 "SCHIZO_UE", p);
1111 1111
1112 pbm = pbm_for_ino(p, SCHIZO_CE_INO); 1112 pbm = pbm_for_ino(p, SCHIZO_CE_INO);
1113 op = of_find_device_by_node(pbm->prom_node); 1113 op = of_find_device_by_node(pbm->prom_node);
1114 if (op) 1114 if (op)
1115 request_irq(op->irqs[2], schizo_ce_intr, SA_SHIRQ, 1115 request_irq(op->irqs[2], schizo_ce_intr, IRQF_SHARED,
1116 "SCHIZO CE", p); 1116 "SCHIZO CE", p);
1117 1117
1118 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO); 1118 pbm = pbm_for_ino(p, SCHIZO_PCIERR_A_INO);
1119 op = of_find_device_by_node(pbm->prom_node); 1119 op = of_find_device_by_node(pbm->prom_node);
1120 if (op) 1120 if (op)
1121 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1121 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1122 "SCHIZO PCIERR-A", pbm); 1122 "SCHIZO PCIERR-A", pbm);
1123 1123
1124 1124
1125 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO); 1125 pbm = pbm_for_ino(p, SCHIZO_PCIERR_B_INO);
1126 op = of_find_device_by_node(pbm->prom_node); 1126 op = of_find_device_by_node(pbm->prom_node);
1127 if (op) 1127 if (op)
1128 request_irq(op->irqs[0], schizo_pcierr_intr, SA_SHIRQ, 1128 request_irq(op->irqs[0], schizo_pcierr_intr, IRQF_SHARED,
1129 "SCHIZO PCIERR-B", pbm); 1129 "SCHIZO PCIERR-B", pbm);
1130 1130
1131 pbm = pbm_for_ino(p, SCHIZO_SERR_INO); 1131 pbm = pbm_for_ino(p, SCHIZO_SERR_INO);
1132 op = of_find_device_by_node(pbm->prom_node); 1132 op = of_find_device_by_node(pbm->prom_node);
1133 if (op) 1133 if (op)
1134 request_irq(op->irqs[3], schizo_safarierr_intr, SA_SHIRQ, 1134 request_irq(op->irqs[3], schizo_safarierr_intr, IRQF_SHARED,
1135 "SCHIZO SERR", p); 1135 "SCHIZO SERR", p);
1136 1136
1137 /* Enable UE and CE interrupts for controller. */ 1137 /* Enable UE and CE interrupts for controller. */
diff --git a/arch/sparc64/kernel/power.c b/arch/sparc64/kernel/power.c
index 4febeda958a..e55466c77b6 100644
--- a/arch/sparc64/kernel/power.c
+++ b/arch/sparc64/kernel/power.c
@@ -6,7 +6,6 @@
6 6
7#define __KERNEL_SYSCALLS__ 7#define __KERNEL_SYSCALLS__
8 8
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index 1c7ca2f712d..7d75cd4eb29 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -12,7 +12,6 @@
12 12
13#include <stdarg.h> 13#include <stdarg.h>
14 14
15#include <linux/config.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
@@ -26,7 +25,6 @@
26#include <linux/slab.h> 25#include <linux/slab.h>
27#include <linux/user.h> 26#include <linux/user.h>
28#include <linux/a.out.h> 27#include <linux/a.out.h>
29#include <linux/config.h>
30#include <linux/reboot.h> 28#include <linux/reboot.h>
31#include <linux/delay.h> 29#include <linux/delay.h>
32#include <linux/compat.h> 30#include <linux/compat.h>
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c
index 8a70c52c044..fa484d4f241 100644
--- a/arch/sparc64/kernel/prom.c
+++ b/arch/sparc64/kernel/prom.c
@@ -1008,6 +1008,27 @@ static struct irq_trans pci_irq_trans_table[] = {
1008}; 1008};
1009#endif 1009#endif
1010 1010
1011static unsigned int sun4v_vdev_irq_build(struct device_node *dp,
1012 unsigned int devino,
1013 void *_data)
1014{
1015 u32 devhandle = (u32) (unsigned long) _data;
1016
1017 return sun4v_build_irq(devhandle, devino);
1018}
1019
1020static void sun4v_vdev_irq_trans_init(struct device_node *dp)
1021{
1022 struct linux_prom64_registers *regs;
1023
1024 dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
1025 dp->irq_trans->irq_build = sun4v_vdev_irq_build;
1026
1027 regs = of_get_property(dp, "reg", NULL);
1028 dp->irq_trans->data = (void *) (unsigned long)
1029 ((regs->phys_addr >> 32UL) & 0x0fffffff);
1030}
1031
1011static void irq_trans_init(struct device_node *dp) 1032static void irq_trans_init(struct device_node *dp)
1012{ 1033{
1013 const char *model; 1034 const char *model;
@@ -1034,6 +1055,8 @@ static void irq_trans_init(struct device_node *dp)
1034#endif 1055#endif
1035 if (!strcmp(dp->name, "central")) 1056 if (!strcmp(dp->name, "central"))
1036 return central_irq_trans_init(dp->child); 1057 return central_irq_trans_init(dp->child);
1058 if (!strcmp(dp->name, "virtual-devices"))
1059 return sun4v_vdev_irq_trans_init(dp);
1037} 1060}
1038 1061
1039static int is_root_node(const struct device_node *dp) 1062static int is_root_node(const struct device_node *dp)
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S
index 7130e866f93..3522cd66f3b 100644
--- a/arch/sparc64/kernel/rtrap.S
+++ b/arch/sparc64/kernel/rtrap.S
@@ -5,7 +5,6 @@
5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
6 */ 6 */
7 7
8#include <linux/config.h>
9 8
10#include <asm/asi.h> 9#include <asm/asi.h>
11#include <asm/pstate.h> 10#include <asm/pstate.h>
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c
index ef68aa4fec6..c49a5779574 100644
--- a/arch/sparc64/kernel/sbus.c
+++ b/arch/sparc64/kernel/sbus.c
@@ -1065,7 +1065,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus)
1065 1065
1066 irq = sbus_build_irq(sbus, SYSIO_UE_INO); 1066 irq = sbus_build_irq(sbus, SYSIO_UE_INO);
1067 if (request_irq(irq, sysio_ue_handler, 1067 if (request_irq(irq, sysio_ue_handler,
1068 SA_SHIRQ, "SYSIO UE", sbus) < 0) { 1068 IRQF_SHARED, "SYSIO UE", sbus) < 0) {
1069 prom_printf("SYSIO[%x]: Cannot register UE interrupt.\n", 1069 prom_printf("SYSIO[%x]: Cannot register UE interrupt.\n",
1070 sbus->portid); 1070 sbus->portid);
1071 prom_halt(); 1071 prom_halt();
@@ -1073,7 +1073,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus)
1073 1073
1074 irq = sbus_build_irq(sbus, SYSIO_CE_INO); 1074 irq = sbus_build_irq(sbus, SYSIO_CE_INO);
1075 if (request_irq(irq, sysio_ce_handler, 1075 if (request_irq(irq, sysio_ce_handler,
1076 SA_SHIRQ, "SYSIO CE", sbus) < 0) { 1076 IRQF_SHARED, "SYSIO CE", sbus) < 0) {
1077 prom_printf("SYSIO[%x]: Cannot register CE interrupt.\n", 1077 prom_printf("SYSIO[%x]: Cannot register CE interrupt.\n",
1078 sbus->portid); 1078 sbus->portid);
1079 prom_halt(); 1079 prom_halt();
@@ -1081,7 +1081,7 @@ static void __init sysio_register_error_handlers(struct sbus_bus *sbus)
1081 1081
1082 irq = sbus_build_irq(sbus, SYSIO_SBUSERR_INO); 1082 irq = sbus_build_irq(sbus, SYSIO_SBUSERR_INO);
1083 if (request_irq(irq, sysio_sbus_error_handler, 1083 if (request_irq(irq, sysio_sbus_error_handler,
1084 SA_SHIRQ, "SYSIO SBUS Error", sbus) < 0) { 1084 IRQF_SHARED, "SYSIO SBUS Error", sbus) < 0) {
1085 prom_printf("SYSIO[%x]: Cannot register SBUS Error interrupt.\n", 1085 prom_printf("SYSIO[%x]: Cannot register SBUS Error interrupt.\n",
1086 sbus->portid); 1086 sbus->portid);
1087 prom_halt(); 1087 prom_halt();
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index 116d9632002..a73140466e0 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -18,7 +18,6 @@
18#include <linux/a.out.h> 18#include <linux/a.out.h>
19#include <linux/tty.h> 19#include <linux/tty.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/config.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
23#include <linux/seq_file.h> 22#include <linux/seq_file.h>
24#include <linux/syscalls.h> 23#include <linux/syscalls.h>
diff --git a/arch/sparc64/kernel/signal.c b/arch/sparc64/kernel/signal.c
index ca11a4c457d..96d56a8410a 100644
--- a/arch/sparc64/kernel/signal.c
+++ b/arch/sparc64/kernel/signal.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 8 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
9 */ 9 */
10 10
11#include <linux/config.h>
12#ifdef CONFIG_SPARC32_COMPAT 11#ifdef CONFIG_SPARC32_COMPAT
13#include <linux/compat.h> /* for compat_old_sigset_t */ 12#include <linux/compat.h> /* for compat_old_sigset_t */
14#endif 13#endif
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c
index 4ac35dd2088..4173de425f0 100644
--- a/arch/sparc64/kernel/sparc64_ksyms.c
+++ b/arch/sparc64/kernel/sparc64_ksyms.c
@@ -10,7 +10,6 @@
10#define EXPORT_SYMTAB_STROPS 10#define EXPORT_SYMTAB_STROPS
11#define PROMLIB_INTERNAL 11#define PROMLIB_INTERNAL
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/string.h> 15#include <linux/string.h>
diff --git a/arch/sparc64/kernel/sys32.S b/arch/sparc64/kernel/sys32.S
index bdf1f4d02e3..c09ab4b9431 100644
--- a/arch/sparc64/kernel/sys32.S
+++ b/arch/sparc64/kernel/sys32.S
@@ -6,7 +6,6 @@
6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) 6 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <asm/errno.h> 9#include <asm/errno.h>
11 10
12/* NOTE: call as jump breaks return stack, we have to avoid that */ 11/* NOTE: call as jump breaks return stack, we have to avoid that */
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c
index 7a869138c37..51c056df528 100644
--- a/arch/sparc64/kernel/sys_sparc.c
+++ b/arch/sparc64/kernel/sys_sparc.c
@@ -6,7 +6,6 @@
6 * platform. 6 * platform.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 31030bf00f1..c88ae23ce81 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -8,7 +8,6 @@
8 * environment. 8 * environment.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/capability.h> 13#include <linux/capability.h>
diff --git a/arch/sparc64/kernel/systbls.S b/arch/sparc64/kernel/systbls.S
index 1136fc465e3..419a63fca17 100644
--- a/arch/sparc64/kernel/systbls.S
+++ b/arch/sparc64/kernel/systbls.S
@@ -10,7 +10,6 @@
10 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu) 10 * Copyright (C) 1995 Adrian M. Rodriguez (adrian@remus.rutgers.edu)
11 */ 11 */
12 12
13#include <linux/config.h>
14 13
15 .text 14 .text
16 .align 4 15 .align 4
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index 5f3dd4d800c..8dcbfbffacc 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu) 9 * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c
index 1ff34b019f3..68420e2dad0 100644
--- a/arch/sparc64/kernel/traps.c
+++ b/arch/sparc64/kernel/traps.c
@@ -9,7 +9,6 @@
9 * I like traps on v9, :)))) 9 * I like traps on v9, :))))
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/sched.h> /* for jiffies */ 13#include <linux/sched.h> /* for jiffies */
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/arch/sparc64/kernel/tsb.S b/arch/sparc64/kernel/tsb.S
index a0c8ba58920..eedf94fa566 100644
--- a/arch/sparc64/kernel/tsb.S
+++ b/arch/sparc64/kernel/tsb.S
@@ -3,7 +3,6 @@
3 * Copyright (C) 2006 David S. Miller <davem@davemloft.net> 3 * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
4 */ 4 */
5 5
6#include <linux/config.h>
7 6
8#include <asm/tsb.h> 7#include <asm/tsb.h>
9#include <asm/hypervisor.h> 8#include <asm/hypervisor.h>
diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S
index ee45ca2d7a0..d7d2a8bdc66 100644
--- a/arch/sparc64/kernel/ttable.S
+++ b/arch/sparc64/kernel/ttable.S
@@ -3,7 +3,6 @@
3 * Copyright (C) 1996, 2001, 2006 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 1996, 2001, 2006 David S. Miller (davem@davemloft.net)
4 */ 4 */
5 5
6#include <linux/config.h>
7 6
8 .globl sparc64_ttable_tl0, sparc64_ttable_tl1 7 .globl sparc64_ttable_tl0, sparc64_ttable_tl1
9 .globl tl0_icpe, tl1_icpe 8 .globl tl0_icpe, tl1_icpe
diff --git a/arch/sparc64/lib/atomic.S b/arch/sparc64/lib/atomic.S
index faf87c31598..9633750167d 100644
--- a/arch/sparc64/lib/atomic.S
+++ b/arch/sparc64/lib/atomic.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 1999 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1999 David S. Miller (davem@redhat.com)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/asi.h> 7#include <asm/asi.h>
9 8
10 .text 9 .text
diff --git a/arch/sparc64/lib/bitops.S b/arch/sparc64/lib/bitops.S
index 31afbfe6c1e..892431a8213 100644
--- a/arch/sparc64/lib/bitops.S
+++ b/arch/sparc64/lib/bitops.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 2000 David S. Miller (davem@redhat.com) 4 * Copyright (C) 2000 David S. Miller (davem@redhat.com)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/asi.h> 7#include <asm/asi.h>
9 8
10 .text 9 .text
diff --git a/arch/sparc64/lib/mcount.S b/arch/sparc64/lib/mcount.S
index 2ef2e268bdc..9e4534b485c 100644
--- a/arch/sparc64/lib/mcount.S
+++ b/arch/sparc64/lib/mcount.S
@@ -5,7 +5,6 @@
5 * This can also be tweaked for kernel stack overflow detection. 5 * This can also be tweaked for kernel stack overflow detection.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/linkage.h> 8#include <linux/linkage.h>
10 9
11#include <asm/ptrace.h> 10#include <asm/ptrace.h>
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index fbbbebbad8a..53b9b1f528e 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 2002, 2003, 2006 David S. Miller (davem@davemloft.net) 4 * Copyright (C) 2002, 2003, 2006 David S. Miller (davem@davemloft.net)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/fs.h> 9#include <linux/fs.h>
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index cb75a27adb5..dcba4e6ab57 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1997-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 5 * Copyright (C) 1997-1999 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S
index f8479fad404..d70b60a3bbc 100644
--- a/arch/sparc64/mm/ultra.S
+++ b/arch/sparc64/mm/ultra.S
@@ -4,7 +4,6 @@
4 * Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com) 4 * Copyright (C) 1997, 2000 David S. Miller (davem@redhat.com)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <asm/asi.h> 7#include <asm/asi.h>
9#include <asm/pgtable.h> 8#include <asm/pgtable.h>
10#include <asm/page.h> 9#include <asm/page.h>
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index 577bde8b664..0b4213720d4 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 6 * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c
index 719c90905a1..8135ec322c9 100644
--- a/arch/sparc64/solaris/misc.c
+++ b/arch/sparc64/solaris/misc.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) 4 * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <linux/smp_lock.h> 9#include <linux/smp_lock.h>
diff --git a/arch/um/drivers/harddog_kern.c b/arch/um/drivers/harddog_kern.c
index d18a974735e..64ff22aa077 100644
--- a/arch/um/drivers/harddog_kern.c
+++ b/arch/um/drivers/harddog_kern.c
@@ -35,7 +35,6 @@
35 */ 35 */
36 36
37#include <linux/module.h> 37#include <linux/module.h>
38#include <linux/config.h>
39#include <linux/types.h> 38#include <linux/types.h>
40#include <linux/kernel.h> 39#include <linux/kernel.h>
41#include <linux/fs.h> 40#include <linux/fs.h>
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index 5ca57ca3371..ebebaabb78a 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -373,7 +373,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data,
373 int err; 373 int err;
374 374
375 /* Interrupts are enabled here because we registered the interrupt with 375 /* Interrupts are enabled here because we registered the interrupt with
376 * SA_INTERRUPT (see line_setup_irq).*/ 376 * IRQF_DISABLED (see line_setup_irq).*/
377 377
378 spin_lock_irq(&line->lock); 378 spin_lock_irq(&line->lock);
379 err = flush_buffer(line); 379 err = flush_buffer(line);
@@ -406,7 +406,7 @@ static irqreturn_t line_write_interrupt(int irq, void *data,
406int line_setup_irq(int fd, int input, int output, struct line *line, void *data) 406int line_setup_irq(int fd, int input, int output, struct line *line, void *data)
407{ 407{
408 struct line_driver *driver = line->driver; 408 struct line_driver *driver = line->driver;
409 int err = 0, flags = SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM; 409 int err = 0, flags = IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM;
410 410
411 if (input) 411 if (input)
412 err = um_request_irq(driver->read_irq, fd, IRQ_READ, 412 err = um_request_irq(driver->read_irq, fd, IRQ_READ,
@@ -767,7 +767,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty)
767 spin_unlock(&winch_handler_lock); 767 spin_unlock(&winch_handler_lock);
768 768
769 if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, 769 if(um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
770 SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, 770 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
771 "winch", winch) < 0) 771 "winch", winch) < 0)
772 printk("register_winch_irq - failed to register IRQ\n"); 772 printk("register_winch_irq - failed to register IRQ\n");
773} 773}
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index 79149314ed0..b414522f768 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -777,7 +777,7 @@ static int mconsole_init(void)
777 register_reboot_notifier(&reboot_notifier); 777 register_reboot_notifier(&reboot_notifier);
778 778
779 err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt, 779 err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
780 SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, 780 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
781 "mconsole", (void *)sock); 781 "mconsole", (void *)sock);
782 if (err){ 782 if (err){
783 printk("Failed to get IRQ for management console\n"); 783 printk("Failed to get IRQ for management console\n");
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 8c7279bb353..501f95675d8 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -128,7 +128,7 @@ static int uml_net_open(struct net_device *dev)
128 } 128 }
129 129
130 err = um_request_irq(dev->irq, lp->fd, IRQ_READ, uml_net_interrupt, 130 err = um_request_irq(dev->irq, lp->fd, IRQ_READ, uml_net_interrupt,
131 SA_INTERRUPT | SA_SHIRQ, dev->name, dev); 131 IRQF_DISABLED | IRQF_SHARED, dev->name, dev);
132 if(err != 0){ 132 if(err != 0){
133 printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err); 133 printk(KERN_ERR "uml_net_open: failed to get irq(%d)\n", err);
134 err = -ENETUNREACH; 134 err = -ENETUNREACH;
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c
index 189839e4f1d..73755f37a8a 100644
--- a/arch/um/drivers/port_kern.c
+++ b/arch/um/drivers/port_kern.c
@@ -105,7 +105,7 @@ static int port_accept(struct port_list *port)
105 .port = port }); 105 .port = port });
106 106
107 if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt, 107 if(um_request_irq(TELNETD_IRQ, socket[0], IRQ_READ, pipe_interrupt,
108 SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, 108 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
109 "telnetd", conn)){ 109 "telnetd", conn)){
110 printk(KERN_ERR "port_accept : failed to get IRQ for " 110 printk(KERN_ERR "port_accept : failed to get IRQ for "
111 "telnetd\n"); 111 "telnetd\n");
@@ -186,7 +186,7 @@ void *port_data(int port_num)
186 goto out_free; 186 goto out_free;
187 } 187 }
188 if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt, 188 if(um_request_irq(ACCEPT_IRQ, fd, IRQ_READ, port_interrupt,
189 SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, "port", 189 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM, "port",
190 port)){ 190 port)){
191 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num); 191 printk(KERN_ERR "Failed to get IRQ for port %d\n", port_num);
192 goto out_close; 192 goto out_close;
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 0345e255124..602d7286b9e 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -874,7 +874,7 @@ int ubd_driver_init(void){
874 return(0); 874 return(0);
875 } 875 }
876 err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, 876 err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr,
877 SA_INTERRUPT, "ubd", ubd_dev); 877 IRQF_DISABLED, "ubd", ubd_dev);
878 if(err != 0) 878 if(err != 0)
879 printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); 879 printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err);
880 return 0; 880 return 0;
diff --git a/arch/um/drivers/xterm_kern.c b/arch/um/drivers/xterm_kern.c
index d269a80f4b0..6036ec85895 100644
--- a/arch/um/drivers/xterm_kern.c
+++ b/arch/um/drivers/xterm_kern.c
@@ -54,7 +54,7 @@ int xterm_fd(int socket, int *pid_out)
54 init_completion(&data->ready); 54 init_completion(&data->ready);
55 55
56 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt, 56 err = um_request_irq(XTERM_IRQ, socket, IRQ_READ, xterm_interrupt,
57 SA_INTERRUPT | SA_SHIRQ | SA_SAMPLE_RANDOM, 57 IRQF_DISABLED | IRQF_SHARED | IRQF_SAMPLE_RANDOM,
58 "xterm", data); 58 "xterm", data);
59 if (err){ 59 if (err){
60 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, " 60 printk(KERN_ERR "xterm_fd : failed to get IRQ for xterm, "
diff --git a/arch/um/include/sysdep-x86_64/kernel-offsets.h b/arch/um/include/sysdep-x86_64/kernel-offsets.h
index 939cc475757..91d129fb393 100644
--- a/arch/um/include/sysdep-x86_64/kernel-offsets.h
+++ b/arch/um/include/sysdep-x86_64/kernel-offsets.h
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/stddef.h> 1#include <linux/stddef.h>
3#include <linux/sched.h> 2#include <linux/sched.h>
4#include <linux/time.h> 3#include <linux/time.h>
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index fae43a3054a..bfd0bdc8cd4 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -474,7 +474,7 @@ int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *,
474 } 474 }
475 475
476 err = um_request_irq(irq, fds[0], IRQ_READ, handler, 476 err = um_request_irq(irq, fds[0], IRQ_READ, handler,
477 SA_INTERRUPT | SA_SAMPLE_RANDOM, name, 477 IRQF_DISABLED | IRQF_SAMPLE_RANDOM, name,
478 (void *) (long) fds[0]); 478 (void *) (long) fds[0]);
479 if (err) { 479 if (err) {
480 printk("init_aio_irq - : um_request_irq failed, err = %d\n", 480 printk("init_aio_irq - : um_request_irq failed, err = %d\n",
diff --git a/arch/um/kernel/sigio_kern.c b/arch/um/kernel/sigio_kern.c
index 1c1300fb1e9..51b67708394 100644
--- a/arch/um/kernel/sigio_kern.c
+++ b/arch/um/kernel/sigio_kern.c
@@ -31,7 +31,7 @@ int write_sigio_irq(int fd)
31 int err; 31 int err;
32 32
33 err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt, 33 err = um_request_irq(SIGIO_WRITE_IRQ, fd, IRQ_READ, sigio_interrupt,
34 SA_INTERRUPT | SA_SAMPLE_RANDOM, "write sigio", 34 IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "write sigio",
35 NULL); 35 NULL);
36 if(err){ 36 if(err){
37 printk("write_sigio_irq : um_request_irq failed, err = %d\n", 37 printk("write_sigio_irq : um_request_irq failed, err = %d\n",
diff --git a/arch/um/kernel/skas/uaccess.c b/arch/um/kernel/skas/uaccess.c
index 5992c325716..8912cec0fe4 100644
--- a/arch/um/kernel/skas/uaccess.c
+++ b/arch/um/kernel/skas/uaccess.c
@@ -8,6 +8,7 @@
8#include "linux/kernel.h" 8#include "linux/kernel.h"
9#include "linux/string.h" 9#include "linux/string.h"
10#include "linux/fs.h" 10#include "linux/fs.h"
11#include "linux/hardirq.h"
11#include "linux/highmem.h" 12#include "linux/highmem.h"
12#include "asm/page.h" 13#include "asm/page.h"
13#include "asm/pgtable.h" 14#include "asm/pgtable.h"
@@ -38,7 +39,7 @@ static unsigned long maybe_map(unsigned long virt, int is_write)
38 return((unsigned long) phys); 39 return((unsigned long) phys);
39} 40}
40 41
41static int do_op(unsigned long addr, int len, int is_write, 42static int do_op_one_page(unsigned long addr, int len, int is_write,
42 int (*op)(unsigned long addr, int len, void *arg), void *arg) 43 int (*op)(unsigned long addr, int len, void *arg), void *arg)
43{ 44{
44 struct page *page; 45 struct page *page;
@@ -49,9 +50,11 @@ static int do_op(unsigned long addr, int len, int is_write,
49 return(-1); 50 return(-1);
50 51
51 page = phys_to_page(addr); 52 page = phys_to_page(addr);
52 addr = (unsigned long) kmap(page) + (addr & ~PAGE_MASK); 53 addr = (unsigned long) kmap_atomic(page, KM_UML_USERCOPY) + (addr & ~PAGE_MASK);
54
53 n = (*op)(addr, len, arg); 55 n = (*op)(addr, len, arg);
54 kunmap(page); 56
57 kunmap_atomic(page, KM_UML_USERCOPY);
55 58
56 return(n); 59 return(n);
57} 60}
@@ -77,7 +80,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr)
77 remain = len; 80 remain = len;
78 81
79 current->thread.fault_catcher = jmpbuf; 82 current->thread.fault_catcher = jmpbuf;
80 n = do_op(addr, size, is_write, op, arg); 83 n = do_op_one_page(addr, size, is_write, op, arg);
81 if(n != 0){ 84 if(n != 0){
82 *res = (n < 0 ? remain : 0); 85 *res = (n < 0 ? remain : 0);
83 goto out; 86 goto out;
@@ -91,7 +94,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr)
91 } 94 }
92 95
93 while(addr < ((addr + remain) & PAGE_MASK)){ 96 while(addr < ((addr + remain) & PAGE_MASK)){
94 n = do_op(addr, PAGE_SIZE, is_write, op, arg); 97 n = do_op_one_page(addr, PAGE_SIZE, is_write, op, arg);
95 if(n != 0){ 98 if(n != 0){
96 *res = (n < 0 ? remain : 0); 99 *res = (n < 0 ? remain : 0);
97 goto out; 100 goto out;
@@ -105,7 +108,7 @@ static void do_buffer_op(void *jmpbuf, void *arg_ptr)
105 goto out; 108 goto out;
106 } 109 }
107 110
108 n = do_op(addr, remain, is_write, op, arg); 111 n = do_op_one_page(addr, remain, is_write, op, arg);
109 if(n != 0) 112 if(n != 0)
110 *res = (n < 0 ? remain : 0); 113 *res = (n < 0 ? remain : 0);
111 else *res = 0; 114 else *res = 0;
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c
index 820fa3615a3..d7e044b5e5e 100644
--- a/arch/um/kernel/time_kern.c
+++ b/arch/um/kernel/time_kern.c
@@ -195,7 +195,7 @@ int __init timer_init(void)
195 int err; 195 int err;
196 196
197 user_time_init(); 197 user_time_init();
198 err = request_irq(TIMER_IRQ, um_timer, SA_INTERRUPT, "timer", NULL); 198 err = request_irq(TIMER_IRQ, um_timer, IRQF_DISABLED, "timer", NULL);
199 if(err != 0) 199 if(err != 0)
200 printk(KERN_ERR "timer_init : request_irq failed - " 200 printk(KERN_ERR "timer_init : request_irq failed - "
201 "errno = %d\n", -err); 201 "errno = %d\n", -err);
diff --git a/arch/um/kernel/vmlinux.lds.S b/arch/um/kernel/vmlinux.lds.S
index 0a7d50ff9a4..72acdce205e 100644
--- a/arch/um/kernel/vmlinux.lds.S
+++ b/arch/um/kernel/vmlinux.lds.S
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2/* in case the preprocessor is a 32bit one */ 1/* in case the preprocessor is a 32bit one */
3#undef i386 2#undef i386
4#ifdef CONFIG_LD_SCRIPT_STATIC 3#ifdef CONFIG_LD_SCRIPT_STATIC
diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index 362db059fe3..48092b95c8a 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -67,32 +67,53 @@ err:
67 return err; 67 return err;
68} 68}
69 69
70static int actually_do_remove(char *dir) 70/*
71 * Unlinks the files contained in @dir and then removes @dir.
72 * Doesn't handle directory trees, so it's not like rm -rf, but almost such. We
73 * ignore ENOENT errors for anything (they happen, strangely enough - possibly due
74 * to races between multiple dying UML threads).
75 */
76static int remove_files_and_dir(char *dir)
71{ 77{
72 DIR *directory; 78 DIR *directory;
73 struct dirent *ent; 79 struct dirent *ent;
74 int len; 80 int len;
75 char file[256]; 81 char file[256];
82 int ret;
76 83
77 directory = opendir(dir); 84 directory = opendir(dir);
78 if(directory == NULL) 85 if (directory == NULL) {
79 return -errno; 86 if (errno != ENOENT)
87 return -errno;
88 else
89 return 0;
90 }
80 91
81 while((ent = readdir(directory)) != NULL){ 92 while ((ent = readdir(directory)) != NULL) {
82 if(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")) 93 if (!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, ".."))
83 continue; 94 continue;
84 len = strlen(dir) + sizeof("/") + strlen(ent->d_name) + 1; 95 len = strlen(dir) + sizeof("/") + strlen(ent->d_name) + 1;
85 if(len > sizeof(file)) 96 if (len > sizeof(file)) {
86 return -E2BIG; 97 ret = -E2BIG;
98 goto out;
99 }
87 100
88 sprintf(file, "%s/%s", dir, ent->d_name); 101 sprintf(file, "%s/%s", dir, ent->d_name);
89 if(unlink(file) < 0) 102 if (unlink(file) < 0 && errno != ENOENT) {
90 return -errno; 103 ret = -errno;
104 goto out;
105 }
91 } 106 }
92 if(rmdir(dir) < 0)
93 return -errno;
94 107
95 return 0; 108 if (rmdir(dir) < 0 && errno != ENOENT) {
109 ret = -errno;
110 goto out;
111 }
112
113 ret = 0;
114out:
115 closedir(directory);
116 return ret;
96} 117}
97 118
98/* This says that there isn't already a user of the specified directory even if 119/* This says that there isn't already a user of the specified directory even if
@@ -103,9 +124,10 @@ static int actually_do_remove(char *dir)
103 * something other than UML sticking stuff in the directory 124 * something other than UML sticking stuff in the directory
104 * this boot racing with a shutdown of the other UML 125 * this boot racing with a shutdown of the other UML
105 * In any of these cases, the directory isn't useful for anything else. 126 * In any of these cases, the directory isn't useful for anything else.
127 *
128 * Boolean return: 1 if in use, 0 otherwise.
106 */ 129 */
107 130static inline int is_umdir_used(char *dir)
108static int not_dead_yet(char *dir)
109{ 131{
110 char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; 132 char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")];
111 char pid[sizeof("nnnnn\0")], *end; 133 char pid[sizeof("nnnnn\0")], *end;
@@ -113,7 +135,7 @@ static int not_dead_yet(char *dir)
113 135
114 n = snprintf(file, sizeof(file), "%s/pid", dir); 136 n = snprintf(file, sizeof(file), "%s/pid", dir);
115 if(n >= sizeof(file)){ 137 if(n >= sizeof(file)){
116 printk("not_dead_yet - pid filename too long\n"); 138 printk("is_umdir_used - pid filename too long\n");
117 err = -E2BIG; 139 err = -E2BIG;
118 goto out; 140 goto out;
119 } 141 }
@@ -123,7 +145,7 @@ static int not_dead_yet(char *dir)
123 if(fd < 0) { 145 if(fd < 0) {
124 fd = -errno; 146 fd = -errno;
125 if(fd != -ENOENT){ 147 if(fd != -ENOENT){
126 printk("not_dead_yet : couldn't open pid file '%s', " 148 printk("is_umdir_used : couldn't open pid file '%s', "
127 "err = %d\n", file, -fd); 149 "err = %d\n", file, -fd);
128 } 150 }
129 goto out; 151 goto out;
@@ -132,18 +154,18 @@ static int not_dead_yet(char *dir)
132 err = 0; 154 err = 0;
133 n = read(fd, pid, sizeof(pid)); 155 n = read(fd, pid, sizeof(pid));
134 if(n < 0){ 156 if(n < 0){
135 printk("not_dead_yet : couldn't read pid file '%s', " 157 printk("is_umdir_used : couldn't read pid file '%s', "
136 "err = %d\n", file, errno); 158 "err = %d\n", file, errno);
137 goto out_close; 159 goto out_close;
138 } else if(n == 0){ 160 } else if(n == 0){
139 printk("not_dead_yet : couldn't read pid file '%s', " 161 printk("is_umdir_used : couldn't read pid file '%s', "
140 "0-byte read\n", file); 162 "0-byte read\n", file);
141 goto out_close; 163 goto out_close;
142 } 164 }
143 165
144 p = strtoul(pid, &end, 0); 166 p = strtoul(pid, &end, 0);
145 if(end == pid){ 167 if(end == pid){
146 printk("not_dead_yet : couldn't parse pid file '%s', " 168 printk("is_umdir_used : couldn't parse pid file '%s', "
147 "errno = %d\n", file, errno); 169 "errno = %d\n", file, errno);
148 goto out_close; 170 goto out_close;
149 } 171 }
@@ -153,19 +175,32 @@ static int not_dead_yet(char *dir)
153 return 1; 175 return 1;
154 } 176 }
155 177
156 err = actually_do_remove(dir);
157 if(err)
158 printk("not_dead_yet - actually_do_remove failed with "
159 "err = %d\n", err);
160
161 return err;
162
163out_close: 178out_close:
164 close(fd); 179 close(fd);
165out: 180out:
166 return 0; 181 return 0;
167} 182}
168 183
184/*
185 * Try to remove the directory @dir unless it's in use.
186 * Precondition: @dir exists.
187 * Returns 0 for success, < 0 for failure in removal or if the directory is in
188 * use.
189 */
190static int umdir_take_if_dead(char *dir)
191{
192 int ret;
193 if (is_umdir_used(dir))
194 return -EEXIST;
195
196 ret = remove_files_and_dir(dir);
197 if (ret) {
198 printk("is_umdir_used - remove_files_and_dir failed with "
199 "err = %d\n", ret);
200 }
201 return ret;
202}
203
169static void __init create_pid_file(void) 204static void __init create_pid_file(void)
170{ 205{
171 char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")]; 206 char file[strlen(uml_dir) + UMID_LEN + sizeof("/pid\0")];
@@ -244,11 +279,7 @@ int __init make_umid(void)
244 if(err != -EEXIST) 279 if(err != -EEXIST)
245 goto err; 280 goto err;
246 281
247 /* 1 -> this umid is already in use 282 if (umdir_take_if_dead(tmp) < 0)
248 * < 0 -> we couldn't remove the umid directory
249 * In either case, we can't use this umid, so return -EEXIST.
250 */
251 if(not_dead_yet(tmp) != 0)
252 goto err; 283 goto err;
253 284
254 err = mkdir(tmp, 0777); 285 err = mkdir(tmp, 0777);
@@ -344,9 +375,9 @@ static void remove_umid_dir(void)
344 char dir[strlen(uml_dir) + UMID_LEN + 1], err; 375 char dir[strlen(uml_dir) + UMID_LEN + 1], err;
345 376
346 sprintf(dir, "%s%s", uml_dir, umid); 377 sprintf(dir, "%s%s", uml_dir, umid);
347 err = actually_do_remove(dir); 378 err = remove_files_and_dir(dir);
348 if(err) 379 if(err)
349 printf("remove_umid_dir - actually_do_remove failed with " 380 printf("remove_umid_dir - remove_files_and_dir failed with "
350 "err = %d\n", err); 381 "err = %d\n", err);
351} 382}
352 383
diff --git a/arch/um/sys-i386/checksum.S b/arch/um/sys-i386/checksum.S
index d98b2fff3d0..62c7e564f22 100644
--- a/arch/um/sys-i386/checksum.S
+++ b/arch/um/sys-i386/checksum.S
@@ -25,7 +25,6 @@
25 * 2 of the License, or (at your option) any later version. 25 * 2 of the License, or (at your option) any later version.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <asm/errno.h> 28#include <asm/errno.h>
30 29
31/* 30/*
diff --git a/arch/um/sys-i386/ptrace.c b/arch/um/sys-i386/ptrace.c
index 6028bc7cc01..28bf0115032 100644
--- a/arch/um/sys-i386/ptrace.c
+++ b/arch/um/sys-i386/ptrace.c
@@ -3,7 +3,6 @@
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/compiler.h> 6#include <linux/compiler.h>
8#include "linux/sched.h" 7#include "linux/sched.h"
9#include "linux/mm.h" 8#include "linux/mm.h"
diff --git a/arch/um/sys-ppc/misc.S b/arch/um/sys-ppc/misc.S
index f0c971db47e..1364b7da578 100644
--- a/arch/um/sys-ppc/misc.S
+++ b/arch/um/sys-ppc/misc.S
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <asm/processor.h> 18#include <asm/processor.h>
20#include "ppc_asm.h" 19#include "ppc_asm.h"
21 20
diff --git a/arch/um/sys-x86_64/syscall_table.c b/arch/um/sys-x86_64/syscall_table.c
index 3c4318165de..9e9ad72c2ba 100644
--- a/arch/um/sys-x86_64/syscall_table.c
+++ b/arch/um/sys-x86_64/syscall_table.c
@@ -4,7 +4,6 @@
4#include <linux/linkage.h> 4#include <linux/linkage.h>
5#include <linux/sys.h> 5#include <linux/sys.h>
6#include <linux/cache.h> 6#include <linux/cache.h>
7#include <linux/config.h>
8 7
9#define __NO_STUBS 8#define __NO_STUBS
10 9
diff --git a/arch/v850/kernel/anna.c b/arch/v850/kernel/anna.c
index d0502e14243..40892d3e3c2 100644
--- a/arch/v850/kernel/anna.c
+++ b/arch/v850/kernel/anna.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/v850/kernel/as85ep1.c b/arch/v850/kernel/as85ep1.c
index d78c5e4ea9b..5352f8a5aa0 100644
--- a/arch/v850/kernel/as85ep1.c
+++ b/arch/v850/kernel/as85ep1.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/v850/kernel/fpga85e2c.c b/arch/v850/kernel/fpga85e2c.c
index d8094519ad8..cb04a6954cc 100644
--- a/arch/v850/kernel/fpga85e2c.c
+++ b/arch/v850/kernel/fpga85e2c.c
@@ -12,7 +12,6 @@
12 * Written by Miles Bader <miles@gnu.org> 12 * Written by Miles Bader <miles@gnu.org>
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/v850/kernel/gbus_int.c b/arch/v850/kernel/gbus_int.c
index 92918b8d89e..25d636e79e6 100644
--- a/arch/v850/kernel/gbus_int.c
+++ b/arch/v850/kernel/gbus_int.c
@@ -154,7 +154,7 @@ static unsigned gbus_int_startup_irq (unsigned irq)
154 /* First enable the CPU interrupt. */ 154 /* First enable the CPU interrupt. */
155 int rval = 155 int rval =
156 request_irq (IRQ_GINT(gint), gbus_int_handle_irq, 156 request_irq (IRQ_GINT(gint), gbus_int_handle_irq,
157 SA_INTERRUPT, 157 IRQF_DISABLED,
158 "gbus_int_handler", 158 "gbus_int_handler",
159 &gint_num_active_irqs[gint]); 159 &gint_num_active_irqs[gint]);
160 if (rval != 0) 160 if (rval != 0)
diff --git a/arch/v850/kernel/ma.c b/arch/v850/kernel/ma.c
index b3dfbc5d2f4..2aa8ab0f7ed 100644
--- a/arch/v850/kernel/ma.c
+++ b/arch/v850/kernel/ma.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
diff --git a/arch/v850/kernel/me2.c b/arch/v850/kernel/me2.c
index 6527c218f91..14b0c8858aa 100644
--- a/arch/v850/kernel/me2.c
+++ b/arch/v850/kernel/me2.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
diff --git a/arch/v850/kernel/process.c b/arch/v850/kernel/process.c
index 57218c76925..c4f844c86e5 100644
--- a/arch/v850/kernel/process.c
+++ b/arch/v850/kernel/process.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/arch/v850/kernel/rte_cb.c b/arch/v850/kernel/rte_cb.c
index 0c794b9e0f9..0f7f6cd705a 100644
--- a/arch/v850/kernel/rte_cb.c
+++ b/arch/v850/kernel/rte_cb.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/irq.h> 15#include <linux/irq.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
diff --git a/arch/v850/kernel/rte_cb_leds.c b/arch/v850/kernel/rte_cb_leds.c
index b662ad83894..f654088b276 100644
--- a/arch/v850/kernel/rte_cb_leds.c
+++ b/arch/v850/kernel/rte_cb_leds.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/spinlock.h> 15#include <linux/spinlock.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
diff --git a/arch/v850/kernel/rte_ma1_cb.c b/arch/v850/kernel/rte_ma1_cb.c
index 3873e276392..9a716f94642 100644
--- a/arch/v850/kernel/rte_ma1_cb.c
+++ b/arch/v850/kernel/rte_ma1_cb.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/bootmem.h> 16#include <linux/bootmem.h>
diff --git a/arch/v850/kernel/rte_mb_a_pci.c b/arch/v850/kernel/rte_mb_a_pci.c
index 3a7c5c9c3ac..f36b778f143 100644
--- a/arch/v850/kernel/rte_mb_a_pci.c
+++ b/arch/v850/kernel/rte_mb_a_pci.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/v850/kernel/rte_me2_cb.c b/arch/v850/kernel/rte_me2_cb.c
index faaf3d95e6c..3be355a029e 100644
--- a/arch/v850/kernel/rte_me2_cb.c
+++ b/arch/v850/kernel/rte_me2_cb.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/bootmem.h> 16#include <linux/bootmem.h>
@@ -264,7 +263,7 @@ static unsigned cb_pic_startup_irq (unsigned irq)
264 263
265 if (cb_pic_active_irqs == 0) { 264 if (cb_pic_active_irqs == 0) {
266 rval = request_irq (IRQ_CB_PIC, cb_pic_handle_irq, 265 rval = request_irq (IRQ_CB_PIC, cb_pic_handle_irq,
267 SA_INTERRUPT, "cb_pic_handler", 0); 266 IRQF_DISABLED, "cb_pic_handler", 0);
268 if (rval != 0) 267 if (rval != 0)
269 return rval; 268 return rval;
270 } 269 }
diff --git a/arch/v850/kernel/rte_nb85e_cb.c b/arch/v850/kernel/rte_nb85e_cb.c
index 990b20bffe4..b4a045da5d7 100644
--- a/arch/v850/kernel/rte_nb85e_cb.c
+++ b/arch/v850/kernel/rte_nb85e_cb.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
diff --git a/arch/v850/kernel/sim.c b/arch/v850/kernel/sim.c
index 17049aaa8f1..467b4aa0acd 100644
--- a/arch/v850/kernel/sim.c
+++ b/arch/v850/kernel/sim.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/arch/v850/kernel/sim85e2.c b/arch/v850/kernel/sim85e2.c
index 9111613fb53..566dde5e607 100644
--- a/arch/v850/kernel/sim85e2.c
+++ b/arch/v850/kernel/sim85e2.c
@@ -12,7 +12,6 @@
12 * Written by Miles Bader <miles@gnu.org> 12 * Written by Miles Bader <miles@gnu.org>
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/arch/v850/kernel/syscalls.c b/arch/v850/kernel/syscalls.c
index 9224cb65f6e..2ec0700fc46 100644
--- a/arch/v850/kernel/syscalls.c
+++ b/arch/v850/kernel/syscalls.c
@@ -15,7 +15,6 @@
15 * and Paul Mackerras (paulus@cs.anu.edu.au). 15 * and Paul Mackerras (paulus@cs.anu.edu.au).
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
21#include <linux/smp.h> 20#include <linux/smp.h>
diff --git a/arch/v850/kernel/teg.c b/arch/v850/kernel/teg.c
index 495cf8f37bc..290d5066501 100644
--- a/arch/v850/kernel/teg.c
+++ b/arch/v850/kernel/teg.c
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
diff --git a/arch/v850/kernel/time.c b/arch/v850/kernel/time.c
index c1e85c2aef6..a0b46695f18 100644
--- a/arch/v850/kernel/time.c
+++ b/arch/v850/kernel/time.c
@@ -177,7 +177,7 @@ EXPORT_SYMBOL(do_settimeofday);
177static int timer_dev_id; 177static int timer_dev_id;
178static struct irqaction timer_irqaction = { 178static struct irqaction timer_irqaction = {
179 timer_interrupt, 179 timer_interrupt,
180 SA_INTERRUPT, 180 IRQF_DISABLED,
181 CPU_MASK_NONE, 181 CPU_MASK_NONE,
182 "timer", 182 "timer",
183 &timer_dev_id, 183 &timer_dev_id,
diff --git a/arch/v850/kernel/v850_ksyms.c b/arch/v850/kernel/v850_ksyms.c
index 6bcfcfe8838..c03ad6ed61c 100644
--- a/arch/v850/kernel/v850_ksyms.c
+++ b/arch/v850/kernel/v850_ksyms.c
@@ -7,7 +7,6 @@
7#include <linux/elfcore.h> 7#include <linux/elfcore.h>
8#include <linux/in6.h> 8#include <linux/in6.h>
9#include <linux/interrupt.h> 9#include <linux/interrupt.h>
10#include <linux/config.h>
11 10
12#include <asm/pgalloc.h> 11#include <asm/pgalloc.h>
13#include <asm/irq.h> 12#include <asm/irq.h>
diff --git a/arch/v850/kernel/vmlinux.lds.S b/arch/v850/kernel/vmlinux.lds.S
index 5b2ffcc6e2b..63399219cd9 100644
--- a/arch/v850/kernel/vmlinux.lds.S
+++ b/arch/v850/kernel/vmlinux.lds.S
@@ -11,7 +11,6 @@
11 * Written by Miles Bader <miles@gnu.org> 11 * Written by Miles Bader <miles@gnu.org>
12 */ 12 */
13 13
14#include <linux/config.h>
15 14
16#define VMLINUX_SYMBOL(_sym_) _##_sym_ 15#define VMLINUX_SYMBOL(_sym_) _##_sym_
17#include <asm-generic/vmlinux.lds.h> 16#include <asm-generic/vmlinux.lds.h>
diff --git a/arch/x86_64/boot/setup.S b/arch/x86_64/boot/setup.S
index 12ea0b6c52e..7de8b8fd168 100644
--- a/arch/x86_64/boot/setup.S
+++ b/arch/x86_64/boot/setup.S
@@ -45,7 +45,6 @@
45 * Added long mode checking and SSE force. March 2003, Andi Kleen. 45 * Added long mode checking and SSE force. March 2003, Andi Kleen.
46 */ 46 */
47 47
48#include <linux/config.h>
49#include <asm/segment.h> 48#include <asm/segment.h>
50#include <linux/version.h> 49#include <linux/version.h>
51#include <linux/compile.h> 50#include <linux/compile.h>
diff --git a/arch/x86_64/ia32/Makefile b/arch/x86_64/ia32/Makefile
index e9263b4975e..62bc5f56da9 100644
--- a/arch/x86_64/ia32/Makefile
+++ b/arch/x86_64/ia32/Makefile
@@ -11,6 +11,9 @@ obj-$(CONFIG_IA32_EMULATION) += $(sysv-y)
11 11
12obj-$(CONFIG_IA32_AOUT) += ia32_aout.o 12obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
13 13
14audit-class-$(CONFIG_AUDIT) := audit.o
15obj-$(CONFIG_IA32_EMULATION) += $(audit-class-y)
16
14$(obj)/syscall32_syscall.o: \ 17$(obj)/syscall32_syscall.o: \
15 $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so) 18 $(foreach F,sysenter syscall,$(obj)/vsyscall-$F.so)
16 19
diff --git a/arch/x86_64/ia32/audit.c b/arch/x86_64/ia32/audit.c
new file mode 100644
index 00000000000..ab94f2e58cd
--- /dev/null
+++ b/arch/x86_64/ia32/audit.c
@@ -0,0 +1,11 @@
1#include <asm-i386/unistd.h>
2
3unsigned ia32_dir_class[] = {
4#include <asm-generic/audit_dir_write.h>
5~0U
6};
7
8unsigned ia32_chattr_class[] = {
9#include <asm-generic/audit_change_attr.h>
10~0U
11};
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c
index dc88154c412..9c130993380 100644
--- a/arch/x86_64/ia32/sys_ia32.c
+++ b/arch/x86_64/ia32/sys_ia32.c
@@ -20,7 +20,6 @@
20 * This should be fixed. 20 * This should be fixed.
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/fs.h> 25#include <linux/fs.h>
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile
index aeb9c560be8..819e84ec5b6 100644
--- a/arch/x86_64/kernel/Makefile
+++ b/arch/x86_64/kernel/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_KPROBES) += kprobes.o
35obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o 35obj-$(CONFIG_X86_PM_TIMER) += pmtimer.o
36obj-$(CONFIG_X86_VSMP) += vsmp.o 36obj-$(CONFIG_X86_VSMP) += vsmp.o
37obj-$(CONFIG_K8_NB) += k8.o 37obj-$(CONFIG_K8_NB) += k8.o
38obj-$(CONFIG_AUDIT) += audit.o
38 39
39obj-$(CONFIG_MODULES) += module.o 40obj-$(CONFIG_MODULES) += module.o
40 41
diff --git a/arch/x86_64/kernel/acpi/sleep.c b/arch/x86_64/kernel/acpi/sleep.c
index 091bc79c888..5ebf62c7a3d 100644
--- a/arch/x86_64/kernel/acpi/sleep.c
+++ b/arch/x86_64/kernel/acpi/sleep.c
@@ -26,7 +26,6 @@
26 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 26 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/types.h> 31#include <linux/types.h>
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c
index a195ef06ec5..58af8e73738 100644
--- a/arch/x86_64/kernel/aperture.c
+++ b/arch/x86_64/kernel/aperture.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * Copyright 2002 Andi Kleen, SuSE Labs. 10 * Copyright 2002 Andi Kleen, SuSE Labs.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/arch/x86_64/kernel/apic.c b/arch/x86_64/kernel/apic.c
index b2ead91df21..2b8cef037a6 100644
--- a/arch/x86_64/kernel/apic.c
+++ b/arch/x86_64/kernel/apic.c
@@ -14,7 +14,6 @@
14 * Mikael Pettersson : PM converted to driver model. 14 * Mikael Pettersson : PM converted to driver model.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19 18
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/arch/x86_64/kernel/audit.c b/arch/x86_64/kernel/audit.c
new file mode 100644
index 00000000000..a067aa468a8
--- /dev/null
+++ b/arch/x86_64/kernel/audit.c
@@ -0,0 +1,29 @@
1#include <linux/init.h>
2#include <linux/types.h>
3#include <linux/audit.h>
4#include <asm/unistd.h>
5
6static unsigned dir_class[] = {
7#include <asm-generic/audit_dir_write.h>
8~0U
9};
10
11static unsigned chattr_class[] = {
12#include <asm-generic/audit_change_attr.h>
13~0U
14};
15
16static int __init audit_classes_init(void)
17{
18#ifdef CONFIG_IA32_EMULATION
19 extern __u32 ia32_dir_class[];
20 extern __u32 ia32_chattr_class[];
21 audit_register_class(AUDIT_CLASS_DIR_WRITE_32, ia32_dir_class);
22 audit_register_class(AUDIT_CLASS_CHATTR_32, ia32_chattr_class);
23#endif
24 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
25 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
26 return 0;
27}
28
29__initcall(audit_classes_init);
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 9e94d834624..b8eee4c7888 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -8,7 +8,6 @@
8 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 8 * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
9 * 9 *
10 */ 10 */
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/arch/x86_64/kernel/entry.S b/arch/x86_64/kernel/entry.S
index 22cac4487b5..ed92c298360 100644
--- a/arch/x86_64/kernel/entry.S
+++ b/arch/x86_64/kernel/entry.S
@@ -28,7 +28,6 @@
28 */ 28 */
29 29
30#define ASSEMBLY 1 30#define ASSEMBLY 1
31#include <linux/config.h>
32#include <linux/linkage.h> 31#include <linux/linkage.h>
33#include <asm/segment.h> 32#include <asm/segment.h>
34#include <asm/smp.h> 33#include <asm/smp.h>
diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c
index 7a64ea18178..8e78a75d186 100644
--- a/arch/x86_64/kernel/genapic.c
+++ b/arch/x86_64/kernel/genapic.c
@@ -8,7 +8,6 @@
8 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and 8 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
9 * James Cleverdon. 9 * James Cleverdon.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/threads.h> 11#include <linux/threads.h>
13#include <linux/cpumask.h> 12#include <linux/cpumask.h>
14#include <linux/string.h> 13#include <linux/string.h>
diff --git a/arch/x86_64/kernel/genapic_cluster.c b/arch/x86_64/kernel/genapic_cluster.c
index 43fcf62fef0..3020917546d 100644
--- a/arch/x86_64/kernel/genapic_cluster.c
+++ b/arch/x86_64/kernel/genapic_cluster.c
@@ -9,7 +9,6 @@
9 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and 9 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
10 * James Cleverdon. 10 * James Cleverdon.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/threads.h> 12#include <linux/threads.h>
14#include <linux/cpumask.h> 13#include <linux/cpumask.h>
15#include <linux/string.h> 14#include <linux/string.h>
diff --git a/arch/x86_64/kernel/genapic_flat.c b/arch/x86_64/kernel/genapic_flat.c
index 21c7066e236..eb86d374813 100644
--- a/arch/x86_64/kernel/genapic_flat.c
+++ b/arch/x86_64/kernel/genapic_flat.c
@@ -8,7 +8,6 @@
8 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and 8 * Martin Bligh, Andi Kleen, James Bottomley, John Stultz, and
9 * James Cleverdon. 9 * James Cleverdon.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/threads.h> 11#include <linux/threads.h>
13#include <linux/cpumask.h> 12#include <linux/cpumask.h>
14#include <linux/string.h> 13#include <linux/string.h>
diff --git a/arch/x86_64/kernel/i387.c b/arch/x86_64/kernel/i387.c
index 44ddb1ec808..3aa1e9bb781 100644
--- a/arch/x86_64/kernel/i387.c
+++ b/arch/x86_64/kernel/i387.c
@@ -14,7 +14,6 @@
14 * the 64bit user space sees a FXSAVE frame directly. 14 * the 64bit user space sees a FXSAVE frame directly.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <asm/processor.h> 19#include <asm/processor.h>
diff --git a/arch/x86_64/kernel/i8259.c b/arch/x86_64/kernel/i8259.c
index 3dd1659427d..0434b1f8e3d 100644
--- a/arch/x86_64/kernel/i8259.c
+++ b/arch/x86_64/kernel/i8259.c
@@ -1,5 +1,4 @@
1#include <linux/linkage.h> 1#include <linux/linkage.h>
2#include <linux/config.h>
3#include <linux/errno.h> 2#include <linux/errno.h>
4#include <linux/signal.h> 3#include <linux/signal.h>
5#include <linux/sched.h> 4#include <linux/sched.h>
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c
index 401b687fef2..924a4a33295 100644
--- a/arch/x86_64/kernel/io_apic.c
+++ b/arch/x86_64/kernel/io_apic.c
@@ -25,7 +25,6 @@
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/sched.h> 27#include <linux/sched.h>
28#include <linux/config.h>
29#include <linux/smp_lock.h> 28#include <linux/smp_lock.h>
30#include <linux/mc146818rtc.h> 29#include <linux/mc146818rtc.h>
31#include <linux/acpi.h> 30#include <linux/acpi.h>
diff --git a/arch/x86_64/kernel/kprobes.c b/arch/x86_64/kernel/kprobes.c
index fa1d19ca700..ffc73ac7248 100644
--- a/arch/x86_64/kernel/kprobes.c
+++ b/arch/x86_64/kernel/kprobes.c
@@ -31,7 +31,6 @@
31 * Added function return probes functionality 31 * Added function return probes functionality
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/kprobes.h> 34#include <linux/kprobes.h>
36#include <linux/ptrace.h> 35#include <linux/ptrace.h>
37#include <linux/string.h> 36#include <linux/string.h>
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c
index 083da7e606b..a1ab4197f8a 100644
--- a/arch/x86_64/kernel/mpparse.c
+++ b/arch/x86_64/kernel/mpparse.c
@@ -16,7 +16,6 @@
16#include <linux/mm.h> 16#include <linux/mm.h>
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/delay.h> 18#include <linux/delay.h>
19#include <linux/config.h>
20#include <linux/bootmem.h> 19#include <linux/bootmem.h>
21#include <linux/smp_lock.h> 20#include <linux/smp_lock.h>
22#include <linux/kernel_stat.h> 21#include <linux/kernel_stat.h>
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 0ef9cf2bc45..476c1472fc0 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -12,7 +12,6 @@
12 * Mikael Pettersson : PM converted to driver model. Disable/enable API. 12 * Mikael Pettersson : PM converted to driver model. Disable/enable API.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/delay.h> 16#include <linux/delay.h>
18#include <linux/interrupt.h> 17#include <linux/interrupt.h>
diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 4ca674d16b0..6d3e61baf7a 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -10,7 +10,6 @@
10 * Copyright 2002 Andi Kleen, SuSE Labs. 10 * Copyright 2002 Andi Kleen, SuSE Labs.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/ctype.h> 14#include <linux/ctype.h>
16#include <linux/agp_backend.h> 15#include <linux/agp_backend.h>
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index 1129918ede8..0925518b58d 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -24,7 +24,6 @@
24#include <linux/tty.h> 24#include <linux/tty.h>
25#include <linux/ioport.h> 25#include <linux/ioport.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/config.h>
28#include <linux/init.h> 27#include <linux/init.h>
29#include <linux/initrd.h> 28#include <linux/initrd.h>
30#include <linux/highmem.h> 29#include <linux/highmem.h>
diff --git a/arch/x86_64/kernel/setup64.c b/arch/x86_64/kernel/setup64.c
index f5934cb4a2b..6fe58a634b5 100644
--- a/arch/x86_64/kernel/setup64.c
+++ b/arch/x86_64/kernel/setup64.c
@@ -4,7 +4,6 @@
4 * Copyright 2001, 2002, 2003 SuSE Labs / Andi Kleen. 4 * Copyright 2001, 2002, 2003 SuSE Labs / Andi Kleen.
5 * See setup.c for older changelog. 5 * See setup.c for older changelog.
6 */ 6 */
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c
index 540c0ccbccc..9705a6a384f 100644
--- a/arch/x86_64/kernel/smpboot.c
+++ b/arch/x86_64/kernel/smpboot.c
@@ -38,7 +38,6 @@
38 */ 38 */
39 39
40 40
41#include <linux/config.h>
42#include <linux/init.h> 41#include <linux/init.h>
43 42
44#include <linux/mm.h> 43#include <linux/mm.h>
diff --git a/arch/x86_64/kernel/suspend.c b/arch/x86_64/kernel/suspend.c
index ecbd34c1093..91f7e678bae 100644
--- a/arch/x86_64/kernel/suspend.c
+++ b/arch/x86_64/kernel/suspend.c
@@ -7,7 +7,6 @@
7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org> 7 * Copyright (c) 2001 Patrick Mochel <mochel@osdl.org>
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/smp.h> 10#include <linux/smp.h>
12#include <linux/suspend.h> 11#include <linux/suspend.h>
13#include <asm/proto.h> 12#include <asm/proto.h>
diff --git a/arch/x86_64/kernel/syscall.c b/arch/x86_64/kernel/syscall.c
index 7c176b3edde..213fd6ab789 100644
--- a/arch/x86_64/kernel/syscall.c
+++ b/arch/x86_64/kernel/syscall.c
@@ -3,7 +3,6 @@
3#include <linux/linkage.h> 3#include <linux/linkage.h>
4#include <linux/sys.h> 4#include <linux/sys.h>
5#include <linux/cache.h> 5#include <linux/cache.h>
6#include <linux/config.h>
7 6
8#define __NO_STUBS 7#define __NO_STUBS
9 8
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index ebbee6f59ff..b9ff75992c1 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -889,7 +889,7 @@ int __init time_setup(char *str)
889} 889}
890 890
891static struct irqaction irq0 = { 891static struct irqaction irq0 = {
892 timer_interrupt, SA_INTERRUPT, CPU_MASK_NONE, "timer", NULL, NULL 892 timer_interrupt, IRQF_DISABLED, CPU_MASK_NONE, "timer", NULL, NULL
893}; 893};
894 894
895void __init time_init(void) 895void __init time_init(void)
diff --git a/arch/x86_64/kernel/traps.c b/arch/x86_64/kernel/traps.c
index 3d11a2fe45b..5a5311d3de0 100644
--- a/arch/x86_64/kernel/traps.c
+++ b/arch/x86_64/kernel/traps.c
@@ -12,7 +12,6 @@
12 * 'Traps.c' handles hardware traps and faults after we have saved some 12 * 'Traps.c' handles hardware traps and faults after we have saved some
13 * state in 'entry.S'. 13 * state in 'entry.S'.
14 */ 14 */
15#include <linux/config.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/string.h> 17#include <linux/string.h>
diff --git a/arch/x86_64/kernel/vmlinux.lds.S b/arch/x86_64/kernel/vmlinux.lds.S
index 1c6a5f32291..7c4de31471d 100644
--- a/arch/x86_64/kernel/vmlinux.lds.S
+++ b/arch/x86_64/kernel/vmlinux.lds.S
@@ -6,7 +6,6 @@
6 6
7#include <asm-generic/vmlinux.lds.h> 7#include <asm-generic/vmlinux.lds.h>
8#include <asm/page.h> 8#include <asm/page.h>
9#include <linux/config.h>
10 9
11#undef i386 /* in case the preprocessor is a 32bit one */ 10#undef i386 /* in case the preprocessor is a 32bit one */
12 11
diff --git a/arch/x86_64/mm/extable.c b/arch/x86_64/mm/extable.c
index 2d78f9fb403..79ac6e7100a 100644
--- a/arch/x86_64/mm/extable.c
+++ b/arch/x86_64/mm/extable.c
@@ -2,7 +2,6 @@
2 * linux/arch/x86_64/mm/extable.c 2 * linux/arch/x86_64/mm/extable.c
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/spinlock.h> 6#include <linux/spinlock.h>
8#include <linux/init.h> 7#include <linux/init.h>
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index 08dc696f54e..5afcf6eb00f 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs. 5 * Copyright (C) 2001,2002 Andi Kleen, SuSE Labs.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/signal.h> 8#include <linux/signal.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
@@ -418,7 +417,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
418 /* When running in the kernel we expect faults to occur only to 417 /* When running in the kernel we expect faults to occur only to
419 * addresses in user space. All other faults represent errors in the 418 * addresses in user space. All other faults represent errors in the
420 * kernel and should generate an OOPS. Unfortunatly, in the case of an 419 * kernel and should generate an OOPS. Unfortunatly, in the case of an
421 * erroneous fault occuring in a code path which already holds mmap_sem 420 * erroneous fault occurring in a code path which already holds mmap_sem
422 * we will deadlock attempting to validate the fault against the 421 * we will deadlock attempting to validate the fault against the
423 * address space. Luckily the kernel only validly references user 422 * address space. Luckily the kernel only validly references user
424 * space from well defined areas of code, which are listed in the 423 * space from well defined areas of code, which are listed in the
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c
index 95bd232ff0c..d14fb2dfbfc 100644
--- a/arch/x86_64/mm/init.c
+++ b/arch/x86_64/mm/init.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 2002,2003 Andi Kleen <ak@suse.de> 6 * Copyright (C) 2002,2003 Andi Kleen <ak@suse.de>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/signal.h> 9#include <linux/signal.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
@@ -679,16 +678,15 @@ void free_initmem(void)
679 678
680#ifdef CONFIG_DEBUG_RODATA 679#ifdef CONFIG_DEBUG_RODATA
681 680
682extern char __start_rodata, __end_rodata;
683void mark_rodata_ro(void) 681void mark_rodata_ro(void)
684{ 682{
685 unsigned long addr = (unsigned long)&__start_rodata; 683 unsigned long addr = (unsigned long)__start_rodata;
686 684
687 for (; addr < (unsigned long)&__end_rodata; addr += PAGE_SIZE) 685 for (; addr < (unsigned long)__end_rodata; addr += PAGE_SIZE)
688 change_page_attr_addr(addr, 1, PAGE_KERNEL_RO); 686 change_page_attr_addr(addr, 1, PAGE_KERNEL_RO);
689 687
690 printk ("Write protecting the kernel read-only data: %luk\n", 688 printk ("Write protecting the kernel read-only data: %luk\n",
691 (&__end_rodata - &__start_rodata) >> 10); 689 (__end_rodata - __start_rodata) >> 10);
692 690
693 /* 691 /*
694 * change_page_attr_addr() requires a global_flush_tlb() call after it. 692 * change_page_attr_addr() requires a global_flush_tlb() call after it.
diff --git a/arch/x86_64/mm/mmap.c b/arch/x86_64/mm/mmap.c
index 43e9b99bdf2..80bba0dc000 100644
--- a/arch/x86_64/mm/mmap.c
+++ b/arch/x86_64/mm/mmap.c
@@ -1,7 +1,6 @@
1/* Copyright 2005 Andi Kleen, SuSE Labs. 1/* Copyright 2005 Andi Kleen, SuSE Labs.
2 * Licensed under GPL, v.2 2 * Licensed under GPL, v.2
3 */ 3 */
4#include <linux/config.h>
5#include <linux/mm.h> 4#include <linux/mm.h>
6#include <linux/sched.h> 5#include <linux/sched.h>
7#include <linux/random.h> 6#include <linux/random.h>
diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
index 531ad21447b..2685b1f3671 100644
--- a/arch/x86_64/mm/pageattr.c
+++ b/arch/x86_64/mm/pageattr.c
@@ -3,7 +3,6 @@
3 * Thanks to Ben LaHaise for precious feedback. 3 * Thanks to Ben LaHaise for precious feedback.
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/mm.h> 6#include <linux/mm.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/highmem.h> 8#include <linux/highmem.h>
diff --git a/arch/xtensa/boot/boot-elf/bootstrap.S b/arch/xtensa/boot/boot-elf/bootstrap.S
index 7cba94abdab..f857fc760aa 100644
--- a/arch/xtensa/boot/boot-elf/bootstrap.S
+++ b/arch/xtensa/boot/boot-elf/bootstrap.S
@@ -2,7 +2,6 @@
2#include <xtensa/config/specreg.h> 2#include <xtensa/config/specreg.h>
3#include <xtensa/config/core.h> 3#include <xtensa/config/core.h>
4 4
5#include <linux/config.h>
6#include <asm/bootparam.h> 5#include <asm/bootparam.h>
7 6
8 7
diff --git a/arch/xtensa/kernel/coprocessor.S b/arch/xtensa/kernel/coprocessor.S
index 356192a4d39..cf5a93fb6a2 100644
--- a/arch/xtensa/kernel/coprocessor.S
+++ b/arch/xtensa/kernel/coprocessor.S
@@ -24,7 +24,6 @@
24 * assigned when the Xtensa processor is generated. 24 * assigned when the Xtensa processor is generated.
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/linkage.h> 27#include <linux/linkage.h>
29#include <asm/processor.h> 28#include <asm/processor.h>
30 29
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S
index 6e9b5225b8f..c07cb252299 100644
--- a/arch/xtensa/kernel/head.S
+++ b/arch/xtensa/kernel/head.S
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18#include <xtensa/cacheasm.h> 18#include <xtensa/cacheasm.h>
19#include <linux/config.h>
20#include <asm/processor.h> 19#include <asm/processor.h>
21#include <asm/page.h> 20#include <asm/page.h>
22 21
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index eda029fc897..8709f8249d0 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/pci.h> 21#include <linux/pci.h>
23#include <linux/delay.h> 22#include <linux/delay.h>
diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c
index a17930747f2..69675f21606 100644
--- a/arch/xtensa/kernel/platform.c
+++ b/arch/xtensa/kernel/platform.c
@@ -12,7 +12,6 @@
12 * Chris Zankel <chris@zankel.net> 12 * Chris Zankel <chris@zankel.net>
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/pci.h> 16#include <linux/pci.h>
18#include <linux/time.h> 17#include <linux/time.h>
diff --git a/arch/xtensa/kernel/process.c b/arch/xtensa/kernel/process.c
index 64a649eb883..a7c4178c2a8 100644
--- a/arch/xtensa/kernel/process.c
+++ b/arch/xtensa/kernel/process.c
@@ -16,7 +16,6 @@
16 * Kevin Chea 16 * Kevin Chea
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/errno.h> 19#include <linux/errno.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index 4cc85285a70..5064d938396 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -13,7 +13,6 @@
13 * Marc Gauthier<marc@tensilica.com> <marc@alumni.uwaterloo.ca> 13 * Marc Gauthier<marc@tensilica.com> <marc@alumni.uwaterloo.ca>
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 513ed8d6776..edb29410d95 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -14,7 +14,6 @@
14 * Marc Gauthier<marc@tensilica.com> <marc@alumni.uwaterloo.ca> 14 * Marc Gauthier<marc@tensilica.com> <marc@alumni.uwaterloo.ca>
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/proc_fs.h> 19#include <linux/proc_fs.h>
diff --git a/arch/xtensa/kernel/syscalls.c b/arch/xtensa/kernel/syscalls.c
index f20c6494c51..4688ba2db84 100644
--- a/arch/xtensa/kernel/syscalls.c
+++ b/arch/xtensa/kernel/syscalls.c
@@ -18,7 +18,6 @@
18 18
19#define DEBUG 0 19#define DEBUG 0
20 20
21#include <linux/config.h>
22#include <linux/linkage.h> 21#include <linux/linkage.h>
23#include <linux/mm.h> 22#include <linux/mm.h>
24#include <linux/smp.h> 23#include <linux/smp.h>
diff --git a/arch/xtensa/kernel/time.c b/arch/xtensa/kernel/time.c
index fe14909f45e..412ab32de39 100644
--- a/arch/xtensa/kernel/time.c
+++ b/arch/xtensa/kernel/time.c
@@ -12,7 +12,6 @@
12 * Chris Zankel <chris@zankel.net> 12 * Chris Zankel <chris@zankel.net>
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/time.h> 16#include <linux/time.h>
18#include <linux/timex.h> 17#include <linux/timex.h>
@@ -53,7 +52,7 @@ unsigned long long sched_clock(void)
53static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs); 52static irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs);
54static struct irqaction timer_irqaction = { 53static struct irqaction timer_irqaction = {
55 .handler = timer_interrupt, 54 .handler = timer_interrupt,
56 .flags = SA_INTERRUPT, 55 .flags = IRQF_DISABLED,
57 .name = "timer", 56 .name = "timer",
58}; 57};
59 58
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index 5ed71dfc811..ab6cdbd5eb6 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -16,7 +16,6 @@
16 16
17#include <asm-generic/vmlinux.lds.h> 17#include <asm-generic/vmlinux.lds.h>
18 18
19#include <linux/config.h>
20#define _NOCLANGUAGE 19#define _NOCLANGUAGE
21#include <xtensa/config/core.h> 20#include <xtensa/config/core.h>
22#include <xtensa/config/system.h> 21#include <xtensa/config/system.h>
diff --git a/arch/xtensa/kernel/xtensa_ksyms.c b/arch/xtensa/kernel/xtensa_ksyms.c
index a15b6e3e72c..0b4cb93db5a 100644
--- a/arch/xtensa/kernel/xtensa_ksyms.c
+++ b/arch/xtensa/kernel/xtensa_ksyms.c
@@ -12,7 +12,6 @@
12 * Joe Taylor <joe@tensilica.com> 12 * Joe Taylor <joe@tensilica.com>
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/string.h> 16#include <linux/string.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c
index e1be4235f36..660ef058c14 100644
--- a/arch/xtensa/mm/init.c
+++ b/arch/xtensa/mm/init.c
@@ -15,7 +15,6 @@
15 * Kevin Chea 15 * Kevin Chea
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/signal.h> 19#include <linux/signal.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
diff --git a/arch/xtensa/platform-iss/console.c b/arch/xtensa/platform-iss/console.c
index 2a580efb58e..22d3c571a7b 100644
--- a/arch/xtensa/platform-iss/console.c
+++ b/arch/xtensa/platform-iss/console.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/console.h> 15#include <linux/console.h>
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c
index 0dc55cc8691..d96164e602f 100644
--- a/arch/xtensa/platform-iss/network.c
+++ b/arch/xtensa/platform-iss/network.c
@@ -16,7 +16,6 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/list.h> 19#include <linux/list.h>
21#include <linux/irq.h> 20#include <linux/irq.h>
22#include <linux/spinlock.h> 21#include <linux/spinlock.h>
diff --git a/arch/xtensa/platform-iss/setup.c b/arch/xtensa/platform-iss/setup.c
index 23790a5610e..c8a42b60c57 100644
--- a/arch/xtensa/platform-iss/setup.c
+++ b/arch/xtensa/platform-iss/setup.c
@@ -15,7 +15,6 @@
15 * option) any later version. 15 * option) any later version.
16 * 16 *
17 */ 17 */
18#include <linux/config.h>
19#include <linux/stddef.h> 18#include <linux/stddef.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/init.h> 20#include <linux/init.h>
diff --git a/block/as-iosched.c b/block/as-iosched.c
index 3af31ed49a9..5da56d48fbd 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -10,7 +10,6 @@
10#include <linux/blkdev.h> 10#include <linux/blkdev.h>
11#include <linux/elevator.h> 11#include <linux/elevator.h>
12#include <linux/bio.h> 12#include <linux/bio.h>
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
16#include <linux/init.h> 15#include <linux/init.h>
diff --git a/block/blktrace.c b/block/blktrace.c
index 36f3a172275..92925e7d9e6 100644
--- a/block/blktrace.c
+++ b/block/blktrace.c
@@ -15,7 +15,6 @@
15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 15 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 * 16 *
17 */ 17 */
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/blkdev.h> 19#include <linux/blkdev.h>
21#include <linux/blktrace_api.h> 20#include <linux/blktrace_api.h>
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index e25223e147a..102ebc2c5c3 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright (C) 2003 Jens Axboe <axboe@suse.de> 7 * Copyright (C) 2003 Jens Axboe <axboe@suse.de>
8 */ 8 */
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/blkdev.h> 10#include <linux/blkdev.h>
12#include <linux/elevator.h> 11#include <linux/elevator.h>
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 4469dd84623..c7ca9f0b649 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -8,7 +8,6 @@
8#include <linux/blkdev.h> 8#include <linux/blkdev.h>
9#include <linux/elevator.h> 9#include <linux/elevator.h>
10#include <linux/bio.h> 10#include <linux/bio.h>
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/block/elevator.c b/block/elevator.c
index d00b283f31d..bc7baeec0d1 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -27,7 +27,6 @@
27#include <linux/blkdev.h> 27#include <linux/blkdev.h>
28#include <linux/elevator.h> 28#include <linux/elevator.h>
29#include <linux/bio.h> 29#include <linux/bio.h>
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/slab.h> 31#include <linux/slab.h>
33#include <linux/init.h> 32#include <linux/init.h>
diff --git a/block/genhd.c b/block/genhd.c
index 8d7339511e5..25d1f42568c 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -2,7 +2,6 @@
2 * gendisk handling 2 * gendisk handling
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/fs.h> 6#include <linux/fs.h>
8#include <linux/genhd.h> 7#include <linux/genhd.h>
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index fb83547f563..5813d63c20a 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -10,7 +10,6 @@
10/* 10/*
11 * This handles all read/write requests to block devices 11 * This handles all read/write requests to block devices
12 */ 12 */
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/backing-dev.h> 15#include <linux/backing-dev.h>
diff --git a/drivers/acorn/block/mfmhd.c b/drivers/acorn/block/mfmhd.c
index ce074f6f336..3dd6b7bb5d3 100644
--- a/drivers/acorn/block/mfmhd.c
+++ b/drivers/acorn/block/mfmhd.c
@@ -99,7 +99,6 @@
99 */ 99 */
100 100
101#include <linux/module.h> 101#include <linux/module.h>
102#include <linux/config.h>
103#include <linux/sched.h> 102#include <linux/sched.h>
104#include <linux/fs.h> 103#include <linux/fs.h>
105#include <linux/interrupt.h> 104#include <linux/interrupt.h>
@@ -1279,7 +1278,7 @@ static int mfm_do_init(unsigned char irqmask)
1279 1278
1280 printk("mfm: detected %d hard drive%s\n", mfm_drives, 1279 printk("mfm: detected %d hard drive%s\n", mfm_drives,
1281 mfm_drives == 1 ? "" : "s"); 1280 mfm_drives == 1 ? "" : "s");
1282 ret = request_irq(mfm_irq, mfm_interrupt_handler, SA_INTERRUPT, "MFM harddisk", NULL); 1281 ret = request_irq(mfm_irq, mfm_interrupt_handler, IRQF_DISABLED, "MFM harddisk", NULL);
1283 if (ret) { 1282 if (ret) {
1284 printk("mfm: unable to get IRQ%d\n", mfm_irq); 1283 printk("mfm: unable to get IRQ%d\n", mfm_irq);
1285 goto out4; 1284 goto out4;
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 610d2cc02cf..bc2652d72fd 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -133,6 +133,13 @@ config ACPI_FAN
133 This driver adds support for ACPI fan devices, allowing user-mode 133 This driver adds support for ACPI fan devices, allowing user-mode
134 applications to perform basic fan control (on, off, status). 134 applications to perform basic fan control (on, off, status).
135 135
136config ACPI_DOCK
137 tristate "Dock"
138 depends on !ACPI_IBM_DOCK
139 default y
140 help
141 This driver adds support for ACPI controlled docking stations
142
136config ACPI_PROCESSOR 143config ACPI_PROCESSOR
137 tristate "Processor" 144 tristate "Processor"
138 default y 145 default y
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
index 5984b4f6715..f0a68ecf1e5 100644
--- a/drivers/acpi/Makefile
+++ b/drivers/acpi/Makefile
@@ -42,6 +42,7 @@ obj-$(CONFIG_ACPI_BATTERY) += battery.o
42obj-$(CONFIG_ACPI_BUTTON) += button.o 42obj-$(CONFIG_ACPI_BUTTON) += button.o
43obj-$(CONFIG_ACPI_EC) += ec.o 43obj-$(CONFIG_ACPI_EC) += ec.o
44obj-$(CONFIG_ACPI_FAN) += fan.o 44obj-$(CONFIG_ACPI_FAN) += fan.o
45obj-$(CONFIG_ACPI_DOCK) += dock.o
45obj-$(CONFIG_ACPI_VIDEO) += video.o 46obj-$(CONFIG_ACPI_VIDEO) += video.o
46obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o 47obj-$(CONFIG_ACPI_HOTKEY) += hotkey.o
47obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o 48obj-y += pci_root.o pci_link.o pci_irq.o pci_bind.o
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 7839b831df9..36ca365bcea 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -84,20 +84,18 @@ static int acpi_ac_get_state(struct acpi_ac *ac)
84{ 84{
85 acpi_status status = AE_OK; 85 acpi_status status = AE_OK;
86 86
87 ACPI_FUNCTION_TRACE("acpi_ac_get_state");
88 87
89 if (!ac) 88 if (!ac)
90 return_VALUE(-EINVAL); 89 return -EINVAL;
91 90
92 status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state); 91 status = acpi_evaluate_integer(ac->handle, "_PSR", NULL, &ac->state);
93 if (ACPI_FAILURE(status)) { 92 if (ACPI_FAILURE(status)) {
94 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 93 ACPI_EXCEPTION((AE_INFO, status, "Error reading AC Adapter state"));
95 "Error reading AC Adapter state\n"));
96 ac->state = ACPI_AC_STATUS_UNKNOWN; 94 ac->state = ACPI_AC_STATUS_UNKNOWN;
97 return_VALUE(-ENODEV); 95 return -ENODEV;
98 } 96 }
99 97
100 return_VALUE(0); 98 return 0;
101} 99}
102 100
103/* -------------------------------------------------------------------------- 101/* --------------------------------------------------------------------------
@@ -110,14 +108,13 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
110{ 108{
111 struct acpi_ac *ac = (struct acpi_ac *)seq->private; 109 struct acpi_ac *ac = (struct acpi_ac *)seq->private;
112 110
113 ACPI_FUNCTION_TRACE("acpi_ac_seq_show");
114 111
115 if (!ac) 112 if (!ac)
116 return_VALUE(0); 113 return 0;
117 114
118 if (acpi_ac_get_state(ac)) { 115 if (acpi_ac_get_state(ac)) {
119 seq_puts(seq, "ERROR: Unable to read AC Adapter state\n"); 116 seq_puts(seq, "ERROR: Unable to read AC Adapter state\n");
120 return_VALUE(0); 117 return 0;
121 } 118 }
122 119
123 seq_puts(seq, "state: "); 120 seq_puts(seq, "state: ");
@@ -133,7 +130,7 @@ static int acpi_ac_seq_show(struct seq_file *seq, void *offset)
133 break; 130 break;
134 } 131 }
135 132
136 return_VALUE(0); 133 return 0;
137} 134}
138 135
139static int acpi_ac_open_fs(struct inode *inode, struct file *file) 136static int acpi_ac_open_fs(struct inode *inode, struct file *file)
@@ -145,13 +142,12 @@ static int acpi_ac_add_fs(struct acpi_device *device)
145{ 142{
146 struct proc_dir_entry *entry = NULL; 143 struct proc_dir_entry *entry = NULL;
147 144
148 ACPI_FUNCTION_TRACE("acpi_ac_add_fs");
149 145
150 if (!acpi_device_dir(device)) { 146 if (!acpi_device_dir(device)) {
151 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 147 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
152 acpi_ac_dir); 148 acpi_ac_dir);
153 if (!acpi_device_dir(device)) 149 if (!acpi_device_dir(device))
154 return_VALUE(-ENODEV); 150 return -ENODEV;
155 acpi_device_dir(device)->owner = THIS_MODULE; 151 acpi_device_dir(device)->owner = THIS_MODULE;
156 } 152 }
157 153
@@ -159,21 +155,18 @@ static int acpi_ac_add_fs(struct acpi_device *device)
159 entry = create_proc_entry(ACPI_AC_FILE_STATE, 155 entry = create_proc_entry(ACPI_AC_FILE_STATE,
160 S_IRUGO, acpi_device_dir(device)); 156 S_IRUGO, acpi_device_dir(device));
161 if (!entry) 157 if (!entry)
162 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 158 return -ENODEV;
163 "Unable to create '%s' fs entry\n",
164 ACPI_AC_FILE_STATE));
165 else { 159 else {
166 entry->proc_fops = &acpi_ac_fops; 160 entry->proc_fops = &acpi_ac_fops;
167 entry->data = acpi_driver_data(device); 161 entry->data = acpi_driver_data(device);
168 entry->owner = THIS_MODULE; 162 entry->owner = THIS_MODULE;
169 } 163 }
170 164
171 return_VALUE(0); 165 return 0;
172} 166}
173 167
174static int acpi_ac_remove_fs(struct acpi_device *device) 168static int acpi_ac_remove_fs(struct acpi_device *device)
175{ 169{
176 ACPI_FUNCTION_TRACE("acpi_ac_remove_fs");
177 170
178 if (acpi_device_dir(device)) { 171 if (acpi_device_dir(device)) {
179 remove_proc_entry(ACPI_AC_FILE_STATE, acpi_device_dir(device)); 172 remove_proc_entry(ACPI_AC_FILE_STATE, acpi_device_dir(device));
@@ -182,7 +175,7 @@ static int acpi_ac_remove_fs(struct acpi_device *device)
182 acpi_device_dir(device) = NULL; 175 acpi_device_dir(device) = NULL;
183 } 176 }
184 177
185 return_VALUE(0); 178 return 0;
186} 179}
187 180
188/* -------------------------------------------------------------------------- 181/* --------------------------------------------------------------------------
@@ -194,13 +187,12 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
194 struct acpi_ac *ac = (struct acpi_ac *)data; 187 struct acpi_ac *ac = (struct acpi_ac *)data;
195 struct acpi_device *device = NULL; 188 struct acpi_device *device = NULL;
196 189
197 ACPI_FUNCTION_TRACE("acpi_ac_notify");
198 190
199 if (!ac) 191 if (!ac)
200 return_VOID; 192 return;
201 193
202 if (acpi_bus_get_device(ac->handle, &device)) 194 if (acpi_bus_get_device(ac->handle, &device))
203 return_VOID; 195 return;
204 196
205 switch (event) { 197 switch (event) {
206 case ACPI_AC_NOTIFY_STATUS: 198 case ACPI_AC_NOTIFY_STATUS:
@@ -213,7 +205,7 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
213 break; 205 break;
214 } 206 }
215 207
216 return_VOID; 208 return;
217} 209}
218 210
219static int acpi_ac_add(struct acpi_device *device) 211static int acpi_ac_add(struct acpi_device *device)
@@ -222,14 +214,13 @@ static int acpi_ac_add(struct acpi_device *device)
222 acpi_status status = AE_OK; 214 acpi_status status = AE_OK;
223 struct acpi_ac *ac = NULL; 215 struct acpi_ac *ac = NULL;
224 216
225 ACPI_FUNCTION_TRACE("acpi_ac_add");
226 217
227 if (!device) 218 if (!device)
228 return_VALUE(-EINVAL); 219 return -EINVAL;
229 220
230 ac = kmalloc(sizeof(struct acpi_ac), GFP_KERNEL); 221 ac = kmalloc(sizeof(struct acpi_ac), GFP_KERNEL);
231 if (!ac) 222 if (!ac)
232 return_VALUE(-ENOMEM); 223 return -ENOMEM;
233 memset(ac, 0, sizeof(struct acpi_ac)); 224 memset(ac, 0, sizeof(struct acpi_ac));
234 225
235 ac->handle = device->handle; 226 ac->handle = device->handle;
@@ -249,8 +240,6 @@ static int acpi_ac_add(struct acpi_device *device)
249 ACPI_DEVICE_NOTIFY, acpi_ac_notify, 240 ACPI_DEVICE_NOTIFY, acpi_ac_notify,
250 ac); 241 ac);
251 if (ACPI_FAILURE(status)) { 242 if (ACPI_FAILURE(status)) {
252 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
253 "Error installing notify handler\n"));
254 result = -ENODEV; 243 result = -ENODEV;
255 goto end; 244 goto end;
256 } 245 }
@@ -265,7 +254,7 @@ static int acpi_ac_add(struct acpi_device *device)
265 kfree(ac); 254 kfree(ac);
266 } 255 }
267 256
268 return_VALUE(result); 257 return result;
269} 258}
270 259
271static int acpi_ac_remove(struct acpi_device *device, int type) 260static int acpi_ac_remove(struct acpi_device *device, int type)
@@ -273,55 +262,49 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
273 acpi_status status = AE_OK; 262 acpi_status status = AE_OK;
274 struct acpi_ac *ac = NULL; 263 struct acpi_ac *ac = NULL;
275 264
276 ACPI_FUNCTION_TRACE("acpi_ac_remove");
277 265
278 if (!device || !acpi_driver_data(device)) 266 if (!device || !acpi_driver_data(device))
279 return_VALUE(-EINVAL); 267 return -EINVAL;
280 268
281 ac = (struct acpi_ac *)acpi_driver_data(device); 269 ac = (struct acpi_ac *)acpi_driver_data(device);
282 270
283 status = acpi_remove_notify_handler(ac->handle, 271 status = acpi_remove_notify_handler(ac->handle,
284 ACPI_DEVICE_NOTIFY, acpi_ac_notify); 272 ACPI_DEVICE_NOTIFY, acpi_ac_notify);
285 if (ACPI_FAILURE(status))
286 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
287 "Error removing notify handler\n"));
288 273
289 acpi_ac_remove_fs(device); 274 acpi_ac_remove_fs(device);
290 275
291 kfree(ac); 276 kfree(ac);
292 277
293 return_VALUE(0); 278 return 0;
294} 279}
295 280
296static int __init acpi_ac_init(void) 281static int __init acpi_ac_init(void)
297{ 282{
298 int result = 0; 283 int result = 0;
299 284
300 ACPI_FUNCTION_TRACE("acpi_ac_init");
301 285
302 acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir); 286 acpi_ac_dir = proc_mkdir(ACPI_AC_CLASS, acpi_root_dir);
303 if (!acpi_ac_dir) 287 if (!acpi_ac_dir)
304 return_VALUE(-ENODEV); 288 return -ENODEV;
305 acpi_ac_dir->owner = THIS_MODULE; 289 acpi_ac_dir->owner = THIS_MODULE;
306 290
307 result = acpi_bus_register_driver(&acpi_ac_driver); 291 result = acpi_bus_register_driver(&acpi_ac_driver);
308 if (result < 0) { 292 if (result < 0) {
309 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); 293 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
310 return_VALUE(-ENODEV); 294 return -ENODEV;
311 } 295 }
312 296
313 return_VALUE(0); 297 return 0;
314} 298}
315 299
316static void __exit acpi_ac_exit(void) 300static void __exit acpi_ac_exit(void)
317{ 301{
318 ACPI_FUNCTION_TRACE("acpi_ac_exit");
319 302
320 acpi_bus_unregister_driver(&acpi_ac_driver); 303 acpi_bus_unregister_driver(&acpi_ac_driver);
321 304
322 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir); 305 remove_proc_entry(ACPI_AC_CLASS, acpi_root_dir);
323 306
324 return_VOID; 307 return;
325} 308}
326 309
327module_init(acpi_ac_init); 310module_init(acpi_ac_init);
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 1012284ff4f..cd57372a672 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -128,7 +128,6 @@ acpi_memory_get_device_resources(struct acpi_memory_device *mem_device)
128 acpi_status status; 128 acpi_status status;
129 struct acpi_memory_info *info, *n; 129 struct acpi_memory_info *info, *n;
130 130
131 ACPI_FUNCTION_TRACE("acpi_memory_get_device_resources");
132 131
133 status = acpi_walk_resources(mem_device->handle, METHOD_NAME__CRS, 132 status = acpi_walk_resources(mem_device->handle, METHOD_NAME__CRS,
134 acpi_memory_get_resource, mem_device); 133 acpi_memory_get_resource, mem_device);
@@ -150,23 +149,21 @@ acpi_memory_get_device(acpi_handle handle,
150 struct acpi_device *device = NULL; 149 struct acpi_device *device = NULL;
151 struct acpi_device *pdevice = NULL; 150 struct acpi_device *pdevice = NULL;
152 151
153 ACPI_FUNCTION_TRACE("acpi_memory_get_device");
154 152
155 if (!acpi_bus_get_device(handle, &device) && device) 153 if (!acpi_bus_get_device(handle, &device) && device)
156 goto end; 154 goto end;
157 155
158 status = acpi_get_parent(handle, &phandle); 156 status = acpi_get_parent(handle, &phandle);
159 if (ACPI_FAILURE(status)) { 157 if (ACPI_FAILURE(status)) {
160 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_get_parent\n")); 158 ACPI_EXCEPTION((AE_INFO, status, "Cannot find acpi parent"));
161 return_VALUE(-EINVAL); 159 return -EINVAL;
162 } 160 }
163 161
164 /* Get the parent device */ 162 /* Get the parent device */
165 status = acpi_bus_get_device(phandle, &pdevice); 163 status = acpi_bus_get_device(phandle, &pdevice);
166 if (ACPI_FAILURE(status)) { 164 if (ACPI_FAILURE(status)) {
167 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 165 ACPI_EXCEPTION((AE_INFO, status, "Cannot get acpi bus device"));
168 "Error in acpi_bus_get_device\n")); 166 return -EINVAL;
169 return_VALUE(-EINVAL);
170 } 167 }
171 168
172 /* 169 /*
@@ -175,30 +172,29 @@ acpi_memory_get_device(acpi_handle handle,
175 */ 172 */
176 status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE); 173 status = acpi_bus_add(&device, pdevice, handle, ACPI_BUS_TYPE_DEVICE);
177 if (ACPI_FAILURE(status)) { 174 if (ACPI_FAILURE(status)) {
178 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error in acpi_bus_add\n")); 175 ACPI_EXCEPTION((AE_INFO, status, "Cannot add acpi bus"));
179 return_VALUE(-EINVAL); 176 return -EINVAL;
180 } 177 }
181 178
182 end: 179 end:
183 *mem_device = acpi_driver_data(device); 180 *mem_device = acpi_driver_data(device);
184 if (!(*mem_device)) { 181 if (!(*mem_device)) {
185 printk(KERN_ERR "\n driver data not found"); 182 printk(KERN_ERR "\n driver data not found");
186 return_VALUE(-ENODEV); 183 return -ENODEV;
187 } 184 }
188 185
189 return_VALUE(0); 186 return 0;
190} 187}
191 188
192static int acpi_memory_check_device(struct acpi_memory_device *mem_device) 189static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
193{ 190{
194 unsigned long current_status; 191 unsigned long current_status;
195 192
196 ACPI_FUNCTION_TRACE("acpi_memory_check_device");
197 193
198 /* Get device present/absent information from the _STA */ 194 /* Get device present/absent information from the _STA */
199 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->handle, "_STA", 195 if (ACPI_FAILURE(acpi_evaluate_integer(mem_device->handle, "_STA",
200 NULL, &current_status))) 196 NULL, &current_status)))
201 return_VALUE(-ENODEV); 197 return -ENODEV;
202 /* 198 /*
203 * Check for device status. Device should be 199 * Check for device status. Device should be
204 * present/enabled/functioning. 200 * present/enabled/functioning.
@@ -206,9 +202,9 @@ static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
206 if (!((current_status & ACPI_MEMORY_STA_PRESENT) 202 if (!((current_status & ACPI_MEMORY_STA_PRESENT)
207 && (current_status & ACPI_MEMORY_STA_ENABLED) 203 && (current_status & ACPI_MEMORY_STA_ENABLED)
208 && (current_status & ACPI_MEMORY_STA_FUNCTIONAL))) 204 && (current_status & ACPI_MEMORY_STA_FUNCTIONAL)))
209 return_VALUE(-ENODEV); 205 return -ENODEV;
210 206
211 return_VALUE(0); 207 return 0;
212} 208}
213 209
214static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) 210static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
@@ -217,13 +213,11 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
217 struct acpi_memory_info *info; 213 struct acpi_memory_info *info;
218 int node; 214 int node;
219 215
220 ACPI_FUNCTION_TRACE("acpi_memory_enable_device");
221 216
222 /* Get the range from the _CRS */ 217 /* Get the range from the _CRS */
223 result = acpi_memory_get_device_resources(mem_device); 218 result = acpi_memory_get_device_resources(mem_device);
224 if (result) { 219 if (result) {
225 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 220 printk(KERN_ERR PREFIX "get_device_resources failed\n");
226 "\nget_device_resources failed\n"));
227 mem_device->state = MEMORY_INVALID_STATE; 221 mem_device->state = MEMORY_INVALID_STATE;
228 return result; 222 return result;
229 } 223 }
@@ -254,7 +248,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
254 num_enabled++; 248 num_enabled++;
255 } 249 }
256 if (!num_enabled) { 250 if (!num_enabled) {
257 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); 251 printk(KERN_ERR PREFIX "add_memory failed\n");
258 mem_device->state = MEMORY_INVALID_STATE; 252 mem_device->state = MEMORY_INVALID_STATE;
259 return -EINVAL; 253 return -EINVAL;
260 } 254 }
@@ -269,7 +263,6 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
269 union acpi_object arg; 263 union acpi_object arg;
270 unsigned long current_status; 264 unsigned long current_status;
271 265
272 ACPI_FUNCTION_TRACE("acpi_memory_powerdown_device");
273 266
274 /* Issue the _EJ0 command */ 267 /* Issue the _EJ0 command */
275 arg_list.count = 1; 268 arg_list.count = 1;
@@ -280,21 +273,21 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
280 "_EJ0", &arg_list, NULL); 273 "_EJ0", &arg_list, NULL);
281 /* Return on _EJ0 failure */ 274 /* Return on _EJ0 failure */
282 if (ACPI_FAILURE(status)) { 275 if (ACPI_FAILURE(status)) {
283 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_EJ0 failed.\n")); 276 ACPI_EXCEPTION((AE_INFO, status, "_EJ0 failed"));
284 return_VALUE(-ENODEV); 277 return -ENODEV;
285 } 278 }
286 279
287 /* Evalute _STA to check if the device is disabled */ 280 /* Evalute _STA to check if the device is disabled */
288 status = acpi_evaluate_integer(mem_device->handle, "_STA", 281 status = acpi_evaluate_integer(mem_device->handle, "_STA",
289 NULL, &current_status); 282 NULL, &current_status);
290 if (ACPI_FAILURE(status)) 283 if (ACPI_FAILURE(status))
291 return_VALUE(-ENODEV); 284 return -ENODEV;
292 285
293 /* Check for device status. Device should be disabled */ 286 /* Check for device status. Device should be disabled */
294 if (current_status & ACPI_MEMORY_STA_ENABLED) 287 if (current_status & ACPI_MEMORY_STA_ENABLED)
295 return_VALUE(-EINVAL); 288 return -EINVAL;
296 289
297 return_VALUE(0); 290 return 0;
298} 291}
299 292
300static int acpi_memory_disable_device(struct acpi_memory_device *mem_device) 293static int acpi_memory_disable_device(struct acpi_memory_device *mem_device)
@@ -302,7 +295,6 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device)
302 int result; 295 int result;
303 struct acpi_memory_info *info, *n; 296 struct acpi_memory_info *info, *n;
304 297
305 ACPI_FUNCTION_TRACE("acpi_memory_disable_device");
306 298
307 /* 299 /*
308 * Ask the VM to offline this memory range. 300 * Ask the VM to offline this memory range.
@@ -320,8 +312,6 @@ static int acpi_memory_disable_device(struct acpi_memory_device *mem_device)
320 /* Power-off and eject the device */ 312 /* Power-off and eject the device */
321 result = acpi_memory_powerdown_device(mem_device); 313 result = acpi_memory_powerdown_device(mem_device);
322 if (result) { 314 if (result) {
323 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
324 "Device Power Down failed.\n"));
325 /* Set the status of the device to invalid */ 315 /* Set the status of the device to invalid */
326 mem_device->state = MEMORY_INVALID_STATE; 316 mem_device->state = MEMORY_INVALID_STATE;
327 return result; 317 return result;
@@ -336,7 +326,6 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
336 struct acpi_memory_device *mem_device; 326 struct acpi_memory_device *mem_device;
337 struct acpi_device *device; 327 struct acpi_device *device;
338 328
339 ACPI_FUNCTION_TRACE("acpi_memory_device_notify");
340 329
341 switch (event) { 330 switch (event) {
342 case ACPI_NOTIFY_BUS_CHECK: 331 case ACPI_NOTIFY_BUS_CHECK:
@@ -348,15 +337,14 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
348 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 337 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
349 "\nReceived DEVICE CHECK notification for device\n")); 338 "\nReceived DEVICE CHECK notification for device\n"));
350 if (acpi_memory_get_device(handle, &mem_device)) { 339 if (acpi_memory_get_device(handle, &mem_device)) {
351 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 340 printk(KERN_ERR PREFIX "Cannot find driver data\n");
352 "Error in finding driver data\n")); 341 return;
353 return_VOID;
354 } 342 }
355 343
356 if (!acpi_memory_check_device(mem_device)) { 344 if (!acpi_memory_check_device(mem_device)) {
357 if (acpi_memory_enable_device(mem_device)) 345 if (acpi_memory_enable_device(mem_device))
358 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 346 printk(KERN_ERR PREFIX
359 "Error in acpi_memory_enable_device\n")); 347 "Cannot enable memory device\n");
360 } 348 }
361 break; 349 break;
362 case ACPI_NOTIFY_EJECT_REQUEST: 350 case ACPI_NOTIFY_EJECT_REQUEST:
@@ -364,14 +352,12 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
364 "\nReceived EJECT REQUEST notification for device\n")); 352 "\nReceived EJECT REQUEST notification for device\n"));
365 353
366 if (acpi_bus_get_device(handle, &device)) { 354 if (acpi_bus_get_device(handle, &device)) {
367 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 355 printk(KERN_ERR PREFIX "Device doesn't exist\n");
368 "Device doesn't exist\n"));
369 break; 356 break;
370 } 357 }
371 mem_device = acpi_driver_data(device); 358 mem_device = acpi_driver_data(device);
372 if (!mem_device) { 359 if (!mem_device) {
373 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 360 printk(KERN_ERR PREFIX "Driver Data is NULL\n");
374 "Driver Data is NULL\n"));
375 break; 361 break;
376 } 362 }
377 363
@@ -382,8 +368,8 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
382 * with generic sysfs driver 368 * with generic sysfs driver
383 */ 369 */
384 if (acpi_memory_disable_device(mem_device)) 370 if (acpi_memory_disable_device(mem_device))
385 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 371 printk(KERN_ERR PREFIX
386 "Error in acpi_memory_disable_device\n")); 372 "Disable memory device\n");
387 /* 373 /*
388 * TBD: Invoke acpi_bus_remove to cleanup data structures 374 * TBD: Invoke acpi_bus_remove to cleanup data structures
389 */ 375 */
@@ -394,7 +380,7 @@ static void acpi_memory_device_notify(acpi_handle handle, u32 event, void *data)
394 break; 380 break;
395 } 381 }
396 382
397 return_VOID; 383 return;
398} 384}
399 385
400static int acpi_memory_device_add(struct acpi_device *device) 386static int acpi_memory_device_add(struct acpi_device *device)
@@ -402,14 +388,13 @@ static int acpi_memory_device_add(struct acpi_device *device)
402 int result; 388 int result;
403 struct acpi_memory_device *mem_device = NULL; 389 struct acpi_memory_device *mem_device = NULL;
404 390
405 ACPI_FUNCTION_TRACE("acpi_memory_device_add");
406 391
407 if (!device) 392 if (!device)
408 return_VALUE(-EINVAL); 393 return -EINVAL;
409 394
410 mem_device = kmalloc(sizeof(struct acpi_memory_device), GFP_KERNEL); 395 mem_device = kmalloc(sizeof(struct acpi_memory_device), GFP_KERNEL);
411 if (!mem_device) 396 if (!mem_device)
412 return_VALUE(-ENOMEM); 397 return -ENOMEM;
413 memset(mem_device, 0, sizeof(struct acpi_memory_device)); 398 memset(mem_device, 0, sizeof(struct acpi_memory_device));
414 399
415 INIT_LIST_HEAD(&mem_device->res_list); 400 INIT_LIST_HEAD(&mem_device->res_list);
@@ -422,7 +407,7 @@ static int acpi_memory_device_add(struct acpi_device *device)
422 result = acpi_memory_get_device_resources(mem_device); 407 result = acpi_memory_get_device_resources(mem_device);
423 if (result) { 408 if (result) {
424 kfree(mem_device); 409 kfree(mem_device);
425 return_VALUE(result); 410 return result;
426 } 411 }
427 412
428 /* Set the device state */ 413 /* Set the device state */
@@ -430,22 +415,21 @@ static int acpi_memory_device_add(struct acpi_device *device)
430 415
431 printk(KERN_INFO "%s \n", acpi_device_name(device)); 416 printk(KERN_INFO "%s \n", acpi_device_name(device));
432 417
433 return_VALUE(result); 418 return result;
434} 419}
435 420
436static int acpi_memory_device_remove(struct acpi_device *device, int type) 421static int acpi_memory_device_remove(struct acpi_device *device, int type)
437{ 422{
438 struct acpi_memory_device *mem_device = NULL; 423 struct acpi_memory_device *mem_device = NULL;
439 424
440 ACPI_FUNCTION_TRACE("acpi_memory_device_remove");
441 425
442 if (!device || !acpi_driver_data(device)) 426 if (!device || !acpi_driver_data(device))
443 return_VALUE(-EINVAL); 427 return -EINVAL;
444 428
445 mem_device = (struct acpi_memory_device *)acpi_driver_data(device); 429 mem_device = (struct acpi_memory_device *)acpi_driver_data(device);
446 kfree(mem_device); 430 kfree(mem_device);
447 431
448 return_VALUE(0); 432 return 0;
449} 433}
450 434
451static int acpi_memory_device_start (struct acpi_device *device) 435static int acpi_memory_device_start (struct acpi_device *device)
@@ -453,8 +437,6 @@ static int acpi_memory_device_start (struct acpi_device *device)
453 struct acpi_memory_device *mem_device; 437 struct acpi_memory_device *mem_device;
454 int result = 0; 438 int result = 0;
455 439
456 ACPI_FUNCTION_TRACE("acpi_memory_device_start");
457
458 mem_device = acpi_driver_data(device); 440 mem_device = acpi_driver_data(device);
459 441
460 if (!acpi_memory_check_device(mem_device)) { 442 if (!acpi_memory_check_device(mem_device)) {
@@ -464,7 +446,7 @@ static int acpi_memory_device_start (struct acpi_device *device)
464 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 446 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
465 "Error in acpi_memory_enable_device\n")); 447 "Error in acpi_memory_enable_device\n"));
466 } 448 }
467 return_VALUE(result); 449 return result;
468} 450}
469 451
470/* 452/*
@@ -477,16 +459,15 @@ static acpi_status is_memory_device(acpi_handle handle)
477 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 459 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
478 struct acpi_device_info *info; 460 struct acpi_device_info *info;
479 461
480 ACPI_FUNCTION_TRACE("is_memory_device");
481 462
482 status = acpi_get_object_info(handle, &buffer); 463 status = acpi_get_object_info(handle, &buffer);
483 if (ACPI_FAILURE(status)) 464 if (ACPI_FAILURE(status))
484 return_ACPI_STATUS(AE_ERROR); 465 return status;
485 466
486 info = buffer.pointer; 467 info = buffer.pointer;
487 if (!(info->valid & ACPI_VALID_HID)) { 468 if (!(info->valid & ACPI_VALID_HID)) {
488 acpi_os_free(buffer.pointer); 469 acpi_os_free(buffer.pointer);
489 return_ACPI_STATUS(AE_ERROR); 470 return AE_ERROR;
490 } 471 }
491 472
492 hardware_id = info->hardware_id.value; 473 hardware_id = info->hardware_id.value;
@@ -495,7 +476,7 @@ static acpi_status is_memory_device(acpi_handle handle)
495 status = AE_ERROR; 476 status = AE_ERROR;
496 477
497 acpi_os_free(buffer.pointer); 478 acpi_os_free(buffer.pointer);
498 return_ACPI_STATUS(status); 479 return status;
499} 480}
500 481
501static acpi_status 482static acpi_status
@@ -504,21 +485,17 @@ acpi_memory_register_notify_handler(acpi_handle handle,
504{ 485{
505 acpi_status status; 486 acpi_status status;
506 487
507 ACPI_FUNCTION_TRACE("acpi_memory_register_notify_handler");
508 488
509 status = is_memory_device(handle); 489 status = is_memory_device(handle);
510 if (ACPI_FAILURE(status)) 490 if (ACPI_FAILURE(status)){
511 return_ACPI_STATUS(AE_OK); /* continue */ 491 ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device"));
492 return AE_OK; /* continue */
493 }
512 494
513 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY, 495 status = acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
514 acpi_memory_device_notify, NULL); 496 acpi_memory_device_notify, NULL);
515 if (ACPI_FAILURE(status)) { 497 /* continue */
516 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 498 return AE_OK;
517 "Error installing notify handler\n"));
518 return_ACPI_STATUS(AE_OK); /* continue */
519 }
520
521 return_ACPI_STATUS(status);
522} 499}
523 500
524static acpi_status 501static acpi_status
@@ -527,22 +504,18 @@ acpi_memory_deregister_notify_handler(acpi_handle handle,
527{ 504{
528 acpi_status status; 505 acpi_status status;
529 506
530 ACPI_FUNCTION_TRACE("acpi_memory_deregister_notify_handler");
531 507
532 status = is_memory_device(handle); 508 status = is_memory_device(handle);
533 if (ACPI_FAILURE(status)) 509 if (ACPI_FAILURE(status)){
534 return_ACPI_STATUS(AE_OK); /* continue */ 510 ACPI_EXCEPTION((AE_INFO, status, "handle is no memory device"));
511 return AE_OK; /* continue */
512 }
535 513
536 status = acpi_remove_notify_handler(handle, 514 status = acpi_remove_notify_handler(handle,
537 ACPI_SYSTEM_NOTIFY, 515 ACPI_SYSTEM_NOTIFY,
538 acpi_memory_device_notify); 516 acpi_memory_device_notify);
539 if (ACPI_FAILURE(status)) {
540 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
541 "Error removing notify handler\n"));
542 return_ACPI_STATUS(AE_OK); /* continue */
543 }
544 517
545 return_ACPI_STATUS(status); 518 return AE_OK; /* continue */
546} 519}
547 520
548static int __init acpi_memory_device_init(void) 521static int __init acpi_memory_device_init(void)
@@ -550,12 +523,11 @@ static int __init acpi_memory_device_init(void)
550 int result; 523 int result;
551 acpi_status status; 524 acpi_status status;
552 525
553 ACPI_FUNCTION_TRACE("acpi_memory_device_init");
554 526
555 result = acpi_bus_register_driver(&acpi_memory_device_driver); 527 result = acpi_bus_register_driver(&acpi_memory_device_driver);
556 528
557 if (result < 0) 529 if (result < 0)
558 return_VALUE(-ENODEV); 530 return -ENODEV;
559 531
560 status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT, 532 status = acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
561 ACPI_UINT32_MAX, 533 ACPI_UINT32_MAX,
@@ -563,19 +535,18 @@ static int __init acpi_memory_device_init(void)
563 NULL, NULL); 535 NULL, NULL);
564 536
565 if (ACPI_FAILURE(status)) { 537 if (ACPI_FAILURE(status)) {
566 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); 538 ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed"));
567 acpi_bus_unregister_driver(&acpi_memory_device_driver); 539 acpi_bus_unregister_driver(&acpi_memory_device_driver);
568 return_VALUE(-ENODEV); 540 return -ENODEV;
569 } 541 }
570 542
571 return_VALUE(0); 543 return 0;
572} 544}
573 545
574static void __exit acpi_memory_device_exit(void) 546static void __exit acpi_memory_device_exit(void)
575{ 547{
576 acpi_status status; 548 acpi_status status;
577 549
578 ACPI_FUNCTION_TRACE("acpi_memory_device_exit");
579 550
580 /* 551 /*
581 * Adding this to un-install notification handlers for all the device 552 * Adding this to un-install notification handlers for all the device
@@ -587,11 +558,11 @@ static void __exit acpi_memory_device_exit(void)
587 NULL, NULL); 558 NULL, NULL);
588 559
589 if (ACPI_FAILURE(status)) 560 if (ACPI_FAILURE(status))
590 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "walk_namespace failed\n")); 561 ACPI_EXCEPTION((AE_INFO, status, "walk_namespace failed"));
591 562
592 acpi_bus_unregister_driver(&acpi_memory_device_driver); 563 acpi_bus_unregister_driver(&acpi_memory_device_driver);
593 564
594 return_VOID; 565 return;
595} 566}
596 567
597module_init(acpi_memory_device_init); 568module_init(acpi_memory_device_init);
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index 839f423d738..055cfd5c876 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1232,7 +1232,7 @@ static int __init asus_acpi_init(void)
1232 result = acpi_bus_register_driver(&asus_hotk_driver); 1232 result = acpi_bus_register_driver(&asus_hotk_driver);
1233 if (result < 0) { 1233 if (result < 0) {
1234 remove_proc_entry(PROC_ASUS, acpi_root_dir); 1234 remove_proc_entry(PROC_ASUS, acpi_root_dir);
1235 return -ENODEV; 1235 return result;
1236 } 1236 }
1237 1237
1238 /* 1238 /*
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 702e857e98c..00b0728efe8 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -132,17 +132,16 @@ acpi_battery_get_info(struct acpi_battery *battery,
132 struct acpi_buffer data = { 0, NULL }; 132 struct acpi_buffer data = { 0, NULL };
133 union acpi_object *package = NULL; 133 union acpi_object *package = NULL;
134 134
135 ACPI_FUNCTION_TRACE("acpi_battery_get_info");
136 135
137 if (!battery || !bif) 136 if (!battery || !bif)
138 return_VALUE(-EINVAL); 137 return -EINVAL;
139 138
140 /* Evalute _BIF */ 139 /* Evalute _BIF */
141 140
142 status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer); 141 status = acpi_evaluate_object(battery->handle, "_BIF", NULL, &buffer);
143 if (ACPI_FAILURE(status)) { 142 if (ACPI_FAILURE(status)) {
144 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BIF\n")); 143 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BIF"));
145 return_VALUE(-ENODEV); 144 return -ENODEV;
146 } 145 }
147 146
148 package = (union acpi_object *)buffer.pointer; 147 package = (union acpi_object *)buffer.pointer;
@@ -151,7 +150,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
151 150
152 status = acpi_extract_package(package, &format, &data); 151 status = acpi_extract_package(package, &format, &data);
153 if (status != AE_BUFFER_OVERFLOW) { 152 if (status != AE_BUFFER_OVERFLOW) {
154 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); 153 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF"));
155 result = -ENODEV; 154 result = -ENODEV;
156 goto end; 155 goto end;
157 } 156 }
@@ -165,7 +164,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
165 164
166 status = acpi_extract_package(package, &format, &data); 165 status = acpi_extract_package(package, &format, &data);
167 if (ACPI_FAILURE(status)) { 166 if (ACPI_FAILURE(status)) {
168 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BIF\n")); 167 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BIF"));
169 kfree(data.pointer); 168 kfree(data.pointer);
170 result = -ENODEV; 169 result = -ENODEV;
171 goto end; 170 goto end;
@@ -177,7 +176,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
177 if (!result) 176 if (!result)
178 (*bif) = (struct acpi_battery_info *)data.pointer; 177 (*bif) = (struct acpi_battery_info *)data.pointer;
179 178
180 return_VALUE(result); 179 return result;
181} 180}
182 181
183static int 182static int
@@ -193,17 +192,16 @@ acpi_battery_get_status(struct acpi_battery *battery,
193 struct acpi_buffer data = { 0, NULL }; 192 struct acpi_buffer data = { 0, NULL };
194 union acpi_object *package = NULL; 193 union acpi_object *package = NULL;
195 194
196 ACPI_FUNCTION_TRACE("acpi_battery_get_status");
197 195
198 if (!battery || !bst) 196 if (!battery || !bst)
199 return_VALUE(-EINVAL); 197 return -EINVAL;
200 198
201 /* Evalute _BST */ 199 /* Evalute _BST */
202 200
203 status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer); 201 status = acpi_evaluate_object(battery->handle, "_BST", NULL, &buffer);
204 if (ACPI_FAILURE(status)) { 202 if (ACPI_FAILURE(status)) {
205 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BST\n")); 203 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BST"));
206 return_VALUE(-ENODEV); 204 return -ENODEV;
207 } 205 }
208 206
209 package = (union acpi_object *)buffer.pointer; 207 package = (union acpi_object *)buffer.pointer;
@@ -212,7 +210,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
212 210
213 status = acpi_extract_package(package, &format, &data); 211 status = acpi_extract_package(package, &format, &data);
214 if (status != AE_BUFFER_OVERFLOW) { 212 if (status != AE_BUFFER_OVERFLOW) {
215 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); 213 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST"));
216 result = -ENODEV; 214 result = -ENODEV;
217 goto end; 215 goto end;
218 } 216 }
@@ -226,7 +224,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
226 224
227 status = acpi_extract_package(package, &format, &data); 225 status = acpi_extract_package(package, &format, &data);
228 if (ACPI_FAILURE(status)) { 226 if (ACPI_FAILURE(status)) {
229 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error extracting _BST\n")); 227 ACPI_EXCEPTION((AE_INFO, status, "Extracting _BST"));
230 kfree(data.pointer); 228 kfree(data.pointer);
231 result = -ENODEV; 229 result = -ENODEV;
232 goto end; 230 goto end;
@@ -238,7 +236,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
238 if (!result) 236 if (!result)
239 (*bst) = (struct acpi_battery_status *)data.pointer; 237 (*bst) = (struct acpi_battery_status *)data.pointer;
240 238
241 return_VALUE(result); 239 return result;
242} 240}
243 241
244static int 242static int
@@ -248,25 +246,24 @@ acpi_battery_set_alarm(struct acpi_battery *battery, unsigned long alarm)
248 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 246 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
249 struct acpi_object_list arg_list = { 1, &arg0 }; 247 struct acpi_object_list arg_list = { 1, &arg0 };
250 248
251 ACPI_FUNCTION_TRACE("acpi_battery_set_alarm");
252 249
253 if (!battery) 250 if (!battery)
254 return_VALUE(-EINVAL); 251 return -EINVAL;
255 252
256 if (!battery->flags.alarm) 253 if (!battery->flags.alarm)
257 return_VALUE(-ENODEV); 254 return -ENODEV;
258 255
259 arg0.integer.value = alarm; 256 arg0.integer.value = alarm;
260 257
261 status = acpi_evaluate_object(battery->handle, "_BTP", &arg_list, NULL); 258 status = acpi_evaluate_object(battery->handle, "_BTP", &arg_list, NULL);
262 if (ACPI_FAILURE(status)) 259 if (ACPI_FAILURE(status))
263 return_VALUE(-ENODEV); 260 return -ENODEV;
264 261
265 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Alarm set to %d\n", (u32) alarm)); 262 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Alarm set to %d\n", (u32) alarm));
266 263
267 battery->alarm = alarm; 264 battery->alarm = alarm;
268 265
269 return_VALUE(0); 266 return 0;
270} 267}
271 268
272static int acpi_battery_check(struct acpi_battery *battery) 269static int acpi_battery_check(struct acpi_battery *battery)
@@ -277,18 +274,17 @@ static int acpi_battery_check(struct acpi_battery *battery)
277 struct acpi_device *device = NULL; 274 struct acpi_device *device = NULL;
278 struct acpi_battery_info *bif = NULL; 275 struct acpi_battery_info *bif = NULL;
279 276
280 ACPI_FUNCTION_TRACE("acpi_battery_check");
281 277
282 if (!battery) 278 if (!battery)
283 return_VALUE(-EINVAL); 279 return -EINVAL;
284 280
285 result = acpi_bus_get_device(battery->handle, &device); 281 result = acpi_bus_get_device(battery->handle, &device);
286 if (result) 282 if (result)
287 return_VALUE(result); 283 return result;
288 284
289 result = acpi_bus_get_status(device); 285 result = acpi_bus_get_status(device);
290 if (result) 286 if (result)
291 return_VALUE(result); 287 return result;
292 288
293 /* Insertion? */ 289 /* Insertion? */
294 290
@@ -300,7 +296,7 @@ static int acpi_battery_check(struct acpi_battery *battery)
300 296
301 result = acpi_battery_get_info(battery, &bif); 297 result = acpi_battery_get_info(battery, &bif);
302 if (result) 298 if (result)
303 return_VALUE(result); 299 return result;
304 300
305 battery->flags.power_unit = bif->power_unit; 301 battery->flags.power_unit = bif->power_unit;
306 battery->trips.warning = bif->design_capacity_warning; 302 battery->trips.warning = bif->design_capacity_warning;
@@ -324,7 +320,7 @@ static int acpi_battery_check(struct acpi_battery *battery)
324 320
325 battery->flags.present = device->status.battery_present; 321 battery->flags.present = device->status.battery_present;
326 322
327 return_VALUE(result); 323 return result;
328} 324}
329 325
330/* -------------------------------------------------------------------------- 326/* --------------------------------------------------------------------------
@@ -339,7 +335,6 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
339 struct acpi_battery_info *bif = NULL; 335 struct acpi_battery_info *bif = NULL;
340 char *units = "?"; 336 char *units = "?";
341 337
342 ACPI_FUNCTION_TRACE("acpi_battery_read_info");
343 338
344 if (!battery) 339 if (!battery)
345 goto end; 340 goto end;
@@ -409,7 +404,7 @@ static int acpi_battery_read_info(struct seq_file *seq, void *offset)
409 end: 404 end:
410 kfree(bif); 405 kfree(bif);
411 406
412 return_VALUE(0); 407 return 0;
413} 408}
414 409
415static int acpi_battery_info_open_fs(struct inode *inode, struct file *file) 410static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
@@ -424,7 +419,6 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
424 struct acpi_battery_status *bst = NULL; 419 struct acpi_battery_status *bst = NULL;
425 char *units = "?"; 420 char *units = "?";
426 421
427 ACPI_FUNCTION_TRACE("acpi_battery_read_state");
428 422
429 if (!battery) 423 if (!battery)
430 goto end; 424 goto end;
@@ -458,8 +452,6 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
458 if ((bst->state & 0x01) && (bst->state & 0x02)) { 452 if ((bst->state & 0x01) && (bst->state & 0x02)) {
459 seq_printf(seq, 453 seq_printf(seq,
460 "charging state: charging/discharging\n"); 454 "charging state: charging/discharging\n");
461 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
462 "Battery Charging and Discharging?\n"));
463 } else if (bst->state & 0x01) 455 } else if (bst->state & 0x01)
464 seq_printf(seq, "charging state: discharging\n"); 456 seq_printf(seq, "charging state: discharging\n");
465 else if (bst->state & 0x02) 457 else if (bst->state & 0x02)
@@ -489,7 +481,7 @@ static int acpi_battery_read_state(struct seq_file *seq, void *offset)
489 end: 481 end:
490 kfree(bst); 482 kfree(bst);
491 483
492 return_VALUE(0); 484 return 0;
493} 485}
494 486
495static int acpi_battery_state_open_fs(struct inode *inode, struct file *file) 487static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
@@ -502,7 +494,6 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
502 struct acpi_battery *battery = (struct acpi_battery *)seq->private; 494 struct acpi_battery *battery = (struct acpi_battery *)seq->private;
503 char *units = "?"; 495 char *units = "?";
504 496
505 ACPI_FUNCTION_TRACE("acpi_battery_read_alarm");
506 497
507 if (!battery) 498 if (!battery)
508 goto end; 499 goto end;
@@ -527,7 +518,7 @@ static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
527 seq_printf(seq, "%d %sh\n", (u32) battery->alarm, units); 518 seq_printf(seq, "%d %sh\n", (u32) battery->alarm, units);
528 519
529 end: 520 end:
530 return_VALUE(0); 521 return 0;
531} 522}
532 523
533static ssize_t 524static ssize_t
@@ -540,25 +531,24 @@ acpi_battery_write_alarm(struct file *file,
540 struct seq_file *m = (struct seq_file *)file->private_data; 531 struct seq_file *m = (struct seq_file *)file->private_data;
541 struct acpi_battery *battery = (struct acpi_battery *)m->private; 532 struct acpi_battery *battery = (struct acpi_battery *)m->private;
542 533
543 ACPI_FUNCTION_TRACE("acpi_battery_write_alarm");
544 534
545 if (!battery || (count > sizeof(alarm_string) - 1)) 535 if (!battery || (count > sizeof(alarm_string) - 1))
546 return_VALUE(-EINVAL); 536 return -EINVAL;
547 537
548 if (!battery->flags.present) 538 if (!battery->flags.present)
549 return_VALUE(-ENODEV); 539 return -ENODEV;
550 540
551 if (copy_from_user(alarm_string, buffer, count)) 541 if (copy_from_user(alarm_string, buffer, count))
552 return_VALUE(-EFAULT); 542 return -EFAULT;
553 543
554 alarm_string[count] = '\0'; 544 alarm_string[count] = '\0';
555 545
556 result = acpi_battery_set_alarm(battery, 546 result = acpi_battery_set_alarm(battery,
557 simple_strtoul(alarm_string, NULL, 0)); 547 simple_strtoul(alarm_string, NULL, 0));
558 if (result) 548 if (result)
559 return_VALUE(result); 549 return result;
560 550
561 return_VALUE(count); 551 return count;
562} 552}
563 553
564static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file) 554static int acpi_battery_alarm_open_fs(struct inode *inode, struct file *file)
@@ -595,13 +585,12 @@ static int acpi_battery_add_fs(struct acpi_device *device)
595{ 585{
596 struct proc_dir_entry *entry = NULL; 586 struct proc_dir_entry *entry = NULL;
597 587
598 ACPI_FUNCTION_TRACE("acpi_battery_add_fs");
599 588
600 if (!acpi_device_dir(device)) { 589 if (!acpi_device_dir(device)) {
601 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 590 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
602 acpi_battery_dir); 591 acpi_battery_dir);
603 if (!acpi_device_dir(device)) 592 if (!acpi_device_dir(device))
604 return_VALUE(-ENODEV); 593 return -ENODEV;
605 acpi_device_dir(device)->owner = THIS_MODULE; 594 acpi_device_dir(device)->owner = THIS_MODULE;
606 } 595 }
607 596
@@ -609,9 +598,7 @@ static int acpi_battery_add_fs(struct acpi_device *device)
609 entry = create_proc_entry(ACPI_BATTERY_FILE_INFO, 598 entry = create_proc_entry(ACPI_BATTERY_FILE_INFO,
610 S_IRUGO, acpi_device_dir(device)); 599 S_IRUGO, acpi_device_dir(device));
611 if (!entry) 600 if (!entry)
612 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 601 return -ENODEV;
613 "Unable to create '%s' fs entry\n",
614 ACPI_BATTERY_FILE_INFO));
615 else { 602 else {
616 entry->proc_fops = &acpi_battery_info_ops; 603 entry->proc_fops = &acpi_battery_info_ops;
617 entry->data = acpi_driver_data(device); 604 entry->data = acpi_driver_data(device);
@@ -622,9 +609,7 @@ static int acpi_battery_add_fs(struct acpi_device *device)
622 entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS, 609 entry = create_proc_entry(ACPI_BATTERY_FILE_STATUS,
623 S_IRUGO, acpi_device_dir(device)); 610 S_IRUGO, acpi_device_dir(device));
624 if (!entry) 611 if (!entry)
625 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 612 return -ENODEV;
626 "Unable to create '%s' fs entry\n",
627 ACPI_BATTERY_FILE_STATUS));
628 else { 613 else {
629 entry->proc_fops = &acpi_battery_state_ops; 614 entry->proc_fops = &acpi_battery_state_ops;
630 entry->data = acpi_driver_data(device); 615 entry->data = acpi_driver_data(device);
@@ -636,21 +621,18 @@ static int acpi_battery_add_fs(struct acpi_device *device)
636 S_IFREG | S_IRUGO | S_IWUSR, 621 S_IFREG | S_IRUGO | S_IWUSR,
637 acpi_device_dir(device)); 622 acpi_device_dir(device));
638 if (!entry) 623 if (!entry)
639 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 624 return -ENODEV;
640 "Unable to create '%s' fs entry\n",
641 ACPI_BATTERY_FILE_ALARM));
642 else { 625 else {
643 entry->proc_fops = &acpi_battery_alarm_ops; 626 entry->proc_fops = &acpi_battery_alarm_ops;
644 entry->data = acpi_driver_data(device); 627 entry->data = acpi_driver_data(device);
645 entry->owner = THIS_MODULE; 628 entry->owner = THIS_MODULE;
646 } 629 }
647 630
648 return_VALUE(0); 631 return 0;
649} 632}
650 633
651static int acpi_battery_remove_fs(struct acpi_device *device) 634static int acpi_battery_remove_fs(struct acpi_device *device)
652{ 635{
653 ACPI_FUNCTION_TRACE("acpi_battery_remove_fs");
654 636
655 if (acpi_device_dir(device)) { 637 if (acpi_device_dir(device)) {
656 remove_proc_entry(ACPI_BATTERY_FILE_ALARM, 638 remove_proc_entry(ACPI_BATTERY_FILE_ALARM,
@@ -664,7 +646,7 @@ static int acpi_battery_remove_fs(struct acpi_device *device)
664 acpi_device_dir(device) = NULL; 646 acpi_device_dir(device) = NULL;
665 } 647 }
666 648
667 return_VALUE(0); 649 return 0;
668} 650}
669 651
670/* -------------------------------------------------------------------------- 652/* --------------------------------------------------------------------------
@@ -676,13 +658,12 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
676 struct acpi_battery *battery = (struct acpi_battery *)data; 658 struct acpi_battery *battery = (struct acpi_battery *)data;
677 struct acpi_device *device = NULL; 659 struct acpi_device *device = NULL;
678 660
679 ACPI_FUNCTION_TRACE("acpi_battery_notify");
680 661
681 if (!battery) 662 if (!battery)
682 return_VOID; 663 return;
683 664
684 if (acpi_bus_get_device(handle, &device)) 665 if (acpi_bus_get_device(handle, &device))
685 return_VOID; 666 return;
686 667
687 switch (event) { 668 switch (event) {
688 case ACPI_BATTERY_NOTIFY_STATUS: 669 case ACPI_BATTERY_NOTIFY_STATUS:
@@ -696,7 +677,7 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
696 break; 677 break;
697 } 678 }
698 679
699 return_VOID; 680 return;
700} 681}
701 682
702static int acpi_battery_add(struct acpi_device *device) 683static int acpi_battery_add(struct acpi_device *device)
@@ -705,14 +686,13 @@ static int acpi_battery_add(struct acpi_device *device)
705 acpi_status status = 0; 686 acpi_status status = 0;
706 struct acpi_battery *battery = NULL; 687 struct acpi_battery *battery = NULL;
707 688
708 ACPI_FUNCTION_TRACE("acpi_battery_add");
709 689
710 if (!device) 690 if (!device)
711 return_VALUE(-EINVAL); 691 return -EINVAL;
712 692
713 battery = kmalloc(sizeof(struct acpi_battery), GFP_KERNEL); 693 battery = kmalloc(sizeof(struct acpi_battery), GFP_KERNEL);
714 if (!battery) 694 if (!battery)
715 return_VALUE(-ENOMEM); 695 return -ENOMEM;
716 memset(battery, 0, sizeof(struct acpi_battery)); 696 memset(battery, 0, sizeof(struct acpi_battery));
717 697
718 battery->handle = device->handle; 698 battery->handle = device->handle;
@@ -732,8 +712,6 @@ static int acpi_battery_add(struct acpi_device *device)
732 ACPI_DEVICE_NOTIFY, 712 ACPI_DEVICE_NOTIFY,
733 acpi_battery_notify, battery); 713 acpi_battery_notify, battery);
734 if (ACPI_FAILURE(status)) { 714 if (ACPI_FAILURE(status)) {
735 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
736 "Error installing notify handler\n"));
737 result = -ENODEV; 715 result = -ENODEV;
738 goto end; 716 goto end;
739 } 717 }
@@ -748,7 +726,7 @@ static int acpi_battery_add(struct acpi_device *device)
748 kfree(battery); 726 kfree(battery);
749 } 727 }
750 728
751 return_VALUE(result); 729 return result;
752} 730}
753 731
754static int acpi_battery_remove(struct acpi_device *device, int type) 732static int acpi_battery_remove(struct acpi_device *device, int type)
@@ -756,56 +734,50 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
756 acpi_status status = 0; 734 acpi_status status = 0;
757 struct acpi_battery *battery = NULL; 735 struct acpi_battery *battery = NULL;
758 736
759 ACPI_FUNCTION_TRACE("acpi_battery_remove");
760 737
761 if (!device || !acpi_driver_data(device)) 738 if (!device || !acpi_driver_data(device))
762 return_VALUE(-EINVAL); 739 return -EINVAL;
763 740
764 battery = (struct acpi_battery *)acpi_driver_data(device); 741 battery = (struct acpi_battery *)acpi_driver_data(device);
765 742
766 status = acpi_remove_notify_handler(battery->handle, 743 status = acpi_remove_notify_handler(battery->handle,
767 ACPI_DEVICE_NOTIFY, 744 ACPI_DEVICE_NOTIFY,
768 acpi_battery_notify); 745 acpi_battery_notify);
769 if (ACPI_FAILURE(status))
770 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
771 "Error removing notify handler\n"));
772 746
773 acpi_battery_remove_fs(device); 747 acpi_battery_remove_fs(device);
774 748
775 kfree(battery); 749 kfree(battery);
776 750
777 return_VALUE(0); 751 return 0;
778} 752}
779 753
780static int __init acpi_battery_init(void) 754static int __init acpi_battery_init(void)
781{ 755{
782 int result = 0; 756 int result = 0;
783 757
784 ACPI_FUNCTION_TRACE("acpi_battery_init");
785 758
786 acpi_battery_dir = proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir); 759 acpi_battery_dir = proc_mkdir(ACPI_BATTERY_CLASS, acpi_root_dir);
787 if (!acpi_battery_dir) 760 if (!acpi_battery_dir)
788 return_VALUE(-ENODEV); 761 return -ENODEV;
789 acpi_battery_dir->owner = THIS_MODULE; 762 acpi_battery_dir->owner = THIS_MODULE;
790 763
791 result = acpi_bus_register_driver(&acpi_battery_driver); 764 result = acpi_bus_register_driver(&acpi_battery_driver);
792 if (result < 0) { 765 if (result < 0) {
793 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); 766 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir);
794 return_VALUE(-ENODEV); 767 return -ENODEV;
795 } 768 }
796 769
797 return_VALUE(0); 770 return 0;
798} 771}
799 772
800static void __exit acpi_battery_exit(void) 773static void __exit acpi_battery_exit(void)
801{ 774{
802 ACPI_FUNCTION_TRACE("acpi_battery_exit");
803 775
804 acpi_bus_unregister_driver(&acpi_battery_driver); 776 acpi_bus_unregister_driver(&acpi_battery_driver);
805 777
806 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir); 778 remove_proc_entry(ACPI_BATTERY_CLASS, acpi_root_dir);
807 779
808 return_VOID; 780 return;
809} 781}
810 782
811module_init(acpi_battery_init); 783module_init(acpi_battery_init);
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index dd3983cece9..ea5a0496a4f 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -60,21 +60,19 @@ int acpi_bus_get_device(acpi_handle handle, struct acpi_device **device)
60{ 60{
61 acpi_status status = AE_OK; 61 acpi_status status = AE_OK;
62 62
63 ACPI_FUNCTION_TRACE("acpi_bus_get_device");
64 63
65 if (!device) 64 if (!device)
66 return_VALUE(-EINVAL); 65 return -EINVAL;
67 66
68 /* TBD: Support fixed-feature devices */ 67 /* TBD: Support fixed-feature devices */
69 68
70 status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device); 69 status = acpi_get_data(handle, acpi_bus_data_handler, (void **)device);
71 if (ACPI_FAILURE(status) || !*device) { 70 if (ACPI_FAILURE(status) || !*device) {
72 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "No context for object [%p]\n", 71 ACPI_EXCEPTION((AE_INFO, status, "No context for object [%p]", handle));
73 handle)); 72 return -ENODEV;
74 return_VALUE(-ENODEV);
75 } 73 }
76 74
77 return_VALUE(0); 75 return 0;
78} 76}
79 77
80EXPORT_SYMBOL(acpi_bus_get_device); 78EXPORT_SYMBOL(acpi_bus_get_device);
@@ -84,10 +82,9 @@ int acpi_bus_get_status(struct acpi_device *device)
84 acpi_status status = AE_OK; 82 acpi_status status = AE_OK;
85 unsigned long sta = 0; 83 unsigned long sta = 0;
86 84
87 ACPI_FUNCTION_TRACE("acpi_bus_get_status");
88 85
89 if (!device) 86 if (!device)
90 return_VALUE(-EINVAL); 87 return -EINVAL;
91 88
92 /* 89 /*
93 * Evaluate _STA if present. 90 * Evaluate _STA if present.
@@ -96,7 +93,7 @@ int acpi_bus_get_status(struct acpi_device *device)
96 status = 93 status =
97 acpi_evaluate_integer(device->handle, "_STA", NULL, &sta); 94 acpi_evaluate_integer(device->handle, "_STA", NULL, &sta);
98 if (ACPI_FAILURE(status)) 95 if (ACPI_FAILURE(status))
99 return_VALUE(-ENODEV); 96 return -ENODEV;
100 STRUCT_TO_INT(device->status) = (int)sta; 97 STRUCT_TO_INT(device->status) = (int)sta;
101 } 98 }
102 99
@@ -120,7 +117,7 @@ int acpi_bus_get_status(struct acpi_device *device)
120 device->pnp.bus_id, 117 device->pnp.bus_id,
121 (u32) STRUCT_TO_INT(device->status))); 118 (u32) STRUCT_TO_INT(device->status)));
122 119
123 return_VALUE(0); 120 return 0;
124} 121}
125 122
126EXPORT_SYMBOL(acpi_bus_get_status); 123EXPORT_SYMBOL(acpi_bus_get_status);
@@ -136,11 +133,10 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
136 struct acpi_device *device = NULL; 133 struct acpi_device *device = NULL;
137 unsigned long psc = 0; 134 unsigned long psc = 0;
138 135
139 ACPI_FUNCTION_TRACE("acpi_bus_get_power");
140 136
141 result = acpi_bus_get_device(handle, &device); 137 result = acpi_bus_get_device(handle, &device);
142 if (result) 138 if (result)
143 return_VALUE(result); 139 return result;
144 140
145 *state = ACPI_STATE_UNKNOWN; 141 *state = ACPI_STATE_UNKNOWN;
146 142
@@ -159,12 +155,12 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
159 status = acpi_evaluate_integer(device->handle, "_PSC", 155 status = acpi_evaluate_integer(device->handle, "_PSC",
160 NULL, &psc); 156 NULL, &psc);
161 if (ACPI_FAILURE(status)) 157 if (ACPI_FAILURE(status))
162 return_VALUE(-ENODEV); 158 return -ENODEV;
163 device->power.state = (int)psc; 159 device->power.state = (int)psc;
164 } else if (device->power.flags.power_resources) { 160 } else if (device->power.flags.power_resources) {
165 result = acpi_power_get_inferred_state(device); 161 result = acpi_power_get_inferred_state(device);
166 if (result) 162 if (result)
167 return_VALUE(result); 163 return result;
168 } 164 }
169 165
170 *state = device->power.state; 166 *state = device->power.state;
@@ -173,7 +169,7 @@ int acpi_bus_get_power(acpi_handle handle, int *state)
173 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] power state is D%d\n", 169 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device [%s] power state is D%d\n",
174 device->pnp.bus_id, device->power.state)); 170 device->pnp.bus_id, device->power.state));
175 171
176 return_VALUE(0); 172 return 0;
177} 173}
178 174
179EXPORT_SYMBOL(acpi_bus_get_power); 175EXPORT_SYMBOL(acpi_bus_get_power);
@@ -185,21 +181,20 @@ int acpi_bus_set_power(acpi_handle handle, int state)
185 struct acpi_device *device = NULL; 181 struct acpi_device *device = NULL;
186 char object_name[5] = { '_', 'P', 'S', '0' + state, '\0' }; 182 char object_name[5] = { '_', 'P', 'S', '0' + state, '\0' };
187 183
188 ACPI_FUNCTION_TRACE("acpi_bus_set_power");
189 184
190 result = acpi_bus_get_device(handle, &device); 185 result = acpi_bus_get_device(handle, &device);
191 if (result) 186 if (result)
192 return_VALUE(result); 187 return result;
193 188
194 if ((state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) 189 if ((state < ACPI_STATE_D0) || (state > ACPI_STATE_D3))
195 return_VALUE(-EINVAL); 190 return -EINVAL;
196 191
197 /* Make sure this is a valid target state */ 192 /* Make sure this is a valid target state */
198 193
199 if (!device->flags.power_manageable) { 194 if (!device->flags.power_manageable) {
200 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 195 printk(KERN_DEBUG "Device `[%s]' is not power manageable",
201 "Device is not power manageable\n")); 196 device->kobj.name);
202 return_VALUE(-ENODEV); 197 return -ENODEV;
203 } 198 }
204 /* 199 /*
205 * Get device's current power state if it's unknown 200 * Get device's current power state if it's unknown
@@ -211,18 +206,18 @@ int acpi_bus_set_power(acpi_handle handle, int state)
211 if (state == device->power.state) { 206 if (state == device->power.state) {
212 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n", 207 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device is already at D%d\n",
213 state)); 208 state));
214 return_VALUE(0); 209 return 0;
215 } 210 }
216 } 211 }
217 if (!device->power.states[state].flags.valid) { 212 if (!device->power.states[state].flags.valid) {
218 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Device does not support D%d\n", 213 printk(KERN_WARNING PREFIX "Device does not support D%d\n", state);
219 state)); 214 return -ENODEV;
220 return_VALUE(-ENODEV);
221 } 215 }
222 if (device->parent && (state < device->parent->power.state)) { 216 if (device->parent && (state < device->parent->power.state)) {
223 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 217 printk(KERN_WARNING PREFIX
224 "Cannot set device to a higher-powered state than parent\n")); 218 "Cannot set device to a higher-powered"
225 return_VALUE(-ENODEV); 219 " state than parent\n");
220 return -ENODEV;
226 } 221 }
227 222
228 /* 223 /*
@@ -264,15 +259,15 @@ int acpi_bus_set_power(acpi_handle handle, int state)
264 259
265 end: 260 end:
266 if (result) 261 if (result)
267 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 262 printk(KERN_WARNING PREFIX
268 "Error transitioning device [%s] to D%d\n", 263 "Transitioning device [%s] to D%d\n",
269 device->pnp.bus_id, state)); 264 device->pnp.bus_id, state);
270 else 265 else
271 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 266 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
272 "Device [%s] transitioned to D%d\n", 267 "Device [%s] transitioned to D%d\n",
273 device->pnp.bus_id, state)); 268 device->pnp.bus_id, state));
274 269
275 return_VALUE(result); 270 return result;
276} 271}
277 272
278EXPORT_SYMBOL(acpi_bus_set_power); 273EXPORT_SYMBOL(acpi_bus_set_power);
@@ -293,18 +288,17 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
293 struct acpi_bus_event *event = NULL; 288 struct acpi_bus_event *event = NULL;
294 unsigned long flags = 0; 289 unsigned long flags = 0;
295 290
296 ACPI_FUNCTION_TRACE("acpi_bus_generate_event");
297 291
298 if (!device) 292 if (!device)
299 return_VALUE(-EINVAL); 293 return -EINVAL;
300 294
301 /* drop event on the floor if no one's listening */ 295 /* drop event on the floor if no one's listening */
302 if (!event_is_open) 296 if (!event_is_open)
303 return_VALUE(0); 297 return 0;
304 298
305 event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC); 299 event = kmalloc(sizeof(struct acpi_bus_event), GFP_ATOMIC);
306 if (!event) 300 if (!event)
307 return_VALUE(-ENOMEM); 301 return -ENOMEM;
308 302
309 strcpy(event->device_class, device->pnp.device_class); 303 strcpy(event->device_class, device->pnp.device_class);
310 strcpy(event->bus_id, device->pnp.bus_id); 304 strcpy(event->bus_id, device->pnp.bus_id);
@@ -317,7 +311,7 @@ int acpi_bus_generate_event(struct acpi_device *device, u8 type, int data)
317 311
318 wake_up_interruptible(&acpi_bus_event_queue); 312 wake_up_interruptible(&acpi_bus_event_queue);
319 313
320 return_VALUE(0); 314 return 0;
321} 315}
322 316
323EXPORT_SYMBOL(acpi_bus_generate_event); 317EXPORT_SYMBOL(acpi_bus_generate_event);
@@ -329,10 +323,9 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
329 323
330 DECLARE_WAITQUEUE(wait, current); 324 DECLARE_WAITQUEUE(wait, current);
331 325
332 ACPI_FUNCTION_TRACE("acpi_bus_receive_event");
333 326
334 if (!event) 327 if (!event)
335 return_VALUE(-EINVAL); 328 return -EINVAL;
336 329
337 if (list_empty(&acpi_bus_event_list)) { 330 if (list_empty(&acpi_bus_event_list)) {
338 331
@@ -346,7 +339,7 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
346 set_current_state(TASK_RUNNING); 339 set_current_state(TASK_RUNNING);
347 340
348 if (signal_pending(current)) 341 if (signal_pending(current))
349 return_VALUE(-ERESTARTSYS); 342 return -ERESTARTSYS;
350 } 343 }
351 344
352 spin_lock_irqsave(&acpi_bus_event_lock, flags); 345 spin_lock_irqsave(&acpi_bus_event_lock, flags);
@@ -357,13 +350,13 @@ int acpi_bus_receive_event(struct acpi_bus_event *event)
357 spin_unlock_irqrestore(&acpi_bus_event_lock, flags); 350 spin_unlock_irqrestore(&acpi_bus_event_lock, flags);
358 351
359 if (!entry) 352 if (!entry)
360 return_VALUE(-ENODEV); 353 return -ENODEV;
361 354
362 memcpy(event, entry, sizeof(struct acpi_bus_event)); 355 memcpy(event, entry, sizeof(struct acpi_bus_event));
363 356
364 kfree(entry); 357 kfree(entry);
365 358
366 return_VALUE(0); 359 return 0;
367} 360}
368 361
369EXPORT_SYMBOL(acpi_bus_receive_event); 362EXPORT_SYMBOL(acpi_bus_receive_event);
@@ -378,10 +371,9 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
378 acpi_status status = 0; 371 acpi_status status = 0;
379 struct acpi_device_status old_status; 372 struct acpi_device_status old_status;
380 373
381 ACPI_FUNCTION_TRACE("acpi_bus_check_device");
382 374
383 if (!device) 375 if (!device)
384 return_VALUE(-EINVAL); 376 return -EINVAL;
385 377
386 if (status_changed) 378 if (status_changed)
387 *status_changed = 0; 379 *status_changed = 0;
@@ -398,15 +390,15 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
398 if (status_changed) 390 if (status_changed)
399 *status_changed = 1; 391 *status_changed = 1;
400 } 392 }
401 return_VALUE(0); 393 return 0;
402 } 394 }
403 395
404 status = acpi_bus_get_status(device); 396 status = acpi_bus_get_status(device);
405 if (ACPI_FAILURE(status)) 397 if (ACPI_FAILURE(status))
406 return_VALUE(-ENODEV); 398 return -ENODEV;
407 399
408 if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status)) 400 if (STRUCT_TO_INT(old_status) == STRUCT_TO_INT(device->status))
409 return_VALUE(0); 401 return 0;
410 402
411 if (status_changed) 403 if (status_changed)
412 *status_changed = 1; 404 *status_changed = 1;
@@ -422,7 +414,7 @@ acpi_bus_check_device(struct acpi_device *device, int *status_changed)
422 /* TBD: Handle device removal */ 414 /* TBD: Handle device removal */
423 } 415 }
424 416
425 return_VALUE(0); 417 return 0;
426} 418}
427 419
428static int acpi_bus_check_scope(struct acpi_device *device) 420static int acpi_bus_check_scope(struct acpi_device *device)
@@ -430,25 +422,24 @@ static int acpi_bus_check_scope(struct acpi_device *device)
430 int result = 0; 422 int result = 0;
431 int status_changed = 0; 423 int status_changed = 0;
432 424
433 ACPI_FUNCTION_TRACE("acpi_bus_check_scope");
434 425
435 if (!device) 426 if (!device)
436 return_VALUE(-EINVAL); 427 return -EINVAL;
437 428
438 /* Status Change? */ 429 /* Status Change? */
439 result = acpi_bus_check_device(device, &status_changed); 430 result = acpi_bus_check_device(device, &status_changed);
440 if (result) 431 if (result)
441 return_VALUE(result); 432 return result;
442 433
443 if (!status_changed) 434 if (!status_changed)
444 return_VALUE(0); 435 return 0;
445 436
446 /* 437 /*
447 * TBD: Enumerate child devices within this device's scope and 438 * TBD: Enumerate child devices within this device's scope and
448 * run acpi_bus_check_device()'s on them. 439 * run acpi_bus_check_device()'s on them.
449 */ 440 */
450 441
451 return_VALUE(0); 442 return 0;
452} 443}
453 444
454/** 445/**
@@ -461,10 +452,9 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
461 int result = 0; 452 int result = 0;
462 struct acpi_device *device = NULL; 453 struct acpi_device *device = NULL;
463 454
464 ACPI_FUNCTION_TRACE("acpi_bus_notify");
465 455
466 if (acpi_bus_get_device(handle, &device)) 456 if (acpi_bus_get_device(handle, &device))
467 return_VOID; 457 return;
468 458
469 switch (type) { 459 switch (type) {
470 460
@@ -539,7 +529,7 @@ static void acpi_bus_notify(acpi_handle handle, u32 type, void *data)
539 break; 529 break;
540 } 530 }
541 531
542 return_VOID; 532 return;
543} 533}
544 534
545/* -------------------------------------------------------------------------- 535/* --------------------------------------------------------------------------
@@ -553,7 +543,6 @@ static int __init acpi_bus_init_irq(void)
553 struct acpi_object_list arg_list = { 1, &arg }; 543 struct acpi_object_list arg_list = { 1, &arg };
554 char *message = NULL; 544 char *message = NULL;
555 545
556 ACPI_FUNCTION_TRACE("acpi_bus_init_irq");
557 546
558 /* 547 /*
559 * Let the system know what interrupt model we are using by 548 * Let the system know what interrupt model we are using by
@@ -572,7 +561,7 @@ static int __init acpi_bus_init_irq(void)
572 break; 561 break;
573 default: 562 default:
574 printk(KERN_WARNING PREFIX "Unknown interrupt routing model\n"); 563 printk(KERN_WARNING PREFIX "Unknown interrupt routing model\n");
575 return_VALUE(-ENODEV); 564 return -ENODEV;
576 } 565 }
577 566
578 printk(KERN_INFO PREFIX "Using %s for interrupt routing\n", message); 567 printk(KERN_INFO PREFIX "Using %s for interrupt routing\n", message);
@@ -581,11 +570,11 @@ static int __init acpi_bus_init_irq(void)
581 570
582 status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL); 571 status = acpi_evaluate_object(NULL, "\\_PIC", &arg_list, NULL);
583 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 572 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
584 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PIC\n")); 573 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PIC"));
585 return_VALUE(-ENODEV); 574 return -ENODEV;
586 } 575 }
587 576
588 return_VALUE(0); 577 return 0;
589} 578}
590 579
591void __init acpi_early_init(void) 580void __init acpi_early_init(void)
@@ -593,10 +582,9 @@ void __init acpi_early_init(void)
593 acpi_status status = AE_OK; 582 acpi_status status = AE_OK;
594 struct acpi_buffer buffer = { sizeof(acpi_fadt), &acpi_fadt }; 583 struct acpi_buffer buffer = { sizeof(acpi_fadt), &acpi_fadt };
595 584
596 ACPI_FUNCTION_TRACE("acpi_early_init");
597 585
598 if (acpi_disabled) 586 if (acpi_disabled)
599 return_VOID; 587 return;
600 588
601 printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION); 589 printk(KERN_INFO PREFIX "Core revision %08x\n", ACPI_CA_VERSION);
602 590
@@ -656,11 +644,11 @@ void __init acpi_early_init(void)
656 goto error0; 644 goto error0;
657 } 645 }
658 646
659 return_VOID; 647 return;
660 648
661 error0: 649 error0:
662 disable_acpi(); 650 disable_acpi();
663 return_VOID; 651 return;
664} 652}
665 653
666static int __init acpi_bus_init(void) 654static int __init acpi_bus_init(void)
@@ -669,7 +657,6 @@ static int __init acpi_bus_init(void)
669 acpi_status status = AE_OK; 657 acpi_status status = AE_OK;
670 extern acpi_status acpi_os_initialize1(void); 658 extern acpi_status acpi_os_initialize1(void);
671 659
672 ACPI_FUNCTION_TRACE("acpi_bus_init");
673 660
674 status = acpi_os_initialize1(); 661 status = acpi_os_initialize1();
675 662
@@ -731,12 +718,12 @@ static int __init acpi_bus_init(void)
731 */ 718 */
732 acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL); 719 acpi_root_dir = proc_mkdir(ACPI_BUS_FILE_ROOT, NULL);
733 720
734 return_VALUE(0); 721 return 0;
735 722
736 /* Mimic structured exception handling */ 723 /* Mimic structured exception handling */
737 error1: 724 error1:
738 acpi_terminate(); 725 acpi_terminate();
739 return_VALUE(-ENODEV); 726 return -ENODEV;
740} 727}
741 728
742decl_subsys(acpi, NULL, NULL); 729decl_subsys(acpi, NULL, NULL);
@@ -745,11 +732,10 @@ static int __init acpi_init(void)
745{ 732{
746 int result = 0; 733 int result = 0;
747 734
748 ACPI_FUNCTION_TRACE("acpi_init");
749 735
750 if (acpi_disabled) { 736 if (acpi_disabled) {
751 printk(KERN_INFO PREFIX "Interpreter disabled.\n"); 737 printk(KERN_INFO PREFIX "Interpreter disabled.\n");
752 return_VALUE(-ENODEV); 738 return -ENODEV;
753 } 739 }
754 740
755 firmware_register(&acpi_subsys); 741 firmware_register(&acpi_subsys);
@@ -770,7 +756,7 @@ static int __init acpi_init(void)
770 } else 756 } else
771 disable_acpi(); 757 disable_acpi();
772 758
773 return_VALUE(result); 759 return result;
774} 760}
775 761
776subsys_initcall(acpi_init); 762subsys_initcall(acpi_init);
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 4b6d9f0096a..02594639c4d 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -112,15 +112,14 @@ static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
112{ 112{
113 struct acpi_button *button = (struct acpi_button *)seq->private; 113 struct acpi_button *button = (struct acpi_button *)seq->private;
114 114
115 ACPI_FUNCTION_TRACE("acpi_button_info_seq_show");
116 115
117 if (!button || !button->device) 116 if (!button || !button->device)
118 return_VALUE(0); 117 return 0;
119 118
120 seq_printf(seq, "type: %s\n", 119 seq_printf(seq, "type: %s\n",
121 acpi_device_name(button->device)); 120 acpi_device_name(button->device));
122 121
123 return_VALUE(0); 122 return 0;
124} 123}
125 124
126static int acpi_button_info_open_fs(struct inode *inode, struct file *file) 125static int acpi_button_info_open_fs(struct inode *inode, struct file *file)
@@ -134,10 +133,9 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
134 acpi_status status; 133 acpi_status status;
135 unsigned long state; 134 unsigned long state;
136 135
137 ACPI_FUNCTION_TRACE("acpi_button_state_seq_show");
138 136
139 if (!button || !button->device) 137 if (!button || !button->device)
140 return_VALUE(0); 138 return 0;
141 139
142 status = acpi_evaluate_integer(button->handle, "_LID", NULL, &state); 140 status = acpi_evaluate_integer(button->handle, "_LID", NULL, &state);
143 if (ACPI_FAILURE(status)) { 141 if (ACPI_FAILURE(status)) {
@@ -147,7 +145,7 @@ static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
147 (state ? "open" : "closed")); 145 (state ? "open" : "closed"));
148 } 146 }
149 147
150 return_VALUE(0); 148 return 0;
151} 149}
152 150
153static int acpi_button_state_open_fs(struct inode *inode, struct file *file) 151static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
@@ -164,10 +162,9 @@ static int acpi_button_add_fs(struct acpi_device *device)
164 struct proc_dir_entry *entry = NULL; 162 struct proc_dir_entry *entry = NULL;
165 struct acpi_button *button = NULL; 163 struct acpi_button *button = NULL;
166 164
167 ACPI_FUNCTION_TRACE("acpi_button_add_fs");
168 165
169 if (!device || !acpi_driver_data(device)) 166 if (!device || !acpi_driver_data(device))
170 return_VALUE(-EINVAL); 167 return -EINVAL;
171 168
172 button = acpi_driver_data(device); 169 button = acpi_driver_data(device);
173 170
@@ -195,21 +192,19 @@ static int acpi_button_add_fs(struct acpi_device *device)
195 } 192 }
196 193
197 if (!entry) 194 if (!entry)
198 return_VALUE(-ENODEV); 195 return -ENODEV;
199 entry->owner = THIS_MODULE; 196 entry->owner = THIS_MODULE;
200 197
201 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), entry); 198 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), entry);
202 if (!acpi_device_dir(device)) 199 if (!acpi_device_dir(device))
203 return_VALUE(-ENODEV); 200 return -ENODEV;
204 acpi_device_dir(device)->owner = THIS_MODULE; 201 acpi_device_dir(device)->owner = THIS_MODULE;
205 202
206 /* 'info' [R] */ 203 /* 'info' [R] */
207 entry = create_proc_entry(ACPI_BUTTON_FILE_INFO, 204 entry = create_proc_entry(ACPI_BUTTON_FILE_INFO,
208 S_IRUGO, acpi_device_dir(device)); 205 S_IRUGO, acpi_device_dir(device));
209 if (!entry) 206 if (!entry)
210 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 207 return -ENODEV;
211 "Unable to create '%s' fs entry\n",
212 ACPI_BUTTON_FILE_INFO));
213 else { 208 else {
214 entry->proc_fops = &acpi_button_info_fops; 209 entry->proc_fops = &acpi_button_info_fops;
215 entry->data = acpi_driver_data(device); 210 entry->data = acpi_driver_data(device);
@@ -221,9 +216,7 @@ static int acpi_button_add_fs(struct acpi_device *device)
221 entry = create_proc_entry(ACPI_BUTTON_FILE_STATE, 216 entry = create_proc_entry(ACPI_BUTTON_FILE_STATE,
222 S_IRUGO, acpi_device_dir(device)); 217 S_IRUGO, acpi_device_dir(device));
223 if (!entry) 218 if (!entry)
224 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 219 return -ENODEV;
225 "Unable to create '%s' fs entry\n",
226 ACPI_BUTTON_FILE_INFO));
227 else { 220 else {
228 entry->proc_fops = &acpi_button_state_fops; 221 entry->proc_fops = &acpi_button_state_fops;
229 entry->data = acpi_driver_data(device); 222 entry->data = acpi_driver_data(device);
@@ -231,14 +224,13 @@ static int acpi_button_add_fs(struct acpi_device *device)
231 } 224 }
232 } 225 }
233 226
234 return_VALUE(0); 227 return 0;
235} 228}
236 229
237static int acpi_button_remove_fs(struct acpi_device *device) 230static int acpi_button_remove_fs(struct acpi_device *device)
238{ 231{
239 struct acpi_button *button = NULL; 232 struct acpi_button *button = NULL;
240 233
241 ACPI_FUNCTION_TRACE("acpi_button_remove_fs");
242 234
243 button = acpi_driver_data(device); 235 button = acpi_driver_data(device);
244 if (acpi_device_dir(device)) { 236 if (acpi_device_dir(device)) {
@@ -253,7 +245,7 @@ static int acpi_button_remove_fs(struct acpi_device *device)
253 acpi_device_dir(device) = NULL; 245 acpi_device_dir(device) = NULL;
254 } 246 }
255 247
256 return_VALUE(0); 248 return 0;
257} 249}
258 250
259/* -------------------------------------------------------------------------- 251/* --------------------------------------------------------------------------
@@ -264,10 +256,9 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
264{ 256{
265 struct acpi_button *button = (struct acpi_button *)data; 257 struct acpi_button *button = (struct acpi_button *)data;
266 258
267 ACPI_FUNCTION_TRACE("acpi_button_notify");
268 259
269 if (!button || !button->device) 260 if (!button || !button->device)
270 return_VOID; 261 return;
271 262
272 switch (event) { 263 switch (event) {
273 case ACPI_BUTTON_NOTIFY_STATUS: 264 case ACPI_BUTTON_NOTIFY_STATUS:
@@ -280,21 +271,20 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
280 break; 271 break;
281 } 272 }
282 273
283 return_VOID; 274 return;
284} 275}
285 276
286static acpi_status acpi_button_notify_fixed(void *data) 277static acpi_status acpi_button_notify_fixed(void *data)
287{ 278{
288 struct acpi_button *button = (struct acpi_button *)data; 279 struct acpi_button *button = (struct acpi_button *)data;
289 280
290 ACPI_FUNCTION_TRACE("acpi_button_notify_fixed");
291 281
292 if (!button) 282 if (!button)
293 return_ACPI_STATUS(AE_BAD_PARAMETER); 283 return AE_BAD_PARAMETER;
294 284
295 acpi_button_notify(button->handle, ACPI_BUTTON_NOTIFY_STATUS, button); 285 acpi_button_notify(button->handle, ACPI_BUTTON_NOTIFY_STATUS, button);
296 286
297 return_ACPI_STATUS(AE_OK); 287 return AE_OK;
298} 288}
299 289
300static int acpi_button_add(struct acpi_device *device) 290static int acpi_button_add(struct acpi_device *device)
@@ -303,14 +293,13 @@ static int acpi_button_add(struct acpi_device *device)
303 acpi_status status = AE_OK; 293 acpi_status status = AE_OK;
304 struct acpi_button *button = NULL; 294 struct acpi_button *button = NULL;
305 295
306 ACPI_FUNCTION_TRACE("acpi_button_add");
307 296
308 if (!device) 297 if (!device)
309 return_VALUE(-EINVAL); 298 return -EINVAL;
310 299
311 button = kmalloc(sizeof(struct acpi_button), GFP_KERNEL); 300 button = kmalloc(sizeof(struct acpi_button), GFP_KERNEL);
312 if (!button) 301 if (!button)
313 return_VALUE(-ENOMEM); 302 return -ENOMEM;
314 memset(button, 0, sizeof(struct acpi_button)); 303 memset(button, 0, sizeof(struct acpi_button));
315 304
316 button->device = device; 305 button->device = device;
@@ -349,8 +338,8 @@ static int acpi_button_add(struct acpi_device *device)
349 sprintf(acpi_device_class(device), "%s/%s", 338 sprintf(acpi_device_class(device), "%s/%s",
350 ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID); 339 ACPI_BUTTON_CLASS, ACPI_BUTTON_SUBCLASS_LID);
351 } else { 340 } else {
352 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unsupported hid [%s]\n", 341 printk(KERN_ERR PREFIX "Unsupported hid [%s]\n",
353 acpi_device_hid(device))); 342 acpi_device_hid(device));
354 result = -ENODEV; 343 result = -ENODEV;
355 goto end; 344 goto end;
356 } 345 }
@@ -381,8 +370,6 @@ static int acpi_button_add(struct acpi_device *device)
381 } 370 }
382 371
383 if (ACPI_FAILURE(status)) { 372 if (ACPI_FAILURE(status)) {
384 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
385 "Error installing notify handler\n"));
386 result = -ENODEV; 373 result = -ENODEV;
387 goto end; 374 goto end;
388 } 375 }
@@ -406,7 +393,7 @@ static int acpi_button_add(struct acpi_device *device)
406 kfree(button); 393 kfree(button);
407 } 394 }
408 395
409 return_VALUE(result); 396 return result;
410} 397}
411 398
412static int acpi_button_remove(struct acpi_device *device, int type) 399static int acpi_button_remove(struct acpi_device *device, int type)
@@ -414,10 +401,9 @@ static int acpi_button_remove(struct acpi_device *device, int type)
414 acpi_status status = 0; 401 acpi_status status = 0;
415 struct acpi_button *button = NULL; 402 struct acpi_button *button = NULL;
416 403
417 ACPI_FUNCTION_TRACE("acpi_button_remove");
418 404
419 if (!device || !acpi_driver_data(device)) 405 if (!device || !acpi_driver_data(device))
420 return_VALUE(-EINVAL); 406 return -EINVAL;
421 407
422 button = acpi_driver_data(device); 408 button = acpi_driver_data(device);
423 409
@@ -440,39 +426,33 @@ static int acpi_button_remove(struct acpi_device *device, int type)
440 break; 426 break;
441 } 427 }
442 428
443 if (ACPI_FAILURE(status))
444 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
445 "Error removing notify handler\n"));
446
447 acpi_button_remove_fs(device); 429 acpi_button_remove_fs(device);
448 430
449 kfree(button); 431 kfree(button);
450 432
451 return_VALUE(0); 433 return 0;
452} 434}
453 435
454static int __init acpi_button_init(void) 436static int __init acpi_button_init(void)
455{ 437{
456 int result = 0; 438 int result = 0;
457 439
458 ACPI_FUNCTION_TRACE("acpi_button_init");
459 440
460 acpi_button_dir = proc_mkdir(ACPI_BUTTON_CLASS, acpi_root_dir); 441 acpi_button_dir = proc_mkdir(ACPI_BUTTON_CLASS, acpi_root_dir);
461 if (!acpi_button_dir) 442 if (!acpi_button_dir)
462 return_VALUE(-ENODEV); 443 return -ENODEV;
463 acpi_button_dir->owner = THIS_MODULE; 444 acpi_button_dir->owner = THIS_MODULE;
464 result = acpi_bus_register_driver(&acpi_button_driver); 445 result = acpi_bus_register_driver(&acpi_button_driver);
465 if (result < 0) { 446 if (result < 0) {
466 remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir); 447 remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
467 return_VALUE(-ENODEV); 448 return -ENODEV;
468 } 449 }
469 450
470 return_VALUE(0); 451 return 0;
471} 452}
472 453
473static void __exit acpi_button_exit(void) 454static void __exit acpi_button_exit(void)
474{ 455{
475 ACPI_FUNCTION_TRACE("acpi_button_exit");
476 456
477 acpi_bus_unregister_driver(&acpi_button_driver); 457 acpi_bus_unregister_driver(&acpi_button_driver);
478 458
@@ -484,7 +464,7 @@ static void __exit acpi_button_exit(void)
484 remove_proc_entry(ACPI_BUTTON_SUBCLASS_LID, acpi_button_dir); 464 remove_proc_entry(ACPI_BUTTON_SUBCLASS_LID, acpi_button_dir);
485 remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir); 465 remove_proc_entry(ACPI_BUTTON_CLASS, acpi_root_dir);
486 466
487 return_VOID; 467 return;
488} 468}
489 469
490module_init(acpi_button_init); 470module_init(acpi_button_init);
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index b69a8cad82b..7f7e41d40a3 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -73,17 +73,16 @@ static int is_device_present(acpi_handle handle)
73 acpi_status status; 73 acpi_status status;
74 unsigned long sta; 74 unsigned long sta;
75 75
76 ACPI_FUNCTION_TRACE("is_device_present");
77 76
78 status = acpi_get_handle(handle, "_STA", &temp); 77 status = acpi_get_handle(handle, "_STA", &temp);
79 if (ACPI_FAILURE(status)) 78 if (ACPI_FAILURE(status))
80 return_VALUE(1); /* _STA not found, assmue device present */ 79 return 1; /* _STA not found, assmue device present */
81 80
82 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 81 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
83 if (ACPI_FAILURE(status)) 82 if (ACPI_FAILURE(status))
84 return_VALUE(0); /* Firmware error */ 83 return 0; /* Firmware error */
85 84
86 return_VALUE((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); 85 return ((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT);
87} 86}
88 87
89/*******************************************************************/ 88/*******************************************************************/
@@ -91,16 +90,15 @@ static int acpi_container_add(struct acpi_device *device)
91{ 90{
92 struct acpi_container *container; 91 struct acpi_container *container;
93 92
94 ACPI_FUNCTION_TRACE("acpi_container_add");
95 93
96 if (!device) { 94 if (!device) {
97 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "device is NULL\n")); 95 printk(KERN_ERR PREFIX "device is NULL\n");
98 return_VALUE(-EINVAL); 96 return -EINVAL;
99 } 97 }
100 98
101 container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL); 99 container = kmalloc(sizeof(struct acpi_container), GFP_KERNEL);
102 if (!container) 100 if (!container)
103 return_VALUE(-ENOMEM); 101 return -ENOMEM;
104 102
105 memset(container, 0, sizeof(struct acpi_container)); 103 memset(container, 0, sizeof(struct acpi_container));
106 container->handle = device->handle; 104 container->handle = device->handle;
@@ -111,7 +109,7 @@ static int acpi_container_add(struct acpi_device *device)
111 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n", 109 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device <%s> bid <%s>\n",
112 acpi_device_name(device), acpi_device_bid(device))); 110 acpi_device_name(device), acpi_device_bid(device)));
113 111
114 return_VALUE(0); 112 return 0;
115} 113}
116 114
117static int acpi_container_remove(struct acpi_device *device, int type) 115static int acpi_container_remove(struct acpi_device *device, int type)
@@ -130,23 +128,22 @@ static int container_device_add(struct acpi_device **device, acpi_handle handle)
130 struct acpi_device *pdev; 128 struct acpi_device *pdev;
131 int result; 129 int result;
132 130
133 ACPI_FUNCTION_TRACE("container_device_add");
134 131
135 if (acpi_get_parent(handle, &phandle)) { 132 if (acpi_get_parent(handle, &phandle)) {
136 return_VALUE(-ENODEV); 133 return -ENODEV;
137 } 134 }
138 135
139 if (acpi_bus_get_device(phandle, &pdev)) { 136 if (acpi_bus_get_device(phandle, &pdev)) {
140 return_VALUE(-ENODEV); 137 return -ENODEV;
141 } 138 }
142 139
143 if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) { 140 if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_DEVICE)) {
144 return_VALUE(-ENODEV); 141 return -ENODEV;
145 } 142 }
146 143
147 result = acpi_bus_start(*device); 144 result = acpi_bus_start(*device);
148 145
149 return_VALUE(result); 146 return result;
150} 147}
151 148
152static void container_notify_cb(acpi_handle handle, u32 type, void *context) 149static void container_notify_cb(acpi_handle handle, u32 type, void *context)
@@ -156,7 +153,6 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)
156 int present; 153 int present;
157 acpi_status status; 154 acpi_status status;
158 155
159 ACPI_FUNCTION_TRACE("container_notify_cb");
160 156
161 present = is_device_present(handle); 157 present = is_device_present(handle);
162 158
@@ -192,7 +188,7 @@ static void container_notify_cb(acpi_handle handle, u32 type, void *context)
192 default: 188 default:
193 break; 189 break;
194 } 190 }
195 return_VOID; 191 return;
196} 192}
197 193
198static acpi_status 194static acpi_status
@@ -205,11 +201,10 @@ container_walk_namespace_cb(acpi_handle handle,
205 acpi_status status; 201 acpi_status status;
206 int *action = context; 202 int *action = context;
207 203
208 ACPI_FUNCTION_TRACE("container_walk_namespace_cb");
209 204
210 status = acpi_get_object_info(handle, &buffer); 205 status = acpi_get_object_info(handle, &buffer);
211 if (ACPI_FAILURE(status) || !buffer.pointer) { 206 if (ACPI_FAILURE(status) || !buffer.pointer) {
212 return_ACPI_STATUS(AE_OK); 207 return AE_OK;
213 } 208 }
214 209
215 info = buffer.pointer; 210 info = buffer.pointer;
@@ -243,7 +238,7 @@ container_walk_namespace_cb(acpi_handle handle,
243 end: 238 end:
244 acpi_os_free(buffer.pointer); 239 acpi_os_free(buffer.pointer);
245 240
246 return_ACPI_STATUS(AE_OK); 241 return AE_OK;
247} 242}
248 243
249static int __init acpi_container_init(void) 244static int __init acpi_container_init(void)
@@ -269,7 +264,6 @@ static void __exit acpi_container_exit(void)
269{ 264{
270 int action = UNINSTALL_NOTIFY_HANDLER; 265 int action = UNINSTALL_NOTIFY_HANDLER;
271 266
272 ACPI_FUNCTION_TRACE("acpi_container_exit");
273 267
274 acpi_walk_namespace(ACPI_TYPE_DEVICE, 268 acpi_walk_namespace(ACPI_TYPE_DEVICE,
275 ACPI_ROOT_OBJECT, 269 ACPI_ROOT_OBJECT,
@@ -278,7 +272,7 @@ static void __exit acpi_container_exit(void)
278 272
279 acpi_bus_unregister_driver(&acpi_container_driver); 273 acpi_bus_unregister_driver(&acpi_container_driver);
280 274
281 return_VOID; 275 return;
282} 276}
283 277
284module_init(acpi_container_init); 278module_init(acpi_container_init);
diff --git a/drivers/acpi/debug.c b/drivers/acpi/debug.c
index 263322b7d11..35c6af8a83c 100644
--- a/drivers/acpi/debug.c
+++ b/drivers/acpi/debug.c
@@ -155,13 +155,12 @@ acpi_system_write_debug(struct file *file,
155{ 155{
156 char debug_string[12] = { '\0' }; 156 char debug_string[12] = { '\0' };
157 157
158 ACPI_FUNCTION_TRACE("acpi_system_write_debug");
159 158
160 if (count > sizeof(debug_string) - 1) 159 if (count > sizeof(debug_string) - 1)
161 return_VALUE(-EINVAL); 160 return -EINVAL;
162 161
163 if (copy_from_user(debug_string, buffer, count)) 162 if (copy_from_user(debug_string, buffer, count))
164 return_VALUE(-EFAULT); 163 return -EFAULT;
165 164
166 debug_string[count] = '\0'; 165 debug_string[count] = '\0';
167 166
@@ -173,10 +172,10 @@ acpi_system_write_debug(struct file *file,
173 acpi_dbg_level = simple_strtoul(debug_string, NULL, 0); 172 acpi_dbg_level = simple_strtoul(debug_string, NULL, 0);
174 break; 173 break;
175 default: 174 default:
176 return_VALUE(-EINVAL); 175 return -EINVAL;
177 } 176 }
178 177
179 return_VALUE(count); 178 return count;
180} 179}
181 180
182static int __init acpi_debug_init(void) 181static int __init acpi_debug_init(void)
@@ -185,10 +184,9 @@ static int __init acpi_debug_init(void)
185 int error = 0; 184 int error = 0;
186 char *name; 185 char *name;
187 186
188 ACPI_FUNCTION_TRACE("acpi_debug_init");
189 187
190 if (acpi_disabled) 188 if (acpi_disabled)
191 return_VALUE(0); 189 return 0;
192 190
193 /* 'debug_layer' [R/W] */ 191 /* 'debug_layer' [R/W] */
194 name = ACPI_SYSTEM_FILE_DEBUG_LAYER; 192 name = ACPI_SYSTEM_FILE_DEBUG_LAYER;
@@ -213,15 +211,12 @@ static int __init acpi_debug_init(void)
213 goto Error; 211 goto Error;
214 212
215 Done: 213 Done:
216 return_VALUE(error); 214 return error;
217 215
218 Error: 216 Error:
219 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
220 "Unable to create '%s' proc fs entry\n", name));
221
222 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir); 217 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LEVEL, acpi_root_dir);
223 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir); 218 remove_proc_entry(ACPI_SYSTEM_FILE_DEBUG_LAYER, acpi_root_dir);
224 error = -EFAULT; 219 error = -ENODEV;
225 goto Done; 220 goto Done;
226} 221}
227 222
diff --git a/drivers/acpi/dispatcher/dsinit.c b/drivers/acpi/dispatcher/dsinit.c
index bbdf990e9f6..daf51b5b587 100644
--- a/drivers/acpi/dispatcher/dsinit.c
+++ b/drivers/acpi/dispatcher/dsinit.c
@@ -125,37 +125,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,
125 if (info->table_desc->pointer->revision == 1) { 125 if (info->table_desc->pointer->revision == 1) {
126 node->flags |= ANOBJ_DATA_WIDTH_32; 126 node->flags |= ANOBJ_DATA_WIDTH_32;
127 } 127 }
128#ifdef ACPI_INIT_PARSE_METHODS
129 /*
130 * Note 11/2005: Removed this code to parse all methods during table
131 * load because it causes problems if there are any errors during the
132 * parse. Also, it seems like overkill and we probably don't want to
133 * abort a table load because of an issue with a single method.
134 */
135
136 /*
137 * Print a dot for each method unless we are going to print
138 * the entire pathname
139 */
140 if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
141 ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "."));
142 }
143 128
144 /*
145 * Always parse methods to detect errors, we will delete
146 * the parse tree below
147 */
148 status = acpi_ds_parse_method(obj_handle);
149 if (ACPI_FAILURE(status)) {
150 ACPI_ERROR((AE_INFO,
151 "Method %p [%4.4s] - parse failure, %s",
152 obj_handle,
153 acpi_ut_get_node_name(obj_handle),
154 acpi_format_exception(status)));
155
156 /* This parse failed, but we will continue parsing more methods */
157 }
158#endif
159 info->method_count++; 129 info->method_count++;
160 break; 130 break;
161 131
diff --git a/drivers/acpi/dispatcher/dsmethod.c b/drivers/acpi/dispatcher/dsmethod.c
index bc9aca4e740..a39a33f4847 100644
--- a/drivers/acpi/dispatcher/dsmethod.c
+++ b/drivers/acpi/dispatcher/dsmethod.c
@@ -52,6 +52,10 @@
52#define _COMPONENT ACPI_DISPATCHER 52#define _COMPONENT ACPI_DISPATCHER
53ACPI_MODULE_NAME("dsmethod") 53ACPI_MODULE_NAME("dsmethod")
54 54
55/* Local prototypes */
56static acpi_status
57acpi_ds_create_method_mutex(union acpi_operand_object *method_desc);
58
55/******************************************************************************* 59/*******************************************************************************
56 * 60 *
57 * FUNCTION: acpi_ds_method_error 61 * FUNCTION: acpi_ds_method_error
@@ -67,6 +71,7 @@ ACPI_MODULE_NAME("dsmethod")
67 * Note: Allows the exception handler to change the status code 71 * Note: Allows the exception handler to change the status code
68 * 72 *
69 ******************************************************************************/ 73 ******************************************************************************/
74
70acpi_status 75acpi_status
71acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state) 76acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
72{ 77{
@@ -113,11 +118,51 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
113 118
114/******************************************************************************* 119/*******************************************************************************
115 * 120 *
121 * FUNCTION: acpi_ds_create_method_mutex
122 *
123 * PARAMETERS: obj_desc - The method object
124 *
125 * RETURN: Status
126 *
127 * DESCRIPTION: Create a mutex object for a serialized control method
128 *
129 ******************************************************************************/
130
131static acpi_status
132acpi_ds_create_method_mutex(union acpi_operand_object *method_desc)
133{
134 union acpi_operand_object *mutex_desc;
135 acpi_status status;
136
137 ACPI_FUNCTION_NAME(ds_create_method_mutex);
138
139 /* Create the new mutex object */
140
141 mutex_desc = acpi_ut_create_internal_object(ACPI_TYPE_MUTEX);
142 if (!mutex_desc) {
143 return_ACPI_STATUS(AE_NO_MEMORY);
144 }
145
146 /* Create the actual OS Mutex */
147
148 status = acpi_os_create_mutex(&mutex_desc->mutex.os_mutex);
149 if (ACPI_FAILURE(status)) {
150 return_ACPI_STATUS(status);
151 }
152
153 mutex_desc->mutex.sync_level = method_desc->method.sync_level;
154 method_desc->method.mutex = mutex_desc;
155 return_ACPI_STATUS(AE_OK);
156}
157
158/*******************************************************************************
159 *
116 * FUNCTION: acpi_ds_begin_method_execution 160 * FUNCTION: acpi_ds_begin_method_execution
117 * 161 *
118 * PARAMETERS: method_node - Node of the method 162 * PARAMETERS: method_node - Node of the method
119 * obj_desc - The method object 163 * obj_desc - The method object
120 * calling_method_node - Caller of this method (if non-null) 164 * walk_state - current state, NULL if not yet executing
165 * a method.
121 * 166 *
122 * RETURN: Status 167 * RETURN: Status
123 * 168 *
@@ -128,9 +173,9 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
128 ******************************************************************************/ 173 ******************************************************************************/
129 174
130acpi_status 175acpi_status
131acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node, 176acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
132 union acpi_operand_object * obj_desc, 177 union acpi_operand_object *obj_desc,
133 struct acpi_namespace_node * calling_method_node) 178 struct acpi_walk_state *walk_state)
134{ 179{
135 acpi_status status = AE_OK; 180 acpi_status status = AE_OK;
136 181
@@ -149,35 +194,80 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
149 } 194 }
150 195
151 /* 196 /*
152 * If there is a concurrency limit on this method, we need to 197 * If this method is serialized, we need to acquire the method mutex.
153 * obtain a unit from the method semaphore.
154 */ 198 */
155 if (obj_desc->method.semaphore) { 199 if (obj_desc->method.method_flags & AML_METHOD_SERIALIZED) {
156 /* 200 /*
157 * Allow recursive method calls, up to the reentrancy/concurrency 201 * Create a mutex for the method if it is defined to be Serialized
158 * limit imposed by the SERIALIZED rule and the sync_level method 202 * and a mutex has not already been created. We defer the mutex creation
159 * parameter. 203 * until a method is actually executed, to minimize the object count
160 *
161 * The point of this code is to avoid permanently blocking a
162 * thread that is making recursive method calls.
163 */ 204 */
164 if (method_node == calling_method_node) { 205 if (!obj_desc->method.mutex) {
165 if (obj_desc->method.thread_count >= 206 status = acpi_ds_create_method_mutex(obj_desc);
166 obj_desc->method.concurrency) { 207 if (ACPI_FAILURE(status)) {
167 return_ACPI_STATUS(AE_AML_METHOD_LIMIT); 208 return_ACPI_STATUS(status);
168 } 209 }
169 } 210 }
170 211
171 /* 212 /*
172 * Get a unit from the method semaphore. This releases the 213 * The current_sync_level (per-thread) must be less than or equal to
173 * interpreter if we block (then reacquires it) 214 * the sync level of the method. This mechanism provides some
215 * deadlock prevention
216 *
217 * Top-level method invocation has no walk state at this point
174 */ 218 */
175 status = 219 if (walk_state &&
176 acpi_ex_system_wait_semaphore(obj_desc->method.semaphore, 220 (walk_state->thread->current_sync_level >
177 ACPI_WAIT_FOREVER); 221 obj_desc->method.mutex->mutex.sync_level)) {
178 if (ACPI_FAILURE(status)) { 222 ACPI_ERROR((AE_INFO,
179 return_ACPI_STATUS(status); 223 "Cannot acquire Mutex for method [%4.4s], current SyncLevel is too large (%d)",
224 acpi_ut_get_node_name(method_node),
225 walk_state->thread->current_sync_level));
226
227 return_ACPI_STATUS(AE_AML_MUTEX_ORDER);
180 } 228 }
229
230 /*
231 * Obtain the method mutex if necessary. Do not acquire mutex for a
232 * recursive call.
233 */
234 if (!walk_state ||
235 !obj_desc->method.mutex->mutex.owner_thread ||
236 (walk_state->thread !=
237 obj_desc->method.mutex->mutex.owner_thread)) {
238 /*
239 * Acquire the method mutex. This releases the interpreter if we
240 * block (and reacquires it before it returns)
241 */
242 status =
243 acpi_ex_system_wait_mutex(obj_desc->method.mutex->
244 mutex.os_mutex,
245 ACPI_WAIT_FOREVER);
246 if (ACPI_FAILURE(status)) {
247 return_ACPI_STATUS(status);
248 }
249
250 /* Update the mutex and walk info and save the original sync_level */
251
252 if (walk_state) {
253 obj_desc->method.mutex->mutex.
254 original_sync_level =
255 walk_state->thread->current_sync_level;
256
257 obj_desc->method.mutex->mutex.owner_thread =
258 walk_state->thread;
259 walk_state->thread->current_sync_level =
260 obj_desc->method.sync_level;
261 } else {
262 obj_desc->method.mutex->mutex.
263 original_sync_level =
264 obj_desc->method.mutex->mutex.sync_level;
265 }
266 }
267
268 /* Always increase acquisition depth */
269
270 obj_desc->method.mutex->mutex.acquisition_depth++;
181 } 271 }
182 272
183 /* 273 /*
@@ -200,10 +290,10 @@ acpi_ds_begin_method_execution(struct acpi_namespace_node * method_node,
200 return_ACPI_STATUS(status); 290 return_ACPI_STATUS(status);
201 291
202 cleanup: 292 cleanup:
203 /* On error, must signal the method semaphore if present */ 293 /* On error, must release the method mutex (if present) */
204 294
205 if (obj_desc->method.semaphore) { 295 if (obj_desc->method.mutex) {
206 (void)acpi_os_signal_semaphore(obj_desc->method.semaphore, 1); 296 acpi_os_release_mutex(obj_desc->method.mutex->mutex.os_mutex);
207 } 297 }
208 return_ACPI_STATUS(status); 298 return_ACPI_STATUS(status);
209} 299}
@@ -253,10 +343,10 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread,
253 return_ACPI_STATUS(AE_NULL_OBJECT); 343 return_ACPI_STATUS(AE_NULL_OBJECT);
254 } 344 }
255 345
256 /* Init for new method, possibly wait on concurrency semaphore */ 346 /* Init for new method, possibly wait on method mutex */
257 347
258 status = acpi_ds_begin_method_execution(method_node, obj_desc, 348 status = acpi_ds_begin_method_execution(method_node, obj_desc,
259 this_walk_state->method_node); 349 this_walk_state);
260 if (ACPI_FAILURE(status)) { 350 if (ACPI_FAILURE(status)) {
261 return_ACPI_STATUS(status); 351 return_ACPI_STATUS(status);
262 } 352 }
@@ -478,6 +568,8 @@ acpi_ds_restart_control_method(struct acpi_walk_state *walk_state,
478 * created, delete all locals and arguments, and delete the parse 568 * created, delete all locals and arguments, and delete the parse
479 * tree if requested. 569 * tree if requested.
480 * 570 *
571 * MUTEX: Interpreter is locked
572 *
481 ******************************************************************************/ 573 ******************************************************************************/
482 574
483void 575void
@@ -503,26 +595,21 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
503 } 595 }
504 596
505 /* 597 /*
506 * Lock the parser while we terminate this method. 598 * If method is serialized, release the mutex and restore the
507 * If this is the last thread executing the method, 599 * current sync level for this thread
508 * we have additional cleanup to perform
509 */ 600 */
510 status = acpi_ut_acquire_mutex(ACPI_MTX_CONTROL_METHOD); 601 if (method_desc->method.mutex) {
511 if (ACPI_FAILURE(status)) {
512 return_VOID;
513 }
514 602
515 /* Signal completion of the execution of this method if necessary */ 603 /* Acquisition Depth handles recursive calls */
516 604
517 if (method_desc->method.semaphore) { 605 method_desc->method.mutex->mutex.acquisition_depth--;
518 status = 606 if (!method_desc->method.mutex->mutex.acquisition_depth) {
519 acpi_os_signal_semaphore(method_desc->method.semaphore, 1); 607 walk_state->thread->current_sync_level =
520 if (ACPI_FAILURE(status)) { 608 method_desc->method.mutex->mutex.
521 609 original_sync_level;
522 /* Ignore error and continue */
523 610
524 ACPI_EXCEPTION((AE_INFO, status, 611 acpi_os_release_mutex(method_desc->method.mutex->mutex.
525 "Could not signal method semaphore")); 612 os_mutex);
526 } 613 }
527 } 614 }
528 615
@@ -537,7 +624,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
537 624
538 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 625 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
539 if (ACPI_FAILURE(status)) { 626 if (ACPI_FAILURE(status)) {
540 goto exit; 627 return_VOID;
541 } 628 }
542 629
543 /* 630 /*
@@ -580,18 +667,16 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
580 /* 667 /*
581 * Support to dynamically change a method from not_serialized to 668 * Support to dynamically change a method from not_serialized to
582 * Serialized if it appears that the method is incorrectly written and 669 * Serialized if it appears that the method is incorrectly written and
583 * does not support multiple thread execution. The best example of this 670 * does not support multiple thread execution. The best example of this
584 * is if such a method creates namespace objects and blocks. A second 671 * is if such a method creates namespace objects and blocks. A second
585 * thread will fail with an AE_ALREADY_EXISTS exception 672 * thread will fail with an AE_ALREADY_EXISTS exception
586 * 673 *
587 * This code is here because we must wait until the last thread exits 674 * This code is here because we must wait until the last thread exits
588 * before creating the synchronization semaphore. 675 * before creating the synchronization semaphore.
589 */ 676 */
590 if ((method_desc->method.concurrency == 1) && 677 if ((method_desc->method.method_flags & AML_METHOD_SERIALIZED)
591 (!method_desc->method.semaphore)) { 678 && (!method_desc->method.mutex)) {
592 status = acpi_os_create_semaphore(1, 1, 679 status = acpi_ds_create_method_mutex(method_desc);
593 &method_desc->method.
594 semaphore);
595 } 680 }
596 681
597 /* No more threads, we can free the owner_id */ 682 /* No more threads, we can free the owner_id */
@@ -599,144 +684,5 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
599 acpi_ut_release_owner_id(&method_desc->method.owner_id); 684 acpi_ut_release_owner_id(&method_desc->method.owner_id);
600 } 685 }
601 686
602 exit:
603 (void)acpi_ut_release_mutex(ACPI_MTX_CONTROL_METHOD);
604 return_VOID; 687 return_VOID;
605} 688}
606
607#ifdef ACPI_INIT_PARSE_METHODS
608 /*
609 * Note 11/2005: Removed this code to parse all methods during table
610 * load because it causes problems if there are any errors during the
611 * parse. Also, it seems like overkill and we probably don't want to
612 * abort a table load because of an issue with a single method.
613 */
614
615/*******************************************************************************
616 *
617 * FUNCTION: acpi_ds_parse_method
618 *
619 * PARAMETERS: Node - Method node
620 *
621 * RETURN: Status
622 *
623 * DESCRIPTION: Parse the AML that is associated with the method.
624 *
625 * MUTEX: Assumes parser is locked
626 *
627 ******************************************************************************/
628
629acpi_status acpi_ds_parse_method(struct acpi_namespace_node *node)
630{
631 acpi_status status;
632 union acpi_operand_object *obj_desc;
633 union acpi_parse_object *op;
634 struct acpi_walk_state *walk_state;
635
636 ACPI_FUNCTION_TRACE_PTR(ds_parse_method, node);
637
638 /* Parameter Validation */
639
640 if (!node) {
641 return_ACPI_STATUS(AE_NULL_ENTRY);
642 }
643
644 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
645 "**** Parsing [%4.4s] **** NamedObj=%p\n",
646 acpi_ut_get_node_name(node), node));
647
648 /* Extract the method object from the method Node */
649
650 obj_desc = acpi_ns_get_attached_object(node);
651 if (!obj_desc) {
652 return_ACPI_STATUS(AE_NULL_OBJECT);
653 }
654
655 /* Create a mutex for the method if there is a concurrency limit */
656
657 if ((obj_desc->method.concurrency != ACPI_INFINITE_CONCURRENCY) &&
658 (!obj_desc->method.semaphore)) {
659 status = acpi_os_create_semaphore(obj_desc->method.concurrency,
660 obj_desc->method.concurrency,
661 &obj_desc->method.semaphore);
662 if (ACPI_FAILURE(status)) {
663 return_ACPI_STATUS(status);
664 }
665 }
666
667 /*
668 * Allocate a new parser op to be the root of the parsed
669 * method tree
670 */
671 op = acpi_ps_alloc_op(AML_METHOD_OP);
672 if (!op) {
673 return_ACPI_STATUS(AE_NO_MEMORY);
674 }
675
676 /* Init new op with the method name and pointer back to the Node */
677
678 acpi_ps_set_name(op, node->name.integer);
679 op->common.node = node;
680
681 /*
682 * Get a new owner_id for objects created by this method. Namespace
683 * objects (such as Operation Regions) can be created during the
684 * first pass parse.
685 */
686 status = acpi_ut_allocate_owner_id(&obj_desc->method.owner_id);
687 if (ACPI_FAILURE(status)) {
688 goto cleanup;
689 }
690
691 /* Create and initialize a new walk state */
692
693 walk_state =
694 acpi_ds_create_walk_state(obj_desc->method.owner_id, NULL, NULL,
695 NULL);
696 if (!walk_state) {
697 status = AE_NO_MEMORY;
698 goto cleanup2;
699 }
700
701 status = acpi_ds_init_aml_walk(walk_state, op, node,
702 obj_desc->method.aml_start,
703 obj_desc->method.aml_length, NULL, 1);
704 if (ACPI_FAILURE(status)) {
705 acpi_ds_delete_walk_state(walk_state);
706 goto cleanup2;
707 }
708
709 /*
710 * Parse the method, first pass
711 *
712 * The first pass load is where newly declared named objects are added into
713 * the namespace. Actual evaluation of the named objects (what would be
714 * called a "second pass") happens during the actual execution of the
715 * method so that operands to the named objects can take on dynamic
716 * run-time values.
717 */
718 status = acpi_ps_parse_aml(walk_state);
719 if (ACPI_FAILURE(status)) {
720 goto cleanup2;
721 }
722
723 ACPI_DEBUG_PRINT((ACPI_DB_PARSE,
724 "**** [%4.4s] Parsed **** NamedObj=%p Op=%p\n",
725 acpi_ut_get_node_name(node), node, op));
726
727 /*
728 * Delete the parse tree. We simply re-parse the method for every
729 * execution since there isn't much overhead (compared to keeping lots
730 * of parse trees around)
731 */
732 acpi_ns_delete_namespace_subtree(node);
733 acpi_ns_delete_namespace_by_owner(obj_desc->method.owner_id);
734
735 cleanup2:
736 acpi_ut_release_owner_id(&obj_desc->method.owner_id);
737
738 cleanup:
739 acpi_ps_delete_parse_tree(op);
740 return_ACPI_STATUS(status);
741}
742#endif
diff --git a/drivers/acpi/dispatcher/dswexec.c b/drivers/acpi/dispatcher/dswexec.c
index 3acbd9145d7..b1ded62d0df 100644
--- a/drivers/acpi/dispatcher/dswexec.c
+++ b/drivers/acpi/dispatcher/dswexec.c
@@ -472,7 +472,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
472 acpi_ds_result_push(walk_state->result_obj, 472 acpi_ds_result_push(walk_state->result_obj,
473 walk_state); 473 walk_state);
474 } 474 }
475
476 break; 475 break;
477 476
478 default: 477 default:
@@ -510,6 +509,7 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
510 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 509 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
511 "Method Reference in a Package, Op=%p\n", 510 "Method Reference in a Package, Op=%p\n",
512 op)); 511 op));
512
513 op->common.node = 513 op->common.node =
514 (struct acpi_namespace_node *)op->asl.value. 514 (struct acpi_namespace_node *)op->asl.value.
515 arg->asl.node->object; 515 arg->asl.node->object;
@@ -670,7 +670,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
670 670
671 status = acpi_ds_result_stack_pop(walk_state); 671 status = acpi_ds_result_stack_pop(walk_state);
672 } 672 }
673
674 break; 673 break;
675 674
676 case AML_TYPE_UNDEFINED: 675 case AML_TYPE_UNDEFINED:
@@ -708,7 +707,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state)
708 * Check if we just completed the evaluation of a 707 * Check if we just completed the evaluation of a
709 * conditional predicate 708 * conditional predicate
710 */ 709 */
711
712 if ((ACPI_SUCCESS(status)) && 710 if ((ACPI_SUCCESS(status)) &&
713 (walk_state->control_state) && 711 (walk_state->control_state) &&
714 (walk_state->control_state->common.state == 712 (walk_state->control_state->common.state ==
diff --git a/drivers/acpi/dispatcher/dswload.c b/drivers/acpi/dispatcher/dswload.c
index 35074399c61..e3ca7f6539c 100644
--- a/drivers/acpi/dispatcher/dswload.c
+++ b/drivers/acpi/dispatcher/dswload.c
@@ -175,7 +175,7 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
175 if (status == AE_NOT_FOUND) { 175 if (status == AE_NOT_FOUND) {
176 /* 176 /*
177 * Table disassembly: 177 * Table disassembly:
178 * Target of Scope() not found. Generate an External for it, and 178 * Target of Scope() not found. Generate an External for it, and
179 * insert the name into the namespace. 179 * insert the name into the namespace.
180 */ 180 */
181 acpi_dm_add_to_external_list(path, ACPI_TYPE_DEVICE, 0); 181 acpi_dm_add_to_external_list(path, ACPI_TYPE_DEVICE, 0);
@@ -210,16 +210,15 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
210 case ACPI_TYPE_BUFFER: 210 case ACPI_TYPE_BUFFER:
211 211
212 /* 212 /*
213 * These types we will allow, but we will change the type. This 213 * These types we will allow, but we will change the type. This
214 * enables some existing code of the form: 214 * enables some existing code of the form:
215 * 215 *
216 * Name (DEB, 0) 216 * Name (DEB, 0)
217 * Scope (DEB) { ... } 217 * Scope (DEB) { ... }
218 * 218 *
219 * Note: silently change the type here. On the second pass, we will report 219 * Note: silently change the type here. On the second pass, we will report
220 * a warning 220 * a warning
221 */ 221 */
222
223 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 222 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
224 "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n", 223 "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)\n",
225 path, 224 path,
@@ -242,7 +241,6 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
242 break; 241 break;
243 242
244 default: 243 default:
245
246 /* 244 /*
247 * For all other named opcodes, we will enter the name into 245 * For all other named opcodes, we will enter the name into
248 * the namespace. 246 * the namespace.
@@ -259,7 +257,6 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
259 * buffer_field, or Package), the name of the object is already 257 * buffer_field, or Package), the name of the object is already
260 * in the namespace. 258 * in the namespace.
261 */ 259 */
262
263 if (walk_state->deferred_node) { 260 if (walk_state->deferred_node) {
264 261
265 /* This name is already in the namespace, get the node */ 262 /* This name is already in the namespace, get the node */
@@ -293,8 +290,8 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
293 } 290 }
294 291
295 /* 292 /*
296 * Enter the named type into the internal namespace. We enter the name 293 * Enter the named type into the internal namespace. We enter the name
297 * as we go downward in the parse tree. Any necessary subobjects that 294 * as we go downward in the parse tree. Any necessary subobjects that
298 * involve arguments to the opcode must be created as we go back up the 295 * involve arguments to the opcode must be created as we go back up the
299 * parse tree later. 296 * parse tree later.
300 */ 297 */
@@ -327,12 +324,12 @@ acpi_ds_load1_begin_op(struct acpi_walk_state * walk_state,
327 (status); 324 (status);
328 } 325 }
329 } 326 }
327
330 status = AE_OK; 328 status = AE_OK;
331 } 329 }
332 } 330 }
333 331
334 if (ACPI_FAILURE(status)) { 332 if (ACPI_FAILURE(status)) {
335
336 ACPI_ERROR_NAMESPACE(path, status); 333 ACPI_ERROR_NAMESPACE(path, status);
337 return_ACPI_STATUS(status); 334 return_ACPI_STATUS(status);
338 } 335 }
@@ -434,9 +431,13 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
434 status = 431 status =
435 acpi_ex_create_region(op->named.data, 432 acpi_ex_create_region(op->named.data,
436 op->named.length, 433 op->named.length,
437 (acpi_adr_space_type) 434 (acpi_adr_space_type) ((op->
438 ((op->common.value.arg)-> 435 common.
439 common.value.integer), 436 value.
437 arg)->
438 common.
439 value.
440 integer),
440 walk_state); 441 walk_state);
441 if (ACPI_FAILURE(status)) { 442 if (ACPI_FAILURE(status)) {
442 return_ACPI_STATUS(status); 443 return_ACPI_STATUS(status);
@@ -474,7 +475,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
474 * method_op pkg_length name_string method_flags term_list 475 * method_op pkg_length name_string method_flags term_list
475 * 476 *
476 * Note: We must create the method node/object pair as soon as we 477 * Note: We must create the method node/object pair as soon as we
477 * see the method declaration. This allows later pass1 parsing 478 * see the method declaration. This allows later pass1 parsing
478 * of invocations of the method (need to know the number of 479 * of invocations of the method (need to know the number of
479 * arguments.) 480 * arguments.)
480 */ 481 */
@@ -499,6 +500,7 @@ acpi_status acpi_ds_load1_end_op(struct acpi_walk_state *walk_state)
499 length, 500 length,
500 walk_state); 501 walk_state);
501 } 502 }
503
502 walk_state->operands[0] = NULL; 504 walk_state->operands[0] = NULL;
503 walk_state->num_operands = 0; 505 walk_state->num_operands = 0;
504 506
@@ -570,7 +572,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
570#ifdef ACPI_ENABLE_MODULE_LEVEL_CODE 572#ifdef ACPI_ENABLE_MODULE_LEVEL_CODE
571 if ((walk_state->op_info->class == AML_CLASS_EXECUTE) || 573 if ((walk_state->op_info->class == AML_CLASS_EXECUTE) ||
572 (walk_state->op_info->class == AML_CLASS_CONTROL)) { 574 (walk_state->op_info->class == AML_CLASS_CONTROL)) {
573
574 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH, 575 ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
575 "Begin/EXEC: %s (fl %8.8X)\n", 576 "Begin/EXEC: %s (fl %8.8X)\n",
576 walk_state->op_info->name, 577 walk_state->op_info->name,
@@ -602,7 +603,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
602 } else { 603 } else {
603 /* Get name from the op */ 604 /* Get name from the op */
604 605
605 buffer_ptr = (char *)&op->named.name; 606 buffer_ptr = ACPI_CAST_PTR(char, &op->named.name);
606 } 607 }
607 } else { 608 } else {
608 /* Get the namestring from the raw AML */ 609 /* Get the namestring from the raw AML */
@@ -629,7 +630,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
629 break; 630 break;
630 631
631 case AML_INT_NAMEPATH_OP: 632 case AML_INT_NAMEPATH_OP:
632
633 /* 633 /*
634 * The name_path is an object reference to an existing object. 634 * The name_path is an object reference to an existing object.
635 * Don't enter the name into the namespace, but look it up 635 * Don't enter the name into the namespace, but look it up
@@ -642,7 +642,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
642 break; 642 break;
643 643
644 case AML_SCOPE_OP: 644 case AML_SCOPE_OP:
645
646 /* 645 /*
647 * The Path is an object reference to an existing object. 646 * The Path is an object reference to an existing object.
648 * Don't enter the name into the namespace, but look it up 647 * Don't enter the name into the namespace, but look it up
@@ -664,6 +663,7 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
664#endif 663#endif
665 return_ACPI_STATUS(status); 664 return_ACPI_STATUS(status);
666 } 665 }
666
667 /* 667 /*
668 * We must check to make sure that the target is 668 * We must check to make sure that the target is
669 * one of the opcodes that actually opens a scope 669 * one of the opcodes that actually opens a scope
@@ -683,13 +683,12 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
683 case ACPI_TYPE_BUFFER: 683 case ACPI_TYPE_BUFFER:
684 684
685 /* 685 /*
686 * These types we will allow, but we will change the type. This 686 * These types we will allow, but we will change the type. This
687 * enables some existing code of the form: 687 * enables some existing code of the form:
688 * 688 *
689 * Name (DEB, 0) 689 * Name (DEB, 0)
690 * Scope (DEB) { ... } 690 * Scope (DEB) { ... }
691 */ 691 */
692
693 ACPI_WARNING((AE_INFO, 692 ACPI_WARNING((AE_INFO,
694 "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)", 693 "Type override - [%4.4s] had invalid type (%s) for Scope operator, changed to (Scope)",
695 buffer_ptr, 694 buffer_ptr,
@@ -729,14 +728,14 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
729 if (ACPI_FAILURE(status)) { 728 if (ACPI_FAILURE(status)) {
730 return_ACPI_STATUS(status); 729 return_ACPI_STATUS(status);
731 } 730 }
732
733 } 731 }
732
734 return_ACPI_STATUS(AE_OK); 733 return_ACPI_STATUS(AE_OK);
735 } 734 }
736 735
737 /* 736 /*
738 * Enter the named type into the internal namespace. We enter the name 737 * Enter the named type into the internal namespace. We enter the name
739 * as we go downward in the parse tree. Any necessary subobjects that 738 * as we go downward in the parse tree. Any necessary subobjects that
740 * involve arguments to the opcode must be created as we go back up the 739 * involve arguments to the opcode must be created as we go back up the
741 * parse tree later. 740 * parse tree later.
742 * 741 *
@@ -787,7 +786,6 @@ acpi_ds_load2_begin_op(struct acpi_walk_state *walk_state,
787 * can get it again quickly when this scope is closed 786 * can get it again quickly when this scope is closed
788 */ 787 */
789 op->common.node = node; 788 op->common.node = node;
790
791 return_ACPI_STATUS(status); 789 return_ACPI_STATUS(status);
792} 790}
793 791
@@ -922,7 +920,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
922#ifndef ACPI_NO_METHOD_EXECUTION 920#ifndef ACPI_NO_METHOD_EXECUTION
923 921
924 case AML_TYPE_CREATE_FIELD: 922 case AML_TYPE_CREATE_FIELD:
925
926 /* 923 /*
927 * Create the field object, but the field buffer and index must 924 * Create the field object, but the field buffer and index must
928 * be evaluated later during the execution phase 925 * be evaluated later during the execution phase
@@ -931,7 +928,6 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
931 break; 928 break;
932 929
933 case AML_TYPE_NAMED_FIELD: 930 case AML_TYPE_NAMED_FIELD:
934
935 /* 931 /*
936 * If we are executing a method, initialize the field 932 * If we are executing a method, initialize the field
937 */ 933 */
@@ -1051,6 +1047,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
1051 * argument is the space_id. (We must save the address of the 1047 * argument is the space_id. (We must save the address of the
1052 * AML of the address and length operands) 1048 * AML of the address and length operands)
1053 */ 1049 */
1050
1054 /* 1051 /*
1055 * If we have a valid region, initialize it 1052 * If we have a valid region, initialize it
1056 * Namespace is NOT locked at this point. 1053 * Namespace is NOT locked at this point.
@@ -1080,7 +1077,7 @@ acpi_status acpi_ds_load2_end_op(struct acpi_walk_state *walk_state)
1080 * method_op pkg_length name_string method_flags term_list 1077 * method_op pkg_length name_string method_flags term_list
1081 * 1078 *
1082 * Note: We must create the method node/object pair as soon as we 1079 * Note: We must create the method node/object pair as soon as we
1083 * see the method declaration. This allows later pass1 parsing 1080 * see the method declaration. This allows later pass1 parsing
1084 * of invocations of the method (need to know the number of 1081 * of invocations of the method (need to know the number of
1085 * arguments.) 1082 * arguments.)
1086 */ 1083 */
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
new file mode 100644
index 00000000000..510a9452429
--- /dev/null
+++ b/drivers/acpi/dock.c
@@ -0,0 +1,739 @@
1/*
2 * dock.c - ACPI dock station driver
3 *
4 * Copyright (C) 2006 Kristen Carlson Accardi <kristen.c.accardi@intel.com>
5 *
6 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or (at
11 * your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
21 *
22 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23 */
24
25#include <linux/kernel.h>
26#include <linux/module.h>
27#include <linux/init.h>
28#include <linux/types.h>
29#include <linux/notifier.h>
30#include <acpi/acpi_bus.h>
31#include <acpi/acpi_drivers.h>
32
33#define ACPI_DOCK_DRIVER_NAME "ACPI Dock Station Driver"
34
35ACPI_MODULE_NAME("dock")
36MODULE_AUTHOR("Kristen Carlson Accardi");
37MODULE_DESCRIPTION(ACPI_DOCK_DRIVER_NAME);
38MODULE_LICENSE("GPL");
39
40static struct atomic_notifier_head dock_notifier_list;
41
42struct dock_station {
43 acpi_handle handle;
44 unsigned long last_dock_time;
45 u32 flags;
46 spinlock_t dd_lock;
47 spinlock_t hp_lock;
48 struct list_head dependent_devices;
49 struct list_head hotplug_devices;
50};
51
52struct dock_dependent_device {
53 struct list_head list;
54 struct list_head hotplug_list;
55 acpi_handle handle;
56 acpi_notify_handler handler;
57 void *context;
58};
59
60#define DOCK_DOCKING 0x00000001
61#define DOCK_EVENT KOBJ_DOCK
62#define UNDOCK_EVENT KOBJ_UNDOCK
63
64static struct dock_station *dock_station;
65
66/*****************************************************************************
67 * Dock Dependent device functions *
68 *****************************************************************************/
69/**
70 * alloc_dock_dependent_device - allocate and init a dependent device
71 * @handle: the acpi_handle of the dependent device
72 *
73 * Allocate memory for a dependent device structure for a device referenced
74 * by the acpi handle
75 */
76static struct dock_dependent_device *
77alloc_dock_dependent_device(acpi_handle handle)
78{
79 struct dock_dependent_device *dd;
80
81 dd = kzalloc(sizeof(*dd), GFP_KERNEL);
82 if (dd) {
83 dd->handle = handle;
84 INIT_LIST_HEAD(&dd->list);
85 INIT_LIST_HEAD(&dd->hotplug_list);
86 }
87 return dd;
88}
89
90/**
91 * add_dock_dependent_device - associate a device with the dock station
92 * @ds: The dock station
93 * @dd: The dependent device
94 *
95 * Add the dependent device to the dock's dependent device list.
96 */
97static void
98add_dock_dependent_device(struct dock_station *ds,
99 struct dock_dependent_device *dd)
100{
101 spin_lock(&ds->dd_lock);
102 list_add_tail(&dd->list, &ds->dependent_devices);
103 spin_unlock(&ds->dd_lock);
104}
105
106/**
107 * dock_add_hotplug_device - associate a hotplug handler with the dock station
108 * @ds: The dock station
109 * @dd: The dependent device struct
110 *
111 * Add the dependent device to the dock's hotplug device list
112 */
113static void
114dock_add_hotplug_device(struct dock_station *ds,
115 struct dock_dependent_device *dd)
116{
117 spin_lock(&ds->hp_lock);
118 list_add_tail(&dd->hotplug_list, &ds->hotplug_devices);
119 spin_unlock(&ds->hp_lock);
120}
121
122/**
123 * dock_del_hotplug_device - remove a hotplug handler from the dock station
124 * @ds: The dock station
125 * @dd: the dependent device struct
126 *
127 * Delete the dependent device from the dock's hotplug device list
128 */
129static void
130dock_del_hotplug_device(struct dock_station *ds,
131 struct dock_dependent_device *dd)
132{
133 spin_lock(&ds->hp_lock);
134 list_del(&dd->hotplug_list);
135 spin_unlock(&ds->hp_lock);
136}
137
138/**
139 * find_dock_dependent_device - get a device dependent on this dock
140 * @ds: the dock station
141 * @handle: the acpi_handle of the device we want
142 *
143 * iterate over the dependent device list for this dock. If the
144 * dependent device matches the handle, return.
145 */
146static struct dock_dependent_device *
147find_dock_dependent_device(struct dock_station *ds, acpi_handle handle)
148{
149 struct dock_dependent_device *dd;
150
151 spin_lock(&ds->dd_lock);
152 list_for_each_entry(dd, &ds->dependent_devices, list) {
153 if (handle == dd->handle) {
154 spin_unlock(&ds->dd_lock);
155 return dd;
156 }
157 }
158 spin_unlock(&ds->dd_lock);
159 return NULL;
160}
161
162/*****************************************************************************
163 * Dock functions *
164 *****************************************************************************/
165/**
166 * is_dock - see if a device is a dock station
167 * @handle: acpi handle of the device
168 *
169 * If an acpi object has a _DCK method, then it is by definition a dock
170 * station, so return true.
171 */
172static int is_dock(acpi_handle handle)
173{
174 acpi_status status;
175 acpi_handle tmp;
176
177 status = acpi_get_handle(handle, "_DCK", &tmp);
178 if (ACPI_FAILURE(status))
179 return 0;
180 return 1;
181}
182
183/**
184 * is_dock_device - see if a device is on a dock station
185 * @handle: acpi handle of the device
186 *
187 * If this device is either the dock station itself,
188 * or is a device dependent on the dock station, then it
189 * is a dock device
190 */
191int is_dock_device(acpi_handle handle)
192{
193 if (!dock_station)
194 return 0;
195
196 if (is_dock(handle) || find_dock_dependent_device(dock_station, handle))
197 return 1;
198
199 return 0;
200}
201
202EXPORT_SYMBOL_GPL(is_dock_device);
203
204/**
205 * dock_present - see if the dock station is present.
206 * @ds: the dock station
207 *
208 * execute the _STA method. note that present does not
209 * imply that we are docked.
210 */
211static int dock_present(struct dock_station *ds)
212{
213 unsigned long sta;
214 acpi_status status;
215
216 if (ds) {
217 status = acpi_evaluate_integer(ds->handle, "_STA", NULL, &sta);
218 if (ACPI_SUCCESS(status) && sta)
219 return 1;
220 }
221 return 0;
222}
223
224
225
226/**
227 * dock_create_acpi_device - add new devices to acpi
228 * @handle - handle of the device to add
229 *
230 * This function will create a new acpi_device for the given
231 * handle if one does not exist already. This should cause
232 * acpi to scan for drivers for the given devices, and call
233 * matching driver's add routine.
234 *
235 * Returns a pointer to the acpi_device corresponding to the handle.
236 */
237static struct acpi_device * dock_create_acpi_device(acpi_handle handle)
238{
239 struct acpi_device *device = NULL;
240 struct acpi_device *parent_device;
241 acpi_handle parent;
242 int ret;
243
244 if (acpi_bus_get_device(handle, &device)) {
245 /*
246 * no device created for this object,
247 * so we should create one.
248 */
249 acpi_get_parent(handle, &parent);
250 if (acpi_bus_get_device(parent, &parent_device))
251 parent_device = NULL;
252
253 ret = acpi_bus_add(&device, parent_device, handle,
254 ACPI_BUS_TYPE_DEVICE);
255 if (ret) {
256 pr_debug("error adding bus, %x\n",
257 -ret);
258 return NULL;
259 }
260 }
261 return device;
262}
263
264/**
265 * dock_remove_acpi_device - remove the acpi_device struct from acpi
266 * @handle - the handle of the device to remove
267 *
268 * Tell acpi to remove the acpi_device. This should cause any loaded
269 * driver to have it's remove routine called.
270 */
271static void dock_remove_acpi_device(acpi_handle handle)
272{
273 struct acpi_device *device;
274 int ret;
275
276 if (!acpi_bus_get_device(handle, &device)) {
277 ret = acpi_bus_trim(device, 1);
278 if (ret)
279 pr_debug("error removing bus, %x\n", -ret);
280 }
281}
282
283
284/**
285 * hotplug_dock_devices - insert or remove devices on the dock station
286 * @ds: the dock station
287 * @event: either bus check or eject request
288 *
289 * Some devices on the dock station need to have drivers called
290 * to perform hotplug operations after a dock event has occurred.
291 * Traverse the list of dock devices that have registered a
292 * hotplug handler, and call the handler.
293 */
294static void hotplug_dock_devices(struct dock_station *ds, u32 event)
295{
296 struct dock_dependent_device *dd;
297
298 spin_lock(&ds->hp_lock);
299
300 /*
301 * First call driver specific hotplug functions
302 */
303 list_for_each_entry(dd, &ds->hotplug_devices, hotplug_list) {
304 if (dd->handler)
305 dd->handler(dd->handle, event, dd->context);
306 }
307
308 /*
309 * Now make sure that an acpi_device is created for each
310 * dependent device, or removed if this is an eject request.
311 * This will cause acpi_drivers to be stopped/started if they
312 * exist
313 */
314 list_for_each_entry(dd, &ds->dependent_devices, list) {
315 if (event == ACPI_NOTIFY_EJECT_REQUEST)
316 dock_remove_acpi_device(dd->handle);
317 else
318 dock_create_acpi_device(dd->handle);
319 }
320 spin_unlock(&ds->hp_lock);
321}
322
323static void dock_event(struct dock_station *ds, u32 event, int num)
324{
325 struct acpi_device *device;
326
327 device = dock_create_acpi_device(ds->handle);
328 if (device)
329 kobject_uevent(&device->kobj, num);
330}
331
332/**
333 * eject_dock - respond to a dock eject request
334 * @ds: the dock station
335 *
336 * This is called after _DCK is called, to execute the dock station's
337 * _EJ0 method.
338 */
339static void eject_dock(struct dock_station *ds)
340{
341 struct acpi_object_list arg_list;
342 union acpi_object arg;
343 acpi_status status;
344 acpi_handle tmp;
345
346 /* all dock devices should have _EJ0, but check anyway */
347 status = acpi_get_handle(ds->handle, "_EJ0", &tmp);
348 if (ACPI_FAILURE(status)) {
349 pr_debug("No _EJ0 support for dock device\n");
350 return;
351 }
352
353 arg_list.count = 1;
354 arg_list.pointer = &arg;
355 arg.type = ACPI_TYPE_INTEGER;
356 arg.integer.value = 1;
357
358 if (ACPI_FAILURE(acpi_evaluate_object(ds->handle, "_EJ0",
359 &arg_list, NULL)))
360 pr_debug("Failed to evaluate _EJ0!\n");
361}
362
363/**
364 * handle_dock - handle a dock event
365 * @ds: the dock station
366 * @dock: to dock, or undock - that is the question
367 *
368 * Execute the _DCK method in response to an acpi event
369 */
370static void handle_dock(struct dock_station *ds, int dock)
371{
372 acpi_status status;
373 struct acpi_object_list arg_list;
374 union acpi_object arg;
375 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
376 struct acpi_buffer name_buffer = { ACPI_ALLOCATE_BUFFER, NULL };
377 union acpi_object *obj;
378
379 acpi_get_name(ds->handle, ACPI_FULL_PATHNAME, &name_buffer);
380 obj = name_buffer.pointer;
381
382 printk(KERN_INFO PREFIX "%s\n", dock ? "docking" : "undocking");
383
384 /* _DCK method has one argument */
385 arg_list.count = 1;
386 arg_list.pointer = &arg;
387 arg.type = ACPI_TYPE_INTEGER;
388 arg.integer.value = dock;
389 status = acpi_evaluate_object(ds->handle, "_DCK", &arg_list, &buffer);
390 if (ACPI_FAILURE(status))
391 pr_debug("%s: failed to execute _DCK\n", obj->string.pointer);
392 kfree(buffer.pointer);
393 kfree(name_buffer.pointer);
394}
395
396static inline void dock(struct dock_station *ds)
397{
398 handle_dock(ds, 1);
399}
400
401static inline void undock(struct dock_station *ds)
402{
403 handle_dock(ds, 0);
404}
405
406static inline void begin_dock(struct dock_station *ds)
407{
408 ds->flags |= DOCK_DOCKING;
409}
410
411static inline void complete_dock(struct dock_station *ds)
412{
413 ds->flags &= ~(DOCK_DOCKING);
414 ds->last_dock_time = jiffies;
415}
416
417/**
418 * dock_in_progress - see if we are in the middle of handling a dock event
419 * @ds: the dock station
420 *
421 * Sometimes while docking, false dock events can be sent to the driver
422 * because good connections aren't made or some other reason. Ignore these
423 * if we are in the middle of doing something.
424 */
425static int dock_in_progress(struct dock_station *ds)
426{
427 if ((ds->flags & DOCK_DOCKING) ||
428 time_before(jiffies, (ds->last_dock_time + HZ)))
429 return 1;
430 return 0;
431}
432
433/**
434 * register_dock_notifier - add yourself to the dock notifier list
435 * @nb: the callers notifier block
436 *
437 * If a driver wishes to be notified about dock events, they can
438 * use this function to put a notifier block on the dock notifier list.
439 * this notifier call chain will be called after a dock event, but
440 * before hotplugging any new devices.
441 */
442int register_dock_notifier(struct notifier_block *nb)
443{
444 return atomic_notifier_chain_register(&dock_notifier_list, nb);
445}
446
447EXPORT_SYMBOL_GPL(register_dock_notifier);
448
449/**
450 * unregister_dock_notifier - remove yourself from the dock notifier list
451 * @nb: the callers notifier block
452 */
453void unregister_dock_notifier(struct notifier_block *nb)
454{
455 atomic_notifier_chain_unregister(&dock_notifier_list, nb);
456}
457
458EXPORT_SYMBOL_GPL(unregister_dock_notifier);
459
460/**
461 * register_hotplug_dock_device - register a hotplug function
462 * @handle: the handle of the device
463 * @handler: the acpi_notifier_handler to call after docking
464 * @context: device specific data
465 *
466 * If a driver would like to perform a hotplug operation after a dock
467 * event, they can register an acpi_notifiy_handler to be called by
468 * the dock driver after _DCK is executed.
469 */
470int
471register_hotplug_dock_device(acpi_handle handle, acpi_notify_handler handler,
472 void *context)
473{
474 struct dock_dependent_device *dd;
475
476 if (!dock_station)
477 return -ENODEV;
478
479 /*
480 * make sure this handle is for a device dependent on the dock,
481 * this would include the dock station itself
482 */
483 dd = find_dock_dependent_device(dock_station, handle);
484 if (dd) {
485 dd->handler = handler;
486 dd->context = context;
487 dock_add_hotplug_device(dock_station, dd);
488 return 0;
489 }
490
491 return -EINVAL;
492}
493
494EXPORT_SYMBOL_GPL(register_hotplug_dock_device);
495
496/**
497 * unregister_hotplug_dock_device - remove yourself from the hotplug list
498 * @handle: the acpi handle of the device
499 */
500void unregister_hotplug_dock_device(acpi_handle handle)
501{
502 struct dock_dependent_device *dd;
503
504 if (!dock_station)
505 return;
506
507 dd = find_dock_dependent_device(dock_station, handle);
508 if (dd)
509 dock_del_hotplug_device(dock_station, dd);
510}
511
512EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device);
513
514/**
515 * dock_notify - act upon an acpi dock notification
516 * @handle: the dock station handle
517 * @event: the acpi event
518 * @data: our driver data struct
519 *
520 * If we are notified to dock, then check to see if the dock is
521 * present and then dock. Notify all drivers of the dock event,
522 * and then hotplug and devices that may need hotplugging. For undock
523 * check to make sure the dock device is still present, then undock
524 * and hotremove all the devices that may need removing.
525 */
526static void dock_notify(acpi_handle handle, u32 event, void *data)
527{
528 struct dock_station *ds = (struct dock_station *)data;
529
530 switch (event) {
531 case ACPI_NOTIFY_BUS_CHECK:
532 if (!dock_in_progress(ds) && dock_present(ds)) {
533 begin_dock(ds);
534 dock(ds);
535 if (!dock_present(ds)) {
536 printk(KERN_ERR PREFIX "Unable to dock!\n");
537 break;
538 }
539 atomic_notifier_call_chain(&dock_notifier_list,
540 event, NULL);
541 hotplug_dock_devices(ds, event);
542 complete_dock(ds);
543 dock_event(ds, event, DOCK_EVENT);
544 }
545 break;
546 case ACPI_NOTIFY_DEVICE_CHECK:
547 /*
548 * According to acpi spec 3.0a, if a DEVICE_CHECK notification
549 * is sent and _DCK is present, it is assumed to mean an
550 * undock request. This notify routine will only be called
551 * for objects defining _DCK, so we will fall through to eject
552 * request here. However, we will pass an eject request through
553 * to the driver who wish to hotplug.
554 */
555 case ACPI_NOTIFY_EJECT_REQUEST:
556 if (!dock_in_progress(ds) && dock_present(ds)) {
557 /*
558 * here we need to generate the undock
559 * event prior to actually doing the undock
560 * so that the device struct still exists.
561 */
562 dock_event(ds, event, UNDOCK_EVENT);
563 hotplug_dock_devices(ds, ACPI_NOTIFY_EJECT_REQUEST);
564 undock(ds);
565 eject_dock(ds);
566 if (dock_present(ds))
567 printk(KERN_ERR PREFIX "Unable to undock!\n");
568 }
569 break;
570 default:
571 printk(KERN_ERR PREFIX "Unknown dock event %d\n", event);
572 }
573}
574
575/**
576 * find_dock_devices - find devices on the dock station
577 * @handle: the handle of the device we are examining
578 * @lvl: unused
579 * @context: the dock station private data
580 * @rv: unused
581 *
582 * This function is called by acpi_walk_namespace. It will
583 * check to see if an object has an _EJD method. If it does, then it
584 * will see if it is dependent on the dock station.
585 */
586static acpi_status
587find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
588{
589 acpi_status status;
590 acpi_handle tmp;
591 struct dock_station *ds = (struct dock_station *)context;
592 struct dock_dependent_device *dd;
593
594 status = acpi_bus_get_ejd(handle, &tmp);
595 if (ACPI_FAILURE(status))
596 return AE_OK;
597
598 if (tmp == ds->handle) {
599 dd = alloc_dock_dependent_device(handle);
600 if (dd)
601 add_dock_dependent_device(ds, dd);
602 }
603
604 return AE_OK;
605}
606
607/**
608 * dock_add - add a new dock station
609 * @handle: the dock station handle
610 *
611 * allocated and initialize a new dock station device. Find all devices
612 * that are on the dock station, and register for dock event notifications.
613 */
614static int dock_add(acpi_handle handle)
615{
616 int ret;
617 acpi_status status;
618 struct dock_dependent_device *dd;
619
620 /* allocate & initialize the dock_station private data */
621 dock_station = kzalloc(sizeof(*dock_station), GFP_KERNEL);
622 if (!dock_station)
623 return -ENOMEM;
624 dock_station->handle = handle;
625 dock_station->last_dock_time = jiffies - HZ;
626 INIT_LIST_HEAD(&dock_station->dependent_devices);
627 INIT_LIST_HEAD(&dock_station->hotplug_devices);
628 spin_lock_init(&dock_station->dd_lock);
629 spin_lock_init(&dock_station->hp_lock);
630
631 /* Find dependent devices */
632 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
633 ACPI_UINT32_MAX, find_dock_devices, dock_station,
634 NULL);
635
636 /* add the dock station as a device dependent on itself */
637 dd = alloc_dock_dependent_device(handle);
638 if (!dd) {
639 kfree(dock_station);
640 return -ENOMEM;
641 }
642 add_dock_dependent_device(dock_station, dd);
643
644 /* register for dock events */
645 status = acpi_install_notify_handler(dock_station->handle,
646 ACPI_SYSTEM_NOTIFY,
647 dock_notify, dock_station);
648
649 if (ACPI_FAILURE(status)) {
650 printk(KERN_ERR PREFIX "Error installing notify handler\n");
651 ret = -ENODEV;
652 goto dock_add_err;
653 }
654
655 printk(KERN_INFO PREFIX "%s \n", ACPI_DOCK_DRIVER_NAME);
656
657 return 0;
658
659dock_add_err:
660 kfree(dock_station);
661 kfree(dd);
662 return ret;
663}
664
665/**
666 * dock_remove - free up resources related to the dock station
667 */
668static int dock_remove(void)
669{
670 struct dock_dependent_device *dd, *tmp;
671 acpi_status status;
672
673 if (!dock_station)
674 return 0;
675
676 /* remove dependent devices */
677 list_for_each_entry_safe(dd, tmp, &dock_station->dependent_devices,
678 list)
679 kfree(dd);
680
681 /* remove dock notify handler */
682 status = acpi_remove_notify_handler(dock_station->handle,
683 ACPI_SYSTEM_NOTIFY,
684 dock_notify);
685 if (ACPI_FAILURE(status))
686 printk(KERN_ERR "Error removing notify handler\n");
687
688 /* free dock station memory */
689 kfree(dock_station);
690 return 0;
691}
692
693/**
694 * find_dock - look for a dock station
695 * @handle: acpi handle of a device
696 * @lvl: unused
697 * @context: counter of dock stations found
698 * @rv: unused
699 *
700 * This is called by acpi_walk_namespace to look for dock stations.
701 */
702static acpi_status
703find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
704{
705 int *count = (int *)context;
706 acpi_status status = AE_OK;
707
708 if (is_dock(handle)) {
709 if (dock_add(handle) >= 0) {
710 (*count)++;
711 status = AE_CTRL_TERMINATE;
712 }
713 }
714 return status;
715}
716
717static int __init dock_init(void)
718{
719 int num = 0;
720
721 dock_station = NULL;
722
723 /* look for a dock station */
724 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
725 ACPI_UINT32_MAX, find_dock, &num, NULL);
726
727 if (!num)
728 return -ENODEV;
729
730 return 0;
731}
732
733static void __exit dock_exit(void)
734{
735 dock_remove();
736}
737
738postcore_initcall(dock_init);
739module_exit(dock_exit);
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 18b3ea9dace..8c5d7df7d34 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -207,16 +207,15 @@ static int acpi_ec_intr_wait(union acpi_ec *ec, unsigned int event)
207{ 207{
208 int result = 0; 208 int result = 0;
209 209
210 ACPI_FUNCTION_TRACE("acpi_ec_wait");
211 210
212 ec->intr.expect_event = event; 211 ec->intr.expect_event = event;
213 smp_mb(); 212 smp_mb();
214 213
215 switch (event) { 214 switch (event) {
216 case ACPI_EC_EVENT_IBE: 215 case ACPI_EC_EVENT_IBE:
217 if (~acpi_ec_read_status(ec) & event) { 216 if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) {
218 ec->intr.expect_event = 0; 217 ec->intr.expect_event = 0;
219 return_VALUE(0); 218 return 0;
220 } 219 }
221 break; 220 break;
222 default: 221 default:
@@ -238,16 +237,16 @@ static int acpi_ec_intr_wait(union acpi_ec *ec, unsigned int event)
238 switch (event) { 237 switch (event) {
239 case ACPI_EC_EVENT_OBF: 238 case ACPI_EC_EVENT_OBF:
240 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF) 239 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF)
241 return_VALUE(0); 240 return 0;
242 break; 241 break;
243 242
244 case ACPI_EC_EVENT_IBE: 243 case ACPI_EC_EVENT_IBE:
245 if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) 244 if (~acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF)
246 return_VALUE(0); 245 return 0;
247 break; 246 break;
248 } 247 }
249 248
250 return_VALUE(-ETIME); 249 return -ETIME;
251} 250}
252 251
253#ifdef ACPI_FUTURE_USAGE 252#ifdef ACPI_FUTURE_USAGE
@@ -260,7 +259,6 @@ int acpi_ec_enter_burst_mode(union acpi_ec *ec)
260 u32 tmp = 0; 259 u32 tmp = 0;
261 int status = 0; 260 int status = 0;
262 261
263 ACPI_FUNCTION_TRACE("acpi_ec_enter_burst_mode");
264 262
265 status = acpi_ec_read_status(ec); 263 status = acpi_ec_read_status(ec);
266 if (status != -EINVAL && !(status & ACPI_EC_FLAG_BURST)) { 264 if (status != -EINVAL && !(status & ACPI_EC_FLAG_BURST)) {
@@ -272,22 +270,21 @@ int acpi_ec_enter_burst_mode(union acpi_ec *ec)
272 status = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF); 270 status = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF);
273 acpi_hw_low_level_read(8, &tmp, &ec->common.data_addr); 271 acpi_hw_low_level_read(8, &tmp, &ec->common.data_addr);
274 if (tmp != 0x90) { /* Burst ACK byte */ 272 if (tmp != 0x90) { /* Burst ACK byte */
275 return_VALUE(-EINVAL); 273 return -EINVAL;
276 } 274 }
277 } 275 }
278 276
279 atomic_set(&ec->intr.leaving_burst, 0); 277 atomic_set(&ec->intr.leaving_burst, 0);
280 return_VALUE(0); 278 return 0;
281 end: 279 end:
282 printk(KERN_WARNING PREFIX "Error in acpi_ec_wait\n"); 280 ACPI_EXCEPTION ((AE_INFO, status, "EC wait, burst mode");
283 return_VALUE(-1); 281 return -1;
284} 282}
285 283
286int acpi_ec_leave_burst_mode(union acpi_ec *ec) 284int acpi_ec_leave_burst_mode(union acpi_ec *ec)
287{ 285{
288 int status = 0; 286 int status = 0;
289 287
290 ACPI_FUNCTION_TRACE("acpi_ec_leave_burst_mode");
291 288
292 status = acpi_ec_read_status(ec); 289 status = acpi_ec_read_status(ec);
293 if (status != -EINVAL && (status & ACPI_EC_FLAG_BURST)){ 290 if (status != -EINVAL && (status & ACPI_EC_FLAG_BURST)){
@@ -298,10 +295,10 @@ int acpi_ec_leave_burst_mode(union acpi_ec *ec)
298 acpi_ec_wait(ec, ACPI_EC_FLAG_IBF); 295 acpi_ec_wait(ec, ACPI_EC_FLAG_IBF);
299 } 296 }
300 atomic_set(&ec->intr.leaving_burst, 1); 297 atomic_set(&ec->intr.leaving_burst, 1);
301 return_VALUE(0); 298 return 0;
302end: 299end:
303 printk(KERN_WARNING PREFIX "leave burst_mode:error\n"); 300 ACPI_EXCEPTION((AE_INFO, status, "EC leave burst mode");
304 return_VALUE(-1); 301 return -1;
305} 302}
306#endif /* ACPI_FUTURE_USAGE */ 303#endif /* ACPI_FUTURE_USAGE */
307 304
@@ -325,17 +322,16 @@ static int acpi_ec_poll_read(union acpi_ec *ec, u8 address, u32 * data)
325 int result = 0; 322 int result = 0;
326 u32 glk = 0; 323 u32 glk = 0;
327 324
328 ACPI_FUNCTION_TRACE("acpi_ec_read");
329 325
330 if (!ec || !data) 326 if (!ec || !data)
331 return_VALUE(-EINVAL); 327 return -EINVAL;
332 328
333 *data = 0; 329 *data = 0;
334 330
335 if (ec->common.global_lock) { 331 if (ec->common.global_lock) {
336 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 332 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
337 if (ACPI_FAILURE(status)) 333 if (ACPI_FAILURE(status))
338 return_VALUE(-ENODEV); 334 return -ENODEV;
339 } 335 }
340 336
341 if (down_interruptible(&ec->poll.sem)) { 337 if (down_interruptible(&ec->poll.sem)) {
@@ -365,7 +361,7 @@ end_nosem:
365 if (ec->common.global_lock) 361 if (ec->common.global_lock)
366 acpi_release_global_lock(glk); 362 acpi_release_global_lock(glk);
367 363
368 return_VALUE(result); 364 return result;
369} 365}
370 366
371static int acpi_ec_poll_write(union acpi_ec *ec, u8 address, u8 data) 367static int acpi_ec_poll_write(union acpi_ec *ec, u8 address, u8 data)
@@ -374,15 +370,14 @@ static int acpi_ec_poll_write(union acpi_ec *ec, u8 address, u8 data)
374 acpi_status status = AE_OK; 370 acpi_status status = AE_OK;
375 u32 glk = 0; 371 u32 glk = 0;
376 372
377 ACPI_FUNCTION_TRACE("acpi_ec_write");
378 373
379 if (!ec) 374 if (!ec)
380 return_VALUE(-EINVAL); 375 return -EINVAL;
381 376
382 if (ec->common.global_lock) { 377 if (ec->common.global_lock) {
383 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 378 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
384 if (ACPI_FAILURE(status)) 379 if (ACPI_FAILURE(status))
385 return_VALUE(-ENODEV); 380 return -ENODEV;
386 } 381 }
387 382
388 if (down_interruptible(&ec->poll.sem)) { 383 if (down_interruptible(&ec->poll.sem)) {
@@ -415,7 +410,7 @@ end_nosem:
415 if (ec->common.global_lock) 410 if (ec->common.global_lock)
416 acpi_release_global_lock(glk); 411 acpi_release_global_lock(glk);
417 412
418 return_VALUE(result); 413 return result;
419} 414}
420 415
421static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data) 416static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data)
@@ -423,17 +418,16 @@ static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data)
423 int status = 0; 418 int status = 0;
424 u32 glk; 419 u32 glk;
425 420
426 ACPI_FUNCTION_TRACE("acpi_ec_read");
427 421
428 if (!ec || !data) 422 if (!ec || !data)
429 return_VALUE(-EINVAL); 423 return -EINVAL;
430 424
431 *data = 0; 425 *data = 0;
432 426
433 if (ec->common.global_lock) { 427 if (ec->common.global_lock) {
434 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 428 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
435 if (ACPI_FAILURE(status)) 429 if (ACPI_FAILURE(status))
436 return_VALUE(-ENODEV); 430 return -ENODEV;
437 } 431 }
438 432
439 WARN_ON(in_interrupt()); 433 WARN_ON(in_interrupt());
@@ -467,7 +461,7 @@ static int acpi_ec_intr_read(union acpi_ec *ec, u8 address, u32 * data)
467 if (ec->common.global_lock) 461 if (ec->common.global_lock)
468 acpi_release_global_lock(glk); 462 acpi_release_global_lock(glk);
469 463
470 return_VALUE(status); 464 return status;
471} 465}
472 466
473static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data) 467static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data)
@@ -475,15 +469,14 @@ static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data)
475 int status = 0; 469 int status = 0;
476 u32 glk; 470 u32 glk;
477 471
478 ACPI_FUNCTION_TRACE("acpi_ec_write");
479 472
480 if (!ec) 473 if (!ec)
481 return_VALUE(-EINVAL); 474 return -EINVAL;
482 475
483 if (ec->common.global_lock) { 476 if (ec->common.global_lock) {
484 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 477 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
485 if (ACPI_FAILURE(status)) 478 if (ACPI_FAILURE(status))
486 return_VALUE(-ENODEV); 479 return -ENODEV;
487 } 480 }
488 481
489 WARN_ON(in_interrupt()); 482 WARN_ON(in_interrupt());
@@ -516,7 +509,7 @@ static int acpi_ec_intr_write(union acpi_ec *ec, u8 address, u8 data)
516 if (ec->common.global_lock) 509 if (ec->common.global_lock)
517 acpi_release_global_lock(glk); 510 acpi_release_global_lock(glk);
518 511
519 return_VALUE(status); 512 return status;
520} 513}
521 514
522/* 515/*
@@ -574,17 +567,16 @@ static int acpi_ec_poll_query(union acpi_ec *ec, u32 * data)
574 acpi_status status = AE_OK; 567 acpi_status status = AE_OK;
575 u32 glk = 0; 568 u32 glk = 0;
576 569
577 ACPI_FUNCTION_TRACE("acpi_ec_query");
578 570
579 if (!ec || !data) 571 if (!ec || !data)
580 return_VALUE(-EINVAL); 572 return -EINVAL;
581 573
582 *data = 0; 574 *data = 0;
583 575
584 if (ec->common.global_lock) { 576 if (ec->common.global_lock) {
585 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 577 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
586 if (ACPI_FAILURE(status)) 578 if (ACPI_FAILURE(status))
587 return_VALUE(-ENODEV); 579 return -ENODEV;
588 } 580 }
589 581
590 /* 582 /*
@@ -613,23 +605,22 @@ end_nosem:
613 if (ec->common.global_lock) 605 if (ec->common.global_lock)
614 acpi_release_global_lock(glk); 606 acpi_release_global_lock(glk);
615 607
616 return_VALUE(result); 608 return result;
617} 609}
618static int acpi_ec_intr_query(union acpi_ec *ec, u32 * data) 610static int acpi_ec_intr_query(union acpi_ec *ec, u32 * data)
619{ 611{
620 int status = 0; 612 int status = 0;
621 u32 glk; 613 u32 glk;
622 614
623 ACPI_FUNCTION_TRACE("acpi_ec_query");
624 615
625 if (!ec || !data) 616 if (!ec || !data)
626 return_VALUE(-EINVAL); 617 return -EINVAL;
627 *data = 0; 618 *data = 0;
628 619
629 if (ec->common.global_lock) { 620 if (ec->common.global_lock) {
630 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk); 621 status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
631 if (ACPI_FAILURE(status)) 622 if (ACPI_FAILURE(status))
632 return_VALUE(-ENODEV); 623 return -ENODEV;
633 } 624 }
634 625
635 down(&ec->intr.sem); 626 down(&ec->intr.sem);
@@ -662,7 +653,7 @@ static int acpi_ec_intr_query(union acpi_ec *ec, u32 * data)
662 if (ec->common.global_lock) 653 if (ec->common.global_lock)
663 acpi_release_global_lock(glk); 654 acpi_release_global_lock(glk);
664 655
665 return_VALUE(status); 656 return status;
666} 657}
667 658
668/* -------------------------------------------------------------------------- 659/* --------------------------------------------------------------------------
@@ -691,13 +682,12 @@ static void acpi_ec_gpe_poll_query(void *ec_cxt)
691 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 682 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
692 }; 683 };
693 684
694 ACPI_FUNCTION_TRACE("acpi_ec_gpe_query");
695 685
696 if (!ec_cxt) 686 if (!ec_cxt)
697 goto end; 687 goto end;
698 688
699 if (down_interruptible (&ec->poll.sem)) { 689 if (down_interruptible (&ec->poll.sem)) {
700 return_VOID; 690 return;
701 } 691 }
702 acpi_hw_low_level_read(8, &value, &ec->common.command_addr); 692 acpi_hw_low_level_read(8, &value, &ec->common.command_addr);
703 up(&ec->poll.sem); 693 up(&ec->poll.sem);
@@ -734,7 +724,6 @@ static void acpi_ec_gpe_intr_query(void *ec_cxt)
734 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 724 '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
735 }; 725 };
736 726
737 ACPI_FUNCTION_TRACE("acpi_ec_gpe_query");
738 727
739 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_SCI) 728 if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_SCI)
740 result = acpi_ec_query(ec, &value); 729 result = acpi_ec_query(ec, &value);
@@ -793,12 +782,15 @@ static u32 acpi_ec_gpe_intr_handler(void *data)
793 case ACPI_EC_EVENT_OBF: 782 case ACPI_EC_EVENT_OBF:
794 if (!(value & ACPI_EC_FLAG_OBF)) 783 if (!(value & ACPI_EC_FLAG_OBF))
795 break; 784 break;
785 ec->intr.expect_event = 0;
786 wake_up(&ec->intr.wait);
787 break;
796 case ACPI_EC_EVENT_IBE: 788 case ACPI_EC_EVENT_IBE:
797 if ((value & ACPI_EC_FLAG_IBF)) 789 if ((value & ACPI_EC_FLAG_IBF))
798 break; 790 break;
799 ec->intr.expect_event = 0; 791 ec->intr.expect_event = 0;
800 wake_up(&ec->intr.wait); 792 wake_up(&ec->intr.wait);
801 return ACPI_INTERRUPT_HANDLED; 793 break;
802 default: 794 default:
803 break; 795 break;
804 } 796 }
@@ -846,15 +838,14 @@ acpi_ec_space_handler(u32 function,
846 acpi_integer f_v = 0; 838 acpi_integer f_v = 0;
847 int i = 0; 839 int i = 0;
848 840
849 ACPI_FUNCTION_TRACE("acpi_ec_space_handler");
850 841
851 if ((address > 0xFF) || !value || !handler_context) 842 if ((address > 0xFF) || !value || !handler_context)
852 return_VALUE(AE_BAD_PARAMETER); 843 return AE_BAD_PARAMETER;
853 844
854 if (bit_width != 8 && acpi_strict) { 845 if (bit_width != 8 && acpi_strict) {
855 printk(KERN_WARNING PREFIX 846 printk(KERN_WARNING PREFIX
856 "acpi_ec_space_handler: bit_width should be 8\n"); 847 "acpi_ec_space_handler: bit_width should be 8\n");
857 return_VALUE(AE_BAD_PARAMETER); 848 return AE_BAD_PARAMETER;
858 } 849 }
859 850
860 ec = (union acpi_ec *)handler_context; 851 ec = (union acpi_ec *)handler_context;
@@ -893,16 +884,16 @@ acpi_ec_space_handler(u32 function,
893 out: 884 out:
894 switch (result) { 885 switch (result) {
895 case -EINVAL: 886 case -EINVAL:
896 return_VALUE(AE_BAD_PARAMETER); 887 return AE_BAD_PARAMETER;
897 break; 888 break;
898 case -ENODEV: 889 case -ENODEV:
899 return_VALUE(AE_NOT_FOUND); 890 return AE_NOT_FOUND;
900 break; 891 break;
901 case -ETIME: 892 case -ETIME:
902 return_VALUE(AE_TIME); 893 return AE_TIME;
903 break; 894 break;
904 default: 895 default:
905 return_VALUE(AE_OK); 896 return AE_OK;
906 } 897 }
907} 898}
908 899
@@ -916,7 +907,6 @@ static int acpi_ec_read_info(struct seq_file *seq, void *offset)
916{ 907{
917 union acpi_ec *ec = (union acpi_ec *)seq->private; 908 union acpi_ec *ec = (union acpi_ec *)seq->private;
918 909
919 ACPI_FUNCTION_TRACE("acpi_ec_read_info");
920 910
921 if (!ec) 911 if (!ec)
922 goto end; 912 goto end;
@@ -931,7 +921,7 @@ static int acpi_ec_read_info(struct seq_file *seq, void *offset)
931 acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR); 921 acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR);
932 922
933 end: 923 end:
934 return_VALUE(0); 924 return 0;
935} 925}
936 926
937static int acpi_ec_info_open_fs(struct inode *inode, struct file *file) 927static int acpi_ec_info_open_fs(struct inode *inode, struct file *file)
@@ -951,33 +941,29 @@ static int acpi_ec_add_fs(struct acpi_device *device)
951{ 941{
952 struct proc_dir_entry *entry = NULL; 942 struct proc_dir_entry *entry = NULL;
953 943
954 ACPI_FUNCTION_TRACE("acpi_ec_add_fs");
955 944
956 if (!acpi_device_dir(device)) { 945 if (!acpi_device_dir(device)) {
957 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 946 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
958 acpi_ec_dir); 947 acpi_ec_dir);
959 if (!acpi_device_dir(device)) 948 if (!acpi_device_dir(device))
960 return_VALUE(-ENODEV); 949 return -ENODEV;
961 } 950 }
962 951
963 entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO, 952 entry = create_proc_entry(ACPI_EC_FILE_INFO, S_IRUGO,
964 acpi_device_dir(device)); 953 acpi_device_dir(device));
965 if (!entry) 954 if (!entry)
966 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 955 return -ENODEV;
967 "Unable to create '%s' fs entry\n",
968 ACPI_EC_FILE_INFO));
969 else { 956 else {
970 entry->proc_fops = &acpi_ec_info_ops; 957 entry->proc_fops = &acpi_ec_info_ops;
971 entry->data = acpi_driver_data(device); 958 entry->data = acpi_driver_data(device);
972 entry->owner = THIS_MODULE; 959 entry->owner = THIS_MODULE;
973 } 960 }
974 961
975 return_VALUE(0); 962 return 0;
976} 963}
977 964
978static int acpi_ec_remove_fs(struct acpi_device *device) 965static int acpi_ec_remove_fs(struct acpi_device *device)
979{ 966{
980 ACPI_FUNCTION_TRACE("acpi_ec_remove_fs");
981 967
982 if (acpi_device_dir(device)) { 968 if (acpi_device_dir(device)) {
983 remove_proc_entry(ACPI_EC_FILE_INFO, acpi_device_dir(device)); 969 remove_proc_entry(ACPI_EC_FILE_INFO, acpi_device_dir(device));
@@ -985,7 +971,7 @@ static int acpi_ec_remove_fs(struct acpi_device *device)
985 acpi_device_dir(device) = NULL; 971 acpi_device_dir(device) = NULL;
986 } 972 }
987 973
988 return_VALUE(0); 974 return 0;
989} 975}
990 976
991/* -------------------------------------------------------------------------- 977/* --------------------------------------------------------------------------
@@ -998,14 +984,13 @@ static int acpi_ec_poll_add(struct acpi_device *device)
998 acpi_status status = AE_OK; 984 acpi_status status = AE_OK;
999 union acpi_ec *ec = NULL; 985 union acpi_ec *ec = NULL;
1000 986
1001 ACPI_FUNCTION_TRACE("acpi_ec_add");
1002 987
1003 if (!device) 988 if (!device)
1004 return_VALUE(-EINVAL); 989 return -EINVAL;
1005 990
1006 ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL); 991 ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL);
1007 if (!ec) 992 if (!ec)
1008 return_VALUE(-ENOMEM); 993 return -ENOMEM;
1009 memset(ec, 0, sizeof(union acpi_ec)); 994 memset(ec, 0, sizeof(union acpi_ec));
1010 995
1011 ec->common.handle = device->handle; 996 ec->common.handle = device->handle;
@@ -1038,8 +1023,7 @@ static int acpi_ec_poll_add(struct acpi_device *device)
1038 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL, 1023 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL,
1039 &ec->common.gpe_bit); 1024 &ec->common.gpe_bit);
1040 if (ACPI_FAILURE(status)) { 1025 if (ACPI_FAILURE(status)) {
1041 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1026 ACPI_EXCEPTION((AE_INFO, status, "Obtaining GPE bit"));
1042 "Error obtaining GPE bit assignment\n"));
1043 result = -ENODEV; 1027 result = -ENODEV;
1044 goto end; 1028 goto end;
1045 } 1029 }
@@ -1059,7 +1043,7 @@ static int acpi_ec_poll_add(struct acpi_device *device)
1059 if (result) 1043 if (result)
1060 kfree(ec); 1044 kfree(ec);
1061 1045
1062 return_VALUE(result); 1046 return result;
1063} 1047}
1064static int acpi_ec_intr_add(struct acpi_device *device) 1048static int acpi_ec_intr_add(struct acpi_device *device)
1065{ 1049{
@@ -1067,14 +1051,13 @@ static int acpi_ec_intr_add(struct acpi_device *device)
1067 acpi_status status = AE_OK; 1051 acpi_status status = AE_OK;
1068 union acpi_ec *ec = NULL; 1052 union acpi_ec *ec = NULL;
1069 1053
1070 ACPI_FUNCTION_TRACE("acpi_ec_add");
1071 1054
1072 if (!device) 1055 if (!device)
1073 return_VALUE(-EINVAL); 1056 return -EINVAL;
1074 1057
1075 ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL); 1058 ec = kmalloc(sizeof(union acpi_ec), GFP_KERNEL);
1076 if (!ec) 1059 if (!ec)
1077 return_VALUE(-ENOMEM); 1060 return -ENOMEM;
1078 memset(ec, 0, sizeof(union acpi_ec)); 1061 memset(ec, 0, sizeof(union acpi_ec));
1079 1062
1080 ec->common.handle = device->handle; 1063 ec->common.handle = device->handle;
@@ -1110,8 +1093,7 @@ static int acpi_ec_intr_add(struct acpi_device *device)
1110 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL, 1093 acpi_evaluate_integer(ec->common.handle, "_GPE", NULL,
1111 &ec->common.gpe_bit); 1094 &ec->common.gpe_bit);
1112 if (ACPI_FAILURE(status)) { 1095 if (ACPI_FAILURE(status)) {
1113 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1096 printk(KERN_ERR PREFIX "Obtaining GPE bit assignment\n");
1114 "Error obtaining GPE bit assignment\n"));
1115 result = -ENODEV; 1097 result = -ENODEV;
1116 goto end; 1098 goto end;
1117 } 1099 }
@@ -1131,17 +1113,16 @@ static int acpi_ec_intr_add(struct acpi_device *device)
1131 if (result) 1113 if (result)
1132 kfree(ec); 1114 kfree(ec);
1133 1115
1134 return_VALUE(result); 1116 return result;
1135} 1117}
1136 1118
1137static int acpi_ec_remove(struct acpi_device *device, int type) 1119static int acpi_ec_remove(struct acpi_device *device, int type)
1138{ 1120{
1139 union acpi_ec *ec = NULL; 1121 union acpi_ec *ec = NULL;
1140 1122
1141 ACPI_FUNCTION_TRACE("acpi_ec_remove");
1142 1123
1143 if (!device) 1124 if (!device)
1144 return_VALUE(-EINVAL); 1125 return -EINVAL;
1145 1126
1146 ec = acpi_driver_data(device); 1127 ec = acpi_driver_data(device);
1147 1128
@@ -1149,7 +1130,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
1149 1130
1150 kfree(ec); 1131 kfree(ec);
1151 1132
1152 return_VALUE(0); 1133 return 0;
1153} 1134}
1154 1135
1155static acpi_status 1136static acpi_status
@@ -1188,15 +1169,14 @@ static int acpi_ec_start(struct acpi_device *device)
1188 acpi_status status = AE_OK; 1169 acpi_status status = AE_OK;
1189 union acpi_ec *ec = NULL; 1170 union acpi_ec *ec = NULL;
1190 1171
1191 ACPI_FUNCTION_TRACE("acpi_ec_start");
1192 1172
1193 if (!device) 1173 if (!device)
1194 return_VALUE(-EINVAL); 1174 return -EINVAL;
1195 1175
1196 ec = acpi_driver_data(device); 1176 ec = acpi_driver_data(device);
1197 1177
1198 if (!ec) 1178 if (!ec)
1199 return_VALUE(-EINVAL); 1179 return -EINVAL;
1200 1180
1201 /* 1181 /*
1202 * Get I/O port addresses. Convert to GAS format. 1182 * Get I/O port addresses. Convert to GAS format.
@@ -1205,9 +1185,8 @@ static int acpi_ec_start(struct acpi_device *device)
1205 acpi_ec_io_ports, ec); 1185 acpi_ec_io_ports, ec);
1206 if (ACPI_FAILURE(status) 1186 if (ACPI_FAILURE(status)
1207 || ec->common.command_addr.register_bit_width == 0) { 1187 || ec->common.command_addr.register_bit_width == 0) {
1208 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1188 printk(KERN_ERR PREFIX "Error getting I/O port addresses\n");
1209 "Error getting I/O port addresses")); 1189 return -ENODEV;
1210 return_VALUE(-ENODEV);
1211 } 1190 }
1212 1191
1213 ec->common.status_addr = ec->common.command_addr; 1192 ec->common.status_addr = ec->common.command_addr;
@@ -1224,7 +1203,7 @@ static int acpi_ec_start(struct acpi_device *device)
1224 ACPI_GPE_EDGE_TRIGGERED, 1203 ACPI_GPE_EDGE_TRIGGERED,
1225 &acpi_ec_gpe_handler, ec); 1204 &acpi_ec_gpe_handler, ec);
1226 if (ACPI_FAILURE(status)) { 1205 if (ACPI_FAILURE(status)) {
1227 return_VALUE(-ENODEV); 1206 return -ENODEV;
1228 } 1207 }
1229 acpi_set_gpe_type(NULL, ec->common.gpe_bit, ACPI_GPE_TYPE_RUNTIME); 1208 acpi_set_gpe_type(NULL, ec->common.gpe_bit, ACPI_GPE_TYPE_RUNTIME);
1230 acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR); 1209 acpi_enable_gpe(NULL, ec->common.gpe_bit, ACPI_NOT_ISR);
@@ -1236,10 +1215,10 @@ static int acpi_ec_start(struct acpi_device *device)
1236 if (ACPI_FAILURE(status)) { 1215 if (ACPI_FAILURE(status)) {
1237 acpi_remove_gpe_handler(NULL, ec->common.gpe_bit, 1216 acpi_remove_gpe_handler(NULL, ec->common.gpe_bit,
1238 &acpi_ec_gpe_handler); 1217 &acpi_ec_gpe_handler);
1239 return_VALUE(-ENODEV); 1218 return -ENODEV;
1240 } 1219 }
1241 1220
1242 return_VALUE(AE_OK); 1221 return AE_OK;
1243} 1222}
1244 1223
1245static int acpi_ec_stop(struct acpi_device *device, int type) 1224static int acpi_ec_stop(struct acpi_device *device, int type)
@@ -1247,10 +1226,9 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
1247 acpi_status status = AE_OK; 1226 acpi_status status = AE_OK;
1248 union acpi_ec *ec = NULL; 1227 union acpi_ec *ec = NULL;
1249 1228
1250 ACPI_FUNCTION_TRACE("acpi_ec_stop");
1251 1229
1252 if (!device) 1230 if (!device)
1253 return_VALUE(-EINVAL); 1231 return -EINVAL;
1254 1232
1255 ec = acpi_driver_data(device); 1233 ec = acpi_driver_data(device);
1256 1234
@@ -1258,15 +1236,15 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
1258 ACPI_ADR_SPACE_EC, 1236 ACPI_ADR_SPACE_EC,
1259 &acpi_ec_space_handler); 1237 &acpi_ec_space_handler);
1260 if (ACPI_FAILURE(status)) 1238 if (ACPI_FAILURE(status))
1261 return_VALUE(-ENODEV); 1239 return -ENODEV;
1262 1240
1263 status = 1241 status =
1264 acpi_remove_gpe_handler(NULL, ec->common.gpe_bit, 1242 acpi_remove_gpe_handler(NULL, ec->common.gpe_bit,
1265 &acpi_ec_gpe_handler); 1243 &acpi_ec_gpe_handler);
1266 if (ACPI_FAILURE(status)) 1244 if (ACPI_FAILURE(status))
1267 return_VALUE(-ENODEV); 1245 return -ENODEV;
1268 1246
1269 return_VALUE(0); 1247 return 0;
1270} 1248}
1271 1249
1272static acpi_status __init 1250static acpi_status __init
@@ -1536,23 +1514,22 @@ static int __init acpi_ec_init(void)
1536{ 1514{
1537 int result = 0; 1515 int result = 0;
1538 1516
1539 ACPI_FUNCTION_TRACE("acpi_ec_init");
1540 1517
1541 if (acpi_disabled) 1518 if (acpi_disabled)
1542 return_VALUE(0); 1519 return 0;
1543 1520
1544 acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir); 1521 acpi_ec_dir = proc_mkdir(ACPI_EC_CLASS, acpi_root_dir);
1545 if (!acpi_ec_dir) 1522 if (!acpi_ec_dir)
1546 return_VALUE(-ENODEV); 1523 return -ENODEV;
1547 1524
1548 /* Now register the driver for the EC */ 1525 /* Now register the driver for the EC */
1549 result = acpi_bus_register_driver(&acpi_ec_driver); 1526 result = acpi_bus_register_driver(&acpi_ec_driver);
1550 if (result < 0) { 1527 if (result < 0) {
1551 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir); 1528 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);
1552 return_VALUE(-ENODEV); 1529 return -ENODEV;
1553 } 1530 }
1554 1531
1555 return_VALUE(result); 1532 return result;
1556} 1533}
1557 1534
1558subsys_initcall(acpi_ec_init); 1535subsys_initcall(acpi_ec_init);
@@ -1561,13 +1538,12 @@ subsys_initcall(acpi_ec_init);
1561#if 0 1538#if 0
1562static void __exit acpi_ec_exit(void) 1539static void __exit acpi_ec_exit(void)
1563{ 1540{
1564 ACPI_FUNCTION_TRACE("acpi_ec_exit");
1565 1541
1566 acpi_bus_unregister_driver(&acpi_ec_driver); 1542 acpi_bus_unregister_driver(&acpi_ec_driver);
1567 1543
1568 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir); 1544 remove_proc_entry(ACPI_EC_CLASS, acpi_root_dir);
1569 1545
1570 return_VOID; 1546 return;
1571} 1547}
1572#endif /* 0 */ 1548#endif /* 0 */
1573 1549
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index 2dbb1b0f11d..a901b23e95e 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -48,18 +48,17 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
48 static int chars_remaining = 0; 48 static int chars_remaining = 0;
49 static char *ptr; 49 static char *ptr;
50 50
51 ACPI_FUNCTION_TRACE("acpi_system_read_event");
52 51
53 if (!chars_remaining) { 52 if (!chars_remaining) {
54 memset(&event, 0, sizeof(struct acpi_bus_event)); 53 memset(&event, 0, sizeof(struct acpi_bus_event));
55 54
56 if ((file->f_flags & O_NONBLOCK) 55 if ((file->f_flags & O_NONBLOCK)
57 && (list_empty(&acpi_bus_event_list))) 56 && (list_empty(&acpi_bus_event_list)))
58 return_VALUE(-EAGAIN); 57 return -EAGAIN;
59 58
60 result = acpi_bus_receive_event(&event); 59 result = acpi_bus_receive_event(&event);
61 if (result) 60 if (result)
62 return_VALUE(result); 61 return result;
63 62
64 chars_remaining = sprintf(str, "%s %s %08x %08x\n", 63 chars_remaining = sprintf(str, "%s %s %08x %08x\n",
65 event.device_class ? event. 64 event.device_class ? event.
@@ -75,13 +74,13 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
75 } 74 }
76 75
77 if (copy_to_user(buffer, ptr, count)) 76 if (copy_to_user(buffer, ptr, count))
78 return_VALUE(-EFAULT); 77 return -EFAULT;
79 78
80 *ppos += count; 79 *ppos += count;
81 chars_remaining -= count; 80 chars_remaining -= count;
82 ptr += count; 81 ptr += count;
83 82
84 return_VALUE(count); 83 return count;
85} 84}
86 85
87static int acpi_system_close_event(struct inode *inode, struct file *file) 86static int acpi_system_close_event(struct inode *inode, struct file *file)
@@ -112,22 +111,18 @@ static int __init acpi_event_init(void)
112 struct proc_dir_entry *entry; 111 struct proc_dir_entry *entry;
113 int error = 0; 112 int error = 0;
114 113
115 ACPI_FUNCTION_TRACE("acpi_event_init");
116 114
117 if (acpi_disabled) 115 if (acpi_disabled)
118 return_VALUE(0); 116 return 0;
119 117
120 /* 'event' [R] */ 118 /* 'event' [R] */
121 entry = create_proc_entry("event", S_IRUSR, acpi_root_dir); 119 entry = create_proc_entry("event", S_IRUSR, acpi_root_dir);
122 if (entry) 120 if (entry)
123 entry->proc_fops = &acpi_system_event_ops; 121 entry->proc_fops = &acpi_system_event_ops;
124 else { 122 else {
125 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 123 error = -ENODEV;
126 "Unable to create '%s' proc fs entry\n",
127 "event"));
128 error = -EFAULT;
129 } 124 }
130 return_VALUE(error); 125 return error;
131} 126}
132 127
133subsys_initcall(acpi_event_init); 128subsys_initcall(acpi_event_init);
diff --git a/drivers/acpi/events/evgpe.c b/drivers/acpi/events/evgpe.c
index f01d339407f..c76c0583ca6 100644
--- a/drivers/acpi/events/evgpe.c
+++ b/drivers/acpi/events/evgpe.c
@@ -382,7 +382,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
382 u32 status_reg; 382 u32 status_reg;
383 u32 enable_reg; 383 u32 enable_reg;
384 acpi_cpu_flags flags; 384 acpi_cpu_flags flags;
385 acpi_cpu_flags hw_flags;
386 acpi_native_uint i; 385 acpi_native_uint i;
387 acpi_native_uint j; 386 acpi_native_uint j;
388 387
@@ -394,8 +393,11 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
394 return (int_status); 393 return (int_status);
395 } 394 }
396 395
397 /* We need to hold the GPE lock now, hardware lock in the loop */ 396 /*
398 397 * We need to obtain the GPE lock for both the data structs and registers
398 * Note: Not necessary to obtain the hardware lock, since the GPE registers
399 * are owned by the gpe_lock.
400 */
399 flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); 401 flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
400 402
401 /* Examine all GPE blocks attached to this interrupt level */ 403 /* Examine all GPE blocks attached to this interrupt level */
@@ -413,8 +415,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
413 415
414 gpe_register_info = &gpe_block->register_info[i]; 416 gpe_register_info = &gpe_block->register_info[i];
415 417
416 hw_flags = acpi_os_acquire_lock(acpi_gbl_hardware_lock);
417
418 /* Read the Status Register */ 418 /* Read the Status Register */
419 419
420 status = 420 status =
@@ -423,8 +423,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
423 &gpe_register_info-> 423 &gpe_register_info->
424 status_address); 424 status_address);
425 if (ACPI_FAILURE(status)) { 425 if (ACPI_FAILURE(status)) {
426 acpi_os_release_lock(acpi_gbl_hardware_lock,
427 hw_flags);
428 goto unlock_and_exit; 426 goto unlock_and_exit;
429 } 427 }
430 428
@@ -435,8 +433,6 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)
435 &enable_reg, 433 &enable_reg,
436 &gpe_register_info-> 434 &gpe_register_info->
437 enable_address); 435 enable_address);
438 acpi_os_release_lock(acpi_gbl_hardware_lock, hw_flags);
439
440 if (ACPI_FAILURE(status)) { 436 if (ACPI_FAILURE(status)) {
441 goto unlock_and_exit; 437 goto unlock_and_exit;
442 } 438 }
diff --git a/drivers/acpi/events/evxface.c b/drivers/acpi/events/evxface.c
index 76c34a66e0e..4f948df17ab 100644
--- a/drivers/acpi/events/evxface.c
+++ b/drivers/acpi/events/evxface.c
@@ -414,12 +414,13 @@ acpi_remove_notify_handler(acpi_handle device,
414 414
415 if ((!device) || 415 if ((!device) ||
416 (!handler) || (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) { 416 (!handler) || (handler_type > ACPI_MAX_NOTIFY_HANDLER_TYPE)) {
417 return_ACPI_STATUS(AE_BAD_PARAMETER); 417 status = AE_BAD_PARAMETER;
418 goto exit;
418 } 419 }
419 420
420 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 421 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
421 if (ACPI_FAILURE(status)) { 422 if (ACPI_FAILURE(status)) {
422 return_ACPI_STATUS(status); 423 goto exit;
423 } 424 }
424 425
425 /* Convert and validate the device handle */ 426 /* Convert and validate the device handle */
@@ -427,7 +428,7 @@ acpi_remove_notify_handler(acpi_handle device,
427 node = acpi_ns_map_handle_to_node(device); 428 node = acpi_ns_map_handle_to_node(device);
428 if (!node) { 429 if (!node) {
429 status = AE_BAD_PARAMETER; 430 status = AE_BAD_PARAMETER;
430 goto unlock_and_exit; 431 goto unlock;
431 } 432 }
432 433
433 /* Root Object */ 434 /* Root Object */
@@ -441,7 +442,7 @@ acpi_remove_notify_handler(acpi_handle device,
441 ((handler_type & ACPI_DEVICE_NOTIFY) && 442 ((handler_type & ACPI_DEVICE_NOTIFY) &&
442 !acpi_gbl_device_notify.handler)) { 443 !acpi_gbl_device_notify.handler)) {
443 status = AE_NOT_EXIST; 444 status = AE_NOT_EXIST;
444 goto unlock_and_exit; 445 goto unlock;
445 } 446 }
446 447
447 /* Make sure all deferred tasks are completed */ 448 /* Make sure all deferred tasks are completed */
@@ -450,7 +451,7 @@ acpi_remove_notify_handler(acpi_handle device,
450 acpi_os_wait_events_complete(NULL); 451 acpi_os_wait_events_complete(NULL);
451 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 452 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
452 if (ACPI_FAILURE(status)) { 453 if (ACPI_FAILURE(status)) {
453 return_ACPI_STATUS(status); 454 goto exit;
454 } 455 }
455 456
456 if (handler_type & ACPI_SYSTEM_NOTIFY) { 457 if (handler_type & ACPI_SYSTEM_NOTIFY) {
@@ -473,7 +474,7 @@ acpi_remove_notify_handler(acpi_handle device,
473 474
474 if (!acpi_ev_is_notify_object(node)) { 475 if (!acpi_ev_is_notify_object(node)) {
475 status = AE_TYPE; 476 status = AE_TYPE;
476 goto unlock_and_exit; 477 goto unlock;
477 } 478 }
478 479
479 /* Check for an existing internal object */ 480 /* Check for an existing internal object */
@@ -481,7 +482,7 @@ acpi_remove_notify_handler(acpi_handle device,
481 obj_desc = acpi_ns_get_attached_object(node); 482 obj_desc = acpi_ns_get_attached_object(node);
482 if (!obj_desc) { 483 if (!obj_desc) {
483 status = AE_NOT_EXIST; 484 status = AE_NOT_EXIST;
484 goto unlock_and_exit; 485 goto unlock;
485 } 486 }
486 487
487 /* Object exists - make sure there's an existing handler */ 488 /* Object exists - make sure there's an existing handler */
@@ -491,7 +492,7 @@ acpi_remove_notify_handler(acpi_handle device,
491 if ((!notify_obj) || 492 if ((!notify_obj) ||
492 (notify_obj->notify.handler != handler)) { 493 (notify_obj->notify.handler != handler)) {
493 status = AE_BAD_PARAMETER; 494 status = AE_BAD_PARAMETER;
494 goto unlock_and_exit; 495 goto unlock;
495 } 496 }
496 /* Make sure all deferred tasks are completed */ 497 /* Make sure all deferred tasks are completed */
497 498
@@ -499,7 +500,7 @@ acpi_remove_notify_handler(acpi_handle device,
499 acpi_os_wait_events_complete(NULL); 500 acpi_os_wait_events_complete(NULL);
500 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 501 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
501 if (ACPI_FAILURE(status)) { 502 if (ACPI_FAILURE(status)) {
502 return_ACPI_STATUS(status); 503 goto exit;
503 } 504 }
504 505
505 /* Remove the handler */ 506 /* Remove the handler */
@@ -512,7 +513,7 @@ acpi_remove_notify_handler(acpi_handle device,
512 if ((!notify_obj) || 513 if ((!notify_obj) ||
513 (notify_obj->notify.handler != handler)) { 514 (notify_obj->notify.handler != handler)) {
514 status = AE_BAD_PARAMETER; 515 status = AE_BAD_PARAMETER;
515 goto unlock_and_exit; 516 goto unlock;
516 } 517 }
517 /* Make sure all deferred tasks are completed */ 518 /* Make sure all deferred tasks are completed */
518 519
@@ -520,7 +521,7 @@ acpi_remove_notify_handler(acpi_handle device,
520 acpi_os_wait_events_complete(NULL); 521 acpi_os_wait_events_complete(NULL);
521 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); 522 status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE);
522 if (ACPI_FAILURE(status)) { 523 if (ACPI_FAILURE(status)) {
523 return_ACPI_STATUS(status); 524 goto exit;
524 } 525 }
525 526
526 /* Remove the handler */ 527 /* Remove the handler */
@@ -529,8 +530,11 @@ acpi_remove_notify_handler(acpi_handle device,
529 } 530 }
530 } 531 }
531 532
532 unlock_and_exit: 533unlock:
533 (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); 534 (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
535exit:
536 if (ACPI_FAILURE(status))
537 ACPI_EXCEPTION((AE_INFO, status, "Removing notify handler"));
534 return_ACPI_STATUS(status); 538 return_ACPI_STATUS(status);
535} 539}
536 540
@@ -568,12 +572,13 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
568 /* Parameter validation */ 572 /* Parameter validation */
569 573
570 if ((!address) || (type > ACPI_GPE_XRUPT_TYPE_MASK)) { 574 if ((!address) || (type > ACPI_GPE_XRUPT_TYPE_MASK)) {
571 return_ACPI_STATUS(AE_BAD_PARAMETER); 575 status = AE_BAD_PARAMETER;
576 goto exit;
572 } 577 }
573 578
574 status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS); 579 status = acpi_ut_acquire_mutex(ACPI_MTX_EVENTS);
575 if (ACPI_FAILURE(status)) { 580 if (ACPI_FAILURE(status)) {
576 return_ACPI_STATUS(status); 581 goto exit;
577 } 582 }
578 583
579 /* Ensure that we have a valid GPE number */ 584 /* Ensure that we have a valid GPE number */
@@ -581,7 +586,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
581 gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number); 586 gpe_event_info = acpi_ev_get_gpe_event_info(gpe_device, gpe_number);
582 if (!gpe_event_info) { 587 if (!gpe_event_info) {
583 status = AE_BAD_PARAMETER; 588 status = AE_BAD_PARAMETER;
584 goto unlock_and_exit; 589 goto unlock;
585 } 590 }
586 591
587 /* Make sure that there isn't a handler there already */ 592 /* Make sure that there isn't a handler there already */
@@ -589,7 +594,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
589 if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) == 594 if ((gpe_event_info->flags & ACPI_GPE_DISPATCH_MASK) ==
590 ACPI_GPE_DISPATCH_HANDLER) { 595 ACPI_GPE_DISPATCH_HANDLER) {
591 status = AE_ALREADY_EXISTS; 596 status = AE_ALREADY_EXISTS;
592 goto unlock_and_exit; 597 goto unlock;
593 } 598 }
594 599
595 /* Allocate and init handler object */ 600 /* Allocate and init handler object */
@@ -597,7 +602,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
597 handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info)); 602 handler = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_handler_info));
598 if (!handler) { 603 if (!handler) {
599 status = AE_NO_MEMORY; 604 status = AE_NO_MEMORY;
600 goto unlock_and_exit; 605 goto unlock;
601 } 606 }
602 607
603 handler->address = address; 608 handler->address = address;
@@ -608,7 +613,7 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
608 613
609 status = acpi_ev_disable_gpe(gpe_event_info); 614 status = acpi_ev_disable_gpe(gpe_event_info);
610 if (ACPI_FAILURE(status)) { 615 if (ACPI_FAILURE(status)) {
611 goto unlock_and_exit; 616 goto unlock;
612 } 617 }
613 618
614 /* Install the handler */ 619 /* Install the handler */
@@ -623,8 +628,12 @@ acpi_install_gpe_handler(acpi_handle gpe_device,
623 628
624 acpi_os_release_lock(acpi_gbl_gpe_lock, flags); 629 acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
625 630
626 unlock_and_exit: 631unlock:
627 (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); 632 (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS);
633exit:
634 if (ACPI_FAILURE(status))
635 ACPI_EXCEPTION((AE_INFO, status,
636 "Installing notify handler failed"));
628 return_ACPI_STATUS(status); 637 return_ACPI_STATUS(status);
629} 638}
630 639
diff --git a/drivers/acpi/executer/exconfig.c b/drivers/acpi/executer/exconfig.c
index 823352435e0..83fed079a27 100644
--- a/drivers/acpi/executer/exconfig.c
+++ b/drivers/acpi/executer/exconfig.c
@@ -266,6 +266,10 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
266 } 266 }
267 } 267 }
268 268
269 ACPI_INFO((AE_INFO,
270 "Dynamic OEM Table Load - [%4.4s] OemId [%6.6s] OemTableId [%8.8s]",
271 table->signature, table->oem_id, table->oem_table_id));
272
269 *return_desc = ddb_handle; 273 *return_desc = ddb_handle;
270 return_ACPI_STATUS(status); 274 return_ACPI_STATUS(status);
271} 275}
@@ -446,6 +450,10 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
446 return_ACPI_STATUS(status); 450 return_ACPI_STATUS(status);
447 } 451 }
448 452
453 ACPI_INFO((AE_INFO,
454 "Dynamic SSDT Load - OemId [%6.6s] OemTableId [%8.8s]",
455 table_ptr->oem_id, table_ptr->oem_table_id));
456
449 cleanup: 457 cleanup:
450 if (ACPI_FAILURE(status)) { 458 if (ACPI_FAILURE(status)) {
451 ACPI_FREE(table_ptr); 459 ACPI_FREE(table_ptr);
diff --git a/drivers/acpi/executer/excreate.c b/drivers/acpi/executer/excreate.c
index 106dc7219df..34eec82c1b1 100644
--- a/drivers/acpi/executer/excreate.c
+++ b/drivers/acpi/executer/excreate.c
@@ -177,7 +177,7 @@ acpi_status acpi_ex_create_event(struct acpi_walk_state *walk_state)
177 * that the event is created in an unsignalled state 177 * that the event is created in an unsignalled state
178 */ 178 */
179 status = acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, 179 status = acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0,
180 &obj_desc->event.semaphore); 180 &obj_desc->event.os_semaphore);
181 if (ACPI_FAILURE(status)) { 181 if (ACPI_FAILURE(status)) {
182 goto cleanup; 182 goto cleanup;
183 } 183 }
@@ -226,12 +226,9 @@ acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state)
226 goto cleanup; 226 goto cleanup;
227 } 227 }
228 228
229 /* 229 /* Create the actual OS Mutex */
230 * Create the actual OS semaphore. 230
231 * One unit max to make it a mutex, with one initial unit to allow 231 status = acpi_os_create_mutex(&obj_desc->mutex.os_mutex);
232 * the mutex to be acquired.
233 */
234 status = acpi_os_create_semaphore(1, 1, &obj_desc->mutex.semaphore);
235 if (ACPI_FAILURE(status)) { 232 if (ACPI_FAILURE(status)) {
236 goto cleanup; 233 goto cleanup;
237 } 234 }
@@ -565,7 +562,7 @@ acpi_ex_create_method(u8 * aml_start,
565 obj_desc->method.aml_length = aml_length; 562 obj_desc->method.aml_length = aml_length;
566 563
567 /* 564 /*
568 * Disassemble the method flags. Split off the Arg Count 565 * Disassemble the method flags. Split off the Arg Count
569 * for efficiency 566 * for efficiency
570 */ 567 */
571 method_flags = (u8) operand[1]->integer.value; 568 method_flags = (u8) operand[1]->integer.value;
@@ -576,21 +573,19 @@ acpi_ex_create_method(u8 * aml_start,
576 (u8) (method_flags & AML_METHOD_ARG_COUNT); 573 (u8) (method_flags & AML_METHOD_ARG_COUNT);
577 574
578 /* 575 /*
579 * Get the concurrency count. If required, a semaphore will be 576 * Get the sync_level. If method is serialized, a mutex will be
580 * created for this method when it is parsed. 577 * created for this method when it is parsed.
581 */ 578 */
582 if (acpi_gbl_all_methods_serialized) { 579 if (acpi_gbl_all_methods_serialized) {
583 obj_desc->method.concurrency = 1; 580 obj_desc->method.sync_level = 0;
584 obj_desc->method.method_flags |= AML_METHOD_SERIALIZED; 581 obj_desc->method.method_flags |= AML_METHOD_SERIALIZED;
585 } else if (method_flags & AML_METHOD_SERIALIZED) { 582 } else if (method_flags & AML_METHOD_SERIALIZED) {
586 /* 583 /*
587 * ACPI 1.0: Concurrency = 1 584 * ACPI 1.0: sync_level = 0
588 * ACPI 2.0: Concurrency = (sync_level (in method declaration) + 1) 585 * ACPI 2.0: sync_level = sync_level in method declaration
589 */ 586 */
590 obj_desc->method.concurrency = (u8) 587 obj_desc->method.sync_level = (u8)
591 (((method_flags & AML_METHOD_SYNCH_LEVEL) >> 4) + 1); 588 ((method_flags & AML_METHOD_SYNCH_LEVEL) >> 4);
592 } else {
593 obj_desc->method.concurrency = ACPI_INFINITE_CONCURRENCY;
594 } 589 }
595 590
596 /* Attach the new object to the method Node */ 591 /* Attach the new object to the method Node */
diff --git a/drivers/acpi/executer/exdump.c b/drivers/acpi/executer/exdump.c
index 7b9718e976b..2450943add3 100644
--- a/drivers/acpi/executer/exdump.c
+++ b/drivers/acpi/executer/exdump.c
@@ -118,14 +118,14 @@ static struct acpi_exdump_info acpi_ex_dump_device[4] = {
118 118
119static struct acpi_exdump_info acpi_ex_dump_event[2] = { 119static struct acpi_exdump_info acpi_ex_dump_event[2] = {
120 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_event), NULL}, 120 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_event), NULL},
121 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.semaphore), "Semaphore"} 121 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(event.os_semaphore), "OsSemaphore"}
122}; 122};
123 123
124static struct acpi_exdump_info acpi_ex_dump_method[8] = { 124static struct acpi_exdump_info acpi_ex_dump_method[8] = {
125 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL}, 125 {ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE(acpi_ex_dump_method), NULL},
126 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "ParamCount"}, 126 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.param_count), "ParamCount"},
127 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.concurrency), "Concurrency"}, 127 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.sync_level), "Sync Level"},
128 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.semaphore), "Semaphore"}, 128 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(method.mutex), "Mutex"},
129 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"}, 129 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.owner_id), "Owner Id"},
130 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"}, 130 {ACPI_EXD_UINT8, ACPI_EXD_OFFSET(method.thread_count), "Thread Count"},
131 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"}, 131 {ACPI_EXD_UINT32, ACPI_EXD_OFFSET(method.aml_length), "Aml Length"},
@@ -138,7 +138,7 @@ static struct acpi_exdump_info acpi_ex_dump_mutex[5] = {
138 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.owner_thread), "Owner Thread"}, 138 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.owner_thread), "Owner Thread"},
139 {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(mutex.acquisition_depth), 139 {ACPI_EXD_UINT16, ACPI_EXD_OFFSET(mutex.acquisition_depth),
140 "Acquire Depth"}, 140 "Acquire Depth"},
141 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.semaphore), "Semaphore"} 141 {ACPI_EXD_POINTER, ACPI_EXD_OFFSET(mutex.os_mutex), "OsMutex"}
142}; 142};
143 143
144static struct acpi_exdump_info acpi_ex_dump_region[7] = { 144static struct acpi_exdump_info acpi_ex_dump_region[7] = {
diff --git a/drivers/acpi/executer/exfldio.c b/drivers/acpi/executer/exfldio.c
index 051053f7ccc..40f0bee6faa 100644
--- a/drivers/acpi/executer/exfldio.c
+++ b/drivers/acpi/executer/exfldio.c
@@ -727,11 +727,23 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
727 return_ACPI_STATUS(status); 727 return_ACPI_STATUS(status);
728 } 728 }
729 729
730 /* Merge with previous datum if necessary */ 730 /*
731 731 * Merge with previous datum if necessary.
732 merged_datum |= raw_datum << 732 *
733 (obj_desc->common_field.access_bit_width - 733 * Note: Before the shift, check if the shift value will be larger than
734 obj_desc->common_field.start_field_bit_offset); 734 * the integer size. If so, there is no need to perform the operation.
735 * This avoids the differences in behavior between different compilers
736 * concerning shift values larger than the target data width.
737 */
738 if ((obj_desc->common_field.access_bit_width -
739 obj_desc->common_field.start_field_bit_offset) <
740 ACPI_INTEGER_BIT_SIZE) {
741 merged_datum |=
742 raw_datum << (obj_desc->common_field.
743 access_bit_width -
744 obj_desc->common_field.
745 start_field_bit_offset);
746 }
735 747
736 if (i == datum_count) { 748 if (i == datum_count) {
737 break; 749 break;
@@ -808,13 +820,23 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
808 return_ACPI_STATUS(AE_BUFFER_OVERFLOW); 820 return_ACPI_STATUS(AE_BUFFER_OVERFLOW);
809 } 821 }
810 822
811 /* Compute the number of datums (access width data items) */ 823 /*
824 * Create the bitmasks used for bit insertion.
825 * Note: This if/else is used to bypass compiler differences with the
826 * shift operator
827 */
828 if (obj_desc->common_field.access_bit_width == ACPI_INTEGER_BIT_SIZE) {
829 width_mask = ACPI_INTEGER_MAX;
830 } else {
831 width_mask =
832 ACPI_MASK_BITS_ABOVE(obj_desc->common_field.
833 access_bit_width);
834 }
812 835
813 width_mask = 836 mask = width_mask &
814 ACPI_MASK_BITS_ABOVE(obj_desc->common_field.access_bit_width); 837 ACPI_MASK_BITS_BELOW(obj_desc->common_field.start_field_bit_offset);
815 mask = 838
816 width_mask & ACPI_MASK_BITS_BELOW(obj_desc->common_field. 839 /* Compute the number of datums (access width data items) */
817 start_field_bit_offset);
818 840
819 datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length, 841 datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length,
820 obj_desc->common_field.access_bit_width); 842 obj_desc->common_field.access_bit_width);
@@ -848,12 +870,29 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,
848 return_ACPI_STATUS(status); 870 return_ACPI_STATUS(status);
849 } 871 }
850 872
851 /* Start new output datum by merging with previous input datum */
852
853 field_offset += obj_desc->common_field.access_byte_width; 873 field_offset += obj_desc->common_field.access_byte_width;
854 merged_datum = raw_datum >> 874
855 (obj_desc->common_field.access_bit_width - 875 /*
856 obj_desc->common_field.start_field_bit_offset); 876 * Start new output datum by merging with previous input datum
877 * if necessary.
878 *
879 * Note: Before the shift, check if the shift value will be larger than
880 * the integer size. If so, there is no need to perform the operation.
881 * This avoids the differences in behavior between different compilers
882 * concerning shift values larger than the target data width.
883 */
884 if ((obj_desc->common_field.access_bit_width -
885 obj_desc->common_field.start_field_bit_offset) <
886 ACPI_INTEGER_BIT_SIZE) {
887 merged_datum =
888 raw_datum >> (obj_desc->common_field.
889 access_bit_width -
890 obj_desc->common_field.
891 start_field_bit_offset);
892 } else {
893 merged_datum = 0;
894 }
895
857 mask = width_mask; 896 mask = width_mask;
858 897
859 if (i == datum_count) { 898 if (i == datum_count) {
diff --git a/drivers/acpi/executer/exmutex.c b/drivers/acpi/executer/exmutex.c
index 93098d68cad..d8ac2877cf0 100644
--- a/drivers/acpi/executer/exmutex.c
+++ b/drivers/acpi/executer/exmutex.c
@@ -161,12 +161,13 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
161 161
162 /* 162 /*
163 * Current Sync must be less than or equal to the sync level of the 163 * Current Sync must be less than or equal to the sync level of the
164 * mutex. This mechanism provides some deadlock prevention 164 * mutex. This mechanism provides some deadlock prevention
165 */ 165 */
166 if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) { 166 if (walk_state->thread->current_sync_level > obj_desc->mutex.sync_level) {
167 ACPI_ERROR((AE_INFO, 167 ACPI_ERROR((AE_INFO,
168 "Cannot acquire Mutex [%4.4s], incorrect SyncLevel", 168 "Cannot acquire Mutex [%4.4s], current SyncLevel is too large (%d)",
169 acpi_ut_get_node_name(obj_desc->mutex.node))); 169 acpi_ut_get_node_name(obj_desc->mutex.node),
170 walk_state->thread->current_sync_level));
170 return_ACPI_STATUS(AE_AML_MUTEX_ORDER); 171 return_ACPI_STATUS(AE_AML_MUTEX_ORDER);
171 } 172 }
172 173
@@ -178,8 +179,7 @@ acpi_ex_acquire_mutex(union acpi_operand_object *time_desc,
178 179
179 if ((obj_desc->mutex.owner_thread->thread_id == 180 if ((obj_desc->mutex.owner_thread->thread_id ==
180 walk_state->thread->thread_id) || 181 walk_state->thread->thread_id) ||
181 (obj_desc->mutex.semaphore == 182 (obj_desc->mutex.os_mutex == ACPI_GLOBAL_LOCK)) {
182 acpi_gbl_global_lock_semaphore)) {
183 /* 183 /*
184 * The mutex is already owned by this thread, 184 * The mutex is already owned by this thread,
185 * just increment the acquisition depth 185 * just increment the acquisition depth
@@ -264,7 +264,7 @@ acpi_ex_release_mutex(union acpi_operand_object *obj_desc,
264 */ 264 */
265 if ((obj_desc->mutex.owner_thread->thread_id != 265 if ((obj_desc->mutex.owner_thread->thread_id !=
266 walk_state->thread->thread_id) 266 walk_state->thread->thread_id)
267 && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { 267 && (obj_desc->mutex.os_mutex != ACPI_GLOBAL_LOCK)) {
268 ACPI_ERROR((AE_INFO, 268 ACPI_ERROR((AE_INFO,
269 "Thread %X cannot release Mutex [%4.4s] acquired by thread %X", 269 "Thread %X cannot release Mutex [%4.4s] acquired by thread %X",
270 walk_state->thread->thread_id, 270 walk_state->thread->thread_id,
diff --git a/drivers/acpi/executer/exsystem.c b/drivers/acpi/executer/exsystem.c
index 52beee3674a..6b5d1e6ce94 100644
--- a/drivers/acpi/executer/exsystem.c
+++ b/drivers/acpi/executer/exsystem.c
@@ -63,14 +63,14 @@ ACPI_MODULE_NAME("exsystem")
63 * interpreter is released. 63 * interpreter is released.
64 * 64 *
65 ******************************************************************************/ 65 ******************************************************************************/
66acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout) 66acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout)
67{ 67{
68 acpi_status status; 68 acpi_status status;
69 acpi_status status2; 69 acpi_status status2;
70 70
71 ACPI_FUNCTION_TRACE(ex_system_wait_semaphore); 71 ACPI_FUNCTION_TRACE(ex_system_wait_semaphore);
72 72
73 status = acpi_os_wait_semaphore(semaphore, 1, 0); 73 status = acpi_os_wait_semaphore(semaphore, 1, ACPI_DO_NOT_WAIT);
74 if (ACPI_SUCCESS(status)) { 74 if (ACPI_SUCCESS(status)) {
75 return_ACPI_STATUS(status); 75 return_ACPI_STATUS(status);
76 } 76 }
@@ -103,6 +103,59 @@ acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout)
103 103
104/******************************************************************************* 104/*******************************************************************************
105 * 105 *
106 * FUNCTION: acpi_ex_system_wait_mutex
107 *
108 * PARAMETERS: Mutex - Mutex to wait on
109 * Timeout - Max time to wait
110 *
111 * RETURN: Status
112 *
113 * DESCRIPTION: Implements a semaphore wait with a check to see if the
114 * semaphore is available immediately. If it is not, the
115 * interpreter is released.
116 *
117 ******************************************************************************/
118
119acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout)
120{
121 acpi_status status;
122 acpi_status status2;
123
124 ACPI_FUNCTION_TRACE(ex_system_wait_mutex);
125
126 status = acpi_os_acquire_mutex(mutex, ACPI_DO_NOT_WAIT);
127 if (ACPI_SUCCESS(status)) {
128 return_ACPI_STATUS(status);
129 }
130
131 if (status == AE_TIME) {
132
133 /* We must wait, so unlock the interpreter */
134
135 acpi_ex_exit_interpreter();
136
137 status = acpi_os_acquire_mutex(mutex, timeout);
138
139 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
140 "*** Thread awake after blocking, %s\n",
141 acpi_format_exception(status)));
142
143 /* Reacquire the interpreter */
144
145 status2 = acpi_ex_enter_interpreter();
146 if (ACPI_FAILURE(status2)) {
147
148 /* Report fatal error, could not acquire interpreter */
149
150 return_ACPI_STATUS(status2);
151 }
152 }
153
154 return_ACPI_STATUS(status);
155}
156
157/*******************************************************************************
158 *
106 * FUNCTION: acpi_ex_system_do_stall 159 * FUNCTION: acpi_ex_system_do_stall
107 * 160 *
108 * PARAMETERS: how_long - The amount of time to stall, 161 * PARAMETERS: how_long - The amount of time to stall,
@@ -176,7 +229,7 @@ acpi_status acpi_ex_system_do_suspend(acpi_integer how_long)
176 * 229 *
177 * FUNCTION: acpi_ex_system_acquire_mutex 230 * FUNCTION: acpi_ex_system_acquire_mutex
178 * 231 *
179 * PARAMETERS: time_desc - The 'time to delay' object descriptor 232 * PARAMETERS: time_desc - Maximum time to wait for the mutex
180 * obj_desc - The object descriptor for this op 233 * obj_desc - The object descriptor for this op
181 * 234 *
182 * RETURN: Status 235 * RETURN: Status
@@ -201,14 +254,14 @@ acpi_ex_system_acquire_mutex(union acpi_operand_object * time_desc,
201 254
202 /* Support for the _GL_ Mutex object -- go get the global lock */ 255 /* Support for the _GL_ Mutex object -- go get the global lock */
203 256
204 if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) { 257 if (obj_desc->mutex.os_mutex == ACPI_GLOBAL_LOCK) {
205 status = 258 status =
206 acpi_ev_acquire_global_lock((u16) time_desc->integer.value); 259 acpi_ev_acquire_global_lock((u16) time_desc->integer.value);
207 return_ACPI_STATUS(status); 260 return_ACPI_STATUS(status);
208 } 261 }
209 262
210 status = acpi_ex_system_wait_semaphore(obj_desc->mutex.semaphore, 263 status = acpi_ex_system_wait_mutex(obj_desc->mutex.os_mutex,
211 (u16) time_desc->integer.value); 264 (u16) time_desc->integer.value);
212 return_ACPI_STATUS(status); 265 return_ACPI_STATUS(status);
213} 266}
214 267
@@ -239,13 +292,13 @@ acpi_status acpi_ex_system_release_mutex(union acpi_operand_object *obj_desc)
239 292
240 /* Support for the _GL_ Mutex object -- release the global lock */ 293 /* Support for the _GL_ Mutex object -- release the global lock */
241 294
242 if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) { 295 if (obj_desc->mutex.os_mutex == ACPI_GLOBAL_LOCK) {
243 status = acpi_ev_release_global_lock(); 296 status = acpi_ev_release_global_lock();
244 return_ACPI_STATUS(status); 297 return_ACPI_STATUS(status);
245 } 298 }
246 299
247 status = acpi_os_signal_semaphore(obj_desc->mutex.semaphore, 1); 300 acpi_os_release_mutex(obj_desc->mutex.os_mutex);
248 return_ACPI_STATUS(status); 301 return_ACPI_STATUS(AE_OK);
249} 302}
250 303
251/******************************************************************************* 304/*******************************************************************************
@@ -268,7 +321,8 @@ acpi_status acpi_ex_system_signal_event(union acpi_operand_object *obj_desc)
268 ACPI_FUNCTION_TRACE(ex_system_signal_event); 321 ACPI_FUNCTION_TRACE(ex_system_signal_event);
269 322
270 if (obj_desc) { 323 if (obj_desc) {
271 status = acpi_os_signal_semaphore(obj_desc->event.semaphore, 1); 324 status =
325 acpi_os_signal_semaphore(obj_desc->event.os_semaphore, 1);
272 } 326 }
273 327
274 return_ACPI_STATUS(status); 328 return_ACPI_STATUS(status);
@@ -299,7 +353,7 @@ acpi_ex_system_wait_event(union acpi_operand_object *time_desc,
299 353
300 if (obj_desc) { 354 if (obj_desc) {
301 status = 355 status =
302 acpi_ex_system_wait_semaphore(obj_desc->event.semaphore, 356 acpi_ex_system_wait_semaphore(obj_desc->event.os_semaphore,
303 (u16) time_desc->integer. 357 (u16) time_desc->integer.
304 value); 358 value);
305 } 359 }
@@ -322,7 +376,7 @@ acpi_ex_system_wait_event(union acpi_operand_object *time_desc,
322acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc) 376acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc)
323{ 377{
324 acpi_status status = AE_OK; 378 acpi_status status = AE_OK;
325 void *temp_semaphore; 379 acpi_semaphore temp_semaphore;
326 380
327 ACPI_FUNCTION_ENTRY(); 381 ACPI_FUNCTION_ENTRY();
328 382
@@ -333,8 +387,8 @@ acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc)
333 status = 387 status =
334 acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, &temp_semaphore); 388 acpi_os_create_semaphore(ACPI_NO_UNIT_LIMIT, 0, &temp_semaphore);
335 if (ACPI_SUCCESS(status)) { 389 if (ACPI_SUCCESS(status)) {
336 (void)acpi_os_delete_semaphore(obj_desc->event.semaphore); 390 (void)acpi_os_delete_semaphore(obj_desc->event.os_semaphore);
337 obj_desc->event.semaphore = temp_semaphore; 391 obj_desc->event.os_semaphore = temp_semaphore;
338 } 392 }
339 393
340 return (status); 394 return (status);
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 1cd25784b7a..38acc69b21b 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -78,7 +78,6 @@ static int acpi_fan_read_state(struct seq_file *seq, void *offset)
78 struct acpi_fan *fan = seq->private; 78 struct acpi_fan *fan = seq->private;
79 int state = 0; 79 int state = 0;
80 80
81 ACPI_FUNCTION_TRACE("acpi_fan_read_state");
82 81
83 if (fan) { 82 if (fan) {
84 if (acpi_bus_get_power(fan->handle, &state)) 83 if (acpi_bus_get_power(fan->handle, &state))
@@ -87,7 +86,7 @@ static int acpi_fan_read_state(struct seq_file *seq, void *offset)
87 seq_printf(seq, "status: %s\n", 86 seq_printf(seq, "status: %s\n",
88 !state ? "on" : "off"); 87 !state ? "on" : "off");
89 } 88 }
90 return_VALUE(0); 89 return 0;
91} 90}
92 91
93static int acpi_fan_state_open_fs(struct inode *inode, struct file *file) 92static int acpi_fan_state_open_fs(struct inode *inode, struct file *file)
@@ -104,22 +103,21 @@ acpi_fan_write_state(struct file *file, const char __user * buffer,
104 struct acpi_fan *fan = (struct acpi_fan *)m->private; 103 struct acpi_fan *fan = (struct acpi_fan *)m->private;
105 char state_string[12] = { '\0' }; 104 char state_string[12] = { '\0' };
106 105
107 ACPI_FUNCTION_TRACE("acpi_fan_write_state");
108 106
109 if (!fan || (count > sizeof(state_string) - 1)) 107 if (!fan || (count > sizeof(state_string) - 1))
110 return_VALUE(-EINVAL); 108 return -EINVAL;
111 109
112 if (copy_from_user(state_string, buffer, count)) 110 if (copy_from_user(state_string, buffer, count))
113 return_VALUE(-EFAULT); 111 return -EFAULT;
114 112
115 state_string[count] = '\0'; 113 state_string[count] = '\0';
116 114
117 result = acpi_bus_set_power(fan->handle, 115 result = acpi_bus_set_power(fan->handle,
118 simple_strtoul(state_string, NULL, 0)); 116 simple_strtoul(state_string, NULL, 0));
119 if (result) 117 if (result)
120 return_VALUE(result); 118 return result;
121 119
122 return_VALUE(count); 120 return count;
123} 121}
124 122
125static struct file_operations acpi_fan_state_ops = { 123static struct file_operations acpi_fan_state_ops = {
@@ -135,16 +133,15 @@ static int acpi_fan_add_fs(struct acpi_device *device)
135{ 133{
136 struct proc_dir_entry *entry = NULL; 134 struct proc_dir_entry *entry = NULL;
137 135
138 ACPI_FUNCTION_TRACE("acpi_fan_add_fs");
139 136
140 if (!device) 137 if (!device)
141 return_VALUE(-EINVAL); 138 return -EINVAL;
142 139
143 if (!acpi_device_dir(device)) { 140 if (!acpi_device_dir(device)) {
144 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 141 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
145 acpi_fan_dir); 142 acpi_fan_dir);
146 if (!acpi_device_dir(device)) 143 if (!acpi_device_dir(device))
147 return_VALUE(-ENODEV); 144 return -ENODEV;
148 acpi_device_dir(device)->owner = THIS_MODULE; 145 acpi_device_dir(device)->owner = THIS_MODULE;
149 } 146 }
150 147
@@ -153,21 +150,18 @@ static int acpi_fan_add_fs(struct acpi_device *device)
153 S_IFREG | S_IRUGO | S_IWUSR, 150 S_IFREG | S_IRUGO | S_IWUSR,
154 acpi_device_dir(device)); 151 acpi_device_dir(device));
155 if (!entry) 152 if (!entry)
156 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 153 return -ENODEV;
157 "Unable to create '%s' fs entry\n",
158 ACPI_FAN_FILE_STATE));
159 else { 154 else {
160 entry->proc_fops = &acpi_fan_state_ops; 155 entry->proc_fops = &acpi_fan_state_ops;
161 entry->data = acpi_driver_data(device); 156 entry->data = acpi_driver_data(device);
162 entry->owner = THIS_MODULE; 157 entry->owner = THIS_MODULE;
163 } 158 }
164 159
165 return_VALUE(0); 160 return 0;
166} 161}
167 162
168static int acpi_fan_remove_fs(struct acpi_device *device) 163static int acpi_fan_remove_fs(struct acpi_device *device)
169{ 164{
170 ACPI_FUNCTION_TRACE("acpi_fan_remove_fs");
171 165
172 if (acpi_device_dir(device)) { 166 if (acpi_device_dir(device)) {
173 remove_proc_entry(ACPI_FAN_FILE_STATE, acpi_device_dir(device)); 167 remove_proc_entry(ACPI_FAN_FILE_STATE, acpi_device_dir(device));
@@ -175,7 +169,7 @@ static int acpi_fan_remove_fs(struct acpi_device *device)
175 acpi_device_dir(device) = NULL; 169 acpi_device_dir(device) = NULL;
176 } 170 }
177 171
178 return_VALUE(0); 172 return 0;
179} 173}
180 174
181/* -------------------------------------------------------------------------- 175/* --------------------------------------------------------------------------
@@ -188,14 +182,13 @@ static int acpi_fan_add(struct acpi_device *device)
188 struct acpi_fan *fan = NULL; 182 struct acpi_fan *fan = NULL;
189 int state = 0; 183 int state = 0;
190 184
191 ACPI_FUNCTION_TRACE("acpi_fan_add");
192 185
193 if (!device) 186 if (!device)
194 return_VALUE(-EINVAL); 187 return -EINVAL;
195 188
196 fan = kmalloc(sizeof(struct acpi_fan), GFP_KERNEL); 189 fan = kmalloc(sizeof(struct acpi_fan), GFP_KERNEL);
197 if (!fan) 190 if (!fan)
198 return_VALUE(-ENOMEM); 191 return -ENOMEM;
199 memset(fan, 0, sizeof(struct acpi_fan)); 192 memset(fan, 0, sizeof(struct acpi_fan));
200 193
201 fan->handle = device->handle; 194 fan->handle = device->handle;
@@ -205,8 +198,7 @@ static int acpi_fan_add(struct acpi_device *device)
205 198
206 result = acpi_bus_get_power(fan->handle, &state); 199 result = acpi_bus_get_power(fan->handle, &state);
207 if (result) { 200 if (result) {
208 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 201 printk(KERN_ERR PREFIX "Reading power state\n");
209 "Error reading power state\n"));
210 goto end; 202 goto end;
211 } 203 }
212 204
@@ -226,17 +218,16 @@ static int acpi_fan_add(struct acpi_device *device)
226 if (result) 218 if (result)
227 kfree(fan); 219 kfree(fan);
228 220
229 return_VALUE(result); 221 return result;
230} 222}
231 223
232static int acpi_fan_remove(struct acpi_device *device, int type) 224static int acpi_fan_remove(struct acpi_device *device, int type)
233{ 225{
234 struct acpi_fan *fan = NULL; 226 struct acpi_fan *fan = NULL;
235 227
236 ACPI_FUNCTION_TRACE("acpi_fan_remove");
237 228
238 if (!device || !acpi_driver_data(device)) 229 if (!device || !acpi_driver_data(device))
239 return_VALUE(-EINVAL); 230 return -EINVAL;
240 231
241 fan = (struct acpi_fan *)acpi_driver_data(device); 232 fan = (struct acpi_fan *)acpi_driver_data(device);
242 233
@@ -244,7 +235,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type)
244 235
245 kfree(fan); 236 kfree(fan);
246 237
247 return_VALUE(0); 238 return 0;
248} 239}
249 240
250static int acpi_fan_suspend(struct acpi_device *device, int state) 241static int acpi_fan_suspend(struct acpi_device *device, int state)
@@ -283,31 +274,29 @@ static int __init acpi_fan_init(void)
283{ 274{
284 int result = 0; 275 int result = 0;
285 276
286 ACPI_FUNCTION_TRACE("acpi_fan_init");
287 277
288 acpi_fan_dir = proc_mkdir(ACPI_FAN_CLASS, acpi_root_dir); 278 acpi_fan_dir = proc_mkdir(ACPI_FAN_CLASS, acpi_root_dir);
289 if (!acpi_fan_dir) 279 if (!acpi_fan_dir)
290 return_VALUE(-ENODEV); 280 return -ENODEV;
291 acpi_fan_dir->owner = THIS_MODULE; 281 acpi_fan_dir->owner = THIS_MODULE;
292 282
293 result = acpi_bus_register_driver(&acpi_fan_driver); 283 result = acpi_bus_register_driver(&acpi_fan_driver);
294 if (result < 0) { 284 if (result < 0) {
295 remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir); 285 remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir);
296 return_VALUE(-ENODEV); 286 return -ENODEV;
297 } 287 }
298 288
299 return_VALUE(0); 289 return 0;
300} 290}
301 291
302static void __exit acpi_fan_exit(void) 292static void __exit acpi_fan_exit(void)
303{ 293{
304 ACPI_FUNCTION_TRACE("acpi_fan_exit");
305 294
306 acpi_bus_unregister_driver(&acpi_fan_driver); 295 acpi_bus_unregister_driver(&acpi_fan_driver);
307 296
308 remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir); 297 remove_proc_entry(ACPI_FAN_CLASS, acpi_root_dir);
309 298
310 return_VOID; 299 return;
311} 300}
312 301
313module_init(acpi_fan_init); 302module_init(acpi_fan_init);
diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c
index ae142de1950..3143f36fcec 100644
--- a/drivers/acpi/hardware/hwregs.c
+++ b/drivers/acpi/hardware/hwregs.c
@@ -172,9 +172,9 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
172 } 172 }
173 173
174 /* 174 /*
175 * The package must have at least two elements. NOTE (March 2005): This 175 * The package must have at least two elements. NOTE (March 2005): This
176 * goes against the current ACPI spec which defines this object as a 176 * goes against the current ACPI spec which defines this object as a
177 * package with one encoded DWORD element. However, existing practice 177 * package with one encoded DWORD element. However, existing practice
178 * by BIOS vendors seems to be to have 2 or more elements, at least 178 * by BIOS vendors seems to be to have 2 or more elements, at least
179 * one per sleep type (A/B). 179 * one per sleep type (A/B).
180 */ 180 */
@@ -255,7 +255,7 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
255 * return_value - Value that was read from the register 255 * return_value - Value that was read from the register
256 * Flags - Lock the hardware or not 256 * Flags - Lock the hardware or not
257 * 257 *
258 * RETURN: Status and the value read from specified Register. Value 258 * RETURN: Status and the value read from specified Register. Value
259 * returned is normalized to bit0 (is shifted all the way right) 259 * returned is normalized to bit0 (is shifted all the way right)
260 * 260 *
261 * DESCRIPTION: ACPI bit_register read function. 261 * DESCRIPTION: ACPI bit_register read function.
@@ -361,8 +361,8 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags)
361 case ACPI_REGISTER_PM1_STATUS: 361 case ACPI_REGISTER_PM1_STATUS:
362 362
363 /* 363 /*
364 * Status Registers are different from the rest. Clear by 364 * Status Registers are different from the rest. Clear by
365 * writing 1, and writing 0 has no effect. So, the only relevant 365 * writing 1, and writing 0 has no effect. So, the only relevant
366 * information is the single bit we're interested in, all others should 366 * information is the single bit we're interested in, all others should
367 * be written as 0 so they will be left unchanged. 367 * be written as 0 so they will be left unchanged.
368 */ 368 */
@@ -467,14 +467,13 @@ ACPI_EXPORT_SYMBOL(acpi_set_register)
467 * 467 *
468 * FUNCTION: acpi_hw_register_read 468 * FUNCTION: acpi_hw_register_read
469 * 469 *
470 * PARAMETERS: use_lock - Mutex hw access 470 * PARAMETERS: use_lock - Lock hardware? True/False
471 * register_id - register_iD + Offset 471 * register_id - ACPI Register ID
472 * return_value - Where the register value is returned 472 * return_value - Where the register value is returned
473 * 473 *
474 * RETURN: Status and the value read. 474 * RETURN: Status and the value read.
475 * 475 *
476 * DESCRIPTION: Acpi register read function. Registers are read at the 476 * DESCRIPTION: Read from the specified ACPI register
477 * given offset.
478 * 477 *
479 ******************************************************************************/ 478 ******************************************************************************/
480acpi_status 479acpi_status
@@ -580,14 +579,26 @@ acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value)
580 * 579 *
581 * FUNCTION: acpi_hw_register_write 580 * FUNCTION: acpi_hw_register_write
582 * 581 *
583 * PARAMETERS: use_lock - Mutex hw access 582 * PARAMETERS: use_lock - Lock hardware? True/False
584 * register_id - register_iD + Offset 583 * register_id - ACPI Register ID
585 * Value - The value to write 584 * Value - The value to write
586 * 585 *
587 * RETURN: Status 586 * RETURN: Status
588 * 587 *
589 * DESCRIPTION: Acpi register Write function. Registers are written at the 588 * DESCRIPTION: Write to the specified ACPI register
590 * given offset. 589 *
590 * NOTE: In accordance with the ACPI specification, this function automatically
591 * preserves the value of the following bits, meaning that these bits cannot be
592 * changed via this interface:
593 *
594 * PM1_CONTROL[0] = SCI_EN
595 * PM1_CONTROL[9]
596 * PM1_STATUS[11]
597 *
598 * ACPI References:
599 * 1) Hardware Ignored Bits: When software writes to a register with ignored
600 * bit fields, it preserves the ignored bit fields
601 * 2) SCI_EN: OSPM always preserves this bit position
591 * 602 *
592 ******************************************************************************/ 603 ******************************************************************************/
593 604
@@ -595,6 +606,7 @@ acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value)
595{ 606{
596 acpi_status status; 607 acpi_status status;
597 acpi_cpu_flags lock_flags = 0; 608 acpi_cpu_flags lock_flags = 0;
609 u32 read_value;
598 610
599 ACPI_FUNCTION_TRACE(hw_register_write); 611 ACPI_FUNCTION_TRACE(hw_register_write);
600 612
@@ -605,6 +617,22 @@ acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value)
605 switch (register_id) { 617 switch (register_id) {
606 case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */ 618 case ACPI_REGISTER_PM1_STATUS: /* 16-bit access */
607 619
620 /* Perform a read first to preserve certain bits (per ACPI spec) */
621
622 status = acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK,
623 ACPI_REGISTER_PM1_STATUS,
624 &read_value);
625 if (ACPI_FAILURE(status)) {
626 goto unlock_and_exit;
627 }
628
629 /* Insert the bits to be preserved */
630
631 ACPI_INSERT_BITS(value, ACPI_PM1_STATUS_PRESERVED_BITS,
632 read_value);
633
634 /* Now we can write the data */
635
608 status = 636 status =
609 acpi_hw_low_level_write(16, value, 637 acpi_hw_low_level_write(16, value,
610 &acpi_gbl_FADT->xpm1a_evt_blk); 638 &acpi_gbl_FADT->xpm1a_evt_blk);
@@ -635,6 +663,25 @@ acpi_status acpi_hw_register_write(u8 use_lock, u32 register_id, u32 value)
635 663
636 case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */ 664 case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */
637 665
666 /*
667 * Perform a read first to preserve certain bits (per ACPI spec)
668 *
669 * Note: This includes SCI_EN, we never want to change this bit
670 */
671 status = acpi_hw_register_read(ACPI_MTX_DO_NOT_LOCK,
672 ACPI_REGISTER_PM1_CONTROL,
673 &read_value);
674 if (ACPI_FAILURE(status)) {
675 goto unlock_and_exit;
676 }
677
678 /* Insert the bits to be preserved */
679
680 ACPI_INSERT_BITS(value, ACPI_PM1_CONTROL_PRESERVED_BITS,
681 read_value);
682
683 /* Now we can write the data */
684
638 status = 685 status =
639 acpi_hw_low_level_write(16, value, 686 acpi_hw_low_level_write(16, value,
640 &acpi_gbl_FADT->xpm1a_cnt_blk); 687 &acpi_gbl_FADT->xpm1a_cnt_blk);
@@ -726,7 +773,7 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)
726 return (AE_OK); 773 return (AE_OK);
727 } 774 }
728 775
729 /* Get a local copy of the address. Handles possible alignment issues */ 776 /* Get a local copy of the address. Handles possible alignment issues */
730 777
731 ACPI_MOVE_64_TO_64(&address, &reg->address); 778 ACPI_MOVE_64_TO_64(&address, &reg->address);
732 if (!address) { 779 if (!address) {
@@ -798,7 +845,7 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)
798 return (AE_OK); 845 return (AE_OK);
799 } 846 }
800 847
801 /* Get a local copy of the address. Handles possible alignment issues */ 848 /* Get a local copy of the address. Handles possible alignment issues */
802 849
803 ACPI_MOVE_64_TO_64(&address, &reg->address); 850 ACPI_MOVE_64_TO_64(&address, &reg->address);
804 if (!address) { 851 if (!address) {
diff --git a/drivers/acpi/hotkey.c b/drivers/acpi/hotkey.c
index c25b2b92edc..fd81a0f5222 100644
--- a/drivers/acpi/hotkey.c
+++ b/drivers/acpi/hotkey.c
@@ -231,11 +231,10 @@ struct list_head hotkey_entries; /* head of the list of hotkey_list */
231 231
232static int hotkey_info_seq_show(struct seq_file *seq, void *offset) 232static int hotkey_info_seq_show(struct seq_file *seq, void *offset)
233{ 233{
234 ACPI_FUNCTION_TRACE("hotkey_info_seq_show");
235 234
236 seq_printf(seq, "Hotkey generic driver ver: %s\n", HOTKEY_ACPI_VERSION); 235 seq_printf(seq, "Hotkey generic driver ver: %s\n", HOTKEY_ACPI_VERSION);
237 236
238 return_VALUE(0); 237 return 0;
239} 238}
240 239
241static int hotkey_info_open_fs(struct inode *inode, struct file *file) 240static int hotkey_info_open_fs(struct inode *inode, struct file *file)
@@ -266,7 +265,6 @@ static int hotkey_polling_seq_show(struct seq_file *seq, void *offset)
266 (struct acpi_polling_hotkey *)seq->private; 265 (struct acpi_polling_hotkey *)seq->private;
267 char *buf; 266 char *buf;
268 267
269 ACPI_FUNCTION_TRACE("hotkey_polling_seq_show");
270 268
271 if (poll_hotkey->poll_result) { 269 if (poll_hotkey->poll_result) {
272 buf = format_result(poll_hotkey->poll_result); 270 buf = format_result(poll_hotkey->poll_result);
@@ -274,7 +272,7 @@ static int hotkey_polling_seq_show(struct seq_file *seq, void *offset)
274 seq_printf(seq, "%s", buf); 272 seq_printf(seq, "%s", buf);
275 kfree(buf); 273 kfree(buf);
276 } 274 }
277 return_VALUE(0); 275 return 0;
278} 276}
279 277
280static int hotkey_polling_open_fs(struct inode *inode, struct file *file) 278static int hotkey_polling_open_fs(struct inode *inode, struct file *file)
@@ -293,7 +291,6 @@ static int hotkey_get_internal_event(int event, struct acpi_hotkey_list *list)
293 struct list_head *entries; 291 struct list_head *entries;
294 int val = -1; 292 int val = -1;
295 293
296 ACPI_FUNCTION_TRACE("hotkey_get_internal_event");
297 294
298 list_for_each(entries, list->entries) { 295 list_for_each(entries, list->entries) {
299 union acpi_hotkey *key = 296 union acpi_hotkey *key =
@@ -305,7 +302,7 @@ static int hotkey_get_internal_event(int event, struct acpi_hotkey_list *list)
305 } 302 }
306 } 303 }
307 304
308 return_VALUE(val); 305 return val;
309} 306}
310 307
311static void 308static void
@@ -314,15 +311,14 @@ acpi_hotkey_notify_handler(acpi_handle handle, u32 event, void *data)
314 struct acpi_device *device = NULL; 311 struct acpi_device *device = NULL;
315 u32 internal_event; 312 u32 internal_event;
316 313
317 ACPI_FUNCTION_TRACE("acpi_hotkey_notify_handler");
318 314
319 if (acpi_bus_get_device(handle, &device)) 315 if (acpi_bus_get_device(handle, &device))
320 return_VOID; 316 return;
321 317
322 internal_event = hotkey_get_internal_event(event, &global_hotkey_list); 318 internal_event = hotkey_get_internal_event(event, &global_hotkey_list);
323 acpi_bus_generate_event(device, internal_event, 0); 319 acpi_bus_generate_event(device, internal_event, 0);
324 320
325 return_VOID; 321 return;
326} 322}
327 323
328/* Need to invent automatically hotkey add method */ 324/* Need to invent automatically hotkey add method */
@@ -346,7 +342,6 @@ static int create_polling_proc(union acpi_hotkey *device)
346 char proc_name[80]; 342 char proc_name[80];
347 mode_t mode; 343 mode_t mode;
348 344
349 ACPI_FUNCTION_TRACE("create_polling_proc");
350 mode = S_IFREG | S_IRUGO | S_IWUGO; 345 mode = S_IFREG | S_IRUGO | S_IWUGO;
351 346
352 sprintf(proc_name, "%d", device->link.hotkey_standard_num); 347 sprintf(proc_name, "%d", device->link.hotkey_standard_num);
@@ -356,10 +351,7 @@ static int create_polling_proc(union acpi_hotkey *device)
356 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir); 351 proc = create_proc_entry(proc_name, mode, hotkey_proc_dir);
357 352
358 if (!proc) { 353 if (!proc) {
359 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 354 return -ENODEV;
360 "Hotkey: Unable to create %s entry\n",
361 device->poll_hotkey.poll_method));
362 return_VALUE(-ENODEV);
363 } else { 355 } else {
364 proc->proc_fops = &hotkey_polling_fops; 356 proc->proc_fops = &hotkey_polling_fops;
365 proc->owner = THIS_MODULE; 357 proc->owner = THIS_MODULE;
@@ -368,7 +360,7 @@ static int create_polling_proc(union acpi_hotkey *device)
368 proc->gid = 0; 360 proc->gid = 0;
369 device->poll_hotkey.proc = proc; 361 device->poll_hotkey.proc = proc;
370 } 362 }
371 return_VALUE(0); 363 return 0;
372} 364}
373 365
374static int hotkey_add(union acpi_hotkey *device) 366static int hotkey_add(union acpi_hotkey *device)
@@ -376,7 +368,6 @@ static int hotkey_add(union acpi_hotkey *device)
376 int status = 0; 368 int status = 0;
377 struct acpi_device *dev = NULL; 369 struct acpi_device *dev = NULL;
378 370
379 ACPI_FUNCTION_TRACE("hotkey_add");
380 371
381 if (device->link.hotkey_type == ACPI_HOTKEY_EVENT) { 372 if (device->link.hotkey_type == ACPI_HOTKEY_EVENT) {
382 acpi_bus_get_device(device->event_hotkey.bus_handle, &dev); 373 acpi_bus_get_device(device->event_hotkey.bus_handle, &dev);
@@ -391,14 +382,13 @@ static int hotkey_add(union acpi_hotkey *device)
391 382
392 list_add_tail(&device->link.entries, global_hotkey_list.entries); 383 list_add_tail(&device->link.entries, global_hotkey_list.entries);
393 384
394 return_VALUE(status); 385 return status;
395} 386}
396 387
397static int hotkey_remove(union acpi_hotkey *device) 388static int hotkey_remove(union acpi_hotkey *device)
398{ 389{
399 struct list_head *entries, *next; 390 struct list_head *entries, *next;
400 391
401 ACPI_FUNCTION_TRACE("hotkey_remove");
402 392
403 list_for_each_safe(entries, next, global_hotkey_list.entries) { 393 list_for_each_safe(entries, next, global_hotkey_list.entries) {
404 union acpi_hotkey *key = 394 union acpi_hotkey *key =
@@ -412,14 +402,13 @@ static int hotkey_remove(union acpi_hotkey *device)
412 } 402 }
413 } 403 }
414 kfree(device); 404 kfree(device);
415 return_VALUE(0); 405 return 0;
416} 406}
417 407
418static int hotkey_update(union acpi_hotkey *key) 408static int hotkey_update(union acpi_hotkey *key)
419{ 409{
420 struct list_head *entries; 410 struct list_head *entries;
421 411
422 ACPI_FUNCTION_TRACE("hotkey_update");
423 412
424 list_for_each(entries, global_hotkey_list.entries) { 413 list_for_each(entries, global_hotkey_list.entries) {
425 union acpi_hotkey *tmp = 414 union acpi_hotkey *tmp =
@@ -461,19 +450,18 @@ static int hotkey_update(union acpi_hotkey *key)
461 */ 450 */
462 kfree(key); 451 kfree(key);
463 } 452 }
464 return_VALUE(0); 453 return 0;
465 break; 454 break;
466 } 455 }
467 } 456 }
468 457
469 return_VALUE(-ENODEV); 458 return -ENODEV;
470} 459}
471 460
472static void free_hotkey_device(union acpi_hotkey *key) 461static void free_hotkey_device(union acpi_hotkey *key)
473{ 462{
474 struct acpi_device *dev; 463 struct acpi_device *dev;
475 464
476 ACPI_FUNCTION_TRACE("free_hotkey_device");
477 465
478 if (key->link.hotkey_type == ACPI_HOTKEY_EVENT) { 466 if (key->link.hotkey_type == ACPI_HOTKEY_EVENT) {
479 acpi_bus_get_device(key->event_hotkey.bus_handle, &dev); 467 acpi_bus_get_device(key->event_hotkey.bus_handle, &dev);
@@ -493,7 +481,7 @@ static void free_hotkey_device(union acpi_hotkey *key)
493 free_poll_hotkey_buffer(key); 481 free_poll_hotkey_buffer(key);
494 } 482 }
495 kfree(key); 483 kfree(key);
496 return_VOID; 484 return;
497} 485}
498 486
499static void free_hotkey_buffer(union acpi_hotkey *key) 487static void free_hotkey_buffer(union acpi_hotkey *key)
@@ -514,7 +502,6 @@ init_hotkey_device(union acpi_hotkey *key, char *bus_str, char *action_str,
514 acpi_handle tmp_handle; 502 acpi_handle tmp_handle;
515 acpi_status status = AE_OK; 503 acpi_status status = AE_OK;
516 504
517 ACPI_FUNCTION_TRACE("init_hotkey_device");
518 505
519 if (std_num < 0 || IS_POLL(std_num) || !key) 506 if (std_num < 0 || IS_POLL(std_num) || !key)
520 goto do_fail; 507 goto do_fail;
@@ -541,9 +528,9 @@ init_hotkey_device(union acpi_hotkey *key, char *bus_str, char *action_str,
541 method, &tmp_handle); 528 method, &tmp_handle);
542 if (ACPI_FAILURE(status)) 529 if (ACPI_FAILURE(status))
543 goto do_fail; 530 goto do_fail;
544 return_VALUE(AE_OK); 531 return AE_OK;
545 do_fail: 532 do_fail:
546 return_VALUE(-ENODEV); 533 return -ENODEV;
547} 534}
548 535
549static int 536static int
@@ -555,7 +542,6 @@ init_poll_hotkey_device(union acpi_hotkey *key,
555 acpi_status status = AE_OK; 542 acpi_status status = AE_OK;
556 acpi_handle tmp_handle; 543 acpi_handle tmp_handle;
557 544
558 ACPI_FUNCTION_TRACE("init_poll_hotkey_device");
559 545
560 if (std_num < 0 || IS_EVENT(std_num) || !key) 546 if (std_num < 0 || IS_EVENT(std_num) || !key)
561 goto do_fail; 547 goto do_fail;
@@ -590,22 +576,20 @@ init_poll_hotkey_device(union acpi_hotkey *key,
590 (union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL); 576 (union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL);
591 if (!key->poll_hotkey.poll_result) 577 if (!key->poll_hotkey.poll_result)
592 goto do_fail; 578 goto do_fail;
593 return_VALUE(AE_OK); 579 return AE_OK;
594 do_fail: 580 do_fail:
595 return_VALUE(-ENODEV); 581 return -ENODEV;
596} 582}
597 583
598static int hotkey_open_config(struct inode *inode, struct file *file) 584static int hotkey_open_config(struct inode *inode, struct file *file)
599{ 585{
600 ACPI_FUNCTION_TRACE("hotkey_open_config"); 586 return (single_open
601 return_VALUE(single_open
602 (file, hotkey_config_seq_show, PDE(inode)->data)); 587 (file, hotkey_config_seq_show, PDE(inode)->data));
603} 588}
604 589
605static int hotkey_poll_open_config(struct inode *inode, struct file *file) 590static int hotkey_poll_open_config(struct inode *inode, struct file *file)
606{ 591{
607 ACPI_FUNCTION_TRACE("hotkey_poll_open_config"); 592 return (single_open
608 return_VALUE(single_open
609 (file, hotkey_poll_config_seq_show, PDE(inode)->data)); 593 (file, hotkey_poll_config_seq_show, PDE(inode)->data));
610} 594}
611 595
@@ -618,7 +602,6 @@ static int hotkey_config_seq_show(struct seq_file *seq, void *offset)
618 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; 602 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name };
619 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; 603 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name };
620 604
621 ACPI_FUNCTION_TRACE(("hotkey_config_seq_show"));
622 605
623 list_for_each(entries, hotkey_list->entries) { 606 list_for_each(entries, hotkey_list->entries) {
624 union acpi_hotkey *key = 607 union acpi_hotkey *key =
@@ -636,7 +619,7 @@ static int hotkey_config_seq_show(struct seq_file *seq, void *offset)
636 } 619 }
637 } 620 }
638 seq_puts(seq, "\n"); 621 seq_puts(seq, "\n");
639 return_VALUE(0); 622 return 0;
640} 623}
641 624
642static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset) 625static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset)
@@ -648,7 +631,6 @@ static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset)
648 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name }; 631 struct acpi_buffer bus = { ACPI_PATHNAME_MAX, bus_name };
649 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name }; 632 struct acpi_buffer act = { ACPI_PATHNAME_MAX, action_name };
650 633
651 ACPI_FUNCTION_TRACE(("hotkey_config_seq_show"));
652 634
653 list_for_each(entries, hotkey_list->entries) { 635 list_for_each(entries, hotkey_list->entries) {
654 union acpi_hotkey *key = 636 union acpi_hotkey *key =
@@ -666,7 +648,7 @@ static int hotkey_poll_config_seq_show(struct seq_file *seq, void *offset)
666 } 648 }
667 } 649 }
668 seq_puts(seq, "\n"); 650 seq_puts(seq, "\n");
669 return_VALUE(0); 651 return 0;
670} 652}
671 653
672static int 654static int
@@ -678,7 +660,6 @@ get_parms(char *config_record,
678 char **method, int *internal_event_num, int *external_event_num) 660 char **method, int *internal_event_num, int *external_event_num)
679{ 661{
680 char *tmp, *tmp1, count; 662 char *tmp, *tmp1, count;
681 ACPI_FUNCTION_TRACE(("get_parms"));
682 663
683 sscanf(config_record, "%d", cmd); 664 sscanf(config_record, "%d", cmd);
684 665
@@ -744,9 +725,9 @@ get_parms(char *config_record,
744 0) 725 0)
745 goto do_fail; 726 goto do_fail;
746 727
747 return_VALUE(6); 728 return 6;
748 do_fail: 729 do_fail:
749 return_VALUE(-1); 730 return -1;
750} 731}
751 732
752/* count is length for one input record */ 733/* count is length for one input record */
@@ -763,16 +744,15 @@ static ssize_t hotkey_write_config(struct file *file,
763 int ret = 0; 744 int ret = 0;
764 union acpi_hotkey *key = NULL; 745 union acpi_hotkey *key = NULL;
765 746
766 ACPI_FUNCTION_TRACE(("hotkey_write_config"));
767 747
768 config_record = (char *)kmalloc(count + 1, GFP_KERNEL); 748 config_record = (char *)kmalloc(count + 1, GFP_KERNEL);
769 if (!config_record) 749 if (!config_record)
770 return_VALUE(-ENOMEM); 750 return -ENOMEM;
771 751
772 if (copy_from_user(config_record, buffer, count)) { 752 if (copy_from_user(config_record, buffer, count)) {
773 kfree(config_record); 753 kfree(config_record);
774 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data \n")); 754 printk(KERN_ERR PREFIX "Invalid data\n");
775 return_VALUE(-EINVAL); 755 return -EINVAL;
776 } 756 }
777 config_record[count] = 0; 757 config_record[count] = 0;
778 758
@@ -792,9 +772,8 @@ static ssize_t hotkey_write_config(struct file *file,
792 kfree(bus_method); 772 kfree(bus_method);
793 kfree(action_handle); 773 kfree(action_handle);
794 kfree(method); 774 kfree(method);
795 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 775 printk(KERN_ERR PREFIX "Invalid data format ret=%d\n", ret);
796 "Invalid data format ret=%d\n", ret)); 776 return -EINVAL;
797 return_VALUE(-EINVAL);
798 } 777 }
799 778
800 key = kmalloc(sizeof(union acpi_hotkey), GFP_KERNEL); 779 key = kmalloc(sizeof(union acpi_hotkey), GFP_KERNEL);
@@ -806,7 +785,7 @@ static ssize_t hotkey_write_config(struct file *file,
806 tmp = get_hotkey_by_event(&global_hotkey_list, 785 tmp = get_hotkey_by_event(&global_hotkey_list,
807 internal_event_num); 786 internal_event_num);
808 if (!tmp) 787 if (!tmp)
809 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid key")); 788 printk(KERN_ERR PREFIX "Invalid key\n");
810 else 789 else
811 memcpy(key, tmp, sizeof(union acpi_hotkey)); 790 memcpy(key, tmp, sizeof(union acpi_hotkey));
812 goto cont_cmd; 791 goto cont_cmd;
@@ -828,8 +807,8 @@ static ssize_t hotkey_write_config(struct file *file,
828 else 807 else
829 free_poll_hotkey_buffer(key); 808 free_poll_hotkey_buffer(key);
830 kfree(key); 809 kfree(key);
831 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid hotkey \n")); 810 printk(KERN_ERR PREFIX "Invalid hotkey\n");
832 return_VALUE(-EINVAL); 811 return -EINVAL;
833 } 812 }
834 813
835 cont_cmd: 814 cont_cmd:
@@ -855,15 +834,15 @@ static ssize_t hotkey_write_config(struct file *file,
855 goto fail_out; 834 goto fail_out;
856 break; 835 break;
857 } 836 }
858 return_VALUE(count); 837 return count;
859 fail_out: 838 fail_out:
860 if (IS_EVENT(internal_event_num)) 839 if (IS_EVENT(internal_event_num))
861 free_hotkey_buffer(key); 840 free_hotkey_buffer(key);
862 else 841 else
863 free_poll_hotkey_buffer(key); 842 free_poll_hotkey_buffer(key);
864 kfree(key); 843 kfree(key);
865 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "invalid key\n")); 844 printk(KERN_ERR PREFIX "invalid key\n");
866 return_VALUE(-EINVAL); 845 return -EINVAL;
867} 846}
868 847
869/* 848/*
@@ -880,7 +859,6 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
880 union acpi_object in_obj; /* the only param we use */ 859 union acpi_object in_obj; /* the only param we use */
881 acpi_status status; 860 acpi_status status;
882 861
883 ACPI_FUNCTION_TRACE("write_acpi_int");
884 params.count = 1; 862 params.count = 1;
885 params.pointer = &in_obj; 863 params.pointer = &in_obj;
886 in_obj.type = ACPI_TYPE_INTEGER; 864 in_obj.type = ACPI_TYPE_INTEGER;
@@ -888,7 +866,7 @@ static int write_acpi_int(acpi_handle handle, const char *method, int val,
888 866
889 status = acpi_evaluate_object(handle, (char *)method, &params, output); 867 status = acpi_evaluate_object(handle, (char *)method, &params, output);
890 868
891 return_VALUE(status == AE_OK); 869 return (status == AE_OK);
892} 870}
893 871
894static int read_acpi_int(acpi_handle handle, const char *method, 872static int read_acpi_int(acpi_handle handle, const char *method,
@@ -898,7 +876,6 @@ static int read_acpi_int(acpi_handle handle, const char *method,
898 union acpi_object out_obj; 876 union acpi_object out_obj;
899 acpi_status status; 877 acpi_status status;
900 878
901 ACPI_FUNCTION_TRACE("read_acpi_int");
902 output.length = sizeof(out_obj); 879 output.length = sizeof(out_obj);
903 output.pointer = &out_obj; 880 output.pointer = &out_obj;
904 881
@@ -907,8 +884,8 @@ static int read_acpi_int(acpi_handle handle, const char *method,
907 val->integer.value = out_obj.integer.value; 884 val->integer.value = out_obj.integer.value;
908 val->type = out_obj.type; 885 val->type = out_obj.type;
909 } else 886 } else
910 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "null val pointer")); 887 printk(KERN_ERR PREFIX "null val pointer\n");
911 return_VALUE((status == AE_OK) 888 return ((status == AE_OK)
912 && (out_obj.type == ACPI_TYPE_INTEGER)); 889 && (out_obj.type == ACPI_TYPE_INTEGER));
913} 890}
914 891
@@ -945,24 +922,23 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
945 int event, method_type, type, value; 922 int event, method_type, type, value;
946 union acpi_hotkey *key; 923 union acpi_hotkey *key;
947 924
948 ACPI_FUNCTION_TRACE("hotkey_execte_aml_method");
949 925
950 arg = (char *)kmalloc(count + 1, GFP_KERNEL); 926 arg = (char *)kmalloc(count + 1, GFP_KERNEL);
951 if (!arg) 927 if (!arg)
952 return_VALUE(-ENOMEM); 928 return -ENOMEM;
953 arg[count] = 0; 929 arg[count] = 0;
954 930
955 if (copy_from_user(arg, buffer, count)) { 931 if (copy_from_user(arg, buffer, count)) {
956 kfree(arg); 932 kfree(arg);
957 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 2")); 933 printk(KERN_ERR PREFIX "Invalid argument 2\n");
958 return_VALUE(-EINVAL); 934 return -EINVAL;
959 } 935 }
960 936
961 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) != 937 if (sscanf(arg, "%d:%d:%d:%d", &event, &method_type, &type, &value) !=
962 4) { 938 4) {
963 kfree(arg); 939 kfree(arg);
964 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument 3")); 940 printk(KERN_ERR PREFIX "Invalid argument 3\n");
965 return_VALUE(-EINVAL); 941 return -EINVAL;
966 } 942 }
967 kfree(arg); 943 kfree(arg);
968 if (type == ACPI_TYPE_INTEGER) { 944 if (type == ACPI_TYPE_INTEGER) {
@@ -987,12 +963,12 @@ static ssize_t hotkey_execute_aml_method(struct file *file,
987 963
988 } 964 }
989 } else { 965 } else {
990 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Not supported")); 966 printk(KERN_WARNING "Not supported\n");
991 return_VALUE(-EINVAL); 967 return -EINVAL;
992 } 968 }
993 return_VALUE(count); 969 return count;
994 do_fail: 970 do_fail:
995 return_VALUE(-EINVAL); 971 return -EINVAL;
996 972
997} 973}
998 974
@@ -1001,7 +977,6 @@ static int __init hotkey_init(void)
1001 int result; 977 int result;
1002 mode_t mode = S_IFREG | S_IRUGO | S_IWUGO; 978 mode_t mode = S_IFREG | S_IRUGO | S_IWUGO;
1003 979
1004 ACPI_FUNCTION_TRACE("hotkey_init");
1005 980
1006 if (acpi_disabled) 981 if (acpi_disabled)
1007 return -ENODEV; 982 return -ENODEV;
@@ -1013,9 +988,6 @@ static int __init hotkey_init(void)
1013 988
1014 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir); 989 hotkey_proc_dir = proc_mkdir(HOTKEY_PROC, acpi_root_dir);
1015 if (!hotkey_proc_dir) { 990 if (!hotkey_proc_dir) {
1016 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1017 "Hotkey: Unable to create %s entry\n",
1018 HOTKEY_PROC));
1019 return (-ENODEV); 991 return (-ENODEV);
1020 } 992 }
1021 hotkey_proc_dir->owner = THIS_MODULE; 993 hotkey_proc_dir->owner = THIS_MODULE;
@@ -1023,9 +995,6 @@ static int __init hotkey_init(void)
1023 hotkey_config = 995 hotkey_config =
1024 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir); 996 create_proc_entry(HOTKEY_EV_CONFIG, mode, hotkey_proc_dir);
1025 if (!hotkey_config) { 997 if (!hotkey_config) {
1026 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1027 "Hotkey: Unable to create %s entry\n",
1028 HOTKEY_EV_CONFIG));
1029 goto do_fail1; 998 goto do_fail1;
1030 } else { 999 } else {
1031 hotkey_config->proc_fops = &hotkey_config_fops; 1000 hotkey_config->proc_fops = &hotkey_config_fops;
@@ -1038,10 +1007,6 @@ static int __init hotkey_init(void)
1038 hotkey_poll_config = 1007 hotkey_poll_config =
1039 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir); 1008 create_proc_entry(HOTKEY_PL_CONFIG, mode, hotkey_proc_dir);
1040 if (!hotkey_poll_config) { 1009 if (!hotkey_poll_config) {
1041 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1042 "Hotkey: Unable to create %s entry\n",
1043 HOTKEY_EV_CONFIG));
1044
1045 goto do_fail2; 1010 goto do_fail2;
1046 } else { 1011 } else {
1047 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops; 1012 hotkey_poll_config->proc_fops = &hotkey_poll_config_fops;
@@ -1053,9 +1018,6 @@ static int __init hotkey_init(void)
1053 1018
1054 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir); 1019 hotkey_action = create_proc_entry(HOTKEY_ACTION, mode, hotkey_proc_dir);
1055 if (!hotkey_action) { 1020 if (!hotkey_action) {
1056 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1057 "Hotkey: Unable to create %s entry\n",
1058 HOTKEY_ACTION));
1059 goto do_fail3; 1021 goto do_fail3;
1060 } else { 1022 } else {
1061 hotkey_action->proc_fops = &hotkey_action_fops; 1023 hotkey_action->proc_fops = &hotkey_action_fops;
@@ -1066,9 +1028,6 @@ static int __init hotkey_init(void)
1066 1028
1067 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir); 1029 hotkey_info = create_proc_entry(HOTKEY_INFO, mode, hotkey_proc_dir);
1068 if (!hotkey_info) { 1030 if (!hotkey_info) {
1069 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1070 "Hotkey: Unable to create %s entry\n",
1071 HOTKEY_INFO));
1072 goto do_fail4; 1031 goto do_fail4;
1073 } else { 1032 } else {
1074 hotkey_info->proc_fops = &hotkey_info_fops; 1033 hotkey_info->proc_fops = &hotkey_info_fops;
@@ -1104,7 +1063,6 @@ static void __exit hotkey_exit(void)
1104{ 1063{
1105 struct list_head *entries, *next; 1064 struct list_head *entries, *next;
1106 1065
1107 ACPI_FUNCTION_TRACE("hotkey_exit");
1108 1066
1109 list_for_each_safe(entries, next, global_hotkey_list.entries) { 1067 list_for_each_safe(entries, next, global_hotkey_list.entries) {
1110 union acpi_hotkey *key = 1068 union acpi_hotkey *key =
diff --git a/drivers/acpi/motherboard.c b/drivers/acpi/motherboard.c
index d51d68f5dd8..ec6b7f9ede3 100644
--- a/drivers/acpi/motherboard.c
+++ b/drivers/acpi/motherboard.c
@@ -52,13 +52,12 @@ static acpi_status acpi_reserve_io_ranges(struct acpi_resource *res, void *data)
52{ 52{
53 struct resource *requested_res = NULL; 53 struct resource *requested_res = NULL;
54 54
55 ACPI_FUNCTION_TRACE("acpi_reserve_io_ranges");
56 55
57 if (res->type == ACPI_RESOURCE_TYPE_IO) { 56 if (res->type == ACPI_RESOURCE_TYPE_IO) {
58 struct acpi_resource_io *io_res = &res->data.io; 57 struct acpi_resource_io *io_res = &res->data.io;
59 58
60 if (io_res->minimum != io_res->maximum) 59 if (io_res->minimum != io_res->maximum)
61 return_VALUE(AE_OK); 60 return AE_OK;
62 if (IS_RESERVED_ADDR 61 if (IS_RESERVED_ADDR
63 (io_res->minimum, io_res->address_length)) { 62 (io_res->minimum, io_res->address_length)) {
64 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 63 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -92,7 +91,7 @@ static acpi_status acpi_reserve_io_ranges(struct acpi_resource *res, void *data)
92 91
93 if (requested_res) 92 if (requested_res)
94 requested_res->flags &= ~IORESOURCE_BUSY; 93 requested_res->flags &= ~IORESOURCE_BUSY;
95 return_VALUE(AE_OK); 94 return AE_OK;
96} 95}
97 96
98static int acpi_motherboard_add(struct acpi_device *device) 97static int acpi_motherboard_add(struct acpi_device *device)
diff --git a/drivers/acpi/namespace/nsaccess.c b/drivers/acpi/namespace/nsaccess.c
index 48fadade52e..c1c6c236df9 100644
--- a/drivers/acpi/namespace/nsaccess.c
+++ b/drivers/acpi/namespace/nsaccess.c
@@ -196,33 +196,30 @@ acpi_status acpi_ns_root_initialize(void)
196 (u8) (ACPI_TO_INTEGER(val) - 1); 196 (u8) (ACPI_TO_INTEGER(val) - 1);
197 197
198 if (ACPI_STRCMP(init_val->name, "_GL_") == 0) { 198 if (ACPI_STRCMP(init_val->name, "_GL_") == 0) {
199 /* 199
200 * Create a counting semaphore for the 200 /* Create a counting semaphore for the global lock */
201 * global lock 201
202 */
203 status = 202 status =
204 acpi_os_create_semaphore 203 acpi_os_create_semaphore
205 (ACPI_NO_UNIT_LIMIT, 1, 204 (ACPI_NO_UNIT_LIMIT, 1,
206 &obj_desc->mutex.semaphore); 205 &acpi_gbl_global_lock_semaphore);
207 if (ACPI_FAILURE(status)) { 206 if (ACPI_FAILURE(status)) {
208 acpi_ut_remove_reference 207 acpi_ut_remove_reference
209 (obj_desc); 208 (obj_desc);
210 goto unlock_and_exit; 209 goto unlock_and_exit;
211 } 210 }
212 211
213 /* 212 /* Mark this mutex as very special */
214 * We just created the mutex for the 213
215 * global lock, save it 214 obj_desc->mutex.os_mutex =
216 */ 215 ACPI_GLOBAL_LOCK;
217 acpi_gbl_global_lock_semaphore =
218 obj_desc->mutex.semaphore;
219 } else { 216 } else {
220 /* Create a mutex */ 217 /* Create a mutex */
221 218
222 status = acpi_os_create_semaphore(1, 1, 219 status =
223 &obj_desc-> 220 acpi_os_create_mutex(&obj_desc->
224 mutex. 221 mutex.
225 semaphore); 222 os_mutex);
226 if (ACPI_FAILURE(status)) { 223 if (ACPI_FAILURE(status)) {
227 acpi_ut_remove_reference 224 acpi_ut_remove_reference
228 (obj_desc); 225 (obj_desc);
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
index 13d6d5bdea2..4d622981f61 100644
--- a/drivers/acpi/numa.c
+++ b/drivers/acpi/numa.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/types.h> 28#include <linux/types.h>
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 1bb558adee6..5a468e2779a 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -25,7 +25,6 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
@@ -137,6 +136,7 @@ void acpi_os_vprintf(const char *fmt, va_list args)
137#endif 136#endif
138} 137}
139 138
139
140extern int acpi_in_resume; 140extern int acpi_in_resume;
141void *acpi_os_allocate(acpi_size size) 141void *acpi_os_allocate(acpi_size size)
142{ 142{
@@ -280,7 +280,7 @@ acpi_os_install_interrupt_handler(u32 gsi, acpi_osd_handler handler,
280 280
281 acpi_irq_handler = handler; 281 acpi_irq_handler = handler;
282 acpi_irq_context = context; 282 acpi_irq_context = context;
283 if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) { 283 if (request_irq(irq, acpi_irq, IRQF_SHARED, "acpi", acpi_irq)) {
284 printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq); 284 printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
285 return AE_NOT_ACQUIRED; 285 return AE_NOT_ACQUIRED;
286 } 286 }
@@ -586,19 +586,18 @@ static void acpi_os_execute_deferred(void *context)
586{ 586{
587 struct acpi_os_dpc *dpc = NULL; 587 struct acpi_os_dpc *dpc = NULL;
588 588
589 ACPI_FUNCTION_TRACE("os_execute_deferred");
590 589
591 dpc = (struct acpi_os_dpc *)context; 590 dpc = (struct acpi_os_dpc *)context;
592 if (!dpc) { 591 if (!dpc) {
593 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid (NULL) context.\n")); 592 printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
594 return_VOID; 593 return;
595 } 594 }
596 595
597 dpc->function(dpc->context); 596 dpc->function(dpc->context);
598 597
599 kfree(dpc); 598 kfree(dpc);
600 599
601 return_VOID; 600 return;
602} 601}
603 602
604static int acpi_os_execute_thread(void *context) 603static int acpi_os_execute_thread(void *context)
@@ -688,35 +687,19 @@ EXPORT_SYMBOL(acpi_os_wait_events_complete);
688/* 687/*
689 * Allocate the memory for a spinlock and initialize it. 688 * Allocate the memory for a spinlock and initialize it.
690 */ 689 */
691acpi_status acpi_os_create_lock(acpi_handle * out_handle) 690acpi_status acpi_os_create_lock(acpi_spinlock * handle)
692{ 691{
693 spinlock_t *lock_ptr; 692 spin_lock_init(*handle);
694
695 ACPI_FUNCTION_TRACE("os_create_lock");
696
697 lock_ptr = acpi_os_allocate(sizeof(spinlock_t));
698
699 spin_lock_init(lock_ptr);
700
701 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating spinlock[%p].\n", lock_ptr));
702 693
703 *out_handle = lock_ptr; 694 return AE_OK;
704
705 return_ACPI_STATUS(AE_OK);
706} 695}
707 696
708/* 697/*
709 * Deallocate the memory for a spinlock. 698 * Deallocate the memory for a spinlock.
710 */ 699 */
711void acpi_os_delete_lock(acpi_handle handle) 700void acpi_os_delete_lock(acpi_spinlock handle)
712{ 701{
713 ACPI_FUNCTION_TRACE("os_create_lock"); 702 return;
714
715 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting spinlock[%p].\n", handle));
716
717 acpi_os_free(handle);
718
719 return_VOID;
720} 703}
721 704
722acpi_status 705acpi_status
@@ -724,11 +707,10 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
724{ 707{
725 struct semaphore *sem = NULL; 708 struct semaphore *sem = NULL;
726 709
727 ACPI_FUNCTION_TRACE("os_create_semaphore");
728 710
729 sem = acpi_os_allocate(sizeof(struct semaphore)); 711 sem = acpi_os_allocate(sizeof(struct semaphore));
730 if (!sem) 712 if (!sem)
731 return_ACPI_STATUS(AE_NO_MEMORY); 713 return AE_NO_MEMORY;
732 memset(sem, 0, sizeof(struct semaphore)); 714 memset(sem, 0, sizeof(struct semaphore));
733 715
734 sema_init(sem, initial_units); 716 sema_init(sem, initial_units);
@@ -738,7 +720,7 @@ acpi_os_create_semaphore(u32 max_units, u32 initial_units, acpi_handle * handle)
738 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n", 720 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Creating semaphore[%p|%d].\n",
739 *handle, initial_units)); 721 *handle, initial_units));
740 722
741 return_ACPI_STATUS(AE_OK); 723 return AE_OK;
742} 724}
743 725
744EXPORT_SYMBOL(acpi_os_create_semaphore); 726EXPORT_SYMBOL(acpi_os_create_semaphore);
@@ -754,17 +736,16 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle)
754{ 736{
755 struct semaphore *sem = (struct semaphore *)handle; 737 struct semaphore *sem = (struct semaphore *)handle;
756 738
757 ACPI_FUNCTION_TRACE("os_delete_semaphore");
758 739
759 if (!sem) 740 if (!sem)
760 return_ACPI_STATUS(AE_BAD_PARAMETER); 741 return AE_BAD_PARAMETER;
761 742
762 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle)); 743 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Deleting semaphore[%p].\n", handle));
763 744
764 acpi_os_free(sem); 745 acpi_os_free(sem);
765 sem = NULL; 746 sem = NULL;
766 747
767 return_ACPI_STATUS(AE_OK); 748 return AE_OK;
768} 749}
769 750
770EXPORT_SYMBOL(acpi_os_delete_semaphore); 751EXPORT_SYMBOL(acpi_os_delete_semaphore);
@@ -784,13 +765,12 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
784 struct semaphore *sem = (struct semaphore *)handle; 765 struct semaphore *sem = (struct semaphore *)handle;
785 int ret = 0; 766 int ret = 0;
786 767
787 ACPI_FUNCTION_TRACE("os_wait_semaphore");
788 768
789 if (!sem || (units < 1)) 769 if (!sem || (units < 1))
790 return_ACPI_STATUS(AE_BAD_PARAMETER); 770 return AE_BAD_PARAMETER;
791 771
792 if (units > 1) 772 if (units > 1)
793 return_ACPI_STATUS(AE_SUPPORT); 773 return AE_SUPPORT;
794 774
795 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n", 775 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Waiting for semaphore[%p|%d|%d]\n",
796 handle, units, timeout)); 776 handle, units, timeout));
@@ -839,17 +819,17 @@ acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout)
839 } 819 }
840 820
841 if (ACPI_FAILURE(status)) { 821 if (ACPI_FAILURE(status)) {
842 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 822 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
843 "Failed to acquire semaphore[%p|%d|%d], %s\n", 823 "Failed to acquire semaphore[%p|%d|%d], %s",
844 handle, units, timeout, 824 handle, units, timeout,
845 acpi_format_exception(status))); 825 acpi_format_exception(status)));
846 } else { 826 } else {
847 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, 827 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
848 "Acquired semaphore[%p|%d|%d]\n", handle, 828 "Acquired semaphore[%p|%d|%d]", handle,
849 units, timeout)); 829 units, timeout));
850 } 830 }
851 831
852 return_ACPI_STATUS(status); 832 return status;
853} 833}
854 834
855EXPORT_SYMBOL(acpi_os_wait_semaphore); 835EXPORT_SYMBOL(acpi_os_wait_semaphore);
@@ -861,20 +841,19 @@ acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units)
861{ 841{
862 struct semaphore *sem = (struct semaphore *)handle; 842 struct semaphore *sem = (struct semaphore *)handle;
863 843
864 ACPI_FUNCTION_TRACE("os_signal_semaphore");
865 844
866 if (!sem || (units < 1)) 845 if (!sem || (units < 1))
867 return_ACPI_STATUS(AE_BAD_PARAMETER); 846 return AE_BAD_PARAMETER;
868 847
869 if (units > 1) 848 if (units > 1)
870 return_ACPI_STATUS(AE_SUPPORT); 849 return AE_SUPPORT;
871 850
872 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle, 851 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, "Signaling semaphore[%p|%d]\n", handle,
873 units)); 852 units));
874 853
875 up(sem); 854 up(sem);
876 855
877 return_ACPI_STATUS(AE_OK); 856 return AE_OK;
878} 857}
879 858
880EXPORT_SYMBOL(acpi_os_signal_semaphore); 859EXPORT_SYMBOL(acpi_os_signal_semaphore);
@@ -1043,10 +1022,10 @@ EXPORT_SYMBOL(max_cstate);
1043 * handle is a pointer to the spinlock_t. 1022 * handle is a pointer to the spinlock_t.
1044 */ 1023 */
1045 1024
1046acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle) 1025acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock lockp)
1047{ 1026{
1048 acpi_cpu_flags flags; 1027 acpi_cpu_flags flags;
1049 spin_lock_irqsave((spinlock_t *) handle, flags); 1028 spin_lock_irqsave(lockp, flags);
1050 return flags; 1029 return flags;
1051} 1030}
1052 1031
@@ -1054,9 +1033,9 @@ acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle)
1054 * Release a spinlock. See above. 1033 * Release a spinlock. See above.
1055 */ 1034 */
1056 1035
1057void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags) 1036void acpi_os_release_lock(acpi_spinlock lockp, acpi_cpu_flags flags)
1058{ 1037{
1059 spin_unlock_irqrestore((spinlock_t *) handle, flags); 1038 spin_unlock_irqrestore(lockp, flags);
1060} 1039}
1061 1040
1062#ifndef ACPI_USE_LOCAL_CACHE 1041#ifndef ACPI_USE_LOCAL_CACHE
diff --git a/drivers/acpi/parser/psparse.c b/drivers/acpi/parser/psparse.c
index 7ee2f2e7752..a02aa62fe1e 100644
--- a/drivers/acpi/parser/psparse.c
+++ b/drivers/acpi/parser/psparse.c
@@ -469,6 +469,16 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
469 } 469 }
470 470
471 walk_state->thread = thread; 471 walk_state->thread = thread;
472
473 /*
474 * If executing a method, the starting sync_level is this method's
475 * sync_level
476 */
477 if (walk_state->method_desc) {
478 walk_state->thread->current_sync_level =
479 walk_state->method_desc->method.sync_level;
480 }
481
472 acpi_ds_push_walk_state(walk_state, thread); 482 acpi_ds_push_walk_state(walk_state, thread);
473 483
474 /* 484 /*
@@ -505,6 +515,10 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
505 status = 515 status =
506 acpi_ds_call_control_method(thread, walk_state, 516 acpi_ds_call_control_method(thread, walk_state,
507 NULL); 517 NULL);
518 if (ACPI_FAILURE(status)) {
519 status =
520 acpi_ds_method_error(status, walk_state);
521 }
508 522
509 /* 523 /*
510 * If the transfer to the new method method call worked, a new walk 524 * If the transfer to the new method method call worked, a new walk
@@ -525,7 +539,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
525 /* Check for possible multi-thread reentrancy problem */ 539 /* Check for possible multi-thread reentrancy problem */
526 540
527 if ((status == AE_ALREADY_EXISTS) && 541 if ((status == AE_ALREADY_EXISTS) &&
528 (!walk_state->method_desc->method.semaphore)) { 542 (!walk_state->method_desc->method.mutex)) {
529 /* 543 /*
530 * Method tried to create an object twice. The probable cause is 544 * Method tried to create an object twice. The probable cause is
531 * that the method cannot handle reentrancy. 545 * that the method cannot handle reentrancy.
@@ -537,7 +551,7 @@ acpi_status acpi_ps_parse_aml(struct acpi_walk_state *walk_state)
537 */ 551 */
538 walk_state->method_desc->method.method_flags |= 552 walk_state->method_desc->method.method_flags |=
539 AML_METHOD_SERIALIZED; 553 AML_METHOD_SERIALIZED;
540 walk_state->method_desc->method.concurrency = 1; 554 walk_state->method_desc->method.sync_level = 0;
541 } 555 }
542 } 556 }
543 557
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index 2a718df769b..1e2ae6e7a7e 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -47,11 +47,10 @@ struct acpi_pci_data {
47static void acpi_pci_data_handler(acpi_handle handle, u32 function, 47static void acpi_pci_data_handler(acpi_handle handle, u32 function,
48 void *context) 48 void *context)
49{ 49{
50 ACPI_FUNCTION_TRACE("acpi_pci_data_handler");
51 50
52 /* TBD: Anything we need to do here? */ 51 /* TBD: Anything we need to do here? */
53 52
54 return_VOID; 53 return;
55} 54}
56 55
57/** 56/**
@@ -68,25 +67,24 @@ acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id)
68 struct acpi_device *device = NULL; 67 struct acpi_device *device = NULL;
69 struct acpi_pci_data *data = NULL; 68 struct acpi_pci_data *data = NULL;
70 69
71 ACPI_FUNCTION_TRACE("acpi_get_pci_id");
72 70
73 if (!id) 71 if (!id)
74 return_ACPI_STATUS(AE_BAD_PARAMETER); 72 return AE_BAD_PARAMETER;
75 73
76 result = acpi_bus_get_device(handle, &device); 74 result = acpi_bus_get_device(handle, &device);
77 if (result) { 75 if (result) {
78 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 76 printk(KERN_ERR PREFIX
79 "Invalid ACPI Bus context for device %s\n", 77 "Invalid ACPI Bus context for device %s\n",
80 acpi_device_bid(device))); 78 acpi_device_bid(device));
81 return_ACPI_STATUS(AE_NOT_EXIST); 79 return AE_NOT_EXIST;
82 } 80 }
83 81
84 status = acpi_get_data(handle, acpi_pci_data_handler, (void **)&data); 82 status = acpi_get_data(handle, acpi_pci_data_handler, (void **)&data);
85 if (ACPI_FAILURE(status) || !data) { 83 if (ACPI_FAILURE(status) || !data) {
86 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 84 ACPI_EXCEPTION((AE_INFO, status,
87 "Invalid ACPI-PCI context for device %s\n", 85 "Invalid ACPI-PCI context for device %s",
88 acpi_device_bid(device))); 86 acpi_device_bid(device)));
89 return_ACPI_STATUS(status); 87 return status;
90 } 88 }
91 89
92 *id = data->id; 90 *id = data->id;
@@ -103,7 +101,7 @@ acpi_status acpi_get_pci_id(acpi_handle handle, struct acpi_pci_id *id)
103 acpi_device_bid(device), id->segment, id->bus, 101 acpi_device_bid(device), id->segment, id->bus,
104 id->device, id->function)); 102 id->device, id->function));
105 103
106 return_ACPI_STATUS(AE_OK); 104 return AE_OK;
107} 105}
108 106
109EXPORT_SYMBOL(acpi_get_pci_id); 107EXPORT_SYMBOL(acpi_get_pci_id);
@@ -120,14 +118,13 @@ int acpi_pci_bind(struct acpi_device *device)
120 struct pci_dev *dev; 118 struct pci_dev *dev;
121 struct pci_bus *bus; 119 struct pci_bus *bus;
122 120
123 ACPI_FUNCTION_TRACE("acpi_pci_bind");
124 121
125 if (!device || !device->parent) 122 if (!device || !device->parent)
126 return_VALUE(-EINVAL); 123 return -EINVAL;
127 124
128 pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 125 pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
129 if (!pathname) 126 if (!pathname)
130 return_VALUE(-ENOMEM); 127 return -ENOMEM;
131 memset(pathname, 0, ACPI_PATHNAME_MAX); 128 memset(pathname, 0, ACPI_PATHNAME_MAX);
132 buffer.length = ACPI_PATHNAME_MAX; 129 buffer.length = ACPI_PATHNAME_MAX;
133 buffer.pointer = pathname; 130 buffer.pointer = pathname;
@@ -135,7 +132,7 @@ int acpi_pci_bind(struct acpi_device *device)
135 data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL); 132 data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
136 if (!data) { 133 if (!data) {
137 kfree(pathname); 134 kfree(pathname);
138 return_VALUE(-ENOMEM); 135 return -ENOMEM;
139 } 136 }
140 memset(data, 0, sizeof(struct acpi_pci_data)); 137 memset(data, 0, sizeof(struct acpi_pci_data));
141 138
@@ -151,9 +148,9 @@ int acpi_pci_bind(struct acpi_device *device)
151 status = acpi_get_data(device->parent->handle, acpi_pci_data_handler, 148 status = acpi_get_data(device->parent->handle, acpi_pci_data_handler,
152 (void **)&pdata); 149 (void **)&pdata);
153 if (ACPI_FAILURE(status) || !pdata || !pdata->bus) { 150 if (ACPI_FAILURE(status) || !pdata || !pdata->bus) {
154 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 151 ACPI_EXCEPTION((AE_INFO, status,
155 "Invalid ACPI-PCI context for parent device %s\n", 152 "Invalid ACPI-PCI context for parent device %s",
156 acpi_device_bid(device->parent))); 153 acpi_device_bid(device->parent)));
157 result = -ENODEV; 154 result = -ENODEV;
158 goto end; 155 goto end;
159 } 156 }
@@ -206,10 +203,10 @@ int acpi_pci_bind(struct acpi_device *device)
206 goto end; 203 goto end;
207 } 204 }
208 if (!data->dev->bus) { 205 if (!data->dev->bus) {
209 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 206 printk(KERN_ERR PREFIX
210 "Device %02x:%02x:%02x.%02x has invalid 'bus' field\n", 207 "Device %02x:%02x:%02x.%02x has invalid 'bus' field\n",
211 data->id.segment, data->id.bus, 208 data->id.segment, data->id.bus,
212 data->id.device, data->id.function)); 209 data->id.device, data->id.function);
213 result = -ENODEV; 210 result = -ENODEV;
214 goto end; 211 goto end;
215 } 212 }
@@ -237,9 +234,9 @@ int acpi_pci_bind(struct acpi_device *device)
237 */ 234 */
238 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data); 235 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data);
239 if (ACPI_FAILURE(status)) { 236 if (ACPI_FAILURE(status)) {
240 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 237 ACPI_EXCEPTION((AE_INFO, status,
241 "Unable to attach ACPI-PCI context to device %s\n", 238 "Unable to attach ACPI-PCI context to device %s",
242 acpi_device_bid(device))); 239 acpi_device_bid(device)));
243 result = -ENODEV; 240 result = -ENODEV;
244 goto end; 241 goto end;
245 } 242 }
@@ -269,7 +266,7 @@ int acpi_pci_bind(struct acpi_device *device)
269 if (result) 266 if (result)
270 kfree(data); 267 kfree(data);
271 268
272 return_VALUE(result); 269 return result;
273} 270}
274 271
275int acpi_pci_unbind(struct acpi_device *device) 272int acpi_pci_unbind(struct acpi_device *device)
@@ -280,14 +277,13 @@ int acpi_pci_unbind(struct acpi_device *device)
280 char *pathname = NULL; 277 char *pathname = NULL;
281 struct acpi_buffer buffer = { 0, NULL }; 278 struct acpi_buffer buffer = { 0, NULL };
282 279
283 ACPI_FUNCTION_TRACE("acpi_pci_unbind");
284 280
285 if (!device || !device->parent) 281 if (!device || !device->parent)
286 return_VALUE(-EINVAL); 282 return -EINVAL;
287 283
288 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 284 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
289 if (!pathname) 285 if (!pathname)
290 return_VALUE(-ENOMEM); 286 return -ENOMEM;
291 memset(pathname, 0, ACPI_PATHNAME_MAX); 287 memset(pathname, 0, ACPI_PATHNAME_MAX);
292 288
293 buffer.length = ACPI_PATHNAME_MAX; 289 buffer.length = ACPI_PATHNAME_MAX;
@@ -301,18 +297,18 @@ int acpi_pci_unbind(struct acpi_device *device)
301 acpi_get_data(device->handle, acpi_pci_data_handler, 297 acpi_get_data(device->handle, acpi_pci_data_handler,
302 (void **)&data); 298 (void **)&data);
303 if (ACPI_FAILURE(status)) { 299 if (ACPI_FAILURE(status)) {
304 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 300 ACPI_EXCEPTION((AE_INFO, status,
305 "Unable to get data from device %s\n", 301 "Unable to get data from device %s",
306 acpi_device_bid(device))); 302 acpi_device_bid(device)));
307 result = -ENODEV; 303 result = -ENODEV;
308 goto end; 304 goto end;
309 } 305 }
310 306
311 status = acpi_detach_data(device->handle, acpi_pci_data_handler); 307 status = acpi_detach_data(device->handle, acpi_pci_data_handler);
312 if (ACPI_FAILURE(status)) { 308 if (ACPI_FAILURE(status)) {
313 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 309 ACPI_EXCEPTION((AE_INFO, status,
314 "Unable to detach data from device %s\n", 310 "Unable to detach data from device %s",
315 acpi_device_bid(device))); 311 acpi_device_bid(device)));
316 result = -ENODEV; 312 result = -ENODEV;
317 goto end; 313 goto end;
318 } 314 }
@@ -322,7 +318,7 @@ int acpi_pci_unbind(struct acpi_device *device)
322 kfree(data); 318 kfree(data);
323 319
324 end: 320 end:
325 return_VALUE(result); 321 return result;
326} 322}
327 323
328int 324int
@@ -335,11 +331,10 @@ acpi_pci_bind_root(struct acpi_device *device,
335 char *pathname = NULL; 331 char *pathname = NULL;
336 struct acpi_buffer buffer = { 0, NULL }; 332 struct acpi_buffer buffer = { 0, NULL };
337 333
338 ACPI_FUNCTION_TRACE("acpi_pci_bind_root");
339 334
340 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 335 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
341 if (!pathname) 336 if (!pathname)
342 return_VALUE(-ENOMEM); 337 return -ENOMEM;
343 memset(pathname, 0, ACPI_PATHNAME_MAX); 338 memset(pathname, 0, ACPI_PATHNAME_MAX);
344 339
345 buffer.length = ACPI_PATHNAME_MAX; 340 buffer.length = ACPI_PATHNAME_MAX;
@@ -347,13 +342,13 @@ acpi_pci_bind_root(struct acpi_device *device,
347 342
348 if (!device || !id || !bus) { 343 if (!device || !id || !bus) {
349 kfree(pathname); 344 kfree(pathname);
350 return_VALUE(-EINVAL); 345 return -EINVAL;
351 } 346 }
352 347
353 data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL); 348 data = kmalloc(sizeof(struct acpi_pci_data), GFP_KERNEL);
354 if (!data) { 349 if (!data) {
355 kfree(pathname); 350 kfree(pathname);
356 return_VALUE(-ENOMEM); 351 return -ENOMEM;
357 } 352 }
358 memset(data, 0, sizeof(struct acpi_pci_data)); 353 memset(data, 0, sizeof(struct acpi_pci_data));
359 354
@@ -369,9 +364,9 @@ acpi_pci_bind_root(struct acpi_device *device,
369 364
370 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data); 365 status = acpi_attach_data(device->handle, acpi_pci_data_handler, data);
371 if (ACPI_FAILURE(status)) { 366 if (ACPI_FAILURE(status)) {
372 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 367 ACPI_EXCEPTION((AE_INFO, status,
373 "Unable to attach ACPI-PCI context to device %s\n", 368 "Unable to attach ACPI-PCI context to device %s",
374 pathname)); 369 pathname));
375 result = -ENODEV; 370 result = -ENODEV;
376 goto end; 371 goto end;
377 } 372 }
@@ -381,5 +376,5 @@ acpi_pci_bind_root(struct acpi_device *device,
381 if (result != 0) 376 if (result != 0)
382 kfree(data); 377 kfree(data);
383 378
384 return_VALUE(result); 379 return result;
385} 380}
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 65aee79b397..feda0341f5a 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -24,7 +24,6 @@
24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 24 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 */ 25 */
26 26
27#include <linux/config.h>
28 27
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/module.h> 29#include <linux/module.h>
@@ -55,10 +54,9 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment,
55 struct list_head *node = NULL; 54 struct list_head *node = NULL;
56 struct acpi_prt_entry *entry = NULL; 55 struct acpi_prt_entry *entry = NULL;
57 56
58 ACPI_FUNCTION_TRACE("acpi_pci_irq_find_prt_entry");
59 57
60 if (!acpi_prt.count) 58 if (!acpi_prt.count)
61 return_PTR(NULL); 59 return NULL;
62 60
63 /* 61 /*
64 * Parse through all PRT entries looking for a match on the specified 62 * Parse through all PRT entries looking for a match on the specified
@@ -73,12 +71,12 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment,
73 && (device == entry->id.device) 71 && (device == entry->id.device)
74 && (pin == entry->pin)) { 72 && (pin == entry->pin)) {
75 spin_unlock(&acpi_prt_lock); 73 spin_unlock(&acpi_prt_lock);
76 return_PTR(entry); 74 return entry;
77 } 75 }
78 } 76 }
79 77
80 spin_unlock(&acpi_prt_lock); 78 spin_unlock(&acpi_prt_lock);
81 return_PTR(NULL); 79 return NULL;
82} 80}
83 81
84static int 82static int
@@ -87,14 +85,13 @@ acpi_pci_irq_add_entry(acpi_handle handle,
87{ 85{
88 struct acpi_prt_entry *entry = NULL; 86 struct acpi_prt_entry *entry = NULL;
89 87
90 ACPI_FUNCTION_TRACE("acpi_pci_irq_add_entry");
91 88
92 if (!prt) 89 if (!prt)
93 return_VALUE(-EINVAL); 90 return -EINVAL;
94 91
95 entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL); 92 entry = kmalloc(sizeof(struct acpi_prt_entry), GFP_KERNEL);
96 if (!entry) 93 if (!entry)
97 return_VALUE(-ENOMEM); 94 return -ENOMEM;
98 memset(entry, 0, sizeof(struct acpi_prt_entry)); 95 memset(entry, 0, sizeof(struct acpi_prt_entry));
99 96
100 entry->id.segment = segment; 97 entry->id.segment = segment;
@@ -141,7 +138,7 @@ acpi_pci_irq_add_entry(acpi_handle handle,
141 acpi_prt.count++; 138 acpi_prt.count++;
142 spin_unlock(&acpi_prt_lock); 139 spin_unlock(&acpi_prt_lock);
143 140
144 return_VALUE(0); 141 return 0;
145} 142}
146 143
147static void 144static void
@@ -163,11 +160,10 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
163 struct acpi_pci_routing_table *entry = NULL; 160 struct acpi_pci_routing_table *entry = NULL;
164 static int first_time = 1; 161 static int first_time = 1;
165 162
166 ACPI_FUNCTION_TRACE("acpi_pci_irq_add_prt");
167 163
168 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 164 pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL);
169 if (!pathname) 165 if (!pathname)
170 return_VALUE(-ENOMEM); 166 return -ENOMEM;
171 memset(pathname, 0, ACPI_PATHNAME_MAX); 167 memset(pathname, 0, ACPI_PATHNAME_MAX);
172 168
173 if (first_time) { 169 if (first_time) {
@@ -197,24 +193,24 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
197 kfree(pathname); 193 kfree(pathname);
198 status = acpi_get_irq_routing_table(handle, &buffer); 194 status = acpi_get_irq_routing_table(handle, &buffer);
199 if (status != AE_BUFFER_OVERFLOW) { 195 if (status != AE_BUFFER_OVERFLOW) {
200 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRT [%s]\n", 196 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]",
201 acpi_format_exception(status))); 197 acpi_format_exception(status)));
202 return_VALUE(-ENODEV); 198 return -ENODEV;
203 } 199 }
204 200
205 prt = kmalloc(buffer.length, GFP_KERNEL); 201 prt = kmalloc(buffer.length, GFP_KERNEL);
206 if (!prt) { 202 if (!prt) {
207 return_VALUE(-ENOMEM); 203 return -ENOMEM;
208 } 204 }
209 memset(prt, 0, buffer.length); 205 memset(prt, 0, buffer.length);
210 buffer.pointer = prt; 206 buffer.pointer = prt;
211 207
212 status = acpi_get_irq_routing_table(handle, &buffer); 208 status = acpi_get_irq_routing_table(handle, &buffer);
213 if (ACPI_FAILURE(status)) { 209 if (ACPI_FAILURE(status)) {
214 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRT [%s]\n", 210 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRT [%s]",
215 acpi_format_exception(status))); 211 acpi_format_exception(status)));
216 kfree(buffer.pointer); 212 kfree(buffer.pointer);
217 return_VALUE(-ENODEV); 213 return -ENODEV;
218 } 214 }
219 215
220 entry = prt; 216 entry = prt;
@@ -227,7 +223,7 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
227 223
228 kfree(prt); 224 kfree(prt);
229 225
230 return_VALUE(0); 226 return 0;
231} 227}
232 228
233void acpi_pci_irq_del_prt(int segment, int bus) 229void acpi_pci_irq_del_prt(int segment, int bus)
@@ -262,16 +258,15 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
262{ 258{
263 int irq; 259 int irq;
264 260
265 ACPI_FUNCTION_TRACE("acpi_pci_allocate_irq");
266 261
267 if (entry->link.handle) { 262 if (entry->link.handle) {
268 irq = acpi_pci_link_allocate_irq(entry->link.handle, 263 irq = acpi_pci_link_allocate_irq(entry->link.handle,
269 entry->link.index, triggering, 264 entry->link.index, triggering,
270 polarity, link); 265 polarity, link);
271 if (irq < 0) { 266 if (irq < 0) {
272 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 267 printk(KERN_WARNING PREFIX
273 "Invalid IRQ link routing entry\n")); 268 "Invalid IRQ link routing entry\n");
274 return_VALUE(-1); 269 return -1;
275 } 270 }
276 } else { 271 } else {
277 irq = entry->link.index; 272 irq = entry->link.index;
@@ -280,7 +275,7 @@ acpi_pci_allocate_irq(struct acpi_prt_entry *entry,
280 } 275 }
281 276
282 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq)); 277 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IRQ %d\n", irq));
283 return_VALUE(irq); 278 return irq;
284} 279}
285 280
286static int 281static int
@@ -289,13 +284,12 @@ acpi_pci_free_irq(struct acpi_prt_entry *entry,
289{ 284{
290 int irq; 285 int irq;
291 286
292 ACPI_FUNCTION_TRACE("acpi_pci_free_irq");
293 if (entry->link.handle) { 287 if (entry->link.handle) {
294 irq = acpi_pci_link_free_irq(entry->link.handle); 288 irq = acpi_pci_link_free_irq(entry->link.handle);
295 } else { 289 } else {
296 irq = entry->link.index; 290 irq = entry->link.index;
297 } 291 }
298 return_VALUE(irq); 292 return irq;
299} 293}
300 294
301/* 295/*
@@ -315,7 +309,6 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
315 int bus_nr = bus->number; 309 int bus_nr = bus->number;
316 int ret; 310 int ret;
317 311
318 ACPI_FUNCTION_TRACE("acpi_pci_irq_lookup");
319 312
320 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 313 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
321 "Searching for PRT entry for %02x:%02x:%02x[%c]\n", 314 "Searching for PRT entry for %02x:%02x:%02x[%c]\n",
@@ -324,11 +317,11 @@ acpi_pci_irq_lookup(struct pci_bus *bus,
324 entry = acpi_pci_irq_find_prt_entry(segment, bus_nr, device, pin); 317 entry = acpi_pci_irq_find_prt_entry(segment, bus_nr, device, pin);
325 if (!entry) { 318 if (!entry) {
326 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PRT entry not found\n")); 319 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "PRT entry not found\n"));
327 return_VALUE(-1); 320 return -1;
328 } 321 }
329 322
330 ret = func(entry, triggering, polarity, link); 323 ret = func(entry, triggering, polarity, link);
331 return_VALUE(ret); 324 return ret;
332} 325}
333 326
334/* 327/*
@@ -346,10 +339,9 @@ acpi_pci_irq_derive(struct pci_dev *dev,
346 int irq = -1; 339 int irq = -1;
347 u8 bridge_pin = 0; 340 u8 bridge_pin = 0;
348 341
349 ACPI_FUNCTION_TRACE("acpi_pci_irq_derive");
350 342
351 if (!dev) 343 if (!dev)
352 return_VALUE(-EINVAL); 344 return -EINVAL;
353 345
354 /* 346 /*
355 * Attempt to derive an IRQ for this device from a parent bridge's 347 * Attempt to derive an IRQ for this device from a parent bridge's
@@ -366,7 +358,7 @@ acpi_pci_irq_derive(struct pci_dev *dev,
366 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 358 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
367 "No interrupt pin configured for device %s\n", 359 "No interrupt pin configured for device %s\n",
368 pci_name(bridge))); 360 pci_name(bridge)));
369 return_VALUE(-1); 361 return -1;
370 } 362 }
371 /* Pin is from 0 to 3 */ 363 /* Pin is from 0 to 3 */
372 bridge_pin--; 364 bridge_pin--;
@@ -379,16 +371,15 @@ acpi_pci_irq_derive(struct pci_dev *dev,
379 } 371 }
380 372
381 if (irq < 0) { 373 if (irq < 0) {
382 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 374 printk(KERN_WARNING PREFIX "Unable to derive IRQ for device %s\n",
383 "Unable to derive IRQ for device %s\n", 375 pci_name(dev));
384 pci_name(dev))); 376 return -1;
385 return_VALUE(-1);
386 } 377 }
387 378
388 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive IRQ %d for device %s from %s\n", 379 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Derive IRQ %d for device %s from %s\n",
389 irq, pci_name(dev), pci_name(bridge))); 380 irq, pci_name(dev), pci_name(bridge)));
390 381
391 return_VALUE(irq); 382 return irq;
392} 383}
393 384
394/* 385/*
@@ -406,24 +397,22 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
406 char *link = NULL; 397 char *link = NULL;
407 int rc; 398 int rc;
408 399
409 ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
410 400
411 if (!dev) 401 if (!dev)
412 return_VALUE(-EINVAL); 402 return -EINVAL;
413 403
414 pin = dev->pin; 404 pin = dev->pin;
415 if (!pin) { 405 if (!pin) {
416 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 406 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
417 "No interrupt pin configured for device %s\n", 407 "No interrupt pin configured for device %s\n",
418 pci_name(dev))); 408 pci_name(dev)));
419 return_VALUE(0); 409 return 0;
420 } 410 }
421 pin--; 411 pin--;
422 412
423 if (!dev->bus) { 413 if (!dev->bus) {
424 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 414 printk(KERN_ERR PREFIX "Invalid (NULL) 'bus' field\n");
425 "Invalid (NULL) 'bus' field\n")); 415 return -ENODEV;
426 return_VALUE(-ENODEV);
427 } 416 }
428 417
429 /* 418 /*
@@ -455,10 +444,10 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
455 printk(" - using IRQ %d\n", dev->irq); 444 printk(" - using IRQ %d\n", dev->irq);
456 acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE, 445 acpi_register_gsi(dev->irq, ACPI_LEVEL_SENSITIVE,
457 ACPI_ACTIVE_LOW); 446 ACPI_ACTIVE_LOW);
458 return_VALUE(0); 447 return 0;
459 } else { 448 } else {
460 printk("\n"); 449 printk("\n");
461 return_VALUE(0); 450 return 0;
462 } 451 }
463 } 452 }
464 453
@@ -466,7 +455,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
466 if (rc < 0) { 455 if (rc < 0) {
467 printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed " 456 printk(KERN_WARNING PREFIX "PCI Interrupt %s[%c]: failed "
468 "to register GSI\n", pci_name(dev), ('A' + pin)); 457 "to register GSI\n", pci_name(dev), ('A' + pin));
469 return_VALUE(rc); 458 return rc;
470 } 459 }
471 dev->irq = rc; 460 dev->irq = rc;
472 461
@@ -480,7 +469,7 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
480 (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge", 469 (triggering == ACPI_LEVEL_SENSITIVE) ? "level" : "edge",
481 (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq); 470 (polarity == ACPI_ACTIVE_LOW) ? "low" : "high", dev->irq);
482 471
483 return_VALUE(0); 472 return 0;
484} 473}
485 474
486EXPORT_SYMBOL(acpi_pci_irq_enable); 475EXPORT_SYMBOL(acpi_pci_irq_enable);
@@ -497,14 +486,13 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
497 int triggering = ACPI_LEVEL_SENSITIVE; 486 int triggering = ACPI_LEVEL_SENSITIVE;
498 int polarity = ACPI_ACTIVE_LOW; 487 int polarity = ACPI_ACTIVE_LOW;
499 488
500 ACPI_FUNCTION_TRACE("acpi_pci_irq_disable");
501 489
502 if (!dev || !dev->bus) 490 if (!dev || !dev->bus)
503 return_VOID; 491 return;
504 492
505 pin = dev->pin; 493 pin = dev->pin;
506 if (!pin) 494 if (!pin)
507 return_VOID; 495 return;
508 pin--; 496 pin--;
509 497
510 /* 498 /*
@@ -522,7 +510,7 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
522 &triggering, &polarity, NULL, 510 &triggering, &polarity, NULL,
523 acpi_pci_free_irq); 511 acpi_pci_free_irq);
524 if (gsi < 0) 512 if (gsi < 0)
525 return_VOID; 513 return;
526 514
527 /* 515 /*
528 * TBD: It might be worth clearing dev->irq by magic constant 516 * TBD: It might be worth clearing dev->irq by magic constant
@@ -534,5 +522,5 @@ void acpi_pci_irq_disable(struct pci_dev *dev)
534 522
535 acpi_unregister_gsi(gsi); 523 acpi_unregister_gsi(gsi);
536 524
537 return_VOID; 525 return;
538} 526}
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 228bdb62650..1badce27a83 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -107,26 +107,23 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
107 struct acpi_pci_link *link = (struct acpi_pci_link *)context; 107 struct acpi_pci_link *link = (struct acpi_pci_link *)context;
108 u32 i = 0; 108 u32 i = 0;
109 109
110 ACPI_FUNCTION_TRACE("acpi_pci_link_check_possible");
111 110
112 switch (resource->type) { 111 switch (resource->type) {
113 case ACPI_RESOURCE_TYPE_START_DEPENDENT: 112 case ACPI_RESOURCE_TYPE_START_DEPENDENT:
114 return_ACPI_STATUS(AE_OK); 113 return AE_OK;
115 case ACPI_RESOURCE_TYPE_IRQ: 114 case ACPI_RESOURCE_TYPE_IRQ:
116 { 115 {
117 struct acpi_resource_irq *p = &resource->data.irq; 116 struct acpi_resource_irq *p = &resource->data.irq;
118 if (!p || !p->interrupt_count) { 117 if (!p || !p->interrupt_count) {
119 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 118 printk(KERN_WARNING PREFIX "Blank IRQ resource\n");
120 "Blank IRQ resource\n")); 119 return AE_OK;
121 return_ACPI_STATUS(AE_OK);
122 } 120 }
123 for (i = 0; 121 for (i = 0;
124 (i < p->interrupt_count 122 (i < p->interrupt_count
125 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { 123 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
126 if (!p->interrupts[i]) { 124 if (!p->interrupts[i]) {
127 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 125 printk(KERN_WARNING PREFIX "Invalid IRQ %d\n",
128 "Invalid IRQ %d\n", 126 p->interrupts[i]);
129 p->interrupts[i]));
130 continue; 127 continue;
131 } 128 }
132 link->irq.possible[i] = p->interrupts[i]; 129 link->irq.possible[i] = p->interrupts[i];
@@ -142,17 +139,16 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
142 struct acpi_resource_extended_irq *p = 139 struct acpi_resource_extended_irq *p =
143 &resource->data.extended_irq; 140 &resource->data.extended_irq;
144 if (!p || !p->interrupt_count) { 141 if (!p || !p->interrupt_count) {
145 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 142 printk(KERN_WARNING PREFIX
146 "Blank EXT IRQ resource\n")); 143 "Blank EXT IRQ resource\n");
147 return_ACPI_STATUS(AE_OK); 144 return AE_OK;
148 } 145 }
149 for (i = 0; 146 for (i = 0;
150 (i < p->interrupt_count 147 (i < p->interrupt_count
151 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) { 148 && i < ACPI_PCI_LINK_MAX_POSSIBLE); i++) {
152 if (!p->interrupts[i]) { 149 if (!p->interrupts[i]) {
153 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 150 printk(KERN_WARNING PREFIX "Invalid IRQ %d\n",
154 "Invalid IRQ %d\n", 151 p->interrupts[i]);
155 p->interrupts[i]));
156 continue; 152 continue;
157 } 153 }
158 link->irq.possible[i] = p->interrupts[i]; 154 link->irq.possible[i] = p->interrupts[i];
@@ -164,35 +160,33 @@ acpi_pci_link_check_possible(struct acpi_resource *resource, void *context)
164 break; 160 break;
165 } 161 }
166 default: 162 default:
167 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 163 printk(KERN_ERR PREFIX "Resource is not an IRQ entry\n");
168 "Resource is not an IRQ entry\n")); 164 return AE_OK;
169 return_ACPI_STATUS(AE_OK);
170 } 165 }
171 166
172 return_ACPI_STATUS(AE_CTRL_TERMINATE); 167 return AE_CTRL_TERMINATE;
173} 168}
174 169
175static int acpi_pci_link_get_possible(struct acpi_pci_link *link) 170static int acpi_pci_link_get_possible(struct acpi_pci_link *link)
176{ 171{
177 acpi_status status; 172 acpi_status status;
178 173
179 ACPI_FUNCTION_TRACE("acpi_pci_link_get_possible");
180 174
181 if (!link) 175 if (!link)
182 return_VALUE(-EINVAL); 176 return -EINVAL;
183 177
184 status = acpi_walk_resources(link->handle, METHOD_NAME__PRS, 178 status = acpi_walk_resources(link->handle, METHOD_NAME__PRS,
185 acpi_pci_link_check_possible, link); 179 acpi_pci_link_check_possible, link);
186 if (ACPI_FAILURE(status)) { 180 if (ACPI_FAILURE(status)) {
187 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRS\n")); 181 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRS"));
188 return_VALUE(-ENODEV); 182 return -ENODEV;
189 } 183 }
190 184
191 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 185 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
192 "Found %d possible IRQs\n", 186 "Found %d possible IRQs\n",
193 link->irq.possible_count)); 187 link->irq.possible_count));
194 188
195 return_VALUE(0); 189 return 0;
196} 190}
197 191
198static acpi_status 192static acpi_status
@@ -200,7 +194,6 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
200{ 194{
201 int *irq = (int *)context; 195 int *irq = (int *)context;
202 196
203 ACPI_FUNCTION_TRACE("acpi_pci_link_check_current");
204 197
205 switch (resource->type) { 198 switch (resource->type) {
206 case ACPI_RESOURCE_TYPE_IRQ: 199 case ACPI_RESOURCE_TYPE_IRQ:
@@ -213,7 +206,7 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
213 */ 206 */
214 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 207 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
215 "Blank IRQ resource\n")); 208 "Blank IRQ resource\n"));
216 return_ACPI_STATUS(AE_OK); 209 return AE_OK;
217 } 210 }
218 *irq = p->interrupts[0]; 211 *irq = p->interrupts[0];
219 break; 212 break;
@@ -227,20 +220,20 @@ acpi_pci_link_check_current(struct acpi_resource *resource, void *context)
227 * extended IRQ descriptors must 220 * extended IRQ descriptors must
228 * return at least 1 IRQ 221 * return at least 1 IRQ
229 */ 222 */
230 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 223 printk(KERN_WARNING PREFIX
231 "Blank EXT IRQ resource\n")); 224 "Blank EXT IRQ resource\n");
232 return_ACPI_STATUS(AE_OK); 225 return AE_OK;
233 } 226 }
234 *irq = p->interrupts[0]; 227 *irq = p->interrupts[0];
235 break; 228 break;
236 } 229 }
237 break; 230 break;
238 default: 231 default:
239 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Resource %d isn't an IRQ\n", resource->type)); 232 printk(KERN_ERR PREFIX "Resource %d isn't an IRQ\n", resource->type);
240 case ACPI_RESOURCE_TYPE_END_TAG: 233 case ACPI_RESOURCE_TYPE_END_TAG:
241 return_ACPI_STATUS(AE_OK); 234 return AE_OK;
242 } 235 }
243 return_ACPI_STATUS(AE_CTRL_TERMINATE); 236 return AE_CTRL_TERMINATE;
244} 237}
245 238
246/* 239/*
@@ -256,10 +249,9 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
256 acpi_status status = AE_OK; 249 acpi_status status = AE_OK;
257 int irq = 0; 250 int irq = 0;
258 251
259 ACPI_FUNCTION_TRACE("acpi_pci_link_get_current");
260 252
261 if (!link || !link->handle) 253 if (!link || !link->handle)
262 return_VALUE(-EINVAL); 254 return -EINVAL;
263 255
264 link->irq.active = 0; 256 link->irq.active = 0;
265 257
@@ -268,14 +260,13 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
268 /* Query _STA, set link->device->status */ 260 /* Query _STA, set link->device->status */
269 result = acpi_bus_get_status(link->device); 261 result = acpi_bus_get_status(link->device);
270 if (result) { 262 if (result) {
271 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 263 printk(KERN_ERR PREFIX "Unable to read status\n");
272 "Unable to read status\n"));
273 goto end; 264 goto end;
274 } 265 }
275 266
276 if (!link->device->status.enabled) { 267 if (!link->device->status.enabled) {
277 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link disabled\n")); 268 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link disabled\n"));
278 return_VALUE(0); 269 return 0;
279 } 270 }
280 } 271 }
281 272
@@ -286,13 +277,13 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
286 status = acpi_walk_resources(link->handle, METHOD_NAME__CRS, 277 status = acpi_walk_resources(link->handle, METHOD_NAME__CRS,
287 acpi_pci_link_check_current, &irq); 278 acpi_pci_link_check_current, &irq);
288 if (ACPI_FAILURE(status)) { 279 if (ACPI_FAILURE(status)) {
289 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _CRS\n")); 280 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _CRS"));
290 result = -ENODEV; 281 result = -ENODEV;
291 goto end; 282 goto end;
292 } 283 }
293 284
294 if (acpi_strict && !irq) { 285 if (acpi_strict && !irq) {
295 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "_CRS returned 0\n")); 286 printk(KERN_ERR PREFIX "_CRS returned 0\n");
296 result = -ENODEV; 287 result = -ENODEV;
297 } 288 }
298 289
@@ -301,7 +292,7 @@ static int acpi_pci_link_get_current(struct acpi_pci_link *link)
301 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link at IRQ %d \n", link->irq.active)); 292 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link at IRQ %d \n", link->irq.active));
302 293
303 end: 294 end:
304 return_VALUE(result); 295 return result;
305} 296}
306 297
307static int acpi_pci_link_set(struct acpi_pci_link *link, int irq) 298static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
@@ -314,14 +305,13 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
314 } *resource; 305 } *resource;
315 struct acpi_buffer buffer = { 0, NULL }; 306 struct acpi_buffer buffer = { 0, NULL };
316 307
317 ACPI_FUNCTION_TRACE("acpi_pci_link_set");
318 308
319 if (!link || !irq) 309 if (!link || !irq)
320 return_VALUE(-EINVAL); 310 return -EINVAL;
321 311
322 resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC); 312 resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
323 if (!resource) 313 if (!resource)
324 return_VALUE(-ENOMEM); 314 return -ENOMEM;
325 315
326 memset(resource, 0, sizeof(*resource) + 1); 316 memset(resource, 0, sizeof(*resource) + 1);
327 buffer.length = sizeof(*resource) + 1; 317 buffer.length = sizeof(*resource) + 1;
@@ -362,7 +352,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
362 /* ignore resource_source, it's optional */ 352 /* ignore resource_source, it's optional */
363 break; 353 break;
364 default: 354 default:
365 printk("ACPI BUG: resource_type %d\n", link->irq.resource_type); 355 printk(KERN_ERR PREFIX "Invalid Resource_type %d\n", link->irq.resource_type);
366 result = -EINVAL; 356 result = -EINVAL;
367 goto end; 357 goto end;
368 358
@@ -374,7 +364,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
374 364
375 /* check for total failure */ 365 /* check for total failure */
376 if (ACPI_FAILURE(status)) { 366 if (ACPI_FAILURE(status)) {
377 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SRS\n")); 367 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _SRS"));
378 result = -ENODEV; 368 result = -ENODEV;
379 goto end; 369 goto end;
380 } 370 }
@@ -382,14 +372,14 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
382 /* Query _STA, set device->status */ 372 /* Query _STA, set device->status */
383 result = acpi_bus_get_status(link->device); 373 result = acpi_bus_get_status(link->device);
384 if (result) { 374 if (result) {
385 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to read status\n")); 375 printk(KERN_ERR PREFIX "Unable to read status\n");
386 goto end; 376 goto end;
387 } 377 }
388 if (!link->device->status.enabled) { 378 if (!link->device->status.enabled) {
389 printk(KERN_WARNING PREFIX 379 printk(KERN_WARNING PREFIX
390 "%s [%s] disabled and referenced, BIOS bug.\n", 380 "%s [%s] disabled and referenced, BIOS bug\n",
391 acpi_device_name(link->device), 381 acpi_device_name(link->device),
392 acpi_device_bid(link->device)); 382 acpi_device_bid(link->device));
393 } 383 }
394 384
395 /* Query _CRS, set link->irq.active */ 385 /* Query _CRS, set link->irq.active */
@@ -408,9 +398,9 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
408 * assume _SRS worked and override _CRS value. 398 * assume _SRS worked and override _CRS value.
409 */ 399 */
410 printk(KERN_WARNING PREFIX 400 printk(KERN_WARNING PREFIX
411 "%s [%s] BIOS reported IRQ %d, using IRQ %d\n", 401 "%s [%s] BIOS reported IRQ %d, using IRQ %d\n",
412 acpi_device_name(link->device), 402 acpi_device_name(link->device),
413 acpi_device_bid(link->device), link->irq.active, irq); 403 acpi_device_bid(link->device), link->irq.active, irq);
414 link->irq.active = irq; 404 link->irq.active = irq;
415 } 405 }
416 406
@@ -418,7 +408,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
418 408
419 end: 409 end:
420 kfree(resource); 410 kfree(resource);
421 return_VALUE(result); 411 return result;
422} 412}
423 413
424/* -------------------------------------------------------------------------- 414/* --------------------------------------------------------------------------
@@ -492,7 +482,6 @@ int __init acpi_irq_penalty_init(void)
492 struct acpi_pci_link *link = NULL; 482 struct acpi_pci_link *link = NULL;
493 int i = 0; 483 int i = 0;
494 484
495 ACPI_FUNCTION_TRACE("acpi_irq_penalty_init");
496 485
497 /* 486 /*
498 * Update penalties to facilitate IRQ balancing. 487 * Update penalties to facilitate IRQ balancing.
@@ -501,8 +490,7 @@ int __init acpi_irq_penalty_init(void)
501 490
502 link = list_entry(node, struct acpi_pci_link, node); 491 link = list_entry(node, struct acpi_pci_link, node);
503 if (!link) { 492 if (!link) {
504 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 493 printk(KERN_ERR PREFIX "Invalid link context\n");
505 "Invalid link context\n"));
506 continue; 494 continue;
507 } 495 }
508 496
@@ -530,7 +518,7 @@ int __init acpi_irq_penalty_init(void)
530 /* Add a penalty for the SCI */ 518 /* Add a penalty for the SCI */
531 acpi_irq_penalty[acpi_fadt.sci_int] += PIRQ_PENALTY_PCI_USING; 519 acpi_irq_penalty[acpi_fadt.sci_int] += PIRQ_PENALTY_PCI_USING;
532 520
533 return_VALUE(0); 521 return 0;
534} 522}
535 523
536static int acpi_irq_balance; /* 0: static, 1: balance */ 524static int acpi_irq_balance; /* 0: static, 1: balance */
@@ -540,13 +528,12 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
540 int irq; 528 int irq;
541 int i; 529 int i;
542 530
543 ACPI_FUNCTION_TRACE("acpi_pci_link_allocate");
544 531
545 if (link->irq.initialized) { 532 if (link->irq.initialized) {
546 if (link->refcnt == 0) 533 if (link->refcnt == 0)
547 /* This means the link is disabled but initialized */ 534 /* This means the link is disabled but initialized */
548 acpi_pci_link_set(link, link->irq.active); 535 acpi_pci_link_set(link, link->irq.active);
549 return_VALUE(0); 536 return 0;
550 } 537 }
551 538
552 /* 539 /*
@@ -562,7 +549,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
562 if (i == link->irq.possible_count) { 549 if (i == link->irq.possible_count) {
563 if (acpi_strict) 550 if (acpi_strict)
564 printk(KERN_WARNING PREFIX "_CRS %d not found" 551 printk(KERN_WARNING PREFIX "_CRS %d not found"
565 " in _PRS\n", link->irq.active); 552 " in _PRS\n", link->irq.active);
566 link->irq.active = 0; 553 link->irq.active = 0;
567 } 554 }
568 555
@@ -589,12 +576,11 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
589 576
590 /* Attempt to enable the link device at this IRQ. */ 577 /* Attempt to enable the link device at this IRQ. */
591 if (acpi_pci_link_set(link, irq)) { 578 if (acpi_pci_link_set(link, irq)) {
592 printk(PREFIX 579 printk(KERN_ERR PREFIX "Unable to set IRQ for %s [%s]. "
593 "Unable to set IRQ for %s [%s] (likely buggy ACPI BIOS).\n" 580 "Try pci=noacpi or acpi=off\n",
594 "Try pci=noacpi or acpi=off\n", 581 acpi_device_name(link->device),
595 acpi_device_name(link->device), 582 acpi_device_bid(link->device));
596 acpi_device_bid(link->device)); 583 return -ENODEV;
597 return_VALUE(-ENODEV);
598 } else { 584 } else {
599 acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING; 585 acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
600 printk(PREFIX "%s [%s] enabled at IRQ %d\n", 586 printk(PREFIX "%s [%s] enabled at IRQ %d\n",
@@ -604,7 +590,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
604 590
605 link->irq.initialized = 1; 591 link->irq.initialized = 1;
606 592
607 return_VALUE(0); 593 return 0;
608} 594}
609 595
610/* 596/*
@@ -622,36 +608,35 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
622 struct acpi_device *device = NULL; 608 struct acpi_device *device = NULL;
623 struct acpi_pci_link *link = NULL; 609 struct acpi_pci_link *link = NULL;
624 610
625 ACPI_FUNCTION_TRACE("acpi_pci_link_allocate_irq");
626 611
627 result = acpi_bus_get_device(handle, &device); 612 result = acpi_bus_get_device(handle, &device);
628 if (result) { 613 if (result) {
629 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link device\n")); 614 printk(KERN_ERR PREFIX "Invalid link device\n");
630 return_VALUE(-1); 615 return -1;
631 } 616 }
632 617
633 link = (struct acpi_pci_link *)acpi_driver_data(device); 618 link = (struct acpi_pci_link *)acpi_driver_data(device);
634 if (!link) { 619 if (!link) {
635 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); 620 printk(KERN_ERR PREFIX "Invalid link context\n");
636 return_VALUE(-1); 621 return -1;
637 } 622 }
638 623
639 /* TBD: Support multiple index (IRQ) entries per Link Device */ 624 /* TBD: Support multiple index (IRQ) entries per Link Device */
640 if (index) { 625 if (index) {
641 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid index %d\n", index)); 626 printk(KERN_ERR PREFIX "Invalid index %d\n", index);
642 return_VALUE(-1); 627 return -1;
643 } 628 }
644 629
645 mutex_lock(&acpi_link_lock); 630 mutex_lock(&acpi_link_lock);
646 if (acpi_pci_link_allocate(link)) { 631 if (acpi_pci_link_allocate(link)) {
647 mutex_unlock(&acpi_link_lock); 632 mutex_unlock(&acpi_link_lock);
648 return_VALUE(-1); 633 return -1;
649 } 634 }
650 635
651 if (!link->irq.active) { 636 if (!link->irq.active) {
652 mutex_unlock(&acpi_link_lock); 637 mutex_unlock(&acpi_link_lock);
653 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link active IRQ is 0!\n")); 638 printk(KERN_ERR PREFIX "Link active IRQ is 0!\n");
654 return_VALUE(-1); 639 return -1;
655 } 640 }
656 link->refcnt++; 641 link->refcnt++;
657 mutex_unlock(&acpi_link_lock); 642 mutex_unlock(&acpi_link_lock);
@@ -665,7 +650,7 @@ acpi_pci_link_allocate_irq(acpi_handle handle,
665 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 650 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
666 "Link %s is referenced\n", 651 "Link %s is referenced\n",
667 acpi_device_bid(link->device))); 652 acpi_device_bid(link->device)));
668 return_VALUE(link->irq.active); 653 return (link->irq.active);
669} 654}
670 655
671/* 656/*
@@ -678,25 +663,24 @@ int acpi_pci_link_free_irq(acpi_handle handle)
678 struct acpi_pci_link *link = NULL; 663 struct acpi_pci_link *link = NULL;
679 acpi_status result; 664 acpi_status result;
680 665
681 ACPI_FUNCTION_TRACE("acpi_pci_link_free_irq");
682 666
683 result = acpi_bus_get_device(handle, &device); 667 result = acpi_bus_get_device(handle, &device);
684 if (result) { 668 if (result) {
685 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link device\n")); 669 printk(KERN_ERR PREFIX "Invalid link device\n");
686 return_VALUE(-1); 670 return -1;
687 } 671 }
688 672
689 link = (struct acpi_pci_link *)acpi_driver_data(device); 673 link = (struct acpi_pci_link *)acpi_driver_data(device);
690 if (!link) { 674 if (!link) {
691 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); 675 printk(KERN_ERR PREFIX "Invalid link context\n");
692 return_VALUE(-1); 676 return -1;
693 } 677 }
694 678
695 mutex_lock(&acpi_link_lock); 679 mutex_lock(&acpi_link_lock);
696 if (!link->irq.initialized) { 680 if (!link->irq.initialized) {
697 mutex_unlock(&acpi_link_lock); 681 mutex_unlock(&acpi_link_lock);
698 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Link isn't initialized\n")); 682 printk(KERN_ERR PREFIX "Link isn't initialized\n");
699 return_VALUE(-1); 683 return -1;
700 } 684 }
701#ifdef FUTURE_USE 685#ifdef FUTURE_USE
702 /* 686 /*
@@ -718,7 +702,7 @@ int acpi_pci_link_free_irq(acpi_handle handle)
718 acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL); 702 acpi_ut_evaluate_object(link->handle, "_DIS", 0, NULL);
719 } 703 }
720 mutex_unlock(&acpi_link_lock); 704 mutex_unlock(&acpi_link_lock);
721 return_VALUE(link->irq.active); 705 return (link->irq.active);
722} 706}
723 707
724/* -------------------------------------------------------------------------- 708/* --------------------------------------------------------------------------
@@ -732,14 +716,13 @@ static int acpi_pci_link_add(struct acpi_device *device)
732 int i = 0; 716 int i = 0;
733 int found = 0; 717 int found = 0;
734 718
735 ACPI_FUNCTION_TRACE("acpi_pci_link_add");
736 719
737 if (!device) 720 if (!device)
738 return_VALUE(-EINVAL); 721 return -EINVAL;
739 722
740 link = kmalloc(sizeof(struct acpi_pci_link), GFP_KERNEL); 723 link = kmalloc(sizeof(struct acpi_pci_link), GFP_KERNEL);
741 if (!link) 724 if (!link)
742 return_VALUE(-ENOMEM); 725 return -ENOMEM;
743 memset(link, 0, sizeof(struct acpi_pci_link)); 726 memset(link, 0, sizeof(struct acpi_pci_link));
744 727
745 link->device = device; 728 link->device = device;
@@ -788,17 +771,16 @@ static int acpi_pci_link_add(struct acpi_device *device)
788 if (result) 771 if (result)
789 kfree(link); 772 kfree(link);
790 773
791 return_VALUE(result); 774 return result;
792} 775}
793 776
794static int acpi_pci_link_resume(struct acpi_pci_link *link) 777static int acpi_pci_link_resume(struct acpi_pci_link *link)
795{ 778{
796 ACPI_FUNCTION_TRACE("acpi_pci_link_resume");
797 779
798 if (link->refcnt && link->irq.active && link->irq.initialized) 780 if (link->refcnt && link->irq.active && link->irq.initialized)
799 return_VALUE(acpi_pci_link_set(link, link->irq.active)); 781 return (acpi_pci_link_set(link, link->irq.active));
800 else 782 else
801 return_VALUE(0); 783 return 0;
802} 784}
803 785
804/* 786/*
@@ -811,7 +793,6 @@ static int irqrouter_resume(struct sys_device *dev)
811 struct list_head *node = NULL; 793 struct list_head *node = NULL;
812 struct acpi_pci_link *link = NULL; 794 struct acpi_pci_link *link = NULL;
813 795
814 ACPI_FUNCTION_TRACE("irqrouter_resume");
815 796
816 /* Make sure SCI is enabled again (Apple firmware bug?) */ 797 /* Make sure SCI is enabled again (Apple firmware bug?) */
817 acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK); 798 acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK);
@@ -820,24 +801,22 @@ static int irqrouter_resume(struct sys_device *dev)
820 list_for_each(node, &acpi_link.entries) { 801 list_for_each(node, &acpi_link.entries) {
821 link = list_entry(node, struct acpi_pci_link, node); 802 link = list_entry(node, struct acpi_pci_link, node);
822 if (!link) { 803 if (!link) {
823 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 804 printk(KERN_ERR PREFIX "Invalid link context\n");
824 "Invalid link context\n"));
825 continue; 805 continue;
826 } 806 }
827 acpi_pci_link_resume(link); 807 acpi_pci_link_resume(link);
828 } 808 }
829 acpi_in_resume = 0; 809 acpi_in_resume = 0;
830 return_VALUE(0); 810 return 0;
831} 811}
832 812
833static int acpi_pci_link_remove(struct acpi_device *device, int type) 813static int acpi_pci_link_remove(struct acpi_device *device, int type)
834{ 814{
835 struct acpi_pci_link *link = NULL; 815 struct acpi_pci_link *link = NULL;
836 816
837 ACPI_FUNCTION_TRACE("acpi_pci_link_remove");
838 817
839 if (!device || !acpi_driver_data(device)) 818 if (!device || !acpi_driver_data(device))
840 return_VALUE(-EINVAL); 819 return -EINVAL;
841 820
842 link = (struct acpi_pci_link *)acpi_driver_data(device); 821 link = (struct acpi_pci_link *)acpi_driver_data(device);
843 822
@@ -847,7 +826,7 @@ static int acpi_pci_link_remove(struct acpi_device *device, int type)
847 826
848 kfree(link); 827 kfree(link);
849 828
850 return_VALUE(0); 829 return 0;
851} 830}
852 831
853/* 832/*
@@ -953,34 +932,32 @@ static int __init irqrouter_init_sysfs(void)
953{ 932{
954 int error; 933 int error;
955 934
956 ACPI_FUNCTION_TRACE("irqrouter_init_sysfs");
957 935
958 if (acpi_disabled || acpi_noirq) 936 if (acpi_disabled || acpi_noirq)
959 return_VALUE(0); 937 return 0;
960 938
961 error = sysdev_class_register(&irqrouter_sysdev_class); 939 error = sysdev_class_register(&irqrouter_sysdev_class);
962 if (!error) 940 if (!error)
963 error = sysdev_register(&device_irqrouter); 941 error = sysdev_register(&device_irqrouter);
964 942
965 return_VALUE(error); 943 return error;
966} 944}
967 945
968device_initcall(irqrouter_init_sysfs); 946device_initcall(irqrouter_init_sysfs);
969 947
970static int __init acpi_pci_link_init(void) 948static int __init acpi_pci_link_init(void)
971{ 949{
972 ACPI_FUNCTION_TRACE("acpi_pci_link_init");
973 950
974 if (acpi_noirq) 951 if (acpi_noirq)
975 return_VALUE(0); 952 return 0;
976 953
977 acpi_link.count = 0; 954 acpi_link.count = 0;
978 INIT_LIST_HEAD(&acpi_link.entries); 955 INIT_LIST_HEAD(&acpi_link.entries);
979 956
980 if (acpi_bus_register_driver(&acpi_pci_link_driver) < 0) 957 if (acpi_bus_register_driver(&acpi_pci_link_driver) < 0)
981 return_VALUE(-ENODEV); 958 return -ENODEV;
982 959
983 return_VALUE(0); 960 return 0;
984} 961}
985 962
986subsys_initcall(acpi_pci_link_init); 963subsys_initcall(acpi_pci_link_init);
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 4c313eab631..8f10442119f 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -160,14 +160,13 @@ static int acpi_pci_root_add(struct acpi_device *device)
160 unsigned long value = 0; 160 unsigned long value = 0;
161 acpi_handle handle = NULL; 161 acpi_handle handle = NULL;
162 162
163 ACPI_FUNCTION_TRACE("acpi_pci_root_add");
164 163
165 if (!device) 164 if (!device)
166 return_VALUE(-EINVAL); 165 return -EINVAL;
167 166
168 root = kmalloc(sizeof(struct acpi_pci_root), GFP_KERNEL); 167 root = kmalloc(sizeof(struct acpi_pci_root), GFP_KERNEL);
169 if (!root) 168 if (!root)
170 return_VALUE(-ENOMEM); 169 return -ENOMEM;
171 memset(root, 0, sizeof(struct acpi_pci_root)); 170 memset(root, 0, sizeof(struct acpi_pci_root));
172 INIT_LIST_HEAD(&root->node); 171 INIT_LIST_HEAD(&root->node);
173 172
@@ -198,7 +197,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
198 root->id.segment = 0; 197 root->id.segment = 0;
199 break; 198 break;
200 default: 199 default:
201 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _SEG\n")); 200 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _SEG"));
202 result = -ENODEV; 201 result = -ENODEV;
203 goto end; 202 goto end;
204 } 203 }
@@ -219,7 +218,7 @@ static int acpi_pci_root_add(struct acpi_device *device)
219 root->id.bus = 0; 218 root->id.bus = 0;
220 break; 219 break;
221 default: 220 default:
222 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _BBN\n")); 221 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _BBN"));
223 result = -ENODEV; 222 result = -ENODEV;
224 goto end; 223 goto end;
225 } 224 }
@@ -231,8 +230,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
231 int bus = 0; 230 int bus = 0;
232 acpi_status status; 231 acpi_status status;
233 232
234 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 233 printk(KERN_ERR PREFIX
235 "Wrong _BBN value, please reboot and using option 'pci=noacpi'\n")); 234 "Wrong _BBN value, reboot"
235 " and use option 'pci=noacpi'\n");
236 236
237 status = try_get_root_bridge_busnr(root->handle, &bus); 237 status = try_get_root_bridge_busnr(root->handle, &bus);
238 if (ACPI_FAILURE(status)) 238 if (ACPI_FAILURE(status))
@@ -273,9 +273,9 @@ static int acpi_pci_root_add(struct acpi_device *device)
273 */ 273 */
274 root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus); 274 root->bus = pci_acpi_scan_root(device, root->id.segment, root->id.bus);
275 if (!root->bus) { 275 if (!root->bus) {
276 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 276 printk(KERN_ERR PREFIX
277 "Bus %04x:%02x not present in PCI namespace\n", 277 "Bus %04x:%02x not present in PCI namespace\n",
278 root->id.segment, root->id.bus)); 278 root->id.segment, root->id.bus);
279 result = -ENODEV; 279 result = -ENODEV;
280 goto end; 280 goto end;
281 } 281 }
@@ -306,46 +306,43 @@ static int acpi_pci_root_add(struct acpi_device *device)
306 kfree(root); 306 kfree(root);
307 } 307 }
308 308
309 return_VALUE(result); 309 return result;
310} 310}
311 311
312static int acpi_pci_root_start(struct acpi_device *device) 312static int acpi_pci_root_start(struct acpi_device *device)
313{ 313{
314 struct acpi_pci_root *root; 314 struct acpi_pci_root *root;
315 315
316 ACPI_FUNCTION_TRACE("acpi_pci_root_start");
317 316
318 list_for_each_entry(root, &acpi_pci_roots, node) { 317 list_for_each_entry(root, &acpi_pci_roots, node) {
319 if (root->handle == device->handle) { 318 if (root->handle == device->handle) {
320 pci_bus_add_devices(root->bus); 319 pci_bus_add_devices(root->bus);
321 return_VALUE(0); 320 return 0;
322 } 321 }
323 } 322 }
324 return_VALUE(-ENODEV); 323 return -ENODEV;
325} 324}
326 325
327static int acpi_pci_root_remove(struct acpi_device *device, int type) 326static int acpi_pci_root_remove(struct acpi_device *device, int type)
328{ 327{
329 struct acpi_pci_root *root = NULL; 328 struct acpi_pci_root *root = NULL;
330 329
331 ACPI_FUNCTION_TRACE("acpi_pci_root_remove");
332 330
333 if (!device || !acpi_driver_data(device)) 331 if (!device || !acpi_driver_data(device))
334 return_VALUE(-EINVAL); 332 return -EINVAL;
335 333
336 root = (struct acpi_pci_root *)acpi_driver_data(device); 334 root = (struct acpi_pci_root *)acpi_driver_data(device);
337 335
338 kfree(root); 336 kfree(root);
339 337
340 return_VALUE(0); 338 return 0;
341} 339}
342 340
343static int __init acpi_pci_root_init(void) 341static int __init acpi_pci_root_init(void)
344{ 342{
345 ACPI_FUNCTION_TRACE("acpi_pci_root_init");
346 343
347 if (acpi_pci_disabled) 344 if (acpi_pci_disabled)
348 return_VALUE(0); 345 return 0;
349 346
350 /* DEBUG: 347 /* DEBUG:
351 acpi_dbg_layer = ACPI_PCI_COMPONENT; 348 acpi_dbg_layer = ACPI_PCI_COMPONENT;
@@ -353,9 +350,9 @@ static int __init acpi_pci_root_init(void)
353 */ 350 */
354 351
355 if (acpi_bus_register_driver(&acpi_pci_root_driver) < 0) 352 if (acpi_bus_register_driver(&acpi_pci_root_driver) < 0)
356 return_VALUE(-ENODEV); 353 return -ENODEV;
357 354
358 return_VALUE(0); 355 return 0;
359} 356}
360 357
361subsys_initcall(acpi_pci_root_init); 358subsys_initcall(acpi_pci_root_init);
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 62a5595ed8b..224f729f700 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -98,23 +98,21 @@ acpi_power_get_context(acpi_handle handle,
98 int result = 0; 98 int result = 0;
99 struct acpi_device *device = NULL; 99 struct acpi_device *device = NULL;
100 100
101 ACPI_FUNCTION_TRACE("acpi_power_get_context");
102 101
103 if (!resource) 102 if (!resource)
104 return_VALUE(-ENODEV); 103 return -ENODEV;
105 104
106 result = acpi_bus_get_device(handle, &device); 105 result = acpi_bus_get_device(handle, &device);
107 if (result) { 106 if (result) {
108 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Error getting context [%p]\n", 107 printk(KERN_WARNING PREFIX "Getting context [%p]\n", handle);
109 handle)); 108 return result;
110 return_VALUE(result);
111 } 109 }
112 110
113 *resource = (struct acpi_power_resource *)acpi_driver_data(device); 111 *resource = (struct acpi_power_resource *)acpi_driver_data(device);
114 if (!resource) 112 if (!resource)
115 return_VALUE(-ENODEV); 113 return -ENODEV;
116 114
117 return_VALUE(0); 115 return 0;
118} 116}
119 117
120static int acpi_power_get_state(struct acpi_power_resource *resource) 118static int acpi_power_get_state(struct acpi_power_resource *resource)
@@ -122,14 +120,13 @@ static int acpi_power_get_state(struct acpi_power_resource *resource)
122 acpi_status status = AE_OK; 120 acpi_status status = AE_OK;
123 unsigned long sta = 0; 121 unsigned long sta = 0;
124 122
125 ACPI_FUNCTION_TRACE("acpi_power_get_state");
126 123
127 if (!resource) 124 if (!resource)
128 return_VALUE(-EINVAL); 125 return -EINVAL;
129 126
130 status = acpi_evaluate_integer(resource->handle, "_STA", NULL, &sta); 127 status = acpi_evaluate_integer(resource->handle, "_STA", NULL, &sta);
131 if (ACPI_FAILURE(status)) 128 if (ACPI_FAILURE(status))
132 return_VALUE(-ENODEV); 129 return -ENODEV;
133 130
134 if (sta & 0x01) 131 if (sta & 0x01)
135 resource->state = ACPI_POWER_RESOURCE_STATE_ON; 132 resource->state = ACPI_POWER_RESOURCE_STATE_ON;
@@ -139,7 +136,7 @@ static int acpi_power_get_state(struct acpi_power_resource *resource)
139 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n", 136 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] is %s\n",
140 resource->name, resource->state ? "on" : "off")); 137 resource->name, resource->state ? "on" : "off"));
141 138
142 return_VALUE(0); 139 return 0;
143} 140}
144 141
145static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state) 142static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state)
@@ -148,20 +145,19 @@ static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state)
148 struct acpi_power_resource *resource = NULL; 145 struct acpi_power_resource *resource = NULL;
149 u32 i = 0; 146 u32 i = 0;
150 147
151 ACPI_FUNCTION_TRACE("acpi_power_get_list_state");
152 148
153 if (!list || !state) 149 if (!list || !state)
154 return_VALUE(-EINVAL); 150 return -EINVAL;
155 151
156 /* The state of the list is 'on' IFF all resources are 'on'. */ 152 /* The state of the list is 'on' IFF all resources are 'on'. */
157 153
158 for (i = 0; i < list->count; i++) { 154 for (i = 0; i < list->count; i++) {
159 result = acpi_power_get_context(list->handles[i], &resource); 155 result = acpi_power_get_context(list->handles[i], &resource);
160 if (result) 156 if (result)
161 return_VALUE(result); 157 return result;
162 result = acpi_power_get_state(resource); 158 result = acpi_power_get_state(resource);
163 if (result) 159 if (result)
164 return_VALUE(result); 160 return result;
165 161
166 *state = resource->state; 162 *state = resource->state;
167 163
@@ -172,7 +168,7 @@ static int acpi_power_get_list_state(struct acpi_handle_list *list, int *state)
172 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource list is %s\n", 168 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource list is %s\n",
173 *state ? "on" : "off")); 169 *state ? "on" : "off"));
174 170
175 return_VALUE(result); 171 return result;
176} 172}
177 173
178static int acpi_power_on(acpi_handle handle) 174static int acpi_power_on(acpi_handle handle)
@@ -182,11 +178,10 @@ static int acpi_power_on(acpi_handle handle)
182 struct acpi_device *device = NULL; 178 struct acpi_device *device = NULL;
183 struct acpi_power_resource *resource = NULL; 179 struct acpi_power_resource *resource = NULL;
184 180
185 ACPI_FUNCTION_TRACE("acpi_power_on");
186 181
187 result = acpi_power_get_context(handle, &resource); 182 result = acpi_power_get_context(handle, &resource);
188 if (result) 183 if (result)
189 return_VALUE(result); 184 return result;
190 185
191 resource->references++; 186 resource->references++;
192 187
@@ -194,29 +189,29 @@ static int acpi_power_on(acpi_handle handle)
194 || (resource->state == ACPI_POWER_RESOURCE_STATE_ON)) { 189 || (resource->state == ACPI_POWER_RESOURCE_STATE_ON)) {
195 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already on\n", 190 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already on\n",
196 resource->name)); 191 resource->name));
197 return_VALUE(0); 192 return 0;
198 } 193 }
199 194
200 status = acpi_evaluate_object(resource->handle, "_ON", NULL, NULL); 195 status = acpi_evaluate_object(resource->handle, "_ON", NULL, NULL);
201 if (ACPI_FAILURE(status)) 196 if (ACPI_FAILURE(status))
202 return_VALUE(-ENODEV); 197 return -ENODEV;
203 198
204 result = acpi_power_get_state(resource); 199 result = acpi_power_get_state(resource);
205 if (result) 200 if (result)
206 return_VALUE(result); 201 return result;
207 if (resource->state != ACPI_POWER_RESOURCE_STATE_ON) 202 if (resource->state != ACPI_POWER_RESOURCE_STATE_ON)
208 return_VALUE(-ENOEXEC); 203 return -ENOEXEC;
209 204
210 /* Update the power resource's _device_ power state */ 205 /* Update the power resource's _device_ power state */
211 result = acpi_bus_get_device(resource->handle, &device); 206 result = acpi_bus_get_device(resource->handle, &device);
212 if (result) 207 if (result)
213 return_VALUE(result); 208 return result;
214 device->power.state = ACPI_STATE_D0; 209 device->power.state = ACPI_STATE_D0;
215 210
216 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned on\n", 211 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned on\n",
217 resource->name)); 212 resource->name));
218 213
219 return_VALUE(0); 214 return 0;
220} 215}
221 216
222static int acpi_power_off_device(acpi_handle handle) 217static int acpi_power_off_device(acpi_handle handle)
@@ -226,11 +221,10 @@ static int acpi_power_off_device(acpi_handle handle)
226 struct acpi_device *device = NULL; 221 struct acpi_device *device = NULL;
227 struct acpi_power_resource *resource = NULL; 222 struct acpi_power_resource *resource = NULL;
228 223
229 ACPI_FUNCTION_TRACE("acpi_power_off_device");
230 224
231 result = acpi_power_get_context(handle, &resource); 225 result = acpi_power_get_context(handle, &resource);
232 if (result) 226 if (result)
233 return_VALUE(result); 227 return result;
234 228
235 if (resource->references) 229 if (resource->references)
236 resource->references--; 230 resource->references--;
@@ -239,35 +233,35 @@ static int acpi_power_off_device(acpi_handle handle)
239 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 233 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
240 "Resource [%s] is still in use, dereferencing\n", 234 "Resource [%s] is still in use, dereferencing\n",
241 device->pnp.bus_id)); 235 device->pnp.bus_id));
242 return_VALUE(0); 236 return 0;
243 } 237 }
244 238
245 if (resource->state == ACPI_POWER_RESOURCE_STATE_OFF) { 239 if (resource->state == ACPI_POWER_RESOURCE_STATE_OFF) {
246 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already off\n", 240 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] already off\n",
247 device->pnp.bus_id)); 241 device->pnp.bus_id));
248 return_VALUE(0); 242 return 0;
249 } 243 }
250 244
251 status = acpi_evaluate_object(resource->handle, "_OFF", NULL, NULL); 245 status = acpi_evaluate_object(resource->handle, "_OFF", NULL, NULL);
252 if (ACPI_FAILURE(status)) 246 if (ACPI_FAILURE(status))
253 return_VALUE(-ENODEV); 247 return -ENODEV;
254 248
255 result = acpi_power_get_state(resource); 249 result = acpi_power_get_state(resource);
256 if (result) 250 if (result)
257 return_VALUE(result); 251 return result;
258 if (resource->state != ACPI_POWER_RESOURCE_STATE_OFF) 252 if (resource->state != ACPI_POWER_RESOURCE_STATE_OFF)
259 return_VALUE(-ENOEXEC); 253 return -ENOEXEC;
260 254
261 /* Update the power resource's _device_ power state */ 255 /* Update the power resource's _device_ power state */
262 result = acpi_bus_get_device(resource->handle, &device); 256 result = acpi_bus_get_device(resource->handle, &device);
263 if (result) 257 if (result)
264 return_VALUE(result); 258 return result;
265 device->power.state = ACPI_STATE_D3; 259 device->power.state = ACPI_STATE_D3;
266 260
267 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned off\n", 261 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Resource [%s] turned off\n",
268 resource->name)); 262 resource->name));
269 263
270 return_VALUE(0); 264 return 0;
271} 265}
272 266
273/* 267/*
@@ -283,31 +277,29 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev)
283 int i; 277 int i;
284 int ret = 0; 278 int ret = 0;
285 279
286 ACPI_FUNCTION_TRACE("acpi_enable_wakeup_device_power");
287 if (!dev || !dev->wakeup.flags.valid) 280 if (!dev || !dev->wakeup.flags.valid)
288 return_VALUE(-1); 281 return -1;
289 282
290 arg.integer.value = 1; 283 arg.integer.value = 1;
291 /* Open power resource */ 284 /* Open power resource */
292 for (i = 0; i < dev->wakeup.resources.count; i++) { 285 for (i = 0; i < dev->wakeup.resources.count; i++) {
293 ret = acpi_power_on(dev->wakeup.resources.handles[i]); 286 ret = acpi_power_on(dev->wakeup.resources.handles[i]);
294 if (ret) { 287 if (ret) {
295 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 288 printk(KERN_ERR PREFIX "Transition power state\n");
296 "Error transition power state\n"));
297 dev->wakeup.flags.valid = 0; 289 dev->wakeup.flags.valid = 0;
298 return_VALUE(-1); 290 return -1;
299 } 291 }
300 } 292 }
301 293
302 /* Execute PSW */ 294 /* Execute PSW */
303 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); 295 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
304 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 296 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
305 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n")); 297 printk(KERN_ERR PREFIX "Evaluate _PSW\n");
306 dev->wakeup.flags.valid = 0; 298 dev->wakeup.flags.valid = 0;
307 ret = -1; 299 ret = -1;
308 } 300 }
309 301
310 return_VALUE(ret); 302 return ret;
311} 303}
312 304
313/* 305/*
@@ -323,32 +315,30 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev)
323 int i; 315 int i;
324 int ret = 0; 316 int ret = 0;
325 317
326 ACPI_FUNCTION_TRACE("acpi_disable_wakeup_device_power");
327 318
328 if (!dev || !dev->wakeup.flags.valid) 319 if (!dev || !dev->wakeup.flags.valid)
329 return_VALUE(-1); 320 return -1;
330 321
331 arg.integer.value = 0; 322 arg.integer.value = 0;
332 /* Execute PSW */ 323 /* Execute PSW */
333 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL); 324 status = acpi_evaluate_object(dev->handle, "_PSW", &arg_list, NULL);
334 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) { 325 if (ACPI_FAILURE(status) && (status != AE_NOT_FOUND)) {
335 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluate _PSW\n")); 326 printk(KERN_ERR PREFIX "Evaluate _PSW\n");
336 dev->wakeup.flags.valid = 0; 327 dev->wakeup.flags.valid = 0;
337 return_VALUE(-1); 328 return -1;
338 } 329 }
339 330
340 /* Close power resource */ 331 /* Close power resource */
341 for (i = 0; i < dev->wakeup.resources.count; i++) { 332 for (i = 0; i < dev->wakeup.resources.count; i++) {
342 ret = acpi_power_off_device(dev->wakeup.resources.handles[i]); 333 ret = acpi_power_off_device(dev->wakeup.resources.handles[i]);
343 if (ret) { 334 if (ret) {
344 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 335 printk(KERN_ERR PREFIX "Transition power state\n");
345 "Error transition power state\n"));
346 dev->wakeup.flags.valid = 0; 336 dev->wakeup.flags.valid = 0;
347 return_VALUE(-1); 337 return -1;
348 } 338 }
349 } 339 }
350 340
351 return_VALUE(ret); 341 return ret;
352} 342}
353 343
354/* -------------------------------------------------------------------------- 344/* --------------------------------------------------------------------------
@@ -362,10 +352,9 @@ int acpi_power_get_inferred_state(struct acpi_device *device)
362 int list_state = 0; 352 int list_state = 0;
363 int i = 0; 353 int i = 0;
364 354
365 ACPI_FUNCTION_TRACE("acpi_power_get_inferred_state");
366 355
367 if (!device) 356 if (!device)
368 return_VALUE(-EINVAL); 357 return -EINVAL;
369 358
370 device->power.state = ACPI_STATE_UNKNOWN; 359 device->power.state = ACPI_STATE_UNKNOWN;
371 360
@@ -380,17 +369,17 @@ int acpi_power_get_inferred_state(struct acpi_device *device)
380 369
381 result = acpi_power_get_list_state(list, &list_state); 370 result = acpi_power_get_list_state(list, &list_state);
382 if (result) 371 if (result)
383 return_VALUE(result); 372 return result;
384 373
385 if (list_state == ACPI_POWER_RESOURCE_STATE_ON) { 374 if (list_state == ACPI_POWER_RESOURCE_STATE_ON) {
386 device->power.state = i; 375 device->power.state = i;
387 return_VALUE(0); 376 return 0;
388 } 377 }
389 } 378 }
390 379
391 device->power.state = ACPI_STATE_D3; 380 device->power.state = ACPI_STATE_D3;
392 381
393 return_VALUE(0); 382 return 0;
394} 383}
395 384
396int acpi_power_transition(struct acpi_device *device, int state) 385int acpi_power_transition(struct acpi_device *device, int state)
@@ -400,14 +389,13 @@ int acpi_power_transition(struct acpi_device *device, int state)
400 struct acpi_handle_list *tl = NULL; /* Target Resources */ 389 struct acpi_handle_list *tl = NULL; /* Target Resources */
401 int i = 0; 390 int i = 0;
402 391
403 ACPI_FUNCTION_TRACE("acpi_power_transition");
404 392
405 if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3)) 393 if (!device || (state < ACPI_STATE_D0) || (state > ACPI_STATE_D3))
406 return_VALUE(-EINVAL); 394 return -EINVAL;
407 395
408 if ((device->power.state < ACPI_STATE_D0) 396 if ((device->power.state < ACPI_STATE_D0)
409 || (device->power.state > ACPI_STATE_D3)) 397 || (device->power.state > ACPI_STATE_D3))
410 return_VALUE(-ENODEV); 398 return -ENODEV;
411 399
412 cl = &device->power.states[device->power.state].resources; 400 cl = &device->power.states[device->power.state].resources;
413 tl = &device->power.states[state].resources; 401 tl = &device->power.states[state].resources;
@@ -444,11 +432,10 @@ int acpi_power_transition(struct acpi_device *device, int state)
444 device->power.state = state; 432 device->power.state = state;
445 end: 433 end:
446 if (result) 434 if (result)
447 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 435 printk(KERN_WARNING PREFIX "Transitioning device [%s] to D%d\n",
448 "Error transitioning device [%s] to D%d\n", 436 device->pnp.bus_id, state);
449 device->pnp.bus_id, state));
450 437
451 return_VALUE(result); 438 return result;
452} 439}
453 440
454/* -------------------------------------------------------------------------- 441/* --------------------------------------------------------------------------
@@ -461,7 +448,6 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
461{ 448{
462 struct acpi_power_resource *resource = NULL; 449 struct acpi_power_resource *resource = NULL;
463 450
464 ACPI_FUNCTION_TRACE("acpi_power_seq_show");
465 451
466 resource = (struct acpi_power_resource *)seq->private; 452 resource = (struct acpi_power_resource *)seq->private;
467 453
@@ -488,7 +474,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
488 resource->order, resource->references); 474 resource->order, resource->references);
489 475
490 end: 476 end:
491 return_VALUE(0); 477 return 0;
492} 478}
493 479
494static int acpi_power_open_fs(struct inode *inode, struct file *file) 480static int acpi_power_open_fs(struct inode *inode, struct file *file)
@@ -500,36 +486,32 @@ static int acpi_power_add_fs(struct acpi_device *device)
500{ 486{
501 struct proc_dir_entry *entry = NULL; 487 struct proc_dir_entry *entry = NULL;
502 488
503 ACPI_FUNCTION_TRACE("acpi_power_add_fs");
504 489
505 if (!device) 490 if (!device)
506 return_VALUE(-EINVAL); 491 return -EINVAL;
507 492
508 if (!acpi_device_dir(device)) { 493 if (!acpi_device_dir(device)) {
509 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 494 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
510 acpi_power_dir); 495 acpi_power_dir);
511 if (!acpi_device_dir(device)) 496 if (!acpi_device_dir(device))
512 return_VALUE(-ENODEV); 497 return -ENODEV;
513 } 498 }
514 499
515 /* 'status' [R] */ 500 /* 'status' [R] */
516 entry = create_proc_entry(ACPI_POWER_FILE_STATUS, 501 entry = create_proc_entry(ACPI_POWER_FILE_STATUS,
517 S_IRUGO, acpi_device_dir(device)); 502 S_IRUGO, acpi_device_dir(device));
518 if (!entry) 503 if (!entry)
519 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 504 return -EIO;
520 "Unable to create '%s' fs entry\n",
521 ACPI_POWER_FILE_STATUS));
522 else { 505 else {
523 entry->proc_fops = &acpi_power_fops; 506 entry->proc_fops = &acpi_power_fops;
524 entry->data = acpi_driver_data(device); 507 entry->data = acpi_driver_data(device);
525 } 508 }
526 509
527 return_VALUE(0); 510 return 0;
528} 511}
529 512
530static int acpi_power_remove_fs(struct acpi_device *device) 513static int acpi_power_remove_fs(struct acpi_device *device)
531{ 514{
532 ACPI_FUNCTION_TRACE("acpi_power_remove_fs");
533 515
534 if (acpi_device_dir(device)) { 516 if (acpi_device_dir(device)) {
535 remove_proc_entry(ACPI_POWER_FILE_STATUS, 517 remove_proc_entry(ACPI_POWER_FILE_STATUS,
@@ -538,7 +520,7 @@ static int acpi_power_remove_fs(struct acpi_device *device)
538 acpi_device_dir(device) = NULL; 520 acpi_device_dir(device) = NULL;
539 } 521 }
540 522
541 return_VALUE(0); 523 return 0;
542} 524}
543 525
544/* -------------------------------------------------------------------------- 526/* --------------------------------------------------------------------------
@@ -553,14 +535,13 @@ static int acpi_power_add(struct acpi_device *device)
553 union acpi_object acpi_object; 535 union acpi_object acpi_object;
554 struct acpi_buffer buffer = { sizeof(acpi_object), &acpi_object }; 536 struct acpi_buffer buffer = { sizeof(acpi_object), &acpi_object };
555 537
556 ACPI_FUNCTION_TRACE("acpi_power_add");
557 538
558 if (!device) 539 if (!device)
559 return_VALUE(-EINVAL); 540 return -EINVAL;
560 541
561 resource = kmalloc(sizeof(struct acpi_power_resource), GFP_KERNEL); 542 resource = kmalloc(sizeof(struct acpi_power_resource), GFP_KERNEL);
562 if (!resource) 543 if (!resource)
563 return_VALUE(-ENOMEM); 544 return -ENOMEM;
564 memset(resource, 0, sizeof(struct acpi_power_resource)); 545 memset(resource, 0, sizeof(struct acpi_power_resource));
565 546
566 resource->handle = device->handle; 547 resource->handle = device->handle;
@@ -605,17 +586,16 @@ static int acpi_power_add(struct acpi_device *device)
605 if (result) 586 if (result)
606 kfree(resource); 587 kfree(resource);
607 588
608 return_VALUE(result); 589 return result;
609} 590}
610 591
611static int acpi_power_remove(struct acpi_device *device, int type) 592static int acpi_power_remove(struct acpi_device *device, int type)
612{ 593{
613 struct acpi_power_resource *resource = NULL; 594 struct acpi_power_resource *resource = NULL;
614 595
615 ACPI_FUNCTION_TRACE("acpi_power_remove");
616 596
617 if (!device || !acpi_driver_data(device)) 597 if (!device || !acpi_driver_data(device))
618 return_VALUE(-EINVAL); 598 return -EINVAL;
619 599
620 resource = (struct acpi_power_resource *)acpi_driver_data(device); 600 resource = (struct acpi_power_resource *)acpi_driver_data(device);
621 601
@@ -623,31 +603,30 @@ static int acpi_power_remove(struct acpi_device *device, int type)
623 603
624 kfree(resource); 604 kfree(resource);
625 605
626 return_VALUE(0); 606 return 0;
627} 607}
628 608
629static int __init acpi_power_init(void) 609static int __init acpi_power_init(void)
630{ 610{
631 int result = 0; 611 int result = 0;
632 612
633 ACPI_FUNCTION_TRACE("acpi_power_init");
634 613
635 if (acpi_disabled) 614 if (acpi_disabled)
636 return_VALUE(0); 615 return 0;
637 616
638 INIT_LIST_HEAD(&acpi_power_resource_list); 617 INIT_LIST_HEAD(&acpi_power_resource_list);
639 618
640 acpi_power_dir = proc_mkdir(ACPI_POWER_CLASS, acpi_root_dir); 619 acpi_power_dir = proc_mkdir(ACPI_POWER_CLASS, acpi_root_dir);
641 if (!acpi_power_dir) 620 if (!acpi_power_dir)
642 return_VALUE(-ENODEV); 621 return -ENODEV;
643 622
644 result = acpi_bus_register_driver(&acpi_power_driver); 623 result = acpi_bus_register_driver(&acpi_power_driver);
645 if (result < 0) { 624 if (result < 0) {
646 remove_proc_entry(ACPI_POWER_CLASS, acpi_root_dir); 625 remove_proc_entry(ACPI_POWER_CLASS, acpi_root_dir);
647 return_VALUE(-ENODEV); 626 return -ENODEV;
648 } 627 }
649 628
650 return_VALUE(0); 629 return 0;
651} 630}
652 631
653subsys_initcall(acpi_power_init); 632subsys_initcall(acpi_power_init);
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index decaebb4cbe..52674323b14 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -122,10 +122,9 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
122 u8 value1 = 0; 122 u8 value1 = 0;
123 u8 value2 = 0; 123 u8 value2 = 0;
124 124
125 ACPI_FUNCTION_TRACE("acpi_processor_errata_piix4");
126 125
127 if (!dev) 126 if (!dev)
128 return_VALUE(-EINVAL); 127 return -EINVAL;
129 128
130 /* 129 /*
131 * Note that 'dev' references the PIIX4 ACPI Controller. 130 * Note that 'dev' references the PIIX4 ACPI Controller.
@@ -218,7 +217,7 @@ static int acpi_processor_errata_piix4(struct pci_dev *dev)
218 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 217 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
219 "Type-F DMA livelock erratum (C3 disabled)\n")); 218 "Type-F DMA livelock erratum (C3 disabled)\n"));
220 219
221 return_VALUE(0); 220 return 0;
222} 221}
223 222
224static int acpi_processor_errata(struct acpi_processor *pr) 223static int acpi_processor_errata(struct acpi_processor *pr)
@@ -226,10 +225,9 @@ static int acpi_processor_errata(struct acpi_processor *pr)
226 int result = 0; 225 int result = 0;
227 struct pci_dev *dev = NULL; 226 struct pci_dev *dev = NULL;
228 227
229 ACPI_FUNCTION_TRACE("acpi_processor_errata");
230 228
231 if (!pr) 229 if (!pr)
232 return_VALUE(-EINVAL); 230 return -EINVAL;
233 231
234 /* 232 /*
235 * PIIX4 233 * PIIX4
@@ -242,7 +240,7 @@ static int acpi_processor_errata(struct acpi_processor *pr)
242 pci_dev_put(dev); 240 pci_dev_put(dev);
243 } 241 }
244 242
245 return_VALUE(result); 243 return result;
246} 244}
247 245
248/* -------------------------------------------------------------------------- 246/* --------------------------------------------------------------------------
@@ -258,10 +256,9 @@ static int acpi_processor_set_pdc(struct acpi_processor *pr)
258 struct acpi_object_list *pdc_in = pr->pdc; 256 struct acpi_object_list *pdc_in = pr->pdc;
259 acpi_status status = AE_OK; 257 acpi_status status = AE_OK;
260 258
261 ACPI_FUNCTION_TRACE("acpi_processor_set_pdc");
262 259
263 if (!pdc_in) 260 if (!pdc_in)
264 return_VALUE(status); 261 return status;
265 262
266 status = acpi_evaluate_object(pr->handle, "_PDC", pdc_in, NULL); 263 status = acpi_evaluate_object(pr->handle, "_PDC", pdc_in, NULL);
267 264
@@ -269,7 +266,7 @@ static int acpi_processor_set_pdc(struct acpi_processor *pr)
269 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 266 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
270 "Could not evaluate _PDC, using legacy perf. control...\n")); 267 "Could not evaluate _PDC, using legacy perf. control...\n"));
271 268
272 return_VALUE(status); 269 return status;
273} 270}
274 271
275/* -------------------------------------------------------------------------- 272/* --------------------------------------------------------------------------
@@ -282,7 +279,6 @@ static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset)
282{ 279{
283 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 280 struct acpi_processor *pr = (struct acpi_processor *)seq->private;
284 281
285 ACPI_FUNCTION_TRACE("acpi_processor_info_seq_show");
286 282
287 if (!pr) 283 if (!pr)
288 goto end; 284 goto end;
@@ -301,7 +297,7 @@ static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset)
301 pr->flags.limit ? "yes" : "no"); 297 pr->flags.limit ? "yes" : "no");
302 298
303 end: 299 end:
304 return_VALUE(0); 300 return 0;
305} 301}
306 302
307static int acpi_processor_info_open_fs(struct inode *inode, struct file *file) 303static int acpi_processor_info_open_fs(struct inode *inode, struct file *file)
@@ -314,13 +310,12 @@ static int acpi_processor_add_fs(struct acpi_device *device)
314{ 310{
315 struct proc_dir_entry *entry = NULL; 311 struct proc_dir_entry *entry = NULL;
316 312
317 ACPI_FUNCTION_TRACE("acpi_processor_add_fs");
318 313
319 if (!acpi_device_dir(device)) { 314 if (!acpi_device_dir(device)) {
320 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 315 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
321 acpi_processor_dir); 316 acpi_processor_dir);
322 if (!acpi_device_dir(device)) 317 if (!acpi_device_dir(device))
323 return_VALUE(-ENODEV); 318 return -ENODEV;
324 } 319 }
325 acpi_device_dir(device)->owner = THIS_MODULE; 320 acpi_device_dir(device)->owner = THIS_MODULE;
326 321
@@ -328,9 +323,7 @@ static int acpi_processor_add_fs(struct acpi_device *device)
328 entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO, 323 entry = create_proc_entry(ACPI_PROCESSOR_FILE_INFO,
329 S_IRUGO, acpi_device_dir(device)); 324 S_IRUGO, acpi_device_dir(device));
330 if (!entry) 325 if (!entry)
331 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 326 return -EIO;
332 "Unable to create '%s' fs entry\n",
333 ACPI_PROCESSOR_FILE_INFO));
334 else { 327 else {
335 entry->proc_fops = &acpi_processor_info_fops; 328 entry->proc_fops = &acpi_processor_info_fops;
336 entry->data = acpi_driver_data(device); 329 entry->data = acpi_driver_data(device);
@@ -342,9 +335,7 @@ static int acpi_processor_add_fs(struct acpi_device *device)
342 S_IFREG | S_IRUGO | S_IWUSR, 335 S_IFREG | S_IRUGO | S_IWUSR,
343 acpi_device_dir(device)); 336 acpi_device_dir(device));
344 if (!entry) 337 if (!entry)
345 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 338 return -EIO;
346 "Unable to create '%s' fs entry\n",
347 ACPI_PROCESSOR_FILE_THROTTLING));
348 else { 339 else {
349 entry->proc_fops = &acpi_processor_throttling_fops; 340 entry->proc_fops = &acpi_processor_throttling_fops;
350 entry->data = acpi_driver_data(device); 341 entry->data = acpi_driver_data(device);
@@ -356,21 +347,18 @@ static int acpi_processor_add_fs(struct acpi_device *device)
356 S_IFREG | S_IRUGO | S_IWUSR, 347 S_IFREG | S_IRUGO | S_IWUSR,
357 acpi_device_dir(device)); 348 acpi_device_dir(device));
358 if (!entry) 349 if (!entry)
359 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 350 return -EIO;
360 "Unable to create '%s' fs entry\n",
361 ACPI_PROCESSOR_FILE_LIMIT));
362 else { 351 else {
363 entry->proc_fops = &acpi_processor_limit_fops; 352 entry->proc_fops = &acpi_processor_limit_fops;
364 entry->data = acpi_driver_data(device); 353 entry->data = acpi_driver_data(device);
365 entry->owner = THIS_MODULE; 354 entry->owner = THIS_MODULE;
366 } 355 }
367 356
368 return_VALUE(0); 357 return 0;
369} 358}
370 359
371static int acpi_processor_remove_fs(struct acpi_device *device) 360static int acpi_processor_remove_fs(struct acpi_device *device)
372{ 361{
373 ACPI_FUNCTION_TRACE("acpi_processor_remove_fs");
374 362
375 if (acpi_device_dir(device)) { 363 if (acpi_device_dir(device)) {
376 remove_proc_entry(ACPI_PROCESSOR_FILE_INFO, 364 remove_proc_entry(ACPI_PROCESSOR_FILE_INFO,
@@ -383,7 +371,7 @@ static int acpi_processor_remove_fs(struct acpi_device *device)
383 acpi_device_dir(device) = NULL; 371 acpi_device_dir(device) = NULL;
384 } 372 }
385 373
386 return_VALUE(0); 374 return 0;
387} 375}
388 376
389/* Use the acpiid in MADT to map cpus in case of SMP */ 377/* Use the acpiid in MADT to map cpus in case of SMP */
@@ -430,10 +418,9 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
430 int cpu_index; 418 int cpu_index;
431 static int cpu0_initialized; 419 static int cpu0_initialized;
432 420
433 ACPI_FUNCTION_TRACE("acpi_processor_get_info");
434 421
435 if (!pr) 422 if (!pr)
436 return_VALUE(-EINVAL); 423 return -EINVAL;
437 424
438 if (num_online_cpus() > 1) 425 if (num_online_cpus() > 1)
439 errata.smp = TRUE; 426 errata.smp = TRUE;
@@ -459,9 +446,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
459 */ 446 */
460 status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer); 447 status = acpi_evaluate_object(pr->handle, NULL, NULL, &buffer);
461 if (ACPI_FAILURE(status)) { 448 if (ACPI_FAILURE(status)) {
462 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 449 printk(KERN_ERR PREFIX "Evaluating processor object\n");
463 "Error evaluating processor object\n")); 450 return -ENODEV;
464 return_VALUE(-ENODEV);
465 } 451 }
466 452
467 /* 453 /*
@@ -490,10 +476,10 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
490 if (cpu_index == -1) { 476 if (cpu_index == -1) {
491 if (ACPI_FAILURE 477 if (ACPI_FAILURE
492 (acpi_processor_hotadd_init(pr->handle, &pr->id))) { 478 (acpi_processor_hotadd_init(pr->handle, &pr->id))) {
493 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 479 printk(KERN_ERR PREFIX
494 "Error getting cpuindex for acpiid 0x%x\n", 480 "Getting cpuindex for acpiid 0x%x\n",
495 pr->acpi_id)); 481 pr->acpi_id);
496 return_VALUE(-ENODEV); 482 return -ENODEV;
497 } 483 }
498 } 484 }
499 485
@@ -503,8 +489,8 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
503 if (!object.processor.pblk_address) 489 if (!object.processor.pblk_address)
504 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n")); 490 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
505 else if (object.processor.pblk_length != 6) 491 else if (object.processor.pblk_length != 6)
506 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid PBLK length [%d]\n", 492 printk(KERN_ERR PREFIX "Invalid PBLK length [%d]\n",
507 object.processor.pblk_length)); 493 object.processor.pblk_length);
508 else { 494 else {
509 pr->throttling.address = object.processor.pblk_address; 495 pr->throttling.address = object.processor.pblk_address;
510 pr->throttling.duty_offset = acpi_fadt.duty_offset; 496 pr->throttling.duty_offset = acpi_fadt.duty_offset;
@@ -528,7 +514,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr)
528 acpi_processor_get_throttling_info(pr); 514 acpi_processor_get_throttling_info(pr);
529 acpi_processor_get_limit_info(pr); 515 acpi_processor_get_limit_info(pr);
530 516
531 return_VALUE(0); 517 return 0;
532} 518}
533 519
534static void *processor_device_array[NR_CPUS]; 520static void *processor_device_array[NR_CPUS];
@@ -539,14 +525,13 @@ static int acpi_processor_start(struct acpi_device *device)
539 acpi_status status = AE_OK; 525 acpi_status status = AE_OK;
540 struct acpi_processor *pr; 526 struct acpi_processor *pr;
541 527
542 ACPI_FUNCTION_TRACE("acpi_processor_start");
543 528
544 pr = acpi_driver_data(device); 529 pr = acpi_driver_data(device);
545 530
546 result = acpi_processor_get_info(pr); 531 result = acpi_processor_get_info(pr);
547 if (result) { 532 if (result) {
548 /* Processor is physically not present */ 533 /* Processor is physically not present */
549 return_VALUE(0); 534 return 0;
550 } 535 }
551 536
552 BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0)); 537 BUG_ON((pr->id >= NR_CPUS) || (pr->id < 0));
@@ -560,7 +545,7 @@ static int acpi_processor_start(struct acpi_device *device)
560 processor_device_array[pr->id] != (void *)device) { 545 processor_device_array[pr->id] != (void *)device) {
561 printk(KERN_WARNING "BIOS reported wrong ACPI id" 546 printk(KERN_WARNING "BIOS reported wrong ACPI id"
562 "for the processor\n"); 547 "for the processor\n");
563 return_VALUE(-ENODEV); 548 return -ENODEV;
564 } 549 }
565 processor_device_array[pr->id] = (void *)device; 550 processor_device_array[pr->id] = (void *)device;
566 551
@@ -572,10 +557,6 @@ static int acpi_processor_start(struct acpi_device *device)
572 557
573 status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, 558 status = acpi_install_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
574 acpi_processor_notify, pr); 559 acpi_processor_notify, pr);
575 if (ACPI_FAILURE(status)) {
576 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
577 "Error installing device notify handler\n"));
578 }
579 560
580 /* _PDC call should be done before doing anything else (if reqd.). */ 561 /* _PDC call should be done before doing anything else (if reqd.). */
581 arch_acpi_processor_init_pdc(pr); 562 arch_acpi_processor_init_pdc(pr);
@@ -592,7 +573,7 @@ static int acpi_processor_start(struct acpi_device *device)
592 573
593 end: 574 end:
594 575
595 return_VALUE(result); 576 return result;
596} 577}
597 578
598static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) 579static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
@@ -600,13 +581,12 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
600 struct acpi_processor *pr = (struct acpi_processor *)data; 581 struct acpi_processor *pr = (struct acpi_processor *)data;
601 struct acpi_device *device = NULL; 582 struct acpi_device *device = NULL;
602 583
603 ACPI_FUNCTION_TRACE("acpi_processor_notify");
604 584
605 if (!pr) 585 if (!pr)
606 return_VOID; 586 return;
607 587
608 if (acpi_bus_get_device(pr->handle, &device)) 588 if (acpi_bus_get_device(pr->handle, &device))
609 return_VOID; 589 return;
610 590
611 switch (event) { 591 switch (event) {
612 case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: 592 case ACPI_PROCESSOR_NOTIFY_PERFORMANCE:
@@ -624,21 +604,20 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data)
624 break; 604 break;
625 } 605 }
626 606
627 return_VOID; 607 return;
628} 608}
629 609
630static int acpi_processor_add(struct acpi_device *device) 610static int acpi_processor_add(struct acpi_device *device)
631{ 611{
632 struct acpi_processor *pr = NULL; 612 struct acpi_processor *pr = NULL;
633 613
634 ACPI_FUNCTION_TRACE("acpi_processor_add");
635 614
636 if (!device) 615 if (!device)
637 return_VALUE(-EINVAL); 616 return -EINVAL;
638 617
639 pr = kmalloc(sizeof(struct acpi_processor), GFP_KERNEL); 618 pr = kmalloc(sizeof(struct acpi_processor), GFP_KERNEL);
640 if (!pr) 619 if (!pr)
641 return_VALUE(-ENOMEM); 620 return -ENOMEM;
642 memset(pr, 0, sizeof(struct acpi_processor)); 621 memset(pr, 0, sizeof(struct acpi_processor));
643 622
644 pr->handle = device->handle; 623 pr->handle = device->handle;
@@ -646,7 +625,7 @@ static int acpi_processor_add(struct acpi_device *device)
646 strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS); 625 strcpy(acpi_device_class(device), ACPI_PROCESSOR_CLASS);
647 acpi_driver_data(device) = pr; 626 acpi_driver_data(device) = pr;
648 627
649 return_VALUE(0); 628 return 0;
650} 629}
651 630
652static int acpi_processor_remove(struct acpi_device *device, int type) 631static int acpi_processor_remove(struct acpi_device *device, int type)
@@ -654,31 +633,26 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
654 acpi_status status = AE_OK; 633 acpi_status status = AE_OK;
655 struct acpi_processor *pr = NULL; 634 struct acpi_processor *pr = NULL;
656 635
657 ACPI_FUNCTION_TRACE("acpi_processor_remove");
658 636
659 if (!device || !acpi_driver_data(device)) 637 if (!device || !acpi_driver_data(device))
660 return_VALUE(-EINVAL); 638 return -EINVAL;
661 639
662 pr = (struct acpi_processor *)acpi_driver_data(device); 640 pr = (struct acpi_processor *)acpi_driver_data(device);
663 641
664 if (pr->id >= NR_CPUS) { 642 if (pr->id >= NR_CPUS) {
665 kfree(pr); 643 kfree(pr);
666 return_VALUE(0); 644 return 0;
667 } 645 }
668 646
669 if (type == ACPI_BUS_REMOVAL_EJECT) { 647 if (type == ACPI_BUS_REMOVAL_EJECT) {
670 if (acpi_processor_handle_eject(pr)) 648 if (acpi_processor_handle_eject(pr))
671 return_VALUE(-EINVAL); 649 return -EINVAL;
672 } 650 }
673 651
674 acpi_processor_power_exit(pr, device); 652 acpi_processor_power_exit(pr, device);
675 653
676 status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY, 654 status = acpi_remove_notify_handler(pr->handle, ACPI_DEVICE_NOTIFY,
677 acpi_processor_notify); 655 acpi_processor_notify);
678 if (ACPI_FAILURE(status)) {
679 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
680 "Error removing notify handler\n"));
681 }
682 656
683 acpi_processor_remove_fs(device); 657 acpi_processor_remove_fs(device);
684 658
@@ -686,7 +660,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
686 660
687 kfree(pr); 661 kfree(pr);
688 662
689 return_VALUE(0); 663 return 0;
690} 664}
691 665
692#ifdef CONFIG_ACPI_HOTPLUG_CPU 666#ifdef CONFIG_ACPI_HOTPLUG_CPU
@@ -701,15 +675,13 @@ static int is_processor_present(acpi_handle handle)
701 acpi_status status; 675 acpi_status status;
702 unsigned long sta = 0; 676 unsigned long sta = 0;
703 677
704 ACPI_FUNCTION_TRACE("is_processor_present");
705 678
706 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 679 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
707 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { 680 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) {
708 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 681 ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
709 "Processor Device is not present\n")); 682 return 0;
710 return_VALUE(0);
711 } 683 }
712 return_VALUE(1); 684 return 1;
713} 685}
714 686
715static 687static
@@ -719,30 +691,29 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device)
719 struct acpi_device *pdev; 691 struct acpi_device *pdev;
720 struct acpi_processor *pr; 692 struct acpi_processor *pr;
721 693
722 ACPI_FUNCTION_TRACE("acpi_processor_device_add");
723 694
724 if (acpi_get_parent(handle, &phandle)) { 695 if (acpi_get_parent(handle, &phandle)) {
725 return_VALUE(-ENODEV); 696 return -ENODEV;
726 } 697 }
727 698
728 if (acpi_bus_get_device(phandle, &pdev)) { 699 if (acpi_bus_get_device(phandle, &pdev)) {
729 return_VALUE(-ENODEV); 700 return -ENODEV;
730 } 701 }
731 702
732 if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_PROCESSOR)) { 703 if (acpi_bus_add(device, pdev, handle, ACPI_BUS_TYPE_PROCESSOR)) {
733 return_VALUE(-ENODEV); 704 return -ENODEV;
734 } 705 }
735 706
736 acpi_bus_start(*device); 707 acpi_bus_start(*device);
737 708
738 pr = acpi_driver_data(*device); 709 pr = acpi_driver_data(*device);
739 if (!pr) 710 if (!pr)
740 return_VALUE(-ENODEV); 711 return -ENODEV;
741 712
742 if ((pr->id >= 0) && (pr->id < NR_CPUS)) { 713 if ((pr->id >= 0) && (pr->id < NR_CPUS)) {
743 kobject_uevent(&(*device)->kobj, KOBJ_ONLINE); 714 kobject_uevent(&(*device)->kobj, KOBJ_ONLINE);
744 } 715 }
745 return_VALUE(0); 716 return 0;
746} 717}
747 718
748static void 719static void
@@ -752,7 +723,6 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
752 struct acpi_device *device = NULL; 723 struct acpi_device *device = NULL;
753 int result; 724 int result;
754 725
755 ACPI_FUNCTION_TRACE("acpi_processor_hotplug_notify");
756 726
757 switch (event) { 727 switch (event) {
758 case ACPI_NOTIFY_BUS_CHECK: 728 case ACPI_NOTIFY_BUS_CHECK:
@@ -767,15 +737,14 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
767 if (acpi_bus_get_device(handle, &device)) { 737 if (acpi_bus_get_device(handle, &device)) {
768 result = acpi_processor_device_add(handle, &device); 738 result = acpi_processor_device_add(handle, &device);
769 if (result) 739 if (result)
770 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 740 printk(KERN_ERR PREFIX
771 "Unable to add the device\n")); 741 "Unable to add the device\n");
772 break; 742 break;
773 } 743 }
774 744
775 pr = acpi_driver_data(device); 745 pr = acpi_driver_data(device);
776 if (!pr) { 746 if (!pr) {
777 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 747 printk(KERN_ERR PREFIX "Driver data is NULL\n");
778 "Driver data is NULL\n"));
779 break; 748 break;
780 } 749 }
781 750
@@ -788,9 +757,8 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
788 if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) { 757 if ((!result) && ((pr->id >= 0) && (pr->id < NR_CPUS))) {
789 kobject_uevent(&device->kobj, KOBJ_ONLINE); 758 kobject_uevent(&device->kobj, KOBJ_ONLINE);
790 } else { 759 } else {
791 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 760 printk(KERN_ERR PREFIX "Device [%s] failed to start\n",
792 "Device [%s] failed to start\n", 761 acpi_device_bid(device));
793 acpi_device_bid(device)));
794 } 762 }
795 break; 763 break;
796 case ACPI_NOTIFY_EJECT_REQUEST: 764 case ACPI_NOTIFY_EJECT_REQUEST:
@@ -798,15 +766,15 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
798 "received ACPI_NOTIFY_EJECT_REQUEST\n")); 766 "received ACPI_NOTIFY_EJECT_REQUEST\n"));
799 767
800 if (acpi_bus_get_device(handle, &device)) { 768 if (acpi_bus_get_device(handle, &device)) {
801 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 769 printk(KERN_ERR PREFIX
802 "Device don't exist, dropping EJECT\n")); 770 "Device don't exist, dropping EJECT\n");
803 break; 771 break;
804 } 772 }
805 pr = acpi_driver_data(device); 773 pr = acpi_driver_data(device);
806 if (!pr) { 774 if (!pr) {
807 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 775 printk(KERN_ERR PREFIX
808 "Driver data is NULL, dropping EJECT\n")); 776 "Driver data is NULL, dropping EJECT\n");
809 return_VOID; 777 return;
810 } 778 }
811 779
812 if ((pr->id < NR_CPUS) && (cpu_present(pr->id))) 780 if ((pr->id < NR_CPUS) && (cpu_present(pr->id)))
@@ -818,7 +786,7 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data)
818 break; 786 break;
819 } 787 }
820 788
821 return_VOID; 789 return;
822} 790}
823 791
824static acpi_status 792static acpi_status
@@ -857,21 +825,20 @@ processor_walk_namespace_cb(acpi_handle handle,
857 825
858static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu) 826static acpi_status acpi_processor_hotadd_init(acpi_handle handle, int *p_cpu)
859{ 827{
860 ACPI_FUNCTION_TRACE("acpi_processor_hotadd_init");
861 828
862 if (!is_processor_present(handle)) { 829 if (!is_processor_present(handle)) {
863 return_VALUE(AE_ERROR); 830 return AE_ERROR;
864 } 831 }
865 832
866 if (acpi_map_lsapic(handle, p_cpu)) 833 if (acpi_map_lsapic(handle, p_cpu))
867 return_VALUE(AE_ERROR); 834 return AE_ERROR;
868 835
869 if (arch_register_cpu(*p_cpu)) { 836 if (arch_register_cpu(*p_cpu)) {
870 acpi_unmap_lsapic(*p_cpu); 837 acpi_unmap_lsapic(*p_cpu);
871 return_VALUE(AE_ERROR); 838 return AE_ERROR;
872 } 839 }
873 840
874 return_VALUE(AE_OK); 841 return AE_OK;
875} 842}
876 843
877static int acpi_processor_handle_eject(struct acpi_processor *pr) 844static int acpi_processor_handle_eject(struct acpi_processor *pr)
@@ -928,20 +895,19 @@ static int __init acpi_processor_init(void)
928{ 895{
929 int result = 0; 896 int result = 0;
930 897
931 ACPI_FUNCTION_TRACE("acpi_processor_init");
932 898
933 memset(&processors, 0, sizeof(processors)); 899 memset(&processors, 0, sizeof(processors));
934 memset(&errata, 0, sizeof(errata)); 900 memset(&errata, 0, sizeof(errata));
935 901
936 acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir); 902 acpi_processor_dir = proc_mkdir(ACPI_PROCESSOR_CLASS, acpi_root_dir);
937 if (!acpi_processor_dir) 903 if (!acpi_processor_dir)
938 return_VALUE(0); 904 return 0;
939 acpi_processor_dir->owner = THIS_MODULE; 905 acpi_processor_dir->owner = THIS_MODULE;
940 906
941 result = acpi_bus_register_driver(&acpi_processor_driver); 907 result = acpi_bus_register_driver(&acpi_processor_driver);
942 if (result < 0) { 908 if (result < 0) {
943 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); 909 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
944 return_VALUE(0); 910 return 0;
945 } 911 }
946 912
947 acpi_processor_install_hotplug_notify(); 913 acpi_processor_install_hotplug_notify();
@@ -950,12 +916,11 @@ static int __init acpi_processor_init(void)
950 916
951 acpi_processor_ppc_init(); 917 acpi_processor_ppc_init();
952 918
953 return_VALUE(0); 919 return 0;
954} 920}
955 921
956static void __exit acpi_processor_exit(void) 922static void __exit acpi_processor_exit(void)
957{ 923{
958 ACPI_FUNCTION_TRACE("acpi_processor_exit");
959 924
960 acpi_processor_ppc_exit(); 925 acpi_processor_ppc_exit();
961 926
@@ -967,7 +932,7 @@ static void __exit acpi_processor_exit(void)
967 932
968 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir); 933 remove_proc_entry(ACPI_PROCESSOR_CLASS, acpi_root_dir);
969 934
970 return_VOID; 935 return;
971} 936}
972 937
973module_init(acpi_processor_init); 938module_init(acpi_processor_init);
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 8a74bf3efd8..e439eb77d28 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com> 4 * Copyright (C) 2001, 2002 Andy Grover <andrew.grover@intel.com>
5 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com> 5 * Copyright (C) 2001, 2002 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
6 * Copyright (C) 2004 Dominik Brodowski <linux@brodo.de> 6 * Copyright (C) 2004, 2005 Dominik Brodowski <linux@brodo.de>
7 * Copyright (C) 2004 Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> 7 * Copyright (C) 2004 Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
8 * - Added processor hotplug support 8 * - Added processor hotplug support
9 * Copyright (C) 2005 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> 9 * Copyright (C) 2005 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
@@ -99,6 +99,9 @@ static int set_max_cstate(struct dmi_system_id *id)
99static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = { 99static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
100 { set_max_cstate, "IBM ThinkPad R40e", { 100 { set_max_cstate, "IBM ThinkPad R40e", {
101 DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), 101 DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
102 DMI_MATCH(DMI_BIOS_VERSION,"1SET70WW")}, (void *)1},
103 { set_max_cstate, "IBM ThinkPad R40e", {
104 DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
102 DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1}, 105 DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW")}, (void *)1},
103 { set_max_cstate, "IBM ThinkPad R40e", { 106 { set_max_cstate, "IBM ThinkPad R40e", {
104 DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), 107 DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
@@ -261,21 +264,15 @@ static void acpi_processor_idle(void)
261 u32 bm_status = 0; 264 u32 bm_status = 0;
262 unsigned long diff = jiffies - pr->power.bm_check_timestamp; 265 unsigned long diff = jiffies - pr->power.bm_check_timestamp;
263 266
264 if (diff > 32) 267 if (diff > 31)
265 diff = 32; 268 diff = 31;
266 269
267 while (diff) { 270 pr->power.bm_activity <<= diff;
268 /* if we didn't get called, assume there was busmaster activity */
269 diff--;
270 if (diff)
271 pr->power.bm_activity |= 0x1;
272 pr->power.bm_activity <<= 1;
273 }
274 271
275 acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, 272 acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS,
276 &bm_status, ACPI_MTX_DO_NOT_LOCK); 273 &bm_status, ACPI_MTX_DO_NOT_LOCK);
277 if (bm_status) { 274 if (bm_status) {
278 pr->power.bm_activity++; 275 pr->power.bm_activity |= 0x1;
279 acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 276 acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS,
280 1, ACPI_MTX_DO_NOT_LOCK); 277 1, ACPI_MTX_DO_NOT_LOCK);
281 } 278 }
@@ -287,16 +284,16 @@ static void acpi_processor_idle(void)
287 else if (errata.piix4.bmisx) { 284 else if (errata.piix4.bmisx) {
288 if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01) 285 if ((inb_p(errata.piix4.bmisx + 0x02) & 0x01)
289 || (inb_p(errata.piix4.bmisx + 0x0A) & 0x01)) 286 || (inb_p(errata.piix4.bmisx + 0x0A) & 0x01))
290 pr->power.bm_activity++; 287 pr->power.bm_activity |= 0x1;
291 } 288 }
292 289
293 pr->power.bm_check_timestamp = jiffies; 290 pr->power.bm_check_timestamp = jiffies;
294 291
295 /* 292 /*
296 * Apply bus mastering demotion policy. Automatically demote 293 * If bus mastering is or was active this jiffy, demote
297 * to avoid a faulty transition. Note that the processor 294 * to avoid a faulty transition. Note that the processor
298 * won't enter a low-power state during this call (to this 295 * won't enter a low-power state during this call (to this
299 * funciton) but should upon the next. 296 * function) but should upon the next.
300 * 297 *
301 * TBD: A better policy might be to fallback to the demotion 298 * TBD: A better policy might be to fallback to the demotion
302 * state (use it for this quantum only) istead of 299 * state (use it for this quantum only) istead of
@@ -304,7 +301,8 @@ static void acpi_processor_idle(void)
304 * qualification. This may, however, introduce DMA 301 * qualification. This may, however, introduce DMA
305 * issues (e.g. floppy DMA transfer overrun/underrun). 302 * issues (e.g. floppy DMA transfer overrun/underrun).
306 */ 303 */
307 if (pr->power.bm_activity & cx->demotion.threshold.bm) { 304 if ((pr->power.bm_activity & 0x1) &&
305 cx->demotion.threshold.bm) {
308 local_irq_enable(); 306 local_irq_enable();
309 next_state = cx->demotion.state; 307 next_state = cx->demotion.state;
310 goto end; 308 goto end;
@@ -322,8 +320,6 @@ static void acpi_processor_idle(void)
322 cx = &pr->power.states[ACPI_STATE_C1]; 320 cx = &pr->power.states[ACPI_STATE_C1];
323#endif 321#endif
324 322
325 cx->usage++;
326
327 /* 323 /*
328 * Sleep: 324 * Sleep:
329 * ------ 325 * ------
@@ -365,7 +361,9 @@ static void acpi_processor_idle(void)
365 t1 = inl(acpi_fadt.xpm_tmr_blk.address); 361 t1 = inl(acpi_fadt.xpm_tmr_blk.address);
366 /* Invoke C2 */ 362 /* Invoke C2 */
367 inb(cx->address); 363 inb(cx->address);
368 /* Dummy op - must do something useless after P_LVL2 read */ 364 /* Dummy wait op - must do something useless after P_LVL2 read
365 because chipsets cannot guarantee that STPCLK# signal
366 gets asserted in time to freeze execution properly. */
369 t2 = inl(acpi_fadt.xpm_tmr_blk.address); 367 t2 = inl(acpi_fadt.xpm_tmr_blk.address);
370 /* Get end time (ticks) */ 368 /* Get end time (ticks) */
371 t2 = inl(acpi_fadt.xpm_tmr_blk.address); 369 t2 = inl(acpi_fadt.xpm_tmr_blk.address);
@@ -403,7 +401,7 @@ static void acpi_processor_idle(void)
403 t1 = inl(acpi_fadt.xpm_tmr_blk.address); 401 t1 = inl(acpi_fadt.xpm_tmr_blk.address);
404 /* Invoke C3 */ 402 /* Invoke C3 */
405 inb(cx->address); 403 inb(cx->address);
406 /* Dummy op - must do something useless after P_LVL3 read */ 404 /* Dummy wait op (see above) */
407 t2 = inl(acpi_fadt.xpm_tmr_blk.address); 405 t2 = inl(acpi_fadt.xpm_tmr_blk.address);
408 /* Get end time (ticks) */ 406 /* Get end time (ticks) */
409 t2 = inl(acpi_fadt.xpm_tmr_blk.address); 407 t2 = inl(acpi_fadt.xpm_tmr_blk.address);
@@ -430,6 +428,9 @@ static void acpi_processor_idle(void)
430 local_irq_enable(); 428 local_irq_enable();
431 return; 429 return;
432 } 430 }
431 cx->usage++;
432 if ((cx->type != ACPI_STATE_C1) && (sleep_ticks > 0))
433 cx->time += sleep_ticks;
433 434
434 next_state = pr->power.state; 435 next_state = pr->power.state;
435 436
@@ -517,10 +518,9 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr)
517 struct acpi_processor_cx *higher = NULL; 518 struct acpi_processor_cx *higher = NULL;
518 struct acpi_processor_cx *cx; 519 struct acpi_processor_cx *cx;
519 520
520 ACPI_FUNCTION_TRACE("acpi_processor_set_power_policy");
521 521
522 if (!pr) 522 if (!pr)
523 return_VALUE(-EINVAL); 523 return -EINVAL;
524 524
525 /* 525 /*
526 * This function sets the default Cx state policy (OS idle handler). 526 * This function sets the default Cx state policy (OS idle handler).
@@ -544,7 +544,7 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr)
544 } 544 }
545 545
546 if (!state_is_set) 546 if (!state_is_set)
547 return_VALUE(-ENODEV); 547 return -ENODEV;
548 548
549 /* demotion */ 549 /* demotion */
550 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) { 550 for (i = 1; i < ACPI_PROCESSOR_MAX_POWER; i++) {
@@ -583,18 +583,17 @@ static int acpi_processor_set_power_policy(struct acpi_processor *pr)
583 higher = cx; 583 higher = cx;
584 } 584 }
585 585
586 return_VALUE(0); 586 return 0;
587} 587}
588 588
589static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) 589static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
590{ 590{
591 ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_fadt");
592 591
593 if (!pr) 592 if (!pr)
594 return_VALUE(-EINVAL); 593 return -EINVAL;
595 594
596 if (!pr->pblk) 595 if (!pr->pblk)
597 return_VALUE(-ENODEV); 596 return -ENODEV;
598 597
599 /* if info is obtained from pblk/fadt, type equals state */ 598 /* if info is obtained from pblk/fadt, type equals state */
600 pr->power.states[ACPI_STATE_C2].type = ACPI_STATE_C2; 599 pr->power.states[ACPI_STATE_C2].type = ACPI_STATE_C2;
@@ -606,7 +605,7 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
606 * an SMP system. 605 * an SMP system.
607 */ 606 */
608 if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up) 607 if ((num_online_cpus() > 1) && !acpi_fadt.plvl2_up)
609 return_VALUE(-ENODEV); 608 return -ENODEV;
610#endif 609#endif
611 610
612 /* determine C2 and C3 address from pblk */ 611 /* determine C2 and C3 address from pblk */
@@ -622,12 +621,11 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr)
622 pr->power.states[ACPI_STATE_C2].address, 621 pr->power.states[ACPI_STATE_C2].address,
623 pr->power.states[ACPI_STATE_C3].address)); 622 pr->power.states[ACPI_STATE_C3].address));
624 623
625 return_VALUE(0); 624 return 0;
626} 625}
627 626
628static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr) 627static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr)
629{ 628{
630 ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1");
631 629
632 /* Zero initialize all the C-states info. */ 630 /* Zero initialize all the C-states info. */
633 memset(pr->power.states, 0, sizeof(pr->power.states)); 631 memset(pr->power.states, 0, sizeof(pr->power.states));
@@ -640,7 +638,7 @@ static int acpi_processor_get_power_info_default_c1(struct acpi_processor *pr)
640 pr->power.states[ACPI_STATE_C0].valid = 1; 638 pr->power.states[ACPI_STATE_C0].valid = 1;
641 pr->power.states[ACPI_STATE_C1].valid = 1; 639 pr->power.states[ACPI_STATE_C1].valid = 1;
642 640
643 return_VALUE(0); 641 return 0;
644} 642}
645 643
646static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) 644static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
@@ -652,10 +650,9 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
652 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 650 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
653 union acpi_object *cst; 651 union acpi_object *cst;
654 652
655 ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_cst");
656 653
657 if (nocst) 654 if (nocst)
658 return_VALUE(-ENODEV); 655 return -ENODEV;
659 656
660 current_count = 1; 657 current_count = 1;
661 658
@@ -667,15 +664,14 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
667 status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer); 664 status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer);
668 if (ACPI_FAILURE(status)) { 665 if (ACPI_FAILURE(status)) {
669 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _CST, giving up\n")); 666 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _CST, giving up\n"));
670 return_VALUE(-ENODEV); 667 return -ENODEV;
671 } 668 }
672 669
673 cst = (union acpi_object *)buffer.pointer; 670 cst = (union acpi_object *)buffer.pointer;
674 671
675 /* There must be at least 2 elements */ 672 /* There must be at least 2 elements */
676 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) { 673 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) {
677 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 674 printk(KERN_ERR PREFIX "not enough elements in _CST\n");
678 "not enough elements in _CST\n"));
679 status = -EFAULT; 675 status = -EFAULT;
680 goto end; 676 goto end;
681 } 677 }
@@ -684,8 +680,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
684 680
685 /* Validate number of power states. */ 681 /* Validate number of power states. */
686 if (count < 1 || count != cst->package.count - 1) { 682 if (count < 1 || count != cst->package.count - 1) {
687 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 683 printk(KERN_ERR PREFIX "count given by _CST is not valid\n");
688 "count given by _CST is not valid\n"));
689 status = -EFAULT; 684 status = -EFAULT;
690 goto end; 685 goto end;
691 } 686 }
@@ -775,15 +770,14 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
775 end: 770 end:
776 acpi_os_free(buffer.pointer); 771 acpi_os_free(buffer.pointer);
777 772
778 return_VALUE(status); 773 return status;
779} 774}
780 775
781static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx) 776static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx)
782{ 777{
783 ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c2");
784 778
785 if (!cx->address) 779 if (!cx->address)
786 return_VOID; 780 return;
787 781
788 /* 782 /*
789 * C2 latency must be less than or equal to 100 783 * C2 latency must be less than or equal to 100
@@ -792,7 +786,7 @@ static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx)
792 else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { 786 else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) {
793 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 787 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
794 "latency too large [%d]\n", cx->latency)); 788 "latency too large [%d]\n", cx->latency));
795 return_VOID; 789 return;
796 } 790 }
797 791
798 /* 792 /*
@@ -802,7 +796,7 @@ static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx)
802 cx->valid = 1; 796 cx->valid = 1;
803 cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency); 797 cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency);
804 798
805 return_VOID; 799 return;
806} 800}
807 801
808static void acpi_processor_power_verify_c3(struct acpi_processor *pr, 802static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
@@ -810,10 +804,9 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
810{ 804{
811 static int bm_check_flag; 805 static int bm_check_flag;
812 806
813 ACPI_FUNCTION_TRACE("acpi_processor_get_power_verify_c3");
814 807
815 if (!cx->address) 808 if (!cx->address)
816 return_VOID; 809 return;
817 810
818 /* 811 /*
819 * C3 latency must be less than or equal to 1000 812 * C3 latency must be less than or equal to 1000
@@ -822,7 +815,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
822 else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { 815 else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) {
823 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 816 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
824 "latency too large [%d]\n", cx->latency)); 817 "latency too large [%d]\n", cx->latency));
825 return_VOID; 818 return;
826 } 819 }
827 820
828 /* 821 /*
@@ -835,7 +828,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
835 else if (errata.piix4.fdma) { 828 else if (errata.piix4.fdma) {
836 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 829 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
837 "C3 not supported on PIIX4 with Type-F DMA\n")); 830 "C3 not supported on PIIX4 with Type-F DMA\n"));
838 return_VOID; 831 return;
839 } 832 }
840 833
841 /* All the logic here assumes flags.bm_check is same across all CPUs */ 834 /* All the logic here assumes flags.bm_check is same across all CPUs */
@@ -852,7 +845,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
852 if (!pr->flags.bm_control) { 845 if (!pr->flags.bm_control) {
853 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 846 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
854 "C3 support requires bus mastering control\n")); 847 "C3 support requires bus mastering control\n"));
855 return_VOID; 848 return;
856 } 849 }
857 } else { 850 } else {
858 /* 851 /*
@@ -863,7 +856,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
863 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 856 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
864 "Cache invalidation should work properly" 857 "Cache invalidation should work properly"
865 " for C3 to be enabled on SMP systems\n")); 858 " for C3 to be enabled on SMP systems\n"));
866 return_VOID; 859 return;
867 } 860 }
868 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 861 acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD,
869 0, ACPI_MTX_DO_NOT_LOCK); 862 0, ACPI_MTX_DO_NOT_LOCK);
@@ -878,7 +871,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
878 cx->valid = 1; 871 cx->valid = 1;
879 cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency); 872 cx->latency_ticks = US_TO_PM_TIMER_TICKS(cx->latency);
880 873
881 return_VOID; 874 return;
882} 875}
883 876
884static int acpi_processor_power_verify(struct acpi_processor *pr) 877static int acpi_processor_power_verify(struct acpi_processor *pr)
@@ -937,7 +930,6 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
937 unsigned int i; 930 unsigned int i;
938 int result; 931 int result;
939 932
940 ACPI_FUNCTION_TRACE("acpi_processor_get_power_info");
941 933
942 /* NOTE: the idle thread may not be running while calling 934 /* NOTE: the idle thread may not be running while calling
943 * this function */ 935 * this function */
@@ -960,7 +952,7 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
960 */ 952 */
961 result = acpi_processor_set_power_policy(pr); 953 result = acpi_processor_set_power_policy(pr);
962 if (result) 954 if (result)
963 return_VALUE(result); 955 return result;
964 956
965 /* 957 /*
966 * if one state of type C2 or C3 is available, mark this 958 * if one state of type C2 or C3 is available, mark this
@@ -974,24 +966,23 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
974 } 966 }
975 } 967 }
976 968
977 return_VALUE(0); 969 return 0;
978} 970}
979 971
980int acpi_processor_cst_has_changed(struct acpi_processor *pr) 972int acpi_processor_cst_has_changed(struct acpi_processor *pr)
981{ 973{
982 int result = 0; 974 int result = 0;
983 975
984 ACPI_FUNCTION_TRACE("acpi_processor_cst_has_changed");
985 976
986 if (!pr) 977 if (!pr)
987 return_VALUE(-EINVAL); 978 return -EINVAL;
988 979
989 if (nocst) { 980 if (nocst) {
990 return_VALUE(-ENODEV); 981 return -ENODEV;
991 } 982 }
992 983
993 if (!pr->flags.power_setup_done) 984 if (!pr->flags.power_setup_done)
994 return_VALUE(-ENODEV); 985 return -ENODEV;
995 986
996 /* Fall back to the default idle loop */ 987 /* Fall back to the default idle loop */
997 pm_idle = pm_idle_save; 988 pm_idle = pm_idle_save;
@@ -1002,7 +993,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
1002 if ((pr->flags.power == 1) && (pr->flags.power_setup_done)) 993 if ((pr->flags.power == 1) && (pr->flags.power_setup_done))
1003 pm_idle = acpi_processor_idle; 994 pm_idle = acpi_processor_idle;
1004 995
1005 return_VALUE(result); 996 return result;
1006} 997}
1007 998
1008/* proc interface */ 999/* proc interface */
@@ -1012,7 +1003,6 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
1012 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 1003 struct acpi_processor *pr = (struct acpi_processor *)seq->private;
1013 unsigned int i; 1004 unsigned int i;
1014 1005
1015 ACPI_FUNCTION_TRACE("acpi_processor_power_seq_show");
1016 1006
1017 if (!pr) 1007 if (!pr)
1018 goto end; 1008 goto end;
@@ -1064,13 +1054,14 @@ static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
1064 else 1054 else
1065 seq_puts(seq, "demotion[--] "); 1055 seq_puts(seq, "demotion[--] ");
1066 1056
1067 seq_printf(seq, "latency[%03d] usage[%08d]\n", 1057 seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n",
1068 pr->power.states[i].latency, 1058 pr->power.states[i].latency,
1069 pr->power.states[i].usage); 1059 pr->power.states[i].usage,
1060 pr->power.states[i].time);
1070 } 1061 }
1071 1062
1072 end: 1063 end:
1073 return_VALUE(0); 1064 return 0;
1074} 1065}
1075 1066
1076static int acpi_processor_power_open_fs(struct inode *inode, struct file *file) 1067static int acpi_processor_power_open_fs(struct inode *inode, struct file *file)
@@ -1094,7 +1085,6 @@ int acpi_processor_power_init(struct acpi_processor *pr,
1094 struct proc_dir_entry *entry = NULL; 1085 struct proc_dir_entry *entry = NULL;
1095 unsigned int i; 1086 unsigned int i;
1096 1087
1097 ACPI_FUNCTION_TRACE("acpi_processor_power_init");
1098 1088
1099 if (!first_run) { 1089 if (!first_run) {
1100 dmi_check_system(processor_power_dmi_table); 1090 dmi_check_system(processor_power_dmi_table);
@@ -1106,14 +1096,14 @@ int acpi_processor_power_init(struct acpi_processor *pr,
1106 } 1096 }
1107 1097
1108 if (!pr) 1098 if (!pr)
1109 return_VALUE(-EINVAL); 1099 return -EINVAL;
1110 1100
1111 if (acpi_fadt.cst_cnt && !nocst) { 1101 if (acpi_fadt.cst_cnt && !nocst) {
1112 status = 1102 status =
1113 acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8); 1103 acpi_os_write_port(acpi_fadt.smi_cmd, acpi_fadt.cst_cnt, 8);
1114 if (ACPI_FAILURE(status)) { 1104 if (ACPI_FAILURE(status)) {
1115 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1105 ACPI_EXCEPTION((AE_INFO, status,
1116 "Notifying BIOS of _CST ability failed\n")); 1106 "Notifying BIOS of _CST ability failed"));
1117 } 1107 }
1118 } 1108 }
1119 1109
@@ -1142,9 +1132,7 @@ int acpi_processor_power_init(struct acpi_processor *pr,
1142 entry = create_proc_entry(ACPI_PROCESSOR_FILE_POWER, 1132 entry = create_proc_entry(ACPI_PROCESSOR_FILE_POWER,
1143 S_IRUGO, acpi_device_dir(device)); 1133 S_IRUGO, acpi_device_dir(device));
1144 if (!entry) 1134 if (!entry)
1145 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1135 return -EIO;
1146 "Unable to create '%s' fs entry\n",
1147 ACPI_PROCESSOR_FILE_POWER));
1148 else { 1136 else {
1149 entry->proc_fops = &acpi_processor_power_fops; 1137 entry->proc_fops = &acpi_processor_power_fops;
1150 entry->data = acpi_driver_data(device); 1138 entry->data = acpi_driver_data(device);
@@ -1153,13 +1141,12 @@ int acpi_processor_power_init(struct acpi_processor *pr,
1153 1141
1154 pr->flags.power_setup_done = 1; 1142 pr->flags.power_setup_done = 1;
1155 1143
1156 return_VALUE(0); 1144 return 0;
1157} 1145}
1158 1146
1159int acpi_processor_power_exit(struct acpi_processor *pr, 1147int acpi_processor_power_exit(struct acpi_processor *pr,
1160 struct acpi_device *device) 1148 struct acpi_device *device)
1161{ 1149{
1162 ACPI_FUNCTION_TRACE("acpi_processor_power_exit");
1163 1150
1164 pr->flags.power_setup_done = 0; 1151 pr->flags.power_setup_done = 0;
1165 1152
@@ -1179,5 +1166,5 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
1179 cpu_idle_wait(); 1166 cpu_idle_wait();
1180 } 1167 }
1181 1168
1182 return_VALUE(0); 1169 return 0;
1183} 1170}
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 41aaaba74b1..14a00e5a8f6 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -108,10 +108,9 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
108 acpi_status status = 0; 108 acpi_status status = 0;
109 unsigned long ppc = 0; 109 unsigned long ppc = 0;
110 110
111 ACPI_FUNCTION_TRACE("acpi_processor_get_platform_limit");
112 111
113 if (!pr) 112 if (!pr)
114 return_VALUE(-EINVAL); 113 return -EINVAL;
115 114
116 /* 115 /*
117 * _PPC indicates the maximum state currently supported by the platform 116 * _PPC indicates the maximum state currently supported by the platform
@@ -123,13 +122,13 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
123 acpi_processor_ppc_status |= PPC_IN_USE; 122 acpi_processor_ppc_status |= PPC_IN_USE;
124 123
125 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 124 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
126 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PPC\n")); 125 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PPC"));
127 return_VALUE(-ENODEV); 126 return -ENODEV;
128 } 127 }
129 128
130 pr->performance_platform_limit = (int)ppc; 129 pr->performance_platform_limit = (int)ppc;
131 130
132 return_VALUE(0); 131 return 0;
133} 132}
134 133
135int acpi_processor_ppc_has_changed(struct acpi_processor *pr) 134int acpi_processor_ppc_has_changed(struct acpi_processor *pr)
@@ -168,18 +167,17 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
168 union acpi_object *pct = NULL; 167 union acpi_object *pct = NULL;
169 union acpi_object obj = { 0 }; 168 union acpi_object obj = { 0 };
170 169
171 ACPI_FUNCTION_TRACE("acpi_processor_get_performance_control");
172 170
173 status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer); 171 status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
174 if (ACPI_FAILURE(status)) { 172 if (ACPI_FAILURE(status)) {
175 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PCT\n")); 173 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PCT"));
176 return_VALUE(-ENODEV); 174 return -ENODEV;
177 } 175 }
178 176
179 pct = (union acpi_object *)buffer.pointer; 177 pct = (union acpi_object *)buffer.pointer;
180 if (!pct || (pct->type != ACPI_TYPE_PACKAGE) 178 if (!pct || (pct->type != ACPI_TYPE_PACKAGE)
181 || (pct->package.count != 2)) { 179 || (pct->package.count != 2)) {
182 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PCT data\n")); 180 printk(KERN_ERR PREFIX "Invalid _PCT data\n");
183 result = -EFAULT; 181 result = -EFAULT;
184 goto end; 182 goto end;
185 } 183 }
@@ -193,8 +191,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
193 if ((obj.type != ACPI_TYPE_BUFFER) 191 if ((obj.type != ACPI_TYPE_BUFFER)
194 || (obj.buffer.length < sizeof(struct acpi_pct_register)) 192 || (obj.buffer.length < sizeof(struct acpi_pct_register))
195 || (obj.buffer.pointer == NULL)) { 193 || (obj.buffer.pointer == NULL)) {
196 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 194 printk(KERN_ERR PREFIX "Invalid _PCT data (control_register)\n");
197 "Invalid _PCT data (control_register)\n"));
198 result = -EFAULT; 195 result = -EFAULT;
199 goto end; 196 goto end;
200 } 197 }
@@ -210,8 +207,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
210 if ((obj.type != ACPI_TYPE_BUFFER) 207 if ((obj.type != ACPI_TYPE_BUFFER)
211 || (obj.buffer.length < sizeof(struct acpi_pct_register)) 208 || (obj.buffer.length < sizeof(struct acpi_pct_register))
212 || (obj.buffer.pointer == NULL)) { 209 || (obj.buffer.pointer == NULL)) {
213 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 210 printk(KERN_ERR PREFIX "Invalid _PCT data (status_register)\n");
214 "Invalid _PCT data (status_register)\n"));
215 result = -EFAULT; 211 result = -EFAULT;
216 goto end; 212 goto end;
217 } 213 }
@@ -222,7 +218,7 @@ static int acpi_processor_get_performance_control(struct acpi_processor *pr)
222 end: 218 end:
223 acpi_os_free(buffer.pointer); 219 acpi_os_free(buffer.pointer);
224 220
225 return_VALUE(result); 221 return result;
226} 222}
227 223
228static int acpi_processor_get_performance_states(struct acpi_processor *pr) 224static int acpi_processor_get_performance_states(struct acpi_processor *pr)
@@ -235,17 +231,16 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
235 union acpi_object *pss = NULL; 231 union acpi_object *pss = NULL;
236 int i; 232 int i;
237 233
238 ACPI_FUNCTION_TRACE("acpi_processor_get_performance_states");
239 234
240 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); 235 status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer);
241 if (ACPI_FAILURE(status)) { 236 if (ACPI_FAILURE(status)) {
242 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PSS\n")); 237 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PSS"));
243 return_VALUE(-ENODEV); 238 return -ENODEV;
244 } 239 }
245 240
246 pss = (union acpi_object *)buffer.pointer; 241 pss = (union acpi_object *)buffer.pointer;
247 if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { 242 if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
248 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSS data\n")); 243 printk(KERN_ERR PREFIX "Invalid _PSS data\n");
249 result = -EFAULT; 244 result = -EFAULT;
250 goto end; 245 goto end;
251 } 246 }
@@ -274,8 +269,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
274 status = acpi_extract_package(&(pss->package.elements[i]), 269 status = acpi_extract_package(&(pss->package.elements[i]),
275 &format, &state); 270 &format, &state);
276 if (ACPI_FAILURE(status)) { 271 if (ACPI_FAILURE(status)) {
277 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 272 ACPI_EXCEPTION((AE_INFO, status, "Invalid _PSS data"));
278 "Invalid _PSS data\n"));
279 result = -EFAULT; 273 result = -EFAULT;
280 kfree(pr->performance->states); 274 kfree(pr->performance->states);
281 goto end; 275 goto end;
@@ -291,8 +285,8 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
291 (u32) px->control, (u32) px->status)); 285 (u32) px->control, (u32) px->status));
292 286
293 if (!px->core_frequency) { 287 if (!px->core_frequency) {
294 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 288 printk(KERN_ERR PREFIX
295 "Invalid _PSS data: freq is zero\n")); 289 "Invalid _PSS data: freq is zero\n");
296 result = -EFAULT; 290 result = -EFAULT;
297 kfree(pr->performance->states); 291 kfree(pr->performance->states);
298 goto end; 292 goto end;
@@ -302,7 +296,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
302 end: 296 end:
303 acpi_os_free(buffer.pointer); 297 acpi_os_free(buffer.pointer);
304 298
305 return_VALUE(result); 299 return result;
306} 300}
307 301
308static int acpi_processor_get_performance_info(struct acpi_processor *pr) 302static int acpi_processor_get_performance_info(struct acpi_processor *pr)
@@ -311,31 +305,30 @@ static int acpi_processor_get_performance_info(struct acpi_processor *pr)
311 acpi_status status = AE_OK; 305 acpi_status status = AE_OK;
312 acpi_handle handle = NULL; 306 acpi_handle handle = NULL;
313 307
314 ACPI_FUNCTION_TRACE("acpi_processor_get_performance_info");
315 308
316 if (!pr || !pr->performance || !pr->handle) 309 if (!pr || !pr->performance || !pr->handle)
317 return_VALUE(-EINVAL); 310 return -EINVAL;
318 311
319 status = acpi_get_handle(pr->handle, "_PCT", &handle); 312 status = acpi_get_handle(pr->handle, "_PCT", &handle);
320 if (ACPI_FAILURE(status)) { 313 if (ACPI_FAILURE(status)) {
321 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 314 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
322 "ACPI-based processor performance control unavailable\n")); 315 "ACPI-based processor performance control unavailable\n"));
323 return_VALUE(-ENODEV); 316 return -ENODEV;
324 } 317 }
325 318
326 result = acpi_processor_get_performance_control(pr); 319 result = acpi_processor_get_performance_control(pr);
327 if (result) 320 if (result)
328 return_VALUE(result); 321 return result;
329 322
330 result = acpi_processor_get_performance_states(pr); 323 result = acpi_processor_get_performance_states(pr);
331 if (result) 324 if (result)
332 return_VALUE(result); 325 return result;
333 326
334 result = acpi_processor_get_platform_limit(pr); 327 result = acpi_processor_get_platform_limit(pr);
335 if (result) 328 if (result)
336 return_VALUE(result); 329 return result;
337 330
338 return_VALUE(0); 331 return 0;
339} 332}
340 333
341int acpi_processor_notify_smm(struct module *calling_module) 334int acpi_processor_notify_smm(struct module *calling_module)
@@ -343,13 +336,12 @@ int acpi_processor_notify_smm(struct module *calling_module)
343 acpi_status status; 336 acpi_status status;
344 static int is_done = 0; 337 static int is_done = 0;
345 338
346 ACPI_FUNCTION_TRACE("acpi_processor_notify_smm");
347 339
348 if (!(acpi_processor_ppc_status & PPC_REGISTERED)) 340 if (!(acpi_processor_ppc_status & PPC_REGISTERED))
349 return_VALUE(-EBUSY); 341 return -EBUSY;
350 342
351 if (!try_module_get(calling_module)) 343 if (!try_module_get(calling_module))
352 return_VALUE(-EINVAL); 344 return -EINVAL;
353 345
354 /* is_done is set to negative if an error occured, 346 /* is_done is set to negative if an error occured,
355 * and to postitive if _no_ error occured, but SMM 347 * and to postitive if _no_ error occured, but SMM
@@ -358,10 +350,10 @@ int acpi_processor_notify_smm(struct module *calling_module)
358 */ 350 */
359 if (is_done > 0) { 351 if (is_done > 0) {
360 module_put(calling_module); 352 module_put(calling_module);
361 return_VALUE(0); 353 return 0;
362 } else if (is_done < 0) { 354 } else if (is_done < 0) {
363 module_put(calling_module); 355 module_put(calling_module);
364 return_VALUE(is_done); 356 return is_done;
365 } 357 }
366 358
367 is_done = -EIO; 359 is_done = -EIO;
@@ -370,7 +362,7 @@ int acpi_processor_notify_smm(struct module *calling_module)
370 if ((!acpi_fadt.smi_cmd) || (!acpi_fadt.pstate_cnt)) { 362 if ((!acpi_fadt.smi_cmd) || (!acpi_fadt.pstate_cnt)) {
371 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_cnt\n")); 363 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No SMI port or pstate_cnt\n"));
372 module_put(calling_module); 364 module_put(calling_module);
373 return_VALUE(0); 365 return 0;
374 } 366 }
375 367
376 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 368 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -387,12 +379,12 @@ int acpi_processor_notify_smm(struct module *calling_module)
387 status = acpi_os_write_port(acpi_fadt.smi_cmd, 379 status = acpi_os_write_port(acpi_fadt.smi_cmd,
388 (u32) acpi_fadt.pstate_cnt, 8); 380 (u32) acpi_fadt.pstate_cnt, 8);
389 if (ACPI_FAILURE(status)) { 381 if (ACPI_FAILURE(status)) {
390 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 382 ACPI_EXCEPTION((AE_INFO, status,
391 "Failed to write pstate_cnt [0x%x] to " 383 "Failed to write pstate_cnt [0x%x] to "
392 "smi_cmd [0x%x]\n", acpi_fadt.pstate_cnt, 384 "smi_cmd [0x%x]", acpi_fadt.pstate_cnt,
393 acpi_fadt.smi_cmd)); 385 acpi_fadt.smi_cmd));
394 module_put(calling_module); 386 module_put(calling_module);
395 return_VALUE(status); 387 return status;
396 } 388 }
397 389
398 /* Success. If there's no _PPC, we need to fear nothing, so 390 /* Success. If there's no _PPC, we need to fear nothing, so
@@ -402,7 +394,7 @@ int acpi_processor_notify_smm(struct module *calling_module)
402 if (!(acpi_processor_ppc_status & PPC_IN_USE)) 394 if (!(acpi_processor_ppc_status & PPC_IN_USE))
403 module_put(calling_module); 395 module_put(calling_module);
404 396
405 return_VALUE(0); 397 return 0;
406} 398}
407 399
408EXPORT_SYMBOL(acpi_processor_notify_smm); 400EXPORT_SYMBOL(acpi_processor_notify_smm);
@@ -423,7 +415,6 @@ static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset)
423 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 415 struct acpi_processor *pr = (struct acpi_processor *)seq->private;
424 int i; 416 int i;
425 417
426 ACPI_FUNCTION_TRACE("acpi_processor_perf_seq_show");
427 418
428 if (!pr) 419 if (!pr)
429 goto end; 420 goto end;
@@ -447,7 +438,7 @@ static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset)
447 (u32) pr->performance->states[i].transition_latency); 438 (u32) pr->performance->states[i].transition_latency);
448 439
449 end: 440 end:
450 return_VALUE(0); 441 return 0;
451} 442}
452 443
453static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file) 444static int acpi_processor_perf_open_fs(struct inode *inode, struct file *file)
@@ -469,23 +460,22 @@ acpi_processor_write_performance(struct file *file,
469 unsigned int new_state = 0; 460 unsigned int new_state = 0;
470 struct cpufreq_policy policy; 461 struct cpufreq_policy policy;
471 462
472 ACPI_FUNCTION_TRACE("acpi_processor_write_performance");
473 463
474 if (!pr || (count > sizeof(state_string) - 1)) 464 if (!pr || (count > sizeof(state_string) - 1))
475 return_VALUE(-EINVAL); 465 return -EINVAL;
476 466
477 perf = pr->performance; 467 perf = pr->performance;
478 if (!perf) 468 if (!perf)
479 return_VALUE(-EINVAL); 469 return -EINVAL;
480 470
481 if (copy_from_user(state_string, buffer, count)) 471 if (copy_from_user(state_string, buffer, count))
482 return_VALUE(-EFAULT); 472 return -EFAULT;
483 473
484 state_string[count] = '\0'; 474 state_string[count] = '\0';
485 new_state = simple_strtoul(state_string, NULL, 0); 475 new_state = simple_strtoul(state_string, NULL, 0);
486 476
487 if (new_state >= perf->state_count) 477 if (new_state >= perf->state_count)
488 return_VALUE(-EINVAL); 478 return -EINVAL;
489 479
490 cpufreq_get_policy(&policy, pr->id); 480 cpufreq_get_policy(&policy, pr->id);
491 481
@@ -495,9 +485,9 @@ acpi_processor_write_performance(struct file *file,
495 485
496 result = cpufreq_set_policy(&policy); 486 result = cpufreq_set_policy(&policy);
497 if (result) 487 if (result)
498 return_VALUE(result); 488 return result;
499 489
500 return_VALUE(count); 490 return count;
501} 491}
502 492
503static void acpi_cpufreq_add_file(struct acpi_processor *pr) 493static void acpi_cpufreq_add_file(struct acpi_processor *pr)
@@ -505,42 +495,36 @@ static void acpi_cpufreq_add_file(struct acpi_processor *pr)
505 struct proc_dir_entry *entry = NULL; 495 struct proc_dir_entry *entry = NULL;
506 struct acpi_device *device = NULL; 496 struct acpi_device *device = NULL;
507 497
508 ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile");
509 498
510 if (acpi_bus_get_device(pr->handle, &device)) 499 if (acpi_bus_get_device(pr->handle, &device))
511 return_VOID; 500 return;
512 501
513 /* add file 'performance' [R/W] */ 502 /* add file 'performance' [R/W] */
514 entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, 503 entry = create_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
515 S_IFREG | S_IRUGO | S_IWUSR, 504 S_IFREG | S_IRUGO | S_IWUSR,
516 acpi_device_dir(device)); 505 acpi_device_dir(device));
517 if (!entry) 506 if (entry){
518 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
519 "Unable to create '%s' fs entry\n",
520 ACPI_PROCESSOR_FILE_PERFORMANCE));
521 else {
522 acpi_processor_perf_fops.write = acpi_processor_write_performance; 507 acpi_processor_perf_fops.write = acpi_processor_write_performance;
523 entry->proc_fops = &acpi_processor_perf_fops; 508 entry->proc_fops = &acpi_processor_perf_fops;
524 entry->data = acpi_driver_data(device); 509 entry->data = acpi_driver_data(device);
525 entry->owner = THIS_MODULE; 510 entry->owner = THIS_MODULE;
526 } 511 }
527 return_VOID; 512 return;
528} 513}
529 514
530static void acpi_cpufreq_remove_file(struct acpi_processor *pr) 515static void acpi_cpufreq_remove_file(struct acpi_processor *pr)
531{ 516{
532 struct acpi_device *device = NULL; 517 struct acpi_device *device = NULL;
533 518
534 ACPI_FUNCTION_TRACE("acpi_cpufreq_addfile");
535 519
536 if (acpi_bus_get_device(pr->handle, &device)) 520 if (acpi_bus_get_device(pr->handle, &device))
537 return_VOID; 521 return;
538 522
539 /* remove file 'performance' */ 523 /* remove file 'performance' */
540 remove_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE, 524 remove_proc_entry(ACPI_PROCESSOR_FILE_PERFORMANCE,
541 acpi_device_dir(device)); 525 acpi_device_dir(device));
542 526
543 return_VOID; 527 return;
544} 528}
545 529
546#else 530#else
@@ -698,12 +682,12 @@ int acpi_processor_preregister_performance(
698 /* Validate the Domain info */ 682 /* Validate the Domain info */
699 count_target = pdomain->num_processors; 683 count_target = pdomain->num_processors;
700 count = 1; 684 count = 1;
701 if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL || 685 if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ALL)
702 pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL) {
703 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL; 686 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ALL;
704 } else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY) { 687 else if (pdomain->coord_type == DOMAIN_COORD_TYPE_HW_ALL)
688 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_HW;
689 else if (pdomain->coord_type == DOMAIN_COORD_TYPE_SW_ANY)
705 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ANY; 690 pr->performance->shared_type = CPUFREQ_SHARED_TYPE_ANY;
706 }
707 691
708 for_each_possible_cpu(j) { 692 for_each_possible_cpu(j) {
709 if (i == j) 693 if (i == j)
@@ -784,22 +768,21 @@ acpi_processor_register_performance(struct acpi_processor_performance
784{ 768{
785 struct acpi_processor *pr; 769 struct acpi_processor *pr;
786 770
787 ACPI_FUNCTION_TRACE("acpi_processor_register_performance");
788 771
789 if (!(acpi_processor_ppc_status & PPC_REGISTERED)) 772 if (!(acpi_processor_ppc_status & PPC_REGISTERED))
790 return_VALUE(-EINVAL); 773 return -EINVAL;
791 774
792 mutex_lock(&performance_mutex); 775 mutex_lock(&performance_mutex);
793 776
794 pr = processors[cpu]; 777 pr = processors[cpu];
795 if (!pr) { 778 if (!pr) {
796 mutex_unlock(&performance_mutex); 779 mutex_unlock(&performance_mutex);
797 return_VALUE(-ENODEV); 780 return -ENODEV;
798 } 781 }
799 782
800 if (pr->performance) { 783 if (pr->performance) {
801 mutex_unlock(&performance_mutex); 784 mutex_unlock(&performance_mutex);
802 return_VALUE(-EBUSY); 785 return -EBUSY;
803 } 786 }
804 787
805 WARN_ON(!performance); 788 WARN_ON(!performance);
@@ -809,13 +792,13 @@ acpi_processor_register_performance(struct acpi_processor_performance
809 if (acpi_processor_get_performance_info(pr)) { 792 if (acpi_processor_get_performance_info(pr)) {
810 pr->performance = NULL; 793 pr->performance = NULL;
811 mutex_unlock(&performance_mutex); 794 mutex_unlock(&performance_mutex);
812 return_VALUE(-EIO); 795 return -EIO;
813 } 796 }
814 797
815 acpi_cpufreq_add_file(pr); 798 acpi_cpufreq_add_file(pr);
816 799
817 mutex_unlock(&performance_mutex); 800 mutex_unlock(&performance_mutex);
818 return_VALUE(0); 801 return 0;
819} 802}
820 803
821EXPORT_SYMBOL(acpi_processor_register_performance); 804EXPORT_SYMBOL(acpi_processor_register_performance);
@@ -826,14 +809,13 @@ acpi_processor_unregister_performance(struct acpi_processor_performance
826{ 809{
827 struct acpi_processor *pr; 810 struct acpi_processor *pr;
828 811
829 ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance");
830 812
831 mutex_lock(&performance_mutex); 813 mutex_lock(&performance_mutex);
832 814
833 pr = processors[cpu]; 815 pr = processors[cpu];
834 if (!pr) { 816 if (!pr) {
835 mutex_unlock(&performance_mutex); 817 mutex_unlock(&performance_mutex);
836 return_VOID; 818 return;
837 } 819 }
838 820
839 if (pr->performance) 821 if (pr->performance)
@@ -844,7 +826,7 @@ acpi_processor_unregister_performance(struct acpi_processor_performance
844 826
845 mutex_unlock(&performance_mutex); 827 mutex_unlock(&performance_mutex);
846 828
847 return_VOID; 829 return;
848} 830}
849 831
850EXPORT_SYMBOL(acpi_processor_unregister_performance); 832EXPORT_SYMBOL(acpi_processor_unregister_performance);
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index f99ad05cd6a..ef5e0f6efdb 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -54,13 +54,12 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr)
54 u16 px = 0; 54 u16 px = 0;
55 u16 tx = 0; 55 u16 tx = 0;
56 56
57 ACPI_FUNCTION_TRACE("acpi_processor_apply_limit");
58 57
59 if (!pr) 58 if (!pr)
60 return_VALUE(-EINVAL); 59 return -EINVAL;
61 60
62 if (!pr->flags.limit) 61 if (!pr->flags.limit)
63 return_VALUE(-ENODEV); 62 return -ENODEV;
64 63
65 if (pr->flags.throttling) { 64 if (pr->flags.throttling) {
66 if (pr->limit.user.tx > tx) 65 if (pr->limit.user.tx > tx)
@@ -82,9 +81,9 @@ static int acpi_processor_apply_limit(struct acpi_processor *pr)
82 81
83 end: 82 end:
84 if (result) 83 if (result)
85 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unable to set limit\n")); 84 printk(KERN_ERR PREFIX "Unable to set limit\n");
86 85
87 return_VALUE(result); 86 return result;
88} 87}
89 88
90#ifdef CONFIG_CPU_FREQ 89#ifdef CONFIG_CPU_FREQ
@@ -200,19 +199,18 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
200 struct acpi_device *device = NULL; 199 struct acpi_device *device = NULL;
201 int tx = 0, max_tx_px = 0; 200 int tx = 0, max_tx_px = 0;
202 201
203 ACPI_FUNCTION_TRACE("acpi_processor_set_thermal_limit");
204 202
205 if ((type < ACPI_PROCESSOR_LIMIT_NONE) 203 if ((type < ACPI_PROCESSOR_LIMIT_NONE)
206 || (type > ACPI_PROCESSOR_LIMIT_DECREMENT)) 204 || (type > ACPI_PROCESSOR_LIMIT_DECREMENT))
207 return_VALUE(-EINVAL); 205 return -EINVAL;
208 206
209 result = acpi_bus_get_device(handle, &device); 207 result = acpi_bus_get_device(handle, &device);
210 if (result) 208 if (result)
211 return_VALUE(result); 209 return result;
212 210
213 pr = (struct acpi_processor *)acpi_driver_data(device); 211 pr = (struct acpi_processor *)acpi_driver_data(device);
214 if (!pr) 212 if (!pr)
215 return_VALUE(-ENODEV); 213 return -ENODEV;
216 214
217 /* Thermal limits are always relative to the current Px/Tx state. */ 215 /* Thermal limits are always relative to the current Px/Tx state. */
218 if (pr->flags.throttling) 216 if (pr->flags.throttling)
@@ -289,30 +287,28 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
289 287
290 result = acpi_processor_apply_limit(pr); 288 result = acpi_processor_apply_limit(pr);
291 if (result) 289 if (result)
292 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 290 printk(KERN_ERR PREFIX "Unable to set thermal limit\n");
293 "Unable to set thermal limit\n"));
294 291
295 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n", 292 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
296 pr->limit.thermal.px, pr->limit.thermal.tx)); 293 pr->limit.thermal.px, pr->limit.thermal.tx));
297 } else 294 } else
298 result = 0; 295 result = 0;
299 if (max_tx_px) 296 if (max_tx_px)
300 return_VALUE(1); 297 return 1;
301 else 298 else
302 return_VALUE(result); 299 return result;
303} 300}
304 301
305int acpi_processor_get_limit_info(struct acpi_processor *pr) 302int acpi_processor_get_limit_info(struct acpi_processor *pr)
306{ 303{
307 ACPI_FUNCTION_TRACE("acpi_processor_get_limit_info");
308 304
309 if (!pr) 305 if (!pr)
310 return_VALUE(-EINVAL); 306 return -EINVAL;
311 307
312 if (pr->flags.throttling) 308 if (pr->flags.throttling)
313 pr->flags.limit = 1; 309 pr->flags.limit = 1;
314 310
315 return_VALUE(0); 311 return 0;
316} 312}
317 313
318/* /proc interface */ 314/* /proc interface */
@@ -321,7 +317,6 @@ static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset)
321{ 317{
322 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 318 struct acpi_processor *pr = (struct acpi_processor *)seq->private;
323 319
324 ACPI_FUNCTION_TRACE("acpi_processor_limit_seq_show");
325 320
326 if (!pr) 321 if (!pr)
327 goto end; 322 goto end;
@@ -339,7 +334,7 @@ static int acpi_processor_limit_seq_show(struct seq_file *seq, void *offset)
339 pr->limit.thermal.px, pr->limit.thermal.tx); 334 pr->limit.thermal.px, pr->limit.thermal.tx);
340 335
341 end: 336 end:
342 return_VALUE(0); 337 return 0;
343} 338}
344 339
345static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file) 340static int acpi_processor_limit_open_fs(struct inode *inode, struct file *file)
@@ -359,36 +354,33 @@ static ssize_t acpi_processor_write_limit(struct file * file,
359 int px = 0; 354 int px = 0;
360 int tx = 0; 355 int tx = 0;
361 356
362 ACPI_FUNCTION_TRACE("acpi_processor_write_limit");
363 357
364 if (!pr || (count > sizeof(limit_string) - 1)) { 358 if (!pr || (count > sizeof(limit_string) - 1)) {
365 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n")); 359 return -EINVAL;
366 return_VALUE(-EINVAL);
367 } 360 }
368 361
369 if (copy_from_user(limit_string, buffer, count)) { 362 if (copy_from_user(limit_string, buffer, count)) {
370 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n")); 363 return -EFAULT;
371 return_VALUE(-EFAULT);
372 } 364 }
373 365
374 limit_string[count] = '\0'; 366 limit_string[count] = '\0';
375 367
376 if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) { 368 if (sscanf(limit_string, "%d:%d", &px, &tx) != 2) {
377 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n")); 369 printk(KERN_ERR PREFIX "Invalid data format\n");
378 return_VALUE(-EINVAL); 370 return -EINVAL;
379 } 371 }
380 372
381 if (pr->flags.throttling) { 373 if (pr->flags.throttling) {
382 if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) { 374 if ((tx < 0) || (tx > (pr->throttling.state_count - 1))) {
383 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid tx\n")); 375 printk(KERN_ERR PREFIX "Invalid tx\n");
384 return_VALUE(-EINVAL); 376 return -EINVAL;
385 } 377 }
386 pr->limit.user.tx = tx; 378 pr->limit.user.tx = tx;
387 } 379 }
388 380
389 result = acpi_processor_apply_limit(pr); 381 result = acpi_processor_apply_limit(pr);
390 382
391 return_VALUE(count); 383 return count;
392} 384}
393 385
394struct file_operations acpi_processor_limit_fops = { 386struct file_operations acpi_processor_limit_fops = {
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c
index b966549ec00..d044ec519db 100644
--- a/drivers/acpi/processor_throttling.c
+++ b/drivers/acpi/processor_throttling.c
@@ -55,13 +55,12 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr)
55 u32 duty_mask = 0; 55 u32 duty_mask = 0;
56 u32 duty_value = 0; 56 u32 duty_value = 0;
57 57
58 ACPI_FUNCTION_TRACE("acpi_processor_get_throttling");
59 58
60 if (!pr) 59 if (!pr)
61 return_VALUE(-EINVAL); 60 return -EINVAL;
62 61
63 if (!pr->flags.throttling) 62 if (!pr->flags.throttling)
64 return_VALUE(-ENODEV); 63 return -ENODEV;
65 64
66 pr->throttling.state = 0; 65 pr->throttling.state = 0;
67 66
@@ -93,7 +92,7 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr)
93 "Throttling state is T%d (%d%% throttling applied)\n", 92 "Throttling state is T%d (%d%% throttling applied)\n",
94 state, pr->throttling.states[state].performance)); 93 state, pr->throttling.states[state].performance));
95 94
96 return_VALUE(0); 95 return 0;
97} 96}
98 97
99int acpi_processor_set_throttling(struct acpi_processor *pr, int state) 98int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
@@ -102,19 +101,18 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
102 u32 duty_mask = 0; 101 u32 duty_mask = 0;
103 u32 duty_value = 0; 102 u32 duty_value = 0;
104 103
105 ACPI_FUNCTION_TRACE("acpi_processor_set_throttling");
106 104
107 if (!pr) 105 if (!pr)
108 return_VALUE(-EINVAL); 106 return -EINVAL;
109 107
110 if ((state < 0) || (state > (pr->throttling.state_count - 1))) 108 if ((state < 0) || (state > (pr->throttling.state_count - 1)))
111 return_VALUE(-EINVAL); 109 return -EINVAL;
112 110
113 if (!pr->flags.throttling) 111 if (!pr->flags.throttling)
114 return_VALUE(-ENODEV); 112 return -ENODEV;
115 113
116 if (state == pr->throttling.state) 114 if (state == pr->throttling.state)
117 return_VALUE(0); 115 return 0;
118 116
119 /* 117 /*
120 * Calculate the duty_value and duty_mask. 118 * Calculate the duty_value and duty_mask.
@@ -165,7 +163,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state)
165 (pr->throttling.states[state].performance ? pr-> 163 (pr->throttling.states[state].performance ? pr->
166 throttling.states[state].performance / 10 : 0))); 164 throttling.states[state].performance / 10 : 0)));
167 165
168 return_VALUE(0); 166 return 0;
169} 167}
170 168
171int acpi_processor_get_throttling_info(struct acpi_processor *pr) 169int acpi_processor_get_throttling_info(struct acpi_processor *pr)
@@ -174,7 +172,6 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
174 int step = 0; 172 int step = 0;
175 int i = 0; 173 int i = 0;
176 174
177 ACPI_FUNCTION_TRACE("acpi_processor_get_throttling_info");
178 175
179 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 176 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
180 "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", 177 "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n",
@@ -183,21 +180,21 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
183 pr->throttling.duty_width)); 180 pr->throttling.duty_width));
184 181
185 if (!pr) 182 if (!pr)
186 return_VALUE(-EINVAL); 183 return -EINVAL;
187 184
188 /* TBD: Support ACPI 2.0 objects */ 185 /* TBD: Support ACPI 2.0 objects */
189 186
190 if (!pr->throttling.address) { 187 if (!pr->throttling.address) {
191 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); 188 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n"));
192 return_VALUE(0); 189 return 0;
193 } else if (!pr->throttling.duty_width) { 190 } else if (!pr->throttling.duty_width) {
194 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); 191 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n"));
195 return_VALUE(0); 192 return 0;
196 } 193 }
197 /* TBD: Support duty_cycle values that span bit 4. */ 194 /* TBD: Support duty_cycle values that span bit 4. */
198 else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { 195 else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) {
199 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "duty_cycle spans bit 4\n")); 196 printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n");
200 return_VALUE(0); 197 return 0;
201 } 198 }
202 199
203 /* 200 /*
@@ -208,7 +205,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
208 if (errata.piix4.throttle) { 205 if (errata.piix4.throttle) {
209 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 206 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
210 "Throttling not supported on PIIX4 A- or B-step\n")); 207 "Throttling not supported on PIIX4 A- or B-step\n"));
211 return_VALUE(0); 208 return 0;
212 } 209 }
213 210
214 pr->throttling.state_count = 1 << acpi_fadt.duty_width; 211 pr->throttling.state_count = 1 << acpi_fadt.duty_width;
@@ -254,7 +251,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr)
254 if (result) 251 if (result)
255 pr->flags.throttling = 0; 252 pr->flags.throttling = 0;
256 253
257 return_VALUE(result); 254 return result;
258} 255}
259 256
260/* proc interface */ 257/* proc interface */
@@ -266,7 +263,6 @@ static int acpi_processor_throttling_seq_show(struct seq_file *seq,
266 int i = 0; 263 int i = 0;
267 int result = 0; 264 int result = 0;
268 265
269 ACPI_FUNCTION_TRACE("acpi_processor_throttling_seq_show");
270 266
271 if (!pr) 267 if (!pr)
272 goto end; 268 goto end;
@@ -296,7 +292,7 @@ static int acpi_processor_throttling_seq_show(struct seq_file *seq,
296 throttling.states[i].performance / 10 : 0)); 292 throttling.states[i].performance / 10 : 0));
297 293
298 end: 294 end:
299 return_VALUE(0); 295 return 0;
300} 296}
301 297
302static int acpi_processor_throttling_open_fs(struct inode *inode, 298static int acpi_processor_throttling_open_fs(struct inode *inode,
@@ -315,13 +311,12 @@ static ssize_t acpi_processor_write_throttling(struct file * file,
315 struct acpi_processor *pr = (struct acpi_processor *)m->private; 311 struct acpi_processor *pr = (struct acpi_processor *)m->private;
316 char state_string[12] = { '\0' }; 312 char state_string[12] = { '\0' };
317 313
318 ACPI_FUNCTION_TRACE("acpi_processor_write_throttling");
319 314
320 if (!pr || (count > sizeof(state_string) - 1)) 315 if (!pr || (count > sizeof(state_string) - 1))
321 return_VALUE(-EINVAL); 316 return -EINVAL;
322 317
323 if (copy_from_user(state_string, buffer, count)) 318 if (copy_from_user(state_string, buffer, count))
324 return_VALUE(-EFAULT); 319 return -EFAULT;
325 320
326 state_string[count] = '\0'; 321 state_string[count] = '\0';
327 322
@@ -329,9 +324,9 @@ static ssize_t acpi_processor_write_throttling(struct file * file,
329 simple_strtoul(state_string, 324 simple_strtoul(state_string,
330 NULL, 0)); 325 NULL, 0));
331 if (result) 326 if (result)
332 return_VALUE(result); 327 return result;
333 328
334 return_VALUE(count); 329 return count;
335} 330}
336 331
337struct file_operations acpi_processor_throttling_fops = { 332struct file_operations acpi_processor_throttling_fops = {
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index f8316a05ede..861ac378ce4 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -162,11 +162,10 @@ static void acpi_device_unregister(struct acpi_device *device, int type)
162 162
163void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context) 163void acpi_bus_data_handler(acpi_handle handle, u32 function, void *context)
164{ 164{
165 ACPI_FUNCTION_TRACE("acpi_bus_data_handler");
166 165
167 /* TBD */ 166 /* TBD */
168 167
169 return_VOID; 168 return;
170} 169}
171 170
172static int acpi_bus_get_power_flags(struct acpi_device *device) 171static int acpi_bus_get_power_flags(struct acpi_device *device)
@@ -175,7 +174,6 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
175 acpi_handle handle = NULL; 174 acpi_handle handle = NULL;
176 u32 i = 0; 175 u32 i = 0;
177 176
178 ACPI_FUNCTION_TRACE("acpi_bus_get_power_flags");
179 177
180 /* 178 /*
181 * Power Management Flags 179 * Power Management Flags
@@ -228,7 +226,7 @@ static int acpi_bus_get_power_flags(struct acpi_device *device)
228 226
229 device->power.state = ACPI_STATE_UNKNOWN; 227 device->power.state = ACPI_STATE_UNKNOWN;
230 228
231 return_VALUE(0); 229 return 0;
232} 230}
233 231
234int acpi_match_ids(struct acpi_device *device, char *ids) 232int acpi_match_ids(struct acpi_device *device, char *ids)
@@ -306,20 +304,18 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
306 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 304 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
307 union acpi_object *package = NULL; 305 union acpi_object *package = NULL;
308 306
309 ACPI_FUNCTION_TRACE("acpi_bus_get_wakeup_flags");
310 307
311 /* _PRW */ 308 /* _PRW */
312 status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer); 309 status = acpi_evaluate_object(device->handle, "_PRW", NULL, &buffer);
313 if (ACPI_FAILURE(status)) { 310 if (ACPI_FAILURE(status)) {
314 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _PRW\n")); 311 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _PRW"));
315 goto end; 312 goto end;
316 } 313 }
317 314
318 package = (union acpi_object *)buffer.pointer; 315 package = (union acpi_object *)buffer.pointer;
319 status = acpi_bus_extract_wakeup_device_power_package(device, package); 316 status = acpi_bus_extract_wakeup_device_power_package(device, package);
320 if (ACPI_FAILURE(status)) { 317 if (ACPI_FAILURE(status)) {
321 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 318 ACPI_EXCEPTION((AE_INFO, status, "Extracting _PRW package"));
322 "Error extracting _PRW package\n"));
323 goto end; 319 goto end;
324 } 320 }
325 321
@@ -333,7 +329,7 @@ static int acpi_bus_get_wakeup_device_flags(struct acpi_device *device)
333 end: 329 end:
334 if (ACPI_FAILURE(status)) 330 if (ACPI_FAILURE(status))
335 device->flags.wake_capable = 0; 331 device->flags.wake_capable = 0;
336 return_VALUE(0); 332 return 0;
337} 333}
338 334
339/* -------------------------------------------------------------------------- 335/* --------------------------------------------------------------------------
@@ -489,19 +485,18 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver)
489{ 485{
490 int result = 0; 486 int result = 0;
491 487
492 ACPI_FUNCTION_TRACE("acpi_bus_driver_init");
493 488
494 if (!device || !driver) 489 if (!device || !driver)
495 return_VALUE(-EINVAL); 490 return -EINVAL;
496 491
497 if (!driver->ops.add) 492 if (!driver->ops.add)
498 return_VALUE(-ENOSYS); 493 return -ENOSYS;
499 494
500 result = driver->ops.add(device); 495 result = driver->ops.add(device);
501 if (result) { 496 if (result) {
502 device->driver = NULL; 497 device->driver = NULL;
503 acpi_driver_data(device) = NULL; 498 acpi_driver_data(device) = NULL;
504 return_VALUE(result); 499 return result;
505 } 500 }
506 501
507 device->driver = driver; 502 device->driver = driver;
@@ -513,7 +508,7 @@ acpi_bus_driver_init(struct acpi_device *device, struct acpi_driver *driver)
513 508
514 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 509 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
515 "Driver successfully bound to device\n")); 510 "Driver successfully bound to device\n"));
516 return_VALUE(0); 511 return 0;
517} 512}
518 513
519static int acpi_start_single_object(struct acpi_device *device) 514static int acpi_start_single_object(struct acpi_device *device)
@@ -521,10 +516,9 @@ static int acpi_start_single_object(struct acpi_device *device)
521 int result = 0; 516 int result = 0;
522 struct acpi_driver *driver; 517 struct acpi_driver *driver;
523 518
524 ACPI_FUNCTION_TRACE("acpi_start_single_object");
525 519
526 if (!(driver = device->driver)) 520 if (!(driver = device->driver))
527 return_VALUE(0); 521 return 0;
528 522
529 if (driver->ops.start) { 523 if (driver->ops.start) {
530 result = driver->ops.start(device); 524 result = driver->ops.start(device);
@@ -532,14 +526,13 @@ static int acpi_start_single_object(struct acpi_device *device)
532 driver->ops.remove(device, ACPI_BUS_REMOVAL_NORMAL); 526 driver->ops.remove(device, ACPI_BUS_REMOVAL_NORMAL);
533 } 527 }
534 528
535 return_VALUE(result); 529 return result;
536} 530}
537 531
538static void acpi_driver_attach(struct acpi_driver *drv) 532static void acpi_driver_attach(struct acpi_driver *drv)
539{ 533{
540 struct list_head *node, *next; 534 struct list_head *node, *next;
541 535
542 ACPI_FUNCTION_TRACE("acpi_driver_attach");
543 536
544 spin_lock(&acpi_device_lock); 537 spin_lock(&acpi_device_lock);
545 list_for_each_safe(node, next, &acpi_device_list) { 538 list_for_each_safe(node, next, &acpi_device_list) {
@@ -568,7 +561,6 @@ static void acpi_driver_detach(struct acpi_driver *drv)
568{ 561{
569 struct list_head *node, *next; 562 struct list_head *node, *next;
570 563
571 ACPI_FUNCTION_TRACE("acpi_driver_detach");
572 564
573 spin_lock(&acpi_device_lock); 565 spin_lock(&acpi_device_lock);
574 list_for_each_safe(node, next, &acpi_device_list) { 566 list_for_each_safe(node, next, &acpi_device_list) {
@@ -598,17 +590,16 @@ static void acpi_driver_detach(struct acpi_driver *drv)
598 */ 590 */
599int acpi_bus_register_driver(struct acpi_driver *driver) 591int acpi_bus_register_driver(struct acpi_driver *driver)
600{ 592{
601 ACPI_FUNCTION_TRACE("acpi_bus_register_driver");
602 593
603 if (acpi_disabled) 594 if (acpi_disabled)
604 return_VALUE(-ENODEV); 595 return -ENODEV;
605 596
606 spin_lock(&acpi_device_lock); 597 spin_lock(&acpi_device_lock);
607 list_add_tail(&driver->node, &acpi_bus_drivers); 598 list_add_tail(&driver->node, &acpi_bus_drivers);
608 spin_unlock(&acpi_device_lock); 599 spin_unlock(&acpi_device_lock);
609 acpi_driver_attach(driver); 600 acpi_driver_attach(driver);
610 601
611 return_VALUE(0); 602 return 0;
612} 603}
613 604
614EXPORT_SYMBOL(acpi_bus_register_driver); 605EXPORT_SYMBOL(acpi_bus_register_driver);
@@ -646,7 +637,6 @@ static int acpi_bus_find_driver(struct acpi_device *device)
646 int result = 0; 637 int result = 0;
647 struct list_head *node, *next; 638 struct list_head *node, *next;
648 639
649 ACPI_FUNCTION_TRACE("acpi_bus_find_driver");
650 640
651 spin_lock(&acpi_device_lock); 641 spin_lock(&acpi_device_lock);
652 list_for_each_safe(node, next, &acpi_bus_drivers) { 642 list_for_each_safe(node, next, &acpi_bus_drivers) {
@@ -666,19 +656,41 @@ static int acpi_bus_find_driver(struct acpi_device *device)
666 spin_unlock(&acpi_device_lock); 656 spin_unlock(&acpi_device_lock);
667 657
668 Done: 658 Done:
669 return_VALUE(result); 659 return result;
670} 660}
671 661
672/* -------------------------------------------------------------------------- 662/* --------------------------------------------------------------------------
673 Device Enumeration 663 Device Enumeration
674 -------------------------------------------------------------------------- */ 664 -------------------------------------------------------------------------- */
675 665
666acpi_status
667acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd)
668{
669 acpi_status status;
670 acpi_handle tmp;
671 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
672 union acpi_object *obj;
673
674 status = acpi_get_handle(handle, "_EJD", &tmp);
675 if (ACPI_FAILURE(status))
676 return status;
677
678 status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer);
679 if (ACPI_SUCCESS(status)) {
680 obj = buffer.pointer;
681 status = acpi_get_handle(NULL, obj->string.pointer, ejd);
682 kfree(buffer.pointer);
683 }
684 return status;
685}
686EXPORT_SYMBOL_GPL(acpi_bus_get_ejd);
687
688
676static int acpi_bus_get_flags(struct acpi_device *device) 689static int acpi_bus_get_flags(struct acpi_device *device)
677{ 690{
678 acpi_status status = AE_OK; 691 acpi_status status = AE_OK;
679 acpi_handle temp = NULL; 692 acpi_handle temp = NULL;
680 693
681 ACPI_FUNCTION_TRACE("acpi_bus_get_flags");
682 694
683 /* Presence of _STA indicates 'dynamic_status' */ 695 /* Presence of _STA indicates 'dynamic_status' */
684 status = acpi_get_handle(device->handle, "_STA", &temp); 696 status = acpi_get_handle(device->handle, "_STA", &temp);
@@ -724,7 +736,7 @@ static int acpi_bus_get_flags(struct acpi_device *device)
724 736
725 /* TBD: Peformance management */ 737 /* TBD: Peformance management */
726 738
727 return_VALUE(0); 739 return 0;
728} 740}
729 741
730static void acpi_device_get_busid(struct acpi_device *device, 742static void acpi_device_get_busid(struct acpi_device *device,
@@ -918,10 +930,9 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
918 int result = 0; 930 int result = 0;
919 struct acpi_driver *driver; 931 struct acpi_driver *driver;
920 932
921 ACPI_FUNCTION_TRACE("acpi_bus_remove");
922 933
923 if (!dev) 934 if (!dev)
924 return_VALUE(-EINVAL); 935 return -EINVAL;
925 936
926 driver = dev->driver; 937 driver = dev->driver;
927 938
@@ -930,12 +941,12 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
930 if (driver->ops.stop) { 941 if (driver->ops.stop) {
931 result = driver->ops.stop(dev, ACPI_BUS_REMOVAL_EJECT); 942 result = driver->ops.stop(dev, ACPI_BUS_REMOVAL_EJECT);
932 if (result) 943 if (result)
933 return_VALUE(result); 944 return result;
934 } 945 }
935 946
936 result = dev->driver->ops.remove(dev, ACPI_BUS_REMOVAL_EJECT); 947 result = dev->driver->ops.remove(dev, ACPI_BUS_REMOVAL_EJECT);
937 if (result) { 948 if (result) {
938 return_VALUE(result); 949 return result;
939 } 950 }
940 951
941 atomic_dec(&dev->driver->references); 952 atomic_dec(&dev->driver->references);
@@ -944,7 +955,7 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
944 } 955 }
945 956
946 if (!rmdevice) 957 if (!rmdevice)
947 return_VALUE(0); 958 return 0;
948 959
949 if (dev->flags.bus_address) { 960 if (dev->flags.bus_address) {
950 if ((dev->parent) && (dev->parent->ops.unbind)) 961 if ((dev->parent) && (dev->parent->ops.unbind))
@@ -953,7 +964,7 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
953 964
954 acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT); 965 acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT);
955 966
956 return_VALUE(0); 967 return 0;
957} 968}
958 969
959static int 970static int
@@ -963,15 +974,14 @@ acpi_add_single_object(struct acpi_device **child,
963 int result = 0; 974 int result = 0;
964 struct acpi_device *device = NULL; 975 struct acpi_device *device = NULL;
965 976
966 ACPI_FUNCTION_TRACE("acpi_add_single_object");
967 977
968 if (!child) 978 if (!child)
969 return_VALUE(-EINVAL); 979 return -EINVAL;
970 980
971 device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL); 981 device = kmalloc(sizeof(struct acpi_device), GFP_KERNEL);
972 if (!device) { 982 if (!device) {
973 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Memory allocation error\n")); 983 printk(KERN_ERR PREFIX "Memory allocation error\n");
974 return_VALUE(-ENOMEM); 984 return -ENOMEM;
975 } 985 }
976 memset(device, 0, sizeof(struct acpi_device)); 986 memset(device, 0, sizeof(struct acpi_device));
977 987
@@ -1096,7 +1106,7 @@ acpi_add_single_object(struct acpi_device **child,
1096 kfree(device); 1106 kfree(device);
1097 } 1107 }
1098 1108
1099 return_VALUE(result); 1109 return result;
1100} 1110}
1101 1111
1102static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops) 1112static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops)
@@ -1109,10 +1119,9 @@ static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops)
1109 acpi_object_type type = 0; 1119 acpi_object_type type = 0;
1110 u32 level = 1; 1120 u32 level = 1;
1111 1121
1112 ACPI_FUNCTION_TRACE("acpi_bus_scan");
1113 1122
1114 if (!start) 1123 if (!start)
1115 return_VALUE(-EINVAL); 1124 return -EINVAL;
1116 1125
1117 parent = start; 1126 parent = start;
1118 phandle = start->handle; 1127 phandle = start->handle;
@@ -1209,7 +1218,7 @@ static int acpi_bus_scan(struct acpi_device *start, struct acpi_bus_ops *ops)
1209 } 1218 }
1210 } 1219 }
1211 1220
1212 return_VALUE(0); 1221 return 0;
1213} 1222}
1214 1223
1215int 1224int
@@ -1219,7 +1228,6 @@ acpi_bus_add(struct acpi_device **child,
1219 int result; 1228 int result;
1220 struct acpi_bus_ops ops; 1229 struct acpi_bus_ops ops;
1221 1230
1222 ACPI_FUNCTION_TRACE("acpi_bus_add");
1223 1231
1224 result = acpi_add_single_object(child, parent, handle, type); 1232 result = acpi_add_single_object(child, parent, handle, type);
1225 if (!result) { 1233 if (!result) {
@@ -1227,7 +1235,7 @@ acpi_bus_add(struct acpi_device **child,
1227 ops.acpi_op_add = 1; 1235 ops.acpi_op_add = 1;
1228 result = acpi_bus_scan(*child, &ops); 1236 result = acpi_bus_scan(*child, &ops);
1229 } 1237 }
1230 return_VALUE(result); 1238 return result;
1231} 1239}
1232 1240
1233EXPORT_SYMBOL(acpi_bus_add); 1241EXPORT_SYMBOL(acpi_bus_add);
@@ -1237,10 +1245,9 @@ int acpi_bus_start(struct acpi_device *device)
1237 int result; 1245 int result;
1238 struct acpi_bus_ops ops; 1246 struct acpi_bus_ops ops;
1239 1247
1240 ACPI_FUNCTION_TRACE("acpi_bus_start");
1241 1248
1242 if (!device) 1249 if (!device)
1243 return_VALUE(-EINVAL); 1250 return -EINVAL;
1244 1251
1245 result = acpi_start_single_object(device); 1252 result = acpi_start_single_object(device);
1246 if (!result) { 1253 if (!result) {
@@ -1248,7 +1255,7 @@ int acpi_bus_start(struct acpi_device *device)
1248 ops.acpi_op_start = 1; 1255 ops.acpi_op_start = 1;
1249 result = acpi_bus_scan(device, &ops); 1256 result = acpi_bus_scan(device, &ops);
1250 } 1257 }
1251 return_VALUE(result); 1258 return result;
1252} 1259}
1253 1260
1254EXPORT_SYMBOL(acpi_bus_start); 1261EXPORT_SYMBOL(acpi_bus_start);
@@ -1314,10 +1321,9 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
1314 int result = 0; 1321 int result = 0;
1315 struct acpi_device *device = NULL; 1322 struct acpi_device *device = NULL;
1316 1323
1317 ACPI_FUNCTION_TRACE("acpi_bus_scan_fixed");
1318 1324
1319 if (!root) 1325 if (!root)
1320 return_VALUE(-ENODEV); 1326 return -ENODEV;
1321 1327
1322 /* 1328 /*
1323 * Enumerate all fixed-feature devices. 1329 * Enumerate all fixed-feature devices.
@@ -1338,7 +1344,7 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
1338 result = acpi_start_single_object(device); 1344 result = acpi_start_single_object(device);
1339 } 1345 }
1340 1346
1341 return_VALUE(result); 1347 return result;
1342} 1348}
1343 1349
1344 1350
@@ -1427,7 +1433,7 @@ static int acpi_device_resume(struct device * dev)
1427} 1433}
1428 1434
1429 1435
1430struct bus_type acpi_bus_type = { 1436static struct bus_type acpi_bus_type = {
1431 .name = "acpi", 1437 .name = "acpi",
1432 .suspend = acpi_device_suspend, 1438 .suspend = acpi_device_suspend,
1433 .resume = acpi_device_resume, 1439 .resume = acpi_device_resume,
@@ -1440,10 +1446,9 @@ static int __init acpi_scan_init(void)
1440 int result; 1446 int result;
1441 struct acpi_bus_ops ops; 1447 struct acpi_bus_ops ops;
1442 1448
1443 ACPI_FUNCTION_TRACE("acpi_scan_init");
1444 1449
1445 if (acpi_disabled) 1450 if (acpi_disabled)
1446 return_VALUE(0); 1451 return 0;
1447 1452
1448 kset_register(&acpi_namespace_kset); 1453 kset_register(&acpi_namespace_kset);
1449 1454
@@ -1488,7 +1493,7 @@ static int __init acpi_scan_init(void)
1488 acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL); 1493 acpi_device_unregister(acpi_root, ACPI_BUS_REMOVAL_NORMAL);
1489 1494
1490 Done: 1495 Done:
1491 return_VALUE(result); 1496 return result;
1492} 1497}
1493 1498
1494subsys_initcall(acpi_scan_init); 1499subsys_initcall(acpi_scan_init);
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
index a934ac42178..c90bd2f70b3 100644
--- a/drivers/acpi/system.c
+++ b/drivers/acpi/system.c
@@ -47,10 +47,9 @@ extern struct fadt_descriptor acpi_fadt;
47 47
48static int acpi_system_read_info(struct seq_file *seq, void *offset) 48static int acpi_system_read_info(struct seq_file *seq, void *offset)
49{ 49{
50 ACPI_FUNCTION_TRACE("acpi_system_read_info");
51 50
52 seq_printf(seq, "version: %x\n", ACPI_CA_VERSION); 51 seq_printf(seq, "version: %x\n", ACPI_CA_VERSION);
53 return_VALUE(0); 52 return 0;
54} 53}
55 54
56static int acpi_system_info_open_fs(struct inode *inode, struct file *file) 55static int acpi_system_info_open_fs(struct inode *inode, struct file *file)
@@ -80,17 +79,16 @@ acpi_system_read_dsdt(struct file *file,
80 struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; 79 struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL };
81 ssize_t res; 80 ssize_t res;
82 81
83 ACPI_FUNCTION_TRACE("acpi_system_read_dsdt");
84 82
85 status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt); 83 status = acpi_get_table(ACPI_TABLE_ID_DSDT, 1, &dsdt);
86 if (ACPI_FAILURE(status)) 84 if (ACPI_FAILURE(status))
87 return_VALUE(-ENODEV); 85 return -ENODEV;
88 86
89 res = simple_read_from_buffer(buffer, count, ppos, 87 res = simple_read_from_buffer(buffer, count, ppos,
90 dsdt.pointer, dsdt.length); 88 dsdt.pointer, dsdt.length);
91 acpi_os_free(dsdt.pointer); 89 acpi_os_free(dsdt.pointer);
92 90
93 return_VALUE(res); 91 return res;
94} 92}
95 93
96static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t, 94static ssize_t acpi_system_read_fadt(struct file *, char __user *, size_t,
@@ -108,17 +106,16 @@ acpi_system_read_fadt(struct file *file,
108 struct acpi_buffer fadt = { ACPI_ALLOCATE_BUFFER, NULL }; 106 struct acpi_buffer fadt = { ACPI_ALLOCATE_BUFFER, NULL };
109 ssize_t res; 107 ssize_t res;
110 108
111 ACPI_FUNCTION_TRACE("acpi_system_read_fadt");
112 109
113 status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &fadt); 110 status = acpi_get_table(ACPI_TABLE_ID_FADT, 1, &fadt);
114 if (ACPI_FAILURE(status)) 111 if (ACPI_FAILURE(status))
115 return_VALUE(-ENODEV); 112 return -ENODEV;
116 113
117 res = simple_read_from_buffer(buffer, count, ppos, 114 res = simple_read_from_buffer(buffer, count, ppos,
118 fadt.pointer, fadt.length); 115 fadt.pointer, fadt.length);
119 acpi_os_free(fadt.pointer); 116 acpi_os_free(fadt.pointer);
120 117
121 return_VALUE(res); 118 return res;
122} 119}
123 120
124static int __init acpi_system_init(void) 121static int __init acpi_system_init(void)
@@ -127,10 +124,9 @@ static int __init acpi_system_init(void)
127 int error = 0; 124 int error = 0;
128 char *name; 125 char *name;
129 126
130 ACPI_FUNCTION_TRACE("acpi_system_init");
131 127
132 if (acpi_disabled) 128 if (acpi_disabled)
133 return_VALUE(0); 129 return 0;
134 130
135 /* 'info' [R] */ 131 /* 'info' [R] */
136 name = ACPI_SYSTEM_FILE_INFO; 132 name = ACPI_SYSTEM_FILE_INFO;
@@ -158,12 +154,9 @@ static int __init acpi_system_init(void)
158 goto Error; 154 goto Error;
159 155
160 Done: 156 Done:
161 return_VALUE(error); 157 return error;
162 158
163 Error: 159 Error:
164 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
165 "Unable to create '%s' proc fs entry\n", name));
166
167 remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir); 160 remove_proc_entry(ACPI_SYSTEM_FILE_FADT, acpi_root_dir);
168 remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir); 161 remove_proc_entry(ACPI_SYSTEM_FILE_DSDT, acpi_root_dir);
169 remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir); 162 remove_proc_entry(ACPI_SYSTEM_FILE_INFO, acpi_root_dir);
diff --git a/drivers/acpi/tables.c b/drivers/acpi/tables.c
index ed5e8816d83..bfb3bfcf9e9 100644
--- a/drivers/acpi/tables.c
+++ b/drivers/acpi/tables.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index e7fe3a14fda..c855f4446b5 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -222,51 +222,48 @@ static int acpi_thermal_get_temperature(struct acpi_thermal *tz)
222{ 222{
223 acpi_status status = AE_OK; 223 acpi_status status = AE_OK;
224 224
225 ACPI_FUNCTION_TRACE("acpi_thermal_get_temperature");
226 225
227 if (!tz) 226 if (!tz)
228 return_VALUE(-EINVAL); 227 return -EINVAL;
229 228
230 tz->last_temperature = tz->temperature; 229 tz->last_temperature = tz->temperature;
231 230
232 status = 231 status =
233 acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature); 232 acpi_evaluate_integer(tz->handle, "_TMP", NULL, &tz->temperature);
234 if (ACPI_FAILURE(status)) 233 if (ACPI_FAILURE(status))
235 return_VALUE(-ENODEV); 234 return -ENODEV;
236 235
237 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n", 236 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Temperature is %lu dK\n",
238 tz->temperature)); 237 tz->temperature));
239 238
240 return_VALUE(0); 239 return 0;
241} 240}
242 241
243static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz) 242static int acpi_thermal_get_polling_frequency(struct acpi_thermal *tz)
244{ 243{
245 acpi_status status = AE_OK; 244 acpi_status status = AE_OK;
246 245
247 ACPI_FUNCTION_TRACE("acpi_thermal_get_polling_frequency");
248 246
249 if (!tz) 247 if (!tz)
250 return_VALUE(-EINVAL); 248 return -EINVAL;
251 249
252 status = 250 status =
253 acpi_evaluate_integer(tz->handle, "_TZP", NULL, 251 acpi_evaluate_integer(tz->handle, "_TZP", NULL,
254 &tz->polling_frequency); 252 &tz->polling_frequency);
255 if (ACPI_FAILURE(status)) 253 if (ACPI_FAILURE(status))
256 return_VALUE(-ENODEV); 254 return -ENODEV;
257 255
258 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n", 256 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Polling frequency is %lu dS\n",
259 tz->polling_frequency)); 257 tz->polling_frequency));
260 258
261 return_VALUE(0); 259 return 0;
262} 260}
263 261
264static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds) 262static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds)
265{ 263{
266 ACPI_FUNCTION_TRACE("acpi_thermal_set_polling");
267 264
268 if (!tz) 265 if (!tz)
269 return_VALUE(-EINVAL); 266 return -EINVAL;
270 267
271 tz->polling_frequency = seconds * 10; /* Convert value to deci-seconds */ 268 tz->polling_frequency = seconds * 10; /* Convert value to deci-seconds */
272 269
@@ -274,7 +271,7 @@ static int acpi_thermal_set_polling(struct acpi_thermal *tz, int seconds)
274 "Polling frequency set to %lu seconds\n", 271 "Polling frequency set to %lu seconds\n",
275 tz->polling_frequency)); 272 tz->polling_frequency));
276 273
277 return_VALUE(0); 274 return 0;
278} 275}
279 276
280static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode) 277static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
@@ -284,29 +281,28 @@ static int acpi_thermal_set_cooling_mode(struct acpi_thermal *tz, int mode)
284 struct acpi_object_list arg_list = { 1, &arg0 }; 281 struct acpi_object_list arg_list = { 1, &arg0 };
285 acpi_handle handle = NULL; 282 acpi_handle handle = NULL;
286 283
287 ACPI_FUNCTION_TRACE("acpi_thermal_set_cooling_mode");
288 284
289 if (!tz) 285 if (!tz)
290 return_VALUE(-EINVAL); 286 return -EINVAL;
291 287
292 status = acpi_get_handle(tz->handle, "_SCP", &handle); 288 status = acpi_get_handle(tz->handle, "_SCP", &handle);
293 if (ACPI_FAILURE(status)) { 289 if (ACPI_FAILURE(status)) {
294 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n")); 290 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "_SCP not present\n"));
295 return_VALUE(-ENODEV); 291 return -ENODEV;
296 } 292 }
297 293
298 arg0.integer.value = mode; 294 arg0.integer.value = mode;
299 295
300 status = acpi_evaluate_object(handle, NULL, &arg_list, NULL); 296 status = acpi_evaluate_object(handle, NULL, &arg_list, NULL);
301 if (ACPI_FAILURE(status)) 297 if (ACPI_FAILURE(status))
302 return_VALUE(-ENODEV); 298 return -ENODEV;
303 299
304 tz->cooling_mode = mode; 300 tz->cooling_mode = mode;
305 301
306 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling mode [%s]\n", 302 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Cooling mode [%s]\n",
307 mode ? "passive" : "active")); 303 mode ? "passive" : "active"));
308 304
309 return_VALUE(0); 305 return 0;
310} 306}
311 307
312static int acpi_thermal_get_trip_points(struct acpi_thermal *tz) 308static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
@@ -314,10 +310,9 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
314 acpi_status status = AE_OK; 310 acpi_status status = AE_OK;
315 int i = 0; 311 int i = 0;
316 312
317 ACPI_FUNCTION_TRACE("acpi_thermal_get_trip_points");
318 313
319 if (!tz) 314 if (!tz)
320 return_VALUE(-EINVAL); 315 return -EINVAL;
321 316
322 /* Critical Shutdown (required) */ 317 /* Critical Shutdown (required) */
323 318
@@ -325,8 +320,8 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
325 &tz->trips.critical.temperature); 320 &tz->trips.critical.temperature);
326 if (ACPI_FAILURE(status)) { 321 if (ACPI_FAILURE(status)) {
327 tz->trips.critical.flags.valid = 0; 322 tz->trips.critical.flags.valid = 0;
328 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No critical threshold\n")); 323 ACPI_EXCEPTION((AE_INFO, status, "No critical threshold"));
329 return_VALUE(-ENODEV); 324 return -ENODEV;
330 } else { 325 } else {
331 tz->trips.critical.flags.valid = 1; 326 tz->trips.critical.flags.valid = 1;
332 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 327 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -384,8 +379,7 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
384 tz->trips.passive.flags.valid = 0; 379 tz->trips.passive.flags.valid = 0;
385 380
386 if (!tz->trips.passive.flags.valid) 381 if (!tz->trips.passive.flags.valid)
387 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 382 printk(KERN_WARNING PREFIX "Invalid passive threshold\n");
388 "Invalid passive threshold\n"));
389 else 383 else
390 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 384 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
391 "Found passive threshold [%lu]\n", 385 "Found passive threshold [%lu]\n",
@@ -414,29 +408,27 @@ static int acpi_thermal_get_trip_points(struct acpi_thermal *tz)
414 "Found active threshold [%d]:[%lu]\n", 408 "Found active threshold [%d]:[%lu]\n",
415 i, tz->trips.active[i].temperature)); 409 i, tz->trips.active[i].temperature));
416 } else 410 } else
417 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 411 ACPI_EXCEPTION((AE_INFO, status,
418 "Invalid active threshold [%d]\n", 412 "Invalid active threshold [%d]", i));
419 i));
420 } 413 }
421 414
422 return_VALUE(0); 415 return 0;
423} 416}
424 417
425static int acpi_thermal_get_devices(struct acpi_thermal *tz) 418static int acpi_thermal_get_devices(struct acpi_thermal *tz)
426{ 419{
427 acpi_status status = AE_OK; 420 acpi_status status = AE_OK;
428 421
429 ACPI_FUNCTION_TRACE("acpi_thermal_get_devices");
430 422
431 if (!tz) 423 if (!tz)
432 return_VALUE(-EINVAL); 424 return -EINVAL;
433 425
434 status = 426 status =
435 acpi_evaluate_reference(tz->handle, "_TZD", NULL, &tz->devices); 427 acpi_evaluate_reference(tz->handle, "_TZD", NULL, &tz->devices);
436 if (ACPI_FAILURE(status)) 428 if (ACPI_FAILURE(status))
437 return_VALUE(-ENODEV); 429 return -ENODEV;
438 430
439 return_VALUE(0); 431 return 0;
440} 432}
441 433
442static int acpi_thermal_call_usermode(char *path) 434static int acpi_thermal_call_usermode(char *path)
@@ -444,10 +436,9 @@ static int acpi_thermal_call_usermode(char *path)
444 char *argv[2] = { NULL, NULL }; 436 char *argv[2] = { NULL, NULL };
445 char *envp[3] = { NULL, NULL, NULL }; 437 char *envp[3] = { NULL, NULL, NULL };
446 438
447 ACPI_FUNCTION_TRACE("acpi_thermal_call_usermode");
448 439
449 if (!path) 440 if (!path)
450 return_VALUE(-EINVAL); 441 return -EINVAL;
451 442
452 argv[0] = path; 443 argv[0] = path;
453 444
@@ -457,7 +448,7 @@ static int acpi_thermal_call_usermode(char *path)
457 448
458 call_usermodehelper(argv[0], argv, envp, 0); 449 call_usermodehelper(argv[0], argv, envp, 0);
459 450
460 return_VALUE(0); 451 return 0;
461} 452}
462 453
463static int acpi_thermal_critical(struct acpi_thermal *tz) 454static int acpi_thermal_critical(struct acpi_thermal *tz)
@@ -465,20 +456,19 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
465 int result = 0; 456 int result = 0;
466 struct acpi_device *device = NULL; 457 struct acpi_device *device = NULL;
467 458
468 ACPI_FUNCTION_TRACE("acpi_thermal_critical");
469 459
470 if (!tz || !tz->trips.critical.flags.valid) 460 if (!tz || !tz->trips.critical.flags.valid)
471 return_VALUE(-EINVAL); 461 return -EINVAL;
472 462
473 if (tz->temperature >= tz->trips.critical.temperature) { 463 if (tz->temperature >= tz->trips.critical.temperature) {
474 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Critical trip point\n")); 464 printk(KERN_WARNING PREFIX "Critical trip point\n");
475 tz->trips.critical.flags.enabled = 1; 465 tz->trips.critical.flags.enabled = 1;
476 } else if (tz->trips.critical.flags.enabled) 466 } else if (tz->trips.critical.flags.enabled)
477 tz->trips.critical.flags.enabled = 0; 467 tz->trips.critical.flags.enabled = 0;
478 468
479 result = acpi_bus_get_device(tz->handle, &device); 469 result = acpi_bus_get_device(tz->handle, &device);
480 if (result) 470 if (result)
481 return_VALUE(result); 471 return result;
482 472
483 printk(KERN_EMERG 473 printk(KERN_EMERG
484 "Critical temperature reached (%ld C), shutting down.\n", 474 "Critical temperature reached (%ld C), shutting down.\n",
@@ -488,7 +478,7 @@ static int acpi_thermal_critical(struct acpi_thermal *tz)
488 478
489 acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF); 479 acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);
490 480
491 return_VALUE(0); 481 return 0;
492} 482}
493 483
494static int acpi_thermal_hot(struct acpi_thermal *tz) 484static int acpi_thermal_hot(struct acpi_thermal *tz)
@@ -496,27 +486,26 @@ static int acpi_thermal_hot(struct acpi_thermal *tz)
496 int result = 0; 486 int result = 0;
497 struct acpi_device *device = NULL; 487 struct acpi_device *device = NULL;
498 488
499 ACPI_FUNCTION_TRACE("acpi_thermal_hot");
500 489
501 if (!tz || !tz->trips.hot.flags.valid) 490 if (!tz || !tz->trips.hot.flags.valid)
502 return_VALUE(-EINVAL); 491 return -EINVAL;
503 492
504 if (tz->temperature >= tz->trips.hot.temperature) { 493 if (tz->temperature >= tz->trips.hot.temperature) {
505 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Hot trip point\n")); 494 printk(KERN_WARNING PREFIX "Hot trip point\n");
506 tz->trips.hot.flags.enabled = 1; 495 tz->trips.hot.flags.enabled = 1;
507 } else if (tz->trips.hot.flags.enabled) 496 } else if (tz->trips.hot.flags.enabled)
508 tz->trips.hot.flags.enabled = 0; 497 tz->trips.hot.flags.enabled = 0;
509 498
510 result = acpi_bus_get_device(tz->handle, &device); 499 result = acpi_bus_get_device(tz->handle, &device);
511 if (result) 500 if (result)
512 return_VALUE(result); 501 return result;
513 502
514 acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_HOT, 503 acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_HOT,
515 tz->trips.hot.flags.enabled); 504 tz->trips.hot.flags.enabled);
516 505
517 /* TBD: Call user-mode "sleep(S4)" function */ 506 /* TBD: Call user-mode "sleep(S4)" function */
518 507
519 return_VALUE(0); 508 return 0;
520} 509}
521 510
522static void acpi_thermal_passive(struct acpi_thermal *tz) 511static void acpi_thermal_passive(struct acpi_thermal *tz)
@@ -526,7 +515,6 @@ static void acpi_thermal_passive(struct acpi_thermal *tz)
526 int trend = 0; 515 int trend = 0;
527 int i = 0; 516 int i = 0;
528 517
529 ACPI_FUNCTION_TRACE("acpi_thermal_passive");
530 518
531 if (!tz || !tz->trips.passive.flags.valid) 519 if (!tz || !tz->trips.passive.flags.valid)
532 return; 520 return;
@@ -615,7 +603,6 @@ static void acpi_thermal_active(struct acpi_thermal *tz)
615 int j = 0; 603 int j = 0;
616 unsigned long maxtemp = 0; 604 unsigned long maxtemp = 0;
617 605
618 ACPI_FUNCTION_TRACE("acpi_thermal_active");
619 606
620 if (!tz) 607 if (!tz)
621 return; 608 return;
@@ -642,10 +629,10 @@ static void acpi_thermal_active(struct acpi_thermal *tz)
642 handles[j], 629 handles[j],
643 ACPI_STATE_D0); 630 ACPI_STATE_D0);
644 if (result) { 631 if (result) {
645 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 632 printk(KERN_WARNING PREFIX
646 "Unable to turn cooling device [%p] 'on'\n", 633 "Unable to turn cooling device [%p] 'on'\n",
647 active->devices. 634 active->devices.
648 handles[j])); 635 handles[j]);
649 continue; 636 continue;
650 } 637 }
651 active->flags.enabled = 1; 638 active->flags.enabled = 1;
@@ -667,9 +654,9 @@ static void acpi_thermal_active(struct acpi_thermal *tz)
667 result = acpi_bus_set_power(active->devices.handles[j], 654 result = acpi_bus_set_power(active->devices.handles[j],
668 ACPI_STATE_D3); 655 ACPI_STATE_D3);
669 if (result) { 656 if (result) {
670 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 657 printk(KERN_WARNING PREFIX
671 "Unable to turn cooling device [%p] 'off'\n", 658 "Unable to turn cooling device [%p] 'off'\n",
672 active->devices.handles[j])); 659 active->devices.handles[j]);
673 continue; 660 continue;
674 } 661 }
675 active->flags.enabled = 0; 662 active->flags.enabled = 0;
@@ -697,18 +684,17 @@ static void acpi_thermal_check(void *data)
697 int i = 0; 684 int i = 0;
698 struct acpi_thermal_state state; 685 struct acpi_thermal_state state;
699 686
700 ACPI_FUNCTION_TRACE("acpi_thermal_check");
701 687
702 if (!tz) { 688 if (!tz) {
703 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid (NULL) context.\n")); 689 printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
704 return_VOID; 690 return;
705 } 691 }
706 692
707 state = tz->state; 693 state = tz->state;
708 694
709 result = acpi_thermal_get_temperature(tz); 695 result = acpi_thermal_get_temperature(tz);
710 if (result) 696 if (result)
711 return_VOID; 697 return;
712 698
713 memset(&tz->state, 0, sizeof(tz->state)); 699 memset(&tz->state, 0, sizeof(tz->state));
714 700
@@ -797,7 +783,7 @@ static void acpi_thermal_check(void *data)
797 } 783 }
798 } 784 }
799 785
800 return_VOID; 786 return;
801} 787}
802 788
803/* -------------------------------------------------------------------------- 789/* --------------------------------------------------------------------------
@@ -810,7 +796,6 @@ static int acpi_thermal_state_seq_show(struct seq_file *seq, void *offset)
810{ 796{
811 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 797 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private;
812 798
813 ACPI_FUNCTION_TRACE("acpi_thermal_state_seq_show");
814 799
815 if (!tz) 800 if (!tz)
816 goto end; 801 goto end;
@@ -833,7 +818,7 @@ static int acpi_thermal_state_seq_show(struct seq_file *seq, void *offset)
833 } 818 }
834 819
835 end: 820 end:
836 return_VALUE(0); 821 return 0;
837} 822}
838 823
839static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file) 824static int acpi_thermal_state_open_fs(struct inode *inode, struct file *file)
@@ -846,7 +831,6 @@ static int acpi_thermal_temp_seq_show(struct seq_file *seq, void *offset)
846 int result = 0; 831 int result = 0;
847 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 832 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private;
848 833
849 ACPI_FUNCTION_TRACE("acpi_thermal_temp_seq_show");
850 834
851 if (!tz) 835 if (!tz)
852 goto end; 836 goto end;
@@ -859,7 +843,7 @@ static int acpi_thermal_temp_seq_show(struct seq_file *seq, void *offset)
859 KELVIN_TO_CELSIUS(tz->temperature)); 843 KELVIN_TO_CELSIUS(tz->temperature));
860 844
861 end: 845 end:
862 return_VALUE(0); 846 return 0;
863} 847}
864 848
865static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file) 849static int acpi_thermal_temp_open_fs(struct inode *inode, struct file *file)
@@ -873,7 +857,6 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
873 int i = 0; 857 int i = 0;
874 int j = 0; 858 int j = 0;
875 859
876 ACPI_FUNCTION_TRACE("acpi_thermal_trip_seq_show");
877 860
878 if (!tz) 861 if (!tz)
879 goto end; 862 goto end;
@@ -913,7 +896,7 @@ static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset)
913 } 896 }
914 897
915 end: 898 end:
916 return_VALUE(0); 899 return 0;
917} 900}
918 901
919static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file) 902static int acpi_thermal_trip_open_fs(struct inode *inode, struct file *file)
@@ -934,28 +917,25 @@ acpi_thermal_write_trip_points(struct file *file,
934 int *active; 917 int *active;
935 int i = 0; 918 int i = 0;
936 919
937 ACPI_FUNCTION_TRACE("acpi_thermal_write_trip_points");
938 920
939 limit_string = kmalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL); 921 limit_string = kmalloc(ACPI_THERMAL_MAX_LIMIT_STR_LEN, GFP_KERNEL);
940 if (!limit_string) 922 if (!limit_string)
941 return_VALUE(-ENOMEM); 923 return -ENOMEM;
942 924
943 memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN); 925 memset(limit_string, 0, ACPI_THERMAL_MAX_LIMIT_STR_LEN);
944 926
945 active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL); 927 active = kmalloc(ACPI_THERMAL_MAX_ACTIVE * sizeof(int), GFP_KERNEL);
946 if (!active) { 928 if (!active) {
947 kfree(limit_string); 929 kfree(limit_string);
948 return_VALUE(-ENOMEM); 930 return -ENOMEM;
949 } 931 }
950 932
951 if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) { 933 if (!tz || (count > ACPI_THERMAL_MAX_LIMIT_STR_LEN - 1)) {
952 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid argument\n"));
953 count = -EINVAL; 934 count = -EINVAL;
954 goto end; 935 goto end;
955 } 936 }
956 937
957 if (copy_from_user(limit_string, buffer, count)) { 938 if (copy_from_user(limit_string, buffer, count)) {
958 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data\n"));
959 count = -EFAULT; 939 count = -EFAULT;
960 goto end; 940 goto end;
961 } 941 }
@@ -968,7 +948,6 @@ acpi_thermal_write_trip_points(struct file *file,
968 &active[5], &active[6], &active[7], &active[8], 948 &active[5], &active[6], &active[7], &active[8],
969 &active[9]); 949 &active[9]);
970 if (!(num >= 5 && num < (ACPI_THERMAL_MAX_ACTIVE + 3))) { 950 if (!(num >= 5 && num < (ACPI_THERMAL_MAX_ACTIVE + 3))) {
971 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid data format\n"));
972 count = -EINVAL; 951 count = -EINVAL;
973 goto end; 952 goto end;
974 } 953 }
@@ -985,14 +964,13 @@ acpi_thermal_write_trip_points(struct file *file,
985 end: 964 end:
986 kfree(active); 965 kfree(active);
987 kfree(limit_string); 966 kfree(limit_string);
988 return_VALUE(count); 967 return count;
989} 968}
990 969
991static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset) 970static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset)
992{ 971{
993 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 972 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private;
994 973
995 ACPI_FUNCTION_TRACE("acpi_thermal_cooling_seq_show");
996 974
997 if (!tz) 975 if (!tz)
998 goto end; 976 goto end;
@@ -1008,7 +986,7 @@ static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset)
1008 tz->cooling_mode ? "passive" : "active"); 986 tz->cooling_mode ? "passive" : "active");
1009 987
1010 end: 988 end:
1011 return_VALUE(0); 989 return 0;
1012} 990}
1013 991
1014static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file) 992static int acpi_thermal_cooling_open_fs(struct inode *inode, struct file *file)
@@ -1027,16 +1005,15 @@ acpi_thermal_write_cooling_mode(struct file *file,
1027 int result = 0; 1005 int result = 0;
1028 char mode_string[12] = { '\0' }; 1006 char mode_string[12] = { '\0' };
1029 1007
1030 ACPI_FUNCTION_TRACE("acpi_thermal_write_cooling_mode");
1031 1008
1032 if (!tz || (count > sizeof(mode_string) - 1)) 1009 if (!tz || (count > sizeof(mode_string) - 1))
1033 return_VALUE(-EINVAL); 1010 return -EINVAL;
1034 1011
1035 if (!tz->flags.cooling_mode) 1012 if (!tz->flags.cooling_mode)
1036 return_VALUE(-ENODEV); 1013 return -ENODEV;
1037 1014
1038 if (copy_from_user(mode_string, buffer, count)) 1015 if (copy_from_user(mode_string, buffer, count))
1039 return_VALUE(-EFAULT); 1016 return -EFAULT;
1040 1017
1041 mode_string[count] = '\0'; 1018 mode_string[count] = '\0';
1042 1019
@@ -1044,18 +1021,17 @@ acpi_thermal_write_cooling_mode(struct file *file,
1044 simple_strtoul(mode_string, NULL, 1021 simple_strtoul(mode_string, NULL,
1045 0)); 1022 0));
1046 if (result) 1023 if (result)
1047 return_VALUE(result); 1024 return result;
1048 1025
1049 acpi_thermal_check(tz); 1026 acpi_thermal_check(tz);
1050 1027
1051 return_VALUE(count); 1028 return count;
1052} 1029}
1053 1030
1054static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset) 1031static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset)
1055{ 1032{
1056 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 1033 struct acpi_thermal *tz = (struct acpi_thermal *)seq->private;
1057 1034
1058 ACPI_FUNCTION_TRACE("acpi_thermal_polling_seq_show");
1059 1035
1060 if (!tz) 1036 if (!tz)
1061 goto end; 1037 goto end;
@@ -1069,7 +1045,7 @@ static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset)
1069 (tz->polling_frequency / 10)); 1045 (tz->polling_frequency / 10));
1070 1046
1071 end: 1047 end:
1072 return_VALUE(0); 1048 return 0;
1073} 1049}
1074 1050
1075static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file) 1051static int acpi_thermal_polling_open_fs(struct inode *inode, struct file *file)
@@ -1089,13 +1065,12 @@ acpi_thermal_write_polling(struct file *file,
1089 char polling_string[12] = { '\0' }; 1065 char polling_string[12] = { '\0' };
1090 int seconds = 0; 1066 int seconds = 0;
1091 1067
1092 ACPI_FUNCTION_TRACE("acpi_thermal_write_polling");
1093 1068
1094 if (!tz || (count > sizeof(polling_string) - 1)) 1069 if (!tz || (count > sizeof(polling_string) - 1))
1095 return_VALUE(-EINVAL); 1070 return -EINVAL;
1096 1071
1097 if (copy_from_user(polling_string, buffer, count)) 1072 if (copy_from_user(polling_string, buffer, count))
1098 return_VALUE(-EFAULT); 1073 return -EFAULT;
1099 1074
1100 polling_string[count] = '\0'; 1075 polling_string[count] = '\0';
1101 1076
@@ -1103,24 +1078,23 @@ acpi_thermal_write_polling(struct file *file,
1103 1078
1104 result = acpi_thermal_set_polling(tz, seconds); 1079 result = acpi_thermal_set_polling(tz, seconds);
1105 if (result) 1080 if (result)
1106 return_VALUE(result); 1081 return result;
1107 1082
1108 acpi_thermal_check(tz); 1083 acpi_thermal_check(tz);
1109 1084
1110 return_VALUE(count); 1085 return count;
1111} 1086}
1112 1087
1113static int acpi_thermal_add_fs(struct acpi_device *device) 1088static int acpi_thermal_add_fs(struct acpi_device *device)
1114{ 1089{
1115 struct proc_dir_entry *entry = NULL; 1090 struct proc_dir_entry *entry = NULL;
1116 1091
1117 ACPI_FUNCTION_TRACE("acpi_thermal_add_fs");
1118 1092
1119 if (!acpi_device_dir(device)) { 1093 if (!acpi_device_dir(device)) {
1120 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 1094 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
1121 acpi_thermal_dir); 1095 acpi_thermal_dir);
1122 if (!acpi_device_dir(device)) 1096 if (!acpi_device_dir(device))
1123 return_VALUE(-ENODEV); 1097 return -ENODEV;
1124 acpi_device_dir(device)->owner = THIS_MODULE; 1098 acpi_device_dir(device)->owner = THIS_MODULE;
1125 } 1099 }
1126 1100
@@ -1128,9 +1102,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1128 entry = create_proc_entry(ACPI_THERMAL_FILE_STATE, 1102 entry = create_proc_entry(ACPI_THERMAL_FILE_STATE,
1129 S_IRUGO, acpi_device_dir(device)); 1103 S_IRUGO, acpi_device_dir(device));
1130 if (!entry) 1104 if (!entry)
1131 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1105 return -ENODEV;
1132 "Unable to create '%s' fs entry\n",
1133 ACPI_THERMAL_FILE_STATE));
1134 else { 1106 else {
1135 entry->proc_fops = &acpi_thermal_state_fops; 1107 entry->proc_fops = &acpi_thermal_state_fops;
1136 entry->data = acpi_driver_data(device); 1108 entry->data = acpi_driver_data(device);
@@ -1141,9 +1113,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1141 entry = create_proc_entry(ACPI_THERMAL_FILE_TEMPERATURE, 1113 entry = create_proc_entry(ACPI_THERMAL_FILE_TEMPERATURE,
1142 S_IRUGO, acpi_device_dir(device)); 1114 S_IRUGO, acpi_device_dir(device));
1143 if (!entry) 1115 if (!entry)
1144 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1116 return -ENODEV;
1145 "Unable to create '%s' fs entry\n",
1146 ACPI_THERMAL_FILE_TEMPERATURE));
1147 else { 1117 else {
1148 entry->proc_fops = &acpi_thermal_temp_fops; 1118 entry->proc_fops = &acpi_thermal_temp_fops;
1149 entry->data = acpi_driver_data(device); 1119 entry->data = acpi_driver_data(device);
@@ -1155,9 +1125,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1155 S_IFREG | S_IRUGO | S_IWUSR, 1125 S_IFREG | S_IRUGO | S_IWUSR,
1156 acpi_device_dir(device)); 1126 acpi_device_dir(device));
1157 if (!entry) 1127 if (!entry)
1158 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1128 return -ENODEV;
1159 "Unable to create '%s' fs entry\n",
1160 ACPI_THERMAL_FILE_TRIP_POINTS));
1161 else { 1129 else {
1162 entry->proc_fops = &acpi_thermal_trip_fops; 1130 entry->proc_fops = &acpi_thermal_trip_fops;
1163 entry->data = acpi_driver_data(device); 1131 entry->data = acpi_driver_data(device);
@@ -1169,9 +1137,7 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1169 S_IFREG | S_IRUGO | S_IWUSR, 1137 S_IFREG | S_IRUGO | S_IWUSR,
1170 acpi_device_dir(device)); 1138 acpi_device_dir(device));
1171 if (!entry) 1139 if (!entry)
1172 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1140 return -ENODEV;
1173 "Unable to create '%s' fs entry\n",
1174 ACPI_THERMAL_FILE_COOLING_MODE));
1175 else { 1141 else {
1176 entry->proc_fops = &acpi_thermal_cooling_fops; 1142 entry->proc_fops = &acpi_thermal_cooling_fops;
1177 entry->data = acpi_driver_data(device); 1143 entry->data = acpi_driver_data(device);
@@ -1183,21 +1149,18 @@ static int acpi_thermal_add_fs(struct acpi_device *device)
1183 S_IFREG | S_IRUGO | S_IWUSR, 1149 S_IFREG | S_IRUGO | S_IWUSR,
1184 acpi_device_dir(device)); 1150 acpi_device_dir(device));
1185 if (!entry) 1151 if (!entry)
1186 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1152 return -ENODEV;
1187 "Unable to create '%s' fs entry\n",
1188 ACPI_THERMAL_FILE_POLLING_FREQ));
1189 else { 1153 else {
1190 entry->proc_fops = &acpi_thermal_polling_fops; 1154 entry->proc_fops = &acpi_thermal_polling_fops;
1191 entry->data = acpi_driver_data(device); 1155 entry->data = acpi_driver_data(device);
1192 entry->owner = THIS_MODULE; 1156 entry->owner = THIS_MODULE;
1193 } 1157 }
1194 1158
1195 return_VALUE(0); 1159 return 0;
1196} 1160}
1197 1161
1198static int acpi_thermal_remove_fs(struct acpi_device *device) 1162static int acpi_thermal_remove_fs(struct acpi_device *device)
1199{ 1163{
1200 ACPI_FUNCTION_TRACE("acpi_thermal_remove_fs");
1201 1164
1202 if (acpi_device_dir(device)) { 1165 if (acpi_device_dir(device)) {
1203 remove_proc_entry(ACPI_THERMAL_FILE_POLLING_FREQ, 1166 remove_proc_entry(ACPI_THERMAL_FILE_POLLING_FREQ,
@@ -1214,7 +1177,7 @@ static int acpi_thermal_remove_fs(struct acpi_device *device)
1214 acpi_device_dir(device) = NULL; 1177 acpi_device_dir(device) = NULL;
1215 } 1178 }
1216 1179
1217 return_VALUE(0); 1180 return 0;
1218} 1181}
1219 1182
1220/* -------------------------------------------------------------------------- 1183/* --------------------------------------------------------------------------
@@ -1226,13 +1189,12 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
1226 struct acpi_thermal *tz = (struct acpi_thermal *)data; 1189 struct acpi_thermal *tz = (struct acpi_thermal *)data;
1227 struct acpi_device *device = NULL; 1190 struct acpi_device *device = NULL;
1228 1191
1229 ACPI_FUNCTION_TRACE("acpi_thermal_notify");
1230 1192
1231 if (!tz) 1193 if (!tz)
1232 return_VOID; 1194 return;
1233 1195
1234 if (acpi_bus_get_device(tz->handle, &device)) 1196 if (acpi_bus_get_device(tz->handle, &device))
1235 return_VOID; 1197 return;
1236 1198
1237 switch (event) { 1199 switch (event) {
1238 case ACPI_THERMAL_NOTIFY_TEMPERATURE: 1200 case ACPI_THERMAL_NOTIFY_TEMPERATURE:
@@ -1254,27 +1216,26 @@ static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data)
1254 break; 1216 break;
1255 } 1217 }
1256 1218
1257 return_VOID; 1219 return;
1258} 1220}
1259 1221
1260static int acpi_thermal_get_info(struct acpi_thermal *tz) 1222static int acpi_thermal_get_info(struct acpi_thermal *tz)
1261{ 1223{
1262 int result = 0; 1224 int result = 0;
1263 1225
1264 ACPI_FUNCTION_TRACE("acpi_thermal_get_info");
1265 1226
1266 if (!tz) 1227 if (!tz)
1267 return_VALUE(-EINVAL); 1228 return -EINVAL;
1268 1229
1269 /* Get temperature [_TMP] (required) */ 1230 /* Get temperature [_TMP] (required) */
1270 result = acpi_thermal_get_temperature(tz); 1231 result = acpi_thermal_get_temperature(tz);
1271 if (result) 1232 if (result)
1272 return_VALUE(result); 1233 return result;
1273 1234
1274 /* Get trip points [_CRT, _PSV, etc.] (required) */ 1235 /* Get trip points [_CRT, _PSV, etc.] (required) */
1275 result = acpi_thermal_get_trip_points(tz); 1236 result = acpi_thermal_get_trip_points(tz);
1276 if (result) 1237 if (result)
1277 return_VALUE(result); 1238 return result;
1278 1239
1279 /* Set the cooling mode [_SCP] to active cooling (default) */ 1240 /* Set the cooling mode [_SCP] to active cooling (default) */
1280 result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE); 1241 result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE);
@@ -1314,7 +1275,7 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz)
1314 if (!result) 1275 if (!result)
1315 tz->flags.devices = 1; 1276 tz->flags.devices = 1;
1316 1277
1317 return_VALUE(0); 1278 return 0;
1318} 1279}
1319 1280
1320static int acpi_thermal_add(struct acpi_device *device) 1281static int acpi_thermal_add(struct acpi_device *device)
@@ -1323,14 +1284,13 @@ static int acpi_thermal_add(struct acpi_device *device)
1323 acpi_status status = AE_OK; 1284 acpi_status status = AE_OK;
1324 struct acpi_thermal *tz = NULL; 1285 struct acpi_thermal *tz = NULL;
1325 1286
1326 ACPI_FUNCTION_TRACE("acpi_thermal_add");
1327 1287
1328 if (!device) 1288 if (!device)
1329 return_VALUE(-EINVAL); 1289 return -EINVAL;
1330 1290
1331 tz = kmalloc(sizeof(struct acpi_thermal), GFP_KERNEL); 1291 tz = kmalloc(sizeof(struct acpi_thermal), GFP_KERNEL);
1332 if (!tz) 1292 if (!tz)
1333 return_VALUE(-ENOMEM); 1293 return -ENOMEM;
1334 memset(tz, 0, sizeof(struct acpi_thermal)); 1294 memset(tz, 0, sizeof(struct acpi_thermal));
1335 1295
1336 tz->handle = device->handle; 1296 tz->handle = device->handle;
@@ -1355,8 +1315,6 @@ static int acpi_thermal_add(struct acpi_device *device)
1355 ACPI_DEVICE_NOTIFY, 1315 ACPI_DEVICE_NOTIFY,
1356 acpi_thermal_notify, tz); 1316 acpi_thermal_notify, tz);
1357 if (ACPI_FAILURE(status)) { 1317 if (ACPI_FAILURE(status)) {
1358 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1359 "Error installing notify handler\n"));
1360 result = -ENODEV; 1318 result = -ENODEV;
1361 goto end; 1319 goto end;
1362 } 1320 }
@@ -1371,7 +1329,7 @@ static int acpi_thermal_add(struct acpi_device *device)
1371 kfree(tz); 1329 kfree(tz);
1372 } 1330 }
1373 1331
1374 return_VALUE(result); 1332 return result;
1375} 1333}
1376 1334
1377static int acpi_thermal_remove(struct acpi_device *device, int type) 1335static int acpi_thermal_remove(struct acpi_device *device, int type)
@@ -1379,10 +1337,9 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
1379 acpi_status status = AE_OK; 1337 acpi_status status = AE_OK;
1380 struct acpi_thermal *tz = NULL; 1338 struct acpi_thermal *tz = NULL;
1381 1339
1382 ACPI_FUNCTION_TRACE("acpi_thermal_remove");
1383 1340
1384 if (!device || !acpi_driver_data(device)) 1341 if (!device || !acpi_driver_data(device))
1385 return_VALUE(-EINVAL); 1342 return -EINVAL;
1386 1343
1387 tz = (struct acpi_thermal *)acpi_driver_data(device); 1344 tz = (struct acpi_thermal *)acpi_driver_data(device);
1388 1345
@@ -1398,9 +1355,6 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
1398 status = acpi_remove_notify_handler(tz->handle, 1355 status = acpi_remove_notify_handler(tz->handle,
1399 ACPI_DEVICE_NOTIFY, 1356 ACPI_DEVICE_NOTIFY,
1400 acpi_thermal_notify); 1357 acpi_thermal_notify);
1401 if (ACPI_FAILURE(status))
1402 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1403 "Error removing notify handler\n"));
1404 1358
1405 /* Terminate policy */ 1359 /* Terminate policy */
1406 if (tz->trips.passive.flags.valid && tz->trips.passive.flags.enabled) { 1360 if (tz->trips.passive.flags.valid && tz->trips.passive.flags.enabled) {
@@ -1416,7 +1370,7 @@ static int acpi_thermal_remove(struct acpi_device *device, int type)
1416 acpi_thermal_remove_fs(device); 1370 acpi_thermal_remove_fs(device);
1417 1371
1418 kfree(tz); 1372 kfree(tz);
1419 return_VALUE(0); 1373 return 0;
1420} 1374}
1421 1375
1422static int acpi_thermal_resume(struct acpi_device *device, int state) 1376static int acpi_thermal_resume(struct acpi_device *device, int state)
@@ -1424,7 +1378,7 @@ static int acpi_thermal_resume(struct acpi_device *device, int state)
1424 struct acpi_thermal *tz = NULL; 1378 struct acpi_thermal *tz = NULL;
1425 1379
1426 if (!device || !acpi_driver_data(device)) 1380 if (!device || !acpi_driver_data(device))
1427 return_VALUE(-EINVAL); 1381 return -EINVAL;
1428 1382
1429 tz = (struct acpi_thermal *)acpi_driver_data(device); 1383 tz = (struct acpi_thermal *)acpi_driver_data(device);
1430 1384
@@ -1437,31 +1391,29 @@ static int __init acpi_thermal_init(void)
1437{ 1391{
1438 int result = 0; 1392 int result = 0;
1439 1393
1440 ACPI_FUNCTION_TRACE("acpi_thermal_init");
1441 1394
1442 acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir); 1395 acpi_thermal_dir = proc_mkdir(ACPI_THERMAL_CLASS, acpi_root_dir);
1443 if (!acpi_thermal_dir) 1396 if (!acpi_thermal_dir)
1444 return_VALUE(-ENODEV); 1397 return -ENODEV;
1445 acpi_thermal_dir->owner = THIS_MODULE; 1398 acpi_thermal_dir->owner = THIS_MODULE;
1446 1399
1447 result = acpi_bus_register_driver(&acpi_thermal_driver); 1400 result = acpi_bus_register_driver(&acpi_thermal_driver);
1448 if (result < 0) { 1401 if (result < 0) {
1449 remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir); 1402 remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir);
1450 return_VALUE(-ENODEV); 1403 return -ENODEV;
1451 } 1404 }
1452 1405
1453 return_VALUE(0); 1406 return 0;
1454} 1407}
1455 1408
1456static void __exit acpi_thermal_exit(void) 1409static void __exit acpi_thermal_exit(void)
1457{ 1410{
1458 ACPI_FUNCTION_TRACE("acpi_thermal_exit");
1459 1411
1460 acpi_bus_unregister_driver(&acpi_thermal_driver); 1412 acpi_bus_unregister_driver(&acpi_thermal_driver);
1461 1413
1462 remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir); 1414 remove_proc_entry(ACPI_THERMAL_CLASS, acpi_root_dir);
1463 1415
1464 return_VOID; 1416 return;
1465} 1417}
1466 1418
1467module_init(acpi_thermal_init); 1419module_init(acpi_thermal_init);
diff --git a/drivers/acpi/utilities/utdelete.c b/drivers/acpi/utilities/utdelete.c
index 67b9f325c6f..38ebe1c5433 100644
--- a/drivers/acpi/utilities/utdelete.c
+++ b/drivers/acpi/utilities/utdelete.c
@@ -155,21 +155,30 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
155 case ACPI_TYPE_MUTEX: 155 case ACPI_TYPE_MUTEX:
156 156
157 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, 157 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
158 "***** Mutex %p, Semaphore %p\n", 158 "***** Mutex %p, OS Mutex %p\n",
159 object, object->mutex.semaphore)); 159 object, object->mutex.os_mutex));
160 160
161 acpi_ex_unlink_mutex(object); 161 if (object->mutex.os_mutex != ACPI_GLOBAL_LOCK) {
162 (void)acpi_os_delete_semaphore(object->mutex.semaphore); 162 acpi_ex_unlink_mutex(object);
163 acpi_os_delete_mutex(object->mutex.os_mutex);
164 } else {
165 /* Global Lock "mutex" is actually a counting semaphore */
166
167 (void)
168 acpi_os_delete_semaphore
169 (acpi_gbl_global_lock_semaphore);
170 acpi_gbl_global_lock_semaphore = NULL;
171 }
163 break; 172 break;
164 173
165 case ACPI_TYPE_EVENT: 174 case ACPI_TYPE_EVENT:
166 175
167 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, 176 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
168 "***** Event %p, Semaphore %p\n", 177 "***** Event %p, OS Semaphore %p\n",
169 object, object->event.semaphore)); 178 object, object->event.os_semaphore));
170 179
171 (void)acpi_os_delete_semaphore(object->event.semaphore); 180 (void)acpi_os_delete_semaphore(object->event.os_semaphore);
172 object->event.semaphore = NULL; 181 object->event.os_semaphore = NULL;
173 break; 182 break;
174 183
175 case ACPI_TYPE_METHOD: 184 case ACPI_TYPE_METHOD:
@@ -177,12 +186,13 @@ static void acpi_ut_delete_internal_obj(union acpi_operand_object *object)
177 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, 186 ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS,
178 "***** Method %p\n", object)); 187 "***** Method %p\n", object));
179 188
180 /* Delete the method semaphore if it exists */ 189 /* Delete the method mutex if it exists */
181 190
182 if (object->method.semaphore) { 191 if (object->method.mutex) {
183 (void)acpi_os_delete_semaphore(object->method. 192 acpi_os_delete_mutex(object->method.mutex->mutex.
184 semaphore); 193 os_mutex);
185 object->method.semaphore = NULL; 194 acpi_ut_delete_object_desc(object->method.mutex);
195 object->method.mutex = NULL;
186 } 196 }
187 break; 197 break;
188 198
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index e5999c65c0b..014030af8b5 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -794,6 +794,7 @@ void acpi_ut_init_globals(void)
794 794
795 /* Global Lock support */ 795 /* Global Lock support */
796 796
797 acpi_gbl_global_lock_semaphore = NULL;
797 acpi_gbl_global_lock_acquired = FALSE; 798 acpi_gbl_global_lock_acquired = FALSE;
798 acpi_gbl_global_lock_thread_count = 0; 799 acpi_gbl_global_lock_thread_count = 0;
799 acpi_gbl_global_lock_handle = 0; 800 acpi_gbl_global_lock_handle = 0;
diff --git a/drivers/acpi/utilities/utmisc.c b/drivers/acpi/utilities/utmisc.c
index 5c75d35ad1c..33268310c73 100644
--- a/drivers/acpi/utilities/utmisc.c
+++ b/drivers/acpi/utilities/utmisc.c
@@ -41,6 +41,8 @@
41 * POSSIBILITY OF SUCH DAMAGES. 41 * POSSIBILITY OF SUCH DAMAGES.
42 */ 42 */
43 43
44#include <linux/module.h>
45
44#include <acpi/acpi.h> 46#include <acpi/acpi.h>
45#include <acpi/acnamesp.h> 47#include <acpi/acnamesp.h>
46 48
@@ -962,6 +964,7 @@ acpi_ut_exception(char *module_name,
962 acpi_os_vprintf(format, args); 964 acpi_os_vprintf(format, args);
963 acpi_os_printf(" [%X]\n", ACPI_CA_VERSION); 965 acpi_os_printf(" [%X]\n", ACPI_CA_VERSION);
964} 966}
967EXPORT_SYMBOL(acpi_ut_exception);
965 968
966void ACPI_INTERNAL_VAR_XFACE 969void ACPI_INTERNAL_VAR_XFACE
967acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) 970acpi_ut_warning(char *module_name, u32 line_number, char *format, ...)
diff --git a/drivers/acpi/utilities/utmutex.c b/drivers/acpi/utilities/utmutex.c
index 25eb34369af..dfc8f30ca89 100644
--- a/drivers/acpi/utilities/utmutex.c
+++ b/drivers/acpi/utilities/utmutex.c
@@ -82,12 +82,9 @@ acpi_status acpi_ut_mutex_initialize(void)
82 82
83 /* Create the spinlocks for use at interrupt level */ 83 /* Create the spinlocks for use at interrupt level */
84 84
85 status = acpi_os_create_lock(&acpi_gbl_gpe_lock); 85 spin_lock_init(acpi_gbl_gpe_lock);
86 if (ACPI_FAILURE(status)) { 86 spin_lock_init(acpi_gbl_hardware_lock);
87 return_ACPI_STATUS(status);
88 }
89 87
90 status = acpi_os_create_lock(&acpi_gbl_hardware_lock);
91 return_ACPI_STATUS(status); 88 return_ACPI_STATUS(status);
92} 89}
93 90
@@ -146,9 +143,8 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id)
146 } 143 }
147 144
148 if (!acpi_gbl_mutex_info[mutex_id].mutex) { 145 if (!acpi_gbl_mutex_info[mutex_id].mutex) {
149 status = acpi_os_create_semaphore(1, 1, 146 status =
150 &acpi_gbl_mutex_info 147 acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex);
151 [mutex_id].mutex);
152 acpi_gbl_mutex_info[mutex_id].thread_id = 148 acpi_gbl_mutex_info[mutex_id].thread_id =
153 ACPI_MUTEX_NOT_ACQUIRED; 149 ACPI_MUTEX_NOT_ACQUIRED;
154 acpi_gbl_mutex_info[mutex_id].use_count = 0; 150 acpi_gbl_mutex_info[mutex_id].use_count = 0;
@@ -171,7 +167,6 @@ static acpi_status acpi_ut_create_mutex(acpi_mutex_handle mutex_id)
171 167
172static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id) 168static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
173{ 169{
174 acpi_status status;
175 170
176 ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id); 171 ACPI_FUNCTION_TRACE_U32(ut_delete_mutex, mutex_id);
177 172
@@ -179,12 +174,12 @@ static acpi_status acpi_ut_delete_mutex(acpi_mutex_handle mutex_id)
179 return_ACPI_STATUS(AE_BAD_PARAMETER); 174 return_ACPI_STATUS(AE_BAD_PARAMETER);
180 } 175 }
181 176
182 status = acpi_os_delete_semaphore(acpi_gbl_mutex_info[mutex_id].mutex); 177 acpi_os_delete_mutex(acpi_gbl_mutex_info[mutex_id].mutex);
183 178
184 acpi_gbl_mutex_info[mutex_id].mutex = NULL; 179 acpi_gbl_mutex_info[mutex_id].mutex = NULL;
185 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; 180 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED;
186 181
187 return_ACPI_STATUS(status); 182 return_ACPI_STATUS(AE_OK);
188} 183}
189 184
190/******************************************************************************* 185/*******************************************************************************
@@ -251,8 +246,8 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
251 "Thread %X attempting to acquire Mutex [%s]\n", 246 "Thread %X attempting to acquire Mutex [%s]\n",
252 this_thread_id, acpi_ut_get_mutex_name(mutex_id))); 247 this_thread_id, acpi_ut_get_mutex_name(mutex_id)));
253 248
254 status = acpi_os_wait_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 249 status = acpi_os_acquire_mutex(acpi_gbl_mutex_info[mutex_id].mutex,
255 1, ACPI_WAIT_FOREVER); 250 ACPI_WAIT_FOREVER);
256 if (ACPI_SUCCESS(status)) { 251 if (ACPI_SUCCESS(status)) {
257 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, 252 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
258 "Thread %X acquired Mutex [%s]\n", 253 "Thread %X acquired Mutex [%s]\n",
@@ -284,7 +279,6 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)
284 279
285acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id) 280acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
286{ 281{
287 acpi_status status;
288 acpi_thread_id this_thread_id; 282 acpi_thread_id this_thread_id;
289 283
290 ACPI_FUNCTION_NAME(ut_release_mutex); 284 ACPI_FUNCTION_NAME(ut_release_mutex);
@@ -340,19 +334,6 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)
340 334
341 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; 335 acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED;
342 336
343 status = 337 acpi_os_release_mutex(acpi_gbl_mutex_info[mutex_id].mutex);
344 acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); 338 return (AE_OK);
345
346 if (ACPI_FAILURE(status)) {
347 ACPI_EXCEPTION((AE_INFO, status,
348 "Thread %X could not release Mutex [%X]",
349 this_thread_id, mutex_id));
350 } else {
351 ACPI_DEBUG_PRINT((ACPI_DB_MUTEX,
352 "Thread %X released Mutex [%s]\n",
353 this_thread_id,
354 acpi_ut_get_mutex_name(mutex_id)));
355 }
356
357 return (status);
358} 339}
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 6b516852ac1..1930e1a75b2 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -58,31 +58,29 @@ acpi_extract_package(union acpi_object *package,
58 u8 *head = NULL; 58 u8 *head = NULL;
59 u8 *tail = NULL; 59 u8 *tail = NULL;
60 60
61 ACPI_FUNCTION_TRACE("acpi_extract_package");
62 61
63 if (!package || (package->type != ACPI_TYPE_PACKAGE) 62 if (!package || (package->type != ACPI_TYPE_PACKAGE)
64 || (package->package.count < 1)) { 63 || (package->package.count < 1)) {
65 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 64 printk(KERN_WARNING PREFIX "Invalid package argument\n");
66 "Invalid 'package' argument\n")); 65 return AE_BAD_PARAMETER;
67 return_ACPI_STATUS(AE_BAD_PARAMETER);
68 } 66 }
69 67
70 if (!format || !format->pointer || (format->length < 1)) { 68 if (!format || !format->pointer || (format->length < 1)) {
71 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid 'format' argument\n")); 69 printk(KERN_WARNING PREFIX "Invalid format argument\n");
72 return_ACPI_STATUS(AE_BAD_PARAMETER); 70 return AE_BAD_PARAMETER;
73 } 71 }
74 72
75 if (!buffer) { 73 if (!buffer) {
76 ACPI_DEBUG_PRINT((ACPI_DB_WARN, "Invalid 'buffer' argument\n")); 74 printk(KERN_WARNING PREFIX "Invalid buffer argument\n");
77 return_ACPI_STATUS(AE_BAD_PARAMETER); 75 return AE_BAD_PARAMETER;
78 } 76 }
79 77
80 format_count = (format->length / sizeof(char)) - 1; 78 format_count = (format->length / sizeof(char)) - 1;
81 if (format_count > package->package.count) { 79 if (format_count > package->package.count) {
82 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 80 printk(KERN_WARNING PREFIX "Format specifies more objects [%d]"
83 "Format specifies more objects [%d] than exist in package [%d].", 81 " than exist in package [%d].\n",
84 format_count, package->package.count)); 82 format_count, package->package.count);
85 return_ACPI_STATUS(AE_BAD_DATA); 83 return AE_BAD_DATA;
86 } 84 }
87 85
88 format_string = (char *)format->pointer; 86 format_string = (char *)format->pointer;
@@ -95,7 +93,7 @@ acpi_extract_package(union acpi_object *package,
95 union acpi_object *element = &(package->package.elements[i]); 93 union acpi_object *element = &(package->package.elements[i]);
96 94
97 if (!element) { 95 if (!element) {
98 return_ACPI_STATUS(AE_BAD_DATA); 96 return AE_BAD_DATA;
99 } 97 }
100 98
101 switch (element->type) { 99 switch (element->type) {
@@ -113,10 +111,11 @@ acpi_extract_package(union acpi_object *package,
113 tail_offset += sizeof(char *); 111 tail_offset += sizeof(char *);
114 break; 112 break;
115 default: 113 default:
116 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 114 printk(KERN_WARNING PREFIX "Invalid package element"
117 "Invalid package element [%d]: got number, expecing [%c].\n", 115 " [%d]: got number, expecing"
118 i, format_string[i])); 116 " [%c]\n",
119 return_ACPI_STATUS(AE_BAD_DATA); 117 i, format_string[i]);
118 return AE_BAD_DATA;
120 break; 119 break;
121 } 120 }
122 break; 121 break;
@@ -138,10 +137,11 @@ acpi_extract_package(union acpi_object *package,
138 tail_offset += sizeof(u8 *); 137 tail_offset += sizeof(u8 *);
139 break; 138 break;
140 default: 139 default:
141 ACPI_DEBUG_PRINT((ACPI_DB_WARN, 140 printk(KERN_WARNING PREFIX "Invalid package element"
142 "Invalid package element [%d] got string/buffer, expecing [%c].\n", 141 " [%d] got string/buffer,"
143 i, format_string[i])); 142 " expecing [%c]\n",
144 return_ACPI_STATUS(AE_BAD_DATA); 143 i, format_string[i]);
144 return AE_BAD_DATA;
145 break; 145 break;
146 } 146 }
147 break; 147 break;
@@ -152,7 +152,7 @@ acpi_extract_package(union acpi_object *package,
152 "Found unsupported element at index=%d\n", 152 "Found unsupported element at index=%d\n",
153 i)); 153 i));
154 /* TBD: handle nested packages... */ 154 /* TBD: handle nested packages... */
155 return_ACPI_STATUS(AE_SUPPORT); 155 return AE_SUPPORT;
156 break; 156 break;
157 } 157 }
158 } 158 }
@@ -162,9 +162,9 @@ acpi_extract_package(union acpi_object *package,
162 */ 162 */
163 if (buffer->length < size_required) { 163 if (buffer->length < size_required) {
164 buffer->length = size_required; 164 buffer->length = size_required;
165 return_ACPI_STATUS(AE_BUFFER_OVERFLOW); 165 return AE_BUFFER_OVERFLOW;
166 } else if (buffer->length != size_required || !buffer->pointer) { 166 } else if (buffer->length != size_required || !buffer->pointer) {
167 return_ACPI_STATUS(AE_BAD_PARAMETER); 167 return AE_BAD_PARAMETER;
168 } 168 }
169 169
170 head = buffer->pointer; 170 head = buffer->pointer;
@@ -179,7 +179,7 @@ acpi_extract_package(union acpi_object *package,
179 union acpi_object *element = &(package->package.elements[i]); 179 union acpi_object *element = &(package->package.elements[i]);
180 180
181 if (!element) { 181 if (!element) {
182 return_ACPI_STATUS(AE_BAD_DATA); 182 return AE_BAD_DATA;
183 } 183 }
184 184
185 switch (element->type) { 185 switch (element->type) {
@@ -244,7 +244,7 @@ acpi_extract_package(union acpi_object *package,
244 } 244 }
245 } 245 }
246 246
247 return_ACPI_STATUS(AE_OK); 247 return AE_OK;
248} 248}
249 249
250EXPORT_SYMBOL(acpi_extract_package); 250EXPORT_SYMBOL(acpi_extract_package);
@@ -258,14 +258,13 @@ acpi_evaluate_integer(acpi_handle handle,
258 union acpi_object *element; 258 union acpi_object *element;
259 struct acpi_buffer buffer = { 0, NULL }; 259 struct acpi_buffer buffer = { 0, NULL };
260 260
261 ACPI_FUNCTION_TRACE("acpi_evaluate_integer");
262 261
263 if (!data) 262 if (!data)
264 return_ACPI_STATUS(AE_BAD_PARAMETER); 263 return AE_BAD_PARAMETER;
265 264
266 element = kmalloc(sizeof(union acpi_object), GFP_KERNEL); 265 element = kmalloc(sizeof(union acpi_object), GFP_KERNEL);
267 if (!element) 266 if (!element)
268 return_ACPI_STATUS(AE_NO_MEMORY); 267 return AE_NO_MEMORY;
269 268
270 memset(element, 0, sizeof(union acpi_object)); 269 memset(element, 0, sizeof(union acpi_object));
271 buffer.length = sizeof(union acpi_object); 270 buffer.length = sizeof(union acpi_object);
@@ -274,13 +273,13 @@ acpi_evaluate_integer(acpi_handle handle,
274 if (ACPI_FAILURE(status)) { 273 if (ACPI_FAILURE(status)) {
275 acpi_util_eval_error(handle, pathname, status); 274 acpi_util_eval_error(handle, pathname, status);
276 kfree(element); 275 kfree(element);
277 return_ACPI_STATUS(status); 276 return status;
278 } 277 }
279 278
280 if (element->type != ACPI_TYPE_INTEGER) { 279 if (element->type != ACPI_TYPE_INTEGER) {
281 acpi_util_eval_error(handle, pathname, AE_BAD_DATA); 280 acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
282 kfree(element); 281 kfree(element);
283 return_ACPI_STATUS(AE_BAD_DATA); 282 return AE_BAD_DATA;
284 } 283 }
285 284
286 *data = element->integer.value; 285 *data = element->integer.value;
@@ -288,7 +287,7 @@ acpi_evaluate_integer(acpi_handle handle,
288 287
289 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data)); 288 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Return value [%lu]\n", *data));
290 289
291 return_ACPI_STATUS(AE_OK); 290 return AE_OK;
292} 291}
293 292
294EXPORT_SYMBOL(acpi_evaluate_integer); 293EXPORT_SYMBOL(acpi_evaluate_integer);
@@ -303,15 +302,14 @@ acpi_evaluate_string(acpi_handle handle,
303 acpi_object *element = NULL; 302 acpi_object *element = NULL;
304 acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 303 acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
305 304
306 ACPI_FUNCTION_TRACE("acpi_evaluate_string");
307 305
308 if (!data) 306 if (!data)
309 return_ACPI_STATUS(AE_BAD_PARAMETER); 307 return AE_BAD_PARAMETER;
310 308
311 status = acpi_evaluate_object(handle, pathname, arguments, &buffer); 309 status = acpi_evaluate_object(handle, pathname, arguments, &buffer);
312 if (ACPI_FAILURE(status)) { 310 if (ACPI_FAILURE(status)) {
313 acpi_util_eval_error(handle, pathname, status); 311 acpi_util_eval_error(handle, pathname, status);
314 return_ACPI_STATUS(status); 312 return status;
315 } 313 }
316 314
317 element = (acpi_object *) buffer.pointer; 315 element = (acpi_object *) buffer.pointer;
@@ -320,13 +318,13 @@ acpi_evaluate_string(acpi_handle handle,
320 || (element->type != ACPI_TYPE_BUFFER) 318 || (element->type != ACPI_TYPE_BUFFER)
321 || !element->string.length) { 319 || !element->string.length) {
322 acpi_util_eval_error(handle, pathname, AE_BAD_DATA); 320 acpi_util_eval_error(handle, pathname, AE_BAD_DATA);
323 return_ACPI_STATUS(AE_BAD_DATA); 321 return AE_BAD_DATA;
324 } 322 }
325 323
326 *data = kmalloc(element->string.length + 1, GFP_KERNEL); 324 *data = kmalloc(element->string.length + 1, GFP_KERNEL);
327 if (!data) { 325 if (!data) {
328 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Memory allocation error\n")); 326 printk(KERN_ERR PREFIX "Memory allocation\n");
329 return_VALUE(-ENOMEM); 327 return -ENOMEM;
330 } 328 }
331 memset(*data, 0, element->string.length + 1); 329 memset(*data, 0, element->string.length + 1);
332 330
@@ -336,7 +334,7 @@ acpi_evaluate_string(acpi_handle handle,
336 334
337 acpi_os_free(buffer.pointer); 335 acpi_os_free(buffer.pointer);
338 336
339 return_ACPI_STATUS(AE_OK); 337 return AE_OK;
340} 338}
341#endif 339#endif
342 340
@@ -352,10 +350,9 @@ acpi_evaluate_reference(acpi_handle handle,
352 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 350 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
353 u32 i = 0; 351 u32 i = 0;
354 352
355 ACPI_FUNCTION_TRACE("acpi_evaluate_reference");
356 353
357 if (!list) { 354 if (!list) {
358 return_ACPI_STATUS(AE_BAD_PARAMETER); 355 return AE_BAD_PARAMETER;
359 } 356 }
360 357
361 /* Evaluate object. */ 358 /* Evaluate object. */
@@ -367,32 +364,29 @@ acpi_evaluate_reference(acpi_handle handle,
367 package = (union acpi_object *)buffer.pointer; 364 package = (union acpi_object *)buffer.pointer;
368 365
369 if ((buffer.length == 0) || !package) { 366 if ((buffer.length == 0) || !package) {
370 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 367 printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n",
371 "No return object (len %X ptr %p)\n", 368 (unsigned)buffer.length, package);
372 (unsigned)buffer.length, package));
373 status = AE_BAD_DATA; 369 status = AE_BAD_DATA;
374 acpi_util_eval_error(handle, pathname, status); 370 acpi_util_eval_error(handle, pathname, status);
375 goto end; 371 goto end;
376 } 372 }
377 if (package->type != ACPI_TYPE_PACKAGE) { 373 if (package->type != ACPI_TYPE_PACKAGE) {
378 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 374 printk(KERN_ERR PREFIX "Expecting a [Package], found type %X\n",
379 "Expecting a [Package], found type %X\n", 375 package->type);
380 package->type));
381 status = AE_BAD_DATA; 376 status = AE_BAD_DATA;
382 acpi_util_eval_error(handle, pathname, status); 377 acpi_util_eval_error(handle, pathname, status);
383 goto end; 378 goto end;
384 } 379 }
385 if (!package->package.count) { 380 if (!package->package.count) {
386 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 381 printk(KERN_ERR PREFIX "[Package] has zero elements (%p)\n",
387 "[Package] has zero elements (%p)\n", 382 package);
388 package));
389 status = AE_BAD_DATA; 383 status = AE_BAD_DATA;
390 acpi_util_eval_error(handle, pathname, status); 384 acpi_util_eval_error(handle, pathname, status);
391 goto end; 385 goto end;
392 } 386 }
393 387
394 if (package->package.count > ACPI_MAX_HANDLES) { 388 if (package->package.count > ACPI_MAX_HANDLES) {
395 return_ACPI_STATUS(AE_NO_MEMORY); 389 return AE_NO_MEMORY;
396 } 390 }
397 list->count = package->package.count; 391 list->count = package->package.count;
398 392
@@ -404,9 +398,9 @@ acpi_evaluate_reference(acpi_handle handle,
404 398
405 if (element->type != ACPI_TYPE_ANY) { 399 if (element->type != ACPI_TYPE_ANY) {
406 status = AE_BAD_DATA; 400 status = AE_BAD_DATA;
407 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 401 printk(KERN_ERR PREFIX
408 "Expecting a [Reference] package element, found type %X\n", 402 "Expecting a [Reference] package element, found type %X\n",
409 element->type)); 403 element->type);
410 acpi_util_eval_error(handle, pathname, status); 404 acpi_util_eval_error(handle, pathname, status);
411 break; 405 break;
412 } 406 }
@@ -426,7 +420,7 @@ acpi_evaluate_reference(acpi_handle handle,
426 420
427 acpi_os_free(buffer.pointer); 421 acpi_os_free(buffer.pointer);
428 422
429 return_ACPI_STATUS(status); 423 return status;
430} 424}
431 425
432EXPORT_SYMBOL(acpi_evaluate_reference); 426EXPORT_SYMBOL(acpi_evaluate_reference);
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index e7e9a693953..9feb633087a 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -272,10 +272,9 @@ static int
272acpi_video_device_query(struct acpi_video_device *device, unsigned long *state) 272acpi_video_device_query(struct acpi_video_device *device, unsigned long *state)
273{ 273{
274 int status; 274 int status;
275 ACPI_FUNCTION_TRACE("acpi_video_device_query");
276 status = acpi_evaluate_integer(device->handle, "_DGS", NULL, state); 275 status = acpi_evaluate_integer(device->handle, "_DGS", NULL, state);
277 276
278 return_VALUE(status); 277 return status;
279} 278}
280 279
281static int 280static int
@@ -284,11 +283,10 @@ acpi_video_device_get_state(struct acpi_video_device *device,
284{ 283{
285 int status; 284 int status;
286 285
287 ACPI_FUNCTION_TRACE("acpi_video_device_get_state");
288 286
289 status = acpi_evaluate_integer(device->handle, "_DCS", NULL, state); 287 status = acpi_evaluate_integer(device->handle, "_DCS", NULL, state);
290 288
291 return_VALUE(status); 289 return status;
292} 290}
293 291
294static int 292static int
@@ -299,12 +297,11 @@ acpi_video_device_set_state(struct acpi_video_device *device, int state)
299 struct acpi_object_list args = { 1, &arg0 }; 297 struct acpi_object_list args = { 1, &arg0 };
300 unsigned long ret; 298 unsigned long ret;
301 299
302 ACPI_FUNCTION_TRACE("acpi_video_device_set_state");
303 300
304 arg0.integer.value = state; 301 arg0.integer.value = state;
305 status = acpi_evaluate_integer(device->handle, "_DSS", &args, &ret); 302 status = acpi_evaluate_integer(device->handle, "_DSS", &args, &ret);
306 303
307 return_VALUE(status); 304 return status;
308} 305}
309 306
310static int 307static int
@@ -315,28 +312,27 @@ acpi_video_device_lcd_query_levels(struct acpi_video_device *device,
315 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 312 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
316 union acpi_object *obj; 313 union acpi_object *obj;
317 314
318 ACPI_FUNCTION_TRACE("acpi_video_device_lcd_query_levels");
319 315
320 *levels = NULL; 316 *levels = NULL;
321 317
322 status = acpi_evaluate_object(device->handle, "_BCL", NULL, &buffer); 318 status = acpi_evaluate_object(device->handle, "_BCL", NULL, &buffer);
323 if (!ACPI_SUCCESS(status)) 319 if (!ACPI_SUCCESS(status))
324 return_VALUE(status); 320 return status;
325 obj = (union acpi_object *)buffer.pointer; 321 obj = (union acpi_object *)buffer.pointer;
326 if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { 322 if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) {
327 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _BCL data\n")); 323 printk(KERN_ERR PREFIX "Invalid _BCL data\n");
328 status = -EFAULT; 324 status = -EFAULT;
329 goto err; 325 goto err;
330 } 326 }
331 327
332 *levels = obj; 328 *levels = obj;
333 329
334 return_VALUE(0); 330 return 0;
335 331
336 err: 332 err:
337 kfree(buffer.pointer); 333 kfree(buffer.pointer);
338 334
339 return_VALUE(status); 335 return status;
340} 336}
341 337
342static int 338static int
@@ -346,13 +342,12 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
346 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 342 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
347 struct acpi_object_list args = { 1, &arg0 }; 343 struct acpi_object_list args = { 1, &arg0 };
348 344
349 ACPI_FUNCTION_TRACE("acpi_video_device_lcd_set_level");
350 345
351 arg0.integer.value = level; 346 arg0.integer.value = level;
352 status = acpi_evaluate_object(device->handle, "_BCM", &args, NULL); 347 status = acpi_evaluate_object(device->handle, "_BCM", &args, NULL);
353 348
354 printk(KERN_DEBUG "set_level status: %x\n", status); 349 printk(KERN_DEBUG "set_level status: %x\n", status);
355 return_VALUE(status); 350 return status;
356} 351}
357 352
358static int 353static int
@@ -360,11 +355,10 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
360 unsigned long *level) 355 unsigned long *level)
361{ 356{
362 int status; 357 int status;
363 ACPI_FUNCTION_TRACE("acpi_video_device_lcd_get_level_current");
364 358
365 status = acpi_evaluate_integer(device->handle, "_BQC", NULL, level); 359 status = acpi_evaluate_integer(device->handle, "_BQC", NULL, level);
366 360
367 return_VALUE(status); 361 return status;
368} 362}
369 363
370static int 364static int
@@ -377,34 +371,33 @@ acpi_video_device_EDID(struct acpi_video_device *device,
377 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 371 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
378 struct acpi_object_list args = { 1, &arg0 }; 372 struct acpi_object_list args = { 1, &arg0 };
379 373
380 ACPI_FUNCTION_TRACE("acpi_video_device_get_EDID");
381 374
382 *edid = NULL; 375 *edid = NULL;
383 376
384 if (!device) 377 if (!device)
385 return_VALUE(-ENODEV); 378 return -ENODEV;
386 if (length == 128) 379 if (length == 128)
387 arg0.integer.value = 1; 380 arg0.integer.value = 1;
388 else if (length == 256) 381 else if (length == 256)
389 arg0.integer.value = 2; 382 arg0.integer.value = 2;
390 else 383 else
391 return_VALUE(-EINVAL); 384 return -EINVAL;
392 385
393 status = acpi_evaluate_object(device->handle, "_DDC", &args, &buffer); 386 status = acpi_evaluate_object(device->handle, "_DDC", &args, &buffer);
394 if (ACPI_FAILURE(status)) 387 if (ACPI_FAILURE(status))
395 return_VALUE(-ENODEV); 388 return -ENODEV;
396 389
397 obj = (union acpi_object *)buffer.pointer; 390 obj = (union acpi_object *)buffer.pointer;
398 391
399 if (obj && obj->type == ACPI_TYPE_BUFFER) 392 if (obj && obj->type == ACPI_TYPE_BUFFER)
400 *edid = obj; 393 *edid = obj;
401 else { 394 else {
402 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DDC data\n")); 395 printk(KERN_ERR PREFIX "Invalid _DDC data\n");
403 status = -EFAULT; 396 status = -EFAULT;
404 kfree(obj); 397 kfree(obj);
405 } 398 }
406 399
407 return_VALUE(status); 400 return status;
408} 401}
409 402
410/* bus */ 403/* bus */
@@ -417,7 +410,6 @@ acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
417 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 410 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
418 struct acpi_object_list args = { 1, &arg0 }; 411 struct acpi_object_list args = { 1, &arg0 };
419 412
420 ACPI_FUNCTION_TRACE("acpi_video_bus_set_POST");
421 413
422 arg0.integer.value = option; 414 arg0.integer.value = option;
423 415
@@ -425,7 +417,7 @@ acpi_video_bus_set_POST(struct acpi_video_bus *video, unsigned long option)
425 if (ACPI_SUCCESS(status)) 417 if (ACPI_SUCCESS(status))
426 status = tmp ? (-EINVAL) : (AE_OK); 418 status = tmp ? (-EINVAL) : (AE_OK);
427 419
428 return_VALUE(status); 420 return status;
429} 421}
430 422
431static int 423static int
@@ -433,11 +425,10 @@ acpi_video_bus_get_POST(struct acpi_video_bus *video, unsigned long *id)
433{ 425{
434 int status; 426 int status;
435 427
436 ACPI_FUNCTION_TRACE("acpi_video_bus_get_POST");
437 428
438 status = acpi_evaluate_integer(video->handle, "_GPD", NULL, id); 429 status = acpi_evaluate_integer(video->handle, "_GPD", NULL, id);
439 430
440 return_VALUE(status); 431 return status;
441} 432}
442 433
443static int 434static int
@@ -445,12 +436,11 @@ acpi_video_bus_POST_options(struct acpi_video_bus *video,
445 unsigned long *options) 436 unsigned long *options)
446{ 437{
447 int status; 438 int status;
448 ACPI_FUNCTION_TRACE("acpi_video_bus_POST_options");
449 439
450 status = acpi_evaluate_integer(video->handle, "_VPO", NULL, options); 440 status = acpi_evaluate_integer(video->handle, "_VPO", NULL, options);
451 *options &= 3; 441 *options &= 3;
452 442
453 return_VALUE(status); 443 return status;
454} 444}
455 445
456/* 446/*
@@ -481,7 +471,6 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
481 union acpi_object arg0 = { ACPI_TYPE_INTEGER }; 471 union acpi_object arg0 = { ACPI_TYPE_INTEGER };
482 struct acpi_object_list args = { 1, &arg0 }; 472 struct acpi_object_list args = { 1, &arg0 };
483 473
484 ACPI_FUNCTION_TRACE("acpi_video_bus_DOS");
485 474
486 if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1) { 475 if (bios_flag < 0 || bios_flag > 3 || lcd_flag < 0 || lcd_flag > 1) {
487 status = -1; 476 status = -1;
@@ -492,7 +481,7 @@ acpi_video_bus_DOS(struct acpi_video_bus *video, int bios_flag, int lcd_flag)
492 acpi_evaluate_object(video->handle, "_DOS", &args, NULL); 481 acpi_evaluate_object(video->handle, "_DOS", &args, NULL);
493 482
494 Failed: 483 Failed:
495 return_VALUE(status); 484 return status;
496} 485}
497 486
498/* 487/*
@@ -514,7 +503,6 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
514 union acpi_object *obj = NULL; 503 union acpi_object *obj = NULL;
515 struct acpi_video_device_brightness *br = NULL; 504 struct acpi_video_device_brightness *br = NULL;
516 505
517 ACPI_FUNCTION_TRACE("acpi_video_device_find_cap");
518 506
519 memset(&device->cap, 0, 4); 507 memset(&device->cap, 0, 4);
520 508
@@ -560,8 +548,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
560 o = (union acpi_object *)&obj->package. 548 o = (union acpi_object *)&obj->package.
561 elements[i]; 549 elements[i];
562 if (o->type != ACPI_TYPE_INTEGER) { 550 if (o->type != ACPI_TYPE_INTEGER) {
563 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 551 printk(KERN_ERR PREFIX "Invalid data\n");
564 "Invalid data\n"));
565 continue; 552 continue;
566 } 553 }
567 br->levels[count] = (u32) o->integer.value; 554 br->levels[count] = (u32) o->integer.value;
@@ -583,7 +570,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device)
583 570
584 kfree(obj); 571 kfree(obj);
585 572
586 return_VOID; 573 return;
587} 574}
588 575
589/* 576/*
@@ -630,10 +617,9 @@ static int acpi_video_bus_check(struct acpi_video_bus *video)
630{ 617{
631 acpi_status status = -ENOENT; 618 acpi_status status = -ENOENT;
632 619
633 ACPI_FUNCTION_TRACE("acpi_video_bus_check");
634 620
635 if (!video) 621 if (!video)
636 return_VALUE(-EINVAL); 622 return -EINVAL;
637 623
638 /* Since there is no HID, CID and so on for VGA driver, we have 624 /* Since there is no HID, CID and so on for VGA driver, we have
639 * to check well known required nodes. 625 * to check well known required nodes.
@@ -657,7 +643,7 @@ static int acpi_video_bus_check(struct acpi_video_bus *video)
657 status = 0; 643 status = 0;
658 } 644 }
659 645
660 return_VALUE(status); 646 return status;
661} 647}
662 648
663/* -------------------------------------------------------------------------- 649/* --------------------------------------------------------------------------
@@ -673,7 +659,6 @@ static int acpi_video_device_info_seq_show(struct seq_file *seq, void *offset)
673 struct acpi_video_device *dev = 659 struct acpi_video_device *dev =
674 (struct acpi_video_device *)seq->private; 660 (struct acpi_video_device *)seq->private;
675 661
676 ACPI_FUNCTION_TRACE("acpi_video_device_info_seq_show");
677 662
678 if (!dev) 663 if (!dev)
679 goto end; 664 goto end;
@@ -692,7 +677,7 @@ static int acpi_video_device_info_seq_show(struct seq_file *seq, void *offset)
692 seq_printf(seq, "known by bios: %s\n", dev->flags.bios ? "yes" : "no"); 677 seq_printf(seq, "known by bios: %s\n", dev->flags.bios ? "yes" : "no");
693 678
694 end: 679 end:
695 return_VALUE(0); 680 return 0;
696} 681}
697 682
698static int 683static int
@@ -709,7 +694,6 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset)
709 (struct acpi_video_device *)seq->private; 694 (struct acpi_video_device *)seq->private;
710 unsigned long state; 695 unsigned long state;
711 696
712 ACPI_FUNCTION_TRACE("acpi_video_device_state_seq_show");
713 697
714 if (!dev) 698 if (!dev)
715 goto end; 699 goto end;
@@ -729,7 +713,7 @@ static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset)
729 seq_printf(seq, "<not supported>\n"); 713 seq_printf(seq, "<not supported>\n");
730 714
731 end: 715 end:
732 return_VALUE(0); 716 return 0;
733} 717}
734 718
735static int 719static int
@@ -750,13 +734,12 @@ acpi_video_device_write_state(struct file *file,
750 char str[12] = { 0 }; 734 char str[12] = { 0 };
751 u32 state = 0; 735 u32 state = 0;
752 736
753 ACPI_FUNCTION_TRACE("acpi_video_device_write_state");
754 737
755 if (!dev || count + 1 > sizeof str) 738 if (!dev || count + 1 > sizeof str)
756 return_VALUE(-EINVAL); 739 return -EINVAL;
757 740
758 if (copy_from_user(str, buffer, count)) 741 if (copy_from_user(str, buffer, count))
759 return_VALUE(-EFAULT); 742 return -EFAULT;
760 743
761 str[count] = 0; 744 str[count] = 0;
762 state = simple_strtoul(str, NULL, 0); 745 state = simple_strtoul(str, NULL, 0);
@@ -765,9 +748,9 @@ acpi_video_device_write_state(struct file *file,
765 status = acpi_video_device_set_state(dev, state); 748 status = acpi_video_device_set_state(dev, state);
766 749
767 if (status) 750 if (status)
768 return_VALUE(-EFAULT); 751 return -EFAULT;
769 752
770 return_VALUE(count); 753 return count;
771} 754}
772 755
773static int 756static int
@@ -777,11 +760,10 @@ acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset)
777 (struct acpi_video_device *)seq->private; 760 (struct acpi_video_device *)seq->private;
778 int i; 761 int i;
779 762
780 ACPI_FUNCTION_TRACE("acpi_video_device_brightness_seq_show");
781 763
782 if (!dev || !dev->brightness) { 764 if (!dev || !dev->brightness) {
783 seq_printf(seq, "<not supported>\n"); 765 seq_printf(seq, "<not supported>\n");
784 return_VALUE(0); 766 return 0;
785 } 767 }
786 768
787 seq_printf(seq, "levels: "); 769 seq_printf(seq, "levels: ");
@@ -789,7 +771,7 @@ acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset)
789 seq_printf(seq, " %d", dev->brightness->levels[i]); 771 seq_printf(seq, " %d", dev->brightness->levels[i]);
790 seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr); 772 seq_printf(seq, "\ncurrent: %d\n", dev->brightness->curr);
791 773
792 return_VALUE(0); 774 return 0;
793} 775}
794 776
795static int 777static int
@@ -810,19 +792,18 @@ acpi_video_device_write_brightness(struct file *file,
810 unsigned int level = 0; 792 unsigned int level = 0;
811 int i; 793 int i;
812 794
813 ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");
814 795
815 if (!dev || !dev->brightness || count + 1 > sizeof str) 796 if (!dev || !dev->brightness || count + 1 > sizeof str)
816 return_VALUE(-EINVAL); 797 return -EINVAL;
817 798
818 if (copy_from_user(str, buffer, count)) 799 if (copy_from_user(str, buffer, count))
819 return_VALUE(-EFAULT); 800 return -EFAULT;
820 801
821 str[count] = 0; 802 str[count] = 0;
822 level = simple_strtoul(str, NULL, 0); 803 level = simple_strtoul(str, NULL, 0);
823 804
824 if (level > 100) 805 if (level > 100)
825 return_VALUE(-EFAULT); 806 return -EFAULT;
826 807
827 /* validate though the list of available levels */ 808 /* validate though the list of available levels */
828 for (i = 0; i < dev->brightness->count; i++) 809 for (i = 0; i < dev->brightness->count; i++)
@@ -833,7 +814,7 @@ acpi_video_device_write_brightness(struct file *file,
833 break; 814 break;
834 } 815 }
835 816
836 return_VALUE(count); 817 return count;
837} 818}
838 819
839static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset) 820static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset)
@@ -844,7 +825,6 @@ static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset)
844 int i; 825 int i;
845 union acpi_object *edid = NULL; 826 union acpi_object *edid = NULL;
846 827
847 ACPI_FUNCTION_TRACE("acpi_video_device_EDID_seq_show");
848 828
849 if (!dev) 829 if (!dev)
850 goto out; 830 goto out;
@@ -869,7 +849,7 @@ static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset)
869 else 849 else
870 kfree(edid); 850 kfree(edid);
871 851
872 return_VALUE(0); 852 return 0;
873} 853}
874 854
875static int 855static int
@@ -884,28 +864,26 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
884 struct proc_dir_entry *entry = NULL; 864 struct proc_dir_entry *entry = NULL;
885 struct acpi_video_device *vid_dev; 865 struct acpi_video_device *vid_dev;
886 866
887 ACPI_FUNCTION_TRACE("acpi_video_device_add_fs");
888 867
889 if (!device) 868 if (!device)
890 return_VALUE(-ENODEV); 869 return -ENODEV;
891 870
892 vid_dev = (struct acpi_video_device *)acpi_driver_data(device); 871 vid_dev = (struct acpi_video_device *)acpi_driver_data(device);
893 if (!vid_dev) 872 if (!vid_dev)
894 return_VALUE(-ENODEV); 873 return -ENODEV;
895 874
896 if (!acpi_device_dir(device)) { 875 if (!acpi_device_dir(device)) {
897 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 876 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
898 vid_dev->video->dir); 877 vid_dev->video->dir);
899 if (!acpi_device_dir(device)) 878 if (!acpi_device_dir(device))
900 return_VALUE(-ENODEV); 879 return -ENODEV;
901 acpi_device_dir(device)->owner = THIS_MODULE; 880 acpi_device_dir(device)->owner = THIS_MODULE;
902 } 881 }
903 882
904 /* 'info' [R] */ 883 /* 'info' [R] */
905 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); 884 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device));
906 if (!entry) 885 if (!entry)
907 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 886 return -ENODEV;
908 "Unable to create 'info' fs entry\n"));
909 else { 887 else {
910 entry->proc_fops = &acpi_video_device_info_fops; 888 entry->proc_fops = &acpi_video_device_info_fops;
911 entry->data = acpi_driver_data(device); 889 entry->data = acpi_driver_data(device);
@@ -917,8 +895,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
917 create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR, 895 create_proc_entry("state", S_IFREG | S_IRUGO | S_IWUSR,
918 acpi_device_dir(device)); 896 acpi_device_dir(device));
919 if (!entry) 897 if (!entry)
920 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 898 return -ENODEV;
921 "Unable to create 'state' fs entry\n"));
922 else { 899 else {
923 acpi_video_device_state_fops.write = acpi_video_device_write_state; 900 acpi_video_device_state_fops.write = acpi_video_device_write_state;
924 entry->proc_fops = &acpi_video_device_state_fops; 901 entry->proc_fops = &acpi_video_device_state_fops;
@@ -931,8 +908,7 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
931 create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR, 908 create_proc_entry("brightness", S_IFREG | S_IRUGO | S_IWUSR,
932 acpi_device_dir(device)); 909 acpi_device_dir(device));
933 if (!entry) 910 if (!entry)
934 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 911 return -ENODEV;
935 "Unable to create 'brightness' fs entry\n"));
936 else { 912 else {
937 acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness; 913 acpi_video_device_brightness_fops.write = acpi_video_device_write_brightness;
938 entry->proc_fops = &acpi_video_device_brightness_fops; 914 entry->proc_fops = &acpi_video_device_brightness_fops;
@@ -943,25 +919,23 @@ static int acpi_video_device_add_fs(struct acpi_device *device)
943 /* 'EDID' [R] */ 919 /* 'EDID' [R] */
944 entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device)); 920 entry = create_proc_entry("EDID", S_IRUGO, acpi_device_dir(device));
945 if (!entry) 921 if (!entry)
946 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 922 return -ENODEV;
947 "Unable to create 'brightness' fs entry\n"));
948 else { 923 else {
949 entry->proc_fops = &acpi_video_device_EDID_fops; 924 entry->proc_fops = &acpi_video_device_EDID_fops;
950 entry->data = acpi_driver_data(device); 925 entry->data = acpi_driver_data(device);
951 entry->owner = THIS_MODULE; 926 entry->owner = THIS_MODULE;
952 } 927 }
953 928
954 return_VALUE(0); 929 return 0;
955} 930}
956 931
957static int acpi_video_device_remove_fs(struct acpi_device *device) 932static int acpi_video_device_remove_fs(struct acpi_device *device)
958{ 933{
959 struct acpi_video_device *vid_dev; 934 struct acpi_video_device *vid_dev;
960 ACPI_FUNCTION_TRACE("acpi_video_device_remove_fs");
961 935
962 vid_dev = (struct acpi_video_device *)acpi_driver_data(device); 936 vid_dev = (struct acpi_video_device *)acpi_driver_data(device);
963 if (!vid_dev || !vid_dev->video || !vid_dev->video->dir) 937 if (!vid_dev || !vid_dev->video || !vid_dev->video->dir)
964 return_VALUE(-ENODEV); 938 return -ENODEV;
965 939
966 if (acpi_device_dir(device)) { 940 if (acpi_device_dir(device)) {
967 remove_proc_entry("info", acpi_device_dir(device)); 941 remove_proc_entry("info", acpi_device_dir(device));
@@ -972,7 +946,7 @@ static int acpi_video_device_remove_fs(struct acpi_device *device)
972 acpi_device_dir(device) = NULL; 946 acpi_device_dir(device) = NULL;
973 } 947 }
974 948
975 return_VALUE(0); 949 return 0;
976} 950}
977 951
978/* video bus */ 952/* video bus */
@@ -980,7 +954,6 @@ static int acpi_video_bus_info_seq_show(struct seq_file *seq, void *offset)
980{ 954{
981 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 955 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private;
982 956
983 ACPI_FUNCTION_TRACE("acpi_video_bus_info_seq_show");
984 957
985 if (!video) 958 if (!video)
986 goto end; 959 goto end;
@@ -993,7 +966,7 @@ static int acpi_video_bus_info_seq_show(struct seq_file *seq, void *offset)
993 video->flags.post ? "yes" : "no"); 966 video->flags.post ? "yes" : "no");
994 967
995 end: 968 end:
996 return_VALUE(0); 969 return 0;
997} 970}
998 971
999static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file) 972static int acpi_video_bus_info_open_fs(struct inode *inode, struct file *file)
@@ -1006,7 +979,6 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset)
1006{ 979{
1007 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 980 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private;
1008 981
1009 ACPI_FUNCTION_TRACE("acpi_video_bus_ROM_seq_show");
1010 982
1011 if (!video) 983 if (!video)
1012 goto end; 984 goto end;
@@ -1015,7 +987,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset)
1015 seq_printf(seq, "<TODO>\n"); 987 seq_printf(seq, "<TODO>\n");
1016 988
1017 end: 989 end:
1018 return_VALUE(0); 990 return 0;
1019} 991}
1020 992
1021static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file) 993static int acpi_video_bus_ROM_open_fs(struct inode *inode, struct file *file)
@@ -1029,7 +1001,6 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
1029 unsigned long options; 1001 unsigned long options;
1030 int status; 1002 int status;
1031 1003
1032 ACPI_FUNCTION_TRACE("acpi_video_bus_POST_info_seq_show");
1033 1004
1034 if (!video) 1005 if (!video)
1035 goto end; 1006 goto end;
@@ -1052,7 +1023,7 @@ static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset)
1052 } else 1023 } else
1053 seq_printf(seq, "<not supported>\n"); 1024 seq_printf(seq, "<not supported>\n");
1054 end: 1025 end:
1055 return_VALUE(0); 1026 return 0;
1056} 1027}
1057 1028
1058static int 1029static int
@@ -1068,7 +1039,6 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset)
1068 int status; 1039 int status;
1069 unsigned long id; 1040 unsigned long id;
1070 1041
1071 ACPI_FUNCTION_TRACE("acpi_video_bus_POST_seq_show");
1072 1042
1073 if (!video) 1043 if (!video)
1074 goto end; 1044 goto end;
@@ -1081,18 +1051,17 @@ static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset)
1081 seq_printf(seq, "device posted is <%s>\n", device_decode[id & 3]); 1051 seq_printf(seq, "device posted is <%s>\n", device_decode[id & 3]);
1082 1052
1083 end: 1053 end:
1084 return_VALUE(0); 1054 return 0;
1085} 1055}
1086 1056
1087static int acpi_video_bus_DOS_seq_show(struct seq_file *seq, void *offset) 1057static int acpi_video_bus_DOS_seq_show(struct seq_file *seq, void *offset)
1088{ 1058{
1089 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 1059 struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private;
1090 1060
1091 ACPI_FUNCTION_TRACE("acpi_video_bus_DOS_seq_show");
1092 1061
1093 seq_printf(seq, "DOS setting: <%d>\n", video->dos_setting); 1062 seq_printf(seq, "DOS setting: <%d>\n", video->dos_setting);
1094 1063
1095 return_VALUE(0); 1064 return 0;
1096} 1065}
1097 1066
1098static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file) 1067static int acpi_video_bus_POST_open_fs(struct inode *inode, struct file *file)
@@ -1117,22 +1086,21 @@ acpi_video_bus_write_POST(struct file *file,
1117 char str[12] = { 0 }; 1086 char str[12] = { 0 };
1118 unsigned long opt, options; 1087 unsigned long opt, options;
1119 1088
1120 ACPI_FUNCTION_TRACE("acpi_video_bus_write_POST");
1121 1089
1122 if (!video || count + 1 > sizeof str) 1090 if (!video || count + 1 > sizeof str)
1123 return_VALUE(-EINVAL); 1091 return -EINVAL;
1124 1092
1125 status = acpi_video_bus_POST_options(video, &options); 1093 status = acpi_video_bus_POST_options(video, &options);
1126 if (!ACPI_SUCCESS(status)) 1094 if (!ACPI_SUCCESS(status))
1127 return_VALUE(-EINVAL); 1095 return -EINVAL;
1128 1096
1129 if (copy_from_user(str, buffer, count)) 1097 if (copy_from_user(str, buffer, count))
1130 return_VALUE(-EFAULT); 1098 return -EFAULT;
1131 1099
1132 str[count] = 0; 1100 str[count] = 0;
1133 opt = strtoul(str, NULL, 0); 1101 opt = strtoul(str, NULL, 0);
1134 if (opt > 3) 1102 if (opt > 3)
1135 return_VALUE(-EFAULT); 1103 return -EFAULT;
1136 1104
1137 /* just in case an OEM 'forget' the motherboard... */ 1105 /* just in case an OEM 'forget' the motherboard... */
1138 options |= 1; 1106 options |= 1;
@@ -1140,11 +1108,11 @@ acpi_video_bus_write_POST(struct file *file,
1140 if (options & (1ul << opt)) { 1108 if (options & (1ul << opt)) {
1141 status = acpi_video_bus_set_POST(video, opt); 1109 status = acpi_video_bus_set_POST(video, opt);
1142 if (!ACPI_SUCCESS(status)) 1110 if (!ACPI_SUCCESS(status))
1143 return_VALUE(-EFAULT); 1111 return -EFAULT;
1144 1112
1145 } 1113 }
1146 1114
1147 return_VALUE(count); 1115 return count;
1148} 1116}
1149 1117
1150static ssize_t 1118static ssize_t
@@ -1158,25 +1126,24 @@ acpi_video_bus_write_DOS(struct file *file,
1158 char str[12] = { 0 }; 1126 char str[12] = { 0 };
1159 unsigned long opt; 1127 unsigned long opt;
1160 1128
1161 ACPI_FUNCTION_TRACE("acpi_video_bus_write_DOS");
1162 1129
1163 if (!video || count + 1 > sizeof str) 1130 if (!video || count + 1 > sizeof str)
1164 return_VALUE(-EINVAL); 1131 return -EINVAL;
1165 1132
1166 if (copy_from_user(str, buffer, count)) 1133 if (copy_from_user(str, buffer, count))
1167 return_VALUE(-EFAULT); 1134 return -EFAULT;
1168 1135
1169 str[count] = 0; 1136 str[count] = 0;
1170 opt = strtoul(str, NULL, 0); 1137 opt = strtoul(str, NULL, 0);
1171 if (opt > 7) 1138 if (opt > 7)
1172 return_VALUE(-EFAULT); 1139 return -EFAULT;
1173 1140
1174 status = acpi_video_bus_DOS(video, opt & 0x3, (opt & 0x4) >> 2); 1141 status = acpi_video_bus_DOS(video, opt & 0x3, (opt & 0x4) >> 2);
1175 1142
1176 if (!ACPI_SUCCESS(status)) 1143 if (!ACPI_SUCCESS(status))
1177 return_VALUE(-EFAULT); 1144 return -EFAULT;
1178 1145
1179 return_VALUE(count); 1146 return count;
1180} 1147}
1181 1148
1182static int acpi_video_bus_add_fs(struct acpi_device *device) 1149static int acpi_video_bus_add_fs(struct acpi_device *device)
@@ -1184,7 +1151,6 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1184 struct proc_dir_entry *entry = NULL; 1151 struct proc_dir_entry *entry = NULL;
1185 struct acpi_video_bus *video; 1152 struct acpi_video_bus *video;
1186 1153
1187 ACPI_FUNCTION_TRACE("acpi_video_bus_add_fs");
1188 1154
1189 video = (struct acpi_video_bus *)acpi_driver_data(device); 1155 video = (struct acpi_video_bus *)acpi_driver_data(device);
1190 1156
@@ -1192,7 +1158,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1192 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), 1158 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device),
1193 acpi_video_dir); 1159 acpi_video_dir);
1194 if (!acpi_device_dir(device)) 1160 if (!acpi_device_dir(device))
1195 return_VALUE(-ENODEV); 1161 return -ENODEV;
1196 video->dir = acpi_device_dir(device); 1162 video->dir = acpi_device_dir(device);
1197 acpi_device_dir(device)->owner = THIS_MODULE; 1163 acpi_device_dir(device)->owner = THIS_MODULE;
1198 } 1164 }
@@ -1200,8 +1166,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1200 /* 'info' [R] */ 1166 /* 'info' [R] */
1201 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device)); 1167 entry = create_proc_entry("info", S_IRUGO, acpi_device_dir(device));
1202 if (!entry) 1168 if (!entry)
1203 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1169 return -ENODEV;
1204 "Unable to create 'info' fs entry\n"));
1205 else { 1170 else {
1206 entry->proc_fops = &acpi_video_bus_info_fops; 1171 entry->proc_fops = &acpi_video_bus_info_fops;
1207 entry->data = acpi_driver_data(device); 1172 entry->data = acpi_driver_data(device);
@@ -1211,8 +1176,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1211 /* 'ROM' [R] */ 1176 /* 'ROM' [R] */
1212 entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device)); 1177 entry = create_proc_entry("ROM", S_IRUGO, acpi_device_dir(device));
1213 if (!entry) 1178 if (!entry)
1214 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1179 return -ENODEV;
1215 "Unable to create 'ROM' fs entry\n"));
1216 else { 1180 else {
1217 entry->proc_fops = &acpi_video_bus_ROM_fops; 1181 entry->proc_fops = &acpi_video_bus_ROM_fops;
1218 entry->data = acpi_driver_data(device); 1182 entry->data = acpi_driver_data(device);
@@ -1223,8 +1187,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1223 entry = 1187 entry =
1224 create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device)); 1188 create_proc_entry("POST_info", S_IRUGO, acpi_device_dir(device));
1225 if (!entry) 1189 if (!entry)
1226 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1190 return -ENODEV;
1227 "Unable to create 'POST_info' fs entry\n"));
1228 else { 1191 else {
1229 entry->proc_fops = &acpi_video_bus_POST_info_fops; 1192 entry->proc_fops = &acpi_video_bus_POST_info_fops;
1230 entry->data = acpi_driver_data(device); 1193 entry->data = acpi_driver_data(device);
@@ -1236,8 +1199,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1236 create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR, 1199 create_proc_entry("POST", S_IFREG | S_IRUGO | S_IRUSR,
1237 acpi_device_dir(device)); 1200 acpi_device_dir(device));
1238 if (!entry) 1201 if (!entry)
1239 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1202 return -ENODEV;
1240 "Unable to create 'POST' fs entry\n"));
1241 else { 1203 else {
1242 acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST; 1204 acpi_video_bus_POST_fops.write = acpi_video_bus_write_POST;
1243 entry->proc_fops = &acpi_video_bus_POST_fops; 1205 entry->proc_fops = &acpi_video_bus_POST_fops;
@@ -1250,8 +1212,7 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1250 create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR, 1212 create_proc_entry("DOS", S_IFREG | S_IRUGO | S_IRUSR,
1251 acpi_device_dir(device)); 1213 acpi_device_dir(device));
1252 if (!entry) 1214 if (!entry)
1253 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1215 return -ENODEV;
1254 "Unable to create 'DOS' fs entry\n"));
1255 else { 1216 else {
1256 acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS; 1217 acpi_video_bus_DOS_fops.write = acpi_video_bus_write_DOS;
1257 entry->proc_fops = &acpi_video_bus_DOS_fops; 1218 entry->proc_fops = &acpi_video_bus_DOS_fops;
@@ -1259,14 +1220,13 @@ static int acpi_video_bus_add_fs(struct acpi_device *device)
1259 entry->owner = THIS_MODULE; 1220 entry->owner = THIS_MODULE;
1260 } 1221 }
1261 1222
1262 return_VALUE(0); 1223 return 0;
1263} 1224}
1264 1225
1265static int acpi_video_bus_remove_fs(struct acpi_device *device) 1226static int acpi_video_bus_remove_fs(struct acpi_device *device)
1266{ 1227{
1267 struct acpi_video_bus *video; 1228 struct acpi_video_bus *video;
1268 1229
1269 ACPI_FUNCTION_TRACE("acpi_video_bus_remove_fs");
1270 1230
1271 video = (struct acpi_video_bus *)acpi_driver_data(device); 1231 video = (struct acpi_video_bus *)acpi_driver_data(device);
1272 1232
@@ -1280,7 +1240,7 @@ static int acpi_video_bus_remove_fs(struct acpi_device *device)
1280 acpi_device_dir(device) = NULL; 1240 acpi_device_dir(device) = NULL;
1281 } 1241 }
1282 1242
1283 return_VALUE(0); 1243 return 0;
1284} 1244}
1285 1245
1286/* -------------------------------------------------------------------------- 1246/* --------------------------------------------------------------------------
@@ -1297,10 +1257,9 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
1297 int status; 1257 int status;
1298 struct acpi_video_device *data; 1258 struct acpi_video_device *data;
1299 1259
1300 ACPI_FUNCTION_TRACE("acpi_video_bus_get_one_device");
1301 1260
1302 if (!device || !video) 1261 if (!device || !video)
1303 return_VALUE(-EINVAL); 1262 return -EINVAL;
1304 1263
1305 status = 1264 status =
1306 acpi_evaluate_integer(device->handle, "_ADR", NULL, &device_id); 1265 acpi_evaluate_integer(device->handle, "_ADR", NULL, &device_id);
@@ -1308,7 +1267,7 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
1308 1267
1309 data = kmalloc(sizeof(struct acpi_video_device), GFP_KERNEL); 1268 data = kmalloc(sizeof(struct acpi_video_device), GFP_KERNEL);
1310 if (!data) 1269 if (!data)
1311 return_VALUE(-ENOMEM); 1270 return -ENOMEM;
1312 1271
1313 memset(data, 0, sizeof(struct acpi_video_device)); 1272 memset(data, 0, sizeof(struct acpi_video_device));
1314 1273
@@ -1359,10 +1318,10 @@ acpi_video_bus_get_one_device(struct acpi_device *device,
1359 1318
1360 acpi_video_device_add_fs(device); 1319 acpi_video_device_add_fs(device);
1361 1320
1362 return_VALUE(0); 1321 return 0;
1363 } 1322 }
1364 1323
1365 return_VALUE(-ENOENT); 1324 return -ENOENT;
1366} 1325}
1367 1326
1368/* 1327/*
@@ -1405,7 +1364,6 @@ acpi_video_device_bind(struct acpi_video_bus *video,
1405 struct acpi_video_device *device) 1364 struct acpi_video_device *device)
1406{ 1365{
1407 int i; 1366 int i;
1408 ACPI_FUNCTION_TRACE("acpi_video_device_bind");
1409 1367
1410#define IDS_VAL(i) video->attached_array[i].value.int_val 1368#define IDS_VAL(i) video->attached_array[i].value.int_val
1411#define IDS_BIND(i) video->attached_array[i].bind_info 1369#define IDS_BIND(i) video->attached_array[i].bind_info
@@ -1442,17 +1400,16 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1442 union acpi_object *dod = NULL; 1400 union acpi_object *dod = NULL;
1443 union acpi_object *obj; 1401 union acpi_object *obj;
1444 1402
1445 ACPI_FUNCTION_TRACE("acpi_video_device_enumerate");
1446 1403
1447 status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer); 1404 status = acpi_evaluate_object(video->handle, "_DOD", NULL, &buffer);
1448 if (!ACPI_SUCCESS(status)) { 1405 if (!ACPI_SUCCESS(status)) {
1449 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Error evaluating _DOD\n")); 1406 ACPI_EXCEPTION((AE_INFO, status, "Evaluating _DOD"));
1450 return_VALUE(status); 1407 return status;
1451 } 1408 }
1452 1409
1453 dod = (union acpi_object *)buffer.pointer; 1410 dod = (union acpi_object *)buffer.pointer;
1454 if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) { 1411 if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) {
1455 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _DOD data\n")); 1412 ACPI_EXCEPTION((AE_INFO, status, "Invalid _DOD data"));
1456 status = -EFAULT; 1413 status = -EFAULT;
1457 goto out; 1414 goto out;
1458 } 1415 }
@@ -1476,8 +1433,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1476 obj = (union acpi_object *)&dod->package.elements[i]; 1433 obj = (union acpi_object *)&dod->package.elements[i];
1477 1434
1478 if (obj->type != ACPI_TYPE_INTEGER) { 1435 if (obj->type != ACPI_TYPE_INTEGER) {
1479 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1436 printk(KERN_ERR PREFIX "Invalid _DOD data\n");
1480 "Invalid _DOD data\n"));
1481 active_device_list[i].value.int_val = 1437 active_device_list[i].value.int_val =
1482 ACPI_VIDEO_HEAD_INVALID; 1438 ACPI_VIDEO_HEAD_INVALID;
1483 } 1439 }
@@ -1495,7 +1451,7 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video)
1495 video->attached_count = count; 1451 video->attached_count = count;
1496 out: 1452 out:
1497 acpi_os_free(buffer.pointer); 1453 acpi_os_free(buffer.pointer);
1498 return_VALUE(status); 1454 return status;
1499} 1455}
1500 1456
1501/* 1457/*
@@ -1520,7 +1476,6 @@ static int acpi_video_switch_output(struct acpi_video_bus *video, int event)
1520 unsigned long state; 1476 unsigned long state;
1521 int status = 0; 1477 int status = 0;
1522 1478
1523 ACPI_FUNCTION_TRACE("acpi_video_switch_output");
1524 1479
1525 list_for_each_safe(node, next, &video->video_device_list) { 1480 list_for_each_safe(node, next, &video->video_device_list) {
1526 dev = container_of(node, struct acpi_video_device, entry); 1481 dev = container_of(node, struct acpi_video_device, entry);
@@ -1551,7 +1506,7 @@ static int acpi_video_switch_output(struct acpi_video_bus *video, int event)
1551 break; 1506 break;
1552 } 1507 }
1553 1508
1554 return_VALUE(status); 1509 return status;
1555} 1510}
1556 1511
1557static int 1512static int
@@ -1578,7 +1533,6 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
1578 int status = 0; 1533 int status = 0;
1579 struct list_head *node, *next; 1534 struct list_head *node, *next;
1580 1535
1581 ACPI_FUNCTION_TRACE("acpi_video_get_devices");
1582 1536
1583 acpi_video_device_enumerate(video); 1537 acpi_video_device_enumerate(video);
1584 1538
@@ -1591,13 +1545,12 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video,
1591 1545
1592 status = acpi_video_bus_get_one_device(dev, video); 1546 status = acpi_video_bus_get_one_device(dev, video);
1593 if (ACPI_FAILURE(status)) { 1547 if (ACPI_FAILURE(status)) {
1594 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1548 ACPI_EXCEPTION((AE_INFO, status, "Cant attach device"));
1595 "Cant attach device\n"));
1596 continue; 1549 continue;
1597 } 1550 }
1598 1551
1599 } 1552 }
1600 return_VALUE(status); 1553 return status;
1601} 1554}
1602 1555
1603static int acpi_video_bus_put_one_device(struct acpi_video_device *device) 1556static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
@@ -1605,10 +1558,9 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
1605 acpi_status status; 1558 acpi_status status;
1606 struct acpi_video_bus *video; 1559 struct acpi_video_bus *video;
1607 1560
1608 ACPI_FUNCTION_TRACE("acpi_video_bus_put_one_device");
1609 1561
1610 if (!device || !device->video) 1562 if (!device || !device->video)
1611 return_VALUE(-ENOENT); 1563 return -ENOENT;
1612 1564
1613 video = device->video; 1565 video = device->video;
1614 1566
@@ -1620,11 +1572,8 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device)
1620 status = acpi_remove_notify_handler(device->handle, 1572 status = acpi_remove_notify_handler(device->handle,
1621 ACPI_DEVICE_NOTIFY, 1573 ACPI_DEVICE_NOTIFY,
1622 acpi_video_device_notify); 1574 acpi_video_device_notify);
1623 if (ACPI_FAILURE(status))
1624 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1625 "Error removing notify handler\n"));
1626 1575
1627 return_VALUE(0); 1576 return 0;
1628} 1577}
1629 1578
1630static int acpi_video_bus_put_devices(struct acpi_video_bus *video) 1579static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
@@ -1632,7 +1581,6 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
1632 int status; 1581 int status;
1633 struct list_head *node, *next; 1582 struct list_head *node, *next;
1634 1583
1635 ACPI_FUNCTION_TRACE("acpi_video_bus_put_devices");
1636 1584
1637 list_for_each_safe(node, next, &video->video_device_list) { 1585 list_for_each_safe(node, next, &video->video_device_list) {
1638 struct acpi_video_device *data = 1586 struct acpi_video_device *data =
@@ -1651,7 +1599,7 @@ static int acpi_video_bus_put_devices(struct acpi_video_bus *video)
1651 kfree(data); 1599 kfree(data);
1652 } 1600 }
1653 1601
1654 return_VALUE(0); 1602 return 0;
1655} 1603}
1656 1604
1657/* acpi_video interface */ 1605/* acpi_video interface */
@@ -1671,14 +1619,13 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1671 struct acpi_video_bus *video = (struct acpi_video_bus *)data; 1619 struct acpi_video_bus *video = (struct acpi_video_bus *)data;
1672 struct acpi_device *device = NULL; 1620 struct acpi_device *device = NULL;
1673 1621
1674 ACPI_FUNCTION_TRACE("acpi_video_bus_notify");
1675 printk("video bus notify\n"); 1622 printk("video bus notify\n");
1676 1623
1677 if (!video) 1624 if (!video)
1678 return_VOID; 1625 return;
1679 1626
1680 if (acpi_bus_get_device(handle, &device)) 1627 if (acpi_bus_get_device(handle, &device))
1681 return_VOID; 1628 return;
1682 1629
1683 switch (event) { 1630 switch (event) {
1684 case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur, 1631 case ACPI_VIDEO_NOTIFY_SWITCH: /* User request that a switch occur,
@@ -1707,7 +1654,7 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data)
1707 break; 1654 break;
1708 } 1655 }
1709 1656
1710 return_VOID; 1657 return;
1711} 1658}
1712 1659
1713static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) 1660static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
@@ -1716,14 +1663,13 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
1716 (struct acpi_video_device *)data; 1663 (struct acpi_video_device *)data;
1717 struct acpi_device *device = NULL; 1664 struct acpi_device *device = NULL;
1718 1665
1719 ACPI_FUNCTION_TRACE("acpi_video_device_notify");
1720 1666
1721 printk("video device notify\n"); 1667 printk("video device notify\n");
1722 if (!video_device) 1668 if (!video_device)
1723 return_VOID; 1669 return;
1724 1670
1725 if (acpi_bus_get_device(handle, &device)) 1671 if (acpi_bus_get_device(handle, &device))
1726 return_VOID; 1672 return;
1727 1673
1728 switch (event) { 1674 switch (event) {
1729 case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */ 1675 case ACPI_VIDEO_NOTIFY_SWITCH: /* change in status (cycle output device) */
@@ -1743,7 +1689,7 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data)
1743 "Unsupported event [0x%x]\n", event)); 1689 "Unsupported event [0x%x]\n", event));
1744 break; 1690 break;
1745 } 1691 }
1746 return_VOID; 1692 return;
1747} 1693}
1748 1694
1749static int acpi_video_bus_add(struct acpi_device *device) 1695static int acpi_video_bus_add(struct acpi_device *device)
@@ -1752,14 +1698,13 @@ static int acpi_video_bus_add(struct acpi_device *device)
1752 acpi_status status = 0; 1698 acpi_status status = 0;
1753 struct acpi_video_bus *video = NULL; 1699 struct acpi_video_bus *video = NULL;
1754 1700
1755 ACPI_FUNCTION_TRACE("acpi_video_bus_add");
1756 1701
1757 if (!device) 1702 if (!device)
1758 return_VALUE(-EINVAL); 1703 return -EINVAL;
1759 1704
1760 video = kmalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); 1705 video = kmalloc(sizeof(struct acpi_video_bus), GFP_KERNEL);
1761 if (!video) 1706 if (!video)
1762 return_VALUE(-ENOMEM); 1707 return -ENOMEM;
1763 memset(video, 0, sizeof(struct acpi_video_bus)); 1708 memset(video, 0, sizeof(struct acpi_video_bus));
1764 1709
1765 video->handle = device->handle; 1710 video->handle = device->handle;
@@ -1806,7 +1751,7 @@ static int acpi_video_bus_add(struct acpi_device *device)
1806 if (result) 1751 if (result)
1807 kfree(video); 1752 kfree(video);
1808 1753
1809 return_VALUE(result); 1754 return result;
1810} 1755}
1811 1756
1812static int acpi_video_bus_remove(struct acpi_device *device, int type) 1757static int acpi_video_bus_remove(struct acpi_device *device, int type)
@@ -1814,10 +1759,9 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
1814 acpi_status status = 0; 1759 acpi_status status = 0;
1815 struct acpi_video_bus *video = NULL; 1760 struct acpi_video_bus *video = NULL;
1816 1761
1817 ACPI_FUNCTION_TRACE("acpi_video_bus_remove");
1818 1762
1819 if (!device || !acpi_driver_data(device)) 1763 if (!device || !acpi_driver_data(device))
1820 return_VALUE(-EINVAL); 1764 return -EINVAL;
1821 1765
1822 video = (struct acpi_video_bus *)acpi_driver_data(device); 1766 video = (struct acpi_video_bus *)acpi_driver_data(device);
1823 1767
@@ -1826,9 +1770,6 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
1826 status = acpi_remove_notify_handler(video->handle, 1770 status = acpi_remove_notify_handler(video->handle,
1827 ACPI_DEVICE_NOTIFY, 1771 ACPI_DEVICE_NOTIFY,
1828 acpi_video_bus_notify); 1772 acpi_video_bus_notify);
1829 if (ACPI_FAILURE(status))
1830 ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
1831 "Error removing notify handler\n"));
1832 1773
1833 acpi_video_bus_put_devices(video); 1774 acpi_video_bus_put_devices(video);
1834 acpi_video_bus_remove_fs(device); 1775 acpi_video_bus_remove_fs(device);
@@ -1836,7 +1777,7 @@ static int acpi_video_bus_remove(struct acpi_device *device, int type)
1836 kfree(video->attached_array); 1777 kfree(video->attached_array);
1837 kfree(video); 1778 kfree(video);
1838 1779
1839 return_VALUE(0); 1780 return 0;
1840} 1781}
1841 1782
1842static int 1783static int
@@ -1846,10 +1787,9 @@ acpi_video_bus_match(struct acpi_device *device, struct acpi_driver *driver)
1846 acpi_handle h_dummy2; 1787 acpi_handle h_dummy2;
1847 acpi_handle h_dummy3; 1788 acpi_handle h_dummy3;
1848 1789
1849 ACPI_FUNCTION_TRACE("acpi_video_bus_match");
1850 1790
1851 if (!device || !driver) 1791 if (!device || !driver)
1852 return_VALUE(-EINVAL); 1792 return -EINVAL;
1853 1793
1854 /* Since there is no HID, CID for ACPI Video drivers, we have 1794 /* Since there is no HID, CID for ACPI Video drivers, we have
1855 * to check well known required nodes for each feature we support. 1795 * to check well known required nodes for each feature we support.
@@ -1858,26 +1798,25 @@ acpi_video_bus_match(struct acpi_device *device, struct acpi_driver *driver)
1858 /* Does this device able to support video switching ? */ 1798 /* Does this device able to support video switching ? */
1859 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy1)) && 1799 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOD", &h_dummy1)) &&
1860 ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy2))) 1800 ACPI_SUCCESS(acpi_get_handle(device->handle, "_DOS", &h_dummy2)))
1861 return_VALUE(0); 1801 return 0;
1862 1802
1863 /* Does this device able to retrieve a video ROM ? */ 1803 /* Does this device able to retrieve a video ROM ? */
1864 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy1))) 1804 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_ROM", &h_dummy1)))
1865 return_VALUE(0); 1805 return 0;
1866 1806
1867 /* Does this device able to configure which video head to be POSTed ? */ 1807 /* Does this device able to configure which video head to be POSTed ? */
1868 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy1)) && 1808 if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_VPO", &h_dummy1)) &&
1869 ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy2)) && 1809 ACPI_SUCCESS(acpi_get_handle(device->handle, "_GPD", &h_dummy2)) &&
1870 ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy3))) 1810 ACPI_SUCCESS(acpi_get_handle(device->handle, "_SPD", &h_dummy3)))
1871 return_VALUE(0); 1811 return 0;
1872 1812
1873 return_VALUE(-ENODEV); 1813 return -ENODEV;
1874} 1814}
1875 1815
1876static int __init acpi_video_init(void) 1816static int __init acpi_video_init(void)
1877{ 1817{
1878 int result = 0; 1818 int result = 0;
1879 1819
1880 ACPI_FUNCTION_TRACE("acpi_video_init");
1881 1820
1882 /* 1821 /*
1883 acpi_dbg_level = 0xFFFFFFFF; 1822 acpi_dbg_level = 0xFFFFFFFF;
@@ -1886,27 +1825,26 @@ static int __init acpi_video_init(void)
1886 1825
1887 acpi_video_dir = proc_mkdir(ACPI_VIDEO_CLASS, acpi_root_dir); 1826 acpi_video_dir = proc_mkdir(ACPI_VIDEO_CLASS, acpi_root_dir);
1888 if (!acpi_video_dir) 1827 if (!acpi_video_dir)
1889 return_VALUE(-ENODEV); 1828 return -ENODEV;
1890 acpi_video_dir->owner = THIS_MODULE; 1829 acpi_video_dir->owner = THIS_MODULE;
1891 1830
1892 result = acpi_bus_register_driver(&acpi_video_bus); 1831 result = acpi_bus_register_driver(&acpi_video_bus);
1893 if (result < 0) { 1832 if (result < 0) {
1894 remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); 1833 remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir);
1895 return_VALUE(-ENODEV); 1834 return -ENODEV;
1896 } 1835 }
1897 1836
1898 return_VALUE(0); 1837 return 0;
1899} 1838}
1900 1839
1901static void __exit acpi_video_exit(void) 1840static void __exit acpi_video_exit(void)
1902{ 1841{
1903 ACPI_FUNCTION_TRACE("acpi_video_exit");
1904 1842
1905 acpi_bus_unregister_driver(&acpi_video_bus); 1843 acpi_bus_unregister_driver(&acpi_video_bus);
1906 1844
1907 remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir); 1845 remove_proc_entry(ACPI_VIDEO_CLASS, acpi_root_dir);
1908 1846
1909 return_VOID; 1847 return;
1910} 1848}
1911 1849
1912module_init(acpi_video_init); 1850module_init(acpi_video_init);
diff --git a/drivers/atm/adummy.c b/drivers/atm/adummy.c
index d1387cfe2d3..6cc93de0b71 100644
--- a/drivers/atm/adummy.c
+++ b/drivers/atm/adummy.c
@@ -2,7 +2,6 @@
2 * adummy.c: a dummy ATM driver 2 * adummy.c: a dummy ATM driver
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/version.h> 6#include <linux/version.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c
index 4048681f36d..d3b426313a4 100644
--- a/drivers/atm/ambassador.c
+++ b/drivers/atm/ambassador.c
@@ -2286,7 +2286,7 @@ static int __devinit amb_probe(struct pci_dev *pci_dev, const struct pci_device_
2286 setup_pci_dev(pci_dev); 2286 setup_pci_dev(pci_dev);
2287 2287
2288 // grab (but share) IRQ and install handler 2288 // grab (but share) IRQ and install handler
2289 err = request_irq(irq, interrupt_handler, SA_SHIRQ, DEV_LABEL, dev); 2289 err = request_irq(irq, interrupt_handler, IRQF_SHARED, DEV_LABEL, dev);
2290 if (err < 0) { 2290 if (err < 0) {
2291 PRINTK (KERN_ERR, "request IRQ failed!"); 2291 PRINTK (KERN_ERR, "request IRQ failed!");
2292 goto out_reset; 2292 goto out_reset;
diff --git a/drivers/atm/ambassador.h b/drivers/atm/ambassador.h
index 84a93063cfe..8296420ceae 100644
--- a/drivers/atm/ambassador.h
+++ b/drivers/atm/ambassador.h
@@ -23,7 +23,6 @@
23#ifndef AMBASSADOR_H 23#ifndef AMBASSADOR_H
24#define AMBASSADOR_H 24#define AMBASSADOR_H
25 25
26#include <linux/config.h>
27 26
28#ifdef CONFIG_ATM_AMBASSADOR_DEBUG 27#ifdef CONFIG_ATM_AMBASSADOR_DEBUG
29#define DEBUG_AMBASSADOR 28#define DEBUG_AMBASSADOR
diff --git a/drivers/atm/eni.c b/drivers/atm/eni.c
index c13c4d736ef..df359a6c14f 100644
--- a/drivers/atm/eni.c
+++ b/drivers/atm/eni.c
@@ -4,7 +4,6 @@
4 4
5 5
6#include <linux/module.h> 6#include <linux/module.h>
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/pci.h> 9#include <linux/pci.h>
@@ -1798,7 +1797,7 @@ static int __devinit eni_start(struct atm_dev *dev)
1798 1797
1799 DPRINTK(">eni_start\n"); 1798 DPRINTK(">eni_start\n");
1800 eni_dev = ENI_DEV(dev); 1799 eni_dev = ENI_DEV(dev);
1801 if (request_irq(eni_dev->irq,&eni_int,SA_SHIRQ,DEV_LABEL,dev)) { 1800 if (request_irq(eni_dev->irq,&eni_int,IRQF_SHARED,DEV_LABEL,dev)) {
1802 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", 1801 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",
1803 dev->number,eni_dev->irq); 1802 dev->number,eni_dev->irq);
1804 error = -EAGAIN; 1803 error = -EAGAIN;
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index d40605c1af7..38fc054bd67 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -1829,7 +1829,7 @@ static int __devinit fs_init (struct fs_dev *dev)
1829 init_q (dev, &dev->rx_rq[i], RXB_RQ(i), RXRQ_NENTRIES, 1); 1829 init_q (dev, &dev->rx_rq[i], RXB_RQ(i), RXRQ_NENTRIES, 1);
1830 1830
1831 dev->irq = pci_dev->irq; 1831 dev->irq = pci_dev->irq;
1832 if (request_irq (dev->irq, fs_irq, SA_SHIRQ, "firestream", dev)) { 1832 if (request_irq (dev->irq, fs_irq, IRQF_SHARED, "firestream", dev)) {
1833 printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq); 1833 printk (KERN_WARNING "couldn't get irq %d for firestream.\n", pci_dev->irq);
1834 /* XXX undo all previous stuff... */ 1834 /* XXX undo all previous stuff... */
1835 return 1; 1835 return 1;
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index 92923bf2723..98622130de5 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -25,7 +25,6 @@
25*/ 25*/
26 26
27 27
28#include <linux/config.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/slab.h> 29#include <linux/slab.h>
31#include <linux/init.h> 30#include <linux/init.h>
@@ -2124,7 +2123,7 @@ fore200e_change_qos(struct atm_vcc* vcc,struct atm_qos* qos, int flags)
2124static int __devinit 2123static int __devinit
2125fore200e_irq_request(struct fore200e* fore200e) 2124fore200e_irq_request(struct fore200e* fore200e)
2126{ 2125{
2127 if (request_irq(fore200e->irq, fore200e_interrupt, SA_SHIRQ, fore200e->name, fore200e->atm_dev) < 0) { 2126 if (request_irq(fore200e->irq, fore200e_interrupt, IRQF_SHARED, fore200e->name, fore200e->atm_dev) < 0) {
2128 2127
2129 printk(FORE200E "unable to reserve IRQ %s for device %s\n", 2128 printk(FORE200E "unable to reserve IRQ %s for device %s\n",
2130 fore200e_irq_itoa(fore200e->irq), fore200e->name); 2129 fore200e_irq_itoa(fore200e->irq), fore200e->name);
diff --git a/drivers/atm/fore200e.h b/drivers/atm/fore200e.h
index 2558eb85323..f9abfdac33e 100644
--- a/drivers/atm/fore200e.h
+++ b/drivers/atm/fore200e.h
@@ -3,7 +3,6 @@
3#define _FORE200E_H 3#define _FORE200E_H
4 4
5#ifdef __KERNEL__ 5#ifdef __KERNEL__
6#include <linux/config.h>
7 6
8/* rx buffer sizes */ 7/* rx buffer sizes */
9 8
diff --git a/drivers/atm/he.c b/drivers/atm/he.c
index a486eb1f164..d369130f423 100644
--- a/drivers/atm/he.c
+++ b/drivers/atm/he.c
@@ -55,7 +55,6 @@
55 55
56 */ 56 */
57 57
58#include <linux/config.h>
59#include <linux/module.h> 58#include <linux/module.h>
60#include <linux/kernel.h> 59#include <linux/kernel.h>
61#include <linux/skbuff.h> 60#include <linux/skbuff.h>
@@ -1008,7 +1007,7 @@ he_init_irq(struct he_dev *he_dev)
1008 he_writel(he_dev, 0x0, GRP_54_MAP); 1007 he_writel(he_dev, 0x0, GRP_54_MAP);
1009 he_writel(he_dev, 0x0, GRP_76_MAP); 1008 he_writel(he_dev, 0x0, GRP_76_MAP);
1010 1009
1011 if (request_irq(he_dev->pci_dev->irq, he_irq_handler, SA_INTERRUPT|SA_SHIRQ, DEV_LABEL, he_dev)) { 1010 if (request_irq(he_dev->pci_dev->irq, he_irq_handler, IRQF_DISABLED|IRQF_SHARED, DEV_LABEL, he_dev)) {
1012 hprintk("irq %d already in use\n", he_dev->pci_dev->irq); 1011 hprintk("irq %d already in use\n", he_dev->pci_dev->irq);
1013 return -EINVAL; 1012 return -EINVAL;
1014 } 1013 }
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 821c81e8cd3..d1113e845f9 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -2735,7 +2735,7 @@ static int __devinit hrz_probe(struct pci_dev *pci_dev, const struct pci_device_
2735 irq = pci_dev->irq; 2735 irq = pci_dev->irq;
2736 if (request_irq(irq, 2736 if (request_irq(irq,
2737 interrupt_handler, 2737 interrupt_handler,
2738 SA_SHIRQ, /* irqflags guess */ 2738 IRQF_SHARED, /* irqflags guess */
2739 DEV_LABEL, /* name guess */ 2739 DEV_LABEL, /* name guess */
2740 dev)) { 2740 dev)) {
2741 PRINTD(DBG_WARN, "request IRQ failed!"); 2741 PRINTD(DBG_WARN, "request IRQ failed!");
diff --git a/drivers/atm/horizon.h b/drivers/atm/horizon.h
index e2cc7020fa3..4461229f56a 100644
--- a/drivers/atm/horizon.h
+++ b/drivers/atm/horizon.h
@@ -30,7 +30,6 @@
30#ifndef DRIVER_ATM_HORIZON_H 30#ifndef DRIVER_ATM_HORIZON_H
31#define DRIVER_ATM_HORIZON_H 31#define DRIVER_ATM_HORIZON_H
32 32
33#include <linux/config.h>
34 33
35#ifdef CONFIG_ATM_HORIZON_DEBUG 34#ifdef CONFIG_ATM_HORIZON_DEBUG
36#define DEBUG_HORIZON 35#define DEBUG_HORIZON
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index b4a76cade64..5d1c6c95262 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -34,7 +34,6 @@ static char const rcsid[] =
34 34
35 35
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/config.h>
38#include <linux/pci.h> 37#include <linux/pci.h>
39#include <linux/skbuff.h> 38#include <linux/skbuff.h>
40#include <linux/kernel.h> 39#include <linux/kernel.h>
@@ -3387,7 +3386,7 @@ init_card(struct atm_dev *dev)
3387 writel(SAR_STAT_TMROF, SAR_REG_STAT); 3386 writel(SAR_STAT_TMROF, SAR_REG_STAT);
3388 } 3387 }
3389 IPRINTK("%s: Request IRQ ... ", card->name); 3388 IPRINTK("%s: Request IRQ ... ", card->name);
3390 if (request_irq(pcidev->irq, idt77252_interrupt, SA_INTERRUPT|SA_SHIRQ, 3389 if (request_irq(pcidev->irq, idt77252_interrupt, IRQF_DISABLED|IRQF_SHARED,
3391 card->name, card) != 0) { 3390 card->name, card) != 0) {
3392 printk("%s: can't allocate IRQ.\n", card->name); 3391 printk("%s: can't allocate IRQ.\n", card->name);
3393 deinit_card(card); 3392 deinit_card(card);
diff --git a/drivers/atm/iphase.c b/drivers/atm/iphase.c
index 333a7bc609d..f20b0b2c06c 100644
--- a/drivers/atm/iphase.c
+++ b/drivers/atm/iphase.c
@@ -2488,7 +2488,7 @@ static int __devinit ia_start(struct atm_dev *dev)
2488 u32 ctrl_reg; 2488 u32 ctrl_reg;
2489 IF_EVENT(printk(">ia_start\n");) 2489 IF_EVENT(printk(">ia_start\n");)
2490 iadev = INPH_IA_DEV(dev); 2490 iadev = INPH_IA_DEV(dev);
2491 if (request_irq(iadev->irq, &ia_int, SA_SHIRQ, DEV_LABEL, dev)) { 2491 if (request_irq(iadev->irq, &ia_int, IRQF_SHARED, DEV_LABEL, dev)) {
2492 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", 2492 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",
2493 dev->number, iadev->irq); 2493 dev->number, iadev->irq);
2494 error = -EAGAIN; 2494 error = -EAGAIN;
diff --git a/drivers/atm/iphase.h b/drivers/atm/iphase.h
index b8d0bd4d6c3..133eefcc047 100644
--- a/drivers/atm/iphase.h
+++ b/drivers/atm/iphase.h
@@ -43,7 +43,6 @@
43#ifndef IPHASE_H 43#ifndef IPHASE_H
44#define IPHASE_H 44#define IPHASE_H
45 45
46#include <linux/config.h>
47 46
48/************************ IADBG DEFINE *********************************/ 47/************************ IADBG DEFINE *********************************/
49/* IADebugFlag Bit Map */ 48/* IADebugFlag Bit Map */
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index cac09e353be..fe60a59b7fc 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -2240,7 +2240,7 @@ static int __devinit lanai_dev_open(struct atm_dev *atmdev)
2240 conf2_write(lanai); 2240 conf2_write(lanai);
2241 reg_write(lanai, TX_FIFO_DEPTH, TxDepth_Reg); 2241 reg_write(lanai, TX_FIFO_DEPTH, TxDepth_Reg);
2242 reg_write(lanai, 0, CBR_ICG_Reg); /* CBR defaults to no limit */ 2242 reg_write(lanai, 0, CBR_ICG_Reg); /* CBR defaults to no limit */
2243 if ((result = request_irq(lanai->pci->irq, lanai_int, SA_SHIRQ, 2243 if ((result = request_irq(lanai->pci->irq, lanai_int, IRQF_SHARED,
2244 DEV_LABEL, lanai)) != 0) { 2244 DEV_LABEL, lanai)) != 0) {
2245 printk(KERN_ERR DEV_LABEL ": can't allocate interrupt\n"); 2245 printk(KERN_ERR DEV_LABEL ": can't allocate interrupt\n");
2246 goto error_vcctable; 2246 goto error_vcctable;
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 074abc81ec3..b8036899e56 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -36,7 +36,6 @@
36/* Header files ***************************************************************/ 36/* Header files ***************************************************************/
37 37
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/config.h>
40#include <linux/kernel.h> 39#include <linux/kernel.h>
41#include <linux/skbuff.h> 40#include <linux/skbuff.h>
42#include <linux/atmdev.h> 41#include <linux/atmdev.h>
@@ -626,7 +625,7 @@ static int __devinit ns_init_card(int i, struct pci_dev *pcidev)
626 if (mac[i] == NULL) 625 if (mac[i] == NULL)
627 nicstar_init_eprom(card->membase); 626 nicstar_init_eprom(card->membase);
628 627
629 if (request_irq(pcidev->irq, &ns_irq_handler, SA_INTERRUPT | SA_SHIRQ, "nicstar", card) != 0) 628 if (request_irq(pcidev->irq, &ns_irq_handler, IRQF_DISABLED | IRQF_SHARED, "nicstar", card) != 0)
630 { 629 {
631 printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq); 630 printk("nicstar%d: can't allocate IRQ %d.\n", i, pcidev->irq);
632 error = 9; 631 error = 9;
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c
index f484747f255..2c65e82f0d6 100644
--- a/drivers/atm/zatm.c
+++ b/drivers/atm/zatm.c
@@ -3,7 +3,6 @@
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4 4
5 5
6#include <linux/config.h>
7#include <linux/module.h> 6#include <linux/module.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
@@ -1271,7 +1270,7 @@ static int __init zatm_start(struct atm_dev *dev)
1271 zatm_dev->rx_map = zatm_dev->tx_map = NULL; 1270 zatm_dev->rx_map = zatm_dev->tx_map = NULL;
1272 for (i = 0; i < NR_MBX; i++) 1271 for (i = 0; i < NR_MBX; i++)
1273 zatm_dev->mbx_start[i] = 0; 1272 zatm_dev->mbx_start[i] = 0;
1274 error = request_irq(zatm_dev->irq, zatm_int, SA_SHIRQ, DEV_LABEL, dev); 1273 error = request_irq(zatm_dev->irq, zatm_int, IRQF_SHARED, DEV_LABEL, dev);
1275 if (error < 0) { 1274 if (error < 0) {
1276 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n", 1275 printk(KERN_ERR DEV_LABEL "(itf %d): IRQ%d is already in use\n",
1277 dev->number,zatm_dev->irq); 1276 dev->number,zatm_dev->irq);
diff --git a/drivers/atm/zatm.h b/drivers/atm/zatm.h
index 416fe0fda60..ae9165ce15a 100644
--- a/drivers/atm/zatm.h
+++ b/drivers/atm/zatm.h
@@ -6,7 +6,6 @@
6#ifndef DRIVER_ATM_ZATM_H 6#ifndef DRIVER_ATM_ZATM_H
7#define DRIVER_ATM_ZATM_H 7#define DRIVER_ATM_ZATM_H
8 8
9#include <linux/config.h>
10#include <linux/skbuff.h> 9#include <linux/skbuff.h>
11#include <linux/atm.h> 10#include <linux/atm.h>
12#include <linux/atmdev.h> 11#include <linux/atmdev.h>
diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 050d86d0b87..83fa8b291a5 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/device.h> 11#include <linux/device.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 9aa12746026..de8908320f2 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/device.h> 13#include <linux/device.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/init.h> 15#include <linux/init.h>
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 27c2176895d..b21f864c9ce 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/device.h> 11#include <linux/device.h>
13#include <linux/err.h> 12#include <linux/err.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/base/driver.c b/drivers/base/driver.c
index b400314e1c6..562600dd540 100644
--- a/drivers/base/driver.c
+++ b/drivers/base/driver.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/device.h> 11#include <linux/device.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 0d2e101e4f1..fdfa3d0cf6a 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -19,7 +19,6 @@
19 * ancestral dependencies that the subsystem list maintains. 19 * ancestral dependencies that the subsystem list maintains.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/device.h> 22#include <linux/device.h>
24#include "power.h" 23#include "power.h"
25 24
diff --git a/drivers/base/power/shutdown.c b/drivers/base/power/shutdown.c
index 8826a5b6673..3483ae4d57f 100644
--- a/drivers/base/power/shutdown.c
+++ b/drivers/base/power/shutdown.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/device.h> 11#include <linux/device.h>
13#include <asm/semaphore.h> 12#include <asm/semaphore.h>
14 13
diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 6858178b3af..04e5db445c7 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -12,7 +12,6 @@
12 * add themselves as children of the system bus. 12 * add themselves as children of the system bus.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/sysdev.h> 15#include <linux/sysdev.h>
17#include <linux/err.h> 16#include <linux/err.h>
18#include <linux/module.h> 17#include <linux/module.h>
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c
index 50ca1aa4ee3..4cd23c3eab4 100644
--- a/drivers/block/DAC960.c
+++ b/drivers/block/DAC960.c
@@ -3014,7 +3014,7 @@ DAC960_DetectController(struct pci_dev *PCI_Device,
3014 Acquire shared access to the IRQ Channel. 3014 Acquire shared access to the IRQ Channel.
3015 */ 3015 */
3016 IRQ_Channel = PCI_Device->irq; 3016 IRQ_Channel = PCI_Device->irq;
3017 if (request_irq(IRQ_Channel, InterruptHandler, SA_SHIRQ, 3017 if (request_irq(IRQ_Channel, InterruptHandler, IRQF_SHARED,
3018 Controller->FullModelName, Controller) < 0) 3018 Controller->FullModelName, Controller) < 0)
3019 { 3019 {
3020 DAC960_Error("Unable to acquire IRQ Channel %d for Controller at\n", 3020 DAC960_Error("Unable to acquire IRQ Channel %d for Controller at\n",
diff --git a/drivers/block/acsi.c b/drivers/block/acsi.c
index a317e430395..0b80fbb8dbf 100644
--- a/drivers/block/acsi.c
+++ b/drivers/block/acsi.c
@@ -43,7 +43,6 @@
43 * 43 *
44 */ 44 */
45 45
46#include <linux/config.h>
47#include <linux/module.h> 46#include <linux/module.h>
48#include <linux/errno.h> 47#include <linux/errno.h>
49#include <linux/signal.h> 48#include <linux/signal.h>
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 05fb08312c0..1c4df22dfd2 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3159,7 +3159,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3159 /* make sure the board interrupts are off */ 3159 /* make sure the board interrupts are off */
3160 hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF); 3160 hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_OFF);
3161 if (request_irq(hba[i]->intr[SIMPLE_MODE_INT], do_cciss_intr, 3161 if (request_irq(hba[i]->intr[SIMPLE_MODE_INT], do_cciss_intr,
3162 SA_INTERRUPT | SA_SHIRQ, hba[i]->devname, hba[i])) { 3162 IRQF_DISABLED | IRQF_SHARED, hba[i]->devname, hba[i])) {
3163 printk(KERN_ERR "cciss: Unable to get irq %d for %s\n", 3163 printk(KERN_ERR "cciss: Unable to get irq %d for %s\n",
3164 hba[i]->intr[SIMPLE_MODE_INT], hba[i]->devname); 3164 hba[i]->intr[SIMPLE_MODE_INT], hba[i]->devname);
3165 goto clean2; 3165 goto clean2;
diff --git a/drivers/block/cpqarray.c b/drivers/block/cpqarray.c
index bfd245df0a8..757f42dd8e8 100644
--- a/drivers/block/cpqarray.c
+++ b/drivers/block/cpqarray.c
@@ -408,7 +408,7 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev)
408 } 408 }
409 hba[i]->access.set_intr_mask(hba[i], 0); 409 hba[i]->access.set_intr_mask(hba[i], 0);
410 if (request_irq(hba[i]->intr, do_ida_intr, 410 if (request_irq(hba[i]->intr, do_ida_intr,
411 SA_INTERRUPT|SA_SHIRQ, hba[i]->devname, hba[i])) 411 IRQF_DISABLED|IRQF_SHARED, hba[i]->devname, hba[i]))
412 { 412 {
413 printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n", 413 printk(KERN_ERR "cpqarray: Unable to get irq %d for %s\n",
414 hba[i]->intr, hba[i]->devname); 414 hba[i]->intr, hba[i]->devname);
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 013c5daddb0..7b3b94ddddc 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -50,7 +50,6 @@
50 * 50 *
51 */ 51 */
52 52
53#include <linux/config.h>
54#include <linux/module.h> 53#include <linux/module.h>
55#include <linux/moduleparam.h> 54#include <linux/moduleparam.h>
56#include <linux/sched.h> 55#include <linux/sched.h>
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 39662f0c9cc..0a1b1ea36dd 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -50,9 +50,9 @@
50#define DBG_RX 0x0200 50#define DBG_RX 0x0200
51#define DBG_TX 0x0400 51#define DBG_TX 0x0400
52static unsigned int debugflags; 52static unsigned int debugflags;
53static unsigned int nbds_max = 16;
54#endif /* NDEBUG */ 53#endif /* NDEBUG */
55 54
55static unsigned int nbds_max = 16;
56static struct nbd_device nbd_dev[MAX_NBD]; 56static struct nbd_device nbd_dev[MAX_NBD];
57 57
58/* 58/*
diff --git a/drivers/block/paride/paride.c b/drivers/block/paride/paride.c
index ce94aa11f6a..4b258f7836f 100644
--- a/drivers/block/paride/paride.c
+++ b/drivers/block/paride/paride.c
@@ -21,7 +21,6 @@
21#define PI_VERSION "1.06" 21#define PI_VERSION "1.06"
22 22
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/config.h>
25#include <linux/kmod.h> 24#include <linux/kmod.h>
26#include <linux/types.h> 25#include <linux/types.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 3e4cce5e473..bde2c64b634 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -44,7 +44,6 @@
44 *************************************************************************/ 44 *************************************************************************/
45 45
46#include <linux/pktcdvd.h> 46#include <linux/pktcdvd.h>
47#include <linux/config.h>
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/types.h> 48#include <linux/types.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
diff --git a/drivers/block/ps2esdi.c b/drivers/block/ps2esdi.c
index a729013a397..5537974fb24 100644
--- a/drivers/block/ps2esdi.c
+++ b/drivers/block/ps2esdi.c
@@ -29,7 +29,6 @@
29 29
30#define DEVICE_NAME "PS/2 ESDI" 30#define DEVICE_NAME "PS/2 ESDI"
31 31
32#include <linux/config.h>
33#include <linux/major.h> 32#include <linux/major.h>
34#include <linux/errno.h> 33#include <linux/errno.h>
35#include <linux/wait.h> 34#include <linux/wait.h>
@@ -341,9 +340,9 @@ static int __init ps2esdi_geninit(void)
341 /* try to grab IRQ, and try to grab a slow IRQ if it fails, so we can 340 /* try to grab IRQ, and try to grab a slow IRQ if it fails, so we can
342 share with the SCSI driver */ 341 share with the SCSI driver */
343 if (request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, 342 if (request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler,
344 SA_INTERRUPT | SA_SHIRQ, "PS/2 ESDI", &ps2esdi_gendisk) 343 IRQF_DISABLED | IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk)
345 && request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler, 344 && request_irq(PS2ESDI_IRQ, ps2esdi_interrupt_handler,
346 SA_SHIRQ, "PS/2 ESDI", &ps2esdi_gendisk) 345 IRQF_SHARED, "PS/2 ESDI", &ps2esdi_gendisk)
347 ) { 346 ) {
348 printk("%s: Unable to get IRQ %d\n", DEVICE_NAME, PS2ESDI_IRQ); 347 printk("%s: Unable to get IRQ %d\n", DEVICE_NAME, PS2ESDI_IRQ);
349 error = -EBUSY; 348 error = -EBUSY;
diff --git a/drivers/block/rd.c b/drivers/block/rd.c
index a9e1c2524c2..3cf246abb5e 100644
--- a/drivers/block/rd.c
+++ b/drivers/block/rd.c
@@ -42,7 +42,6 @@
42 * and set blk_size for -ENOSPC, Werner Fink <werner@suse.de>, Apr '99 42 * and set blk_size for -ENOSPC, Werner Fink <werner@suse.de>, Apr '99
43 */ 43 */
44 44
45#include <linux/config.h>
46#include <linux/string.h> 45#include <linux/string.h>
47#include <linux/slab.h> 46#include <linux/slab.h>
48#include <asm/atomic.h> 47#include <asm/atomic.h>
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index 628877945f9..3721e12135d 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -16,7 +16,6 @@
16 * handle GCR disks 16 * handle GCR disks
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/stddef.h> 19#include <linux/stddef.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/sched.h> 21#include <linux/sched.h>
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c
index 10a4aa5fb54..c6beee18a07 100644
--- a/drivers/block/sx8.c
+++ b/drivers/block/sx8.c
@@ -1676,7 +1676,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1676 1676
1677 pci_set_master(pdev); 1677 pci_set_master(pdev);
1678 1678
1679 rc = request_irq(pdev->irq, carm_interrupt, SA_SHIRQ, DRV_NAME, host); 1679 rc = request_irq(pdev->irq, carm_interrupt, IRQF_SHARED, DRV_NAME, host);
1680 if (rc) { 1680 if (rc) {
1681 printk(KERN_ERR DRV_NAME "(%s): irq alloc failure\n", 1681 printk(KERN_ERR DRV_NAME "(%s): irq alloc failure\n",
1682 pci_name(pdev)); 1682 pci_name(pdev));
diff --git a/drivers/block/umem.c b/drivers/block/umem.c
index 585197b95af..5d8925bd904 100644
--- a/drivers/block/umem.c
+++ b/drivers/block/umem.c
@@ -35,7 +35,6 @@
35 */ 35 */
36 36
37//#define DEBUG /* uncomment if you want debugging info (pr_debug) */ 37//#define DEBUG /* uncomment if you want debugging info (pr_debug) */
38#include <linux/config.h>
39#include <linux/sched.h> 38#include <linux/sched.h>
40#include <linux/fs.h> 39#include <linux/fs.h>
41#include <linux/bio.h> 40#include <linux/bio.h>
@@ -1041,7 +1040,7 @@ static int __devinit mm_pci_probe(struct pci_dev *dev, const struct pci_device_i
1041 card->win_size = data; 1040 card->win_size = data;
1042 1041
1043 1042
1044 if (request_irq(dev->irq, mm_interrupt, SA_SHIRQ, "pci-umem", card)) { 1043 if (request_irq(dev->irq, mm_interrupt, IRQF_SHARED, "pci-umem", card)) {
1045 printk(KERN_ERR "MM%d: Unable to allocate IRQ\n", card->card_number); 1044 printk(KERN_ERR "MM%d: Unable to allocate IRQ\n", card->card_number);
1046 ret = -ENODEV; 1045 ret = -ENODEV;
1047 1046
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c
index 3e7a067cc08..6f67141f4de 100644
--- a/drivers/bluetooth/bcm203x.c
+++ b/drivers/bluetooth/bcm203x.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27 26
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
index 8947c8837da..23f96213f4a 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26 25
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index 473a13b22b2..2830f58d6f7 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/kernel.h> 25#include <linux/kernel.h>
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 9446960ac74..e0231dc2cb1 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26 25
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index b94ac2f9f7b..c9dba5565ca 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26 25
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 9ce4c93467e..c889bf8109a 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/kernel.h> 25#include <linux/kernel.h>
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index ed8dca84ff6..be6eed175aa 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/kernel.h> 25#include <linux/kernel.h>
diff --git a/drivers/bluetooth/hci_bcsp.c b/drivers/bluetooth/hci_bcsp.c
index 7bd4ef90411..d0cface535f 100644
--- a/drivers/bluetooth/hci_bcsp.c
+++ b/drivers/bluetooth/hci_bcsp.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27 26
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/drivers/bluetooth/hci_h4.c b/drivers/bluetooth/hci_h4.c
index 4804d474dc8..ad62abbbb73 100644
--- a/drivers/bluetooth/hci_h4.c
+++ b/drivers/bluetooth/hci_h4.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28 27
29#include <linux/kernel.h> 28#include <linux/kernel.h>
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 613673b12fa..1994270c16e 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28 27
29#include <linux/kernel.h> 28#include <linux/kernel.h>
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c
index 92382e82328..a7d9d7e99e7 100644
--- a/drivers/bluetooth/hci_usb.c
+++ b/drivers/bluetooth/hci_usb.c
@@ -31,7 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36 35
37#include <linux/kernel.h> 36#include <linux/kernel.h>
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 85738223ff0..ea589007fa2 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28 27
29#include <linux/kernel.h> 28#include <linux/kernel.h>
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index 3170eaa2508..ca27ee89240 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -263,7 +263,6 @@
263/* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */ 263/* #define ERRLOGMASK (CD_WARNING|CD_OPEN|CD_COUNT_TRACKS|CD_CLOSE) */
264/* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */ 264/* #define ERRLOGMASK (CD_WARNING|CD_REG_UNREG|CD_DO_IOCTL|CD_OPEN|CD_CLOSE|CD_COUNT_TRACKS) */
265 265
266#include <linux/config.h>
267#include <linux/module.h> 266#include <linux/module.h>
268#include <linux/fs.h> 267#include <linux/fs.h>
269#include <linux/buffer_head.h> 268#include <linux/buffer_head.h>
diff --git a/drivers/cdrom/cdu31a.c b/drivers/cdrom/cdu31a.c
index 5f0f2027f29..37bdb0163f0 100644
--- a/drivers/cdrom/cdu31a.c
+++ b/drivers/cdrom/cdu31a.c
@@ -3141,7 +3141,7 @@ int __init cdu31a_init(void)
3141 3141
3142 if (cdu31a_irq > 0) { 3142 if (cdu31a_irq > 0) {
3143 if (request_irq 3143 if (request_irq
3144 (cdu31a_irq, cdu31a_interrupt, SA_INTERRUPT, 3144 (cdu31a_irq, cdu31a_interrupt, IRQF_DISABLED,
3145 "cdu31a", NULL)) { 3145 "cdu31a", NULL)) {
3146 printk(KERN_WARNING PFX "Unable to grab IRQ%d for " 3146 printk(KERN_WARNING PFX "Unable to grab IRQ%d for "
3147 "the CDU31A driver\n", cdu31a_irq); 3147 "the CDU31A driver\n", cdu31a_irq);
diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c
index 788c7a0b2fe..dcd1ab684f3 100644
--- a/drivers/cdrom/mcdx.c
+++ b/drivers/cdrom/mcdx.c
@@ -1193,7 +1193,7 @@ static int __init mcdx_init_drive(int drive)
1193 } 1193 }
1194 1194
1195 xtrace(INIT, "init() subscribe irq and i/o\n"); 1195 xtrace(INIT, "init() subscribe irq and i/o\n");
1196 if (request_irq(stuffp->irq, mcdx_intr, SA_INTERRUPT, "mcdx", stuffp)) { 1196 if (request_irq(stuffp->irq, mcdx_intr, IRQF_DISABLED, "mcdx", stuffp)) {
1197 release_region(stuffp->wreg_data, MCDX_IO_SIZE); 1197 release_region(stuffp->wreg_data, MCDX_IO_SIZE);
1198 xwarn("%s=0x%03x,%d: Init failed. Can't get irq (%d).\n", 1198 xwarn("%s=0x%03x,%d: Init failed. Can't get irq (%d).\n",
1199 MCDX, stuffp->wreg_data, stuffp->irq, stuffp->irq); 1199 MCDX, stuffp->wreg_data, stuffp->irq, stuffp->irq);
diff --git a/drivers/cdrom/sbpcd.c b/drivers/cdrom/sbpcd.c
index 2fc966c65a0..ba50e5a712f 100644
--- a/drivers/cdrom/sbpcd.c
+++ b/drivers/cdrom/sbpcd.c
@@ -381,7 +381,6 @@
381#include <asm/io.h> 381#include <asm/io.h>
382#include <asm/uaccess.h> 382#include <asm/uaccess.h>
383#include <stdarg.h> 383#include <stdarg.h>
384#include <linux/config.h>
385#include "sbpcd.h" 384#include "sbpcd.h"
386 385
387#define MAJOR_NR MATSUSHITA_CDROM_MAJOR 386#define MAJOR_NR MATSUSHITA_CDROM_MAJOR
diff --git a/drivers/cdrom/sonycd535.c b/drivers/cdrom/sonycd535.c
index 8f7cc452af8..30ab56258a9 100644
--- a/drivers/cdrom/sonycd535.c
+++ b/drivers/cdrom/sonycd535.c
@@ -1527,7 +1527,7 @@ static int __init sony535_init(void)
1527 } 1527 }
1528 if (sony535_irq_used > 0) { 1528 if (sony535_irq_used > 0) {
1529 if (request_irq(sony535_irq_used, cdu535_interrupt, 1529 if (request_irq(sony535_irq_used, cdu535_interrupt,
1530 SA_INTERRUPT, CDU535_HANDLE, NULL)) { 1530 IRQF_DISABLED, CDU535_HANDLE, NULL)) {
1531 printk("Unable to grab IRQ%d for the " CDU535_MESSAGE_NAME 1531 printk("Unable to grab IRQ%d for the " CDU535_MESSAGE_NAME
1532 " driver; polling instead.\n", sony535_irq_used); 1532 " driver; polling instead.\n", sony535_irq_used);
1533 sony535_irq_used = 0; 1533 sony535_irq_used = 0;
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index f74eeeb8e37..8cd52984cda 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -8,7 +8,6 @@
8 * work is done in the northbridge(s). 8 * work is done in the northbridge(s).
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/pci.h> 12#include <linux/pci.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index a92ab53a137..cc5ea347a8a 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -27,7 +27,6 @@
27 * TODO: 27 * TODO:
28 * - Allocate more than order 0 pages to avoid too much linear map splitting. 28 * - Allocate more than order 0 pages to avoid too much linear map splitting.
29 */ 29 */
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/pci.h> 31#include <linux/pci.h>
33#include <linux/init.h> 32#include <linux/init.h>
diff --git a/drivers/char/amiserial.c b/drivers/char/amiserial.c
index 6602b3156df..9d6713a93ed 100644
--- a/drivers/char/amiserial.c
+++ b/drivers/char/amiserial.c
@@ -31,7 +31,6 @@
31 * ever possible. 31 * ever possible.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/delay.h> 34#include <linux/delay.h>
36 35
37#undef SERIAL_PARANOIA_CHECK 36#undef SERIAL_PARANOIA_CHECK
@@ -2052,7 +2051,7 @@ static int __init rs_init(void)
2052 2051
2053 /* set ISRs, and then disable the rx interrupts */ 2052 /* set ISRs, and then disable the rx interrupts */
2054 request_irq(IRQ_AMIGA_TBE, ser_tx_int, 0, "serial TX", state); 2053 request_irq(IRQ_AMIGA_TBE, ser_tx_int, 0, "serial TX", state);
2055 request_irq(IRQ_AMIGA_RBF, ser_rx_int, SA_INTERRUPT, "serial RX", state); 2054 request_irq(IRQ_AMIGA_RBF, ser_rx_int, IRQF_DISABLED, "serial RX", state);
2056 2055
2057 /* turn off Rx and Tx interrupts */ 2056 /* turn off Rx and Tx interrupts */
2058 custom.intena = IF_RBF | IF_TBE; 2057 custom.intena = IF_RBF | IF_TBE;
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index 72fb60765c4..bcc4668835b 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -229,7 +229,7 @@ static int __init applicom_init(void)
229 continue; 229 continue;
230 } 230 }
231 231
232 if (request_irq(dev->irq, &ac_interrupt, SA_SHIRQ, "Applicom PCI", &dummy)) { 232 if (request_irq(dev->irq, &ac_interrupt, IRQF_SHARED, "Applicom PCI", &dummy)) {
233 printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device.\n", dev->irq); 233 printk(KERN_INFO "Could not allocate IRQ %d for PCI Applicom device.\n", dev->irq);
234 iounmap(RamIO); 234 iounmap(RamIO);
235 pci_disable_device(dev); 235 pci_disable_device(dev);
@@ -276,7 +276,7 @@ static int __init applicom_init(void)
276 printk(KERN_NOTICE "Applicom ISA card found at mem 0x%lx, irq %d\n", mem + (LEN_RAM_IO*i), irq); 276 printk(KERN_NOTICE "Applicom ISA card found at mem 0x%lx, irq %d\n", mem + (LEN_RAM_IO*i), irq);
277 277
278 if (!numisa) { 278 if (!numisa) {
279 if (request_irq(irq, &ac_interrupt, SA_SHIRQ, "Applicom ISA", &dummy)) { 279 if (request_irq(irq, &ac_interrupt, IRQF_SHARED, "Applicom ISA", &dummy)) {
280 printk(KERN_WARNING "Could not allocate IRQ %d for ISA Applicom device.\n", irq); 280 printk(KERN_WARNING "Could not allocate IRQ %d for ISA Applicom device.\n", irq);
281 iounmap(RamIO); 281 iounmap(RamIO);
282 apbs[boardno - 1].RamIO = NULL; 282 apbs[boardno - 1].RamIO = NULL;
diff --git a/drivers/char/consolemap.c b/drivers/char/consolemap.c
index c85a4fa60da..04a12027a74 100644
--- a/drivers/char/consolemap.c
+++ b/drivers/char/consolemap.c
@@ -11,7 +11,6 @@
11 * Fix bug in inverse translation. Stanislav Voronyi <stas@cnti.uanet.kharkov.ua>, Dec 1998 11 * Fix bug in inverse translation. Stanislav Voronyi <stas@cnti.uanet.kharkov.ua>, Dec 1998
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/kd.h> 15#include <linux/kd.h>
17#include <linux/errno.h> 16#include <linux/errno.h>
diff --git a/drivers/char/cyclades.c b/drivers/char/cyclades.c
index 2657eeba7da..c1c67281750 100644
--- a/drivers/char/cyclades.c
+++ b/drivers/char/cyclades.c
@@ -633,7 +633,6 @@ static char rcsid[] =
633/* 633/*
634 * Include section 634 * Include section
635 */ 635 */
636#include <linux/config.h>
637#include <linux/module.h> 636#include <linux/module.h>
638#include <linux/errno.h> 637#include <linux/errno.h>
639#include <linux/signal.h> 638#include <linux/signal.h>
@@ -4613,7 +4612,7 @@ cy_detect_isa(void)
4613 4612
4614 /* allocate IRQ */ 4613 /* allocate IRQ */
4615 if(request_irq(cy_isa_irq, cyy_interrupt, 4614 if(request_irq(cy_isa_irq, cyy_interrupt,
4616 SA_INTERRUPT, "Cyclom-Y", &cy_card[j])) 4615 IRQF_DISABLED, "Cyclom-Y", &cy_card[j]))
4617 { 4616 {
4618 printk("Cyclom-Y/ISA found at 0x%lx ", 4617 printk("Cyclom-Y/ISA found at 0x%lx ",
4619 (unsigned long) cy_isa_address); 4618 (unsigned long) cy_isa_address);
@@ -4786,7 +4785,7 @@ cy_detect_pci(void)
4786 4785
4787 /* allocate IRQ */ 4786 /* allocate IRQ */
4788 if(request_irq(cy_pci_irq, cyy_interrupt, 4787 if(request_irq(cy_pci_irq, cyy_interrupt,
4789 SA_SHIRQ, "Cyclom-Y", &cy_card[j])) 4788 IRQF_SHARED, "Cyclom-Y", &cy_card[j]))
4790 { 4789 {
4791 printk("Cyclom-Y/PCI found at 0x%lx ", 4790 printk("Cyclom-Y/PCI found at 0x%lx ",
4792 (ulong) cy_pci_phys2); 4791 (ulong) cy_pci_phys2);
@@ -4966,7 +4965,7 @@ cy_detect_pci(void)
4966 /* allocate IRQ only if board has an IRQ */ 4965 /* allocate IRQ only if board has an IRQ */
4967 if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { 4966 if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) {
4968 if(request_irq(cy_pci_irq, cyz_interrupt, 4967 if(request_irq(cy_pci_irq, cyz_interrupt,
4969 SA_SHIRQ, "Cyclades-Z", &cy_card[j])) 4968 IRQF_SHARED, "Cyclades-Z", &cy_card[j]))
4970 { 4969 {
4971 printk("Cyclom-8Zo/PCI found at 0x%lx ", 4970 printk("Cyclom-8Zo/PCI found at 0x%lx ",
4972 (ulong) cy_pci_phys2); 4971 (ulong) cy_pci_phys2);
@@ -5060,7 +5059,7 @@ cy_detect_pci(void)
5060 /* allocate IRQ only if board has an IRQ */ 5059 /* allocate IRQ only if board has an IRQ */
5061 if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) { 5060 if( (cy_pci_irq != 0) && (cy_pci_irq != 255) ) {
5062 if(request_irq(cy_pci_irq, cyz_interrupt, 5061 if(request_irq(cy_pci_irq, cyz_interrupt,
5063 SA_SHIRQ, "Cyclades-Z", &cy_card[j])) 5062 IRQF_SHARED, "Cyclades-Z", &cy_card[j]))
5064 { 5063 {
5065 printk("Cyclom-Ze/PCI found at 0x%lx ", 5064 printk("Cyclom-Ze/PCI found at 0x%lx ",
5066 (ulong) cy_pci_phys2); 5065 (ulong) cy_pci_phys2);
diff --git a/drivers/char/decserial.c b/drivers/char/decserial.c
index aa1440934e9..85f404e25c7 100644
--- a/drivers/char/decserial.c
+++ b/drivers/char/decserial.c
@@ -16,7 +16,6 @@
16 * console device I strongly recommend to use only one. 16 * console device I strongly recommend to use only one.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <asm/dec/machtype.h> 20#include <asm/dec/machtype.h>
22 21
diff --git a/drivers/char/drm/drm.h b/drivers/char/drm/drm.h
index 9da0ddb892b..5642ac43e0f 100644
--- a/drivers/char/drm/drm.h
+++ b/drivers/char/drm/drm.h
@@ -38,7 +38,6 @@
38 38
39#if defined(__linux__) 39#if defined(__linux__)
40#if defined(__KERNEL__) 40#if defined(__KERNEL__)
41#include <linux/config.h>
42#endif 41#endif
43#include <asm/ioctl.h> /* For _IO* macros */ 42#include <asm/ioctl.h> /* For _IO* macros */
44#define DRM_IOCTL_NR(n) _IOC_NR(n) 43#define DRM_IOCTL_NR(n) _IOC_NR(n)
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index cb76e5ca9a2..d2a56182bc3 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -44,7 +44,6 @@
44 * can build the DRM (part of PI DRI). 4/21/2000 S + B */ 44 * can build the DRM (part of PI DRI). 4/21/2000 S + B */
45#include <asm/current.h> 45#include <asm/current.h>
46#endif /* __alpha__ */ 46#endif /* __alpha__ */
47#include <linux/config.h>
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/kernel.h> 48#include <linux/kernel.h>
50#include <linux/miscdevice.h> 49#include <linux/miscdevice.h>
diff --git a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c
index 611a1173091..ebdb7182c4f 100644
--- a/drivers/char/drm/drm_irq.c
+++ b/drivers/char/drm/drm_irq.c
@@ -130,7 +130,7 @@ static int drm_irq_install(drm_device_t * dev)
130 130
131 /* Install handler */ 131 /* Install handler */
132 if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED)) 132 if (drm_core_check_feature(dev, DRIVER_IRQ_SHARED))
133 sh_flags = SA_SHIRQ; 133 sh_flags = IRQF_SHARED;
134 134
135 ret = request_irq(dev->irq, dev->driver->irq_handler, 135 ret = request_irq(dev->irq, dev->driver->irq_handler,
136 sh_flags, dev->devname, dev); 136 sh_flags, dev->devname, dev);
diff --git a/drivers/char/drm/drm_memory.c b/drivers/char/drm/drm_memory.c
index 7e3318e1d1c..5681cae1d40 100644
--- a/drivers/char/drm/drm_memory.c
+++ b/drivers/char/drm/drm_memory.c
@@ -33,7 +33,6 @@
33 * OTHER DEALINGS IN THE SOFTWARE. 33 * OTHER DEALINGS IN THE SOFTWARE.
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/highmem.h> 36#include <linux/highmem.h>
38#include "drmP.h" 37#include "drmP.h"
39 38
diff --git a/drivers/char/drm/drm_memory.h b/drivers/char/drm/drm_memory.h
index 714d9aedcff..f1b97aff10c 100644
--- a/drivers/char/drm/drm_memory.h
+++ b/drivers/char/drm/drm_memory.h
@@ -33,7 +33,6 @@
33 * OTHER DEALINGS IN THE SOFTWARE. 33 * OTHER DEALINGS IN THE SOFTWARE.
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/highmem.h> 36#include <linux/highmem.h>
38#include <linux/vmalloc.h> 37#include <linux/vmalloc.h>
39#include "drmP.h" 38#include "drmP.h"
diff --git a/drivers/char/drm/drm_memory_debug.h b/drivers/char/drm/drm_memory_debug.h
index d117cc99719..74581af806e 100644
--- a/drivers/char/drm/drm_memory_debug.h
+++ b/drivers/char/drm/drm_memory_debug.h
@@ -31,7 +31,6 @@
31 * OTHER DEALINGS IN THE SOFTWARE. 31 * OTHER DEALINGS IN THE SOFTWARE.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include "drmP.h" 34#include "drmP.h"
36 35
37typedef struct drm_mem_stats { 36typedef struct drm_mem_stats {
diff --git a/drivers/char/drm/drm_scatter.c b/drivers/char/drm/drm_scatter.c
index ce81bf24820..06ef7ddbe67 100644
--- a/drivers/char/drm/drm_scatter.c
+++ b/drivers/char/drm/drm_scatter.c
@@ -31,7 +31,6 @@
31 * DEALINGS IN THE SOFTWARE. 31 * DEALINGS IN THE SOFTWARE.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/vmalloc.h> 34#include <linux/vmalloc.h>
36#include "drmP.h" 35#include "drmP.h"
37 36
diff --git a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c
index 0b9f98a7eb1..51ad98c685c 100644
--- a/drivers/char/drm/drm_sysfs.c
+++ b/drivers/char/drm/drm_sysfs.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/device.h> 15#include <linux/device.h>
17#include <linux/kdev_t.h> 16#include <linux/kdev_t.h>
18#include <linux/err.h> 17#include <linux/err.h>
diff --git a/drivers/char/drm/ffb_drv.c b/drivers/char/drm/ffb_drv.c
index c13f9abb41e..dd45111a485 100644
--- a/drivers/char/drm/ffb_drv.c
+++ b/drivers/char/drm/ffb_drv.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 2000 David S. Miller (davem@redhat.com) 4 * Copyright (C) 2000 David S. Miller (davem@redhat.com)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include "ffb.h" 7#include "ffb.h"
9#include "drmP.h" 8#include "drmP.h"
10 9
diff --git a/drivers/char/drm/i810_drv.c b/drivers/char/drm/i810_drv.c
index dfe6ad2b6a6..fabb9a81796 100644
--- a/drivers/char/drm/i810_drv.c
+++ b/drivers/char/drm/i810_drv.c
@@ -30,7 +30,6 @@
30 * Gareth Hughes <gareth@valinux.com> 30 * Gareth Hughes <gareth@valinux.com>
31 */ 31 */
32 32
33#include <linux/config.h>
34#include "drmP.h" 33#include "drmP.h"
35#include "drm.h" 34#include "drm.h"
36#include "i810_drm.h" 35#include "i810_drm.h"
diff --git a/drivers/char/drm/i830_drv.c b/drivers/char/drm/i830_drv.c
index 722658188f5..389597e4a62 100644
--- a/drivers/char/drm/i830_drv.c
+++ b/drivers/char/drm/i830_drv.c
@@ -32,7 +32,6 @@
32 * Keith Whitwell <keith@tungstengraphics.com> 32 * Keith Whitwell <keith@tungstengraphics.com>
33 */ 33 */
34 34
35#include <linux/config.h>
36#include "drmP.h" 35#include "drmP.h"
37#include "drm.h" 36#include "drm.h"
38#include "i830_drm.h" 37#include "i830_drm.h"
diff --git a/drivers/char/drm/mga_drv.c b/drivers/char/drm/mga_drv.c
index 9f7ed0e0351..e30f556b79f 100644
--- a/drivers/char/drm/mga_drv.c
+++ b/drivers/char/drm/mga_drv.c
@@ -29,7 +29,6 @@
29 * Gareth Hughes <gareth@valinux.com> 29 * Gareth Hughes <gareth@valinux.com>
30 */ 30 */
31 31
32#include <linux/config.h>
33#include "drmP.h" 32#include "drmP.h"
34#include "drm.h" 33#include "drm.h"
35#include "mga_drm.h" 34#include "mga_drm.h"
diff --git a/drivers/char/drm/r128_drv.c b/drivers/char/drm/r128_drv.c
index e20450ae220..6108e7587e1 100644
--- a/drivers/char/drm/r128_drv.c
+++ b/drivers/char/drm/r128_drv.c
@@ -29,7 +29,6 @@
29 * Gareth Hughes <gareth@valinux.com> 29 * Gareth Hughes <gareth@valinux.com>
30 */ 30 */
31 31
32#include <linux/config.h>
33#include "drmP.h" 32#include "drmP.h"
34#include "drm.h" 33#include "drm.h"
35#include "r128_drm.h" 34#include "r128_drm.h"
diff --git a/drivers/char/drm/radeon_drv.c b/drivers/char/drm/radeon_drv.c
index b04ed1b562b..eb985c2a31e 100644
--- a/drivers/char/drm/radeon_drv.c
+++ b/drivers/char/drm/radeon_drv.c
@@ -29,7 +29,6 @@
29 * OTHER DEALINGS IN THE SOFTWARE. 29 * OTHER DEALINGS IN THE SOFTWARE.
30 */ 30 */
31 31
32#include <linux/config.h>
33#include "drmP.h" 32#include "drmP.h"
34#include "drm.h" 33#include "drm.h"
35#include "radeon_drm.h" 34#include "radeon_drm.h"
diff --git a/drivers/char/drm/savage_drv.c b/drivers/char/drm/savage_drv.c
index aa6c0d1a82f..eee52aa92a7 100644
--- a/drivers/char/drm/savage_drv.c
+++ b/drivers/char/drm/savage_drv.c
@@ -23,7 +23,6 @@
23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */ 24 */
25 25
26#include <linux/config.h>
27#include "drmP.h" 26#include "drmP.h"
28#include "savage_drm.h" 27#include "savage_drm.h"
29#include "savage_drv.h" 28#include "savage_drv.h"
diff --git a/drivers/char/drm/sis_drv.c b/drivers/char/drm/sis_drv.c
index 6f6d7d613ed..5e9dc86f295 100644
--- a/drivers/char/drm/sis_drv.c
+++ b/drivers/char/drm/sis_drv.c
@@ -25,7 +25,6 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/config.h>
29#include "drmP.h" 28#include "drmP.h"
30#include "sis_drm.h" 29#include "sis_drm.h"
31#include "sis_drv.h" 30#include "sis_drv.h"
diff --git a/drivers/char/drm/tdfx_drv.c b/drivers/char/drm/tdfx_drv.c
index baa4416032a..012ff2e356b 100644
--- a/drivers/char/drm/tdfx_drv.c
+++ b/drivers/char/drm/tdfx_drv.c
@@ -30,7 +30,6 @@
30 * Gareth Hughes <gareth@valinux.com> 30 * Gareth Hughes <gareth@valinux.com>
31 */ 31 */
32 32
33#include <linux/config.h>
34#include "drmP.h" 33#include "drmP.h"
35#include "tdfx_drv.h" 34#include "tdfx_drv.h"
36 35
diff --git a/drivers/char/drm/via_drv.c b/drivers/char/drm/via_drv.c
index 3f012255d31..b3d364d793d 100644
--- a/drivers/char/drm/via_drv.c
+++ b/drivers/char/drm/via_drv.c
@@ -22,7 +22,6 @@
22 * DEALINGS IN THE SOFTWARE. 22 * DEALINGS IN THE SOFTWARE.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include "drmP.h" 25#include "drmP.h"
27#include "via_drm.h" 26#include "via_drm.h"
28#include "via_drv.h" 27#include "via_drv.h"
diff --git a/drivers/char/ds1302.c b/drivers/char/ds1302.c
index a75e8609be0..625e8b51700 100644
--- a/drivers/char/ds1302.c
+++ b/drivers/char/ds1302.c
@@ -12,7 +12,6 @@
12*! 12*!
13*!***************************************************************************/ 13*!***************************************************************************/
14 14
15#include <linux/config.h>
16 15
17#include <linux/fs.h> 16#include <linux/fs.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c
index 62cda25724e..953e670dcd0 100644
--- a/drivers/char/ds1620.c
+++ b/drivers/char/ds1620.c
@@ -2,7 +2,6 @@
2 * linux/drivers/char/ds1620.c: Dallas Semiconductors DS1620 2 * linux/drivers/char/ds1620.c: Dallas Semiconductors DS1620
3 * thermometer driver (as used in the Rebel.com NetWinder) 3 * thermometer driver (as used in the Rebel.com NetWinder)
4 */ 4 */
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
8#include <linux/miscdevice.h> 7#include <linux/miscdevice.h>
diff --git a/drivers/char/ec3104_keyb.c b/drivers/char/ec3104_keyb.c
index 4aed6696882..abac18b1871 100644
--- a/drivers/char/ec3104_keyb.c
+++ b/drivers/char/ec3104_keyb.c
@@ -26,7 +26,6 @@
26 * (prumpf@tux.org). 26 * (prumpf@tux.org).
27 */ 27 */
28 28
29#include <linux/config.h>
30 29
31#include <linux/spinlock.h> 30#include <linux/spinlock.h>
32#include <linux/sched.h> 31#include <linux/sched.h>
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index d0b3890d930..86d290e9f30 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -30,7 +30,6 @@
30/* See README.epca for change history --DAT*/ 30/* See README.epca for change history --DAT*/
31 31
32 32
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
36#include <linux/types.h> 35#include <linux/types.h>
diff --git a/drivers/char/esp.c b/drivers/char/esp.c
index 9827d170ca1..afcd83d9984 100644
--- a/drivers/char/esp.c
+++ b/drivers/char/esp.c
@@ -883,7 +883,7 @@ static int startup(struct esp_struct * info)
883 * Allocate the IRQ 883 * Allocate the IRQ
884 */ 884 */
885 885
886 retval = request_irq(info->irq, rs_interrupt_single, SA_SHIRQ, 886 retval = request_irq(info->irq, rs_interrupt_single, IRQF_SHARED,
887 "esp serial", info); 887 "esp serial", info);
888 888
889 if (retval) { 889 if (retval) {
diff --git a/drivers/char/ftape/lowlevel/fdc-io.c b/drivers/char/ftape/lowlevel/fdc-io.c
index 093fdf98b19..65c9d2ec60b 100644
--- a/drivers/char/ftape/lowlevel/fdc-io.c
+++ b/drivers/char/ftape/lowlevel/fdc-io.c
@@ -1268,7 +1268,7 @@ static int fdc_grab_irq_and_dma(void)
1268 /* Get fast interrupt handler. 1268 /* Get fast interrupt handler.
1269 */ 1269 */
1270 if (request_irq(fdc.irq, ftape_interrupt, 1270 if (request_irq(fdc.irq, ftape_interrupt,
1271 SA_INTERRUPT, "ft", ftape_id)) { 1271 IRQF_DISABLED, "ft", ftape_id)) {
1272 TRACE_ABORT(-EIO, ft_t_bug, 1272 TRACE_ABORT(-EIO, ft_t_bug,
1273 "Unable to grab IRQ%d for ftape driver", 1273 "Unable to grab IRQ%d for ftape driver",
1274 fdc.irq); 1274 fdc.irq);
diff --git a/drivers/char/ftape/lowlevel/ftape-calibr.c b/drivers/char/ftape/lowlevel/ftape-calibr.c
index 956b2586e13..8e50bfd35a5 100644
--- a/drivers/char/ftape/lowlevel/ftape-calibr.c
+++ b/drivers/char/ftape/lowlevel/ftape-calibr.c
@@ -24,7 +24,6 @@
24 * functions. 24 * functions.
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/jiffies.h> 28#include <linux/jiffies.h>
30#include <asm/system.h> 29#include <asm/system.h>
diff --git a/drivers/char/ftape/lowlevel/ftape-ctl.c b/drivers/char/ftape/lowlevel/ftape-ctl.c
index 32e04391179..5d7c1ce92d5 100644
--- a/drivers/char/ftape/lowlevel/ftape-ctl.c
+++ b/drivers/char/ftape/lowlevel/ftape-ctl.c
@@ -25,7 +25,6 @@
25 * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. 25 * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/mm.h> 29#include <linux/mm.h>
31#include <linux/mman.h> 30#include <linux/mman.h>
diff --git a/drivers/char/ftape/lowlevel/ftape-init.c b/drivers/char/ftape/lowlevel/ftape-init.c
index b54260d457c..4998132a81d 100644
--- a/drivers/char/ftape/lowlevel/ftape-init.c
+++ b/drivers/char/ftape/lowlevel/ftape-init.c
@@ -21,7 +21,6 @@
21 * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. 21 * for the QIC-40/80/3010/3020 floppy-tape driver for Linux.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/fs.h> 26#include <linux/fs.h>
diff --git a/drivers/char/ftape/lowlevel/ftape-proc.c b/drivers/char/ftape/lowlevel/ftape-proc.c
index c66251e997e..e805b15e0a1 100644
--- a/drivers/char/ftape/lowlevel/ftape-proc.c
+++ b/drivers/char/ftape/lowlevel/ftape-proc.c
@@ -26,7 +26,6 @@
26 * Old code removed, switched to dynamic proc entry. 26 * Old code removed, switched to dynamic proc entry.
27 */ 27 */
28 28
29#include <linux/config.h>
30 29
31#if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS) 30#if defined(CONFIG_PROC_FS) && defined(CONFIG_FT_PROC_FS)
32 31
diff --git a/drivers/char/ftape/lowlevel/ftape-setup.c b/drivers/char/ftape/lowlevel/ftape-setup.c
index 280a1a55d87..678340acd0b 100644
--- a/drivers/char/ftape/lowlevel/ftape-setup.c
+++ b/drivers/char/ftape/lowlevel/ftape-setup.c
@@ -25,7 +25,6 @@
25 * "ftape" for Linux. 25 * "ftape" for Linux.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/string.h> 28#include <linux/string.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
31#include <linux/mm.h> 30#include <linux/mm.h>
diff --git a/drivers/char/ftape/lowlevel/ftape-tracing.h b/drivers/char/ftape/lowlevel/ftape-tracing.h
index fa7cd20ee66..2950810c708 100644
--- a/drivers/char/ftape/lowlevel/ftape-tracing.h
+++ b/drivers/char/ftape/lowlevel/ftape-tracing.h
@@ -28,7 +28,6 @@
28 * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux. 28 * QIC-40/80/3010/3020 floppy-tape driver "ftape" for Linux.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33 32
34/* 33/*
diff --git a/drivers/char/ftape/lowlevel/ftape_syms.c b/drivers/char/ftape/lowlevel/ftape_syms.c
index 5dc3a380c9b..8e0dc4a07ca 100644
--- a/drivers/char/ftape/lowlevel/ftape_syms.c
+++ b/drivers/char/ftape/lowlevel/ftape_syms.c
@@ -25,7 +25,6 @@
25 * exports to its high level clients 25 * exports to its high level clients
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30 29
31#include <linux/ftape.h> 30#include <linux/ftape.h>
diff --git a/drivers/char/ftape/zftape/zftape-ctl.c b/drivers/char/ftape/zftape/zftape-ctl.c
index 6c7874e5c19..22ba0f5d00c 100644
--- a/drivers/char/ftape/zftape/zftape-ctl.c
+++ b/drivers/char/ftape/zftape/zftape-ctl.c
@@ -24,7 +24,6 @@
24 * for the QIC-40/80/3010/3020 floppy-tape driver for Linux. 24 * for the QIC-40/80/3010/3020 floppy-tape driver for Linux.
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/mm.h> 28#include <linux/mm.h>
30#include <linux/module.h> 29#include <linux/module.h>
diff --git a/drivers/char/ftape/zftape/zftape-ctl.h b/drivers/char/ftape/zftape/zftape-ctl.h
index 41415989199..8e6f2d7ac74 100644
--- a/drivers/char/ftape/zftape/zftape-ctl.h
+++ b/drivers/char/ftape/zftape/zftape-ctl.h
@@ -27,7 +27,6 @@
27 * for the QIC-40/80 floppy-tape driver for Linux. 27 * for the QIC-40/80 floppy-tape driver for Linux.
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/ioctl.h> 30#include <linux/ioctl.h>
32#include <linux/mtio.h> 31#include <linux/mtio.h>
33 32
diff --git a/drivers/char/ftape/zftape/zftape-init.c b/drivers/char/ftape/zftape/zftape-init.c
index 3eeb869a9a1..55272566b74 100644
--- a/drivers/char/ftape/zftape/zftape-init.c
+++ b/drivers/char/ftape/zftape/zftape-init.c
@@ -20,7 +20,6 @@
20 * to the ftape floppy tape driver for Linux 20 * to the ftape floppy tape driver for Linux
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
26#include <linux/fs.h> 25#include <linux/fs.h>
diff --git a/drivers/char/genrtc.c b/drivers/char/genrtc.c
index 588fca542a9..bebd7e34f79 100644
--- a/drivers/char/genrtc.c
+++ b/drivers/char/genrtc.c
@@ -43,7 +43,6 @@
43#define RTC_VERSION "1.07" 43#define RTC_VERSION "1.07"
44 44
45#include <linux/module.h> 45#include <linux/module.h>
46#include <linux/config.h>
47#include <linux/errno.h> 46#include <linux/errno.h>
48#include <linux/miscdevice.h> 47#include <linux/miscdevice.h>
49#include <linux/fcntl.h> 48#include <linux/fcntl.h>
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 07473cd8412..e5643f3aa73 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
@@ -396,7 +395,7 @@ static int hpet_ioctl_ieon(struct hpet_dev *devp)
396 395
397 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev)); 396 sprintf(devp->hd_name, "hpet%d", (int)(devp - hpetp->hp_dev));
398 irq_flags = devp->hd_flags & HPET_SHARED_IRQ 397 irq_flags = devp->hd_flags & HPET_SHARED_IRQ
399 ? SA_SHIRQ : SA_INTERRUPT; 398 ? IRQF_SHARED : IRQF_DISABLED;
400 if (request_irq(irq, hpet_interrupt, irq_flags, 399 if (request_irq(irq, hpet_interrupt, irq_flags,
401 devp->hd_name, (void *)devp)) { 400 devp->hd_name, (void *)devp)) {
402 printk(KERN_ERR "hpet: IRQ %d is not free\n", irq); 401 printk(KERN_ERR "hpet: IRQ %d is not free\n", irq);
diff --git a/drivers/char/hvc_console.c b/drivers/char/hvc_console.c
index 6e380aecea6..ca2f538e549 100644
--- a/drivers/char/hvc_console.c
+++ b/drivers/char/hvc_console.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/console.h> 25#include <linux/console.h>
27#include <linux/cpumask.h> 26#include <linux/cpumask.h>
28#include <linux/init.h> 27#include <linux/init.h>
@@ -347,7 +346,7 @@ static int hvc_open(struct tty_struct *tty, struct file * filp)
347 spin_unlock_irqrestore(&hp->lock, flags); 346 spin_unlock_irqrestore(&hp->lock, flags);
348 /* check error, fallback to non-irq */ 347 /* check error, fallback to non-irq */
349 if (irq != NO_IRQ) 348 if (irq != NO_IRQ)
350 rc = request_irq(irq, hvc_handle_interrupt, SA_INTERRUPT, "hvc_console", hp); 349 rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED, "hvc_console", hp);
351 350
352 /* 351 /*
353 * If the request_irq() fails and we return an error. The tty layer 352 * If the request_irq() fails and we return an error. The tty layer
diff --git a/drivers/char/hvcs.c b/drivers/char/hvcs.c
index 130dedc3756..4589ff302b0 100644
--- a/drivers/char/hvcs.c
+++ b/drivers/char/hvcs.c
@@ -899,7 +899,7 @@ static int hvcs_enable_device(struct hvcs_struct *hvcsd, uint32_t unit_address,
899 * the conn was registered and now. 899 * the conn was registered and now.
900 */ 900 */
901 if (!(rc = request_irq(irq, &hvcs_handle_interrupt, 901 if (!(rc = request_irq(irq, &hvcs_handle_interrupt,
902 SA_INTERRUPT, "ibmhvcs", hvcsd))) { 902 IRQF_DISABLED, "ibmhvcs", hvcsd))) {
903 /* 903 /*
904 * It is possible the vty-server was removed after the irq was 904 * It is possible the vty-server was removed after the irq was
905 * requested but before we have time to enable interrupts. 905 * requested but before we have time to enable interrupts.
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index 7b04eb15320..8dc205b275e 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -1168,7 +1168,7 @@ static int __init hvsi_init(void)
1168 struct hvsi_struct *hp = &hvsi_ports[i]; 1168 struct hvsi_struct *hp = &hvsi_ports[i];
1169 int ret = 1; 1169 int ret = 1;
1170 1170
1171 ret = request_irq(hp->virq, hvsi_interrupt, SA_INTERRUPT, "hvsi", hp); 1171 ret = request_irq(hp->virq, hvsi_interrupt, IRQF_DISABLED, "hvsi", hp);
1172 if (ret) 1172 if (ret)
1173 printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n", 1173 printk(KERN_ERR "HVSI: couldn't reserve irq 0x%x (error %i)\n",
1174 hp->virq, ret); 1174 hp->virq, ret);
diff --git a/drivers/char/ip2/i2ellis.h b/drivers/char/ip2/i2ellis.h
index 510b026d7d2..5eabe47b0bc 100644
--- a/drivers/char/ip2/i2ellis.h
+++ b/drivers/char/ip2/i2ellis.h
@@ -47,7 +47,6 @@
47//---------------------- 47//----------------------
48// Mandatory Includes: 48// Mandatory Includes:
49//---------------------- 49//----------------------
50#include <linux/config.h>
51#include "ip2types.h" 50#include "ip2types.h"
52#include "i2hw.h" // The hardware definitions 51#include "i2hw.h" // The hardware definitions
53 52
diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
index 8619542766c..a4200a2b081 100644
--- a/drivers/char/ip2/ip2main.c
+++ b/drivers/char/ip2/ip2main.c
@@ -82,7 +82,6 @@
82/************/ 82/************/
83/* Includes */ 83/* Includes */
84/************/ 84/************/
85#include <linux/config.h>
86 85
87#include <linux/ctype.h> 86#include <linux/ctype.h>
88#include <linux/string.h> 87#include <linux/string.h>
@@ -492,8 +491,8 @@ static struct tty_operations ip2_ops = {
492/* initialisation of the devices and driver structures, and registers itself */ 491/* initialisation of the devices and driver structures, and registers itself */
493/* with the relevant kernel modules. */ 492/* with the relevant kernel modules. */
494/******************************************************************************/ 493/******************************************************************************/
495/* SA_INTERRUPT- if set blocks all interrupts else only this line */ 494/* IRQF_DISABLED - if set blocks all interrupts else only this line */
496/* SA_SHIRQ - for shared irq PCI or maybe EISA only */ 495/* IRQF_SHARED - for shared irq PCI or maybe EISA only */
497/* SA_RANDOM - can be source for cert. random number generators */ 496/* SA_RANDOM - can be source for cert. random number generators */
498#define IP2_SA_FLAGS 0 497#define IP2_SA_FLAGS 0
499 498
@@ -754,7 +753,7 @@ retry:
754 if (have_requested_irq(ip2config.irq[i])) 753 if (have_requested_irq(ip2config.irq[i]))
755 continue; 754 continue;
756 rc = request_irq( ip2config.irq[i], ip2_interrupt, 755 rc = request_irq( ip2config.irq[i], ip2_interrupt,
757 IP2_SA_FLAGS | (ip2config.type[i] == PCI ? SA_SHIRQ : 0), 756 IP2_SA_FLAGS | (ip2config.type[i] == PCI ? IRQF_SHARED : 0),
758 pcName, (void *)&pcName); 757 pcName, (void *)&pcName);
759 if (rc) { 758 if (rc) {
760 printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc); 759 printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc);
diff --git a/drivers/char/ipmi/ipmi_devintf.c b/drivers/char/ipmi/ipmi_devintf.c
index da637adbbfa..2fc894fef1c 100644
--- a/drivers/char/ipmi/ipmi_devintf.c
+++ b/drivers/char/ipmi/ipmi_devintf.c
@@ -31,7 +31,6 @@
31 * 675 Mass Ave, Cambridge, MA 02139, USA. 31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
37#include <linux/errno.h> 36#include <linux/errno.h>
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index ad26f4b997c..0aa5d608fe6 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -31,7 +31,6 @@
31 * 675 Mass Ave, Cambridge, MA 02139, USA. 31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/errno.h> 35#include <linux/errno.h>
37#include <asm/system.h> 36#include <asm/system.h>
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
index d0b5c08e7b4..8d941db8345 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -31,7 +31,6 @@
31 * with this program; if not, write to the Free Software Foundation, Inc., 31 * with this program; if not, write to the Free Software Foundation, Inc.,
32 * 675 Mass Ave, Cambridge, MA 02139, USA. 32 * 675 Mass Ave, Cambridge, MA 02139, USA.
33 */ 33 */
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
37#include <linux/proc_fs.h> 36#include <linux/proc_fs.h>
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index bd4f2248b75..f57eba0bf25 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -38,7 +38,6 @@
38 * and drives the real SMI state machine. 38 * and drives the real SMI state machine.
39 */ 39 */
40 40
41#include <linux/config.h>
42#include <linux/module.h> 41#include <linux/module.h>
43#include <linux/moduleparam.h> 42#include <linux/moduleparam.h>
44#include <asm/system.h> 43#include <asm/system.h>
@@ -1042,7 +1041,7 @@ static int std_irq_setup(struct smi_info *info)
1042 if (info->si_type == SI_BT) { 1041 if (info->si_type == SI_BT) {
1043 rv = request_irq(info->irq, 1042 rv = request_irq(info->irq,
1044 si_bt_irq_handler, 1043 si_bt_irq_handler,
1045 SA_INTERRUPT, 1044 IRQF_DISABLED,
1046 DEVICE_NAME, 1045 DEVICE_NAME,
1047 info); 1046 info);
1048 if (!rv) 1047 if (!rv)
@@ -1052,7 +1051,7 @@ static int std_irq_setup(struct smi_info *info)
1052 } else 1051 } else
1053 rv = request_irq(info->irq, 1052 rv = request_irq(info->irq,
1054 si_irq_handler, 1053 si_irq_handler,
1055 SA_INTERRUPT, 1054 IRQF_DISABLED,
1056 DEVICE_NAME, 1055 DEVICE_NAME,
1057 info); 1056 info);
1058 if (rv) { 1057 if (rv) {
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 1a0a19c5360..74a889c5833 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -31,7 +31,6 @@
31 * 675 Mass Ave, Cambridge, MA 02139, USA. 31 * 675 Mass Ave, Cambridge, MA 02139, USA.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
37#include <linux/ipmi.h> 36#include <linux/ipmi.h>
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c
index 478bf4d7d06..913be23e0a2 100644
--- a/drivers/char/isicom.c
+++ b/drivers/char/isicom.c
@@ -245,7 +245,7 @@ static int lock_card(struct isi_board *card)
245 printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n", 245 printk(KERN_WARNING "ISICOM: Failed to lock Card (0x%lx)\n",
246 card->base); 246 card->base);
247 247
248 return 0; /* Failed to aquire the card! */ 248 return 0; /* Failed to acquire the card! */
249} 249}
250 250
251static int lock_card_at_interrupt(struct isi_board *card) 251static int lock_card_at_interrupt(struct isi_board *card)
@@ -262,7 +262,7 @@ static int lock_card_at_interrupt(struct isi_board *card)
262 spin_unlock_irqrestore(&card->card_lock, card->flags); 262 spin_unlock_irqrestore(&card->card_lock, card->flags);
263 } 263 }
264 /* Failing in interrupt is an acceptable event */ 264 /* Failing in interrupt is an acceptable event */
265 return 0; /* Failed to aquire the card! */ 265 return 0; /* Failed to acquire the card! */
266} 266}
267 267
268static void unlock_card(struct isi_board *card) 268static void unlock_card(struct isi_board *card)
@@ -1614,14 +1614,14 @@ static int __devinit isicom_register_isr(struct pci_dev *pdev,
1614 const unsigned int index) 1614 const unsigned int index)
1615{ 1615{
1616 struct isi_board *board = pci_get_drvdata(pdev); 1616 struct isi_board *board = pci_get_drvdata(pdev);
1617 unsigned long irqflags = SA_INTERRUPT; 1617 unsigned long irqflags = IRQF_DISABLED;
1618 int retval = -EINVAL; 1618 int retval = -EINVAL;
1619 1619
1620 if (!board->base) 1620 if (!board->base)
1621 goto end; 1621 goto end;
1622 1622
1623 if (board->isa == NO) 1623 if (board->isa == NO)
1624 irqflags |= SA_SHIRQ; 1624 irqflags |= IRQF_SHARED;
1625 1625
1626 retval = request_irq(board->irq, isicom_interrupt, irqflags, 1626 retval = request_irq(board->irq, isicom_interrupt, irqflags,
1627 ISICOM_NAME, board); 1627 ISICOM_NAME, board);
diff --git a/drivers/char/istallion.c b/drivers/char/istallion.c
index 18c0dcf894c..fbce2f0669d 100644
--- a/drivers/char/istallion.c
+++ b/drivers/char/istallion.c
@@ -26,7 +26,6 @@
26 26
27/*****************************************************************************/ 27/*****************************************************************************/
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
32#include <linux/interrupt.h> 31#include <linux/interrupt.h>
diff --git a/drivers/char/ite_gpio.c b/drivers/char/ite_gpio.c
index d1ed6ac950d..747ba45e50e 100644
--- a/drivers/char/ite_gpio.c
+++ b/drivers/char/ite_gpio.c
@@ -397,7 +397,7 @@ int __init ite_gpio_init(void)
397 init_waitqueue_head(&ite_gpio_wait[i]); 397 init_waitqueue_head(&ite_gpio_wait[i]);
398 } 398 }
399 399
400 if (request_irq(ite_gpio_irq, ite_gpio_irq_handler, SA_SHIRQ, "gpio", 0) < 0) { 400 if (request_irq(ite_gpio_irq, ite_gpio_irq_handler, IRQF_SHARED, "gpio", 0) < 0) {
401 misc_deregister(&ite_gpio_miscdev); 401 misc_deregister(&ite_gpio_miscdev);
402 release_region(ite_gpio_base, 0x1c); 402 release_region(ite_gpio_base, 0x1c);
403 return 0; 403 return 0;
diff --git a/drivers/char/keyboard.c b/drivers/char/keyboard.c
index 4bb3d227260..056ebe84b81 100644
--- a/drivers/char/keyboard.c
+++ b/drivers/char/keyboard.c
@@ -24,7 +24,6 @@
24 * 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik) 24 * 21-08-02: Converted to input API, major cleanup. (Vojtech Pavlik)
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
30#include <linux/tty.h> 29#include <linux/tty.h>
diff --git a/drivers/char/lcd.c b/drivers/char/lcd.c
index 29963d8be66..7d49b241de5 100644
--- a/drivers/char/lcd.c
+++ b/drivers/char/lcd.c
@@ -14,7 +14,6 @@
14 14
15#define RTC_IO_EXTENT 0x10 /*Only really two ports, but... */ 15#define RTC_IO_EXTENT 0x10 /*Only really two ports, but... */
16 16
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/miscdevice.h> 19#include <linux/miscdevice.h>
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index b11a390581b..582cdbdb0c4 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -114,7 +114,6 @@
114#include <linux/module.h> 114#include <linux/module.h>
115#include <linux/init.h> 115#include <linux/init.h>
116 116
117#include <linux/config.h>
118#include <linux/errno.h> 117#include <linux/errno.h>
119#include <linux/kernel.h> 118#include <linux/kernel.h>
120#include <linux/major.h> 119#include <linux/major.h>
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index c268ee04b2a..0385650f607 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -10,7 +10,6 @@
10 * MOATB Core Services driver. 10 * MOATB Core Services driver.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/interrupt.h> 13#include <linux/interrupt.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
@@ -593,7 +592,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev)
593 getdma->intrHostDest = sn_irq->irq_xtalkaddr; 592 getdma->intrHostDest = sn_irq->irq_xtalkaddr;
594 getdma->intrVector = sn_irq->irq_irq; 593 getdma->intrVector = sn_irq->irq_irq;
595 if (request_irq(sn_irq->irq_irq, 594 if (request_irq(sn_irq->irq_irq,
596 (void *)mbcs_completion_intr_handler, SA_SHIRQ, 595 (void *)mbcs_completion_intr_handler, IRQF_SHARED,
597 "MBCS get intr", (void *)soft)) { 596 "MBCS get intr", (void *)soft)) {
598 tiocx_irq_free(soft->get_sn_irq); 597 tiocx_irq_free(soft->get_sn_irq);
599 return -EAGAIN; 598 return -EAGAIN;
@@ -609,7 +608,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev)
609 putdma->intrHostDest = sn_irq->irq_xtalkaddr; 608 putdma->intrHostDest = sn_irq->irq_xtalkaddr;
610 putdma->intrVector = sn_irq->irq_irq; 609 putdma->intrVector = sn_irq->irq_irq;
611 if (request_irq(sn_irq->irq_irq, 610 if (request_irq(sn_irq->irq_irq,
612 (void *)mbcs_completion_intr_handler, SA_SHIRQ, 611 (void *)mbcs_completion_intr_handler, IRQF_SHARED,
613 "MBCS put intr", (void *)soft)) { 612 "MBCS put intr", (void *)soft)) {
614 tiocx_irq_free(soft->put_sn_irq); 613 tiocx_irq_free(soft->put_sn_irq);
615 free_irq(soft->get_sn_irq->irq_irq, soft); 614 free_irq(soft->get_sn_irq->irq_irq, soft);
@@ -629,7 +628,7 @@ static int mbcs_intr_alloc(struct cx_dev *dev)
629 algo->intrHostDest = sn_irq->irq_xtalkaddr; 628 algo->intrHostDest = sn_irq->irq_xtalkaddr;
630 algo->intrVector = sn_irq->irq_irq; 629 algo->intrVector = sn_irq->irq_irq;
631 if (request_irq(sn_irq->irq_irq, 630 if (request_irq(sn_irq->irq_irq,
632 (void *)mbcs_completion_intr_handler, SA_SHIRQ, 631 (void *)mbcs_completion_intr_handler, IRQF_SHARED,
633 "MBCS algo intr", (void *)soft)) { 632 "MBCS algo intr", (void *)soft)) {
634 tiocx_irq_free(soft->algo_sn_irq); 633 tiocx_irq_free(soft->algo_sn_irq);
635 free_irq(soft->put_sn_irq->irq_irq, soft); 634 free_irq(soft->put_sn_irq->irq_irq, soft);
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 6fe7b6c6c46..70f3954d6df 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -8,7 +8,6 @@
8 * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com> 8 * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/mm.h> 11#include <linux/mm.h>
13#include <linux/miscdevice.h> 12#include <linux/miscdevice.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
diff --git a/drivers/char/misc.c b/drivers/char/misc.c
index dfe1cede391..d5fa19da330 100644
--- a/drivers/char/misc.c
+++ b/drivers/char/misc.c
@@ -34,7 +34,6 @@
34 */ 34 */
35 35
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/config.h>
38 37
39#include <linux/fs.h> 38#include <linux/fs.h>
40#include <linux/errno.h> 39#include <linux/errno.h>
diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
index 95e8122b806..70b774ff5aa 100644
--- a/drivers/char/mmtimer.c
+++ b/drivers/char/mmtimer.c
@@ -687,7 +687,7 @@ static int __init mmtimer_init(void)
687 mmtimer_femtoperiod = ((unsigned long)1E15 + sn_rtc_cycles_per_second / 687 mmtimer_femtoperiod = ((unsigned long)1E15 + sn_rtc_cycles_per_second /
688 2) / sn_rtc_cycles_per_second; 688 2) / sn_rtc_cycles_per_second;
689 689
690 if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, SA_PERCPU_IRQ, MMTIMER_NAME, NULL)) { 690 if (request_irq(SGI_MMTIMER_VECTOR, mmtimer_interrupt, IRQF_PERCPU, MMTIMER_NAME, NULL)) {
691 printk(KERN_WARNING "%s: unable to allocate interrupt.", 691 printk(KERN_WARNING "%s: unable to allocate interrupt.",
692 MMTIMER_NAME); 692 MMTIMER_NAME);
693 return -1; 693 return -1;
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 52ef61f54ba..4ea7bd5f4f5 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -29,7 +29,6 @@
29 * version : 5.1 29 * version : 5.1
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/types.h> 33#include <linux/types.h>
35#include <linux/mm.h> 34#include <linux/mm.h>
diff --git a/drivers/char/mwave/3780i.c b/drivers/char/mwave/3780i.c
index d1fe05e8388..4e4865e90e5 100644
--- a/drivers/char/mwave/3780i.c
+++ b/drivers/char/mwave/3780i.c
@@ -46,7 +46,6 @@
46* First release to the public 46* First release to the public
47*/ 47*/
48 48
49#include <linux/config.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
51#include <linux/unistd.h> 50#include <linux/unistd.h>
52#include <linux/delay.h> 51#include <linux/delay.h>
diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index 72cfd09091e..556abd3e0d0 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -36,7 +36,6 @@
36 */ 36 */
37 37
38 38
39#include <linux/config.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/autoconf.h> 40#include <linux/autoconf.h>
42#include <linux/errno.h> 41#include <linux/errno.h>
@@ -95,7 +94,7 @@
95#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\ 94#define RELEVANT_IFLAG(iflag) (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|\
96 IXON|IXOFF)) 95 IXON|IXOFF))
97 96
98#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) 97#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? IRQF_SHARED : IRQF_DISABLED)
99 98
100#define C168_ASIC_ID 1 99#define C168_ASIC_ID 1
101#define C104_ASIC_ID 2 100#define C104_ASIC_ID 2
diff --git a/drivers/char/n_hdlc.c b/drivers/char/n_hdlc.c
index 9f54733f162..337a87f86a3 100644
--- a/drivers/char/n_hdlc.c
+++ b/drivers/char/n_hdlc.c
@@ -81,7 +81,6 @@
81#define HDLC_MAGIC 0x239e 81#define HDLC_MAGIC 0x239e
82#define HDLC_VERSION "$Revision: 4.8 $" 82#define HDLC_VERSION "$Revision: 4.8 $"
83 83
84#include <linux/config.h>
85#include <linux/module.h> 84#include <linux/module.h>
86#include <linux/init.h> 85#include <linux/init.h>
87#include <linux/kernel.h> 86#include <linux/kernel.h>
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c
index 3556ccd7757..8c5f102622b 100644
--- a/drivers/char/nvram.c
+++ b/drivers/char/nvram.c
@@ -37,7 +37,6 @@
37#define NVRAM_VERSION "1.2" 37#define NVRAM_VERSION "1.2"
38 38
39#include <linux/module.h> 39#include <linux/module.h>
40#include <linux/config.h>
41#include <linux/sched.h> 40#include <linux/sched.h>
42#include <linux/smp_lock.h> 41#include <linux/smp_lock.h>
43#include <linux/nvram.h> 42#include <linux/nvram.h>
diff --git a/drivers/char/nwbutton.c b/drivers/char/nwbutton.c
index 4083b781adb..f240a104d25 100644
--- a/drivers/char/nwbutton.c
+++ b/drivers/char/nwbutton.c
@@ -4,7 +4,6 @@
4 * 4 *
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
@@ -224,7 +223,7 @@ static int __init nwbutton_init(void)
224 return -EBUSY; 223 return -EBUSY;
225 } 224 }
226 225
227 if (request_irq (IRQ_NETWINDER_BUTTON, button_handler, SA_INTERRUPT, 226 if (request_irq (IRQ_NETWINDER_BUTTON, button_handler, IRQF_DISABLED,
228 "nwbutton", NULL)) { 227 "nwbutton", NULL)) {
229 printk (KERN_WARNING "nwbutton: IRQ %d is not free.\n", 228 printk (KERN_WARNING "nwbutton: IRQ %d is not free.\n",
230 IRQ_NETWINDER_BUTTON); 229 IRQ_NETWINDER_BUTTON);
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index eab5394da66..31c8a21f9d8 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -149,12 +149,7 @@ struct cm4000_dev {
149#define ZERO_DEV(dev) \ 149#define ZERO_DEV(dev) \
150 memset(&dev->atr_csum,0, \ 150 memset(&dev->atr_csum,0, \
151 sizeof(struct cm4000_dev) - \ 151 sizeof(struct cm4000_dev) - \
152 /*link*/ sizeof(struct pcmcia_device *) - \ 152 offsetof(struct cm4000_dev, atr_csum))
153 /*node*/ sizeof(dev_node_t) - \
154 /*atr*/ MAX_ATR*sizeof(char) - \
155 /*rbuf*/ 512*sizeof(char) - \
156 /*sbuf*/ 512*sizeof(char) - \
157 /*queue*/ 4*sizeof(wait_queue_head_t))
158 153
159static struct pcmcia_device *dev_table[CM4000_MAX_DEV]; 154static struct pcmcia_device *dev_table[CM4000_MAX_DEV];
160static struct class *cmm_class; 155static struct class *cmm_class;
diff --git a/drivers/char/pty.c b/drivers/char/pty.c
index 9491e430756..34dd4c38110 100644
--- a/drivers/char/pty.c
+++ b/drivers/char/pty.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> /* For EXPORT_SYMBOL */ 14#include <linux/module.h> /* For EXPORT_SYMBOL */
16 15
17#include <linux/errno.h> 16#include <linux/errno.h>
diff --git a/drivers/char/qtronix.c b/drivers/char/qtronix.c
index 601d09baf9d..9d134e98d2a 100644
--- a/drivers/char/qtronix.c
+++ b/drivers/char/qtronix.c
@@ -33,7 +33,6 @@
33 * 675 Mass Ave, Cambridge, MA 02139, USA. 33 * 675 Mass Ave, Cambridge, MA 02139, USA.
34 */ 34 */
35 35
36#include <linux/config.h>
37 36
38/* 37/*
39 * NOTE: 38 * NOTE:
@@ -145,7 +144,7 @@ void __init init_qtronix_990P_kbd(void)
145 cir_port_init(cir); 144 cir_port_init(cir);
146 145
147 retval = request_irq(IT8172_CIR0_IRQ, kbd_int_handler, 146 retval = request_irq(IT8172_CIR0_IRQ, kbd_int_handler,
148 (unsigned long )(SA_INTERRUPT|SA_SHIRQ), 147 (unsigned long )(IRQF_DISABLED|IRQF_SHARED),
149 (const char *)"Qtronix IR Keyboard", (void *)cir); 148 (const char *)"Qtronix IR Keyboard", (void *)cir);
150 149
151 if (retval) { 150 if (retval) {
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 58f3512c52e..164bddae047 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -224,7 +224,6 @@
224 */ 224 */
225 225
226#include <linux/utsname.h> 226#include <linux/utsname.h>
227#include <linux/config.h>
228#include <linux/module.h> 227#include <linux/module.h>
229#include <linux/kernel.h> 228#include <linux/kernel.h>
230#include <linux/major.h> 229#include <linux/major.h>
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index aa43436d5d1..3afc6a47ebb 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -33,7 +33,6 @@
33 * */ 33 * */
34 34
35#include <linux/module.h> 35#include <linux/module.h>
36#include <linux/config.h>
37#include <linux/kdev_t.h> 36#include <linux/kdev_t.h>
38#include <asm/io.h> 37#include <asm/io.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
@@ -1120,7 +1119,7 @@ static int __init rio_init(void)
1120 for (i = 0; i < p->RIONumHosts; i++) { 1119 for (i = 0; i < p->RIONumHosts; i++) {
1121 hp = &p->RIOHosts[i]; 1120 hp = &p->RIOHosts[i];
1122 if (hp->Ivec) { 1121 if (hp->Ivec) {
1123 int mode = SA_SHIRQ; 1122 int mode = IRQF_SHARED;
1124 if (hp->Ivec & 0x8000) { 1123 if (hp->Ivec & 0x8000) {
1125 mode = 0; 1124 mode = 0;
1126 hp->Ivec &= 0x7fff; 1125 hp->Ivec &= 0x7fff;
diff --git a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h
index 55b9c97e847..dc3f005614a 100644
--- a/drivers/char/rio/rio_linux.h
+++ b/drivers/char/rio/rio_linux.h
@@ -23,7 +23,6 @@
23 * Version 1.0 -- July, 1999. 23 * Version 1.0 -- July, 1999.
24 * 24 *
25 */ 25 */
26#include <linux/config.h>
27 26
28#define RIO_NBOARDS 4 27#define RIO_NBOARDS 4
29#define RIO_PORTSPERBOARD 128 28#define RIO_PORTSPERBOARD 128
diff --git a/drivers/char/rio/rioinit.c b/drivers/char/rio/rioinit.c
index 12e34bc3f7c..99f3df02b61 100644
--- a/drivers/char/rio/rioinit.c
+++ b/drivers/char/rio/rioinit.c
@@ -33,7 +33,6 @@
33static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3"; 33static char *_rioinit_c_sccs_ = "@(#)rioinit.c 1.3";
34#endif 34#endif
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/slab.h> 37#include <linux/slab.h>
39#include <linux/errno.h> 38#include <linux/errno.h>
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c
index c84c3c3f10c..f1c94f771af 100644
--- a/drivers/char/riscom8.c
+++ b/drivers/char/riscom8.c
@@ -625,7 +625,7 @@ static inline int rc_setup_board(struct riscom_board * bp)
625 if (bp->flags & RC_BOARD_ACTIVE) 625 if (bp->flags & RC_BOARD_ACTIVE)
626 return 0; 626 return 0;
627 627
628 error = request_irq(bp->irq, rc_interrupt, SA_INTERRUPT, 628 error = request_irq(bp->irq, rc_interrupt, IRQF_DISABLED,
629 "RISCom/8", NULL); 629 "RISCom/8", NULL);
630 if (error) 630 if (error)
631 return error; 631 return error;
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 0897b0c8d52..aefac4ac0bf 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -61,7 +61,6 @@
61 * this driver.) 61 * this driver.)
62 */ 62 */
63 63
64#include <linux/config.h>
65#include <linux/interrupt.h> 64#include <linux/interrupt.h>
66#include <linux/module.h> 65#include <linux/module.h>
67#include <linux/kernel.h> 66#include <linux/kernel.h>
@@ -221,7 +220,7 @@ static inline unsigned char rtc_is_updating(void)
221 220
222#ifdef RTC_IRQ 221#ifdef RTC_IRQ
223/* 222/*
224 * A very tiny interrupt handler. It runs with SA_INTERRUPT set, 223 * A very tiny interrupt handler. It runs with IRQF_DISABLED set,
225 * but there is possibility of conflicting with the set_rtc_mmss() 224 * but there is possibility of conflicting with the set_rtc_mmss()
226 * call (the rtc irq and the timer irq can easily run at the same 225 * call (the rtc irq and the timer irq can easily run at the same
227 * time in two different CPUs). So we need to serialize 226 * time in two different CPUs). So we need to serialize
@@ -959,7 +958,7 @@ found:
959 * XXX Interrupt pin #7 in Espresso is shared between RTC and 958 * XXX Interrupt pin #7 in Espresso is shared between RTC and
960 * PCI Slot 2 INTA# (and some INTx# in Slot 1). 959 * PCI Slot 2 INTA# (and some INTx# in Slot 1).
961 */ 960 */
962 if (request_irq(rtc_irq, rtc_interrupt, SA_SHIRQ, "rtc", (void *)&rtc_port)) { 961 if (request_irq(rtc_irq, rtc_interrupt, IRQF_SHARED, "rtc", (void *)&rtc_port)) {
963 printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq); 962 printk(KERN_ERR "rtc: cannot register IRQ %d\n", rtc_irq);
964 return -EIO; 963 return -EIO;
965 } 964 }
@@ -977,7 +976,7 @@ no_irq:
977 rtc_int_handler_ptr = rtc_interrupt; 976 rtc_int_handler_ptr = rtc_interrupt;
978 } 977 }
979 978
980 if(request_irq(RTC_IRQ, rtc_int_handler_ptr, SA_INTERRUPT, "rtc", NULL)) { 979 if(request_irq(RTC_IRQ, rtc_int_handler_ptr, IRQF_DISABLED, "rtc", NULL)) {
981 /* Yeah right, seeing as irq 8 doesn't even hit the bus. */ 980 /* Yeah right, seeing as irq 8 doesn't even hit the bus. */
982 printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ); 981 printk(KERN_ERR "rtc: IRQ %d is not free.\n", RTC_IRQ);
983 release_region(RTC_PORT(0), RTC_IO_EXTENT); 982 release_region(RTC_PORT(0), RTC_IO_EXTENT);
diff --git a/drivers/char/s3c2410-rtc.c b/drivers/char/s3c2410-rtc.c
index b0038b19b50..5458ef1634e 100644
--- a/drivers/char/s3c2410-rtc.c
+++ b/drivers/char/s3c2410-rtc.c
@@ -341,13 +341,13 @@ static int s3c2410_rtc_open(void)
341 int ret; 341 int ret;
342 342
343 ret = request_irq(s3c2410_rtc_alarmno, s3c2410_rtc_alarmirq, 343 ret = request_irq(s3c2410_rtc_alarmno, s3c2410_rtc_alarmirq,
344 SA_INTERRUPT, "s3c2410-rtc alarm", NULL); 344 IRQF_DISABLED, "s3c2410-rtc alarm", NULL);
345 345
346 if (ret) 346 if (ret)
347 printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_alarmno); 347 printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_alarmno);
348 348
349 ret = request_irq(s3c2410_rtc_tickno, s3c2410_rtc_tickirq, 349 ret = request_irq(s3c2410_rtc_tickno, s3c2410_rtc_tickirq,
350 SA_INTERRUPT, "s3c2410-rtc tick", NULL); 350 IRQF_DISABLED, "s3c2410-rtc tick", NULL);
351 351
352 if (ret) { 352 if (ret) {
353 printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_tickno); 353 printk(KERN_ERR "IRQ%d already in use\n", s3c2410_rtc_tickno);
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index c851eeaa406..21a710cb4bb 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -44,7 +44,6 @@
44 * - replace bottom half handler with task queue handler 44 * - replace bottom half handler with task queue handler
45 */ 45 */
46 46
47#include <linux/config.h>
48#include <linux/errno.h> 47#include <linux/errno.h>
49#include <linux/signal.h> 48#include <linux/signal.h>
50#include <linux/sched.h> 49#include <linux/sched.h>
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 56c8243cdb7..203240b6c08 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -105,7 +105,7 @@ scdrv_open(struct inode *inode, struct file *file)
105 105
106 /* hook this subchannel up to the system controller interrupt */ 106 /* hook this subchannel up to the system controller interrupt */
107 rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt, 107 rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt,
108 SA_SHIRQ | SA_INTERRUPT, 108 IRQF_SHARED | IRQF_DISABLED,
109 SYSCTL_BASENAME, sd); 109 SYSCTL_BASENAME, sd);
110 if (rv) { 110 if (rv) {
111 ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch); 111 ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch);
diff --git a/drivers/char/snsc_event.c b/drivers/char/snsc_event.c
index e234d50e142..8b2210b633d 100644
--- a/drivers/char/snsc_event.c
+++ b/drivers/char/snsc_event.c
@@ -310,7 +310,7 @@ scdrv_event_init(struct sysctl_data_s *scd)
310 310
311 /* hook event subchannel up to the system controller interrupt */ 311 /* hook event subchannel up to the system controller interrupt */
312 rv = request_irq(SGI_UART_VECTOR, scdrv_event_interrupt, 312 rv = request_irq(SGI_UART_VECTOR, scdrv_event_interrupt,
313 SA_SHIRQ | SA_INTERRUPT, 313 IRQF_SHARED | IRQF_DISABLED,
314 "system controller events", event_sd); 314 "system controller events", event_sd);
315 if (rv) { 315 if (rv) {
316 printk(KERN_WARNING "%s: irq request failed (%d)\n", 316 printk(KERN_WARNING "%s: irq request failed (%d)\n",
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c
index 43dfd8689dc..45508a03950 100644
--- a/drivers/char/sonypi.c
+++ b/drivers/char/sonypi.c
@@ -33,7 +33,6 @@
33 * 33 *
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/input.h> 37#include <linux/input.h>
39#include <linux/pci.h> 38#include <linux/pci.h>
@@ -1283,7 +1282,7 @@ static int __devinit sonypi_setup_irq(struct sonypi_device *dev,
1283 while (irq_list->irq) { 1282 while (irq_list->irq) {
1284 1283
1285 if (!request_irq(irq_list->irq, sonypi_irq, 1284 if (!request_irq(irq_list->irq, sonypi_irq,
1286 SA_SHIRQ, "sonypi", sonypi_irq)) { 1285 IRQF_SHARED, "sonypi", sonypi_irq)) {
1287 dev->irq = irq_list->irq; 1286 dev->irq = irq_list->irq;
1288 dev->bits = irq_list->bits; 1287 dev->bits = irq_list->bits;
1289 return 0; 1288 return 0;
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c
index d2d6b01dcd0..cb2859249d4 100644
--- a/drivers/char/specialix.c
+++ b/drivers/char/specialix.c
@@ -75,7 +75,6 @@
75 * Documentation/specialix.txt 75 * Documentation/specialix.txt
76 */ 76 */
77 77
78#include <linux/config.h>
79#include <linux/module.h> 78#include <linux/module.h>
80 79
81#include <asm/io.h> 80#include <asm/io.h>
@@ -1016,9 +1015,9 @@ static inline int sx_setup_board(struct specialix_board * bp)
1016 return 0; 1015 return 0;
1017 1016
1018 if (bp->flags & SX_BOARD_IS_PCI) 1017 if (bp->flags & SX_BOARD_IS_PCI)
1019 error = request_irq(bp->irq, sx_interrupt, SA_INTERRUPT | SA_SHIRQ, "specialix IO8+", bp); 1018 error = request_irq(bp->irq, sx_interrupt, IRQF_DISABLED | IRQF_SHARED, "specialix IO8+", bp);
1020 else 1019 else
1021 error = request_irq(bp->irq, sx_interrupt, SA_INTERRUPT, "specialix IO8+", bp); 1020 error = request_irq(bp->irq, sx_interrupt, IRQF_DISABLED, "specialix IO8+", bp);
1022 1021
1023 if (error) 1022 if (error)
1024 return error; 1023 return error;
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c
index 0f7a542d904..ed7b8eaf036 100644
--- a/drivers/char/stallion.c
+++ b/drivers/char/stallion.c
@@ -26,7 +26,6 @@
26 26
27/*****************************************************************************/ 27/*****************************************************************************/
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
32#include <linux/interrupt.h> 31#include <linux/interrupt.h>
@@ -2303,7 +2302,7 @@ static inline int stl_initeio(stlbrd_t *brdp)
2303 brdp->nrpanels = 1; 2302 brdp->nrpanels = 1;
2304 brdp->state |= BRD_FOUND; 2303 brdp->state |= BRD_FOUND;
2305 brdp->hwid = status; 2304 brdp->hwid = status;
2306 if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { 2305 if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) {
2307 printk("STALLION: failed to register interrupt " 2306 printk("STALLION: failed to register interrupt "
2308 "routine for %s irq=%d\n", name, brdp->irq); 2307 "routine for %s irq=%d\n", name, brdp->irq);
2309 rc = -ENODEV; 2308 rc = -ENODEV;
@@ -2513,7 +2512,7 @@ static inline int stl_initech(stlbrd_t *brdp)
2513 outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl); 2512 outb((brdp->ioctrlval | ECH_BRDDISABLE), brdp->ioctrl);
2514 2513
2515 brdp->state |= BRD_FOUND; 2514 brdp->state |= BRD_FOUND;
2516 if (request_irq(brdp->irq, stl_intr, SA_SHIRQ, name, brdp) != 0) { 2515 if (request_irq(brdp->irq, stl_intr, IRQF_SHARED, name, brdp) != 0) {
2517 printk("STALLION: failed to register interrupt " 2516 printk("STALLION: failed to register interrupt "
2518 "routine for %s irq=%d\n", name, brdp->irq); 2517 "routine for %s irq=%d\n", name, brdp->irq);
2519 i = -ENODEV; 2518 i = -ENODEV;
diff --git a/drivers/char/sx.c b/drivers/char/sx.c
index 76b9107f7f8..45c193aa11d 100644
--- a/drivers/char/sx.c
+++ b/drivers/char/sx.c
@@ -1993,7 +1993,7 @@ static int sx_init_board (struct sx_board *board)
1993 if(board->irq > 0) { 1993 if(board->irq > 0) {
1994 /* fixed irq, probably PCI */ 1994 /* fixed irq, probably PCI */
1995 if(sx_irqmask & (1 << board->irq)) { /* may we use this irq? */ 1995 if(sx_irqmask & (1 << board->irq)) { /* may we use this irq? */
1996 if(request_irq(board->irq, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board)) { 1996 if(request_irq(board->irq, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board)) {
1997 printk(KERN_ERR "sx: Cannot allocate irq %d.\n", board->irq); 1997 printk(KERN_ERR "sx: Cannot allocate irq %d.\n", board->irq);
1998 board->irq = 0; 1998 board->irq = 0;
1999 } 1999 }
@@ -2005,7 +2005,7 @@ static int sx_init_board (struct sx_board *board)
2005 int irqmask = sx_irqmask & (IS_SX_BOARD(board) ? SX_ISA_IRQ_MASK : SI2_ISA_IRQ_MASK); 2005 int irqmask = sx_irqmask & (IS_SX_BOARD(board) ? SX_ISA_IRQ_MASK : SI2_ISA_IRQ_MASK);
2006 for(irqnr = 15; irqnr > 0; irqnr--) 2006 for(irqnr = 15; irqnr > 0; irqnr--)
2007 if(irqmask & (1 << irqnr)) 2007 if(irqmask & (1 << irqnr))
2008 if(! request_irq(irqnr, sx_interrupt, SA_SHIRQ | SA_INTERRUPT, "sx", board)) 2008 if(! request_irq(irqnr, sx_interrupt, IRQF_SHARED | IRQF_DISABLED, "sx", board))
2009 break; 2009 break;
2010 if(! irqnr) 2010 if(! irqnr)
2011 printk(KERN_ERR "sx: Cannot allocate IRQ.\n"); 2011 printk(KERN_ERR "sx: Cannot allocate IRQ.\n");
diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
index fee2aca3f6a..df782dd1098 100644
--- a/drivers/char/synclink.c
+++ b/drivers/char/synclink.c
@@ -8150,7 +8150,7 @@ static int __devinit synclink_init_one (struct pci_dev *dev,
8150 8150
8151 info->bus_type = MGSL_BUS_TYPE_PCI; 8151 info->bus_type = MGSL_BUS_TYPE_PCI;
8152 info->io_addr_size = 8; 8152 info->io_addr_size = 8;
8153 info->irq_flags = SA_SHIRQ; 8153 info->irq_flags = IRQF_SHARED;
8154 8154
8155 if (dev->device == 0x0210) { 8155 if (dev->device == 0x0210) {
8156 /* Version 1 PCI9030 based universal PCI adapter */ 8156 /* Version 1 PCI9030 based universal PCI adapter */
diff --git a/drivers/char/synclink_gt.c b/drivers/char/synclink_gt.c
index 4e35d418122..e829594195c 100644
--- a/drivers/char/synclink_gt.c
+++ b/drivers/char/synclink_gt.c
@@ -46,7 +46,6 @@
46//#define DBGRBUF(info) dump_rbufs(info) 46//#define DBGRBUF(info) dump_rbufs(info)
47 47
48 48
49#include <linux/config.h>
50#include <linux/module.h> 49#include <linux/module.h>
51#include <linux/version.h> 50#include <linux/version.h>
52#include <linux/errno.h> 51#include <linux/errno.h>
@@ -3344,7 +3343,7 @@ static struct slgt_info *alloc_dev(int adapter_num, int port_num, struct pci_dev
3344 info->phys_reg_addr = pci_resource_start(pdev,0); 3343 info->phys_reg_addr = pci_resource_start(pdev,0);
3345 3344
3346 info->bus_type = MGSL_BUS_TYPE_PCI; 3345 info->bus_type = MGSL_BUS_TYPE_PCI;
3347 info->irq_flags = SA_SHIRQ; 3346 info->irq_flags = IRQF_SHARED;
3348 3347
3349 info->init_error = -1; /* assume error, set to 0 on successful init */ 3348 info->init_error = -1; /* assume error, set to 0 on successful init */
3350 } 3349 }
diff --git a/drivers/char/synclinkmp.c b/drivers/char/synclinkmp.c
index 21bf15ad998..1e443a233f5 100644
--- a/drivers/char/synclinkmp.c
+++ b/drivers/char/synclinkmp.c
@@ -34,7 +34,6 @@
34 34
35#define MAX_DEVICES 12 35#define MAX_DEVICES 12
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/errno.h> 38#include <linux/errno.h>
40#include <linux/signal.h> 39#include <linux/signal.h>
@@ -3836,7 +3835,7 @@ static SLMP_INFO *alloc_dev(int adapter_num, int port_num, struct pci_dev *pdev)
3836 info->phys_statctrl_base &= ~(PAGE_SIZE-1); 3835 info->phys_statctrl_base &= ~(PAGE_SIZE-1);
3837 3836
3838 info->bus_type = MGSL_BUS_TYPE_PCI; 3837 info->bus_type = MGSL_BUS_TYPE_PCI;
3839 info->irq_flags = SA_SHIRQ; 3838 info->irq_flags = IRQF_SHARED;
3840 3839
3841 init_timer(&info->tx_timer); 3840 init_timer(&info->tx_timer);
3842 info->tx_timer.data = (unsigned long)info; 3841 info->tx_timer.data = (unsigned long)info;
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 35082dc12ea..a064ee9181c 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -12,7 +12,6 @@
12 * based upon discusions in irc://irc.openprojects.net/#kernelnewbies 12 * based upon discusions in irc://irc.openprojects.net/#kernelnewbies
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/interrupt.h> 16#include <linux/interrupt.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
diff --git a/drivers/char/tipar.c b/drivers/char/tipar.c
index f7802e5bd7c..e0633a119d2 100644
--- a/drivers/char/tipar.c
+++ b/drivers/char/tipar.c
@@ -42,7 +42,6 @@
42 */ 42 */
43#undef DEBUG /* change to #define to get debugging 43#undef DEBUG /* change to #define to get debugging
44 * output - for pr_debug() */ 44 * output - for pr_debug() */
45#include <linux/config.h>
46#include <linux/module.h> 45#include <linux/module.h>
47#include <linux/types.h> 46#include <linux/types.h>
48#include <linux/errno.h> 47#include <linux/errno.h>
diff --git a/drivers/char/tlclk.c b/drivers/char/tlclk.c
index ef68d152d3e..952b829e2cb 100644
--- a/drivers/char/tlclk.c
+++ b/drivers/char/tlclk.c
@@ -27,7 +27,6 @@
27 * MPCBL0010 ATCA computer. 27 * MPCBL0010 ATCA computer.
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/init.h> 31#include <linux/init.h>
33#include <linux/sched.h> 32#include <linux/sched.h>
@@ -209,7 +208,7 @@ static int tlclk_open(struct inode *inode, struct file *filp)
209 /* This device is wired through the FPGA IO space of the ATCA blade 208 /* This device is wired through the FPGA IO space of the ATCA blade
210 * we can't share this IRQ */ 209 * we can't share this IRQ */
211 result = request_irq(telclk_interrupt, &tlclk_interrupt, 210 result = request_irq(telclk_interrupt, &tlclk_interrupt,
212 SA_INTERRUPT, "telco_clock", tlclk_interrupt); 211 IRQF_DISABLED, "telco_clock", tlclk_interrupt);
213 if (result == -EBUSY) { 212 if (result == -EBUSY) {
214 printk(KERN_ERR "tlclk: Interrupt can't be reserved.\n"); 213 printk(KERN_ERR "tlclk: Interrupt can't be reserved.\n");
215 return -EBUSY; 214 return -EBUSY;
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 8ea70625f7e..abb0f2aeae6 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -522,7 +522,7 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
522 iowrite8(i, chip->vendor.iobase + 522 iowrite8(i, chip->vendor.iobase +
523 TPM_INT_VECTOR(chip->vendor.locality)); 523 TPM_INT_VECTOR(chip->vendor.locality));
524 if (request_irq 524 if (request_irq
525 (i, tis_int_probe, SA_SHIRQ, 525 (i, tis_int_probe, IRQF_SHARED,
526 chip->vendor.miscdev.name, chip) != 0) { 526 chip->vendor.miscdev.name, chip) != 0) {
527 dev_info(chip->dev, 527 dev_info(chip->dev,
528 "Unable to request irq: %d for probe\n", 528 "Unable to request irq: %d for probe\n",
@@ -557,7 +557,7 @@ static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
557 chip->vendor.iobase + 557 chip->vendor.iobase +
558 TPM_INT_VECTOR(chip->vendor.locality)); 558 TPM_INT_VECTOR(chip->vendor.locality));
559 if (request_irq 559 if (request_irq
560 (chip->vendor.irq, tis_int_handler, SA_SHIRQ, 560 (chip->vendor.irq, tis_int_handler, IRQF_SHARED,
561 chip->vendor.miscdev.name, chip) != 0) { 561 chip->vendor.miscdev.name, chip) != 0) {
562 dev_info(chip->dev, 562 dev_info(chip->dev,
563 "Unable to request irq: %d for use\n", 563 "Unable to request irq: %d for use\n",
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index a1143238fec..615e934da05 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -65,7 +65,6 @@
65 * alloc_tty_struct() always uses kmalloc() -- Andrew Morton <andrewm@uow.edu.eu> 17Mar01 65 * alloc_tty_struct() always uses kmalloc() -- Andrew Morton <andrewm@uow.edu.eu> 17Mar01
66 */ 66 */
67 67
68#include <linux/config.h>
69#include <linux/types.h> 68#include <linux/types.h>
70#include <linux/major.h> 69#include <linux/major.h>
71#include <linux/errno.h> 70#include <linux/errno.h>
diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c
index 234d7f3fb11..45e9bd81bc0 100644
--- a/drivers/char/vc_screen.c
+++ b/drivers/char/vc_screen.c
@@ -21,7 +21,6 @@
21 * - making it shorter - scr_readw are macros which expand in PRETTY long code 21 * - making it shorter - scr_readw are macros which expand in PRETTY long code
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/major.h> 25#include <linux/major.h>
27#include <linux/errno.h> 26#include <linux/errno.h>
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
index 07f5ce4b28e..766f7864c6c 100644
--- a/drivers/char/viocons.c
+++ b/drivers/char/viocons.c
@@ -25,7 +25,6 @@
25 * along with this program; if not, write to the Free Software Foundation, 25 * along with this program; if not, write to the Free Software Foundation,
26 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 26 * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27 */ 27 */
28#include <linux/config.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/proc_fs.h> 29#include <linux/proc_fs.h>
31#include <linux/errno.h> 30#include <linux/errno.h>
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c
index 198f1505ae2..7d42c8ec8db 100644
--- a/drivers/char/viotape.c
+++ b/drivers/char/viotape.c
@@ -31,7 +31,6 @@
31 * the OS/400 partition. The format of the messages is defined in 31 * the OS/400 partition. The format of the messages is defined in
32 * iseries/vio.h 32 * iseries/vio.h
33 */ 33 */
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
37#include <linux/errno.h> 36#include <linux/errno.h>
diff --git a/drivers/char/vme_scc.c b/drivers/char/vme_scc.c
index fe99fc1aba4..bfe5ea948f6 100644
--- a/drivers/char/vme_scc.c
+++ b/drivers/char/vme_scc.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/config.h>
18#include <linux/kdev_t.h> 17#include <linux/kdev_t.h>
19#include <asm/io.h> 18#include <asm/io.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
@@ -204,13 +203,13 @@ static int mvme147_scc_init(void)
204 port->datap = port->ctrlp + 1; 203 port->datap = port->ctrlp + 1;
205 port->port_a = &scc_ports[0]; 204 port->port_a = &scc_ports[0];
206 port->port_b = &scc_ports[1]; 205 port->port_b = &scc_ports[1];
207 request_irq(MVME147_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, 206 request_irq(MVME147_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED,
208 "SCC-A TX", port); 207 "SCC-A TX", port);
209 request_irq(MVME147_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, 208 request_irq(MVME147_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED,
210 "SCC-A status", port); 209 "SCC-A status", port);
211 request_irq(MVME147_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, 210 request_irq(MVME147_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED,
212 "SCC-A RX", port); 211 "SCC-A RX", port);
213 request_irq(MVME147_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, 212 request_irq(MVME147_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED,
214 "SCC-A special cond", port); 213 "SCC-A special cond", port);
215 { 214 {
216 SCC_ACCESS_INIT(port); 215 SCC_ACCESS_INIT(port);
@@ -231,13 +230,13 @@ static int mvme147_scc_init(void)
231 port->datap = port->ctrlp + 1; 230 port->datap = port->ctrlp + 1;
232 port->port_a = &scc_ports[0]; 231 port->port_a = &scc_ports[0];
233 port->port_b = &scc_ports[1]; 232 port->port_b = &scc_ports[1];
234 request_irq(MVME147_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, 233 request_irq(MVME147_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED,
235 "SCC-B TX", port); 234 "SCC-B TX", port);
236 request_irq(MVME147_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, 235 request_irq(MVME147_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED,
237 "SCC-B status", port); 236 "SCC-B status", port);
238 request_irq(MVME147_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, 237 request_irq(MVME147_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED,
239 "SCC-B RX", port); 238 "SCC-B RX", port);
240 request_irq(MVME147_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, 239 request_irq(MVME147_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED,
241 "SCC-B special cond", port); 240 "SCC-B special cond", port);
242 { 241 {
243 SCC_ACCESS_INIT(port); 242 SCC_ACCESS_INIT(port);
@@ -274,13 +273,13 @@ static int mvme162_scc_init(void)
274 port->datap = port->ctrlp + 2; 273 port->datap = port->ctrlp + 2;
275 port->port_a = &scc_ports[0]; 274 port->port_a = &scc_ports[0];
276 port->port_b = &scc_ports[1]; 275 port->port_b = &scc_ports[1];
277 request_irq(MVME162_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, 276 request_irq(MVME162_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED,
278 "SCC-A TX", port); 277 "SCC-A TX", port);
279 request_irq(MVME162_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, 278 request_irq(MVME162_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED,
280 "SCC-A status", port); 279 "SCC-A status", port);
281 request_irq(MVME162_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, 280 request_irq(MVME162_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED,
282 "SCC-A RX", port); 281 "SCC-A RX", port);
283 request_irq(MVME162_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, 282 request_irq(MVME162_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED,
284 "SCC-A special cond", port); 283 "SCC-A special cond", port);
285 { 284 {
286 SCC_ACCESS_INIT(port); 285 SCC_ACCESS_INIT(port);
@@ -301,13 +300,13 @@ static int mvme162_scc_init(void)
301 port->datap = port->ctrlp + 2; 300 port->datap = port->ctrlp + 2;
302 port->port_a = &scc_ports[0]; 301 port->port_a = &scc_ports[0];
303 port->port_b = &scc_ports[1]; 302 port->port_b = &scc_ports[1];
304 request_irq(MVME162_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, 303 request_irq(MVME162_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED,
305 "SCC-B TX", port); 304 "SCC-B TX", port);
306 request_irq(MVME162_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, 305 request_irq(MVME162_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED,
307 "SCC-B status", port); 306 "SCC-B status", port);
308 request_irq(MVME162_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, 307 request_irq(MVME162_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED,
309 "SCC-B RX", port); 308 "SCC-B RX", port);
310 request_irq(MVME162_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, 309 request_irq(MVME162_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED,
311 "SCC-B special cond", port); 310 "SCC-B special cond", port);
312 311
313 { 312 {
@@ -342,13 +341,13 @@ static int bvme6000_scc_init(void)
342 port->datap = port->ctrlp + 4; 341 port->datap = port->ctrlp + 4;
343 port->port_a = &scc_ports[0]; 342 port->port_a = &scc_ports[0];
344 port->port_b = &scc_ports[1]; 343 port->port_b = &scc_ports[1];
345 request_irq(BVME_IRQ_SCCA_TX, scc_tx_int, SA_INTERRUPT, 344 request_irq(BVME_IRQ_SCCA_TX, scc_tx_int, IRQF_DISABLED,
346 "SCC-A TX", port); 345 "SCC-A TX", port);
347 request_irq(BVME_IRQ_SCCA_STAT, scc_stat_int, SA_INTERRUPT, 346 request_irq(BVME_IRQ_SCCA_STAT, scc_stat_int, IRQF_DISABLED,
348 "SCC-A status", port); 347 "SCC-A status", port);
349 request_irq(BVME_IRQ_SCCA_RX, scc_rx_int, SA_INTERRUPT, 348 request_irq(BVME_IRQ_SCCA_RX, scc_rx_int, IRQF_DISABLED,
350 "SCC-A RX", port); 349 "SCC-A RX", port);
351 request_irq(BVME_IRQ_SCCA_SPCOND, scc_spcond_int, SA_INTERRUPT, 350 request_irq(BVME_IRQ_SCCA_SPCOND, scc_spcond_int, IRQF_DISABLED,
352 "SCC-A special cond", port); 351 "SCC-A special cond", port);
353 { 352 {
354 SCC_ACCESS_INIT(port); 353 SCC_ACCESS_INIT(port);
@@ -369,13 +368,13 @@ static int bvme6000_scc_init(void)
369 port->datap = port->ctrlp + 4; 368 port->datap = port->ctrlp + 4;
370 port->port_a = &scc_ports[0]; 369 port->port_a = &scc_ports[0];
371 port->port_b = &scc_ports[1]; 370 port->port_b = &scc_ports[1];
372 request_irq(BVME_IRQ_SCCB_TX, scc_tx_int, SA_INTERRUPT, 371 request_irq(BVME_IRQ_SCCB_TX, scc_tx_int, IRQF_DISABLED,
373 "SCC-B TX", port); 372 "SCC-B TX", port);
374 request_irq(BVME_IRQ_SCCB_STAT, scc_stat_int, SA_INTERRUPT, 373 request_irq(BVME_IRQ_SCCB_STAT, scc_stat_int, IRQF_DISABLED,
375 "SCC-B status", port); 374 "SCC-B status", port);
376 request_irq(BVME_IRQ_SCCB_RX, scc_rx_int, SA_INTERRUPT, 375 request_irq(BVME_IRQ_SCCB_RX, scc_rx_int, IRQF_DISABLED,
377 "SCC-B RX", port); 376 "SCC-B RX", port);
378 request_irq(BVME_IRQ_SCCB_SPCOND, scc_spcond_int, SA_INTERRUPT, 377 request_irq(BVME_IRQ_SCCB_SPCOND, scc_spcond_int, IRQF_DISABLED,
379 "SCC-B special cond", port); 378 "SCC-B special cond", port);
380 379
381 { 380 {
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index d6f65032649..3ef823d7d25 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -86,7 +86,6 @@
86#include <linux/consolemap.h> 86#include <linux/consolemap.h>
87#include <linux/timer.h> 87#include <linux/timer.h>
88#include <linux/interrupt.h> 88#include <linux/interrupt.h>
89#include <linux/config.h>
90#include <linux/workqueue.h> 89#include <linux/workqueue.h>
91#include <linux/bootmem.h> 90#include <linux/bootmem.h>
92#include <linux/pm.h> 91#include <linux/pm.h>
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 24011e7c81f..eccffaf26fa 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -10,7 +10,6 @@
10 * Check put/get_user, cleanups - acme@conectiva.com.br - Jun 2001 10 * Check put/get_user, cleanups - acme@conectiva.com.br - Jun 2001
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/drivers/char/watchdog/at91_wdt.c b/drivers/char/watchdog/at91_wdt.c
index 00080655533..f61dedc3c96 100644
--- a/drivers/char/watchdog/at91_wdt.c
+++ b/drivers/char/watchdog/at91_wdt.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/fs.h> 13#include <linux/fs.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c
index b6640606b44..537f5c6729b 100644
--- a/drivers/char/watchdog/booke_wdt.c
+++ b/drivers/char/watchdog/booke_wdt.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/module.h> 17#include <linux/module.h>
19#include <linux/fs.h> 18#include <linux/fs.h>
20#include <linux/miscdevice.h> 19#include <linux/miscdevice.h>
diff --git a/drivers/char/watchdog/eurotechwdt.c b/drivers/char/watchdog/eurotechwdt.c
index 25c2f257561..ea670de4fab 100644
--- a/drivers/char/watchdog/eurotechwdt.c
+++ b/drivers/char/watchdog/eurotechwdt.c
@@ -40,7 +40,6 @@
40 * Added Matt Domsch's nowayout module option. 40 * Added Matt Domsch's nowayout module option.
41 */ 41 */
42 42
43#include <linux/config.h>
44#include <linux/interrupt.h> 43#include <linux/interrupt.h>
45#include <linux/module.h> 44#include <linux/module.h>
46#include <linux/moduleparam.h> 45#include <linux/moduleparam.h>
@@ -421,7 +420,7 @@ static int __init eurwdt_init(void)
421 goto out; 420 goto out;
422 } 421 }
423 422
424 ret = request_irq(irq, eurwdt_interrupt, SA_INTERRUPT, "eurwdt", NULL); 423 ret = request_irq(irq, eurwdt_interrupt, IRQF_DISABLED, "eurwdt", NULL);
425 if(ret) { 424 if(ret) {
426 printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq); 425 printk(KERN_ERR "eurwdt: IRQ %d is not free.\n", irq);
427 goto outmisc; 426 goto outmisc;
diff --git a/drivers/char/watchdog/ib700wdt.c b/drivers/char/watchdog/ib700wdt.c
index cf60329eec8..a2e53c715b3 100644
--- a/drivers/char/watchdog/ib700wdt.c
+++ b/drivers/char/watchdog/ib700wdt.c
@@ -31,7 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/types.h> 35#include <linux/types.h>
37#include <linux/miscdevice.h> 36#include <linux/miscdevice.h>
diff --git a/drivers/char/watchdog/ibmasr.c b/drivers/char/watchdog/ibmasr.c
index 294c474ae48..b0741cbdc13 100644
--- a/drivers/char/watchdog/ibmasr.c
+++ b/drivers/char/watchdog/ibmasr.c
@@ -10,7 +10,6 @@
10 * of the GNU Public License, incorporated herein by reference. 10 * of the GNU Public License, incorporated herein by reference.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/fs.h> 13#include <linux/fs.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
diff --git a/drivers/char/watchdog/indydog.c b/drivers/char/watchdog/indydog.c
index b4b94daba67..d387979b243 100644
--- a/drivers/char/watchdog/indydog.c
+++ b/drivers/char/watchdog/indydog.c
@@ -13,7 +13,6 @@
13 13
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
16#include <linux/config.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/fs.h> 18#include <linux/fs.h>
diff --git a/drivers/char/watchdog/ixp2000_wdt.c b/drivers/char/watchdog/ixp2000_wdt.c
index 0cfb9b9c4a4..aa29a7d6875 100644
--- a/drivers/char/watchdog/ixp2000_wdt.c
+++ b/drivers/char/watchdog/ixp2000_wdt.c
@@ -16,7 +16,6 @@
16 * warranty of any kind, whether express or implied. 16 * warranty of any kind, whether express or implied.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/moduleparam.h> 20#include <linux/moduleparam.h>
22#include <linux/types.h> 21#include <linux/types.h>
diff --git a/drivers/char/watchdog/ixp4xx_wdt.c b/drivers/char/watchdog/ixp4xx_wdt.c
index 3800835ca8f..e6a3fe83fa0 100644
--- a/drivers/char/watchdog/ixp4xx_wdt.c
+++ b/drivers/char/watchdog/ixp4xx_wdt.c
@@ -13,7 +13,6 @@
13 * warranty of any kind, whether express or implied. 13 * warranty of any kind, whether express or implied.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/moduleparam.h> 17#include <linux/moduleparam.h>
19#include <linux/types.h> 18#include <linux/types.h>
diff --git a/drivers/char/watchdog/machzwd.c b/drivers/char/watchdog/machzwd.c
index a9a20aad61e..b67b4878ae0 100644
--- a/drivers/char/watchdog/machzwd.c
+++ b/drivers/char/watchdog/machzwd.c
@@ -28,7 +28,6 @@
28 * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT 28 * Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/moduleparam.h> 32#include <linux/moduleparam.h>
34#include <linux/types.h> 33#include <linux/types.h>
diff --git a/drivers/char/watchdog/mixcomwd.c b/drivers/char/watchdog/mixcomwd.c
index d8dede57540..433c27f9815 100644
--- a/drivers/char/watchdog/mixcomwd.c
+++ b/drivers/char/watchdog/mixcomwd.c
@@ -37,7 +37,6 @@
37 37
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/moduleparam.h> 39#include <linux/moduleparam.h>
40#include <linux/config.h>
41#include <linux/types.h> 40#include <linux/types.h>
42#include <linux/miscdevice.h> 41#include <linux/miscdevice.h>
43#include <linux/ioport.h> 42#include <linux/ioport.h>
diff --git a/drivers/char/watchdog/mpc83xx_wdt.c b/drivers/char/watchdog/mpc83xx_wdt.c
index 5d6f5061603..dac1381af36 100644
--- a/drivers/char/watchdog/mpc83xx_wdt.c
+++ b/drivers/char/watchdog/mpc83xx_wdt.c
@@ -15,7 +15,6 @@
15 * option) any later version. 15 * option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/fs.h> 18#include <linux/fs.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/drivers/char/watchdog/mpc8xx_wdt.c b/drivers/char/watchdog/mpc8xx_wdt.c
index b2fc71e2085..11f0ccd4c4d 100644
--- a/drivers/char/watchdog/mpc8xx_wdt.c
+++ b/drivers/char/watchdog/mpc8xx_wdt.c
@@ -9,7 +9,6 @@
9 * or implied. 9 * or implied.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/drivers/char/watchdog/mpcore_wdt.c b/drivers/char/watchdog/mpcore_wdt.c
index 2c2c5177320..c2d492c852f 100644
--- a/drivers/char/watchdog/mpcore_wdt.c
+++ b/drivers/char/watchdog/mpcore_wdt.c
@@ -21,7 +21,6 @@
21 */ 21 */
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/moduleparam.h> 23#include <linux/moduleparam.h>
24#include <linux/config.h>
25#include <linux/types.h> 24#include <linux/types.h>
26#include <linux/miscdevice.h> 25#include <linux/miscdevice.h>
27#include <linux/watchdog.h> 26#include <linux/watchdog.h>
@@ -356,7 +355,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
356 goto err_misc; 355 goto err_misc;
357 } 356 }
358 357
359 ret = request_irq(wdt->irq, mpcore_wdt_fire, SA_INTERRUPT, "mpcore_wdt", wdt); 358 ret = request_irq(wdt->irq, mpcore_wdt_fire, IRQF_DISABLED, "mpcore_wdt", wdt);
360 if (ret) { 359 if (ret) {
361 dev_printk(KERN_ERR, _dev, "cannot register IRQ%d for watchdog\n", wdt->irq); 360 dev_printk(KERN_ERR, _dev, "cannot register IRQ%d for watchdog\n", wdt->irq);
362 goto err_irq; 361 goto err_irq;
diff --git a/drivers/char/watchdog/mv64x60_wdt.c b/drivers/char/watchdog/mv64x60_wdt.c
index f1b9cf89f15..20a6cbb0fbb 100644
--- a/drivers/char/watchdog/mv64x60_wdt.c
+++ b/drivers/char/watchdog/mv64x60_wdt.c
@@ -15,7 +15,6 @@
15 * or implied. 15 * or implied.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/fs.h> 18#include <linux/fs.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c
index 0d072bed501..92bf8c1a0f0 100644
--- a/drivers/char/watchdog/pcwd_usb.c
+++ b/drivers/char/watchdog/pcwd_usb.c
@@ -24,7 +24,6 @@
24 * http://www.berkprod.com/ or http://www.pcwatchdog.com/ 24 * http://www.berkprod.com/ or http://www.pcwatchdog.com/
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/init.h> 29#include <linux/init.h>
diff --git a/drivers/char/watchdog/s3c2410_wdt.c b/drivers/char/watchdog/s3c2410_wdt.c
index 1ea04e9b2b0..f267dad2607 100644
--- a/drivers/char/watchdog/s3c2410_wdt.c
+++ b/drivers/char/watchdog/s3c2410_wdt.c
@@ -37,7 +37,6 @@
37 37
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/moduleparam.h> 39#include <linux/moduleparam.h>
40#include <linux/config.h>
41#include <linux/types.h> 40#include <linux/types.h>
42#include <linux/timer.h> 41#include <linux/timer.h>
43#include <linux/miscdevice.h> 42#include <linux/miscdevice.h>
diff --git a/drivers/char/watchdog/sa1100_wdt.c b/drivers/char/watchdog/sa1100_wdt.c
index 522a9370db9..b22e95c5470 100644
--- a/drivers/char/watchdog/sa1100_wdt.c
+++ b/drivers/char/watchdog/sa1100_wdt.c
@@ -17,7 +17,6 @@
17 * 17 *
18 * 27/11/2000 Initial release 18 * 27/11/2000 Initial release
19 */ 19 */
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/moduleparam.h> 21#include <linux/moduleparam.h>
23#include <linux/types.h> 22#include <linux/types.h>
diff --git a/drivers/char/watchdog/sbc8360.c b/drivers/char/watchdog/sbc8360.c
index c6cbf808d8c..6562aa910ac 100644
--- a/drivers/char/watchdog/sbc8360.c
+++ b/drivers/char/watchdog/sbc8360.c
@@ -36,7 +36,6 @@
36 * 36 *
37 */ 37 */
38 38
39#include <linux/config.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/types.h> 40#include <linux/types.h>
42#include <linux/miscdevice.h> 41#include <linux/miscdevice.h>
diff --git a/drivers/char/watchdog/sbc_epx_c3.c b/drivers/char/watchdog/sbc_epx_c3.c
index 837b1ec3ffe..09867fadc72 100644
--- a/drivers/char/watchdog/sbc_epx_c3.c
+++ b/drivers/char/watchdog/sbc_epx_c3.c
@@ -15,7 +15,6 @@
15 15
16#include <linux/module.h> 16#include <linux/module.h>
17#include <linux/moduleparam.h> 17#include <linux/moduleparam.h>
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/fs.h> 20#include <linux/fs.h>
diff --git a/drivers/char/watchdog/sc1200wdt.c b/drivers/char/watchdog/sc1200wdt.c
index 20b88f9b7be..78ef6333c18 100644
--- a/drivers/char/watchdog/sc1200wdt.c
+++ b/drivers/char/watchdog/sc1200wdt.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/moduleparam.h> 31#include <linux/moduleparam.h>
33#include <linux/miscdevice.h> 32#include <linux/miscdevice.h>
diff --git a/drivers/char/watchdog/scx200_wdt.c b/drivers/char/watchdog/scx200_wdt.c
index b4a102a2d7e..c0b4754e8de 100644
--- a/drivers/char/watchdog/scx200_wdt.c
+++ b/drivers/char/watchdog/scx200_wdt.c
@@ -17,7 +17,6 @@
17 of any nature resulting due to the use of this software. This 17 of any nature resulting due to the use of this software. This
18 software is provided AS-IS with no warranties. */ 18 software is provided AS-IS with no warranties. */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/moduleparam.h> 21#include <linux/moduleparam.h>
23#include <linux/init.h> 22#include <linux/init.h>
diff --git a/drivers/char/watchdog/shwdt.c b/drivers/char/watchdog/shwdt.c
index 1f4cab55b2e..803701b675c 100644
--- a/drivers/char/watchdog/shwdt.c
+++ b/drivers/char/watchdog/shwdt.c
@@ -17,7 +17,6 @@
17 * Added expect close support, made emulated timeout runtime changeable 17 * Added expect close support, made emulated timeout runtime changeable
18 * general cleanups, add some ioctls 18 * general cleanups, add some ioctls
19 */ 19 */
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/moduleparam.h> 21#include <linux/moduleparam.h>
23#include <linux/init.h> 22#include <linux/init.h>
diff --git a/drivers/char/watchdog/softdog.c b/drivers/char/watchdog/softdog.c
index a91edaf3a35..79ce5c65542 100644
--- a/drivers/char/watchdog/softdog.c
+++ b/drivers/char/watchdog/softdog.c
@@ -38,7 +38,6 @@
38 38
39#include <linux/module.h> 39#include <linux/module.h>
40#include <linux/moduleparam.h> 40#include <linux/moduleparam.h>
41#include <linux/config.h>
42#include <linux/types.h> 41#include <linux/types.h>
43#include <linux/timer.h> 42#include <linux/timer.h>
44#include <linux/miscdevice.h> 43#include <linux/miscdevice.h>
diff --git a/drivers/char/watchdog/w83977f_wdt.c b/drivers/char/watchdog/w83977f_wdt.c
index a7ff64c8921..c31849e4c5c 100644
--- a/drivers/char/watchdog/w83977f_wdt.c
+++ b/drivers/char/watchdog/w83977f_wdt.c
@@ -17,7 +17,6 @@
17 17
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/moduleparam.h> 19#include <linux/moduleparam.h>
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/fs.h> 22#include <linux/fs.h>
diff --git a/drivers/char/watchdog/wd501p.h b/drivers/char/watchdog/wd501p.h
index 84e60eb7433..a4504f40394 100644
--- a/drivers/char/watchdog/wd501p.h
+++ b/drivers/char/watchdog/wd501p.h
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23 22
24#define WDT_COUNT0 (io+0) 23#define WDT_COUNT0 (io+0)
25#define WDT_COUNT1 (io+1) 24#define WDT_COUNT1 (io+1)
diff --git a/drivers/char/watchdog/wdrtas.c b/drivers/char/watchdog/wdrtas.c
index dacfe31cacc..3a462c34b92 100644
--- a/drivers/char/watchdog/wdrtas.c
+++ b/drivers/char/watchdog/wdrtas.c
@@ -26,7 +26,6 @@
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/fs.h> 29#include <linux/fs.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
diff --git a/drivers/char/watchdog/wdt.c b/drivers/char/watchdog/wdt.c
index ec7e401228e..a1d972c8f44 100644
--- a/drivers/char/watchdog/wdt.c
+++ b/drivers/char/watchdog/wdt.c
@@ -31,7 +31,6 @@
31 * Matt Domsch : Added nowayout module option 31 * Matt Domsch : Added nowayout module option
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/interrupt.h> 34#include <linux/interrupt.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/moduleparam.h> 36#include <linux/moduleparam.h>
@@ -581,7 +580,7 @@ static int __init wdt_init(void)
581 goto out; 580 goto out;
582 } 581 }
583 582
584 ret = request_irq(irq, wdt_interrupt, SA_INTERRUPT, "wdt501p", NULL); 583 ret = request_irq(irq, wdt_interrupt, IRQF_DISABLED, "wdt501p", NULL);
585 if(ret) { 584 if(ret) {
586 printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq); 585 printk(KERN_ERR "wdt: IRQ %d is not free.\n", irq);
587 goto outreg; 586 goto outreg;
diff --git a/drivers/char/watchdog/wdt977.c b/drivers/char/watchdog/wdt977.c
index 3843900e94c..3cde2b9bb76 100644
--- a/drivers/char/watchdog/wdt977.c
+++ b/drivers/char/watchdog/wdt977.c
@@ -24,7 +24,6 @@
24 24
25#include <linux/module.h> 25#include <linux/module.h>
26#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
27#include <linux/config.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/fs.h> 29#include <linux/fs.h>
diff --git a/drivers/char/watchdog/wdt_pci.c b/drivers/char/watchdog/wdt_pci.c
index 4b3311993d4..7529ecdbaba 100644
--- a/drivers/char/watchdog/wdt_pci.c
+++ b/drivers/char/watchdog/wdt_pci.c
@@ -35,7 +35,6 @@
35 * Matt Domsch : nowayout module option 35 * Matt Domsch : nowayout module option
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/interrupt.h> 38#include <linux/interrupt.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/moduleparam.h> 40#include <linux/moduleparam.h>
@@ -618,7 +617,7 @@ static int __devinit wdtpci_init_one (struct pci_dev *dev,
618 goto out_pci; 617 goto out_pci;
619 } 618 }
620 619
621 if (request_irq (irq, wdtpci_interrupt, SA_INTERRUPT | SA_SHIRQ, 620 if (request_irq (irq, wdtpci_interrupt, IRQF_DISABLED | IRQF_SHARED,
622 "wdt_pci", &wdtpci_miscdev)) { 621 "wdt_pci", &wdtpci_miscdev)) {
623 printk (KERN_ERR PFX "IRQ %d is not free\n", irq); 622 printk (KERN_ERR PFX "IRQ %d is not free\n", irq);
624 goto out_reg; 623 goto out_reg;
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 35e0b9ceecf..1ba4039777e 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
diff --git a/drivers/cpufreq/cpufreq_stats.c b/drivers/cpufreq/cpufreq_stats.c
index 145061b8472..25eee539420 100644
--- a/drivers/cpufreq/cpufreq_stats.c
+++ b/drivers/cpufreq/cpufreq_stats.c
@@ -9,7 +9,6 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sysdev.h> 13#include <linux/sysdev.h>
15#include <linux/cpu.h> 14#include <linux/cpu.h>
diff --git a/drivers/cpufreq/cpufreq_userspace.c b/drivers/cpufreq/cpufreq_userspace.c
index 071ee4f1bbf..44ae5e5b94c 100644
--- a/drivers/cpufreq/cpufreq_userspace.c
+++ b/drivers/cpufreq/cpufreq_userspace.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/smp.h> 16#include <linux/smp.h>
diff --git a/drivers/dma/ioatdma.c b/drivers/dma/ioatdma.c
index 2801d14a5e4..ecad8f65d2d 100644
--- a/drivers/dma/ioatdma.c
+++ b/drivers/dma/ioatdma.c
@@ -739,7 +739,7 @@ static int __devinit ioat_probe(struct pci_dev *pdev,
739 device->msi = 0; 739 device->msi = 0;
740 } 740 }
741#endif 741#endif
742 err = request_irq(pdev->irq, &ioat_do_interrupt, SA_SHIRQ, "ioat", 742 err = request_irq(pdev->irq, &ioat_do_interrupt, IRQF_SHARED, "ioat",
743 device); 743 device);
744 if (err) 744 if (err)
745 goto err_irq; 745 goto err_irq;
diff --git a/drivers/edac/amd76x_edac.c b/drivers/edac/amd76x_edac.c
index 702141c5501..f79f6b587bf 100644
--- a/drivers/edac/amd76x_edac.c
+++ b/drivers/edac/amd76x_edac.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/pci.h> 17#include <linux/pci.h>
@@ -20,8 +19,8 @@
20#include <linux/slab.h> 19#include <linux/slab.h>
21#include "edac_mc.h" 20#include "edac_mc.h"
22 21
23#define AMD76X_REVISION " Ver: 2.0.0 " __DATE__ 22#define AMD76X_REVISION " Ver: 2.0.1 " __DATE__
24 23#define EDAC_MOD_STR "amd76x_edac"
25 24
26#define amd76x_printk(level, fmt, arg...) \ 25#define amd76x_printk(level, fmt, arg...) \
27 edac_printk(level, "amd76x", fmt, ##arg) 26 edac_printk(level, "amd76x", fmt, ##arg)
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index 5351a76739e..c82bc0ed7f1 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/pci.h> 22#include <linux/pci.h>
@@ -25,7 +24,8 @@
25#include <linux/slab.h> 24#include <linux/slab.h>
26#include "edac_mc.h" 25#include "edac_mc.h"
27 26
28#define E752X_REVISION " Ver: 2.0.0 " __DATE__ 27#define E752X_REVISION " Ver: 2.0.1 " __DATE__
28#define EDAC_MOD_STR "e752x_edac"
29 29
30static int force_function_unhide; 30static int force_function_unhide;
31 31
diff --git a/drivers/edac/e7xxx_edac.c b/drivers/edac/e7xxx_edac.c
index 9878379b499..310d91b41c9 100644
--- a/drivers/edac/e7xxx_edac.c
+++ b/drivers/edac/e7xxx_edac.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/init.h> 26#include <linux/init.h>
28#include <linux/pci.h> 27#include <linux/pci.h>
@@ -30,7 +29,8 @@
30#include <linux/slab.h> 29#include <linux/slab.h>
31#include "edac_mc.h" 30#include "edac_mc.h"
32 31
33#define E7XXX_REVISION " Ver: 2.0.0 " __DATE__ 32#define E7XXX_REVISION " Ver: 2.0.1 " __DATE__
33#define EDAC_MOD_STR "e7xxx_edac"
34 34
35#define e7xxx_printk(level, fmt, arg...) \ 35#define e7xxx_printk(level, fmt, arg...) \
36 edac_printk(level, "e7xxx", fmt, ##arg) 36 edac_printk(level, "e7xxx", fmt, ##arg)
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
index 357c95f30fc..3a7cfe88b16 100644
--- a/drivers/edac/edac_mc.c
+++ b/drivers/edac/edac_mc.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/proc_fs.h> 16#include <linux/proc_fs.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h
index 342979677d2..bf6ab8a8d5e 100644
--- a/drivers/edac/edac_mc.h
+++ b/drivers/edac/edac_mc.h
@@ -18,7 +18,6 @@
18#ifndef _EDAC_MC_H_ 18#ifndef _EDAC_MC_H_
19#define _EDAC_MC_H_ 19#define _EDAC_MC_H_
20 20
21#include <linux/config.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/module.h> 23#include <linux/module.h>
@@ -79,10 +78,6 @@ extern int edac_debug_level;
79 78
80#endif /* !CONFIG_EDAC_DEBUG */ 79#endif /* !CONFIG_EDAC_DEBUG */
81 80
82#define edac_xstr(s) edac_str(s)
83#define edac_str(s) #s
84#define EDAC_MOD_STR edac_xstr(KBUILD_BASENAME)
85
86#define BIT(x) (1 << (x)) 81#define BIT(x) (1 << (x))
87 82
88#define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ 83#define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \
diff --git a/drivers/edac/i82860_edac.c b/drivers/edac/i82860_edac.c
index d196dcc850a..e4bb298e613 100644
--- a/drivers/edac/i82860_edac.c
+++ b/drivers/edac/i82860_edac.c
@@ -9,7 +9,6 @@
9 * by Thayne Harbaugh of Linux Networx. (http://lnxi.com) 9 * by Thayne Harbaugh of Linux Networx. (http://lnxi.com)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/pci.h> 14#include <linux/pci.h>
@@ -17,7 +16,8 @@
17#include <linux/slab.h> 16#include <linux/slab.h>
18#include "edac_mc.h" 17#include "edac_mc.h"
19 18
20#define I82860_REVISION " Ver: 2.0.0 " __DATE__ 19#define I82860_REVISION " Ver: 2.0.1 " __DATE__
20#define EDAC_MOD_STR "i82860_edac"
21 21
22#define i82860_printk(level, fmt, arg...) \ 22#define i82860_printk(level, fmt, arg...) \
23 edac_printk(level, "i82860", fmt, ##arg) 23 edac_printk(level, "i82860", fmt, ##arg)
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 6787403463a..161fe09a6d3 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -13,7 +13,6 @@
13 * Note: E7210 appears same as D82875P - zhenyu.z.wang at intel.com 13 * Note: E7210 appears same as D82875P - zhenyu.z.wang at intel.com
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/pci.h> 18#include <linux/pci.h>
@@ -21,7 +20,8 @@
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include "edac_mc.h" 21#include "edac_mc.h"
23 22
24#define I82875P_REVISION " Ver: 2.0.0 " __DATE__ 23#define I82875P_REVISION " Ver: 2.0.1 " __DATE__
24#define EDAC_MOD_STR "i82875p_edac"
25 25
26#define i82875p_printk(level, fmt, arg...) \ 26#define i82875p_printk(level, fmt, arg...) \
27 edac_printk(level, "i82875p", fmt, ##arg) 27 edac_printk(level, "i82875p", fmt, ##arg)
diff --git a/drivers/edac/r82600_edac.c b/drivers/edac/r82600_edac.c
index fecdb2c9ee2..a49cf0a3939 100644
--- a/drivers/edac/r82600_edac.c
+++ b/drivers/edac/r82600_edac.c
@@ -15,7 +15,6 @@
15 * references to this document given in [] 15 * references to this document given in []
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/pci.h> 20#include <linux/pci.h>
@@ -23,7 +22,8 @@
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include "edac_mc.h" 23#include "edac_mc.h"
25 24
26#define R82600_REVISION " Ver: 2.0.0 " __DATE__ 25#define R82600_REVISION " Ver: 2.0.1 " __DATE__
26#define EDAC_MOD_STR "r82600_edac"
27 27
28#define r82600_printk(level, fmt, arg...) \ 28#define r82600_printk(level, fmt, arg...) \
29 edac_printk(level, "r82600", fmt, ##arg) 29 edac_printk(level, "r82600", fmt, ##arg)
diff --git a/drivers/eisa/virtual_root.c b/drivers/eisa/virtual_root.c
index 0f97a0cb0ff..9b4fcac03ad 100644
--- a/drivers/eisa/virtual_root.c
+++ b/drivers/eisa/virtual_root.c
@@ -7,7 +7,6 @@
7 * This code is released under the GPL version 2. 7 * This code is released under the GPL version 2.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/platform_device.h> 11#include <linux/platform_device.h>
13#include <linux/eisa.h> 12#include <linux/eisa.h>
diff --git a/drivers/fc4/fc_syms.c b/drivers/fc4/fc_syms.c
index ed85dfcef69..8700a8076d0 100644
--- a/drivers/fc4/fc_syms.c
+++ b/drivers/fc4/fc_syms.c
@@ -2,7 +2,6 @@
2 * We should not even be trying to compile this if we are not doing 2 * We should not even be trying to compile this if we are not doing
3 * a module. 3 * a module.
4 */ 4 */
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7 6
8#ifdef CONFIG_MODULES 7#ifdef CONFIG_MODULES
diff --git a/drivers/fc4/soc.c b/drivers/fc4/soc.c
index cf8768b8d1f..3b07e0ca81c 100644
--- a/drivers/fc4/soc.c
+++ b/drivers/fc4/soc.c
@@ -637,7 +637,7 @@ static inline void soc_init(struct sbus_dev *sdev, int no)
637 637
638 irq = sdev->irqs[0]; 638 irq = sdev->irqs[0];
639 639
640 if (request_irq (irq, soc_intr, SA_SHIRQ, "SOC", (void *)s)) { 640 if (request_irq (irq, soc_intr, IRQF_SHARED, "SOC", (void *)s)) {
641 soc_printk ("Cannot order irq %d to go\n", irq); 641 soc_printk ("Cannot order irq %d to go\n", irq);
642 socs = s->next; 642 socs = s->next;
643 return; 643 return;
diff --git a/drivers/fc4/socal.c b/drivers/fc4/socal.c
index f52d1e5bd5a..2b75edc5859 100644
--- a/drivers/fc4/socal.c
+++ b/drivers/fc4/socal.c
@@ -761,7 +761,7 @@ static inline void socal_init(struct sbus_dev *sdev, int no)
761 761
762 irq = sdev->irqs[0]; 762 irq = sdev->irqs[0];
763 763
764 if (request_irq (irq, socal_intr, SA_SHIRQ, "SOCAL", (void *)s)) { 764 if (request_irq (irq, socal_intr, IRQF_SHARED, "SOCAL", (void *)s)) {
765 socal_printk ("Cannot order irq %d to go\n", irq); 765 socal_printk ("Cannot order irq %d to go\n", irq);
766 socals = s->next; 766 socals = s->next;
767 return; 767 return;
diff --git a/drivers/firmware/dell_rbu.c b/drivers/firmware/dell_rbu.c
index fdb8b042e64..23b08668545 100644
--- a/drivers/firmware/dell_rbu.c
+++ b/drivers/firmware/dell_rbu.c
@@ -34,7 +34,6 @@
34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 34 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35 * GNU General Public License for more details. 35 * GNU General Public License for more details.
36 */ 36 */
37#include <linux/config.h>
38#include <linux/init.h> 37#include <linux/init.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/string.h> 39#include <linux/string.h>
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c
index 9b7e4d52ffd..8ebce1c03ad 100644
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@ -66,7 +66,6 @@
66 */ 66 */
67 67
68#include <linux/capability.h> 68#include <linux/capability.h>
69#include <linux/config.h>
70#include <linux/types.h> 69#include <linux/types.h>
71#include <linux/errno.h> 70#include <linux/errno.h>
72#include <linux/init.h> 71#include <linux/init.h>
diff --git a/drivers/firmware/pcdp.c b/drivers/firmware/pcdp.c
index c37baf9448b..c2ad72fefd9 100644
--- a/drivers/firmware/pcdp.c
+++ b/drivers/firmware/pcdp.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/acpi.h> 14#include <linux/acpi.h>
16#include <linux/console.h> 15#include <linux/console.h>
17#include <linux/efi.h> 16#include <linux/efi.h>
diff --git a/drivers/hwmon/hwmon-vid.c b/drivers/hwmon/hwmon-vid.c
index a6764ff0080..9d67320e684 100644
--- a/drivers/hwmon/hwmon-vid.c
+++ b/drivers/hwmon/hwmon-vid.c
@@ -22,7 +22,6 @@
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23*/ 23*/
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/hwmon-vid.h> 27#include <linux/hwmon-vid.h>
diff --git a/drivers/hwmon/w83792d.c b/drivers/hwmon/w83792d.c
index e407c74bda3..7576ec9426a 100644
--- a/drivers/hwmon/w83792d.c
+++ b/drivers/hwmon/w83792d.c
@@ -35,7 +35,6 @@
35 w83792d 9 7 7 3 0x7a 0x5ca3 yes no 35 w83792d 9 7 7 3 0x7a 0x5ca3 yes no
36*/ 36*/
37 37
38#include <linux/config.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/init.h> 39#include <linux/init.h>
41#include <linux/slab.h> 40#include <linux/slab.h>
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 87fae937e66..0599bbd65d9 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -28,7 +28,6 @@
28 * 28 *
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/ioport.h> 33#include <linux/ioport.h>
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index d00a02fc23e..aca7e166860 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -26,7 +26,6 @@
26 * the Free Software Foundation, version 2. 26 * the Free Software Foundation, version 2.
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/interrupt.h> 29#include <linux/interrupt.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/module.h> 31#include <linux/module.h>
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 2721e4c8184..377ab40944b 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -13,7 +13,6 @@
13 * warranty of any kind, whether express or implied. 13 * warranty of any kind, whether express or implied.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
@@ -319,7 +318,7 @@ static int fsl_i2c_probe(struct platform_device *pdev)
319 318
320 if (i2c->irq != 0) 319 if (i2c->irq != 0)
321 if ((result = request_irq(i2c->irq, mpc_i2c_isr, 320 if ((result = request_irq(i2c->irq, mpc_i2c_isr,
322 SA_SHIRQ, "i2c-mpc", i2c)) < 0) { 321 IRQF_SHARED, "i2c-mpc", i2c)) < 0) {
323 printk(KERN_ERR 322 printk(KERN_ERR
324 "i2c-mpc - failed to attach interrupt\n"); 323 "i2c-mpc - failed to attach interrupt\n");
325 goto fail_irq; 324 goto fail_irq;
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c
index df786eb5529..2a0b3be7cdd 100644
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -20,7 +20,6 @@
20 20
21*/ 21*/
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 5155010b455..ee114b48fac 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -968,7 +968,7 @@ static int i2c_pxa_probe(struct platform_device *dev)
968#endif 968#endif
969 969
970 pxa_set_cken(CKEN14_I2C, 1); 970 pxa_set_cken(CKEN14_I2C, 1);
971 ret = request_irq(IRQ_I2C, i2c_pxa_handler, SA_INTERRUPT, 971 ret = request_irq(IRQ_I2C, i2c_pxa_handler, IRQF_DISABLED,
972 "pxa2xx-i2c", i2c); 972 "pxa2xx-i2c", i2c);
973 if (ret) 973 if (ret)
974 goto out; 974 goto out;
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index f7d40f8e5f5..5d2950e91fc 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -20,7 +20,6 @@
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21*/ 21*/
22 22
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
26 25
@@ -829,7 +828,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
829 goto out; 828 goto out;
830 } 829 }
831 830
832 ret = request_irq(res->start, s3c24xx_i2c_irq, SA_INTERRUPT, 831 ret = request_irq(res->start, s3c24xx_i2c_irq, IRQF_DISABLED,
833 pdev->name, i2c); 832 pdev->name, i2c);
834 833
835 if (ret != 0) { 834 if (ret != 0) {
diff --git a/drivers/i2c/busses/scx200_i2c.c b/drivers/i2c/busses/scx200_i2c.c
index 27fbfecc414..cb3ef5ac99f 100644
--- a/drivers/i2c/busses/scx200_i2c.c
+++ b/drivers/i2c/busses/scx200_i2c.c
@@ -21,7 +21,6 @@
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22*/ 22*/
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
index e6f1ab7b913..f92505b94c6 100644
--- a/drivers/i2c/chips/isp1301_omap.c
+++ b/drivers/i2c/chips/isp1301_omap.c
@@ -21,7 +21,6 @@
21#undef DEBUG 21#undef DEBUG
22#undef VERBOSE 22#undef VERBOSE
23 23
24#include <linux/config.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/init.h> 26#include <linux/init.h>
@@ -909,7 +908,7 @@ static int otg_bind(struct isp1301 *isp)
909 908
910 if (otg_dev) 909 if (otg_dev)
911 status = request_irq(otg_dev->resource[1].start, omap_otg_irq, 910 status = request_irq(otg_dev->resource[1].start, omap_otg_irq,
912 SA_INTERRUPT, DRIVER_NAME, isp); 911 IRQF_DISABLED, DRIVER_NAME, isp);
913 else 912 else
914 status = -ENODEV; 913 status = -ENODEV;
915 914
@@ -1579,7 +1578,7 @@ fail1:
1579 } 1578 }
1580 1579
1581 status = request_irq(isp->irq, isp1301_irq, 1580 status = request_irq(isp->irq, isp1301_irq,
1582 SA_SAMPLE_RANDOM, DRIVER_NAME, isp); 1581 IRQF_SAMPLE_RANDOM, DRIVER_NAME, isp);
1583 if (status < 0) { 1582 if (status < 0) {
1584 dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n", 1583 dev_dbg(&i2c->dev, "can't get IRQ %d, err %d\n",
1585 isp->irq, status); 1584 isp->irq, status);
diff --git a/drivers/i2c/chips/tps65010.c b/drivers/i2c/chips/tps65010.c
index 179b1e022d8..e7e27049fbf 100644
--- a/drivers/i2c/chips/tps65010.c
+++ b/drivers/i2c/chips/tps65010.c
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/init.h> 24#include <linux/init.h>
@@ -522,14 +521,14 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind)
522 } 521 }
523 522
524#ifdef CONFIG_ARM 523#ifdef CONFIG_ARM
525 irqflags = SA_SAMPLE_RANDOM | SA_TRIGGER_LOW; 524 irqflags = IRQF_SAMPLE_RANDOM | IRQF_TRIGGER_LOW;
526 if (machine_is_omap_h2()) { 525 if (machine_is_omap_h2()) {
527 tps->model = TPS65010; 526 tps->model = TPS65010;
528 omap_cfg_reg(W4_GPIO58); 527 omap_cfg_reg(W4_GPIO58);
529 tps->irq = OMAP_GPIO_IRQ(58); 528 tps->irq = OMAP_GPIO_IRQ(58);
530 omap_request_gpio(58); 529 omap_request_gpio(58);
531 omap_set_gpio_direction(58, 1); 530 omap_set_gpio_direction(58, 1);
532 irqflags |= SA_TRIGGER_FALLING; 531 irqflags |= IRQF_TRIGGER_FALLING;
533 } 532 }
534 if (machine_is_omap_osk()) { 533 if (machine_is_omap_osk()) {
535 tps->model = TPS65010; 534 tps->model = TPS65010;
@@ -537,7 +536,7 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind)
537 tps->irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1)); 536 tps->irq = OMAP_GPIO_IRQ(OMAP_MPUIO(1));
538 omap_request_gpio(OMAP_MPUIO(1)); 537 omap_request_gpio(OMAP_MPUIO(1));
539 omap_set_gpio_direction(OMAP_MPUIO(1), 1); 538 omap_set_gpio_direction(OMAP_MPUIO(1), 1);
540 irqflags |= SA_TRIGGER_FALLING; 539 irqflags |= IRQF_TRIGGER_FALLING;
541 } 540 }
542 if (machine_is_omap_h3()) { 541 if (machine_is_omap_h3()) {
543 tps->model = TPS65013; 542 tps->model = TPS65013;
@@ -545,7 +544,7 @@ tps65010_probe(struct i2c_adapter *bus, int address, int kind)
545 // FIXME set up this board's IRQ ... 544 // FIXME set up this board's IRQ ...
546 } 545 }
547#else 546#else
548 irqflags = SA_SAMPLE_RANDOM; 547 irqflags = IRQF_SAMPLE_RANDOM;
549#endif 548#endif
550 549
551 if (tps->irq > 0) { 550 if (tps->irq > 0) {
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c
index 308897e57e4..8a1c27f2869 100644
--- a/drivers/ide/arm/icside.c
+++ b/drivers/ide/arm/icside.c
@@ -6,7 +6,6 @@
6 * Please note that this platform does not support 32-bit IDE IO. 6 * Please note that this platform does not support 32-bit IDE IO.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/string.h> 9#include <linux/string.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/ioport.h> 11#include <linux/ioport.h>
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c
index cd15e626051..5797e0b5a13 100644
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -19,7 +19,6 @@
19 19
20#undef REALLY_SLOW_IO /* most systems can safely undef this */ 20#undef REALLY_SLOW_IO /* most systems can safely undef this */
21 21
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/timer.h> 24#include <linux/timer.h>
diff --git a/drivers/ide/h8300/ide-h8300.c b/drivers/ide/h8300/ide-h8300.c
index fb91cb8bf2d..15955996a1f 100644
--- a/drivers/ide/h8300/ide-h8300.c
+++ b/drivers/ide/h8300/ide-h8300.c
@@ -5,7 +5,6 @@
5 5
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/ide.h> 7#include <linux/ide.h>
8#include <linux/config.h>
9 8
10#include <asm/io.h> 9#include <asm/io.h>
11#include <asm/irq.h> 10#include <asm/irq.h>
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index bfafd4846a0..654d4cd0984 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -301,7 +301,6 @@
301 301
302#define IDECD_VERSION "4.61" 302#define IDECD_VERSION "4.61"
303 303
304#include <linux/config.h>
305#include <linux/module.h> 304#include <linux/module.h>
306#include <linux/types.h> 305#include <linux/types.h>
307#include <linux/kernel.h> 306#include <linux/kernel.h>
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index d0227c39ced..f712e4cfd9d 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -47,7 +47,6 @@
47 47
48//#define DEBUG 48//#define DEBUG
49 49
50#include <linux/config.h>
51#include <linux/module.h> 50#include <linux/module.h>
52#include <linux/types.h> 51#include <linux/types.h>
53#include <linux/string.h> 52#include <linux/string.h>
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index 783a2475ee8..98918fb6b2c 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -74,7 +74,6 @@
74 * 74 *
75 */ 75 */
76 76
77#include <linux/config.h>
78#include <linux/module.h> 77#include <linux/module.h>
79#include <linux/types.h> 78#include <linux/types.h>
80#include <linux/kernel.h> 79#include <linux/kernel.h>
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c
index 68628327c0f..6ca3476d02c 100644
--- a/drivers/ide/ide-floppy.c
+++ b/drivers/ide/ide-floppy.c
@@ -82,7 +82,6 @@
82 82
83#define IDEFLOPPY_VERSION "0.99.newide" 83#define IDEFLOPPY_VERSION "0.99.newide"
84 84
85#include <linux/config.h>
86#include <linux/module.h> 85#include <linux/module.h>
87#include <linux/types.h> 86#include <linux/types.h>
88#include <linux/string.h> 87#include <linux/string.h>
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index 26ceab1e90b..7dba9992ad3 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -24,7 +24,6 @@
24 */ 24 */
25 25
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/string.h> 29#include <linux/string.h>
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 32117f0ec5c..657165297dc 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/string.h> 11#include <linux/string.h>
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 7ddb1182873..1feff23487d 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/types.h> 2#include <linux/types.h>
4#include <linux/string.h> 3#include <linux/string.h>
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 0d5038a2856..9cadf0106c6 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -33,7 +33,6 @@
33 33
34#undef REALLY_SLOW_IO /* most systems can safely undef this */ 34#undef REALLY_SLOW_IO /* most systems can safely undef this */
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/types.h> 37#include <linux/types.h>
39#include <linux/string.h> 38#include <linux/string.h>
@@ -1005,7 +1004,7 @@ static int ide_init_queue(ide_drive_t *drive)
1005 * and irq serialization situations. This is somewhat complex because 1004 * and irq serialization situations. This is somewhat complex because
1006 * it handles static as well as dynamic (PCMCIA) IDE interfaces. 1005 * it handles static as well as dynamic (PCMCIA) IDE interfaces.
1007 * 1006 *
1008 * The SA_INTERRUPT in sa_flags means ide_intr() is always entered with 1007 * The IRQF_DISABLED in sa_flags means ide_intr() is always entered with
1009 * interrupts completely disabled. This can be bad for interrupt latency, 1008 * interrupts completely disabled. This can be bad for interrupt latency,
1010 * but anything else has led to problems on some machines. We re-enable 1009 * but anything else has led to problems on some machines. We re-enable
1011 * interrupts as much as we can safely do in most places. 1010 * interrupts as much as we can safely do in most places.
@@ -1091,15 +1090,15 @@ static int init_irq (ide_hwif_t *hwif)
1091 * Allocate the irq, if not already obtained for another hwif 1090 * Allocate the irq, if not already obtained for another hwif
1092 */ 1091 */
1093 if (!match || match->irq != hwif->irq) { 1092 if (!match || match->irq != hwif->irq) {
1094 int sa = SA_INTERRUPT; 1093 int sa = IRQF_DISABLED;
1095#if defined(__mc68000__) || defined(CONFIG_APUS) 1094#if defined(__mc68000__) || defined(CONFIG_APUS)
1096 sa = SA_SHIRQ; 1095 sa = IRQF_SHARED;
1097#endif /* __mc68000__ || CONFIG_APUS */ 1096#endif /* __mc68000__ || CONFIG_APUS */
1098 1097
1099 if (IDE_CHIPSET_IS_PCI(hwif->chipset)) { 1098 if (IDE_CHIPSET_IS_PCI(hwif->chipset)) {
1100 sa = SA_SHIRQ; 1099 sa = IRQF_SHARED;
1101#ifndef CONFIG_IDEPCI_SHARE_IRQ 1100#ifndef CONFIG_IDEPCI_SHARE_IRQ
1102 sa |= SA_INTERRUPT; 1101 sa |= IRQF_DISABLED;
1103#endif /* CONFIG_IDEPCI_SHARE_IRQ */ 1102#endif /* CONFIG_IDEPCI_SHARE_IRQ */
1104 } 1103 }
1105 1104
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 84665e2ba3c..c12f1b71e93 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27 26
28#include <asm/uaccess.h> 27#include <asm/uaccess.h>
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c
index 4b91101e12b..7067ab99792 100644
--- a/drivers/ide/ide-tape.c
+++ b/drivers/ide/ide-tape.c
@@ -424,7 +424,6 @@
424 424
425#define IDETAPE_VERSION "1.19" 425#define IDETAPE_VERSION "1.19"
426 426
427#include <linux/config.h>
428#include <linux/module.h> 427#include <linux/module.h>
429#include <linux/types.h> 428#include <linux/types.h>
430#include <linux/string.h> 429#include <linux/string.h>
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index a839b2a8f6f..04547eb0833 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -27,7 +27,6 @@
27 * request. 27 * request.
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/types.h> 31#include <linux/types.h>
33#include <linux/string.h> 32#include <linux/string.h>
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 1cdf4420516..05fbd9298db 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -130,7 +130,6 @@
130 130
131#define _IDE_C /* Tell ide.h it's really us */ 131#define _IDE_C /* Tell ide.h it's really us */
132 132
133#include <linux/config.h>
134#include <linux/module.h> 133#include <linux/module.h>
135#include <linux/types.h> 134#include <linux/types.h>
136#include <linux/string.h> 135#include <linux/string.h>
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index fb88711812e..9c544467cb7 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -40,7 +40,6 @@
40#undef REALLY_SLOW_IO /* most systems can safely undef this */ 40#undef REALLY_SLOW_IO /* most systems can safely undef this */
41 41
42#include <linux/module.h> 42#include <linux/module.h>
43#include <linux/config.h>
44#include <linux/types.h> 43#include <linux/types.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
46#include <linux/delay.h> 45#include <linux/delay.h>
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 20eb5b872ca..3b1d33baaa2 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -7,7 +7,6 @@
7#undef REALLY_SLOW_IO /* most systems can safely undef this */ 7#undef REALLY_SLOW_IO /* most systems can safely undef this */
8 8
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/delay.h> 12#include <linux/delay.h>
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c
index 3fac3e9ec47..64d42619ab0 100644
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -8,7 +8,6 @@
8 * more details. 8 * more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/interrupt.h> 13#include <linux/interrupt.h>
diff --git a/drivers/ide/legacy/hd.c b/drivers/ide/legacy/hd.c
index 6439dec6688..aebecd8f51c 100644
--- a/drivers/ide/legacy/hd.c
+++ b/drivers/ide/legacy/hd.c
@@ -691,7 +691,7 @@ static struct block_device_operations hd_fops = {
691}; 691};
692 692
693/* 693/*
694 * This is the hard disk IRQ description. The SA_INTERRUPT in sa_flags 694 * This is the hard disk IRQ description. The IRQF_DISABLED in sa_flags
695 * means we run the IRQ-handler with interrupts disabled: this is bad for 695 * means we run the IRQ-handler with interrupts disabled: this is bad for
696 * interrupt latency, but anything else has led to problems on some 696 * interrupt latency, but anything else has led to problems on some
697 * machines. 697 * machines.
@@ -806,7 +806,7 @@ static int __init hd_init(void)
806 p->cyl, p->head, p->sect); 806 p->cyl, p->head, p->sect);
807 } 807 }
808 808
809 if (request_irq(HD_IRQ, hd_interrupt, SA_INTERRUPT, "hd", NULL)) { 809 if (request_irq(HD_IRQ, hd_interrupt, IRQF_DISABLED, "hd", NULL)) {
810 printk("hd: unable to get IRQ%d for the hard disk driver\n", 810 printk("hd: unable to get IRQ%d for the hard disk driver\n",
811 HD_IRQ); 811 HD_IRQ);
812 goto out1; 812 goto out1;
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index a77fb249d5c..c48e87e512d 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -39,7 +39,6 @@
39#undef REALLY_SLOW_IO /* most systems can safely undef this */ 39#undef REALLY_SLOW_IO /* most systems can safely undef this */
40 40
41#include <linux/module.h> 41#include <linux/module.h>
42#include <linux/config.h>
43#include <linux/types.h> 42#include <linux/types.h>
44#include <linux/kernel.h> 43#include <linux/kernel.h>
45#include <linux/delay.h> 44#include <linux/delay.h>
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index 602797a4420..b7e459e4f28 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -146,7 +146,16 @@ static void ide_detach(struct pcmcia_device *link)
146 kfree(link->priv); 146 kfree(link->priv);
147} /* ide_detach */ 147} /* ide_detach */
148 148
149static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq, struct pcmcia_device *handle) 149static void idecs_mmio_fixup(ide_hwif_t *hwif)
150{
151 default_hwif_mmiops(hwif);
152 hwif->mmio = 2;
153
154 ide_undecoded_slave(hwif);
155}
156
157static int idecs_register(unsigned long io, unsigned long ctl,
158 unsigned long irq, struct pcmcia_device *handle, int is_mmio)
150{ 159{
151 hw_regs_t hw; 160 hw_regs_t hw;
152 memset(&hw, 0, sizeof(hw)); 161 memset(&hw, 0, sizeof(hw));
@@ -154,7 +163,19 @@ static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq
154 hw.irq = irq; 163 hw.irq = irq;
155 hw.chipset = ide_pci; 164 hw.chipset = ide_pci;
156 hw.dev = &handle->dev; 165 hw.dev = &handle->dev;
157 return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave); 166
167 if(is_mmio)
168 return ide_register_hw_with_fixup(&hw, NULL, idecs_mmio_fixup);
169 else
170 return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave);
171}
172
173void outb_io(unsigned char value, unsigned long port) {
174 outb(value, port);
175}
176
177void outb_mem(unsigned char value, unsigned long port) {
178 writeb(value, (void __iomem *) port);
158} 179}
159 180
160/*====================================================================== 181/*======================================================================
@@ -180,7 +201,8 @@ static int ide_config(struct pcmcia_device *link)
180 } *stk = NULL; 201 } *stk = NULL;
181 cistpl_cftable_entry_t *cfg; 202 cistpl_cftable_entry_t *cfg;
182 int i, pass, last_ret = 0, last_fn = 0, hd, is_kme = 0; 203 int i, pass, last_ret = 0, last_fn = 0, hd, is_kme = 0;
183 unsigned long io_base, ctl_base; 204 unsigned long io_base, ctl_base, is_mmio, try_slave;
205 void (*my_outb)(unsigned char, unsigned long);
184 206
185 DEBUG(0, "ide_config(0x%p)\n", link); 207 DEBUG(0, "ide_config(0x%p)\n", link);
186 208
@@ -210,7 +232,7 @@ static int ide_config(struct pcmcia_device *link)
210 /* Not sure if this is right... look up the current Vcc */ 232 /* Not sure if this is right... look up the current Vcc */
211 CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf)); 233 CS_CHECK(GetConfigurationInfo, pcmcia_get_configuration_info(link, &stk->conf));
212 234
213 pass = io_base = ctl_base = 0; 235 pass = io_base = ctl_base = is_mmio = try_slave = 0;
214 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY; 236 tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
215 tuple.Attributes = 0; 237 tuple.Attributes = 0;
216 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple)); 238 CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(link, &tuple));
@@ -258,11 +280,45 @@ static int ide_config(struct pcmcia_device *link)
258 goto next_entry; 280 goto next_entry;
259 io_base = link->io.BasePort1; 281 io_base = link->io.BasePort1;
260 ctl_base = link->io.BasePort1 + 0x0e; 282 ctl_base = link->io.BasePort1 + 0x0e;
283
284 if (io->win[0].len >= 0x20)
285 try_slave = 1;
286
261 } else goto next_entry; 287 } else goto next_entry;
262 /* If we've got this far, we're done */ 288 /* If we've got this far, we're done */
263 break; 289 break;
264 } 290 }
265 291
292 if ((cfg->mem.nwin > 0) || (stk->dflt.mem.nwin > 0)) {
293 win_req_t req;
294 memreq_t map;
295 cistpl_mem_t *mem = (cfg->mem.nwin) ? &cfg->mem : &stk->dflt.mem;
296
297 if (mem->win[0].len < 16)
298 goto next_entry;
299
300 req.Attributes = WIN_DATA_WIDTH_16|WIN_MEMORY_TYPE_CM;
301 req.Attributes |= WIN_ENABLE;
302 req.Base = mem->win[0].host_addr;
303 req.Size = 0;
304
305 req.AccessSpeed = 0;
306 if (pcmcia_request_window(&link, &req, &link->win) != 0)
307 goto next_entry;
308 map.Page = 0; map.CardOffset = mem->win[0].card_addr;
309 if (pcmcia_map_mem_page(link->win, &map) != 0)
310 goto next_entry;
311
312 io_base = (unsigned long) ioremap(req.Base, req.Size);
313 ctl_base = io_base + 0x0e;
314 is_mmio = 1;
315
316 if (mem->win[0].len >= 0x20)
317 try_slave = 1;
318
319 break;
320 }
321
266 next_entry: 322 next_entry:
267 if (cfg->flags & CISTPL_CFTABLE_DEFAULT) 323 if (cfg->flags & CISTPL_CFTABLE_DEFAULT)
268 memcpy(&stk->dflt, cfg, sizeof(stk->dflt)); 324 memcpy(&stk->dflt, cfg, sizeof(stk->dflt));
@@ -278,21 +334,26 @@ static int ide_config(struct pcmcia_device *link)
278 CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); 334 CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq));
279 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); 335 CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf));
280 336
337 if(is_mmio)
338 my_outb = outb_mem;
339 else
340 my_outb = outb_io;
341
281 /* disable drive interrupts during IDE probe */ 342 /* disable drive interrupts during IDE probe */
282 outb(0x02, ctl_base); 343 my_outb(0x02, ctl_base);
283 344
284 /* special setup for KXLC005 card */ 345 /* special setup for KXLC005 card */
285 if (is_kme) 346 if (is_kme)
286 outb(0x81, ctl_base+1); 347 my_outb(0x81, ctl_base+1);
287 348
288 /* retry registration in case device is still spinning up */ 349 /* retry registration in case device is still spinning up */
289 for (hd = -1, i = 0; i < 10; i++) { 350 for (hd = -1, i = 0; i < 10; i++) {
290 hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link); 351 hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, link, is_mmio);
291 if (hd >= 0) break; 352 if (hd >= 0) break;
292 if (link->io.NumPorts1 == 0x20) { 353 if (try_slave) {
293 outb(0x02, ctl_base + 0x10); 354 my_outb(0x02, ctl_base + 0x10);
294 hd = idecs_register(io_base + 0x10, ctl_base + 0x10, 355 hd = idecs_register(io_base + 0x10, ctl_base + 0x10,
295 link->irq.AssignedIRQ, link); 356 link->irq.AssignedIRQ, link, is_mmio);
296 if (hd >= 0) { 357 if (hd >= 0) {
297 io_base += 0x10; 358 io_base += 0x10;
298 ctl_base += 0x10; 359 ctl_base += 0x10;
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c
index 90cac609d9c..d655da74914 100644
--- a/drivers/ide/legacy/macide.c
+++ b/drivers/ide/legacy/macide.c
@@ -11,7 +11,6 @@
11 * more details. 11 * more details.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/interrupt.h> 16#include <linux/interrupt.h>
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c
index 563fab0098b..d3c3bc2640e 100644
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -28,7 +28,6 @@
28#undef REALLY_SLOW_IO /* most systems can safely undef this */ 28#undef REALLY_SLOW_IO /* most systems can safely undef this */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/config.h>
32#include <linux/types.h> 31#include <linux/types.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/delay.h> 33#include <linux/delay.h>
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c
index cdbdb2ff9f1..6e2c58c5f6a 100644
--- a/drivers/ide/legacy/umc8672.c
+++ b/drivers/ide/legacy/umc8672.c
@@ -40,7 +40,6 @@
40#define REALLY_SLOW_IO /* some systems can safely undef this */ 40#define REALLY_SLOW_IO /* some systems can safely undef this */
41 41
42#include <linux/module.h> 42#include <linux/module.h>
43#include <linux/config.h>
44#include <linux/types.h> 43#include <linux/types.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
46#include <linux/delay.h> 45#include <linux/delay.h>
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c
index 3edd7060510..a7c725f8bf6 100644
--- a/drivers/ide/pci/aec62xx.c
+++ b/drivers/ide/pci/aec62xx.c
@@ -6,7 +6,6 @@
6 */ 6 */
7 7
8#include <linux/module.h> 8#include <linux/module.h>
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/pci.h> 10#include <linux/pci.h>
12#include <linux/delay.h> 11#include <linux/delay.h>
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 8b24b4f2a83..351dab2fcac 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/types.h> 31#include <linux/types.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
diff --git a/drivers/ide/pci/amd74xx.c b/drivers/ide/pci/amd74xx.c
index 85007cb12c5..2b0ea8b6608 100644
--- a/drivers/ide/pci/amd74xx.c
+++ b/drivers/ide/pci/amd74xx.c
@@ -16,7 +16,6 @@
16 * the Free Software Foundation. 16 * the Free Software Foundation.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/ioport.h> 21#include <linux/ioport.h>
diff --git a/drivers/ide/pci/atiixp.c b/drivers/ide/pci/atiixp.c
index 900efd1da58..a574de5f083 100644
--- a/drivers/ide/pci/atiixp.c
+++ b/drivers/ide/pci/atiixp.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c
index 11d035f1983..61b5f9c0b2f 100644
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -103,7 +103,6 @@
103 103
104//#define CMD640_DUMP_REGS 104//#define CMD640_DUMP_REGS
105 105
106#include <linux/config.h>
107#include <linux/types.h> 106#include <linux/types.h>
108#include <linux/kernel.h> 107#include <linux/kernel.h>
109#include <linux/delay.h> 108#include <linux/delay.h>
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c
index 92b7b1549b1..20c32716bbc 100644
--- a/drivers/ide/pci/cmd64x.c
+++ b/drivers/ide/pci/cmd64x.c
@@ -14,7 +14,6 @@
14 * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> 14 * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/pci.h> 19#include <linux/pci.h>
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index ea3c52cc8ac..079f7c86726 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -32,7 +32,6 @@
32 * 32 *
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/types.h> 36#include <linux/types.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
diff --git a/drivers/ide/pci/cs5530.c b/drivers/ide/pci/cs5530.c
index 09269e574b3..380bb28c7c5 100644
--- a/drivers/ide/pci/cs5530.c
+++ b/drivers/ide/pci/cs5530.c
@@ -14,7 +14,6 @@
14 * CS5530 documentation available from National Semiconductor. 14 * CS5530 documentation available from National Semiconductor.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/ide/pci/cs5535.c b/drivers/ide/pci/cs5535.c
index 6eb305197f3..5c5aec28e67 100644
--- a/drivers/ide/pci/cs5535.c
+++ b/drivers/ide/pci/cs5535.c
@@ -23,7 +23,6 @@
23 * CS5535 documentation available from AMD 23 * CS5535 documentation available from AMD
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/pci.h> 27#include <linux/pci.h>
29#include <linux/ide.h> 28#include <linux/ide.h>
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c
index 9f41ecd5633..120929fbe7a 100644
--- a/drivers/ide/pci/cy82c693.c
+++ b/drivers/ide/pci/cy82c693.c
@@ -44,7 +44,6 @@
44 * 44 *
45 */ 45 */
46 46
47#include <linux/config.h>
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/types.h> 48#include <linux/types.h>
50#include <linux/pci.h> 49#include <linux/pci.h>
diff --git a/drivers/ide/pci/hpt34x.c b/drivers/ide/pci/hpt34x.c
index 7da550281cf..b46cb042290 100644
--- a/drivers/ide/pci/hpt34x.c
+++ b/drivers/ide/pci/hpt34x.c
@@ -24,7 +24,6 @@
24 * Non-bootable card or HPT343 :: pcicmd == 0x05 24 * Non-bootable card or HPT343 :: pcicmd == 0x05
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c
index 940bdd4c578..e993a51f250 100644
--- a/drivers/ide/pci/hpt366.c
+++ b/drivers/ide/pci/hpt366.c
@@ -55,7 +55,6 @@
55 */ 55 */
56 56
57 57
58#include <linux/config.h>
59#include <linux/types.h> 58#include <linux/types.h>
60#include <linux/module.h> 59#include <linux/module.h>
61#include <linux/kernel.h> 60#include <linux/kernel.h>
diff --git a/drivers/ide/pci/it8172.c b/drivers/ide/pci/it8172.c
index 93462926b9d..0fc89fafad6 100644
--- a/drivers/ide/pci/it8172.c
+++ b/drivers/ide/pci/it8172.c
@@ -28,7 +28,6 @@
28 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index 38f41b377ff..3cb04424d35 100644
--- a/drivers/ide/pci/it821x.c
+++ b/drivers/ide/pci/it821x.c
@@ -62,7 +62,6 @@
62 * - Move to libata once it grows up 62 * - Move to libata once it grows up
63 */ 63 */
64 64
65#include <linux/config.h>
66#include <linux/types.h> 65#include <linux/types.h>
67#include <linux/module.h> 66#include <linux/module.h>
68#include <linux/pci.h> 67#include <linux/pci.h>
@@ -651,6 +650,8 @@ static void __devinit init_hwif_it821x(ide_hwif_t *hwif)
651 } 650 }
652 ide_set_hwifdata(hwif, idev); 651 ide_set_hwifdata(hwif, idev);
653 652
653 hwif->atapi_dma = 1;
654
654 pci_read_config_byte(hwif->pci_dev, 0x50, &conf); 655 pci_read_config_byte(hwif->pci_dev, 0x50, &conf);
655 if(conf & 1) { 656 if(conf & 1) {
656 idev->smart = 1; 657 idev->smart = 1;
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c
index fcd5142f5cf..d95714bcee4 100644
--- a/drivers/ide/pci/ns87415.c
+++ b/drivers/ide/pci/ns87415.c
@@ -9,7 +9,6 @@
9 * Inspired by an earlier effort from David S. Miller <davem@redhat.com> 9 * Inspired by an earlier effort from David S. Miller <davem@redhat.com>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 5a8334d134f..6c097e80b4d 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -14,7 +14,6 @@
14 * Released under terms of General Public License 14 * Released under terms of General Public License
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c
index 1e209d8f943..b46022a11be 100644
--- a/drivers/ide/pci/pdc202xx_old.c
+++ b/drivers/ide/pci/pdc202xx_old.c
@@ -28,7 +28,6 @@
28 * Released under terms of General Public License 28 * Released under terms of General Public License
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/types.h> 31#include <linux/types.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
diff --git a/drivers/ide/pci/piix.c b/drivers/ide/pci/piix.c
index 7fac6f57b5d..50332ddd5dd 100644
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -90,7 +90,6 @@
90 * ICH3 errata #18 - Don't use native mode 90 * ICH3 errata #18 - Don't use native mode
91 */ 91 */
92 92
93#include <linux/config.h>
94#include <linux/types.h> 93#include <linux/types.h>
95#include <linux/module.h> 94#include <linux/module.h>
96#include <linux/kernel.h> 95#include <linux/kernel.h>
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c
index 778b82ae964..fc2b5496b6d 100644
--- a/drivers/ide/pci/sc1200.c
+++ b/drivers/ide/pci/sc1200.c
@@ -11,7 +11,6 @@
11 * Available from National Semiconductor 11 * Available from National Semiconductor
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/drivers/ide/pci/serverworks.c b/drivers/ide/pci/serverworks.c
index 5100b827a93..03677bff0d7 100644
--- a/drivers/ide/pci/serverworks.c
+++ b/drivers/ide/pci/serverworks.c
@@ -29,7 +29,6 @@
29 * 29 *
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c
index 72dade14c72..25ceb4a39ed 100644
--- a/drivers/ide/pci/siimage.c
+++ b/drivers/ide/pci/siimage.c
@@ -27,7 +27,6 @@
27 * if neccessary 27 * if neccessary
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/pci.h> 32#include <linux/pci.h>
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c
index 8e9d87701ce..8a6c23ac8cc 100644
--- a/drivers/ide/pci/sis5513.c
+++ b/drivers/ide/pci/sis5513.c
@@ -44,7 +44,6 @@
44 * 962/963. 44 * 962/963.
45 */ 45 */
46 46
47#include <linux/config.h>
48#include <linux/types.h> 47#include <linux/types.h>
49#include <linux/module.h> 48#include <linux/module.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c
index 900301e4381..0b4b6049851 100644
--- a/drivers/ide/pci/sl82c105.c
+++ b/drivers/ide/pci/sl82c105.c
@@ -13,7 +13,6 @@
13 * -- Benjamin Herrenschmidt (01/11/03) benh@kernel.crashing.org 13 * -- Benjamin Herrenschmidt (01/11/03) benh@kernel.crashing.org
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/drivers/ide/pci/slc90e66.c b/drivers/ide/pci/slc90e66.c
index 0968f6bc669..4a1853af3bb 100644
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c
index f96b56838f3..56d84931d6d 100644
--- a/drivers/ide/pci/triflex.c
+++ b/drivers/ide/pci/triflex.c
@@ -27,7 +27,6 @@
27 * Not publically available. 27 * Not publically available.
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index fe80295974e..2a282529bfc 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -128,7 +128,6 @@
128 * 128 *
129 */ 129 */
130 130
131#include <linux/config.h>
132#include <linux/types.h> 131#include <linux/types.h>
133#include <linux/module.h> 132#include <linux/module.h>
134#include <linux/kernel.h> 133#include <linux/kernel.h>
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c
index 3e677c4f8c2..afdaee3c15c 100644
--- a/drivers/ide/pci/via82cxxx.c
+++ b/drivers/ide/pci/via82cxxx.c
@@ -26,7 +26,6 @@
26 * the Free Software Foundation. 26 * the Free Software Foundation.
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/ioport.h> 31#include <linux/ioport.h>
diff --git a/drivers/ide/ppc/mpc8xx.c b/drivers/ide/ppc/mpc8xx.c
index b80c6135ae9..0ac9da3a737 100644
--- a/drivers/ide/ppc/mpc8xx.c
+++ b/drivers/ide/ppc/mpc8xx.c
@@ -11,7 +11,6 @@
11 * by Mathew Locke <mattl@mvista.com> 11 * by Mathew Locke <mattl@mvista.com>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index e8ef3455ec3..ebf961f1718 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -22,7 +22,6 @@
22 * big table 22 * big table
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/types.h> 25#include <linux/types.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index c11e3b2e67a..eb0945284ac 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -18,7 +18,6 @@
18 * configuration of all PCI IDE interfaces present in a system. 18 * configuration of all PCI IDE interfaces present in a system.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/drivers/ieee1394/config_roms.c b/drivers/ieee1394/config_roms.c
index 1017fd71724..e2de6fa0c9f 100644
--- a/drivers/ieee1394/config_roms.c
+++ b/drivers/ieee1394/config_roms.c
@@ -9,7 +9,6 @@
9 * directory of the kernel sources for details. 9 * directory of the kernel sources for details.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14 13
15#include "csr1212.h" 14#include "csr1212.h"
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index 85c2d4ca0de..87532dd4337 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -83,7 +83,6 @@
83 83
84*/ 84*/
85 85
86#include <linux/config.h>
87#include <linux/kernel.h> 86#include <linux/kernel.h>
88#include <linux/list.h> 87#include <linux/list.h>
89#include <linux/slab.h> 88#include <linux/slab.h>
diff --git a/drivers/ieee1394/highlevel.c b/drivers/ieee1394/highlevel.c
index 25b22609e79..694da82d820 100644
--- a/drivers/ieee1394/highlevel.c
+++ b/drivers/ieee1394/highlevel.c
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/list.h> 21#include <linux/list.h>
23#include <linux/bitops.h> 22#include <linux/bitops.h>
diff --git a/drivers/ieee1394/hosts.c b/drivers/ieee1394/hosts.c
index ad49c040b67..2c669287f5b 100644
--- a/drivers/ieee1394/hosts.c
+++ b/drivers/ieee1394/hosts.c
@@ -10,7 +10,6 @@
10 * directory of the kernel sources for details. 10 * directory of the kernel sources for details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/list.h> 15#include <linux/list.h>
diff --git a/drivers/ieee1394/ieee1394_core.c b/drivers/ieee1394/ieee1394_core.c
index 49354de9fb8..f43739c5cab 100644
--- a/drivers/ieee1394/ieee1394_core.c
+++ b/drivers/ieee1394/ieee1394_core.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/list.h> 24#include <linux/list.h>
26#include <linux/string.h> 25#include <linux/string.h>
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 50c71e17de7..d541b508a15 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -10,7 +10,6 @@
10 10
11#include <linux/bitmap.h> 11#include <linux/bitmap.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/config.h>
14#include <linux/list.h> 13#include <linux/list.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
16#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 800c8d51843..d4bad6704bb 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -82,7 +82,6 @@
82 * 82 *
83 */ 83 */
84 84
85#include <linux/config.h>
86#include <linux/kernel.h> 85#include <linux/kernel.h>
87#include <linux/list.h> 86#include <linux/list.h>
88#include <linux/slab.h> 87#include <linux/slab.h>
@@ -3393,12 +3392,12 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
3393 spin_lock_init(&ohci->event_lock); 3392 spin_lock_init(&ohci->event_lock);
3394 3393
3395 /* 3394 /*
3396 * interrupts are disabled, all right, but... due to SA_SHIRQ we 3395 * interrupts are disabled, all right, but... due to IRQF_SHARED we
3397 * might get called anyway. We'll see no event, of course, but 3396 * might get called anyway. We'll see no event, of course, but
3398 * we need to get to that "no event", so enough should be initialized 3397 * we need to get to that "no event", so enough should be initialized
3399 * by that point. 3398 * by that point.
3400 */ 3399 */
3401 if (request_irq(dev->irq, ohci_irq_handler, SA_SHIRQ, 3400 if (request_irq(dev->irq, ohci_irq_handler, IRQF_SHARED,
3402 OHCI1394_DRIVER_NAME, ohci)) 3401 OHCI1394_DRIVER_NAME, ohci))
3403 FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq); 3402 FAIL(-ENOMEM, "Failed to allocate shared interrupt %d", dev->irq);
3404 3403
diff --git a/drivers/ieee1394/oui2c.sh b/drivers/ieee1394/oui2c.sh
index d50dc7a2d08..b9d0e8f10ab 100644
--- a/drivers/ieee1394/oui2c.sh
+++ b/drivers/ieee1394/oui2c.sh
@@ -3,7 +3,6 @@
3cat <<EOF 3cat <<EOF
4/* Generated file for OUI database */ 4/* Generated file for OUI database */
5 5
6#include <linux/config.h>
7 6
8#ifdef CONFIG_IEEE1394_OUI_DB 7#ifdef CONFIG_IEEE1394_OUI_DB
9struct oui_list_struct { 8struct oui_list_struct {
diff --git a/drivers/ieee1394/pcilynx.c b/drivers/ieee1394/pcilynx.c
index e29dfd280be..e6f41238f5e 100644
--- a/drivers/ieee1394/pcilynx.c
+++ b/drivers/ieee1394/pcilynx.c
@@ -30,7 +30,6 @@
30 * Enhancements in async and iso send code 30 * Enhancements in async and iso send code
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/slab.h> 34#include <linux/slab.h>
36#include <linux/interrupt.h> 35#include <linux/interrupt.h>
@@ -1254,7 +1253,7 @@ static int __devinit add_card(struct pci_dev *dev,
1254 1253
1255 sprintf (irq_buf, "%d", dev->irq); 1254 sprintf (irq_buf, "%d", dev->irq);
1256 1255
1257 if (!request_irq(dev->irq, lynx_irq_handler, SA_SHIRQ, 1256 if (!request_irq(dev->irq, lynx_irq_handler, IRQF_SHARED,
1258 PCILYNX_DRIVER_NAME, lynx)) { 1257 PCILYNX_DRIVER_NAME, lynx)) {
1259 PRINT(KERN_INFO, lynx->id, "allocated interrupt %s", irq_buf); 1258 PRINT(KERN_INFO, lynx->id, "allocated interrupt %s", irq_buf);
1260 lynx->state = have_intr; 1259 lynx->state = have_intr;
diff --git a/drivers/ieee1394/pcilynx.h b/drivers/ieee1394/pcilynx.h
index d631aa8383a..ec27321f672 100644
--- a/drivers/ieee1394/pcilynx.h
+++ b/drivers/ieee1394/pcilynx.h
@@ -1,7 +1,6 @@
1#ifndef __PCILYNX_H__ 1#ifndef __PCILYNX_H__
2#define __PCILYNX_H__ 2#define __PCILYNX_H__
3 3
4#include <linux/config.h>
5 4
6#define PCILYNX_DRIVER_NAME "pcilynx" 5#define PCILYNX_DRIVER_NAME "pcilynx"
7#define PCILYNX_MAJOR 177 6#define PCILYNX_MAJOR 177
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 1d5ceb7ecc8..aaa74f293aa 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -38,7 +38,6 @@
38 * but the code needs additional debugging. 38 * but the code needs additional debugging.
39 */ 39 */
40 40
41#include <linux/config.h>
42#include <linux/kernel.h> 41#include <linux/kernel.h>
43#include <linux/list.h> 42#include <linux/list.h>
44#include <linux/string.h> 43#include <linux/string.h>
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c
index 295d0f8c3d0..c6e3f02bc6d 100644
--- a/drivers/ieee1394/video1394.c
+++ b/drivers/ieee1394/video1394.c
@@ -28,7 +28,6 @@
28 * ENOTTY for unsupported ioctl request 28 * ENOTTY for unsupported ioctl request
29 * 29 *
30 */ 30 */
31#include <linux/config.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/list.h> 32#include <linux/list.h>
34#include <linux/slab.h> 33#include <linux/slab.h>
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 450adfe0a4f..3f6705f3083 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -3152,6 +3152,7 @@ static int cm_init_qp_rtr_attr(struct cm_id_private *cm_id_priv,
3152 } 3152 }
3153 if (cm_id_priv->alt_av.ah_attr.dlid) { 3153 if (cm_id_priv->alt_av.ah_attr.dlid) {
3154 *qp_attr_mask |= IB_QP_ALT_PATH; 3154 *qp_attr_mask |= IB_QP_ALT_PATH;
3155 qp_attr->alt_port_num = cm_id_priv->alt_av.port->port_num;
3155 qp_attr->alt_ah_attr = cm_id_priv->alt_av.ah_attr; 3156 qp_attr->alt_ah_attr = cm_id_priv->alt_av.ah_attr;
3156 } 3157 }
3157 ret = 0; 3158 ret = 0;
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index a908a7bdcd7..bdf5d509819 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -1963,7 +1963,7 @@ ssize_t ib_uverbs_create_srq(struct ib_uverbs_file *file,
1963 if (!obj) 1963 if (!obj)
1964 return -ENOMEM; 1964 return -ENOMEM;
1965 1965
1966 init_uobj(&obj->uobject, 0, file->ucontext); 1966 init_uobj(&obj->uobject, cmd.user_handle, file->ucontext);
1967 down_write(&obj->uobject.mutex); 1967 down_write(&obj->uobject.mutex);
1968 1968
1969 pd = idr_read_pd(cmd.pd_handle, file->ucontext); 1969 pd = idr_read_pd(cmd.pd_handle, file->ucontext);
diff --git a/drivers/infiniband/hw/ipath/Kconfig b/drivers/infiniband/hw/ipath/Kconfig
index 9ea67c409b6..1db9489f1e8 100644
--- a/drivers/infiniband/hw/ipath/Kconfig
+++ b/drivers/infiniband/hw/ipath/Kconfig
@@ -1,16 +1,16 @@
1config IPATH_CORE 1config IPATH_CORE
2 tristate "PathScale InfiniPath Driver" 2 tristate "QLogic InfiniPath Driver"
3 depends on 64BIT && PCI_MSI && NET 3 depends on 64BIT && PCI_MSI && NET
4 ---help--- 4 ---help---
5 This is a low-level driver for PathScale InfiniPath host channel 5 This is a low-level driver for QLogic InfiniPath host channel
6 adapters (HCAs) based on the HT-400 and PE-800 chips. 6 adapters (HCAs) based on the HT-400 and PE-800 chips.
7 7
8config INFINIBAND_IPATH 8config INFINIBAND_IPATH
9 tristate "PathScale InfiniPath Verbs Driver" 9 tristate "QLogic InfiniPath Verbs Driver"
10 depends on IPATH_CORE && INFINIBAND 10 depends on IPATH_CORE && INFINIBAND
11 ---help--- 11 ---help---
12 This is a driver that provides InfiniBand verbs support for 12 This is a driver that provides InfiniBand verbs support for
13 PathScale InfiniPath host channel adapters (HCAs). This 13 QLogic InfiniPath host channel adapters (HCAs). This
14 allows these devices to be used with both kernel upper level 14 allows these devices to be used with both kernel upper level
15 protocols such as IP-over-InfiniBand as well as with userspace 15 protocols such as IP-over-InfiniBand as well as with userspace
16 applications (in conjunction with InfiniBand userspace access). 16 applications (in conjunction with InfiniBand userspace access).
diff --git a/drivers/infiniband/hw/ipath/Makefile b/drivers/infiniband/hw/ipath/Makefile
index b4d084abfd2..b0bf7286413 100644
--- a/drivers/infiniband/hw/ipath/Makefile
+++ b/drivers/infiniband/hw/ipath/Makefile
@@ -1,4 +1,4 @@
1EXTRA_CFLAGS += -DIPATH_IDSTR='"PathScale kernel.org driver"' \ 1EXTRA_CFLAGS += -DIPATH_IDSTR='"QLogic kernel.org driver"' \
2 -DIPATH_KERN_TYPE=0 2 -DIPATH_KERN_TYPE=0
3 3
4obj-$(CONFIG_IPATH_CORE) += ipath_core.o 4obj-$(CONFIG_IPATH_CORE) += ipath_core.o
diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h
index 48a55247b83..062bd392e7e 100644
--- a/drivers/infiniband/hw/ipath/ipath_common.h
+++ b/drivers/infiniband/hw/ipath/ipath_common.h
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -38,7 +39,8 @@
38 * to communicate between kernel and user code. 39 * to communicate between kernel and user code.
39 */ 40 */
40 41
41/* This is the IEEE-assigned OUI for PathScale, Inc. */ 42
43/* This is the IEEE-assigned OUI for QLogic Inc. InfiniPath */
42#define IPATH_SRC_OUI_1 0x00 44#define IPATH_SRC_OUI_1 0x00
43#define IPATH_SRC_OUI_2 0x11 45#define IPATH_SRC_OUI_2 0x11
44#define IPATH_SRC_OUI_3 0x75 46#define IPATH_SRC_OUI_3 0x75
@@ -96,8 +98,8 @@ struct infinipath_stats {
96 __u64 sps_hwerrs; 98 __u64 sps_hwerrs;
97 /* number of times IB link changed state unexpectedly */ 99 /* number of times IB link changed state unexpectedly */
98 __u64 sps_iblink; 100 __u64 sps_iblink;
99 /* no longer used; left for compatibility */ 101 /* kernel receive interrupts that didn't read intstat */
100 __u64 sps_unused3; 102 __u64 sps_fastrcvint;
101 /* number of kernel (port0) packets received */ 103 /* number of kernel (port0) packets received */
102 __u64 sps_port0pkts; 104 __u64 sps_port0pkts;
103 /* number of "ethernet" packets sent by driver */ 105 /* number of "ethernet" packets sent by driver */
@@ -121,8 +123,7 @@ struct infinipath_stats {
121 __u64 sps_ports; 123 __u64 sps_ports;
122 /* list of pkeys (other than default) accepted (0 means not set) */ 124 /* list of pkeys (other than default) accepted (0 means not set) */
123 __u16 sps_pkeys[4]; 125 __u16 sps_pkeys[4];
124 /* lids for up to 4 infinipaths, indexed by infinipath # */ 126 __u16 sps_unused16[4]; /* available; maintaining compatible layout */
125 __u16 sps_lid[4];
126 /* number of user ports per chip (not IB ports) */ 127 /* number of user ports per chip (not IB ports) */
127 __u32 sps_nports; 128 __u32 sps_nports;
128 /* not our interrupt, or already handled */ 129 /* not our interrupt, or already handled */
@@ -140,10 +141,8 @@ struct infinipath_stats {
140 * packets if ipath not configured, sma/mad, etc.) 141 * packets if ipath not configured, sma/mad, etc.)
141 */ 142 */
142 __u64 sps_krdrops; 143 __u64 sps_krdrops;
143 /* mlids for up to 4 infinipaths, indexed by infinipath # */
144 __u16 sps_mlid[4];
145 /* pad for future growth */ 144 /* pad for future growth */
146 __u64 __sps_pad[45]; 145 __u64 __sps_pad[46];
147}; 146};
148 147
149/* 148/*
@@ -310,6 +309,9 @@ struct ipath_base_info {
310 __u32 spi_rcv_egrchunksize; 309 __u32 spi_rcv_egrchunksize;
311 /* total size of mmap to cover full rcvegrbuffers */ 310 /* total size of mmap to cover full rcvegrbuffers */
312 __u32 spi_rcv_egrbuftotlen; 311 __u32 spi_rcv_egrbuftotlen;
312 __u32 spi_filler_for_align;
313 /* address of readonly memory copy of the rcvhdrq tail register. */
314 __u64 spi_rcvhdr_tailaddr;
313} __attribute__ ((aligned(8))); 315} __attribute__ ((aligned(8)));
314 316
315 317
@@ -342,9 +344,9 @@ struct ipath_base_info {
342/* 344/*
343 * Similarly, this is the kernel version going back to the user. It's 345 * Similarly, this is the kernel version going back to the user. It's
344 * slightly different, in that we want to tell if the driver was built as 346 * slightly different, in that we want to tell if the driver was built as
345 * part of a PathScale release, or from the driver from OpenIB, kernel.org, 347 * part of a QLogic release, or from the driver from openfabrics.org,
346 * or a standard distribution, for support reasons. The high bit is 0 for 348 * kernel.org, or a standard distribution, for support reasons.
347 * non-PathScale, and 1 for PathScale-built/supplied. 349 * The high bit is 0 for non-QLogic and 1 for QLogic-built/supplied.
348 * 350 *
349 * It's returned by the driver to the user code during initialization in the 351 * It's returned by the driver to the user code during initialization in the
350 * spi_sw_version field of ipath_base_info, so the user code can in turn 352 * spi_sw_version field of ipath_base_info, so the user code can in turn
@@ -379,13 +381,7 @@ struct ipath_user_info {
379 */ 381 */
380 __u32 spu_rcvhdrsize; 382 __u32 spu_rcvhdrsize;
381 383
382 /* 384 __u64 spu_unused; /* kept for compatible layout */
383 * cache line aligned (64 byte) user address to
384 * which the rcvhdrtail register will be written by infinipath
385 * whenever it changes, so that no chip registers are read in
386 * the performance path.
387 */
388 __u64 spu_rcvhdraddr;
389 385
390 /* 386 /*
391 * address of struct base_info to write to 387 * address of struct base_info to write to
@@ -481,7 +477,7 @@ struct ipath_sma_pkt
481 * Data layout in I2C flash (for GUID, etc.) 477 * Data layout in I2C flash (for GUID, etc.)
482 * All fields are little-endian binary unless otherwise stated 478 * All fields are little-endian binary unless otherwise stated
483 */ 479 */
484#define IPATH_FLASH_VERSION 1 480#define IPATH_FLASH_VERSION 2
485struct ipath_flash { 481struct ipath_flash {
486 /* flash layout version (IPATH_FLASH_VERSION) */ 482 /* flash layout version (IPATH_FLASH_VERSION) */
487 __u8 if_fversion; 483 __u8 if_fversion;
@@ -489,14 +485,14 @@ struct ipath_flash {
489 __u8 if_csum; 485 __u8 if_csum;
490 /* 486 /*
491 * valid length (in use, protected by if_csum), including 487 * valid length (in use, protected by if_csum), including
492 * if_fversion and if_sum themselves) 488 * if_fversion and if_csum themselves)
493 */ 489 */
494 __u8 if_length; 490 __u8 if_length;
495 /* the GUID, in network order */ 491 /* the GUID, in network order */
496 __u8 if_guid[8]; 492 __u8 if_guid[8];
497 /* number of GUIDs to use, starting from if_guid */ 493 /* number of GUIDs to use, starting from if_guid */
498 __u8 if_numguid; 494 __u8 if_numguid;
499 /* the board serial number, in ASCII */ 495 /* the (last 10 characters of) board serial number, in ASCII */
500 char if_serial[12]; 496 char if_serial[12];
501 /* board mfg date (YYYYMMDD ASCII) */ 497 /* board mfg date (YYYYMMDD ASCII) */
502 char if_mfgdate[8]; 498 char if_mfgdate[8];
@@ -508,8 +504,10 @@ struct ipath_flash {
508 __u8 if_powerhour[2]; 504 __u8 if_powerhour[2];
509 /* ASCII free-form comment field */ 505 /* ASCII free-form comment field */
510 char if_comment[32]; 506 char if_comment[32];
511 /* 78 bytes used, min flash size is 128 bytes */ 507 /* Backwards compatible prefix for longer QLogic Serial Numbers */
512 __u8 if_future[50]; 508 char if_sprefix[4];
509 /* 82 bytes used, min flash size is 128 bytes */
510 __u8 if_future[46];
513}; 511};
514 512
515/* 513/*
@@ -603,14 +601,118 @@ struct infinipath_counters {
603#define INFINIPATH_KPF_INTR 0x1 601#define INFINIPATH_KPF_INTR 0x1
604 602
605/* SendPIO per-buffer control */ 603/* SendPIO per-buffer control */
606#define INFINIPATH_SP_LENGTHP1_MASK 0x3FF 604#define INFINIPATH_SP_TEST 0x40
607#define INFINIPATH_SP_LENGTHP1_SHIFT 0 605#define INFINIPATH_SP_TESTEBP 0x20
608#define INFINIPATH_SP_INTR 0x80000000
609#define INFINIPATH_SP_TEST 0x40000000
610#define INFINIPATH_SP_TESTEBP 0x20000000
611 606
612/* SendPIOAvail bits */ 607/* SendPIOAvail bits */
613#define INFINIPATH_SENDPIOAVAIL_BUSY_SHIFT 1 608#define INFINIPATH_SENDPIOAVAIL_BUSY_SHIFT 1
614#define INFINIPATH_SENDPIOAVAIL_CHECK_SHIFT 0 609#define INFINIPATH_SENDPIOAVAIL_CHECK_SHIFT 0
615 610
611/* infinipath header format */
612struct ipath_header {
613 /*
614 * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset -
615 * 14 bits before ECO change ~28 Dec 03. After that, Vers 4,
616 * Port 3, TID 11, offset 14.
617 */
618 __le32 ver_port_tid_offset;
619 __le16 chksum;
620 __le16 pkt_flags;
621};
622
623/* infinipath user message header format.
624 * This structure contains the first 4 fields common to all protocols
625 * that employ infinipath.
626 */
627struct ipath_message_header {
628 __be16 lrh[4];
629 __be32 bth[3];
630 /* fields below this point are in host byte order */
631 struct ipath_header iph;
632 __u8 sub_opcode;
633};
634
635/* infinipath ethernet header format */
636struct ether_header {
637 __be16 lrh[4];
638 __be32 bth[3];
639 struct ipath_header iph;
640 __u8 sub_opcode;
641 __u8 cmd;
642 __be16 lid;
643 __u16 mac[3];
644 __u8 frag_num;
645 __u8 seq_num;
646 __le32 len;
647 /* MUST be of word size due to PIO write requirements */
648 __le32 csum;
649 __le16 csum_offset;
650 __le16 flags;
651 __u16 first_2_bytes;
652 __u8 unused[2]; /* currently unused */
653};
654
655
656/* IB - LRH header consts */
657#define IPATH_LRH_GRH 0x0003 /* 1. word of IB LRH - next header: GRH */
658#define IPATH_LRH_BTH 0x0002 /* 1. word of IB LRH - next header: BTH */
659
660/* misc. */
661#define SIZE_OF_CRC 1
662
663#define IPATH_DEFAULT_P_KEY 0xFFFF
664#define IPATH_PERMISSIVE_LID 0xFFFF
665#define IPATH_AETH_CREDIT_SHIFT 24
666#define IPATH_AETH_CREDIT_MASK 0x1F
667#define IPATH_AETH_CREDIT_INVAL 0x1F
668#define IPATH_PSN_MASK 0xFFFFFF
669#define IPATH_MSN_MASK 0xFFFFFF
670#define IPATH_QPN_MASK 0xFFFFFF
671#define IPATH_MULTICAST_LID_BASE 0xC000
672#define IPATH_MULTICAST_QPN 0xFFFFFF
673
674/* Receive Header Queue: receive type (from infinipath) */
675#define RCVHQ_RCV_TYPE_EXPECTED 0
676#define RCVHQ_RCV_TYPE_EAGER 1
677#define RCVHQ_RCV_TYPE_NON_KD 2
678#define RCVHQ_RCV_TYPE_ERROR 3
679
680
681/* sub OpCodes - ith4x */
682#define IPATH_ITH4X_OPCODE_ENCAP 0x81
683#define IPATH_ITH4X_OPCODE_LID_ARP 0x82
684
685#define IPATH_HEADER_QUEUE_WORDS 9
686
687/* functions for extracting fields from rcvhdrq entries for the driver.
688 */
689static inline __u32 ipath_hdrget_err_flags(const __le32 * rbuf)
690{
691 return __le32_to_cpu(rbuf[1]);
692}
693
694static inline __u32 ipath_hdrget_rcv_type(const __le32 * rbuf)
695{
696 return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_RCVTYPE_SHIFT)
697 & INFINIPATH_RHF_RCVTYPE_MASK;
698}
699
700static inline __u32 ipath_hdrget_length_in_bytes(const __le32 * rbuf)
701{
702 return ((__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_LENGTH_SHIFT)
703 & INFINIPATH_RHF_LENGTH_MASK) << 2;
704}
705
706static inline __u32 ipath_hdrget_index(const __le32 * rbuf)
707{
708 return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_EGRINDEX_SHIFT)
709 & INFINIPATH_RHF_EGRINDEX_MASK;
710}
711
712static inline __u32 ipath_hdrget_ipath_ver(__le32 hdrword)
713{
714 return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT)
715 & INFINIPATH_I_VERS_MASK;
716}
717
616#endif /* _IPATH_COMMON_H */ 718#endif /* _IPATH_COMMON_H */
diff --git a/drivers/infiniband/hw/ipath/ipath_cq.c b/drivers/infiniband/hw/ipath/ipath_cq.c
index 7ece1135ddf..3efee341c9b 100644
--- a/drivers/infiniband/hw/ipath/ipath_cq.c
+++ b/drivers/infiniband/hw/ipath/ipath_cq.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -157,10 +158,21 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries,
157 struct ib_ucontext *context, 158 struct ib_ucontext *context,
158 struct ib_udata *udata) 159 struct ib_udata *udata)
159{ 160{
161 struct ipath_ibdev *dev = to_idev(ibdev);
160 struct ipath_cq *cq; 162 struct ipath_cq *cq;
161 struct ib_wc *wc; 163 struct ib_wc *wc;
162 struct ib_cq *ret; 164 struct ib_cq *ret;
163 165
166 if (entries > ib_ipath_max_cqes) {
167 ret = ERR_PTR(-EINVAL);
168 goto bail;
169 }
170
171 if (dev->n_cqs_allocated == ib_ipath_max_cqs) {
172 ret = ERR_PTR(-ENOMEM);
173 goto bail;
174 }
175
164 /* 176 /*
165 * Need to use vmalloc() if we want to support large #s of 177 * Need to use vmalloc() if we want to support large #s of
166 * entries. 178 * entries.
@@ -196,6 +208,8 @@ struct ib_cq *ipath_create_cq(struct ib_device *ibdev, int entries,
196 208
197 ret = &cq->ibcq; 209 ret = &cq->ibcq;
198 210
211 dev->n_cqs_allocated++;
212
199bail: 213bail:
200 return ret; 214 return ret;
201} 215}
@@ -210,9 +224,11 @@ bail:
210 */ 224 */
211int ipath_destroy_cq(struct ib_cq *ibcq) 225int ipath_destroy_cq(struct ib_cq *ibcq)
212{ 226{
227 struct ipath_ibdev *dev = to_idev(ibcq->device);
213 struct ipath_cq *cq = to_icq(ibcq); 228 struct ipath_cq *cq = to_icq(ibcq);
214 229
215 tasklet_kill(&cq->comptask); 230 tasklet_kill(&cq->comptask);
231 dev->n_cqs_allocated--;
216 vfree(cq->queue); 232 vfree(cq->queue);
217 kfree(cq); 233 kfree(cq);
218 234
diff --git a/drivers/infiniband/hw/ipath/ipath_debug.h b/drivers/infiniband/hw/ipath/ipath_debug.h
index 46762387f5f..f415beda0d3 100644
--- a/drivers/infiniband/hw/ipath/ipath_debug.h
+++ b/drivers/infiniband/hw/ipath/ipath_debug.h
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c
index 28ddceb260e..147dd89e21c 100644
--- a/drivers/infiniband/hw/ipath/ipath_diag.c
+++ b/drivers/infiniband/hw/ipath/ipath_diag.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -43,10 +44,9 @@
43#include <linux/pci.h> 44#include <linux/pci.h>
44#include <asm/uaccess.h> 45#include <asm/uaccess.h>
45 46
46#include "ipath_common.h"
47#include "ipath_kernel.h" 47#include "ipath_kernel.h"
48#include "ips_common.h"
49#include "ipath_layer.h" 48#include "ipath_layer.h"
49#include "ipath_common.h"
50 50
51int ipath_diag_inuse; 51int ipath_diag_inuse;
52static int diag_set_link; 52static int diag_set_link;
@@ -66,18 +66,20 @@ static struct file_operations diag_file_ops = {
66 .release = ipath_diag_release 66 .release = ipath_diag_release
67}; 67};
68 68
69static struct cdev *diag_cdev; 69int ipath_diag_add(struct ipath_devdata *dd)
70static struct class_device *diag_class_dev;
71
72int ipath_diag_init(void)
73{ 70{
74 return ipath_cdev_init(IPATH_DIAG_MINOR, "ipath_diag", 71 char name[16];
75 &diag_file_ops, &diag_cdev, &diag_class_dev); 72
73 snprintf(name, sizeof(name), "ipath_diag%d", dd->ipath_unit);
74
75 return ipath_cdev_init(IPATH_DIAG_MINOR_BASE + dd->ipath_unit, name,
76 &diag_file_ops, &dd->diag_cdev,
77 &dd->diag_class_dev);
76} 78}
77 79
78void ipath_diag_cleanup(void) 80void ipath_diag_remove(struct ipath_devdata *dd)
79{ 81{
80 ipath_cdev_cleanup(&diag_cdev, &diag_class_dev); 82 ipath_cdev_cleanup(&dd->diag_cdev, &dd->diag_class_dev);
81} 83}
82 84
83/** 85/**
@@ -101,8 +103,7 @@ static int ipath_read_umem64(struct ipath_devdata *dd, void __user *uaddr,
101 int ret; 103 int ret;
102 104
103 /* not very efficient, but it works for now */ 105 /* not very efficient, but it works for now */
104 if (reg_addr < dd->ipath_kregbase || 106 if (reg_addr < dd->ipath_kregbase || reg_end > dd->ipath_kregend) {
105 reg_end > dd->ipath_kregend) {
106 ret = -EINVAL; 107 ret = -EINVAL;
107 goto bail; 108 goto bail;
108 } 109 }
@@ -113,7 +114,7 @@ static int ipath_read_umem64(struct ipath_devdata *dd, void __user *uaddr,
113 goto bail; 114 goto bail;
114 } 115 }
115 reg_addr++; 116 reg_addr++;
116 uaddr++; 117 uaddr += sizeof(u64);
117 } 118 }
118 ret = 0; 119 ret = 0;
119bail: 120bail:
@@ -139,8 +140,7 @@ static int ipath_write_umem64(struct ipath_devdata *dd, void __iomem *caddr,
139 int ret; 140 int ret;
140 141
141 /* not very efficient, but it works for now */ 142 /* not very efficient, but it works for now */
142 if (reg_addr < dd->ipath_kregbase || 143 if (reg_addr < dd->ipath_kregbase || reg_end > dd->ipath_kregend) {
143 reg_end > dd->ipath_kregend) {
144 ret = -EINVAL; 144 ret = -EINVAL;
145 goto bail; 145 goto bail;
146 } 146 }
@@ -153,7 +153,7 @@ static int ipath_write_umem64(struct ipath_devdata *dd, void __iomem *caddr,
153 writeq(data, reg_addr); 153 writeq(data, reg_addr);
154 154
155 reg_addr++; 155 reg_addr++;
156 uaddr++; 156 uaddr += sizeof(u64);
157 } 157 }
158 ret = 0; 158 ret = 0;
159bail: 159bail:
@@ -191,7 +191,8 @@ static int ipath_read_umem32(struct ipath_devdata *dd, void __user *uaddr,
191 } 191 }
192 192
193 reg_addr++; 193 reg_addr++;
194 uaddr++; 194 uaddr += sizeof(u32);
195
195 } 196 }
196 ret = 0; 197 ret = 0;
197bail: 198bail:
@@ -230,7 +231,7 @@ static int ipath_write_umem32(struct ipath_devdata *dd, void __iomem *caddr,
230 writel(data, reg_addr); 231 writel(data, reg_addr);
231 232
232 reg_addr++; 233 reg_addr++;
233 uaddr++; 234 uaddr += sizeof(u32);
234 } 235 }
235 ret = 0; 236 ret = 0;
236bail: 237bail:
@@ -239,59 +240,45 @@ bail:
239 240
240static int ipath_diag_open(struct inode *in, struct file *fp) 241static int ipath_diag_open(struct inode *in, struct file *fp)
241{ 242{
243 int unit = iminor(in) - IPATH_DIAG_MINOR_BASE;
242 struct ipath_devdata *dd; 244 struct ipath_devdata *dd;
243 int unit = 0; /* XXX this is bogus */
244 unsigned long flags;
245 int ret; 245 int ret;
246 246
247 dd = ipath_lookup(unit);
248
249 mutex_lock(&ipath_mutex); 247 mutex_lock(&ipath_mutex);
250 spin_lock_irqsave(&ipath_devs_lock, flags);
251 248
252 if (ipath_diag_inuse) { 249 if (ipath_diag_inuse) {
253 ret = -EBUSY; 250 ret = -EBUSY;
254 goto bail; 251 goto bail;
255 } 252 }
256 253
257 list_for_each_entry(dd, &ipath_dev_list, ipath_list) { 254 dd = ipath_lookup(unit);
258 /* 255
259 * we need at least one infinipath device to be present 256 if (dd == NULL || !(dd->ipath_flags & IPATH_PRESENT) ||
260 * (don't use INITTED, because we want to be able to open 257 !dd->ipath_kregbase) {
261 * even if device is in freeze mode, which cleared INITTED). 258 ret = -ENODEV;
262 * There is a small amount of risk to this, which is why we
263 * also verify kregbase is set.
264 */
265
266 if (!(dd->ipath_flags & IPATH_PRESENT) ||
267 !dd->ipath_kregbase)
268 continue;
269
270 ipath_diag_inuse = 1;
271 diag_set_link = 0;
272 ret = 0;
273 goto bail; 259 goto bail;
274 } 260 }
275 261
276 ret = -ENODEV; 262 fp->private_data = dd;
277 263 ipath_diag_inuse = 1;
278bail: 264 diag_set_link = 0;
279 spin_unlock_irqrestore(&ipath_devs_lock, flags); 265 ret = 0;
280 266
281 /* Only expose a way to reset the device if we 267 /* Only expose a way to reset the device if we
282 make it into diag mode. */ 268 make it into diag mode. */
283 if (ret == 0) 269 ipath_expose_reset(&dd->pcidev->dev);
284 ipath_expose_reset(&dd->pcidev->dev);
285 270
271bail:
286 mutex_unlock(&ipath_mutex); 272 mutex_unlock(&ipath_mutex);
287 273
288 return ret; 274 return ret;
289} 275}
290 276
291static int ipath_diag_release(struct inode *i, struct file *f) 277static int ipath_diag_release(struct inode *in, struct file *fp)
292{ 278{
293 mutex_lock(&ipath_mutex); 279 mutex_lock(&ipath_mutex);
294 ipath_diag_inuse = 0; 280 ipath_diag_inuse = 0;
281 fp->private_data = NULL;
295 mutex_unlock(&ipath_mutex); 282 mutex_unlock(&ipath_mutex);
296 return 0; 283 return 0;
297} 284}
@@ -299,17 +286,10 @@ static int ipath_diag_release(struct inode *i, struct file *f)
299static ssize_t ipath_diag_read(struct file *fp, char __user *data, 286static ssize_t ipath_diag_read(struct file *fp, char __user *data,
300 size_t count, loff_t *off) 287 size_t count, loff_t *off)
301{ 288{
302 int unit = 0; /* XXX provide for reads on other units some day */ 289 struct ipath_devdata *dd = fp->private_data;
303 struct ipath_devdata *dd;
304 void __iomem *kreg_base; 290 void __iomem *kreg_base;
305 ssize_t ret; 291 ssize_t ret;
306 292
307 dd = ipath_lookup(unit);
308 if (!dd) {
309 ret = -ENODEV;
310 goto bail;
311 }
312
313 kreg_base = dd->ipath_kregbase; 293 kreg_base = dd->ipath_kregbase;
314 294
315 if (count == 0) 295 if (count == 0)
@@ -328,23 +308,16 @@ static ssize_t ipath_diag_read(struct file *fp, char __user *data,
328 ret = count; 308 ret = count;
329 } 309 }
330 310
331bail:
332 return ret; 311 return ret;
333} 312}
334 313
335static ssize_t ipath_diag_write(struct file *fp, const char __user *data, 314static ssize_t ipath_diag_write(struct file *fp, const char __user *data,
336 size_t count, loff_t *off) 315 size_t count, loff_t *off)
337{ 316{
338 int unit = 0; /* XXX this is bogus */ 317 struct ipath_devdata *dd = fp->private_data;
339 struct ipath_devdata *dd;
340 void __iomem *kreg_base; 318 void __iomem *kreg_base;
341 ssize_t ret; 319 ssize_t ret;
342 320
343 dd = ipath_lookup(unit);
344 if (!dd) {
345 ret = -ENODEV;
346 goto bail;
347 }
348 kreg_base = dd->ipath_kregbase; 321 kreg_base = dd->ipath_kregbase;
349 322
350 if (count == 0) 323 if (count == 0)
@@ -363,6 +336,5 @@ static ssize_t ipath_diag_write(struct file *fp, const char __user *data,
363 ret = count; 336 ret = count;
364 } 337 }
365 338
366bail:
367 return ret; 339 return ret;
368} 340}
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c
index e4b897fa569..823131d58b3 100644
--- a/drivers/infiniband/hw/ipath/ipath_driver.c
+++ b/drivers/infiniband/hw/ipath/ipath_driver.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -38,8 +39,8 @@
38#include <linux/vmalloc.h> 39#include <linux/vmalloc.h>
39 40
40#include "ipath_kernel.h" 41#include "ipath_kernel.h"
41#include "ips_common.h"
42#include "ipath_layer.h" 42#include "ipath_layer.h"
43#include "ipath_common.h"
43 44
44static void ipath_update_pio_bufs(struct ipath_devdata *); 45static void ipath_update_pio_bufs(struct ipath_devdata *);
45 46
@@ -52,7 +53,7 @@ const char *ipath_get_unit_name(int unit)
52 53
53EXPORT_SYMBOL_GPL(ipath_get_unit_name); 54EXPORT_SYMBOL_GPL(ipath_get_unit_name);
54 55
55#define DRIVER_LOAD_MSG "PathScale " IPATH_DRV_NAME " loaded: " 56#define DRIVER_LOAD_MSG "QLogic " IPATH_DRV_NAME " loaded: "
56#define PFX IPATH_DRV_NAME ": " 57#define PFX IPATH_DRV_NAME ": "
57 58
58/* 59/*
@@ -74,8 +75,8 @@ MODULE_PARM_DESC(debug, "mask for debug prints");
74EXPORT_SYMBOL_GPL(ipath_debug); 75EXPORT_SYMBOL_GPL(ipath_debug);
75 76
76MODULE_LICENSE("GPL"); 77MODULE_LICENSE("GPL");
77MODULE_AUTHOR("PathScale <support@pathscale.com>"); 78MODULE_AUTHOR("QLogic <support@pathscale.com>");
78MODULE_DESCRIPTION("Pathscale InfiniPath driver"); 79MODULE_DESCRIPTION("QLogic InfiniPath driver");
79 80
80const char *ipath_ibcstatus_str[] = { 81const char *ipath_ibcstatus_str[] = {
81 "Disabled", 82 "Disabled",
@@ -130,14 +131,6 @@ static struct pci_driver ipath_driver = {
130 .id_table = ipath_pci_tbl, 131 .id_table = ipath_pci_tbl,
131}; 132};
132 133
133/*
134 * This is where port 0's rcvhdrtail register is written back; we also
135 * want nothing else sharing the cache line, so make it a cache line
136 * in size. Used for all units.
137 */
138volatile __le64 *ipath_port0_rcvhdrtail;
139dma_addr_t ipath_port0_rcvhdrtail_dma;
140static int port0_rcvhdrtail_refs;
141 134
142static inline void read_bars(struct ipath_devdata *dd, struct pci_dev *dev, 135static inline void read_bars(struct ipath_devdata *dd, struct pci_dev *dev,
143 u32 *bar0, u32 *bar1) 136 u32 *bar0, u32 *bar1)
@@ -170,14 +163,13 @@ static void ipath_free_devdata(struct pci_dev *pdev,
170 list_del(&dd->ipath_list); 163 list_del(&dd->ipath_list);
171 spin_unlock_irqrestore(&ipath_devs_lock, flags); 164 spin_unlock_irqrestore(&ipath_devs_lock, flags);
172 } 165 }
173 dma_free_coherent(&pdev->dev, sizeof(*dd), dd, dd->ipath_dma_addr); 166 vfree(dd);
174} 167}
175 168
176static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev) 169static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev)
177{ 170{
178 unsigned long flags; 171 unsigned long flags;
179 struct ipath_devdata *dd; 172 struct ipath_devdata *dd;
180 dma_addr_t dma_addr;
181 int ret; 173 int ret;
182 174
183 if (!idr_pre_get(&unit_table, GFP_KERNEL)) { 175 if (!idr_pre_get(&unit_table, GFP_KERNEL)) {
@@ -185,15 +177,12 @@ static struct ipath_devdata *ipath_alloc_devdata(struct pci_dev *pdev)
185 goto bail; 177 goto bail;
186 } 178 }
187 179
188 dd = dma_alloc_coherent(&pdev->dev, sizeof(*dd), &dma_addr, 180 dd = vmalloc(sizeof(*dd));
189 GFP_KERNEL);
190
191 if (!dd) { 181 if (!dd) {
192 dd = ERR_PTR(-ENOMEM); 182 dd = ERR_PTR(-ENOMEM);
193 goto bail; 183 goto bail;
194 } 184 }
195 185 memset(dd, 0, sizeof(*dd));
196 dd->ipath_dma_addr = dma_addr;
197 dd->ipath_unit = -1; 186 dd->ipath_unit = -1;
198 187
199 spin_lock_irqsave(&ipath_devs_lock, flags); 188 spin_lock_irqsave(&ipath_devs_lock, flags);
@@ -271,47 +260,6 @@ int ipath_count_units(int *npresentp, int *nupp, u32 *maxportsp)
271 return nunits; 260 return nunits;
272} 261}
273 262
274static int init_port0_rcvhdrtail(struct pci_dev *pdev)
275{
276 int ret;
277
278 mutex_lock(&ipath_mutex);
279
280 if (!ipath_port0_rcvhdrtail) {
281 ipath_port0_rcvhdrtail =
282 dma_alloc_coherent(&pdev->dev,
283 IPATH_PORT0_RCVHDRTAIL_SIZE,
284 &ipath_port0_rcvhdrtail_dma,
285 GFP_KERNEL);
286
287 if (!ipath_port0_rcvhdrtail) {
288 ret = -ENOMEM;
289 goto bail;
290 }
291 }
292 port0_rcvhdrtail_refs++;
293 ret = 0;
294
295bail:
296 mutex_unlock(&ipath_mutex);
297
298 return ret;
299}
300
301static void cleanup_port0_rcvhdrtail(struct pci_dev *pdev)
302{
303 mutex_lock(&ipath_mutex);
304
305 if (!--port0_rcvhdrtail_refs) {
306 dma_free_coherent(&pdev->dev, IPATH_PORT0_RCVHDRTAIL_SIZE,
307 (void *) ipath_port0_rcvhdrtail,
308 ipath_port0_rcvhdrtail_dma);
309 ipath_port0_rcvhdrtail = NULL;
310 }
311
312 mutex_unlock(&ipath_mutex);
313}
314
315/* 263/*
316 * These next two routines are placeholders in case we don't have per-arch 264 * These next two routines are placeholders in case we don't have per-arch
317 * code for controlling write combining. If explicit control of write 265 * code for controlling write combining. If explicit control of write
@@ -336,20 +284,12 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
336 u32 bar0 = 0, bar1 = 0; 284 u32 bar0 = 0, bar1 = 0;
337 u8 rev; 285 u8 rev;
338 286
339 ret = init_port0_rcvhdrtail(pdev);
340 if (ret < 0) {
341 printk(KERN_ERR IPATH_DRV_NAME
342 ": Could not allocate port0_rcvhdrtail: error %d\n",
343 -ret);
344 goto bail;
345 }
346
347 dd = ipath_alloc_devdata(pdev); 287 dd = ipath_alloc_devdata(pdev);
348 if (IS_ERR(dd)) { 288 if (IS_ERR(dd)) {
349 ret = PTR_ERR(dd); 289 ret = PTR_ERR(dd);
350 printk(KERN_ERR IPATH_DRV_NAME 290 printk(KERN_ERR IPATH_DRV_NAME
351 ": Could not allocate devdata: error %d\n", -ret); 291 ": Could not allocate devdata: error %d\n", -ret);
352 goto bail_rcvhdrtail; 292 goto bail;
353 } 293 }
354 294
355 ipath_cdbg(VERBOSE, "initializing unit #%u\n", dd->ipath_unit); 295 ipath_cdbg(VERBOSE, "initializing unit #%u\n", dd->ipath_unit);
@@ -424,12 +364,29 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
424 */ 364 */
425 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK); 365 ret = pci_set_dma_mask(pdev, DMA_32BIT_MASK);
426 if (ret) { 366 if (ret) {
427 dev_info(&pdev->dev, "pci_set_dma_mask unit %u " 367 dev_info(&pdev->dev,
428 "fails: %d\n", dd->ipath_unit, ret); 368 "Unable to set DMA mask for unit %u: %d\n",
369 dd->ipath_unit, ret);
429 goto bail_regions; 370 goto bail_regions;
430 } 371 }
431 else 372 else {
432 ipath_dbg("No 64bit DMA mask, used 32 bit mask\n"); 373 ipath_dbg("No 64bit DMA mask, used 32 bit mask\n");
374 ret = pci_set_consistent_dma_mask(pdev, DMA_32BIT_MASK);
375 if (ret)
376 dev_info(&pdev->dev,
377 "Unable to set DMA consistent mask "
378 "for unit %u: %d\n",
379 dd->ipath_unit, ret);
380
381 }
382 }
383 else {
384 ret = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
385 if (ret)
386 dev_info(&pdev->dev,
387 "Unable to set DMA consistent mask "
388 "for unit %u: %d\n",
389 dd->ipath_unit, ret);
433 } 390 }
434 391
435 pci_set_master(pdev); 392 pci_set_master(pdev);
@@ -452,7 +409,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
452 ipath_init_pe800_funcs(dd); 409 ipath_init_pe800_funcs(dd);
453 break; 410 break;
454 default: 411 default:
455 ipath_dev_err(dd, "Found unknown PathScale deviceid 0x%x, " 412 ipath_dev_err(dd, "Found unknown QLogic deviceid 0x%x, "
456 "failing\n", ent->device); 413 "failing\n", ent->device);
457 return -ENODEV; 414 return -ENODEV;
458 } 415 }
@@ -495,23 +452,23 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
495 ((void __iomem *)dd->ipath_kregbase + len); 452 ((void __iomem *)dd->ipath_kregbase + len);
496 dd->ipath_physaddr = addr; /* used for io_remap, etc. */ 453 dd->ipath_physaddr = addr; /* used for io_remap, etc. */
497 /* for user mmap */ 454 /* for user mmap */
498 dd->ipath_kregvirt = (u64 __iomem *) phys_to_virt(addr); 455 ipath_cdbg(VERBOSE, "mapped io addr %llx to kregbase %p\n",
499 ipath_cdbg(VERBOSE, "mapped io addr %llx to kregbase %p " 456 addr, dd->ipath_kregbase);
500 "kregvirt %p\n", addr, dd->ipath_kregbase,
501 dd->ipath_kregvirt);
502 457
503 /* 458 /*
504 * clear ipath_flags here instead of in ipath_init_chip as it is set 459 * clear ipath_flags here instead of in ipath_init_chip as it is set
505 * by ipath_setup_htconfig. 460 * by ipath_setup_htconfig.
506 */ 461 */
507 dd->ipath_flags = 0; 462 dd->ipath_flags = 0;
463 dd->ipath_lli_counter = 0;
464 dd->ipath_lli_errors = 0;
508 465
509 if (dd->ipath_f_bus(dd, pdev)) 466 if (dd->ipath_f_bus(dd, pdev))
510 ipath_dev_err(dd, "Failed to setup config space; " 467 ipath_dev_err(dd, "Failed to setup config space; "
511 "continuing anyway\n"); 468 "continuing anyway\n");
512 469
513 /* 470 /*
514 * set up our interrupt handler; SA_SHIRQ probably not needed, 471 * set up our interrupt handler; IRQF_SHARED probably not needed,
515 * since MSI interrupts shouldn't be shared but won't hurt for now. 472 * since MSI interrupts shouldn't be shared but won't hurt for now.
516 * check 0 irq after we return from chip-specific bus setup, since 473 * check 0 irq after we return from chip-specific bus setup, since
517 * that can affect this due to setup 474 * that can affect this due to setup
@@ -520,7 +477,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
520 ipath_dev_err(dd, "irq is 0, BIOS error? Interrupts won't " 477 ipath_dev_err(dd, "irq is 0, BIOS error? Interrupts won't "
521 "work\n"); 478 "work\n");
522 else { 479 else {
523 ret = request_irq(pdev->irq, ipath_intr, SA_SHIRQ, 480 ret = request_irq(pdev->irq, ipath_intr, IRQF_SHARED,
524 IPATH_DRV_NAME, dd); 481 IPATH_DRV_NAME, dd);
525 if (ret) { 482 if (ret) {
526 ipath_dev_err(dd, "Couldn't setup irq handler, " 483 ipath_dev_err(dd, "Couldn't setup irq handler, "
@@ -545,6 +502,7 @@ static int __devinit ipath_init_one(struct pci_dev *pdev,
545 ipath_device_create_group(&pdev->dev, dd); 502 ipath_device_create_group(&pdev->dev, dd);
546 ipathfs_add_device(dd); 503 ipathfs_add_device(dd);
547 ipath_user_add(dd); 504 ipath_user_add(dd);
505 ipath_diag_add(dd);
548 ipath_layer_add(dd); 506 ipath_layer_add(dd);
549 507
550 goto bail; 508 goto bail;
@@ -561,9 +519,6 @@ bail_disable:
561bail_devdata: 519bail_devdata:
562 ipath_free_devdata(pdev, dd); 520 ipath_free_devdata(pdev, dd);
563 521
564bail_rcvhdrtail:
565 cleanup_port0_rcvhdrtail(pdev);
566
567bail: 522bail:
568 return ret; 523 return ret;
569} 524}
@@ -577,8 +532,9 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev)
577 return; 532 return;
578 533
579 dd = pci_get_drvdata(pdev); 534 dd = pci_get_drvdata(pdev);
580 ipath_layer_del(dd); 535 ipath_layer_remove(dd);
581 ipath_user_del(dd); 536 ipath_diag_remove(dd);
537 ipath_user_remove(dd);
582 ipathfs_remove_device(dd); 538 ipathfs_remove_device(dd);
583 ipath_device_remove_group(&pdev->dev, dd); 539 ipath_device_remove_group(&pdev->dev, dd);
584 ipath_cdbg(VERBOSE, "Releasing pci memory regions, dd %p, " 540 ipath_cdbg(VERBOSE, "Releasing pci memory regions, dd %p, "
@@ -594,7 +550,6 @@ static void __devexit ipath_remove_one(struct pci_dev *pdev)
594 pci_disable_device(pdev); 550 pci_disable_device(pdev);
595 551
596 ipath_free_devdata(pdev, dd); 552 ipath_free_devdata(pdev, dd);
597 cleanup_port0_rcvhdrtail(pdev);
598} 553}
599 554
600/* general driver use */ 555/* general driver use */
@@ -868,7 +823,8 @@ static void ipath_rcv_layer(struct ipath_devdata *dd, u32 etail,
868 u8 pad, *bthbytes; 823 u8 pad, *bthbytes;
869 struct sk_buff *skb, *nskb; 824 struct sk_buff *skb, *nskb;
870 825
871 if (dd->ipath_port0_skbs && hdr->sub_opcode == OPCODE_ENCAP) { 826 if (dd->ipath_port0_skbs &&
827 hdr->sub_opcode == IPATH_ITH4X_OPCODE_ENCAP) {
872 /* 828 /*
873 * Allocate a new sk_buff to replace the one we give 829 * Allocate a new sk_buff to replace the one we give
874 * to the network stack. 830 * to the network stack.
@@ -899,7 +855,7 @@ static void ipath_rcv_layer(struct ipath_devdata *dd, u32 etail,
899 /* another ether packet received */ 855 /* another ether packet received */
900 ipath_stats.sps_ether_rpkts++; 856 ipath_stats.sps_ether_rpkts++;
901 } 857 }
902 else if (hdr->sub_opcode == OPCODE_LID_ARP) 858 else if (hdr->sub_opcode == IPATH_ITH4X_OPCODE_LID_ARP)
903 __ipath_layer_rcv_lid(dd, hdr); 859 __ipath_layer_rcv_lid(dd, hdr);
904} 860}
905 861
@@ -916,8 +872,8 @@ void ipath_kreceive(struct ipath_devdata *dd)
916 const u32 rsize = dd->ipath_rcvhdrentsize; /* words */ 872 const u32 rsize = dd->ipath_rcvhdrentsize; /* words */
917 const u32 maxcnt = dd->ipath_rcvhdrcnt * rsize; /* words */ 873 const u32 maxcnt = dd->ipath_rcvhdrcnt * rsize; /* words */
918 u32 etail = -1, l, hdrqtail; 874 u32 etail = -1, l, hdrqtail;
919 struct ips_message_header *hdr; 875 struct ipath_message_header *hdr;
920 u32 eflags, i, etype, tlen, pkttot = 0; 876 u32 eflags, i, etype, tlen, pkttot = 0, updegr=0, reloop=0;
921 static u64 totcalls; /* stats, may eventually remove */ 877 static u64 totcalls; /* stats, may eventually remove */
922 char emsg[128]; 878 char emsg[128];
923 879
@@ -931,24 +887,18 @@ void ipath_kreceive(struct ipath_devdata *dd)
931 if (test_and_set_bit(0, &dd->ipath_rcv_pending)) 887 if (test_and_set_bit(0, &dd->ipath_rcv_pending))
932 goto bail; 888 goto bail;
933 889
934 if (dd->ipath_port0head == 890 l = dd->ipath_port0head;
935 (u32)le64_to_cpu(*dd->ipath_hdrqtailptr)) 891 hdrqtail = (u32) le64_to_cpu(*dd->ipath_hdrqtailptr);
892 if (l == hdrqtail)
936 goto done; 893 goto done;
937 894
938gotmore: 895reloop:
939 /* 896 for (i = 0; l != hdrqtail; i++) {
940 * read only once at start. If in flood situation, this helps
941 * performance slightly. If more arrive while we are processing,
942 * we'll come back here and do them
943 */
944 hdrqtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr);
945
946 for (i = 0, l = dd->ipath_port0head; l != hdrqtail; i++) {
947 u32 qp; 897 u32 qp;
948 u8 *bthbytes; 898 u8 *bthbytes;
949 899
950 rc = (u64 *) (dd->ipath_pd[0]->port_rcvhdrq + (l << 2)); 900 rc = (u64 *) (dd->ipath_pd[0]->port_rcvhdrq + (l << 2));
951 hdr = (struct ips_message_header *)&rc[1]; 901 hdr = (struct ipath_message_header *)&rc[1];
952 /* 902 /*
953 * could make a network order version of IPATH_KD_QP, and 903 * could make a network order version of IPATH_KD_QP, and
954 * do the obvious shift before masking to speed this up. 904 * do the obvious shift before masking to speed this up.
@@ -956,10 +906,10 @@ gotmore:
956 qp = ntohl(hdr->bth[1]) & 0xffffff; 906 qp = ntohl(hdr->bth[1]) & 0xffffff;
957 bthbytes = (u8 *) hdr->bth; 907 bthbytes = (u8 *) hdr->bth;
958 908
959 eflags = ips_get_hdr_err_flags((__le32 *) rc); 909 eflags = ipath_hdrget_err_flags((__le32 *) rc);
960 etype = ips_get_rcv_type((__le32 *) rc); 910 etype = ipath_hdrget_rcv_type((__le32 *) rc);
961 /* total length */ 911 /* total length */
962 tlen = ips_get_length_in_bytes((__le32 *) rc); 912 tlen = ipath_hdrget_length_in_bytes((__le32 *) rc);
963 ebuf = NULL; 913 ebuf = NULL;
964 if (etype != RCVHQ_RCV_TYPE_EXPECTED) { 914 if (etype != RCVHQ_RCV_TYPE_EXPECTED) {
965 /* 915 /*
@@ -969,7 +919,7 @@ gotmore:
969 * set ebuf (so we try to copy data) unless the 919 * set ebuf (so we try to copy data) unless the
970 * length requires it. 920 * length requires it.
971 */ 921 */
972 etail = ips_get_index((__le32 *) rc); 922 etail = ipath_hdrget_index((__le32 *) rc);
973 if (tlen > sizeof(*hdr) || 923 if (tlen > sizeof(*hdr) ||
974 etype == RCVHQ_RCV_TYPE_NON_KD) 924 etype == RCVHQ_RCV_TYPE_NON_KD)
975 ebuf = ipath_get_egrbuf(dd, etail, 0); 925 ebuf = ipath_get_egrbuf(dd, etail, 0);
@@ -981,7 +931,7 @@ gotmore:
981 */ 931 */
982 932
983 if (etype != RCVHQ_RCV_TYPE_NON_KD && etype != 933 if (etype != RCVHQ_RCV_TYPE_NON_KD && etype !=
984 RCVHQ_RCV_TYPE_ERROR && ips_get_ipath_ver( 934 RCVHQ_RCV_TYPE_ERROR && ipath_hdrget_ipath_ver(
985 hdr->iph.ver_port_tid_offset) != 935 hdr->iph.ver_port_tid_offset) !=
986 IPS_PROTO_VERSION) { 936 IPS_PROTO_VERSION) {
987 ipath_cdbg(PKT, "Bad InfiniPath protocol version " 937 ipath_cdbg(PKT, "Bad InfiniPath protocol version "
@@ -994,7 +944,19 @@ gotmore:
994 ipath_cdbg(PKT, "RHFerrs %x hdrqtail=%x typ=%u " 944 ipath_cdbg(PKT, "RHFerrs %x hdrqtail=%x typ=%u "
995 "tlen=%x opcode=%x egridx=%x: %s\n", 945 "tlen=%x opcode=%x egridx=%x: %s\n",
996 eflags, l, etype, tlen, bthbytes[0], 946 eflags, l, etype, tlen, bthbytes[0],
997 ips_get_index((__le32 *) rc), emsg); 947 ipath_hdrget_index((__le32 *) rc), emsg);
948 /* Count local link integrity errors. */
949 if (eflags & (INFINIPATH_RHF_H_ICRCERR |
950 INFINIPATH_RHF_H_VCRCERR)) {
951 u8 n = (dd->ipath_ibcctrl >>
952 INFINIPATH_IBCC_PHYERRTHRESHOLD_SHIFT) &
953 INFINIPATH_IBCC_PHYERRTHRESHOLD_MASK;
954
955 if (++dd->ipath_lli_counter > n) {
956 dd->ipath_lli_counter = 0;
957 dd->ipath_lli_errors++;
958 }
959 }
998 } else if (etype == RCVHQ_RCV_TYPE_NON_KD) { 960 } else if (etype == RCVHQ_RCV_TYPE_NON_KD) {
999 int ret = __ipath_verbs_rcv(dd, rc + 1, 961 int ret = __ipath_verbs_rcv(dd, rc + 1,
1000 ebuf, tlen); 962 ebuf, tlen);
@@ -1002,6 +964,9 @@ gotmore:
1002 ipath_cdbg(VERBOSE, 964 ipath_cdbg(VERBOSE,
1003 "received IB packet, " 965 "received IB packet, "
1004 "not SMA (QP=%x)\n", qp); 966 "not SMA (QP=%x)\n", qp);
967 if (dd->ipath_lli_counter)
968 dd->ipath_lli_counter--;
969
1005 } else if (etype == RCVHQ_RCV_TYPE_EAGER) { 970 } else if (etype == RCVHQ_RCV_TYPE_EAGER) {
1006 if (qp == IPATH_KD_QP && 971 if (qp == IPATH_KD_QP &&
1007 bthbytes[0] == ipath_layer_rcv_opcode && 972 bthbytes[0] == ipath_layer_rcv_opcode &&
@@ -1054,25 +1019,49 @@ gotmore:
1054 l += rsize; 1019 l += rsize;
1055 if (l >= maxcnt) 1020 if (l >= maxcnt)
1056 l = 0; 1021 l = 0;
1022 if (etype != RCVHQ_RCV_TYPE_EXPECTED)
1023 updegr = 1;
1057 /* 1024 /*
1058 * update for each packet, to help prevent overflows if we 1025 * update head regs on last packet, and every 16 packets.
1059 * have lots of packets. 1026 * Reduce bus traffic, while still trying to prevent
1027 * rcvhdrq overflows, for when the queue is nearly full
1060 */ 1028 */
1061 (void)ipath_write_ureg(dd, ur_rcvhdrhead, 1029 if (l == hdrqtail || (i && !(i&0xf))) {
1062 dd->ipath_rhdrhead_intr_off | l, 0); 1030 u64 lval;
1063 if (etype != RCVHQ_RCV_TYPE_EXPECTED) 1031 if (l == hdrqtail) /* PE-800 interrupt only on last */
1064 (void)ipath_write_ureg(dd, ur_rcvegrindexhead, 1032 lval = dd->ipath_rhdrhead_intr_off | l;
1065 etail, 0); 1033 else
1034 lval = l;
1035 (void)ipath_write_ureg(dd, ur_rcvhdrhead, lval, 0);
1036 if (updegr) {
1037 (void)ipath_write_ureg(dd, ur_rcvegrindexhead,
1038 etail, 0);
1039 updegr = 0;
1040 }
1041 }
1042 }
1043
1044 if (!dd->ipath_rhdrhead_intr_off && !reloop) {
1045 /* HT-400 workaround; we can have a race clearing chip
1046 * interrupt with another interrupt about to be delivered,
1047 * and can clear it before it is delivered on the GPIO
1048 * workaround. By doing the extra check here for the
1049 * in-memory tail register updating while we were doing
1050 * earlier packets, we "almost" guarantee we have covered
1051 * that case.
1052 */
1053 u32 hqtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr);
1054 if (hqtail != hdrqtail) {
1055 hdrqtail = hqtail;
1056 reloop = 1; /* loop 1 extra time at most */
1057 goto reloop;
1058 }
1066 } 1059 }
1067 1060
1068 pkttot += i; 1061 pkttot += i;
1069 1062
1070 dd->ipath_port0head = l; 1063 dd->ipath_port0head = l;
1071 1064
1072 if (hdrqtail != (u32)le64_to_cpu(*dd->ipath_hdrqtailptr))
1073 /* more arrived while we handled first batch */
1074 goto gotmore;
1075
1076 if (pkttot > ipath_stats.sps_maxpkts_call) 1065 if (pkttot > ipath_stats.sps_maxpkts_call)
1077 ipath_stats.sps_maxpkts_call = pkttot; 1066 ipath_stats.sps_maxpkts_call = pkttot;
1078 ipath_stats.sps_port0pkts += pkttot; 1067 ipath_stats.sps_port0pkts += pkttot;
@@ -1369,26 +1358,20 @@ bail:
1369 * @dd: the infinipath device 1358 * @dd: the infinipath device
1370 * @pd: the port data 1359 * @pd: the port data
1371 * 1360 *
1372 * this *must* be physically contiguous memory, and for now, 1361 * this must be contiguous memory (from an i/o perspective), and must be
1373 * that limits it to what kmalloc can do. 1362 * DMA'able (which means for some systems, it will go through an IOMMU,
1363 * or be forced into a low address range).
1374 */ 1364 */
1375int ipath_create_rcvhdrq(struct ipath_devdata *dd, 1365int ipath_create_rcvhdrq(struct ipath_devdata *dd,
1376 struct ipath_portdata *pd) 1366 struct ipath_portdata *pd)
1377{ 1367{
1378 int ret = 0, amt; 1368 int ret = 0;
1379 1369
1380 amt = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize *
1381 sizeof(u32), PAGE_SIZE);
1382 if (!pd->port_rcvhdrq) { 1370 if (!pd->port_rcvhdrq) {
1383 /* 1371 dma_addr_t phys_hdrqtail;
1384 * not using REPEAT isn't viable; at 128KB, we can easily
1385 * fail this. The problem with REPEAT is we can block here
1386 * "forever". There isn't an inbetween, unfortunately. We
1387 * could reduce the risk by never freeing the rcvhdrq except
1388 * at unload, but even then, the first time a port is used,
1389 * we could delay for some time...
1390 */
1391 gfp_t gfp_flags = GFP_USER | __GFP_COMP; 1372 gfp_t gfp_flags = GFP_USER | __GFP_COMP;
1373 int amt = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize *
1374 sizeof(u32), PAGE_SIZE);
1392 1375
1393 pd->port_rcvhdrq = dma_alloc_coherent( 1376 pd->port_rcvhdrq = dma_alloc_coherent(
1394 &dd->pcidev->dev, amt, &pd->port_rcvhdrq_phys, 1377 &dd->pcidev->dev, amt, &pd->port_rcvhdrq_phys,
@@ -1401,6 +1384,16 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd,
1401 ret = -ENOMEM; 1384 ret = -ENOMEM;
1402 goto bail; 1385 goto bail;
1403 } 1386 }
1387 pd->port_rcvhdrtail_kvaddr = dma_alloc_coherent(
1388 &dd->pcidev->dev, PAGE_SIZE, &phys_hdrqtail, GFP_KERNEL);
1389 if (!pd->port_rcvhdrtail_kvaddr) {
1390 ipath_dev_err(dd, "attempt to allocate 1 page "
1391 "for port %u rcvhdrqtailaddr failed\n",
1392 pd->port_port);
1393 ret = -ENOMEM;
1394 goto bail;
1395 }
1396 pd->port_rcvhdrqtailaddr_phys = phys_hdrqtail;
1404 1397
1405 pd->port_rcvhdrq_size = amt; 1398 pd->port_rcvhdrq_size = amt;
1406 1399
@@ -1410,20 +1403,28 @@ int ipath_create_rcvhdrq(struct ipath_devdata *dd,
1410 (unsigned long) pd->port_rcvhdrq_phys, 1403 (unsigned long) pd->port_rcvhdrq_phys,
1411 (unsigned long) pd->port_rcvhdrq_size, 1404 (unsigned long) pd->port_rcvhdrq_size,
1412 pd->port_port); 1405 pd->port_port);
1413 } else { 1406
1414 /* 1407 ipath_cdbg(VERBOSE, "port %d hdrtailaddr, %llx physical\n",
1415 * clear for security, sanity, and/or debugging, each 1408 pd->port_port,
1416 * time we reuse 1409 (unsigned long long) phys_hdrqtail);
1417 */
1418 memset(pd->port_rcvhdrq, 0, amt);
1419 } 1410 }
1411 else
1412 ipath_cdbg(VERBOSE, "reuse port %d rcvhdrq @%p %llx phys; "
1413 "hdrtailaddr@%p %llx physical\n",
1414 pd->port_port, pd->port_rcvhdrq,
1415 pd->port_rcvhdrq_phys, pd->port_rcvhdrtail_kvaddr,
1416 (unsigned long long)pd->port_rcvhdrqtailaddr_phys);
1417
1418 /* clear for security and sanity on each use */
1419 memset(pd->port_rcvhdrq, 0, pd->port_rcvhdrq_size);
1420 memset((void *)pd->port_rcvhdrtail_kvaddr, 0, PAGE_SIZE);
1420 1421
1421 /* 1422 /*
1422 * tell chip each time we init it, even if we are re-using previous 1423 * tell chip each time we init it, even if we are re-using previous
1423 * memory (we zero it at process close) 1424 * memory (we zero the register at process close)
1424 */ 1425 */
1425 ipath_cdbg(VERBOSE, "writing port %d rcvhdraddr as %lx\n", 1426 ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr,
1426 pd->port_port, (unsigned long) pd->port_rcvhdrq_phys); 1427 pd->port_port, pd->port_rcvhdrqtailaddr_phys);
1427 ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr, 1428 ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr,
1428 pd->port_port, pd->port_rcvhdrq_phys); 1429 pd->port_port, pd->port_rcvhdrq_phys);
1429 1430
@@ -1511,15 +1512,27 @@ void ipath_set_ib_lstate(struct ipath_devdata *dd, int which)
1511 [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED", 1512 [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED",
1512 [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE" 1513 [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE"
1513 }; 1514 };
1515 int linkcmd = (which >> INFINIPATH_IBCC_LINKCMD_SHIFT) &
1516 INFINIPATH_IBCC_LINKCMD_MASK;
1517
1514 ipath_cdbg(SMA, "Trying to move unit %u to %s, current ltstate " 1518 ipath_cdbg(SMA, "Trying to move unit %u to %s, current ltstate "
1515 "is %s\n", dd->ipath_unit, 1519 "is %s\n", dd->ipath_unit,
1516 what[(which >> INFINIPATH_IBCC_LINKCMD_SHIFT) & 1520 what[linkcmd],
1517 INFINIPATH_IBCC_LINKCMD_MASK],
1518 ipath_ibcstatus_str[ 1521 ipath_ibcstatus_str[
1519 (ipath_read_kreg64 1522 (ipath_read_kreg64
1520 (dd, dd->ipath_kregs->kr_ibcstatus) >> 1523 (dd, dd->ipath_kregs->kr_ibcstatus) >>
1521 INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) & 1524 INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) &
1522 INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]); 1525 INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]);
1526 /* flush all queued sends when going to DOWN or INIT, to be sure that
1527 * they don't block SMA and other MAD packets */
1528 if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) {
1529 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
1530 INFINIPATH_S_ABORT);
1531 ipath_disarm_piobufs(dd, dd->ipath_lastport_piobuf,
1532 (unsigned)(dd->ipath_piobcnt2k +
1533 dd->ipath_piobcnt4k) -
1534 dd->ipath_lastport_piobuf);
1535 }
1523 1536
1524 ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, 1537 ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl,
1525 dd->ipath_ibcctrl | which); 1538 dd->ipath_ibcctrl | which);
@@ -1638,7 +1651,7 @@ void ipath_shutdown_device(struct ipath_devdata *dd)
1638 /* disable IBC */ 1651 /* disable IBC */
1639 dd->ipath_control &= ~INFINIPATH_C_LINKENABLE; 1652 dd->ipath_control &= ~INFINIPATH_C_LINKENABLE;
1640 ipath_write_kreg(dd, dd->ipath_kregs->kr_control, 1653 ipath_write_kreg(dd, dd->ipath_kregs->kr_control,
1641 dd->ipath_control); 1654 dd->ipath_control | INFINIPATH_C_FREEZEMODE);
1642 1655
1643 /* 1656 /*
1644 * clear SerdesEnable and turn the leds off; do this here because 1657 * clear SerdesEnable and turn the leds off; do this here because
@@ -1667,60 +1680,54 @@ void ipath_shutdown_device(struct ipath_devdata *dd)
1667/** 1680/**
1668 * ipath_free_pddata - free a port's allocated data 1681 * ipath_free_pddata - free a port's allocated data
1669 * @dd: the infinipath device 1682 * @dd: the infinipath device
1670 * @port: the port 1683 * @pd: the portdata structure
1671 * @freehdrq: free the port data structure if true
1672 * 1684 *
1673 * when closing, free up any allocated data for a port, if the 1685 * free up any allocated data for a port
1674 * reference count goes to zero 1686 * This should not touch anything that would affect a simultaneous
1675 * Note: this also optionally frees the portdata itself! 1687 * re-allocation of port data, because it is called after ipath_mutex
1676 * Any changes here have to be matched up with the reinit case 1688 * is released (and can be called from reinit as well).
1677 * of ipath_init_chip(), which calls this routine on reinit after reset. 1689 * It should never change any chip state, or global driver state.
1690 * (The only exception to global state is freeing the port0 port0_skbs.)
1678 */ 1691 */
1679void ipath_free_pddata(struct ipath_devdata *dd, u32 port, int freehdrq) 1692void ipath_free_pddata(struct ipath_devdata *dd, struct ipath_portdata *pd)
1680{ 1693{
1681 struct ipath_portdata *pd = dd->ipath_pd[port];
1682
1683 if (!pd) 1694 if (!pd)
1684 return; 1695 return;
1685 if (freehdrq) 1696
1686 /* 1697 if (pd->port_rcvhdrq) {
1687 * only clear and free portdata if we are going to also
1688 * release the hdrq, otherwise we leak the hdrq on each
1689 * open/close cycle
1690 */
1691 dd->ipath_pd[port] = NULL;
1692 if (freehdrq && pd->port_rcvhdrq) {
1693 ipath_cdbg(VERBOSE, "free closed port %d rcvhdrq @ %p " 1698 ipath_cdbg(VERBOSE, "free closed port %d rcvhdrq @ %p "
1694 "(size=%lu)\n", pd->port_port, pd->port_rcvhdrq, 1699 "(size=%lu)\n", pd->port_port, pd->port_rcvhdrq,
1695 (unsigned long) pd->port_rcvhdrq_size); 1700 (unsigned long) pd->port_rcvhdrq_size);
1696 dma_free_coherent(&dd->pcidev->dev, pd->port_rcvhdrq_size, 1701 dma_free_coherent(&dd->pcidev->dev, pd->port_rcvhdrq_size,
1697 pd->port_rcvhdrq, pd->port_rcvhdrq_phys); 1702 pd->port_rcvhdrq, pd->port_rcvhdrq_phys);
1698 pd->port_rcvhdrq = NULL; 1703 pd->port_rcvhdrq = NULL;
1704 if (pd->port_rcvhdrtail_kvaddr) {
1705 dma_free_coherent(&dd->pcidev->dev, PAGE_SIZE,
1706 (void *)pd->port_rcvhdrtail_kvaddr,
1707 pd->port_rcvhdrqtailaddr_phys);
1708 pd->port_rcvhdrtail_kvaddr = NULL;
1709 }
1699 } 1710 }
1700 if (port && pd->port_rcvegrbuf) { 1711 if (pd->port_port && pd->port_rcvegrbuf) {
1701 /* always free this */ 1712 unsigned e;
1702 if (pd->port_rcvegrbuf) { 1713
1703 unsigned e; 1714 for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) {
1704 1715 void *base = pd->port_rcvegrbuf[e];
1705 for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { 1716 size_t size = pd->port_rcvegrbuf_size;
1706 void *base = pd->port_rcvegrbuf[e]; 1717
1707 size_t size = pd->port_rcvegrbuf_size; 1718 ipath_cdbg(VERBOSE, "egrbuf free(%p, %lu), "
1708 1719 "chunk %u/%u\n", base,
1709 ipath_cdbg(VERBOSE, "egrbuf free(%p, %lu), " 1720 (unsigned long) size,
1710 "chunk %u/%u\n", base, 1721 e, pd->port_rcvegrbuf_chunks);
1711 (unsigned long) size, 1722 dma_free_coherent(&dd->pcidev->dev, size,
1712 e, pd->port_rcvegrbuf_chunks); 1723 base, pd->port_rcvegrbuf_phys[e]);
1713 dma_free_coherent(
1714 &dd->pcidev->dev, size, base,
1715 pd->port_rcvegrbuf_phys[e]);
1716 }
1717 vfree(pd->port_rcvegrbuf);
1718 pd->port_rcvegrbuf = NULL;
1719 vfree(pd->port_rcvegrbuf_phys);
1720 pd->port_rcvegrbuf_phys = NULL;
1721 } 1724 }
1725 vfree(pd->port_rcvegrbuf);
1726 pd->port_rcvegrbuf = NULL;
1727 vfree(pd->port_rcvegrbuf_phys);
1728 pd->port_rcvegrbuf_phys = NULL;
1722 pd->port_rcvegrbuf_chunks = 0; 1729 pd->port_rcvegrbuf_chunks = 0;
1723 } else if (port == 0 && dd->ipath_port0_skbs) { 1730 } else if (pd->port_port == 0 && dd->ipath_port0_skbs) {
1724 unsigned e; 1731 unsigned e;
1725 struct sk_buff **skbs = dd->ipath_port0_skbs; 1732 struct sk_buff **skbs = dd->ipath_port0_skbs;
1726 1733
@@ -1732,10 +1739,8 @@ void ipath_free_pddata(struct ipath_devdata *dd, u32 port, int freehdrq)
1732 dev_kfree_skb(skbs[e]); 1739 dev_kfree_skb(skbs[e]);
1733 vfree(skbs); 1740 vfree(skbs);
1734 } 1741 }
1735 if (freehdrq) { 1742 kfree(pd->port_tid_pg_list);
1736 kfree(pd->port_tid_pg_list); 1743 kfree(pd);
1737 kfree(pd);
1738 }
1739} 1744}
1740 1745
1741static int __init infinipath_init(void) 1746static int __init infinipath_init(void)
@@ -1806,7 +1811,6 @@ static void cleanup_device(struct ipath_devdata *dd)
1806 * re-init 1811 * re-init
1807 */ 1812 */
1808 dd->ipath_kregbase = NULL; 1813 dd->ipath_kregbase = NULL;
1809 dd->ipath_kregvirt = NULL;
1810 dd->ipath_uregbase = 0; 1814 dd->ipath_uregbase = 0;
1811 dd->ipath_sregbase = 0; 1815 dd->ipath_sregbase = 0;
1812 dd->ipath_cregbase = 0; 1816 dd->ipath_cregbase = 0;
@@ -1821,6 +1825,12 @@ static void cleanup_device(struct ipath_devdata *dd)
1821 dd->ipath_pioavailregs_phys); 1825 dd->ipath_pioavailregs_phys);
1822 dd->ipath_pioavailregs_dma = NULL; 1826 dd->ipath_pioavailregs_dma = NULL;
1823 } 1827 }
1828 if (dd->ipath_dummy_hdrq) {
1829 dma_free_coherent(&dd->pcidev->dev,
1830 dd->ipath_pd[0]->port_rcvhdrq_size,
1831 dd->ipath_dummy_hdrq, dd->ipath_dummy_hdrq_phys);
1832 dd->ipath_dummy_hdrq = NULL;
1833 }
1824 1834
1825 if (dd->ipath_pageshadow) { 1835 if (dd->ipath_pageshadow) {
1826 struct page **tmpp = dd->ipath_pageshadow; 1836 struct page **tmpp = dd->ipath_pageshadow;
@@ -1861,10 +1871,14 @@ static void cleanup_device(struct ipath_devdata *dd)
1861 1871
1862 /* 1872 /*
1863 * free any resources still in use (usually just kernel ports) 1873 * free any resources still in use (usually just kernel ports)
1864 * at unload 1874 * at unload; we do for portcnt, not cfgports, because cfgports
1875 * could have changed while we were loaded.
1865 */ 1876 */
1866 for (port = 0; port < dd->ipath_cfgports; port++) 1877 for (port = 0; port < dd->ipath_portcnt; port++) {
1867 ipath_free_pddata(dd, port, 1); 1878 struct ipath_portdata *pd = dd->ipath_pd[port];
1879 dd->ipath_pd[port] = NULL;
1880 ipath_free_pddata(dd, pd);
1881 }
1868 kfree(dd->ipath_pd); 1882 kfree(dd->ipath_pd);
1869 /* 1883 /*
1870 * debuggability, in case some cleanup path tries to use it 1884 * debuggability, in case some cleanup path tries to use it
diff --git a/drivers/infiniband/hw/ipath/ipath_eeprom.c b/drivers/infiniband/hw/ipath/ipath_eeprom.c
index a2f1ceafcca..3313356ab93 100644
--- a/drivers/infiniband/hw/ipath/ipath_eeprom.c
+++ b/drivers/infiniband/hw/ipath/ipath_eeprom.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -600,8 +601,31 @@ void ipath_get_eeprom_info(struct ipath_devdata *dd)
600 guid = *(__be64 *) ifp->if_guid; 601 guid = *(__be64 *) ifp->if_guid;
601 dd->ipath_guid = guid; 602 dd->ipath_guid = guid;
602 dd->ipath_nguid = ifp->if_numguid; 603 dd->ipath_nguid = ifp->if_numguid;
603 memcpy(dd->ipath_serial, ifp->if_serial, 604 /*
604 sizeof(ifp->if_serial)); 605 * Things are slightly complicated by the desire to transparently
606 * support both the Pathscale 10-digit serial number and the QLogic
607 * 13-character version.
608 */
609 if ((ifp->if_fversion > 1) && ifp->if_sprefix[0]
610 && ((u8 *)ifp->if_sprefix)[0] != 0xFF) {
611 /* This board has a Serial-prefix, which is stored
612 * elsewhere for backward-compatibility.
613 */
614 char *snp = dd->ipath_serial;
615 int len;
616 memcpy(snp, ifp->if_sprefix, sizeof ifp->if_sprefix);
617 snp[sizeof ifp->if_sprefix] = '\0';
618 len = strlen(snp);
619 snp += len;
620 len = (sizeof dd->ipath_serial) - len;
621 if (len > sizeof ifp->if_serial) {
622 len = sizeof ifp->if_serial;
623 }
624 memcpy(snp, ifp->if_serial, len);
625 } else
626 memcpy(dd->ipath_serial, ifp->if_serial,
627 sizeof ifp->if_serial);
628
605 ipath_cdbg(VERBOSE, "Initted GUID to %llx from eeprom\n", 629 ipath_cdbg(VERBOSE, "Initted GUID to %llx from eeprom\n",
606 (unsigned long long) be64_to_cpu(dd->ipath_guid)); 630 (unsigned long long) be64_to_cpu(dd->ipath_guid));
607 631
diff --git a/drivers/infiniband/hw/ipath/ipath_file_ops.c b/drivers/infiniband/hw/ipath/ipath_file_ops.c
index ada267e41f6..bbaa70e57db 100644
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -38,8 +39,8 @@
38#include <asm/pgtable.h> 39#include <asm/pgtable.h>
39 40
40#include "ipath_kernel.h" 41#include "ipath_kernel.h"
41#include "ips_common.h"
42#include "ipath_layer.h" 42#include "ipath_layer.h"
43#include "ipath_common.h"
43 44
44static int ipath_open(struct inode *, struct file *); 45static int ipath_open(struct inode *, struct file *);
45static int ipath_close(struct inode *, struct file *); 46static int ipath_close(struct inode *, struct file *);
@@ -122,6 +123,7 @@ static int ipath_get_base_info(struct ipath_portdata *pd,
122 * on to yet another method of dealing with this 123 * on to yet another method of dealing with this
123 */ 124 */
124 kinfo->spi_rcvhdr_base = (u64) pd->port_rcvhdrq_phys; 125 kinfo->spi_rcvhdr_base = (u64) pd->port_rcvhdrq_phys;
126 kinfo->spi_rcvhdr_tailaddr = (u64)pd->port_rcvhdrqtailaddr_phys;
125 kinfo->spi_rcv_egrbufs = (u64) pd->port_rcvegr_phys; 127 kinfo->spi_rcv_egrbufs = (u64) pd->port_rcvegr_phys;
126 kinfo->spi_pioavailaddr = (u64) dd->ipath_pioavailregs_phys; 128 kinfo->spi_pioavailaddr = (u64) dd->ipath_pioavailregs_phys;
127 kinfo->spi_status = (u64) kinfo->spi_pioavailaddr + 129 kinfo->spi_status = (u64) kinfo->spi_pioavailaddr +
@@ -456,7 +458,7 @@ static int ipath_set_part_key(struct ipath_portdata *pd, u16 key)
456 u16 lkey = key & 0x7FFF; 458 u16 lkey = key & 0x7FFF;
457 int ret; 459 int ret;
458 460
459 if (lkey == (IPS_DEFAULT_P_KEY & 0x7FFF)) { 461 if (lkey == (IPATH_DEFAULT_P_KEY & 0x7FFF)) {
460 /* nothing to do; this key always valid */ 462 /* nothing to do; this key always valid */
461 ret = 0; 463 ret = 0;
462 goto bail; 464 goto bail;
@@ -704,6 +706,15 @@ static int ipath_create_user_egr(struct ipath_portdata *pd)
704 unsigned e, egrcnt, alloced, egrperchunk, chunk, egrsize, egroff; 706 unsigned e, egrcnt, alloced, egrperchunk, chunk, egrsize, egroff;
705 size_t size; 707 size_t size;
706 int ret; 708 int ret;
709 gfp_t gfp_flags;
710
711 /*
712 * GFP_USER, but without GFP_FS, so buffer cache can be
713 * coalesced (we hope); otherwise, even at order 4,
714 * heavy filesystem activity makes these fail, and we can
715 * use compound pages.
716 */
717 gfp_flags = __GFP_WAIT | __GFP_IO | __GFP_COMP;
707 718
708 egrcnt = dd->ipath_rcvegrcnt; 719 egrcnt = dd->ipath_rcvegrcnt;
709 /* TID number offset for this port */ 720 /* TID number offset for this port */
@@ -720,10 +731,8 @@ static int ipath_create_user_egr(struct ipath_portdata *pd)
720 * memory pressure (creating large files and then copying them over 731 * memory pressure (creating large files and then copying them over
721 * NFS while doing lots of MPI jobs), we hit some allocation 732 * NFS while doing lots of MPI jobs), we hit some allocation
722 * failures, even though we can sleep... (2.6.10) Still get 733 * failures, even though we can sleep... (2.6.10) Still get
723 * failures at 64K. 32K is the lowest we can go without waiting 734 * failures at 64K. 32K is the lowest we can go without wasting
724 * more memory again. It seems likely that the coalescing in 735 * additional memory.
725 * free_pages, etc. still has issues (as it has had previously
726 * during 2.6.x development).
727 */ 736 */
728 size = 0x8000; 737 size = 0x8000;
729 alloced = ALIGN(egrsize * egrcnt, size); 738 alloced = ALIGN(egrsize * egrcnt, size);
@@ -744,12 +753,6 @@ static int ipath_create_user_egr(struct ipath_portdata *pd)
744 goto bail_rcvegrbuf; 753 goto bail_rcvegrbuf;
745 } 754 }
746 for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) { 755 for (e = 0; e < pd->port_rcvegrbuf_chunks; e++) {
747 /*
748 * GFP_USER, but without GFP_FS, so buffer cache can be
749 * coalesced (we hope); otherwise, even at order 4,
750 * heavy filesystem activity makes these fail
751 */
752 gfp_t gfp_flags = __GFP_WAIT | __GFP_IO | __GFP_COMP;
753 756
754 pd->port_rcvegrbuf[e] = dma_alloc_coherent( 757 pd->port_rcvegrbuf[e] = dma_alloc_coherent(
755 &dd->pcidev->dev, size, &pd->port_rcvegrbuf_phys[e], 758 &dd->pcidev->dev, size, &pd->port_rcvegrbuf_phys[e],
@@ -783,11 +786,12 @@ static int ipath_create_user_egr(struct ipath_portdata *pd)
783 786
784bail_rcvegrbuf_phys: 787bail_rcvegrbuf_phys:
785 for (e = 0; e < pd->port_rcvegrbuf_chunks && 788 for (e = 0; e < pd->port_rcvegrbuf_chunks &&
786 pd->port_rcvegrbuf[e]; e++) 789 pd->port_rcvegrbuf[e]; e++) {
787 dma_free_coherent(&dd->pcidev->dev, size, 790 dma_free_coherent(&dd->pcidev->dev, size,
788 pd->port_rcvegrbuf[e], 791 pd->port_rcvegrbuf[e],
789 pd->port_rcvegrbuf_phys[e]); 792 pd->port_rcvegrbuf_phys[e]);
790 793
794 }
791 vfree(pd->port_rcvegrbuf_phys); 795 vfree(pd->port_rcvegrbuf_phys);
792 pd->port_rcvegrbuf_phys = NULL; 796 pd->port_rcvegrbuf_phys = NULL;
793bail_rcvegrbuf: 797bail_rcvegrbuf:
@@ -802,10 +806,7 @@ static int ipath_do_user_init(struct ipath_portdata *pd,
802{ 806{
803 int ret = 0; 807 int ret = 0;
804 struct ipath_devdata *dd = pd->port_dd; 808 struct ipath_devdata *dd = pd->port_dd;
805 u64 physaddr, uaddr, off, atmp;
806 struct page *pagep;
807 u32 head32; 809 u32 head32;
808 u64 head;
809 810
810 /* for now, if major version is different, bail */ 811 /* for now, if major version is different, bail */
811 if ((uinfo->spu_userversion >> 16) != IPATH_USER_SWMAJOR) { 812 if ((uinfo->spu_userversion >> 16) != IPATH_USER_SWMAJOR) {
@@ -830,54 +831,6 @@ static int ipath_do_user_init(struct ipath_portdata *pd,
830 831
831 /* for now we do nothing with rcvhdrcnt: uinfo->spu_rcvhdrcnt */ 832 /* for now we do nothing with rcvhdrcnt: uinfo->spu_rcvhdrcnt */
832 833
833 /* set up for the rcvhdr Q tail register writeback to user memory */
834 if (!uinfo->spu_rcvhdraddr ||
835 !access_ok(VERIFY_WRITE, (u64 __user *) (unsigned long)
836 uinfo->spu_rcvhdraddr, sizeof(u64))) {
837 ipath_dbg("Port %d rcvhdrtail addr %llx not valid\n",
838 pd->port_port,
839 (unsigned long long) uinfo->spu_rcvhdraddr);
840 ret = -EINVAL;
841 goto done;
842 }
843
844 off = offset_in_page(uinfo->spu_rcvhdraddr);
845 uaddr = PAGE_MASK & (unsigned long) uinfo->spu_rcvhdraddr;
846 ret = ipath_get_user_pages_nocopy(uaddr, &pagep);
847 if (ret) {
848 dev_info(&dd->pcidev->dev, "Failed to lookup and lock "
849 "address %llx for rcvhdrtail: errno %d\n",
850 (unsigned long long) uinfo->spu_rcvhdraddr, -ret);
851 goto done;
852 }
853 ipath_stats.sps_pagelocks++;
854 pd->port_rcvhdrtail_uaddr = uaddr;
855 pd->port_rcvhdrtail_pagep = pagep;
856 pd->port_rcvhdrtail_kvaddr =
857 page_address(pagep);
858 pd->port_rcvhdrtail_kvaddr += off;
859 physaddr = page_to_phys(pagep) + off;
860 ipath_cdbg(VERBOSE, "port %d user addr %llx hdrtailaddr, %llx "
861 "physical (off=%llx)\n",
862 pd->port_port,
863 (unsigned long long) uinfo->spu_rcvhdraddr,
864 (unsigned long long) physaddr, (unsigned long long) off);
865 ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr,
866 pd->port_port, physaddr);
867 atmp = ipath_read_kreg64_port(dd,
868 dd->ipath_kregs->kr_rcvhdrtailaddr,
869 pd->port_port);
870 if (physaddr != atmp) {
871 ipath_dev_err(dd,
872 "Catastrophic software error, "
873 "RcvHdrTailAddr%u written as %llx, "
874 "read back as %llx\n", pd->port_port,
875 (unsigned long long) physaddr,
876 (unsigned long long) atmp);
877 ret = -EINVAL;
878 goto done;
879 }
880
881 /* for right now, kernel piobufs are at end, so port 1 is at 0 */ 834 /* for right now, kernel piobufs are at end, so port 1 is at 0 */
882 pd->port_piobufs = dd->ipath_piobufbase + 835 pd->port_piobufs = dd->ipath_piobufbase +
883 dd->ipath_pbufsport * (pd->port_port - 836 dd->ipath_pbufsport * (pd->port_port -
@@ -896,26 +849,18 @@ static int ipath_do_user_init(struct ipath_portdata *pd,
896 ret = ipath_create_user_egr(pd); 849 ret = ipath_create_user_egr(pd);
897 if (ret) 850 if (ret)
898 goto done; 851 goto done;
899 /* enable receives now */
900 /* atomically set enable bit for this port */
901 set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port,
902 &dd->ipath_rcvctrl);
903 852
904 /* 853 /*
905 * set the head registers for this port to the current values 854 * set the eager head register for this port to the current values
906 * of the tail pointers, since we don't know if they were 855 * of the tail pointers, since we don't know if they were
907 * updated on last use of the port. 856 * updated on last use of the port.
908 */ 857 */
909 head32 = ipath_read_ureg32(dd, ur_rcvhdrtail, pd->port_port);
910 head = (u64) head32;
911 ipath_write_ureg(dd, ur_rcvhdrhead, head, pd->port_port);
912 head32 = ipath_read_ureg32(dd, ur_rcvegrindextail, pd->port_port); 858 head32 = ipath_read_ureg32(dd, ur_rcvegrindextail, pd->port_port);
913 ipath_write_ureg(dd, ur_rcvegrindexhead, head32, pd->port_port); 859 ipath_write_ureg(dd, ur_rcvegrindexhead, head32, pd->port_port);
914 dd->ipath_lastegrheads[pd->port_port] = -1; 860 dd->ipath_lastegrheads[pd->port_port] = -1;
915 dd->ipath_lastrcvhdrqtails[pd->port_port] = -1; 861 dd->ipath_lastrcvhdrqtails[pd->port_port] = -1;
916 ipath_cdbg(VERBOSE, "Wrote port%d head %llx, egrhead %x from " 862 ipath_cdbg(VERBOSE, "Wrote port%d egrhead %x from tail regs\n",
917 "tail regs\n", pd->port_port, 863 pd->port_port, head32);
918 (unsigned long long) head, head32);
919 pd->port_tidcursor = 0; /* start at beginning after open */ 864 pd->port_tidcursor = 0; /* start at beginning after open */
920 /* 865 /*
921 * now enable the port; the tail registers will be written to memory 866 * now enable the port; the tail registers will be written to memory
@@ -924,24 +869,76 @@ static int ipath_do_user_init(struct ipath_portdata *pd,
924 * transition from 0 to 1, so clear it first, then set it as part of 869 * transition from 0 to 1, so clear it first, then set it as part of
925 * enabling the port. This will (very briefly) affect any other 870 * enabling the port. This will (very briefly) affect any other
926 * open ports, but it shouldn't be long enough to be an issue. 871 * open ports, but it shouldn't be long enough to be an issue.
872 * We explictly set the in-memory copy to 0 beforehand, so we don't
873 * have to wait to be sure the DMA update has happened.
927 */ 874 */
875 *pd->port_rcvhdrtail_kvaddr = 0ULL;
876 set_bit(INFINIPATH_R_PORTENABLE_SHIFT + pd->port_port,
877 &dd->ipath_rcvctrl);
928 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 878 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
929 dd->ipath_rcvctrl & ~INFINIPATH_R_TAILUPD); 879 dd->ipath_rcvctrl & ~INFINIPATH_R_TAILUPD);
930 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl, 880 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvctrl,
931 dd->ipath_rcvctrl); 881 dd->ipath_rcvctrl);
932
933done: 882done:
934 return ret; 883 return ret;
935} 884}
936 885
886
887/* common code for the mappings on dma_alloc_coherent mem */
888static int ipath_mmap_mem(struct vm_area_struct *vma,
889 struct ipath_portdata *pd, unsigned len,
890 int write_ok, dma_addr_t addr, char *what)
891{
892 struct ipath_devdata *dd = pd->port_dd;
893 unsigned pfn = (unsigned long)addr >> PAGE_SHIFT;
894 int ret;
895
896 if ((vma->vm_end - vma->vm_start) > len) {
897 dev_info(&dd->pcidev->dev,
898 "FAIL on %s: len %lx > %x\n", what,
899 vma->vm_end - vma->vm_start, len);
900 ret = -EFAULT;
901 goto bail;
902 }
903
904 if (!write_ok) {
905 if (vma->vm_flags & VM_WRITE) {
906 dev_info(&dd->pcidev->dev,
907 "%s must be mapped readonly\n", what);
908 ret = -EPERM;
909 goto bail;
910 }
911
912 /* don't allow them to later change with mprotect */
913 vma->vm_flags &= ~VM_MAYWRITE;
914 }
915
916 ret = remap_pfn_range(vma, vma->vm_start, pfn,
917 len, vma->vm_page_prot);
918 if (ret)
919 dev_info(&dd->pcidev->dev,
920 "%s port%u mmap of %lx, %x bytes r%c failed: %d\n",
921 what, pd->port_port, (unsigned long)addr, len,
922 write_ok?'w':'o', ret);
923 else
924 ipath_cdbg(VERBOSE, "%s port%u mmaped %lx, %x bytes r%c\n",
925 what, pd->port_port, (unsigned long)addr, len,
926 write_ok?'w':'o');
927bail:
928 return ret;
929}
930
937static int mmap_ureg(struct vm_area_struct *vma, struct ipath_devdata *dd, 931static int mmap_ureg(struct vm_area_struct *vma, struct ipath_devdata *dd,
938 u64 ureg) 932 u64 ureg)
939{ 933{
940 unsigned long phys; 934 unsigned long phys;
941 int ret; 935 int ret;
942 936
943 /* it's the real hardware, so io_remap works */ 937 /*
944 938 * This is real hardware, so use io_remap. This is the mechanism
939 * for the user process to update the head registers for their port
940 * in the chip.
941 */
945 if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) { 942 if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) {
946 dev_info(&dd->pcidev->dev, "FAIL mmap userreg: reqlen " 943 dev_info(&dd->pcidev->dev, "FAIL mmap userreg: reqlen "
947 "%lx > PAGE\n", vma->vm_end - vma->vm_start); 944 "%lx > PAGE\n", vma->vm_end - vma->vm_start);
@@ -967,10 +964,11 @@ static int mmap_piobufs(struct vm_area_struct *vma,
967 int ret; 964 int ret;
968 965
969 /* 966 /*
970 * When we map the PIO buffers, we want to map them as writeonly, no 967 * When we map the PIO buffers in the chip, we want to map them as
971 * read possible. 968 * writeonly, no read possible. This prevents access to previous
969 * process data, and catches users who might try to read the i/o
970 * space due to a bug.
972 */ 971 */
973
974 if ((vma->vm_end - vma->vm_start) > 972 if ((vma->vm_end - vma->vm_start) >
975 (dd->ipath_pbufsport * dd->ipath_palign)) { 973 (dd->ipath_pbufsport * dd->ipath_palign)) {
976 dev_info(&dd->pcidev->dev, "FAIL mmap piobufs: " 974 dev_info(&dd->pcidev->dev, "FAIL mmap piobufs: "
@@ -981,11 +979,10 @@ static int mmap_piobufs(struct vm_area_struct *vma,
981 } 979 }
982 980
983 phys = dd->ipath_physaddr + pd->port_piobufs; 981 phys = dd->ipath_physaddr + pd->port_piobufs;
982
984 /* 983 /*
985 * Do *NOT* mark this as non-cached (PWT bit), or we don't get the 984 * Don't mark this as non-cached, or we don't get the
986 * write combining behavior we want on the PIO buffers! 985 * write combining behavior we want on the PIO buffers!
987 * vma->vm_page_prot =
988 * pgprot_noncached(vma->vm_page_prot);
989 */ 986 */
990 987
991 if (vma->vm_flags & VM_READ) { 988 if (vma->vm_flags & VM_READ) {
@@ -997,8 +994,7 @@ static int mmap_piobufs(struct vm_area_struct *vma,
997 } 994 }
998 995
999 /* don't allow them to later change to readable with mprotect */ 996 /* don't allow them to later change to readable with mprotect */
1000 997 vma->vm_flags &= ~VM_MAYREAD;
1001 vma->vm_flags &= ~VM_MAYWRITE;
1002 vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND; 998 vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND;
1003 999
1004 ret = io_remap_pfn_range(vma, vma->vm_start, phys >> PAGE_SHIFT, 1000 ret = io_remap_pfn_range(vma, vma->vm_start, phys >> PAGE_SHIFT,
@@ -1017,11 +1013,6 @@ static int mmap_rcvegrbufs(struct vm_area_struct *vma,
1017 dma_addr_t *phys; 1013 dma_addr_t *phys;
1018 int ret; 1014 int ret;
1019 1015
1020 if (!pd->port_rcvegrbuf) {
1021 ret = -EFAULT;
1022 goto bail;
1023 }
1024
1025 size = pd->port_rcvegrbuf_size; 1016 size = pd->port_rcvegrbuf_size;
1026 total_size = pd->port_rcvegrbuf_chunks * size; 1017 total_size = pd->port_rcvegrbuf_chunks * size;
1027 if ((vma->vm_end - vma->vm_start) > total_size) { 1018 if ((vma->vm_end - vma->vm_start) > total_size) {
@@ -1039,13 +1030,12 @@ static int mmap_rcvegrbufs(struct vm_area_struct *vma,
1039 ret = -EPERM; 1030 ret = -EPERM;
1040 goto bail; 1031 goto bail;
1041 } 1032 }
1033 /* don't allow them to later change to writeable with mprotect */
1034 vma->vm_flags &= ~VM_MAYWRITE;
1042 1035
1043 start = vma->vm_start; 1036 start = vma->vm_start;
1044 phys = pd->port_rcvegrbuf_phys; 1037 phys = pd->port_rcvegrbuf_phys;
1045 1038
1046 /* don't allow them to later change to writeable with mprotect */
1047 vma->vm_flags &= ~VM_MAYWRITE;
1048
1049 for (i = 0; i < pd->port_rcvegrbuf_chunks; i++, start += size) { 1039 for (i = 0; i < pd->port_rcvegrbuf_chunks; i++, start += size) {
1050 ret = remap_pfn_range(vma, start, phys[i] >> PAGE_SHIFT, 1040 ret = remap_pfn_range(vma, start, phys[i] >> PAGE_SHIFT,
1051 size, vma->vm_page_prot); 1041 size, vma->vm_page_prot);
@@ -1058,78 +1048,6 @@ bail:
1058 return ret; 1048 return ret;
1059} 1049}
1060 1050
1061static int mmap_rcvhdrq(struct vm_area_struct *vma,
1062 struct ipath_portdata *pd)
1063{
1064 struct ipath_devdata *dd = pd->port_dd;
1065 size_t total_size;
1066 int ret;
1067
1068 /*
1069 * kmalloc'ed memory, physically contiguous; this is from
1070 * spi_rcvhdr_base; we allow user to map read-write so they can
1071 * write hdrq entries to allow protocol code to directly poll
1072 * whether a hdrq entry has been written.
1073 */
1074 total_size = ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize *
1075 sizeof(u32), PAGE_SIZE);
1076 if ((vma->vm_end - vma->vm_start) > total_size) {
1077 dev_info(&dd->pcidev->dev,
1078 "FAIL on rcvhdrq: reqlen %lx > actual %lx\n",
1079 vma->vm_end - vma->vm_start,
1080 (unsigned long) total_size);
1081 ret = -EFAULT;
1082 goto bail;
1083 }
1084
1085 ret = remap_pfn_range(vma, vma->vm_start,
1086 pd->port_rcvhdrq_phys >> PAGE_SHIFT,
1087 vma->vm_end - vma->vm_start,
1088 vma->vm_page_prot);
1089bail:
1090 return ret;
1091}
1092
1093static int mmap_pioavailregs(struct vm_area_struct *vma,
1094 struct ipath_portdata *pd)
1095{
1096 struct ipath_devdata *dd = pd->port_dd;
1097 int ret;
1098
1099 /*
1100 * when we map the PIO bufferavail registers, we want to map them as
1101 * readonly, no write possible.
1102 *
1103 * kmalloc'ed memory, physically contiguous, one page only, readonly
1104 */
1105
1106 if ((vma->vm_end - vma->vm_start) > PAGE_SIZE) {
1107 dev_info(&dd->pcidev->dev, "FAIL on pioavailregs_dma: "
1108 "reqlen %lx > actual %lx\n",
1109 vma->vm_end - vma->vm_start,
1110 (unsigned long) PAGE_SIZE);
1111 ret = -EFAULT;
1112 goto bail;
1113 }
1114
1115 if (vma->vm_flags & VM_WRITE) {
1116 dev_info(&dd->pcidev->dev,
1117 "Can't map pioavailregs as writable (flags=%lx)\n",
1118 vma->vm_flags);
1119 ret = -EPERM;
1120 goto bail;
1121 }
1122
1123 /* don't allow them to later change with mprotect */
1124 vma->vm_flags &= ~VM_MAYWRITE;
1125
1126 ret = remap_pfn_range(vma, vma->vm_start,
1127 dd->ipath_pioavailregs_phys >> PAGE_SHIFT,
1128 PAGE_SIZE, vma->vm_page_prot);
1129bail:
1130 return ret;
1131}
1132
1133/** 1051/**
1134 * ipath_mmap - mmap various structures into user space 1052 * ipath_mmap - mmap various structures into user space
1135 * @fp: the file pointer 1053 * @fp: the file pointer
@@ -1149,6 +1067,7 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma)
1149 1067
1150 pd = port_fp(fp); 1068 pd = port_fp(fp);
1151 dd = pd->port_dd; 1069 dd = pd->port_dd;
1070
1152 /* 1071 /*
1153 * This is the ipath_do_user_init() code, mapping the shared buffers 1072 * This is the ipath_do_user_init() code, mapping the shared buffers
1154 * into the user process. The address referred to by vm_pgoff is the 1073 * into the user process. The address referred to by vm_pgoff is the
@@ -1158,28 +1077,59 @@ static int ipath_mmap(struct file *fp, struct vm_area_struct *vma)
1158 pgaddr = vma->vm_pgoff << PAGE_SHIFT; 1077 pgaddr = vma->vm_pgoff << PAGE_SHIFT;
1159 1078
1160 /* 1079 /*
1161 * note that ureg does *NOT* have the kregvirt as part of it, to be 1080 * Must fit in 40 bits for our hardware; some checked elsewhere,
1162 * sure that for 32 bit programs, we don't end up trying to map a > 1081 * but we'll be paranoid. Check for 0 is mostly in case one of the
1163 * 44 address. Has to match ipath_get_base_info() code that sets 1082 * allocations failed, but user called mmap anyway. We want to catch
1164 * __spi_uregbase 1083 * that before it can match.
1165 */ 1084 */
1085 if (!pgaddr || pgaddr >= (1ULL<<40)) {
1086 ipath_dev_err(dd, "Bad phys addr %llx, start %lx, end %lx\n",
1087 (unsigned long long)pgaddr, vma->vm_start, vma->vm_end);
1088 return -EINVAL;
1089 }
1166 1090
1091 /* just the offset of the port user registers, not physical addr */
1167 ureg = dd->ipath_uregbase + dd->ipath_palign * pd->port_port; 1092 ureg = dd->ipath_uregbase + dd->ipath_palign * pd->port_port;
1168 1093
1169 ipath_cdbg(MM, "ushare: pgaddr %llx vm_start=%lx, vmlen %lx\n", 1094 ipath_cdbg(MM, "ushare: pgaddr %llx vm_start=%lx, vmlen %lx\n",
1170 (unsigned long long) pgaddr, vma->vm_start, 1095 (unsigned long long) pgaddr, vma->vm_start,
1171 vma->vm_end - vma->vm_start); 1096 vma->vm_end - vma->vm_start);
1172 1097
1173 if (pgaddr == ureg) 1098 if (vma->vm_start & (PAGE_SIZE-1)) {
1099 ipath_dev_err(dd,
1100 "vm_start not aligned: %lx, end=%lx phys %lx\n",
1101 vma->vm_start, vma->vm_end, (unsigned long)pgaddr);
1102 ret = -EINVAL;
1103 }
1104 else if (pgaddr == ureg)
1174 ret = mmap_ureg(vma, dd, ureg); 1105 ret = mmap_ureg(vma, dd, ureg);
1175 else if (pgaddr == pd->port_piobufs) 1106 else if (pgaddr == pd->port_piobufs)
1176 ret = mmap_piobufs(vma, dd, pd); 1107 ret = mmap_piobufs(vma, dd, pd);
1177 else if (pgaddr == (u64) pd->port_rcvegr_phys) 1108 else if (pgaddr == (u64) pd->port_rcvegr_phys)
1178 ret = mmap_rcvegrbufs(vma, pd); 1109 ret = mmap_rcvegrbufs(vma, pd);
1179 else if (pgaddr == (u64) pd->port_rcvhdrq_phys) 1110 else if (pgaddr == (u64) pd->port_rcvhdrq_phys) {
1180 ret = mmap_rcvhdrq(vma, pd); 1111 /*
1112 * The rcvhdrq itself; readonly except on HT-400 (so have
1113 * to allow writable mapping), multiple pages, contiguous
1114 * from an i/o perspective.
1115 */
1116 unsigned total_size =
1117 ALIGN(dd->ipath_rcvhdrcnt * dd->ipath_rcvhdrentsize
1118 * sizeof(u32), PAGE_SIZE);
1119 ret = ipath_mmap_mem(vma, pd, total_size, 1,
1120 pd->port_rcvhdrq_phys,
1121 "rcvhdrq");
1122 }
1123 else if (pgaddr == (u64)pd->port_rcvhdrqtailaddr_phys)
1124 /* in-memory copy of rcvhdrq tail register */
1125 ret = ipath_mmap_mem(vma, pd, PAGE_SIZE, 0,
1126 pd->port_rcvhdrqtailaddr_phys,
1127 "rcvhdrq tail");
1181 else if (pgaddr == dd->ipath_pioavailregs_phys) 1128 else if (pgaddr == dd->ipath_pioavailregs_phys)
1182 ret = mmap_pioavailregs(vma, pd); 1129 /* in-memory copy of pioavail registers */
1130 ret = ipath_mmap_mem(vma, pd, PAGE_SIZE, 0,
1131 dd->ipath_pioavailregs_phys,
1132 "pioavail registers");
1183 else 1133 else
1184 ret = -EINVAL; 1134 ret = -EINVAL;
1185 1135
@@ -1442,16 +1392,16 @@ done:
1442 1392
1443static int ipath_open(struct inode *in, struct file *fp) 1393static int ipath_open(struct inode *in, struct file *fp)
1444{ 1394{
1445 int ret, minor; 1395 int ret, user_minor;
1446 1396
1447 mutex_lock(&ipath_mutex); 1397 mutex_lock(&ipath_mutex);
1448 1398
1449 minor = iminor(in); 1399 user_minor = iminor(in) - IPATH_USER_MINOR_BASE;
1450 ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n", 1400 ipath_cdbg(VERBOSE, "open on dev %lx (minor %d)\n",
1451 (long)in->i_rdev, minor); 1401 (long)in->i_rdev, user_minor);
1452 1402
1453 if (minor) 1403 if (user_minor)
1454 ret = find_free_port(minor - 1, fp); 1404 ret = find_free_port(user_minor - 1, fp);
1455 else 1405 else
1456 ret = find_best_unit(fp); 1406 ret = find_best_unit(fp);
1457 1407
@@ -1536,53 +1486,54 @@ static int ipath_close(struct inode *in, struct file *fp)
1536 } 1486 }
1537 1487
1538 if (dd->ipath_kregbase) { 1488 if (dd->ipath_kregbase) {
1539 if (pd->port_rcvhdrtail_uaddr) { 1489 int i;
1540 pd->port_rcvhdrtail_uaddr = 0; 1490 /* atomically clear receive enable port. */
1541 pd->port_rcvhdrtail_kvaddr = NULL; 1491 clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + port,
1542 ipath_release_user_pages_on_close( 1492 &dd->ipath_rcvctrl);
1543 &pd->port_rcvhdrtail_pagep, 1); 1493 ipath_write_kreg( dd, dd->ipath_kregs->kr_rcvctrl,
1544 pd->port_rcvhdrtail_pagep = NULL; 1494 dd->ipath_rcvctrl);
1545 ipath_stats.sps_pageunlocks++; 1495 /* and read back from chip to be sure that nothing
1546 } 1496 * else is in flight when we do the rest */
1547 ipath_write_kreg_port( 1497 (void)ipath_read_kreg64(dd, dd->ipath_kregs->kr_scratch);
1548 dd, dd->ipath_kregs->kr_rcvhdrtailaddr,
1549 port, 0ULL);
1550 ipath_write_kreg_port(
1551 dd, dd->ipath_kregs->kr_rcvhdraddr,
1552 pd->port_port, 0);
1553 1498
1554 /* clean up the pkeys for this port user */ 1499 /* clean up the pkeys for this port user */
1555 ipath_clean_part_key(pd, dd); 1500 ipath_clean_part_key(pd, dd);
1556 1501
1557 if (port < dd->ipath_cfgports) {
1558 int i = dd->ipath_pbufsport * (port - 1);
1559 ipath_disarm_piobufs(dd, i, dd->ipath_pbufsport);
1560 1502
1561 /* atomically clear receive enable port. */ 1503 /*
1562 clear_bit(INFINIPATH_R_PORTENABLE_SHIFT + port, 1504 * be paranoid, and never write 0's to these, just use an
1563 &dd->ipath_rcvctrl); 1505 * unused part of the port 0 tail page. Of course,
1564 ipath_write_kreg( 1506 * rcvhdraddr points to a large chunk of memory, so this
1565 dd, 1507 * could still trash things, but at least it won't trash
1566 dd->ipath_kregs->kr_rcvctrl, 1508 * page 0, and by disabling the port, it should stop "soon",
1567 dd->ipath_rcvctrl); 1509 * even if a packet or two is in already in flight after we
1568 1510 * disabled the port.
1569 if (dd->ipath_pageshadow) 1511 */
1570 unlock_expected_tids(pd); 1512 ipath_write_kreg_port(dd,
1571 ipath_stats.sps_ports--; 1513 dd->ipath_kregs->kr_rcvhdrtailaddr, port,
1572 ipath_cdbg(PROC, "%s[%u] closed port %u:%u\n", 1514 dd->ipath_dummy_hdrq_phys);
1573 pd->port_comm, pd->port_pid, 1515 ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdraddr,
1574 dd->ipath_unit, port); 1516 pd->port_port, dd->ipath_dummy_hdrq_phys);
1575 } 1517
1518 i = dd->ipath_pbufsport * (port - 1);
1519 ipath_disarm_piobufs(dd, i, dd->ipath_pbufsport);
1520
1521 if (dd->ipath_pageshadow)
1522 unlock_expected_tids(pd);
1523 ipath_stats.sps_ports--;
1524 ipath_cdbg(PROC, "%s[%u] closed port %u:%u\n",
1525 pd->port_comm, pd->port_pid,
1526 dd->ipath_unit, port);
1527
1528 dd->ipath_f_clear_tids(dd, pd->port_port);
1576 } 1529 }
1577 1530
1578 pd->port_cnt = 0; 1531 pd->port_cnt = 0;
1579 pd->port_pid = 0; 1532 pd->port_pid = 0;
1580 1533
1581 dd->ipath_f_clear_tids(dd, pd->port_port); 1534 dd->ipath_pd[pd->port_port] = NULL; /* before releasing mutex */
1582
1583 ipath_free_pddata(dd, pd->port_port, 0);
1584
1585 mutex_unlock(&ipath_mutex); 1535 mutex_unlock(&ipath_mutex);
1536 ipath_free_pddata(dd, pd); /* after releasing the mutex */
1586 1537
1587 return ret; 1538 return ret;
1588} 1539}
@@ -1859,19 +1810,12 @@ int ipath_user_add(struct ipath_devdata *dd)
1859 "error %d\n", -ret); 1810 "error %d\n", -ret);
1860 goto bail; 1811 goto bail;
1861 } 1812 }
1862 ret = ipath_diag_init();
1863 if (ret < 0) {
1864 ipath_dev_err(dd, "Unable to set up diag support: "
1865 "error %d\n", -ret);
1866 goto bail_sma;
1867 }
1868
1869 ret = init_cdev(0, "ipath", &ipath_file_ops, &wildcard_cdev, 1813 ret = init_cdev(0, "ipath", &ipath_file_ops, &wildcard_cdev,
1870 &wildcard_class_dev); 1814 &wildcard_class_dev);
1871 if (ret < 0) { 1815 if (ret < 0) {
1872 ipath_dev_err(dd, "Could not create wildcard " 1816 ipath_dev_err(dd, "Could not create wildcard "
1873 "minor: error %d\n", -ret); 1817 "minor: error %d\n", -ret);
1874 goto bail_diag; 1818 goto bail_sma;
1875 } 1819 }
1876 1820
1877 atomic_set(&user_setup, 1); 1821 atomic_set(&user_setup, 1);
@@ -1880,31 +1824,28 @@ int ipath_user_add(struct ipath_devdata *dd)
1880 snprintf(name, sizeof(name), "ipath%d", dd->ipath_unit); 1824 snprintf(name, sizeof(name), "ipath%d", dd->ipath_unit);
1881 1825
1882 ret = init_cdev(dd->ipath_unit + 1, name, &ipath_file_ops, 1826 ret = init_cdev(dd->ipath_unit + 1, name, &ipath_file_ops,
1883 &dd->cdev, &dd->class_dev); 1827 &dd->user_cdev, &dd->user_class_dev);
1884 if (ret < 0) 1828 if (ret < 0)
1885 ipath_dev_err(dd, "Could not create user minor %d, %s\n", 1829 ipath_dev_err(dd, "Could not create user minor %d, %s\n",
1886 dd->ipath_unit + 1, name); 1830 dd->ipath_unit + 1, name);
1887 1831
1888 goto bail; 1832 goto bail;
1889 1833
1890bail_diag:
1891 ipath_diag_cleanup();
1892bail_sma: 1834bail_sma:
1893 user_cleanup(); 1835 user_cleanup();
1894bail: 1836bail:
1895 return ret; 1837 return ret;
1896} 1838}
1897 1839
1898void ipath_user_del(struct ipath_devdata *dd) 1840void ipath_user_remove(struct ipath_devdata *dd)
1899{ 1841{
1900 cleanup_cdev(&dd->cdev, &dd->class_dev); 1842 cleanup_cdev(&dd->user_cdev, &dd->user_class_dev);
1901 1843
1902 if (atomic_dec_return(&user_count) == 0) { 1844 if (atomic_dec_return(&user_count) == 0) {
1903 if (atomic_read(&user_setup) == 0) 1845 if (atomic_read(&user_setup) == 0)
1904 goto bail; 1846 goto bail;
1905 1847
1906 cleanup_cdev(&wildcard_cdev, &wildcard_class_dev); 1848 cleanup_cdev(&wildcard_cdev, &wildcard_class_dev);
1907 ipath_diag_cleanup();
1908 user_cleanup(); 1849 user_cleanup();
1909 1850
1910 atomic_set(&user_setup, 0); 1851 atomic_set(&user_setup, 0);
@@ -1912,3 +1853,4 @@ void ipath_user_del(struct ipath_devdata *dd)
1912bail: 1853bail:
1913 return; 1854 return;
1914} 1855}
1856
diff --git a/drivers/infiniband/hw/ipath/ipath_fs.c b/drivers/infiniband/hw/ipath/ipath_fs.c
index 63de3046aff..0936d8e8d70 100644
--- a/drivers/infiniband/hw/ipath/ipath_fs.c
+++ b/drivers/infiniband/hw/ipath/ipath_fs.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -31,7 +32,6 @@
31 */ 32 */
32 33
33#include <linux/version.h> 34#include <linux/version.h>
34#include <linux/config.h>
35#include <linux/module.h> 35#include <linux/module.h>
36#include <linux/fs.h> 36#include <linux/fs.h>
37#include <linux/mount.h> 37#include <linux/mount.h>
diff --git a/drivers/infiniband/hw/ipath/ipath_ht400.c b/drivers/infiniband/hw/ipath/ipath_ht400.c
index fac0a2b74de..3db015da6e7 100644
--- a/drivers/infiniband/hw/ipath/ipath_ht400.c
+++ b/drivers/infiniband/hw/ipath/ipath_ht400.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -1572,7 +1573,6 @@ void ipath_init_ht400_funcs(struct ipath_devdata *dd)
1572 dd->ipath_f_reset = ipath_setup_ht_reset; 1573 dd->ipath_f_reset = ipath_setup_ht_reset;
1573 dd->ipath_f_get_boardname = ipath_ht_boardname; 1574 dd->ipath_f_get_boardname = ipath_ht_boardname;
1574 dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors; 1575 dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors;
1575 dd->ipath_f_init_hwerrors = ipath_ht_init_hwerrors;
1576 dd->ipath_f_early_init = ipath_ht_early_init; 1576 dd->ipath_f_early_init = ipath_ht_early_init;
1577 dd->ipath_f_handle_hwerrors = ipath_ht_handle_hwerrors; 1577 dd->ipath_f_handle_hwerrors = ipath_ht_handle_hwerrors;
1578 dd->ipath_f_quiet_serdes = ipath_ht_quiet_serdes; 1578 dd->ipath_f_quiet_serdes = ipath_ht_quiet_serdes;
diff --git a/drivers/infiniband/hw/ipath/ipath_init_chip.c b/drivers/infiniband/hw/ipath/ipath_init_chip.c
index dc83250d26a..414cdd1d80a 100644
--- a/drivers/infiniband/hw/ipath/ipath_init_chip.c
+++ b/drivers/infiniband/hw/ipath/ipath_init_chip.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -35,7 +36,7 @@
35#include <linux/vmalloc.h> 36#include <linux/vmalloc.h>
36 37
37#include "ipath_kernel.h" 38#include "ipath_kernel.h"
38#include "ips_common.h" 39#include "ipath_common.h"
39 40
40/* 41/*
41 * min buffers we want to have per port, after driver 42 * min buffers we want to have per port, after driver
@@ -114,6 +115,7 @@ static int create_port0_egr(struct ipath_devdata *dd)
114 "eager TID %u\n", e); 115 "eager TID %u\n", e);
115 while (e != 0) 116 while (e != 0)
116 dev_kfree_skb(skbs[--e]); 117 dev_kfree_skb(skbs[--e]);
118 vfree(skbs);
117 ret = -ENOMEM; 119 ret = -ENOMEM;
118 goto bail; 120 goto bail;
119 } 121 }
@@ -275,7 +277,7 @@ static int init_chip_first(struct ipath_devdata *dd,
275 pd->port_port = 0; 277 pd->port_port = 0;
276 pd->port_cnt = 1; 278 pd->port_cnt = 1;
277 /* The port 0 pkey table is used by the layer interface. */ 279 /* The port 0 pkey table is used by the layer interface. */
278 pd->port_pkeys[0] = IPS_DEFAULT_P_KEY; 280 pd->port_pkeys[0] = IPATH_DEFAULT_P_KEY;
279 dd->ipath_rcvtidcnt = 281 dd->ipath_rcvtidcnt =
280 ipath_read_kreg32(dd, dd->ipath_kregs->kr_rcvtidcnt); 282 ipath_read_kreg32(dd, dd->ipath_kregs->kr_rcvtidcnt);
281 dd->ipath_rcvtidbase = 283 dd->ipath_rcvtidbase =
@@ -409,17 +411,8 @@ static int init_pioavailregs(struct ipath_devdata *dd)
409 /* and its length */ 411 /* and its length */
410 dd->ipath_freezelen = L1_CACHE_BYTES - sizeof(dd->ipath_statusp[0]); 412 dd->ipath_freezelen = L1_CACHE_BYTES - sizeof(dd->ipath_statusp[0]);
411 413
412 if (dd->ipath_unit * 64 > (IPATH_PORT0_RCVHDRTAIL_SIZE - 64)) { 414 ret = 0;
413 ipath_dev_err(dd, "unit %u too large for port 0 "
414 "rcvhdrtail buffer size\n", dd->ipath_unit);
415 ret = -ENODEV;
416 }
417 else
418 ret = 0;
419 415
420 /* so we can get current tail in ipath_kreceive(), per chip */
421 dd->ipath_hdrqtailptr = &ipath_port0_rcvhdrtail[
422 dd->ipath_unit * (64 / sizeof(*ipath_port0_rcvhdrtail))];
423done: 416done:
424 return ret; 417 return ret;
425} 418}
@@ -652,8 +645,9 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)
652{ 645{
653 int ret = 0, i; 646 int ret = 0, i;
654 u32 val32, kpiobufs; 647 u32 val32, kpiobufs;
655 u64 val, atmp; 648 u64 val;
656 struct ipath_portdata *pd = NULL; /* keep gcc4 happy */ 649 struct ipath_portdata *pd = NULL; /* keep gcc4 happy */
650 gfp_t gfp_flags = GFP_USER | __GFP_COMP;
657 651
658 ret = init_housekeeping(dd, &pd, reinit); 652 ret = init_housekeeping(dd, &pd, reinit);
659 if (ret) 653 if (ret)
@@ -775,24 +769,6 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)
775 goto done; 769 goto done;
776 } 770 }
777 771
778 val = ipath_port0_rcvhdrtail_dma + dd->ipath_unit * 64;
779
780 /* verify that the alignment requirement was met */
781 ipath_write_kreg_port(dd, dd->ipath_kregs->kr_rcvhdrtailaddr,
782 0, val);
783 atmp = ipath_read_kreg64_port(
784 dd, dd->ipath_kregs->kr_rcvhdrtailaddr, 0);
785 if (val != atmp) {
786 ipath_dev_err(dd, "Catastrophic software error, "
787 "RcvHdrTailAddr0 written as %llx, "
788 "read back as %llx from %x\n",
789 (unsigned long long) val,
790 (unsigned long long) atmp,
791 dd->ipath_kregs->kr_rcvhdrtailaddr);
792 ret = -EINVAL;
793 goto done;
794 }
795
796 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvbthqp, IPATH_KD_QP); 772 ipath_write_kreg(dd, dd->ipath_kregs->kr_rcvbthqp, IPATH_KD_QP);
797 773
798 /* 774 /*
@@ -836,25 +812,45 @@ int ipath_init_chip(struct ipath_devdata *dd, int reinit)
836 /* clear any interrups up to this point (ints still not enabled) */ 812 /* clear any interrups up to this point (ints still not enabled) */
837 ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, -1LL); 813 ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, -1LL);
838 814
839 ipath_stats.sps_lid[dd->ipath_unit] = dd->ipath_lid;
840
841 /* 815 /*
842 * Set up the port 0 (kernel) rcvhdr q and egr TIDs. If doing 816 * Set up the port 0 (kernel) rcvhdr q and egr TIDs. If doing
843 * re-init, the simplest way to handle this is to free 817 * re-init, the simplest way to handle this is to free
844 * existing, and re-allocate. 818 * existing, and re-allocate.
845 */ 819 */
846 if (reinit) 820 if (reinit) {
847 ipath_free_pddata(dd, 0, 0); 821 struct ipath_portdata *pd = dd->ipath_pd[0];
822 dd->ipath_pd[0] = NULL;
823 ipath_free_pddata(dd, pd);
824 }
848 dd->ipath_f_tidtemplate(dd); 825 dd->ipath_f_tidtemplate(dd);
849 ret = ipath_create_rcvhdrq(dd, pd); 826 ret = ipath_create_rcvhdrq(dd, pd);
850 if (!ret) 827 if (!ret) {
828 dd->ipath_hdrqtailptr =
829 (volatile __le64 *)pd->port_rcvhdrtail_kvaddr;
851 ret = create_port0_egr(dd); 830 ret = create_port0_egr(dd);
831 }
852 if (ret) 832 if (ret)
853 ipath_dev_err(dd, "failed to allocate port 0 (kernel) " 833 ipath_dev_err(dd, "failed to allocate port 0 (kernel) "
854 "rcvhdrq and/or egr bufs\n"); 834 "rcvhdrq and/or egr bufs\n");
855 else 835 else
856 enable_chip(dd, pd, reinit); 836 enable_chip(dd, pd, reinit);
857 837
838
839 if (!ret && !reinit) {
840 /* used when we close a port, for DMA already in flight at close */
841 dd->ipath_dummy_hdrq = dma_alloc_coherent(
842 &dd->pcidev->dev, pd->port_rcvhdrq_size,
843 &dd->ipath_dummy_hdrq_phys,
844 gfp_flags);
845 if (!dd->ipath_dummy_hdrq ) {
846 dev_info(&dd->pcidev->dev,
847 "Couldn't allocate 0x%lx bytes for dummy hdrq\n",
848 pd->port_rcvhdrq_size);
849 /* fallback to just 0'ing */
850 dd->ipath_dummy_hdrq_phys = 0UL;
851 }
852 }
853
858 /* 854 /*
859 * cause retrigger of pending interrupts ignored during init, 855 * cause retrigger of pending interrupts ignored during init,
860 * even if we had errors 856 * even if we had errors
diff --git a/drivers/infiniband/hw/ipath/ipath_intr.c b/drivers/infiniband/hw/ipath/ipath_intr.c
index 3e72a1fe3d7..280e732660a 100644
--- a/drivers/infiniband/hw/ipath/ipath_intr.c
+++ b/drivers/infiniband/hw/ipath/ipath_intr.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -33,9 +34,10 @@
33#include <linux/pci.h> 34#include <linux/pci.h>
34 35
35#include "ipath_kernel.h" 36#include "ipath_kernel.h"
36#include "ips_common.h"
37#include "ipath_layer.h" 37#include "ipath_layer.h"
38#include "ipath_common.h"
38 39
40/* These are all rcv-related errors which we want to count for stats */
39#define E_SUM_PKTERRS \ 41#define E_SUM_PKTERRS \
40 (INFINIPATH_E_RHDRLEN | INFINIPATH_E_RBADTID | \ 42 (INFINIPATH_E_RHDRLEN | INFINIPATH_E_RBADTID | \
41 INFINIPATH_E_RBADVERSION | INFINIPATH_E_RHDR | \ 43 INFINIPATH_E_RBADVERSION | INFINIPATH_E_RHDR | \
@@ -44,6 +46,7 @@
44 INFINIPATH_E_RFORMATERR | INFINIPATH_E_RUNSUPVL | \ 46 INFINIPATH_E_RFORMATERR | INFINIPATH_E_RUNSUPVL | \
45 INFINIPATH_E_RUNEXPCHAR | INFINIPATH_E_REBP) 47 INFINIPATH_E_RUNEXPCHAR | INFINIPATH_E_REBP)
46 48
49/* These are all send-related errors which we want to count for stats */
47#define E_SUM_ERRS \ 50#define E_SUM_ERRS \
48 (INFINIPATH_E_SPIOARMLAUNCH | INFINIPATH_E_SUNEXPERRPKTNUM | \ 51 (INFINIPATH_E_SPIOARMLAUNCH | INFINIPATH_E_SUNEXPERRPKTNUM | \
49 INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \ 52 INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \
@@ -51,6 +54,18 @@
51 INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \ 54 INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \
52 INFINIPATH_E_INVALIDADDR) 55 INFINIPATH_E_INVALIDADDR)
53 56
57/*
58 * these are errors that can occur when the link changes state while
59 * a packet is being sent or received. This doesn't cover things
60 * like EBP or VCRC that can be the result of a sending having the
61 * link change state, so we receive a "known bad" packet.
62 */
63#define E_SUM_LINK_PKTERRS \
64 (INFINIPATH_E_SDROPPEDDATAPKT | INFINIPATH_E_SDROPPEDSMPPKT | \
65 INFINIPATH_E_SMINPKTLEN | INFINIPATH_E_SPKTLEN | \
66 INFINIPATH_E_RSHORTPKTLEN | INFINIPATH_E_RMINPKTLEN | \
67 INFINIPATH_E_RUNEXPCHAR)
68
54static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs) 69static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs)
55{ 70{
56 unsigned long sbuf[4]; 71 unsigned long sbuf[4];
@@ -100,9 +115,7 @@ static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs)
100 if (ipath_debug & __IPATH_PKTDBG) 115 if (ipath_debug & __IPATH_PKTDBG)
101 printk("\n"); 116 printk("\n");
102 } 117 }
103 if ((errs & (INFINIPATH_E_SDROPPEDDATAPKT | 118 if ((errs & E_SUM_LINK_PKTERRS) &&
104 INFINIPATH_E_SDROPPEDSMPPKT |
105 INFINIPATH_E_SMINPKTLEN)) &&
106 !(dd->ipath_flags & IPATH_LINKACTIVE)) { 119 !(dd->ipath_flags & IPATH_LINKACTIVE)) {
107 /* 120 /*
108 * This can happen when SMA is trying to bring the link 121 * This can happen when SMA is trying to bring the link
@@ -111,11 +124,9 @@ static u64 handle_e_sum_errs(struct ipath_devdata *dd, ipath_err_t errs)
111 * valid. We don't want to confuse people, so we just 124 * valid. We don't want to confuse people, so we just
112 * don't print them, except at debug 125 * don't print them, except at debug
113 */ 126 */
114 ipath_dbg("Ignoring pktsend errors %llx, because not " 127 ipath_dbg("Ignoring packet errors %llx, because link not "
115 "yet active\n", (unsigned long long) errs); 128 "ACTIVE\n", (unsigned long long) errs);
116 ignore_this_time = INFINIPATH_E_SDROPPEDDATAPKT | 129 ignore_this_time = errs & E_SUM_LINK_PKTERRS;
117 INFINIPATH_E_SDROPPEDSMPPKT |
118 INFINIPATH_E_SMINPKTLEN;
119 } 130 }
120 131
121 return ignore_this_time; 132 return ignore_this_time;
@@ -156,7 +167,29 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
156 */ 167 */
157 val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_ibcstatus); 168 val = ipath_read_kreg64(dd, dd->ipath_kregs->kr_ibcstatus);
158 lstate = val & IPATH_IBSTATE_MASK; 169 lstate = val & IPATH_IBSTATE_MASK;
159 if (lstate == IPATH_IBSTATE_INIT || lstate == IPATH_IBSTATE_ARM || 170
171 /*
172 * this is confusing enough when it happens that I want to always put it
173 * on the console and in the logs. If it was a requested state change,
174 * we'll have already cleared the flags, so we won't print this warning
175 */
176 if ((lstate != IPATH_IBSTATE_ARM && lstate != IPATH_IBSTATE_ACTIVE)
177 && (dd->ipath_flags & (IPATH_LINKARMED | IPATH_LINKACTIVE))) {
178 dev_info(&dd->pcidev->dev, "Link state changed from %s to %s\n",
179 (dd->ipath_flags & IPATH_LINKARMED) ? "ARM" : "ACTIVE",
180 ib_linkstate(lstate));
181 /*
182 * Flush all queued sends when link went to DOWN or INIT,
183 * to be sure that they don't block SMA and other MAD packets
184 */
185 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
186 INFINIPATH_S_ABORT);
187 ipath_disarm_piobufs(dd, dd->ipath_lastport_piobuf,
188 (unsigned)(dd->ipath_piobcnt2k +
189 dd->ipath_piobcnt4k) -
190 dd->ipath_lastport_piobuf);
191 }
192 else if (lstate == IPATH_IBSTATE_INIT || lstate == IPATH_IBSTATE_ARM ||
160 lstate == IPATH_IBSTATE_ACTIVE) { 193 lstate == IPATH_IBSTATE_ACTIVE) {
161 /* 194 /*
162 * only print at SMA if there is a change, debug if not 195 * only print at SMA if there is a change, debug if not
@@ -229,6 +262,7 @@ static void handle_e_ibstatuschanged(struct ipath_devdata *dd,
229 | IPATH_LINKACTIVE | 262 | IPATH_LINKACTIVE |
230 IPATH_LINKARMED); 263 IPATH_LINKARMED);
231 *dd->ipath_statusp &= ~IPATH_STATUS_IB_READY; 264 *dd->ipath_statusp &= ~IPATH_STATUS_IB_READY;
265 dd->ipath_lli_counter = 0;
232 if (!noprint) { 266 if (!noprint) {
233 if (((dd->ipath_lastibcstat >> 267 if (((dd->ipath_lastibcstat >>
234 INFINIPATH_IBCS_LINKSTATE_SHIFT) & 268 INFINIPATH_IBCS_LINKSTATE_SHIFT) &
@@ -350,7 +384,7 @@ static unsigned handle_frequent_errors(struct ipath_devdata *dd,
350 return supp_msgs; 384 return supp_msgs;
351} 385}
352 386
353static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs) 387static int handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
354{ 388{
355 char msg[512]; 389 char msg[512];
356 u64 ignore_this_time = 0; 390 u64 ignore_this_time = 0;
@@ -379,6 +413,19 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
379 413
380 if (errs & E_SUM_ERRS) 414 if (errs & E_SUM_ERRS)
381 ignore_this_time = handle_e_sum_errs(dd, errs); 415 ignore_this_time = handle_e_sum_errs(dd, errs);
416 else if ((errs & E_SUM_LINK_PKTERRS) &&
417 !(dd->ipath_flags & IPATH_LINKACTIVE)) {
418 /*
419 * This can happen when SMA is trying to bring the link
420 * up, but the IB link changes state at the "wrong" time.
421 * The IB logic then complains that the packet isn't
422 * valid. We don't want to confuse people, so we just
423 * don't print them, except at debug
424 */
425 ipath_dbg("Ignoring packet errors %llx, because link not "
426 "ACTIVE\n", (unsigned long long) errs);
427 ignore_this_time = errs & E_SUM_LINK_PKTERRS;
428 }
382 429
383 if (supp_msgs == 250000) { 430 if (supp_msgs == 250000) {
384 /* 431 /*
@@ -397,7 +444,7 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
397 if ((dd->ipath_maskederrs & ~dd->ipath_ignorederrs) & 444 if ((dd->ipath_maskederrs & ~dd->ipath_ignorederrs) &
398 ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL)) 445 ~(INFINIPATH_E_RRCVEGRFULL | INFINIPATH_E_RRCVHDRFULL))
399 ipath_dev_err(dd, "Disabling error(s) %llx because " 446 ipath_dev_err(dd, "Disabling error(s) %llx because "
400 "occuring too frequently (%s)\n", 447 "occurring too frequently (%s)\n",
401 (unsigned long long) 448 (unsigned long long)
402 (dd->ipath_maskederrs & 449 (dd->ipath_maskederrs &
403 ~dd->ipath_ignorederrs), msg); 450 ~dd->ipath_ignorederrs), msg);
@@ -434,7 +481,7 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
434 INFINIPATH_E_IBSTATUSCHANGED); 481 INFINIPATH_E_IBSTATUSCHANGED);
435 } 482 }
436 if (!errs) 483 if (!errs)
437 return; 484 return 0;
438 485
439 if (!noprint) 486 if (!noprint)
440 /* 487 /*
@@ -493,10 +540,10 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
493 continue; 540 continue;
494 if (hd == (tl + 1) || 541 if (hd == (tl + 1) ||
495 (!hd && tl == dd->ipath_hdrqlast)) { 542 (!hd && tl == dd->ipath_hdrqlast)) {
496 dd->ipath_lastrcvhdrqtails[i] = tl;
497 pd->port_hdrqfull++;
498 if (i == 0) 543 if (i == 0)
499 chkerrpkts = 1; 544 chkerrpkts = 1;
545 dd->ipath_lastrcvhdrqtails[i] = tl;
546 pd->port_hdrqfull++;
500 } 547 }
501 } 548 }
502 } 549 }
@@ -558,9 +605,7 @@ static void handle_errors(struct ipath_devdata *dd, ipath_err_t errs)
558 wake_up_interruptible(&ipath_sma_state_wait); 605 wake_up_interruptible(&ipath_sma_state_wait);
559 } 606 }
560 607
561 if (chkerrpkts) 608 return chkerrpkts;
562 /* process possible error packets in hdrq */
563 ipath_kreceive(dd);
564} 609}
565 610
566/* this is separate to allow for better optimization of ipath_intr() */ 611/* this is separate to allow for better optimization of ipath_intr() */
@@ -678,7 +723,12 @@ set:
678 dd->ipath_sendctrl); 723 dd->ipath_sendctrl);
679} 724}
680 725
681static void handle_rcv(struct ipath_devdata *dd, u32 istat) 726/*
727 * Handle receive interrupts for user ports; this means a user
728 * process was waiting for a packet to arrive, and didn't want
729 * to poll
730 */
731static void handle_urcv(struct ipath_devdata *dd, u32 istat)
682{ 732{
683 u64 portr; 733 u64 portr;
684 int i; 734 int i;
@@ -688,22 +738,17 @@ static void handle_rcv(struct ipath_devdata *dd, u32 istat)
688 infinipath_i_rcvavail_mask) 738 infinipath_i_rcvavail_mask)
689 | ((istat >> INFINIPATH_I_RCVURG_SHIFT) & 739 | ((istat >> INFINIPATH_I_RCVURG_SHIFT) &
690 infinipath_i_rcvurg_mask); 740 infinipath_i_rcvurg_mask);
691 for (i = 0; i < dd->ipath_cfgports; i++) { 741 for (i = 1; i < dd->ipath_cfgports; i++) {
692 struct ipath_portdata *pd = dd->ipath_pd[i]; 742 struct ipath_portdata *pd = dd->ipath_pd[i];
693 if (portr & (1 << i) && pd && 743 if (portr & (1 << i) && pd && pd->port_cnt &&
694 pd->port_cnt) { 744 test_bit(IPATH_PORT_WAITING_RCV, &pd->port_flag)) {
695 if (i == 0) 745 int rcbit;
696 ipath_kreceive(dd); 746 clear_bit(IPATH_PORT_WAITING_RCV,
697 else if (test_bit(IPATH_PORT_WAITING_RCV, 747 &pd->port_flag);
698 &pd->port_flag)) { 748 rcbit = i + INFINIPATH_R_INTRAVAIL_SHIFT;
699 int rcbit; 749 clear_bit(1UL << rcbit, &dd->ipath_rcvctrl);
700 clear_bit(IPATH_PORT_WAITING_RCV, 750 wake_up_interruptible(&pd->port_wait);
701 &pd->port_flag); 751 rcvdint = 1;
702 rcbit = i + INFINIPATH_R_INTRAVAIL_SHIFT;
703 clear_bit(1UL << rcbit, &dd->ipath_rcvctrl);
704 wake_up_interruptible(&pd->port_wait);
705 rcvdint = 1;
706 }
707 } 752 }
708 } 753 }
709 if (rcvdint) { 754 if (rcvdint) {
@@ -719,16 +764,19 @@ static void handle_rcv(struct ipath_devdata *dd, u32 istat)
719irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs) 764irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs)
720{ 765{
721 struct ipath_devdata *dd = data; 766 struct ipath_devdata *dd = data;
722 u32 istat; 767 u32 istat, chk0rcv = 0;
723 ipath_err_t estat = 0; 768 ipath_err_t estat = 0;
724 static unsigned unexpected = 0;
725 irqreturn_t ret; 769 irqreturn_t ret;
770 u32 oldhead, curtail;
771 static unsigned unexpected = 0;
772 static const u32 port0rbits = (1U<<INFINIPATH_I_RCVAVAIL_SHIFT) |
773 (1U<<INFINIPATH_I_RCVURG_SHIFT);
774
775 ipath_stats.sps_ints++;
726 776
727 if(!(dd->ipath_flags & IPATH_PRESENT)) { 777 if (!(dd->ipath_flags & IPATH_PRESENT)) {
728 /* this is mostly so we don't try to touch the chip while
729 * it is being reset */
730 /* 778 /*
731 * This return value is perhaps odd, but we do not want the 779 * This return value is not great, but we do not want the
732 * interrupt core code to remove our interrupt handler 780 * interrupt core code to remove our interrupt handler
733 * because we don't appear to be handling an interrupt 781 * because we don't appear to be handling an interrupt
734 * during a chip reset. 782 * during a chip reset.
@@ -736,7 +784,51 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs)
736 return IRQ_HANDLED; 784 return IRQ_HANDLED;
737 } 785 }
738 786
787 /*
788 * this needs to be flags&initted, not statusp, so we keep
789 * taking interrupts even after link goes down, etc.
790 * Also, we *must* clear the interrupt at some point, or we won't
791 * take it again, which can be real bad for errors, etc...
792 */
793
794 if (!(dd->ipath_flags & IPATH_INITTED)) {
795 ipath_bad_intr(dd, &unexpected);
796 ret = IRQ_NONE;
797 goto bail;
798 }
799
800 /*
801 * We try to avoid reading the interrupt status register, since
802 * that's a PIO read, and stalls the processor for up to about
803 * ~0.25 usec. The idea is that if we processed a port0 packet,
804 * we blindly clear the port 0 receive interrupt bits, and nothing
805 * else, then return. If other interrupts are pending, the chip
806 * will re-interrupt us as soon as we write the intclear register.
807 * We then won't process any more kernel packets (if not the 2nd
808 * time, then the 3rd or 4th) and we'll then handle the other
809 * interrupts. We clear the interrupts first so that we don't
810 * lose intr for later packets that arrive while we are processing.
811 */
812 oldhead = dd->ipath_port0head;
813 curtail = (u32)le64_to_cpu(*dd->ipath_hdrqtailptr);
814 if (oldhead != curtail) {
815 if (dd->ipath_flags & IPATH_GPIO_INTR) {
816 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear,
817 (u64) (1 << 2));
818 istat = port0rbits | INFINIPATH_I_GPIO;
819 }
820 else
821 istat = port0rbits;
822 ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat);
823 ipath_kreceive(dd);
824 if (oldhead != dd->ipath_port0head) {
825 ipath_stats.sps_fastrcvint++;
826 goto done;
827 }
828 }
829
739 istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus); 830 istat = ipath_read_kreg32(dd, dd->ipath_kregs->kr_intstatus);
831
740 if (unlikely(!istat)) { 832 if (unlikely(!istat)) {
741 ipath_stats.sps_nullintr++; 833 ipath_stats.sps_nullintr++;
742 ret = IRQ_NONE; /* not our interrupt, or already handled */ 834 ret = IRQ_NONE; /* not our interrupt, or already handled */
@@ -749,31 +841,17 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs)
749 goto bail; 841 goto bail;
750 } 842 }
751 843
752 ipath_stats.sps_ints++;
753
754 /*
755 * this needs to be flags&initted, not statusp, so we keep
756 * taking interrupts even after link goes down, etc.
757 * Also, we *must* clear the interrupt at some point, or we won't
758 * take it again, which can be real bad for errors, etc...
759 */
760
761 if (!(dd->ipath_flags & IPATH_INITTED)) {
762 ipath_bad_intr(dd, &unexpected);
763 ret = IRQ_NONE;
764 goto bail;
765 }
766 if (unexpected) 844 if (unexpected)
767 unexpected = 0; 845 unexpected = 0;
768 846
769 ipath_cdbg(VERBOSE, "intr stat=0x%x\n", istat); 847 if (unlikely(istat & ~infinipath_i_bitsextant))
770
771 if (istat & ~infinipath_i_bitsextant)
772 ipath_dev_err(dd, 848 ipath_dev_err(dd,
773 "interrupt with unknown interrupts %x set\n", 849 "interrupt with unknown interrupts %x set\n",
774 istat & (u32) ~ infinipath_i_bitsextant); 850 istat & (u32) ~ infinipath_i_bitsextant);
851 else
852 ipath_cdbg(VERBOSE, "intr stat=0x%x\n", istat);
775 853
776 if (istat & INFINIPATH_I_ERROR) { 854 if (unlikely(istat & INFINIPATH_I_ERROR)) {
777 ipath_stats.sps_errints++; 855 ipath_stats.sps_errints++;
778 estat = ipath_read_kreg64(dd, 856 estat = ipath_read_kreg64(dd,
779 dd->ipath_kregs->kr_errorstatus); 857 dd->ipath_kregs->kr_errorstatus);
@@ -788,10 +866,18 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs)
788 ipath_dev_err(dd, "Read of error status failed " 866 ipath_dev_err(dd, "Read of error status failed "
789 "(all bits set); ignoring\n"); 867 "(all bits set); ignoring\n");
790 else 868 else
791 handle_errors(dd, estat); 869 if (handle_errors(dd, estat))
870 /* force calling ipath_kreceive() */
871 chk0rcv = 1;
792 } 872 }
793 873
794 if (istat & INFINIPATH_I_GPIO) { 874 if (istat & INFINIPATH_I_GPIO) {
875 /*
876 * Packets are available in the port 0 rcv queue.
877 * Eventually this needs to be generalized to check
878 * IPATH_GPIO_INTR, and the specific GPIO bit, if
879 * GPIO interrupts are used for anything else.
880 */
795 if (unlikely(!(dd->ipath_flags & IPATH_GPIO_INTR))) { 881 if (unlikely(!(dd->ipath_flags & IPATH_GPIO_INTR))) {
796 u32 gpiostatus; 882 u32 gpiostatus;
797 gpiostatus = ipath_read_kreg32( 883 gpiostatus = ipath_read_kreg32(
@@ -804,27 +890,39 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs)
804 else { 890 else {
805 /* Clear GPIO status bit 2 */ 891 /* Clear GPIO status bit 2 */
806 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear, 892 ipath_write_kreg(dd, dd->ipath_kregs->kr_gpio_clear,
807 (u64) (1 << 2)); 893 (u64) (1 << 2));
808 894 chk0rcv = 1;
809 /*
810 * Packets are available in the port 0 rcv queue.
811 * Eventually this needs to be generalized to check
812 * IPATH_GPIO_INTR, and the specific GPIO bit, if
813 * GPIO interrupts are used for anything else.
814 */
815 ipath_kreceive(dd);
816 } 895 }
817 } 896 }
897 chk0rcv |= istat & port0rbits;
818 898
819 /* 899 /*
820 * clear the ones we will deal with on this round 900 * Clear the interrupt bits we found set, unless they are receive
821 * We clear it early, mostly for receive interrupts, so we 901 * related, in which case we already cleared them above, and don't
822 * know the chip will have seen this by the time we process 902 * want to clear them again, because we might lose an interrupt.
823 * the queue, and will re-interrupt if necessary. The processor 903 * Clear it early, so we "know" know the chip will have seen this by
824 * itself won't take the interrupt again until we return. 904 * the time we process the queue, and will re-interrupt if necessary.
905 * The processor itself won't take the interrupt again until we return.
825 */ 906 */
826 ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat); 907 ipath_write_kreg(dd, dd->ipath_kregs->kr_intclear, istat);
827 908
909 /*
910 * handle port0 receive before checking for pio buffers available,
911 * since receives can overflow; piobuf waiters can afford a few
912 * extra cycles, since they were waiting anyway, and user's waiting
913 * for receive are at the bottom.
914 */
915 if (chk0rcv) {
916 ipath_kreceive(dd);
917 istat &= ~port0rbits;
918 }
919
920 if (istat & ((infinipath_i_rcvavail_mask <<
921 INFINIPATH_I_RCVAVAIL_SHIFT)
922 | (infinipath_i_rcvurg_mask <<
923 INFINIPATH_I_RCVURG_SHIFT)))
924 handle_urcv(dd, istat);
925
828 if (istat & INFINIPATH_I_SPIOBUFAVAIL) { 926 if (istat & INFINIPATH_I_SPIOBUFAVAIL) {
829 clear_bit(IPATH_S_PIOINTBUFAVAIL, &dd->ipath_sendctrl); 927 clear_bit(IPATH_S_PIOINTBUFAVAIL, &dd->ipath_sendctrl);
830 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl, 928 ipath_write_kreg(dd, dd->ipath_kregs->kr_sendctrl,
@@ -836,17 +934,7 @@ irqreturn_t ipath_intr(int irq, void *data, struct pt_regs *regs)
836 handle_layer_pioavail(dd); 934 handle_layer_pioavail(dd);
837 } 935 }
838 936
839 /* 937done:
840 * we check for both transition from empty to non-empty, and urgent
841 * packets (those with the interrupt bit set in the header)
842 */
843
844 if (istat & ((infinipath_i_rcvavail_mask <<
845 INFINIPATH_I_RCVAVAIL_SHIFT)
846 | (infinipath_i_rcvurg_mask <<
847 INFINIPATH_I_RCVURG_SHIFT)))
848 handle_rcv(dd, istat);
849
850 ret = IRQ_HANDLED; 938 ret = IRQ_HANDLED;
851 939
852bail: 940bail:
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h
index 5d92d57b6f5..e9f374fb641 100644
--- a/drivers/infiniband/hw/ipath/ipath_kernel.h
+++ b/drivers/infiniband/hw/ipath/ipath_kernel.h
@@ -1,6 +1,7 @@
1#ifndef _IPATH_KERNEL_H 1#ifndef _IPATH_KERNEL_H
2#define _IPATH_KERNEL_H 2#define _IPATH_KERNEL_H
3/* 3/*
4 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
4 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 5 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
5 * 6 *
6 * This software is available to you under a choice of one of two 7 * This software is available to you under a choice of one of two
@@ -61,9 +62,7 @@ struct ipath_portdata {
61 /* rcvhdrq base, needs mmap before useful */ 62 /* rcvhdrq base, needs mmap before useful */
62 void *port_rcvhdrq; 63 void *port_rcvhdrq;
63 /* kernel virtual address where hdrqtail is updated */ 64 /* kernel virtual address where hdrqtail is updated */
64 u64 *port_rcvhdrtail_kvaddr; 65 volatile __le64 *port_rcvhdrtail_kvaddr;
65 /* page * used for uaddr */
66 struct page *port_rcvhdrtail_pagep;
67 /* 66 /*
68 * temp buffer for expected send setup, allocated at open, instead 67 * temp buffer for expected send setup, allocated at open, instead
69 * of each setup call 68 * of each setup call
@@ -78,11 +77,7 @@ struct ipath_portdata {
78 dma_addr_t port_rcvegr_phys; 77 dma_addr_t port_rcvegr_phys;
79 /* mmap of hdrq, must fit in 44 bits */ 78 /* mmap of hdrq, must fit in 44 bits */
80 dma_addr_t port_rcvhdrq_phys; 79 dma_addr_t port_rcvhdrq_phys;
81 /* 80 dma_addr_t port_rcvhdrqtailaddr_phys;
82 * the actual user address that we ipath_mlock'ed, so we can
83 * ipath_munlock it at close
84 */
85 unsigned long port_rcvhdrtail_uaddr;
86 /* 81 /*
87 * number of opens on this instance (0 or 1; ignoring forks, dup, 82 * number of opens on this instance (0 or 1; ignoring forks, dup,
88 * etc. for now) 83 * etc. for now)
@@ -158,16 +153,10 @@ struct ipath_devdata {
158 /* base of memory alloced for ipath_kregbase, for free */ 153 /* base of memory alloced for ipath_kregbase, for free */
159 u64 *ipath_kregalloc; 154 u64 *ipath_kregalloc;
160 /* 155 /*
161 * version of kregbase that doesn't have high bits set (for 32 bit
162 * programs, so mmap64 44 bit works)
163 */
164 u64 __iomem *ipath_kregvirt;
165 /*
166 * virtual address where port0 rcvhdrqtail updated for this unit. 156 * virtual address where port0 rcvhdrqtail updated for this unit.
167 * only written to by the chip, not the driver. 157 * only written to by the chip, not the driver.
168 */ 158 */
169 volatile __le64 *ipath_hdrqtailptr; 159 volatile __le64 *ipath_hdrqtailptr;
170 dma_addr_t ipath_dma_addr;
171 /* ipath_cfgports pointers */ 160 /* ipath_cfgports pointers */
172 struct ipath_portdata **ipath_pd; 161 struct ipath_portdata **ipath_pd;
173 /* sk_buffs used by port 0 eager receive queue */ 162 /* sk_buffs used by port 0 eager receive queue */
@@ -354,13 +343,17 @@ struct ipath_devdata {
354 char *ipath_freezemsg; 343 char *ipath_freezemsg;
355 /* pci access data structure */ 344 /* pci access data structure */
356 struct pci_dev *pcidev; 345 struct pci_dev *pcidev;
357 struct cdev *cdev; 346 struct cdev *user_cdev;
358 struct class_device *class_dev; 347 struct cdev *diag_cdev;
348 struct class_device *user_class_dev;
349 struct class_device *diag_class_dev;
359 /* timer used to prevent stats overflow, error throttling, etc. */ 350 /* timer used to prevent stats overflow, error throttling, etc. */
360 struct timer_list ipath_stats_timer; 351 struct timer_list ipath_stats_timer;
361 /* check for stale messages in rcv queue */ 352 /* check for stale messages in rcv queue */
362 /* only allow one intr at a time. */ 353 /* only allow one intr at a time. */
363 unsigned long ipath_rcv_pending; 354 unsigned long ipath_rcv_pending;
355 void *ipath_dummy_hdrq; /* used after port close */
356 dma_addr_t ipath_dummy_hdrq_phys;
364 357
365 /* 358 /*
366 * Shadow copies of registers; size indicates read access size. 359 * Shadow copies of registers; size indicates read access size.
@@ -500,8 +493,11 @@ struct ipath_devdata {
500 u16 ipath_lid; 493 u16 ipath_lid;
501 /* list of pkeys programmed; 0 if not set */ 494 /* list of pkeys programmed; 0 if not set */
502 u16 ipath_pkeys[4]; 495 u16 ipath_pkeys[4];
503 /* ASCII serial number, from flash */ 496 /*
504 u8 ipath_serial[12]; 497 * ASCII serial number, from flash, large enough for original
498 * all digit strings, and longer QLogic serial number format
499 */
500 u8 ipath_serial[16];
505 /* human readable board version */ 501 /* human readable board version */
506 u8 ipath_boardversion[80]; 502 u8 ipath_boardversion[80];
507 /* chip major rev, from ipath_revision */ 503 /* chip major rev, from ipath_revision */
@@ -516,12 +512,12 @@ struct ipath_devdata {
516 u8 ipath_pci_cacheline; 512 u8 ipath_pci_cacheline;
517 /* LID mask control */ 513 /* LID mask control */
518 u8 ipath_lmc; 514 u8 ipath_lmc;
519};
520
521extern volatile __le64 *ipath_port0_rcvhdrtail;
522extern dma_addr_t ipath_port0_rcvhdrtail_dma;
523 515
524#define IPATH_PORT0_RCVHDRTAIL_SIZE PAGE_SIZE 516 /* local link integrity counter */
517 u32 ipath_lli_counter;
518 /* local link integrity errors */
519 u32 ipath_lli_errors;
520};
525 521
526extern struct list_head ipath_dev_list; 522extern struct list_head ipath_dev_list;
527extern spinlock_t ipath_devs_lock; 523extern spinlock_t ipath_devs_lock;
@@ -537,7 +533,7 @@ extern int __ipath_verbs_piobufavail(struct ipath_devdata *);
537extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32); 533extern int __ipath_verbs_rcv(struct ipath_devdata *, void *, void *, u32);
538 534
539void ipath_layer_add(struct ipath_devdata *); 535void ipath_layer_add(struct ipath_devdata *);
540void ipath_layer_del(struct ipath_devdata *); 536void ipath_layer_remove(struct ipath_devdata *);
541 537
542int ipath_init_chip(struct ipath_devdata *, int); 538int ipath_init_chip(struct ipath_devdata *, int);
543int ipath_enable_wc(struct ipath_devdata *dd); 539int ipath_enable_wc(struct ipath_devdata *dd);
@@ -551,14 +547,14 @@ int ipath_cdev_init(int minor, char *name, struct file_operations *fops,
551void ipath_cdev_cleanup(struct cdev **cdevp, 547void ipath_cdev_cleanup(struct cdev **cdevp,
552 struct class_device **class_devp); 548 struct class_device **class_devp);
553 549
554int ipath_diag_init(void); 550int ipath_diag_add(struct ipath_devdata *);
555void ipath_diag_cleanup(void); 551void ipath_diag_remove(struct ipath_devdata *);
556void ipath_diag_bringup_link(struct ipath_devdata *); 552void ipath_diag_bringup_link(struct ipath_devdata *);
557 553
558extern wait_queue_head_t ipath_sma_state_wait; 554extern wait_queue_head_t ipath_sma_state_wait;
559 555
560int ipath_user_add(struct ipath_devdata *dd); 556int ipath_user_add(struct ipath_devdata *dd);
561void ipath_user_del(struct ipath_devdata *dd); 557void ipath_user_remove(struct ipath_devdata *dd);
562 558
563struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t); 559struct sk_buff *ipath_alloc_skb(struct ipath_devdata *dd, gfp_t);
564 560
@@ -582,7 +578,7 @@ void ipath_disarm_piobufs(struct ipath_devdata *, unsigned first,
582 unsigned cnt); 578 unsigned cnt);
583 579
584int ipath_create_rcvhdrq(struct ipath_devdata *, struct ipath_portdata *); 580int ipath_create_rcvhdrq(struct ipath_devdata *, struct ipath_portdata *);
585void ipath_free_pddata(struct ipath_devdata *, u32, int); 581void ipath_free_pddata(struct ipath_devdata *, struct ipath_portdata *);
586 582
587int ipath_parse_ushort(const char *str, unsigned short *valp); 583int ipath_parse_ushort(const char *str, unsigned short *valp);
588 584
@@ -720,13 +716,8 @@ u64 ipath_read_kreg64_port(const struct ipath_devdata *, ipath_kreg,
720 * @port: port number 716 * @port: port number
721 * 717 *
722 * Return the contents of a register that is virtualized to be per port. 718 * Return the contents of a register that is virtualized to be per port.
723 * Prints a debug message and returns -1 on errors (not distinguishable from 719 * Returns -1 on errors (not distinguishable from valid contents at
724 * valid contents at runtime; we may add a separate error variable at some 720 * runtime; we may add a separate error variable at some point).
725 * point).
726 *
727 * This is normally not used by the kernel, but may be for debugging, and
728 * has a different implementation than user mode, which is why it's not in
729 * _common.h.
730 */ 721 */
731static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd, 722static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd,
732 ipath_ureg regno, int port) 723 ipath_ureg regno, int port)
@@ -842,9 +833,10 @@ extern struct mutex ipath_mutex;
842 833
843#define IPATH_DRV_NAME "ipath_core" 834#define IPATH_DRV_NAME "ipath_core"
844#define IPATH_MAJOR 233 835#define IPATH_MAJOR 233
836#define IPATH_USER_MINOR_BASE 0
845#define IPATH_SMA_MINOR 128 837#define IPATH_SMA_MINOR 128
846#define IPATH_DIAG_MINOR 129 838#define IPATH_DIAG_MINOR_BASE 129
847#define IPATH_NMINORS 130 839#define IPATH_NMINORS 255
848 840
849#define ipath_dev_err(dd,fmt,...) \ 841#define ipath_dev_err(dd,fmt,...) \
850 do { \ 842 do { \
diff --git a/drivers/infiniband/hw/ipath/ipath_keys.c b/drivers/infiniband/hw/ipath/ipath_keys.c
index 5ae8761f9dd..46773c673a1 100644
--- a/drivers/infiniband/hw/ipath/ipath_keys.c
+++ b/drivers/infiniband/hw/ipath/ipath_keys.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -120,6 +121,7 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge,
120 struct ib_sge *sge, int acc) 121 struct ib_sge *sge, int acc)
121{ 122{
122 struct ipath_mregion *mr; 123 struct ipath_mregion *mr;
124 unsigned n, m;
123 size_t off; 125 size_t off;
124 int ret; 126 int ret;
125 127
@@ -151,20 +153,22 @@ int ipath_lkey_ok(struct ipath_lkey_table *rkt, struct ipath_sge *isge,
151 } 153 }
152 154
153 off += mr->offset; 155 off += mr->offset;
154 isge->mr = mr; 156 m = 0;
155 isge->m = 0; 157 n = 0;
156 isge->n = 0; 158 while (off >= mr->map[m]->segs[n].length) {
157 while (off >= mr->map[isge->m]->segs[isge->n].length) { 159 off -= mr->map[m]->segs[n].length;
158 off -= mr->map[isge->m]->segs[isge->n].length; 160 n++;
159 isge->n++; 161 if (n >= IPATH_SEGSZ) {
160 if (isge->n >= IPATH_SEGSZ) { 162 m++;
161 isge->m++; 163 n = 0;
162 isge->n = 0;
163 } 164 }
164 } 165 }
165 isge->vaddr = mr->map[isge->m]->segs[isge->n].vaddr + off; 166 isge->mr = mr;
166 isge->length = mr->map[isge->m]->segs[isge->n].length - off; 167 isge->vaddr = mr->map[m]->segs[n].vaddr + off;
168 isge->length = mr->map[m]->segs[n].length - off;
167 isge->sge_length = sge->length; 169 isge->sge_length = sge->length;
170 isge->m = m;
171 isge->n = n;
168 172
169 ret = 1; 173 ret = 1;
170 174
@@ -189,6 +193,7 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss,
189 struct ipath_lkey_table *rkt = &dev->lk_table; 193 struct ipath_lkey_table *rkt = &dev->lk_table;
190 struct ipath_sge *sge = &ss->sge; 194 struct ipath_sge *sge = &ss->sge;
191 struct ipath_mregion *mr; 195 struct ipath_mregion *mr;
196 unsigned n, m;
192 size_t off; 197 size_t off;
193 int ret; 198 int ret;
194 199
@@ -206,20 +211,22 @@ int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss,
206 } 211 }
207 212
208 off += mr->offset; 213 off += mr->offset;
209 sge->mr = mr; 214 m = 0;
210 sge->m = 0; 215 n = 0;
211 sge->n = 0; 216 while (off >= mr->map[m]->segs[n].length) {
212 while (off >= mr->map[sge->m]->segs[sge->n].length) { 217 off -= mr->map[m]->segs[n].length;
213 off -= mr->map[sge->m]->segs[sge->n].length; 218 n++;
214 sge->n++; 219 if (n >= IPATH_SEGSZ) {
215 if (sge->n >= IPATH_SEGSZ) { 220 m++;
216 sge->m++; 221 n = 0;
217 sge->n = 0;
218 } 222 }
219 } 223 }
220 sge->vaddr = mr->map[sge->m]->segs[sge->n].vaddr + off; 224 sge->mr = mr;
221 sge->length = mr->map[sge->m]->segs[sge->n].length - off; 225 sge->vaddr = mr->map[m]->segs[n].vaddr + off;
226 sge->length = mr->map[m]->segs[n].length - off;
222 sge->sge_length = len; 227 sge->sge_length = len;
228 sge->m = m;
229 sge->n = n;
223 ss->sg_list = NULL; 230 ss->sg_list = NULL;
224 ss->num_sge = 1; 231 ss->num_sge = 1;
225 232
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.c b/drivers/infiniband/hw/ipath/ipath_layer.c
index 9ec4ac77b87..b28c6f81c73 100644
--- a/drivers/infiniband/hw/ipath/ipath_layer.c
+++ b/drivers/infiniband/hw/ipath/ipath_layer.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -40,8 +41,8 @@
40#include <asm/byteorder.h> 41#include <asm/byteorder.h>
41 42
42#include "ipath_kernel.h" 43#include "ipath_kernel.h"
43#include "ips_common.h"
44#include "ipath_layer.h" 44#include "ipath_layer.h"
45#include "ipath_common.h"
45 46
46/* Acquire before ipath_devs_lock. */ 47/* Acquire before ipath_devs_lock. */
47static DEFINE_MUTEX(ipath_layer_mutex); 48static DEFINE_MUTEX(ipath_layer_mutex);
@@ -299,9 +300,8 @@ bail:
299 300
300EXPORT_SYMBOL_GPL(ipath_layer_set_mtu); 301EXPORT_SYMBOL_GPL(ipath_layer_set_mtu);
301 302
302int ipath_set_sps_lid(struct ipath_devdata *dd, u32 arg, u8 lmc) 303int ipath_set_lid(struct ipath_devdata *dd, u32 arg, u8 lmc)
303{ 304{
304 ipath_stats.sps_lid[dd->ipath_unit] = arg;
305 dd->ipath_lid = arg; 305 dd->ipath_lid = arg;
306 dd->ipath_lmc = lmc; 306 dd->ipath_lmc = lmc;
307 307
@@ -315,7 +315,7 @@ int ipath_set_sps_lid(struct ipath_devdata *dd, u32 arg, u8 lmc)
315 return 0; 315 return 0;
316} 316}
317 317
318EXPORT_SYMBOL_GPL(ipath_set_sps_lid); 318EXPORT_SYMBOL_GPL(ipath_set_lid);
319 319
320int ipath_layer_set_guid(struct ipath_devdata *dd, __be64 guid) 320int ipath_layer_set_guid(struct ipath_devdata *dd, __be64 guid)
321{ 321{
@@ -340,18 +340,26 @@ u32 ipath_layer_get_nguid(struct ipath_devdata *dd)
340 340
341EXPORT_SYMBOL_GPL(ipath_layer_get_nguid); 341EXPORT_SYMBOL_GPL(ipath_layer_get_nguid);
342 342
343int ipath_layer_query_device(struct ipath_devdata *dd, u32 * vendor, 343u32 ipath_layer_get_majrev(struct ipath_devdata *dd)
344 u32 * boardrev, u32 * majrev, u32 * minrev)
345{ 344{
346 *vendor = dd->ipath_vendorid; 345 return dd->ipath_majrev;
347 *boardrev = dd->ipath_boardrev; 346}
348 *majrev = dd->ipath_majrev;
349 *minrev = dd->ipath_minrev;
350 347
351 return 0; 348EXPORT_SYMBOL_GPL(ipath_layer_get_majrev);
349
350u32 ipath_layer_get_minrev(struct ipath_devdata *dd)
351{
352 return dd->ipath_minrev;
353}
354
355EXPORT_SYMBOL_GPL(ipath_layer_get_minrev);
356
357u32 ipath_layer_get_pcirev(struct ipath_devdata *dd)
358{
359 return dd->ipath_pcirev;
352} 360}
353 361
354EXPORT_SYMBOL_GPL(ipath_layer_query_device); 362EXPORT_SYMBOL_GPL(ipath_layer_get_pcirev);
355 363
356u32 ipath_layer_get_flags(struct ipath_devdata *dd) 364u32 ipath_layer_get_flags(struct ipath_devdata *dd)
357{ 365{
@@ -374,6 +382,13 @@ u16 ipath_layer_get_deviceid(struct ipath_devdata *dd)
374 382
375EXPORT_SYMBOL_GPL(ipath_layer_get_deviceid); 383EXPORT_SYMBOL_GPL(ipath_layer_get_deviceid);
376 384
385u32 ipath_layer_get_vendorid(struct ipath_devdata *dd)
386{
387 return dd->ipath_vendorid;
388}
389
390EXPORT_SYMBOL_GPL(ipath_layer_get_vendorid);
391
377u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd) 392u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd)
378{ 393{
379 return dd->ipath_lastibcstat; 394 return dd->ipath_lastibcstat;
@@ -403,7 +418,7 @@ void ipath_layer_add(struct ipath_devdata *dd)
403 mutex_unlock(&ipath_layer_mutex); 418 mutex_unlock(&ipath_layer_mutex);
404} 419}
405 420
406void ipath_layer_del(struct ipath_devdata *dd) 421void ipath_layer_remove(struct ipath_devdata *dd)
407{ 422{
408 mutex_lock(&ipath_layer_mutex); 423 mutex_lock(&ipath_layer_mutex);
409 424
@@ -607,7 +622,7 @@ int ipath_layer_open(struct ipath_devdata *dd, u32 * pktmax)
607 goto bail; 622 goto bail;
608 } 623 }
609 624
610 ret = ipath_setrcvhdrsize(dd, NUM_OF_EXTRA_WORDS_IN_HEADER_QUEUE); 625 ret = ipath_setrcvhdrsize(dd, IPATH_HEADER_QUEUE_WORDS);
611 626
612 if (ret < 0) 627 if (ret < 0)
613 goto bail; 628 goto bail;
@@ -616,9 +631,9 @@ int ipath_layer_open(struct ipath_devdata *dd, u32 * pktmax)
616 631
617 if (*dd->ipath_statusp & IPATH_STATUS_IB_READY) 632 if (*dd->ipath_statusp & IPATH_STATUS_IB_READY)
618 intval |= IPATH_LAYER_INT_IF_UP; 633 intval |= IPATH_LAYER_INT_IF_UP;
619 if (ipath_stats.sps_lid[dd->ipath_unit]) 634 if (dd->ipath_lid)
620 intval |= IPATH_LAYER_INT_LID; 635 intval |= IPATH_LAYER_INT_LID;
621 if (ipath_stats.sps_mlid[dd->ipath_unit]) 636 if (dd->ipath_mlid)
622 intval |= IPATH_LAYER_INT_BCAST; 637 intval |= IPATH_LAYER_INT_BCAST;
623 /* 638 /*
624 * do this on open, in case low level is already up and 639 * do this on open, in case low level is already up and
@@ -884,7 +899,7 @@ static void copy_io(u32 __iomem *piobuf, struct ipath_sge_state *ss,
884/** 899/**
885 * ipath_verbs_send - send a packet from the verbs layer 900 * ipath_verbs_send - send a packet from the verbs layer
886 * @dd: the infinipath device 901 * @dd: the infinipath device
887 * @hdrwords: the number of works in the header 902 * @hdrwords: the number of words in the header
888 * @hdr: the packet header 903 * @hdr: the packet header
889 * @len: the length of the packet in bytes 904 * @len: the length of the packet in bytes
890 * @ss: the SGE to send 905 * @ss: the SGE to send
@@ -1016,19 +1031,22 @@ int ipath_layer_get_counters(struct ipath_devdata *dd,
1016 ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt); 1031 ipath_snap_cntr(dd, dd->ipath_cregs->cr_ibsymbolerrcnt);
1017 cntrs->link_error_recovery_counter = 1032 cntrs->link_error_recovery_counter =
1018 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt); 1033 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkerrrecovcnt);
1034 /*
1035 * The link downed counter counts when the other side downs the
1036 * connection. We add in the number of times we downed the link
1037 * due to local link integrity errors to compensate.
1038 */
1019 cntrs->link_downed_counter = 1039 cntrs->link_downed_counter =
1020 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt); 1040 ipath_snap_cntr(dd, dd->ipath_cregs->cr_iblinkdowncnt);
1021 cntrs->port_rcv_errors = 1041 cntrs->port_rcv_errors =
1022 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) + 1042 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rxdroppktcnt) +
1023 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) + 1043 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvovflcnt) +
1024 ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) + 1044 ipath_snap_cntr(dd, dd->ipath_cregs->cr_portovflcnt) +
1025 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errrcvflowctrlcnt) +
1026 ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) + 1045 ipath_snap_cntr(dd, dd->ipath_cregs->cr_err_rlencnt) +
1027 ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) + 1046 ipath_snap_cntr(dd, dd->ipath_cregs->cr_invalidrlencnt) +
1028 ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) + 1047 ipath_snap_cntr(dd, dd->ipath_cregs->cr_erricrccnt) +
1029 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) + 1048 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errvcrccnt) +
1030 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) + 1049 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlpcrccnt) +
1031 ipath_snap_cntr(dd, dd->ipath_cregs->cr_errlinkcnt) +
1032 ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt); 1050 ipath_snap_cntr(dd, dd->ipath_cregs->cr_badformatcnt);
1033 cntrs->port_rcv_remphys_errors = 1051 cntrs->port_rcv_remphys_errors =
1034 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt); 1052 ipath_snap_cntr(dd, dd->ipath_cregs->cr_rcvebpcnt);
@@ -1042,6 +1060,8 @@ int ipath_layer_get_counters(struct ipath_devdata *dd,
1042 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt); 1060 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktsendcnt);
1043 cntrs->port_rcv_packets = 1061 cntrs->port_rcv_packets =
1044 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt); 1062 ipath_snap_cntr(dd, dd->ipath_cregs->cr_pktrcvcnt);
1063 cntrs->local_link_integrity_errors = dd->ipath_lli_errors;
1064 cntrs->excessive_buffer_overrun_errors = 0; /* XXX */
1045 1065
1046 ret = 0; 1066 ret = 0;
1047 1067
@@ -1086,10 +1106,10 @@ int ipath_layer_send_hdr(struct ipath_devdata *dd, struct ether_header *hdr)
1086 } 1106 }
1087 1107
1088 vlsllnh = *((__be16 *) hdr); 1108 vlsllnh = *((__be16 *) hdr);
1089 if (vlsllnh != htons(IPS_LRH_BTH)) { 1109 if (vlsllnh != htons(IPATH_LRH_BTH)) {
1090 ipath_dbg("Warning: lrh[0] wrong (%x, not %x); " 1110 ipath_dbg("Warning: lrh[0] wrong (%x, not %x); "
1091 "not sending\n", be16_to_cpu(vlsllnh), 1111 "not sending\n", be16_to_cpu(vlsllnh),
1092 IPS_LRH_BTH); 1112 IPATH_LRH_BTH);
1093 ret = -EINVAL; 1113 ret = -EINVAL;
1094 } 1114 }
1095 if (ret) 1115 if (ret)
diff --git a/drivers/infiniband/hw/ipath/ipath_layer.h b/drivers/infiniband/hw/ipath/ipath_layer.h
index 6fefd15bd2d..71485096fca 100644
--- a/drivers/infiniband/hw/ipath/ipath_layer.h
+++ b/drivers/infiniband/hw/ipath/ipath_layer.h
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -54,6 +55,8 @@ struct ipath_layer_counters {
54 u64 port_rcv_data; 55 u64 port_rcv_data;
55 u64 port_xmit_packets; 56 u64 port_xmit_packets;
56 u64 port_rcv_packets; 57 u64 port_rcv_packets;
58 u32 local_link_integrity_errors;
59 u32 excessive_buffer_overrun_errors;
57}; 60};
58 61
59/* 62/*
@@ -126,7 +129,7 @@ u16 ipath_layer_get_bcast(struct ipath_devdata *dd);
126u32 ipath_layer_get_cr_errpkey(struct ipath_devdata *dd); 129u32 ipath_layer_get_cr_errpkey(struct ipath_devdata *dd);
127int ipath_layer_set_linkstate(struct ipath_devdata *dd, u8 state); 130int ipath_layer_set_linkstate(struct ipath_devdata *dd, u8 state);
128int ipath_layer_set_mtu(struct ipath_devdata *, u16); 131int ipath_layer_set_mtu(struct ipath_devdata *, u16);
129int ipath_set_sps_lid(struct ipath_devdata *, u32, u8); 132int ipath_set_lid(struct ipath_devdata *, u32, u8);
130int ipath_layer_send_hdr(struct ipath_devdata *dd, 133int ipath_layer_send_hdr(struct ipath_devdata *dd,
131 struct ether_header *hdr); 134 struct ether_header *hdr);
132int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords, 135int ipath_verbs_send(struct ipath_devdata *dd, u32 hdrwords,
@@ -143,11 +146,13 @@ int ipath_layer_want_buffer(struct ipath_devdata *dd);
143int ipath_layer_set_guid(struct ipath_devdata *, __be64 guid); 146int ipath_layer_set_guid(struct ipath_devdata *, __be64 guid);
144__be64 ipath_layer_get_guid(struct ipath_devdata *); 147__be64 ipath_layer_get_guid(struct ipath_devdata *);
145u32 ipath_layer_get_nguid(struct ipath_devdata *); 148u32 ipath_layer_get_nguid(struct ipath_devdata *);
146int ipath_layer_query_device(struct ipath_devdata *, u32 * vendor, 149u32 ipath_layer_get_majrev(struct ipath_devdata *);
147 u32 * boardrev, u32 * majrev, u32 * minrev); 150u32 ipath_layer_get_minrev(struct ipath_devdata *);
151u32 ipath_layer_get_pcirev(struct ipath_devdata *);
148u32 ipath_layer_get_flags(struct ipath_devdata *dd); 152u32 ipath_layer_get_flags(struct ipath_devdata *dd);
149struct device *ipath_layer_get_device(struct ipath_devdata *dd); 153struct device *ipath_layer_get_device(struct ipath_devdata *dd);
150u16 ipath_layer_get_deviceid(struct ipath_devdata *dd); 154u16 ipath_layer_get_deviceid(struct ipath_devdata *dd);
155u32 ipath_layer_get_vendorid(struct ipath_devdata *);
151u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd); 156u64 ipath_layer_get_lastibcstat(struct ipath_devdata *dd);
152u32 ipath_layer_get_ibmtu(struct ipath_devdata *dd); 157u32 ipath_layer_get_ibmtu(struct ipath_devdata *dd);
153int ipath_layer_enable_timer(struct ipath_devdata *dd); 158int ipath_layer_enable_timer(struct ipath_devdata *dd);
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c
index 1a9d0a2c33c..d3402341b7d 100644
--- a/drivers/infiniband/hw/ipath/ipath_mad.c
+++ b/drivers/infiniband/hw/ipath/ipath_mad.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -34,7 +35,7 @@
34 35
35#include "ipath_kernel.h" 36#include "ipath_kernel.h"
36#include "ipath_verbs.h" 37#include "ipath_verbs.h"
37#include "ips_common.h" 38#include "ipath_common.h"
38 39
39#define IB_SMP_UNSUP_VERSION __constant_htons(0x0004) 40#define IB_SMP_UNSUP_VERSION __constant_htons(0x0004)
40#define IB_SMP_UNSUP_METHOD __constant_htons(0x0008) 41#define IB_SMP_UNSUP_METHOD __constant_htons(0x0008)
@@ -84,7 +85,7 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp,
84{ 85{
85 struct nodeinfo *nip = (struct nodeinfo *)&smp->data; 86 struct nodeinfo *nip = (struct nodeinfo *)&smp->data;
86 struct ipath_devdata *dd = to_idev(ibdev)->dd; 87 struct ipath_devdata *dd = to_idev(ibdev)->dd;
87 u32 vendor, boardid, majrev, minrev; 88 u32 vendor, majrev, minrev;
88 89
89 if (smp->attr_mod) 90 if (smp->attr_mod)
90 smp->status |= IB_SMP_INVALID_FIELD; 91 smp->status |= IB_SMP_INVALID_FIELD;
@@ -104,9 +105,11 @@ static int recv_subn_get_nodeinfo(struct ib_smp *smp,
104 nip->port_guid = nip->sys_guid; 105 nip->port_guid = nip->sys_guid;
105 nip->partition_cap = cpu_to_be16(ipath_layer_get_npkeys(dd)); 106 nip->partition_cap = cpu_to_be16(ipath_layer_get_npkeys(dd));
106 nip->device_id = cpu_to_be16(ipath_layer_get_deviceid(dd)); 107 nip->device_id = cpu_to_be16(ipath_layer_get_deviceid(dd));
107 ipath_layer_query_device(dd, &vendor, &boardid, &majrev, &minrev); 108 majrev = ipath_layer_get_majrev(dd);
109 minrev = ipath_layer_get_minrev(dd);
108 nip->revision = cpu_to_be32((majrev << 16) | minrev); 110 nip->revision = cpu_to_be32((majrev << 16) | minrev);
109 nip->local_port_num = port; 111 nip->local_port_num = port;
112 vendor = ipath_layer_get_vendorid(dd);
110 nip->vendor_id[0] = 0; 113 nip->vendor_id[0] = 0;
111 nip->vendor_id[1] = vendor >> 8; 114 nip->vendor_id[1] = vendor >> 8;
112 nip->vendor_id[2] = vendor; 115 nip->vendor_id[2] = vendor;
@@ -215,7 +218,7 @@ static int recv_subn_get_portinfo(struct ib_smp *smp,
215 /* P_KeyViolations are counted by hardware. */ 218 /* P_KeyViolations are counted by hardware. */
216 pip->pkey_violations = 219 pip->pkey_violations =
217 cpu_to_be16((ipath_layer_get_cr_errpkey(dev->dd) - 220 cpu_to_be16((ipath_layer_get_cr_errpkey(dev->dd) -
218 dev->n_pkey_violations) & 0xFFFF); 221 dev->z_pkey_violations) & 0xFFFF);
219 pip->qkey_violations = cpu_to_be16(dev->qkey_violations); 222 pip->qkey_violations = cpu_to_be16(dev->qkey_violations);
220 /* Only the hardware GUID is supported for now */ 223 /* Only the hardware GUID is supported for now */
221 pip->guid_cap = 1; 224 pip->guid_cap = 1;
@@ -303,9 +306,9 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
303 lid = be16_to_cpu(pip->lid); 306 lid = be16_to_cpu(pip->lid);
304 if (lid != ipath_layer_get_lid(dev->dd)) { 307 if (lid != ipath_layer_get_lid(dev->dd)) {
305 /* Must be a valid unicast LID address. */ 308 /* Must be a valid unicast LID address. */
306 if (lid == 0 || lid >= IPS_MULTICAST_LID_BASE) 309 if (lid == 0 || lid >= IPATH_MULTICAST_LID_BASE)
307 goto err; 310 goto err;
308 ipath_set_sps_lid(dev->dd, lid, pip->mkeyprot_resv_lmc & 7); 311 ipath_set_lid(dev->dd, lid, pip->mkeyprot_resv_lmc & 7);
309 event.event = IB_EVENT_LID_CHANGE; 312 event.event = IB_EVENT_LID_CHANGE;
310 ib_dispatch_event(&event); 313 ib_dispatch_event(&event);
311 } 314 }
@@ -313,7 +316,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
313 smlid = be16_to_cpu(pip->sm_lid); 316 smlid = be16_to_cpu(pip->sm_lid);
314 if (smlid != dev->sm_lid) { 317 if (smlid != dev->sm_lid) {
315 /* Must be a valid unicast LID address. */ 318 /* Must be a valid unicast LID address. */
316 if (smlid == 0 || smlid >= IPS_MULTICAST_LID_BASE) 319 if (smlid == 0 || smlid >= IPATH_MULTICAST_LID_BASE)
317 goto err; 320 goto err;
318 dev->sm_lid = smlid; 321 dev->sm_lid = smlid;
319 event.event = IB_EVENT_SM_CHANGE; 322 event.event = IB_EVENT_SM_CHANGE;
@@ -389,7 +392,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp,
389 * later. 392 * later.
390 */ 393 */
391 if (pip->pkey_violations == 0) 394 if (pip->pkey_violations == 0)
392 dev->n_pkey_violations = 395 dev->z_pkey_violations =
393 ipath_layer_get_cr_errpkey(dev->dd); 396 ipath_layer_get_cr_errpkey(dev->dd);
394 397
395 if (pip->qkey_violations == 0) 398 if (pip->qkey_violations == 0)
@@ -610,6 +613,9 @@ struct ib_pma_portcounters {
610#define IB_PMA_SEL_PORT_RCV_ERRORS __constant_htons(0x0008) 613#define IB_PMA_SEL_PORT_RCV_ERRORS __constant_htons(0x0008)
611#define IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS __constant_htons(0x0010) 614#define IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS __constant_htons(0x0010)
612#define IB_PMA_SEL_PORT_XMIT_DISCARDS __constant_htons(0x0040) 615#define IB_PMA_SEL_PORT_XMIT_DISCARDS __constant_htons(0x0040)
616#define IB_PMA_SEL_LOCAL_LINK_INTEGRITY_ERRORS __constant_htons(0x0200)
617#define IB_PMA_SEL_EXCESSIVE_BUFFER_OVERRUNS __constant_htons(0x0400)
618#define IB_PMA_SEL_PORT_VL15_DROPPED __constant_htons(0x0800)
613#define IB_PMA_SEL_PORT_XMIT_DATA __constant_htons(0x1000) 619#define IB_PMA_SEL_PORT_XMIT_DATA __constant_htons(0x1000)
614#define IB_PMA_SEL_PORT_RCV_DATA __constant_htons(0x2000) 620#define IB_PMA_SEL_PORT_RCV_DATA __constant_htons(0x2000)
615#define IB_PMA_SEL_PORT_XMIT_PACKETS __constant_htons(0x4000) 621#define IB_PMA_SEL_PORT_XMIT_PACKETS __constant_htons(0x4000)
@@ -844,18 +850,22 @@ static int recv_pma_get_portcounters(struct ib_perf *pmp,
844 ipath_layer_get_counters(dev->dd, &cntrs); 850 ipath_layer_get_counters(dev->dd, &cntrs);
845 851
846 /* Adjust counters for any resets done. */ 852 /* Adjust counters for any resets done. */
847 cntrs.symbol_error_counter -= dev->n_symbol_error_counter; 853 cntrs.symbol_error_counter -= dev->z_symbol_error_counter;
848 cntrs.link_error_recovery_counter -= 854 cntrs.link_error_recovery_counter -=
849 dev->n_link_error_recovery_counter; 855 dev->z_link_error_recovery_counter;
850 cntrs.link_downed_counter -= dev->n_link_downed_counter; 856 cntrs.link_downed_counter -= dev->z_link_downed_counter;
851 cntrs.port_rcv_errors += dev->rcv_errors; 857 cntrs.port_rcv_errors += dev->rcv_errors;
852 cntrs.port_rcv_errors -= dev->n_port_rcv_errors; 858 cntrs.port_rcv_errors -= dev->z_port_rcv_errors;
853 cntrs.port_rcv_remphys_errors -= dev->n_port_rcv_remphys_errors; 859 cntrs.port_rcv_remphys_errors -= dev->z_port_rcv_remphys_errors;
854 cntrs.port_xmit_discards -= dev->n_port_xmit_discards; 860 cntrs.port_xmit_discards -= dev->z_port_xmit_discards;
855 cntrs.port_xmit_data -= dev->n_port_xmit_data; 861 cntrs.port_xmit_data -= dev->z_port_xmit_data;
856 cntrs.port_rcv_data -= dev->n_port_rcv_data; 862 cntrs.port_rcv_data -= dev->z_port_rcv_data;
857 cntrs.port_xmit_packets -= dev->n_port_xmit_packets; 863 cntrs.port_xmit_packets -= dev->z_port_xmit_packets;
858 cntrs.port_rcv_packets -= dev->n_port_rcv_packets; 864 cntrs.port_rcv_packets -= dev->z_port_rcv_packets;
865 cntrs.local_link_integrity_errors -=
866 dev->z_local_link_integrity_errors;
867 cntrs.excessive_buffer_overrun_errors -=
868 dev->z_excessive_buffer_overrun_errors;
859 869
860 memset(pmp->data, 0, sizeof(pmp->data)); 870 memset(pmp->data, 0, sizeof(pmp->data));
861 871
@@ -893,6 +903,16 @@ static int recv_pma_get_portcounters(struct ib_perf *pmp,
893 else 903 else
894 p->port_xmit_discards = 904 p->port_xmit_discards =
895 cpu_to_be16((u16)cntrs.port_xmit_discards); 905 cpu_to_be16((u16)cntrs.port_xmit_discards);
906 if (cntrs.local_link_integrity_errors > 0xFUL)
907 cntrs.local_link_integrity_errors = 0xFUL;
908 if (cntrs.excessive_buffer_overrun_errors > 0xFUL)
909 cntrs.excessive_buffer_overrun_errors = 0xFUL;
910 p->lli_ebor_errors = (cntrs.local_link_integrity_errors << 4) |
911 cntrs.excessive_buffer_overrun_errors;
912 if (dev->n_vl15_dropped > 0xFFFFUL)
913 p->vl15_dropped = __constant_cpu_to_be16(0xFFFF);
914 else
915 p->vl15_dropped = cpu_to_be16((u16)dev->n_vl15_dropped);
896 if (cntrs.port_xmit_data > 0xFFFFFFFFUL) 916 if (cntrs.port_xmit_data > 0xFFFFFFFFUL)
897 p->port_xmit_data = __constant_cpu_to_be32(0xFFFFFFFF); 917 p->port_xmit_data = __constant_cpu_to_be32(0xFFFFFFFF);
898 else 918 else
@@ -928,10 +948,10 @@ static int recv_pma_get_portcounters_ext(struct ib_perf *pmp,
928 &rpkts, &xwait); 948 &rpkts, &xwait);
929 949
930 /* Adjust counters for any resets done. */ 950 /* Adjust counters for any resets done. */
931 swords -= dev->n_port_xmit_data; 951 swords -= dev->z_port_xmit_data;
932 rwords -= dev->n_port_rcv_data; 952 rwords -= dev->z_port_rcv_data;
933 spkts -= dev->n_port_xmit_packets; 953 spkts -= dev->z_port_xmit_packets;
934 rpkts -= dev->n_port_rcv_packets; 954 rpkts -= dev->z_port_rcv_packets;
935 955
936 memset(pmp->data, 0, sizeof(pmp->data)); 956 memset(pmp->data, 0, sizeof(pmp->data));
937 957
@@ -967,37 +987,48 @@ static int recv_pma_set_portcounters(struct ib_perf *pmp,
967 ipath_layer_get_counters(dev->dd, &cntrs); 987 ipath_layer_get_counters(dev->dd, &cntrs);
968 988
969 if (p->counter_select & IB_PMA_SEL_SYMBOL_ERROR) 989 if (p->counter_select & IB_PMA_SEL_SYMBOL_ERROR)
970 dev->n_symbol_error_counter = cntrs.symbol_error_counter; 990 dev->z_symbol_error_counter = cntrs.symbol_error_counter;
971 991
972 if (p->counter_select & IB_PMA_SEL_LINK_ERROR_RECOVERY) 992 if (p->counter_select & IB_PMA_SEL_LINK_ERROR_RECOVERY)
973 dev->n_link_error_recovery_counter = 993 dev->z_link_error_recovery_counter =
974 cntrs.link_error_recovery_counter; 994 cntrs.link_error_recovery_counter;
975 995
976 if (p->counter_select & IB_PMA_SEL_LINK_DOWNED) 996 if (p->counter_select & IB_PMA_SEL_LINK_DOWNED)
977 dev->n_link_downed_counter = cntrs.link_downed_counter; 997 dev->z_link_downed_counter = cntrs.link_downed_counter;
978 998
979 if (p->counter_select & IB_PMA_SEL_PORT_RCV_ERRORS) 999 if (p->counter_select & IB_PMA_SEL_PORT_RCV_ERRORS)
980 dev->n_port_rcv_errors = 1000 dev->z_port_rcv_errors =
981 cntrs.port_rcv_errors + dev->rcv_errors; 1001 cntrs.port_rcv_errors + dev->rcv_errors;
982 1002
983 if (p->counter_select & IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS) 1003 if (p->counter_select & IB_PMA_SEL_PORT_RCV_REMPHYS_ERRORS)
984 dev->n_port_rcv_remphys_errors = 1004 dev->z_port_rcv_remphys_errors =
985 cntrs.port_rcv_remphys_errors; 1005 cntrs.port_rcv_remphys_errors;
986 1006
987 if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DISCARDS) 1007 if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DISCARDS)
988 dev->n_port_xmit_discards = cntrs.port_xmit_discards; 1008 dev->z_port_xmit_discards = cntrs.port_xmit_discards;
1009
1010 if (p->counter_select & IB_PMA_SEL_LOCAL_LINK_INTEGRITY_ERRORS)
1011 dev->z_local_link_integrity_errors =
1012 cntrs.local_link_integrity_errors;
1013
1014 if (p->counter_select & IB_PMA_SEL_EXCESSIVE_BUFFER_OVERRUNS)
1015 dev->z_excessive_buffer_overrun_errors =
1016 cntrs.excessive_buffer_overrun_errors;
1017
1018 if (p->counter_select & IB_PMA_SEL_PORT_VL15_DROPPED)
1019 dev->n_vl15_dropped = 0;
989 1020
990 if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DATA) 1021 if (p->counter_select & IB_PMA_SEL_PORT_XMIT_DATA)
991 dev->n_port_xmit_data = cntrs.port_xmit_data; 1022 dev->z_port_xmit_data = cntrs.port_xmit_data;
992 1023
993 if (p->counter_select & IB_PMA_SEL_PORT_RCV_DATA) 1024 if (p->counter_select & IB_PMA_SEL_PORT_RCV_DATA)
994 dev->n_port_rcv_data = cntrs.port_rcv_data; 1025 dev->z_port_rcv_data = cntrs.port_rcv_data;
995 1026
996 if (p->counter_select & IB_PMA_SEL_PORT_XMIT_PACKETS) 1027 if (p->counter_select & IB_PMA_SEL_PORT_XMIT_PACKETS)
997 dev->n_port_xmit_packets = cntrs.port_xmit_packets; 1028 dev->z_port_xmit_packets = cntrs.port_xmit_packets;
998 1029
999 if (p->counter_select & IB_PMA_SEL_PORT_RCV_PACKETS) 1030 if (p->counter_select & IB_PMA_SEL_PORT_RCV_PACKETS)
1000 dev->n_port_rcv_packets = cntrs.port_rcv_packets; 1031 dev->z_port_rcv_packets = cntrs.port_rcv_packets;
1001 1032
1002 return recv_pma_get_portcounters(pmp, ibdev, port); 1033 return recv_pma_get_portcounters(pmp, ibdev, port);
1003} 1034}
@@ -1014,16 +1045,16 @@ static int recv_pma_set_portcounters_ext(struct ib_perf *pmp,
1014 &rpkts, &xwait); 1045 &rpkts, &xwait);
1015 1046
1016 if (p->counter_select & IB_PMA_SELX_PORT_XMIT_DATA) 1047 if (p->counter_select & IB_PMA_SELX_PORT_XMIT_DATA)
1017 dev->n_port_xmit_data = swords; 1048 dev->z_port_xmit_data = swords;
1018 1049
1019 if (p->counter_select & IB_PMA_SELX_PORT_RCV_DATA) 1050 if (p->counter_select & IB_PMA_SELX_PORT_RCV_DATA)
1020 dev->n_port_rcv_data = rwords; 1051 dev->z_port_rcv_data = rwords;
1021 1052
1022 if (p->counter_select & IB_PMA_SELX_PORT_XMIT_PACKETS) 1053 if (p->counter_select & IB_PMA_SELX_PORT_XMIT_PACKETS)
1023 dev->n_port_xmit_packets = spkts; 1054 dev->z_port_xmit_packets = spkts;
1024 1055
1025 if (p->counter_select & IB_PMA_SELX_PORT_RCV_PACKETS) 1056 if (p->counter_select & IB_PMA_SELX_PORT_RCV_PACKETS)
1026 dev->n_port_rcv_packets = rpkts; 1057 dev->z_port_rcv_packets = rpkts;
1027 1058
1028 if (p->counter_select & IB_PMA_SELX_PORT_UNI_XMIT_PACKETS) 1059 if (p->counter_select & IB_PMA_SELX_PORT_UNI_XMIT_PACKETS)
1029 dev->n_unicast_xmit = 0; 1060 dev->n_unicast_xmit = 0;
@@ -1272,32 +1303,8 @@ int ipath_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num,
1272 struct ib_wc *in_wc, struct ib_grh *in_grh, 1303 struct ib_wc *in_wc, struct ib_grh *in_grh,
1273 struct ib_mad *in_mad, struct ib_mad *out_mad) 1304 struct ib_mad *in_mad, struct ib_mad *out_mad)
1274{ 1305{
1275 struct ipath_ibdev *dev = to_idev(ibdev);
1276 int ret; 1306 int ret;
1277 1307
1278 /*
1279 * Snapshot current HW counters to "clear" them.
1280 * This should be done when the driver is loaded except that for
1281 * some reason we get a zillion errors when brining up the link.
1282 */
1283 if (dev->rcv_errors == 0) {
1284 struct ipath_layer_counters cntrs;
1285
1286 ipath_layer_get_counters(to_idev(ibdev)->dd, &cntrs);
1287 dev->rcv_errors++;
1288 dev->n_symbol_error_counter = cntrs.symbol_error_counter;
1289 dev->n_link_error_recovery_counter =
1290 cntrs.link_error_recovery_counter;
1291 dev->n_link_downed_counter = cntrs.link_downed_counter;
1292 dev->n_port_rcv_errors = cntrs.port_rcv_errors + 1;
1293 dev->n_port_rcv_remphys_errors =
1294 cntrs.port_rcv_remphys_errors;
1295 dev->n_port_xmit_discards = cntrs.port_xmit_discards;
1296 dev->n_port_xmit_data = cntrs.port_xmit_data;
1297 dev->n_port_rcv_data = cntrs.port_rcv_data;
1298 dev->n_port_xmit_packets = cntrs.port_xmit_packets;
1299 dev->n_port_rcv_packets = cntrs.port_rcv_packets;
1300 }
1301 switch (in_mad->mad_hdr.mgmt_class) { 1308 switch (in_mad->mad_hdr.mgmt_class) {
1302 case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: 1309 case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE:
1303 case IB_MGMT_CLASS_SUBN_LID_ROUTED: 1310 case IB_MGMT_CLASS_SUBN_LID_ROUTED:
diff --git a/drivers/infiniband/hw/ipath/ipath_mr.c b/drivers/infiniband/hw/ipath/ipath_mr.c
index 69ffec66d45..4ac31a5da33 100644
--- a/drivers/infiniband/hw/ipath/ipath_mr.c
+++ b/drivers/infiniband/hw/ipath/ipath_mr.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -169,6 +170,11 @@ struct ib_mr *ipath_reg_user_mr(struct ib_pd *pd, struct ib_umem *region,
169 int n, m, i; 170 int n, m, i;
170 struct ib_mr *ret; 171 struct ib_mr *ret;
171 172
173 if (region->length == 0) {
174 ret = ERR_PTR(-EINVAL);
175 goto bail;
176 }
177
172 n = 0; 178 n = 0;
173 list_for_each_entry(chunk, &region->chunk_list, list) 179 list_for_each_entry(chunk, &region->chunk_list, list)
174 n += chunk->nents; 180 n += chunk->nents;
diff --git a/drivers/infiniband/hw/ipath/ipath_pe800.c b/drivers/infiniband/hw/ipath/ipath_pe800.c
index 02e8c75b24f..b83f66d8262 100644
--- a/drivers/infiniband/hw/ipath/ipath_pe800.c
+++ b/drivers/infiniband/hw/ipath/ipath_pe800.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -44,7 +45,7 @@
44 45
45/* 46/*
46 * This file contains all the chip-specific register information and 47 * This file contains all the chip-specific register information and
47 * access functions for the PathScale PE800, the PCI-Express chip. 48 * access functions for the QLogic InfiniPath PE800, the PCI-Express chip.
48 * 49 *
49 * This lists the InfiniPath PE800 registers, in the actual chip layout. 50 * This lists the InfiniPath PE800 registers, in the actual chip layout.
50 * This structure should never be directly accessed. 51 * This structure should never be directly accessed.
@@ -532,7 +533,7 @@ static int ipath_pe_boardname(struct ipath_devdata *dd, char *name,
532 if (n) 533 if (n)
533 snprintf(name, namelen, "%s", n); 534 snprintf(name, namelen, "%s", n);
534 535
535 if (dd->ipath_majrev != 4 || dd->ipath_minrev != 1) { 536 if (dd->ipath_majrev != 4 || !dd->ipath_minrev || dd->ipath_minrev>2) {
536 ipath_dev_err(dd, "Unsupported PE-800 revision %u.%u!\n", 537 ipath_dev_err(dd, "Unsupported PE-800 revision %u.%u!\n",
537 dd->ipath_majrev, dd->ipath_minrev); 538 dd->ipath_majrev, dd->ipath_minrev);
538 ret = 1; 539 ret = 1;
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c
index 9f8855d970c..83e557be591 100644
--- a/drivers/infiniband/hw/ipath/ipath_qp.c
+++ b/drivers/infiniband/hw/ipath/ipath_qp.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -34,7 +35,7 @@
34#include <linux/vmalloc.h> 35#include <linux/vmalloc.h>
35 36
36#include "ipath_verbs.h" 37#include "ipath_verbs.h"
37#include "ips_common.h" 38#include "ipath_common.h"
38 39
39#define BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE) 40#define BITS_PER_PAGE (PAGE_SIZE*BITS_PER_BYTE)
40#define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1) 41#define BITS_PER_PAGE_MASK (BITS_PER_PAGE-1)
@@ -332,10 +333,11 @@ static void ipath_reset_qp(struct ipath_qp *qp)
332 qp->remote_qpn = 0; 333 qp->remote_qpn = 0;
333 qp->qkey = 0; 334 qp->qkey = 0;
334 qp->qp_access_flags = 0; 335 qp->qp_access_flags = 0;
336 clear_bit(IPATH_S_BUSY, &qp->s_flags);
335 qp->s_hdrwords = 0; 337 qp->s_hdrwords = 0;
336 qp->s_psn = 0; 338 qp->s_psn = 0;
337 qp->r_psn = 0; 339 qp->r_psn = 0;
338 atomic_set(&qp->msn, 0); 340 qp->r_msn = 0;
339 if (qp->ibqp.qp_type == IB_QPT_RC) { 341 if (qp->ibqp.qp_type == IB_QPT_RC) {
340 qp->s_state = IB_OPCODE_RC_SEND_LAST; 342 qp->s_state = IB_OPCODE_RC_SEND_LAST;
341 qp->r_state = IB_OPCODE_RC_SEND_LAST; 343 qp->r_state = IB_OPCODE_RC_SEND_LAST;
@@ -344,7 +346,8 @@ static void ipath_reset_qp(struct ipath_qp *qp)
344 qp->r_state = IB_OPCODE_UC_SEND_LAST; 346 qp->r_state = IB_OPCODE_UC_SEND_LAST;
345 } 347 }
346 qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; 348 qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE;
347 qp->s_nak_state = 0; 349 qp->r_ack_state = IB_OPCODE_RC_ACKNOWLEDGE;
350 qp->r_nak_state = 0;
348 qp->s_rnr_timeout = 0; 351 qp->s_rnr_timeout = 0;
349 qp->s_head = 0; 352 qp->s_head = 0;
350 qp->s_tail = 0; 353 qp->s_tail = 0;
@@ -362,10 +365,10 @@ static void ipath_reset_qp(struct ipath_qp *qp)
362 * @qp: the QP to put into an error state 365 * @qp: the QP to put into an error state
363 * 366 *
364 * Flushes both send and receive work queues. 367 * Flushes both send and receive work queues.
365 * QP r_rq.lock and s_lock should be held. 368 * QP s_lock should be held and interrupts disabled.
366 */ 369 */
367 370
368static void ipath_error_qp(struct ipath_qp *qp) 371void ipath_error_qp(struct ipath_qp *qp)
369{ 372{
370 struct ipath_ibdev *dev = to_idev(qp->ibqp.device); 373 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);
371 struct ib_wc wc; 374 struct ib_wc wc;
@@ -408,12 +411,14 @@ static void ipath_error_qp(struct ipath_qp *qp)
408 qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE; 411 qp->s_ack_state = IB_OPCODE_RC_ACKNOWLEDGE;
409 412
410 wc.opcode = IB_WC_RECV; 413 wc.opcode = IB_WC_RECV;
414 spin_lock(&qp->r_rq.lock);
411 while (qp->r_rq.tail != qp->r_rq.head) { 415 while (qp->r_rq.tail != qp->r_rq.head) {
412 wc.wr_id = get_rwqe_ptr(&qp->r_rq, qp->r_rq.tail)->wr_id; 416 wc.wr_id = get_rwqe_ptr(&qp->r_rq, qp->r_rq.tail)->wr_id;
413 if (++qp->r_rq.tail >= qp->r_rq.size) 417 if (++qp->r_rq.tail >= qp->r_rq.size)
414 qp->r_rq.tail = 0; 418 qp->r_rq.tail = 0;
415 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 1); 419 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 1);
416 } 420 }
421 spin_unlock(&qp->r_rq.lock);
417} 422}
418 423
419/** 424/**
@@ -433,8 +438,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
433 unsigned long flags; 438 unsigned long flags;
434 int ret; 439 int ret;
435 440
436 spin_lock_irqsave(&qp->r_rq.lock, flags); 441 spin_lock_irqsave(&qp->s_lock, flags);
437 spin_lock(&qp->s_lock);
438 442
439 cur_state = attr_mask & IB_QP_CUR_STATE ? 443 cur_state = attr_mask & IB_QP_CUR_STATE ?
440 attr->cur_qp_state : qp->state; 444 attr->cur_qp_state : qp->state;
@@ -446,7 +450,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
446 450
447 if (attr_mask & IB_QP_AV) 451 if (attr_mask & IB_QP_AV)
448 if (attr->ah_attr.dlid == 0 || 452 if (attr->ah_attr.dlid == 0 ||
449 attr->ah_attr.dlid >= IPS_MULTICAST_LID_BASE) 453 attr->ah_attr.dlid >= IPATH_MULTICAST_LID_BASE)
450 goto inval; 454 goto inval;
451 455
452 if (attr_mask & IB_QP_PKEY_INDEX) 456 if (attr_mask & IB_QP_PKEY_INDEX)
@@ -505,34 +509,19 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
505 } 509 }
506 510
507 if (attr_mask & IB_QP_MIN_RNR_TIMER) 511 if (attr_mask & IB_QP_MIN_RNR_TIMER)
508 qp->s_min_rnr_timer = attr->min_rnr_timer; 512 qp->r_min_rnr_timer = attr->min_rnr_timer;
509 513
510 if (attr_mask & IB_QP_QKEY) 514 if (attr_mask & IB_QP_QKEY)
511 qp->qkey = attr->qkey; 515 qp->qkey = attr->qkey;
512 516
513 if (attr_mask & IB_QP_PKEY_INDEX)
514 qp->s_pkey_index = attr->pkey_index;
515
516 qp->state = new_state; 517 qp->state = new_state;
517 spin_unlock(&qp->s_lock); 518 spin_unlock_irqrestore(&qp->s_lock, flags);
518 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
519
520 /*
521 * If QP1 changed to the RTS state, try to move to the link to INIT
522 * even if it was ACTIVE so the SM will reinitialize the SMA's
523 * state.
524 */
525 if (qp->ibqp.qp_num == 1 && new_state == IB_QPS_RTS) {
526 struct ipath_ibdev *dev = to_idev(ibqp->device);
527 519
528 ipath_layer_set_linkstate(dev->dd, IPATH_IB_LINKDOWN);
529 }
530 ret = 0; 520 ret = 0;
531 goto bail; 521 goto bail;
532 522
533inval: 523inval:
534 spin_unlock(&qp->s_lock); 524 spin_unlock_irqrestore(&qp->s_lock, flags);
535 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
536 ret = -EINVAL; 525 ret = -EINVAL;
537 526
538bail: 527bail:
@@ -566,7 +555,7 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
566 attr->sq_draining = 0; 555 attr->sq_draining = 0;
567 attr->max_rd_atomic = 1; 556 attr->max_rd_atomic = 1;
568 attr->max_dest_rd_atomic = 1; 557 attr->max_dest_rd_atomic = 1;
569 attr->min_rnr_timer = qp->s_min_rnr_timer; 558 attr->min_rnr_timer = qp->r_min_rnr_timer;
570 attr->port_num = 1; 559 attr->port_num = 1;
571 attr->timeout = 0; 560 attr->timeout = 0;
572 attr->retry_cnt = qp->s_retry_cnt; 561 attr->retry_cnt = qp->s_retry_cnt;
@@ -593,21 +582,17 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
593 * @qp: the queue pair to compute the AETH for 582 * @qp: the queue pair to compute the AETH for
594 * 583 *
595 * Returns the AETH. 584 * Returns the AETH.
596 *
597 * The QP s_lock should be held.
598 */ 585 */
599__be32 ipath_compute_aeth(struct ipath_qp *qp) 586__be32 ipath_compute_aeth(struct ipath_qp *qp)
600{ 587{
601 u32 aeth = atomic_read(&qp->msn) & IPS_MSN_MASK; 588 u32 aeth = qp->r_msn & IPATH_MSN_MASK;
602 589
603 if (qp->s_nak_state) { 590 if (qp->ibqp.srq) {
604 aeth |= qp->s_nak_state << IPS_AETH_CREDIT_SHIFT;
605 } else if (qp->ibqp.srq) {
606 /* 591 /*
607 * Shared receive queues don't generate credits. 592 * Shared receive queues don't generate credits.
608 * Set the credit field to the invalid value. 593 * Set the credit field to the invalid value.
609 */ 594 */
610 aeth |= IPS_AETH_CREDIT_INVAL << IPS_AETH_CREDIT_SHIFT; 595 aeth |= IPATH_AETH_CREDIT_INVAL << IPATH_AETH_CREDIT_SHIFT;
611 } else { 596 } else {
612 u32 min, max, x; 597 u32 min, max, x;
613 u32 credits; 598 u32 credits;
@@ -637,7 +622,7 @@ __be32 ipath_compute_aeth(struct ipath_qp *qp)
637 else 622 else
638 min = x; 623 min = x;
639 } 624 }
640 aeth |= x << IPS_AETH_CREDIT_SHIFT; 625 aeth |= x << IPATH_AETH_CREDIT_SHIFT;
641 } 626 }
642 return cpu_to_be32(aeth); 627 return cpu_to_be32(aeth);
643} 628}
@@ -663,12 +648,22 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
663 size_t sz; 648 size_t sz;
664 struct ib_qp *ret; 649 struct ib_qp *ret;
665 650
666 if (init_attr->cap.max_send_sge > 255 || 651 if (init_attr->cap.max_send_sge > ib_ipath_max_sges ||
667 init_attr->cap.max_recv_sge > 255) { 652 init_attr->cap.max_recv_sge > ib_ipath_max_sges ||
653 init_attr->cap.max_send_wr > ib_ipath_max_qp_wrs ||
654 init_attr->cap.max_recv_wr > ib_ipath_max_qp_wrs) {
668 ret = ERR_PTR(-ENOMEM); 655 ret = ERR_PTR(-ENOMEM);
669 goto bail; 656 goto bail;
670 } 657 }
671 658
659 if (init_attr->cap.max_send_sge +
660 init_attr->cap.max_recv_sge +
661 init_attr->cap.max_send_wr +
662 init_attr->cap.max_recv_wr == 0) {
663 ret = ERR_PTR(-EINVAL);
664 goto bail;
665 }
666
672 switch (init_attr->qp_type) { 667 switch (init_attr->qp_type) {
673 case IB_QPT_UC: 668 case IB_QPT_UC:
674 case IB_QPT_RC: 669 case IB_QPT_RC:
@@ -686,18 +681,26 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
686 case IB_QPT_GSI: 681 case IB_QPT_GSI:
687 qp = kmalloc(sizeof(*qp), GFP_KERNEL); 682 qp = kmalloc(sizeof(*qp), GFP_KERNEL);
688 if (!qp) { 683 if (!qp) {
684 vfree(swq);
689 ret = ERR_PTR(-ENOMEM); 685 ret = ERR_PTR(-ENOMEM);
690 goto bail; 686 goto bail;
691 } 687 }
692 qp->r_rq.size = init_attr->cap.max_recv_wr + 1; 688 if (init_attr->srq) {
693 sz = sizeof(struct ipath_sge) * 689 qp->r_rq.size = 0;
694 init_attr->cap.max_recv_sge + 690 qp->r_rq.max_sge = 0;
695 sizeof(struct ipath_rwqe); 691 qp->r_rq.wq = NULL;
696 qp->r_rq.wq = vmalloc(qp->r_rq.size * sz); 692 } else {
697 if (!qp->r_rq.wq) { 693 qp->r_rq.size = init_attr->cap.max_recv_wr + 1;
698 kfree(qp); 694 qp->r_rq.max_sge = init_attr->cap.max_recv_sge;
699 ret = ERR_PTR(-ENOMEM); 695 sz = (sizeof(struct ipath_sge) * qp->r_rq.max_sge) +
700 goto bail; 696 sizeof(struct ipath_rwqe);
697 qp->r_rq.wq = vmalloc(qp->r_rq.size * sz);
698 if (!qp->r_rq.wq) {
699 kfree(qp);
700 vfree(swq);
701 ret = ERR_PTR(-ENOMEM);
702 goto bail;
703 }
701 } 704 }
702 705
703 /* 706 /*
@@ -708,9 +711,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
708 spin_lock_init(&qp->r_rq.lock); 711 spin_lock_init(&qp->r_rq.lock);
709 atomic_set(&qp->refcount, 0); 712 atomic_set(&qp->refcount, 0);
710 init_waitqueue_head(&qp->wait); 713 init_waitqueue_head(&qp->wait);
711 tasklet_init(&qp->s_task, 714 tasklet_init(&qp->s_task, ipath_do_ruc_send,
712 init_attr->qp_type == IB_QPT_RC ?
713 ipath_do_rc_send : ipath_do_uc_send,
714 (unsigned long)qp); 715 (unsigned long)qp);
715 INIT_LIST_HEAD(&qp->piowait); 716 INIT_LIST_HEAD(&qp->piowait);
716 INIT_LIST_HEAD(&qp->timerwait); 717 INIT_LIST_HEAD(&qp->timerwait);
@@ -718,7 +719,6 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
718 qp->s_wq = swq; 719 qp->s_wq = swq;
719 qp->s_size = init_attr->cap.max_send_wr + 1; 720 qp->s_size = init_attr->cap.max_send_wr + 1;
720 qp->s_max_sge = init_attr->cap.max_send_sge; 721 qp->s_max_sge = init_attr->cap.max_send_sge;
721 qp->r_rq.max_sge = init_attr->cap.max_recv_sge;
722 qp->s_flags = init_attr->sq_sig_type == IB_SIGNAL_REQ_WR ? 722 qp->s_flags = init_attr->sq_sig_type == IB_SIGNAL_REQ_WR ?
723 1 << IPATH_S_SIGNAL_REQ_WR : 0; 723 1 << IPATH_S_SIGNAL_REQ_WR : 0;
724 dev = to_idev(ibpd->device); 724 dev = to_idev(ibpd->device);
@@ -888,18 +888,18 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc)
888 */ 888 */
889void ipath_get_credit(struct ipath_qp *qp, u32 aeth) 889void ipath_get_credit(struct ipath_qp *qp, u32 aeth)
890{ 890{
891 u32 credit = (aeth >> IPS_AETH_CREDIT_SHIFT) & IPS_AETH_CREDIT_MASK; 891 u32 credit = (aeth >> IPATH_AETH_CREDIT_SHIFT) & IPATH_AETH_CREDIT_MASK;
892 892
893 /* 893 /*
894 * If the credit is invalid, we can send 894 * If the credit is invalid, we can send
895 * as many packets as we like. Otherwise, we have to 895 * as many packets as we like. Otherwise, we have to
896 * honor the credit field. 896 * honor the credit field.
897 */ 897 */
898 if (credit == IPS_AETH_CREDIT_INVAL) { 898 if (credit == IPATH_AETH_CREDIT_INVAL)
899 qp->s_lsn = (u32) -1; 899 qp->s_lsn = (u32) -1;
900 } else if (qp->s_lsn != (u32) -1) { 900 else if (qp->s_lsn != (u32) -1) {
901 /* Compute new LSN (i.e., MSN + credit) */ 901 /* Compute new LSN (i.e., MSN + credit) */
902 credit = (aeth + credit_table[credit]) & IPS_MSN_MASK; 902 credit = (aeth + credit_table[credit]) & IPATH_MSN_MASK;
903 if (ipath_cmp24(credit, qp->s_lsn) > 0) 903 if (ipath_cmp24(credit, qp->s_lsn) > 0)
904 qp->s_lsn = credit; 904 qp->s_lsn = credit;
905 } 905 }
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c
index 493b1821a93..774d1615ce2 100644
--- a/drivers/infiniband/hw/ipath/ipath_rc.c
+++ b/drivers/infiniband/hw/ipath/ipath_rc.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -31,7 +32,7 @@
31 */ 32 */
32 33
33#include "ipath_verbs.h" 34#include "ipath_verbs.h"
34#include "ips_common.h" 35#include "ipath_common.h"
35 36
36/* cut down ridiculously long IB macro names */ 37/* cut down ridiculously long IB macro names */
37#define OP(x) IB_OPCODE_RC_##x 38#define OP(x) IB_OPCODE_RC_##x
@@ -41,14 +42,14 @@
41 * @qp: the QP who's SGE we're restarting 42 * @qp: the QP who's SGE we're restarting
42 * @wqe: the work queue to initialize the QP's SGE from 43 * @wqe: the work queue to initialize the QP's SGE from
43 * 44 *
44 * The QP s_lock should be held. 45 * The QP s_lock should be held and interrupts disabled.
45 */ 46 */
46static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe) 47static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe)
47{ 48{
48 struct ipath_ibdev *dev; 49 struct ipath_ibdev *dev;
49 u32 len; 50 u32 len;
50 51
51 len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * 52 len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) *
52 ib_mtu_enum_to_int(qp->path_mtu); 53 ib_mtu_enum_to_int(qp->path_mtu);
53 qp->s_sge.sge = wqe->sg_list[0]; 54 qp->s_sge.sge = wqe->sg_list[0];
54 qp->s_sge.sg_list = wqe->sg_list + 1; 55 qp->s_sge.sg_list = wqe->sg_list + 1;
@@ -72,11 +73,10 @@ static void ipath_init_restart(struct ipath_qp *qp, struct ipath_swqe *wqe)
72 * Return bth0 if constructed; otherwise, return 0. 73 * Return bth0 if constructed; otherwise, return 0.
73 * Note the QP s_lock must be held. 74 * Note the QP s_lock must be held.
74 */ 75 */
75static inline u32 ipath_make_rc_ack(struct ipath_qp *qp, 76u32 ipath_make_rc_ack(struct ipath_qp *qp,
76 struct ipath_other_headers *ohdr, 77 struct ipath_other_headers *ohdr,
77 u32 pmtu) 78 u32 pmtu)
78{ 79{
79 struct ipath_sge_state *ss;
80 u32 hwords; 80 u32 hwords;
81 u32 len; 81 u32 len;
82 u32 bth0; 82 u32 bth0;
@@ -90,13 +90,12 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp,
90 */ 90 */
91 switch (qp->s_ack_state) { 91 switch (qp->s_ack_state) {
92 case OP(RDMA_READ_REQUEST): 92 case OP(RDMA_READ_REQUEST):
93 ss = &qp->s_rdma_sge; 93 qp->s_cur_sge = &qp->s_rdma_sge;
94 len = qp->s_rdma_len; 94 len = qp->s_rdma_len;
95 if (len > pmtu) { 95 if (len > pmtu) {
96 len = pmtu; 96 len = pmtu;
97 qp->s_ack_state = OP(RDMA_READ_RESPONSE_FIRST); 97 qp->s_ack_state = OP(RDMA_READ_RESPONSE_FIRST);
98 } 98 } else
99 else
100 qp->s_ack_state = OP(RDMA_READ_RESPONSE_ONLY); 99 qp->s_ack_state = OP(RDMA_READ_RESPONSE_ONLY);
101 qp->s_rdma_len -= len; 100 qp->s_rdma_len -= len;
102 bth0 = qp->s_ack_state << 24; 101 bth0 = qp->s_ack_state << 24;
@@ -108,7 +107,7 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp,
108 qp->s_ack_state = OP(RDMA_READ_RESPONSE_MIDDLE); 107 qp->s_ack_state = OP(RDMA_READ_RESPONSE_MIDDLE);
109 /* FALLTHROUGH */ 108 /* FALLTHROUGH */
110 case OP(RDMA_READ_RESPONSE_MIDDLE): 109 case OP(RDMA_READ_RESPONSE_MIDDLE):
111 ss = &qp->s_rdma_sge; 110 qp->s_cur_sge = &qp->s_rdma_sge;
112 len = qp->s_rdma_len; 111 len = qp->s_rdma_len;
113 if (len > pmtu) 112 if (len > pmtu)
114 len = pmtu; 113 len = pmtu;
@@ -127,41 +126,50 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp,
127 * We have to prevent new requests from changing 126 * We have to prevent new requests from changing
128 * the r_sge state while a ipath_verbs_send() 127 * the r_sge state while a ipath_verbs_send()
129 * is in progress. 128 * is in progress.
130 * Changing r_state allows the receiver
131 * to continue processing new packets.
132 * We do it here now instead of above so
133 * that we are sure the packet was sent before
134 * changing the state.
135 */ 129 */
136 qp->r_state = OP(RDMA_READ_RESPONSE_LAST);
137 qp->s_ack_state = OP(ACKNOWLEDGE); 130 qp->s_ack_state = OP(ACKNOWLEDGE);
138 return 0; 131 bth0 = 0;
132 goto bail;
139 133
140 case OP(COMPARE_SWAP): 134 case OP(COMPARE_SWAP):
141 case OP(FETCH_ADD): 135 case OP(FETCH_ADD):
142 ss = NULL; 136 qp->s_cur_sge = NULL;
143 len = 0; 137 len = 0;
144 qp->r_state = OP(SEND_LAST); 138 /*
145 qp->s_ack_state = OP(ACKNOWLEDGE); 139 * Set the s_ack_state so the receive interrupt handler
146 bth0 = IB_OPCODE_ATOMIC_ACKNOWLEDGE << 24; 140 * won't try to send an ACK (out of order) until this one
141 * is actually sent.
142 */
143 qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST);
144 bth0 = OP(ATOMIC_ACKNOWLEDGE) << 24;
147 ohdr->u.at.aeth = ipath_compute_aeth(qp); 145 ohdr->u.at.aeth = ipath_compute_aeth(qp);
148 ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->s_ack_atomic); 146 ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->r_atomic_data);
149 hwords += sizeof(ohdr->u.at) / 4; 147 hwords += sizeof(ohdr->u.at) / 4;
150 break; 148 break;
151 149
152 default: 150 default:
153 /* Send a regular ACK. */ 151 /* Send a regular ACK. */
154 ss = NULL; 152 qp->s_cur_sge = NULL;
155 len = 0; 153 len = 0;
156 qp->s_ack_state = OP(ACKNOWLEDGE); 154 /*
157 bth0 = qp->s_ack_state << 24; 155 * Set the s_ack_state so the receive interrupt handler
158 ohdr->u.aeth = ipath_compute_aeth(qp); 156 * won't try to send an ACK (out of order) until this one
157 * is actually sent.
158 */
159 qp->s_ack_state = OP(RDMA_READ_RESPONSE_LAST);
160 bth0 = OP(ACKNOWLEDGE) << 24;
161 if (qp->s_nak_state)
162 ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) |
163 (qp->s_nak_state <<
164 IPATH_AETH_CREDIT_SHIFT));
165 else
166 ohdr->u.aeth = ipath_compute_aeth(qp);
159 hwords++; 167 hwords++;
160 } 168 }
161 qp->s_hdrwords = hwords; 169 qp->s_hdrwords = hwords;
162 qp->s_cur_sge = ss;
163 qp->s_cur_size = len; 170 qp->s_cur_size = len;
164 171
172bail:
165 return bth0; 173 return bth0;
166} 174}
167 175
@@ -174,11 +182,11 @@ static inline u32 ipath_make_rc_ack(struct ipath_qp *qp,
174 * @bth2p: pointer to the BTH PSN word 182 * @bth2p: pointer to the BTH PSN word
175 * 183 *
176 * Return 1 if constructed; otherwise, return 0. 184 * Return 1 if constructed; otherwise, return 0.
177 * Note the QP s_lock must be held. 185 * Note the QP s_lock must be held and interrupts disabled.
178 */ 186 */
179static inline int ipath_make_rc_req(struct ipath_qp *qp, 187int ipath_make_rc_req(struct ipath_qp *qp,
180 struct ipath_other_headers *ohdr, 188 struct ipath_other_headers *ohdr,
181 u32 pmtu, u32 *bth0p, u32 *bth2p) 189 u32 pmtu, u32 *bth0p, u32 *bth2p)
182{ 190{
183 struct ipath_ibdev *dev = to_idev(qp->ibqp.device); 191 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);
184 struct ipath_sge_state *ss; 192 struct ipath_sge_state *ss;
@@ -257,7 +265,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
257 break; 265 break;
258 266
259 case IB_WR_RDMA_WRITE: 267 case IB_WR_RDMA_WRITE:
260 if (newreq) 268 if (newreq && qp->s_lsn != (u32) -1)
261 qp->s_lsn++; 269 qp->s_lsn++;
262 /* FALLTHROUGH */ 270 /* FALLTHROUGH */
263 case IB_WR_RDMA_WRITE_WITH_IMM: 271 case IB_WR_RDMA_WRITE_WITH_IMM:
@@ -283,8 +291,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
283 else { 291 else {
284 qp->s_state = 292 qp->s_state =
285 OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE); 293 OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE);
286 /* Immediate data comes 294 /* Immediate data comes after RETH */
287 * after RETH */
288 ohdr->u.rc.imm_data = wqe->wr.imm_data; 295 ohdr->u.rc.imm_data = wqe->wr.imm_data;
289 hwords += 1; 296 hwords += 1;
290 if (wqe->wr.send_flags & IB_SEND_SOLICITED) 297 if (wqe->wr.send_flags & IB_SEND_SOLICITED)
@@ -304,7 +311,8 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
304 qp->s_state = OP(RDMA_READ_REQUEST); 311 qp->s_state = OP(RDMA_READ_REQUEST);
305 hwords += sizeof(ohdr->u.rc.reth) / 4; 312 hwords += sizeof(ohdr->u.rc.reth) / 4;
306 if (newreq) { 313 if (newreq) {
307 qp->s_lsn++; 314 if (qp->s_lsn != (u32) -1)
315 qp->s_lsn++;
308 /* 316 /*
309 * Adjust s_next_psn to count the 317 * Adjust s_next_psn to count the
310 * expected number of responses. 318 * expected number of responses.
@@ -335,7 +343,8 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
335 wqe->wr.wr.atomic.compare_add); 343 wqe->wr.wr.atomic.compare_add);
336 hwords += sizeof(struct ib_atomic_eth) / 4; 344 hwords += sizeof(struct ib_atomic_eth) / 4;
337 if (newreq) { 345 if (newreq) {
338 qp->s_lsn++; 346 if (qp->s_lsn != (u32) -1)
347 qp->s_lsn++;
339 wqe->lpsn = wqe->psn; 348 wqe->lpsn = wqe->psn;
340 } 349 }
341 if (++qp->s_cur == qp->s_size) 350 if (++qp->s_cur == qp->s_size)
@@ -352,9 +361,14 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
352 if (qp->s_tail >= qp->s_size) 361 if (qp->s_tail >= qp->s_size)
353 qp->s_tail = 0; 362 qp->s_tail = 0;
354 } 363 }
355 bth2 |= qp->s_psn++ & IPS_PSN_MASK; 364 bth2 |= qp->s_psn++ & IPATH_PSN_MASK;
356 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 365 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
357 qp->s_next_psn = qp->s_psn; 366 qp->s_next_psn = qp->s_psn;
367 /*
368 * Put the QP on the pending list so lost ACKs will cause
369 * a retry. More than one request can be pending so the
370 * QP may already be on the dev->pending list.
371 */
358 spin_lock(&dev->pending_lock); 372 spin_lock(&dev->pending_lock);
359 if (list_empty(&qp->timerwait)) 373 if (list_empty(&qp->timerwait))
360 list_add_tail(&qp->timerwait, 374 list_add_tail(&qp->timerwait,
@@ -364,8 +378,8 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
364 378
365 case OP(RDMA_READ_RESPONSE_FIRST): 379 case OP(RDMA_READ_RESPONSE_FIRST):
366 /* 380 /*
367 * This case can only happen if a send is restarted. See 381 * This case can only happen if a send is restarted.
368 * ipath_restart_rc(). 382 * See ipath_restart_rc().
369 */ 383 */
370 ipath_init_restart(qp, wqe); 384 ipath_init_restart(qp, wqe);
371 /* FALLTHROUGH */ 385 /* FALLTHROUGH */
@@ -373,7 +387,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
373 qp->s_state = OP(SEND_MIDDLE); 387 qp->s_state = OP(SEND_MIDDLE);
374 /* FALLTHROUGH */ 388 /* FALLTHROUGH */
375 case OP(SEND_MIDDLE): 389 case OP(SEND_MIDDLE):
376 bth2 = qp->s_psn++ & IPS_PSN_MASK; 390 bth2 = qp->s_psn++ & IPATH_PSN_MASK;
377 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 391 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
378 qp->s_next_psn = qp->s_psn; 392 qp->s_next_psn = qp->s_psn;
379 ss = &qp->s_sge; 393 ss = &qp->s_sge;
@@ -415,7 +429,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
415 qp->s_state = OP(RDMA_WRITE_MIDDLE); 429 qp->s_state = OP(RDMA_WRITE_MIDDLE);
416 /* FALLTHROUGH */ 430 /* FALLTHROUGH */
417 case OP(RDMA_WRITE_MIDDLE): 431 case OP(RDMA_WRITE_MIDDLE):
418 bth2 = qp->s_psn++ & IPS_PSN_MASK; 432 bth2 = qp->s_psn++ & IPATH_PSN_MASK;
419 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 433 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
420 qp->s_next_psn = qp->s_psn; 434 qp->s_next_psn = qp->s_psn;
421 ss = &qp->s_sge; 435 ss = &qp->s_sge;
@@ -452,7 +466,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
452 * See ipath_restart_rc(). 466 * See ipath_restart_rc().
453 */ 467 */
454 ipath_init_restart(qp, wqe); 468 ipath_init_restart(qp, wqe);
455 len = ((qp->s_psn - wqe->psn) & IPS_PSN_MASK) * pmtu; 469 len = ((qp->s_psn - wqe->psn) & IPATH_PSN_MASK) * pmtu;
456 ohdr->u.rc.reth.vaddr = 470 ohdr->u.rc.reth.vaddr =
457 cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len); 471 cpu_to_be64(wqe->wr.wr.rdma.remote_addr + len);
458 ohdr->u.rc.reth.rkey = 472 ohdr->u.rc.reth.rkey =
@@ -460,7 +474,7 @@ static inline int ipath_make_rc_req(struct ipath_qp *qp,
460 ohdr->u.rc.reth.length = cpu_to_be32(qp->s_len); 474 ohdr->u.rc.reth.length = cpu_to_be32(qp->s_len);
461 qp->s_state = OP(RDMA_READ_REQUEST); 475 qp->s_state = OP(RDMA_READ_REQUEST);
462 hwords += sizeof(ohdr->u.rc.reth) / 4; 476 hwords += sizeof(ohdr->u.rc.reth) / 4;
463 bth2 = qp->s_psn++ & IPS_PSN_MASK; 477 bth2 = qp->s_psn++ & IPATH_PSN_MASK;
464 if ((int)(qp->s_psn - qp->s_next_psn) > 0) 478 if ((int)(qp->s_psn - qp->s_next_psn) > 0)
465 qp->s_next_psn = qp->s_psn; 479 qp->s_next_psn = qp->s_psn;
466 ss = NULL; 480 ss = NULL;
@@ -496,189 +510,169 @@ done:
496 return 0; 510 return 0;
497} 511}
498 512
499static inline void ipath_make_rc_grh(struct ipath_qp *qp,
500 struct ib_global_route *grh,
501 u32 nwords)
502{
503 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);
504
505 /* GRH header size in 32-bit words. */
506 qp->s_hdrwords += 10;
507 qp->s_hdr.u.l.grh.version_tclass_flow =
508 cpu_to_be32((6 << 28) |
509 (grh->traffic_class << 20) |
510 grh->flow_label);
511 qp->s_hdr.u.l.grh.paylen =
512 cpu_to_be16(((qp->s_hdrwords - 12) + nwords +
513 SIZE_OF_CRC) << 2);
514 /* next_hdr is defined by C8-7 in ch. 8.4.1 */
515 qp->s_hdr.u.l.grh.next_hdr = 0x1B;
516 qp->s_hdr.u.l.grh.hop_limit = grh->hop_limit;
517 /* The SGID is 32-bit aligned. */
518 qp->s_hdr.u.l.grh.sgid.global.subnet_prefix = dev->gid_prefix;
519 qp->s_hdr.u.l.grh.sgid.global.interface_id =
520 ipath_layer_get_guid(dev->dd);
521 qp->s_hdr.u.l.grh.dgid = grh->dgid;
522}
523
524/** 513/**
525 * ipath_do_rc_send - perform a send on an RC QP 514 * send_rc_ack - Construct an ACK packet and send it
526 * @data: contains a pointer to the QP 515 * @qp: a pointer to the QP
527 * 516 *
528 * Process entries in the send work queue until credit or queue is 517 * This is called from ipath_rc_rcv() and only uses the receive
529 * exhausted. Only allow one CPU to send a packet per QP (tasklet). 518 * side QP state.
530 * Otherwise, after we drop the QP s_lock, two threads could send 519 * Note that RDMA reads are handled in the send side QP state and tasklet.
531 * packets out of order.
532 */ 520 */
533void ipath_do_rc_send(unsigned long data) 521static void send_rc_ack(struct ipath_qp *qp)
534{ 522{
535 struct ipath_qp *qp = (struct ipath_qp *)data;
536 struct ipath_ibdev *dev = to_idev(qp->ibqp.device); 523 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);
537 unsigned long flags;
538 u16 lrh0; 524 u16 lrh0;
539 u32 nwords;
540 u32 extra_bytes;
541 u32 bth0; 525 u32 bth0;
542 u32 bth2; 526 u32 hwords;
543 u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); 527 struct ipath_ib_header hdr;
544 struct ipath_other_headers *ohdr; 528 struct ipath_other_headers *ohdr;
545 529
546 if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags))
547 goto bail;
548
549 if (unlikely(qp->remote_ah_attr.dlid ==
550 ipath_layer_get_lid(dev->dd))) {
551 struct ib_wc wc;
552
553 /*
554 * Pass in an uninitialized ib_wc to be consistent with
555 * other places where ipath_ruc_loopback() is called.
556 */
557 ipath_ruc_loopback(qp, &wc);
558 goto clear;
559 }
560
561 ohdr = &qp->s_hdr.u.oth;
562 if (qp->remote_ah_attr.ah_flags & IB_AH_GRH)
563 ohdr = &qp->s_hdr.u.l.oth;
564
565again:
566 /* Check for a constructed packet to be sent. */
567 if (qp->s_hdrwords != 0) {
568 /*
569 * If no PIO bufs are available, return. An interrupt will
570 * call ipath_ib_piobufavail() when one is available.
571 */
572 _VERBS_INFO("h %u %p\n", qp->s_hdrwords, &qp->s_hdr);
573 _VERBS_INFO("d %u %p %u %p %u %u %u %u\n", qp->s_cur_size,
574 qp->s_cur_sge->sg_list,
575 qp->s_cur_sge->num_sge,
576 qp->s_cur_sge->sge.vaddr,
577 qp->s_cur_sge->sge.sge_length,
578 qp->s_cur_sge->sge.length,
579 qp->s_cur_sge->sge.m,
580 qp->s_cur_sge->sge.n);
581 if (ipath_verbs_send(dev->dd, qp->s_hdrwords,
582 (u32 *) &qp->s_hdr, qp->s_cur_size,
583 qp->s_cur_sge)) {
584 ipath_no_bufs_available(qp, dev);
585 goto bail;
586 }
587 dev->n_unicast_xmit++;
588 /* Record that we sent the packet and s_hdr is empty. */
589 qp->s_hdrwords = 0;
590 }
591
592 /*
593 * The lock is needed to synchronize between setting
594 * qp->s_ack_state, resend timer, and post_send().
595 */
596 spin_lock_irqsave(&qp->s_lock, flags);
597
598 /* Sending responses has higher priority over sending requests. */
599 if (qp->s_ack_state != OP(ACKNOWLEDGE) &&
600 (bth0 = ipath_make_rc_ack(qp, ohdr, pmtu)) != 0)
601 bth2 = qp->s_ack_psn++ & IPS_PSN_MASK;
602 else if (!ipath_make_rc_req(qp, ohdr, pmtu, &bth0, &bth2))
603 goto done;
604
605 spin_unlock_irqrestore(&qp->s_lock, flags);
606
607 /* Construct the header. */ 530 /* Construct the header. */
608 extra_bytes = (4 - qp->s_cur_size) & 3; 531 ohdr = &hdr.u.oth;
609 nwords = (qp->s_cur_size + extra_bytes) >> 2; 532 lrh0 = IPATH_LRH_BTH;
610 lrh0 = IPS_LRH_BTH; 533 /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */
534 hwords = 6;
611 if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { 535 if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) {
612 ipath_make_rc_grh(qp, &qp->remote_ah_attr.grh, nwords); 536 hwords += ipath_make_grh(dev, &hdr.u.l.grh,
613 lrh0 = IPS_LRH_GRH; 537 &qp->remote_ah_attr.grh,
538 hwords, 0);
539 ohdr = &hdr.u.l.oth;
540 lrh0 = IPATH_LRH_GRH;
614 } 541 }
542 /* read pkey_index w/o lock (its atomic) */
543 bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index);
544 if (qp->r_nak_state)
545 ohdr->u.aeth = cpu_to_be32((qp->r_msn & IPATH_MSN_MASK) |
546 (qp->r_nak_state <<
547 IPATH_AETH_CREDIT_SHIFT));
548 else
549 ohdr->u.aeth = ipath_compute_aeth(qp);
550 if (qp->r_ack_state >= OP(COMPARE_SWAP)) {
551 bth0 |= OP(ATOMIC_ACKNOWLEDGE) << 24;
552 ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->r_atomic_data);
553 hwords += sizeof(ohdr->u.at.atomic_ack_eth) / 4;
554 } else
555 bth0 |= OP(ACKNOWLEDGE) << 24;
615 lrh0 |= qp->remote_ah_attr.sl << 4; 556 lrh0 |= qp->remote_ah_attr.sl << 4;
616 qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); 557 hdr.lrh[0] = cpu_to_be16(lrh0);
617 qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid); 558 hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid);
618 qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords + 559 hdr.lrh[2] = cpu_to_be16(hwords + SIZE_OF_CRC);
619 SIZE_OF_CRC); 560 hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd));
620 qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd));
621 bth0 |= ipath_layer_get_pkey(dev->dd, qp->s_pkey_index);
622 bth0 |= extra_bytes << 20;
623 ohdr->bth[0] = cpu_to_be32(bth0); 561 ohdr->bth[0] = cpu_to_be32(bth0);
624 ohdr->bth[1] = cpu_to_be32(qp->remote_qpn); 562 ohdr->bth[1] = cpu_to_be32(qp->remote_qpn);
625 ohdr->bth[2] = cpu_to_be32(bth2); 563 ohdr->bth[2] = cpu_to_be32(qp->r_ack_psn & IPATH_PSN_MASK);
626 564
627 /* Check for more work to do. */ 565 /*
628 goto again; 566 * If we can send the ACK, clear the ACK state.
567 */
568 if (ipath_verbs_send(dev->dd, hwords, (u32 *) &hdr, 0, NULL) == 0) {
569 qp->r_ack_state = OP(ACKNOWLEDGE);
570 dev->n_unicast_xmit++;
571 } else {
572 /*
573 * We are out of PIO buffers at the moment.
574 * Pass responsibility for sending the ACK to the
575 * send tasklet so that when a PIO buffer becomes
576 * available, the ACK is sent ahead of other outgoing
577 * packets.
578 */
579 dev->n_rc_qacks++;
580 spin_lock_irq(&qp->s_lock);
581 /* Don't coalesce if a RDMA read or atomic is pending. */
582 if (qp->s_ack_state == OP(ACKNOWLEDGE) ||
583 qp->s_ack_state < OP(RDMA_READ_REQUEST)) {
584 qp->s_ack_state = qp->r_ack_state;
585 qp->s_nak_state = qp->r_nak_state;
586 qp->s_ack_psn = qp->r_ack_psn;
587 qp->r_ack_state = OP(ACKNOWLEDGE);
588 }
589 spin_unlock_irq(&qp->s_lock);
629 590
630done: 591 /* Call ipath_do_rc_send() in another thread. */
631 spin_unlock_irqrestore(&qp->s_lock, flags); 592 tasklet_hi_schedule(&qp->s_task);
632clear: 593 }
633 clear_bit(IPATH_S_BUSY, &qp->s_flags);
634bail:
635 return;
636} 594}
637 595
638static void send_rc_ack(struct ipath_qp *qp) 596/**
597 * reset_psn - reset the QP state to send starting from PSN
598 * @qp: the QP
599 * @psn: the packet sequence number to restart at
600 *
601 * This is called from ipath_rc_rcv() to process an incoming RC ACK
602 * for the given QP.
603 * Called at interrupt level with the QP s_lock held.
604 */
605static void reset_psn(struct ipath_qp *qp, u32 psn)
639{ 606{
640 struct ipath_ibdev *dev = to_idev(qp->ibqp.device); 607 u32 n = qp->s_last;
641 u16 lrh0; 608 struct ipath_swqe *wqe = get_swqe_ptr(qp, n);
642 u32 bth0; 609 u32 opcode;
643 struct ipath_other_headers *ohdr;
644 610
645 /* Construct the header. */ 611 qp->s_cur = n;
646 ohdr = &qp->s_hdr.u.oth; 612
647 lrh0 = IPS_LRH_BTH; 613 /*
648 /* header size in 32-bit words LRH+BTH+AETH = (8+12+4)/4. */ 614 * If we are starting the request from the beginning,
649 qp->s_hdrwords = 6; 615 * let the normal send code handle initialization.
650 if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) { 616 */
651 ipath_make_rc_grh(qp, &qp->remote_ah_attr.grh, 0); 617 if (ipath_cmp24(psn, wqe->psn) <= 0) {
652 ohdr = &qp->s_hdr.u.l.oth; 618 qp->s_state = OP(SEND_LAST);
653 lrh0 = IPS_LRH_GRH; 619 goto done;
654 } 620 }
655 bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); 621
656 ohdr->u.aeth = ipath_compute_aeth(qp); 622 /* Find the work request opcode corresponding to the given PSN. */
657 if (qp->s_ack_state >= OP(COMPARE_SWAP)) { 623 opcode = wqe->wr.opcode;
658 bth0 |= IB_OPCODE_ATOMIC_ACKNOWLEDGE << 24; 624 for (;;) {
659 ohdr->u.at.atomic_ack_eth = cpu_to_be64(qp->s_ack_atomic); 625 int diff;
660 qp->s_hdrwords += sizeof(ohdr->u.at.atomic_ack_eth) / 4; 626
627 if (++n == qp->s_size)
628 n = 0;
629 if (n == qp->s_tail)
630 break;
631 wqe = get_swqe_ptr(qp, n);
632 diff = ipath_cmp24(psn, wqe->psn);
633 if (diff < 0)
634 break;
635 qp->s_cur = n;
636 /*
637 * If we are starting the request from the beginning,
638 * let the normal send code handle initialization.
639 */
640 if (diff == 0) {
641 qp->s_state = OP(SEND_LAST);
642 goto done;
643 }
644 opcode = wqe->wr.opcode;
661 } 645 }
662 else
663 bth0 |= OP(ACKNOWLEDGE) << 24;
664 lrh0 |= qp->remote_ah_attr.sl << 4;
665 qp->s_hdr.lrh[0] = cpu_to_be16(lrh0);
666 qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid);
667 qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + SIZE_OF_CRC);
668 qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd));
669 ohdr->bth[0] = cpu_to_be32(bth0);
670 ohdr->bth[1] = cpu_to_be32(qp->remote_qpn);
671 ohdr->bth[2] = cpu_to_be32(qp->s_ack_psn & IPS_PSN_MASK);
672 646
673 /* 647 /*
674 * If we can send the ACK, clear the ACK state. 648 * Set the state to restart in the middle of a request.
649 * Don't change the s_sge, s_cur_sge, or s_cur_size.
650 * See ipath_do_rc_send().
675 */ 651 */
676 if (ipath_verbs_send(dev->dd, qp->s_hdrwords, (u32 *) &qp->s_hdr, 652 switch (opcode) {
677 0, NULL) == 0) { 653 case IB_WR_SEND:
678 qp->s_ack_state = OP(ACKNOWLEDGE); 654 case IB_WR_SEND_WITH_IMM:
679 dev->n_rc_qacks++; 655 qp->s_state = OP(RDMA_READ_RESPONSE_FIRST);
680 dev->n_unicast_xmit++; 656 break;
657
658 case IB_WR_RDMA_WRITE:
659 case IB_WR_RDMA_WRITE_WITH_IMM:
660 qp->s_state = OP(RDMA_READ_RESPONSE_LAST);
661 break;
662
663 case IB_WR_RDMA_READ:
664 qp->s_state = OP(RDMA_READ_RESPONSE_MIDDLE);
665 break;
666
667 default:
668 /*
669 * This case shouldn't happen since its only
670 * one PSN per req.
671 */
672 qp->s_state = OP(SEND_LAST);
681 } 673 }
674done:
675 qp->s_psn = psn;
682} 676}
683 677
684/** 678/**
@@ -687,13 +681,12 @@ static void send_rc_ack(struct ipath_qp *qp)
687 * @psn: packet sequence number for the request 681 * @psn: packet sequence number for the request
688 * @wc: the work completion request 682 * @wc: the work completion request
689 * 683 *
690 * The QP s_lock should be held. 684 * The QP s_lock should be held and interrupts disabled.
691 */ 685 */
692void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc) 686void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc)
693{ 687{
694 struct ipath_swqe *wqe = get_swqe_ptr(qp, qp->s_last); 688 struct ipath_swqe *wqe = get_swqe_ptr(qp, qp->s_last);
695 struct ipath_ibdev *dev; 689 struct ipath_ibdev *dev;
696 u32 n;
697 690
698 /* 691 /*
699 * If there are no requests pending, we are done. 692 * If there are no requests pending, we are done.
@@ -735,62 +728,7 @@ void ipath_restart_rc(struct ipath_qp *qp, u32 psn, struct ib_wc *wc)
735 else 728 else
736 dev->n_rc_resends += (int)qp->s_psn - (int)psn; 729 dev->n_rc_resends += (int)qp->s_psn - (int)psn;
737 730
738 /* 731 reset_psn(qp, psn);
739 * If we are starting the request from the beginning, let the normal
740 * send code handle initialization.
741 */
742 qp->s_cur = qp->s_last;
743 if (ipath_cmp24(psn, wqe->psn) <= 0) {
744 qp->s_state = OP(SEND_LAST);
745 qp->s_psn = wqe->psn;
746 } else {
747 n = qp->s_cur;
748 for (;;) {
749 if (++n == qp->s_size)
750 n = 0;
751 if (n == qp->s_tail) {
752 if (ipath_cmp24(psn, qp->s_next_psn) >= 0) {
753 qp->s_cur = n;
754 wqe = get_swqe_ptr(qp, n);
755 }
756 break;
757 }
758 wqe = get_swqe_ptr(qp, n);
759 if (ipath_cmp24(psn, wqe->psn) < 0)
760 break;
761 qp->s_cur = n;
762 }
763 qp->s_psn = psn;
764
765 /*
766 * Reset the state to restart in the middle of a request.
767 * Don't change the s_sge, s_cur_sge, or s_cur_size.
768 * See ipath_do_rc_send().
769 */
770 switch (wqe->wr.opcode) {
771 case IB_WR_SEND:
772 case IB_WR_SEND_WITH_IMM:
773 qp->s_state = OP(RDMA_READ_RESPONSE_FIRST);
774 break;
775
776 case IB_WR_RDMA_WRITE:
777 case IB_WR_RDMA_WRITE_WITH_IMM:
778 qp->s_state = OP(RDMA_READ_RESPONSE_LAST);
779 break;
780
781 case IB_WR_RDMA_READ:
782 qp->s_state =
783 OP(RDMA_READ_RESPONSE_MIDDLE);
784 break;
785
786 default:
787 /*
788 * This case shouldn't happen since its only
789 * one PSN per req.
790 */
791 qp->s_state = OP(SEND_LAST);
792 }
793 }
794 732
795done: 733done:
796 tasklet_hi_schedule(&qp->s_task); 734 tasklet_hi_schedule(&qp->s_task);
@@ -800,76 +738,14 @@ bail:
800} 738}
801 739
802/** 740/**
803 * reset_psn - reset the QP state to send starting from PSN
804 * @qp: the QP
805 * @psn: the packet sequence number to restart at
806 *
807 * This is called from ipath_rc_rcv() to process an incoming RC ACK
808 * for the given QP.
809 * Called at interrupt level with the QP s_lock held.
810 */
811static void reset_psn(struct ipath_qp *qp, u32 psn)
812{
813 struct ipath_swqe *wqe;
814 u32 n;
815
816 n = qp->s_cur;
817 wqe = get_swqe_ptr(qp, n);
818 for (;;) {
819 if (++n == qp->s_size)
820 n = 0;
821 if (n == qp->s_tail) {
822 if (ipath_cmp24(psn, qp->s_next_psn) >= 0) {
823 qp->s_cur = n;
824 wqe = get_swqe_ptr(qp, n);
825 }
826 break;
827 }
828 wqe = get_swqe_ptr(qp, n);
829 if (ipath_cmp24(psn, wqe->psn) < 0)
830 break;
831 qp->s_cur = n;
832 }
833 qp->s_psn = psn;
834
835 /*
836 * Set the state to restart in the middle of a
837 * request. Don't change the s_sge, s_cur_sge, or
838 * s_cur_size. See ipath_do_rc_send().
839 */
840 switch (wqe->wr.opcode) {
841 case IB_WR_SEND:
842 case IB_WR_SEND_WITH_IMM:
843 qp->s_state = OP(RDMA_READ_RESPONSE_FIRST);
844 break;
845
846 case IB_WR_RDMA_WRITE:
847 case IB_WR_RDMA_WRITE_WITH_IMM:
848 qp->s_state = OP(RDMA_READ_RESPONSE_LAST);
849 break;
850
851 case IB_WR_RDMA_READ:
852 qp->s_state = OP(RDMA_READ_RESPONSE_MIDDLE);
853 break;
854
855 default:
856 /*
857 * This case shouldn't happen since its only
858 * one PSN per req.
859 */
860 qp->s_state = OP(SEND_LAST);
861 }
862}
863
864/**
865 * do_rc_ack - process an incoming RC ACK 741 * do_rc_ack - process an incoming RC ACK
866 * @qp: the QP the ACK came in on 742 * @qp: the QP the ACK came in on
867 * @psn: the packet sequence number of the ACK 743 * @psn: the packet sequence number of the ACK
868 * @opcode: the opcode of the request that resulted in the ACK 744 * @opcode: the opcode of the request that resulted in the ACK
869 * 745 *
870 * This is called from ipath_rc_rcv() to process an incoming RC ACK 746 * This is called from ipath_rc_rcv_resp() to process an incoming RC ACK
871 * for the given QP. 747 * for the given QP.
872 * Called at interrupt level with the QP s_lock held. 748 * Called at interrupt level with the QP s_lock held and interrupts disabled.
873 * Returns 1 if OK, 0 if current operation should be aborted (NAK). 749 * Returns 1 if OK, 0 if current operation should be aborted (NAK).
874 */ 750 */
875static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode) 751static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode)
@@ -1006,26 +882,16 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode)
1006 if (qp->s_last == qp->s_tail) 882 if (qp->s_last == qp->s_tail)
1007 goto bail; 883 goto bail;
1008 884
1009 /* The last valid PSN seen is the previous request's. */ 885 /* The last valid PSN is the previous PSN. */
1010 qp->s_last_psn = wqe->psn - 1; 886 qp->s_last_psn = psn - 1;
1011 887
1012 dev->n_rc_resends += (int)qp->s_psn - (int)psn; 888 dev->n_rc_resends += (int)qp->s_psn - (int)psn;
1013 889
1014 /* 890 reset_psn(qp, psn);
1015 * If we are starting the request from the beginning, let
1016 * the normal send code handle initialization.
1017 */
1018 qp->s_cur = qp->s_last;
1019 wqe = get_swqe_ptr(qp, qp->s_cur);
1020 if (ipath_cmp24(psn, wqe->psn) <= 0) {
1021 qp->s_state = OP(SEND_LAST);
1022 qp->s_psn = wqe->psn;
1023 } else
1024 reset_psn(qp, psn);
1025 891
1026 qp->s_rnr_timeout = 892 qp->s_rnr_timeout =
1027 ib_ipath_rnr_table[(aeth >> IPS_AETH_CREDIT_SHIFT) & 893 ib_ipath_rnr_table[(aeth >> IPATH_AETH_CREDIT_SHIFT) &
1028 IPS_AETH_CREDIT_MASK]; 894 IPATH_AETH_CREDIT_MASK];
1029 ipath_insert_rnr_queue(qp); 895 ipath_insert_rnr_queue(qp);
1030 goto bail; 896 goto bail;
1031 897
@@ -1033,8 +899,8 @@ static int do_rc_ack(struct ipath_qp *qp, u32 aeth, u32 psn, int opcode)
1033 /* The last valid PSN seen is the previous request's. */ 899 /* The last valid PSN seen is the previous request's. */
1034 if (qp->s_last != qp->s_tail) 900 if (qp->s_last != qp->s_tail)
1035 qp->s_last_psn = wqe->psn - 1; 901 qp->s_last_psn = wqe->psn - 1;
1036 switch ((aeth >> IPS_AETH_CREDIT_SHIFT) & 902 switch ((aeth >> IPATH_AETH_CREDIT_SHIFT) &
1037 IPS_AETH_CREDIT_MASK) { 903 IPATH_AETH_CREDIT_MASK) {
1038 case 0: /* PSN sequence error */ 904 case 0: /* PSN sequence error */
1039 dev->n_seq_naks++; 905 dev->n_seq_naks++;
1040 /* 906 /*
@@ -1182,32 +1048,33 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
1182 goto ack_done; 1048 goto ack_done;
1183 } 1049 }
1184 rdma_read: 1050 rdma_read:
1185 if (unlikely(qp->s_state != OP(RDMA_READ_REQUEST))) 1051 if (unlikely(qp->s_state != OP(RDMA_READ_REQUEST)))
1186 goto ack_done; 1052 goto ack_done;
1187 if (unlikely(tlen != (hdrsize + pmtu + 4))) 1053 if (unlikely(tlen != (hdrsize + pmtu + 4)))
1188 goto ack_done; 1054 goto ack_done;
1189 if (unlikely(pmtu >= qp->s_len)) 1055 if (unlikely(pmtu >= qp->s_len))
1190 goto ack_done; 1056 goto ack_done;
1191 /* We got a response so update the timeout. */ 1057 /* We got a response so update the timeout. */
1192 if (unlikely(qp->s_last == qp->s_tail || 1058 if (unlikely(qp->s_last == qp->s_tail ||
1193 get_swqe_ptr(qp, qp->s_last)->wr.opcode != 1059 get_swqe_ptr(qp, qp->s_last)->wr.opcode !=
1194 IB_WR_RDMA_READ)) 1060 IB_WR_RDMA_READ))
1195 goto ack_done; 1061 goto ack_done;
1196 spin_lock(&dev->pending_lock); 1062 spin_lock(&dev->pending_lock);
1197 if (qp->s_rnr_timeout == 0 && !list_empty(&qp->timerwait)) 1063 if (qp->s_rnr_timeout == 0 && !list_empty(&qp->timerwait))
1198 list_move_tail(&qp->timerwait, 1064 list_move_tail(&qp->timerwait,
1199 &dev->pending[dev->pending_index]); 1065 &dev->pending[dev->pending_index]);
1200 spin_unlock(&dev->pending_lock); 1066 spin_unlock(&dev->pending_lock);
1201 /* 1067 /*
1202 * Update the RDMA receive state but do the copy w/o holding the 1068 * Update the RDMA receive state but do the copy w/o
1203 * locks and blocking interrupts. XXX Yet another place that 1069 * holding the locks and blocking interrupts.
1204 * affects relaxed RDMA order since we don't want s_sge modified. 1070 * XXX Yet another place that affects relaxed RDMA order
1205 */ 1071 * since we don't want s_sge modified.
1206 qp->s_len -= pmtu; 1072 */
1207 qp->s_last_psn = psn; 1073 qp->s_len -= pmtu;
1208 spin_unlock_irqrestore(&qp->s_lock, flags); 1074 qp->s_last_psn = psn;
1209 ipath_copy_sge(&qp->s_sge, data, pmtu); 1075 spin_unlock_irqrestore(&qp->s_lock, flags);
1210 goto bail; 1076 ipath_copy_sge(&qp->s_sge, data, pmtu);
1077 goto bail;
1211 1078
1212 case OP(RDMA_READ_RESPONSE_LAST): 1079 case OP(RDMA_READ_RESPONSE_LAST):
1213 /* ACKs READ req. */ 1080 /* ACKs READ req. */
@@ -1230,18 +1097,12 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
1230 * ICRC (4). 1097 * ICRC (4).
1231 */ 1098 */
1232 if (unlikely(tlen <= (hdrsize + pad + 8))) { 1099 if (unlikely(tlen <= (hdrsize + pad + 8))) {
1233 /* 1100 /* XXX Need to generate an error CQ entry. */
1234 * XXX Need to generate an error CQ
1235 * entry.
1236 */
1237 goto ack_done; 1101 goto ack_done;
1238 } 1102 }
1239 tlen -= hdrsize + pad + 8; 1103 tlen -= hdrsize + pad + 8;
1240 if (unlikely(tlen != qp->s_len)) { 1104 if (unlikely(tlen != qp->s_len)) {
1241 /* 1105 /* XXX Need to generate an error CQ entry. */
1242 * XXX Need to generate an error CQ
1243 * entry.
1244 */
1245 goto ack_done; 1106 goto ack_done;
1246 } 1107 }
1247 if (!header_in_data) 1108 if (!header_in_data)
@@ -1254,9 +1115,12 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev,
1254 if (do_rc_ack(qp, aeth, psn, OP(RDMA_READ_RESPONSE_LAST))) { 1115 if (do_rc_ack(qp, aeth, psn, OP(RDMA_READ_RESPONSE_LAST))) {
1255 /* 1116 /*
1256 * Change the state so we contimue 1117 * Change the state so we contimue
1257 * processing new requests. 1118 * processing new requests and wake up the
1119 * tasklet if there are posted sends.
1258 */ 1120 */
1259 qp->s_state = OP(SEND_LAST); 1121 qp->s_state = OP(SEND_LAST);
1122 if (qp->s_tail != qp->s_head)
1123 tasklet_hi_schedule(&qp->s_task);
1260 } 1124 }
1261 goto ack_done; 1125 goto ack_done;
1262 } 1126 }
@@ -1302,18 +1166,16 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev,
1302 * Don't queue the NAK if a RDMA read, atomic, or 1166 * Don't queue the NAK if a RDMA read, atomic, or
1303 * NAK is pending though. 1167 * NAK is pending though.
1304 */ 1168 */
1305 spin_lock(&qp->s_lock); 1169 if (qp->s_ack_state != OP(ACKNOWLEDGE) ||
1306 if ((qp->s_ack_state >= OP(RDMA_READ_REQUEST) && 1170 qp->r_nak_state != 0)
1307 qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) ||
1308 qp->s_nak_state != 0) {
1309 spin_unlock(&qp->s_lock);
1310 goto done; 1171 goto done;
1172 if (qp->r_ack_state < OP(COMPARE_SWAP)) {
1173 qp->r_ack_state = OP(SEND_ONLY);
1174 qp->r_nak_state = IB_NAK_PSN_ERROR;
1175 /* Use the expected PSN. */
1176 qp->r_ack_psn = qp->r_psn;
1311 } 1177 }
1312 qp->s_ack_state = OP(SEND_ONLY); 1178 goto send_ack;
1313 qp->s_nak_state = IB_NAK_PSN_ERROR;
1314 /* Use the expected PSN. */
1315 qp->s_ack_psn = qp->r_psn;
1316 goto resched;
1317 } 1179 }
1318 1180
1319 /* 1181 /*
@@ -1327,27 +1189,7 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev,
1327 * send the earliest so that RDMA reads can be restarted at 1189 * send the earliest so that RDMA reads can be restarted at
1328 * the requester's expected PSN. 1190 * the requester's expected PSN.
1329 */ 1191 */
1330 spin_lock(&qp->s_lock); 1192 if (opcode == OP(RDMA_READ_REQUEST)) {
1331 if (qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE &&
1332 ipath_cmp24(psn, qp->s_ack_psn) >= 0) {
1333 if (qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST)
1334 qp->s_ack_psn = psn;
1335 spin_unlock(&qp->s_lock);
1336 goto done;
1337 }
1338 switch (opcode) {
1339 case OP(RDMA_READ_REQUEST):
1340 /*
1341 * We have to be careful to not change s_rdma_sge
1342 * while ipath_do_rc_send() is using it and not
1343 * holding the s_lock.
1344 */
1345 if (qp->s_ack_state != OP(ACKNOWLEDGE) &&
1346 qp->s_ack_state >= IB_OPCODE_RDMA_READ_REQUEST) {
1347 spin_unlock(&qp->s_lock);
1348 dev->n_rdma_dup_busy++;
1349 goto done;
1350 }
1351 /* RETH comes after BTH */ 1193 /* RETH comes after BTH */
1352 if (!header_in_data) 1194 if (!header_in_data)
1353 reth = &ohdr->u.rc.reth; 1195 reth = &ohdr->u.rc.reth;
@@ -1355,6 +1197,22 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev,
1355 reth = (struct ib_reth *)data; 1197 reth = (struct ib_reth *)data;
1356 data += sizeof(*reth); 1198 data += sizeof(*reth);
1357 } 1199 }
1200 /*
1201 * If we receive a duplicate RDMA request, it means the
1202 * requester saw a sequence error and needs to restart
1203 * from an earlier point. We can abort the current
1204 * RDMA read send in that case.
1205 */
1206 spin_lock_irq(&qp->s_lock);
1207 if (qp->s_ack_state != OP(ACKNOWLEDGE) &&
1208 (qp->s_hdrwords || ipath_cmp24(psn, qp->s_ack_psn) >= 0)) {
1209 /*
1210 * We are already sending earlier requested data.
1211 * Don't abort it to send later out of sequence data.
1212 */
1213 spin_unlock_irq(&qp->s_lock);
1214 goto done;
1215 }
1358 qp->s_rdma_len = be32_to_cpu(reth->length); 1216 qp->s_rdma_len = be32_to_cpu(reth->length);
1359 if (qp->s_rdma_len != 0) { 1217 if (qp->s_rdma_len != 0) {
1360 u32 rkey = be32_to_cpu(reth->rkey); 1218 u32 rkey = be32_to_cpu(reth->rkey);
@@ -1368,8 +1226,10 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev,
1368 ok = ipath_rkey_ok(dev, &qp->s_rdma_sge, 1226 ok = ipath_rkey_ok(dev, &qp->s_rdma_sge,
1369 qp->s_rdma_len, vaddr, rkey, 1227 qp->s_rdma_len, vaddr, rkey,
1370 IB_ACCESS_REMOTE_READ); 1228 IB_ACCESS_REMOTE_READ);
1371 if (unlikely(!ok)) 1229 if (unlikely(!ok)) {
1230 spin_unlock_irq(&qp->s_lock);
1372 goto done; 1231 goto done;
1232 }
1373 } else { 1233 } else {
1374 qp->s_rdma_sge.sg_list = NULL; 1234 qp->s_rdma_sge.sg_list = NULL;
1375 qp->s_rdma_sge.num_sge = 0; 1235 qp->s_rdma_sge.num_sge = 0;
@@ -1378,25 +1238,44 @@ static inline int ipath_rc_rcv_error(struct ipath_ibdev *dev,
1378 qp->s_rdma_sge.sge.length = 0; 1238 qp->s_rdma_sge.sge.length = 0;
1379 qp->s_rdma_sge.sge.sge_length = 0; 1239 qp->s_rdma_sge.sge.sge_length = 0;
1380 } 1240 }
1381 break; 1241 qp->s_ack_state = opcode;
1242 qp->s_ack_psn = psn;
1243 spin_unlock_irq(&qp->s_lock);
1244 tasklet_hi_schedule(&qp->s_task);
1245 goto send_ack;
1246 }
1247
1248 /*
1249 * A pending RDMA read will ACK anything before it so
1250 * ignore earlier duplicate requests.
1251 */
1252 if (qp->s_ack_state != OP(ACKNOWLEDGE))
1253 goto done;
1382 1254
1255 /*
1256 * If an ACK is pending, don't replace the pending ACK
1257 * with an earlier one since the later one will ACK the earlier.
1258 * Also, if we already have a pending atomic, send it.
1259 */
1260 if (qp->r_ack_state != OP(ACKNOWLEDGE) &&
1261 (ipath_cmp24(psn, qp->r_ack_psn) <= 0 ||
1262 qp->r_ack_state >= OP(COMPARE_SWAP)))
1263 goto send_ack;
1264 switch (opcode) {
1383 case OP(COMPARE_SWAP): 1265 case OP(COMPARE_SWAP):
1384 case OP(FETCH_ADD): 1266 case OP(FETCH_ADD):
1385 /* 1267 /*
1386 * Check for the PSN of the last atomic operations 1268 * Check for the PSN of the last atomic operation
1387 * performed and resend the result if found. 1269 * performed and resend the result if found.
1388 */ 1270 */
1389 if ((psn & IPS_PSN_MASK) != qp->r_atomic_psn) { 1271 if ((psn & IPATH_PSN_MASK) != qp->r_atomic_psn)
1390 spin_unlock(&qp->s_lock);
1391 goto done; 1272 goto done;
1392 }
1393 qp->s_ack_atomic = qp->r_atomic_data;
1394 break; 1273 break;
1395 } 1274 }
1396 qp->s_ack_state = opcode; 1275 qp->r_ack_state = opcode;
1397 qp->s_nak_state = 0; 1276 qp->r_nak_state = 0;
1398 qp->s_ack_psn = psn; 1277 qp->r_ack_psn = psn;
1399resched: 1278send_ack:
1400 return 0; 1279 return 0;
1401 1280
1402done: 1281done:
@@ -1424,7 +1303,6 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1424 u32 hdrsize; 1303 u32 hdrsize;
1425 u32 psn; 1304 u32 psn;
1426 u32 pad; 1305 u32 pad;
1427 unsigned long flags;
1428 struct ib_wc wc; 1306 struct ib_wc wc;
1429 u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); 1307 u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu);
1430 int diff; 1308 int diff;
@@ -1453,11 +1331,6 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1453 } else 1331 } else
1454 psn = be32_to_cpu(ohdr->bth[2]); 1332 psn = be32_to_cpu(ohdr->bth[2]);
1455 } 1333 }
1456 /*
1457 * The opcode is in the low byte when its in network order
1458 * (top byte when in host order).
1459 */
1460 opcode = be32_to_cpu(ohdr->bth[0]) >> 24;
1461 1334
1462 /* 1335 /*
1463 * Process responses (ACKs) before anything else. Note that the 1336 * Process responses (ACKs) before anything else. Note that the
@@ -1465,22 +1338,21 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1465 * queue rather than the expected receive packet sequence number. 1338 * queue rather than the expected receive packet sequence number.
1466 * In other words, this QP is the requester. 1339 * In other words, this QP is the requester.
1467 */ 1340 */
1341 opcode = be32_to_cpu(ohdr->bth[0]) >> 24;
1468 if (opcode >= OP(RDMA_READ_RESPONSE_FIRST) && 1342 if (opcode >= OP(RDMA_READ_RESPONSE_FIRST) &&
1469 opcode <= OP(ATOMIC_ACKNOWLEDGE)) { 1343 opcode <= OP(ATOMIC_ACKNOWLEDGE)) {
1470 ipath_rc_rcv_resp(dev, ohdr, data, tlen, qp, opcode, psn, 1344 ipath_rc_rcv_resp(dev, ohdr, data, tlen, qp, opcode, psn,
1471 hdrsize, pmtu, header_in_data); 1345 hdrsize, pmtu, header_in_data);
1472 goto bail; 1346 goto done;
1473 } 1347 }
1474 1348
1475 spin_lock_irqsave(&qp->r_rq.lock, flags);
1476
1477 /* Compute 24 bits worth of difference. */ 1349 /* Compute 24 bits worth of difference. */
1478 diff = ipath_cmp24(psn, qp->r_psn); 1350 diff = ipath_cmp24(psn, qp->r_psn);
1479 if (unlikely(diff)) { 1351 if (unlikely(diff)) {
1480 if (ipath_rc_rcv_error(dev, ohdr, data, qp, opcode, 1352 if (ipath_rc_rcv_error(dev, ohdr, data, qp, opcode,
1481 psn, diff, header_in_data)) 1353 psn, diff, header_in_data))
1482 goto done; 1354 goto done;
1483 goto resched; 1355 goto send_ack;
1484 } 1356 }
1485 1357
1486 /* Check for opcode sequence errors. */ 1358 /* Check for opcode sequence errors. */
@@ -1492,22 +1364,19 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1492 opcode == OP(SEND_LAST_WITH_IMMEDIATE)) 1364 opcode == OP(SEND_LAST_WITH_IMMEDIATE))
1493 break; 1365 break;
1494 nack_inv: 1366 nack_inv:
1495 /* 1367 /*
1496 * A NAK will ACK earlier sends and RDMA writes. Don't queue the 1368 * A NAK will ACK earlier sends and RDMA writes.
1497 * NAK if a RDMA read, atomic, or NAK is pending though. 1369 * Don't queue the NAK if a RDMA read, atomic, or NAK
1498 */ 1370 * is pending though.
1499 spin_lock(&qp->s_lock); 1371 */
1500 if (qp->s_ack_state >= OP(RDMA_READ_REQUEST) && 1372 if (qp->r_ack_state >= OP(COMPARE_SWAP))
1501 qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) { 1373 goto send_ack;
1502 spin_unlock(&qp->s_lock); 1374 /* XXX Flush WQEs */
1503 goto done; 1375 qp->state = IB_QPS_ERR;
1504 } 1376 qp->r_ack_state = OP(SEND_ONLY);
1505 /* XXX Flush WQEs */ 1377 qp->r_nak_state = IB_NAK_INVALID_REQUEST;
1506 qp->state = IB_QPS_ERR; 1378 qp->r_ack_psn = qp->r_psn;
1507 qp->s_ack_state = OP(SEND_ONLY); 1379 goto send_ack;
1508 qp->s_nak_state = IB_NAK_INVALID_REQUEST;
1509 qp->s_ack_psn = qp->r_psn;
1510 goto resched;
1511 1380
1512 case OP(RDMA_WRITE_FIRST): 1381 case OP(RDMA_WRITE_FIRST):
1513 case OP(RDMA_WRITE_MIDDLE): 1382 case OP(RDMA_WRITE_MIDDLE):
@@ -1517,20 +1386,6 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1517 break; 1386 break;
1518 goto nack_inv; 1387 goto nack_inv;
1519 1388
1520 case OP(RDMA_READ_REQUEST):
1521 case OP(COMPARE_SWAP):
1522 case OP(FETCH_ADD):
1523 /*
1524 * Drop all new requests until a response has been sent. A
1525 * new request then ACKs the RDMA response we sent. Relaxed
1526 * ordering would allow new requests to be processed but we
1527 * would need to keep a queue of rwqe's for all that are in
1528 * progress. Note that we can't RNR NAK this request since
1529 * the RDMA READ or atomic response is already queued to be
1530 * sent (unless we implement a response send queue).
1531 */
1532 goto done;
1533
1534 default: 1389 default:
1535 if (opcode == OP(SEND_MIDDLE) || 1390 if (opcode == OP(SEND_MIDDLE) ||
1536 opcode == OP(SEND_LAST) || 1391 opcode == OP(SEND_LAST) ||
@@ -1539,6 +1394,11 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1539 opcode == OP(RDMA_WRITE_LAST) || 1394 opcode == OP(RDMA_WRITE_LAST) ||
1540 opcode == OP(RDMA_WRITE_LAST_WITH_IMMEDIATE)) 1395 opcode == OP(RDMA_WRITE_LAST_WITH_IMMEDIATE))
1541 goto nack_inv; 1396 goto nack_inv;
1397 /*
1398 * Note that it is up to the requester to not send a new
1399 * RDMA read or atomic operation before receiving an ACK
1400 * for the previous operation.
1401 */
1542 break; 1402 break;
1543 } 1403 }
1544 1404
@@ -1555,17 +1415,12 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1555 * Don't queue the NAK if a RDMA read or atomic 1415 * Don't queue the NAK if a RDMA read or atomic
1556 * is pending though. 1416 * is pending though.
1557 */ 1417 */
1558 spin_lock(&qp->s_lock); 1418 if (qp->r_ack_state >= OP(COMPARE_SWAP))
1559 if (qp->s_ack_state >= 1419 goto send_ack;
1560 OP(RDMA_READ_REQUEST) && 1420 qp->r_ack_state = OP(SEND_ONLY);
1561 qp->s_ack_state != IB_OPCODE_ACKNOWLEDGE) { 1421 qp->r_nak_state = IB_RNR_NAK | qp->r_min_rnr_timer;
1562 spin_unlock(&qp->s_lock); 1422 qp->r_ack_psn = qp->r_psn;
1563 goto done; 1423 goto send_ack;
1564 }
1565 qp->s_ack_state = OP(SEND_ONLY);
1566 qp->s_nak_state = IB_RNR_NAK | qp->s_min_rnr_timer;
1567 qp->s_ack_psn = qp->r_psn;
1568 goto resched;
1569 } 1424 }
1570 qp->r_rcv_len = 0; 1425 qp->r_rcv_len = 0;
1571 /* FALLTHROUGH */ 1426 /* FALLTHROUGH */
@@ -1622,7 +1477,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1622 if (unlikely(wc.byte_len > qp->r_len)) 1477 if (unlikely(wc.byte_len > qp->r_len))
1623 goto nack_inv; 1478 goto nack_inv;
1624 ipath_copy_sge(&qp->r_sge, data, tlen); 1479 ipath_copy_sge(&qp->r_sge, data, tlen);
1625 atomic_inc(&qp->msn); 1480 qp->r_msn++;
1626 if (opcode == OP(RDMA_WRITE_LAST) || 1481 if (opcode == OP(RDMA_WRITE_LAST) ||
1627 opcode == OP(RDMA_WRITE_ONLY)) 1482 opcode == OP(RDMA_WRITE_ONLY))
1628 break; 1483 break;
@@ -1666,29 +1521,8 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1666 ok = ipath_rkey_ok(dev, &qp->r_sge, 1521 ok = ipath_rkey_ok(dev, &qp->r_sge,
1667 qp->r_len, vaddr, rkey, 1522 qp->r_len, vaddr, rkey,
1668 IB_ACCESS_REMOTE_WRITE); 1523 IB_ACCESS_REMOTE_WRITE);
1669 if (unlikely(!ok)) { 1524 if (unlikely(!ok))
1670 nack_acc: 1525 goto nack_acc;
1671 /*
1672 * A NAK will ACK earlier sends and RDMA
1673 * writes. Don't queue the NAK if a RDMA
1674 * read, atomic, or NAK is pending though.
1675 */
1676 spin_lock(&qp->s_lock);
1677 if (qp->s_ack_state >=
1678 OP(RDMA_READ_REQUEST) &&
1679 qp->s_ack_state !=
1680 IB_OPCODE_ACKNOWLEDGE) {
1681 spin_unlock(&qp->s_lock);
1682 goto done;
1683 }
1684 /* XXX Flush WQEs */
1685 qp->state = IB_QPS_ERR;
1686 qp->s_ack_state = OP(RDMA_WRITE_ONLY);
1687 qp->s_nak_state =
1688 IB_NAK_REMOTE_ACCESS_ERROR;
1689 qp->s_ack_psn = qp->r_psn;
1690 goto resched;
1691 }
1692 } else { 1526 } else {
1693 qp->r_sge.sg_list = NULL; 1527 qp->r_sge.sg_list = NULL;
1694 qp->r_sge.sge.mr = NULL; 1528 qp->r_sge.sge.mr = NULL;
@@ -1715,12 +1549,10 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1715 reth = (struct ib_reth *)data; 1549 reth = (struct ib_reth *)data;
1716 data += sizeof(*reth); 1550 data += sizeof(*reth);
1717 } 1551 }
1718 spin_lock(&qp->s_lock); 1552 if (unlikely(!(qp->qp_access_flags &
1719 if (qp->s_ack_state != OP(ACKNOWLEDGE) && 1553 IB_ACCESS_REMOTE_READ)))
1720 qp->s_ack_state >= IB_OPCODE_RDMA_READ_REQUEST) { 1554 goto nack_acc;
1721 spin_unlock(&qp->s_lock); 1555 spin_lock_irq(&qp->s_lock);
1722 goto done;
1723 }
1724 qp->s_rdma_len = be32_to_cpu(reth->length); 1556 qp->s_rdma_len = be32_to_cpu(reth->length);
1725 if (qp->s_rdma_len != 0) { 1557 if (qp->s_rdma_len != 0) {
1726 u32 rkey = be32_to_cpu(reth->rkey); 1558 u32 rkey = be32_to_cpu(reth->rkey);
@@ -1732,7 +1564,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1732 qp->s_rdma_len, vaddr, rkey, 1564 qp->s_rdma_len, vaddr, rkey,
1733 IB_ACCESS_REMOTE_READ); 1565 IB_ACCESS_REMOTE_READ);
1734 if (unlikely(!ok)) { 1566 if (unlikely(!ok)) {
1735 spin_unlock(&qp->s_lock); 1567 spin_unlock_irq(&qp->s_lock);
1736 goto nack_acc; 1568 goto nack_acc;
1737 } 1569 }
1738 /* 1570 /*
@@ -1749,21 +1581,25 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1749 qp->s_rdma_sge.sge.length = 0; 1581 qp->s_rdma_sge.sge.length = 0;
1750 qp->s_rdma_sge.sge.sge_length = 0; 1582 qp->s_rdma_sge.sge.sge_length = 0;
1751 } 1583 }
1752 if (unlikely(!(qp->qp_access_flags &
1753 IB_ACCESS_REMOTE_READ)))
1754 goto nack_acc;
1755 /* 1584 /*
1756 * We need to increment the MSN here instead of when we 1585 * We need to increment the MSN here instead of when we
1757 * finish sending the result since a duplicate request would 1586 * finish sending the result since a duplicate request would
1758 * increment it more than once. 1587 * increment it more than once.
1759 */ 1588 */
1760 atomic_inc(&qp->msn); 1589 qp->r_msn++;
1590
1761 qp->s_ack_state = opcode; 1591 qp->s_ack_state = opcode;
1762 qp->s_nak_state = 0;
1763 qp->s_ack_psn = psn; 1592 qp->s_ack_psn = psn;
1593 spin_unlock_irq(&qp->s_lock);
1594
1764 qp->r_psn++; 1595 qp->r_psn++;
1765 qp->r_state = opcode; 1596 qp->r_state = opcode;
1766 goto rdmadone; 1597 qp->r_nak_state = 0;
1598
1599 /* Call ipath_do_rc_send() in another thread. */
1600 tasklet_hi_schedule(&qp->s_task);
1601
1602 goto done;
1767 1603
1768 case OP(COMPARE_SWAP): 1604 case OP(COMPARE_SWAP):
1769 case OP(FETCH_ADD): { 1605 case OP(FETCH_ADD): {
@@ -1792,7 +1628,7 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1792 goto nack_acc; 1628 goto nack_acc;
1793 /* Perform atomic OP and save result. */ 1629 /* Perform atomic OP and save result. */
1794 sdata = be64_to_cpu(ateth->swap_data); 1630 sdata = be64_to_cpu(ateth->swap_data);
1795 spin_lock(&dev->pending_lock); 1631 spin_lock_irq(&dev->pending_lock);
1796 qp->r_atomic_data = *(u64 *) qp->r_sge.sge.vaddr; 1632 qp->r_atomic_data = *(u64 *) qp->r_sge.sge.vaddr;
1797 if (opcode == OP(FETCH_ADD)) 1633 if (opcode == OP(FETCH_ADD))
1798 *(u64 *) qp->r_sge.sge.vaddr = 1634 *(u64 *) qp->r_sge.sge.vaddr =
@@ -1800,9 +1636,9 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1800 else if (qp->r_atomic_data == 1636 else if (qp->r_atomic_data ==
1801 be64_to_cpu(ateth->compare_data)) 1637 be64_to_cpu(ateth->compare_data))
1802 *(u64 *) qp->r_sge.sge.vaddr = sdata; 1638 *(u64 *) qp->r_sge.sge.vaddr = sdata;
1803 spin_unlock(&dev->pending_lock); 1639 spin_unlock_irq(&dev->pending_lock);
1804 atomic_inc(&qp->msn); 1640 qp->r_msn++;
1805 qp->r_atomic_psn = psn & IPS_PSN_MASK; 1641 qp->r_atomic_psn = psn & IPATH_PSN_MASK;
1806 psn |= 1 << 31; 1642 psn |= 1 << 31;
1807 break; 1643 break;
1808 } 1644 }
@@ -1813,44 +1649,39 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1813 } 1649 }
1814 qp->r_psn++; 1650 qp->r_psn++;
1815 qp->r_state = opcode; 1651 qp->r_state = opcode;
1652 qp->r_nak_state = 0;
1816 /* Send an ACK if requested or required. */ 1653 /* Send an ACK if requested or required. */
1817 if (psn & (1 << 31)) { 1654 if (psn & (1 << 31)) {
1818 /* 1655 /*
1819 * Coalesce ACKs unless there is a RDMA READ or 1656 * Coalesce ACKs unless there is a RDMA READ or
1820 * ATOMIC pending. 1657 * ATOMIC pending.
1821 */ 1658 */
1822 spin_lock(&qp->s_lock); 1659 if (qp->r_ack_state < OP(COMPARE_SWAP)) {
1823 if (qp->s_ack_state == OP(ACKNOWLEDGE) || 1660 qp->r_ack_state = opcode;
1824 qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST) { 1661 qp->r_ack_psn = psn;
1825 qp->s_ack_state = opcode;
1826 qp->s_nak_state = 0;
1827 qp->s_ack_psn = psn;
1828 qp->s_ack_atomic = qp->r_atomic_data;
1829 goto resched;
1830 } 1662 }
1831 spin_unlock(&qp->s_lock); 1663 goto send_ack;
1832 } 1664 }
1833done: 1665 goto done;
1834 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
1835 goto bail;
1836 1666
1837resched: 1667nack_acc:
1838 /* 1668 /*
1839 * Try to send ACK right away but not if ipath_do_rc_send() is 1669 * A NAK will ACK earlier sends and RDMA writes.
1840 * active. 1670 * Don't queue the NAK if a RDMA read, atomic, or NAK
1671 * is pending though.
1841 */ 1672 */
1842 if (qp->s_hdrwords == 0 && 1673 if (qp->r_ack_state < OP(COMPARE_SWAP)) {
1843 (qp->s_ack_state < IB_OPCODE_RDMA_READ_REQUEST || 1674 /* XXX Flush WQEs */
1844 qp->s_ack_state >= IB_OPCODE_COMPARE_SWAP)) 1675 qp->state = IB_QPS_ERR;
1676 qp->r_ack_state = OP(RDMA_WRITE_ONLY);
1677 qp->r_nak_state = IB_NAK_REMOTE_ACCESS_ERROR;
1678 qp->r_ack_psn = qp->r_psn;
1679 }
1680send_ack:
1681 /* Send ACK right away unless the send tasklet has a pending ACK. */
1682 if (qp->s_ack_state == OP(ACKNOWLEDGE))
1845 send_rc_ack(qp); 1683 send_rc_ack(qp);
1846 1684
1847rdmadone: 1685done:
1848 spin_unlock(&qp->s_lock);
1849 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
1850
1851 /* Call ipath_do_rc_send() in another thread. */
1852 tasklet_hi_schedule(&qp->s_task);
1853
1854bail:
1855 return; 1686 return;
1856} 1687}
diff --git a/drivers/infiniband/hw/ipath/ipath_registers.h b/drivers/infiniband/hw/ipath/ipath_registers.h
index 402126eb79c..89df8f5ea99 100644
--- a/drivers/infiniband/hw/ipath/ipath_registers.h
+++ b/drivers/infiniband/hw/ipath/ipath_registers.h
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/hw/ipath/ipath_ruc.c b/drivers/infiniband/hw/ipath/ipath_ruc.c
index d38f4f3cfd1..772bc59fb85 100644
--- a/drivers/infiniband/hw/ipath/ipath_ruc.c
+++ b/drivers/infiniband/hw/ipath/ipath_ruc.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -31,6 +32,7 @@
31 */ 32 */
32 33
33#include "ipath_verbs.h" 34#include "ipath_verbs.h"
35#include "ipath_common.h"
34 36
35/* 37/*
36 * Convert the AETH RNR timeout code into the number of milliseconds. 38 * Convert the AETH RNR timeout code into the number of milliseconds.
@@ -111,20 +113,23 @@ void ipath_insert_rnr_queue(struct ipath_qp *qp)
111 * 113 *
112 * Return 0 if no RWQE is available, otherwise return 1. 114 * Return 0 if no RWQE is available, otherwise return 1.
113 * 115 *
114 * Called at interrupt level with the QP r_rq.lock held. 116 * Can be called from interrupt level.
115 */ 117 */
116int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only) 118int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
117{ 119{
120 unsigned long flags;
118 struct ipath_rq *rq; 121 struct ipath_rq *rq;
119 struct ipath_srq *srq; 122 struct ipath_srq *srq;
120 struct ipath_rwqe *wqe; 123 struct ipath_rwqe *wqe;
121 int ret; 124 int ret = 1;
122 125
123 if (!qp->ibqp.srq) { 126 if (!qp->ibqp.srq) {
124 rq = &qp->r_rq; 127 rq = &qp->r_rq;
128 spin_lock_irqsave(&rq->lock, flags);
129
125 if (unlikely(rq->tail == rq->head)) { 130 if (unlikely(rq->tail == rq->head)) {
126 ret = 0; 131 ret = 0;
127 goto bail; 132 goto done;
128 } 133 }
129 wqe = get_rwqe_ptr(rq, rq->tail); 134 wqe = get_rwqe_ptr(rq, rq->tail);
130 qp->r_wr_id = wqe->wr_id; 135 qp->r_wr_id = wqe->wr_id;
@@ -136,17 +141,16 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
136 } 141 }
137 if (++rq->tail >= rq->size) 142 if (++rq->tail >= rq->size)
138 rq->tail = 0; 143 rq->tail = 0;
139 ret = 1; 144 goto done;
140 goto bail;
141 } 145 }
142 146
143 srq = to_isrq(qp->ibqp.srq); 147 srq = to_isrq(qp->ibqp.srq);
144 rq = &srq->rq; 148 rq = &srq->rq;
145 spin_lock(&rq->lock); 149 spin_lock_irqsave(&rq->lock, flags);
150
146 if (unlikely(rq->tail == rq->head)) { 151 if (unlikely(rq->tail == rq->head)) {
147 spin_unlock(&rq->lock);
148 ret = 0; 152 ret = 0;
149 goto bail; 153 goto done;
150 } 154 }
151 wqe = get_rwqe_ptr(rq, rq->tail); 155 wqe = get_rwqe_ptr(rq, rq->tail);
152 qp->r_wr_id = wqe->wr_id; 156 qp->r_wr_id = wqe->wr_id;
@@ -168,18 +172,18 @@ int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only)
168 n = rq->head - rq->tail; 172 n = rq->head - rq->tail;
169 if (n < srq->limit) { 173 if (n < srq->limit) {
170 srq->limit = 0; 174 srq->limit = 0;
171 spin_unlock(&rq->lock); 175 spin_unlock_irqrestore(&rq->lock, flags);
172 ev.device = qp->ibqp.device; 176 ev.device = qp->ibqp.device;
173 ev.element.srq = qp->ibqp.srq; 177 ev.element.srq = qp->ibqp.srq;
174 ev.event = IB_EVENT_SRQ_LIMIT_REACHED; 178 ev.event = IB_EVENT_SRQ_LIMIT_REACHED;
175 srq->ibsrq.event_handler(&ev, 179 srq->ibsrq.event_handler(&ev,
176 srq->ibsrq.srq_context); 180 srq->ibsrq.srq_context);
177 } else 181 goto bail;
178 spin_unlock(&rq->lock); 182 }
179 } else 183 }
180 spin_unlock(&rq->lock);
181 ret = 1;
182 184
185done:
186 spin_unlock_irqrestore(&rq->lock, flags);
183bail: 187bail:
184 return ret; 188 return ret;
185} 189}
@@ -187,7 +191,6 @@ bail:
187/** 191/**
188 * ipath_ruc_loopback - handle UC and RC lookback requests 192 * ipath_ruc_loopback - handle UC and RC lookback requests
189 * @sqp: the loopback QP 193 * @sqp: the loopback QP
190 * @wc: the work completion entry
191 * 194 *
192 * This is called from ipath_do_uc_send() or ipath_do_rc_send() to 195 * This is called from ipath_do_uc_send() or ipath_do_rc_send() to
193 * forward a WQE addressed to the same HCA. 196 * forward a WQE addressed to the same HCA.
@@ -196,13 +199,14 @@ bail:
196 * receive interrupts since this is a connected protocol and all packets 199 * receive interrupts since this is a connected protocol and all packets
197 * will pass through here. 200 * will pass through here.
198 */ 201 */
199void ipath_ruc_loopback(struct ipath_qp *sqp, struct ib_wc *wc) 202static void ipath_ruc_loopback(struct ipath_qp *sqp)
200{ 203{
201 struct ipath_ibdev *dev = to_idev(sqp->ibqp.device); 204 struct ipath_ibdev *dev = to_idev(sqp->ibqp.device);
202 struct ipath_qp *qp; 205 struct ipath_qp *qp;
203 struct ipath_swqe *wqe; 206 struct ipath_swqe *wqe;
204 struct ipath_sge *sge; 207 struct ipath_sge *sge;
205 unsigned long flags; 208 unsigned long flags;
209 struct ib_wc wc;
206 u64 sdata; 210 u64 sdata;
207 211
208 qp = ipath_lookup_qpn(&dev->qp_table, sqp->remote_qpn); 212 qp = ipath_lookup_qpn(&dev->qp_table, sqp->remote_qpn);
@@ -233,8 +237,8 @@ again:
233 wqe = get_swqe_ptr(sqp, sqp->s_last); 237 wqe = get_swqe_ptr(sqp, sqp->s_last);
234 spin_unlock_irqrestore(&sqp->s_lock, flags); 238 spin_unlock_irqrestore(&sqp->s_lock, flags);
235 239
236 wc->wc_flags = 0; 240 wc.wc_flags = 0;
237 wc->imm_data = 0; 241 wc.imm_data = 0;
238 242
239 sqp->s_sge.sge = wqe->sg_list[0]; 243 sqp->s_sge.sge = wqe->sg_list[0];
240 sqp->s_sge.sg_list = wqe->sg_list + 1; 244 sqp->s_sge.sg_list = wqe->sg_list + 1;
@@ -242,39 +246,34 @@ again:
242 sqp->s_len = wqe->length; 246 sqp->s_len = wqe->length;
243 switch (wqe->wr.opcode) { 247 switch (wqe->wr.opcode) {
244 case IB_WR_SEND_WITH_IMM: 248 case IB_WR_SEND_WITH_IMM:
245 wc->wc_flags = IB_WC_WITH_IMM; 249 wc.wc_flags = IB_WC_WITH_IMM;
246 wc->imm_data = wqe->wr.imm_data; 250 wc.imm_data = wqe->wr.imm_data;
247 /* FALLTHROUGH */ 251 /* FALLTHROUGH */
248 case IB_WR_SEND: 252 case IB_WR_SEND:
249 spin_lock_irqsave(&qp->r_rq.lock, flags);
250 if (!ipath_get_rwqe(qp, 0)) { 253 if (!ipath_get_rwqe(qp, 0)) {
251 rnr_nak: 254 rnr_nak:
252 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
253 /* Handle RNR NAK */ 255 /* Handle RNR NAK */
254 if (qp->ibqp.qp_type == IB_QPT_UC) 256 if (qp->ibqp.qp_type == IB_QPT_UC)
255 goto send_comp; 257 goto send_comp;
256 if (sqp->s_rnr_retry == 0) { 258 if (sqp->s_rnr_retry == 0) {
257 wc->status = IB_WC_RNR_RETRY_EXC_ERR; 259 wc.status = IB_WC_RNR_RETRY_EXC_ERR;
258 goto err; 260 goto err;
259 } 261 }
260 if (sqp->s_rnr_retry_cnt < 7) 262 if (sqp->s_rnr_retry_cnt < 7)
261 sqp->s_rnr_retry--; 263 sqp->s_rnr_retry--;
262 dev->n_rnr_naks++; 264 dev->n_rnr_naks++;
263 sqp->s_rnr_timeout = 265 sqp->s_rnr_timeout =
264 ib_ipath_rnr_table[sqp->s_min_rnr_timer]; 266 ib_ipath_rnr_table[sqp->r_min_rnr_timer];
265 ipath_insert_rnr_queue(sqp); 267 ipath_insert_rnr_queue(sqp);
266 goto done; 268 goto done;
267 } 269 }
268 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
269 break; 270 break;
270 271
271 case IB_WR_RDMA_WRITE_WITH_IMM: 272 case IB_WR_RDMA_WRITE_WITH_IMM:
272 wc->wc_flags = IB_WC_WITH_IMM; 273 wc.wc_flags = IB_WC_WITH_IMM;
273 wc->imm_data = wqe->wr.imm_data; 274 wc.imm_data = wqe->wr.imm_data;
274 spin_lock_irqsave(&qp->r_rq.lock, flags);
275 if (!ipath_get_rwqe(qp, 1)) 275 if (!ipath_get_rwqe(qp, 1))
276 goto rnr_nak; 276 goto rnr_nak;
277 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
278 /* FALLTHROUGH */ 277 /* FALLTHROUGH */
279 case IB_WR_RDMA_WRITE: 278 case IB_WR_RDMA_WRITE:
280 if (wqe->length == 0) 279 if (wqe->length == 0)
@@ -284,20 +283,20 @@ again:
284 wqe->wr.wr.rdma.rkey, 283 wqe->wr.wr.rdma.rkey,
285 IB_ACCESS_REMOTE_WRITE))) { 284 IB_ACCESS_REMOTE_WRITE))) {
286 acc_err: 285 acc_err:
287 wc->status = IB_WC_REM_ACCESS_ERR; 286 wc.status = IB_WC_REM_ACCESS_ERR;
288 err: 287 err:
289 wc->wr_id = wqe->wr.wr_id; 288 wc.wr_id = wqe->wr.wr_id;
290 wc->opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; 289 wc.opcode = ib_ipath_wc_opcode[wqe->wr.opcode];
291 wc->vendor_err = 0; 290 wc.vendor_err = 0;
292 wc->byte_len = 0; 291 wc.byte_len = 0;
293 wc->qp_num = sqp->ibqp.qp_num; 292 wc.qp_num = sqp->ibqp.qp_num;
294 wc->src_qp = sqp->remote_qpn; 293 wc.src_qp = sqp->remote_qpn;
295 wc->pkey_index = 0; 294 wc.pkey_index = 0;
296 wc->slid = sqp->remote_ah_attr.dlid; 295 wc.slid = sqp->remote_ah_attr.dlid;
297 wc->sl = sqp->remote_ah_attr.sl; 296 wc.sl = sqp->remote_ah_attr.sl;
298 wc->dlid_path_bits = 0; 297 wc.dlid_path_bits = 0;
299 wc->port_num = 0; 298 wc.port_num = 0;
300 ipath_sqerror_qp(sqp, wc); 299 ipath_sqerror_qp(sqp, &wc);
301 goto done; 300 goto done;
302 } 301 }
303 break; 302 break;
@@ -373,22 +372,22 @@ again:
373 goto send_comp; 372 goto send_comp;
374 373
375 if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM) 374 if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM)
376 wc->opcode = IB_WC_RECV_RDMA_WITH_IMM; 375 wc.opcode = IB_WC_RECV_RDMA_WITH_IMM;
377 else 376 else
378 wc->opcode = IB_WC_RECV; 377 wc.opcode = IB_WC_RECV;
379 wc->wr_id = qp->r_wr_id; 378 wc.wr_id = qp->r_wr_id;
380 wc->status = IB_WC_SUCCESS; 379 wc.status = IB_WC_SUCCESS;
381 wc->vendor_err = 0; 380 wc.vendor_err = 0;
382 wc->byte_len = wqe->length; 381 wc.byte_len = wqe->length;
383 wc->qp_num = qp->ibqp.qp_num; 382 wc.qp_num = qp->ibqp.qp_num;
384 wc->src_qp = qp->remote_qpn; 383 wc.src_qp = qp->remote_qpn;
385 /* XXX do we know which pkey matched? Only needed for GSI. */ 384 /* XXX do we know which pkey matched? Only needed for GSI. */
386 wc->pkey_index = 0; 385 wc.pkey_index = 0;
387 wc->slid = qp->remote_ah_attr.dlid; 386 wc.slid = qp->remote_ah_attr.dlid;
388 wc->sl = qp->remote_ah_attr.sl; 387 wc.sl = qp->remote_ah_attr.sl;
389 wc->dlid_path_bits = 0; 388 wc.dlid_path_bits = 0;
390 /* Signal completion event if the solicited bit is set. */ 389 /* Signal completion event if the solicited bit is set. */
391 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), wc, 390 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc,
392 wqe->wr.send_flags & IB_SEND_SOLICITED); 391 wqe->wr.send_flags & IB_SEND_SOLICITED);
393 392
394send_comp: 393send_comp:
@@ -396,19 +395,19 @@ send_comp:
396 395
397 if (!test_bit(IPATH_S_SIGNAL_REQ_WR, &sqp->s_flags) || 396 if (!test_bit(IPATH_S_SIGNAL_REQ_WR, &sqp->s_flags) ||
398 (wqe->wr.send_flags & IB_SEND_SIGNALED)) { 397 (wqe->wr.send_flags & IB_SEND_SIGNALED)) {
399 wc->wr_id = wqe->wr.wr_id; 398 wc.wr_id = wqe->wr.wr_id;
400 wc->status = IB_WC_SUCCESS; 399 wc.status = IB_WC_SUCCESS;
401 wc->opcode = ib_ipath_wc_opcode[wqe->wr.opcode]; 400 wc.opcode = ib_ipath_wc_opcode[wqe->wr.opcode];
402 wc->vendor_err = 0; 401 wc.vendor_err = 0;
403 wc->byte_len = wqe->length; 402 wc.byte_len = wqe->length;
404 wc->qp_num = sqp->ibqp.qp_num; 403 wc.qp_num = sqp->ibqp.qp_num;
405 wc->src_qp = 0; 404 wc.src_qp = 0;
406 wc->pkey_index = 0; 405 wc.pkey_index = 0;
407 wc->slid = 0; 406 wc.slid = 0;
408 wc->sl = 0; 407 wc.sl = 0;
409 wc->dlid_path_bits = 0; 408 wc.dlid_path_bits = 0;
410 wc->port_num = 0; 409 wc.port_num = 0;
411 ipath_cq_enter(to_icq(sqp->ibqp.send_cq), wc, 0); 410 ipath_cq_enter(to_icq(sqp->ibqp.send_cq), &wc, 0);
412 } 411 }
413 412
414 /* Update s_last now that we are finished with the SWQE */ 413 /* Update s_last now that we are finished with the SWQE */
@@ -454,11 +453,11 @@ void ipath_no_bufs_available(struct ipath_qp *qp, struct ipath_ibdev *dev)
454} 453}
455 454
456/** 455/**
457 * ipath_post_rc_send - post RC and UC sends 456 * ipath_post_ruc_send - post RC and UC sends
458 * @qp: the QP to post on 457 * @qp: the QP to post on
459 * @wr: the work request to send 458 * @wr: the work request to send
460 */ 459 */
461int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr) 460int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr)
462{ 461{
463 struct ipath_swqe *wqe; 462 struct ipath_swqe *wqe;
464 unsigned long flags; 463 unsigned long flags;
@@ -533,13 +532,149 @@ int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr)
533 qp->s_head = next; 532 qp->s_head = next;
534 spin_unlock_irqrestore(&qp->s_lock, flags); 533 spin_unlock_irqrestore(&qp->s_lock, flags);
535 534
536 if (qp->ibqp.qp_type == IB_QPT_UC) 535 ipath_do_ruc_send((unsigned long) qp);
537 ipath_do_uc_send((unsigned long) qp);
538 else
539 ipath_do_rc_send((unsigned long) qp);
540 536
541 ret = 0; 537 ret = 0;
542 538
543bail: 539bail:
544 return ret; 540 return ret;
545} 541}
542
543/**
544 * ipath_make_grh - construct a GRH header
545 * @dev: a pointer to the ipath device
546 * @hdr: a pointer to the GRH header being constructed
547 * @grh: the global route address to send to
548 * @hwords: the number of 32 bit words of header being sent
549 * @nwords: the number of 32 bit words of data being sent
550 *
551 * Return the size of the header in 32 bit words.
552 */
553u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr,
554 struct ib_global_route *grh, u32 hwords, u32 nwords)
555{
556 hdr->version_tclass_flow =
557 cpu_to_be32((6 << 28) |
558 (grh->traffic_class << 20) |
559 grh->flow_label);
560 hdr->paylen = cpu_to_be16((hwords - 2 + nwords + SIZE_OF_CRC) << 2);
561 /* next_hdr is defined by C8-7 in ch. 8.4.1 */
562 hdr->next_hdr = 0x1B;
563 hdr->hop_limit = grh->hop_limit;
564 /* The SGID is 32-bit aligned. */
565 hdr->sgid.global.subnet_prefix = dev->gid_prefix;
566 hdr->sgid.global.interface_id = ipath_layer_get_guid(dev->dd);
567 hdr->dgid = grh->dgid;
568
569 /* GRH header size in 32-bit words. */
570 return sizeof(struct ib_grh) / sizeof(u32);
571}
572
573/**
574 * ipath_do_ruc_send - perform a send on an RC or UC QP
575 * @data: contains a pointer to the QP
576 *
577 * Process entries in the send work queue until credit or queue is
578 * exhausted. Only allow one CPU to send a packet per QP (tasklet).
579 * Otherwise, after we drop the QP s_lock, two threads could send
580 * packets out of order.
581 */
582void ipath_do_ruc_send(unsigned long data)
583{
584 struct ipath_qp *qp = (struct ipath_qp *)data;
585 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);
586 unsigned long flags;
587 u16 lrh0;
588 u32 nwords;
589 u32 extra_bytes;
590 u32 bth0;
591 u32 bth2;
592 u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu);
593 struct ipath_other_headers *ohdr;
594
595 if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags))
596 goto bail;
597
598 if (unlikely(qp->remote_ah_attr.dlid ==
599 ipath_layer_get_lid(dev->dd))) {
600 ipath_ruc_loopback(qp);
601 goto clear;
602 }
603
604 ohdr = &qp->s_hdr.u.oth;
605 if (qp->remote_ah_attr.ah_flags & IB_AH_GRH)
606 ohdr = &qp->s_hdr.u.l.oth;
607
608again:
609 /* Check for a constructed packet to be sent. */
610 if (qp->s_hdrwords != 0) {
611 /*
612 * If no PIO bufs are available, return. An interrupt will
613 * call ipath_ib_piobufavail() when one is available.
614 */
615 if (ipath_verbs_send(dev->dd, qp->s_hdrwords,
616 (u32 *) &qp->s_hdr, qp->s_cur_size,
617 qp->s_cur_sge)) {
618 ipath_no_bufs_available(qp, dev);
619 goto bail;
620 }
621 dev->n_unicast_xmit++;
622 /* Record that we sent the packet and s_hdr is empty. */
623 qp->s_hdrwords = 0;
624 }
625
626 /*
627 * The lock is needed to synchronize between setting
628 * qp->s_ack_state, resend timer, and post_send().
629 */
630 spin_lock_irqsave(&qp->s_lock, flags);
631
632 /* Sending responses has higher priority over sending requests. */
633 if (qp->s_ack_state != IB_OPCODE_RC_ACKNOWLEDGE &&
634 (bth0 = ipath_make_rc_ack(qp, ohdr, pmtu)) != 0)
635 bth2 = qp->s_ack_psn++ & IPATH_PSN_MASK;
636 else if (!((qp->ibqp.qp_type == IB_QPT_RC) ?
637 ipath_make_rc_req(qp, ohdr, pmtu, &bth0, &bth2) :
638 ipath_make_uc_req(qp, ohdr, pmtu, &bth0, &bth2))) {
639 /*
640 * Clear the busy bit before unlocking to avoid races with
641 * adding new work queue items and then failing to process
642 * them.
643 */
644 clear_bit(IPATH_S_BUSY, &qp->s_flags);
645 spin_unlock_irqrestore(&qp->s_lock, flags);
646 goto bail;
647 }
648
649 spin_unlock_irqrestore(&qp->s_lock, flags);
650
651 /* Construct the header. */
652 extra_bytes = (4 - qp->s_cur_size) & 3;
653 nwords = (qp->s_cur_size + extra_bytes) >> 2;
654 lrh0 = IPATH_LRH_BTH;
655 if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) {
656 qp->s_hdrwords += ipath_make_grh(dev, &qp->s_hdr.u.l.grh,
657 &qp->remote_ah_attr.grh,
658 qp->s_hdrwords, nwords);
659 lrh0 = IPATH_LRH_GRH;
660 }
661 lrh0 |= qp->remote_ah_attr.sl << 4;
662 qp->s_hdr.lrh[0] = cpu_to_be16(lrh0);
663 qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid);
664 qp->s_hdr.lrh[2] = cpu_to_be16(qp->s_hdrwords + nwords +
665 SIZE_OF_CRC);
666 qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd));
667 bth0 |= ipath_layer_get_pkey(dev->dd, qp->s_pkey_index);
668 bth0 |= extra_bytes << 20;
669 ohdr->bth[0] = cpu_to_be32(bth0);
670 ohdr->bth[1] = cpu_to_be32(qp->remote_qpn);
671 ohdr->bth[2] = cpu_to_be32(bth2);
672
673 /* Check for more work to do. */
674 goto again;
675
676clear:
677 clear_bit(IPATH_S_BUSY, &qp->s_flags);
678bail:
679 return;
680}
diff --git a/drivers/infiniband/hw/ipath/ipath_srq.c b/drivers/infiniband/hw/ipath/ipath_srq.c
index 01c4c6c5611..f760434660b 100644
--- a/drivers/infiniband/hw/ipath/ipath_srq.c
+++ b/drivers/infiniband/hw/ipath/ipath_srq.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -125,11 +126,23 @@ struct ib_srq *ipath_create_srq(struct ib_pd *ibpd,
125 struct ib_srq_init_attr *srq_init_attr, 126 struct ib_srq_init_attr *srq_init_attr,
126 struct ib_udata *udata) 127 struct ib_udata *udata)
127{ 128{
129 struct ipath_ibdev *dev = to_idev(ibpd->device);
128 struct ipath_srq *srq; 130 struct ipath_srq *srq;
129 u32 sz; 131 u32 sz;
130 struct ib_srq *ret; 132 struct ib_srq *ret;
131 133
132 if (srq_init_attr->attr.max_sge < 1) { 134 if (dev->n_srqs_allocated == ib_ipath_max_srqs) {
135 ret = ERR_PTR(-ENOMEM);
136 goto bail;
137 }
138
139 if (srq_init_attr->attr.max_wr == 0) {
140 ret = ERR_PTR(-EINVAL);
141 goto bail;
142 }
143
144 if ((srq_init_attr->attr.max_sge > ib_ipath_max_srq_sges) ||
145 (srq_init_attr->attr.max_wr > ib_ipath_max_srq_wrs)) {
133 ret = ERR_PTR(-EINVAL); 146 ret = ERR_PTR(-EINVAL);
134 goto bail; 147 goto bail;
135 } 148 }
@@ -164,6 +177,8 @@ struct ib_srq *ipath_create_srq(struct ib_pd *ibpd,
164 177
165 ret = &srq->ibsrq; 178 ret = &srq->ibsrq;
166 179
180 dev->n_srqs_allocated++;
181
167bail: 182bail:
168 return ret; 183 return ret;
169} 184}
@@ -181,24 +196,26 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
181 unsigned long flags; 196 unsigned long flags;
182 int ret; 197 int ret;
183 198
184 if (attr_mask & IB_SRQ_LIMIT) { 199 if (attr_mask & IB_SRQ_MAX_WR)
185 spin_lock_irqsave(&srq->rq.lock, flags); 200 if ((attr->max_wr > ib_ipath_max_srq_wrs) ||
186 srq->limit = attr->srq_limit; 201 (attr->max_sge > srq->rq.max_sge)) {
187 spin_unlock_irqrestore(&srq->rq.lock, flags); 202 ret = -EINVAL;
188 } 203 goto bail;
189 if (attr_mask & IB_SRQ_MAX_WR) { 204 }
190 u32 size = attr->max_wr + 1;
191 struct ipath_rwqe *wq, *p;
192 u32 n;
193 u32 sz;
194 205
195 if (attr->max_sge < srq->rq.max_sge) { 206 if (attr_mask & IB_SRQ_LIMIT)
207 if (attr->srq_limit >= srq->rq.size) {
196 ret = -EINVAL; 208 ret = -EINVAL;
197 goto bail; 209 goto bail;
198 } 210 }
199 211
212 if (attr_mask & IB_SRQ_MAX_WR) {
213 struct ipath_rwqe *wq, *p;
214 u32 sz, size, n;
215
200 sz = sizeof(struct ipath_rwqe) + 216 sz = sizeof(struct ipath_rwqe) +
201 attr->max_sge * sizeof(struct ipath_sge); 217 attr->max_sge * sizeof(struct ipath_sge);
218 size = attr->max_wr + 1;
202 wq = vmalloc(size * sz); 219 wq = vmalloc(size * sz);
203 if (!wq) { 220 if (!wq) {
204 ret = -ENOMEM; 221 ret = -ENOMEM;
@@ -242,6 +259,11 @@ int ipath_modify_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr,
242 spin_unlock_irqrestore(&srq->rq.lock, flags); 259 spin_unlock_irqrestore(&srq->rq.lock, flags);
243 } 260 }
244 261
262 if (attr_mask & IB_SRQ_LIMIT) {
263 spin_lock_irqsave(&srq->rq.lock, flags);
264 srq->limit = attr->srq_limit;
265 spin_unlock_irqrestore(&srq->rq.lock, flags);
266 }
245 ret = 0; 267 ret = 0;
246 268
247bail: 269bail:
@@ -265,7 +287,9 @@ int ipath_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *attr)
265int ipath_destroy_srq(struct ib_srq *ibsrq) 287int ipath_destroy_srq(struct ib_srq *ibsrq)
266{ 288{
267 struct ipath_srq *srq = to_isrq(ibsrq); 289 struct ipath_srq *srq = to_isrq(ibsrq);
290 struct ipath_ibdev *dev = to_idev(ibsrq->device);
268 291
292 dev->n_srqs_allocated--;
269 vfree(srq->rq.wq); 293 vfree(srq->rq.wq);
270 kfree(srq); 294 kfree(srq);
271 295
diff --git a/drivers/infiniband/hw/ipath/ipath_stats.c b/drivers/infiniband/hw/ipath/ipath_stats.c
index fe209137ee7..70351b7e35c 100644
--- a/drivers/infiniband/hw/ipath/ipath_stats.c
+++ b/drivers/infiniband/hw/ipath/ipath_stats.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -185,7 +186,6 @@ static void ipath_qcheck(struct ipath_devdata *dd)
185 dd->ipath_port0head, 186 dd->ipath_port0head,
186 (unsigned long long) 187 (unsigned long long)
187 ipath_stats.sps_port0pkts); 188 ipath_stats.sps_port0pkts);
188 ipath_kreceive(dd);
189 } 189 }
190 dd->ipath_lastport0rcv_cnt = ipath_stats.sps_port0pkts; 190 dd->ipath_lastport0rcv_cnt = ipath_stats.sps_port0pkts;
191 } 191 }
diff --git a/drivers/infiniband/hw/ipath/ipath_sysfs.c b/drivers/infiniband/hw/ipath/ipath_sysfs.c
index f323791cc49..b98821d7801 100644
--- a/drivers/infiniband/hw/ipath/ipath_sysfs.c
+++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -34,8 +35,8 @@
34#include <linux/pci.h> 35#include <linux/pci.h>
35 36
36#include "ipath_kernel.h" 37#include "ipath_kernel.h"
37#include "ips_common.h"
38#include "ipath_layer.h" 38#include "ipath_layer.h"
39#include "ipath_common.h"
39 40
40/** 41/**
41 * ipath_parse_ushort - parse an unsigned short value in an arbitrary base 42 * ipath_parse_ushort - parse an unsigned short value in an arbitrary base
@@ -84,99 +85,6 @@ static ssize_t show_num_units(struct device_driver *dev, char *buf)
84 ipath_count_units(NULL, NULL, NULL)); 85 ipath_count_units(NULL, NULL, NULL));
85} 86}
86 87
87#define DRIVER_STAT(name, attr) \
88 static ssize_t show_stat_##name(struct device_driver *dev, \
89 char *buf) \
90 { \
91 return scnprintf( \
92 buf, PAGE_SIZE, "%llu\n", \
93 (unsigned long long) ipath_stats.sps_ ##attr); \
94 } \
95 static DRIVER_ATTR(name, S_IRUGO, show_stat_##name, NULL)
96
97DRIVER_STAT(intrs, ints);
98DRIVER_STAT(err_intrs, errints);
99DRIVER_STAT(errs, errs);
100DRIVER_STAT(pkt_errs, pkterrs);
101DRIVER_STAT(crc_errs, crcerrs);
102DRIVER_STAT(hw_errs, hwerrs);
103DRIVER_STAT(ib_link, iblink);
104DRIVER_STAT(port0_pkts, port0pkts);
105DRIVER_STAT(ether_spkts, ether_spkts);
106DRIVER_STAT(ether_rpkts, ether_rpkts);
107DRIVER_STAT(sma_spkts, sma_spkts);
108DRIVER_STAT(sma_rpkts, sma_rpkts);
109DRIVER_STAT(hdrq_full, hdrqfull);
110DRIVER_STAT(etid_full, etidfull);
111DRIVER_STAT(no_piobufs, nopiobufs);
112DRIVER_STAT(ports, ports);
113DRIVER_STAT(pkey0, pkeys[0]);
114DRIVER_STAT(pkey1, pkeys[1]);
115DRIVER_STAT(pkey2, pkeys[2]);
116DRIVER_STAT(pkey3, pkeys[3]);
117/* XXX fix the following when dynamic table of devices used */
118DRIVER_STAT(lid0, lid[0]);
119DRIVER_STAT(lid1, lid[1]);
120DRIVER_STAT(lid2, lid[2]);
121DRIVER_STAT(lid3, lid[3]);
122
123DRIVER_STAT(nports, nports);
124DRIVER_STAT(null_intr, nullintr);
125DRIVER_STAT(max_pkts_call, maxpkts_call);
126DRIVER_STAT(avg_pkts_call, avgpkts_call);
127DRIVER_STAT(page_locks, pagelocks);
128DRIVER_STAT(page_unlocks, pageunlocks);
129DRIVER_STAT(krdrops, krdrops);
130/* XXX fix the following when dynamic table of devices used */
131DRIVER_STAT(mlid0, mlid[0]);
132DRIVER_STAT(mlid1, mlid[1]);
133DRIVER_STAT(mlid2, mlid[2]);
134DRIVER_STAT(mlid3, mlid[3]);
135
136static struct attribute *driver_stat_attributes[] = {
137 &driver_attr_intrs.attr,
138 &driver_attr_err_intrs.attr,
139 &driver_attr_errs.attr,
140 &driver_attr_pkt_errs.attr,
141 &driver_attr_crc_errs.attr,
142 &driver_attr_hw_errs.attr,
143 &driver_attr_ib_link.attr,
144 &driver_attr_port0_pkts.attr,
145 &driver_attr_ether_spkts.attr,
146 &driver_attr_ether_rpkts.attr,
147 &driver_attr_sma_spkts.attr,
148 &driver_attr_sma_rpkts.attr,
149 &driver_attr_hdrq_full.attr,
150 &driver_attr_etid_full.attr,
151 &driver_attr_no_piobufs.attr,
152 &driver_attr_ports.attr,
153 &driver_attr_pkey0.attr,
154 &driver_attr_pkey1.attr,
155 &driver_attr_pkey2.attr,
156 &driver_attr_pkey3.attr,
157 &driver_attr_lid0.attr,
158 &driver_attr_lid1.attr,
159 &driver_attr_lid2.attr,
160 &driver_attr_lid3.attr,
161 &driver_attr_nports.attr,
162 &driver_attr_null_intr.attr,
163 &driver_attr_max_pkts_call.attr,
164 &driver_attr_avg_pkts_call.attr,
165 &driver_attr_page_locks.attr,
166 &driver_attr_page_unlocks.attr,
167 &driver_attr_krdrops.attr,
168 &driver_attr_mlid0.attr,
169 &driver_attr_mlid1.attr,
170 &driver_attr_mlid2.attr,
171 &driver_attr_mlid3.attr,
172 NULL
173};
174
175static struct attribute_group driver_stat_attr_group = {
176 .name = "stats",
177 .attrs = driver_stat_attributes
178};
179
180static ssize_t show_status(struct device *dev, 88static ssize_t show_status(struct device *dev,
181 struct device_attribute *attr, 89 struct device_attribute *attr,
182 char *buf) 90 char *buf)
@@ -272,23 +180,23 @@ static ssize_t store_lid(struct device *dev,
272 size_t count) 180 size_t count)
273{ 181{
274 struct ipath_devdata *dd = dev_get_drvdata(dev); 182 struct ipath_devdata *dd = dev_get_drvdata(dev);
275 u16 lid; 183 u16 lid = 0;
276 int ret; 184 int ret;
277 185
278 ret = ipath_parse_ushort(buf, &lid); 186 ret = ipath_parse_ushort(buf, &lid);
279 if (ret < 0) 187 if (ret < 0)
280 goto invalid; 188 goto invalid;
281 189
282 if (lid == 0 || lid >= 0xc000) { 190 if (lid == 0 || lid >= IPATH_MULTICAST_LID_BASE) {
283 ret = -EINVAL; 191 ret = -EINVAL;
284 goto invalid; 192 goto invalid;
285 } 193 }
286 194
287 ipath_set_sps_lid(dd, lid, 0); 195 ipath_set_lid(dd, lid, 0);
288 196
289 goto bail; 197 goto bail;
290invalid: 198invalid:
291 ipath_dev_err(dd, "attempt to set invalid LID\n"); 199 ipath_dev_err(dd, "attempt to set invalid LID 0x%x\n", lid);
292bail: 200bail:
293 return ret; 201 return ret;
294} 202}
@@ -313,13 +221,12 @@ static ssize_t store_mlid(struct device *dev,
313 int ret; 221 int ret;
314 222
315 ret = ipath_parse_ushort(buf, &mlid); 223 ret = ipath_parse_ushort(buf, &mlid);
316 if (ret < 0) 224 if (ret < 0 || mlid < IPATH_MULTICAST_LID_BASE)
317 goto invalid; 225 goto invalid;
318 226
319 unit = dd->ipath_unit; 227 unit = dd->ipath_unit;
320 228
321 dd->ipath_mlid = mlid; 229 dd->ipath_mlid = mlid;
322 ipath_stats.sps_mlid[unit] = mlid;
323 ipath_layer_intr(dd, IPATH_LAYER_INT_BCAST); 230 ipath_layer_intr(dd, IPATH_LAYER_INT_BCAST);
324 231
325 goto bail; 232 goto bail;
@@ -734,20 +641,12 @@ int ipath_driver_create_group(struct device_driver *drv)
734 int ret; 641 int ret;
735 642
736 ret = sysfs_create_group(&drv->kobj, &driver_attr_group); 643 ret = sysfs_create_group(&drv->kobj, &driver_attr_group);
737 if (ret)
738 goto bail;
739 644
740 ret = sysfs_create_group(&drv->kobj, &driver_stat_attr_group);
741 if (ret)
742 sysfs_remove_group(&drv->kobj, &driver_attr_group);
743
744bail:
745 return ret; 645 return ret;
746} 646}
747 647
748void ipath_driver_remove_group(struct device_driver *drv) 648void ipath_driver_remove_group(struct device_driver *drv)
749{ 649{
750 sysfs_remove_group(&drv->kobj, &driver_stat_attr_group);
751 sysfs_remove_group(&drv->kobj, &driver_attr_group); 650 sysfs_remove_group(&drv->kobj, &driver_attr_group);
752} 651}
753 652
diff --git a/drivers/infiniband/hw/ipath/ipath_uc.c b/drivers/infiniband/hw/ipath/ipath_uc.c
index 0d6dbc0a541..c33abea2d5a 100644
--- a/drivers/infiniband/hw/ipath/ipath_uc.c
+++ b/drivers/infiniband/hw/ipath/ipath_uc.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -31,7 +32,7 @@
31 */ 32 */
32 33
33#include "ipath_verbs.h" 34#include "ipath_verbs.h"
34#include "ips_common.h" 35#include "ipath_common.h"
35 36
36/* cut down ridiculously long IB macro names */ 37/* cut down ridiculously long IB macro names */
37#define OP(x) IB_OPCODE_UC_##x 38#define OP(x) IB_OPCODE_UC_##x
@@ -61,90 +62,40 @@ static void complete_last_send(struct ipath_qp *qp, struct ipath_swqe *wqe,
61} 62}
62 63
63/** 64/**
64 * ipath_do_uc_send - do a send on a UC queue 65 * ipath_make_uc_req - construct a request packet (SEND, RDMA write)
65 * @data: contains a pointer to the QP to send on 66 * @qp: a pointer to the QP
67 * @ohdr: a pointer to the IB header being constructed
68 * @pmtu: the path MTU
69 * @bth0p: pointer to the BTH opcode word
70 * @bth2p: pointer to the BTH PSN word
66 * 71 *
67 * Process entries in the send work queue until the queue is exhausted. 72 * Return 1 if constructed; otherwise, return 0.
68 * Only allow one CPU to send a packet per QP (tasklet). 73 * Note the QP s_lock must be held and interrupts disabled.
69 * Otherwise, after we drop the QP lock, two threads could send
70 * packets out of order.
71 * This is similar to ipath_do_rc_send() below except we don't have
72 * timeouts or resends.
73 */ 74 */
74void ipath_do_uc_send(unsigned long data) 75int ipath_make_uc_req(struct ipath_qp *qp,
76 struct ipath_other_headers *ohdr,
77 u32 pmtu, u32 *bth0p, u32 *bth2p)
75{ 78{
76 struct ipath_qp *qp = (struct ipath_qp *)data;
77 struct ipath_ibdev *dev = to_idev(qp->ibqp.device);
78 struct ipath_swqe *wqe; 79 struct ipath_swqe *wqe;
79 unsigned long flags;
80 u16 lrh0;
81 u32 hwords; 80 u32 hwords;
82 u32 nwords;
83 u32 extra_bytes;
84 u32 bth0; 81 u32 bth0;
85 u32 bth2;
86 u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu);
87 u32 len; 82 u32 len;
88 struct ipath_other_headers *ohdr;
89 struct ib_wc wc; 83 struct ib_wc wc;
90 84
91 if (test_and_set_bit(IPATH_S_BUSY, &qp->s_flags))
92 goto bail;
93
94 if (unlikely(qp->remote_ah_attr.dlid ==
95 ipath_layer_get_lid(dev->dd))) {
96 /* Pass in an uninitialized ib_wc to save stack space. */
97 ipath_ruc_loopback(qp, &wc);
98 clear_bit(IPATH_S_BUSY, &qp->s_flags);
99 goto bail;
100 }
101
102 ohdr = &qp->s_hdr.u.oth;
103 if (qp->remote_ah_attr.ah_flags & IB_AH_GRH)
104 ohdr = &qp->s_hdr.u.l.oth;
105
106again:
107 /* Check for a constructed packet to be sent. */
108 if (qp->s_hdrwords != 0) {
109 /*
110 * If no PIO bufs are available, return.
111 * An interrupt will call ipath_ib_piobufavail()
112 * when one is available.
113 */
114 if (ipath_verbs_send(dev->dd, qp->s_hdrwords,
115 (u32 *) &qp->s_hdr,
116 qp->s_cur_size,
117 qp->s_cur_sge)) {
118 ipath_no_bufs_available(qp, dev);
119 goto bail;
120 }
121 dev->n_unicast_xmit++;
122 /* Record that we sent the packet and s_hdr is empty. */
123 qp->s_hdrwords = 0;
124 }
125
126 lrh0 = IPS_LRH_BTH;
127 /* header size in 32-bit words LRH+BTH = (8+12)/4. */
128 hwords = 5;
129
130 /*
131 * The lock is needed to synchronize between
132 * setting qp->s_ack_state and post_send().
133 */
134 spin_lock_irqsave(&qp->s_lock, flags);
135
136 if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK)) 85 if (!(ib_ipath_state_ops[qp->state] & IPATH_PROCESS_SEND_OK))
137 goto done; 86 goto done;
138 87
139 bth0 = ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); 88 /* header size in 32-bit words LRH+BTH = (8+12)/4. */
89 hwords = 5;
90 bth0 = 0;
140 91
141 /* Send a request. */ 92 /* Get the next send request. */
142 wqe = get_swqe_ptr(qp, qp->s_last); 93 wqe = get_swqe_ptr(qp, qp->s_last);
143 switch (qp->s_state) { 94 switch (qp->s_state) {
144 default: 95 default:
145 /* 96 /*
146 * Signal the completion of the last send (if there is 97 * Signal the completion of the last send
147 * one). 98 * (if there is one).
148 */ 99 */
149 if (qp->s_last != qp->s_tail) 100 if (qp->s_last != qp->s_tail)
150 complete_last_send(qp, wqe, &wc); 101 complete_last_send(qp, wqe, &wc);
@@ -257,61 +208,16 @@ again:
257 } 208 }
258 break; 209 break;
259 } 210 }
260 bth2 = qp->s_next_psn++ & IPS_PSN_MASK;
261 qp->s_len -= len; 211 qp->s_len -= len;
262 bth0 |= qp->s_state << 24;
263
264 spin_unlock_irqrestore(&qp->s_lock, flags);
265
266 /* Construct the header. */
267 extra_bytes = (4 - len) & 3;
268 nwords = (len + extra_bytes) >> 2;
269 if (unlikely(qp->remote_ah_attr.ah_flags & IB_AH_GRH)) {
270 /* Header size in 32-bit words. */
271 hwords += 10;
272 lrh0 = IPS_LRH_GRH;
273 qp->s_hdr.u.l.grh.version_tclass_flow =
274 cpu_to_be32((6 << 28) |
275 (qp->remote_ah_attr.grh.traffic_class
276 << 20) |
277 qp->remote_ah_attr.grh.flow_label);
278 qp->s_hdr.u.l.grh.paylen =
279 cpu_to_be16(((hwords - 12) + nwords +
280 SIZE_OF_CRC) << 2);
281 /* next_hdr is defined by C8-7 in ch. 8.4.1 */
282 qp->s_hdr.u.l.grh.next_hdr = 0x1B;
283 qp->s_hdr.u.l.grh.hop_limit =
284 qp->remote_ah_attr.grh.hop_limit;
285 /* The SGID is 32-bit aligned. */
286 qp->s_hdr.u.l.grh.sgid.global.subnet_prefix =
287 dev->gid_prefix;
288 qp->s_hdr.u.l.grh.sgid.global.interface_id =
289 ipath_layer_get_guid(dev->dd);
290 qp->s_hdr.u.l.grh.dgid = qp->remote_ah_attr.grh.dgid;
291 }
292 qp->s_hdrwords = hwords; 212 qp->s_hdrwords = hwords;
293 qp->s_cur_sge = &qp->s_sge; 213 qp->s_cur_sge = &qp->s_sge;
294 qp->s_cur_size = len; 214 qp->s_cur_size = len;
295 lrh0 |= qp->remote_ah_attr.sl << 4; 215 *bth0p = bth0 | (qp->s_state << 24);
296 qp->s_hdr.lrh[0] = cpu_to_be16(lrh0); 216 *bth2p = qp->s_next_psn++ & IPATH_PSN_MASK;
297 /* DEST LID */ 217 return 1;
298 qp->s_hdr.lrh[1] = cpu_to_be16(qp->remote_ah_attr.dlid);
299 qp->s_hdr.lrh[2] = cpu_to_be16(hwords + nwords + SIZE_OF_CRC);
300 qp->s_hdr.lrh[3] = cpu_to_be16(ipath_layer_get_lid(dev->dd));
301 bth0 |= extra_bytes << 20;
302 ohdr->bth[0] = cpu_to_be32(bth0);
303 ohdr->bth[1] = cpu_to_be32(qp->remote_qpn);
304 ohdr->bth[2] = cpu_to_be32(bth2);
305
306 /* Check for more work to do. */
307 goto again;
308 218
309done: 219done:
310 spin_unlock_irqrestore(&qp->s_lock, flags); 220 return 0;
311 clear_bit(IPATH_S_BUSY, &qp->s_flags);
312
313bail:
314 return;
315} 221}
316 222
317/** 223/**
@@ -335,7 +241,6 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
335 u32 hdrsize; 241 u32 hdrsize;
336 u32 psn; 242 u32 psn;
337 u32 pad; 243 u32 pad;
338 unsigned long flags;
339 struct ib_wc wc; 244 struct ib_wc wc;
340 u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu); 245 u32 pmtu = ib_mtu_enum_to_int(qp->path_mtu);
341 struct ib_reth *reth; 246 struct ib_reth *reth;
@@ -373,8 +278,6 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
373 wc.imm_data = 0; 278 wc.imm_data = 0;
374 wc.wc_flags = 0; 279 wc.wc_flags = 0;
375 280
376 spin_lock_irqsave(&qp->r_rq.lock, flags);
377
378 /* Compare the PSN verses the expected PSN. */ 281 /* Compare the PSN verses the expected PSN. */
379 if (unlikely(ipath_cmp24(psn, qp->r_psn) != 0)) { 282 if (unlikely(ipath_cmp24(psn, qp->r_psn) != 0)) {
380 /* 283 /*
@@ -535,12 +438,13 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
535 if (qp->r_len != 0) { 438 if (qp->r_len != 0) {
536 u32 rkey = be32_to_cpu(reth->rkey); 439 u32 rkey = be32_to_cpu(reth->rkey);
537 u64 vaddr = be64_to_cpu(reth->vaddr); 440 u64 vaddr = be64_to_cpu(reth->vaddr);
441 int ok;
538 442
539 /* Check rkey */ 443 /* Check rkey */
540 if (unlikely(!ipath_rkey_ok( 444 ok = ipath_rkey_ok(dev, &qp->r_sge, qp->r_len,
541 dev, &qp->r_sge, qp->r_len, 445 vaddr, rkey,
542 vaddr, rkey, 446 IB_ACCESS_REMOTE_WRITE);
543 IB_ACCESS_REMOTE_WRITE))) { 447 if (unlikely(!ok)) {
544 dev->n_pkt_drops++; 448 dev->n_pkt_drops++;
545 goto done; 449 goto done;
546 } 450 }
@@ -558,8 +462,7 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
558 } 462 }
559 if (opcode == OP(RDMA_WRITE_ONLY)) 463 if (opcode == OP(RDMA_WRITE_ONLY))
560 goto rdma_last; 464 goto rdma_last;
561 else if (opcode == 465 else if (opcode == OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE))
562 OP(RDMA_WRITE_ONLY_WITH_IMMEDIATE))
563 goto rdma_last_imm; 466 goto rdma_last_imm;
564 /* FALLTHROUGH */ 467 /* FALLTHROUGH */
565 case OP(RDMA_WRITE_MIDDLE): 468 case OP(RDMA_WRITE_MIDDLE):
@@ -592,9 +495,9 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
592 dev->n_pkt_drops++; 495 dev->n_pkt_drops++;
593 goto done; 496 goto done;
594 } 497 }
595 if (qp->r_reuse_sge) { 498 if (qp->r_reuse_sge)
596 qp->r_reuse_sge = 0; 499 qp->r_reuse_sge = 0;
597 } else if (!ipath_get_rwqe(qp, 1)) { 500 else if (!ipath_get_rwqe(qp, 1)) {
598 dev->n_pkt_drops++; 501 dev->n_pkt_drops++;
599 goto done; 502 goto done;
600 } 503 }
@@ -631,15 +534,11 @@ void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
631 534
632 default: 535 default:
633 /* Drop packet for unknown opcodes. */ 536 /* Drop packet for unknown opcodes. */
634 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
635 dev->n_pkt_drops++; 537 dev->n_pkt_drops++;
636 goto bail; 538 goto done;
637 } 539 }
638 qp->r_psn++; 540 qp->r_psn++;
639 qp->r_state = opcode; 541 qp->r_state = opcode;
640done: 542done:
641 spin_unlock_irqrestore(&qp->r_rq.lock, flags);
642
643bail:
644 return; 543 return;
645} 544}
diff --git a/drivers/infiniband/hw/ipath/ipath_ud.c b/drivers/infiniband/hw/ipath/ipath_ud.c
index e606daf8321..3466129af80 100644
--- a/drivers/infiniband/hw/ipath/ipath_ud.c
+++ b/drivers/infiniband/hw/ipath/ipath_ud.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -33,7 +34,7 @@
33#include <rdma/ib_smi.h> 34#include <rdma/ib_smi.h>
34 35
35#include "ipath_verbs.h" 36#include "ipath_verbs.h"
36#include "ips_common.h" 37#include "ipath_common.h"
37 38
38/** 39/**
39 * ipath_ud_loopback - handle send on loopback QPs 40 * ipath_ud_loopback - handle send on loopback QPs
@@ -274,6 +275,11 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
274 len += wr->sg_list[i].length; 275 len += wr->sg_list[i].length;
275 ss.num_sge++; 276 ss.num_sge++;
276 } 277 }
278 /* Check for invalid packet size. */
279 if (len > ipath_layer_get_ibmtu(dev->dd)) {
280 ret = -EINVAL;
281 goto bail;
282 }
277 extra_bytes = (4 - len) & 3; 283 extra_bytes = (4 - len) & 3;
278 nwords = (len + extra_bytes) >> 2; 284 nwords = (len + extra_bytes) >> 2;
279 285
@@ -283,8 +289,8 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
283 ret = -EINVAL; 289 ret = -EINVAL;
284 goto bail; 290 goto bail;
285 } 291 }
286 if (ah_attr->dlid >= IPS_MULTICAST_LID_BASE) { 292 if (ah_attr->dlid >= IPATH_MULTICAST_LID_BASE) {
287 if (ah_attr->dlid != IPS_PERMISSIVE_LID) 293 if (ah_attr->dlid != IPATH_PERMISSIVE_LID)
288 dev->n_multicast_xmit++; 294 dev->n_multicast_xmit++;
289 else 295 else
290 dev->n_unicast_xmit++; 296 dev->n_unicast_xmit++;
@@ -304,7 +310,7 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
304 if (ah_attr->ah_flags & IB_AH_GRH) { 310 if (ah_attr->ah_flags & IB_AH_GRH) {
305 /* Header size in 32-bit words. */ 311 /* Header size in 32-bit words. */
306 hwords = 17; 312 hwords = 17;
307 lrh0 = IPS_LRH_GRH; 313 lrh0 = IPATH_LRH_GRH;
308 ohdr = &qp->s_hdr.u.l.oth; 314 ohdr = &qp->s_hdr.u.l.oth;
309 qp->s_hdr.u.l.grh.version_tclass_flow = 315 qp->s_hdr.u.l.grh.version_tclass_flow =
310 cpu_to_be32((6 << 28) | 316 cpu_to_be32((6 << 28) |
@@ -330,7 +336,7 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
330 } else { 336 } else {
331 /* Header size in 32-bit words. */ 337 /* Header size in 32-bit words. */
332 hwords = 7; 338 hwords = 7;
333 lrh0 = IPS_LRH_BTH; 339 lrh0 = IPATH_LRH_BTH;
334 ohdr = &qp->s_hdr.u.oth; 340 ohdr = &qp->s_hdr.u.oth;
335 } 341 }
336 if (wr->opcode == IB_WR_SEND_WITH_IMM) { 342 if (wr->opcode == IB_WR_SEND_WITH_IMM) {
@@ -361,18 +367,18 @@ int ipath_post_ud_send(struct ipath_qp *qp, struct ib_send_wr *wr)
361 if (wr->send_flags & IB_SEND_SOLICITED) 367 if (wr->send_flags & IB_SEND_SOLICITED)
362 bth0 |= 1 << 23; 368 bth0 |= 1 << 23;
363 bth0 |= extra_bytes << 20; 369 bth0 |= extra_bytes << 20;
364 bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? IPS_DEFAULT_P_KEY : 370 bth0 |= qp->ibqp.qp_type == IB_QPT_SMI ? IPATH_DEFAULT_P_KEY :
365 ipath_layer_get_pkey(dev->dd, qp->s_pkey_index); 371 ipath_layer_get_pkey(dev->dd, qp->s_pkey_index);
366 ohdr->bth[0] = cpu_to_be32(bth0); 372 ohdr->bth[0] = cpu_to_be32(bth0);
367 /* 373 /*
368 * Use the multicast QP if the destination LID is a multicast LID. 374 * Use the multicast QP if the destination LID is a multicast LID.
369 */ 375 */
370 ohdr->bth[1] = ah_attr->dlid >= IPS_MULTICAST_LID_BASE && 376 ohdr->bth[1] = ah_attr->dlid >= IPATH_MULTICAST_LID_BASE &&
371 ah_attr->dlid != IPS_PERMISSIVE_LID ? 377 ah_attr->dlid != IPATH_PERMISSIVE_LID ?
372 __constant_cpu_to_be32(IPS_MULTICAST_QPN) : 378 __constant_cpu_to_be32(IPATH_MULTICAST_QPN) :
373 cpu_to_be32(wr->wr.ud.remote_qpn); 379 cpu_to_be32(wr->wr.ud.remote_qpn);
374 /* XXX Could lose a PSN count but not worth locking */ 380 /* XXX Could lose a PSN count but not worth locking */
375 ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & IPS_PSN_MASK); 381 ohdr->bth[2] = cpu_to_be32(qp->s_next_psn++ & IPATH_PSN_MASK);
376 /* 382 /*
377 * Qkeys with the high order bit set mean use the 383 * Qkeys with the high order bit set mean use the
378 * qkey from the QP context instead of the WR (see 10.2.5). 384 * qkey from the QP context instead of the WR (see 10.2.5).
@@ -463,7 +469,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
463 src_qp = be32_to_cpu(ohdr->u.ud.deth[1]); 469 src_qp = be32_to_cpu(ohdr->u.ud.deth[1]);
464 } 470 }
465 } 471 }
466 src_qp &= IPS_QPN_MASK; 472 src_qp &= IPATH_QPN_MASK;
467 473
468 /* 474 /*
469 * Check that the permissive LID is only used on QP0 475 * Check that the permissive LID is only used on QP0
@@ -554,7 +560,16 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
554 spin_lock_irqsave(&rq->lock, flags); 560 spin_lock_irqsave(&rq->lock, flags);
555 if (rq->tail == rq->head) { 561 if (rq->tail == rq->head) {
556 spin_unlock_irqrestore(&rq->lock, flags); 562 spin_unlock_irqrestore(&rq->lock, flags);
557 dev->n_pkt_drops++; 563 /*
564 * Count VL15 packets dropped due to no receive buffer.
565 * Otherwise, count them as buffer overruns since usually,
566 * the HW will be able to receive packets even if there are
567 * no QPs with posted receive buffers.
568 */
569 if (qp->ibqp.qp_num == 0)
570 dev->n_vl15_dropped++;
571 else
572 dev->rcv_errors++;
558 goto bail; 573 goto bail;
559 } 574 }
560 /* Silently drop packets which are too big. */ 575 /* Silently drop packets which are too big. */
@@ -612,7 +627,7 @@ void ipath_ud_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
612 /* 627 /*
613 * Save the LMC lower bits if the destination LID is a unicast LID. 628 * Save the LMC lower bits if the destination LID is a unicast LID.
614 */ 629 */
615 wc.dlid_path_bits = dlid >= IPS_MULTICAST_LID_BASE ? 0 : 630 wc.dlid_path_bits = dlid >= IPATH_MULTICAST_LID_BASE ? 0 :
616 dlid & ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); 631 dlid & ((1 << (dev->mkeyprot_resv_lmc & 7)) - 1);
617 /* Signal completion event if the solicited bit is set. */ 632 /* Signal completion event if the solicited bit is set. */
618 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 633 ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc,
diff --git a/drivers/infiniband/hw/ipath/ipath_user_pages.c b/drivers/infiniband/hw/ipath/ipath_user_pages.c
index 2bb08afc86d..e32fca9faf8 100644
--- a/drivers/infiniband/hw/ipath/ipath_user_pages.c
+++ b/drivers/infiniband/hw/ipath/ipath_user_pages.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -57,17 +58,6 @@ static int __get_user_pages(unsigned long start_page, size_t num_pages,
57 size_t got; 58 size_t got;
58 int ret; 59 int ret;
59 60
60#if 0
61 /*
62 * XXX - causes MPI programs to fail, haven't had time to check
63 * yet
64 */
65 if (!capable(CAP_IPC_LOCK)) {
66 ret = -EPERM;
67 goto bail;
68 }
69#endif
70
71 lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >> 61 lock_limit = current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur >>
72 PAGE_SHIFT; 62 PAGE_SHIFT;
73 63
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c
index 28fdbdaa789..56ac336dd1e 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -36,7 +37,7 @@
36 37
37#include "ipath_kernel.h" 38#include "ipath_kernel.h"
38#include "ipath_verbs.h" 39#include "ipath_verbs.h"
39#include "ips_common.h" 40#include "ipath_common.h"
40 41
41/* Not static, because we don't want the compiler removing it */ 42/* Not static, because we don't want the compiler removing it */
42const char ipath_verbs_version[] = "ipath_verbs " IPATH_IDSTR; 43const char ipath_verbs_version[] = "ipath_verbs " IPATH_IDSTR;
@@ -55,9 +56,62 @@ unsigned int ib_ipath_debug; /* debug mask */
55module_param_named(debug, ib_ipath_debug, uint, S_IWUSR | S_IRUGO); 56module_param_named(debug, ib_ipath_debug, uint, S_IWUSR | S_IRUGO);
56MODULE_PARM_DESC(debug, "Verbs debug mask"); 57MODULE_PARM_DESC(debug, "Verbs debug mask");
57 58
59static unsigned int ib_ipath_max_pds = 0xFFFF;
60module_param_named(max_pds, ib_ipath_max_pds, uint, S_IWUSR | S_IRUGO);
61MODULE_PARM_DESC(max_pds,
62 "Maximum number of protection domains to support");
63
64static unsigned int ib_ipath_max_ahs = 0xFFFF;
65module_param_named(max_ahs, ib_ipath_max_ahs, uint, S_IWUSR | S_IRUGO);
66MODULE_PARM_DESC(max_ahs, "Maximum number of address handles to support");
67
68unsigned int ib_ipath_max_cqes = 0x2FFFF;
69module_param_named(max_cqes, ib_ipath_max_cqes, uint, S_IWUSR | S_IRUGO);
70MODULE_PARM_DESC(max_cqes,
71 "Maximum number of completion queue entries to support");
72
73unsigned int ib_ipath_max_cqs = 0x1FFFF;
74module_param_named(max_cqs, ib_ipath_max_cqs, uint, S_IWUSR | S_IRUGO);
75MODULE_PARM_DESC(max_cqs, "Maximum number of completion queues to support");
76
77unsigned int ib_ipath_max_qp_wrs = 0x3FFF;
78module_param_named(max_qp_wrs, ib_ipath_max_qp_wrs, uint,
79 S_IWUSR | S_IRUGO);
80MODULE_PARM_DESC(max_qp_wrs, "Maximum number of QP WRs to support");
81
82unsigned int ib_ipath_max_sges = 0x60;
83module_param_named(max_sges, ib_ipath_max_sges, uint, S_IWUSR | S_IRUGO);
84MODULE_PARM_DESC(max_sges, "Maximum number of SGEs to support");
85
86unsigned int ib_ipath_max_mcast_grps = 16384;
87module_param_named(max_mcast_grps, ib_ipath_max_mcast_grps, uint,
88 S_IWUSR | S_IRUGO);
89MODULE_PARM_DESC(max_mcast_grps,
90 "Maximum number of multicast groups to support");
91
92unsigned int ib_ipath_max_mcast_qp_attached = 16;
93module_param_named(max_mcast_qp_attached, ib_ipath_max_mcast_qp_attached,
94 uint, S_IWUSR | S_IRUGO);
95MODULE_PARM_DESC(max_mcast_qp_attached,
96 "Maximum number of attached QPs to support");
97
98unsigned int ib_ipath_max_srqs = 1024;
99module_param_named(max_srqs, ib_ipath_max_srqs, uint, S_IWUSR | S_IRUGO);
100MODULE_PARM_DESC(max_srqs, "Maximum number of SRQs to support");
101
102unsigned int ib_ipath_max_srq_sges = 128;
103module_param_named(max_srq_sges, ib_ipath_max_srq_sges,
104 uint, S_IWUSR | S_IRUGO);
105MODULE_PARM_DESC(max_srq_sges, "Maximum number of SRQ SGEs to support");
106
107unsigned int ib_ipath_max_srq_wrs = 0x1FFFF;
108module_param_named(max_srq_wrs, ib_ipath_max_srq_wrs,
109 uint, S_IWUSR | S_IRUGO);
110MODULE_PARM_DESC(max_srq_wrs, "Maximum number of SRQ WRs support");
111
58MODULE_LICENSE("GPL"); 112MODULE_LICENSE("GPL");
59MODULE_AUTHOR("PathScale <support@pathscale.com>"); 113MODULE_AUTHOR("QLogic <support@pathscale.com>");
60MODULE_DESCRIPTION("Pathscale InfiniPath driver"); 114MODULE_DESCRIPTION("QLogic InfiniPath driver");
61 115
62const int ib_ipath_state_ops[IB_QPS_ERR + 1] = { 116const int ib_ipath_state_ops[IB_QPS_ERR + 1] = {
63 [IB_QPS_RESET] = 0, 117 [IB_QPS_RESET] = 0,
@@ -193,7 +247,7 @@ static int ipath_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
193 switch (qp->ibqp.qp_type) { 247 switch (qp->ibqp.qp_type) {
194 case IB_QPT_UC: 248 case IB_QPT_UC:
195 case IB_QPT_RC: 249 case IB_QPT_RC:
196 err = ipath_post_rc_send(qp, wr); 250 err = ipath_post_ruc_send(qp, wr);
197 break; 251 break;
198 252
199 case IB_QPT_SMI: 253 case IB_QPT_SMI:
@@ -375,7 +429,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen)
375 429
376 /* Check for a valid destination LID (see ch. 7.11.1). */ 430 /* Check for a valid destination LID (see ch. 7.11.1). */
377 lid = be16_to_cpu(hdr->lrh[1]); 431 lid = be16_to_cpu(hdr->lrh[1]);
378 if (lid < IPS_MULTICAST_LID_BASE) { 432 if (lid < IPATH_MULTICAST_LID_BASE) {
379 lid &= ~((1 << (dev->mkeyprot_resv_lmc & 7)) - 1); 433 lid &= ~((1 << (dev->mkeyprot_resv_lmc & 7)) - 1);
380 if (unlikely(lid != ipath_layer_get_lid(dev->dd))) { 434 if (unlikely(lid != ipath_layer_get_lid(dev->dd))) {
381 dev->rcv_errors++; 435 dev->rcv_errors++;
@@ -385,9 +439,9 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen)
385 439
386 /* Check for GRH */ 440 /* Check for GRH */
387 lnh = be16_to_cpu(hdr->lrh[0]) & 3; 441 lnh = be16_to_cpu(hdr->lrh[0]) & 3;
388 if (lnh == IPS_LRH_BTH) 442 if (lnh == IPATH_LRH_BTH)
389 ohdr = &hdr->u.oth; 443 ohdr = &hdr->u.oth;
390 else if (lnh == IPS_LRH_GRH) 444 else if (lnh == IPATH_LRH_GRH)
391 ohdr = &hdr->u.l.oth; 445 ohdr = &hdr->u.l.oth;
392 else { 446 else {
393 dev->rcv_errors++; 447 dev->rcv_errors++;
@@ -399,8 +453,8 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen)
399 dev->opstats[opcode].n_packets++; 453 dev->opstats[opcode].n_packets++;
400 454
401 /* Get the destination QP number. */ 455 /* Get the destination QP number. */
402 qp_num = be32_to_cpu(ohdr->bth[1]) & IPS_QPN_MASK; 456 qp_num = be32_to_cpu(ohdr->bth[1]) & IPATH_QPN_MASK;
403 if (qp_num == IPS_MULTICAST_QPN) { 457 if (qp_num == IPATH_MULTICAST_QPN) {
404 struct ipath_mcast *mcast; 458 struct ipath_mcast *mcast;
405 struct ipath_mcast_qp *p; 459 struct ipath_mcast_qp *p;
406 460
@@ -411,7 +465,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen)
411 } 465 }
412 dev->n_multicast_rcv++; 466 dev->n_multicast_rcv++;
413 list_for_each_entry_rcu(p, &mcast->qp_list, list) 467 list_for_each_entry_rcu(p, &mcast->qp_list, list)
414 ipath_qp_rcv(dev, hdr, lnh == IPS_LRH_GRH, data, 468 ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data,
415 tlen, p->qp); 469 tlen, p->qp);
416 /* 470 /*
417 * Notify ipath_multicast_detach() if it is waiting for us 471 * Notify ipath_multicast_detach() if it is waiting for us
@@ -423,7 +477,7 @@ static void ipath_ib_rcv(void *arg, void *rhdr, void *data, u32 tlen)
423 qp = ipath_lookup_qpn(&dev->qp_table, qp_num); 477 qp = ipath_lookup_qpn(&dev->qp_table, qp_num);
424 if (qp) { 478 if (qp) {
425 dev->n_unicast_rcv++; 479 dev->n_unicast_rcv++;
426 ipath_qp_rcv(dev, hdr, lnh == IPS_LRH_GRH, data, 480 ipath_qp_rcv(dev, hdr, lnh == IPATH_LRH_GRH, data,
427 tlen, qp); 481 tlen, qp);
428 /* 482 /*
429 * Notify ipath_destroy_qp() if it is waiting 483 * Notify ipath_destroy_qp() if it is waiting
@@ -567,40 +621,38 @@ static int ipath_query_device(struct ib_device *ibdev,
567 struct ib_device_attr *props) 621 struct ib_device_attr *props)
568{ 622{
569 struct ipath_ibdev *dev = to_idev(ibdev); 623 struct ipath_ibdev *dev = to_idev(ibdev);
570 u32 vendor, boardrev, majrev, minrev;
571 624
572 memset(props, 0, sizeof(*props)); 625 memset(props, 0, sizeof(*props));
573 626
574 props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR | 627 props->device_cap_flags = IB_DEVICE_BAD_PKEY_CNTR |
575 IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT | 628 IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_SHUTDOWN_PORT |
576 IB_DEVICE_SYS_IMAGE_GUID; 629 IB_DEVICE_SYS_IMAGE_GUID;
577 ipath_layer_query_device(dev->dd, &vendor, &boardrev, 630 props->vendor_id = ipath_layer_get_vendorid(dev->dd);
578 &majrev, &minrev); 631 props->vendor_part_id = ipath_layer_get_deviceid(dev->dd);
579 props->vendor_id = vendor; 632 props->hw_ver = ipath_layer_get_pcirev(dev->dd);
580 props->vendor_part_id = boardrev;
581 props->hw_ver = boardrev << 16 | majrev << 8 | minrev;
582 633
583 props->sys_image_guid = dev->sys_image_guid; 634 props->sys_image_guid = dev->sys_image_guid;
584 635
585 props->max_mr_size = ~0ull; 636 props->max_mr_size = ~0ull;
586 props->max_qp = 0xffff; 637 props->max_qp = dev->qp_table.max;
587 props->max_qp_wr = 0xffff; 638 props->max_qp_wr = ib_ipath_max_qp_wrs;
588 props->max_sge = 255; 639 props->max_sge = ib_ipath_max_sges;
589 props->max_cq = 0xffff; 640 props->max_cq = ib_ipath_max_cqs;
590 props->max_cqe = 0xffff; 641 props->max_ah = ib_ipath_max_ahs;
591 props->max_mr = 0xffff; 642 props->max_cqe = ib_ipath_max_cqes;
592 props->max_pd = 0xffff; 643 props->max_mr = dev->lk_table.max;
644 props->max_pd = ib_ipath_max_pds;
593 props->max_qp_rd_atom = 1; 645 props->max_qp_rd_atom = 1;
594 props->max_qp_init_rd_atom = 1; 646 props->max_qp_init_rd_atom = 1;
595 /* props->max_res_rd_atom */ 647 /* props->max_res_rd_atom */
596 props->max_srq = 0xffff; 648 props->max_srq = ib_ipath_max_srqs;
597 props->max_srq_wr = 0xffff; 649 props->max_srq_wr = ib_ipath_max_srq_wrs;
598 props->max_srq_sge = 255; 650 props->max_srq_sge = ib_ipath_max_srq_sges;
599 /* props->local_ca_ack_delay */ 651 /* props->local_ca_ack_delay */
600 props->atomic_cap = IB_ATOMIC_HCA; 652 props->atomic_cap = IB_ATOMIC_HCA;
601 props->max_pkeys = ipath_layer_get_npkeys(dev->dd); 653 props->max_pkeys = ipath_layer_get_npkeys(dev->dd);
602 props->max_mcast_grp = 0xffff; 654 props->max_mcast_grp = ib_ipath_max_mcast_grps;
603 props->max_mcast_qp_attach = 0xffff; 655 props->max_mcast_qp_attach = ib_ipath_max_mcast_qp_attached;
604 props->max_total_mcast_qp_attach = props->max_mcast_qp_attach * 656 props->max_total_mcast_qp_attach = props->max_mcast_qp_attach *
605 props->max_mcast_grp; 657 props->max_mcast_grp;
606 658
@@ -643,10 +695,10 @@ static int ipath_query_port(struct ib_device *ibdev,
643 ipath_layer_get_lastibcstat(dev->dd) & 0xf]; 695 ipath_layer_get_lastibcstat(dev->dd) & 0xf];
644 props->port_cap_flags = dev->port_cap_flags; 696 props->port_cap_flags = dev->port_cap_flags;
645 props->gid_tbl_len = 1; 697 props->gid_tbl_len = 1;
646 props->max_msg_sz = 4096; 698 props->max_msg_sz = 0x80000000;
647 props->pkey_tbl_len = ipath_layer_get_npkeys(dev->dd); 699 props->pkey_tbl_len = ipath_layer_get_npkeys(dev->dd);
648 props->bad_pkey_cntr = ipath_layer_get_cr_errpkey(dev->dd) - 700 props->bad_pkey_cntr = ipath_layer_get_cr_errpkey(dev->dd) -
649 dev->n_pkey_violations; 701 dev->z_pkey_violations;
650 props->qkey_viol_cntr = dev->qkey_violations; 702 props->qkey_viol_cntr = dev->qkey_violations;
651 props->active_width = IB_WIDTH_4X; 703 props->active_width = IB_WIDTH_4X;
652 /* See rate_show() */ 704 /* See rate_show() */
@@ -743,15 +795,30 @@ static struct ib_pd *ipath_alloc_pd(struct ib_device *ibdev,
743 struct ib_ucontext *context, 795 struct ib_ucontext *context,
744 struct ib_udata *udata) 796 struct ib_udata *udata)
745{ 797{
798 struct ipath_ibdev *dev = to_idev(ibdev);
746 struct ipath_pd *pd; 799 struct ipath_pd *pd;
747 struct ib_pd *ret; 800 struct ib_pd *ret;
748 801
802 /*
803 * This is actually totally arbitrary. Some correctness tests
804 * assume there's a maximum number of PDs that can be allocated.
805 * We don't actually have this limit, but we fail the test if
806 * we allow allocations of more than we report for this value.
807 */
808
809 if (dev->n_pds_allocated == ib_ipath_max_pds) {
810 ret = ERR_PTR(-ENOMEM);
811 goto bail;
812 }
813
749 pd = kmalloc(sizeof *pd, GFP_KERNEL); 814 pd = kmalloc(sizeof *pd, GFP_KERNEL);
750 if (!pd) { 815 if (!pd) {
751 ret = ERR_PTR(-ENOMEM); 816 ret = ERR_PTR(-ENOMEM);
752 goto bail; 817 goto bail;
753 } 818 }
754 819
820 dev->n_pds_allocated++;
821
755 /* ib_alloc_pd() will initialize pd->ibpd. */ 822 /* ib_alloc_pd() will initialize pd->ibpd. */
756 pd->user = udata != NULL; 823 pd->user = udata != NULL;
757 824
@@ -764,6 +831,9 @@ bail:
764static int ipath_dealloc_pd(struct ib_pd *ibpd) 831static int ipath_dealloc_pd(struct ib_pd *ibpd)
765{ 832{
766 struct ipath_pd *pd = to_ipd(ibpd); 833 struct ipath_pd *pd = to_ipd(ibpd);
834 struct ipath_ibdev *dev = to_idev(ibpd->device);
835
836 dev->n_pds_allocated--;
767 837
768 kfree(pd); 838 kfree(pd);
769 839
@@ -782,21 +852,40 @@ static struct ib_ah *ipath_create_ah(struct ib_pd *pd,
782{ 852{
783 struct ipath_ah *ah; 853 struct ipath_ah *ah;
784 struct ib_ah *ret; 854 struct ib_ah *ret;
855 struct ipath_ibdev *dev = to_idev(pd->device);
856
857 if (dev->n_ahs_allocated == ib_ipath_max_ahs) {
858 ret = ERR_PTR(-ENOMEM);
859 goto bail;
860 }
785 861
786 /* A multicast address requires a GRH (see ch. 8.4.1). */ 862 /* A multicast address requires a GRH (see ch. 8.4.1). */
787 if (ah_attr->dlid >= IPS_MULTICAST_LID_BASE && 863 if (ah_attr->dlid >= IPATH_MULTICAST_LID_BASE &&
788 ah_attr->dlid != IPS_PERMISSIVE_LID && 864 ah_attr->dlid != IPATH_PERMISSIVE_LID &&
789 !(ah_attr->ah_flags & IB_AH_GRH)) { 865 !(ah_attr->ah_flags & IB_AH_GRH)) {
790 ret = ERR_PTR(-EINVAL); 866 ret = ERR_PTR(-EINVAL);
791 goto bail; 867 goto bail;
792 } 868 }
793 869
870 if (ah_attr->dlid == 0) {
871 ret = ERR_PTR(-EINVAL);
872 goto bail;
873 }
874
875 if (ah_attr->port_num < 1 ||
876 ah_attr->port_num > pd->device->phys_port_cnt) {
877 ret = ERR_PTR(-EINVAL);
878 goto bail;
879 }
880
794 ah = kmalloc(sizeof *ah, GFP_ATOMIC); 881 ah = kmalloc(sizeof *ah, GFP_ATOMIC);
795 if (!ah) { 882 if (!ah) {
796 ret = ERR_PTR(-ENOMEM); 883 ret = ERR_PTR(-ENOMEM);
797 goto bail; 884 goto bail;
798 } 885 }
799 886
887 dev->n_ahs_allocated++;
888
800 /* ib_create_ah() will initialize ah->ibah. */ 889 /* ib_create_ah() will initialize ah->ibah. */
801 ah->attr = *ah_attr; 890 ah->attr = *ah_attr;
802 891
@@ -814,8 +903,11 @@ bail:
814 */ 903 */
815static int ipath_destroy_ah(struct ib_ah *ibah) 904static int ipath_destroy_ah(struct ib_ah *ibah)
816{ 905{
906 struct ipath_ibdev *dev = to_idev(ibah->device);
817 struct ipath_ah *ah = to_iah(ibah); 907 struct ipath_ah *ah = to_iah(ibah);
818 908
909 dev->n_ahs_allocated--;
910
819 kfree(ah); 911 kfree(ah);
820 912
821 return 0; 913 return 0;
@@ -889,6 +981,7 @@ static int ipath_verbs_register_sysfs(struct ib_device *dev);
889 */ 981 */
890static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd) 982static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd)
891{ 983{
984 struct ipath_layer_counters cntrs;
892 struct ipath_ibdev *idev; 985 struct ipath_ibdev *idev;
893 struct ib_device *dev; 986 struct ib_device *dev;
894 int ret; 987 int ret;
@@ -939,6 +1032,25 @@ static void *ipath_register_ib_device(int unit, struct ipath_devdata *dd)
939 idev->pma_counter_select[5] = IB_PMA_PORT_XMIT_WAIT; 1032 idev->pma_counter_select[5] = IB_PMA_PORT_XMIT_WAIT;
940 idev->link_width_enabled = 3; /* 1x or 4x */ 1033 idev->link_width_enabled = 3; /* 1x or 4x */
941 1034
1035 /* Snapshot current HW counters to "clear" them. */
1036 ipath_layer_get_counters(dd, &cntrs);
1037 idev->z_symbol_error_counter = cntrs.symbol_error_counter;
1038 idev->z_link_error_recovery_counter =
1039 cntrs.link_error_recovery_counter;
1040 idev->z_link_downed_counter = cntrs.link_downed_counter;
1041 idev->z_port_rcv_errors = cntrs.port_rcv_errors;
1042 idev->z_port_rcv_remphys_errors =
1043 cntrs.port_rcv_remphys_errors;
1044 idev->z_port_xmit_discards = cntrs.port_xmit_discards;
1045 idev->z_port_xmit_data = cntrs.port_xmit_data;
1046 idev->z_port_rcv_data = cntrs.port_rcv_data;
1047 idev->z_port_xmit_packets = cntrs.port_xmit_packets;
1048 idev->z_port_rcv_packets = cntrs.port_rcv_packets;
1049 idev->z_local_link_integrity_errors =
1050 cntrs.local_link_integrity_errors;
1051 idev->z_excessive_buffer_overrun_errors =
1052 cntrs.excessive_buffer_overrun_errors;
1053
942 /* 1054 /*
943 * The system image GUID is supposed to be the same for all 1055 * The system image GUID is supposed to be the same for all
944 * IB HCAs in a single system but since there can be other 1056 * IB HCAs in a single system but since there can be other
@@ -1109,11 +1221,8 @@ static ssize_t show_rev(struct class_device *cdev, char *buf)
1109{ 1221{
1110 struct ipath_ibdev *dev = 1222 struct ipath_ibdev *dev =
1111 container_of(cdev, struct ipath_ibdev, ibdev.class_dev); 1223 container_of(cdev, struct ipath_ibdev, ibdev.class_dev);
1112 int vendor, boardrev, majrev, minrev;
1113 1224
1114 ipath_layer_query_device(dev->dd, &vendor, &boardrev, 1225 return sprintf(buf, "%x\n", ipath_layer_get_pcirev(dev->dd));
1115 &majrev, &minrev);
1116 return sprintf(buf, "%d.%d\n", majrev, minrev);
1117} 1226}
1118 1227
1119static ssize_t show_hca(struct class_device *cdev, char *buf) 1228static ssize_t show_hca(struct class_device *cdev, char *buf)
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.h b/drivers/infiniband/hw/ipath/ipath_verbs.h
index 4f8d59300e9..2df684727dc 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs.h
+++ b/drivers/infiniband/hw/ipath/ipath_verbs.h
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -148,6 +149,7 @@ struct ipath_mcast {
148 struct list_head qp_list; 149 struct list_head qp_list;
149 wait_queue_head_t wait; 150 wait_queue_head_t wait;
150 atomic_t refcount; 151 atomic_t refcount;
152 int n_attached;
151}; 153};
152 154
153/* Memory region */ 155/* Memory region */
@@ -305,32 +307,34 @@ struct ipath_qp {
305 u32 s_next_psn; /* PSN for next request */ 307 u32 s_next_psn; /* PSN for next request */
306 u32 s_last_psn; /* last response PSN processed */ 308 u32 s_last_psn; /* last response PSN processed */
307 u32 s_psn; /* current packet sequence number */ 309 u32 s_psn; /* current packet sequence number */
310 u32 s_ack_psn; /* PSN for RDMA_READ */
308 u32 s_rnr_timeout; /* number of milliseconds for RNR timeout */ 311 u32 s_rnr_timeout; /* number of milliseconds for RNR timeout */
309 u32 s_ack_psn; /* PSN for next ACK or RDMA_READ */ 312 u32 r_ack_psn; /* PSN for next ACK or atomic ACK */
310 u64 s_ack_atomic; /* data for atomic ACK */
311 u64 r_wr_id; /* ID for current receive WQE */ 313 u64 r_wr_id; /* ID for current receive WQE */
312 u64 r_atomic_data; /* data for last atomic op */ 314 u64 r_atomic_data; /* data for last atomic op */
313 u32 r_atomic_psn; /* PSN of last atomic op */ 315 u32 r_atomic_psn; /* PSN of last atomic op */
314 u32 r_len; /* total length of r_sge */ 316 u32 r_len; /* total length of r_sge */
315 u32 r_rcv_len; /* receive data len processed */ 317 u32 r_rcv_len; /* receive data len processed */
316 u32 r_psn; /* expected rcv packet sequence number */ 318 u32 r_psn; /* expected rcv packet sequence number */
319 u32 r_msn; /* message sequence number */
317 u8 state; /* QP state */ 320 u8 state; /* QP state */
318 u8 s_state; /* opcode of last packet sent */ 321 u8 s_state; /* opcode of last packet sent */
319 u8 s_ack_state; /* opcode of packet to ACK */ 322 u8 s_ack_state; /* opcode of packet to ACK */
320 u8 s_nak_state; /* non-zero if NAK is pending */ 323 u8 s_nak_state; /* non-zero if NAK is pending */
321 u8 r_state; /* opcode of last packet received */ 324 u8 r_state; /* opcode of last packet received */
325 u8 r_ack_state; /* opcode of packet to ACK */
326 u8 r_nak_state; /* non-zero if NAK is pending */
327 u8 r_min_rnr_timer; /* retry timeout value for RNR NAKs */
322 u8 r_reuse_sge; /* for UC receive errors */ 328 u8 r_reuse_sge; /* for UC receive errors */
323 u8 r_sge_inx; /* current index into sg_list */ 329 u8 r_sge_inx; /* current index into sg_list */
324 u8 s_max_sge; /* size of s_wq->sg_list */
325 u8 qp_access_flags; 330 u8 qp_access_flags;
331 u8 s_max_sge; /* size of s_wq->sg_list */
326 u8 s_retry_cnt; /* number of times to retry */ 332 u8 s_retry_cnt; /* number of times to retry */
327 u8 s_rnr_retry_cnt; 333 u8 s_rnr_retry_cnt;
328 u8 s_min_rnr_timer;
329 u8 s_retry; /* requester retry counter */ 334 u8 s_retry; /* requester retry counter */
330 u8 s_rnr_retry; /* requester RNR retry counter */ 335 u8 s_rnr_retry; /* requester RNR retry counter */
331 u8 s_pkey_index; /* PKEY index to use */ 336 u8 s_pkey_index; /* PKEY index to use */
332 enum ib_mtu path_mtu; 337 enum ib_mtu path_mtu;
333 atomic_t msn; /* message sequence number */
334 u32 remote_qpn; 338 u32 remote_qpn;
335 u32 qkey; /* QKEY for this QP (for UD or RD) */ 339 u32 qkey; /* QKEY for this QP (for UD or RD) */
336 u32 s_size; /* send work queue size */ 340 u32 s_size; /* send work queue size */
@@ -431,6 +435,11 @@ struct ipath_ibdev {
431 __be64 sys_image_guid; /* in network order */ 435 __be64 sys_image_guid; /* in network order */
432 __be64 gid_prefix; /* in network order */ 436 __be64 gid_prefix; /* in network order */
433 __be64 mkey; 437 __be64 mkey;
438 u32 n_pds_allocated; /* number of PDs allocated for device */
439 u32 n_ahs_allocated; /* number of AHs allocated for device */
440 u32 n_cqs_allocated; /* number of CQs allocated for device */
441 u32 n_srqs_allocated; /* number of SRQs allocated for device */
442 u32 n_mcast_grps_allocated; /* number of mcast groups allocated */
434 u64 ipath_sword; /* total dwords sent (sample result) */ 443 u64 ipath_sword; /* total dwords sent (sample result) */
435 u64 ipath_rword; /* total dwords received (sample result) */ 444 u64 ipath_rword; /* total dwords received (sample result) */
436 u64 ipath_spkts; /* total packets sent (sample result) */ 445 u64 ipath_spkts; /* total packets sent (sample result) */
@@ -442,17 +451,19 @@ struct ipath_ibdev {
442 u64 n_unicast_rcv; /* total unicast packets received */ 451 u64 n_unicast_rcv; /* total unicast packets received */
443 u64 n_multicast_xmit; /* total multicast packets sent */ 452 u64 n_multicast_xmit; /* total multicast packets sent */
444 u64 n_multicast_rcv; /* total multicast packets received */ 453 u64 n_multicast_rcv; /* total multicast packets received */
445 u64 n_symbol_error_counter; /* starting count for PMA */ 454 u64 z_symbol_error_counter; /* starting count for PMA */
446 u64 n_link_error_recovery_counter; /* starting count for PMA */ 455 u64 z_link_error_recovery_counter; /* starting count for PMA */
447 u64 n_link_downed_counter; /* starting count for PMA */ 456 u64 z_link_downed_counter; /* starting count for PMA */
448 u64 n_port_rcv_errors; /* starting count for PMA */ 457 u64 z_port_rcv_errors; /* starting count for PMA */
449 u64 n_port_rcv_remphys_errors; /* starting count for PMA */ 458 u64 z_port_rcv_remphys_errors; /* starting count for PMA */
450 u64 n_port_xmit_discards; /* starting count for PMA */ 459 u64 z_port_xmit_discards; /* starting count for PMA */
451 u64 n_port_xmit_data; /* starting count for PMA */ 460 u64 z_port_xmit_data; /* starting count for PMA */
452 u64 n_port_rcv_data; /* starting count for PMA */ 461 u64 z_port_rcv_data; /* starting count for PMA */
453 u64 n_port_xmit_packets; /* starting count for PMA */ 462 u64 z_port_xmit_packets; /* starting count for PMA */
454 u64 n_port_rcv_packets; /* starting count for PMA */ 463 u64 z_port_rcv_packets; /* starting count for PMA */
455 u32 n_pkey_violations; /* starting count for PMA */ 464 u32 z_pkey_violations; /* starting count for PMA */
465 u32 z_local_link_integrity_errors; /* starting count for PMA */
466 u32 z_excessive_buffer_overrun_errors; /* starting count for PMA */
456 u32 n_rc_resends; 467 u32 n_rc_resends;
457 u32 n_rc_acks; 468 u32 n_rc_acks;
458 u32 n_rc_qacks; 469 u32 n_rc_qacks;
@@ -462,6 +473,7 @@ struct ipath_ibdev {
462 u32 n_other_naks; 473 u32 n_other_naks;
463 u32 n_timeouts; 474 u32 n_timeouts;
464 u32 n_pkt_drops; 475 u32 n_pkt_drops;
476 u32 n_vl15_dropped;
465 u32 n_wqe_errs; 477 u32 n_wqe_errs;
466 u32 n_rdma_dup_busy; 478 u32 n_rdma_dup_busy;
467 u32 n_piowait; 479 u32 n_piowait;
@@ -580,10 +592,6 @@ void ipath_sqerror_qp(struct ipath_qp *qp, struct ib_wc *wc);
580 592
581void ipath_get_credit(struct ipath_qp *qp, u32 aeth); 593void ipath_get_credit(struct ipath_qp *qp, u32 aeth);
582 594
583void ipath_do_rc_send(unsigned long data);
584
585void ipath_do_uc_send(unsigned long data);
586
587void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig); 595void ipath_cq_enter(struct ipath_cq *cq, struct ib_wc *entry, int sig);
588 596
589int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss, 597int ipath_rkey_ok(struct ipath_ibdev *dev, struct ipath_sge_state *ss,
@@ -596,7 +604,7 @@ void ipath_copy_sge(struct ipath_sge_state *ss, void *data, u32 length);
596 604
597void ipath_skip_sge(struct ipath_sge_state *ss, u32 length); 605void ipath_skip_sge(struct ipath_sge_state *ss, u32 length);
598 606
599int ipath_post_rc_send(struct ipath_qp *qp, struct ib_send_wr *wr); 607int ipath_post_ruc_send(struct ipath_qp *qp, struct ib_send_wr *wr);
600 608
601void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr, 609void ipath_uc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
602 int has_grh, void *data, u32 tlen, struct ipath_qp *qp); 610 int has_grh, void *data, u32 tlen, struct ipath_qp *qp);
@@ -678,7 +686,19 @@ void ipath_insert_rnr_queue(struct ipath_qp *qp);
678 686
679int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only); 687int ipath_get_rwqe(struct ipath_qp *qp, int wr_id_only);
680 688
681void ipath_ruc_loopback(struct ipath_qp *sqp, struct ib_wc *wc); 689u32 ipath_make_grh(struct ipath_ibdev *dev, struct ib_grh *hdr,
690 struct ib_global_route *grh, u32 hwords, u32 nwords);
691
692void ipath_do_ruc_send(unsigned long data);
693
694u32 ipath_make_rc_ack(struct ipath_qp *qp, struct ipath_other_headers *ohdr,
695 u32 pmtu);
696
697int ipath_make_rc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr,
698 u32 pmtu, u32 *bth0p, u32 *bth2p);
699
700int ipath_make_uc_req(struct ipath_qp *qp, struct ipath_other_headers *ohdr,
701 u32 pmtu, u32 *bth0p, u32 *bth2p);
682 702
683extern const enum ib_wc_opcode ib_ipath_wc_opcode[]; 703extern const enum ib_wc_opcode ib_ipath_wc_opcode[];
684 704
@@ -688,6 +708,24 @@ extern const int ib_ipath_state_ops[];
688 708
689extern unsigned int ib_ipath_lkey_table_size; 709extern unsigned int ib_ipath_lkey_table_size;
690 710
711extern unsigned int ib_ipath_max_cqes;
712
713extern unsigned int ib_ipath_max_cqs;
714
715extern unsigned int ib_ipath_max_qp_wrs;
716
717extern unsigned int ib_ipath_max_sges;
718
719extern unsigned int ib_ipath_max_mcast_grps;
720
721extern unsigned int ib_ipath_max_mcast_qp_attached;
722
723extern unsigned int ib_ipath_max_srqs;
724
725extern unsigned int ib_ipath_max_srq_sges;
726
727extern unsigned int ib_ipath_max_srq_wrs;
728
691extern const u32 ib_ipath_rnr_table[]; 729extern const u32 ib_ipath_rnr_table[];
692 730
693#endif /* IPATH_VERBS_H */ 731#endif /* IPATH_VERBS_H */
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c
index 10b31d2c4f2..ee0e1d96d72 100644
--- a/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c
+++ b/drivers/infiniband/hw/ipath/ipath_verbs_mcast.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
@@ -92,6 +93,7 @@ static struct ipath_mcast *ipath_mcast_alloc(union ib_gid *mgid)
92 INIT_LIST_HEAD(&mcast->qp_list); 93 INIT_LIST_HEAD(&mcast->qp_list);
93 init_waitqueue_head(&mcast->wait); 94 init_waitqueue_head(&mcast->wait);
94 atomic_set(&mcast->refcount, 0); 95 atomic_set(&mcast->refcount, 0);
96 mcast->n_attached = 0;
95 97
96bail: 98bail:
97 return mcast; 99 return mcast;
@@ -157,7 +159,8 @@ bail:
157 * the table but the QP was added. Return ESRCH if the QP was already 159 * the table but the QP was added. Return ESRCH if the QP was already
158 * attached and neither structure was added. 160 * attached and neither structure was added.
159 */ 161 */
160static int ipath_mcast_add(struct ipath_mcast *mcast, 162static int ipath_mcast_add(struct ipath_ibdev *dev,
163 struct ipath_mcast *mcast,
161 struct ipath_mcast_qp *mqp) 164 struct ipath_mcast_qp *mqp)
162{ 165{
163 struct rb_node **n = &mcast_tree.rb_node; 166 struct rb_node **n = &mcast_tree.rb_node;
@@ -188,34 +191,47 @@ static int ipath_mcast_add(struct ipath_mcast *mcast,
188 /* Search the QP list to see if this is already there. */ 191 /* Search the QP list to see if this is already there. */
189 list_for_each_entry_rcu(p, &tmcast->qp_list, list) { 192 list_for_each_entry_rcu(p, &tmcast->qp_list, list) {
190 if (p->qp == mqp->qp) { 193 if (p->qp == mqp->qp) {
191 spin_unlock_irqrestore(&mcast_lock, flags);
192 ret = ESRCH; 194 ret = ESRCH;
193 goto bail; 195 goto bail;
194 } 196 }
195 } 197 }
198 if (tmcast->n_attached == ib_ipath_max_mcast_qp_attached) {
199 ret = ENOMEM;
200 goto bail;
201 }
202
203 tmcast->n_attached++;
204
196 list_add_tail_rcu(&mqp->list, &tmcast->qp_list); 205 list_add_tail_rcu(&mqp->list, &tmcast->qp_list);
197 spin_unlock_irqrestore(&mcast_lock, flags);
198 ret = EEXIST; 206 ret = EEXIST;
199 goto bail; 207 goto bail;
200 } 208 }
201 209
210 if (dev->n_mcast_grps_allocated == ib_ipath_max_mcast_grps) {
211 ret = ENOMEM;
212 goto bail;
213 }
214
215 dev->n_mcast_grps_allocated++;
216
202 list_add_tail_rcu(&mqp->list, &mcast->qp_list); 217 list_add_tail_rcu(&mqp->list, &mcast->qp_list);
203 218
204 atomic_inc(&mcast->refcount); 219 atomic_inc(&mcast->refcount);
205 rb_link_node(&mcast->rb_node, pn, n); 220 rb_link_node(&mcast->rb_node, pn, n);
206 rb_insert_color(&mcast->rb_node, &mcast_tree); 221 rb_insert_color(&mcast->rb_node, &mcast_tree);
207 222
208 spin_unlock_irqrestore(&mcast_lock, flags);
209
210 ret = 0; 223 ret = 0;
211 224
212bail: 225bail:
226 spin_unlock_irqrestore(&mcast_lock, flags);
227
213 return ret; 228 return ret;
214} 229}
215 230
216int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) 231int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
217{ 232{
218 struct ipath_qp *qp = to_iqp(ibqp); 233 struct ipath_qp *qp = to_iqp(ibqp);
234 struct ipath_ibdev *dev = to_idev(ibqp->device);
219 struct ipath_mcast *mcast; 235 struct ipath_mcast *mcast;
220 struct ipath_mcast_qp *mqp; 236 struct ipath_mcast_qp *mqp;
221 int ret; 237 int ret;
@@ -235,7 +251,7 @@ int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
235 ret = -ENOMEM; 251 ret = -ENOMEM;
236 goto bail; 252 goto bail;
237 } 253 }
238 switch (ipath_mcast_add(mcast, mqp)) { 254 switch (ipath_mcast_add(dev, mcast, mqp)) {
239 case ESRCH: 255 case ESRCH:
240 /* Neither was used: can't attach the same QP twice. */ 256 /* Neither was used: can't attach the same QP twice. */
241 ipath_mcast_qp_free(mqp); 257 ipath_mcast_qp_free(mqp);
@@ -245,6 +261,12 @@ int ipath_multicast_attach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
245 case EEXIST: /* The mcast wasn't used */ 261 case EEXIST: /* The mcast wasn't used */
246 ipath_mcast_free(mcast); 262 ipath_mcast_free(mcast);
247 break; 263 break;
264 case ENOMEM:
265 /* Exceeded the maximum number of mcast groups. */
266 ipath_mcast_qp_free(mqp);
267 ipath_mcast_free(mcast);
268 ret = -ENOMEM;
269 goto bail;
248 default: 270 default:
249 break; 271 break;
250 } 272 }
@@ -258,6 +280,7 @@ bail:
258int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) 280int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
259{ 281{
260 struct ipath_qp *qp = to_iqp(ibqp); 282 struct ipath_qp *qp = to_iqp(ibqp);
283 struct ipath_ibdev *dev = to_idev(ibqp->device);
261 struct ipath_mcast *mcast = NULL; 284 struct ipath_mcast *mcast = NULL;
262 struct ipath_mcast_qp *p, *tmp; 285 struct ipath_mcast_qp *p, *tmp;
263 struct rb_node *n; 286 struct rb_node *n;
@@ -272,7 +295,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
272 while (1) { 295 while (1) {
273 if (n == NULL) { 296 if (n == NULL) {
274 spin_unlock_irqrestore(&mcast_lock, flags); 297 spin_unlock_irqrestore(&mcast_lock, flags);
275 ret = 0; 298 ret = -EINVAL;
276 goto bail; 299 goto bail;
277 } 300 }
278 301
@@ -296,6 +319,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
296 * link until we are sure there are no list walkers. 319 * link until we are sure there are no list walkers.
297 */ 320 */
298 list_del_rcu(&p->list); 321 list_del_rcu(&p->list);
322 mcast->n_attached--;
299 323
300 /* If this was the last attached QP, remove the GID too. */ 324 /* If this was the last attached QP, remove the GID too. */
301 if (list_empty(&mcast->qp_list)) { 325 if (list_empty(&mcast->qp_list)) {
@@ -319,6 +343,7 @@ int ipath_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid)
319 atomic_dec(&mcast->refcount); 343 atomic_dec(&mcast->refcount);
320 wait_event(mcast->wait, !atomic_read(&mcast->refcount)); 344 wait_event(mcast->wait, !atomic_read(&mcast->refcount));
321 ipath_mcast_free(mcast); 345 ipath_mcast_free(mcast);
346 dev->n_mcast_grps_allocated--;
322 } 347 }
323 348
324 ret = 0; 349 ret = 0;
diff --git a/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c b/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c
index adc5322f15c..f8f9e2e8cbd 100644
--- a/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c
+++ b/drivers/infiniband/hw/ipath/ipath_wc_x86_64.c
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/hw/ipath/ips_common.h b/drivers/infiniband/hw/ipath/ips_common.h
deleted file mode 100644
index ab7cbbbfd03..00000000000
--- a/drivers/infiniband/hw/ipath/ips_common.h
+++ /dev/null
@@ -1,263 +0,0 @@
1#ifndef IPS_COMMON_H
2#define IPS_COMMON_H
3/*
4 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file
9 * COPYING in the main directory of this source tree, or the
10 * OpenIB.org BSD license below:
11 *
12 * Redistribution and use in source and binary forms, with or
13 * without modification, are permitted provided that the following
14 * conditions are met:
15 *
16 * - Redistributions of source code must retain the above
17 * copyright notice, this list of conditions and the following
18 * disclaimer.
19 *
20 * - Redistributions in binary form must reproduce the above
21 * copyright notice, this list of conditions and the following
22 * disclaimer in the documentation and/or other materials
23 * provided with the distribution.
24 *
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 * SOFTWARE.
33 */
34
35#include "ipath_common.h"
36
37struct ipath_header {
38 /*
39 * Version - 4 bits, Port - 4 bits, TID - 10 bits and Offset -
40 * 14 bits before ECO change ~28 Dec 03. After that, Vers 4,
41 * Port 3, TID 11, offset 14.
42 */
43 __le32 ver_port_tid_offset;
44 __le16 chksum;
45 __le16 pkt_flags;
46};
47
48struct ips_message_header {
49 __be16 lrh[4];
50 __be32 bth[3];
51 /* fields below this point are in host byte order */
52 struct ipath_header iph;
53 __u8 sub_opcode;
54 __u8 flags;
55 __u16 src_rank;
56 /* 24 bits. The upper 8 bit is available for other use */
57 union {
58 struct {
59 unsigned ack_seq_num:24;
60 unsigned port:4;
61 unsigned unused:4;
62 };
63 __u32 ack_seq_num_org;
64 };
65 __u8 expected_tid_session_id;
66 __u8 tinylen; /* to aid MPI */
67 union {
68 __u16 tag; /* to aid MPI */
69 __u16 mqhdr; /* for PSM MQ */
70 };
71 union {
72 __u32 mpi[4]; /* to aid MPI */
73 __u32 data[4];
74 __u64 mq[2]; /* for PSM MQ */
75 struct {
76 __u16 mtu;
77 __u8 major_ver;
78 __u8 minor_ver;
79 __u32 not_used; //free
80 __u32 run_id;
81 __u32 client_ver;
82 };
83 };
84};
85
86struct ether_header {
87 __be16 lrh[4];
88 __be32 bth[3];
89 struct ipath_header iph;
90 __u8 sub_opcode;
91 __u8 cmd;
92 __be16 lid;
93 __u16 mac[3];
94 __u8 frag_num;
95 __u8 seq_num;
96 __le32 len;
97 /* MUST be of word size due to PIO write requirements */
98 __le32 csum;
99 __le16 csum_offset;
100 __le16 flags;
101 __u16 first_2_bytes;
102 __u8 unused[2]; /* currently unused */
103};
104
105/*
106 * The PIO buffer used for sending infinipath messages must only be written
107 * in 32-bit words, all the data must be written, and no writes can occur
108 * after the last word is written (which transfers "ownership" of the buffer
109 * to the chip and triggers the message to be sent).
110 * Since the Linux sk_buff structure can be recursive, non-aligned, and
111 * any number of bytes in each segment, we use the following structure
112 * to keep information about the overall state of the copy operation.
113 * This is used to save the information needed to store the checksum
114 * in the right place before sending the last word to the hardware and
115 * to buffer the last 0-3 bytes of non-word sized segments.
116 */
117struct copy_data_s {
118 struct ether_header *hdr;
119 /* addr of PIO buf to write csum to */
120 __u32 __iomem *csum_pio;
121 __u32 __iomem *to; /* addr of PIO buf to write data to */
122 __u32 device; /* which device to allocate PIO bufs from */
123 __s32 error; /* set if there is an error. */
124 __s32 extra; /* amount of data saved in u.buf below */
125 __u32 len; /* total length to send in bytes */
126 __u32 flen; /* frament length in words */
127 __u32 csum; /* partial IP checksum */
128 __u32 pos; /* position for partial checksum */
129 __u32 offset; /* offset to where data currently starts */
130 __s32 checksum_calc; /* set to 1 when csum has been calculated */
131 struct sk_buff *skb;
132 union {
133 __u32 w;
134 __u8 buf[4];
135 } u;
136};
137
138/* IB - LRH header consts */
139#define IPS_LRH_GRH 0x0003 /* 1. word of IB LRH - next header: GRH */
140#define IPS_LRH_BTH 0x0002 /* 1. word of IB LRH - next header: BTH */
141
142#define IPS_OFFSET 0
143
144/*
145 * defines the cut-off point between the header queue and eager/expected
146 * TID queue
147 */
148#define NUM_OF_EXTRA_WORDS_IN_HEADER_QUEUE \
149 ((sizeof(struct ips_message_header) - \
150 offsetof(struct ips_message_header, iph)) >> 2)
151
152/* OpCodes */
153#define OPCODE_IPS 0xC0
154#define OPCODE_ITH4X 0xC1
155
156/* OpCode 30 is use by stand-alone test programs */
157#define OPCODE_RAW_DATA 0xDE
158/* last OpCode (31) is reserved for test */
159#define OPCODE_TEST 0xDF
160
161/* sub OpCodes - ips */
162#define OPCODE_SEQ_DATA 0x01
163#define OPCODE_SEQ_CTRL 0x02
164
165#define OPCODE_SEQ_MQ_DATA 0x03
166#define OPCODE_SEQ_MQ_CTRL 0x04
167
168#define OPCODE_ACK 0x10
169#define OPCODE_NAK 0x11
170
171#define OPCODE_ERR_CHK 0x20
172#define OPCODE_ERR_CHK_PLS 0x21
173
174#define OPCODE_STARTUP 0x30
175#define OPCODE_STARTUP_ACK 0x31
176#define OPCODE_STARTUP_NAK 0x32
177
178#define OPCODE_STARTUP_EXT 0x34
179#define OPCODE_STARTUP_ACK_EXT 0x35
180#define OPCODE_STARTUP_NAK_EXT 0x36
181
182#define OPCODE_TIDS_RELEASE 0x40
183#define OPCODE_TIDS_RELEASE_CONFIRM 0x41
184
185#define OPCODE_CLOSE 0x50
186#define OPCODE_CLOSE_ACK 0x51
187/*
188 * like OPCODE_CLOSE, but no complaint if other side has already closed.
189 * Used when doing abort(), MPI_Abort(), etc.
190 */
191#define OPCODE_ABORT 0x52
192
193/* sub OpCodes - ith4x */
194#define OPCODE_ENCAP 0x81
195#define OPCODE_LID_ARP 0x82
196
197/* Receive Header Queue: receive type (from infinipath) */
198#define RCVHQ_RCV_TYPE_EXPECTED 0
199#define RCVHQ_RCV_TYPE_EAGER 1
200#define RCVHQ_RCV_TYPE_NON_KD 2
201#define RCVHQ_RCV_TYPE_ERROR 3
202
203/* misc. */
204#define SIZE_OF_CRC 1
205
206#define EAGER_TID_ID INFINIPATH_I_TID_MASK
207
208#define IPS_DEFAULT_P_KEY 0xFFFF
209
210#define IPS_PERMISSIVE_LID 0xFFFF
211#define IPS_MULTICAST_LID_BASE 0xC000
212
213#define IPS_AETH_CREDIT_SHIFT 24
214#define IPS_AETH_CREDIT_MASK 0x1F
215#define IPS_AETH_CREDIT_INVAL 0x1F
216
217#define IPS_PSN_MASK 0xFFFFFF
218#define IPS_MSN_MASK 0xFFFFFF
219#define IPS_QPN_MASK 0xFFFFFF
220#define IPS_MULTICAST_QPN 0xFFFFFF
221
222/* functions for extracting fields from rcvhdrq entries */
223static inline __u32 ips_get_hdr_err_flags(const __le32 * rbuf)
224{
225 return __le32_to_cpu(rbuf[1]);
226}
227
228static inline __u32 ips_get_index(const __le32 * rbuf)
229{
230 return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_EGRINDEX_SHIFT)
231 & INFINIPATH_RHF_EGRINDEX_MASK;
232}
233
234static inline __u32 ips_get_rcv_type(const __le32 * rbuf)
235{
236 return (__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_RCVTYPE_SHIFT)
237 & INFINIPATH_RHF_RCVTYPE_MASK;
238}
239
240static inline __u32 ips_get_length_in_bytes(const __le32 * rbuf)
241{
242 return ((__le32_to_cpu(rbuf[0]) >> INFINIPATH_RHF_LENGTH_SHIFT)
243 & INFINIPATH_RHF_LENGTH_MASK) << 2;
244}
245
246static inline void *ips_get_first_protocol_header(const __u32 * rbuf)
247{
248 return (void *)&rbuf[2];
249}
250
251static inline struct ips_message_header *ips_get_ips_header(const __u32 *
252 rbuf)
253{
254 return (struct ips_message_header *)&rbuf[2];
255}
256
257static inline __u32 ips_get_ipath_ver(__le32 hdrword)
258{
259 return (__le32_to_cpu(hdrword) >> INFINIPATH_I_VERS_SHIFT)
260 & INFINIPATH_I_VERS_MASK;
261}
262
263#endif /* IPS_COMMON_H */
diff --git a/drivers/infiniband/hw/ipath/verbs_debug.h b/drivers/infiniband/hw/ipath/verbs_debug.h
index 40d693cf3f9..6186676f2a1 100644
--- a/drivers/infiniband/hw/ipath/verbs_debug.h
+++ b/drivers/infiniband/hw/ipath/verbs_debug.h
@@ -1,4 +1,5 @@
1/* 1/*
2 * Copyright (c) 2006 QLogic, Inc. All rights reserved.
2 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved. 3 * Copyright (c) 2003, 2004, 2005, 2006 PathScale, Inc. All rights reserved.
3 * 4 *
4 * This software is available to you under a choice of one of two 5 * This software is available to you under a choice of one of two
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c
index d536217e700..a29b1b6d82b 100644
--- a/drivers/infiniband/hw/mthca/mthca_eq.c
+++ b/drivers/infiniband/hw/mthca/mthca_eq.c
@@ -900,7 +900,7 @@ int __devinit mthca_init_eq_table(struct mthca_dev *dev)
900 mthca_is_memfree(dev) ? 900 mthca_is_memfree(dev) ?
901 mthca_arbel_interrupt : 901 mthca_arbel_interrupt :
902 mthca_tavor_interrupt, 902 mthca_tavor_interrupt,
903 SA_SHIRQ, DRV_NAME, dev); 903 IRQF_SHARED, DRV_NAME, dev);
904 if (err) 904 if (err)
905 goto err_out_cmd; 905 goto err_out_cmd;
906 dev->eq_table.have_irq = 1; 906 dev->eq_table.have_irq = 1;
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 465fd220569..557cde3a456 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -34,7 +34,6 @@
34 * $Id: mthca_main.c 1396 2004-12-28 04:10:27Z roland $ 34 * $Id: mthca_main.c 1396 2004-12-28 04:10:27Z roland $
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/init.h> 38#include <linux/init.h>
40#include <linux/errno.h> 39#include <linux/errno.h>
diff --git a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c
index f4fddd5327f..91934f2d9db 100644
--- a/drivers/infiniband/hw/mthca/mthca_reset.c
+++ b/drivers/infiniband/hw/mthca/mthca_reset.c
@@ -32,7 +32,6 @@
32 * $Id: mthca_reset.c 1349 2004-12-16 21:09:43Z roland $ 32 * $Id: mthca_reset.c 1349 2004-12-16 21:09:43Z roland $
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/errno.h> 36#include <linux/errno.h>
38#include <linux/pci.h> 37#include <linux/pci.h>
diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h
index 491d2afaf5b..3f89f5e1903 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib.h
+++ b/drivers/infiniband/ulp/ipoib/ipoib.h
@@ -42,7 +42,6 @@
42#include <linux/netdevice.h> 42#include <linux/netdevice.h>
43#include <linux/workqueue.h> 43#include <linux/workqueue.h>
44#include <linux/pci.h> 44#include <linux/pci.h>
45#include <linux/config.h>
46#include <linux/kref.h> 45#include <linux/kref.h>
47#include <linux/if_infiniband.h> 46#include <linux/if_infiniband.h>
48#include <linux/mutex.h> 47#include <linux/mutex.h>
diff --git a/drivers/input/gameport/emu10k1-gp.c b/drivers/input/gameport/emu10k1-gp.c
index 462f8d300aa..9793ac36d17 100644
--- a/drivers/input/gameport/emu10k1-gp.c
+++ b/drivers/input/gameport/emu10k1-gp.c
@@ -32,7 +32,6 @@
32 32
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/ioport.h> 34#include <linux/ioport.h>
35#include <linux/config.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/gameport.h> 36#include <linux/gameport.h>
38#include <linux/slab.h> 37#include <linux/slab.h>
diff --git a/drivers/input/gameport/ns558.c b/drivers/input/gameport/ns558.c
index 3e2d28f263e..f68dbe6f7f0 100644
--- a/drivers/input/gameport/ns558.c
+++ b/drivers/input/gameport/ns558.c
@@ -33,7 +33,6 @@
33 33
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/ioport.h> 35#include <linux/ioport.h>
36#include <linux/config.h>
37#include <linux/init.h> 36#include <linux/init.h>
38#include <linux/delay.h> 37#include <linux/delay.h>
39#include <linux/gameport.h> 38#include <linux/gameport.h>
diff --git a/drivers/input/joystick/analog.c b/drivers/input/joystick/analog.c
index 01dc0b195d5..e9a02db36ec 100644
--- a/drivers/input/joystick/analog.c
+++ b/drivers/input/joystick/analog.c
@@ -28,7 +28,6 @@
28 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic 28 * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/delay.h> 31#include <linux/delay.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/module.h> 33#include <linux/module.h>
diff --git a/drivers/input/joystick/iforce/iforce.h b/drivers/input/joystick/iforce/iforce.h
index 668f24535ba..e9924d6f01b 100644
--- a/drivers/input/joystick/iforce/iforce.h
+++ b/drivers/input/joystick/iforce/iforce.h
@@ -35,7 +35,6 @@
35#include <linux/spinlock.h> 35#include <linux/spinlock.h>
36#include <linux/usb.h> 36#include <linux/usb.h>
37#include <linux/serio.h> 37#include <linux/serio.h>
38#include <linux/config.h>
39#include <linux/circ_buf.h> 38#include <linux/circ_buf.h>
40#include <linux/mutex.h> 39#include <linux/mutex.h>
41 40
diff --git a/drivers/input/keyboard/corgikbd.c b/drivers/input/keyboard/corgikbd.c
index 1f0e720267d..1e03153b9bc 100644
--- a/drivers/input/keyboard/corgikbd.c
+++ b/drivers/input/keyboard/corgikbd.c
@@ -352,7 +352,7 @@ static int __init corgikbd_probe(struct platform_device *pdev)
352 for (i = 0; i < CORGI_KEY_SENSE_NUM; i++) { 352 for (i = 0; i < CORGI_KEY_SENSE_NUM; i++) {
353 pxa_gpio_mode(CORGI_GPIO_KEY_SENSE(i) | GPIO_IN); 353 pxa_gpio_mode(CORGI_GPIO_KEY_SENSE(i) | GPIO_IN);
354 if (request_irq(CORGI_IRQ_GPIO_KEY_SENSE(i), corgikbd_interrupt, 354 if (request_irq(CORGI_IRQ_GPIO_KEY_SENSE(i), corgikbd_interrupt,
355 SA_INTERRUPT | SA_TRIGGER_RISING, 355 IRQF_DISABLED | IRQF_TRIGGER_RISING,
356 "corgikbd", corgikbd)) 356 "corgikbd", corgikbd))
357 printk(KERN_WARNING "corgikbd: Can't get IRQ: %d!\n", i); 357 printk(KERN_WARNING "corgikbd: Can't get IRQ: %d!\n", i);
358 } 358 }
diff --git a/drivers/input/keyboard/hilkbd.c b/drivers/input/keyboard/hilkbd.c
index 33edd030aa7..d22c7c62429 100644
--- a/drivers/input/keyboard/hilkbd.c
+++ b/drivers/input/keyboard/hilkbd.c
@@ -18,7 +18,6 @@
18#include <linux/pci_ids.h> 18#include <linux/pci_ids.h>
19#include <linux/ioport.h> 19#include <linux/ioport.h>
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/config.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
23#include <linux/input.h> 22#include <linux/input.h>
24#include <linux/init.h> 23#include <linux/init.h>
diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c
index 2c510881874..83906f80ba2 100644
--- a/drivers/input/keyboard/locomokbd.c
+++ b/drivers/input/keyboard/locomokbd.c
@@ -25,7 +25,6 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/init.h> 30#include <linux/init.h>
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index c5d03fb77bc..e385710233f 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -410,7 +410,7 @@ static int __init spitzkbd_probe(struct platform_device *dev)
410 for (i = 0; i < SPITZ_KEY_SENSE_NUM; i++) { 410 for (i = 0; i < SPITZ_KEY_SENSE_NUM; i++) {
411 pxa_gpio_mode(spitz_senses[i] | GPIO_IN); 411 pxa_gpio_mode(spitz_senses[i] | GPIO_IN);
412 if (request_irq(IRQ_GPIO(spitz_senses[i]), spitzkbd_interrupt, 412 if (request_irq(IRQ_GPIO(spitz_senses[i]), spitzkbd_interrupt,
413 SA_INTERRUPT|SA_TRIGGER_RISING, 413 IRQF_DISABLED|IRQF_TRIGGER_RISING,
414 "Spitzkbd Sense", spitzkbd)) 414 "Spitzkbd Sense", spitzkbd))
415 printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i); 415 printk(KERN_WARNING "spitzkbd: Can't get Sense IRQ: %d!\n", i);
416 } 416 }
@@ -425,19 +425,19 @@ static int __init spitzkbd_probe(struct platform_device *dev)
425 pxa_gpio_mode(SPITZ_GPIO_SWB | GPIO_IN); 425 pxa_gpio_mode(SPITZ_GPIO_SWB | GPIO_IN);
426 426
427 request_irq(SPITZ_IRQ_GPIO_SYNC, spitzkbd_interrupt, 427 request_irq(SPITZ_IRQ_GPIO_SYNC, spitzkbd_interrupt,
428 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 428 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
429 "Spitzkbd Sync", spitzkbd); 429 "Spitzkbd Sync", spitzkbd);
430 request_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd_interrupt, 430 request_irq(SPITZ_IRQ_GPIO_ON_KEY, spitzkbd_interrupt,
431 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 431 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
432 "Spitzkbd PwrOn", spitzkbd); 432 "Spitzkbd PwrOn", spitzkbd);
433 request_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd_hinge_isr, 433 request_irq(SPITZ_IRQ_GPIO_SWA, spitzkbd_hinge_isr,
434 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 434 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
435 "Spitzkbd SWA", spitzkbd); 435 "Spitzkbd SWA", spitzkbd);
436 request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr, 436 request_irq(SPITZ_IRQ_GPIO_SWB, spitzkbd_hinge_isr,
437 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 437 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
438 "Spitzkbd SWB", spitzkbd); 438 "Spitzkbd SWB", spitzkbd);
439 request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr, 439 request_irq(SPITZ_IRQ_GPIO_AK_INT, spitzkbd_hinge_isr,
440 SA_INTERRUPT | SA_TRIGGER_RISING | SA_TRIGGER_FALLING, 440 IRQF_DISABLED | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
441 "Spitzkbd HP", spitzkbd); 441 "Spitzkbd HP", spitzkbd);
442 442
443 printk(KERN_INFO "input: Spitz Keyboard Registered\n"); 443 printk(KERN_INFO "input: Spitz Keyboard Registered\n");
diff --git a/drivers/input/misc/ixp4xx-beeper.c b/drivers/input/misc/ixp4xx-beeper.c
index 3a6ae85cd69..805b636e73d 100644
--- a/drivers/input/misc/ixp4xx-beeper.c
+++ b/drivers/input/misc/ixp4xx-beeper.c
@@ -113,7 +113,7 @@ static int __devinit ixp4xx_spkr_probe(struct platform_device *dev)
113 input_dev->event = ixp4xx_spkr_event; 113 input_dev->event = ixp4xx_spkr_event;
114 114
115 err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt, 115 err = request_irq(IRQ_IXP4XX_TIMER2, &ixp4xx_spkr_interrupt,
116 SA_INTERRUPT | SA_TIMER, "ixp4xx-beeper", (void *) dev->id); 116 IRQF_DISABLED | IRQF_TIMER, "ixp4xx-beeper", (void *) dev->id);
117 if (err) 117 if (err)
118 goto err_free_device; 118 goto err_free_device;
119 119
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index 42c11fbf3c7..106c94f33b9 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -4,7 +4,6 @@
4 * Copyright (c) 2002 Vojtech Pavlik 4 * Copyright (c) 2002 Vojtech Pavlik
5 * Copyright (c) 2002, 2006 David S. Miller (davem@davemloft.net) 5 * Copyright (c) 2002, 2006 David S. Miller (davem@davemloft.net)
6 */ 6 */
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/init.h> 9#include <linux/init.h>
diff --git a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
index afc66f56df4..50f1fed10be 100644
--- a/drivers/input/mouse/inport.c
+++ b/drivers/input/mouse/inport.c
@@ -36,7 +36,6 @@
36 36
37#include <linux/module.h> 37#include <linux/module.h>
38#include <linux/moduleparam.h> 38#include <linux/moduleparam.h>
39#include <linux/config.h>
40#include <linux/ioport.h> 39#include <linux/ioport.h>
41#include <linux/init.h> 40#include <linux/init.h>
42#include <linux/interrupt.h> 41#include <linux/interrupt.h>
diff --git a/drivers/input/mouse/rpcmouse.c b/drivers/input/mouse/rpcmouse.c
index 09b6ffdb758..872b30bf7aa 100644
--- a/drivers/input/mouse/rpcmouse.c
+++ b/drivers/input/mouse/rpcmouse.c
@@ -85,7 +85,7 @@ static int __init rpcmouse_init(void)
85 rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX); 85 rpcmouse_lastx = (short) iomd_readl(IOMD_MOUSEX);
86 rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY); 86 rpcmouse_lasty = (short) iomd_readl(IOMD_MOUSEY);
87 87
88 if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, SA_SHIRQ, "rpcmouse", rpcmouse_dev)) { 88 if (request_irq(IRQ_VSYNCPULSE, rpcmouse_irq, IRQF_SHARED, "rpcmouse", rpcmouse_dev)) {
89 printk(KERN_ERR "rpcmouse: unable to allocate VSYNC interrupt\n"); 89 printk(KERN_ERR "rpcmouse: unable to allocate VSYNC interrupt\n");
90 input_free_device(rpcmouse_dev); 90 input_free_device(rpcmouse_dev);
91 return -EBUSY; 91 return -EBUSY;
diff --git a/drivers/input/mouse/sermouse.c b/drivers/input/mouse/sermouse.c
index a8974243171..0023501a5b6 100644
--- a/drivers/input/mouse/sermouse.c
+++ b/drivers/input/mouse/sermouse.c
@@ -33,7 +33,6 @@
33#include <linux/slab.h> 33#include <linux/slab.h>
34#include <linux/interrupt.h> 34#include <linux/interrupt.h>
35#include <linux/input.h> 35#include <linux/input.h>
36#include <linux/config.h>
37#include <linux/serio.h> 36#include <linux/serio.h>
38#include <linux/init.h> 37#include <linux/init.h>
39 38
diff --git a/drivers/input/mouse/vsxxxaa.c b/drivers/input/mouse/vsxxxaa.c
index 7b85bc21ae4..47edcfd022b 100644
--- a/drivers/input/mouse/vsxxxaa.c
+++ b/drivers/input/mouse/vsxxxaa.c
@@ -81,7 +81,6 @@
81#include <linux/slab.h> 81#include <linux/slab.h>
82#include <linux/interrupt.h> 82#include <linux/interrupt.h>
83#include <linux/input.h> 83#include <linux/input.h>
84#include <linux/config.h>
85#include <linux/serio.h> 84#include <linux/serio.h>
86#include <linux/init.h> 85#include <linux/init.h>
87 86
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c
index eb721b11ff3..1f851acab30 100644
--- a/drivers/input/mousedev.c
+++ b/drivers/input/mousedev.c
@@ -19,7 +19,6 @@
19#include <linux/moduleparam.h> 19#include <linux/moduleparam.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/input.h> 21#include <linux/input.h>
22#include <linux/config.h>
23#include <linux/smp_lock.h> 22#include <linux/smp_lock.h>
24#include <linux/random.h> 23#include <linux/random.h>
25#include <linux/major.h> 24#include <linux/major.h>
diff --git a/drivers/input/power.c b/drivers/input/power.c
index 526e6070600..51a519e24b6 100644
--- a/drivers/input/power.c
+++ b/drivers/input/power.c
@@ -28,7 +28,6 @@
28 */ 28 */
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/config.h>
32#include <linux/input.h> 31#include <linux/input.h>
33#include <linux/slab.h> 32#include <linux/slab.h>
34#include <linux/init.h> 33#include <linux/init.h>
diff --git a/drivers/input/serio/ct82c710.c b/drivers/input/serio/ct82c710.c
index 1ac739ef2ff..bc6e87add09 100644
--- a/drivers/input/serio/ct82c710.c
+++ b/drivers/input/serio/ct82c710.c
@@ -31,7 +31,6 @@
31#include <linux/delay.h> 31#include <linux/delay.h>
32#include <linux/module.h> 32#include <linux/module.h>
33#include <linux/ioport.h> 33#include <linux/ioport.h>
34#include <linux/config.h>
35#include <linux/init.h> 34#include <linux/init.h>
36#include <linux/interrupt.h> 35#include <linux/interrupt.h>
37#include <linux/serio.h> 36#include <linux/serio.h>
diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
index c0b1e4becad..cde036a9216 100644
--- a/drivers/input/serio/gscps2.c
+++ b/drivers/input/serio/gscps2.c
@@ -22,7 +22,6 @@
22 * was usable/enabled ?) 22 * was usable/enabled ?)
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/init.h> 25#include <linux/init.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/serio.h> 27#include <linux/serio.h>
@@ -371,7 +370,7 @@ static int __init gscps2_probe(struct parisc_device *dev)
371 serio->dev.parent = &dev->dev; 370 serio->dev.parent = &dev->dev;
372 371
373 ret = -EBUSY; 372 ret = -EBUSY;
374 if (request_irq(dev->irq, gscps2_interrupt, SA_SHIRQ, ps2port->port->name, ps2port)) 373 if (request_irq(dev->irq, gscps2_interrupt, IRQF_SHARED, ps2port->port->name, ps2port))
375 goto fail_miserably; 374 goto fail_miserably;
376 375
377 if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) { 376 if (ps2port->id != GSC_ID_KEYBOARD && ps2port->id != GSC_ID_MOUSE) {
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index 9cad197a4e6..7d9fafea961 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -1,7 +1,6 @@
1#ifndef _I8042_SPARCIO_H 1#ifndef _I8042_SPARCIO_H
2#define _I8042_SPARCIO_H 2#define _I8042_SPARCIO_H
3 3
4#include <linux/config.h>
5#include <asm/io.h> 4#include <asm/io.h>
6#include <asm/oplib.h> 5#include <asm/oplib.h>
7#include <asm/prom.h> 6#include <asm/prom.h>
diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
index a7d91d5356a..06a3f25657d 100644
--- a/drivers/input/serio/i8042.c
+++ b/drivers/input/serio/i8042.c
@@ -15,7 +15,6 @@
15#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
16#include <linux/interrupt.h> 16#include <linux/interrupt.h>
17#include <linux/ioport.h> 17#include <linux/ioport.h>
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/serio.h> 19#include <linux/serio.h>
21#include <linux/err.h> 20#include <linux/err.h>
@@ -329,7 +328,7 @@ static int i8042_open(struct serio *serio)
329 return 0; 328 return 0;
330 329
331 if (request_irq(port->irq, i8042_interrupt, 330 if (request_irq(port->irq, i8042_interrupt,
332 SA_SHIRQ, "i8042", i8042_request_irq_cookie)) { 331 IRQF_SHARED, "i8042", i8042_request_irq_cookie)) {
333 printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", port->irq, port->name); 332 printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", port->irq, port->name);
334 goto irq_fail; 333 goto irq_fail;
335 } 334 }
@@ -611,7 +610,7 @@ static int __devinit i8042_check_aux(void)
611 */ 610 */
612 611
613 if (request_irq(i8042_ports[I8042_AUX_PORT_NO].irq, i8042_interrupt, 612 if (request_irq(i8042_ports[I8042_AUX_PORT_NO].irq, i8042_interrupt,
614 SA_SHIRQ, "i8042", &i8042_check_aux_cookie)) 613 IRQF_SHARED, "i8042", &i8042_check_aux_cookie))
615 return -1; 614 return -1;
616 free_irq(i8042_ports[I8042_AUX_PORT_NO].irq, &i8042_check_aux_cookie); 615 free_irq(i8042_ports[I8042_AUX_PORT_NO].irq, &i8042_check_aux_cookie);
617 616
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h
index cbbf3842da5..af526ab9ec0 100644
--- a/drivers/input/serio/i8042.h
+++ b/drivers/input/serio/i8042.h
@@ -1,7 +1,6 @@
1#ifndef _I8042_H 1#ifndef _I8042_H
2#define _I8042_H 2#define _I8042_H
3 3
4#include <linux/config.h>
5 4
6/* 5/*
7 * Copyright (c) 1999-2002 Vojtech Pavlik 6 * Copyright (c) 1999-2002 Vojtech Pavlik
diff --git a/drivers/input/serio/pcips2.c b/drivers/input/serio/pcips2.c
index 1e139c5e59d..fb727c66525 100644
--- a/drivers/input/serio/pcips2.c
+++ b/drivers/input/serio/pcips2.c
@@ -107,7 +107,7 @@ static int pcips2_open(struct serio *io)
107 outb(PS2_CTRL_ENABLE, ps2if->base); 107 outb(PS2_CTRL_ENABLE, ps2if->base);
108 pcips2_flush_input(ps2if); 108 pcips2_flush_input(ps2if);
109 109
110 ret = request_irq(ps2if->dev->irq, pcips2_interrupt, SA_SHIRQ, 110 ret = request_irq(ps2if->dev->irq, pcips2_interrupt, IRQF_SHARED,
111 "pcips2", ps2if); 111 "pcips2", ps2if);
112 if (ret == 0) 112 if (ret == 0)
113 val = PS2_CTRL_ENABLE | PS2_CTRL_RXIRQ; 113 val = PS2_CTRL_ENABLE | PS2_CTRL_RXIRQ;
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index 386023c594d..66e411badf7 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -773,7 +773,7 @@ static int __devinit ads7846_probe(struct spi_device *spi)
773 773
774 ts->last_msg = m; 774 ts->last_msg = m;
775 775
776 if (request_irq(spi->irq, ads7846_irq, SA_TRIGGER_FALLING, 776 if (request_irq(spi->irq, ads7846_irq, IRQF_TRIGGER_FALLING,
777 spi->dev.driver->name, ts)) { 777 spi->dev.driver->name, ts)) {
778 dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq); 778 dev_dbg(&spi->dev, "irq %d busy?\n", spi->irq);
779 err = -EBUSY; 779 err = -EBUSY;
diff --git a/drivers/input/touchscreen/corgi_ts.c b/drivers/input/touchscreen/corgi_ts.c
index 5013703db0e..9b66271d3ba 100644
--- a/drivers/input/touchscreen/corgi_ts.c
+++ b/drivers/input/touchscreen/corgi_ts.c
@@ -17,7 +17,7 @@
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20//#include <asm/irq.h> 20#include <linux/irq.h>
21 21
22#include <asm/arch/sharpsl.h> 22#include <asm/arch/sharpsl.h>
23#include <asm/arch/hardware.h> 23#include <asm/arch/hardware.h>
@@ -318,7 +318,7 @@ static int __init corgits_probe(struct platform_device *pdev)
318 corgi_ssp_ads7846_putget((5u << ADSCTRL_ADR_SH) | ADSCTRL_STS); 318 corgi_ssp_ads7846_putget((5u << ADSCTRL_ADR_SH) | ADSCTRL_STS);
319 mdelay(5); 319 mdelay(5);
320 320
321 if (request_irq(corgi_ts->irq_gpio, ts_interrupt, SA_INTERRUPT, "ts", corgi_ts)) { 321 if (request_irq(corgi_ts->irq_gpio, ts_interrupt, IRQF_DISABLED, "ts", corgi_ts)) {
322 err = -EBUSY; 322 err = -EBUSY;
323 goto fail; 323 goto fail;
324 } 324 }
diff --git a/drivers/input/touchscreen/h3600_ts_input.c b/drivers/input/touchscreen/h3600_ts_input.c
index 2de2139f2fe..e2b91001877 100644
--- a/drivers/input/touchscreen/h3600_ts_input.c
+++ b/drivers/input/touchscreen/h3600_ts_input.c
@@ -399,14 +399,14 @@ static int h3600ts_connect(struct serio *serio, struct serio_driver *drv)
399 set_GPIO_IRQ_edge(GPIO_BITSY_NPOWER_BUTTON, GPIO_RISING_EDGE); 399 set_GPIO_IRQ_edge(GPIO_BITSY_NPOWER_BUTTON, GPIO_RISING_EDGE);
400 400
401 if (request_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, action_button_handler, 401 if (request_irq(IRQ_GPIO_BITSY_ACTION_BUTTON, action_button_handler,
402 SA_SHIRQ | SA_INTERRUPT, "h3600_action", &ts->dev)) { 402 IRQF_SHARED | IRQF_DISABLED, "h3600_action", &ts->dev)) {
403 printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n"); 403 printk(KERN_ERR "h3600ts.c: Could not allocate Action Button IRQ!\n");
404 err = -EBUSY; 404 err = -EBUSY;
405 goto fail2; 405 goto fail2;
406 } 406 }
407 407
408 if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler, 408 if (request_irq(IRQ_GPIO_BITSY_NPOWER_BUTTON, npower_button_handler,
409 SA_SHIRQ | SA_INTERRUPT, "h3600_suspend", &ts->dev)) { 409 IRQF_SHARED | IRQF_DISABLED, "h3600_suspend", &ts->dev)) {
410 printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n"); 410 printk(KERN_ERR "h3600ts.c: Could not allocate Power Button IRQ!\n");
411 err = -EBUSY; 411 err = -EBUSY;
412 goto fail3; 412 goto fail3;
diff --git a/drivers/input/touchscreen/hp680_ts_input.c b/drivers/input/touchscreen/hp680_ts_input.c
index 957dd5a1b15..fa97e0f79e7 100644
--- a/drivers/input/touchscreen/hp680_ts_input.c
+++ b/drivers/input/touchscreen/hp680_ts_input.c
@@ -109,7 +109,7 @@ static int __init hp680_ts_init(void)
109 input_register_device(hp680_ts_dev); 109 input_register_device(hp680_ts_dev);
110 110
111 if (request_irq(HP680_TS_IRQ, hp680_ts_interrupt, 111 if (request_irq(HP680_TS_IRQ, hp680_ts_interrupt,
112 SA_INTERRUPT, MODNAME, 0) < 0) { 112 IRQF_DISABLED, MODNAME, 0) < 0) {
113 printk(KERN_ERR "hp680_touchscreen.c: Can't allocate irq %d\n", 113 printk(KERN_ERR "hp680_touchscreen.c: Can't allocate irq %d\n",
114 HP680_TS_IRQ); 114 HP680_TS_IRQ);
115 input_unregister_device(hp680_ts_dev); 115 input_unregister_device(hp680_ts_dev);
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c
index 5f9ecad2ca7..00e3929c628 100644
--- a/drivers/input/tsdev.c
+++ b/drivers/input/tsdev.c
@@ -48,7 +48,6 @@
48#include <linux/init.h> 48#include <linux/init.h>
49#include <linux/input.h> 49#include <linux/input.h>
50#include <linux/major.h> 50#include <linux/major.h>
51#include <linux/config.h>
52#include <linux/smp_lock.h> 51#include <linux/smp_lock.h>
53#include <linux/random.h> 52#include <linux/random.h>
54#include <linux/time.h> 53#include <linux/time.h>
diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c
index a518ec53102..669f76393b5 100644
--- a/drivers/isdn/capi/capi.c
+++ b/drivers/isdn/capi/capi.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/drivers/isdn/capi/capiutil.c b/drivers/isdn/capi/capiutil.c
index e7cf6bc286a..c1b21552fc0 100644
--- a/drivers/isdn/capi/capiutil.c
+++ b/drivers/isdn/capi/capiutil.c
@@ -17,7 +17,6 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/mm.h> 18#include <linux/mm.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/config.h>
21#include <linux/isdn/capiutil.h> 20#include <linux/isdn/capiutil.h>
22 21
23/* from CAPI2.0 DDK AVM Berlin GmbH */ 22/* from CAPI2.0 DDK AVM Berlin GmbH */
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c
index 1b37d86d5ee..399b316111f 100644
--- a/drivers/isdn/divert/divert_procfs.c
+++ b/drivers/isdn/divert/divert_procfs.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/poll.h> 13#include <linux/poll.h>
15#include <linux/smp_lock.h> 14#include <linux/smp_lock.h>
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h
index 1ca3bfdef51..884bd72c1bf 100644
--- a/drivers/isdn/gigaset/gigaset.h
+++ b/drivers/isdn/gigaset/gigaset.h
@@ -16,7 +16,6 @@
16#ifndef GIGASET_H 16#ifndef GIGASET_H
17#define GIGASET_H 17#define GIGASET_H
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/compiler.h> 20#include <linux/compiler.h>
22#include <linux/types.h> 21#include <linux/types.h>
diff --git a/drivers/isdn/hardware/avm/b1dma.c b/drivers/isdn/hardware/avm/b1dma.c
index 4d64e5cbcdb..a4beeb46c85 100644
--- a/drivers/isdn/hardware/avm/b1dma.c
+++ b/drivers/isdn/hardware/avm/b1dma.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/skbuff.h> 14#include <linux/skbuff.h>
diff --git a/drivers/isdn/hardware/avm/b1pci.c b/drivers/isdn/hardware/avm/b1pci.c
index 5435a6cfb5e..90e2e6643d1 100644
--- a/drivers/isdn/hardware/avm/b1pci.c
+++ b/drivers/isdn/hardware/avm/b1pci.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/skbuff.h> 14#include <linux/skbuff.h>
@@ -98,7 +97,7 @@ static int b1pci_probe(struct capicardparams *p, struct pci_dev *pdev)
98 b1_reset(card->port); 97 b1_reset(card->port);
99 b1_getrevision(card); 98 b1_getrevision(card);
100 99
101 retval = request_irq(card->irq, b1_interrupt, SA_SHIRQ, card->name, card); 100 retval = request_irq(card->irq, b1_interrupt, IRQF_SHARED, card->name, card);
102 if (retval) { 101 if (retval) {
103 printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", card->irq); 102 printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", card->irq);
104 retval = -EBUSY; 103 retval = -EBUSY;
@@ -235,7 +234,7 @@ static int b1pciv4_probe(struct capicardparams *p, struct pci_dev *pdev)
235 b1dma_reset(card); 234 b1dma_reset(card);
236 b1_getrevision(card); 235 b1_getrevision(card);
237 236
238 retval = request_irq(card->irq, b1dma_interrupt, SA_SHIRQ, card->name, card); 237 retval = request_irq(card->irq, b1dma_interrupt, IRQF_SHARED, card->name, card);
239 if (retval) { 238 if (retval) {
240 printk(KERN_ERR "b1pci: unable to get IRQ %d.\n", 239 printk(KERN_ERR "b1pci: unable to get IRQ %d.\n",
241 card->irq); 240 card->irq);
diff --git a/drivers/isdn/hardware/avm/b1pcmcia.c b/drivers/isdn/hardware/avm/b1pcmcia.c
index ad5025155b4..e479c0aef38 100644
--- a/drivers/isdn/hardware/avm/b1pcmcia.c
+++ b/drivers/isdn/hardware/avm/b1pcmcia.c
@@ -82,7 +82,7 @@ static int b1pcmcia_add_card(unsigned int port, unsigned irq,
82 card->irq = irq; 82 card->irq = irq;
83 card->cardtype = cardtype; 83 card->cardtype = cardtype;
84 84
85 retval = request_irq(card->irq, b1_interrupt, SA_SHIRQ, card->name, card); 85 retval = request_irq(card->irq, b1_interrupt, IRQF_SHARED, card->name, card);
86 if (retval) { 86 if (retval) {
87 printk(KERN_ERR "b1pcmcia: unable to get IRQ %d.\n", 87 printk(KERN_ERR "b1pcmcia: unable to get IRQ %d.\n",
88 card->irq); 88 card->irq);
diff --git a/drivers/isdn/hardware/avm/c4.c b/drivers/isdn/hardware/avm/c4.c
index f7253b2136e..6c3d5f5f1f4 100644
--- a/drivers/isdn/hardware/avm/c4.c
+++ b/drivers/isdn/hardware/avm/c4.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/skbuff.h> 14#include <linux/skbuff.h>
@@ -1173,7 +1172,7 @@ static int c4_add_card(struct capicardparams *p, struct pci_dev *dev,
1173 } 1172 }
1174 c4_reset(card); 1173 c4_reset(card);
1175 1174
1176 retval = request_irq(card->irq, c4_interrupt, SA_SHIRQ, card->name, card); 1175 retval = request_irq(card->irq, c4_interrupt, IRQF_SHARED, card->name, card);
1177 if (retval) { 1176 if (retval) {
1178 printk(KERN_ERR "c4: unable to get IRQ %d.\n",card->irq); 1177 printk(KERN_ERR "c4: unable to get IRQ %d.\n",card->irq);
1179 retval = -EBUSY; 1178 retval = -EBUSY;
diff --git a/drivers/isdn/hardware/avm/t1pci.c b/drivers/isdn/hardware/avm/t1pci.c
index 2ceec8e8419..d1e253c94db 100644
--- a/drivers/isdn/hardware/avm/t1pci.c
+++ b/drivers/isdn/hardware/avm/t1pci.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/skbuff.h> 14#include <linux/skbuff.h>
@@ -104,7 +103,7 @@ static int t1pci_add_card(struct capicardparams *p, struct pci_dev *pdev)
104 } 103 }
105 b1dma_reset(card); 104 b1dma_reset(card);
106 105
107 retval = request_irq(card->irq, b1dma_interrupt, SA_SHIRQ, card->name, card); 106 retval = request_irq(card->irq, b1dma_interrupt, IRQF_SHARED, card->name, card);
108 if (retval) { 107 if (retval) {
109 printk(KERN_ERR "t1pci: unable to get IRQ %d.\n", card->irq); 108 printk(KERN_ERR "t1pci: unable to get IRQ %d.\n", card->irq);
110 retval = -EBUSY; 109 retval = -EBUSY;
diff --git a/drivers/isdn/hardware/eicon/capimain.c b/drivers/isdn/hardware/eicon/capimain.c
index 8fe4f3f0935..7a74ed35b1b 100644
--- a/drivers/isdn/hardware/eicon/capimain.c
+++ b/drivers/isdn/hardware/eicon/capimain.c
@@ -10,7 +10,6 @@
10 * of the GNU General Public License, incorporated herein by reference. 10 * of the GNU General Public License, incorporated herein by reference.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <asm/uaccess.h> 15#include <asm/uaccess.h>
diff --git a/drivers/isdn/hardware/eicon/diva_didd.c b/drivers/isdn/hardware/eicon/diva_didd.c
index 27204f4b111..14298b8c835 100644
--- a/drivers/isdn/hardware/eicon/diva_didd.c
+++ b/drivers/isdn/hardware/eicon/diva_didd.c
@@ -11,7 +11,6 @@
11 * of the GNU General Public License, incorporated herein by reference. 11 * of the GNU General Public License, incorporated herein by reference.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index b163c590918..77155d9f399 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -10,7 +10,6 @@
10 * of the GNU General Public License, incorporated herein by reference. 10 * of the GNU General Public License, incorporated herein by reference.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index 6e7d89a31c1..fff0d89c806 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -10,7 +10,6 @@
10 * of the GNU General Public License, incorporated herein by reference. 10 * of the GNU General Public License, incorporated herein by reference.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 9dee6a39104..b7dadba13e8 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -9,7 +9,6 @@
9 * of the GNU General Public License, incorporated herein by reference. 9 * of the GNU General Public License, incorporated herein by reference.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
@@ -487,7 +486,7 @@ void __inline__ outpp(void __iomem *addr, word p)
487int diva_os_register_irq(void *context, byte irq, const char *name) 486int diva_os_register_irq(void *context, byte irq, const char *name)
488{ 487{
489 int result = request_irq(irq, diva_os_irq_wrapper, 488 int result = request_irq(irq, diva_os_irq_wrapper,
490 SA_INTERRUPT | SA_SHIRQ, name, context); 489 IRQF_DISABLED | IRQF_SHARED, name, context);
491 return (result); 490 return (result);
492} 491}
493 492
diff --git a/drivers/isdn/hardware/eicon/divasproc.c b/drivers/isdn/hardware/eicon/divasproc.c
index c12efa6f842..6a4373a4f1e 100644
--- a/drivers/isdn/hardware/eicon/divasproc.c
+++ b/drivers/isdn/hardware/eicon/divasproc.c
@@ -10,7 +10,6 @@
10 * of the GNU General Public License, incorporated herein by reference. 10 * of the GNU General Public License, incorporated herein by reference.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/poll.h> 15#include <linux/poll.h>
diff --git a/drivers/isdn/hardware/eicon/platform.h b/drivers/isdn/hardware/eicon/platform.h
index 12b8ff29e97..a66836cf756 100644
--- a/drivers/isdn/hardware/eicon/platform.h
+++ b/drivers/isdn/hardware/eicon/platform.h
@@ -18,7 +18,6 @@
18#define DIVA_BUILD "local" 18#define DIVA_BUILD "local"
19#endif 19#endif
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c
index d643bb32ad0..574e252dfa4 100644
--- a/drivers/isdn/hisax/avm_a1p.c
+++ b/drivers/isdn/hisax/avm_a1p.c
@@ -255,7 +255,7 @@ setup_avm_a1_pcmcia(struct IsdnCard *card)
255 cs->BC_Write_Reg = &WriteHSCX; 255 cs->BC_Write_Reg = &WriteHSCX;
256 cs->BC_Send_Data = &hscx_fill_fifo; 256 cs->BC_Send_Data = &hscx_fill_fifo;
257 cs->cardmsg = &AVM_card_msg; 257 cs->cardmsg = &AVM_card_msg;
258 cs->irq_flags = SA_SHIRQ; 258 cs->irq_flags = IRQF_SHARED;
259 cs->irq_func = &avm_a1p_interrupt; 259 cs->irq_func = &avm_a1p_interrupt;
260 260
261 ISACVersion(cs, "AVM A1 PCMCIA:"); 261 ISACVersion(cs, "AVM A1 PCMCIA:");
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index 4abe5ff10e7..04f5917bf5a 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include "hisax.h" 16#include "hisax.h"
18#include "isac.h" 17#include "isac.h"
@@ -809,7 +808,7 @@ setup_avm_pcipnp(struct IsdnCard *card)
809 printk(KERN_WARNING "FritzPCI: No PCI card found\n"); 808 printk(KERN_WARNING "FritzPCI: No PCI card found\n");
810 return(0); 809 return(0);
811 } 810 }
812 cs->irq_flags |= SA_SHIRQ; 811 cs->irq_flags |= IRQF_SHARED;
813#else 812#else
814 printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n"); 813 printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n");
815 return (0); 814 return (0);
diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c
index dcb308aeb50..3cf1f242178 100644
--- a/drivers/isdn/hisax/bkm_a4t.c
+++ b/drivers/isdn/hisax/bkm_a4t.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include "hisax.h" 15#include "hisax.h"
17#include "isac.h" 16#include "isac.h"
@@ -336,7 +335,7 @@ setup_bkm_a4t(struct IsdnCard *card)
336 cs->BC_Send_Data = &jade_fill_fifo; 335 cs->BC_Send_Data = &jade_fill_fifo;
337 cs->cardmsg = &BKM_card_msg; 336 cs->cardmsg = &BKM_card_msg;
338 cs->irq_func = &bkm_interrupt; 337 cs->irq_func = &bkm_interrupt;
339 cs->irq_flags |= SA_SHIRQ; 338 cs->irq_flags |= IRQF_SHARED;
340 ISACVersion(cs, "Telekom A4T:"); 339 ISACVersion(cs, "Telekom A4T:");
341 /* Jade version */ 340 /* Jade version */
342 JadeVersion(cs, "Telekom A4T:"); 341 JadeVersion(cs, "Telekom A4T:");
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c
index 5f21b82c8c8..15681f3e73b 100644
--- a/drivers/isdn/hisax/bkm_a8.c
+++ b/drivers/isdn/hisax/bkm_a8.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include "hisax.h" 15#include "hisax.h"
17#include "isac.h" 16#include "isac.h"
@@ -375,7 +374,7 @@ setup_sct_quadro(struct IsdnCard *card)
375 pci_ioaddr5 &= PCI_BASE_ADDRESS_IO_MASK; 374 pci_ioaddr5 &= PCI_BASE_ADDRESS_IO_MASK;
376 /* Take over */ 375 /* Take over */
377 cs->irq = pci_irq; 376 cs->irq = pci_irq;
378 cs->irq_flags |= SA_SHIRQ; 377 cs->irq_flags |= IRQF_SHARED;
379 /* pci_ioaddr1 is unique to all subdevices */ 378 /* pci_ioaddr1 is unique to all subdevices */
380 /* pci_ioaddr2 is for the fourth subdevice only */ 379 /* pci_ioaddr2 is for the fourth subdevice only */
381 /* pci_ioaddr3 is for the third subdevice only */ 380 /* pci_ioaddr3 is for the third subdevice only */
diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c
index 27332506f9f..5333be5d2c4 100644
--- a/drivers/isdn/hisax/config.c
+++ b/drivers/isdn/hisax/config.c
@@ -17,7 +17,6 @@
17#include <linux/types.h> 17#include <linux/types.h>
18#include <linux/stddef.h> 18#include <linux/stddef.h>
19#include <linux/timer.h> 19#include <linux/timer.h>
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include "hisax.h" 21#include "hisax.h"
23#include <linux/module.h> 22#include <linux/module.h>
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
index b0ff1cc97d7..323a02ef384 100644
--- a/drivers/isdn/hisax/diva.c
+++ b/drivers/isdn/hisax/diva.c
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/config.h>
20#include "hisax.h" 19#include "hisax.h"
21#include "isac.h" 20#include "isac.h"
22#include "hscx.h" 21#include "hscx.h"
@@ -1077,7 +1076,7 @@ setup_diva(struct IsdnCard *card)
1077 printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n"); 1076 printk(KERN_WARNING "Diva: No IO-Adr for PCI card found\n");
1078 return(0); 1077 return(0);
1079 } 1078 }
1080 cs->irq_flags |= SA_SHIRQ; 1079 cs->irq_flags |= IRQF_SHARED;
1081#else 1080#else
1082 printk(KERN_WARNING "Diva: cfgreg 0 and NO_PCI_BIOS\n"); 1081 printk(KERN_WARNING "Diva: cfgreg 0 and NO_PCI_BIOS\n");
1083 printk(KERN_WARNING "Diva: unable to config DIVA PCI\n"); 1082 printk(KERN_WARNING "Diva: unable to config DIVA PCI\n");
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
index f8ca4b32333..3b3e318f607 100644
--- a/drivers/isdn/hisax/elsa.c
+++ b/drivers/isdn/hisax/elsa.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/config.h>
23#include "hisax.h" 22#include "hisax.h"
24#include "arcofi.h" 23#include "arcofi.h"
25#include "isac.h" 24#include "isac.h"
@@ -86,8 +85,8 @@ static const char *ITACVer[] =
86 *** ***/ 85 *** ***/
87 86
88/* Config-Register (Read) */ 87/* Config-Register (Read) */
89#define ELSA_TIMER_RUN 0x02 /* Bit 1 des Config-Reg */ 88#define ELIRQF_TIMER_RUN 0x02 /* Bit 1 des Config-Reg */
90#define ELSA_TIMER_RUN_PCC8 0x01 /* Bit 0 des Config-Reg bei PCC */ 89#define ELIRQF_TIMER_RUN_PCC8 0x01 /* Bit 0 des Config-Reg bei PCC */
91#define ELSA_IRQ_IDX 0x38 /* Bit 3,4,5 des Config-Reg */ 90#define ELSA_IRQ_IDX 0x38 /* Bit 3,4,5 des Config-Reg */
92#define ELSA_IRQ_IDX_PCC8 0x30 /* Bit 4,5 des Config-Reg */ 91#define ELSA_IRQ_IDX_PCC8 0x30 /* Bit 4,5 des Config-Reg */
93#define ELSA_IRQ_IDX_PC 0x0c /* Bit 2,3 des Config-Reg */ 92#define ELSA_IRQ_IDX_PC 0x0c /* Bit 2,3 des Config-Reg */
@@ -103,7 +102,7 @@ static const char *ITACVer[] =
103#define ELSA_S0_POWER_BAD 0x08 /* Bit 3 S0-Bus Spannung fehlt */ 102#define ELSA_S0_POWER_BAD 0x08 /* Bit 3 S0-Bus Spannung fehlt */
104 103
105/* Status Flags */ 104/* Status Flags */
106#define ELSA_TIMER_AKTIV 1 105#define ELIRQF_TIMER_AKTIV 1
107#define ELSA_BAD_PWR 2 106#define ELSA_BAD_PWR 2
108#define ELSA_ASSIGN 4 107#define ELSA_ASSIGN 4
109 108
@@ -260,10 +259,10 @@ TimerRun(struct IsdnCardState *cs)
260 259
261 v = bytein(cs->hw.elsa.cfg); 260 v = bytein(cs->hw.elsa.cfg);
262 if ((cs->subtyp == ELSA_QS1000) || (cs->subtyp == ELSA_QS3000)) 261 if ((cs->subtyp == ELSA_QS1000) || (cs->subtyp == ELSA_QS3000))
263 return (0 == (v & ELSA_TIMER_RUN)); 262 return (0 == (v & ELIRQF_TIMER_RUN));
264 else if (cs->subtyp == ELSA_PCC8) 263 else if (cs->subtyp == ELSA_PCC8)
265 return (v & ELSA_TIMER_RUN_PCC8); 264 return (v & ELIRQF_TIMER_RUN_PCC8);
266 return (v & ELSA_TIMER_RUN); 265 return (v & ELIRQF_TIMER_RUN);
267} 266}
268/* 267/*
269 * fast interrupt HSCX stuff goes here 268 * fast interrupt HSCX stuff goes here
@@ -335,7 +334,7 @@ elsa_interrupt(int intno, void *dev_id, struct pt_regs *regs)
335 writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK, 0xFF); 334 writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK, 0xFF);
336 writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK + 0x40, 0xFF); 335 writereg(cs->hw.elsa.ale, cs->hw.elsa.hscx, HSCX_MASK + 0x40, 0xFF);
337 writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_MASK, 0xFF); 336 writereg(cs->hw.elsa.ale, cs->hw.elsa.isac, ISAC_MASK, 0xFF);
338 if (cs->hw.elsa.status & ELSA_TIMER_AKTIV) { 337 if (cs->hw.elsa.status & ELIRQF_TIMER_AKTIV) {
339 if (!TimerRun(cs)) { 338 if (!TimerRun(cs)) {
340 /* Timer Restart */ 339 /* Timer Restart */
341 byteout(cs->hw.elsa.timer, 0); 340 byteout(cs->hw.elsa.timer, 0);
@@ -686,7 +685,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
686 spin_lock_irqsave(&cs->lock, flags); 685 spin_lock_irqsave(&cs->lock, flags);
687 cs->hw.elsa.counter = 0; 686 cs->hw.elsa.counter = 0;
688 cs->hw.elsa.ctrl_reg |= ELSA_ENA_TIMER_INT; 687 cs->hw.elsa.ctrl_reg |= ELSA_ENA_TIMER_INT;
689 cs->hw.elsa.status |= ELSA_TIMER_AKTIV; 688 cs->hw.elsa.status |= ELIRQF_TIMER_AKTIV;
690 byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); 689 byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg);
691 byteout(cs->hw.elsa.timer, 0); 690 byteout(cs->hw.elsa.timer, 0);
692 spin_unlock_irqrestore(&cs->lock, flags); 691 spin_unlock_irqrestore(&cs->lock, flags);
@@ -694,7 +693,7 @@ Elsa_card_msg(struct IsdnCardState *cs, int mt, void *arg)
694 spin_lock_irqsave(&cs->lock, flags); 693 spin_lock_irqsave(&cs->lock, flags);
695 cs->hw.elsa.ctrl_reg &= ~ELSA_ENA_TIMER_INT; 694 cs->hw.elsa.ctrl_reg &= ~ELSA_ENA_TIMER_INT;
696 byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg); 695 byteout(cs->hw.elsa.ctrl, cs->hw.elsa.ctrl_reg);
697 cs->hw.elsa.status &= ~ELSA_TIMER_AKTIV; 696 cs->hw.elsa.status &= ~ELIRQF_TIMER_AKTIV;
698 spin_unlock_irqrestore(&cs->lock, flags); 697 spin_unlock_irqrestore(&cs->lock, flags);
699 printk(KERN_INFO "Elsa: %d timer tics in 110 msek\n", 698 printk(KERN_INFO "Elsa: %d timer tics in 110 msek\n",
700 cs->hw.elsa.counter); 699 cs->hw.elsa.counter);
@@ -1013,7 +1012,7 @@ setup_elsa(struct IsdnCard *card)
1013 cs->hw.elsa.timer = 0; 1012 cs->hw.elsa.timer = 0;
1014 cs->hw.elsa.trig = 0; 1013 cs->hw.elsa.trig = 0;
1015 cs->hw.elsa.ctrl = 0; 1014 cs->hw.elsa.ctrl = 0;
1016 cs->irq_flags |= SA_SHIRQ; 1015 cs->irq_flags |= IRQF_SHARED;
1017 printk(KERN_INFO 1016 printk(KERN_INFO
1018 "Elsa: %s defined at %#lx IRQ %d\n", 1017 "Elsa: %s defined at %#lx IRQ %d\n",
1019 Elsa_Types[cs->subtyp], 1018 Elsa_Types[cs->subtyp],
@@ -1062,7 +1061,7 @@ setup_elsa(struct IsdnCard *card)
1062 test_and_set_bit(HW_IPAC, &cs->HW_Flags); 1061 test_and_set_bit(HW_IPAC, &cs->HW_Flags);
1063 cs->hw.elsa.timer = 0; 1062 cs->hw.elsa.timer = 0;
1064 cs->hw.elsa.trig = 0; 1063 cs->hw.elsa.trig = 0;
1065 cs->irq_flags |= SA_SHIRQ; 1064 cs->irq_flags |= IRQF_SHARED;
1066 printk(KERN_INFO 1065 printk(KERN_INFO
1067 "Elsa: %s defined at %#lx/0x%x IRQ %d\n", 1066 "Elsa: %s defined at %#lx/0x%x IRQ %d\n",
1068 Elsa_Types[cs->subtyp], 1067 Elsa_Types[cs->subtyp],
diff --git a/drivers/isdn/hisax/elsa_ser.c b/drivers/isdn/hisax/elsa_ser.c
index 898ec091619..0279fb323cb 100644
--- a/drivers/isdn/hisax/elsa_ser.c
+++ b/drivers/isdn/hisax/elsa_ser.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/serial.h> 10#include <linux/serial.h>
12#include <linux/serial_reg.h> 11#include <linux/serial_reg.h>
13 12
diff --git a/drivers/isdn/hisax/enternow_pci.c b/drivers/isdn/hisax/enternow_pci.c
index 3341cf15553..8fcbe2e7d76 100644
--- a/drivers/isdn/hisax/enternow_pci.c
+++ b/drivers/isdn/hisax/enternow_pci.c
@@ -60,7 +60,6 @@
60 */ 60 */
61 61
62 62
63#include <linux/config.h>
64#include "hisax.h" 63#include "hisax.h"
65#include "isac.h" 64#include "isac.h"
66#include "isdnl1.h" 65#include "isdnl1.h"
@@ -406,7 +405,7 @@ setup_enternow_pci(struct IsdnCard *card)
406 cs->BC_Send_Data = &netjet_fill_dma; 405 cs->BC_Send_Data = &netjet_fill_dma;
407 cs->cardmsg = &enpci_card_msg; 406 cs->cardmsg = &enpci_card_msg;
408 cs->irq_func = &enpci_interrupt; 407 cs->irq_func = &enpci_interrupt;
409 cs->irq_flags |= SA_SHIRQ; 408 cs->irq_flags |= IRQF_SHARED;
410 409
411 return (1); 410 return (1);
412} 411}
diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c
index 60b04c6d9e7..3e7d9230358 100644
--- a/drivers/isdn/hisax/gazel.c
+++ b/drivers/isdn/hisax/gazel.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include "hisax.h" 15#include "hisax.h"
17#include "isac.h" 16#include "isac.h"
@@ -593,7 +592,7 @@ setup_gazelpci(struct IsdnCardState *cs)
593 cs->hw.gazel.hscxfifo[0] = cs->hw.gazel.hscx[0]; 592 cs->hw.gazel.hscxfifo[0] = cs->hw.gazel.hscx[0];
594 cs->hw.gazel.hscxfifo[1] = cs->hw.gazel.hscx[1]; 593 cs->hw.gazel.hscxfifo[1] = cs->hw.gazel.hscx[1];
595 cs->irq = pci_irq; 594 cs->irq = pci_irq;
596 cs->irq_flags |= SA_SHIRQ; 595 cs->irq_flags |= IRQF_SHARED;
597 596
598 switch (seekcard) { 597 switch (seekcard) {
599 case PCI_DEVICE_ID_PLX_R685: 598 case PCI_DEVICE_ID_PLX_R685:
diff --git a/drivers/isdn/hisax/hfc4s8s_l1.c b/drivers/isdn/hisax/hfc4s8s_l1.c
index e3866b0a97f..0f967b3df79 100644
--- a/drivers/isdn/hisax/hfc4s8s_l1.c
+++ b/drivers/isdn/hisax/hfc4s8s_l1.c
@@ -22,7 +22,6 @@
22 22
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/init.h> 24#include <linux/init.h>
25#include <linux/config.h>
26#include <linux/pci.h> 25#include <linux/pci.h>
27#include <linux/interrupt.h> 26#include <linux/interrupt.h>
28#include <linux/delay.h> 27#include <linux/delay.h>
@@ -1553,7 +1552,7 @@ setup_instance(hfc4s8s_hw * hw)
1553 INIT_WORK(&hw->tqueue, (void *) (void *) hfc4s8s_bh, hw); 1552 INIT_WORK(&hw->tqueue, (void *) (void *) hfc4s8s_bh, hw);
1554 1553
1555 if (request_irq 1554 if (request_irq
1556 (hw->irq, hfc4s8s_interrupt, SA_SHIRQ, hw->card_name, hw)) { 1555 (hw->irq, hfc4s8s_interrupt, IRQF_SHARED, hw->card_name, hw)) {
1557 printk(KERN_INFO 1556 printk(KERN_INFO
1558 "HFC-4S/8S: unable to alloc irq %d, card ignored\n", 1557 "HFC-4S/8S: unable to alloc irq %d, card ignored\n",
1559 hw->irq); 1558 hw->irq);
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index 3622720f050..7241e73879b 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/config.h>
20#include "hisax.h" 19#include "hisax.h"
21#include "hfc_pci.h" 20#include "hfc_pci.h"
22#include "isdnl1.h" 21#include "isdnl1.h"
@@ -1733,7 +1732,7 @@ setup_hfcpci(struct IsdnCard *card)
1733 cs->BC_Read_Reg = NULL; 1732 cs->BC_Read_Reg = NULL;
1734 cs->BC_Write_Reg = NULL; 1733 cs->BC_Write_Reg = NULL;
1735 cs->irq_func = &hfcpci_interrupt; 1734 cs->irq_func = &hfcpci_interrupt;
1736 cs->irq_flags |= SA_SHIRQ; 1735 cs->irq_flags |= IRQF_SHARED;
1737 cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer; 1736 cs->hw.hfcpci.timer.function = (void *) hfcpci_Timer;
1738 cs->hw.hfcpci.timer.data = (long) cs; 1737 cs->hw.hfcpci.timer.data = (long) cs;
1739 init_timer(&cs->hw.hfcpci.timer); 1738 init_timer(&cs->hw.hfcpci.timer);
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 262c4412741..b5e571a5269 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -32,7 +32,6 @@
32#include <linux/types.h> 32#include <linux/types.h>
33#include <linux/stddef.h> 33#include <linux/stddef.h>
34#include <linux/timer.h> 34#include <linux/timer.h>
35#include <linux/config.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/kernel_stat.h> 37#include <linux/kernel_stat.h>
diff --git a/drivers/isdn/hisax/hisax.h b/drivers/isdn/hisax/hisax.h
index 11fe537e2f6..75920aa0a3c 100644
--- a/drivers/isdn/hisax/hisax.h
+++ b/drivers/isdn/hisax/hisax.h
@@ -6,7 +6,6 @@
6 * of the GNU General Public License, incorporated herein by reference. 6 * of the GNU General Public License, incorporated herein by reference.
7 * 7 *
8 */ 8 */
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/fs.h> 10#include <linux/fs.h>
12#include <linux/major.h> 11#include <linux/major.h>
diff --git a/drivers/isdn/hisax/hisax_debug.h b/drivers/isdn/hisax/hisax_debug.h
index ba518a7a7fb..ceafecdb103 100644
--- a/drivers/isdn/hisax/hisax_debug.h
+++ b/drivers/isdn/hisax/hisax_debug.h
@@ -22,7 +22,6 @@
22#ifndef __HISAX_DEBUG_H__ 22#ifndef __HISAX_DEBUG_H__
23#define __HISAX_DEBUG_H__ 23#define __HISAX_DEBUG_H__
24 24
25#include <linux/config.h>
26 25
27#ifdef CONFIG_HISAX_DEBUG 26#ifdef CONFIG_HISAX_DEBUG
28 27
diff --git a/drivers/isdn/hisax/hisax_fcpcipnp.c b/drivers/isdn/hisax/hisax_fcpcipnp.c
index dbcca287ee2..1d7cf3bd6aa 100644
--- a/drivers/isdn/hisax/hisax_fcpcipnp.c
+++ b/drivers/isdn/hisax/hisax_fcpcipnp.c
@@ -725,11 +725,11 @@ static int __devinit fcpcipnp_setup(struct fritz_adapter *adapter)
725 725
726 switch (adapter->type) { 726 switch (adapter->type) {
727 case AVM_FRITZ_PCIV2: 727 case AVM_FRITZ_PCIV2:
728 retval = request_irq(adapter->irq, fcpci2_irq, SA_SHIRQ, 728 retval = request_irq(adapter->irq, fcpci2_irq, IRQF_SHARED,
729 "fcpcipnp", adapter); 729 "fcpcipnp", adapter);
730 break; 730 break;
731 case AVM_FRITZ_PCI: 731 case AVM_FRITZ_PCI:
732 retval = request_irq(adapter->irq, fcpci_irq, SA_SHIRQ, 732 retval = request_irq(adapter->irq, fcpci_irq, IRQF_SHARED,
733 "fcpcipnp", adapter); 733 "fcpcipnp", adapter);
734 break; 734 break;
735 case AVM_FRITZ_PNP: 735 case AVM_FRITZ_PNP:
diff --git a/drivers/isdn/hisax/ipacx.c b/drivers/isdn/hisax/ipacx.c
index 2e9afae1254..df5fc92a89b 100644
--- a/drivers/isdn/hisax/ipacx.c
+++ b/drivers/isdn/hisax/ipacx.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include "hisax_if.h" 14#include "hisax_if.h"
16#include "hisax.h" 15#include "hisax.h"
diff --git a/drivers/isdn/hisax/isdnl3.c b/drivers/isdn/hisax/isdnl3.c
index c9917cd2132..281fa27d9f0 100644
--- a/drivers/isdn/hisax/isdnl3.c
+++ b/drivers/isdn/hisax/isdnl3.c
@@ -18,7 +18,6 @@
18#include <linux/init.h> 18#include <linux/init.h>
19#include "hisax.h" 19#include "hisax.h"
20#include "isdnl3.h" 20#include "isdnl3.h"
21#include <linux/config.h>
22 21
23const char *l3_revision = "$Revision: 2.22.2.3 $"; 22const char *l3_revision = "$Revision: 2.22.2.3 $";
24 23
diff --git a/drivers/isdn/hisax/l3dss1.c b/drivers/isdn/hisax/l3dss1.c
index e96845cdd4f..99feae8b921 100644
--- a/drivers/isdn/hisax/l3dss1.c
+++ b/drivers/isdn/hisax/l3dss1.c
@@ -23,7 +23,6 @@
23#include "isdnl3.h" 23#include "isdnl3.h"
24#include "l3dss1.h" 24#include "l3dss1.h"
25#include <linux/ctype.h> 25#include <linux/ctype.h>
26#include <linux/config.h>
27 26
28extern char *HiSax_getrev(const char *revision); 27extern char *HiSax_getrev(const char *revision);
29static const char *dss1_revision = "$Revision: 2.32.2.3 $"; 28static const char *dss1_revision = "$Revision: 2.32.2.3 $";
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
index 68a2159cbd1..79a97b1c381 100644
--- a/drivers/isdn/hisax/niccy.c
+++ b/drivers/isdn/hisax/niccy.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16 16
17#include <linux/config.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include "hisax.h" 18#include "hisax.h"
20#include "isac.h" 19#include "isac.h"
@@ -337,7 +336,7 @@ setup_niccy(struct IsdnCard *card)
337 printk(KERN_WARNING "Niccy: No PCI card found\n"); 336 printk(KERN_WARNING "Niccy: No PCI card found\n");
338 return(0); 337 return(0);
339 } 338 }
340 cs->irq_flags |= SA_SHIRQ; 339 cs->irq_flags |= IRQF_SHARED;
341 cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA; 340 cs->hw.niccy.isac = pci_ioaddr + ISAC_PCI_DATA;
342 cs->hw.niccy.isac_ale = pci_ioaddr + ISAC_PCI_ADDR; 341 cs->hw.niccy.isac_ale = pci_ioaddr + ISAC_PCI_ADDR;
343 cs->hw.niccy.hscx = pci_ioaddr + HSCX_PCI_DATA; 342 cs->hw.niccy.hscx = pci_ioaddr + HSCX_PCI_DATA;
diff --git a/drivers/isdn/hisax/nj_s.c b/drivers/isdn/hisax/nj_s.c
index a7d3cd3f36f..e5b900a6fa0 100644
--- a/drivers/isdn/hisax/nj_s.c
+++ b/drivers/isdn/hisax/nj_s.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include "hisax.h" 9#include "hisax.h"
11#include "isac.h" 10#include "isac.h"
@@ -272,7 +271,7 @@ setup_netjet_s(struct IsdnCard *card)
272 setup_isac(cs); 271 setup_isac(cs);
273 cs->cardmsg = &NETjet_S_card_msg; 272 cs->cardmsg = &NETjet_S_card_msg;
274 cs->irq_func = &netjet_s_interrupt; 273 cs->irq_func = &netjet_s_interrupt;
275 cs->irq_flags |= SA_SHIRQ; 274 cs->irq_flags |= IRQF_SHARED;
276 ISACVersion(cs, "NETjet-S:"); 275 ISACVersion(cs, "NETjet-S:");
277 return (1); 276 return (1);
278} 277}
diff --git a/drivers/isdn/hisax/nj_u.c b/drivers/isdn/hisax/nj_u.c
index 1ae7cac98a8..7002b09936d 100644
--- a/drivers/isdn/hisax/nj_u.c
+++ b/drivers/isdn/hisax/nj_u.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include "hisax.h" 9#include "hisax.h"
11#include "icc.h" 10#include "icc.h"
@@ -238,7 +237,7 @@ setup_netjet_u(struct IsdnCard *card)
238 cs->BC_Send_Data = &netjet_fill_dma; 237 cs->BC_Send_Data = &netjet_fill_dma;
239 cs->cardmsg = &NETjet_U_card_msg; 238 cs->cardmsg = &NETjet_U_card_msg;
240 cs->irq_func = &netjet_u_interrupt; 239 cs->irq_func = &netjet_u_interrupt;
241 cs->irq_flags |= SA_SHIRQ; 240 cs->irq_flags |= IRQF_SHARED;
242 ICCVersion(cs, "NETspider-U:"); 241 ICCVersion(cs, "NETspider-U:");
243 return (1); 242 return (1);
244} 243}
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c
index 8c044a6a7fe..8d8e8a29989 100644
--- a/drivers/isdn/hisax/sedlbauer.c
+++ b/drivers/isdn/hisax/sedlbauer.c
@@ -39,7 +39,6 @@
39*/ 39*/
40 40
41#include <linux/init.h> 41#include <linux/init.h>
42#include <linux/config.h>
43#include "hisax.h" 42#include "hisax.h"
44#include "isac.h" 43#include "isac.h"
45#include "ipac.h" 44#include "ipac.h"
@@ -633,7 +632,7 @@ setup_sedlbauer(struct IsdnCard *card)
633 printk(KERN_WARNING "Sedlbauer: No PCI card found\n"); 632 printk(KERN_WARNING "Sedlbauer: No PCI card found\n");
634 return(0); 633 return(0);
635 } 634 }
636 cs->irq_flags |= SA_SHIRQ; 635 cs->irq_flags |= IRQF_SHARED;
637 cs->hw.sedl.bus = SEDL_BUS_PCI; 636 cs->hw.sedl.bus = SEDL_BUS_PCI;
638 sub_vendor_id = dev_sedl->subsystem_vendor; 637 sub_vendor_id = dev_sedl->subsystem_vendor;
639 sub_id = dev_sedl->subsystem_device; 638 sub_id = dev_sedl->subsystem_device;
@@ -810,7 +809,7 @@ ready:
810 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_HSCX; 809 cs->hw.sedl.hscx = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_HSCX;
811 cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; 810 cs->hw.sedl.reset_on = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET;
812 cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET; 811 cs->hw.sedl.reset_off = cs->hw.sedl.cfg_reg + SEDL_HSCX_PCMCIA_RESET;
813 cs->irq_flags |= SA_SHIRQ; 812 cs->irq_flags |= IRQF_SHARED;
814 } else { 813 } else {
815 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ADR; 814 cs->hw.sedl.adr = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ADR;
816 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ISAC; 815 cs->hw.sedl.isac = cs->hw.sedl.cfg_reg + SEDL_HSCX_ISA_ISAC;
diff --git a/drivers/isdn/hisax/st5481.h b/drivers/isdn/hisax/st5481.h
index 9ffaae7c657..04416bad611 100644
--- a/drivers/isdn/hisax/st5481.h
+++ b/drivers/isdn/hisax/st5481.h
@@ -13,7 +13,6 @@
13#ifndef _ST5481_H_ 13#ifndef _ST5481_H_
14#define _ST5481_H_ 14#define _ST5481_H_
15 15
16#include <linux/config.h>
17 16
18// USB IDs, the Product Id is in the range 0x4810-0x481F 17// USB IDs, the Product Id is in the range 0x4810-0x481F
19 18
diff --git a/drivers/isdn/hisax/st5481_init.c b/drivers/isdn/hisax/st5481_init.c
index 99cb0f3d59a..2716aa5c60f 100644
--- a/drivers/isdn/hisax/st5481_init.c
+++ b/drivers/isdn/hisax/st5481_init.c
@@ -24,7 +24,6 @@
24 * clean up debug 24 * clean up debug
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/usb.h> 29#include <linux/usb.h>
diff --git a/drivers/isdn/hisax/teles3.c b/drivers/isdn/hisax/teles3.c
index 090abd16b4b..5cb712437da 100644
--- a/drivers/isdn/hisax/teles3.c
+++ b/drivers/isdn/hisax/teles3.c
@@ -369,7 +369,7 @@ setup_teles3(struct IsdnCard *card)
369 cs->hw.teles3.hscx[1] + 96); 369 cs->hw.teles3.hscx[1] + 96);
370 return (0); 370 return (0);
371 } 371 }
372 cs->irq_flags |= SA_SHIRQ; /* cardbus can share */ 372 cs->irq_flags |= IRQF_SHARED; /* cardbus can share */
373 } else { 373 } else {
374 if (cs->hw.teles3.cfg_reg) { 374 if (cs->hw.teles3.cfg_reg) {
375 if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) { 375 if (cs->typ == ISDN_CTYPE_COMPAQ_ISA) {
diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c
index e82ab2251b8..9382cdf04d8 100644
--- a/drivers/isdn/hisax/telespci.c
+++ b/drivers/isdn/hisax/telespci.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/config.h>
17#include "hisax.h" 16#include "hisax.h"
18#include "isac.h" 17#include "isac.h"
19#include "hscx.h" 18#include "hscx.h"
@@ -348,7 +347,7 @@ setup_telespci(struct IsdnCard *card)
348 cs->BC_Send_Data = &hscx_fill_fifo; 347 cs->BC_Send_Data = &hscx_fill_fifo;
349 cs->cardmsg = &TelesPCI_card_msg; 348 cs->cardmsg = &TelesPCI_card_msg;
350 cs->irq_func = &telespci_interrupt; 349 cs->irq_func = &telespci_interrupt;
351 cs->irq_flags |= SA_SHIRQ; 350 cs->irq_flags |= IRQF_SHARED;
352 ISACVersion(cs, "TelesPCI:"); 351 ISACVersion(cs, "TelesPCI:");
353 if (HscxVersion(cs, "TelesPCI:")) { 352 if (HscxVersion(cs, "TelesPCI:")) {
354 printk(KERN_WARNING 353 printk(KERN_WARNING
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
index 0352ee5f706..6c68419c05f 100644
--- a/drivers/isdn/hisax/w6692.c
+++ b/drivers/isdn/hisax/w6692.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include "hisax.h" 14#include "hisax.h"
16#include "w6692.h" 15#include "w6692.h"
@@ -1081,7 +1080,7 @@ setup_w6692(struct IsdnCard *card)
1081 cs->BC_Send_Data = &W6692B_fill_fifo; 1080 cs->BC_Send_Data = &W6692B_fill_fifo;
1082 cs->cardmsg = &w6692_card_msg; 1081 cs->cardmsg = &w6692_card_msg;
1083 cs->irq_func = &W6692_interrupt; 1082 cs->irq_func = &W6692_interrupt;
1084 cs->irq_flags |= SA_SHIRQ; 1083 cs->irq_flags |= IRQF_SHARED;
1085 W6692Version(cs, "W6692:"); 1084 W6692Version(cs, "W6692:");
1086 printk(KERN_INFO "W6692 ISTA=0x%X\n", ReadW6692(cs, W_ISTA)); 1085 printk(KERN_INFO "W6692 ISTA=0x%X\n", ReadW6692(cs, W_ISTA));
1087 printk(KERN_INFO "W6692 IMASK=0x%X\n", ReadW6692(cs, W_IMASK)); 1086 printk(KERN_INFO "W6692 IMASK=0x%X\n", ReadW6692(cs, W_IMASK));
diff --git a/drivers/isdn/hysdn/boardergo.c b/drivers/isdn/hysdn/boardergo.c
index 48d134be990..73afebdf80b 100644
--- a/drivers/isdn/hysdn/boardergo.c
+++ b/drivers/isdn/hysdn/boardergo.c
@@ -14,7 +14,6 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/signal.h> 18#include <linux/signal.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
@@ -436,7 +435,7 @@ ergo_inithardware(hysdn_card * card)
436 } 435 }
437 436
438 ergo_stopcard(card); /* disable interrupts */ 437 ergo_stopcard(card); /* disable interrupts */
439 if (request_irq(card->irq, ergo_interrupt, SA_SHIRQ, "HYSDN", card)) { 438 if (request_irq(card->irq, ergo_interrupt, IRQF_SHARED, "HYSDN", card)) {
440 ergo_releasehardware(card); /* return the acquired hardware */ 439 ergo_releasehardware(card); /* return the acquired hardware */
441 return (-1); 440 return (-1);
442 } 441 }
diff --git a/drivers/isdn/hysdn/hysdn_defs.h b/drivers/isdn/hysdn/hysdn_defs.h
index 3a9b29b38bc..461e831592d 100644
--- a/drivers/isdn/hysdn/hysdn_defs.h
+++ b/drivers/isdn/hysdn/hysdn_defs.h
@@ -14,7 +14,6 @@
14#ifndef HYSDN_DEFS_H 14#ifndef HYSDN_DEFS_H
15#define HYSDN_DEFS_H 15#define HYSDN_DEFS_H
16 16
17#include <linux/config.h>
18#include <linux/hysdn_if.h> 17#include <linux/hysdn_if.h>
19#include <linux/interrupt.h> 18#include <linux/interrupt.h>
20#include <linux/workqueue.h> 19#include <linux/workqueue.h>
diff --git a/drivers/isdn/hysdn/hysdn_init.c b/drivers/isdn/hysdn/hysdn_init.c
index b75ac5af236..b702ed27252 100644
--- a/drivers/isdn/hysdn/hysdn_init.c
+++ b/drivers/isdn/hysdn/hysdn_init.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/poll.h> 15#include <linux/poll.h>
diff --git a/drivers/isdn/hysdn/hysdn_sched.c b/drivers/isdn/hysdn/hysdn_sched.c
index 133032920ff..1c0d54ac12a 100644
--- a/drivers/isdn/hysdn/hysdn_sched.c
+++ b/drivers/isdn/hysdn/hysdn_sched.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/sched.h> 14#include <linux/sched.h>
16#include <linux/signal.h> 15#include <linux/signal.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c
index eb21063e6f6..9f6c6375ff7 100644
--- a/drivers/isdn/i4l/isdn_common.c
+++ b/drivers/isdn/i4l/isdn_common.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/poll.h> 16#include <linux/poll.h>
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c
index 96c115e1338..43da8ae1b2a 100644
--- a/drivers/isdn/i4l/isdn_net.c
+++ b/drivers/isdn/i4l/isdn_net.c
@@ -22,7 +22,6 @@
22 * http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt 22 * http://i4l.zabbadoz.net/i4l/cisco-hdlc.txt
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/isdn.h> 25#include <linux/isdn.h>
27#include <net/arp.h> 26#include <net/arp.h>
28#include <net/dst.h> 27#include <net/dst.h>
diff --git a/drivers/isdn/i4l/isdn_ppp.c b/drivers/isdn/i4l/isdn_ppp.c
index 918742271c7..29e7667ec96 100644
--- a/drivers/isdn/i4l/isdn_ppp.c
+++ b/drivers/isdn/i4l/isdn_ppp.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/isdn.h> 12#include <linux/isdn.h>
14#include <linux/poll.h> 13#include <linux/poll.h>
15#include <linux/ppp-comp.h> 14#include <linux/ppp-comp.h>
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 0a53a990c10..9ab66e8960d 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -11,7 +11,6 @@
11 */ 11 */
12#undef ISDN_TTY_STAT_DEBUG 12#undef ISDN_TTY_STAT_DEBUG
13 13
14#include <linux/config.h>
15#include <linux/isdn.h> 14#include <linux/isdn.h>
16#include <linux/delay.h> 15#include <linux/delay.h>
17#include "isdn_common.h" 16#include "isdn_common.h"
diff --git a/drivers/isdn/i4l/isdn_tty.h b/drivers/isdn/i4l/isdn_tty.h
index 9f0fa9501f4..692c74d6b74 100644
--- a/drivers/isdn/i4l/isdn_tty.h
+++ b/drivers/isdn/i4l/isdn_tty.h
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14 13
15#define DLE 0x10 14#define DLE 0x10
16#define ETX 0x03 15#define ETX 0x03
diff --git a/drivers/isdn/isdnloop/isdnloop.c b/drivers/isdn/isdnloop/isdnloop.c
index a67d31af797..fabbd461603 100644
--- a/drivers/isdn/isdnloop/isdnloop.c
+++ b/drivers/isdn/isdnloop/isdnloop.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/interrupt.h> 13#include <linux/interrupt.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/drivers/isdn/sc/init.c b/drivers/isdn/sc/init.c
index 62b7acfad8a..a627e68023f 100644
--- a/drivers/isdn/sc/init.c
+++ b/drivers/isdn/sc/init.c
@@ -342,7 +342,7 @@ static int __init sc_init(void)
342 */ 342 */
343 sc_adapter[cinst]->interrupt = irq[b]; 343 sc_adapter[cinst]->interrupt = irq[b];
344 if (request_irq(sc_adapter[cinst]->interrupt, interrupt_handler, 344 if (request_irq(sc_adapter[cinst]->interrupt, interrupt_handler,
345 SA_INTERRUPT, interface->id, NULL)) 345 IRQF_DISABLED, interface->id, NULL))
346 { 346 {
347 kfree(sc_adapter[cinst]->channel); 347 kfree(sc_adapter[cinst]->channel);
348 indicate_status(cinst, ISDN_STAT_UNLOAD, 0, NULL); /* Fix me */ 348 indicate_status(cinst, ISDN_STAT_UNLOAD, 0, NULL); /* Fix me */
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index c75d0ef1609..d424b445202 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -9,7 +9,6 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/drivers/leds/led-triggers.c b/drivers/leds/led-triggers.c
index 1b1ce652396..47f0ff19632 100644
--- a/drivers/leds/led-triggers.c
+++ b/drivers/leds/led-triggers.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/drivers/leds/leds-corgi.c b/drivers/leds/leds-corgi.c
index bb7d84df012..cf1dcd719a2 100644
--- a/drivers/leds/leds-corgi.c
+++ b/drivers/leds/leds-corgi.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
diff --git a/drivers/leds/leds-ixp4xx-gpio.c b/drivers/leds/leds-ixp4xx-gpio.c
index 30ced150e4c..7dcf0b92c46 100644
--- a/drivers/leds/leds-ixp4xx-gpio.c
+++ b/drivers/leds/leds-ixp4xx-gpio.c
@@ -31,7 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/platform_device.h> 36#include <linux/platform_device.h>
diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c
index 8419e29b71f..3b87951aa55 100644
--- a/drivers/leds/leds-locomo.c
+++ b/drivers/leds/leds-locomo.c
@@ -8,7 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/device.h> 13#include <linux/device.h>
diff --git a/drivers/leds/leds-s3c24xx.c b/drivers/leds/leds-s3c24xx.c
index 650cf72dc67..fb1edc1c9ed 100644
--- a/drivers/leds/leds-s3c24xx.c
+++ b/drivers/leds/leds-s3c24xx.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12*/ 12*/
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
diff --git a/drivers/leds/leds-spitz.c b/drivers/leds/leds-spitz.c
index 65bbef4a5e0..126d09cc96e 100644
--- a/drivers/leds/leds-spitz.c
+++ b/drivers/leds/leds-spitz.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/platform_device.h> 16#include <linux/platform_device.h>
diff --git a/drivers/leds/leds-tosa.c b/drivers/leds/leds-tosa.c
index c9e8cc1ec48..fb2416a3830 100644
--- a/drivers/leds/leds-tosa.c
+++ b/drivers/leds/leds-tosa.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/platform_device.h> 17#include <linux/platform_device.h>
diff --git a/drivers/leds/ledtrig-timer.c b/drivers/leds/ledtrig-timer.c
index fbf141ef46e..179c2876b54 100644
--- a/drivers/leds/ledtrig-timer.c
+++ b/drivers/leds/ledtrig-timer.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 9f1a049dc22..360f93f6fcd 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -16,7 +16,6 @@
16 * - move bus probe to a kernel thread 16 * - move bus probe to a kernel thread
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/types.h> 19#include <linux/types.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c
index cbfbbe2b150..545be1ed692 100644
--- a/drivers/macintosh/adbhid.c
+++ b/drivers/macintosh/adbhid.c
@@ -34,7 +34,6 @@
34 * Move to syfs 34 * Move to syfs
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/slab.h> 38#include <linux/slab.h>
40#include <linux/init.h> 39#include <linux/init.h>
diff --git a/drivers/macintosh/apm_emu.c b/drivers/macintosh/apm_emu.c
index e5a2bbf9939..1293876a2eb 100644
--- a/drivers/macintosh/apm_emu.c
+++ b/drivers/macintosh/apm_emu.c
@@ -18,7 +18,6 @@
18 * 18 *
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23 22
24#include <linux/poll.h> 23#include <linux/poll.h>
diff --git a/drivers/macintosh/mac_hid.c b/drivers/macintosh/mac_hid.c
index a66636116f0..6b129eef798 100644
--- a/drivers/macintosh/mac_hid.c
+++ b/drivers/macintosh/mac_hid.c
@@ -8,7 +8,6 @@
8 * This file will soon be removed in favor of an uinput userspace tool. 8 * This file will soon be removed in favor of an uinput userspace tool.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/proc_fs.h> 12#include <linux/proc_fs.h>
14#include <linux/sysctl.h> 13#include <linux/sysctl.h>
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index c687ac70394..40ae7b6a939 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -17,7 +17,6 @@
17 * sub-devices. 17 * sub-devices.
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/pci.h> 22#include <linux/pci.h>
@@ -428,10 +427,10 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
428 427
429 /* MacIO itself has a different reg, we use it's PCI base */ 428 /* MacIO itself has a different reg, we use it's PCI base */
430 if (np == chip->of_node) { 429 if (np == chip->of_node) {
431 sprintf(dev->ofdev.dev.bus_id, "%1d.%016llx:%.*s", 430 sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s",
432 chip->lbus.index, 431 chip->lbus.index,
433#ifdef CONFIG_PCI 432#ifdef CONFIG_PCI
434 (unsigned long long)pci_resource_start(chip->lbus.pdev, 0), 433 (unsigned int)pci_resource_start(chip->lbus.pdev, 0),
435#else 434#else
436 0, /* NuBus may want to do something better here */ 435 0, /* NuBus may want to do something better here */
437#endif 436#endif
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index 7f7d4eaca87..cae24a13526 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/stat.h> 2#include <linux/stat.h>
4#include <asm/macio.h> 3#include <asm/macio.h>
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c
index 53c1c790941..0acf2f7fd9d 100644
--- a/drivers/macintosh/mediabay.c
+++ b/drivers/macintosh/mediabay.c
@@ -10,7 +10,6 @@
10 * as published by the Free Software Foundation; either version 10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index f4516ca7aa3..ff6d9bfdc3d 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -19,7 +19,6 @@
19 * the userland interface 19 * the userland interface
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/device.h> 24#include <linux/device.h>
@@ -556,7 +555,7 @@ static int smu_late_init(void)
556 555
557 if (smu->db_irq != NO_IRQ) { 556 if (smu->db_irq != NO_IRQ) {
558 if (request_irq(smu->db_irq, smu_db_intr, 557 if (request_irq(smu->db_irq, smu_db_intr,
559 SA_SHIRQ, "SMU doorbell", smu) < 0) { 558 IRQF_SHARED, "SMU doorbell", smu) < 0) {
560 printk(KERN_WARNING "SMU: can't " 559 printk(KERN_WARNING "SMU: can't "
561 "request interrupt %d\n", 560 "request interrupt %d\n",
562 smu->db_irq); 561 smu->db_irq);
@@ -566,7 +565,7 @@ static int smu_late_init(void)
566 565
567 if (smu->msg_irq != NO_IRQ) { 566 if (smu->msg_irq != NO_IRQ) {
568 if (request_irq(smu->msg_irq, smu_msg_intr, 567 if (request_irq(smu->msg_irq, smu_msg_intr,
569 SA_SHIRQ, "SMU message", smu) < 0) { 568 IRQF_SHARED, "SMU message", smu) < 0) {
570 printk(KERN_WARNING "SMU: can't " 569 printk(KERN_WARNING "SMU: can't "
571 "request interrupt %d\n", 570 "request interrupt %d\n",
572 smu->msg_irq); 571 smu->msg_irq);
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index 5282fec1707..7f86478bdd3 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 231146f439d..c1fe0b368f7 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -97,7 +97,6 @@
97 * 97 *
98 */ 98 */
99 99
100#include <linux/config.h>
101#include <linux/types.h> 100#include <linux/types.h>
102#include <linux/module.h> 101#include <linux/module.h>
103#include <linux/errno.h> 102#include <linux/errno.h>
diff --git a/drivers/macintosh/therm_pm72.h b/drivers/macintosh/therm_pm72.h
index c17e61f9c41..fc7e9b7ecaf 100644
--- a/drivers/macintosh/therm_pm72.h
+++ b/drivers/macintosh/therm_pm72.h
@@ -93,7 +93,7 @@ static char * critical_overtemp_path = "/sbin/critical_overtemp";
93 * 0. This appear to be safe enough for this first version 93 * 0. This appear to be safe enough for this first version
94 * of the driver, though I would accept any clean patch 94 * of the driver, though I would accept any clean patch
95 * doing a better use of the device-tree without turning the 95 * doing a better use of the device-tree without turning the
96 * while i2c registration mecanism into a racy mess 96 * while i2c registration mechanism into a racy mess
97 * 97 *
98 * Note: Xserve changed this. We have some bits on the K2 bus, 98 * Note: Xserve changed this. We have some bits on the K2 bus,
99 * which I arbitrarily set to 0x200. Ultimately, we really want 99 * which I arbitrarily set to 0x200. Ultimately, we really want
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index 3d9dd2e166a..c7d1c290cb0 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/errno.h> 32#include <linux/errno.h>
diff --git a/drivers/macintosh/via-cuda.c b/drivers/macintosh/via-cuda.c
index 2d9d7915040..6501db50fb8 100644
--- a/drivers/macintosh/via-cuda.c
+++ b/drivers/macintosh/via-cuda.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 1996 Paul Mackerras. 9 * Copyright (C) 1996 Paul Mackerras.
10 */ 10 */
11#include <stdarg.h> 11#include <stdarg.h>
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 1ab4f16c08b..c1193d34ec9 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23#include <stdarg.h> 23#include <stdarg.h>
24#include <linux/config.h>
25#include <linux/types.h> 24#include <linux/types.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh/windfarm_cpufreq_clamp.c
index 81337cd16e8..900aade0619 100644
--- a/drivers/macintosh/windfarm_cpufreq_clamp.c
+++ b/drivers/macintosh/windfarm_cpufreq_clamp.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/types.h> 1#include <linux/types.h>
3#include <linux/errno.h> 2#include <linux/errno.h>
4#include <linux/kernel.h> 3#include <linux/kernel.h>
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index ebbd2d85625..ecc56765d94 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -20,7 +20,6 @@
20#include <linux/errno.h> 20#include <linux/errno.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22#include <linux/init.h> 22#include <linux/init.h>
23#include <linux/config.h>
24#include <linux/timer.h> 23#include <linux/timer.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/list.h> 25#include <linux/list.h>
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c
index 8eea0ddbf5e..1d0fafda0f7 100644
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -7,7 +7,6 @@
7 */ 7 */
8 8
9#include <linux/blkdev.h> 9#include <linux/blkdev.h>
10#include <linux/config.h>
11#include <linux/ctype.h> 10#include <linux/ctype.h>
12#include <linux/device-mapper.h> 11#include <linux/device-mapper.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
diff --git a/drivers/md/kcopyd.c b/drivers/md/kcopyd.c
index 73ab875fb15..f1db6eff485 100644
--- a/drivers/md/kcopyd.c
+++ b/drivers/md/kcopyd.c
@@ -12,7 +12,6 @@
12#include <asm/atomic.h> 12#include <asm/atomic.h>
13 13
14#include <linux/blkdev.h> 14#include <linux/blkdev.h>
15#include <linux/config.h>
16#include <linux/fs.h> 15#include <linux/fs.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/list.h> 17#include <linux/list.h>
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 2ec1b3520a0..2fe32c26192 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -33,7 +33,6 @@
33*/ 33*/
34 34
35#include <linux/module.h> 35#include <linux/module.h>
36#include <linux/config.h>
37#include <linux/kthread.h> 36#include <linux/kthread.h>
38#include <linux/linkage.h> 37#include <linux/linkage.h>
39#include <linux/raid/md.h> 38#include <linux/raid/md.h>
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 837ec4eb3d6..7433871f4b3 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21 21
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/slab.h> 23#include <linux/slab.h>
25#include <linux/highmem.h> 24#include <linux/highmem.h>
diff --git a/drivers/media/common/saa7146_core.c b/drivers/media/common/saa7146_core.c
index 8cdd4d265ff..b88451e33c0 100644
--- a/drivers/media/common/saa7146_core.c
+++ b/drivers/media/common/saa7146_core.c
@@ -363,7 +363,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
363 saa7146_write(dev, MC2, 0xf8000000); 363 saa7146_write(dev, MC2, 0xf8000000);
364 364
365 /* request an interrupt for the saa7146 */ 365 /* request an interrupt for the saa7146 */
366 err = request_irq(pci->irq, interrupt_hw, SA_SHIRQ | SA_INTERRUPT, 366 err = request_irq(pci->irq, interrupt_hw, IRQF_SHARED | IRQF_DISABLED,
367 dev->name, dev); 367 dev->name, dev);
368 if (err < 0) { 368 if (err < 0) {
369 ERR(("request_irq() failed.\n")); 369 ERR(("request_irq() failed.\n"));
diff --git a/drivers/media/common/saa7146_hlp.c b/drivers/media/common/saa7146_hlp.c
index 2092e6c33dd..d2905720eb7 100644
--- a/drivers/media/common/saa7146_hlp.c
+++ b/drivers/media/common/saa7146_hlp.c
@@ -158,7 +158,7 @@ static int calculate_h_scale_registers(struct saa7146_dev *dev,
158 } 158 }
159 159
160 /* the horizontal scaling increment controls the UV filter 160 /* the horizontal scaling increment controls the UV filter
161 to reduce the bandwith to improve the display quality, 161 to reduce the bandwidth to improve the display quality,
162 so set it ... */ 162 so set it ... */
163 if ( xsci == 0x400) 163 if ( xsci == 0x400)
164 pfuv = 0x00; 164 pfuv = 0x00;
diff --git a/drivers/media/dvb/b2c2/flexcop-common.h b/drivers/media/dvb/b2c2/flexcop-common.h
index b3dd0603cd9..5a6c4fe249e 100644
--- a/drivers/media/dvb/b2c2/flexcop-common.h
+++ b/drivers/media/dvb/b2c2/flexcop-common.h
@@ -8,7 +8,6 @@
8#ifndef __FLEXCOP_COMMON_H__ 8#ifndef __FLEXCOP_COMMON_H__
9#define __FLEXCOP_COMMON_H__ 9#define __FLEXCOP_COMMON_H__
10 10
11#include <linux/config.h>
12#include <linux/pci.h> 11#include <linux/pci.h>
13#include <linux/mutex.h> 12#include <linux/mutex.h>
14 13
diff --git a/drivers/media/dvb/b2c2/flexcop-pci.c b/drivers/media/dvb/b2c2/flexcop-pci.c
index f0404170219..eb2e6432c8c 100644
--- a/drivers/media/dvb/b2c2/flexcop-pci.c
+++ b/drivers/media/dvb/b2c2/flexcop-pci.c
@@ -294,7 +294,7 @@ static int flexcop_pci_init(struct flexcop_pci *fc_pci)
294 pci_set_drvdata(fc_pci->pdev, fc_pci); 294 pci_set_drvdata(fc_pci->pdev, fc_pci);
295 295
296 if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr, 296 if ((ret = request_irq(fc_pci->pdev->irq, flexcop_pci_isr,
297 SA_SHIRQ, DRIVER_NAME, fc_pci)) != 0) 297 IRQF_SHARED, DRIVER_NAME, fc_pci)) != 0)
298 goto err_pci_iounmap; 298 goto err_pci_iounmap;
299 299
300 spin_lock_init(&fc_pci->irq_lock); 300 spin_lock_init(&fc_pci->irq_lock);
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c
index 761fa6e7d76..755822ee6e9 100644
--- a/drivers/media/dvb/bt8xx/bt878.c
+++ b/drivers/media/dvb/bt8xx/bt878.c
@@ -488,7 +488,7 @@ static int __devinit bt878_probe(struct pci_dev *dev,
488 btwrite(0, BT848_INT_MASK); 488 btwrite(0, BT848_INT_MASK);
489 489
490 result = request_irq(bt->irq, bt878_irq, 490 result = request_irq(bt->irq, bt878_irq,
491 SA_SHIRQ | SA_INTERRUPT, "bt878", 491 IRQF_SHARED | IRQF_DISABLED, "bt878",
492 (void *) bt); 492 (void *) bt);
493 if (result == -EINVAL) { 493 if (result == -EINVAL) {
494 printk(KERN_ERR "bt878(%d): Bad irq number or handler\n", 494 printk(KERN_ERR "bt878(%d): Bad irq number or handler\n",
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c
index 1b895360042..001c71b6be6 100644
--- a/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/init.h> 25#include <linux/init.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/slab.h> 27#include <linux/slab.h>
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index 5e8bb41a088..59ac35ddd51 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -570,7 +570,8 @@ static int dvb_frontend_thread(void *data)
570 dvb_frontend_add_event(fe, s); 570 dvb_frontend_add_event(fe, s);
571 fepriv->status = s; 571 fepriv->status = s;
572 } 572 }
573 } 573 } else
574 dvb_frontend_swzigzag(fe);
574 } else 575 } else
575 dvb_frontend_swzigzag(fe); 576 dvb_frontend_swzigzag(fe);
576 } 577 }
@@ -975,6 +976,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
975 976
976 case FE_SET_FRONTEND_TUNE_MODE: 977 case FE_SET_FRONTEND_TUNE_MODE:
977 fepriv->tune_mode_flags = (unsigned long) parg; 978 fepriv->tune_mode_flags = (unsigned long) parg;
979 err = 0;
978 break; 980 break;
979 }; 981 };
980 982
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb.h b/drivers/media/dvb/dvb-usb/dvb-usb.h
index 4cf9f89c51b..97f8ea96243 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -8,7 +8,6 @@
8#ifndef __DVB_USB_H__ 8#ifndef __DVB_USB_H__
9#define __DVB_USB_H__ 9#define __DVB_USB_H__
10 10
11#include <linux/config.h>
12#include <linux/input.h> 11#include <linux/input.h>
13#include <linux/usb.h> 12#include <linux/usb.h>
14#include <linux/firmware.h> 13#include <linux/firmware.h>
diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c
index 3c7c09a362b..13ad1bfae66 100644
--- a/drivers/media/dvb/frontends/cx22700.c
+++ b/drivers/media/dvb/frontends/cx22700.c
@@ -134,6 +134,7 @@ static int cx22700_set_tps (struct cx22700_state *state, struct dvb_ofdm_paramet
134 return -EINVAL; 134 return -EINVAL;
135 135
136 if (p->code_rate_LP < FEC_1_2 || p->code_rate_LP > FEC_7_8) 136 if (p->code_rate_LP < FEC_1_2 || p->code_rate_LP > FEC_7_8)
137 return -EINVAL;
137 138
138 if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5) 139 if (p->code_rate_HP == FEC_4_5 || p->code_rate_LP == FEC_4_5)
139 return -EINVAL; 140 return -EINVAL;
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c
index f2f795cba56..274a87b7a5d 100644
--- a/drivers/media/dvb/frontends/cx24123.c
+++ b/drivers/media/dvb/frontends/cx24123.c
@@ -670,10 +670,10 @@ static int cx24123_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t voltage
670 switch (voltage) { 670 switch (voltage) {
671 case SEC_VOLTAGE_13: 671 case SEC_VOLTAGE_13:
672 dprintk("%s: setting voltage 13V\n", __FUNCTION__); 672 dprintk("%s: setting voltage 13V\n", __FUNCTION__);
673 return cx24123_writereg(state, 0x29, val | 0x80); 673 return cx24123_writereg(state, 0x29, val & 0x7f);
674 case SEC_VOLTAGE_18: 674 case SEC_VOLTAGE_18:
675 dprintk("%s: setting voltage 18V\n", __FUNCTION__); 675 dprintk("%s: setting voltage 18V\n", __FUNCTION__);
676 return cx24123_writereg(state, 0x29, val & 0x7f); 676 return cx24123_writereg(state, 0x29, val | 0x80);
677 default: 677 default:
678 return -EINVAL; 678 return -EINVAL;
679 }; 679 };
diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c
index 7c6dc7e3090..5302e11883a 100644
--- a/drivers/media/dvb/frontends/dib3000mb.c
+++ b/drivers/media/dvb/frontends/dib3000mb.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index 6c3be252998..98673474a14 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -20,7 +20,6 @@
20 * see Documentation/dvb/README.dibusb for more information 20 * see Documentation/dvb/README.dibusb for more information
21 * 21 *
22 */ 22 */
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c
index 6e8ad176e1a..9a354708bd2 100644
--- a/drivers/media/dvb/frontends/lgdt330x.c
+++ b/drivers/media/dvb/frontends/lgdt330x.c
@@ -216,7 +216,7 @@ static int lgdt330x_init(struct dvb_frontend* fe)
216 AGC_DELAY0, 0x07, 216 AGC_DELAY0, 0x07,
217 AGC_DELAY2, 0xfe, 217 AGC_DELAY2, 0xfe,
218 /* Change the value of IAGCBW[15:8] 218 /* Change the value of IAGCBW[15:8]
219 of inner AGC loop filter bandwith */ 219 of inner AGC loop filter bandwidth */
220 AGC_LOOP_BANDWIDTH0, 0x08, 220 AGC_LOOP_BANDWIDTH0, 0x08,
221 AGC_LOOP_BANDWIDTH1, 0x9a 221 AGC_LOOP_BANDWIDTH1, 0x9a
222 }; 222 };
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c
index e83ff2104c9..9cbd164aa28 100644
--- a/drivers/media/dvb/frontends/tda10021.c
+++ b/drivers/media/dvb/frontends/tda10021.c
@@ -21,7 +21,6 @@
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22*/ 22*/
23 23
24#include <linux/config.h>
25#include <linux/delay.h> 24#include <linux/delay.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/init.h> 26#include <linux/init.h>
diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c
index 6bffe85c161..9b57576bfeb 100644
--- a/drivers/media/dvb/frontends/ves1820.c
+++ b/drivers/media/dvb/frontends/ves1820.c
@@ -18,7 +18,6 @@
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/ 19*/
20 20
21#include <linux/config.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
24#include <linux/init.h> 23#include <linux/init.h>
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c
index acabea0793b..2310b2bfed4 100644
--- a/drivers/media/dvb/pluto2/pluto2.c
+++ b/drivers/media/dvb/pluto2/pluto2.c
@@ -616,7 +616,7 @@ static int __devinit pluto2_probe(struct pci_dev *pdev,
616 616
617 pci_set_drvdata(pdev, pluto); 617 pci_set_drvdata(pdev, pluto);
618 618
619 ret = request_irq(pdev->irq, pluto_irq, SA_SHIRQ, DRIVER_NAME, pluto); 619 ret = request_irq(pdev->irq, pluto_irq, IRQF_SHARED, DRIVER_NAME, pluto);
620 if (ret < 0) 620 if (ret < 0)
621 goto err_pci_iounmap; 621 goto err_pci_iounmap;
622 622
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index 7a5c99c200e..500f15c10aa 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -30,7 +30,6 @@
30 */ 30 */
31 31
32 32
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/kmod.h> 34#include <linux/kmod.h>
36#include <linux/delay.h> 35#include <linux/delay.h>
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 6163cb03b8f..5f111d40773 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -1141,6 +1141,15 @@ static void frontend_init(struct budget_av *budget_av)
1141 break; 1141 break;
1142 1142
1143 case SUBID_DVBC_KNC1: 1143 case SUBID_DVBC_KNC1:
1144 budget_av->reinitialise_demod = 1;
1145 fe = tda10021_attach(&philips_cu1216_config,
1146 &budget_av->budget.i2c_adap,
1147 read_pwm(budget_av));
1148 if (fe) {
1149 fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params;
1150 }
1151 break;
1152
1144 case SUBID_DVBC_KNC1_PLUS: 1153 case SUBID_DVBC_KNC1_PLUS:
1145 case SUBID_DVBC_CINERGY1200: 1154 case SUBID_DVBC_CINERGY1200:
1146 budget_av->reinitialise_demod = 1; 1155 budget_av->reinitialise_demod = 1;
@@ -1293,11 +1302,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
1293 1302
1294 budget_av->budget.dvb_adapter.priv = budget_av; 1303 budget_av->budget.dvb_adapter.priv = budget_av;
1295 frontend_init(budget_av); 1304 frontend_init(budget_av);
1296 1305 ciintf_init(budget_av);
1297 if (!budget_av->has_saa7113) {
1298 ciintf_init(budget_av);
1299 }
1300
1301 return 0; 1306 return 0;
1302} 1307}
1303 1308
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 336b2fe1a5f..04cef302345 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -43,7 +43,7 @@
43 is a bit braindead (no matching channel masks or no matching filter mask), 43 is a bit braindead (no matching channel masks or no matching filter mask),
44 we won't support this - yet. it doesn't event support negative filters, 44 we won't support this - yet. it doesn't event support negative filters,
45 so the best way is maybe to keep TTUSB_HWSECTIONS undef'd and just 45 so the best way is maybe to keep TTUSB_HWSECTIONS undef'd and just
46 parse TS data. USB bandwith will be a problem when having large 46 parse TS data. USB bandwidth will be a problem when having large
47 datastreams, especially for dvb-net, but hey, that's not my problem. 47 datastreams, especially for dvb-net, but hey, that's not my problem.
48 48
49 TTUSB_DISEQC, TTUSB_TONE: 49 TTUSB_DISEQC, TTUSB_TONE:
diff --git a/drivers/media/radio/radio-gemtek-pci.c b/drivers/media/radio/radio-gemtek-pci.c
index 9f249e7e60c..4c82956390c 100644
--- a/drivers/media/radio/radio-gemtek-pci.c
+++ b/drivers/media/radio/radio-gemtek-pci.c
@@ -37,7 +37,6 @@
37 *************************************************************************** 37 ***************************************************************************
38 */ 38 */
39 39
40#include <linux/config.h>
41#include <linux/types.h> 40#include <linux/types.h>
42#include <linux/list.h> 41#include <linux/list.h>
43#include <linux/module.h> 42#include <linux/module.h>
diff --git a/drivers/media/video/arv.c b/drivers/media/video/arv.c
index ae14f5f3203..5c5e682a300 100644
--- a/drivers/media/video/arv.c
+++ b/drivers/media/video/arv.c
@@ -18,7 +18,6 @@
18 * 2003-09-01: Support w3cam by Takeo Takahashi 18 * 2003-09-01: Support w3cam by Takeo Takahashi
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/delay.h> 23#include <linux/delay.h>
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index e68a6d2fff2..de14818d5cc 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -25,7 +25,6 @@
25 25
26*/ 26*/
27 27
28#include <linux/config.h>
29#include <linux/delay.h> 28#include <linux/delay.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/moduleparam.h> 30#include <linux/moduleparam.h>
@@ -3548,11 +3547,6 @@ void __devinit bttv_init_card2(struct bttv *btv)
3548 /* Hybrid DVB card, DOES have a tda9887 */ 3547 /* Hybrid DVB card, DOES have a tda9887 */
3549 if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE) 3548 if (btv->c.type == BTTV_BOARD_DVICO_FUSIONHDTV_5_LITE)
3550 tda9887 = 1; 3549 tda9887 = 1;
3551 if((btv->tuner_type == TUNER_PHILIPS_FM1216ME_MK3) ||
3552 (btv->tuner_type == TUNER_PHILIPS_FM1236_MK3) ||
3553 (btv->tuner_type == TUNER_PHILIPS_FM1256_IH3) ||
3554 tda9887)
3555 request_module("tda9887");
3556 if (btv->tuner_type != UNSET) 3550 if (btv->tuner_type != UNSET)
3557 request_module("tuner"); 3551 request_module("tuner");
3558} 3552}
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c
index aa3203ae670..5764a89d356 100644
--- a/drivers/media/video/bt8xx/bttv-driver.c
+++ b/drivers/media/video/bt8xx/bttv-driver.c
@@ -4050,7 +4050,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
4050 /* disable irqs, register irq handler */ 4050 /* disable irqs, register irq handler */
4051 btwrite(0, BT848_INT_MASK); 4051 btwrite(0, BT848_INT_MASK);
4052 result = request_irq(btv->c.pci->irq, bttv_irq, 4052 result = request_irq(btv->c.pci->irq, bttv_irq,
4053 SA_SHIRQ | SA_INTERRUPT,btv->c.name,(void *)btv); 4053 IRQF_SHARED | IRQF_DISABLED,btv->c.name,(void *)btv);
4054 if (result < 0) { 4054 if (result < 0) {
4055 printk(KERN_ERR "bttv%d: can't get IRQ %d\n", 4055 printk(KERN_ERR "bttv%d: can't get IRQ %d\n",
4056 bttv_num,btv->c.pci->irq); 4056 bttv_num,btv->c.pci->irq);
diff --git a/drivers/media/video/bt8xx/bttvp.h b/drivers/media/video/bt8xx/bttvp.h
index d2956010f76..311c4c541e0 100644
--- a/drivers/media/video/bt8xx/bttvp.h
+++ b/drivers/media/video/bt8xx/bttvp.h
@@ -360,7 +360,7 @@ struct bttv {
360 int mbox_csel; 360 int mbox_csel;
361 361
362 /* risc memory management data 362 /* risc memory management data
363 - must aquire s_lock before changing these 363 - must acquire s_lock before changing these
364 - only the irq handler is supported to touch top + bottom + vcurr */ 364 - only the irq handler is supported to touch top + bottom + vcurr */
365 struct btcx_riscmem main; 365 struct btcx_riscmem main;
366 struct bttv_buffer *screen; /* overlay */ 366 struct bttv_buffer *screen; /* overlay */
diff --git a/drivers/media/video/compat_ioctl32.c b/drivers/media/video/compat_ioctl32.c
index 840fe017712..353d02b67c3 100644
--- a/drivers/media/video/compat_ioctl32.c
+++ b/drivers/media/video/compat_ioctl32.c
@@ -12,7 +12,6 @@
12 * ioctls. 12 * ioctls.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/compat.h> 15#include <linux/compat.h>
17#include <linux/videodev.h> 16#include <linux/videodev.h>
18#include <linux/videodev2.h> 17#include <linux/videodev2.h>
diff --git a/drivers/media/video/cpia.c b/drivers/media/video/cpia.c
index 95c5aceecc5..3b31a0dd2f0 100644
--- a/drivers/media/video/cpia.c
+++ b/drivers/media/video/cpia.c
@@ -26,7 +26,6 @@
26/* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */ 26/* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */
27/* #define _CPIA_DEBUG_ 1 */ 27/* #define _CPIA_DEBUG_ 1 */
28 28
29#include <linux/config.h>
30 29
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/moduleparam.h> 31#include <linux/moduleparam.h>
diff --git a/drivers/media/video/cpia2/cpia2_v4l.c b/drivers/media/video/cpia2/cpia2_v4l.c
index d129db57fcd..d09f49950f2 100644
--- a/drivers/media/video/cpia2/cpia2_v4l.c
+++ b/drivers/media/video/cpia2/cpia2_v4l.c
@@ -31,7 +31,6 @@
31 31
32#include <linux/version.h> 32#include <linux/version.h>
33 33
34#include <linux/config.h>
35 34
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/time.h> 36#include <linux/time.h>
diff --git a/drivers/media/video/cpia_pp.c b/drivers/media/video/cpia_pp.c
index 4c89bd395d3..41f4b8d1755 100644
--- a/drivers/media/video/cpia_pp.c
+++ b/drivers/media/video/cpia_pp.c
@@ -25,7 +25,6 @@
25/* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */ 25/* define _CPIA_DEBUG_ for verbose debug output (see cpia.h) */
26/* #define _CPIA_DEBUG_ 1 */ 26/* #define _CPIA_DEBUG_ 1 */
27 27
28#include <linux/config.h>
29 28
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/init.h> 30#include <linux/init.h>
diff --git a/drivers/media/video/cx88/cx88-alsa.c b/drivers/media/video/cx88/cx88-alsa.c
index 292a5e81eb7..f0340662e07 100644
--- a/drivers/media/video/cx88/cx88-alsa.c
+++ b/drivers/media/video/cx88/cx88-alsa.c
@@ -700,7 +700,7 @@ static int __devinit snd_cx88_create(struct snd_card *card,
700 700
701 /* get irq */ 701 /* get irq */
702 err = request_irq(chip->pci->irq, cx8801_irq, 702 err = request_irq(chip->pci->irq, cx8801_irq,
703 SA_SHIRQ | SA_INTERRUPT, chip->core->name, chip); 703 IRQF_SHARED | IRQF_DISABLED, chip->core->name, chip);
704 if (err < 0) { 704 if (err < 0) {
705 dprintk(0, "%s: can't get IRQ %d\n", 705 dprintk(0, "%s: can't get IRQ %d\n",
706 chip->core->name, chip->pci->irq); 706 chip->core->name, chip->pci->irq);
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c
index 4ff81582ec5..349632b48e9 100644
--- a/drivers/media/video/cx88/cx88-blackbird.c
+++ b/drivers/media/video/cx88/cx88-blackbird.c
@@ -686,6 +686,39 @@ static struct videobuf_queue_ops blackbird_qops = {
686 686
687/* ------------------------------------------------------------------ */ 687/* ------------------------------------------------------------------ */
688 688
689static const u32 *ctrl_classes[] = {
690 cx88_user_ctrls,
691 cx2341x_mpeg_ctrls,
692 NULL
693};
694
695static int blackbird_queryctrl(struct cx8802_dev *dev, struct v4l2_queryctrl *qctrl)
696{
697 qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id);
698 if (qctrl->id == 0)
699 return -EINVAL;
700
701 /* Standard V4L2 controls */
702 if (cx8800_ctrl_query(qctrl) == 0)
703 return 0;
704
705 /* MPEG V4L2 controls */
706 if (cx2341x_ctrl_query(&dev->params, qctrl))
707 qctrl->flags |= V4L2_CTRL_FLAG_DISABLED;
708 return 0;
709}
710
711static int blackbird_querymenu(struct cx8802_dev *dev, struct v4l2_querymenu *qmenu)
712{
713 struct v4l2_queryctrl qctrl;
714
715 qctrl.id = qmenu->id;
716 blackbird_queryctrl(dev, &qctrl);
717 return v4l2_ctrl_query_menu(qmenu, &qctrl, cx2341x_ctrl_get_menu(qmenu->id));
718}
719
720/* ------------------------------------------------------------------ */
721
689static int mpeg_do_ioctl(struct inode *inode, struct file *file, 722static int mpeg_do_ioctl(struct inode *inode, struct file *file,
690 unsigned int cmd, void *arg) 723 unsigned int cmd, void *arg)
691{ 724{
@@ -866,6 +899,16 @@ static int mpeg_do_ioctl(struct inode *inode, struct file *file,
866 core->name); 899 core->name);
867 return 0; 900 return 0;
868 } 901 }
902 case VIDIOC_QUERYMENU:
903 return blackbird_querymenu(dev, arg);
904 case VIDIOC_QUERYCTRL:
905 {
906 struct v4l2_queryctrl *c = arg;
907
908 if (blackbird_queryctrl(dev, c) == 0)
909 return 0;
910 return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl);
911 }
869 912
870 default: 913 default:
871 return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl); 914 return cx88_do_ioctl(inode, file, 0, dev->core, cmd, arg, mpeg_do_ioctl);
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index f9d68f20dc8..14bd4863d15 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1194,6 +1194,21 @@ struct cx88_board cx88_boards[] = {
1194 }}, 1194 }},
1195 .dvb = 1, 1195 .dvb = 1,
1196 }, 1196 },
1197 [CX88_BOARD_GENIATECH_DVBS] = {
1198 .name = "Geniatech DVB-S",
1199 .tuner_type = TUNER_ABSENT,
1200 .radio_type = UNSET,
1201 .tuner_addr = ADDR_UNSET,
1202 .radio_addr = ADDR_UNSET,
1203 .input = {{
1204 .type = CX88_VMUX_DVB,
1205 .vmux = 0,
1206 },{
1207 .type = CX88_VMUX_COMPOSITE1,
1208 .vmux = 1,
1209 }},
1210 .dvb = 1,
1211 },
1197}; 1212};
1198const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards); 1213const unsigned int cx88_bcount = ARRAY_SIZE(cx88_boards);
1199 1214
@@ -1439,6 +1454,10 @@ struct cx88_subid cx88_subids[] = {
1439 .subvendor = 0x18ac, 1454 .subvendor = 0x18ac,
1440 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */ 1455 .subdevice = 0xd800, /* FusionHDTV 3 Gold (original revision) */
1441 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q, 1456 .card = CX88_BOARD_DVICO_FUSIONHDTV_3_GOLD_Q,
1457 },{
1458 .subvendor = 0x14f1,
1459 .subdevice = 0x0084,
1460 .card = CX88_BOARD_GENIATECH_DVBS,
1442 }, 1461 },
1443}; 1462};
1444const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids); 1463const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index dce1feddd55..afde3789d70 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -496,6 +496,26 @@ static int kworld_dvbs_100_set_voltage(struct dvb_frontend* fe, fe_sec_voltage_t
496 return 0; 496 return 0;
497} 497}
498 498
499static int geniatech_dvbs_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
500{
501 struct cx8802_dev *dev= fe->dvb->priv;
502 struct cx88_core *core = dev->core;
503
504 if (voltage == SEC_VOLTAGE_OFF) {
505 dprintk(1,"LNB Voltage OFF\n");
506 cx_write(MO_GP0_IO, 0x0000efff);
507 }
508
509 if (core->prev_set_voltage)
510 return core->prev_set_voltage(fe, voltage);
511 return 0;
512}
513
514static struct cx24123_config geniatech_dvbs_config = {
515 .demod_address = 0x55,
516 .set_ts_params = cx24123_set_ts_param,
517};
518
499static struct cx24123_config hauppauge_novas_config = { 519static struct cx24123_config hauppauge_novas_config = {
500 .demod_address = 0x55, 520 .demod_address = 0x55,
501 .set_ts_params = cx24123_set_ts_param, 521 .set_ts_params = cx24123_set_ts_param,
@@ -760,6 +780,14 @@ static int dvb_register(struct cx8802_dev *dev)
760 dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage; 780 dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage;
761 } 781 }
762 break; 782 break;
783 case CX88_BOARD_GENIATECH_DVBS:
784 dev->dvb.frontend = cx24123_attach(&geniatech_dvbs_config,
785 &dev->core->i2c_adap);
786 if (dev->dvb.frontend) {
787 dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage;
788 dev->dvb.frontend->ops.set_voltage = geniatech_dvbs_set_voltage;
789 }
790 break;
763#endif 791#endif
764 default: 792 default:
765 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n", 793 printk("%s: The frontend of your DVB/ATSC card isn't supported yet\n",
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index 2c12aca1b6a..138a4f69250 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -438,7 +438,7 @@ int cx8802_init_common(struct cx8802_dev *dev)
438 438
439 /* get irq */ 439 /* get irq */
440 err = request_irq(dev->pci->irq, cx8802_irq, 440 err = request_irq(dev->pci->irq, cx8802_irq,
441 SA_SHIRQ | SA_INTERRUPT, dev->core->name, dev); 441 IRQF_SHARED | IRQF_DISABLED, dev->core->name, dev);
442 if (err < 0) { 442 if (err < 0) {
443 printk(KERN_ERR "%s: can't get IRQ %d\n", 443 printk(KERN_ERR "%s: can't get IRQ %d\n",
444 dev->core->name, dev->pci->irq); 444 dev->core->name, dev->pci->irq);
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 8d5cf474b68..2225d4b9414 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -327,6 +327,51 @@ static struct cx88_ctrl cx8800_ctls[] = {
327}; 327};
328static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls); 328static const int CX8800_CTLS = ARRAY_SIZE(cx8800_ctls);
329 329
330const u32 cx88_user_ctrls[] = {
331 V4L2_CID_USER_CLASS,
332 V4L2_CID_BRIGHTNESS,
333 V4L2_CID_CONTRAST,
334 V4L2_CID_SATURATION,
335 V4L2_CID_HUE,
336 V4L2_CID_AUDIO_VOLUME,
337 V4L2_CID_AUDIO_BALANCE,
338 V4L2_CID_AUDIO_MUTE,
339 0
340};
341EXPORT_SYMBOL(cx88_user_ctrls);
342
343static const u32 *ctrl_classes[] = {
344 cx88_user_ctrls,
345 NULL
346};
347
348int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl)
349{
350 int i;
351
352 if (qctrl->id < V4L2_CID_BASE ||
353 qctrl->id >= V4L2_CID_LASTP1)
354 return -EINVAL;
355 for (i = 0; i < CX8800_CTLS; i++)
356 if (cx8800_ctls[i].v.id == qctrl->id)
357 break;
358 if (i == CX8800_CTLS) {
359 *qctrl = no_ctl;
360 return 0;
361 }
362 *qctrl = cx8800_ctls[i].v;
363 return 0;
364}
365EXPORT_SYMBOL(cx8800_ctrl_query);
366
367static int cx88_queryctrl(struct v4l2_queryctrl *qctrl)
368{
369 qctrl->id = v4l2_ctrl_next(ctrl_classes, qctrl->id);
370 if (qctrl->id == 0)
371 return -EINVAL;
372 return cx8800_ctrl_query(qctrl);
373}
374
330/* ------------------------------------------------------------------- */ 375/* ------------------------------------------------------------------- */
331/* resource management */ 376/* resource management */
332 377
@@ -1362,20 +1407,8 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
1362 case VIDIOC_QUERYCTRL: 1407 case VIDIOC_QUERYCTRL:
1363 { 1408 {
1364 struct v4l2_queryctrl *c = arg; 1409 struct v4l2_queryctrl *c = arg;
1365 int i;
1366 1410
1367 if (c->id < V4L2_CID_BASE || 1411 return cx88_queryctrl(c);
1368 c->id >= V4L2_CID_LASTP1)
1369 return -EINVAL;
1370 for (i = 0; i < CX8800_CTLS; i++)
1371 if (cx8800_ctls[i].v.id == c->id)
1372 break;
1373 if (i == CX8800_CTLS) {
1374 *c = no_ctl;
1375 return 0;
1376 }
1377 *c = cx8800_ctls[i].v;
1378 return 0;
1379 } 1412 }
1380 case VIDIOC_G_CTRL: 1413 case VIDIOC_G_CTRL:
1381 return get_control(core,arg); 1414 return get_control(core,arg);
@@ -1882,7 +1915,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1882 1915
1883 /* get irq */ 1916 /* get irq */
1884 err = request_irq(pci_dev->irq, cx8800_irq, 1917 err = request_irq(pci_dev->irq, cx8800_irq,
1885 SA_SHIRQ | SA_INTERRUPT, core->name, dev); 1918 IRQF_SHARED | IRQF_DISABLED, core->name, dev);
1886 if (err < 0) { 1919 if (err < 0) {
1887 printk(KERN_ERR "%s: can't get IRQ %d\n", 1920 printk(KERN_ERR "%s: can't get IRQ %d\n",
1888 core->name,pci_dev->irq); 1921 core->name,pci_dev->irq);
@@ -1893,8 +1926,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
1893 /* load and configure helper modules */ 1926 /* load and configure helper modules */
1894 if (TUNER_ABSENT != core->tuner_type) 1927 if (TUNER_ABSENT != core->tuner_type)
1895 request_module("tuner"); 1928 request_module("tuner");
1896 if (core->tda9887_conf)
1897 request_module("tda9887");
1898 1929
1899 /* register v4l devices */ 1930 /* register v4l devices */
1900 dev->video_dev = cx88_vdev_init(core,dev->pci, 1931 dev->video_dev = cx88_vdev_init(core,dev->pci,
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h
index 9a9a0fc7a41..e7810955dd4 100644
--- a/drivers/media/video/cx88/cx88.h
+++ b/drivers/media/video/cx88/cx88.h
@@ -196,6 +196,7 @@ extern struct sram_channel cx88_sram_channels[];
196#define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49 196#define CX88_BOARD_PIXELVIEW_PLAYTV_P7000 49
197#define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50 197#define CX88_BOARD_NPGTECH_REALTV_TOP10FM 50
198#define CX88_BOARD_WINFAST_DTV2000H 51 198#define CX88_BOARD_WINFAST_DTV2000H 51
199#define CX88_BOARD_GENIATECH_DVBS 52
199 200
200enum cx88_itype { 201enum cx88_itype {
201 CX88_VMUX_COMPOSITE1 = 1, 202 CX88_VMUX_COMPOSITE1 = 1,
@@ -590,6 +591,8 @@ int cx8802_resume_common(struct pci_dev *pci_dev);
590extern int cx88_do_ioctl(struct inode *inode, struct file *file, int radio, 591extern int cx88_do_ioctl(struct inode *inode, struct file *file, int radio,
591 struct cx88_core *core, unsigned int cmd, 592 struct cx88_core *core, unsigned int cmd,
592 void *arg, v4l2_kioctl driver_ioctl); 593 void *arg, v4l2_kioctl driver_ioctl);
594extern const u32 cx88_user_ctrls[];
595extern int cx8800_ctrl_query(struct v4l2_queryctrl *qctrl);
593 596
594/* 597/*
595 * Local variables: 598 * Local variables:
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index 9286090817c..2a461dde480 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1574,8 +1574,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev,
1574 request_module("tvp5150"); 1574 request_module("tvp5150");
1575 if (dev->has_tuner) 1575 if (dev->has_tuner)
1576 request_module("tuner"); 1576 request_module("tuner");
1577 if (dev->tda9887_conf)
1578 request_module("tda9887");
1579#endif 1577#endif
1580 errCode = em28xx_config(dev); 1578 errCode = em28xx_config(dev);
1581 if (errCode) { 1579 if (errCode) {
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c
index f68ca7d9f53..e278753f8f2 100644
--- a/drivers/media/video/meye.c
+++ b/drivers/media/video/meye.c
@@ -26,7 +26,6 @@
26 * along with this program; if not, write to the Free Software 26 * along with this program; if not, write to the Free Software
27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 */ 28 */
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/pci.h> 30#include <linux/pci.h>
32#include <linux/sched.h> 31#include <linux/sched.h>
@@ -1882,7 +1881,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev,
1882 1881
1883 meye.mchip_irq = pcidev->irq; 1882 meye.mchip_irq = pcidev->irq;
1884 if (request_irq(meye.mchip_irq, meye_irq, 1883 if (request_irq(meye.mchip_irq, meye_irq,
1885 SA_INTERRUPT | SA_SHIRQ, "meye", meye_irq)) { 1884 IRQF_DISABLED | IRQF_SHARED, "meye", meye_irq)) {
1886 printk(KERN_ERR "meye: request_irq failed\n"); 1885 printk(KERN_ERR "meye: request_irq failed\n");
1887 goto outreqirq; 1886 goto outreqirq;
1888 } 1887 }
diff --git a/drivers/media/video/meye.h b/drivers/media/video/meye.h
index 0d09a0e3803..ea107cb5c84 100644
--- a/drivers/media/video/meye.h
+++ b/drivers/media/video/meye.h
@@ -36,7 +36,6 @@
36#define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \ 36#define MEYE_DRIVER_VERSION __stringify(MEYE_DRIVER_MAJORVERSION) "." \
37 __stringify(MEYE_DRIVER_MINORVERSION) 37 __stringify(MEYE_DRIVER_MINORVERSION)
38 38
39#include <linux/config.h>
40#include <linux/types.h> 39#include <linux/types.h>
41#include <linux/pci.h> 40#include <linux/pci.h>
42#include <linux/kfifo.h> 41#include <linux/kfifo.h>
diff --git a/drivers/media/video/msp3400-driver.h b/drivers/media/video/msp3400-driver.h
index 4e451049013..545e4ac094f 100644
--- a/drivers/media/video/msp3400-driver.h
+++ b/drivers/media/video/msp3400-driver.h
@@ -90,8 +90,8 @@ struct msp_state {
90 /* thread */ 90 /* thread */
91 struct task_struct *kthread; 91 struct task_struct *kthread;
92 wait_queue_head_t wq; 92 wait_queue_head_t wq;
93 int restart:1; 93 unsigned int restart:1;
94 int watch_stereo:1; 94 unsigned int watch_stereo:1;
95}; 95};
96 96
97/* msp3400-driver.c */ 97/* msp3400-driver.c */
diff --git a/drivers/media/video/ov511.c b/drivers/media/video/ov511.c
index a988df226aa..1b07a61c2eb 100644
--- a/drivers/media/video/ov511.c
+++ b/drivers/media/video/ov511.c
@@ -35,7 +35,6 @@
35 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 35 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/init.h> 39#include <linux/init.h>
41#include <linux/vmalloc.h> 40#include <linux/vmalloc.h>
diff --git a/drivers/media/video/pvrusb2/Makefile b/drivers/media/video/pvrusb2/Makefile
index fed603ad0a6..02e414210da 100644
--- a/drivers/media/video/pvrusb2/Makefile
+++ b/drivers/media/video/pvrusb2/Makefile
@@ -8,7 +8,7 @@ obj-pvrusb2-24xxx-$(CONFIG_VIDEO_PVRUSB2_24XXX) := \
8pvrusb2-objs := pvrusb2-i2c-core.o pvrusb2-i2c-cmd-v4l2.o \ 8pvrusb2-objs := pvrusb2-i2c-core.o pvrusb2-i2c-cmd-v4l2.o \
9 pvrusb2-audio.o pvrusb2-i2c-chips-v4l2.o \ 9 pvrusb2-audio.o pvrusb2-i2c-chips-v4l2.o \
10 pvrusb2-encoder.o pvrusb2-video-v4l.o \ 10 pvrusb2-encoder.o pvrusb2-video-v4l.o \
11 pvrusb2-eeprom.o pvrusb2-tuner.o pvrusb2-demod.o \ 11 pvrusb2-eeprom.o pvrusb2-tuner.o \
12 pvrusb2-main.o pvrusb2-hdw.o pvrusb2-v4l2.o \ 12 pvrusb2-main.o pvrusb2-hdw.o pvrusb2-v4l2.o \
13 pvrusb2-ctrl.o pvrusb2-std.o \ 13 pvrusb2-ctrl.o pvrusb2-std.o \
14 pvrusb2-context.o pvrusb2-io.o pvrusb2-ioread.o \ 14 pvrusb2-context.o pvrusb2-io.o pvrusb2-ioread.o \
diff --git a/drivers/media/video/pvrusb2/pvrusb2-audio.c b/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 313d2dcf9e4..9846c464ec8 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -145,8 +145,8 @@ static int get_audio_status(struct pvr2_msp3400_handler *ctxt)
145 145
146static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt) 146static void pvr2_msp3400_detach(struct pvr2_msp3400_handler *ctxt)
147{ 147{
148 ctxt->client->handler = 0; 148 ctxt->client->handler = NULL;
149 ctxt->hdw->audio_stat = 0; 149 ctxt->hdw->audio_stat = NULL;
150 kfree(ctxt); 150 kfree(ctxt);
151} 151}
152 152
diff --git a/drivers/media/video/pvrusb2/pvrusb2-context.c b/drivers/media/video/pvrusb2/pvrusb2-context.c
index 40dc59871a4..f129f316d20 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -77,7 +77,7 @@ struct pvr2_context *pvr2_context_create(
77 const struct usb_device_id *devid, 77 const struct usb_device_id *devid,
78 void (*setup_func)(struct pvr2_context *)) 78 void (*setup_func)(struct pvr2_context *))
79{ 79{
80 struct pvr2_context *mp = 0; 80 struct pvr2_context *mp = NULL;
81 mp = kmalloc(sizeof(*mp),GFP_KERNEL); 81 mp = kmalloc(sizeof(*mp),GFP_KERNEL);
82 if (!mp) goto done; 82 if (!mp) goto done;
83 memset(mp,0,sizeof(*mp)); 83 memset(mp,0,sizeof(*mp));
@@ -87,7 +87,7 @@ struct pvr2_context *pvr2_context_create(
87 mp->hdw = pvr2_hdw_create(intf,devid); 87 mp->hdw = pvr2_hdw_create(intf,devid);
88 if (!mp->hdw) { 88 if (!mp->hdw) {
89 pvr2_context_destroy(mp); 89 pvr2_context_destroy(mp);
90 mp = 0; 90 mp = NULL;
91 goto done; 91 goto done;
92 } 92 }
93 93
@@ -145,7 +145,7 @@ void pvr2_channel_init(struct pvr2_channel *cp,struct pvr2_context *mp)
145{ 145{
146 cp->hdw = mp->hdw; 146 cp->hdw = mp->hdw;
147 cp->mc_head = mp; 147 cp->mc_head = mp;
148 cp->mc_next = 0; 148 cp->mc_next = NULL;
149 cp->mc_prev = mp->mc_last; 149 cp->mc_prev = mp->mc_last;
150 if (mp->mc_last) { 150 if (mp->mc_last) {
151 mp->mc_last->mc_next = cp; 151 mp->mc_last->mc_next = cp;
@@ -160,8 +160,8 @@ static void pvr2_channel_disclaim_stream(struct pvr2_channel *cp)
160{ 160{
161 if (!cp->stream) return; 161 if (!cp->stream) return;
162 pvr2_stream_kill(cp->stream->stream); 162 pvr2_stream_kill(cp->stream->stream);
163 cp->stream->user = 0; 163 cp->stream->user = NULL;
164 cp->stream = 0; 164 cp->stream = NULL;
165} 165}
166 166
167 167
@@ -179,7 +179,7 @@ void pvr2_channel_done(struct pvr2_channel *cp)
179 } else { 179 } else {
180 mp->mc_first = cp->mc_next; 180 mp->mc_first = cp->mc_next;
181 } 181 }
182 cp->hdw = 0; 182 cp->hdw = NULL;
183} 183}
184 184
185 185
@@ -212,7 +212,7 @@ struct pvr2_ioread *pvr2_channel_create_mpeg_stream(
212{ 212{
213 struct pvr2_ioread *cp; 213 struct pvr2_ioread *cp;
214 cp = pvr2_ioread_create(); 214 cp = pvr2_ioread_create();
215 if (!cp) return 0; 215 if (!cp) return NULL;
216 pvr2_ioread_setup(cp,sp->stream); 216 pvr2_ioread_setup(cp,sp->stream);
217 pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key)); 217 pvr2_ioread_set_sync_key(cp,stream_sync_key,sizeof(stream_sync_key));
218 return cp; 218 return cp;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
index d5df9fbeba2..fb6198f1df9 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
@@ -158,7 +158,7 @@ int pvr2_ctrl_get_mask(struct pvr2_ctrl *cptr)
158/* Retrieve the control's name */ 158/* Retrieve the control's name */
159const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr) 159const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr)
160{ 160{
161 if (!cptr) return 0; 161 if (!cptr) return NULL;
162 return cptr->info->name; 162 return cptr->info->name;
163} 163}
164 164
@@ -166,7 +166,7 @@ const char *pvr2_ctrl_get_name(struct pvr2_ctrl *cptr)
166/* Retrieve the control's desc */ 166/* Retrieve the control's desc */
167const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr) 167const char *pvr2_ctrl_get_desc(struct pvr2_ctrl *cptr)
168{ 168{
169 if (!cptr) return 0; 169 if (!cptr) return NULL;
170 return cptr->info->desc; 170 return cptr->info->desc;
171} 171}
172 172
@@ -488,7 +488,7 @@ int pvr2_ctrl_sym_to_value(struct pvr2_ctrl *cptr,
488 488
489 LOCK_TAKE(cptr->hdw->big_lock); do { 489 LOCK_TAKE(cptr->hdw->big_lock); do {
490 if (cptr->info->type == pvr2_ctl_int) { 490 if (cptr->info->type == pvr2_ctl_int) {
491 ret = parse_token(ptr,len,valptr,0,0); 491 ret = parse_token(ptr,len,valptr,NULL,0);
492 if ((ret >= 0) && 492 if ((ret >= 0) &&
493 ((*valptr < cptr->info->def.type_int.min_value) || 493 ((*valptr < cptr->info->def.type_int.min_value) ||
494 (*valptr > cptr->info->def.type_int.max_value))) { 494 (*valptr > cptr->info->def.type_int.max_value))) {
diff --git a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index 27eadaff75a..c80c26be6e4 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -139,8 +139,8 @@ static const struct pvr2_v4l_cx2584x_ops decoder_ops[] = {
139 139
140static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt) 140static void decoder_detach(struct pvr2_v4l_cx2584x *ctxt)
141{ 141{
142 ctxt->client->handler = 0; 142 ctxt->client->handler = NULL;
143 ctxt->hdw->decoder_ctrl = 0; 143 ctxt->hdw->decoder_ctrl = NULL;
144 kfree(ctxt); 144 kfree(ctxt);
145} 145}
146 146
@@ -221,7 +221,7 @@ static unsigned int decoder_describe(struct pvr2_v4l_cx2584x *ctxt,
221static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt) 221static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt)
222{ 222{
223 int ret; 223 int ret;
224 ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,0); 224 ret = pvr2_i2c_client_cmd(ctxt->client,VIDIOC_INT_RESET,NULL);
225 pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret); 225 pvr2_trace(PVR2_TRACE_CHIPS,"i2c cx25840 decoder_reset (ret=%d)",ret);
226} 226}
227 227
diff --git a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
index 586900e365f..f985f00d885 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-debugifc.c
@@ -82,7 +82,7 @@ static unsigned int debugifc_isolate_word(const char *buf,unsigned int count,
82 unsigned int wlen; 82 unsigned int wlen;
83 unsigned int scnt; 83 unsigned int scnt;
84 84
85 wptr = 0; 85 wptr = NULL;
86 wlen = 0; 86 wlen = 0;
87 scnt = debugifc_count_whitespace(buf,count); 87 scnt = debugifc_count_whitespace(buf,count);
88 consume_cnt += scnt; count -= scnt; buf += scnt; 88 consume_cnt += scnt; count -= scnt; buf += scnt;
@@ -337,8 +337,8 @@ int pvr2_debugifc_print_status(struct pvr2_hdw *hdw,
337} 337}
338 338
339 339
340int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf, 340static int pvr2_debugifc_do1cmd(struct pvr2_hdw *hdw,const char *buf,
341 unsigned int count) 341 unsigned int count)
342{ 342{
343 const char *wptr; 343 const char *wptr;
344 unsigned int wlen; 344 unsigned int wlen;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-demod.c b/drivers/media/video/pvrusb2/pvrusb2-demod.c
deleted file mode 100644
index 9686569a11f..00000000000
--- a/drivers/media/video/pvrusb2/pvrusb2-demod.c
+++ /dev/null
@@ -1,126 +0,0 @@
1/*
2 *
3 * $Id$
4 *
5 * Copyright (C) 2005 Mike Isely <isely@pobox.com>
6 * Copyright (C) 2004 Aurelien Alleaume <slts@free.fr>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 */
22
23#include "pvrusb2.h"
24#include "pvrusb2-util.h"
25#include "pvrusb2-demod.h"
26#include "pvrusb2-hdw-internal.h"
27#include "pvrusb2-debug.h"
28#include <linux/videodev2.h>
29#include <media/tuner.h>
30#include <media/v4l2-common.h>
31
32
33struct pvr2_demod_handler {
34 struct pvr2_hdw *hdw;
35 struct pvr2_i2c_client *client;
36 struct pvr2_i2c_handler i2c_handler;
37 int type_update_fl;
38};
39
40
41static void set_config(struct pvr2_demod_handler *ctxt)
42{
43 struct pvr2_hdw *hdw = ctxt->hdw;
44 int cfg = 0;
45
46 switch (hdw->tuner_type) {
47 case TUNER_PHILIPS_FM1216ME_MK3:
48 case TUNER_PHILIPS_FM1236_MK3:
49 cfg = TDA9887_PORT1_ACTIVE|TDA9887_PORT2_ACTIVE;
50 break;
51 default:
52 break;
53 }
54 pvr2_trace(PVR2_TRACE_CHIPS,"i2c demod set_config(0x%x)",cfg);
55 pvr2_i2c_client_cmd(ctxt->client,TDA9887_SET_CONFIG,&cfg);
56 ctxt->type_update_fl = 0;
57}
58
59
60static int demod_check(struct pvr2_demod_handler *ctxt)
61{
62 struct pvr2_hdw *hdw = ctxt->hdw;
63 if (hdw->tuner_updated) ctxt->type_update_fl = !0;
64 return ctxt->type_update_fl != 0;
65}
66
67
68static void demod_update(struct pvr2_demod_handler *ctxt)
69{
70 if (ctxt->type_update_fl) set_config(ctxt);
71}
72
73
74static void demod_detach(struct pvr2_demod_handler *ctxt)
75{
76 ctxt->client->handler = 0;
77 kfree(ctxt);
78}
79
80
81static unsigned int demod_describe(struct pvr2_demod_handler *ctxt,char *buf,unsigned int cnt)
82{
83 return scnprintf(buf,cnt,"handler: pvrusb2-demod");
84}
85
86
87const static struct pvr2_i2c_handler_functions tuner_funcs = {
88 .detach = (void (*)(void *))demod_detach,
89 .check = (int (*)(void *))demod_check,
90 .update = (void (*)(void *))demod_update,
91 .describe = (unsigned int (*)(void *,char *,unsigned int))demod_describe,
92};
93
94
95int pvr2_i2c_demod_setup(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
96{
97 struct pvr2_demod_handler *ctxt;
98 if (cp->handler) return 0;
99
100 ctxt = kmalloc(sizeof(*ctxt),GFP_KERNEL);
101 if (!ctxt) return 0;
102 memset(ctxt,0,sizeof(*ctxt));
103
104 ctxt->i2c_handler.func_data = ctxt;
105 ctxt->i2c_handler.func_table = &tuner_funcs;
106 ctxt->type_update_fl = !0;
107 ctxt->client = cp;
108 ctxt->hdw = hdw;
109 cp->handler = &ctxt->i2c_handler;
110 pvr2_trace(PVR2_TRACE_CHIPS,"i2c 0x%x tda9887 V4L2 handler set up",
111 cp->client->addr);
112 return !0;
113}
114
115
116
117
118/*
119 Stuff for Emacs to see, in order to encourage consistent editing style:
120 *** Local Variables: ***
121 *** mode: c ***
122 *** fill-column: 70 ***
123 *** tab-width: 8 ***
124 *** c-basic-offset: 8 ***
125 *** End: ***
126 */
diff --git a/drivers/media/video/pvrusb2/pvrusb2-demod.h b/drivers/media/video/pvrusb2/pvrusb2-demod.h
deleted file mode 100644
index 4c4e40ffbf0..00000000000
--- a/drivers/media/video/pvrusb2/pvrusb2-demod.h
+++ /dev/null
@@ -1,38 +0,0 @@
1/*
2 *
3 * $Id$
4 *
5 * Copyright (C) 2005 Mike Isely <isely@pobox.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 *
20 */
21#ifndef __PVRUSB2_DEMOD_H
22#define __PVRUSB2_DEMOD_H
23
24#include "pvrusb2-i2c-core.h"
25
26int pvr2_i2c_demod_setup(struct pvr2_hdw *,struct pvr2_i2c_client *);
27
28#endif /* __PVRUSB2_DEMOD_H */
29
30/*
31 Stuff for Emacs to see, in order to encourage consistent editing style:
32 *** Local Variables: ***
33 *** mode: c ***
34 *** fill-column: 70 ***
35 *** tab-width: 8 ***
36 *** c-basic-offset: 8 ***
37 *** End: ***
38 */
diff --git a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
index 94d383ff988..6cff8e75f42 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-eeprom.c
@@ -58,7 +58,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw)
58 pvr2_trace(PVR2_TRACE_ERROR_LEGS, 58 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
59 "Failed to allocate memory" 59 "Failed to allocate memory"
60 " required to read eeprom"); 60 " required to read eeprom");
61 return 0; 61 return NULL;
62 } 62 }
63 63
64 trace_eeprom("Value for eeprom addr from controller was 0x%x", 64 trace_eeprom("Value for eeprom addr from controller was 0x%x",
@@ -108,7 +108,7 @@ static u8 *pvr2_eeprom_fetch(struct pvr2_hdw *hdw)
108 pvr2_trace(PVR2_TRACE_ERROR_LEGS, 108 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
109 "eeprom fetch set offs err=%d",ret); 109 "eeprom fetch set offs err=%d",ret);
110 kfree(eeprom); 110 kfree(eeprom);
111 return 0; 111 return NULL;
112 } 112 }
113 } 113 }
114 return eeprom; 114 return eeprom;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index 2cc31695b43..18a7073501c 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -65,7 +65,7 @@ static int pvr2_encoder_write_words(struct pvr2_hdw *hdw,
65 } 65 }
66 ret = pvr2_send_request(hdw, 66 ret = pvr2_send_request(hdw,
67 hdw->cmd_buffer,1+(chunkCnt*7), 67 hdw->cmd_buffer,1+(chunkCnt*7),
68 0,0); 68 NULL,0);
69 if (ret) return ret; 69 if (ret) return ret;
70 data += chunkCnt; 70 data += chunkCnt;
71 dlen -= chunkCnt; 71 dlen -= chunkCnt;
@@ -322,7 +322,7 @@ int pvr2_encoder_configure(struct pvr2_hdw *hdw)
322 } 322 }
323 323
324 ret = cx2341x_update(hdw,pvr2_encoder_cmd, 324 ret = cx2341x_update(hdw,pvr2_encoder_cmd,
325 (hdw->enc_cur_valid ? &hdw->enc_cur_state : 0), 325 (hdw->enc_cur_valid ? &hdw->enc_cur_state : NULL),
326 &hdw->enc_ctl_state); 326 &hdw->enc_ctl_state);
327 if (ret) { 327 if (ret) {
328 pvr2_trace(PVR2_TRACE_ERROR_LEGS, 328 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index ba2afbfe32c..0d6dc33ca32 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -354,23 +354,6 @@ struct pvr2_hdw {
354 unsigned int control_cnt; 354 unsigned int control_cnt;
355}; 355};
356 356
357int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw);
358
359unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *);
360
361void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
362 unsigned long msk,unsigned long val);
363void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw,
364 unsigned long msk,
365 unsigned long val);
366
367void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw);
368void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw);
369
370int pvr2_i2c_basic_op(struct pvr2_hdw *,u8 i2c_addr,
371 u8 *wdata,u16 wlen,
372 u8 *rdata,u16 rlen);
373
374#endif /* __PVRUSB2_HDW_INTERNAL_H */ 357#endif /* __PVRUSB2_HDW_INTERNAL_H */
375 358
376/* 359/*
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 643c471375d..9b48abcf608 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -63,7 +63,6 @@ struct pvr2_string_table {
63static const char *pvr2_client_24xxx[] = { 63static const char *pvr2_client_24xxx[] = {
64 "cx25840", 64 "cx25840",
65 "tuner", 65 "tuner",
66 "tda9887",
67 "wm8775", 66 "wm8775",
68}; 67};
69#endif 68#endif
@@ -73,7 +72,6 @@ static const char *pvr2_client_29xxx[] = {
73 "msp3400", 72 "msp3400",
74 "saa7115", 73 "saa7115",
75 "tuner", 74 "tuner",
76 "tda9887",
77}; 75};
78 76
79static struct pvr2_string_table pvr2_client_lists[] = { 77static struct pvr2_string_table pvr2_client_lists[] = {
@@ -89,8 +87,8 @@ static struct pvr2_string_table pvr2_client_lists[] = {
89#endif 87#endif
90}; 88};
91 89
92static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = 0}; 90static struct pvr2_hdw *unit_pointers[PVR_NUM] = {[ 0 ... PVR_NUM-1 ] = NULL};
93DECLARE_MUTEX(pvr2_unit_sem); 91static DECLARE_MUTEX(pvr2_unit_sem);
94 92
95static int ctlchg = 0; 93static int ctlchg = 0;
96static int initusbreset = 1; 94static int initusbreset = 1;
@@ -263,6 +261,25 @@ static const char *control_values_subsystem[] = {
263 [PVR2_SUBSYS_B_ENC_RUN] = "enc_run", 261 [PVR2_SUBSYS_B_ENC_RUN] = "enc_run",
264}; 262};
265 263
264static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl);
265static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw);
266static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw);
267static unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw);
268static void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw);
269static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw);
270static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw);
271static void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
272 unsigned long msk,
273 unsigned long val);
274static void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw,
275 unsigned long msk,
276 unsigned long val);
277static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
278 unsigned int timeout,int probe_fl,
279 void *write_data,unsigned int write_len,
280 void *read_data,unsigned int read_len);
281static int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res);
282static int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res);
266 283
267static int ctrl_channelfreq_get(struct pvr2_ctrl *cptr,int *vp) 284static int ctrl_channelfreq_get(struct pvr2_ctrl *cptr,int *vp)
268{ 285{
@@ -405,7 +422,7 @@ static unsigned int ctrl_cx2341x_getv4lflags(struct pvr2_ctrl *cptr)
405 info = (struct pvr2_ctl_info *)(cptr->info); 422 info = (struct pvr2_ctl_info *)(cptr->info);
406 if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) { 423 if (qctrl.flags & V4L2_CTRL_FLAG_READ_ONLY) {
407 if (info->set_value) { 424 if (info->set_value) {
408 info->set_value = 0; 425 info->set_value = NULL;
409 } 426 }
410 } else { 427 } else {
411 if (!(info->set_value)) { 428 if (!(info->set_value)) {
@@ -836,14 +853,6 @@ unsigned long pvr2_hdw_get_sn(struct pvr2_hdw *hdw)
836} 853}
837 854
838 855
839struct pvr2_hdw *pvr2_hdw_find(int unit_number)
840{
841 if (unit_number < 0) return 0;
842 if (unit_number >= PVR_NUM) return 0;
843 return unit_pointers[unit_number];
844}
845
846
847int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw) 856int pvr2_hdw_get_unit_number(struct pvr2_hdw *hdw)
848{ 857{
849 return hdw->unit_number; 858 return hdw->unit_number;
@@ -917,9 +926,9 @@ static int pvr2_locate_firmware(struct pvr2_hdw *hdw,
917 * is not suitable for an usb transaction. 926 * is not suitable for an usb transaction.
918 * 927 *
919 */ 928 */
920int pvr2_upload_firmware1(struct pvr2_hdw *hdw) 929static int pvr2_upload_firmware1(struct pvr2_hdw *hdw)
921{ 930{
922 const struct firmware *fw_entry = 0; 931 const struct firmware *fw_entry = NULL;
923 void *fw_ptr; 932 void *fw_ptr;
924 unsigned int pipe; 933 unsigned int pipe;
925 int ret; 934 int ret;
@@ -1015,7 +1024,7 @@ int pvr2_upload_firmware1(struct pvr2_hdw *hdw)
1015 1024
1016int pvr2_upload_firmware2(struct pvr2_hdw *hdw) 1025int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
1017{ 1026{
1018 const struct firmware *fw_entry = 0; 1027 const struct firmware *fw_entry = NULL;
1019 void *fw_ptr; 1028 void *fw_ptr;
1020 unsigned int pipe, fw_len, fw_done; 1029 unsigned int pipe, fw_len, fw_done;
1021 int actual_length; 1030 int actual_length;
@@ -1166,8 +1175,9 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw)
1166 reconfigure and start over. 1175 reconfigure and start over.
1167 1176
1168*/ 1177*/
1169void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw, 1178static void pvr2_hdw_subsys_bit_chg_no_lock(struct pvr2_hdw *hdw,
1170 unsigned long msk,unsigned long val) 1179 unsigned long msk,
1180 unsigned long val)
1171{ 1181{
1172 unsigned long nmsk; 1182 unsigned long nmsk;
1173 unsigned long vmsk; 1183 unsigned long vmsk;
@@ -1318,18 +1328,6 @@ void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw,
1318} 1328}
1319 1329
1320 1330
1321void pvr2_hdw_subsys_bit_set(struct pvr2_hdw *hdw,unsigned long msk)
1322{
1323 pvr2_hdw_subsys_bit_chg(hdw,msk,msk);
1324}
1325
1326
1327void pvr2_hdw_subsys_bit_clr(struct pvr2_hdw *hdw,unsigned long msk)
1328{
1329 pvr2_hdw_subsys_bit_chg(hdw,msk,0);
1330}
1331
1332
1333unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *hdw) 1331unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *hdw)
1334{ 1332{
1335 return hdw->subsys_enabled_mask; 1333 return hdw->subsys_enabled_mask;
@@ -1342,9 +1340,9 @@ unsigned long pvr2_hdw_subsys_stream_get(struct pvr2_hdw *hdw)
1342} 1340}
1343 1341
1344 1342
1345void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw, 1343static void pvr2_hdw_subsys_stream_bit_chg_no_lock(struct pvr2_hdw *hdw,
1346 unsigned long msk, 1344 unsigned long msk,
1347 unsigned long val) 1345 unsigned long val)
1348{ 1346{
1349 unsigned long val2; 1347 unsigned long val2;
1350 msk &= PVR2_SUBSYS_ALL; 1348 msk &= PVR2_SUBSYS_ALL;
@@ -1366,7 +1364,7 @@ void pvr2_hdw_subsys_stream_bit_chg(struct pvr2_hdw *hdw,
1366} 1364}
1367 1365
1368 1366
1369int pvr2_hdw_set_streaming_no_lock(struct pvr2_hdw *hdw,int enableFl) 1367static int pvr2_hdw_set_streaming_no_lock(struct pvr2_hdw *hdw,int enableFl)
1370{ 1368{
1371 if ((!enableFl) == !(hdw->flag_streaming_enabled)) return 0; 1369 if ((!enableFl) == !(hdw->flag_streaming_enabled)) return 0;
1372 if (enableFl) { 1370 if (enableFl) {
@@ -1400,8 +1398,8 @@ int pvr2_hdw_set_streaming(struct pvr2_hdw *hdw,int enable_flag)
1400} 1398}
1401 1399
1402 1400
1403int pvr2_hdw_set_stream_type_no_lock(struct pvr2_hdw *hdw, 1401static int pvr2_hdw_set_stream_type_no_lock(struct pvr2_hdw *hdw,
1404 enum pvr2_config config) 1402 enum pvr2_config config)
1405{ 1403{
1406 unsigned long sm = hdw->subsys_enabled_mask; 1404 unsigned long sm = hdw->subsys_enabled_mask;
1407 if (!hdw->flag_ok) return -EIO; 1405 if (!hdw->flag_ok) return -EIO;
@@ -1741,7 +1739,7 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
1741 sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) { 1739 sizeof(pvr2_device_names)/sizeof(pvr2_device_names[0])) {
1742 pvr2_trace(PVR2_TRACE_ERROR_LEGS, 1740 pvr2_trace(PVR2_TRACE_ERROR_LEGS,
1743 "Bogus device type of %u reported",hdw_type); 1741 "Bogus device type of %u reported",hdw_type);
1744 return 0; 1742 return NULL;
1745 } 1743 }
1746 1744
1747 hdw = kmalloc(sizeof(*hdw),GFP_KERNEL); 1745 hdw = kmalloc(sizeof(*hdw),GFP_KERNEL);
@@ -1922,38 +1920,38 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
1922 if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info); 1920 if (hdw->mpeg_ctrl_info) kfree(hdw->mpeg_ctrl_info);
1923 kfree(hdw); 1921 kfree(hdw);
1924 } 1922 }
1925 return 0; 1923 return NULL;
1926} 1924}
1927 1925
1928 1926
1929/* Remove _all_ associations between this driver and the underlying USB 1927/* Remove _all_ associations between this driver and the underlying USB
1930 layer. */ 1928 layer. */
1931void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw) 1929static void pvr2_hdw_remove_usb_stuff(struct pvr2_hdw *hdw)
1932{ 1930{
1933 if (hdw->flag_disconnected) return; 1931 if (hdw->flag_disconnected) return;
1934 pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_remove_usb_stuff: hdw=%p",hdw); 1932 pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_remove_usb_stuff: hdw=%p",hdw);
1935 if (hdw->ctl_read_urb) { 1933 if (hdw->ctl_read_urb) {
1936 usb_kill_urb(hdw->ctl_read_urb); 1934 usb_kill_urb(hdw->ctl_read_urb);
1937 usb_free_urb(hdw->ctl_read_urb); 1935 usb_free_urb(hdw->ctl_read_urb);
1938 hdw->ctl_read_urb = 0; 1936 hdw->ctl_read_urb = NULL;
1939 } 1937 }
1940 if (hdw->ctl_write_urb) { 1938 if (hdw->ctl_write_urb) {
1941 usb_kill_urb(hdw->ctl_write_urb); 1939 usb_kill_urb(hdw->ctl_write_urb);
1942 usb_free_urb(hdw->ctl_write_urb); 1940 usb_free_urb(hdw->ctl_write_urb);
1943 hdw->ctl_write_urb = 0; 1941 hdw->ctl_write_urb = NULL;
1944 } 1942 }
1945 if (hdw->ctl_read_buffer) { 1943 if (hdw->ctl_read_buffer) {
1946 kfree(hdw->ctl_read_buffer); 1944 kfree(hdw->ctl_read_buffer);
1947 hdw->ctl_read_buffer = 0; 1945 hdw->ctl_read_buffer = NULL;
1948 } 1946 }
1949 if (hdw->ctl_write_buffer) { 1947 if (hdw->ctl_write_buffer) {
1950 kfree(hdw->ctl_write_buffer); 1948 kfree(hdw->ctl_write_buffer);
1951 hdw->ctl_write_buffer = 0; 1949 hdw->ctl_write_buffer = NULL;
1952 } 1950 }
1953 pvr2_hdw_render_useless_unlocked(hdw); 1951 pvr2_hdw_render_useless_unlocked(hdw);
1954 hdw->flag_disconnected = !0; 1952 hdw->flag_disconnected = !0;
1955 hdw->usb_dev = 0; 1953 hdw->usb_dev = NULL;
1956 hdw->usb_intf = 0; 1954 hdw->usb_intf = NULL;
1957} 1955}
1958 1956
1959 1957
@@ -1963,11 +1961,11 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw)
1963 pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw); 1961 pvr2_trace(PVR2_TRACE_INIT,"pvr2_hdw_destroy: hdw=%p",hdw);
1964 if (hdw->fw_buffer) { 1962 if (hdw->fw_buffer) {
1965 kfree(hdw->fw_buffer); 1963 kfree(hdw->fw_buffer);
1966 hdw->fw_buffer = 0; 1964 hdw->fw_buffer = NULL;
1967 } 1965 }
1968 if (hdw->vid_stream) { 1966 if (hdw->vid_stream) {
1969 pvr2_stream_destroy(hdw->vid_stream); 1967 pvr2_stream_destroy(hdw->vid_stream);
1970 hdw->vid_stream = 0; 1968 hdw->vid_stream = NULL;
1971 } 1969 }
1972 if (hdw->audio_stat) { 1970 if (hdw->audio_stat) {
1973 hdw->audio_stat->detach(hdw->audio_stat->ctxt); 1971 hdw->audio_stat->detach(hdw->audio_stat->ctxt);
@@ -1981,7 +1979,7 @@ void pvr2_hdw_destroy(struct pvr2_hdw *hdw)
1981 if ((hdw->unit_number >= 0) && 1979 if ((hdw->unit_number >= 0) &&
1982 (hdw->unit_number < PVR_NUM) && 1980 (hdw->unit_number < PVR_NUM) &&
1983 (unit_pointers[hdw->unit_number] == hdw)) { 1981 (unit_pointers[hdw->unit_number] == hdw)) {
1984 unit_pointers[hdw->unit_number] = 0; 1982 unit_pointers[hdw->unit_number] = NULL;
1985 } 1983 }
1986 } while (0); up(&pvr2_unit_sem); 1984 } while (0); up(&pvr2_unit_sem);
1987 if (hdw->controls) kfree(hdw->controls); 1985 if (hdw->controls) kfree(hdw->controls);
@@ -2018,7 +2016,7 @@ void pvr2_hdw_disconnect(struct pvr2_hdw *hdw)
2018 2016
2019// Attempt to autoselect an appropriate value for std_enum_cur given 2017// Attempt to autoselect an appropriate value for std_enum_cur given
2020// whatever is currently in std_mask_cur 2018// whatever is currently in std_mask_cur
2021void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw) 2019static void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw)
2022{ 2020{
2023 unsigned int idx; 2021 unsigned int idx;
2024 for (idx = 1; idx < hdw->std_enum_cnt; idx++) { 2022 for (idx = 1; idx < hdw->std_enum_cnt; idx++) {
@@ -2033,7 +2031,7 @@ void pvr2_hdw_internal_find_stdenum(struct pvr2_hdw *hdw)
2033 2031
2034// Calculate correct set of enumerated standards based on currently known 2032// Calculate correct set of enumerated standards based on currently known
2035// set of available standards bits. 2033// set of available standards bits.
2036void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw) 2034static void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw)
2037{ 2035{
2038 struct v4l2_standard *newstd; 2036 struct v4l2_standard *newstd;
2039 unsigned int std_cnt; 2037 unsigned int std_cnt;
@@ -2043,12 +2041,12 @@ void pvr2_hdw_internal_set_std_avail(struct pvr2_hdw *hdw)
2043 2041
2044 if (hdw->std_defs) { 2042 if (hdw->std_defs) {
2045 kfree(hdw->std_defs); 2043 kfree(hdw->std_defs);
2046 hdw->std_defs = 0; 2044 hdw->std_defs = NULL;
2047 } 2045 }
2048 hdw->std_enum_cnt = 0; 2046 hdw->std_enum_cnt = 0;
2049 if (hdw->std_enum_names) { 2047 if (hdw->std_enum_names) {
2050 kfree(hdw->std_enum_names); 2048 kfree(hdw->std_enum_names);
2051 hdw->std_enum_names = 0; 2049 hdw->std_enum_names = NULL;
2052 } 2050 }
2053 2051
2054 if (!std_cnt) { 2052 if (!std_cnt) {
@@ -2099,7 +2097,7 @@ unsigned int pvr2_hdw_get_ctrl_count(struct pvr2_hdw *hdw)
2099struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw, 2097struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_index(struct pvr2_hdw *hdw,
2100 unsigned int idx) 2098 unsigned int idx)
2101{ 2099{
2102 if (idx >= hdw->control_cnt) return 0; 2100 if (idx >= hdw->control_cnt) return NULL;
2103 return hdw->controls + idx; 2101 return hdw->controls + idx;
2104} 2102}
2105 2103
@@ -2118,7 +2116,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_by_id(struct pvr2_hdw *hdw,
2118 i = cptr->info->internal_id; 2116 i = cptr->info->internal_id;
2119 if (i && (i == ctl_id)) return cptr; 2117 if (i && (i == ctl_id)) return cptr;
2120 } 2118 }
2121 return 0; 2119 return NULL;
2122} 2120}
2123 2121
2124 2122
@@ -2135,7 +2133,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_v4l(struct pvr2_hdw *hdw,unsigned int ctl_id
2135 i = cptr->info->v4l_id; 2133 i = cptr->info->v4l_id;
2136 if (i && (i == ctl_id)) return cptr; 2134 if (i && (i == ctl_id)) return cptr;
2137 } 2135 }
2138 return 0; 2136 return NULL;
2139} 2137}
2140 2138
2141 2139
@@ -2149,7 +2147,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw,
2149 int i; 2147 int i;
2150 2148
2151 /* This could be made a lot more efficient, but for now... */ 2149 /* This could be made a lot more efficient, but for now... */
2152 cp2 = 0; 2150 cp2 = NULL;
2153 for (idx = 0; idx < hdw->control_cnt; idx++) { 2151 for (idx = 0; idx < hdw->control_cnt; idx++) {
2154 cptr = hdw->controls + idx; 2152 cptr = hdw->controls + idx;
2155 i = cptr->info->v4l_id; 2153 i = cptr->info->v4l_id;
@@ -2159,7 +2157,7 @@ struct pvr2_ctrl *pvr2_hdw_get_ctrl_nextv4l(struct pvr2_hdw *hdw,
2159 cp2 = cptr; 2157 cp2 = cptr;
2160 } 2158 }
2161 return cp2; 2159 return cp2;
2162 return 0; 2160 return NULL;
2163} 2161}
2164 2162
2165 2163
@@ -2182,7 +2180,7 @@ static const char *get_ctrl_typename(enum pvr2_ctl_type tp)
2182 state(s) back to their previous value before this function was called. 2180 state(s) back to their previous value before this function was called.
2183 Thus we can automatically reconfigure affected pieces of the driver as 2181 Thus we can automatically reconfigure affected pieces of the driver as
2184 controls are changed. */ 2182 controls are changed. */
2185int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw) 2183static int pvr2_hdw_commit_ctl_internal(struct pvr2_hdw *hdw)
2186{ 2184{
2187 unsigned long saved_subsys_mask = hdw->subsys_enabled_mask; 2185 unsigned long saved_subsys_mask = hdw->subsys_enabled_mask;
2188 unsigned long stale_subsys_mask = 0; 2186 unsigned long stale_subsys_mask = 0;
@@ -2321,14 +2319,6 @@ void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *hdw)
2321} 2319}
2322 2320
2323 2321
2324void pvr2_hdw_poll_trigger(struct pvr2_hdw *hdw)
2325{
2326 LOCK_TAKE(hdw->big_lock); do {
2327 pvr2_hdw_poll_trigger_unlocked(hdw);
2328 } while (0); LOCK_GIVE(hdw->big_lock);
2329}
2330
2331
2332/* Return name for this driver instance */ 2322/* Return name for this driver instance */
2333const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw) 2323const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw)
2334{ 2324{
@@ -2337,7 +2327,7 @@ const char *pvr2_hdw_get_driver_name(struct pvr2_hdw *hdw)
2337 2327
2338 2328
2339/* Return bit mask indicating signal status */ 2329/* Return bit mask indicating signal status */
2340unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw) 2330static unsigned int pvr2_hdw_get_signal_status_internal(struct pvr2_hdw *hdw)
2341{ 2331{
2342 unsigned int msk = 0; 2332 unsigned int msk = 0;
2343 switch (hdw->input_val) { 2333 switch (hdw->input_val) {
@@ -2424,7 +2414,7 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw, int enable_flag)
2424 pvr2_trace(PVR2_TRACE_FIRMWARE, 2414 pvr2_trace(PVR2_TRACE_FIRMWARE,
2425 "Cleaning up after CPU firmware fetch"); 2415 "Cleaning up after CPU firmware fetch");
2426 kfree(hdw->fw_buffer); 2416 kfree(hdw->fw_buffer);
2427 hdw->fw_buffer = 0; 2417 hdw->fw_buffer = NULL;
2428 hdw->fw_size = 0; 2418 hdw->fw_size = 0;
2429 /* Now release the CPU. It will disconnect and 2419 /* Now release the CPU. It will disconnect and
2430 reconnect later. */ 2420 reconnect later. */
@@ -2519,22 +2509,6 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *hdw,int v)
2519} 2509}
2520 2510
2521 2511
2522void pvr2_reset_ctl_endpoints(struct pvr2_hdw *hdw)
2523{
2524 if (!hdw->usb_dev) return;
2525 usb_settoggle(hdw->usb_dev, PVR2_CTL_WRITE_ENDPOINT & 0xf,
2526 !(PVR2_CTL_WRITE_ENDPOINT & USB_DIR_IN), 0);
2527 usb_settoggle(hdw->usb_dev, PVR2_CTL_READ_ENDPOINT & 0xf,
2528 !(PVR2_CTL_READ_ENDPOINT & USB_DIR_IN), 0);
2529 usb_clear_halt(hdw->usb_dev,
2530 usb_rcvbulkpipe(hdw->usb_dev,
2531 PVR2_CTL_READ_ENDPOINT & 0x7f));
2532 usb_clear_halt(hdw->usb_dev,
2533 usb_sndbulkpipe(hdw->usb_dev,
2534 PVR2_CTL_WRITE_ENDPOINT & 0x7f));
2535}
2536
2537
2538static void pvr2_ctl_write_complete(struct urb *urb, struct pt_regs *regs) 2512static void pvr2_ctl_write_complete(struct urb *urb, struct pt_regs *regs)
2539{ 2513{
2540 struct pvr2_hdw *hdw = urb->context; 2514 struct pvr2_hdw *hdw = urb->context;
@@ -2568,10 +2542,10 @@ static void pvr2_ctl_timeout(unsigned long data)
2568} 2542}
2569 2543
2570 2544
2571int pvr2_send_request_ex(struct pvr2_hdw *hdw, 2545static int pvr2_send_request_ex(struct pvr2_hdw *hdw,
2572 unsigned int timeout,int probe_fl, 2546 unsigned int timeout,int probe_fl,
2573 void *write_data,unsigned int write_len, 2547 void *write_data,unsigned int write_len,
2574 void *read_data,unsigned int read_len) 2548 void *read_data,unsigned int read_len)
2575{ 2549{
2576 unsigned int idx; 2550 unsigned int idx;
2577 int status = 0; 2551 int status = 0;
@@ -2826,7 +2800,7 @@ int pvr2_write_register(struct pvr2_hdw *hdw, u16 reg, u32 data)
2826} 2800}
2827 2801
2828 2802
2829int pvr2_read_register(struct pvr2_hdw *hdw, u16 reg, u32 *data) 2803static int pvr2_read_register(struct pvr2_hdw *hdw, u16 reg, u32 *data)
2830{ 2804{
2831 int ret = 0; 2805 int ret = 0;
2832 2806
@@ -2850,7 +2824,7 @@ int pvr2_read_register(struct pvr2_hdw *hdw, u16 reg, u32 *data)
2850} 2824}
2851 2825
2852 2826
2853int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res) 2827static int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res)
2854{ 2828{
2855 int ret; 2829 int ret;
2856 2830
@@ -2867,7 +2841,7 @@ int pvr2_write_u16(struct pvr2_hdw *hdw, u16 data, int res)
2867} 2841}
2868 2842
2869 2843
2870int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res) 2844static int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res)
2871{ 2845{
2872 int ret; 2846 int ret;
2873 2847
@@ -2883,13 +2857,13 @@ int pvr2_write_u8(struct pvr2_hdw *hdw, u8 data, int res)
2883} 2857}
2884 2858
2885 2859
2886void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw) 2860static void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *hdw)
2887{ 2861{
2888 if (!hdw->flag_ok) return; 2862 if (!hdw->flag_ok) return;
2889 pvr2_trace(PVR2_TRACE_INIT,"render_useless"); 2863 pvr2_trace(PVR2_TRACE_INIT,"render_useless");
2890 hdw->flag_ok = 0; 2864 hdw->flag_ok = 0;
2891 if (hdw->vid_stream) { 2865 if (hdw->vid_stream) {
2892 pvr2_stream_setup(hdw->vid_stream,0,0,0); 2866 pvr2_stream_setup(hdw->vid_stream,NULL,0,0);
2893 } 2867 }
2894 hdw->flag_streaming_enabled = 0; 2868 hdw->flag_streaming_enabled = 0;
2895 hdw->subsys_enabled_mask = 0; 2869 hdw->subsys_enabled_mask = 0;
@@ -2908,7 +2882,7 @@ void pvr2_hdw_device_reset(struct pvr2_hdw *hdw)
2908{ 2882{
2909 int ret; 2883 int ret;
2910 pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset..."); 2884 pvr2_trace(PVR2_TRACE_INIT,"Performing a device reset...");
2911 ret = usb_lock_device_for_reset(hdw->usb_dev,0); 2885 ret = usb_lock_device_for_reset(hdw->usb_dev,NULL);
2912 if (ret == 1) { 2886 if (ret == 1) {
2913 ret = usb_reset_device(hdw->usb_dev); 2887 ret = usb_reset_device(hdw->usb_dev);
2914 usb_unlock_device(hdw->usb_dev); 2888 usb_unlock_device(hdw->usb_dev);
@@ -2957,7 +2931,7 @@ int pvr2_hdw_cmd_deep_reset(struct pvr2_hdw *hdw)
2957 pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset"); 2931 pvr2_trace(PVR2_TRACE_INIT,"Requesting uproc hard reset");
2958 hdw->flag_ok = !0; 2932 hdw->flag_ok = !0;
2959 hdw->cmd_buffer[0] = 0xdd; 2933 hdw->cmd_buffer[0] = 0xdd;
2960 status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); 2934 status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0);
2961 } while (0); LOCK_GIVE(hdw->ctl_lock); 2935 } while (0); LOCK_GIVE(hdw->ctl_lock);
2962 return status; 2936 return status;
2963} 2937}
@@ -2969,7 +2943,7 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *hdw)
2969 LOCK_TAKE(hdw->ctl_lock); do { 2943 LOCK_TAKE(hdw->ctl_lock); do {
2970 pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup"); 2944 pvr2_trace(PVR2_TRACE_INIT,"Requesting powerup");
2971 hdw->cmd_buffer[0] = 0xde; 2945 hdw->cmd_buffer[0] = 0xde;
2972 status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); 2946 status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0);
2973 } while (0); LOCK_GIVE(hdw->ctl_lock); 2947 } while (0); LOCK_GIVE(hdw->ctl_lock);
2974 return status; 2948 return status;
2975} 2949}
@@ -2996,12 +2970,12 @@ int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *hdw)
2996} 2970}
2997 2971
2998 2972
2999int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl) 2973static int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl)
3000{ 2974{
3001 int status; 2975 int status;
3002 LOCK_TAKE(hdw->ctl_lock); do { 2976 LOCK_TAKE(hdw->ctl_lock); do {
3003 hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37); 2977 hdw->cmd_buffer[0] = (runFl ? 0x36 : 0x37);
3004 status = pvr2_send_request(hdw,hdw->cmd_buffer,1,0,0); 2978 status = pvr2_send_request(hdw,hdw->cmd_buffer,1,NULL,0);
3005 } while (0); LOCK_GIVE(hdw->ctl_lock); 2979 } while (0); LOCK_GIVE(hdw->ctl_lock);
3006 if (!status) { 2980 if (!status) {
3007 hdw->subsys_enabled_mask = 2981 hdw->subsys_enabled_mask =
@@ -3094,7 +3068,7 @@ int pvr2_hdw_gpio_chg_out(struct pvr2_hdw *hdw,u32 msk,u32 val)
3094} 3068}
3095 3069
3096 3070
3097int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw) 3071static int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *hdw)
3098{ 3072{
3099 int result; 3073 int result;
3100 LOCK_TAKE(hdw->ctl_lock); do { 3074 LOCK_TAKE(hdw->ctl_lock); do {
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.h b/drivers/media/video/pvrusb2/pvrusb2-hdw.h
index 63f52915443..fd931b5da49 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.h
@@ -91,7 +91,6 @@ struct pvr2_hdw *pvr2_hdw_create(struct usb_interface *intf,
91void pvr2_hdw_poll(struct pvr2_hdw *); 91void pvr2_hdw_poll(struct pvr2_hdw *);
92 92
93/* Trigger a poll to take place later at a convenient time */ 93/* Trigger a poll to take place later at a convenient time */
94void pvr2_hdw_poll_trigger(struct pvr2_hdw *);
95void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *); 94void pvr2_hdw_poll_trigger_unlocked(struct pvr2_hdw *);
96 95
97/* Register a callback used to trigger a future poll */ 96/* Register a callback used to trigger a future poll */
@@ -99,9 +98,6 @@ void pvr2_hdw_setup_poll_trigger(struct pvr2_hdw *,
99 void (*func)(void *), 98 void (*func)(void *),
100 void *data); 99 void *data);
101 100
102/* Get pointer to structure given unit number */
103struct pvr2_hdw *pvr2_hdw_find(int unit_number);
104
105/* Destroy hardware interaction structure */ 101/* Destroy hardware interaction structure */
106void pvr2_hdw_destroy(struct pvr2_hdw *); 102void pvr2_hdw_destroy(struct pvr2_hdw *);
107 103
@@ -180,12 +176,6 @@ int pvr2_hdw_get_stdenum_value(struct pvr2_hdw *hdw,struct v4l2_standard *std,
180void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw, 176void pvr2_hdw_subsys_bit_chg(struct pvr2_hdw *hdw,
181 unsigned long msk,unsigned long val); 177 unsigned long msk,unsigned long val);
182 178
183/* Shortcut for pvr2_hdw_subsys_bit_chg(hdw,msk,msk) */
184void pvr2_hdw_subsys_bit_set(struct pvr2_hdw *hdw,unsigned long msk);
185
186/* Shortcut for pvr2_hdw_subsys_bit_chg(hdw,msk,0) */
187void pvr2_hdw_subsys_bit_clr(struct pvr2_hdw *hdw,unsigned long msk);
188
189/* Retrieve mask indicating which pieces of hardware are currently enabled 179/* Retrieve mask indicating which pieces of hardware are currently enabled
190 / configured. */ 180 / configured. */
191unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *); 181unsigned long pvr2_hdw_subsys_get(struct pvr2_hdw *);
@@ -225,34 +215,18 @@ void pvr2_hdw_v4l_store_minor_number(struct pvr2_hdw *,int);
225/* The following entry points are all lower level things you normally don't 215/* The following entry points are all lower level things you normally don't
226 want to worry about. */ 216 want to worry about. */
227 217
228/* Attempt to recover from a USB foul-up (in practice I find that if you
229 have to do this, then it's already too late). */
230void pvr2_reset_ctl_endpoints(struct pvr2_hdw *hdw);
231
232/* Issue a command and get a response from the device. LOTS of higher 218/* Issue a command and get a response from the device. LOTS of higher
233 level stuff is built on this. */ 219 level stuff is built on this. */
234int pvr2_send_request(struct pvr2_hdw *, 220int pvr2_send_request(struct pvr2_hdw *,
235 void *write_ptr,unsigned int write_len, 221 void *write_ptr,unsigned int write_len,
236 void *read_ptr,unsigned int read_len); 222 void *read_ptr,unsigned int read_len);
237 223
238/* Issue a command and get a response from the device. This extended
239 version includes a probe flag (which if set means that device errors
240 should not be logged or treated as fatal) and a timeout in jiffies.
241 This can be used to non-lethally probe the health of endpoint 1. */
242int pvr2_send_request_ex(struct pvr2_hdw *,unsigned int timeout,int probe_fl,
243 void *write_ptr,unsigned int write_len,
244 void *read_ptr,unsigned int read_len);
245
246/* Slightly higher level device communication functions. */ 224/* Slightly higher level device communication functions. */
247int pvr2_write_register(struct pvr2_hdw *, u16, u32); 225int pvr2_write_register(struct pvr2_hdw *, u16, u32);
248int pvr2_read_register(struct pvr2_hdw *, u16, u32 *);
249int pvr2_write_u16(struct pvr2_hdw *, u16, int);
250int pvr2_write_u8(struct pvr2_hdw *, u8, int);
251 226
252/* Call if for any reason we can't talk to the hardware anymore - this will 227/* Call if for any reason we can't talk to the hardware anymore - this will
253 cause the driver to stop flailing on the device. */ 228 cause the driver to stop flailing on the device. */
254void pvr2_hdw_render_useless(struct pvr2_hdw *); 229void pvr2_hdw_render_useless(struct pvr2_hdw *);
255void pvr2_hdw_render_useless_unlocked(struct pvr2_hdw *);
256 230
257/* Set / clear 8051's reset bit */ 231/* Set / clear 8051's reset bit */
258void pvr2_hdw_cpureset_assert(struct pvr2_hdw *,int); 232void pvr2_hdw_cpureset_assert(struct pvr2_hdw *,int);
@@ -271,12 +245,6 @@ int pvr2_hdw_cmd_powerup(struct pvr2_hdw *);
271/* Order decoder to reset */ 245/* Order decoder to reset */
272int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *); 246int pvr2_hdw_cmd_decoder_reset(struct pvr2_hdw *);
273 247
274/* Stop / start video stream transport */
275int pvr2_hdw_cmd_usbstream(struct pvr2_hdw *hdw,int runFl);
276
277/* Find I2C address of eeprom */
278int pvr2_hdw_get_eeprom_addr(struct pvr2_hdw *);
279
280/* Direct manipulation of GPIO bits */ 248/* Direct manipulation of GPIO bits */
281int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *); 249int pvr2_hdw_gpio_get_dir(struct pvr2_hdw *hdw,u32 *);
282int pvr2_hdw_gpio_get_out(struct pvr2_hdw *hdw,u32 *); 250int pvr2_hdw_gpio_get_out(struct pvr2_hdw *hdw,u32 *);
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
index 1dd4f6249b9..fbe6039aeb6 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
@@ -25,7 +25,6 @@
25#include "pvrusb2-i2c-cmd-v4l2.h" 25#include "pvrusb2-i2c-cmd-v4l2.h"
26#include "pvrusb2-audio.h" 26#include "pvrusb2-audio.h"
27#include "pvrusb2-tuner.h" 27#include "pvrusb2-tuner.h"
28#include "pvrusb2-demod.h"
29#include "pvrusb2-video-v4l.h" 28#include "pvrusb2-video-v4l.h"
30#ifdef CONFIG_VIDEO_PVRUSB2_24XXX 29#ifdef CONFIG_VIDEO_PVRUSB2_24XXX
31#include "pvrusb2-cx2584x-v4l.h" 30#include "pvrusb2-cx2584x-v4l.h"
@@ -89,11 +88,6 @@ void pvr2_i2c_probe(struct pvr2_hdw *hdw,struct pvr2_i2c_client *cp)
89 return; 88 return;
90 } 89 }
91 } 90 }
92 if (id == I2C_DRIVERID_TDA9887) {
93 if (pvr2_i2c_demod_setup(hdw,cp)) {
94 return;
95 }
96 }
97} 91}
98 92
99 93
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
index 9f81aff2b38..8a9933dec91 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
@@ -196,7 +196,7 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_size = {
196static void do_log(struct pvr2_hdw *hdw) 196static void do_log(struct pvr2_hdw *hdw)
197{ 197{
198 pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()"); 198 pvr2_trace(PVR2_TRACE_CHIPS,"i2c v4l2 do_log()");
199 pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,0); 199 pvr2_i2c_core_cmd(hdw,VIDIOC_LOG_STATUS,NULL);
200 200
201} 201}
202 202
@@ -217,7 +217,7 @@ const struct pvr2_i2c_op pvr2_i2c_op_v4l2_log = {
217void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl) 217void pvr2_v4l2_cmd_stream(struct pvr2_i2c_client *cp,int fl)
218{ 218{
219 pvr2_i2c_client_cmd(cp, 219 pvr2_i2c_client_cmd(cp,
220 (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),0); 220 (fl ? VIDIOC_STREAMON : VIDIOC_STREAMOFF),NULL);
221} 221}
222 222
223 223
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index c8d0bdee3ff..7fca4798227 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -37,6 +37,10 @@ static unsigned int i2c_scan = 0;
37module_param(i2c_scan, int, S_IRUGO|S_IWUSR); 37module_param(i2c_scan, int, S_IRUGO|S_IWUSR);
38MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time"); 38MODULE_PARM_DESC(i2c_scan,"scan i2c bus at insmod time");
39 39
40static unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp,
41 unsigned int detail,
42 char *buf,unsigned int maxlen);
43
40static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */ 44static int pvr2_i2c_write(struct pvr2_hdw *hdw, /* Context */
41 u8 i2c_addr, /* I2C address we're talking to */ 45 u8 i2c_addr, /* I2C address we're talking to */
42 u8 *data, /* Data to write */ 46 u8 *data, /* Data to write */
@@ -165,12 +169,12 @@ static int pvr2_i2c_read(struct pvr2_hdw *hdw, /* Context */
165 169
166/* This is the common low level entry point for doing I2C operations to the 170/* This is the common low level entry point for doing I2C operations to the
167 hardware. */ 171 hardware. */
168int pvr2_i2c_basic_op(struct pvr2_hdw *hdw, 172static int pvr2_i2c_basic_op(struct pvr2_hdw *hdw,
169 u8 i2c_addr, 173 u8 i2c_addr,
170 u8 *wdata, 174 u8 *wdata,
171 u16 wlen, 175 u16 wlen,
172 u8 *rdata, 176 u8 *rdata,
173 u16 rlen) 177 u16 rlen)
174{ 178{
175 if (!rdata) rlen = 0; 179 if (!rdata) rlen = 0;
176 if (!wdata) wlen = 0; 180 if (!wdata) wlen = 0;
@@ -267,7 +271,7 @@ static int i2c_hack_cx25840(struct pvr2_hdw *hdw,
267 "WARNING: Disabling further access to the device" 271 "WARNING: Disabling further access to the device"
268 " to prevent other foul-ups."); 272 " to prevent other foul-ups.");
269 // This blocks all further communication with the part. 273 // This blocks all further communication with the part.
270 hdw->i2c_func[0x44] = 0; 274 hdw->i2c_func[0x44] = NULL;
271 pvr2_hdw_render_useless(hdw); 275 pvr2_hdw_render_useless(hdw);
272 goto fail; 276 goto fail;
273 } 277 }
@@ -294,7 +298,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
294 int num) 298 int num)
295{ 299{
296 int ret = -ENOTSUPP; 300 int ret = -ENOTSUPP;
297 pvr2_i2c_func funcp = 0; 301 pvr2_i2c_func funcp = NULL;
298 struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data); 302 struct pvr2_hdw *hdw = (struct pvr2_hdw *)(i2c_adap->algo_data);
299 303
300 if (!num) { 304 if (!num) {
@@ -319,7 +323,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
319 u16 tcnt,bcnt,offs; 323 u16 tcnt,bcnt,offs;
320 if (!msgs[0].len) { 324 if (!msgs[0].len) {
321 /* Length == 0 read. This is a probe. */ 325 /* Length == 0 read. This is a probe. */
322 if (funcp(hdw,msgs[0].addr,0,0,0,0)) { 326 if (funcp(hdw,msgs[0].addr,NULL,0,NULL,0)) {
323 ret = -EIO; 327 ret = -EIO;
324 goto done; 328 goto done;
325 } 329 }
@@ -336,7 +340,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
336 if (bcnt > sizeof(hdw->cmd_buffer)-1) { 340 if (bcnt > sizeof(hdw->cmd_buffer)-1) {
337 bcnt = sizeof(hdw->cmd_buffer)-1; 341 bcnt = sizeof(hdw->cmd_buffer)-1;
338 } 342 }
339 if (funcp(hdw,msgs[0].addr,0,0, 343 if (funcp(hdw,msgs[0].addr,NULL,0,
340 msgs[0].buf+offs,bcnt)) { 344 msgs[0].buf+offs,bcnt)) {
341 ret = -EIO; 345 ret = -EIO;
342 goto done; 346 goto done;
@@ -350,7 +354,7 @@ static int pvr2_i2c_xfer(struct i2c_adapter *i2c_adap,
350 /* Simple write */ 354 /* Simple write */
351 ret = 1; 355 ret = 1;
352 if (funcp(hdw,msgs[0].addr, 356 if (funcp(hdw,msgs[0].addr,
353 msgs[0].buf,msgs[0].len,0,0)) { 357 msgs[0].buf,msgs[0].len,NULL,0)) {
354 ret = -EIO; 358 ret = -EIO;
355 } 359 }
356 goto done; 360 goto done;
@@ -705,9 +709,9 @@ int pvr2_i2c_core_check_stale(struct pvr2_hdw *hdw)
705 return (hdw->i2c_pend_types & PVR2_I2C_PEND_ALL) != 0; 709 return (hdw->i2c_pend_types & PVR2_I2C_PEND_ALL) != 0;
706} 710}
707 711
708unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp, 712static unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *cp,
709 unsigned int detail, 713 unsigned int detail,
710 char *buf,unsigned int maxlen) 714 char *buf,unsigned int maxlen)
711{ 715{
712 unsigned int ccnt,bcnt; 716 unsigned int ccnt,bcnt;
713 int spcfl = 0; 717 int spcfl = 0;
@@ -871,7 +875,7 @@ static void do_i2c_scan(struct pvr2_hdw *hdw)
871 msg[0].addr = 0; 875 msg[0].addr = 0;
872 msg[0].flags = I2C_M_RD; 876 msg[0].flags = I2C_M_RD;
873 msg[0].len = 0; 877 msg[0].len = 0;
874 msg[0].buf = 0; 878 msg[0].buf = NULL;
875 printk("%s: i2c scan beginning\n",hdw->name); 879 printk("%s: i2c scan beginning\n",hdw->name);
876 for (i = 0; i < 128; i++) { 880 for (i = 0; i < 128; i++) {
877 msg[0].addr = i; 881 msg[0].addr = i;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
index e8af5b0ed3c..6d7e2524757 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-i2c-core.h
@@ -75,9 +75,6 @@ unsigned int pvr2_i2c_report(struct pvr2_hdw *,char *buf,unsigned int maxlen);
75 PVR2_I2C_DETAIL_DEBUG |\ 75 PVR2_I2C_DETAIL_DEBUG |\
76 PVR2_I2C_DETAIL_HANDLER |\ 76 PVR2_I2C_DETAIL_HANDLER |\
77 PVR2_I2C_DETAIL_CTLMASK) 77 PVR2_I2C_DETAIL_CTLMASK)
78unsigned int pvr2_i2c_client_describe(struct pvr2_i2c_client *,
79 unsigned int detail_mask,
80 char *buf,unsigned int maxlen);
81 78
82void pvr2_i2c_probe(struct pvr2_hdw *,struct pvr2_i2c_client *); 79void pvr2_i2c_probe(struct pvr2_hdw *,struct pvr2_i2c_client *);
83const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx); 80const struct pvr2_i2c_op *pvr2_i2c_get_op(unsigned int idx);
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.c b/drivers/media/video/pvrusb2/pvrusb2-io.c
index a984c91f571..681f79c8064 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-io.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-io.c
@@ -93,7 +93,7 @@ struct pvr2_buffer {
93 struct urb *purb; 93 struct urb *purb;
94}; 94};
95 95
96const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st) 96static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st)
97{ 97{
98 switch (st) { 98 switch (st) {
99 case pvr2_buffer_state_none: return "none"; 99 case pvr2_buffer_state_none: return "none";
@@ -104,7 +104,8 @@ const char *pvr2_buffer_state_decode(enum pvr2_buffer_state st)
104 return "unknown"; 104 return "unknown";
105} 105}
106 106
107void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg) 107#ifdef SANITY_CHECK_BUFFERS
108static void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg)
108{ 109{
109 pvr2_trace(PVR2_TRACE_INFO, 110 pvr2_trace(PVR2_TRACE_INFO,
110 "buffer%s%s %p state=%s id=%d status=%d" 111 "buffer%s%s %p state=%s id=%d status=%d"
@@ -115,10 +116,11 @@ void pvr2_buffer_describe(struct pvr2_buffer *bp,const char *msg)
115 (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"), 116 (bp ? pvr2_buffer_state_decode(bp->state) : "(invalid)"),
116 (bp ? bp->id : 0), 117 (bp ? bp->id : 0),
117 (bp ? bp->status : 0), 118 (bp ? bp->status : 0),
118 (bp ? bp->stream : 0), 119 (bp ? bp->stream : NULL),
119 (bp ? bp->purb : 0), 120 (bp ? bp->purb : NULL),
120 (bp ? bp->signature : 0)); 121 (bp ? bp->signature : 0));
121} 122}
123#endif /* SANITY_CHECK_BUFFERS */
122 124
123static void pvr2_buffer_remove(struct pvr2_buffer *bp) 125static void pvr2_buffer_remove(struct pvr2_buffer *bp)
124{ 126{
@@ -284,7 +286,7 @@ static void pvr2_buffer_done(struct pvr2_buffer *bp)
284 pvr2_buffer_wipe(bp); 286 pvr2_buffer_wipe(bp);
285 pvr2_buffer_set_none(bp); 287 pvr2_buffer_set_none(bp);
286 bp->signature = 0; 288 bp->signature = 0;
287 bp->stream = 0; 289 bp->stream = NULL;
288 if (bp->purb) usb_free_urb(bp->purb); 290 if (bp->purb) usb_free_urb(bp->purb);
289 pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/" 291 pvr2_trace(PVR2_TRACE_BUF_POOL,"/*---TRACE_FLOW---*/"
290 " bufferDone %p",bp); 292 " bufferDone %p",bp);
@@ -339,13 +341,13 @@ static int pvr2_stream_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
339 struct pvr2_buffer *bp; 341 struct pvr2_buffer *bp;
340 bp = sp->buffers[sp->buffer_total_count - 1]; 342 bp = sp->buffers[sp->buffer_total_count - 1];
341 /* Paranoia */ 343 /* Paranoia */
342 sp->buffers[sp->buffer_total_count - 1] = 0; 344 sp->buffers[sp->buffer_total_count - 1] = NULL;
343 (sp->buffer_total_count)--; 345 (sp->buffer_total_count)--;
344 pvr2_buffer_done(bp); 346 pvr2_buffer_done(bp);
345 kfree(bp); 347 kfree(bp);
346 } 348 }
347 if (scnt < sp->buffer_slot_count) { 349 if (scnt < sp->buffer_slot_count) {
348 struct pvr2_buffer **nb = 0; 350 struct pvr2_buffer **nb = NULL;
349 if (scnt) { 351 if (scnt) {
350 nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL); 352 nb = kmalloc(scnt * sizeof(*nb),GFP_KERNEL);
351 if (!nb) return -ENOMEM; 353 if (!nb) return -ENOMEM;
@@ -513,10 +515,6 @@ void pvr2_stream_set_callback(struct pvr2_stream *sp,
513} 515}
514 516
515/* Query / set the nominal buffer count */ 517/* Query / set the nominal buffer count */
516int pvr2_stream_get_buffer_count(struct pvr2_stream *sp)
517{
518 return sp->buffer_target_count;
519}
520 518
521int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt) 519int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
522{ 520{
@@ -532,21 +530,21 @@ int pvr2_stream_set_buffer_count(struct pvr2_stream *sp,unsigned int cnt)
532struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp) 530struct pvr2_buffer *pvr2_stream_get_idle_buffer(struct pvr2_stream *sp)
533{ 531{
534 struct list_head *lp = sp->idle_list.next; 532 struct list_head *lp = sp->idle_list.next;
535 if (lp == &sp->idle_list) return 0; 533 if (lp == &sp->idle_list) return NULL;
536 return list_entry(lp,struct pvr2_buffer,list_overhead); 534 return list_entry(lp,struct pvr2_buffer,list_overhead);
537} 535}
538 536
539struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp) 537struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *sp)
540{ 538{
541 struct list_head *lp = sp->ready_list.next; 539 struct list_head *lp = sp->ready_list.next;
542 if (lp == &sp->ready_list) return 0; 540 if (lp == &sp->ready_list) return NULL;
543 return list_entry(lp,struct pvr2_buffer,list_overhead); 541 return list_entry(lp,struct pvr2_buffer,list_overhead);
544} 542}
545 543
546struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id) 544struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id)
547{ 545{
548 if (id < 0) return 0; 546 if (id < 0) return NULL;
549 if (id >= sp->buffer_total_count) return 0; 547 if (id >= sp->buffer_total_count) return NULL;
550 return sp->buffers[id]; 548 return sp->buffers[id];
551} 549}
552 550
@@ -555,17 +553,6 @@ int pvr2_stream_get_ready_count(struct pvr2_stream *sp)
555 return sp->r_count; 553 return sp->r_count;
556} 554}
557 555
558int pvr2_stream_get_idle_count(struct pvr2_stream *sp)
559{
560 return sp->i_count;
561}
562
563void pvr2_stream_flush(struct pvr2_stream *sp)
564{
565 mutex_lock(&sp->mutex); do {
566 pvr2_stream_internal_flush(sp);
567 } while(0); mutex_unlock(&sp->mutex);
568}
569 556
570void pvr2_stream_kill(struct pvr2_stream *sp) 557void pvr2_stream_kill(struct pvr2_stream *sp)
571{ 558{
@@ -620,20 +607,6 @@ int pvr2_buffer_queue(struct pvr2_buffer *bp)
620 return ret; 607 return ret;
621} 608}
622 609
623int pvr2_buffer_idle(struct pvr2_buffer *bp)
624{
625 struct pvr2_stream *sp;
626 if (!bp) return -EINVAL;
627 sp = bp->stream;
628 mutex_lock(&sp->mutex); do {
629 pvr2_buffer_wipe(bp);
630 pvr2_buffer_set_idle(bp);
631 if (sp->buffer_total_count != sp->buffer_target_count) {
632 pvr2_stream_achieve_buffer_count(sp);
633 }
634 } while(0); mutex_unlock(&sp->mutex);
635 return 0;
636}
637 610
638int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt) 611int pvr2_buffer_set_buffer(struct pvr2_buffer *bp,void *ptr,unsigned int cnt)
639{ 612{
@@ -673,10 +646,6 @@ int pvr2_buffer_get_status(struct pvr2_buffer *bp)
673 return bp->status; 646 return bp->status;
674} 647}
675 648
676enum pvr2_buffer_state pvr2_buffer_get_state(struct pvr2_buffer *bp)
677{
678 return bp->state;
679}
680 649
681int pvr2_buffer_get_id(struct pvr2_buffer *bp) 650int pvr2_buffer_get_id(struct pvr2_buffer *bp)
682{ 651{
diff --git a/drivers/media/video/pvrusb2/pvrusb2-io.h b/drivers/media/video/pvrusb2/pvrusb2-io.h
index 65e11385b2b..96285ad234a 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-io.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-io.h
@@ -36,8 +36,6 @@ enum pvr2_buffer_state {
36struct pvr2_stream; 36struct pvr2_stream;
37struct pvr2_buffer; 37struct pvr2_buffer;
38 38
39const char *pvr2_buffer_state_decode(enum pvr2_buffer_state);
40
41/* Initialize / tear down stream structure */ 39/* Initialize / tear down stream structure */
42struct pvr2_stream *pvr2_stream_create(void); 40struct pvr2_stream *pvr2_stream_create(void);
43void pvr2_stream_destroy(struct pvr2_stream *); 41void pvr2_stream_destroy(struct pvr2_stream *);
@@ -49,7 +47,6 @@ void pvr2_stream_set_callback(struct pvr2_stream *,
49 void *data); 47 void *data);
50 48
51/* Query / set the nominal buffer count */ 49/* Query / set the nominal buffer count */
52int pvr2_stream_get_buffer_count(struct pvr2_stream *);
53int pvr2_stream_set_buffer_count(struct pvr2_stream *,unsigned int); 50int pvr2_stream_set_buffer_count(struct pvr2_stream *,unsigned int);
54 51
55/* Get a pointer to a buffer that is either idle, ready, or is specified 52/* Get a pointer to a buffer that is either idle, ready, or is specified
@@ -59,12 +56,8 @@ struct pvr2_buffer *pvr2_stream_get_ready_buffer(struct pvr2_stream *);
59struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id); 56struct pvr2_buffer *pvr2_stream_get_buffer(struct pvr2_stream *sp,int id);
60 57
61/* Find out how many buffers are idle or ready */ 58/* Find out how many buffers are idle or ready */
62int pvr2_stream_get_idle_count(struct pvr2_stream *);
63int pvr2_stream_get_ready_count(struct pvr2_stream *); 59int pvr2_stream_get_ready_count(struct pvr2_stream *);
64 60
65/* Kill all pending operations */
66void pvr2_stream_flush(struct pvr2_stream *);
67
68/* Kill all pending buffers and throw away any ready buffers as well */ 61/* Kill all pending buffers and throw away any ready buffers as well */
69void pvr2_stream_kill(struct pvr2_stream *); 62void pvr2_stream_kill(struct pvr2_stream *);
70 63
@@ -77,18 +70,12 @@ unsigned int pvr2_buffer_get_count(struct pvr2_buffer *);
77/* Retrieve completion code for given ready buffer */ 70/* Retrieve completion code for given ready buffer */
78int pvr2_buffer_get_status(struct pvr2_buffer *); 71int pvr2_buffer_get_status(struct pvr2_buffer *);
79 72
80/* Retrieve state of given buffer */
81enum pvr2_buffer_state pvr2_buffer_get_state(struct pvr2_buffer *);
82
83/* Retrieve ID of given buffer */ 73/* Retrieve ID of given buffer */
84int pvr2_buffer_get_id(struct pvr2_buffer *); 74int pvr2_buffer_get_id(struct pvr2_buffer *);
85 75
86/* Start reading into given buffer (kill it if needed) */ 76/* Start reading into given buffer (kill it if needed) */
87int pvr2_buffer_queue(struct pvr2_buffer *); 77int pvr2_buffer_queue(struct pvr2_buffer *);
88 78
89/* Move buffer back to idle pool (kill it if needed) */
90int pvr2_buffer_idle(struct pvr2_buffer *);
91
92#endif /* __PVRUSB2_IO_H */ 79#endif /* __PVRUSB2_IO_H */
93 80
94/* 81/*
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/drivers/media/video/pvrusb2/pvrusb2-ioread.c
index 49da062e327..f7a2e225a00 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ioread.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.c
@@ -54,7 +54,7 @@ static int pvr2_ioread_init(struct pvr2_ioread *cp)
54{ 54{
55 unsigned int idx; 55 unsigned int idx;
56 56
57 cp->stream = 0; 57 cp->stream = NULL;
58 mutex_init(&cp->mutex); 58 mutex_init(&cp->mutex);
59 59
60 for (idx = 0; idx < BUFFER_COUNT; idx++) { 60 for (idx = 0; idx < BUFFER_COUNT; idx++) {
@@ -77,7 +77,7 @@ static void pvr2_ioread_done(struct pvr2_ioread *cp)
77{ 77{
78 unsigned int idx; 78 unsigned int idx;
79 79
80 pvr2_ioread_setup(cp,0); 80 pvr2_ioread_setup(cp,NULL);
81 for (idx = 0; idx < BUFFER_COUNT; idx++) { 81 for (idx = 0; idx < BUFFER_COUNT; idx++) {
82 if (!(cp->buffer_storage[idx])) continue; 82 if (!(cp->buffer_storage[idx])) continue;
83 kfree(cp->buffer_storage[idx]); 83 kfree(cp->buffer_storage[idx]);
@@ -88,12 +88,12 @@ struct pvr2_ioread *pvr2_ioread_create(void)
88{ 88{
89 struct pvr2_ioread *cp; 89 struct pvr2_ioread *cp;
90 cp = kmalloc(sizeof(*cp),GFP_KERNEL); 90 cp = kmalloc(sizeof(*cp),GFP_KERNEL);
91 if (!cp) return 0; 91 if (!cp) return NULL;
92 pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp); 92 pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_create id=%p",cp);
93 memset(cp,0,sizeof(*cp)); 93 memset(cp,0,sizeof(*cp));
94 if (pvr2_ioread_init(cp) < 0) { 94 if (pvr2_ioread_init(cp) < 0) {
95 kfree(cp); 95 kfree(cp);
96 return 0; 96 return NULL;
97 } 97 }
98 return cp; 98 return cp;
99} 99}
@@ -105,7 +105,7 @@ void pvr2_ioread_destroy(struct pvr2_ioread *cp)
105 pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp); 105 pvr2_trace(PVR2_TRACE_STRUCT,"pvr2_ioread_destroy id=%p",cp);
106 if (cp->sync_key_ptr) { 106 if (cp->sync_key_ptr) {
107 kfree(cp->sync_key_ptr); 107 kfree(cp->sync_key_ptr);
108 cp->sync_key_ptr = 0; 108 cp->sync_key_ptr = NULL;
109 } 109 }
110 kfree(cp); 110 kfree(cp);
111} 111}
@@ -124,7 +124,7 @@ void pvr2_ioread_set_sync_key(struct pvr2_ioread *cp,
124 if (sync_key_len != cp->sync_key_len) { 124 if (sync_key_len != cp->sync_key_len) {
125 if (cp->sync_key_ptr) { 125 if (cp->sync_key_ptr) {
126 kfree(cp->sync_key_ptr); 126 kfree(cp->sync_key_ptr);
127 cp->sync_key_ptr = 0; 127 cp->sync_key_ptr = NULL;
128 } 128 }
129 cp->sync_key_len = 0; 129 cp->sync_key_len = 0;
130 if (sync_key_len) { 130 if (sync_key_len) {
@@ -144,8 +144,8 @@ static void pvr2_ioread_stop(struct pvr2_ioread *cp)
144 pvr2_trace(PVR2_TRACE_START_STOP, 144 pvr2_trace(PVR2_TRACE_START_STOP,
145 "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp); 145 "/*---TRACE_READ---*/ pvr2_ioread_stop id=%p",cp);
146 pvr2_stream_kill(cp->stream); 146 pvr2_stream_kill(cp->stream);
147 cp->c_buf = 0; 147 cp->c_buf = NULL;
148 cp->c_data_ptr = 0; 148 cp->c_data_ptr = NULL;
149 cp->c_data_len = 0; 149 cp->c_data_len = 0;
150 cp->c_data_offs = 0; 150 cp->c_data_offs = 0;
151 cp->enabled = 0; 151 cp->enabled = 0;
@@ -179,8 +179,8 @@ static int pvr2_ioread_start(struct pvr2_ioread *cp)
179 } 179 }
180 } 180 }
181 cp->enabled = !0; 181 cp->enabled = !0;
182 cp->c_buf = 0; 182 cp->c_buf = NULL;
183 cp->c_data_ptr = 0; 183 cp->c_data_ptr = NULL;
184 cp->c_data_len = 0; 184 cp->c_data_len = 0;
185 cp->c_data_offs = 0; 185 cp->c_data_offs = 0;
186 cp->stream_running = 0; 186 cp->stream_running = 0;
@@ -214,7 +214,7 @@ int pvr2_ioread_setup(struct pvr2_ioread *cp,struct pvr2_stream *sp)
214 pvr2_ioread_stop(cp); 214 pvr2_ioread_stop(cp);
215 pvr2_stream_kill(cp->stream); 215 pvr2_stream_kill(cp->stream);
216 pvr2_stream_set_buffer_count(cp->stream,0); 216 pvr2_stream_set_buffer_count(cp->stream,0);
217 cp->stream = 0; 217 cp->stream = NULL;
218 } 218 }
219 if (sp) { 219 if (sp) {
220 pvr2_trace(PVR2_TRACE_START_STOP, 220 pvr2_trace(PVR2_TRACE_START_STOP,
@@ -251,12 +251,8 @@ int pvr2_ioread_set_enabled(struct pvr2_ioread *cp,int fl)
251 return ret; 251 return ret;
252} 252}
253 253
254int pvr2_ioread_get_enabled(struct pvr2_ioread *cp)
255{
256 return cp->enabled != 0;
257}
258 254
259int pvr2_ioread_get_buffer(struct pvr2_ioread *cp) 255static int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
260{ 256{
261 int stat; 257 int stat;
262 258
@@ -274,8 +270,8 @@ int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
274 pvr2_ioread_stop(cp); 270 pvr2_ioread_stop(cp);
275 return 0; 271 return 0;
276 } 272 }
277 cp->c_buf = 0; 273 cp->c_buf = NULL;
278 cp->c_data_ptr = 0; 274 cp->c_data_ptr = NULL;
279 cp->c_data_len = 0; 275 cp->c_data_len = 0;
280 cp->c_data_offs = 0; 276 cp->c_data_offs = 0;
281 } 277 }
@@ -307,7 +303,7 @@ int pvr2_ioread_get_buffer(struct pvr2_ioread *cp)
307 return !0; 303 return !0;
308} 304}
309 305
310void pvr2_ioread_filter(struct pvr2_ioread *cp) 306static void pvr2_ioread_filter(struct pvr2_ioread *cp)
311{ 307{
312 unsigned int idx; 308 unsigned int idx;
313 if (!cp->enabled) return; 309 if (!cp->enabled) return;
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ioread.h b/drivers/media/video/pvrusb2/pvrusb2-ioread.h
index 6b002597f5d..1d362f83358 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ioread.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-ioread.h
@@ -33,7 +33,6 @@ void pvr2_ioread_set_sync_key(struct pvr2_ioread *,
33 const char *sync_key_ptr, 33 const char *sync_key_ptr,
34 unsigned int sync_key_len); 34 unsigned int sync_key_len);
35int pvr2_ioread_set_enabled(struct pvr2_ioread *,int fl); 35int pvr2_ioread_set_enabled(struct pvr2_ioread *,int fl);
36int pvr2_ioread_get_enabled(struct pvr2_ioread *);
37int pvr2_ioread_read(struct pvr2_ioread *,void __user *buf,unsigned int cnt); 36int pvr2_ioread_read(struct pvr2_ioread *,void __user *buf,unsigned int cnt);
38int pvr2_ioread_avail(struct pvr2_ioread *); 37int pvr2_ioread_avail(struct pvr2_ioread *);
39 38
diff --git a/drivers/media/video/pvrusb2/pvrusb2-main.c b/drivers/media/video/pvrusb2/pvrusb2-main.c
index b95248274ed..8f1a5afdd34 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -54,7 +54,7 @@ module_param_named(debug,pvrusb2_debug,int,S_IRUGO|S_IWUSR);
54MODULE_PARM_DESC(debug, "Debug trace mask"); 54MODULE_PARM_DESC(debug, "Debug trace mask");
55 55
56#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS 56#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
57static struct pvr2_sysfs_class *class_ptr = 0; 57static struct pvr2_sysfs_class *class_ptr = NULL;
58#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */ 58#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
59 59
60static void pvr_setup_attach(struct pvr2_context *pvr) 60static void pvr_setup_attach(struct pvr2_context *pvr)
@@ -104,10 +104,10 @@ static void pvr_disconnect(struct usb_interface *intf)
104} 104}
105 105
106static struct usb_driver pvr_driver = { 106static struct usb_driver pvr_driver = {
107 name: "pvrusb2", 107 .name = "pvrusb2",
108 id_table: pvr2_device_table, 108 .id_table = pvr2_device_table,
109 probe: pvr_probe, 109 .probe = pvr_probe,
110 disconnect: pvr_disconnect 110 .disconnect = pvr_disconnect
111}; 111};
112 112
113/* 113/*
diff --git a/drivers/media/video/pvrusb2/pvrusb2-std.c b/drivers/media/video/pvrusb2/pvrusb2-std.c
index 13406369364..f95c598ff62 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-std.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-std.c
@@ -121,7 +121,7 @@ static const struct std_name *find_std_name(const struct std_name *arrPtr,
121 if (strlen(p->name) != bufSize) continue; 121 if (strlen(p->name) != bufSize) continue;
122 if (!memcmp(bufPtr,p->name,bufSize)) return p; 122 if (!memcmp(bufPtr,p->name,bufSize)) return p;
123 } 123 }
124 return 0; 124 return NULL;
125} 125}
126 126
127 127
@@ -289,7 +289,7 @@ static struct v4l2_standard *match_std(v4l2_std_id id)
289 return generic_standards + idx; 289 return generic_standards + idx;
290 } 290 }
291 } 291 }
292 return 0; 292 return NULL;
293} 293}
294 294
295static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id) 295static int pvr2_std_fill(struct v4l2_standard *std,v4l2_std_id id)
@@ -364,7 +364,7 @@ struct v4l2_standard *pvr2_std_create_enum(unsigned int *countptr,
364 364
365 pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)", 365 pvr2_trace(PVR2_TRACE_INIT,"Setting up %u unique standard(s)",
366 std_cnt); 366 std_cnt);
367 if (!std_cnt) return 0; // paranoia 367 if (!std_cnt) return NULL; // paranoia
368 368
369 stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt, 369 stddefs = kmalloc(sizeof(struct v4l2_standard) * std_cnt,
370 GFP_KERNEL); 370 GFP_KERNEL);
diff --git a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
index c6e6523d74b..6af55a8b6f0 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-sysfs.c
@@ -504,7 +504,7 @@ static void pvr2_sysfs_add_control(struct pvr2_sysfs *sfp,int ctl_id)
504 cip->cptr = cptr; 504 cip->cptr = cptr;
505 505
506 cip->chptr = sfp; 506 cip->chptr = sfp;
507 cip->item_next = 0; 507 cip->item_next = NULL;
508 if (sfp->item_last) { 508 if (sfp->item_last) {
509 sfp->item_last->item_next = cip; 509 sfp->item_last->item_next = cip;
510 } else { 510 } else {
@@ -625,7 +625,7 @@ static void pvr2_sysfs_tear_down_debugifc(struct pvr2_sysfs *sfp)
625 &sfp->debugifc->attr_debuginfo); 625 &sfp->debugifc->attr_debuginfo);
626 class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd); 626 class_device_remove_file(sfp->class_dev,&sfp->debugifc->attr_debugcmd);
627 kfree(sfp->debugifc); 627 kfree(sfp->debugifc);
628 sfp->debugifc = 0; 628 sfp->debugifc = NULL;
629} 629}
630#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */ 630#endif /* CONFIG_VIDEO_PVRUSB2_DEBUGIFC */
631 631
@@ -678,9 +678,9 @@ static void class_dev_destroy(struct pvr2_sysfs *sfp)
678 class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number); 678 class_device_remove_file(sfp->class_dev,&sfp->attr_v4l_minor_number);
679 class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number); 679 class_device_remove_file(sfp->class_dev,&sfp->attr_unit_number);
680 pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev); 680 pvr2_sysfs_trace("Destroying class_dev id=%p",sfp->class_dev);
681 sfp->class_dev->class_data = 0; 681 sfp->class_dev->class_data = NULL;
682 class_device_unregister(sfp->class_dev); 682 class_device_unregister(sfp->class_dev);
683 sfp->class_dev = 0; 683 sfp->class_dev = NULL;
684} 684}
685 685
686 686
@@ -739,13 +739,13 @@ static void class_dev_create(struct pvr2_sysfs *sfp,
739 sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number"; 739 sfp->attr_v4l_minor_number.attr.name = "v4l_minor_number";
740 sfp->attr_v4l_minor_number.attr.mode = S_IRUGO; 740 sfp->attr_v4l_minor_number.attr.mode = S_IRUGO;
741 sfp->attr_v4l_minor_number.show = v4l_minor_number_show; 741 sfp->attr_v4l_minor_number.show = v4l_minor_number_show;
742 sfp->attr_v4l_minor_number.store = 0; 742 sfp->attr_v4l_minor_number.store = NULL;
743 class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number); 743 class_device_create_file(sfp->class_dev,&sfp->attr_v4l_minor_number);
744 sfp->attr_unit_number.attr.owner = THIS_MODULE; 744 sfp->attr_unit_number.attr.owner = THIS_MODULE;
745 sfp->attr_unit_number.attr.name = "unit_number"; 745 sfp->attr_unit_number.attr.name = "unit_number";
746 sfp->attr_unit_number.attr.mode = S_IRUGO; 746 sfp->attr_unit_number.attr.mode = S_IRUGO;
747 sfp->attr_unit_number.show = unit_number_show; 747 sfp->attr_unit_number.show = unit_number_show;
748 sfp->attr_unit_number.store = 0; 748 sfp->attr_unit_number.store = NULL;
749 class_device_create_file(sfp->class_dev,&sfp->attr_unit_number); 749 class_device_create_file(sfp->class_dev,&sfp->attr_unit_number);
750 750
751 pvr2_sysfs_add_controls(sfp); 751 pvr2_sysfs_add_controls(sfp);
@@ -806,7 +806,7 @@ struct pvr2_sysfs_class *pvr2_sysfs_class_create(void)
806 pvr2_sysfs_trace( 806 pvr2_sysfs_trace(
807 "Registration failed for pvr2_sysfs_class id=%p",clp); 807 "Registration failed for pvr2_sysfs_class id=%p",clp);
808 kfree(clp); 808 kfree(clp);
809 clp = 0; 809 clp = NULL;
810 } 810 }
811 return clp; 811 return clp;
812} 812}
diff --git a/drivers/media/video/pvrusb2/pvrusb2-tuner.c b/drivers/media/video/pvrusb2/pvrusb2-tuner.c
index f4aba8144ce..af9f246f8d3 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-tuner.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-tuner.c
@@ -69,7 +69,7 @@ static void tuner_update(struct pvr2_tuner_handler *ctxt)
69 69
70static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt) 70static void pvr2_tuner_detach(struct pvr2_tuner_handler *ctxt)
71{ 71{
72 ctxt->client->handler = 0; 72 ctxt->client->handler = NULL;
73 kfree(ctxt); 73 kfree(ctxt);
74} 74}
75 75
diff --git a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 961951010c2..0caf70b8c0d 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -81,7 +81,7 @@ static int video_nr[PVR_NUM] = {[0 ... PVR_NUM-1] = -1};
81module_param_array(video_nr, int, NULL, 0444); 81module_param_array(video_nr, int, NULL, 0444);
82MODULE_PARM_DESC(video_nr, "Offset for device's minor"); 82MODULE_PARM_DESC(video_nr, "Offset for device's minor");
83 83
84struct v4l2_capability pvr_capability ={ 84static struct v4l2_capability pvr_capability ={
85 .driver = "pvrusb2", 85 .driver = "pvrusb2",
86 .card = "Hauppauge WinTV pvr-usb2", 86 .card = "Hauppauge WinTV pvr-usb2",
87 .bus_info = "usb", 87 .bus_info = "usb",
@@ -111,7 +111,7 @@ static struct v4l2_tuner pvr_v4l2_tuners[]= {
111 } 111 }
112}; 112};
113 113
114struct v4l2_fmtdesc pvr_fmtdesc [] = { 114static struct v4l2_fmtdesc pvr_fmtdesc [] = {
115 { 115 {
116 .index = 0, 116 .index = 0,
117 .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, 117 .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
@@ -127,7 +127,7 @@ struct v4l2_fmtdesc pvr_fmtdesc [] = {
127#define PVR_FORMAT_PIX 0 127#define PVR_FORMAT_PIX 0
128#define PVR_FORMAT_VBI 1 128#define PVR_FORMAT_VBI 1
129 129
130struct v4l2_format pvr_format [] = { 130static struct v4l2_format pvr_format [] = {
131 [PVR_FORMAT_PIX] = { 131 [PVR_FORMAT_PIX] = {
132 .type = V4L2_BUF_TYPE_VIDEO_CAPTURE, 132 .type = V4L2_BUF_TYPE_VIDEO_CAPTURE,
133 .fmt = { 133 .fmt = {
@@ -701,9 +701,8 @@ static int pvr2_v4l2_do_ioctl(struct inode *inode, struct file *file,
701 701
702static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip) 702static void pvr2_v4l2_dev_destroy(struct pvr2_v4l2_dev *dip)
703{ 703{
704 pvr2_trace(PVR2_TRACE_INIT, 704 printk(KERN_INFO "pvrusb2: unregistering device video%d [%s]\n",
705 "unregistering device video%d [%s]", 705 dip->vdev->minor,pvr2_config_get_name(dip->config));
706 dip->vdev->minor,pvr2_config_get_name(dip->config));
707 if (dip->ctxt_idx >= 0) { 706 if (dip->ctxt_idx >= 0) {
708 mutex_lock(&device_lock); 707 mutex_lock(&device_lock);
709 devices[dip->ctxt_idx] = NULL; 708 devices[dip->ctxt_idx] = NULL;
@@ -725,7 +724,7 @@ static void pvr2_v4l2_destroy_no_lock(struct pvr2_v4l2 *vp)
725} 724}
726 725
727 726
728void pvr2_v4l2_internal_check(struct pvr2_channel *chp) 727static void pvr2_v4l2_internal_check(struct pvr2_channel *chp)
729{ 728{
730 struct pvr2_v4l2 *vp; 729 struct pvr2_v4l2 *vp;
731 vp = container_of(chp,struct pvr2_v4l2,channel); 730 vp = container_of(chp,struct pvr2_v4l2,channel);
@@ -735,8 +734,8 @@ void pvr2_v4l2_internal_check(struct pvr2_channel *chp)
735} 734}
736 735
737 736
738int pvr2_v4l2_ioctl(struct inode *inode, struct file *file, 737static int pvr2_v4l2_ioctl(struct inode *inode, struct file *file,
739 unsigned int cmd, unsigned long arg) 738 unsigned int cmd, unsigned long arg)
740{ 739{
741 740
742/* Temporary hack : use ivtv api until a v4l2 one is available. */ 741/* Temporary hack : use ivtv api until a v4l2 one is available. */
@@ -747,7 +746,7 @@ int pvr2_v4l2_ioctl(struct inode *inode, struct file *file,
747} 746}
748 747
749 748
750int pvr2_v4l2_release(struct inode *inode, struct file *file) 749static int pvr2_v4l2_release(struct inode *inode, struct file *file)
751{ 750{
752 struct pvr2_v4l2_fh *fhp = file->private_data; 751 struct pvr2_v4l2_fh *fhp = file->private_data;
753 struct pvr2_v4l2 *vp = fhp->vhead; 752 struct pvr2_v4l2 *vp = fhp->vhead;
@@ -761,9 +760,9 @@ int pvr2_v4l2_release(struct inode *inode, struct file *file)
761 hdw = fhp->channel.mc_head->hdw; 760 hdw = fhp->channel.mc_head->hdw;
762 pvr2_hdw_set_streaming(hdw,0); 761 pvr2_hdw_set_streaming(hdw,0);
763 sp = pvr2_ioread_get_stream(fhp->rhp); 762 sp = pvr2_ioread_get_stream(fhp->rhp);
764 if (sp) pvr2_stream_set_callback(sp,0,0); 763 if (sp) pvr2_stream_set_callback(sp,NULL,NULL);
765 pvr2_ioread_destroy(fhp->rhp); 764 pvr2_ioread_destroy(fhp->rhp);
766 fhp->rhp = 0; 765 fhp->rhp = NULL;
767 } 766 }
768 v4l2_prio_close(&vp->prio, &fhp->prio); 767 v4l2_prio_close(&vp->prio, &fhp->prio);
769 file->private_data = NULL; 768 file->private_data = NULL;
@@ -779,9 +778,9 @@ int pvr2_v4l2_release(struct inode *inode, struct file *file)
779 } else { 778 } else {
780 vp->vfirst = fhp->vnext; 779 vp->vfirst = fhp->vnext;
781 } 780 }
782 fhp->vnext = 0; 781 fhp->vnext = NULL;
783 fhp->vprev = 0; 782 fhp->vprev = NULL;
784 fhp->vhead = 0; 783 fhp->vhead = NULL;
785 pvr2_channel_done(&fhp->channel); 784 pvr2_channel_done(&fhp->channel);
786 pvr2_trace(PVR2_TRACE_STRUCT, 785 pvr2_trace(PVR2_TRACE_STRUCT,
787 "Destroying pvr_v4l2_fh id=%p",fhp); 786 "Destroying pvr_v4l2_fh id=%p",fhp);
@@ -794,9 +793,9 @@ int pvr2_v4l2_release(struct inode *inode, struct file *file)
794} 793}
795 794
796 795
797int pvr2_v4l2_open(struct inode *inode, struct file *file) 796static int pvr2_v4l2_open(struct inode *inode, struct file *file)
798{ 797{
799 struct pvr2_v4l2_dev *dip = 0; /* Our own context pointer */ 798 struct pvr2_v4l2_dev *dip = NULL; /* Our own context pointer */
800 struct pvr2_v4l2_fh *fhp; 799 struct pvr2_v4l2_fh *fhp;
801 struct pvr2_v4l2 *vp; 800 struct pvr2_v4l2 *vp;
802 struct pvr2_hdw *hdw; 801 struct pvr2_hdw *hdw;
@@ -854,7 +853,7 @@ int pvr2_v4l2_open(struct inode *inode, struct file *file)
854 pvr2_context_enter(vp->channel.mc_head); do { 853 pvr2_context_enter(vp->channel.mc_head); do {
855 pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp); 854 pvr2_trace(PVR2_TRACE_STRUCT,"Creating pvr_v4l2_fh id=%p",fhp);
856 pvr2_channel_init(&fhp->channel,vp->channel.mc_head); 855 pvr2_channel_init(&fhp->channel,vp->channel.mc_head);
857 fhp->vnext = 0; 856 fhp->vnext = NULL;
858 fhp->vprev = vp->vlast; 857 fhp->vprev = vp->vlast;
859 if (vp->vlast) { 858 if (vp->vlast) {
860 vp->vlast->vnext = fhp; 859 vp->vlast->vnext = fhp;
@@ -897,7 +896,7 @@ static int pvr2_v4l2_iosetup(struct pvr2_v4l2_fh *fh)
897 896
898 fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream); 897 fh->rhp = pvr2_channel_create_mpeg_stream(fh->dev_info->stream);
899 if (!fh->rhp) { 898 if (!fh->rhp) {
900 pvr2_channel_claim_stream(&fh->channel,0); 899 pvr2_channel_claim_stream(&fh->channel,NULL);
901 return -ENOMEM; 900 return -ENOMEM;
902 } 901 }
903 902
@@ -1078,9 +1077,8 @@ static void pvr2_v4l2_dev_init(struct pvr2_v4l2_dev *dip,
1078 (video_register_device(dip->vdev, v4l_type, -1) < 0)) { 1077 (video_register_device(dip->vdev, v4l_type, -1) < 0)) {
1079 err("Failed to register pvrusb2 v4l video device"); 1078 err("Failed to register pvrusb2 v4l video device");
1080 } else { 1079 } else {
1081 pvr2_trace(PVR2_TRACE_INIT, 1080 printk(KERN_INFO "pvrusb2: registered device video%d [%s]\n",
1082 "registered device video%d [%s]", 1081 dip->vdev->minor,pvr2_config_get_name(dip->config));
1083 dip->vdev->minor,pvr2_config_get_name(dip->config));
1084 } 1082 }
1085 1083
1086 if ((dip->vdev->minor < sizeof(devices)/sizeof(devices[0])) && 1084 if ((dip->vdev->minor < sizeof(devices)/sizeof(devices[0])) &&
diff --git a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
index e4ec7f25194..05f2cddeb47 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
@@ -126,8 +126,8 @@ static const struct pvr2_v4l_decoder_ops decoder_ops[] = {
126 126
127static void decoder_detach(struct pvr2_v4l_decoder *ctxt) 127static void decoder_detach(struct pvr2_v4l_decoder *ctxt)
128{ 128{
129 ctxt->client->handler = 0; 129 ctxt->client->handler = NULL;
130 ctxt->hdw->decoder_ctrl = 0; 130 ctxt->hdw->decoder_ctrl = NULL;
131 kfree(ctxt); 131 kfree(ctxt);
132} 132}
133 133
diff --git a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
index fcad346e395..2413e5198e1 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
@@ -89,7 +89,7 @@ static unsigned int wm8775_describe(struct pvr2_v4l_wm8775 *ctxt,
89 89
90static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt) 90static void wm8775_detach(struct pvr2_v4l_wm8775 *ctxt)
91{ 91{
92 ctxt->client->handler = 0; 92 ctxt->client->handler = NULL;
93 kfree(ctxt); 93 kfree(ctxt);
94} 94}
95 95
diff --git a/drivers/media/video/pwc/pwc-uncompress.h b/drivers/media/video/pwc/pwc-uncompress.h
index 041227f6524..43028e74e9e 100644
--- a/drivers/media/video/pwc/pwc-uncompress.h
+++ b/drivers/media/video/pwc/pwc-uncompress.h
@@ -30,7 +30,6 @@
30#ifndef PWC_UNCOMPRESS_H 30#ifndef PWC_UNCOMPRESS_H
31#define PWC_UNCOMPRESS_H 31#define PWC_UNCOMPRESS_H
32 32
33#include <linux/config.h>
34 33
35#include <media/pwc-ioctl.h> 34#include <media/pwc-ioctl.h>
36 35
diff --git a/drivers/media/video/pwc/pwc.h b/drivers/media/video/pwc/pwc.h
index 629f79e44fb..7e9c4237d1e 100644
--- a/drivers/media/video/pwc/pwc.h
+++ b/drivers/media/video/pwc/pwc.h
@@ -25,7 +25,6 @@
25#ifndef PWC_H 25#ifndef PWC_H
26#define PWC_H 26#define PWC_H
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/usb.h> 29#include <linux/usb.h>
31#include <linux/spinlock.h> 30#include <linux/spinlock.h>
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index d77e6a8d943..f1fd69e7f11 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -929,7 +929,7 @@ static int alsa_card_saa7134_create(struct saa7134_dev *dev, int devnum)
929 929
930 930
931 err = request_irq(dev->pci->irq, saa7134_alsa_irq, 931 err = request_irq(dev->pci->irq, saa7134_alsa_irq,
932 SA_SHIRQ | SA_INTERRUPT, dev->name, 932 IRQF_SHARED | IRQF_DISABLED, dev->name,
933 (void*) &dev->dmasound); 933 (void*) &dev->dmasound);
934 934
935 if (err < 0) { 935 if (err < 0) {
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index da3007d2f41..6e97cc84ba8 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -20,7 +20,6 @@
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/init.h> 23#include <linux/init.h>
25#include <linux/list.h> 24#include <linux/list.h>
26#include <linux/module.h> 25#include <linux/module.h>
@@ -924,7 +923,7 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
924 923
925 /* get irq */ 924 /* get irq */
926 err = request_irq(pci_dev->irq, saa7134_irq, 925 err = request_irq(pci_dev->irq, saa7134_irq,
927 SA_SHIRQ | SA_INTERRUPT, dev->name, dev); 926 IRQF_SHARED | IRQF_DISABLED, dev->name, dev);
928 if (err < 0) { 927 if (err < 0) {
929 printk(KERN_ERR "%s: can't get IRQ %d\n", 928 printk(KERN_ERR "%s: can't get IRQ %d\n",
930 dev->name,pci_dev->irq); 929 dev->name,pci_dev->irq);
@@ -942,8 +941,6 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
942 /* load i2c helpers */ 941 /* load i2c helpers */
943 if (TUNER_ABSENT != dev->tuner_type) 942 if (TUNER_ABSENT != dev->tuner_type)
944 request_module("tuner"); 943 request_module("tuner");
945 if (dev->tda9887_conf)
946 request_module("tda9887");
947 if (card_is_empress(dev)) { 944 if (card_is_empress(dev)) {
948 request_module("saa6752hs"); 945 request_module("saa6752hs");
949 request_module_depend("saa7134-empress",&need_empress); 946 request_module_depend("saa7134-empress",&need_empress);
diff --git a/drivers/media/video/saa7134/saa7134-oss.c b/drivers/media/video/saa7134/saa7134-oss.c
index 7aa02b34e01..3895d05804a 100644
--- a/drivers/media/video/saa7134/saa7134-oss.c
+++ b/drivers/media/video/saa7134/saa7134-oss.c
@@ -845,7 +845,7 @@ int saa7134_oss_init1(struct saa7134_dev *dev)
845{ 845{
846 846
847 if ((request_irq(dev->pci->irq, saa7134_oss_irq, 847 if ((request_irq(dev->pci->irq, saa7134_oss_irq,
848 SA_SHIRQ | SA_INTERRUPT, dev->name, 848 IRQF_SHARED | IRQF_DISABLED, dev->name,
849 (void*) &dev->dmasound)) < 0) 849 (void*) &dev->dmasound)) < 0)
850 return -1; 850 return -1;
851 851
diff --git a/drivers/media/video/se401.c b/drivers/media/video/se401.c
index a846ebc78cd..67987baee77 100644
--- a/drivers/media/video/se401.c
+++ b/drivers/media/video/se401.c
@@ -27,7 +27,6 @@
27 27
28static const char version[] = "0.24"; 28static const char version[] = "0.24";
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/init.h> 31#include <linux/init.h>
33#include <linux/vmalloc.h> 32#include <linux/vmalloc.h>
diff --git a/drivers/media/video/stradis.c b/drivers/media/video/stradis.c
index c18b31d9928..b36ba9fa3a2 100644
--- a/drivers/media/video/stradis.c
+++ b/drivers/media/video/stradis.c
@@ -1983,7 +1983,7 @@ static int __devinit configure_saa7146(struct pci_dev *pdev, int num)
1983 memcpy(&saa->video_dev, &saa_template, sizeof(saa_template)); 1983 memcpy(&saa->video_dev, &saa_template, sizeof(saa_template));
1984 saawrite(0, SAA7146_IER); /* turn off all interrupts */ 1984 saawrite(0, SAA7146_IER); /* turn off all interrupts */
1985 1985
1986 retval = request_irq(saa->irq, saa7146_irq, SA_SHIRQ | SA_INTERRUPT, 1986 retval = request_irq(saa->irq, saa7146_irq, IRQF_SHARED | IRQF_DISABLED,
1987 "stradis", saa); 1987 "stradis", saa);
1988 if (retval == -EINVAL) 1988 if (retval == -EINVAL)
1989 dev_err(&pdev->dev, "%d: Bad irq number or handler\n", num); 1989 dev_err(&pdev->dev, "%d: Bad irq number or handler\n", num);
diff --git a/drivers/media/video/stv680.c b/drivers/media/video/stv680.c
index 351b182d921..2ba2991a214 100644
--- a/drivers/media/video/stv680.c
+++ b/drivers/media/video/stv680.c
@@ -58,7 +58,6 @@
58 * Fixed proc entry removal bug. 58 * Fixed proc entry removal bug.
59 */ 59 */
60 60
61#include <linux/config.h>
62#include <linux/module.h> 61#include <linux/module.h>
63#include <linux/init.h> 62#include <linux/init.h>
64#include <linux/vmalloc.h> 63#include <linux/vmalloc.h>
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c
index 2fadabf9968..8dab481d384 100644
--- a/drivers/media/video/tda9887.c
+++ b/drivers/media/video/tda9887.c
@@ -590,8 +590,8 @@ int tda9887_tuner_init(struct i2c_client *c)
590 t->set_tv_freq = tda9887_set_freq; 590 t->set_tv_freq = tda9887_set_freq;
591 t->set_radio_freq = tda9887_set_freq; 591 t->set_radio_freq = tda9887_set_freq;
592 t->standby = tda9887_standby; 592 t->standby = tda9887_standby;
593 t->tuner_status=tda9887_tuner_status; 593 t->tuner_status = tda9887_tuner_status;
594 t->get_afc=tda9887_get_afc; 594 t->get_afc = tda9887_get_afc;
595 595
596 return 0; 596 return 0;
597} 597}
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 011413cf34a..f7eb402d5f2 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -416,7 +416,7 @@ static void tuner_status(struct i2c_client *client)
416 416
417/* ---------------------------------------------------------------------- */ 417/* ---------------------------------------------------------------------- */
418 418
419/* static var Used only in tuner_attach and tuner_probe */ 419/* static vars: used only in tuner_attach and tuner_probe */
420static unsigned default_mode_mask; 420static unsigned default_mode_mask;
421 421
422/* During client attach, set_type is called by adapter's attach_inform callback. 422/* During client attach, set_type is called by adapter's attach_inform callback.
@@ -608,13 +608,13 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
608 tuner_dbg("VIDIOCSAUDIO not implemented.\n"); 608 tuner_dbg("VIDIOCSAUDIO not implemented.\n");
609 break; 609 break;
610 case TDA9887_SET_CONFIG: 610 case TDA9887_SET_CONFIG:
611 { 611 if (t->type == TUNER_TDA9887) {
612 int *i = arg; 612 int *i = arg;
613 613
614 t->tda9887_config = *i; 614 t->tda9887_config = *i;
615 set_freq(client, t->tv_freq); 615 set_freq(client, t->tv_freq);
616 }
616 break; 617 break;
617 }
618 /* --- v4l ioctls --- */ 618 /* --- v4l ioctls --- */
619 /* take care: bttv does userspace copying, we'll get a 619 /* take care: bttv does userspace copying, we'll get a
620 kernel pointer here... */ 620 kernel pointer here... */
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index 6da6f82b8c8..d071c5cbf01 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -7,6 +7,7 @@
7#include <linux/i2c.h> 7#include <linux/i2c.h>
8#include <linux/videodev.h> 8#include <linux/videodev.h>
9#include <media/tuner.h> 9#include <media/tuner.h>
10#include <media/v4l2-common.h>
10 11
11static int offset = 0; 12static int offset = 0;
12module_param(offset, int, 0666); 13module_param(offset, int, 0666);
@@ -128,6 +129,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
128 u8 buffer[4]; 129 u8 buffer[4];
129 int rc, IFPCoff, i, j; 130 int rc, IFPCoff, i, j;
130 enum param_type desired_type; 131 enum param_type desired_type;
132 struct tuner_params *params;
131 133
132 tun = &tuners[t->type]; 134 tun = &tuners[t->type];
133 135
@@ -169,19 +171,20 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
169 IFPCoff,t->type); 171 IFPCoff,t->type);
170 j = 0; 172 j = 0;
171 } 173 }
174 params = &tun->params[j];
172 175
173 for (i = 0; i < tun->params[j].count; i++) { 176 for (i = 0; i < params->count; i++) {
174 if (freq > tun->params[j].ranges[i].limit) 177 if (freq > params->ranges[i].limit)
175 continue; 178 continue;
176 break; 179 break;
177 } 180 }
178 if (i == tun->params[j].count) { 181 if (i == params->count) {
179 tuner_dbg("TV frequency out of range (%d > %d)", 182 tuner_dbg("TV frequency out of range (%d > %d)",
180 freq, tun->params[j].ranges[i - 1].limit); 183 freq, params->ranges[i - 1].limit);
181 freq = tun->params[j].ranges[--i].limit; 184 freq = params->ranges[--i].limit;
182 } 185 }
183 config = tun->params[j].ranges[i].config; 186 config = params->ranges[i].config;
184 cb = tun->params[j].ranges[i].cb; 187 cb = params->ranges[i].cb;
185 /* i == 0 -> VHF_LO 188 /* i == 0 -> VHF_LO
186 * i == 1 -> VHF_HI 189 * i == 1 -> VHF_HI
187 * i == 2 -> UHF */ 190 * i == 2 -> UHF */
@@ -281,7 +284,7 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
281 break; 284 break;
282 } 285 }
283 286
284 if (tuners[t->type].params->cb_first_if_lower_freq && div < t->last_div) { 287 if (params->cb_first_if_lower_freq && div < t->last_div) {
285 buffer[0] = config; 288 buffer[0] = config;
286 buffer[1] = cb; 289 buffer[1] = cb;
287 buffer[2] = (div>>8) & 0x7f; 290 buffer[2] = (div>>8) & 0x7f;
@@ -293,6 +296,43 @@ static void default_set_tv_freq(struct i2c_client *c, unsigned int freq)
293 buffer[3] = cb; 296 buffer[3] = cb;
294 } 297 }
295 t->last_div = div; 298 t->last_div = div;
299 if (params->has_tda9887) {
300 int config = 0;
301 int is_secam_l = (t->std & (V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC)) &&
302 !(t->std & ~(V4L2_STD_SECAM_L | V4L2_STD_SECAM_LC));
303
304 if (t->std == V4L2_STD_SECAM_LC) {
305 if (params->port1_active ^ params->port1_invert_for_secam_lc)
306 config |= TDA9887_PORT1_ACTIVE;
307 if (params->port2_active ^ params->port2_invert_for_secam_lc)
308 config |= TDA9887_PORT2_ACTIVE;
309 }
310 else {
311 if (params->port1_active)
312 config |= TDA9887_PORT1_ACTIVE;
313 if (params->port2_active)
314 config |= TDA9887_PORT2_ACTIVE;
315 }
316 if (params->intercarrier_mode)
317 config |= TDA9887_INTERCARRIER;
318 if (is_secam_l) {
319 if (i == 0 && params->default_top_secam_low)
320 config |= TDA9887_TOP(params->default_top_secam_low);
321 else if (i == 1 && params->default_top_secam_mid)
322 config |= TDA9887_TOP(params->default_top_secam_mid);
323 else if (params->default_top_secam_high)
324 config |= TDA9887_TOP(params->default_top_secam_high);
325 }
326 else {
327 if (i == 0 && params->default_top_low)
328 config |= TDA9887_TOP(params->default_top_low);
329 else if (i == 1 && params->default_top_mid)
330 config |= TDA9887_TOP(params->default_top_mid);
331 else if (params->default_top_high)
332 config |= TDA9887_TOP(params->default_top_high);
333 }
334 i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config);
335 }
296 tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n", 336 tuner_dbg("tv 0x%02x 0x%02x 0x%02x 0x%02x\n",
297 buffer[0],buffer[1],buffer[2],buffer[3]); 337 buffer[0],buffer[1],buffer[2],buffer[3]);
298 338
@@ -339,6 +379,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
339 u16 div; 379 u16 div;
340 int rc, j; 380 int rc, j;
341 enum param_type desired_type = TUNER_PARAM_TYPE_RADIO; 381 enum param_type desired_type = TUNER_PARAM_TYPE_RADIO;
382 struct tuner_params *params;
342 383
343 tun = &tuners[t->type]; 384 tun = &tuners[t->type];
344 385
@@ -352,7 +393,8 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
352 j = 0; 393 j = 0;
353 394
354 div = (20 * freq / 16000) + (int)(20*10.7); /* IF 10.7 MHz */ 395 div = (20 * freq / 16000) + (int)(20*10.7); /* IF 10.7 MHz */
355 buffer[2] = (tun->params[j].ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */ 396 params = &tun->params[j];
397 buffer[2] = (params->ranges[0].config & ~TUNER_RATIO_MASK) | TUNER_RATIO_SELECT_50; /* 50 kHz step */
356 398
357 switch (t->type) { 399 switch (t->type) {
358 case TUNER_TENA_9533_DI: 400 case TUNER_TENA_9533_DI:
@@ -384,7 +426,7 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
384 } 426 }
385 buffer[0] = (div>>8) & 0x7f; 427 buffer[0] = (div>>8) & 0x7f;
386 buffer[1] = div & 0xff; 428 buffer[1] = div & 0xff;
387 if (tuners[t->type].params->cb_first_if_lower_freq && div < t->last_div) { 429 if (params->cb_first_if_lower_freq && div < t->last_div) {
388 buffer[0] = buffer[2]; 430 buffer[0] = buffer[2];
389 buffer[1] = buffer[3]; 431 buffer[1] = buffer[3];
390 buffer[2] = (div>>8) & 0x7f; 432 buffer[2] = (div>>8) & 0x7f;
@@ -398,6 +440,18 @@ static void default_set_radio_freq(struct i2c_client *c, unsigned int freq)
398 buffer[0],buffer[1],buffer[2],buffer[3]); 440 buffer[0],buffer[1],buffer[2],buffer[3]);
399 t->last_div = div; 441 t->last_div = div;
400 442
443 if (params->has_tda9887) {
444 int config = 0;
445 if (params->port1_active && !params->port1_fm_high_sensitivity)
446 config |= TDA9887_PORT1_ACTIVE;
447 if (params->port2_active && !params->port2_fm_high_sensitivity)
448 config |= TDA9887_PORT2_ACTIVE;
449 if (params->intercarrier_mode)
450 config |= TDA9887_INTERCARRIER;
451/* if (params->port1_set_for_fm_mono)
452 config &= ~TDA9887_PORT1_ACTIVE;*/
453 i2c_clients_command(c->adapter, TDA9887_SET_CONFIG, &config);
454 }
401 if (4 != (rc = i2c_master_send(c,buffer,4))) 455 if (4 != (rc = i2c_master_send(c,buffer,4)))
402 tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc); 456 tuner_warn("i2c i/o error: rc == %d (should be 4)\n",rc);
403} 457}
diff --git a/drivers/media/video/tuner-types.c b/drivers/media/video/tuner-types.c
index 9d9226cb639..a167e17c6dc 100644
--- a/drivers/media/video/tuner-types.c
+++ b/drivers/media/video/tuner-types.c
@@ -380,6 +380,10 @@ static struct tuner_params tuner_philips_fq1216me_params[] = {
380 .type = TUNER_PARAM_TYPE_PAL, 380 .type = TUNER_PARAM_TYPE_PAL,
381 .ranges = tuner_lg_pal_ranges, 381 .ranges = tuner_lg_pal_ranges,
382 .count = ARRAY_SIZE(tuner_lg_pal_ranges), 382 .count = ARRAY_SIZE(tuner_lg_pal_ranges),
383 .has_tda9887 = 1,
384 .port1_active = 1,
385 .port2_active = 1,
386 .port2_invert_for_secam_lc = 1,
383 }, 387 },
384}; 388};
385 389
@@ -542,6 +546,14 @@ static struct tuner_params tuner_fm1216me_mk3_params[] = {
542 .ranges = tuner_fm1216me_mk3_pal_ranges, 546 .ranges = tuner_fm1216me_mk3_pal_ranges,
543 .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges), 547 .count = ARRAY_SIZE(tuner_fm1216me_mk3_pal_ranges),
544 .cb_first_if_lower_freq = 1, 548 .cb_first_if_lower_freq = 1,
549 .has_tda9887 = 1,
550 .port1_active = 1,
551 .port2_active = 1,
552 .port2_invert_for_secam_lc = 1,
553 .port1_fm_high_sensitivity = 1,
554 .default_top_mid = -2,
555 .default_top_secam_mid = -2,
556 .default_top_secam_high = -2,
545 }, 557 },
546}; 558};
547 559
@@ -612,6 +624,10 @@ static struct tuner_params tuner_fm1236_mk3_params[] = {
612 .ranges = tuner_fm1236_mk3_ntsc_ranges, 624 .ranges = tuner_fm1236_mk3_ntsc_ranges,
613 .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges), 625 .count = ARRAY_SIZE(tuner_fm1236_mk3_ntsc_ranges),
614 .cb_first_if_lower_freq = 1, 626 .cb_first_if_lower_freq = 1,
627 .has_tda9887 = 1,
628 .port1_active = 1,
629 .port2_active = 1,
630 .port1_fm_high_sensitivity = 1,
615 }, 631 },
616}; 632};
617 633
@@ -632,6 +648,8 @@ static struct tuner_params tuner_microtune_4049_fm5_params[] = {
632 .type = TUNER_PARAM_TYPE_PAL, 648 .type = TUNER_PARAM_TYPE_PAL,
633 .ranges = tuner_temic_4009f_5_pal_ranges, 649 .ranges = tuner_temic_4009f_5_pal_ranges,
634 .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges), 650 .count = ARRAY_SIZE(tuner_temic_4009f_5_pal_ranges),
651 .has_tda9887 = 1,
652 .port1_invert_for_secam_lc = 1,
635 }, 653 },
636}; 654};
637 655
@@ -648,6 +666,8 @@ static struct tuner_params tuner_panasonic_vp27_params[] = {
648 .type = TUNER_PARAM_TYPE_NTSC, 666 .type = TUNER_PARAM_TYPE_NTSC,
649 .ranges = tuner_panasonic_vp27_ntsc_ranges, 667 .ranges = tuner_panasonic_vp27_ntsc_ranges,
650 .count = ARRAY_SIZE(tuner_panasonic_vp27_ntsc_ranges), 668 .count = ARRAY_SIZE(tuner_panasonic_vp27_ntsc_ranges),
669 .has_tda9887 = 1,
670 .intercarrier_mode = 1,
651 }, 671 },
652}; 672};
653 673
@@ -782,6 +802,13 @@ static struct tuner_params tuner_philips_fq1216ame_mk4_params[] = {
782 .type = TUNER_PARAM_TYPE_PAL, 802 .type = TUNER_PARAM_TYPE_PAL,
783 .ranges = tuner_philips_fq12_6a___mk4_pal_ranges, 803 .ranges = tuner_philips_fq12_6a___mk4_pal_ranges,
784 .count = ARRAY_SIZE(tuner_philips_fq12_6a___mk4_pal_ranges), 804 .count = ARRAY_SIZE(tuner_philips_fq12_6a___mk4_pal_ranges),
805 .has_tda9887 = 1,
806 .port1_active = 1,
807 .port2_invert_for_secam_lc = 1,
808 .default_top_mid = -2,
809 .default_top_secam_low = -2,
810 .default_top_secam_mid = -2,
811 .default_top_secam_high = -2,
785 }, 812 },
786}; 813};
787 814
@@ -870,6 +897,12 @@ static struct tuner_params tuner_philips_fmd1216me_mk3_params[] = {
870 .type = TUNER_PARAM_TYPE_PAL, 897 .type = TUNER_PARAM_TYPE_PAL,
871 .ranges = tuner_philips_fmd1216me_mk3_pal_ranges, 898 .ranges = tuner_philips_fmd1216me_mk3_pal_ranges,
872 .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges), 899 .count = ARRAY_SIZE(tuner_philips_fmd1216me_mk3_pal_ranges),
900 .has_tda9887 = 1,
901 .port1_active = 1,
902 .port2_active = 1,
903 .port2_fm_high_sensitivity = 1,
904 .port2_invert_for_secam_lc = 1,
905 .port1_set_for_fm_mono = 1,
873 }, 906 },
874}; 907};
875 908
@@ -1005,6 +1038,7 @@ static struct tuner_params tuner_samsung_tcpn_2121p30a_params[] = {
1005 .type = TUNER_PARAM_TYPE_NTSC, 1038 .type = TUNER_PARAM_TYPE_NTSC,
1006 .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges, 1039 .ranges = tuner_samsung_tcpn_2121p30a_ntsc_ranges,
1007 .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges), 1040 .count = ARRAY_SIZE(tuner_samsung_tcpn_2121p30a_ntsc_ranges),
1041 .has_tda9887 = 1,
1008 }, 1042 },
1009}; 1043};
1010 1044
@@ -1037,6 +1071,10 @@ static struct tuner_params tuner_samsung_tcpg_6121p30a_params[] = {
1037 .type = TUNER_PARAM_TYPE_PAL, 1071 .type = TUNER_PARAM_TYPE_PAL,
1038 .ranges = tuner_samsung_tcpg_6121p30a_pal_ranges, 1072 .ranges = tuner_samsung_tcpg_6121p30a_pal_ranges,
1039 .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_pal_ranges), 1073 .count = ARRAY_SIZE(tuner_samsung_tcpg_6121p30a_pal_ranges),
1074 .has_tda9887 = 1,
1075 .port1_active = 1,
1076 .port2_active = 1,
1077 .port2_invert_for_secam_lc = 1,
1040 }, 1078 },
1041}; 1079};
1042 1080
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index c2b75610754..936e3f746fb 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -14,7 +14,6 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/moduleparam.h> 18#include <linux/moduleparam.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c
index 30f8d80ddca..d95529e8e51 100644
--- a/drivers/media/video/tveeprom.c
+++ b/drivers/media/video/tveeprom.c
@@ -73,14 +73,14 @@ static struct HAUPPAUGE_TUNER_FMT
73} 73}
74hauppauge_tuner_fmt[] = 74hauppauge_tuner_fmt[] =
75{ 75{
76 { V4L2_STD_UNKNOWN," UNKNOWN" }, 76 { V4L2_STD_UNKNOWN, " UNKNOWN" },
77 { V4L2_STD_UNKNOWN," FM" }, 77 { V4L2_STD_UNKNOWN, " FM" },
78 { V4L2_STD_PAL_BG, " PAL(B/G)" }, 78 { V4L2_STD_B|V4L2_STD_GH, " PAL(B/G)" },
79 { V4L2_STD_NTSC_M, " NTSC(M)" }, 79 { V4L2_STD_MN, " NTSC(M)" },
80 { V4L2_STD_PAL_I, " PAL(I)" }, 80 { V4L2_STD_PAL_I, " PAL(I)" },
81 { V4L2_STD_SECAM_L," SECAM(L/L')" }, 81 { V4L2_STD_SECAM_L|V4L2_STD_SECAM_LC, " SECAM(L/L')" },
82 { V4L2_STD_PAL_DK, " PAL(D/D1/K)" }, 82 { V4L2_STD_DK, " PAL(D/D1/K)" },
83 { V4L2_STD_ATSC, " ATSC/DVB Digital" }, 83 { V4L2_STD_ATSC, " ATSC/DVB Digital" },
84}; 84};
85 85
86/* This is the full list of possible tuners. Many thanks to Hauppauge for 86/* This is the full list of possible tuners. Many thanks to Hauppauge for
@@ -219,7 +219,7 @@ hauppauge_tuner[] =
219 { TUNER_ABSENT, "Thompson DTT75105"}, 219 { TUNER_ABSENT, "Thompson DTT75105"},
220 { TUNER_ABSENT, "Conexant_CX24109"}, 220 { TUNER_ABSENT, "Conexant_CX24109"},
221 { TUNER_TCL_2002N, "TCL M2523_5N_E"}, 221 { TUNER_TCL_2002N, "TCL M2523_5N_E"},
222 { TUNER_ABSENT, "TCL M2523_3DB_E"}, 222 { TUNER_TCL_2002MB, "TCL M2523_3DB_E"},
223 { TUNER_ABSENT, "Philips 8275A"}, 223 { TUNER_ABSENT, "Philips 8275A"},
224 { TUNER_ABSENT, "Microtune MT2060"}, 224 { TUNER_ABSENT, "Microtune MT2060"},
225 { TUNER_ABSENT, "Philips FM1236 MK5"}, 225 { TUNER_ABSENT, "Philips FM1236 MK5"},
diff --git a/drivers/media/video/usbvideo/usbvideo.h b/drivers/media/video/usbvideo/usbvideo.h
index 49dbee5f562..051775d4c72 100644
--- a/drivers/media/video/usbvideo/usbvideo.h
+++ b/drivers/media/video/usbvideo/usbvideo.h
@@ -16,7 +16,6 @@
16#ifndef usbvideo_h 16#ifndef usbvideo_h
17#define usbvideo_h 17#define usbvideo_h
18 18
19#include <linux/config.h>
20#include <linux/videodev.h> 19#include <linux/videodev.h>
21#include <media/v4l2-common.h> 20#include <media/v4l2-common.h>
22#include <linux/usb.h> 21#include <linux/usb.h>
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c
index 19d3c20dc7e..d83a2c84d23 100644
--- a/drivers/media/video/v4l1-compat.c
+++ b/drivers/media/video/v4l1-compat.c
@@ -16,7 +16,6 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/config.h>
20 19
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/module.h> 21#include <linux/module.h>
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index 97f946db859..f06dc19e504 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -44,7 +44,6 @@
44 * Added Gerd Knorrs v4l1 enhancements (Justin Schoeman) 44 * Added Gerd Knorrs v4l1 enhancements (Justin Schoeman)
45 */ 45 */
46 46
47#include <linux/config.h>
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/types.h> 48#include <linux/types.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
diff --git a/drivers/media/video/videocodec.c b/drivers/media/video/videocodec.c
index 8f271de57fd..2ae3fb25063 100644
--- a/drivers/media/video/videocodec.c
+++ b/drivers/media/video/videocodec.c
@@ -36,7 +36,6 @@
36#include <linux/slab.h> 36#include <linux/slab.h>
37 37
38// kernel config is here (procfs flag) 38// kernel config is here (procfs flag)
39#include <linux/config.h>
40 39
41#ifdef CONFIG_PROC_FS 40#ifdef CONFIG_PROC_FS
42#include <linux/proc_fs.h> 41#include <linux/proc_fs.h>
diff --git a/drivers/media/video/videocodec.h b/drivers/media/video/videocodec.h
index 8c233720b6a..97a3bbeda50 100644
--- a/drivers/media/video/videocodec.h
+++ b/drivers/media/video/videocodec.h
@@ -222,14 +222,14 @@ M zr36055[1] 0001 0000c001 00000000 (zr36050[1])
222/* ========================= */ 222/* ========================= */
223 223
224struct vfe_polarity { 224struct vfe_polarity {
225 int vsync_pol:1; 225 unsigned int vsync_pol:1;
226 int hsync_pol:1; 226 unsigned int hsync_pol:1;
227 int field_pol:1; 227 unsigned int field_pol:1;
228 int blank_pol:1; 228 unsigned int blank_pol:1;
229 int subimg_pol:1; 229 unsigned int subimg_pol:1;
230 int poe_pol:1; 230 unsigned int poe_pol:1;
231 int pvalid_pol:1; 231 unsigned int pvalid_pol:1;
232 int vclk_pol:1; 232 unsigned int vclk_pol:1;
233}; 233};
234 234
235struct vfe_settings { 235struct vfe_settings {
diff --git a/drivers/media/video/w9968cf.h b/drivers/media/video/w9968cf.h
index 2836b45ec20..ec7696e8f1f 100644
--- a/drivers/media/video/w9968cf.h
+++ b/drivers/media/video/w9968cf.h
@@ -28,7 +28,6 @@
28#include <linux/spinlock.h> 28#include <linux/spinlock.h>
29#include <linux/list.h> 29#include <linux/list.h>
30#include <linux/wait.h> 30#include <linux/wait.h>
31#include <linux/config.h>
32#include <linux/param.h> 31#include <linux/param.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/rwsem.h> 33#include <linux/rwsem.h>
diff --git a/drivers/media/video/zoran_card.c b/drivers/media/video/zoran_card.c
index 958c1e6fc85..f2249ed2527 100644
--- a/drivers/media/video/zoran_card.c
+++ b/drivers/media/video/zoran_card.c
@@ -29,7 +29,6 @@
29 29
30#include <linux/delay.h> 30#include <linux/delay.h>
31 31
32#include <linux/config.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/module.h> 34#include <linux/module.h>
@@ -1381,7 +1380,7 @@ find_zr36057 (void)
1381 1380
1382 result = request_irq(zr->pci_dev->irq, 1381 result = request_irq(zr->pci_dev->irq,
1383 zoran_irq, 1382 zoran_irq,
1384 SA_SHIRQ | SA_INTERRUPT, 1383 IRQF_SHARED | IRQF_DISABLED,
1385 ZR_DEVNAME(zr), 1384 ZR_DEVNAME(zr),
1386 (void *) zr); 1385 (void *) zr);
1387 if (result < 0) { 1386 if (result < 0) {
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c
index 02168d9c218..3cbac2e8aed 100644
--- a/drivers/media/video/zoran_device.c
+++ b/drivers/media/video/zoran_device.c
@@ -27,7 +27,6 @@
27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/module.h> 32#include <linux/module.h>
diff --git a/drivers/media/video/zoran_driver.c b/drivers/media/video/zoran_driver.c
index 9711f6248ef..d9a5876eb38 100644
--- a/drivers/media/video/zoran_driver.c
+++ b/drivers/media/video/zoran_driver.c
@@ -44,7 +44,6 @@
44 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 44 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
45 */ 45 */
46 46
47#include <linux/config.h>
48#include <linux/version.h> 47#include <linux/version.h>
49#include <linux/init.h> 48#include <linux/init.h>
50#include <linux/module.h> 49#include <linux/module.h>
diff --git a/drivers/media/video/zoran_procfs.c b/drivers/media/video/zoran_procfs.c
index f4ffe79bdc5..c7f6f648836 100644
--- a/drivers/media/video/zoran_procfs.c
+++ b/drivers/media/video/zoran_procfs.c
@@ -27,7 +27,6 @@
27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 27 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/module.h> 32#include <linux/module.h>
diff --git a/drivers/media/video/zr36120.c b/drivers/media/video/zr36120.c
index 6ac3b674008..50437383ed6 100644
--- a/drivers/media/video/zr36120.c
+++ b/drivers/media/video/zr36120.c
@@ -1858,7 +1858,7 @@ int __init find_zoran(void)
1858 DEBUG(printk(KERN_DEBUG "zoran: mapped-memory at 0x%p\n",ztv->zoran_mem)); 1858 DEBUG(printk(KERN_DEBUG "zoran: mapped-memory at 0x%p\n",ztv->zoran_mem));
1859 1859
1860 result = request_irq(dev->irq, zoran_irq, 1860 result = request_irq(dev->irq, zoran_irq,
1861 SA_SHIRQ|SA_INTERRUPT,"zoran", ztv); 1861 IRQF_SHARED|IRQF_DISABLED,"zoran", ztv);
1862 if (result==-EINVAL) 1862 if (result==-EINVAL)
1863 { 1863 {
1864 iounmap(ztv->zoran_mem); 1864 iounmap(ztv->zoran_mem);
diff --git a/drivers/media/video/zr36120_mem.c b/drivers/media/video/zr36120_mem.c
index c87113d6cc6..416eaa93b8a 100644
--- a/drivers/media/video/zr36120_mem.c
+++ b/drivers/media/video/zr36120_mem.c
@@ -18,7 +18,6 @@
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19*/ 19*/
20 20
21#include <linux/config.h>
22#include <linux/mm.h> 21#include <linux/mm.h>
23#include <linux/pci.h> 22#include <linux/pci.h>
24#include <linux/slab.h> 23#include <linux/slab.h>
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 12dd8d493ee..57543603d6c 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -46,7 +46,6 @@
46*/ 46*/
47/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 47/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
48 48
49#include <linux/config.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
51#include <linux/module.h> 50#include <linux/module.h>
52#include <linux/errno.h> 51#include <linux/errno.h>
@@ -1706,7 +1705,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
1706 printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n", 1705 printk(MYIOC_s_INFO_FMT "PCI-MSI enabled\n",
1707 ioc->name); 1706 ioc->name);
1708 rc = request_irq(ioc->pcidev->irq, mpt_interrupt, 1707 rc = request_irq(ioc->pcidev->irq, mpt_interrupt,
1709 SA_SHIRQ, ioc->name, ioc); 1708 IRQF_SHARED, ioc->name, ioc);
1710 if (rc < 0) { 1709 if (rc < 0) {
1711 printk(MYIOC_s_ERR_FMT "Unable to allocate " 1710 printk(MYIOC_s_ERR_FMT "Unable to allocate "
1712 "interrupt %d!\n", ioc->name, 1711 "interrupt %d!\n", ioc->name,
@@ -5592,7 +5591,7 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag)
5592 5591
5593 /* The SCSI driver needs to adjust timeouts on all current 5592 /* The SCSI driver needs to adjust timeouts on all current
5594 * commands prior to the diagnostic reset being issued. 5593 * commands prior to the diagnostic reset being issued.
5595 * Prevents timeouts occuring during a diagnostic reset...very bad. 5594 * Prevents timeouts occurring during a diagnostic reset...very bad.
5596 * For all other protocol drivers, this is a no-op. 5595 * For all other protocol drivers, this is a no-op.
5597 */ 5596 */
5598 { 5597 {
diff --git a/drivers/message/fusion/mptbase.h b/drivers/message/fusion/mptbase.h
index 4720f9ae86a..32ae4d66454 100644
--- a/drivers/message/fusion/mptbase.h
+++ b/drivers/message/fusion/mptbase.h
@@ -49,7 +49,6 @@
49#define MPTBASE_H_INCLUDED 49#define MPTBASE_H_INCLUDED
50/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ 50/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
51 51
52#include <linux/config.h>
53#include <linux/kernel.h> 52#include <linux/kernel.h>
54#include <linux/pci.h> 53#include <linux/pci.h>
55 54
diff --git a/drivers/message/i2o/debug.c b/drivers/message/i2o/debug.c
index 5a6cca8e8c4..8abe45e49ad 100644
--- a/drivers/message/i2o/debug.c
+++ b/drivers/message/i2o/debug.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/kernel.h> 2#include <linux/kernel.h>
4#include <linux/pci.h> 3#include <linux/pci.h>
diff --git a/drivers/message/i2o/pci.c b/drivers/message/i2o/pci.c
index 4f1515cae5d..1b58444d5aa 100644
--- a/drivers/message/i2o/pci.c
+++ b/drivers/message/i2o/pci.c
@@ -274,7 +274,7 @@ static int i2o_pci_irq_enable(struct i2o_controller *c)
274 writel(0xffffffff, c->irq_mask); 274 writel(0xffffffff, c->irq_mask);
275 275
276 if (pdev->irq) { 276 if (pdev->irq) {
277 rc = request_irq(pdev->irq, i2o_pci_interrupt, SA_SHIRQ, 277 rc = request_irq(pdev->irq, i2o_pci_interrupt, IRQF_SHARED,
278 c->name, c); 278 c->name, c);
279 if (rc < 0) { 279 if (rc < 0) {
280 printk(KERN_ERR "%s: unable to allocate interrupt %d." 280 printk(KERN_ERR "%s: unable to allocate interrupt %d."
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index c8426a9bf27..632bc218c86 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -16,7 +16,6 @@
16 * Note that all locks are private to this file. Nothing else may 16 * Note that all locks are private to this file. Nothing else may
17 * touch them. 17 * touch them.
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/slab.h> 21#include <linux/slab.h>
@@ -509,7 +508,7 @@ static int ucb1x00_probe(struct mcp *mcp)
509 goto err_free; 508 goto err_free;
510 } 509 }
511 510
512 ret = request_irq(ucb->irq, ucb1x00_irq, SA_TRIGGER_RISING, 511 ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING,
513 "UCB1x00", ucb); 512 "UCB1x00", ucb);
514 if (ret) { 513 if (ret) {
515 printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n", 514 printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n",
diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
index 79fd062ccb3..02776814443 100644
--- a/drivers/mfd/ucb1x00-ts.c
+++ b/drivers/mfd/ucb1x00-ts.c
@@ -17,7 +17,6 @@
17 * pin should provide pulses even when the LCD is blanked, otherwise 17 * pin should provide pulses even when the LCD is blanked, otherwise
18 * a pen touch needed to unblank the LCD will never be read. 18 * a pen touch needed to unblank the LCD will never be read.
19 */ 19 */
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/moduleparam.h> 21#include <linux/moduleparam.h>
23#include <linux/init.h> 22#include <linux/init.h>
diff --git a/drivers/misc/ibmasm/ibmasm.h b/drivers/misc/ibmasm/ibmasm.h
index 6aba4195444..634d538ccd1 100644
--- a/drivers/misc/ibmasm/ibmasm.h
+++ b/drivers/misc/ibmasm/ibmasm.h
@@ -29,7 +29,6 @@
29#include <linux/wait.h> 29#include <linux/wait.h>
30#include <linux/spinlock.h> 30#include <linux/spinlock.h>
31#include <linux/slab.h> 31#include <linux/slab.h>
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/interrupt.h> 33#include <linux/interrupt.h>
35#include <linux/device.h> 34#include <linux/device.h>
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
index 9706cc19134..2f3bddfab93 100644
--- a/drivers/misc/ibmasm/module.c
+++ b/drivers/misc/ibmasm/module.c
@@ -113,7 +113,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi
113 goto error_ioremap; 113 goto error_ioremap;
114 } 114 }
115 115
116 result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp); 116 result = request_irq(sp->irq, ibmasm_interrupt_handler, IRQF_SHARED, sp->devname, (void*)sp);
117 if (result) { 117 if (result) {
118 dev_err(sp->dev, "Failed to register interrupt handler\n"); 118 dev_err(sp->dev, "Failed to register interrupt handler\n");
119 goto error_request_irq; 119 goto error_request_irq;
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c
index 3228516b7d1..6b7638b8429 100644
--- a/drivers/mmc/at91_mci.c
+++ b/drivers/mmc/at91_mci.c
@@ -53,7 +53,6 @@
53 Gets the status of the write protect pin, if available. 53 Gets the status of the write protect pin, if available.
54*/ 54*/
55 55
56#include <linux/config.h>
57#include <linux/module.h> 56#include <linux/module.h>
58#include <linux/moduleparam.h> 57#include <linux/moduleparam.h>
59#include <linux/init.h> 58#include <linux/init.h>
@@ -851,7 +850,7 @@ static int at91_mci_probe(struct platform_device *pdev)
851 /* 850 /*
852 * Allocate the MCI interrupt 851 * Allocate the MCI interrupt
853 */ 852 */
854 ret = request_irq(AT91_ID_MCI, at91_mci_irq, SA_SHIRQ, DRIVER_NAME, host); 853 ret = request_irq(AT91_ID_MCI, at91_mci_irq, IRQF_SHARED, DRIVER_NAME, host);
855 if (ret) { 854 if (ret) {
856 printk(KERN_ERR "Failed to request MCI interrupt\n"); 855 printk(KERN_ERR "Failed to request MCI interrupt\n");
857 clk_disable(mci_clk); 856 clk_disable(mci_clk);
diff --git a/drivers/mmc/au1xmmc.c b/drivers/mmc/au1xmmc.c
index 5dc4bee7abe..fb606165af3 100644
--- a/drivers/mmc/au1xmmc.c
+++ b/drivers/mmc/au1xmmc.c
@@ -34,7 +34,6 @@
34 * So we use the timer to check the status manually. 34 * So we use the timer to check the status manually.
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/init.h> 38#include <linux/init.h>
40#include <linux/platform_device.h> 39#include <linux/platform_device.h>
@@ -887,7 +886,7 @@ static int __devinit au1xmmc_probe(struct platform_device *pdev)
887 int i, ret = 0; 886 int i, ret = 0;
888 887
889 /* THe interrupt is shared among all controllers */ 888 /* THe interrupt is shared among all controllers */
890 ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, SA_INTERRUPT, "MMC", 0); 889 ret = request_irq(AU1100_SD_IRQ, au1xmmc_irq, IRQF_DISABLED, "MMC", 0);
891 890
892 if (ret) { 891 if (ret) {
893 printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n", 892 printk(DRIVER_NAME "ERROR: Couldn't get int %d: %d\n",
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c
index 5c62f4e6ad0..7ca9e95bdf8 100644
--- a/drivers/mmc/imxmmc.c
+++ b/drivers/mmc/imxmmc.c
@@ -25,7 +25,6 @@
25 * deficiencies 25 * deficiencies
26 * 26 *
27 */ 27 */
28#include <linux/config.h>
29 28
30#ifdef CONFIG_MMC_DEBUG 29#ifdef CONFIG_MMC_DEBUG
31#define DEBUG 30#define DEBUG
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 6201f3086a0..247ff2f23ac 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -9,7 +9,6 @@
9 * it under the terms of the GNU General Public License version 2 as 9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c
index 8576a65ca1c..1886562abdd 100644
--- a/drivers/mmc/mmci.c
+++ b/drivers/mmc/mmci.c
@@ -7,7 +7,6 @@
7 * it under the terms of the GNU General Public License version 2 as 7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/moduleparam.h> 11#include <linux/moduleparam.h>
13#include <linux/init.h> 12#include <linux/init.h>
@@ -532,11 +531,11 @@ static int mmci_probe(struct amba_device *dev, void *id)
532 writel(0, host->base + MMCIMASK1); 531 writel(0, host->base + MMCIMASK1);
533 writel(0xfff, host->base + MMCICLEAR); 532 writel(0xfff, host->base + MMCICLEAR);
534 533
535 ret = request_irq(dev->irq[0], mmci_irq, SA_SHIRQ, DRIVER_NAME " (cmd)", host); 534 ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host);
536 if (ret) 535 if (ret)
537 goto unmap; 536 goto unmap;
538 537
539 ret = request_irq(dev->irq[1], mmci_pio_irq, SA_SHIRQ, DRIVER_NAME " (pio)", host); 538 ret = request_irq(dev->irq[1], mmci_pio_irq, IRQF_SHARED, DRIVER_NAME " (pio)", host);
540 if (ret) 539 if (ret)
541 goto irq0_free; 540 goto irq0_free;
542 541
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c
index c25244b3657..ddf06b32c15 100644
--- a/drivers/mmc/omap.c
+++ b/drivers/mmc/omap.c
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
17#include <linux/init.h> 16#include <linux/init.h>
@@ -61,6 +60,7 @@ struct mmc_omap_host {
61 unsigned char id; /* 16xx chips have 2 MMC blocks */ 60 unsigned char id; /* 16xx chips have 2 MMC blocks */
62 struct clk * iclk; 61 struct clk * iclk;
63 struct clk * fclk; 62 struct clk * fclk;
63 struct resource *res;
64 void __iomem *base; 64 void __iomem *base;
65 int irq; 65 int irq;
66 unsigned char bus_mode; 66 unsigned char bus_mode;
@@ -340,8 +340,6 @@ static void
340mmc_omap_xfer_data(struct mmc_omap_host *host, int write) 340mmc_omap_xfer_data(struct mmc_omap_host *host, int write)
341{ 341{
342 int n; 342 int n;
343 void __iomem *reg;
344 u16 *p;
345 343
346 if (host->buffer_bytes_left == 0) { 344 if (host->buffer_bytes_left == 0) {
347 host->sg_idx++; 345 host->sg_idx++;
@@ -658,12 +656,12 @@ static void mmc_omap_dma_cb(int lch, u16 ch_status, void *data)
658 struct mmc_data *mmcdat = host->data; 656 struct mmc_data *mmcdat = host->data;
659 657
660 if (unlikely(host->dma_ch < 0)) { 658 if (unlikely(host->dma_ch < 0)) {
661 dev_err(mmc_dev(host->mmc), "DMA callback while DMA not 659 dev_err(mmc_dev(host->mmc),
662 enabled\n"); 660 "DMA callback while DMA not enabled\n");
663 return; 661 return;
664 } 662 }
665 /* FIXME: We really should do something to _handle_ the errors */ 663 /* FIXME: We really should do something to _handle_ the errors */
666 if (ch_status & OMAP_DMA_TOUT_IRQ) { 664 if (ch_status & OMAP1_DMA_TOUT_IRQ) {
667 dev_err(mmc_dev(host->mmc),"DMA timeout\n"); 665 dev_err(mmc_dev(host->mmc),"DMA timeout\n");
668 return; 666 return;
669 } 667 }
@@ -973,20 +971,20 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
973 struct omap_mmc_conf *minfo = pdev->dev.platform_data; 971 struct omap_mmc_conf *minfo = pdev->dev.platform_data;
974 struct mmc_host *mmc; 972 struct mmc_host *mmc;
975 struct mmc_omap_host *host = NULL; 973 struct mmc_omap_host *host = NULL;
974 struct resource *r;
976 int ret = 0; 975 int ret = 0;
976 int irq;
977 977
978 if (platform_get_resource(pdev, IORESOURCE_MEM, 0) || 978 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
979 platform_get_irq(pdev, IORESOURCE_IRQ, 0)) { 979 irq = platform_get_irq(pdev, 0);
980 dev_err(&pdev->dev, "mmc_omap_probe: invalid resource type\n"); 980 if (!r || irq < 0)
981 return -ENODEV; 981 return -ENXIO;
982 }
983 982
984 if (!request_mem_region(pdev->resource[0].start, 983 r = request_mem_region(pdev->resource[0].start,
985 pdev->resource[0].end - pdev->resource[0].start + 1, 984 pdev->resource[0].end - pdev->resource[0].start + 1,
986 pdev->name)) { 985 pdev->name);
987 dev_dbg(&pdev->dev, "request_mem_region failed\n"); 986 if (!r)
988 return -EBUSY; 987 return -EBUSY;
989 }
990 988
991 mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev); 989 mmc = mmc_alloc_host(sizeof(struct mmc_omap_host), &pdev->dev);
992 if (!mmc) { 990 if (!mmc) {
@@ -1003,6 +1001,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1003 host->dma_timer.data = (unsigned long) host; 1001 host->dma_timer.data = (unsigned long) host;
1004 1002
1005 host->id = pdev->id; 1003 host->id = pdev->id;
1004 host->res = r;
1005 host->irq = irq;
1006 1006
1007 if (cpu_is_omap24xx()) { 1007 if (cpu_is_omap24xx()) {
1008 host->iclk = clk_get(&pdev->dev, "mmc_ick"); 1008 host->iclk = clk_get(&pdev->dev, "mmc_ick");
@@ -1032,13 +1032,9 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1032 host->dma_ch = -1; 1032 host->dma_ch = -1;
1033 1033
1034 host->irq = pdev->resource[1].start; 1034 host->irq = pdev->resource[1].start;
1035 host->base = ioremap(pdev->res.start, SZ_4K); 1035 host->base = (void __iomem*)IO_ADDRESS(r->start);
1036 if (!host->base) {
1037 ret = -ENOMEM;
1038 goto out;
1039 }
1040 1036
1041 if (minfo->wire4) 1037 if (minfo->wire4)
1042 mmc->caps |= MMC_CAP_4_BIT_DATA; 1038 mmc->caps |= MMC_CAP_4_BIT_DATA;
1043 1039
1044 mmc->ops = &mmc_omap_ops; 1040 mmc->ops = &mmc_omap_ops;
@@ -1057,8 +1053,8 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1057 1053
1058 if (host->power_pin >= 0) { 1054 if (host->power_pin >= 0) {
1059 if ((ret = omap_request_gpio(host->power_pin)) != 0) { 1055 if ((ret = omap_request_gpio(host->power_pin)) != 0) {
1060 dev_err(mmc_dev(host->mmc), "Unable to get GPIO 1056 dev_err(mmc_dev(host->mmc),
1061 pin for MMC power\n"); 1057 "Unable to get GPIO pin for MMC power\n");
1062 goto out; 1058 goto out;
1063 } 1059 }
1064 omap_set_gpio_direction(host->power_pin, 0); 1060 omap_set_gpio_direction(host->power_pin, 0);
@@ -1086,7 +1082,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1086 1082
1087 omap_set_gpio_direction(host->switch_pin, 1); 1083 omap_set_gpio_direction(host->switch_pin, 1);
1088 ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin), 1084 ret = request_irq(OMAP_GPIO_IRQ(host->switch_pin),
1089 mmc_omap_switch_irq, SA_TRIGGER_RISING, DRIVER_NAME, host); 1085 mmc_omap_switch_irq, IRQF_TRIGGER_RISING, DRIVER_NAME, host);
1090 if (ret) { 1086 if (ret) {
1091 dev_warn(mmc_dev(host->mmc), "Unable to get IRQ for MMC cover switch\n"); 1087 dev_warn(mmc_dev(host->mmc), "Unable to get IRQ for MMC cover switch\n");
1092 omap_free_gpio(host->switch_pin); 1088 omap_free_gpio(host->switch_pin);
@@ -1100,7 +1096,7 @@ static int __init mmc_omap_probe(struct platform_device *pdev)
1100 device_remove_file(&pdev->dev, &dev_attr_cover_switch); 1096 device_remove_file(&pdev->dev, &dev_attr_cover_switch);
1101 } 1097 }
1102 if (ret) { 1098 if (ret) {
1103 dev_wan(mmc_dev(host->mmc), "Unable to create sysfs attributes\n"); 1099 dev_warn(mmc_dev(host->mmc), "Unable to create sysfs attributes\n");
1104 free_irq(OMAP_GPIO_IRQ(host->switch_pin), host); 1100 free_irq(OMAP_GPIO_IRQ(host->switch_pin), host);
1105 omap_free_gpio(host->switch_pin); 1101 omap_free_gpio(host->switch_pin);
1106 host->switch_pin = -1; 1102 host->switch_pin = -1;
diff --git a/drivers/mmc/pxamci.c b/drivers/mmc/pxamci.c
index b49368fd96b..ef350908478 100644
--- a/drivers/mmc/pxamci.c
+++ b/drivers/mmc/pxamci.c
@@ -16,7 +16,6 @@
16 * 1 and 3 byte data transfers not supported 16 * 1 and 3 byte data transfers not supported
17 * max block length up to 1023 17 * max block length up to 1023
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/ioport.h> 21#include <linux/ioport.h>
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 8e9100bd57e..893319108ba 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -8,12 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11 /*
12 * Note that PIO transfer is rather crappy atm. The buffer full/empty
13 * interrupts aren't reliable so we currently transfer the entire buffer
14 * directly. Patches to solve the problem are welcome.
15 */
16
17#include <linux/delay.h> 11#include <linux/delay.h>
18#include <linux/highmem.h> 12#include <linux/highmem.h>
19#include <linux/pci.h> 13#include <linux/pci.h>
@@ -27,16 +21,50 @@
27#include "sdhci.h" 21#include "sdhci.h"
28 22
29#define DRIVER_NAME "sdhci" 23#define DRIVER_NAME "sdhci"
30#define DRIVER_VERSION "0.11" 24#define DRIVER_VERSION "0.12"
31 25
32#define BUGMAIL "<sdhci-devel@list.drzeus.cx>" 26#define BUGMAIL "<sdhci-devel@list.drzeus.cx>"
33 27
34#define DBG(f, x...) \ 28#define DBG(f, x...) \
35 pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x) 29 pr_debug(DRIVER_NAME " [%s()]: " f, __func__,## x)
36 30
31static unsigned int debug_nodma = 0;
32static unsigned int debug_forcedma = 0;
33static unsigned int debug_quirks = 0;
34
35#define SDHCI_QUIRK_CLOCK_BEFORE_RESET (1<<0)
36#define SDHCI_QUIRK_FORCE_DMA (1<<1)
37
37static const struct pci_device_id pci_ids[] __devinitdata = { 38static const struct pci_device_id pci_ids[] __devinitdata = {
38 /* handle any SD host controller */ 39 {
39 {PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)}, 40 .vendor = PCI_VENDOR_ID_RICOH,
41 .device = PCI_DEVICE_ID_RICOH_R5C822,
42 .subvendor = PCI_VENDOR_ID_IBM,
43 .subdevice = PCI_ANY_ID,
44 .driver_data = SDHCI_QUIRK_CLOCK_BEFORE_RESET |
45 SDHCI_QUIRK_FORCE_DMA,
46 },
47
48 {
49 .vendor = PCI_VENDOR_ID_RICOH,
50 .device = PCI_DEVICE_ID_RICOH_R5C822,
51 .subvendor = PCI_ANY_ID,
52 .subdevice = PCI_ANY_ID,
53 .driver_data = SDHCI_QUIRK_FORCE_DMA,
54 },
55
56 {
57 .vendor = PCI_VENDOR_ID_TI,
58 .device = PCI_DEVICE_ID_TI_XX21_XX11_SD,
59 .subvendor = PCI_ANY_ID,
60 .subdevice = PCI_ANY_ID,
61 .driver_data = SDHCI_QUIRK_FORCE_DMA,
62 },
63
64 { /* Generic SD host controller */
65 PCI_DEVICE_CLASS((PCI_CLASS_SYSTEM_SDHCI << 8), 0xFFFF00)
66 },
67
40 { /* end: all zeroes */ }, 68 { /* end: all zeroes */ },
41}; 69};
42 70
@@ -94,12 +122,27 @@ static void sdhci_dumpregs(struct sdhci_host *host)
94 122
95static void sdhci_reset(struct sdhci_host *host, u8 mask) 123static void sdhci_reset(struct sdhci_host *host, u8 mask)
96{ 124{
125 unsigned long timeout;
126
97 writeb(mask, host->ioaddr + SDHCI_SOFTWARE_RESET); 127 writeb(mask, host->ioaddr + SDHCI_SOFTWARE_RESET);
98 128
99 if (mask & SDHCI_RESET_ALL) { 129 if (mask & SDHCI_RESET_ALL)
100 host->clock = 0; 130 host->clock = 0;
101 131
102 mdelay(50); 132 /* Wait max 100 ms */
133 timeout = 100;
134
135 /* hw clears the bit when it's done */
136 while (readb(host->ioaddr + SDHCI_SOFTWARE_RESET) & mask) {
137 if (timeout == 0) {
138 printk(KERN_ERR "%s: Reset 0x%x never completed. "
139 "Please report this to " BUGMAIL ".\n",
140 mmc_hostname(host->mmc), (int)mask);
141 sdhci_dumpregs(host);
142 return;
143 }
144 timeout--;
145 mdelay(1);
103 } 146 }
104} 147}
105 148
@@ -109,13 +152,15 @@ static void sdhci_init(struct sdhci_host *host)
109 152
110 sdhci_reset(host, SDHCI_RESET_ALL); 153 sdhci_reset(host, SDHCI_RESET_ALL);
111 154
112 intmask = ~(SDHCI_INT_CARD_INT | SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL); 155 intmask = SDHCI_INT_BUS_POWER | SDHCI_INT_DATA_END_BIT |
156 SDHCI_INT_DATA_CRC | SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_INDEX |
157 SDHCI_INT_END_BIT | SDHCI_INT_CRC | SDHCI_INT_TIMEOUT |
158 SDHCI_INT_CARD_REMOVE | SDHCI_INT_CARD_INSERT |
159 SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL |
160 SDHCI_INT_DMA_END | SDHCI_INT_DATA_END | SDHCI_INT_RESPONSE;
113 161
114 writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); 162 writel(intmask, host->ioaddr + SDHCI_INT_ENABLE);
115 writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); 163 writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE);
116
117 /* This is unknown magic. */
118 writeb(0xE, host->ioaddr + SDHCI_TIMEOUT_CONTROL);
119} 164}
120 165
121static void sdhci_activate_led(struct sdhci_host *host) 166static void sdhci_activate_led(struct sdhci_host *host)
@@ -172,79 +217,96 @@ static inline int sdhci_next_sg(struct sdhci_host* host)
172 return host->num_sg; 217 return host->num_sg;
173} 218}
174 219
175static void sdhci_transfer_pio(struct sdhci_host *host) 220static void sdhci_read_block_pio(struct sdhci_host *host)
176{ 221{
222 int blksize, chunk_remain;
223 u32 data;
177 char *buffer; 224 char *buffer;
178 u32 mask; 225 int size;
179 int bytes, size;
180 unsigned long max_jiffies;
181 226
182 BUG_ON(!host->data); 227 DBG("PIO reading\n");
183 228
184 if (host->num_sg == 0) 229 blksize = host->data->blksz;
185 return; 230 chunk_remain = 0;
186 231 data = 0;
187 bytes = 0;
188 if (host->data->flags & MMC_DATA_READ)
189 mask = SDHCI_DATA_AVAILABLE;
190 else
191 mask = SDHCI_SPACE_AVAILABLE;
192 232
193 buffer = sdhci_kmap_sg(host) + host->offset; 233 buffer = sdhci_kmap_sg(host) + host->offset;
194 234
195 /* Transfer shouldn't take more than 5 s */ 235 while (blksize) {
196 max_jiffies = jiffies + HZ * 5; 236 if (chunk_remain == 0) {
237 data = readl(host->ioaddr + SDHCI_BUFFER);
238 chunk_remain = min(blksize, 4);
239 }
197 240
198 while (host->size > 0) { 241 size = min(host->size, host->remain);
199 if (time_after(jiffies, max_jiffies)) { 242 size = min(size, chunk_remain);
200 printk(KERN_ERR "%s: PIO transfer stalled. "
201 "Please report this to "
202 BUGMAIL ".\n", mmc_hostname(host->mmc));
203 sdhci_dumpregs(host);
204 243
205 sdhci_kunmap_sg(host); 244 chunk_remain -= size;
245 blksize -= size;
246 host->offset += size;
247 host->remain -= size;
248 host->size -= size;
249 while (size) {
250 *buffer = data & 0xFF;
251 buffer++;
252 data >>= 8;
253 size--;
254 }
206 255
207 host->data->error = MMC_ERR_FAILED; 256 if (host->remain == 0) {
208 sdhci_finish_data(host); 257 sdhci_kunmap_sg(host);
209 return; 258 if (sdhci_next_sg(host) == 0) {
259 BUG_ON(blksize != 0);
260 return;
261 }
262 buffer = sdhci_kmap_sg(host);
210 } 263 }
264 }
211 265
212 if (!(readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask)) 266 sdhci_kunmap_sg(host);
213 continue; 267}
214 268
215 size = min(host->size, host->remain); 269static void sdhci_write_block_pio(struct sdhci_host *host)
270{
271 int blksize, chunk_remain;
272 u32 data;
273 char *buffer;
274 int bytes, size;
216 275
217 if (size >= 4) { 276 DBG("PIO writing\n");
218 if (host->data->flags & MMC_DATA_READ) 277
219 *(u32*)buffer = readl(host->ioaddr + SDHCI_BUFFER); 278 blksize = host->data->blksz;
220 else 279 chunk_remain = 4;
221 writel(*(u32*)buffer, host->ioaddr + SDHCI_BUFFER); 280 data = 0;
222 size = 4;
223 } else if (size >= 2) {
224 if (host->data->flags & MMC_DATA_READ)
225 *(u16*)buffer = readw(host->ioaddr + SDHCI_BUFFER);
226 else
227 writew(*(u16*)buffer, host->ioaddr + SDHCI_BUFFER);
228 size = 2;
229 } else {
230 if (host->data->flags & MMC_DATA_READ)
231 *(u8*)buffer = readb(host->ioaddr + SDHCI_BUFFER);
232 else
233 writeb(*(u8*)buffer, host->ioaddr + SDHCI_BUFFER);
234 size = 1;
235 }
236 281
237 buffer += size; 282 bytes = 0;
283 buffer = sdhci_kmap_sg(host) + host->offset;
284
285 while (blksize) {
286 size = min(host->size, host->remain);
287 size = min(size, chunk_remain);
288
289 chunk_remain -= size;
290 blksize -= size;
238 host->offset += size; 291 host->offset += size;
239 host->remain -= size; 292 host->remain -= size;
240
241 bytes += size;
242 host->size -= size; 293 host->size -= size;
294 while (size) {
295 data >>= 8;
296 data |= (u32)*buffer << 24;
297 buffer++;
298 size--;
299 }
300
301 if (chunk_remain == 0) {
302 writel(data, host->ioaddr + SDHCI_BUFFER);
303 chunk_remain = min(blksize, 4);
304 }
243 305
244 if (host->remain == 0) { 306 if (host->remain == 0) {
245 sdhci_kunmap_sg(host); 307 sdhci_kunmap_sg(host);
246 if (sdhci_next_sg(host) == 0) { 308 if (sdhci_next_sg(host) == 0) {
247 DBG("PIO transfer: %d bytes\n", bytes); 309 BUG_ON(blksize != 0);
248 return; 310 return;
249 } 311 }
250 buffer = sdhci_kmap_sg(host); 312 buffer = sdhci_kmap_sg(host);
@@ -252,38 +314,87 @@ static void sdhci_transfer_pio(struct sdhci_host *host)
252 } 314 }
253 315
254 sdhci_kunmap_sg(host); 316 sdhci_kunmap_sg(host);
317}
318
319static void sdhci_transfer_pio(struct sdhci_host *host)
320{
321 u32 mask;
322
323 BUG_ON(!host->data);
324
325 if (host->size == 0)
326 return;
327
328 if (host->data->flags & MMC_DATA_READ)
329 mask = SDHCI_DATA_AVAILABLE;
330 else
331 mask = SDHCI_SPACE_AVAILABLE;
332
333 while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) {
334 if (host->data->flags & MMC_DATA_READ)
335 sdhci_read_block_pio(host);
336 else
337 sdhci_write_block_pio(host);
338
339 if (host->size == 0)
340 break;
341
342 BUG_ON(host->num_sg == 0);
343 }
255 344
256 DBG("PIO transfer: %d bytes\n", bytes); 345 DBG("PIO transfer complete.\n");
257} 346}
258 347
259static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) 348static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
260{ 349{
261 u16 mode; 350 u8 count;
351 unsigned target_timeout, current_timeout;
262 352
263 WARN_ON(host->data); 353 WARN_ON(host->data);
264 354
265 if (data == NULL) { 355 if (data == NULL)
266 writew(0, host->ioaddr + SDHCI_TRANSFER_MODE);
267 return; 356 return;
268 }
269 357
270 DBG("blksz %04x blks %04x flags %08x\n", 358 DBG("blksz %04x blks %04x flags %08x\n",
271 data->blksz, data->blocks, data->flags); 359 data->blksz, data->blocks, data->flags);
272 DBG("tsac %d ms nsac %d clk\n", 360 DBG("tsac %d ms nsac %d clk\n",
273 data->timeout_ns / 1000000, data->timeout_clks); 361 data->timeout_ns / 1000000, data->timeout_clks);
274 362
275 mode = SDHCI_TRNS_BLK_CNT_EN; 363 /* Sanity checks */
276 if (data->blocks > 1) 364 BUG_ON(data->blksz * data->blocks > 524288);
277 mode |= SDHCI_TRNS_MULTI; 365 BUG_ON(data->blksz > host->max_block);
278 if (data->flags & MMC_DATA_READ) 366 BUG_ON(data->blocks > 65535);
279 mode |= SDHCI_TRNS_READ;
280 if (host->flags & SDHCI_USE_DMA)
281 mode |= SDHCI_TRNS_DMA;
282 367
283 writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); 368 /* timeout in us */
369 target_timeout = data->timeout_ns / 1000 +
370 data->timeout_clks / host->clock;
284 371
285 writew(data->blksz, host->ioaddr + SDHCI_BLOCK_SIZE); 372 /*
286 writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); 373 * Figure out needed cycles.
374 * We do this in steps in order to fit inside a 32 bit int.
375 * The first step is the minimum timeout, which will have a
376 * minimum resolution of 6 bits:
377 * (1) 2^13*1000 > 2^22,
378 * (2) host->timeout_clk < 2^16
379 * =>
380 * (1) / (2) > 2^6
381 */
382 count = 0;
383 current_timeout = (1 << 13) * 1000 / host->timeout_clk;
384 while (current_timeout < target_timeout) {
385 count++;
386 current_timeout <<= 1;
387 if (count >= 0xF)
388 break;
389 }
390
391 if (count >= 0xF) {
392 printk(KERN_WARNING "%s: Too large timeout requested!\n",
393 mmc_hostname(host->mmc));
394 count = 0xE;
395 }
396
397 writeb(count, host->ioaddr + SDHCI_TIMEOUT_CONTROL);
287 398
288 if (host->flags & SDHCI_USE_DMA) { 399 if (host->flags & SDHCI_USE_DMA) {
289 int count; 400 int count;
@@ -302,12 +413,37 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data)
302 host->offset = 0; 413 host->offset = 0;
303 host->remain = host->cur_sg->length; 414 host->remain = host->cur_sg->length;
304 } 415 }
416
417 /* We do not handle DMA boundaries, so set it to max (512 KiB) */
418 writew(SDHCI_MAKE_BLKSZ(7, data->blksz),
419 host->ioaddr + SDHCI_BLOCK_SIZE);
420 writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT);
421}
422
423static void sdhci_set_transfer_mode(struct sdhci_host *host,
424 struct mmc_data *data)
425{
426 u16 mode;
427
428 WARN_ON(host->data);
429
430 if (data == NULL)
431 return;
432
433 mode = SDHCI_TRNS_BLK_CNT_EN;
434 if (data->blocks > 1)
435 mode |= SDHCI_TRNS_MULTI;
436 if (data->flags & MMC_DATA_READ)
437 mode |= SDHCI_TRNS_READ;
438 if (host->flags & SDHCI_USE_DMA)
439 mode |= SDHCI_TRNS_DMA;
440
441 writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE);
305} 442}
306 443
307static void sdhci_finish_data(struct sdhci_host *host) 444static void sdhci_finish_data(struct sdhci_host *host)
308{ 445{
309 struct mmc_data *data; 446 struct mmc_data *data;
310 u32 intmask;
311 u16 blocks; 447 u16 blocks;
312 448
313 BUG_ON(!host->data); 449 BUG_ON(!host->data);
@@ -318,14 +454,6 @@ static void sdhci_finish_data(struct sdhci_host *host)
318 if (host->flags & SDHCI_USE_DMA) { 454 if (host->flags & SDHCI_USE_DMA) {
319 pci_unmap_sg(host->chip->pdev, data->sg, data->sg_len, 455 pci_unmap_sg(host->chip->pdev, data->sg, data->sg_len,
320 (data->flags & MMC_DATA_READ)?PCI_DMA_FROMDEVICE:PCI_DMA_TODEVICE); 456 (data->flags & MMC_DATA_READ)?PCI_DMA_FROMDEVICE:PCI_DMA_TODEVICE);
321 } else {
322 intmask = readl(host->ioaddr + SDHCI_SIGNAL_ENABLE);
323 intmask &= ~(SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL);
324 writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE);
325
326 intmask = readl(host->ioaddr + SDHCI_INT_ENABLE);
327 intmask &= ~(SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL);
328 writel(intmask, host->ioaddr + SDHCI_INT_ENABLE);
329 } 457 }
330 458
331 /* 459 /*
@@ -342,9 +470,7 @@ static void sdhci_finish_data(struct sdhci_host *host)
342 "though there were blocks left. Please report this " 470 "though there were blocks left. Please report this "
343 "to " BUGMAIL ".\n", mmc_hostname(host->mmc)); 471 "to " BUGMAIL ".\n", mmc_hostname(host->mmc));
344 data->error = MMC_ERR_FAILED; 472 data->error = MMC_ERR_FAILED;
345 } 473 } else if (host->size != 0) {
346
347 if (host->size != 0) {
348 printk(KERN_ERR "%s: %d bytes were left untransferred. " 474 printk(KERN_ERR "%s: %d bytes were left untransferred. "
349 "Please report this to " BUGMAIL ".\n", 475 "Please report this to " BUGMAIL ".\n",
350 mmc_hostname(host->mmc), host->size); 476 mmc_hostname(host->mmc), host->size);
@@ -371,27 +497,38 @@ static void sdhci_finish_data(struct sdhci_host *host)
371static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) 497static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
372{ 498{
373 int flags; 499 int flags;
374 u32 present; 500 u32 mask;
375 unsigned long max_jiffies; 501 unsigned long timeout;
376 502
377 WARN_ON(host->cmd); 503 WARN_ON(host->cmd);
378 504
379 DBG("Sending cmd (%x)\n", cmd->opcode); 505 DBG("Sending cmd (%x)\n", cmd->opcode);
380 506
381 /* Wait max 10 ms */ 507 /* Wait max 10 ms */
382 max_jiffies = jiffies + (HZ + 99)/100; 508 timeout = 10;
383 do { 509
384 if (time_after(jiffies, max_jiffies)) { 510 mask = SDHCI_CMD_INHIBIT;
511 if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY))
512 mask |= SDHCI_DATA_INHIBIT;
513
514 /* We shouldn't wait for data inihibit for stop commands, even
515 though they might use busy signaling */
516 if (host->mrq->data && (cmd == host->mrq->data->stop))
517 mask &= ~SDHCI_DATA_INHIBIT;
518
519 while (readl(host->ioaddr + SDHCI_PRESENT_STATE) & mask) {
520 if (timeout == 0) {
385 printk(KERN_ERR "%s: Controller never released " 521 printk(KERN_ERR "%s: Controller never released "
386 "inhibit bits. Please report this to " 522 "inhibit bit(s). Please report this to "
387 BUGMAIL ".\n", mmc_hostname(host->mmc)); 523 BUGMAIL ".\n", mmc_hostname(host->mmc));
388 sdhci_dumpregs(host); 524 sdhci_dumpregs(host);
389 cmd->error = MMC_ERR_FAILED; 525 cmd->error = MMC_ERR_FAILED;
390 tasklet_schedule(&host->finish_tasklet); 526 tasklet_schedule(&host->finish_tasklet);
391 return; 527 return;
392 } 528 }
393 present = readl(host->ioaddr + SDHCI_PRESENT_STATE); 529 timeout--;
394 } while (present & (SDHCI_CMD_INHIBIT | SDHCI_DATA_INHIBIT)); 530 mdelay(1);
531 }
395 532
396 mod_timer(&host->timer, jiffies + 10 * HZ); 533 mod_timer(&host->timer, jiffies + 10 * HZ);
397 534
@@ -401,6 +538,8 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
401 538
402 writel(cmd->arg, host->ioaddr + SDHCI_ARGUMENT); 539 writel(cmd->arg, host->ioaddr + SDHCI_ARGUMENT);
403 540
541 sdhci_set_transfer_mode(host, cmd->data);
542
404 if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) { 543 if ((cmd->flags & MMC_RSP_136) && (cmd->flags & MMC_RSP_BUSY)) {
405 printk(KERN_ERR "%s: Unsupported response type! " 544 printk(KERN_ERR "%s: Unsupported response type! "
406 "Please report this to " BUGMAIL ".\n", 545 "Please report this to " BUGMAIL ".\n",
@@ -456,31 +595,9 @@ static void sdhci_finish_command(struct sdhci_host *host)
456 595
457 DBG("Ending cmd (%x)\n", host->cmd->opcode); 596 DBG("Ending cmd (%x)\n", host->cmd->opcode);
458 597
459 if (host->cmd->data) { 598 if (host->cmd->data)
460 u32 intmask;
461
462 host->data = host->cmd->data; 599 host->data = host->cmd->data;
463 600 else
464 if (!(host->flags & SDHCI_USE_DMA)) {
465 /*
466 * Don't enable the interrupts until now to make sure we
467 * get stable handling of the FIFO.
468 */
469 intmask = readl(host->ioaddr + SDHCI_INT_ENABLE);
470 intmask |= SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL;
471 writel(intmask, host->ioaddr + SDHCI_INT_ENABLE);
472
473 intmask = readl(host->ioaddr + SDHCI_SIGNAL_ENABLE);
474 intmask |= SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL;
475 writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE);
476
477 /*
478 * The buffer interrupts are to unreliable so we
479 * start the transfer immediatly.
480 */
481 sdhci_transfer_pio(host);
482 }
483 } else
484 tasklet_schedule(&host->finish_tasklet); 601 tasklet_schedule(&host->finish_tasklet);
485 602
486 host->cmd = NULL; 603 host->cmd = NULL;
@@ -490,7 +607,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
490{ 607{
491 int div; 608 int div;
492 u16 clk; 609 u16 clk;
493 unsigned long max_jiffies; 610 unsigned long timeout;
494 611
495 if (clock == host->clock) 612 if (clock == host->clock)
496 return; 613 return;
@@ -511,17 +628,19 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
511 writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); 628 writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL);
512 629
513 /* Wait max 10 ms */ 630 /* Wait max 10 ms */
514 max_jiffies = jiffies + (HZ + 99)/100; 631 timeout = 10;
515 do { 632 while (!((clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL))
516 if (time_after(jiffies, max_jiffies)) { 633 & SDHCI_CLOCK_INT_STABLE)) {
634 if (timeout == 0) {
517 printk(KERN_ERR "%s: Internal clock never stabilised. " 635 printk(KERN_ERR "%s: Internal clock never stabilised. "
518 "Please report this to " BUGMAIL ".\n", 636 "Please report this to " BUGMAIL ".\n",
519 mmc_hostname(host->mmc)); 637 mmc_hostname(host->mmc));
520 sdhci_dumpregs(host); 638 sdhci_dumpregs(host);
521 return; 639 return;
522 } 640 }
523 clk = readw(host->ioaddr + SDHCI_CLOCK_CONTROL); 641 timeout--;
524 } while (!(clk & SDHCI_CLOCK_INT_STABLE)); 642 mdelay(1);
643 }
525 644
526 clk |= SDHCI_CLOCK_CARD_EN; 645 clk |= SDHCI_CLOCK_CARD_EN;
527 writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL); 646 writew(clk, host->ioaddr + SDHCI_CLOCK_CONTROL);
@@ -530,6 +649,46 @@ out:
530 host->clock = clock; 649 host->clock = clock;
531} 650}
532 651
652static void sdhci_set_power(struct sdhci_host *host, unsigned short power)
653{
654 u8 pwr;
655
656 if (host->power == power)
657 return;
658
659 writeb(0, host->ioaddr + SDHCI_POWER_CONTROL);
660
661 if (power == (unsigned short)-1)
662 goto out;
663
664 pwr = SDHCI_POWER_ON;
665
666 switch (power) {
667 case MMC_VDD_170:
668 case MMC_VDD_180:
669 case MMC_VDD_190:
670 pwr |= SDHCI_POWER_180;
671 break;
672 case MMC_VDD_290:
673 case MMC_VDD_300:
674 case MMC_VDD_310:
675 pwr |= SDHCI_POWER_300;
676 break;
677 case MMC_VDD_320:
678 case MMC_VDD_330:
679 case MMC_VDD_340:
680 pwr |= SDHCI_POWER_330;
681 break;
682 default:
683 BUG();
684 }
685
686 writeb(pwr, host->ioaddr + SDHCI_POWER_CONTROL);
687
688out:
689 host->power = power;
690}
691
533/*****************************************************************************\ 692/*****************************************************************************\
534 * * 693 * *
535 * MMC callbacks * 694 * MMC callbacks *
@@ -576,17 +735,15 @@ static void sdhci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
576 */ 735 */
577 if (ios->power_mode == MMC_POWER_OFF) { 736 if (ios->power_mode == MMC_POWER_OFF) {
578 writel(0, host->ioaddr + SDHCI_SIGNAL_ENABLE); 737 writel(0, host->ioaddr + SDHCI_SIGNAL_ENABLE);
579 spin_unlock_irqrestore(&host->lock, flags);
580 sdhci_init(host); 738 sdhci_init(host);
581 spin_lock_irqsave(&host->lock, flags);
582 } 739 }
583 740
584 sdhci_set_clock(host, ios->clock); 741 sdhci_set_clock(host, ios->clock);
585 742
586 if (ios->power_mode == MMC_POWER_OFF) 743 if (ios->power_mode == MMC_POWER_OFF)
587 writeb(0, host->ioaddr + SDHCI_POWER_CONTROL); 744 sdhci_set_power(host, -1);
588 else 745 else
589 writeb(0xFF, host->ioaddr + SDHCI_POWER_CONTROL); 746 sdhci_set_power(host, ios->vdd);
590 747
591 ctrl = readb(host->ioaddr + SDHCI_HOST_CONTROL); 748 ctrl = readb(host->ioaddr + SDHCI_HOST_CONTROL);
592 if (ios->bus_width == MMC_BUS_WIDTH_4) 749 if (ios->bus_width == MMC_BUS_WIDTH_4)
@@ -679,6 +836,19 @@ static void sdhci_tasklet_finish(unsigned long param)
679 if ((mrq->cmd->error != MMC_ERR_NONE) || 836 if ((mrq->cmd->error != MMC_ERR_NONE) ||
680 (mrq->data && ((mrq->data->error != MMC_ERR_NONE) || 837 (mrq->data && ((mrq->data->error != MMC_ERR_NONE) ||
681 (mrq->data->stop && (mrq->data->stop->error != MMC_ERR_NONE))))) { 838 (mrq->data->stop && (mrq->data->stop->error != MMC_ERR_NONE))))) {
839
840 /* Some controllers need this kick or reset won't work here */
841 if (host->chip->quirks & SDHCI_QUIRK_CLOCK_BEFORE_RESET) {
842 unsigned int clock;
843
844 /* This is to force an update */
845 clock = host->clock;
846 host->clock = 0;
847 sdhci_set_clock(host, clock);
848 }
849
850 /* Spec says we should do both at the same time, but Ricoh
851 controllers do not like that. */
682 sdhci_reset(host, SDHCI_RESET_CMD); 852 sdhci_reset(host, SDHCI_RESET_CMD);
683 sdhci_reset(host, SDHCI_RESET_DATA); 853 sdhci_reset(host, SDHCI_RESET_DATA);
684 } 854 }
@@ -793,7 +963,7 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
793 if (host->data->error != MMC_ERR_NONE) 963 if (host->data->error != MMC_ERR_NONE)
794 sdhci_finish_data(host); 964 sdhci_finish_data(host);
795 else { 965 else {
796 if (intmask & (SDHCI_INT_BUF_FULL | SDHCI_INT_BUF_EMPTY)) 966 if (intmask & (SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL))
797 sdhci_transfer_pio(host); 967 sdhci_transfer_pio(host);
798 968
799 if (intmask & SDHCI_INT_DATA_END) 969 if (intmask & SDHCI_INT_DATA_END)
@@ -818,50 +988,44 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id, struct pt_regs *regs)
818 988
819 DBG("*** %s got interrupt: 0x%08x\n", host->slot_descr, intmask); 989 DBG("*** %s got interrupt: 0x%08x\n", host->slot_descr, intmask);
820 990
821 if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) 991 if (intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE)) {
992 writel(intmask & (SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE),
993 host->ioaddr + SDHCI_INT_STATUS);
822 tasklet_schedule(&host->card_tasklet); 994 tasklet_schedule(&host->card_tasklet);
995 }
823 996
824 if (intmask & SDHCI_INT_CMD_MASK) { 997 intmask &= ~(SDHCI_INT_CARD_INSERT | SDHCI_INT_CARD_REMOVE);
825 sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK);
826 998
999 if (intmask & SDHCI_INT_CMD_MASK) {
827 writel(intmask & SDHCI_INT_CMD_MASK, 1000 writel(intmask & SDHCI_INT_CMD_MASK,
828 host->ioaddr + SDHCI_INT_STATUS); 1001 host->ioaddr + SDHCI_INT_STATUS);
1002 sdhci_cmd_irq(host, intmask & SDHCI_INT_CMD_MASK);
829 } 1003 }
830 1004
831 if (intmask & SDHCI_INT_DATA_MASK) { 1005 if (intmask & SDHCI_INT_DATA_MASK) {
832 sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK);
833
834 writel(intmask & SDHCI_INT_DATA_MASK, 1006 writel(intmask & SDHCI_INT_DATA_MASK,
835 host->ioaddr + SDHCI_INT_STATUS); 1007 host->ioaddr + SDHCI_INT_STATUS);
1008 sdhci_data_irq(host, intmask & SDHCI_INT_DATA_MASK);
836 } 1009 }
837 1010
838 intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK); 1011 intmask &= ~(SDHCI_INT_CMD_MASK | SDHCI_INT_DATA_MASK);
839 1012
840 if (intmask & SDHCI_INT_CARD_INT) {
841 printk(KERN_ERR "%s: Unexpected card interrupt. Please "
842 "report this to " BUGMAIL ".\n",
843 mmc_hostname(host->mmc));
844 sdhci_dumpregs(host);
845 }
846
847 if (intmask & SDHCI_INT_BUS_POWER) { 1013 if (intmask & SDHCI_INT_BUS_POWER) {
848 printk(KERN_ERR "%s: Unexpected bus power interrupt. Please " 1014 printk(KERN_ERR "%s: Card is consuming too much power!\n",
849 "report this to " BUGMAIL ".\n",
850 mmc_hostname(host->mmc)); 1015 mmc_hostname(host->mmc));
851 sdhci_dumpregs(host); 1016 writel(SDHCI_INT_BUS_POWER, host->ioaddr + SDHCI_INT_STATUS);
852 } 1017 }
853 1018
854 if (intmask & SDHCI_INT_ACMD12ERR) { 1019 intmask &= SDHCI_INT_BUS_POWER;
855 printk(KERN_ERR "%s: Unexpected auto CMD12 error. Please " 1020
1021 if (intmask) {
1022 printk(KERN_ERR "%s: Unexpected interrupt 0x%08x. Please "
856 "report this to " BUGMAIL ".\n", 1023 "report this to " BUGMAIL ".\n",
857 mmc_hostname(host->mmc)); 1024 mmc_hostname(host->mmc), intmask);
858 sdhci_dumpregs(host); 1025 sdhci_dumpregs(host);
859 1026
860 writew(~0, host->ioaddr + SDHCI_ACMD12_ERR);
861 }
862
863 if (intmask)
864 writel(intmask, host->ioaddr + SDHCI_INT_STATUS); 1027 writel(intmask, host->ioaddr + SDHCI_INT_STATUS);
1028 }
865 1029
866 result = IRQ_HANDLED; 1030 result = IRQ_HANDLED;
867 1031
@@ -954,6 +1118,7 @@ static int sdhci_resume (struct pci_dev *pdev)
954static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot) 1118static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
955{ 1119{
956 int ret; 1120 int ret;
1121 unsigned int version;
957 struct sdhci_chip *chip; 1122 struct sdhci_chip *chip;
958 struct mmc_host *mmc; 1123 struct mmc_host *mmc;
959 struct sdhci_host *host; 1124 struct sdhci_host *host;
@@ -985,6 +1150,16 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
985 return -ENODEV; 1150 return -ENODEV;
986 } 1151 }
987 1152
1153 if ((pdev->class & 0x0000FF) == PCI_SDHCI_IFVENDOR) {
1154 printk(KERN_ERR DRIVER_NAME ": Vendor specific interface. Aborting.\n");
1155 return -ENODEV;
1156 }
1157
1158 if ((pdev->class & 0x0000FF) > PCI_SDHCI_IFVENDOR) {
1159 printk(KERN_ERR DRIVER_NAME ": Unknown interface. Aborting.\n");
1160 return -ENODEV;
1161 }
1162
988 mmc = mmc_alloc_host(sizeof(struct sdhci_host), &pdev->dev); 1163 mmc = mmc_alloc_host(sizeof(struct sdhci_host), &pdev->dev);
989 if (!mmc) 1164 if (!mmc)
990 return -ENOMEM; 1165 return -ENOMEM;
@@ -1012,9 +1187,32 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1012 goto release; 1187 goto release;
1013 } 1188 }
1014 1189
1190 sdhci_reset(host, SDHCI_RESET_ALL);
1191
1192 version = readw(host->ioaddr + SDHCI_HOST_VERSION);
1193 version = (version & SDHCI_SPEC_VER_MASK) >> SDHCI_SPEC_VER_SHIFT;
1194 if (version != 0) {
1195 printk(KERN_ERR "%s: Unknown controller version (%d). "
1196 "Cowardly refusing to continue.\n", host->slot_descr,
1197 version);
1198 ret = -ENODEV;
1199 goto unmap;
1200 }
1201
1015 caps = readl(host->ioaddr + SDHCI_CAPABILITIES); 1202 caps = readl(host->ioaddr + SDHCI_CAPABILITIES);
1016 1203
1017 if ((caps & SDHCI_CAN_DO_DMA) && ((pdev->class & 0x0000FF) == 0x01)) 1204 if (debug_nodma)
1205 DBG("DMA forced off\n");
1206 else if (debug_forcedma) {
1207 DBG("DMA forced on\n");
1208 host->flags |= SDHCI_USE_DMA;
1209 } else if (chip->quirks & SDHCI_QUIRK_FORCE_DMA)
1210 host->flags |= SDHCI_USE_DMA;
1211 else if ((pdev->class & 0x0000FF) != PCI_SDHCI_IFDMA)
1212 DBG("Controller doesn't have DMA interface\n");
1213 else if (!(caps & SDHCI_CAN_DO_DMA))
1214 DBG("Controller doesn't have DMA capability\n");
1215 else
1018 host->flags |= SDHCI_USE_DMA; 1216 host->flags |= SDHCI_USE_DMA;
1019 1217
1020 if (host->flags & SDHCI_USE_DMA) { 1218 if (host->flags & SDHCI_USE_DMA) {
@@ -1030,18 +1228,59 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1030 else /* XXX: Hack to get MMC layer to avoid highmem */ 1228 else /* XXX: Hack to get MMC layer to avoid highmem */
1031 pdev->dma_mask = 0; 1229 pdev->dma_mask = 0;
1032 1230
1033 host->max_clk = (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT; 1231 host->max_clk =
1232 (caps & SDHCI_CLOCK_BASE_MASK) >> SDHCI_CLOCK_BASE_SHIFT;
1233 if (host->max_clk == 0) {
1234 printk(KERN_ERR "%s: Hardware doesn't specify base clock "
1235 "frequency.\n", host->slot_descr);
1236 ret = -ENODEV;
1237 goto unmap;
1238 }
1034 host->max_clk *= 1000000; 1239 host->max_clk *= 1000000;
1035 1240
1241 host->timeout_clk =
1242 (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT;
1243 if (host->timeout_clk == 0) {
1244 printk(KERN_ERR "%s: Hardware doesn't specify timeout clock "
1245 "frequency.\n", host->slot_descr);
1246 ret = -ENODEV;
1247 goto unmap;
1248 }
1249 if (caps & SDHCI_TIMEOUT_CLK_UNIT)
1250 host->timeout_clk *= 1000;
1251
1252 host->max_block = (caps & SDHCI_MAX_BLOCK_MASK) >> SDHCI_MAX_BLOCK_SHIFT;
1253 if (host->max_block >= 3) {
1254 printk(KERN_ERR "%s: Invalid maximum block size.\n",
1255 host->slot_descr);
1256 ret = -ENODEV;
1257 goto unmap;
1258 }
1259 host->max_block = 512 << host->max_block;
1260
1036 /* 1261 /*
1037 * Set host parameters. 1262 * Set host parameters.
1038 */ 1263 */
1039 mmc->ops = &sdhci_ops; 1264 mmc->ops = &sdhci_ops;
1040 mmc->f_min = host->max_clk / 256; 1265 mmc->f_min = host->max_clk / 256;
1041 mmc->f_max = host->max_clk; 1266 mmc->f_max = host->max_clk;
1042 mmc->ocr_avail = MMC_VDD_32_33|MMC_VDD_33_34;
1043 mmc->caps = MMC_CAP_4_BIT_DATA; 1267 mmc->caps = MMC_CAP_4_BIT_DATA;
1044 1268
1269 mmc->ocr_avail = 0;
1270 if (caps & SDHCI_CAN_VDD_330)
1271 mmc->ocr_avail |= MMC_VDD_32_33|MMC_VDD_33_34;
1272 else if (caps & SDHCI_CAN_VDD_300)
1273 mmc->ocr_avail |= MMC_VDD_29_30|MMC_VDD_30_31;
1274 else if (caps & SDHCI_CAN_VDD_180)
1275 mmc->ocr_avail |= MMC_VDD_17_18|MMC_VDD_18_19;
1276
1277 if (mmc->ocr_avail == 0) {
1278 printk(KERN_ERR "%s: Hardware doesn't report any "
1279 "support voltages.\n", host->slot_descr);
1280 ret = -ENODEV;
1281 goto unmap;
1282 }
1283
1045 spin_lock_init(&host->lock); 1284 spin_lock_init(&host->lock);
1046 1285
1047 /* 1286 /*
@@ -1054,10 +1293,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1054 mmc->max_phys_segs = 16; 1293 mmc->max_phys_segs = 16;
1055 1294
1056 /* 1295 /*
1057 * Maximum number of sectors in one transfer. Limited by sector 1296 * Maximum number of sectors in one transfer. Limited by DMA boundary
1058 * count register. 1297 * size (512KiB), which means (512 KiB/512=) 1024 entries.
1059 */ 1298 */
1060 mmc->max_sectors = 0x3FFF; 1299 mmc->max_sectors = 1024;
1061 1300
1062 /* 1301 /*
1063 * Maximum segment size. Could be one segment with the maximum number 1302 * Maximum segment size. Could be one segment with the maximum number
@@ -1075,10 +1314,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1075 1314
1076 setup_timer(&host->timer, sdhci_timeout_timer, (long)host); 1315 setup_timer(&host->timer, sdhci_timeout_timer, (long)host);
1077 1316
1078 ret = request_irq(host->irq, sdhci_irq, SA_SHIRQ, 1317 ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED,
1079 host->slot_descr, host); 1318 host->slot_descr, host);
1080 if (ret) 1319 if (ret)
1081 goto unmap; 1320 goto untasklet;
1082 1321
1083 sdhci_init(host); 1322 sdhci_init(host);
1084 1323
@@ -1097,10 +1336,10 @@ static int __devinit sdhci_probe_slot(struct pci_dev *pdev, int slot)
1097 1336
1098 return 0; 1337 return 0;
1099 1338
1100unmap: 1339untasklet:
1101 tasklet_kill(&host->card_tasklet); 1340 tasklet_kill(&host->card_tasklet);
1102 tasklet_kill(&host->finish_tasklet); 1341 tasklet_kill(&host->finish_tasklet);
1103 1342unmap:
1104 iounmap(host->ioaddr); 1343 iounmap(host->ioaddr);
1105release: 1344release:
1106 pci_release_region(pdev, host->bar); 1345 pci_release_region(pdev, host->bar);
@@ -1144,13 +1383,18 @@ static int __devinit sdhci_probe(struct pci_dev *pdev,
1144 const struct pci_device_id *ent) 1383 const struct pci_device_id *ent)
1145{ 1384{
1146 int ret, i; 1385 int ret, i;
1147 u8 slots; 1386 u8 slots, rev;
1148 struct sdhci_chip *chip; 1387 struct sdhci_chip *chip;
1149 1388
1150 BUG_ON(pdev == NULL); 1389 BUG_ON(pdev == NULL);
1151 BUG_ON(ent == NULL); 1390 BUG_ON(ent == NULL);
1152 1391
1153 DBG("found at %s\n", pci_name(pdev)); 1392 pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev);
1393
1394 printk(KERN_INFO DRIVER_NAME
1395 ": SDHCI controller found at %s [%04x:%04x] (rev %x)\n",
1396 pci_name(pdev), (int)pdev->vendor, (int)pdev->device,
1397 (int)rev);
1154 1398
1155 ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots); 1399 ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots);
1156 if (ret) 1400 if (ret)
@@ -1173,6 +1417,10 @@ static int __devinit sdhci_probe(struct pci_dev *pdev,
1173 } 1417 }
1174 1418
1175 chip->pdev = pdev; 1419 chip->pdev = pdev;
1420 chip->quirks = ent->driver_data;
1421
1422 if (debug_quirks)
1423 chip->quirks = debug_quirks;
1176 1424
1177 chip->num_slots = slots; 1425 chip->num_slots = slots;
1178 pci_set_drvdata(pdev, chip); 1426 pci_set_drvdata(pdev, chip);
@@ -1251,7 +1499,15 @@ static void __exit sdhci_drv_exit(void)
1251module_init(sdhci_drv_init); 1499module_init(sdhci_drv_init);
1252module_exit(sdhci_drv_exit); 1500module_exit(sdhci_drv_exit);
1253 1501
1502module_param(debug_nodma, uint, 0444);
1503module_param(debug_forcedma, uint, 0444);
1504module_param(debug_quirks, uint, 0444);
1505
1254MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>"); 1506MODULE_AUTHOR("Pierre Ossman <drzeus@drzeus.cx>");
1255MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver"); 1507MODULE_DESCRIPTION("Secure Digital Host Controller Interface driver");
1256MODULE_VERSION(DRIVER_VERSION); 1508MODULE_VERSION(DRIVER_VERSION);
1257MODULE_LICENSE("GPL"); 1509MODULE_LICENSE("GPL");
1510
1511MODULE_PARM_DESC(debug_nodma, "Forcefully disable DMA transfers. (default 0)");
1512MODULE_PARM_DESC(debug_forcedma, "Forcefully enable DMA transfers. (default 0)");
1513MODULE_PARM_DESC(debug_quirks, "Force certain quirks.");
diff --git a/drivers/mmc/sdhci.h b/drivers/mmc/sdhci.h
index 3b270ef486b..f2453343f78 100644
--- a/drivers/mmc/sdhci.h
+++ b/drivers/mmc/sdhci.h
@@ -12,6 +12,10 @@
12 * PCI registers 12 * PCI registers
13 */ 13 */
14 14
15#define PCI_SDHCI_IFPIO 0x00
16#define PCI_SDHCI_IFDMA 0x01
17#define PCI_SDHCI_IFVENDOR 0x02
18
15#define PCI_SLOT_INFO 0x40 /* 8 bits */ 19#define PCI_SLOT_INFO 0x40 /* 8 bits */
16#define PCI_SLOT_INFO_SLOTS(x) ((x >> 4) & 7) 20#define PCI_SLOT_INFO_SLOTS(x) ((x >> 4) & 7)
17#define PCI_SLOT_INFO_FIRST_BAR_MASK 0x07 21#define PCI_SLOT_INFO_FIRST_BAR_MASK 0x07
@@ -23,6 +27,7 @@
23#define SDHCI_DMA_ADDRESS 0x00 27#define SDHCI_DMA_ADDRESS 0x00
24 28
25#define SDHCI_BLOCK_SIZE 0x04 29#define SDHCI_BLOCK_SIZE 0x04
30#define SDHCI_MAKE_BLKSZ(dma, blksz) (((dma & 0x7) << 12) | (blksz & 0xFFF))
26 31
27#define SDHCI_BLOCK_COUNT 0x06 32#define SDHCI_BLOCK_COUNT 0x06
28 33
@@ -67,6 +72,10 @@
67#define SDHCI_CTRL_4BITBUS 0x02 72#define SDHCI_CTRL_4BITBUS 0x02
68 73
69#define SDHCI_POWER_CONTROL 0x29 74#define SDHCI_POWER_CONTROL 0x29
75#define SDHCI_POWER_ON 0x01
76#define SDHCI_POWER_180 0x0A
77#define SDHCI_POWER_300 0x0C
78#define SDHCI_POWER_330 0x0E
70 79
71#define SDHCI_BLOCK_GAP_CONTROL 0x2A 80#define SDHCI_BLOCK_GAP_CONTROL 0x2A
72 81
@@ -91,8 +100,8 @@
91#define SDHCI_INT_RESPONSE 0x00000001 100#define SDHCI_INT_RESPONSE 0x00000001
92#define SDHCI_INT_DATA_END 0x00000002 101#define SDHCI_INT_DATA_END 0x00000002
93#define SDHCI_INT_DMA_END 0x00000008 102#define SDHCI_INT_DMA_END 0x00000008
94#define SDHCI_INT_BUF_EMPTY 0x00000010 103#define SDHCI_INT_SPACE_AVAIL 0x00000010
95#define SDHCI_INT_BUF_FULL 0x00000020 104#define SDHCI_INT_DATA_AVAIL 0x00000020
96#define SDHCI_INT_CARD_INSERT 0x00000040 105#define SDHCI_INT_CARD_INSERT 0x00000040
97#define SDHCI_INT_CARD_REMOVE 0x00000080 106#define SDHCI_INT_CARD_REMOVE 0x00000080
98#define SDHCI_INT_CARD_INT 0x00000100 107#define SDHCI_INT_CARD_INT 0x00000100
@@ -112,7 +121,7 @@
112#define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_TIMEOUT | \ 121#define SDHCI_INT_CMD_MASK (SDHCI_INT_RESPONSE | SDHCI_INT_TIMEOUT | \
113 SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX) 122 SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX)
114#define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \ 123#define SDHCI_INT_DATA_MASK (SDHCI_INT_DATA_END | SDHCI_INT_DMA_END | \
115 SDHCI_INT_BUF_EMPTY | SDHCI_INT_BUF_FULL | \ 124 SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL | \
116 SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \ 125 SDHCI_INT_DATA_TIMEOUT | SDHCI_INT_DATA_CRC | \
117 SDHCI_INT_DATA_END_BIT) 126 SDHCI_INT_DATA_END_BIT)
118 127
@@ -121,9 +130,17 @@
121/* 3E-3F reserved */ 130/* 3E-3F reserved */
122 131
123#define SDHCI_CAPABILITIES 0x40 132#define SDHCI_CAPABILITIES 0x40
124#define SDHCI_CAN_DO_DMA 0x00400000 133#define SDHCI_TIMEOUT_CLK_MASK 0x0000003F
134#define SDHCI_TIMEOUT_CLK_SHIFT 0
135#define SDHCI_TIMEOUT_CLK_UNIT 0x00000080
125#define SDHCI_CLOCK_BASE_MASK 0x00003F00 136#define SDHCI_CLOCK_BASE_MASK 0x00003F00
126#define SDHCI_CLOCK_BASE_SHIFT 8 137#define SDHCI_CLOCK_BASE_SHIFT 8
138#define SDHCI_MAX_BLOCK_MASK 0x00030000
139#define SDHCI_MAX_BLOCK_SHIFT 16
140#define SDHCI_CAN_DO_DMA 0x00400000
141#define SDHCI_CAN_VDD_330 0x01000000
142#define SDHCI_CAN_VDD_300 0x02000000
143#define SDHCI_CAN_VDD_180 0x04000000
127 144
128/* 44-47 reserved for more caps */ 145/* 44-47 reserved for more caps */
129 146
@@ -136,6 +153,10 @@
136#define SDHCI_SLOT_INT_STATUS 0xFC 153#define SDHCI_SLOT_INT_STATUS 0xFC
137 154
138#define SDHCI_HOST_VERSION 0xFE 155#define SDHCI_HOST_VERSION 0xFE
156#define SDHCI_VENDOR_VER_MASK 0xFF00
157#define SDHCI_VENDOR_VER_SHIFT 8
158#define SDHCI_SPEC_VER_MASK 0x00FF
159#define SDHCI_SPEC_VER_SHIFT 0
139 160
140struct sdhci_chip; 161struct sdhci_chip;
141 162
@@ -149,8 +170,11 @@ struct sdhci_host {
149#define SDHCI_USE_DMA (1<<0) 170#define SDHCI_USE_DMA (1<<0)
150 171
151 unsigned int max_clk; /* Max possible freq (MHz) */ 172 unsigned int max_clk; /* Max possible freq (MHz) */
173 unsigned int timeout_clk; /* Timeout freq (KHz) */
174 unsigned int max_block; /* Max block size (bytes) */
152 175
153 unsigned int clock; /* Current clock (MHz) */ 176 unsigned int clock; /* Current clock (MHz) */
177 unsigned short power; /* Current voltage */
154 178
155 struct mmc_request *mrq; /* Current request */ 179 struct mmc_request *mrq; /* Current request */
156 struct mmc_command *cmd; /* Current command */ 180 struct mmc_command *cmd; /* Current command */
@@ -180,6 +204,8 @@ struct sdhci_host {
180struct sdhci_chip { 204struct sdhci_chip {
181 struct pci_dev *pdev; 205 struct pci_dev *pdev;
182 206
207 unsigned long quirks;
208
183 int num_slots; /* Slots on controller */ 209 int num_slots; /* Slots on controller */
184 struct sdhci_host *hosts[0]; /* Pointers to hosts */ 210 struct sdhci_host *hosts[0]; /* Pointers to hosts */
185}; 211};
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index 8167332d401..8a30ef3ae41 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -21,7 +21,6 @@
21 * - On APIC systems the FIFO empty interrupt is sometimes lost. 21 * - On APIC systems the FIFO empty interrupt is sometimes lost.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
27#include <linux/init.h> 26#include <linux/init.h>
@@ -1554,7 +1553,7 @@ static int __devinit wbsd_request_irq(struct wbsd_host *host, int irq)
1554 * Allocate interrupt. 1553 * Allocate interrupt.
1555 */ 1554 */
1556 1555
1557 ret = request_irq(irq, wbsd_irq, SA_SHIRQ, DRIVER_NAME, host); 1556 ret = request_irq(irq, wbsd_irq, IRQF_SHARED, DRIVER_NAME, host);
1558 if (ret) 1557 if (ret)
1559 return ret; 1558 return ret;
1560 1559
diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
index 1e01ad38b26..9885726a16e 100644
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/types.h> 25#include <linux/types.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
diff --git a/drivers/mtd/chips/cfi_probe.c b/drivers/mtd/chips/cfi_probe.c
index 4bf9f8cac0d..60e11a0ada9 100644
--- a/drivers/mtd/chips/cfi_probe.c
+++ b/drivers/mtd/chips/cfi_probe.c
@@ -4,7 +4,6 @@
4 $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $ 4 $Id: cfi_probe.c,v 1.86 2005/11/29 14:48:31 gleixner Exp $
5*/ 5*/
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
diff --git a/drivers/mtd/chips/chipreg.c b/drivers/mtd/chips/chipreg.c
index c2127840a18..2174c97549f 100644
--- a/drivers/mtd/chips/chipreg.c
+++ b/drivers/mtd/chips/chipreg.c
@@ -6,7 +6,6 @@
6 */ 6 */
7 7
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/kmod.h> 10#include <linux/kmod.h>
12#include <linux/spinlock.h> 11#include <linux/spinlock.h>
diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c
index 517ea33e726..8f39d0a3143 100644
--- a/drivers/mtd/chips/jedec_probe.c
+++ b/drivers/mtd/chips/jedec_probe.c
@@ -8,7 +8,6 @@
8 Occasionally maintained by Thayne Harbaugh tharbaugh at lnxi dot com 8 Occasionally maintained by Thayne Harbaugh tharbaugh at lnxi dot com
9*/ 9*/
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/types.h> 13#include <linux/types.h>
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index be3f1c136d0..ede3561be87 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -8,7 +8,6 @@
8 * 8 *
9 * Licence: GPL 9 * Licence: GPL
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
14#include <linux/blkdev.h> 13#include <linux/blkdev.h>
diff --git a/drivers/mtd/devices/docprobe.c b/drivers/mtd/devices/docprobe.c
index 593bb033a3f..78872c3f376 100644
--- a/drivers/mtd/devices/docprobe.c
+++ b/drivers/mtd/devices/docprobe.c
@@ -40,7 +40,6 @@
40*/ 40*/
41#define DOC_SINGLE_DRIVER 41#define DOC_SINGLE_DRIVER
42 42
43#include <linux/config.h>
44#include <linux/kernel.h> 43#include <linux/kernel.h>
45#include <linux/module.h> 44#include <linux/module.h>
46#include <asm/errno.h> 45#include <asm/errno.h>
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 04271d02b6b..5db71604592 100644
--- a/drivers/mtd/devices/mtd_dataflash.c
+++ b/drivers/mtd/devices/mtd_dataflash.c
@@ -9,7 +9,6 @@
9 * as published by the Free Software Foundation; either version 9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11*/ 11*/
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
index b4438eacfd8..e427c82d5f4 100644
--- a/drivers/mtd/devices/mtdram.c
+++ b/drivers/mtd/devices/mtdram.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
16#include <linux/ioport.h> 15#include <linux/ioport.h>
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index 30f07b473ae..6f9bbf6fee4 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -82,7 +82,6 @@
82 * * Comb the init routine. It's still a bit cludgy on a few things. 82 * * Comb the init routine. It's still a bit cludgy on a few things.
83 */ 83 */
84 84
85#include <linux/config.h>
86#include <linux/kernel.h> 85#include <linux/kernel.h>
87#include <linux/module.h> 86#include <linux/module.h>
88#include <asm/uaccess.h> 87#include <asm/uaccess.h>
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index 1e21a2c3dd2..4116535805f 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -24,7 +24,6 @@
24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/delay.h> 29#include <linux/delay.h>
diff --git a/drivers/mtd/maps/alchemy-flash.c b/drivers/mtd/maps/alchemy-flash.c
index b933a2a27b1..7fc8097e41d 100644
--- a/drivers/mtd/maps/alchemy-flash.c
+++ b/drivers/mtd/maps/alchemy-flash.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
index a5058700526..447955be18a 100644
--- a/drivers/mtd/maps/amd76xrom.c
+++ b/drivers/mtd/maps/amd76xrom.c
@@ -14,7 +14,6 @@
14#include <linux/mtd/map.h> 14#include <linux/mtd/map.h>
15#include <linux/mtd/cfi.h> 15#include <linux/mtd/cfi.h>
16#include <linux/mtd/flashchip.h> 16#include <linux/mtd/flashchip.h>
17#include <linux/config.h>
18#include <linux/pci.h> 17#include <linux/pci.h>
19#include <linux/pci_ids.h> 18#include <linux/pci_ids.h>
20#include <linux/list.h> 19#include <linux/list.h>
diff --git a/drivers/mtd/maps/ceiva.c b/drivers/mtd/maps/ceiva.c
index 5a95ab370a9..0402c21e291 100644
--- a/drivers/mtd/maps/ceiva.c
+++ b/drivers/mtd/maps/ceiva.c
@@ -14,7 +14,6 @@
14 * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $ 14 * $Id: ceiva.c,v 1.11 2004/09/16 23:27:12 gleixner Exp $
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/ioport.h> 19#include <linux/ioport.h>
diff --git a/drivers/mtd/maps/cstm_mips_ixx.c b/drivers/mtd/maps/cstm_mips_ixx.c
index a370953c151..aa56defb94c 100644
--- a/drivers/mtd/maps/cstm_mips_ixx.c
+++ b/drivers/mtd/maps/cstm_mips_ixx.c
@@ -38,7 +38,6 @@
38#include <linux/mtd/mtd.h> 38#include <linux/mtd/mtd.h>
39#include <linux/mtd/map.h> 39#include <linux/mtd/map.h>
40#include <linux/mtd/partitions.h> 40#include <linux/mtd/partitions.h>
41#include <linux/config.h>
42#include <linux/delay.h> 41#include <linux/delay.h>
43 42
44#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR) 43#if defined(CONFIG_MIPS_ITE8172) || defined(CONFIG_MIPS_IVR)
diff --git a/drivers/mtd/maps/dbox2-flash.c b/drivers/mtd/maps/dbox2-flash.c
index 85c2a9e22b1..92a9c7fac99 100644
--- a/drivers/mtd/maps/dbox2-flash.c
+++ b/drivers/mtd/maps/dbox2-flash.c
@@ -12,7 +12,6 @@
12#include <linux/mtd/mtd.h> 12#include <linux/mtd/mtd.h>
13#include <linux/mtd/map.h> 13#include <linux/mtd/map.h>
14#include <linux/mtd/partitions.h> 14#include <linux/mtd/partitions.h>
15#include <linux/config.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17 16
18/* partition_info gives details on the logical partitions that the split the 17/* partition_info gives details on the logical partitions that the split the
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
index 8b3784e2de8..b32bb9347d7 100644
--- a/drivers/mtd/maps/dc21285.c
+++ b/drivers/mtd/maps/dc21285.c
@@ -7,7 +7,6 @@
7 * 7 *
8 * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $ 8 * $Id: dc21285.c,v 1.24 2005/11/07 11:14:26 gleixner Exp $
9 */ 9 */
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/dilnetpc.c b/drivers/mtd/maps/dilnetpc.c
index c299d10b33e..b1104fe1f20 100644
--- a/drivers/mtd/maps/dilnetpc.c
+++ b/drivers/mtd/maps/dilnetpc.c
@@ -25,7 +25,6 @@
25 * and http://www.ssv-embedded.de/ssv/pc104/p170.htm 25 * and http://www.ssv-embedded.de/ssv/pc104/p170.htm
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/types.h> 29#include <linux/types.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/dmv182.c b/drivers/mtd/maps/dmv182.c
index 2bb3c0f0f97..a43c49905ca 100644
--- a/drivers/mtd/maps/dmv182.c
+++ b/drivers/mtd/maps/dmv182.c
@@ -16,7 +16,6 @@
16 * option) any later version. 16 * option) any later version.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/types.h> 21#include <linux/types.h>
diff --git a/drivers/mtd/maps/ebony.c b/drivers/mtd/maps/ebony.c
index 60a6e51d662..641e1dd8479 100644
--- a/drivers/mtd/maps/ebony.c
+++ b/drivers/mtd/maps/ebony.c
@@ -20,7 +20,6 @@
20#include <linux/mtd/mtd.h> 20#include <linux/mtd/mtd.h>
21#include <linux/mtd/map.h> 21#include <linux/mtd/map.h>
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/config.h>
24#include <asm/io.h> 23#include <asm/io.h>
25#include <asm/ibm44x.h> 24#include <asm/ibm44x.h>
26#include <platforms/4xx/ebony.h> 25#include <platforms/4xx/ebony.h>
diff --git a/drivers/mtd/maps/edb7312.c b/drivers/mtd/maps/edb7312.c
index b48a3473ffc..1c5b97c8968 100644
--- a/drivers/mtd/maps/edb7312.c
+++ b/drivers/mtd/maps/edb7312.c
@@ -17,7 +17,6 @@
17#include <asm/io.h> 17#include <asm/io.h>
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/mtd/map.h> 19#include <linux/mtd/map.h>
20#include <linux/config.h>
21 20
22#ifdef CONFIG_MTD_PARTITIONS 21#ifdef CONFIG_MTD_PARTITIONS
23#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
diff --git a/drivers/mtd/maps/h720x-flash.c b/drivers/mtd/maps/h720x-flash.c
index 0667101ccbe..6dde3182d64 100644
--- a/drivers/mtd/maps/h720x-flash.c
+++ b/drivers/mtd/maps/h720x-flash.c
@@ -8,7 +8,6 @@
8 * 2003 Thomas Gleixner <tglx@linutronix.de> 8 * 2003 Thomas Gleixner <tglx@linutronix.de>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c
index 16732794edf..db4b570d874 100644
--- a/drivers/mtd/maps/ichxrom.c
+++ b/drivers/mtd/maps/ichxrom.c
@@ -14,7 +14,6 @@
14#include <linux/mtd/map.h> 14#include <linux/mtd/map.h>
15#include <linux/mtd/cfi.h> 15#include <linux/mtd/cfi.h>
16#include <linux/mtd/flashchip.h> 16#include <linux/mtd/flashchip.h>
17#include <linux/config.h>
18#include <linux/pci.h> 17#include <linux/pci.h>
19#include <linux/pci_ids.h> 18#include <linux/pci_ids.h>
20#include <linux/list.h> 19#include <linux/list.h>
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c
index ba7f40311a7..a0b4dc7155d 100644
--- a/drivers/mtd/maps/impa7.c
+++ b/drivers/mtd/maps/impa7.c
@@ -17,7 +17,6 @@
17#include <asm/io.h> 17#include <asm/io.h>
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/mtd/map.h> 19#include <linux/mtd/map.h>
20#include <linux/config.h>
21 20
22#ifdef CONFIG_MTD_PARTITIONS 21#ifdef CONFIG_MTD_PARTITIONS
23#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
diff --git a/drivers/mtd/maps/integrator-flash.c b/drivers/mtd/maps/integrator-flash.c
index a3ba52fbd86..c8db01b3e45 100644
--- a/drivers/mtd/maps/integrator-flash.c
+++ b/drivers/mtd/maps/integrator-flash.c
@@ -26,7 +26,6 @@
26 26
27======================================================================*/ 27======================================================================*/
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/ipaq-flash.c b/drivers/mtd/maps/ipaq-flash.c
index b8ccb0a9578..f27c132794c 100644
--- a/drivers/mtd/maps/ipaq-flash.c
+++ b/drivers/mtd/maps/ipaq-flash.c
@@ -8,7 +8,6 @@
8 * $Id: ipaq-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ 8 * $Id: ipaq-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/l440gx.c b/drivers/mtd/maps/l440gx.c
index 851bf957605..6b784ef5ee7 100644
--- a/drivers/mtd/maps/l440gx.c
+++ b/drivers/mtd/maps/l440gx.c
@@ -13,7 +13,6 @@
13#include <asm/io.h> 13#include <asm/io.h>
14#include <linux/mtd/mtd.h> 14#include <linux/mtd/mtd.h>
15#include <linux/mtd/map.h> 15#include <linux/mtd/map.h>
16#include <linux/config.h>
17 16
18#define PIIXE_IOBASE_RESOURCE 11 17#define PIIXE_IOBASE_RESOURCE 11
19 18
diff --git a/drivers/mtd/maps/lasat.c b/drivers/mtd/maps/lasat.c
index c658d4045ef..1c13d2dc0cd 100644
--- a/drivers/mtd/maps/lasat.c
+++ b/drivers/mtd/maps/lasat.c
@@ -19,7 +19,6 @@
19#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
20#include <linux/mtd/map.h> 20#include <linux/mtd/map.h>
21#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
22#include <linux/config.h>
23#include <asm/lasat/lasat.h> 22#include <asm/lasat/lasat.h>
24 23
25static struct mtd_info *lasat_mtd; 24static struct mtd_info *lasat_mtd;
diff --git a/drivers/mtd/maps/mpc1211.c b/drivers/mtd/maps/mpc1211.c
index 4685e8e1346..45a00fac88a 100644
--- a/drivers/mtd/maps/mpc1211.c
+++ b/drivers/mtd/maps/mpc1211.c
@@ -15,7 +15,6 @@
15#include <linux/mtd/mtd.h> 15#include <linux/mtd/mtd.h>
16#include <linux/mtd/map.h> 16#include <linux/mtd/map.h>
17#include <linux/mtd/partitions.h> 17#include <linux/mtd/partitions.h>
18#include <linux/config.h>
19 18
20static struct mtd_info *flash_mtd; 19static struct mtd_info *flash_mtd;
21static struct mtd_partition *parsed_parts; 20static struct mtd_partition *parsed_parts;
diff --git a/drivers/mtd/maps/mtx-1_flash.c b/drivers/mtd/maps/mtx-1_flash.c
index 5c25d4e552c..d884f2be28f 100644
--- a/drivers/mtd/maps/mtx-1_flash.c
+++ b/drivers/mtd/maps/mtx-1_flash.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/mtd/maps/ocotea.c b/drivers/mtd/maps/ocotea.c
index a21fcd195ab..2f07602ba94 100644
--- a/drivers/mtd/maps/ocotea.c
+++ b/drivers/mtd/maps/ocotea.c
@@ -18,7 +18,6 @@
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/mtd/map.h> 19#include <linux/mtd/map.h>
20#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
21#include <linux/config.h>
22#include <asm/io.h> 21#include <asm/io.h>
23#include <asm/ibm44x.h> 22#include <asm/ibm44x.h>
24#include <platforms/4xx/ocotea.h> 23#include <platforms/4xx/ocotea.h>
diff --git a/drivers/mtd/maps/omap-toto-flash.c b/drivers/mtd/maps/omap-toto-flash.c
index dc376527005..e6e391efbeb 100644
--- a/drivers/mtd/maps/omap-toto-flash.c
+++ b/drivers/mtd/maps/omap-toto-flash.c
@@ -8,7 +8,6 @@
8 * $Id: omap-toto-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $ 8 * $Id: omap-toto-flash.c,v 1.5 2005/11/07 11:14:27 gleixner Exp $
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index d6301f08906..7799a25a7f2 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -18,7 +18,6 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
20#include <linux/mtd/map.h> 20#include <linux/mtd/map.h>
21#include <linux/config.h>
22#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
23#include <linux/mtd/physmap.h> 22#include <linux/mtd/physmap.h>
24#include <asm/io.h> 23#include <asm/io.h>
diff --git a/drivers/mtd/maps/redwood.c b/drivers/mtd/maps/redwood.c
index 50b14033613..ec8fdae1dd9 100644
--- a/drivers/mtd/maps/redwood.c
+++ b/drivers/mtd/maps/redwood.c
@@ -13,7 +13,6 @@
13 * or implied. 13 * or implied.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index 5cefb015633..950bf1c5784 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $ 6 * $Id: sa1100-flash.c,v 1.51 2005/11/07 11:14:28 gleixner Exp $
7 */ 7 */
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/ioport.h> 10#include <linux/ioport.h>
diff --git a/drivers/mtd/maps/sbc8240.c b/drivers/mtd/maps/sbc8240.c
index 350286dc1d2..7d0fcf8f4f3 100644
--- a/drivers/mtd/maps/sbc8240.c
+++ b/drivers/mtd/maps/sbc8240.c
@@ -18,7 +18,6 @@
18 * Both parts are JEDEC compatible. 18 * Both parts are JEDEC compatible.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/sc520cdp.c b/drivers/mtd/maps/sc520cdp.c
index e8c130e1efd..9b50cfc355b 100644
--- a/drivers/mtd/maps/sc520cdp.c
+++ b/drivers/mtd/maps/sc520cdp.c
@@ -25,7 +25,6 @@
25 * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html 25 * For details see http://www.amd.com/products/epd/desiging/evalboards/18.elansc520/520_cdp_brief/index.html
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/types.h> 29#include <linux/types.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c
index 97a8dfd6925..dcfb85840d1 100644
--- a/drivers/mtd/maps/scb2_flash.c
+++ b/drivers/mtd/maps/scb2_flash.c
@@ -53,7 +53,6 @@
53#include <linux/mtd/mtd.h> 53#include <linux/mtd/mtd.h>
54#include <linux/mtd/map.h> 54#include <linux/mtd/map.h>
55#include <linux/mtd/cfi.h> 55#include <linux/mtd/cfi.h>
56#include <linux/config.h>
57#include <linux/pci.h> 56#include <linux/pci.h>
58#include <linux/pci_ids.h> 57#include <linux/pci_ids.h>
59 58
diff --git a/drivers/mtd/maps/scx200_docflash.c b/drivers/mtd/maps/scx200_docflash.c
index 331a15859d7..7391fd544e8 100644
--- a/drivers/mtd/maps/scx200_docflash.c
+++ b/drivers/mtd/maps/scx200_docflash.c
@@ -8,7 +8,6 @@
8*/ 8*/
9 9
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/mtd/maps/solutionengine.c b/drivers/mtd/maps/solutionengine.c
index c53c2c369c9..d76ceef453c 100644
--- a/drivers/mtd/maps/solutionengine.c
+++ b/drivers/mtd/maps/solutionengine.c
@@ -16,7 +16,6 @@
16#include <linux/mtd/mtd.h> 16#include <linux/mtd/mtd.h>
17#include <linux/mtd/map.h> 17#include <linux/mtd/map.h>
18#include <linux/mtd/partitions.h> 18#include <linux/mtd/partitions.h>
19#include <linux/config.h>
20#include <linux/errno.h> 19#include <linux/errno.h>
21 20
22static struct mtd_info *flash_mtd; 21static struct mtd_info *flash_mtd;
diff --git a/drivers/mtd/maps/tqm834x.c b/drivers/mtd/maps/tqm834x.c
index c7ae9a515c1..58e5912bd38 100644
--- a/drivers/mtd/maps/tqm834x.c
+++ b/drivers/mtd/maps/tqm834x.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/types.h> 16#include <linux/types.h>
diff --git a/drivers/mtd/maps/tqm8xxl.c b/drivers/mtd/maps/tqm8xxl.c
index a43517053e7..19578ba84ee 100644
--- a/drivers/mtd/maps/tqm8xxl.c
+++ b/drivers/mtd/maps/tqm8xxl.c
@@ -22,7 +22,6 @@
22 * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at 22 * Thus, we choose CONFIG_MTD_CFI_I2 & CONFIG_MTD_CFI_B4 at
23 * kernel configuration. 23 * kernel configuration.
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/types.h> 26#include <linux/types.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/ts5500_flash.c b/drivers/mtd/maps/ts5500_flash.c
index a7422c20056..b47270e850b 100644
--- a/drivers/mtd/maps/ts5500_flash.c
+++ b/drivers/mtd/maps/ts5500_flash.c
@@ -26,7 +26,6 @@
26 * $Id: ts5500_flash.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $ 26 * $Id: ts5500_flash.c,v 1.5 2005/11/07 11:14:28 gleixner Exp $
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
index f7264dc2ac9..389fea28b9a 100644
--- a/drivers/mtd/maps/uclinux.c
+++ b/drivers/mtd/maps/uclinux.c
@@ -10,7 +10,6 @@
10 10
11/****************************************************************************/ 11/****************************************************************************/
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/init.h> 15#include <linux/init.h>
diff --git a/drivers/mtd/maps/walnut.c b/drivers/mtd/maps/walnut.c
index f46bec66150..ec80eec376b 100644
--- a/drivers/mtd/maps/walnut.c
+++ b/drivers/mtd/maps/walnut.c
@@ -20,7 +20,6 @@
20#include <linux/mtd/mtd.h> 20#include <linux/mtd/mtd.h>
21#include <linux/mtd/map.h> 21#include <linux/mtd/map.h>
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/config.h>
24#include <asm/io.h> 23#include <asm/io.h>
25#include <asm/ibm4xx.h> 24#include <asm/ibm4xx.h>
26#include <platforms/4xx/walnut.h> 25#include <platforms/4xx/walnut.h>
diff --git a/drivers/mtd/maps/wr_sbc82xx_flash.c b/drivers/mtd/maps/wr_sbc82xx_flash.c
index 60c197ec455..ac5b8105b6e 100644
--- a/drivers/mtd/maps/wr_sbc82xx_flash.c
+++ b/drivers/mtd/maps/wr_sbc82xx_flash.c
@@ -17,7 +17,6 @@
17#include <asm/io.h> 17#include <asm/io.h>
18#include <linux/mtd/mtd.h> 18#include <linux/mtd/mtd.h>
19#include <linux/mtd/map.h> 19#include <linux/mtd/map.h>
20#include <linux/config.h>
21#include <linux/mtd/partitions.h> 20#include <linux/mtd/partitions.h>
22 21
23#include <asm/immap_cpm2.h> 22#include <asm/immap_cpm2.h>
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index e5c78463ebf..04ed34694b1 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -7,7 +7,6 @@
7 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> 7 * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/fs.h> 10#include <linux/fs.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index 9a4b59d9252..fb8b4f7e48d 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/device.h> 8#include <linux/device.h>
10#include <linux/fs.h> 9#include <linux/fs.h>
11#include <linux/init.h> 10#include <linux/init.h>
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 16a952dd486..168d3ba063c 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index 77a7123a5c5..06a930372b7 100644
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
@@ -16,7 +16,6 @@
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/list.h> 18#include <linux/list.h>
19#include <linux/config.h>
20#include <linux/kmod.h> 19#include <linux/kmod.h>
21#include <linux/mtd/mtd.h> 20#include <linux/mtd/mtd.h>
22#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index ebd64abc8be..545ff252d81 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -25,7 +25,6 @@
25 * $Id: nandsim.c,v 1.8 2005/03/19 15:33:56 dedekind Exp $ 25 * $Id: nandsim.c,v 1.8 2005/03/19 15:33:56 dedekind Exp $
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/types.h> 29#include <linux/types.h>
31#include <linux/module.h> 30#include <linux/module.h>
diff --git a/drivers/mtd/nftlcore.c b/drivers/mtd/nftlcore.c
index dc7573501d8..dd5cea8b4a7 100644
--- a/drivers/mtd/nftlcore.c
+++ b/drivers/mtd/nftlcore.c
@@ -11,7 +11,6 @@
11 11
12#define PRERELEASE 12#define PRERELEASE
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <asm/errno.h> 16#include <asm/errno.h>
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c
index dc845f36fe4..cbdae54f715 100644
--- a/drivers/net/3c509.c
+++ b/drivers/net/3c509.c
@@ -68,7 +68,6 @@
68/* Maximum events (Rx packets, etc.) to handle at each interrupt. */ 68/* Maximum events (Rx packets, etc.) to handle at each interrupt. */
69static int max_interrupt_work = 10; 69static int max_interrupt_work = 10;
70 70
71#include <linux/config.h>
72#include <linux/module.h> 71#include <linux/module.h>
73#ifdef CONFIG_MCA 72#ifdef CONFIG_MCA
74#include <linux/mca.h> 73#include <linux/mca.h>
diff --git a/drivers/net/3c515.c b/drivers/net/3c515.c
index 91d1c4c24d9..4532b17e40e 100644
--- a/drivers/net/3c515.c
+++ b/drivers/net/3c515.c
@@ -57,7 +57,6 @@ static int max_interrupt_work = 20;
57#define RX_RING_SIZE 16 57#define RX_RING_SIZE 16
58#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */ 58#define PKT_BUF_SZ 1536 /* Size of each temporary Rx buffer. */
59 59
60#include <linux/config.h>
61#include <linux/module.h> 60#include <linux/module.h>
62#include <linux/isapnp.h> 61#include <linux/isapnp.h>
63#include <linux/kernel.h> 62#include <linux/kernel.h>
@@ -761,7 +760,7 @@ static int corkscrew_open(struct net_device *dev)
761 vp->product_name, dev)) return -EAGAIN; 760 vp->product_name, dev)) return -EAGAIN;
762 enable_dma(dev->dma); 761 enable_dma(dev->dma);
763 set_dma_mode(dev->dma, DMA_MODE_CASCADE); 762 set_dma_mode(dev->dma, DMA_MODE_CASCADE);
764 } else if (request_irq(dev->irq, &corkscrew_interrupt, SA_SHIRQ, 763 } else if (request_irq(dev->irq, &corkscrew_interrupt, IRQF_SHARED,
765 vp->product_name, dev)) { 764 vp->product_name, dev)) {
766 return -EAGAIN; 765 return -EAGAIN;
767 } 766 }
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c
index 4bf8510655c..5dfd97f0ba9 100644
--- a/drivers/net/3c523.c
+++ b/drivers/net/3c523.c
@@ -289,7 +289,7 @@ static int elmc_open(struct net_device *dev)
289 289
290 elmc_id_attn586(); /* disable interrupts */ 290 elmc_id_attn586(); /* disable interrupts */
291 291
292 ret = request_irq(dev->irq, &elmc_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, 292 ret = request_irq(dev->irq, &elmc_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM,
293 dev->name, dev); 293 dev->name, dev);
294 if (ret) { 294 if (ret) {
295 printk(KERN_ERR "%s: couldn't get irq %d\n", dev->name, dev->irq); 295 printk(KERN_ERR "%s: couldn't get irq %d\n", dev->name, dev->irq);
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c
index 157eda57392..03c0f7176fc 100644
--- a/drivers/net/3c527.c
+++ b/drivers/net/3c527.c
@@ -435,7 +435,7 @@ static int __init mc32_probe1(struct net_device *dev, int slot)
435 * Grab the IRQ 435 * Grab the IRQ
436 */ 436 */
437 437
438 err = request_irq(dev->irq, &mc32_interrupt, SA_SHIRQ | SA_SAMPLE_RANDOM, DRV_NAME, dev); 438 err = request_irq(dev->irq, &mc32_interrupt, IRQF_SHARED | IRQF_SAMPLE_RANDOM, DRV_NAME, dev);
439 if (err) { 439 if (err) {
440 release_region(dev->base_addr, MC32_IO_EXTENT); 440 release_region(dev->base_addr, MC32_IO_EXTENT);
441 printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq); 441 printk(KERN_ERR "%s: unable to get IRQ %d.\n", DRV_NAME, dev->irq);
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index d2f808979a2..8ab03b4a885 100644
--- a/drivers/net/3c59x.c
+++ b/drivers/net/3c59x.c
@@ -236,7 +236,6 @@ static int vortex_debug = VORTEX_DEBUG;
236static int vortex_debug = 1; 236static int vortex_debug = 1;
237#endif 237#endif
238 238
239#include <linux/config.h>
240#include <linux/module.h> 239#include <linux/module.h>
241#include <linux/kernel.h> 240#include <linux/kernel.h>
242#include <linux/string.h> 241#include <linux/string.h>
@@ -997,7 +996,7 @@ static int vortex_resume(struct pci_dev *pdev)
997 pci_enable_device(pdev); 996 pci_enable_device(pdev);
998 pci_set_master(pdev); 997 pci_set_master(pdev);
999 if (request_irq(dev->irq, vp->full_bus_master_rx ? 998 if (request_irq(dev->irq, vp->full_bus_master_rx ?
1000 &boomerang_interrupt : &vortex_interrupt, SA_SHIRQ, dev->name, dev)) { 999 &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev)) {
1001 printk(KERN_WARNING "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); 1000 printk(KERN_WARNING "%s: Could not reserve IRQ %d\n", dev->name, dev->irq);
1002 pci_disable_device(pdev); 1001 pci_disable_device(pdev);
1003 return -EBUSY; 1002 return -EBUSY;
@@ -1834,7 +1833,7 @@ vortex_open(struct net_device *dev)
1834 1833
1835 /* Use the now-standard shared IRQ implementation. */ 1834 /* Use the now-standard shared IRQ implementation. */
1836 if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ? 1835 if ((retval = request_irq(dev->irq, vp->full_bus_master_rx ?
1837 &boomerang_interrupt : &vortex_interrupt, SA_SHIRQ, dev->name, dev))) { 1836 &boomerang_interrupt : &vortex_interrupt, IRQF_SHARED, dev->name, dev))) {
1838 printk(KERN_ERR "%s: Could not reserve IRQ %d\n", dev->name, dev->irq); 1837 printk(KERN_ERR "%s: Could not reserve IRQ %d\n", dev->name, dev->irq);
1839 goto out; 1838 goto out;
1840 } 1839 }
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index d26dd6a7062..1959654cbec 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -52,7 +52,6 @@
52#define DRV_RELDATE "Mar 22, 2004" 52#define DRV_RELDATE "Mar 22, 2004"
53 53
54 54
55#include <linux/config.h>
56#include <linux/module.h> 55#include <linux/module.h>
57#include <linux/moduleparam.h> 56#include <linux/moduleparam.h>
58#include <linux/kernel.h> 57#include <linux/kernel.h>
@@ -1204,7 +1203,7 @@ static int cp_open (struct net_device *dev)
1204 1203
1205 cp_init_hw(cp); 1204 cp_init_hw(cp);
1206 1205
1207 rc = request_irq(dev->irq, cp_interrupt, SA_SHIRQ, dev->name, dev); 1206 rc = request_irq(dev->irq, cp_interrupt, IRQF_SHARED, dev->name, dev);
1208 if (rc) 1207 if (rc)
1209 goto err_out_hw; 1208 goto err_out_hw;
1210 1209
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index ed2e3c03bc8..717506b2b13 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -93,7 +93,6 @@
93#define DRV_VERSION "0.9.27" 93#define DRV_VERSION "0.9.27"
94 94
95 95
96#include <linux/config.h>
97#include <linux/module.h> 96#include <linux/module.h>
98#include <linux/kernel.h> 97#include <linux/kernel.h>
99#include <linux/compiler.h> 98#include <linux/compiler.h>
@@ -1311,7 +1310,7 @@ static int rtl8139_open (struct net_device *dev)
1311 int retval; 1310 int retval;
1312 void __iomem *ioaddr = tp->mmio_addr; 1311 void __iomem *ioaddr = tp->mmio_addr;
1313 1312
1314 retval = request_irq (dev->irq, rtl8139_interrupt, SA_SHIRQ, dev->name, dev); 1313 retval = request_irq (dev->irq, rtl8139_interrupt, IRQF_SHARED, dev->name, dev);
1315 if (retval) 1314 if (retval)
1316 return retval; 1315 return retval;
1317 1316
diff --git a/drivers/net/82596.c b/drivers/net/82596.c
index 8a9f7d61b9b..7e2ca957146 100644
--- a/drivers/net/82596.c
+++ b/drivers/net/82596.c
@@ -40,7 +40,6 @@
40 40
41 */ 41 */
42 42
43#include <linux/config.h>
44#include <linux/module.h> 43#include <linux/module.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
46#include <linux/string.h> 45#include <linux/string.h>
diff --git a/drivers/net/8390.h b/drivers/net/8390.h
index 51e39dcd060..a9a58f518f4 100644
--- a/drivers/net/8390.h
+++ b/drivers/net/8390.h
@@ -7,7 +7,6 @@
7#ifndef _8390_h 7#ifndef _8390_h
8#define _8390_h 8#define _8390_h
9 9
10#include <linux/config.h>
11#include <linux/if_ether.h> 10#include <linux/if_ether.h>
12#include <linux/ioport.h> 11#include <linux/ioport.h>
13#include <linux/skbuff.h> 12#include <linux/skbuff.h>
diff --git a/drivers/net/Space.c b/drivers/net/Space.c
index 60304f7e7e5..a8c245a8226 100644
--- a/drivers/net/Space.c
+++ b/drivers/net/Space.c
@@ -27,7 +27,6 @@
27 * as published by the Free Software Foundation; either version 27 * as published by the Free Software Foundation; either version
28 * 2 of the License, or (at your option) any later version. 28 * 2 of the License, or (at your option) any later version.
29 */ 29 */
30#include <linux/config.h>
31#include <linux/netdevice.h> 30#include <linux/netdevice.h>
32#include <linux/etherdevice.h> 31#include <linux/etherdevice.h>
33#include <linux/trdevice.h> 32#include <linux/trdevice.h>
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
index 71165ac0257..f4ea62641ac 100644
--- a/drivers/net/a2065.c
+++ b/drivers/net/a2065.c
@@ -48,7 +48,6 @@
48#include <linux/skbuff.h> 48#include <linux/skbuff.h>
49#include <linux/slab.h> 49#include <linux/slab.h>
50#include <linux/string.h> 50#include <linux/string.h>
51#include <linux/config.h>
52#include <linux/init.h> 51#include <linux/init.h>
53#include <linux/crc32.h> 52#include <linux/crc32.h>
54#include <linux/zorro.h> 53#include <linux/zorro.h>
@@ -496,7 +495,7 @@ static int lance_open (struct net_device *dev)
496 ll->rdp = LE_C0_STOP; 495 ll->rdp = LE_C0_STOP;
497 496
498 /* Install the Interrupt handler */ 497 /* Install the Interrupt handler */
499 ret = request_irq(IRQ_AMIGA_PORTS, lance_interrupt, SA_SHIRQ, 498 ret = request_irq(IRQ_AMIGA_PORTS, lance_interrupt, IRQF_SHARED,
500 dev->name, dev); 499 dev->name, dev);
501 if (ret) return ret; 500 if (ret) return ret;
502 501
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c
index 23ff22ba5d3..1c01e9b3d07 100644
--- a/drivers/net/acenic.c
+++ b/drivers/net/acenic.c
@@ -50,7 +50,6 @@
50 * Grant Grundler <grundler@cup.hp.com>: PCI write posting fixes. 50 * Grant Grundler <grundler@cup.hp.com>: PCI write posting fixes.
51 */ 51 */
52 52
53#include <linux/config.h>
54#include <linux/module.h> 53#include <linux/module.h>
55#include <linux/moduleparam.h> 54#include <linux/moduleparam.h>
56#include <linux/version.h> 55#include <linux/version.h>
@@ -1195,7 +1194,7 @@ static int __devinit ace_init(struct net_device *dev)
1195 goto init_error; 1194 goto init_error;
1196 } 1195 }
1197 1196
1198 ecode = request_irq(pdev->irq, ace_interrupt, SA_SHIRQ, 1197 ecode = request_irq(pdev->irq, ace_interrupt, IRQF_SHARED,
1199 DRV_NAME, dev); 1198 DRV_NAME, dev);
1200 if (ecode) { 1199 if (ecode) {
1201 printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", 1200 printk(KERN_WARNING "%s: Requested IRQ %d is busy\n",
diff --git a/drivers/net/acenic.h b/drivers/net/acenic.h
index a9710702349..62ec8ceee69 100644
--- a/drivers/net/acenic.h
+++ b/drivers/net/acenic.h
@@ -1,7 +1,6 @@
1#ifndef _ACENIC_H_ 1#ifndef _ACENIC_H_
2#define _ACENIC_H_ 2#define _ACENIC_H_
3 3
4#include <linux/config.h>
5 4
6/* 5/*
7 * Generate TX index update each time, when TX ring is closed. 6 * Generate TX index update each time, when TX ring is closed.
diff --git a/drivers/net/acenic_firmware.h b/drivers/net/acenic_firmware.h
index d7882dd783c..ec146f60d77 100644
--- a/drivers/net/acenic_firmware.h
+++ b/drivers/net/acenic_firmware.h
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2/* 1/*
3 * Declare these here even if Tigon I support is disabled to avoid 2 * Declare these here even if Tigon I support is disabled to avoid
4 * the compiler complaining about undefined symbols. 3 * the compiler complaining about undefined symbols.
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index d9ba8be72af..ed322a76980 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -69,7 +69,6 @@ Revision History:
69*/ 69*/
70 70
71 71
72#include <linux/config.h>
73#include <linux/module.h> 72#include <linux/module.h>
74#include <linux/kernel.h> 73#include <linux/kernel.h>
75#include <linux/types.h> 74#include <linux/types.h>
@@ -1377,7 +1376,7 @@ static int amd8111e_open(struct net_device * dev )
1377{ 1376{
1378 struct amd8111e_priv *lp = netdev_priv(dev); 1377 struct amd8111e_priv *lp = netdev_priv(dev);
1379 1378
1380 if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, SA_SHIRQ, 1379 if(dev->irq ==0 || request_irq(dev->irq, amd8111e_interrupt, IRQF_SHARED,
1381 dev->name, dev)) 1380 dev->name, dev))
1382 return -EAGAIN; 1381 return -EAGAIN;
1383 1382
diff --git a/drivers/net/apne.c b/drivers/net/apne.c
index b9820b86cdc..9cc13a0250d 100644
--- a/drivers/net/apne.c
+++ b/drivers/net/apne.c
@@ -313,7 +313,7 @@ static int __init apne_probe1(struct net_device *dev, int ioaddr)
313 dev->base_addr = ioaddr; 313 dev->base_addr = ioaddr;
314 314
315 /* Install the Interrupt handler */ 315 /* Install the Interrupt handler */
316 i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, SA_SHIRQ, DRV_NAME, dev); 316 i = request_irq(IRQ_AMIGA_PORTS, apne_interrupt, IRQF_SHARED, DRV_NAME, dev);
317 if (i) return i; 317 if (i) return i;
318 318
319 for(i = 0; i < ETHER_ADDR_LEN; i++) { 319 for(i = 0; i < ETHER_ADDR_LEN; i++) {
diff --git a/drivers/net/appletalk/cops.c b/drivers/net/appletalk/cops.c
index 9edaa183227..1d01ac0000e 100644
--- a/drivers/net/appletalk/cops.c
+++ b/drivers/net/appletalk/cops.c
@@ -48,7 +48,6 @@ static const char *version =
48 * the driver figure it out. 48 * the driver figure it out.
49 */ 49 */
50 50
51#include <linux/config.h>
52#include <linux/module.h> 51#include <linux/module.h>
53#include <linux/kernel.h> 52#include <linux/kernel.h>
54#include <linux/types.h> 53#include <linux/types.h>
diff --git a/drivers/net/appletalk/cops_ffdrv.h b/drivers/net/appletalk/cops_ffdrv.h
index 31cf8c9c947..b02005087c1 100644
--- a/drivers/net/appletalk/cops_ffdrv.h
+++ b/drivers/net/appletalk/cops_ffdrv.h
@@ -24,7 +24,6 @@
24 * - Jay Schulist <jschlst@samba.org> 24 * - Jay Schulist <jschlst@samba.org>
25 */ 25 */
26 26
27#include <linux/config.h>
28 27
29#ifdef CONFIG_COPS_DAYNA 28#ifdef CONFIG_COPS_DAYNA
30 29
diff --git a/drivers/net/appletalk/cops_ltdrv.h b/drivers/net/appletalk/cops_ltdrv.h
index 4afb8e18ba6..c699b1ad31d 100644
--- a/drivers/net/appletalk/cops_ltdrv.h
+++ b/drivers/net/appletalk/cops_ltdrv.h
@@ -23,7 +23,6 @@
23 * - Jay Schulist <jschlst@samba.org> 23 * - Jay Schulist <jschlst@samba.org>
24 */ 24 */
25 25
26#include <linux/config.h>
27 26
28#ifdef CONFIG_COPS_TANGENT 27#ifdef CONFIG_COPS_TANGENT
29 28
diff --git a/drivers/net/appletalk/ipddp.c b/drivers/net/appletalk/ipddp.c
index 1a44a79ed06..7f7dd450226 100644
--- a/drivers/net/appletalk/ipddp.c
+++ b/drivers/net/appletalk/ipddp.c
@@ -23,7 +23,6 @@
23 * of the GNU General Public License, incorporated herein by reference. 23 * of the GNU General Public License, incorporated herein by reference.
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/drivers/net/arcnet/arcnet.c b/drivers/net/arcnet/arcnet.c
index fabc0607b0f..5a95005253f 100644
--- a/drivers/net/arcnet/arcnet.c
+++ b/drivers/net/arcnet/arcnet.c
@@ -44,7 +44,6 @@
44#define VERSION "arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.\n" 44#define VERSION "arcnet: v3.93 BETA 2000/04/29 - by Avery Pennarun et al.\n"
45 45
46#include <linux/module.h> 46#include <linux/module.h>
47#include <linux/config.h>
48#include <linux/types.h> 47#include <linux/types.h>
49#include <linux/delay.h> 48#include <linux/delay.h>
50#include <linux/netdevice.h> 49#include <linux/netdevice.h>
diff --git a/drivers/net/arcnet/com20020-pci.c b/drivers/net/arcnet/com20020-pci.c
index 96636ca8754..979a33df0a8 100644
--- a/drivers/net/arcnet/com20020-pci.c
+++ b/drivers/net/arcnet/com20020-pci.c
@@ -120,7 +120,7 @@ static int __devinit com20020pci_probe(struct pci_dev *pdev, const struct pci_de
120 goto out_port; 120 goto out_port;
121 } 121 }
122 122
123 if ((err = com20020_found(dev, SA_SHIRQ)) != 0) 123 if ((err = com20020_found(dev, IRQF_SHARED)) != 0)
124 goto out_port; 124 goto out_port;
125 125
126 return 0; 126 return 0;
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
index a9bb7a4aff9..cc721addd57 100644
--- a/drivers/net/ariadne.c
+++ b/drivers/net/ariadne.c
@@ -320,7 +320,7 @@ static int ariadne_open(struct net_device *dev)
320 320
321 netif_start_queue(dev); 321 netif_start_queue(dev);
322 322
323 i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, SA_SHIRQ, 323 i = request_irq(IRQ_AMIGA_PORTS, ariadne_interrupt, IRQF_SHARED,
324 dev->name, dev); 324 dev->name, dev);
325 if (i) return i; 325 if (i) return i;
326 326
diff --git a/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c
index 613005a0285..85493b7b924 100644
--- a/drivers/net/arm/at91_ether.c
+++ b/drivers/net/arm/at91_ether.c
@@ -19,7 +19,6 @@
19 19
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/init.h> 21#include <linux/init.h>
22#include <linux/config.h>
23#include <linux/mii.h> 22#include <linux/mii.h>
24#include <linux/netdevice.h> 23#include <linux/netdevice.h>
25#include <linux/etherdevice.h> 24#include <linux/etherdevice.h>
diff --git a/drivers/net/at1700.c b/drivers/net/at1700.c
index e613cc28974..5d7929c79bc 100644
--- a/drivers/net/at1700.c
+++ b/drivers/net/at1700.c
@@ -35,7 +35,6 @@
35 response to inb()s from other device probes! 35 response to inb()s from other device probes!
36*/ 36*/
37 37
38#include <linux/config.h>
39#include <linux/errno.h> 38#include <linux/errno.h>
40#include <linux/netdevice.h> 39#include <linux/netdevice.h>
41#include <linux/etherdevice.h> 40#include <linux/etherdevice.h>
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 038d5fcb15e..55f6e3f65b5 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -35,7 +35,6 @@
35 * 35 *
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/kernel.h> 39#include <linux/kernel.h>
41#include <linux/sched.h> 40#include <linux/sched.h>
diff --git a/drivers/net/b44.c b/drivers/net/b44.c
index a7e4ba5a580..cd98d31dee8 100644
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1421,7 +1421,7 @@ static int b44_open(struct net_device *dev)
1421 1421
1422 b44_check_phy(bp); 1422 b44_check_phy(bp);
1423 1423
1424 err = request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev); 1424 err = request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev);
1425 if (unlikely(err < 0)) { 1425 if (unlikely(err < 0)) {
1426 b44_chip_reset(bp); 1426 b44_chip_reset(bp);
1427 b44_free_rings(bp); 1427 b44_free_rings(bp);
@@ -2322,7 +2322,7 @@ static int b44_resume(struct pci_dev *pdev)
2322 if (!netif_running(dev)) 2322 if (!netif_running(dev))
2323 return 0; 2323 return 0;
2324 2324
2325 if (request_irq(dev->irq, b44_interrupt, SA_SHIRQ, dev->name, dev)) 2325 if (request_irq(dev->irq, b44_interrupt, IRQF_SHARED, dev->name, dev))
2326 printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name); 2326 printk(KERN_ERR PFX "%s: request_irq failed\n", dev->name);
2327 2327
2328 spin_lock_irq(&bp->lock); 2328 spin_lock_irq(&bp->lock);
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index bbca8ae8018..6fad83f24c4 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -7,7 +7,6 @@
7 * May 1999, Al Viro: proper release of /proc/net/bmac entry, switched to 7 * May 1999, Al Viro: proper release of /proc/net/bmac entry, switched to
8 * dynamic procfs inode. 8 * dynamic procfs inode.
9 */ 9 */
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/netdevice.h> 12#include <linux/netdevice.h>
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index d55b0f7939a..4f4db5ae503 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -9,7 +9,6 @@
9 * Written by: Michael Chan (mchan@broadcom.com) 9 * Written by: Michael Chan (mchan@broadcom.com)
10 */ 10 */
11 11
12#include <linux/config.h>
13 12
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/moduleparam.h> 14#include <linux/moduleparam.h>
@@ -4261,11 +4260,11 @@ bnx2_open(struct net_device *dev)
4261 } 4260 }
4262 else { 4261 else {
4263 rc = request_irq(bp->pdev->irq, bnx2_interrupt, 4262 rc = request_irq(bp->pdev->irq, bnx2_interrupt,
4264 SA_SHIRQ, dev->name, dev); 4263 IRQF_SHARED, dev->name, dev);
4265 } 4264 }
4266 } 4265 }
4267 else { 4266 else {
4268 rc = request_irq(bp->pdev->irq, bnx2_interrupt, SA_SHIRQ, 4267 rc = request_irq(bp->pdev->irq, bnx2_interrupt, IRQF_SHARED,
4269 dev->name, dev); 4268 dev->name, dev);
4270 } 4269 }
4271 if (rc) { 4270 if (rc) {
@@ -4312,7 +4311,7 @@ bnx2_open(struct net_device *dev)
4312 4311
4313 if (!rc) { 4312 if (!rc) {
4314 rc = request_irq(bp->pdev->irq, bnx2_interrupt, 4313 rc = request_irq(bp->pdev->irq, bnx2_interrupt,
4315 SA_SHIRQ, dev->name, dev); 4314 IRQF_SHARED, dev->name, dev);
4316 } 4315 }
4317 if (rc) { 4316 if (rc) {
4318 bnx2_free_skbs(bp); 4317 bnx2_free_skbs(bp);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 8171cae0668..8b951238f3a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -33,7 +33,6 @@
33 33
34//#define BONDING_DEBUG 1 34//#define BONDING_DEBUG 1
35 35
36#include <linux/config.h>
37#include <linux/kernel.h> 36#include <linux/kernel.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/sched.h> 38#include <linux/sched.h>
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index 5a9bd95884b..cfe4dc3a93a 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -20,7 +20,6 @@
20 * file called LICENSE. 20 * file called LICENSE.
21 * 21 *
22 */ 22 */
23#include <linux/config.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/sched.h> 25#include <linux/sched.h>
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c
index 565a54f1d06..d33130f6470 100644
--- a/drivers/net/cassini.c
+++ b/drivers/net/cassini.c
@@ -66,7 +66,6 @@
66 * by default, the selective clear mask is set up to process rx packets. 66 * by default, the selective clear mask is set up to process rx packets.
67 */ 67 */
68 68
69#include <linux/config.h>
70 69
71#include <linux/module.h> 70#include <linux/module.h>
72#include <linux/kernel.h> 71#include <linux/kernel.h>
@@ -4350,7 +4349,7 @@ static int cas_open(struct net_device *dev)
4350 * mapping to expose them 4349 * mapping to expose them
4351 */ 4350 */
4352 if (request_irq(cp->pdev->irq, cas_interrupt, 4351 if (request_irq(cp->pdev->irq, cas_interrupt,
4353 SA_SHIRQ, dev->name, (void *) dev)) { 4352 IRQF_SHARED, dev->name, (void *) dev)) {
4354 printk(KERN_ERR "%s: failed to request irq !\n", 4353 printk(KERN_ERR "%s: failed to request irq !\n",
4355 cp->dev->name); 4354 cp->dev->name);
4356 err = -EAGAIN; 4355 err = -EAGAIN;
diff --git a/drivers/net/chelsio/common.h b/drivers/net/chelsio/common.h
index bf3e7b6a7a1..5d9dd14427c 100644
--- a/drivers/net/chelsio/common.h
+++ b/drivers/net/chelsio/common.h
@@ -39,7 +39,6 @@
39#ifndef _CXGB_COMMON_H_ 39#ifndef _CXGB_COMMON_H_
40#define _CXGB_COMMON_H_ 40#define _CXGB_COMMON_H_
41 41
42#include <linux/config.h>
43#include <linux/module.h> 42#include <linux/module.h>
44#include <linux/netdevice.h> 43#include <linux/netdevice.h>
45#include <linux/types.h> 44#include <linux/types.h>
diff --git a/drivers/net/chelsio/cxgb2.c b/drivers/net/chelsio/cxgb2.c
index 7fe2638ae06..e67872433e9 100644
--- a/drivers/net/chelsio/cxgb2.c
+++ b/drivers/net/chelsio/cxgb2.c
@@ -37,7 +37,6 @@
37 ****************************************************************************/ 37 ****************************************************************************/
38 38
39#include "common.h" 39#include "common.h"
40#include <linux/config.h>
41#include <linux/module.h> 40#include <linux/module.h>
42#include <linux/init.h> 41#include <linux/init.h>
43#include <linux/pci.h> 42#include <linux/pci.h>
@@ -219,7 +218,7 @@ static int cxgb_up(struct adapter *adapter)
219 218
220 t1_interrupts_clear(adapter); 219 t1_interrupts_clear(adapter);
221 if ((err = request_irq(adapter->pdev->irq, 220 if ((err = request_irq(adapter->pdev->irq,
222 t1_select_intr_handler(adapter), SA_SHIRQ, 221 t1_select_intr_handler(adapter), IRQF_SHARED,
223 adapter->name, adapter))) { 222 adapter->name, adapter))) {
224 goto out_err; 223 goto out_err;
225 } 224 }
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 53efff6da78..87f94d939ff 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -39,7 +39,6 @@
39 39
40#include "common.h" 40#include "common.h"
41 41
42#include <linux/config.h>
43#include <linux/types.h> 42#include <linux/types.h>
44#include <linux/errno.h> 43#include <linux/errno.h>
45#include <linux/pci.h> 44#include <linux/pci.h>
diff --git a/drivers/net/cris/eth_v10.c b/drivers/net/cris/eth_v10.c
index 64105e4eaf3..0eb1f8787ed 100644
--- a/drivers/net/cris/eth_v10.c
+++ b/drivers/net/cris/eth_v10.c
@@ -218,7 +218,6 @@
218 * 218 *
219 */ 219 */
220 220
221#include <linux/config.h>
222 221
223#include <linux/module.h> 222#include <linux/module.h>
224 223
@@ -672,7 +671,7 @@ e100_open(struct net_device *dev)
672 /* allocate the irq corresponding to the receiving DMA */ 671 /* allocate the irq corresponding to the receiving DMA */
673 672
674 if (request_irq(NETWORK_DMA_RX_IRQ_NBR, e100rxtx_interrupt, 673 if (request_irq(NETWORK_DMA_RX_IRQ_NBR, e100rxtx_interrupt,
675 SA_SAMPLE_RANDOM, cardname, (void *)dev)) { 674 IRQF_SAMPLE_RANDOM, cardname, (void *)dev)) {
676 goto grace_exit0; 675 goto grace_exit0;
677 } 676 }
678 677
diff --git a/drivers/net/cs89x0.c b/drivers/net/cs89x0.c
index ef54ebeb29b..47eecce35fa 100644
--- a/drivers/net/cs89x0.c
+++ b/drivers/net/cs89x0.c
@@ -100,7 +100,6 @@
100 100
101/* Always include 'config.h' first in case the user wants to turn on 101/* Always include 'config.h' first in case the user wants to turn on
102 or override something. */ 102 or override something. */
103#include <linux/config.h>
104#include <linux/module.h> 103#include <linux/module.h>
105 104
106/* 105/*
diff --git a/drivers/net/cs89x0.h b/drivers/net/cs89x0.h
index bd954aaa636..968fe11a0bf 100644
--- a/drivers/net/cs89x0.h
+++ b/drivers/net/cs89x0.h
@@ -14,7 +14,6 @@
14 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 14 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */ 15 */
16 16
17#include <linux/config.h>
18 17
19#define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */ 18#define PP_ChipID 0x0000 /* offset 0h -> Corp -ID */
20 /* offset 2h -> Model/Product Number */ 19 /* offset 2h -> Model/Product Number */
diff --git a/drivers/net/declance.c b/drivers/net/declance.c
index d3d958e7ac5..2038ca7e49c 100644
--- a/drivers/net/declance.c
+++ b/drivers/net/declance.c
@@ -42,7 +42,6 @@
42 * bits. macro 42 * bits. macro
43 */ 43 */
44 44
45#include <linux/config.h>
46#include <linux/crc32.h> 45#include <linux/crc32.h>
47#include <linux/delay.h> 46#include <linux/delay.h>
48#include <linux/errno.h> 47#include <linux/errno.h>
diff --git a/drivers/net/defxx.c b/drivers/net/defxx.c
index 5acd35c312a..91cc8cbdd44 100644
--- a/drivers/net/defxx.c
+++ b/drivers/net/defxx.c
@@ -1228,7 +1228,7 @@ static int dfx_open(struct net_device *dev)
1228 1228
1229 /* Register IRQ - support shared interrupts by passing device ptr */ 1229 /* Register IRQ - support shared interrupts by passing device ptr */
1230 1230
1231 ret = request_irq(dev->irq, dfx_interrupt, SA_SHIRQ, dev->name, dev); 1231 ret = request_irq(dev->irq, dfx_interrupt, IRQF_SHARED, dev->name, dev);
1232 if (ret) { 1232 if (ret) {
1233 printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq); 1233 printk(KERN_ERR "%s: Requested IRQ %d is busy\n", dev->name, dev->irq);
1234 return ret; 1234 return ret;
diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index e946c43d3b1..b1cbe99249c 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -235,7 +235,6 @@
235 ========================================================================= 235 =========================================================================
236*/ 236*/
237 237
238#include <linux/config.h>
239#include <linux/module.h> 238#include <linux/module.h>
240#include <linux/kernel.h> 239#include <linux/kernel.h>
241#include <linux/string.h> 240#include <linux/string.h>
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c
index e175d487668..fa4f0943297 100644
--- a/drivers/net/dgrs.c
+++ b/drivers/net/dgrs.c
@@ -1191,7 +1191,7 @@ dgrs_probe1(struct net_device *dev)
1191 if (priv->plxreg) 1191 if (priv->plxreg)
1192 OUTL(dev->base_addr + PLX_LCL2PCI_DOORBELL, 1); 1192 OUTL(dev->base_addr + PLX_LCL2PCI_DOORBELL, 1);
1193 1193
1194 rc = request_irq(dev->irq, &dgrs_intr, SA_SHIRQ, "RightSwitch", dev); 1194 rc = request_irq(dev->irq, &dgrs_intr, IRQF_SHARED, "RightSwitch", dev);
1195 if (rc) 1195 if (rc)
1196 goto err_out; 1196 goto err_out;
1197 1197
diff --git a/drivers/net/dl2k.c b/drivers/net/dl2k.c
index 038447fb5c5..4b6ddb70f92 100644
--- a/drivers/net/dl2k.c
+++ b/drivers/net/dl2k.c
@@ -390,7 +390,7 @@ parse_eeprom (struct net_device *dev)
390 for (i = 0; i < 6; i++) 390 for (i = 0; i < 6; i++)
391 dev->dev_addr[i] = psrom->mac_addr[i]; 391 dev->dev_addr[i] = psrom->mac_addr[i];
392 392
393 /* Parse Software Infomation Block */ 393 /* Parse Software Information Block */
394 i = 0x30; 394 i = 0x30;
395 psib = (u8 *) sromdata; 395 psib = (u8 *) sromdata;
396 do { 396 do {
@@ -440,7 +440,7 @@ rio_open (struct net_device *dev)
440 int i; 440 int i;
441 u16 macctrl; 441 u16 macctrl;
442 442
443 i = request_irq (dev->irq, &rio_interrupt, SA_SHIRQ, dev->name, dev); 443 i = request_irq (dev->irq, &rio_interrupt, IRQF_SHARED, dev->name, dev);
444 if (i) 444 if (i)
445 return i; 445 return i;
446 446
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 7965a9b08e7..1b758b70713 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -603,7 +603,7 @@ dm9000_open(struct net_device *dev)
603 603
604 PRINTK2("entering dm9000_open\n"); 604 PRINTK2("entering dm9000_open\n");
605 605
606 if (request_irq(dev->irq, &dm9000_interrupt, SA_SHIRQ, dev->name, dev)) 606 if (request_irq(dev->irq, &dm9000_interrupt, IRQF_SHARED, dev->name, dev))
607 return -EAGAIN; 607 return -EAGAIN;
608 608
609 /* Initialize DM9000 board */ 609 /* Initialize DM9000 board */
diff --git a/drivers/net/dummy.c b/drivers/net/dummy.c
index dd8c15ac5c7..36d511729f7 100644
--- a/drivers/net/dummy.c
+++ b/drivers/net/dummy.c
@@ -28,7 +28,6 @@
28 Alan Cox, 30th May 1994 28 Alan Cox, 30th May 1994
29*/ 29*/
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/netdevice.h> 33#include <linux/netdevice.h>
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index 93a28657092..91ef5f2fd76 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -138,7 +138,6 @@
138 * - Stratus87247: protect MDI control register manipulations 138 * - Stratus87247: protect MDI control register manipulations
139 */ 139 */
140 140
141#include <linux/config.h>
142#include <linux/module.h> 141#include <linux/module.h>
143#include <linux/moduleparam.h> 142#include <linux/moduleparam.h>
144#include <linux/kernel.h> 143#include <linux/kernel.h>
@@ -2064,7 +2063,7 @@ static int e100_up(struct nic *nic)
2064 e100_set_multicast_list(nic->netdev); 2063 e100_set_multicast_list(nic->netdev);
2065 e100_start_receiver(nic, NULL); 2064 e100_start_receiver(nic, NULL);
2066 mod_timer(&nic->watchdog, jiffies); 2065 mod_timer(&nic->watchdog, jiffies);
2067 if((err = request_irq(nic->pdev->irq, e100_intr, SA_SHIRQ, 2066 if((err = request_irq(nic->pdev->irq, e100_intr, IRQF_SHARED,
2068 nic->netdev->name, nic->netdev))) 2067 nic->netdev->name, nic->netdev)))
2069 goto err_no_irq; 2068 goto err_no_irq;
2070 netif_wake_queue(nic->netdev); 2069 netif_wake_queue(nic->netdev);
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index 2bc34fbfa69..3042d33e2d4 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -34,7 +34,6 @@
34#define _E1000_H_ 34#define _E1000_H_
35 35
36#include <linux/stddef.h> 36#include <linux/stddef.h>
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/types.h> 38#include <linux/types.h>
40#include <asm/byteorder.h> 39#include <asm/byteorder.h>
diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c
index 6ed7f599eba..d1966489176 100644
--- a/drivers/net/e1000/e1000_ethtool.c
+++ b/drivers/net/e1000/e1000_ethtool.c
@@ -871,10 +871,10 @@ e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
871 *data = 0; 871 *data = 0;
872 872
873 /* Hook up test interrupt handler just for this test */ 873 /* Hook up test interrupt handler just for this test */
874 if (!request_irq(irq, &e1000_test_intr, SA_PROBEIRQ, netdev->name, 874 if (!request_irq(irq, &e1000_test_intr, IRQF_PROBE_SHARED,
875 netdev)) { 875 netdev->name, netdev)) {
876 shared_int = FALSE; 876 shared_int = FALSE;
877 } else if (request_irq(irq, &e1000_test_intr, SA_SHIRQ, 877 } else if (request_irq(irq, &e1000_test_intr, IRQF_SHARED,
878 netdev->name, netdev)){ 878 netdev->name, netdev)){
879 *data = 1; 879 *data = 1;
880 return -1; 880 return -1;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 32b7d444b37..f77624f5f17 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -426,7 +426,7 @@ e1000_up(struct e1000_adapter *adapter)
426 } 426 }
427#endif 427#endif
428 if ((err = request_irq(adapter->pdev->irq, &e1000_intr, 428 if ((err = request_irq(adapter->pdev->irq, &e1000_intr,
429 SA_SHIRQ | SA_SAMPLE_RANDOM, 429 IRQF_SHARED | IRQF_SAMPLE_RANDOM,
430 netdev->name, netdev))) { 430 netdev->name, netdev))) {
431 DPRINTK(PROBE, ERR, 431 DPRINTK(PROBE, ERR,
432 "Unable to allocate interrupt Error: %d\n", err); 432 "Unable to allocate interrupt Error: %d\n", err);
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c
index e70f172699d..20d31430c74 100644
--- a/drivers/net/eepro.c
+++ b/drivers/net/eepro.c
@@ -920,7 +920,7 @@ static int eepro_grab_irq(struct net_device *dev)
920 920
921 eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */ 921 eepro_sw2bank0(ioaddr); /* Switch back to Bank 0 */
922 922
923 if (request_irq (*irqp, NULL, SA_SHIRQ, "bogus", dev) != EBUSY) { 923 if (request_irq (*irqp, NULL, IRQF_SHARED, "bogus", dev) != EBUSY) {
924 unsigned long irq_mask; 924 unsigned long irq_mask;
925 /* Twinkle the interrupt, and check if it's seen */ 925 /* Twinkle the interrupt, and check if it's seen */
926 irq_mask = probe_irq_on(); 926 irq_mask = probe_irq_on();
diff --git a/drivers/net/eepro100.c b/drivers/net/eepro100.c
index ecf5ad85a68..2ad32754292 100644
--- a/drivers/net/eepro100.c
+++ b/drivers/net/eepro100.c
@@ -87,7 +87,6 @@ static int options[] = {-1, -1, -1, -1, -1, -1, -1, -1};
87/* Size of an pre-allocated Rx buffer: <Ethernet MTU> + slack.*/ 87/* Size of an pre-allocated Rx buffer: <Ethernet MTU> + slack.*/
88#define PKT_BUF_SZ 1536 88#define PKT_BUF_SZ 1536
89 89
90#include <linux/config.h>
91#include <linux/module.h> 90#include <linux/module.h>
92 91
93#include <linux/kernel.h> 92#include <linux/kernel.h>
@@ -978,7 +977,7 @@ speedo_open(struct net_device *dev)
978 sp->in_interrupt = 0; 977 sp->in_interrupt = 0;
979 978
980 /* .. we can safely take handler calls during init. */ 979 /* .. we can safely take handler calls during init. */
981 retval = request_irq(dev->irq, &speedo_interrupt, SA_SHIRQ, dev->name, dev); 980 retval = request_irq(dev->irq, &speedo_interrupt, IRQF_SHARED, dev->name, dev);
982 if (retval) { 981 if (retval) {
983 return retval; 982 return retval;
984 } 983 }
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c
index a74b2071575..33291bcf6d4 100644
--- a/drivers/net/eexpress.c
+++ b/drivers/net/eexpress.c
@@ -97,7 +97,6 @@
97#define LOCKUP16 0 97#define LOCKUP16 0
98#endif 98#endif
99 99
100#include <linux/config.h>
101#include <linux/module.h> 100#include <linux/module.h>
102#include <linux/kernel.h> 101#include <linux/kernel.h>
103#include <linux/types.h> 102#include <linux/types.h>
diff --git a/drivers/net/epic100.c b/drivers/net/epic100.c
index ee34a16eb4e..9f3e09a3d88 100644
--- a/drivers/net/epic100.c
+++ b/drivers/net/epic100.c
@@ -114,7 +114,6 @@ static int rx_copybreak;
114#define TX_FIFO_THRESH 256 114#define TX_FIFO_THRESH 256
115#define RX_FIFO_THRESH 1 /* 0-3, 0==32, 64,96, or 3==128 bytes */ 115#define RX_FIFO_THRESH 1 /* 0-3, 0==32, 64,96, or 3==128 bytes */
116 116
117#include <linux/config.h>
118#include <linux/module.h> 117#include <linux/module.h>
119#include <linux/kernel.h> 118#include <linux/kernel.h>
120#include <linux/string.h> 119#include <linux/string.h>
@@ -714,7 +713,7 @@ static int epic_open(struct net_device *dev)
714 /* Soft reset the chip. */ 713 /* Soft reset the chip. */
715 outl(0x4001, ioaddr + GENCTL); 714 outl(0x4001, ioaddr + GENCTL);
716 715
717 if ((retval = request_irq(dev->irq, &epic_interrupt, SA_SHIRQ, dev->name, dev))) 716 if ((retval = request_irq(dev->irq, &epic_interrupt, IRQF_SHARED, dev->name, dev)))
718 return retval; 717 return retval;
719 718
720 epic_init_ring(dev); 719 epic_init_ring(dev);
diff --git a/drivers/net/fealnx.c b/drivers/net/fealnx.c
index 13eca7ede2a..c701951dcd6 100644
--- a/drivers/net/fealnx.c
+++ b/drivers/net/fealnx.c
@@ -834,7 +834,7 @@ static int netdev_open(struct net_device *dev)
834 834
835 iowrite32(0x00000001, ioaddr + BCR); /* Reset */ 835 iowrite32(0x00000001, ioaddr + BCR); /* Reset */
836 836
837 if (request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev)) 837 if (request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev))
838 return -EAGAIN; 838 return -EAGAIN;
839 839
840 for (i = 0; i < 3; i++) 840 for (i = 0; i < 3; i++)
diff --git a/drivers/net/fec.c b/drivers/net/fec.c
index db694c83298..9b403003174 100644
--- a/drivers/net/fec.c
+++ b/drivers/net/fec.c
@@ -25,7 +25,6 @@
25 * Copyright (c) 2004-2006 Macq Electronique SA. 25 * Copyright (c) 2004-2006 Macq Electronique SA.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/string.h> 30#include <linux/string.h>
diff --git a/drivers/net/fec_8xx/fec_8xx-netta.c b/drivers/net/fec_8xx/fec_8xx-netta.c
index 29c275e1d56..790d9dbe42d 100644
--- a/drivers/net/fec_8xx/fec_8xx-netta.c
+++ b/drivers/net/fec_8xx/fec_8xx-netta.c
@@ -2,7 +2,6 @@
2 * FEC instantatiation file for NETTA 2 * FEC instantatiation file for NETTA
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7#include <linux/types.h> 6#include <linux/types.h>
8#include <linux/sched.h> 7#include <linux/sched.h>
diff --git a/drivers/net/fec_8xx/fec_main.c b/drivers/net/fec_8xx/fec_main.c
index 7e433809713..282b1452c39 100644
--- a/drivers/net/fec_8xx/fec_main.c
+++ b/drivers/net/fec_8xx/fec_main.c
@@ -10,7 +10,6 @@
10 * Released under the GPL 10 * Released under the GPL
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/types.h> 15#include <linux/types.h>
diff --git a/drivers/net/fec_8xx/fec_mii.c b/drivers/net/fec_8xx/fec_mii.c
index 3b44ac1a7bf..d3c16b85d9a 100644
--- a/drivers/net/fec_8xx/fec_mii.c
+++ b/drivers/net/fec_8xx/fec_mii.c
@@ -10,7 +10,6 @@
10 * Released under the GPL 10 * Released under the GPL
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 21be4fa071b..3c90003f423 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2622,21 +2622,21 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
2622 np->msi_flags |= NV_MSI_X_ENABLED; 2622 np->msi_flags |= NV_MSI_X_ENABLED;
2623 if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) { 2623 if (optimization_mode == NV_OPTIMIZATION_MODE_THROUGHPUT && !intr_test) {
2624 /* Request irq for rx handling */ 2624 /* Request irq for rx handling */
2625 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, SA_SHIRQ, dev->name, dev) != 0) { 2625 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_RX].vector, &nv_nic_irq_rx, IRQF_SHARED, dev->name, dev) != 0) {
2626 printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret); 2626 printk(KERN_INFO "forcedeth: request_irq failed for rx %d\n", ret);
2627 pci_disable_msix(np->pci_dev); 2627 pci_disable_msix(np->pci_dev);
2628 np->msi_flags &= ~NV_MSI_X_ENABLED; 2628 np->msi_flags &= ~NV_MSI_X_ENABLED;
2629 goto out_err; 2629 goto out_err;
2630 } 2630 }
2631 /* Request irq for tx handling */ 2631 /* Request irq for tx handling */
2632 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, SA_SHIRQ, dev->name, dev) != 0) { 2632 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_TX].vector, &nv_nic_irq_tx, IRQF_SHARED, dev->name, dev) != 0) {
2633 printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret); 2633 printk(KERN_INFO "forcedeth: request_irq failed for tx %d\n", ret);
2634 pci_disable_msix(np->pci_dev); 2634 pci_disable_msix(np->pci_dev);
2635 np->msi_flags &= ~NV_MSI_X_ENABLED; 2635 np->msi_flags &= ~NV_MSI_X_ENABLED;
2636 goto out_free_rx; 2636 goto out_free_rx;
2637 } 2637 }
2638 /* Request irq for link and timer handling */ 2638 /* Request irq for link and timer handling */
2639 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, SA_SHIRQ, dev->name, dev) != 0) { 2639 if (request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_OTHER].vector, &nv_nic_irq_other, IRQF_SHARED, dev->name, dev) != 0) {
2640 printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret); 2640 printk(KERN_INFO "forcedeth: request_irq failed for link %d\n", ret);
2641 pci_disable_msix(np->pci_dev); 2641 pci_disable_msix(np->pci_dev);
2642 np->msi_flags &= ~NV_MSI_X_ENABLED; 2642 np->msi_flags &= ~NV_MSI_X_ENABLED;
@@ -2651,9 +2651,9 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
2651 } else { 2651 } else {
2652 /* Request irq for all interrupts */ 2652 /* Request irq for all interrupts */
2653 if ((!intr_test && 2653 if ((!intr_test &&
2654 request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) || 2654 request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) ||
2655 (intr_test && 2655 (intr_test &&
2656 request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq_test, SA_SHIRQ, dev->name, dev) != 0)) { 2656 request_irq(np->msi_x_entry[NV_MSI_X_VECTOR_ALL].vector, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) {
2657 printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); 2657 printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
2658 pci_disable_msix(np->pci_dev); 2658 pci_disable_msix(np->pci_dev);
2659 np->msi_flags &= ~NV_MSI_X_ENABLED; 2659 np->msi_flags &= ~NV_MSI_X_ENABLED;
@@ -2669,8 +2669,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
2669 if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) { 2669 if (ret != 0 && np->msi_flags & NV_MSI_CAPABLE) {
2670 if ((ret = pci_enable_msi(np->pci_dev)) == 0) { 2670 if ((ret = pci_enable_msi(np->pci_dev)) == 0) {
2671 np->msi_flags |= NV_MSI_ENABLED; 2671 np->msi_flags |= NV_MSI_ENABLED;
2672 if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) || 2672 if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) ||
2673 (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, SA_SHIRQ, dev->name, dev) != 0)) { 2673 (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0)) {
2674 printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret); 2674 printk(KERN_INFO "forcedeth: request_irq failed %d\n", ret);
2675 pci_disable_msi(np->pci_dev); 2675 pci_disable_msi(np->pci_dev);
2676 np->msi_flags &= ~NV_MSI_ENABLED; 2676 np->msi_flags &= ~NV_MSI_ENABLED;
@@ -2685,8 +2685,8 @@ static int nv_request_irq(struct net_device *dev, int intr_test)
2685 } 2685 }
2686 } 2686 }
2687 if (ret != 0) { 2687 if (ret != 0) {
2688 if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, SA_SHIRQ, dev->name, dev) != 0) || 2688 if ((!intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq, IRQF_SHARED, dev->name, dev) != 0) ||
2689 (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, SA_SHIRQ, dev->name, dev) != 0)) 2689 (intr_test && request_irq(np->pci_dev->irq, &nv_nic_irq_test, IRQF_SHARED, dev->name, dev) != 0))
2690 goto out_err; 2690 goto out_err;
2691 2691
2692 } 2692 }
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index 196298f33db..f6abff5846b 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -15,7 +15,6 @@
15 * kind, whether express or implied. 15 * kind, whether express or implied.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/types.h> 20#include <linux/types.h>
@@ -672,7 +671,7 @@ static int fs_request_irq(struct net_device *dev, int irq, const char *name,
672 struct fs_enet_private *fep = netdev_priv(dev); 671 struct fs_enet_private *fep = netdev_priv(dev);
673 672
674 (*fep->ops->pre_request_irq)(dev, irq); 673 (*fep->ops->pre_request_irq)(dev, irq);
675 return request_irq(irq, irqf, SA_SHIRQ, name, dev); 674 return request_irq(irq, irqf, IRQF_SHARED, name, dev);
676} 675}
677 676
678static void fs_free_irq(struct net_device *dev, int irq) 677static void fs_free_irq(struct net_device *dev, int irq)
diff --git a/drivers/net/fs_enet/fs_enet-mii.c b/drivers/net/fs_enet/fs_enet-mii.c
index 0cd07150bf4..b7e6e21725c 100644
--- a/drivers/net/fs_enet/fs_enet-mii.c
+++ b/drivers/net/fs_enet/fs_enet-mii.c
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c
index 95e2bb8dd7b..64e20982c1f 100644
--- a/drivers/net/fs_enet/mac-fcc.c
+++ b/drivers/net/fs_enet/mac-fcc.c
@@ -12,7 +12,6 @@
12 * kind, whether express or implied. 12 * kind, whether express or implied.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
index 3dad69dfdb2..e0954707752 100644
--- a/drivers/net/fs_enet/mac-fec.c
+++ b/drivers/net/fs_enet/mac-fec.c
@@ -12,7 +12,6 @@
12 * kind, whether express or implied. 12 * kind, whether express or implied.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index a772b286f96..eaa24fab645 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -12,7 +12,6 @@
12 * kind, whether express or implied. 12 * kind, whether express or implied.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c
index 24a5e2e23d1..48f9cf83ab6 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/drivers/net/fs_enet/mii-fixed.c b/drivers/net/fs_enet/mii-fixed.c
index b3e192d612e..ae4a9c3bb39 100644
--- a/drivers/net/fs_enet/mii-fixed.c
+++ b/drivers/net/fs_enet/mii-fixed.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 218d31764c5..ebbbd6ca620 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -64,7 +64,6 @@
64 * The driver then cleans up the buffer. 64 * The driver then cleans up the buffer.
65 */ 65 */
66 66
67#include <linux/config.h>
68#include <linux/kernel.h> 67#include <linux/kernel.h>
69#include <linux/sched.h> 68#include <linux/sched.h>
70#include <linux/string.h> 69#include <linux/string.h>
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 127c98cf333..f87bbc408da 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -22,7 +22,6 @@
22#ifndef __GIANFAR_H 22#ifndef __GIANFAR_H
23#define __GIANFAR_H 23#define __GIANFAR_H
24 24
25#include <linux/config.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/string.h> 27#include <linux/string.h>
diff --git a/drivers/net/gianfar_ethtool.c b/drivers/net/gianfar_ethtool.c
index d69698c695e..e0f505285e5 100644
--- a/drivers/net/gianfar_ethtool.c
+++ b/drivers/net/gianfar_ethtool.c
@@ -15,7 +15,6 @@
15 * by reference. 15 * by reference.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/string.h> 20#include <linux/string.h>
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c
index c6b725529af..c92e65984fd 100644
--- a/drivers/net/gianfar_mii.c
+++ b/drivers/net/gianfar_mii.c
@@ -16,7 +16,6 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/string.h> 21#include <linux/string.h>
diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c
index a6d5c43199c..e8a18f18d08 100644
--- a/drivers/net/gianfar_sysfs.c
+++ b/drivers/net/gianfar_sysfs.c
@@ -19,7 +19,6 @@
19 * Sysfs file creation and management 19 * Sysfs file creation and management
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
25#include <linux/string.h> 24#include <linux/string.h>
diff --git a/drivers/net/gt96100eth.c b/drivers/net/gt96100eth.c
index 2d243540461..49dacc6e35a 100644
--- a/drivers/net/gt96100eth.c
+++ b/drivers/net/gt96100eth.c
@@ -1030,7 +1030,7 @@ gt96100_open(struct net_device *dev)
1030 } 1030 }
1031 1031
1032 if ((retval = request_irq(dev->irq, &gt96100_interrupt, 1032 if ((retval = request_irq(dev->irq, &gt96100_interrupt,
1033 SA_SHIRQ, dev->name, dev))) { 1033 IRQF_SHARED, dev->name, dev))) {
1034 err("unable to get IRQ %d\n", dev->irq); 1034 err("unable to get IRQ %d\n", dev->irq);
1035 return retval; 1035 return retval;
1036 } 1036 }
diff --git a/drivers/net/gt96100eth.h b/drivers/net/gt96100eth.h
index 395869c5ed3..2a8331938b8 100644
--- a/drivers/net/gt96100eth.h
+++ b/drivers/net/gt96100eth.h
@@ -27,7 +27,6 @@
27#ifndef _GT96100ETH_H 27#ifndef _GT96100ETH_H
28#define _GT96100ETH_H 28#define _GT96100ETH_H
29 29
30#include <linux/config.h>
31#include <asm/galileo-boards/gt96100.h> 30#include <asm/galileo-boards/gt96100.h>
32 31
33#define dbg(lvl, format, arg...) \ 32#define dbg(lvl, format, arg...) \
diff --git a/drivers/net/hamachi.c b/drivers/net/hamachi.c
index 0ea4cb4a0d8..7bcd939c6ed 100644
--- a/drivers/net/hamachi.c
+++ b/drivers/net/hamachi.c
@@ -871,7 +871,7 @@ static int hamachi_open(struct net_device *dev)
871 u32 rx_int_var, tx_int_var; 871 u32 rx_int_var, tx_int_var;
872 u16 fifo_info; 872 u16 fifo_info;
873 873
874 i = request_irq(dev->irq, &hamachi_interrupt, SA_SHIRQ, dev->name, dev); 874 i = request_irq(dev->irq, &hamachi_interrupt, IRQF_SHARED, dev->name, dev);
875 if (i) 875 if (i)
876 return i; 876 return i;
877 877
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index d12605f0ac7..86b3bb9bec2 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -12,7 +12,6 @@
12 * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org> 12 * Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <asm/system.h> 16#include <asm/system.h>
18#include <asm/uaccess.h> 17#include <asm/uaccess.h>
diff --git a/drivers/net/hamradio/baycom_ser_fdx.c b/drivers/net/hamradio/baycom_ser_fdx.c
index 232793d2ce6..55906c7b4bb 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -434,7 +434,7 @@ static int ser12_open(struct net_device *dev)
434 outb(0, FCR(dev->base_addr)); /* disable FIFOs */ 434 outb(0, FCR(dev->base_addr)); /* disable FIFOs */
435 outb(0x0d, MCR(dev->base_addr)); 435 outb(0x0d, MCR(dev->base_addr));
436 outb(0, IER(dev->base_addr)); 436 outb(0, IER(dev->base_addr));
437 if (request_irq(dev->irq, ser12_interrupt, SA_INTERRUPT | SA_SHIRQ, 437 if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
438 "baycom_ser_fdx", dev)) { 438 "baycom_ser_fdx", dev)) {
439 release_region(dev->base_addr, SER12_EXTENT); 439 release_region(dev->base_addr, SER12_EXTENT);
440 return -EBUSY; 440 return -EBUSY;
diff --git a/drivers/net/hamradio/baycom_ser_hdx.c b/drivers/net/hamradio/baycom_ser_hdx.c
index be596a3eb3f..de95de8983d 100644
--- a/drivers/net/hamradio/baycom_ser_hdx.c
+++ b/drivers/net/hamradio/baycom_ser_hdx.c
@@ -488,7 +488,7 @@ static int ser12_open(struct net_device *dev)
488 outb(0, FCR(dev->base_addr)); /* disable FIFOs */ 488 outb(0, FCR(dev->base_addr)); /* disable FIFOs */
489 outb(0x0d, MCR(dev->base_addr)); 489 outb(0x0d, MCR(dev->base_addr));
490 outb(0, IER(dev->base_addr)); 490 outb(0, IER(dev->base_addr));
491 if (request_irq(dev->irq, ser12_interrupt, SA_INTERRUPT | SA_SHIRQ, 491 if (request_irq(dev->irq, ser12_interrupt, IRQF_DISABLED | IRQF_SHARED,
492 "baycom_ser12", dev)) { 492 "baycom_ser12", dev)) {
493 release_region(dev->base_addr, SER12_EXTENT); 493 release_region(dev->base_addr, SER12_EXTENT);
494 return -EBUSY; 494 return -EBUSY;
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index cb43a9d2877..0641f54fc63 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -54,7 +54,6 @@
54 * BPQ 004 Joerg(DL1BKE) Fixed to not lock up on ifconfig. 54 * BPQ 004 Joerg(DL1BKE) Fixed to not lock up on ifconfig.
55 */ 55 */
56 56
57#include <linux/config.h>
58#include <linux/errno.h> 57#include <linux/errno.h>
59#include <linux/types.h> 58#include <linux/types.h>
60#include <linux/socket.h> 59#include <linux/socket.h>
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 3ebbbe56b6e..d8715b200c1 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -16,7 +16,6 @@
16 * Copyright (C) 2004, 05 Ralf Baechle DL5RB <ralf@linux-mips.org> 16 * Copyright (C) 2004, 05 Ralf Baechle DL5RB <ralf@linux-mips.org>
17 * Copyright (C) 2004, 05 Thomas Osterried DL9SAU <thomas@x-berg.in-berlin.de> 17 * Copyright (C) 2004, 05 Thomas Osterried DL9SAU <thomas@x-berg.in-berlin.de>
18 */ 18 */
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <asm/system.h> 20#include <asm/system.h>
22#include <linux/bitops.h> 21#include <linux/bitops.h>
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 5927784df3f..df4b68142ac 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -148,7 +148,6 @@
148 148
149/* ----------------------------------------------------------------------- */ 149/* ----------------------------------------------------------------------- */
150 150
151#include <linux/config.h>
152#include <linux/module.h> 151#include <linux/module.h>
153#include <linux/errno.h> 152#include <linux/errno.h>
154#include <linux/signal.h> 153#include <linux/signal.h>
@@ -1737,7 +1736,7 @@ static int scc_net_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
1737 1736
1738 if (!Ivec[hwcfg.irq].used && hwcfg.irq) 1737 if (!Ivec[hwcfg.irq].used && hwcfg.irq)
1739 { 1738 {
1740 if (request_irq(hwcfg.irq, scc_isr, SA_INTERRUPT, "AX.25 SCC", NULL)) 1739 if (request_irq(hwcfg.irq, scc_isr, IRQF_DISABLED, "AX.25 SCC", NULL))
1741 printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq); 1740 printk(KERN_WARNING "z8530drv: warning, cannot get IRQ %d\n", hwcfg.irq);
1742 else 1741 else
1743 Ivec[hwcfg.irq].used = 1; 1742 Ivec[hwcfg.irq].used = 1;
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index b49884048ca..f98f5777dfb 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -42,7 +42,6 @@
42 42
43/*****************************************************************************/ 43/*****************************************************************************/
44 44
45#include <linux/config.h>
46#include <linux/module.h> 45#include <linux/module.h>
47#include <linux/types.h> 46#include <linux/types.h>
48#include <linux/net.h> 47#include <linux/net.h>
@@ -874,7 +873,7 @@ static int yam_open(struct net_device *dev)
874 goto out_release_base; 873 goto out_release_base;
875 } 874 }
876 outb(0, IER(dev->base_addr)); 875 outb(0, IER(dev->base_addr));
877 if (request_irq(dev->irq, yam_interrupt, SA_INTERRUPT | SA_SHIRQ, dev->name, dev)) { 876 if (request_irq(dev->irq, yam_interrupt, IRQF_DISABLED | IRQF_SHARED, dev->name, dev)) {
878 printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq); 877 printk(KERN_ERR "%s: irq %d busy\n", dev->name, dev->irq);
879 ret = -EBUSY; 878 ret = -EBUSY;
880 goto out_release_base; 879 goto out_release_base;
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c
index dd1dc32dc98..e7d9bf33028 100644
--- a/drivers/net/hp100.c
+++ b/drivers/net/hp100.c
@@ -1079,7 +1079,7 @@ static int hp100_open(struct net_device *dev)
1079 /* New: if bus is PCI or EISA, interrupts might be shared interrupts */ 1079 /* New: if bus is PCI or EISA, interrupts might be shared interrupts */
1080 if (request_irq(dev->irq, hp100_interrupt, 1080 if (request_irq(dev->irq, hp100_interrupt,
1081 lp->bus == HP100_BUS_PCI || lp->bus == 1081 lp->bus == HP100_BUS_PCI || lp->bus ==
1082 HP100_BUS_EISA ? SA_SHIRQ : SA_INTERRUPT, 1082 HP100_BUS_EISA ? IRQF_SHARED : IRQF_DISABLED,
1083 "hp100", dev)) { 1083 "hp100", dev)) {
1084 printk("hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq); 1084 printk("hp100: %s: unable to get IRQ %d\n", dev->name, dev->irq);
1085 return -EAGAIN; 1085 return -EAGAIN;
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c
index d9fb8e74e63..91326ea3e12 100644
--- a/drivers/net/hydra.c
+++ b/drivers/net/hydra.c
@@ -117,7 +117,7 @@ static int __devinit hydra_init(struct zorro_dev *z)
117 dev->irq = IRQ_AMIGA_PORTS; 117 dev->irq = IRQ_AMIGA_PORTS;
118 118
119 /* Install the Interrupt handler */ 119 /* Install the Interrupt handler */
120 if (request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, "Hydra Ethernet", 120 if (request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, "Hydra Ethernet",
121 dev)) { 121 dev)) {
122 free_netdev(dev); 122 free_netdev(dev);
123 return -EAGAIN; 123 return -EAGAIN;
diff --git a/drivers/net/ibm_emac/ibm_emac.h b/drivers/net/ibm_emac/ibm_emac.h
index c2dae6092c4..97ed22bb432 100644
--- a/drivers/net/ibm_emac/ibm_emac.h
+++ b/drivers/net/ibm_emac/ibm_emac.h
@@ -20,7 +20,6 @@
20#ifndef __IBM_EMAC_H_ 20#ifndef __IBM_EMAC_H_
21#define __IBM_EMAC_H_ 21#define __IBM_EMAC_H_
22 22
23#include <linux/config.h>
24#include <linux/types.h> 23#include <linux/types.h>
25 24
26/* This is a simple check to prevent use of this driver on non-tested SoCs */ 25/* This is a simple check to prevent use of this driver on non-tested SoCs */
diff --git a/drivers/net/ibm_emac/ibm_emac_core.c b/drivers/net/ibm_emac/ibm_emac_core.c
index 7e49522b8b3..82468e2dc79 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.c
+++ b/drivers/net/ibm_emac/ibm_emac_core.c
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_core.h b/drivers/net/ibm_emac/ibm_emac_core.h
index f61273b2e94..dabb94afeb9 100644
--- a/drivers/net/ibm_emac/ibm_emac_core.h
+++ b/drivers/net/ibm_emac/ibm_emac_core.h
@@ -20,7 +20,6 @@
20#ifndef __IBM_EMAC_CORE_H_ 20#ifndef __IBM_EMAC_CORE_H_
21#define __IBM_EMAC_CORE_H_ 21#define __IBM_EMAC_CORE_H_
22 22
23#include <linux/config.h>
24#include <linux/netdevice.h> 23#include <linux/netdevice.h>
25#include <linux/dma-mapping.h> 24#include <linux/dma-mapping.h>
26#include <asm/ocp.h> 25#include <asm/ocp.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_debug.c b/drivers/net/ibm_emac/ibm_emac_debug.c
index c7e1ecfa08f..c3645908034 100644
--- a/drivers/net/ibm_emac/ibm_emac_debug.c
+++ b/drivers/net/ibm_emac/ibm_emac_debug.c
@@ -12,7 +12,6 @@
12 * option) any later version. 12 * option) any later version.
13 * 13 *
14 */ 14 */
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_debug.h b/drivers/net/ibm_emac/ibm_emac_debug.h
index e85fbe0a8da..5761389495d 100644
--- a/drivers/net/ibm_emac/ibm_emac_debug.h
+++ b/drivers/net/ibm_emac/ibm_emac_debug.h
@@ -15,7 +15,6 @@
15#ifndef __IBM_EMAC_DEBUG_H_ 15#ifndef __IBM_EMAC_DEBUG_H_
16#define __IBM_EMAC_DEBUG_H_ 16#define __IBM_EMAC_DEBUG_H_
17 17
18#include <linux/config.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include "ibm_emac_core.h" 19#include "ibm_emac_core.h"
21#include "ibm_emac_mal.h" 20#include "ibm_emac_mal.h"
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.c b/drivers/net/ibm_emac/ibm_emac_mal.c
index da88d43081c..af50e7b2e0d 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.c
+++ b/drivers/net/ibm_emac/ibm_emac_mal.c
@@ -19,7 +19,6 @@
19 * option) any later version. 19 * option) any later version.
20 * 20 *
21 */ 21 */
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_mal.h b/drivers/net/ibm_emac/ibm_emac_mal.h
index 2a2d3b24b03..f73f10a0a56 100644
--- a/drivers/net/ibm_emac/ibm_emac_mal.h
+++ b/drivers/net/ibm_emac/ibm_emac_mal.h
@@ -19,7 +19,6 @@
19#ifndef __IBM_EMAC_MAL_H_ 19#ifndef __IBM_EMAC_MAL_H_
20#define __IBM_EMAC_MAL_H_ 20#define __IBM_EMAC_MAL_H_
21 21
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/list.h> 23#include <linux/list.h>
25#include <linux/netdevice.h> 24#include <linux/netdevice.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_phy.c b/drivers/net/ibm_emac/ibm_emac_phy.c
index 67935dd33a6..4a97024061e 100644
--- a/drivers/net/ibm_emac/ibm_emac_phy.c
+++ b/drivers/net/ibm_emac/ibm_emac_phy.c
@@ -12,7 +12,6 @@
12 * (c) 2004-2005, Eugene Surovegin <ebs@ebshome.net> 12 * (c) 2004-2005, Eugene Surovegin <ebs@ebshome.net>
13 * 13 *
14 */ 14 */
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_rgmii.c b/drivers/net/ibm_emac/ibm_emac_rgmii.c
index f0b1ffb2dbb..53d281cb9a1 100644
--- a/drivers/net/ibm_emac/ibm_emac_rgmii.c
+++ b/drivers/net/ibm_emac/ibm_emac_rgmii.c
@@ -16,7 +16,6 @@
16 * option) any later version. 16 * option) any later version.
17 * 17 *
18 */ 18 */
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/ethtool.h> 20#include <linux/ethtool.h>
22#include <asm/io.h> 21#include <asm/io.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_rgmii.h b/drivers/net/ibm_emac/ibm_emac_rgmii.h
index 7f03d536c9a..94abde55e2e 100644
--- a/drivers/net/ibm_emac/ibm_emac_rgmii.h
+++ b/drivers/net/ibm_emac/ibm_emac_rgmii.h
@@ -21,7 +21,6 @@
21#ifndef _IBM_EMAC_RGMII_H_ 21#ifndef _IBM_EMAC_RGMII_H_
22#define _IBM_EMAC_RGMII_H_ 22#define _IBM_EMAC_RGMII_H_
23 23
24#include <linux/config.h>
25 24
26/* RGMII bridge */ 25/* RGMII bridge */
27struct rgmii_regs { 26struct rgmii_regs {
diff --git a/drivers/net/ibm_emac/ibm_emac_tah.c b/drivers/net/ibm_emac/ibm_emac_tah.c
index af08afc22f9..e287b451bb4 100644
--- a/drivers/net/ibm_emac/ibm_emac_tah.c
+++ b/drivers/net/ibm_emac/ibm_emac_tah.c
@@ -13,7 +13,6 @@
13 * Free Software Foundation; either version 2 of the License, or (at your 13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version. 14 * option) any later version.
15 */ 15 */
16#include <linux/config.h>
17#include <asm/io.h> 16#include <asm/io.h>
18 17
19#include "ibm_emac_core.h" 18#include "ibm_emac_core.h"
diff --git a/drivers/net/ibm_emac/ibm_emac_tah.h b/drivers/net/ibm_emac/ibm_emac_tah.h
index 9299b5dd7eb..38153945a24 100644
--- a/drivers/net/ibm_emac/ibm_emac_tah.h
+++ b/drivers/net/ibm_emac/ibm_emac_tah.h
@@ -17,7 +17,6 @@
17#ifndef _IBM_EMAC_TAH_H 17#ifndef _IBM_EMAC_TAH_H
18#define _IBM_EMAC_TAH_H 18#define _IBM_EMAC_TAH_H
19 19
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <asm/ocp.h> 21#include <asm/ocp.h>
23 22
diff --git a/drivers/net/ibm_emac/ibm_emac_zmii.c b/drivers/net/ibm_emac/ibm_emac_zmii.c
index e129e0aaa04..37dc8f34286 100644
--- a/drivers/net/ibm_emac/ibm_emac_zmii.c
+++ b/drivers/net/ibm_emac/ibm_emac_zmii.c
@@ -16,7 +16,6 @@
16 * option) any later version. 16 * option) any later version.
17 * 17 *
18 */ 18 */
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/ethtool.h> 20#include <linux/ethtool.h>
22#include <asm/io.h> 21#include <asm/io.h>
diff --git a/drivers/net/ibm_emac/ibm_emac_zmii.h b/drivers/net/ibm_emac/ibm_emac_zmii.h
index 92c85441075..972e3a44a09 100644
--- a/drivers/net/ibm_emac/ibm_emac_zmii.h
+++ b/drivers/net/ibm_emac/ibm_emac_zmii.h
@@ -19,7 +19,6 @@
19#ifndef _IBM_EMAC_ZMII_H_ 19#ifndef _IBM_EMAC_ZMII_H_
20#define _IBM_EMAC_ZMII_H_ 20#define _IBM_EMAC_ZMII_H_
21 21
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <asm/ocp.h> 23#include <asm/ocp.h>
25 24
diff --git a/drivers/net/ibmlana.c b/drivers/net/ibmlana.c
index 51fd51609ea..2a95d72fa59 100644
--- a/drivers/net/ibmlana.c
+++ b/drivers/net/ibmlana.c
@@ -782,7 +782,7 @@ static int ibmlana_open(struct net_device *dev)
782 782
783 /* register resources - only necessary for IRQ */ 783 /* register resources - only necessary for IRQ */
784 784
785 result = request_irq(priv->realirq, irq_handler, SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); 785 result = request_irq(priv->realirq, irq_handler, IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
786 if (result != 0) { 786 if (result != 0) {
787 printk(KERN_ERR "%s: failed to register irq %d\n", dev->name, dev->irq); 787 printk(KERN_ERR "%s: failed to register irq %d\n", dev->name, dev->irq);
788 return result; 788 return result;
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
index 4c2e7279ba3..0464e78f733 100644
--- a/drivers/net/ibmveth.c
+++ b/drivers/net/ibmveth.c
@@ -33,7 +33,6 @@
33 - possibly remove procfs support 33 - possibly remove procfs support
34*/ 34*/
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/types.h> 37#include <linux/types.h>
39#include <linux/errno.h> 38#include <linux/errno.h>
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index 2e222ef91e2..3a42afab503 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -27,7 +27,6 @@
27*/ 27*/
28 28
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/netdevice.h> 32#include <linux/netdevice.h>
diff --git a/drivers/net/ioc3-eth.c b/drivers/net/ioc3-eth.c
index e76e6e7be0b..68d8af7df08 100644
--- a/drivers/net/ioc3-eth.c
+++ b/drivers/net/ioc3-eth.c
@@ -30,7 +30,6 @@
30#define IOC3_NAME "ioc3-eth" 30#define IOC3_NAME "ioc3-eth"
31#define IOC3_VERSION "2.6.3-3" 31#define IOC3_VERSION "2.6.3-3"
32 32
33#include <linux/config.h>
34#include <linux/init.h> 33#include <linux/init.h>
35#include <linux/delay.h> 34#include <linux/delay.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
@@ -1064,7 +1063,7 @@ static int ioc3_open(struct net_device *dev)
1064{ 1063{
1065 struct ioc3_private *ip = netdev_priv(dev); 1064 struct ioc3_private *ip = netdev_priv(dev);
1066 1065
1067 if (request_irq(dev->irq, ioc3_interrupt, SA_SHIRQ, ioc3_str, dev)) { 1066 if (request_irq(dev->irq, ioc3_interrupt, IRQF_SHARED, ioc3_str, dev)) {
1068 printk(KERN_ERR "%s: Can't get irq %d\n", dev->name, dev->irq); 1067 printk(KERN_ERR "%s: Can't get irq %d\n", dev->name, dev->irq);
1069 1068
1070 return -EAGAIN; 1069 return -EAGAIN;
diff --git a/drivers/net/irda/au1k_ir.c b/drivers/net/irda/au1k_ir.c
index e6b1985767c..7b2b4135bb2 100644
--- a/drivers/net/irda/au1k_ir.c
+++ b/drivers/net/irda/au1k_ir.c
@@ -18,7 +18,6 @@
18 * with this program; if not, write to the Free Software Foundation, Inc., 18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 19 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
20 */ 20 */
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/init.h> 23#include <linux/init.h>
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c
index 910c0cab35b..33c07d5275d 100644
--- a/drivers/net/irda/donauboe.c
+++ b/drivers/net/irda/donauboe.c
@@ -1372,7 +1372,7 @@ toshoboe_net_open (struct net_device *dev)
1372 return 0; 1372 return 0;
1373 1373
1374 if (request_irq (self->io.irq, toshoboe_interrupt, 1374 if (request_irq (self->io.irq, toshoboe_interrupt,
1375 SA_SHIRQ | SA_INTERRUPT, dev->name, (void *) self)) 1375 IRQF_SHARED | IRQF_DISABLED, dev->name, (void *) self))
1376 { 1376 {
1377 return -EAGAIN; 1377 return -EAGAIN;
1378 } 1378 }
@@ -1573,7 +1573,7 @@ toshoboe_open (struct pci_dev *pci_dev, const struct pci_device_id *pdid)
1573 self->io.fir_base = self->base; 1573 self->io.fir_base = self->base;
1574 self->io.fir_ext = OBOE_IO_EXTENT; 1574 self->io.fir_ext = OBOE_IO_EXTENT;
1575 self->io.irq = pci_dev->irq; 1575 self->io.irq = pci_dev->irq;
1576 self->io.irqflags = SA_SHIRQ | SA_INTERRUPT; 1576 self->io.irqflags = IRQF_SHARED | IRQF_DISABLED;
1577 1577
1578 self->speed = self->io.speed = 9600; 1578 self->speed = self->io.speed = 9600;
1579 self->async = 0; 1579 self->async = 0;
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index e1aa9910503..afb19e8d95c 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -12,7 +12,6 @@
12 * Infra-red driver (SIR/FIR) for the PXA2xx embedded microprocessor 12 * Infra-red driver (SIR/FIR) for the PXA2xx embedded microprocessor
13 * 13 *
14 */ 14 */
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/drivers/net/irda/sa1100_ir.c b/drivers/net/irda/sa1100_ir.c
index f530686bd09..8d5a288d797 100644
--- a/drivers/net/irda/sa1100_ir.c
+++ b/drivers/net/irda/sa1100_ir.c
@@ -18,7 +18,6 @@
18 * power_leve:level - set the transmitter power level 18 * power_leve:level - set the transmitter power level
19 * tx_lpm:0|1 - set transmit low power mode 19 * tx_lpm:0|1 - set transmit low power mode
20 */ 20 */
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/moduleparam.h> 22#include <linux/moduleparam.h>
24#include <linux/types.h> 23#include <linux/types.h>
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index d70b9e8d6e6..92d646cc9ed 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -21,7 +21,6 @@
21 * 21 *
22 ********************************************************************/ 22 ********************************************************************/
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26 25
27#define DRIVER_NAME "vlsi_ir" 26#define DRIVER_NAME "vlsi_ir"
@@ -1518,7 +1517,7 @@ static int vlsi_open(struct net_device *ndev)
1518 1517
1519 outb(IRINTR_INT_MASK, ndev->base_addr+VLSI_PIO_IRINTR); 1518 outb(IRINTR_INT_MASK, ndev->base_addr+VLSI_PIO_IRINTR);
1520 1519
1521 if (request_irq(ndev->irq, vlsi_interrupt, SA_SHIRQ, 1520 if (request_irq(ndev->irq, vlsi_interrupt, IRQF_SHARED,
1522 drivername, ndev)) { 1521 drivername, ndev)) {
1523 IRDA_WARNING("%s: couldn't get IRQ: %d\n", 1522 IRDA_WARNING("%s: couldn't get IRQ: %d\n",
1524 __FUNCTION__, ndev->irq); 1523 __FUNCTION__, ndev->irq);
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
index 93394d76587..cdc14401cdb 100644
--- a/drivers/net/iseries_veth.c
+++ b/drivers/net/iseries_veth.c
@@ -56,7 +56,6 @@
56 * number of packets outstanding to a remote partition at a time. 56 * number of packets outstanding to a remote partition at a time.
57 */ 57 */
58 58
59#include <linux/config.h>
60#include <linux/module.h> 59#include <linux/module.h>
61#include <linux/types.h> 60#include <linux/types.h>
62#include <linux/errno.h> 61#include <linux/errno.h>
diff --git a/drivers/net/ixgb/ixgb.h b/drivers/net/ixgb/ixgb.h
index a83ef28dadb..82b67af54c9 100644
--- a/drivers/net/ixgb/ixgb.h
+++ b/drivers/net/ixgb/ixgb.h
@@ -30,7 +30,6 @@
30#define _IXGB_H_ 30#define _IXGB_H_
31 31
32#include <linux/stddef.h> 32#include <linux/stddef.h>
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/types.h> 34#include <linux/types.h>
36#include <asm/byteorder.h> 35#include <asm/byteorder.h>
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 8bb32f94699..b91e082483f 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -253,7 +253,7 @@ ixgb_up(struct ixgb_adapter *adapter)
253 253
254#endif 254#endif
255 if((err = request_irq(adapter->pdev->irq, &ixgb_intr, 255 if((err = request_irq(adapter->pdev->irq, &ixgb_intr,
256 SA_SHIRQ | SA_SAMPLE_RANDOM, 256 IRQF_SHARED | IRQF_SAMPLE_RANDOM,
257 netdev->name, netdev))) { 257 netdev->name, netdev))) {
258 DPRINTK(PROBE, ERR, 258 DPRINTK(PROBE, ERR,
259 "Unable to allocate interrupt Error: %d\n", err); 259 "Unable to allocate interrupt Error: %d\n", err);
diff --git a/drivers/net/ixp2000/caleb.c b/drivers/net/ixp2000/caleb.c
index 3595e107df2..7dea5b95012 100644
--- a/drivers/net/ixp2000/caleb.c
+++ b/drivers/net/ixp2000/caleb.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
15#include <asm/io.h> 14#include <asm/io.h>
diff --git a/drivers/net/ixp2000/enp2611.c b/drivers/net/ixp2000/enp2611.c
index b67f586d739..d3f4235c585 100644
--- a/drivers/net/ixp2000/enp2611.c
+++ b/drivers/net/ixp2000/enp2611.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/netdevice.h> 14#include <linux/netdevice.h>
diff --git a/drivers/net/ixp2000/ixp2400-msf.c b/drivers/net/ixp2000/ixp2400-msf.c
index 48a3a891d3a..9ec38eebfb5 100644
--- a/drivers/net/ixp2000/ixp2400-msf.c
+++ b/drivers/net/ixp2000/ixp2400-msf.c
@@ -11,7 +11,6 @@
11 * License, or (at your option) any later version. 11 * License, or (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <asm/hardware.h> 16#include <asm/hardware.h>
diff --git a/drivers/net/ixp2000/ixpdev.c b/drivers/net/ixp2000/ixpdev.c
index fbc2d21020f..6eeb965b4d7 100644
--- a/drivers/net/ixp2000/ixpdev.c
+++ b/drivers/net/ixp2000/ixpdev.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/netdevice.h> 14#include <linux/netdevice.h>
@@ -236,7 +235,7 @@ static int ixpdev_open(struct net_device *dev)
236 235
237 if (!nds_open++) { 236 if (!nds_open++) {
238 err = request_irq(IRQ_IXP2000_THDA0, ixpdev_interrupt, 237 err = request_irq(IRQ_IXP2000_THDA0, ixpdev_interrupt,
239 SA_SHIRQ, "ixp2000_eth", nds); 238 IRQF_SHARED, "ixp2000_eth", nds);
240 if (err) { 239 if (err) {
241 nds_open--; 240 nds_open--;
242 return err; 241 return err;
diff --git a/drivers/net/ixp2000/pm3386.c b/drivers/net/ixp2000/pm3386.c
index 5224651c9aa..e08d3f9863b 100644
--- a/drivers/net/ixp2000/pm3386.c
+++ b/drivers/net/ixp2000/pm3386.c
@@ -9,7 +9,6 @@
9 * (at your option) any later version. 9 * (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
15#include <linux/netdevice.h> 14#include <linux/netdevice.h>
diff --git a/drivers/net/jazzsonic.c b/drivers/net/jazzsonic.c
index 272d331d29c..661d75b4cad 100644
--- a/drivers/net/jazzsonic.c
+++ b/drivers/net/jazzsonic.c
@@ -260,7 +260,7 @@ MODULE_DESCRIPTION("Jazz SONIC ethernet driver");
260module_param(sonic_debug, int, 0); 260module_param(sonic_debug, int, 0);
261MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)"); 261MODULE_PARM_DESC(sonic_debug, "jazzsonic debug level (1-4)");
262 262
263#define SONIC_IRQ_FLAG SA_INTERRUPT 263#define SONIC_IRQ_FLAG IRQF_DISABLED
264 264
265#include "sonic.c" 265#include "sonic.c"
266 266
diff --git a/drivers/net/lp486e.c b/drivers/net/lp486e.c
index bf3f343ae71..b783a6984ab 100644
--- a/drivers/net/lp486e.c
+++ b/drivers/net/lp486e.c
@@ -851,7 +851,7 @@ static int i596_open(struct net_device *dev)
851{ 851{
852 int i; 852 int i;
853 853
854 i = request_irq(dev->irq, &i596_interrupt, SA_SHIRQ, dev->name, dev); 854 i = request_irq(dev->irq, &i596_interrupt, IRQF_SHARED, dev->name, dev);
855 if (i) { 855 if (i) {
856 printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq); 856 printk(KERN_ERR "%s: IRQ %d not free\n", dev->name, dev->irq);
857 return i; 857 return i;
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index 77792b28602..f2c0bf89f0c 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1996 Paul Mackerras. 5 * Copyright (C) 1996 Paul Mackerras.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/netdevice.h> 10#include <linux/netdevice.h>
diff --git a/drivers/net/mipsnet.c b/drivers/net/mipsnet.c
index bbffb585b3b..07e58f4a291 100644
--- a/drivers/net/mipsnet.c
+++ b/drivers/net/mipsnet.c
@@ -179,7 +179,7 @@ static int mipsnet_open(struct net_device *dev)
179 pr_debug("%s: mipsnet_open\n", dev->name); 179 pr_debug("%s: mipsnet_open\n", dev->name);
180 180
181 err = request_irq(dev->irq, &mipsnet_interrupt, 181 err = request_irq(dev->irq, &mipsnet_interrupt,
182 SA_SHIRQ, dev->name, (void *) dev); 182 IRQF_SHARED, dev->name, (void *) dev);
183 183
184 if (err) { 184 if (err) {
185 pr_debug("%s: %s(): can't get irq %d\n", 185 pr_debug("%s: %s(): can't get irq %d\n",
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c
index 625ff61c998..760c61b9886 100644
--- a/drivers/net/mv643xx_eth.c
+++ b/drivers/net/mv643xx_eth.c
@@ -778,7 +778,7 @@ static int mv643xx_eth_open(struct net_device *dev)
778 int err; 778 int err;
779 779
780 err = request_irq(dev->irq, mv643xx_eth_int_handler, 780 err = request_irq(dev->irq, mv643xx_eth_int_handler,
781 SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); 781 IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
782 if (err) { 782 if (err) {
783 printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n", 783 printk(KERN_ERR "Can not assign IRQ number to MV643XX_eth%d\n",
784 port_num); 784 port_num);
diff --git a/drivers/net/mv643xx_eth.h b/drivers/net/mv643xx_eth.h
index 4262c1da6d4..33c5fafdbbd 100644
--- a/drivers/net/mv643xx_eth.h
+++ b/drivers/net/mv643xx_eth.h
@@ -258,7 +258,7 @@ struct pkt_info {
258 struct sk_buff *return_info; /* User resource return information */ 258 struct sk_buff *return_info; /* User resource return information */
259}; 259};
260 260
261/* Ethernet port specific infomation */ 261/* Ethernet port specific information */
262 262
263struct mv643xx_mib_counters { 263struct mv643xx_mib_counters {
264 u64 good_octets_received; 264 u64 good_octets_received;
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index dbdf189436f..72aad42db7b 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -2413,7 +2413,7 @@ static int myri10ge_resume(struct pci_dev *pdev)
2413 pci_enable_device(pdev); 2413 pci_enable_device(pdev);
2414 pci_set_master(pdev); 2414 pci_set_master(pdev);
2415 2415
2416 status = request_irq(pdev->irq, myri10ge_intr, SA_SHIRQ, 2416 status = request_irq(pdev->irq, myri10ge_intr, IRQF_SHARED,
2417 netdev->name, mgp); 2417 netdev->name, mgp);
2418 if (status != 0) { 2418 if (status != 0) {
2419 dev_err(&pdev->dev, "failed to allocate IRQ\n"); 2419 dev_err(&pdev->dev, "failed to allocate IRQ\n");
@@ -2694,7 +2694,7 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
2694 mgp->msi_enabled = 1; 2694 mgp->msi_enabled = 1;
2695 } 2695 }
2696 2696
2697 status = request_irq(pdev->irq, myri10ge_intr, SA_SHIRQ, 2697 status = request_irq(pdev->irq, myri10ge_intr, IRQF_SHARED,
2698 netdev->name, mgp); 2698 netdev->name, mgp);
2699 if (status != 0) { 2699 if (status != 0) {
2700 dev_err(&pdev->dev, "failed to allocate IRQ\n"); 2700 dev_err(&pdev->dev, "failed to allocate IRQ\n");
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index d9f616fea3d..1b965a2b56e 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -7,7 +7,6 @@ static char version[] =
7 "myri_sbus.c:v2.0 June 23, 2006 David S. Miller (davem@davemloft.net)\n"; 7 "myri_sbus.c:v2.0 June 23, 2006 David S. Miller (davem@davemloft.net)\n";
8 8
9#include <linux/module.h> 9#include <linux/module.h>
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/types.h> 12#include <linux/types.h>
@@ -1070,7 +1069,7 @@ static int __init myri_ether_init(struct sbus_dev *sdev)
1070 /* Register interrupt handler now. */ 1069 /* Register interrupt handler now. */
1071 DET(("Requesting MYRIcom IRQ line.\n")); 1070 DET(("Requesting MYRIcom IRQ line.\n"));
1072 if (request_irq(dev->irq, &myri_interrupt, 1071 if (request_irq(dev->irq, &myri_interrupt,
1073 SA_SHIRQ, "MyriCOM Ethernet", (void *) dev)) { 1072 IRQF_SHARED, "MyriCOM Ethernet", (void *) dev)) {
1074 printk("MyriCOM: Cannot register interrupt handler.\n"); 1073 printk("MyriCOM: Cannot register interrupt handler.\n");
1075 goto err; 1074 goto err;
1076 } 1075 }
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 5657049c216..9df2628be1e 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -138,7 +138,6 @@
138 * big endian support with CFG:BEM instead of cpu_to_le32 138 * big endian support with CFG:BEM instead of cpu_to_le32
139*/ 139*/
140 140
141#include <linux/config.h>
142#include <linux/module.h> 141#include <linux/module.h>
143#include <linux/kernel.h> 142#include <linux/kernel.h>
144#include <linux/string.h> 143#include <linux/string.h>
@@ -1575,7 +1574,7 @@ static int netdev_open(struct net_device *dev)
1575 /* Reset the chip, just in case. */ 1574 /* Reset the chip, just in case. */
1576 natsemi_reset(dev); 1575 natsemi_reset(dev);
1577 1576
1578 i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); 1577 i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev);
1579 if (i) return i; 1578 if (i) return i;
1580 1579
1581 if (netif_msg_ifup(np)) 1580 if (netif_msg_ifup(np))
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index ced9fdb8335..fa50eb88940 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -420,7 +420,7 @@ static int ne2k_pci_set_fdx(struct net_device *dev)
420 420
421static int ne2k_pci_open(struct net_device *dev) 421static int ne2k_pci_open(struct net_device *dev)
422{ 422{
423 int ret = request_irq(dev->irq, ei_interrupt, SA_SHIRQ, dev->name, dev); 423 int ret = request_irq(dev->irq, ei_interrupt, IRQF_SHARED, dev->name, dev);
424 if (ret) 424 if (ret)
425 return ret; 425 return ret;
426 426
diff --git a/drivers/net/netx-eth.c b/drivers/net/netx-eth.c
index b92430c4e3a..b1311ae8267 100644
--- a/drivers/net/netx-eth.c
+++ b/drivers/net/netx-eth.c
@@ -223,7 +223,7 @@ static int netx_eth_open(struct net_device *ndev)
223 struct netx_eth_priv *priv = netdev_priv(ndev); 223 struct netx_eth_priv *priv = netdev_priv(ndev);
224 224
225 if (request_irq 225 if (request_irq
226 (ndev->irq, &netx_eth_interrupt, SA_SHIRQ, ndev->name, ndev)) 226 (ndev->irq, &netx_eth_interrupt, IRQF_SHARED, ndev->name, ndev))
227 return -EAGAIN; 227 return -EAGAIN;
228 228
229 writel(ndev->dev_addr[0] | 229 writel(ndev->dev_addr[0] |
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index 706aed7d717..70429108c40 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -96,7 +96,6 @@
96//#define dprintk printk 96//#define dprintk printk
97#define dprintk(x...) do { } while (0) 97#define dprintk(x...) do { } while (0)
98 98
99#include <linux/config.h>
100#include <linux/module.h> 99#include <linux/module.h>
101#include <linux/moduleparam.h> 100#include <linux/moduleparam.h>
102#include <linux/types.h> 101#include <linux/types.h>
@@ -1882,7 +1881,7 @@ static int __devinit ns83820_init_one(struct pci_dev *pci_dev, const struct pci_
1882 1881
1883 dev->IMR_cache = 0; 1882 dev->IMR_cache = 0;
1884 1883
1885 err = request_irq(pci_dev->irq, ns83820_irq, SA_SHIRQ, 1884 err = request_irq(pci_dev->irq, ns83820_irq, IRQF_SHARED,
1886 DRV_NAME, ndev); 1885 DRV_NAME, ndev);
1887 if (err) { 1886 if (err) {
1888 printk(KERN_INFO "ns83820: unable to register irq %d\n", 1887 printk(KERN_INFO "ns83820: unable to register irq %d\n",
diff --git a/drivers/net/pci-skeleton.c b/drivers/net/pci-skeleton.c
index a7bb54df75a..3388ee1313e 100644
--- a/drivers/net/pci-skeleton.c
+++ b/drivers/net/pci-skeleton.c
@@ -85,7 +85,6 @@ IVc. Errata
85 85
86*/ 86*/
87 87
88#include <linux/config.h>
89#include <linux/module.h> 88#include <linux/module.h>
90#include <linux/kernel.h> 89#include <linux/kernel.h>
91#include <linux/pci.h> 90#include <linux/pci.h>
@@ -1076,7 +1075,7 @@ static int netdrv_open (struct net_device *dev)
1076 1075
1077 DPRINTK ("ENTER\n"); 1076 DPRINTK ("ENTER\n");
1078 1077
1079 retval = request_irq (dev->irq, netdrv_interrupt, SA_SHIRQ, dev->name, dev); 1078 retval = request_irq (dev->irq, netdrv_interrupt, IRQF_SHARED, dev->name, dev);
1080 if (retval) { 1079 if (retval) {
1081 DPRINTK ("EXIT, returning %d\n", retval); 1080 DPRINTK ("EXIT, returning %d\n", retval);
1082 return retval; 1081 return retval;
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 2ea66aca648..297e9f80536 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -535,7 +535,7 @@ static int axnet_open(struct net_device *dev)
535 535
536 link->open++; 536 link->open++;
537 537
538 request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, "axnet_cs", dev); 538 request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, "axnet_cs", dev);
539 539
540 info->link_status = 0x00; 540 info->link_status = 0x00;
541 init_timer(&info->watchdog); 541 init_timer(&info->watchdog);
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 441de824ab6..48434d7924e 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -387,7 +387,10 @@ static int com20020_resume(struct pcmcia_device *link)
387} 387}
388 388
389static struct pcmcia_device_id com20020_ids[] = { 389static struct pcmcia_device_id com20020_ids[] = {
390 PCMCIA_DEVICE_PROD_ID12("Contemporary Control Systems, Inc.", "PCM20 Arcnet Adapter", 0x59991666, 0x95dfffaf), 390 PCMCIA_DEVICE_PROD_ID12("Contemporary Control Systems, Inc.",
391 "PCM20 Arcnet Adapter", 0x59991666, 0x95dfffaf),
392 PCMCIA_DEVICE_PROD_ID12("SoHard AG",
393 "SH ARC PCMCIA", 0xf8991729, 0x69dff0c7),
391 PCMCIA_DEVICE_NULL 394 PCMCIA_DEVICE_NULL
392}; 395};
393MODULE_DEVICE_TABLE(pcmcia, com20020_ids); 396MODULE_DEVICE_TABLE(pcmcia, com20020_ids);
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 661bfe54ff5..0ecebfc31f0 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -998,7 +998,7 @@ static int pcnet_open(struct net_device *dev)
998 link->open++; 998 link->open++;
999 999
1000 set_misc_reg(dev); 1000 set_misc_reg(dev);
1001 request_irq(dev->irq, ei_irq_wrapper, SA_SHIRQ, dev_info, dev); 1001 request_irq(dev->irq, ei_irq_wrapper, IRQF_SHARED, dev_info, dev);
1002 1002
1003 info->phy_id = info->eth_phy; 1003 info->phy_id = info->eth_phy;
1004 info->link_status = 0x00; 1004 info->link_status = 0x00;
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 0e01c75da42..d768f3d1ac2 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1541,7 +1541,7 @@ static int pcnet32_open(struct net_device *dev)
1541 unsigned long flags; 1541 unsigned long flags;
1542 1542
1543 if (request_irq(dev->irq, &pcnet32_interrupt, 1543 if (request_irq(dev->irq, &pcnet32_interrupt,
1544 lp->shared_irq ? SA_SHIRQ : 0, dev->name, 1544 lp->shared_irq ? IRQF_SHARED : 0, dev->name,
1545 (void *)dev)) { 1545 (void *)dev)) {
1546 return -EAGAIN; 1546 return -EAGAIN;
1547 } 1547 }
diff --git a/drivers/net/phy/cicada.c b/drivers/net/phy/cicada.c
index 7d8d534255c..3efb715c28d 100644
--- a/drivers/net/phy/cicada.c
+++ b/drivers/net/phy/cicada.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/string.h> 18#include <linux/string.h>
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c
index 5e9002e444c..aa7983f5583 100644
--- a/drivers/net/phy/davicom.c
+++ b/drivers/net/phy/davicom.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/string.h> 18#include <linux/string.h>
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index 3f702c503af..69d2325f848 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/string.h> 18#include <linux/string.h>
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index a2d6386d13b..0ad253282d0 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/string.h> 18#include <linux/string.h>
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 1b236bdf6b9..1dde390c164 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/string.h> 18#include <linux/string.h>
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 33cec2dab94..7d5c2233c25 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.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/kernel.h> 17#include <linux/kernel.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/string.h> 19#include <linux/string.h>
@@ -557,7 +556,7 @@ int phy_start_interrupts(struct phy_device *phydev)
557 INIT_WORK(&phydev->phy_queue, phy_change, phydev); 556 INIT_WORK(&phydev->phy_queue, phy_change, phydev);
558 557
559 if (request_irq(phydev->irq, phy_interrupt, 558 if (request_irq(phydev->irq, phy_interrupt,
560 SA_SHIRQ, 559 IRQF_SHARED,
561 "phy_interrupt", 560 "phy_interrupt",
562 phydev) < 0) { 561 phydev) < 0) {
563 printk(KERN_WARNING "%s: Can't get IRQ %d (PHY)\n", 562 printk(KERN_WARNING "%s: Can't get IRQ %d (PHY)\n",
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 7da0e3dd5fe..1bc1e032c5d 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.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/kernel.h> 17#include <linux/kernel.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
20#include <linux/string.h> 19#include <linux/string.h>
diff --git a/drivers/net/phy/qsemi.c b/drivers/net/phy/qsemi.c
index 65d995b02b2..2b50e1739aa 100644
--- a/drivers/net/phy/qsemi.c
+++ b/drivers/net/phy/qsemi.c
@@ -13,7 +13,6 @@
13 * option) any later version. 13 * option) any later version.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
19#include <linux/string.h> 18#include <linux/string.h>
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c
index 425ff5b117f..0ec6e9d57b9 100644
--- a/drivers/net/ppp_generic.c
+++ b/drivers/net/ppp_generic.c
@@ -22,7 +22,6 @@
22 * ==FILEVERSION 20041108== 22 * ==FILEVERSION 20041108==
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/kmod.h> 27#include <linux/kmod.h>
diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c
index 1985d1b57c4..51ff9a9d1bb 100644
--- a/drivers/net/ppp_mppe.c
+++ b/drivers/net/ppp_mppe.c
@@ -43,7 +43,6 @@
43 * deprecated in 2.6 43 * deprecated in 2.6
44 */ 44 */
45 45
46#include <linux/config.h>
47#include <linux/module.h> 46#include <linux/module.h>
48#include <linux/kernel.h> 47#include <linux/kernel.h>
49#include <linux/version.h> 48#include <linux/version.h>
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 12d1cb289bb..16a0ef1b136 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1726,7 +1726,7 @@ static int rtl8169_open(struct net_device *dev)
1726 rtl8169_set_rxbufsize(tp, dev); 1726 rtl8169_set_rxbufsize(tp, dev);
1727 1727
1728 retval = 1728 retval =
1729 request_irq(dev->irq, rtl8169_interrupt, SA_SHIRQ, dev->name, dev); 1729 request_irq(dev->irq, rtl8169_interrupt, IRQF_SHARED, dev->name, dev);
1730 if (retval < 0) 1730 if (retval < 0)
1731 goto out; 1731 goto out;
1732 1732
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c
index 19c2df9c86f..c3ed734cbe3 100644
--- a/drivers/net/rrunner.c
+++ b/drivers/net/rrunner.c
@@ -28,7 +28,6 @@
28#define RX_DMA_SKBUFF 1 28#define RX_DMA_SKBUFF 1
29#define PKT_COPY_THRESHOLD 512 29#define PKT_COPY_THRESHOLD 512
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/errno.h> 33#include <linux/errno.h>
@@ -1253,7 +1252,7 @@ static int rr_open(struct net_device *dev)
1253 readl(&regs->HostCtrl); 1252 readl(&regs->HostCtrl);
1254 spin_unlock_irqrestore(&rrpriv->lock, flags); 1253 spin_unlock_irqrestore(&rrpriv->lock, flags);
1255 1254
1256 if (request_irq(dev->irq, rr_interrupt, SA_SHIRQ, dev->name, dev)) { 1255 if (request_irq(dev->irq, rr_interrupt, IRQF_SHARED, dev->name, dev)) {
1257 printk(KERN_WARNING "%s: Requested IRQ %d is busy\n", 1256 printk(KERN_WARNING "%s: Requested IRQ %d is busy\n",
1258 dev->name, dev->irq); 1257 dev->name, dev->irq);
1259 ecode = -EAGAIN; 1258 ecode = -EAGAIN;
diff --git a/drivers/net/rrunner.h b/drivers/net/rrunner.h
index 10baae55953..2c3c91ebd99 100644
--- a/drivers/net/rrunner.h
+++ b/drivers/net/rrunner.h
@@ -1,7 +1,6 @@
1#ifndef _RRUNNER_H_ 1#ifndef _RRUNNER_H_
2#define _RRUNNER_H_ 2#define _RRUNNER_H_
3 3
4#include <linux/config.h>
5#include <linux/interrupt.h> 4#include <linux/interrupt.h>
6 5
7#if ((BITS_PER_LONG != 32) && (BITS_PER_LONG != 64)) 6#if ((BITS_PER_LONG != 32) && (BITS_PER_LONG != 64))
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c
index 3defe5d4f7d..c6b77acb35e 100644
--- a/drivers/net/s2io.c
+++ b/drivers/net/s2io.c
@@ -44,7 +44,6 @@
44 * aggregated as a single large packet 44 * aggregated as a single large packet
45 ************************************************************************/ 45 ************************************************************************/
46 46
47#include <linux/config.h>
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/types.h> 48#include <linux/types.h>
50#include <linux/errno.h> 49#include <linux/errno.h>
@@ -3762,7 +3761,7 @@ static int s2io_open(struct net_device *dev)
3762 /* After proper initialization of H/W, register ISR */ 3761 /* After proper initialization of H/W, register ISR */
3763 if (sp->intr_type == MSI) { 3762 if (sp->intr_type == MSI) {
3764 err = request_irq((int) sp->pdev->irq, s2io_msi_handle, 3763 err = request_irq((int) sp->pdev->irq, s2io_msi_handle,
3765 SA_SHIRQ, sp->name, dev); 3764 IRQF_SHARED, sp->name, dev);
3766 if (err) { 3765 if (err) {
3767 DBG_PRINT(ERR_DBG, "%s: MSI registration \ 3766 DBG_PRINT(ERR_DBG, "%s: MSI registration \
3768failed\n", dev->name); 3767failed\n", dev->name);
@@ -3800,7 +3799,7 @@ failed\n", dev->name, i);
3800 } 3799 }
3801 } 3800 }
3802 if (sp->intr_type == INTA) { 3801 if (sp->intr_type == INTA) {
3803 err = request_irq((int) sp->pdev->irq, s2io_isr, SA_SHIRQ, 3802 err = request_irq((int) sp->pdev->irq, s2io_isr, IRQF_SHARED,
3804 sp->name, dev); 3803 sp->name, dev);
3805 if (err) { 3804 if (err) {
3806 DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n", 3805 DBG_PRINT(ERR_DBG, "%s: ISR registration failed\n",
@@ -3960,7 +3959,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3960 txdp->Control_2 = 0; 3959 txdp->Control_2 = 0;
3961#ifdef NETIF_F_TSO 3960#ifdef NETIF_F_TSO
3962 mss = skb_shinfo(skb)->gso_size; 3961 mss = skb_shinfo(skb)->gso_size;
3963 if (skb_shinfo(skb)->gso_type == SKB_GSO_TCPV4) { 3962 if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) {
3964 txdp->Control_1 |= TXD_TCP_LSO_EN; 3963 txdp->Control_1 |= TXD_TCP_LSO_EN;
3965 txdp->Control_1 |= TXD_TCP_LSO_MSS(mss); 3964 txdp->Control_1 |= TXD_TCP_LSO_MSS(mss);
3966 } 3965 }
@@ -3980,7 +3979,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
3980 } 3979 }
3981 3980
3982 frg_len = skb->len - skb->data_len; 3981 frg_len = skb->len - skb->data_len;
3983 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) { 3982 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP) {
3984 int ufo_size; 3983 int ufo_size;
3985 3984
3986 ufo_size = skb_shinfo(skb)->gso_size; 3985 ufo_size = skb_shinfo(skb)->gso_size;
@@ -4009,7 +4008,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4009 txdp->Host_Control = (unsigned long) skb; 4008 txdp->Host_Control = (unsigned long) skb;
4010 txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len); 4009 txdp->Control_1 |= TXD_BUFFER0_SIZE(frg_len);
4011 4010
4012 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4011 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4013 txdp->Control_1 |= TXD_UFO_EN; 4012 txdp->Control_1 |= TXD_UFO_EN;
4014 4013
4015 frg_cnt = skb_shinfo(skb)->nr_frags; 4014 frg_cnt = skb_shinfo(skb)->nr_frags;
@@ -4024,12 +4023,12 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4024 (sp->pdev, frag->page, frag->page_offset, 4023 (sp->pdev, frag->page, frag->page_offset,
4025 frag->size, PCI_DMA_TODEVICE); 4024 frag->size, PCI_DMA_TODEVICE);
4026 txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size); 4025 txdp->Control_1 = TXD_BUFFER0_SIZE(frag->size);
4027 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4026 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4028 txdp->Control_1 |= TXD_UFO_EN; 4027 txdp->Control_1 |= TXD_UFO_EN;
4029 } 4028 }
4030 txdp->Control_1 |= TXD_GATHER_CODE_LAST; 4029 txdp->Control_1 |= TXD_GATHER_CODE_LAST;
4031 4030
4032 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4031 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4033 frg_cnt++; /* as Txd0 was used for inband header */ 4032 frg_cnt++; /* as Txd0 was used for inband header */
4034 4033
4035 tx_fifo = mac_control->tx_FIFO_start[queue]; 4034 tx_fifo = mac_control->tx_FIFO_start[queue];
@@ -4043,7 +4042,7 @@ static int s2io_xmit(struct sk_buff *skb, struct net_device *dev)
4043 if (mss) 4042 if (mss)
4044 val64 |= TX_FIFO_SPECIAL_FUNC; 4043 val64 |= TX_FIFO_SPECIAL_FUNC;
4045#endif 4044#endif
4046 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDPV4) 4045 if (skb_shinfo(skb)->gso_type == SKB_GSO_UDP)
4047 val64 |= TX_FIFO_SPECIAL_FUNC; 4046 val64 |= TX_FIFO_SPECIAL_FUNC;
4048 writeq(val64, &tx_fifo->List_Control); 4047 writeq(val64, &tx_fifo->List_Control);
4049 4048
@@ -7021,6 +7020,9 @@ s2io_init_nic(struct pci_dev *pdev, const struct pci_device_id *pre)
7021#ifdef NETIF_F_TSO 7020#ifdef NETIF_F_TSO
7022 dev->features |= NETIF_F_TSO; 7021 dev->features |= NETIF_F_TSO;
7023#endif 7022#endif
7023#ifdef NETIF_F_TSO6
7024 dev->features |= NETIF_F_TSO6;
7025#endif
7024 if (sp->device_type & XFRAME_II_DEVICE) { 7026 if (sp->device_type & XFRAME_II_DEVICE) {
7025 dev->features |= NETIF_F_UFO; 7027 dev->features |= NETIF_F_UFO;
7026 dev->features |= NETIF_F_HW_CSUM; 7028 dev->features |= NETIF_F_HW_CSUM;
diff --git a/drivers/net/s2io.h b/drivers/net/s2io.h
index 3203732a668..c43f5217970 100644
--- a/drivers/net/s2io.h
+++ b/drivers/net/s2io.h
@@ -652,7 +652,7 @@ typedef struct fifo_info {
652 nic_t *nic; 652 nic_t *nic;
653}fifo_info_t; 653}fifo_info_t;
654 654
655/* Infomation related to the Tx and Rx FIFOs and Rings of Xena 655/* Information related to the Tx and Rx FIFOs and Rings of Xena
656 * is maintained in this structure. 656 * is maintained in this structure.
657 */ 657 */
658typedef struct mac_info { 658typedef struct mac_info {
diff --git a/drivers/net/sb1250-mac.c b/drivers/net/sb1250-mac.c
index f2be9f83f09..9ab1618e82a 100644
--- a/drivers/net/sb1250-mac.c
+++ b/drivers/net/sb1250-mac.c
@@ -31,7 +31,6 @@
31#include <linux/etherdevice.h> 31#include <linux/etherdevice.h>
32#include <linux/skbuff.h> 32#include <linux/skbuff.h>
33#include <linux/init.h> 33#include <linux/init.h>
34#include <linux/config.h>
35#include <linux/bitops.h> 34#include <linux/bitops.h>
36#include <asm/processor.h> /* Processor type for cache alignment. */ 35#include <asm/processor.h> /* Processor type for cache alignment. */
37#include <asm/io.h> 36#include <asm/io.h>
@@ -2451,7 +2450,7 @@ static int sbmac_open(struct net_device *dev)
2451 */ 2450 */
2452 2451
2453 __raw_readq(sc->sbm_isr); 2452 __raw_readq(sc->sbm_isr);
2454 if (request_irq(dev->irq, &sbmac_intr, SA_SHIRQ, dev->name, dev)) 2453 if (request_irq(dev->irq, &sbmac_intr, IRQF_SHARED, dev->name, dev))
2455 return -EBUSY; 2454 return -EBUSY;
2456 2455
2457 /* 2456 /*
diff --git a/drivers/net/shaper.c b/drivers/net/shaper.c
index 88e212043a4..c7832e69f17 100644
--- a/drivers/net/shaper.c
+++ b/drivers/net/shaper.c
@@ -69,7 +69,6 @@
69 * 2000/03 Andi Kleen 69 * 2000/03 Andi Kleen
70 */ 70 */
71 71
72#include <linux/config.h>
73#include <linux/module.h> 72#include <linux/module.h>
74#include <linux/kernel.h> 73#include <linux/kernel.h>
75#include <linux/fcntl.h> 74#include <linux/fcntl.h>
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index df39f344765..df0cbebb327 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1054,7 +1054,7 @@ static int sis190_open(struct net_device *dev)
1054 1054
1055 sis190_request_timer(dev); 1055 sis190_request_timer(dev);
1056 1056
1057 rc = request_irq(dev->irq, sis190_interrupt, SA_SHIRQ, dev->name, dev); 1057 rc = request_irq(dev->irq, sis190_interrupt, IRQF_SHARED, dev->name, dev);
1058 if (rc < 0) 1058 if (rc < 0)
1059 goto err_release_timer_2; 1059 goto err_release_timer_2;
1060 1060
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index d0587417220..29ee7ffedff 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -1013,7 +1013,7 @@ sis900_open(struct net_device *net_dev)
1013 /* Equalizer workaround Rule */ 1013 /* Equalizer workaround Rule */
1014 sis630_set_eq(net_dev, sis_priv->chipset_rev); 1014 sis630_set_eq(net_dev, sis_priv->chipset_rev);
1015 1015
1016 ret = request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, 1016 ret = request_irq(net_dev->irq, &sis900_interrupt, IRQF_SHARED,
1017 net_dev->name, net_dev); 1017 net_dev->name, net_dev);
1018 if (ret) 1018 if (ret)
1019 return ret; 1019 return ret;
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index f3efbd177ae..ee62845d3ac 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -570,9 +570,9 @@ SK_BOOL DualNet;
570 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); 570 spin_unlock_irqrestore(&pAC->SlowPathLock, Flags);
571 571
572 if (pAC->GIni.GIMacsFound == 2) { 572 if (pAC->GIni.GIMacsFound == 2) {
573 Ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, "sk98lin", dev); 573 Ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev);
574 } else if (pAC->GIni.GIMacsFound == 1) { 574 } else if (pAC->GIni.GIMacsFound == 1) {
575 Ret = request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, 575 Ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED,
576 "sk98lin", dev); 576 "sk98lin", dev);
577 } else { 577 } else {
578 printk(KERN_WARNING "sk98lin: Illegal number of ports: %d\n", 578 printk(KERN_WARNING "sk98lin: Illegal number of ports: %d\n",
@@ -5073,9 +5073,9 @@ static int skge_resume(struct pci_dev *pdev)
5073 pci_enable_device(pdev); 5073 pci_enable_device(pdev);
5074 pci_set_master(pdev); 5074 pci_set_master(pdev);
5075 if (pAC->GIni.GIMacsFound == 2) 5075 if (pAC->GIni.GIMacsFound == 2)
5076 ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, "sk98lin", dev); 5076 ret = request_irq(dev->irq, SkGeIsr, IRQF_SHARED, "sk98lin", dev);
5077 else 5077 else
5078 ret = request_irq(dev->irq, SkGeIsrOnePort, SA_SHIRQ, "sk98lin", dev); 5078 ret = request_irq(dev->irq, SkGeIsrOnePort, IRQF_SHARED, "sk98lin", dev);
5079 if (ret) { 5079 if (ret) {
5080 printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq); 5080 printk(KERN_WARNING "sk98lin: unable to acquire IRQ %d\n", dev->irq);
5081 pAC->AllocFlag &= ~SK_ALLOC_IRQ; 5081 pAC->AllocFlag &= ~SK_ALLOC_IRQ;
diff --git a/drivers/net/sk98lin/skvpd.c b/drivers/net/sk98lin/skvpd.c
index 17786056c66..1e662aaebf8 100644
--- a/drivers/net/sk98lin/skvpd.c
+++ b/drivers/net/sk98lin/skvpd.c
@@ -22,7 +22,7 @@
22 ******************************************************************************/ 22 ******************************************************************************/
23 23
24/* 24/*
25 Please refer skvpd.txt for infomation how to include this module 25 Please refer skvpd.txt for information how to include this module
26 */ 26 */
27static const char SysKonnectFileId[] = 27static const char SysKonnectFileId[] =
28 "@(#)$Id: skvpd.c,v 1.37 2003/01/13 10:42:45 rschmidt Exp $ (C) SK"; 28 "@(#)$Id: skvpd.c,v 1.37 2003/01/13 10:42:45 rschmidt Exp $ (C) SK";
diff --git a/drivers/net/sk_mca.c b/drivers/net/sk_mca.c
index e5d6d95960c..799e0980193 100644
--- a/drivers/net/sk_mca.c
+++ b/drivers/net/sk_mca.c
@@ -824,7 +824,7 @@ static int skmca_open(struct net_device *dev)
824 /* register resources - only necessary for IRQ */ 824 /* register resources - only necessary for IRQ */
825 result = 825 result =
826 request_irq(priv->realirq, irq_handler, 826 request_irq(priv->realirq, irq_handler,
827 SA_SHIRQ | SA_SAMPLE_RANDOM, "sk_mca", dev); 827 IRQF_SHARED | IRQF_SAMPLE_RANDOM, "sk_mca", dev);
828 if (result != 0) { 828 if (result != 0) {
829 printk("%s: failed to register irq %d\n", dev->name, 829 printk("%s: failed to register irq %d\n", dev->name,
830 dev->irq); 830 dev->irq);
diff --git a/drivers/net/skfp/h/sba.h b/drivers/net/skfp/h/sba.h
index df716cd5784..638cf0283bc 100644
--- a/drivers/net/skfp/h/sba.h
+++ b/drivers/net/skfp/h/sba.h
@@ -13,7 +13,7 @@
13 ******************************************************************************/ 13 ******************************************************************************/
14 14
15/* 15/*
16 * Synchronous Bandwith Allocation (SBA) structs 16 * Synchronous Bandwidth Allocation (SBA) structs
17 */ 17 */
18 18
19#ifndef _SBA_ 19#ifndef _SBA_
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c
index c7fb6133047..b5714a60237 100644
--- a/drivers/net/skfp/skfddi.c
+++ b/drivers/net/skfp/skfddi.c
@@ -497,7 +497,7 @@ static int skfp_open(struct net_device *dev)
497 497
498 PRINTK(KERN_INFO "entering skfp_open\n"); 498 PRINTK(KERN_INFO "entering skfp_open\n");
499 /* Register IRQ - support shared interrupts by passing device ptr */ 499 /* Register IRQ - support shared interrupts by passing device ptr */
500 err = request_irq(dev->irq, (void *) skfp_interrupt, SA_SHIRQ, 500 err = request_irq(dev->irq, (void *) skfp_interrupt, IRQF_SHARED,
501 dev->name, dev); 501 dev->name, dev);
502 if (err) 502 if (err)
503 return err; 503 return err;
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 1608efab4e3..82200bfaa8e 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -24,7 +24,6 @@
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/in.h> 27#include <linux/in.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/module.h> 29#include <linux/module.h>
@@ -3342,7 +3341,7 @@ static int __devinit skge_probe(struct pci_dev *pdev,
3342 goto err_out_free_hw; 3341 goto err_out_free_hw;
3343 } 3342 }
3344 3343
3345 err = request_irq(pdev->irq, skge_intr, SA_SHIRQ, DRV_NAME, hw); 3344 err = request_irq(pdev->irq, skge_intr, IRQF_SHARED, DRV_NAME, hw);
3346 if (err) { 3345 if (err) {
3347 printk(KERN_ERR PFX "%s: cannot assign irq %d\n", 3346 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
3348 pci_name(pdev), pdev->irq); 3347 pci_name(pdev), pdev->irq);
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index e122007e16d..418f169a6a3 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -23,7 +23,6 @@
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/crc32.h> 26#include <linux/crc32.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/version.h> 28#include <linux/version.h>
@@ -3189,7 +3188,7 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw)
3189 3188
3190 sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW); 3189 sky2_write32(hw, B0_IMSK, Y2_IS_IRQ_SW);
3191 3190
3192 err = request_irq(pdev->irq, sky2_test_intr, SA_SHIRQ, DRV_NAME, hw); 3191 err = request_irq(pdev->irq, sky2_test_intr, IRQF_SHARED, DRV_NAME, hw);
3193 if (err) { 3192 if (err) {
3194 printk(KERN_ERR PFX "%s: cannot assign irq %d\n", 3193 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
3195 pci_name(pdev), pdev->irq); 3194 pci_name(pdev), pdev->irq);
@@ -3349,7 +3348,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev,
3349 goto err_out_unregister; 3348 goto err_out_unregister;
3350 } 3349 }
3351 3350
3352 err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ, DRV_NAME, hw); 3351 err = request_irq(pdev->irq, sky2_intr, IRQF_SHARED, DRV_NAME, hw);
3353 if (err) { 3352 if (err) {
3354 printk(KERN_ERR PFX "%s: cannot assign irq %d\n", 3353 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
3355 pci_name(pdev), pdev->irq); 3354 pci_name(pdev), pdev->irq);
diff --git a/drivers/net/slhc.c b/drivers/net/slhc.c
index c6fbb1ede0e..3a1b7131681 100644
--- a/drivers/net/slhc.c
+++ b/drivers/net/slhc.c
@@ -50,7 +50,6 @@
50 * driver code belonging close to PPP and SLIP 50 * driver code belonging close to PPP and SLIP
51 */ 51 */
52 52
53#include <linux/config.h>
54#include <linux/module.h> 53#include <linux/module.h>
55#include <linux/types.h> 54#include <linux/types.h>
56#include <linux/string.h> 55#include <linux/string.h>
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index b2e18d28850..1588cb7f6c8 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -55,7 +55,6 @@
55 */ 55 */
56 56
57#define SL_CHECK_TRANSMIT 57#define SL_CHECK_TRANSMIT
58#include <linux/config.h>
59#include <linux/module.h> 58#include <linux/module.h>
60#include <linux/moduleparam.h> 59#include <linux/moduleparam.h>
61 60
diff --git a/drivers/net/slip.h b/drivers/net/slip.h
index ab3efe66a64..29d87dd45a2 100644
--- a/drivers/net/slip.h
+++ b/drivers/net/slip.h
@@ -22,7 +22,6 @@
22#ifndef _LINUX_SLIP_H 22#ifndef _LINUX_SLIP_H
23#define _LINUX_SLIP_H 23#define _LINUX_SLIP_H
24 24
25#include <linux/config.h>
26 25
27#if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED) 26#if defined(CONFIG_INET) && defined(CONFIG_SLIP_COMPRESSED)
28# define SL_INCLUDE_CSLIP 27# define SL_INCLUDE_CSLIP
diff --git a/drivers/net/smc-ultra.c b/drivers/net/smc-ultra.c
index 5b4e8529d4a..45449353a95 100644
--- a/drivers/net/smc-ultra.c
+++ b/drivers/net/smc-ultra.c
@@ -57,7 +57,6 @@
57static const char version[] = 57static const char version[] =
58 "smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n"; 58 "smc-ultra.c:v2.02 2/3/98 Donald Becker (becker@cesdis.gsfc.nasa.gov)\n";
59 59
60#include <linux/config.h>
61#include <linux/module.h> 60#include <linux/module.h>
62#include <linux/kernel.h> 61#include <linux/kernel.h>
63#include <linux/errno.h> 62#include <linux/errno.h>
diff --git a/drivers/net/smc-ultra32.c b/drivers/net/smc-ultra32.c
index ff9bd97746d..85be22a0597 100644
--- a/drivers/net/smc-ultra32.c
+++ b/drivers/net/smc-ultra32.c
@@ -290,7 +290,7 @@ out:
290static int ultra32_open(struct net_device *dev) 290static int ultra32_open(struct net_device *dev)
291{ 291{
292 int ioaddr = dev->base_addr - ULTRA32_NIC_OFFSET; /* ASIC addr */ 292 int ioaddr = dev->base_addr - ULTRA32_NIC_OFFSET; /* ASIC addr */
293 int irq_flags = (inb(ioaddr + ULTRA32_CFG5) & 0x08) ? 0 : SA_SHIRQ; 293 int irq_flags = (inb(ioaddr + ULTRA32_CFG5) & 0x08) ? 0 : IRQF_SHARED;
294 int retval; 294 int retval;
295 295
296 retval = request_irq(dev->irq, ei_interrupt, irq_flags, dev->name, dev); 296 retval = request_irq(dev->irq, ei_interrupt, irq_flags, dev->name, dev);
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index bdd8702ead5..d37bd860b33 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -2081,7 +2081,7 @@ static int __init smc911x_probe(struct net_device *dev, unsigned long ioaddr)
2081 lp->ctl_rspeed = 100; 2081 lp->ctl_rspeed = 100;
2082 2082
2083 /* Grab the IRQ */ 2083 /* Grab the IRQ */
2084 retval = request_irq(dev->irq, &smc911x_interrupt, SA_SHIRQ, dev->name, dev); 2084 retval = request_irq(dev->irq, &smc911x_interrupt, IRQF_SHARED, dev->name, dev);
2085 if (retval) 2085 if (retval)
2086 goto err_out; 2086 goto err_out;
2087 2087
diff --git a/drivers/net/smc91x.c b/drivers/net/smc91x.c
index 0e9833adf9f..3d8dcb6c875 100644
--- a/drivers/net/smc91x.c
+++ b/drivers/net/smc91x.c
@@ -66,7 +66,6 @@ static const char version[] =
66#endif 66#endif
67 67
68 68
69#include <linux/config.h>
70#include <linux/init.h> 69#include <linux/init.h>
71#include <linux/module.h> 70#include <linux/module.h>
72#include <linux/kernel.h> 71#include <linux/kernel.h>
diff --git a/drivers/net/smc91x.h b/drivers/net/smc91x.h
index bf776125ca3..b4028049ed7 100644
--- a/drivers/net/smc91x.h
+++ b/drivers/net/smc91x.h
@@ -207,7 +207,7 @@ SMC_outw(u16 val, void __iomem *ioaddr, int reg)
207 machine_is_omap_h2() \ 207 machine_is_omap_h2() \
208 || machine_is_omap_h3() \ 208 || machine_is_omap_h3() \
209 || (machine_is_omap_innovator() && !cpu_is_omap1510()) \ 209 || (machine_is_omap_innovator() && !cpu_is_omap1510()) \
210 ) ? SA_TRIGGER_FALLING : SA_TRIGGER_RISING) 210 ) ? IRQF_TRIGGER_FALLING : IRQF_TRIGGER_RISING)
211 211
212 212
213#elif defined(CONFIG_SH_SH4202_MICRODEV) 213#elif defined(CONFIG_SH_SH4202_MICRODEV)
@@ -540,7 +540,7 @@ smc_pxa_dma_irq(int dma, void *dummy, struct pt_regs *regs)
540#endif 540#endif
541 541
542#ifndef SMC_IRQ_FLAGS 542#ifndef SMC_IRQ_FLAGS
543#define SMC_IRQ_FLAGS SA_TRIGGER_RISING 543#define SMC_IRQ_FLAGS IRQF_TRIGGER_RISING
544#endif 544#endif
545 545
546#ifndef SMC_INTERRUPT_PREAMBLE 546#ifndef SMC_INTERRUPT_PREAMBLE
diff --git a/drivers/net/sonic.h b/drivers/net/sonic.h
index cede969a8ba..7f5c4ebcc17 100644
--- a/drivers/net/sonic.h
+++ b/drivers/net/sonic.h
@@ -22,7 +22,6 @@
22#ifndef SONIC_H 22#ifndef SONIC_H
23#define SONIC_H 23#define SONIC_H
24 24
25#include <linux/config.h>
26 25
27/* 26/*
28 * SONIC register offsets 27 * SONIC register offsets
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 394339d5e87..fb1d5a8a45c 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -21,7 +21,6 @@
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/compiler.h> 24#include <linux/compiler.h>
26#include <linux/crc32.h> 25#include <linux/crc32.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
@@ -1745,7 +1744,7 @@ spider_net_open(struct net_device *netdev)
1745 1744
1746 result = -EBUSY; 1745 result = -EBUSY;
1747 if (request_irq(netdev->irq, spider_net_interrupt, 1746 if (request_irq(netdev->irq, spider_net_interrupt,
1748 SA_SHIRQ, netdev->name, netdev)) 1747 IRQF_SHARED, netdev->name, netdev))
1749 goto register_int_failed; 1748 goto register_int_failed;
1750 1749
1751 spider_net_enable_card(card); 1750 spider_net_enable_card(card);
diff --git a/drivers/net/starfire.c b/drivers/net/starfire.c
index c158eedc781..ed1f59901ff 100644
--- a/drivers/net/starfire.c
+++ b/drivers/net/starfire.c
@@ -146,7 +146,6 @@ TODO: - fix forced speed/duplexing code (broken a long time ago, when
146#define DRV_VERSION "1.03+LK1.4.2.1" 146#define DRV_VERSION "1.03+LK1.4.2.1"
147#define DRV_RELDATE "October 3, 2005" 147#define DRV_RELDATE "October 3, 2005"
148 148
149#include <linux/config.h>
150#include <linux/module.h> 149#include <linux/module.h>
151#include <linux/kernel.h> 150#include <linux/kernel.h>
152#include <linux/pci.h> 151#include <linux/pci.h>
@@ -1071,7 +1070,7 @@ static int netdev_open(struct net_device *dev)
1071 1070
1072 /* Do we ever need to reset the chip??? */ 1071 /* Do we ever need to reset the chip??? */
1073 1072
1074 retval = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); 1073 retval = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev);
1075 if (retval) 1074 if (retval)
1076 return retval; 1075 return retval;
1077 1076
diff --git a/drivers/net/stnic.c b/drivers/net/stnic.c
index b6dfdf8f44d..74228348995 100644
--- a/drivers/net/stnic.c
+++ b/drivers/net/stnic.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1999 kaz Kojima 7 * Copyright (C) 1999 kaz Kojima
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
diff --git a/drivers/net/sun3lance.c b/drivers/net/sun3lance.c
index a2fad50437e..2dcadb169a2 100644
--- a/drivers/net/sun3lance.c
+++ b/drivers/net/sun3lance.c
@@ -341,7 +341,7 @@ static int __init lance_probe( struct net_device *dev)
341 341
342 REGA(CSR0) = CSR0_STOP; 342 REGA(CSR0) = CSR0_STOP;
343 343
344 request_irq(LANCE_IRQ, lance_interrupt, SA_INTERRUPT, "SUN3 Lance", dev); 344 request_irq(LANCE_IRQ, lance_interrupt, IRQF_DISABLED, "SUN3 Lance", dev);
345 dev->irq = (unsigned short)LANCE_IRQ; 345 dev->irq = (unsigned short)LANCE_IRQ;
346 346
347 347
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c
index 7127f0f36f0..d4689151076 100644
--- a/drivers/net/sunbmac.c
+++ b/drivers/net/sunbmac.c
@@ -918,7 +918,7 @@ static int bigmac_open(struct net_device *dev)
918 struct bigmac *bp = (struct bigmac *) dev->priv; 918 struct bigmac *bp = (struct bigmac *) dev->priv;
919 int ret; 919 int ret;
920 920
921 ret = request_irq(dev->irq, &bigmac_interrupt, SA_SHIRQ, dev->name, bp); 921 ret = request_irq(dev->irq, &bigmac_interrupt, IRQF_SHARED, dev->name, bp);
922 if (ret) { 922 if (ret) {
923 printk(KERN_ERR "BIGMAC: Can't order irq %d to go.\n", dev->irq); 923 printk(KERN_ERR "BIGMAC: Can't order irq %d to go.\n", dev->irq);
924 return ret; 924 return ret;
diff --git a/drivers/net/sundance.c b/drivers/net/sundance.c
index f13b2a195c7..643fceae3db 100644
--- a/drivers/net/sundance.c
+++ b/drivers/net/sundance.c
@@ -870,7 +870,7 @@ static int netdev_open(struct net_device *dev)
870 870
871 /* Do we need to reset the chip??? */ 871 /* Do we need to reset the chip??? */
872 872
873 i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); 873 i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev);
874 if (i) 874 if (i)
875 return i; 875 return i;
876 876
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 5248670d29f..b70bbd74897 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2220,7 +2220,7 @@ static int gem_do_start(struct net_device *dev)
2220 spin_unlock_irqrestore(&gp->lock, flags); 2220 spin_unlock_irqrestore(&gp->lock, flags);
2221 2221
2222 if (request_irq(gp->pdev->irq, gem_interrupt, 2222 if (request_irq(gp->pdev->irq, gem_interrupt,
2223 SA_SHIRQ, dev->name, (void *)dev)) { 2223 IRQF_SHARED, dev->name, (void *)dev)) {
2224 printk(KERN_ERR "%s: failed to request irq !\n", gp->dev->name); 2224 printk(KERN_ERR "%s: failed to request irq !\n", gp->dev->name);
2225 2225
2226 spin_lock_irqsave(&gp->lock, flags); 2226 spin_lock_irqsave(&gp->lock, flags);
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c
index 9282b4b0c02..278c7cb2221 100644
--- a/drivers/net/sungem_phy.c
+++ b/drivers/net/sungem_phy.c
@@ -19,7 +19,6 @@
19 * of darwin, still need to reverse engineer that 19 * of darwin, still need to reverse engineer that
20 */ 20 */
21 21
22#include <linux/config.h>
23 22
24#include <linux/module.h> 23#include <linux/module.h>
25 24
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index 9b246e44f75..8673fd4c08c 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -13,7 +13,6 @@
13 * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50 13 * argument : macaddr=0x00,0x10,0x20,0x30,0x40,0x50
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/types.h> 18#include <linux/types.h>
@@ -2195,7 +2194,7 @@ static int happy_meal_open(struct net_device *dev)
2195 */ 2194 */
2196 if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) { 2195 if ((hp->happy_flags & (HFLAG_QUATTRO|HFLAG_PCI)) != HFLAG_QUATTRO) {
2197 if (request_irq(dev->irq, &happy_meal_interrupt, 2196 if (request_irq(dev->irq, &happy_meal_interrupt,
2198 SA_SHIRQ, dev->name, (void *)dev)) { 2197 IRQF_SHARED, dev->name, (void *)dev)) {
2199 HMD(("EAGAIN\n")); 2198 HMD(("EAGAIN\n"));
2200 printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n", 2199 printk(KERN_ERR "happy_meal(SBUS): Can't order irq %d to go.\n",
2201 dev->irq); 2200 dev->irq);
@@ -2609,7 +2608,7 @@ static void __init quattro_sbus_register_irqs(void)
2609 2608
2610 err = request_irq(sdev->irqs[0], 2609 err = request_irq(sdev->irqs[0],
2611 quattro_sbus_interrupt, 2610 quattro_sbus_interrupt,
2612 SA_SHIRQ, "Quattro", 2611 IRQF_SHARED, "Quattro",
2613 qp); 2612 qp);
2614 if (err != 0) { 2613 if (err != 0) {
2615 printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err); 2614 printk(KERN_ERR "Quattro: Fatal IRQ registery error %d.\n", err);
diff --git a/drivers/net/sunhme.h b/drivers/net/sunhme.h
index 9b7ccaeeee8..90f446db9ba 100644
--- a/drivers/net/sunhme.h
+++ b/drivers/net/sunhme.h
@@ -8,7 +8,6 @@
8#ifndef _SUNHME_H 8#ifndef _SUNHME_H
9#define _SUNHME_H 9#define _SUNHME_H
10 10
11#include <linux/config.h>
12#include <linux/pci.h> 11#include <linux/pci.h>
13 12
14/* Happy Meal global registers. */ 13/* Happy Meal global registers. */
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index 2c239ab63a8..1ef9fd39a79 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -71,7 +71,6 @@
71 71
72static char lancestr[] = "LANCE"; 72static char lancestr[] = "LANCE";
73 73
74#include <linux/config.h>
75#include <linux/module.h> 74#include <linux/module.h>
76#include <linux/kernel.h> 75#include <linux/kernel.h>
77#include <linux/types.h> 76#include <linux/types.h>
@@ -931,7 +930,7 @@ static int lance_open(struct net_device *dev)
931 930
932 STOP_LANCE(lp); 931 STOP_LANCE(lp);
933 932
934 if (request_irq(dev->irq, &lance_interrupt, SA_SHIRQ, 933 if (request_irq(dev->irq, &lance_interrupt, IRQF_SHARED,
935 lancestr, (void *) dev)) { 934 lancestr, (void *) dev)) {
936 printk(KERN_ERR "Lance: Can't get irq %d\n", dev->irq); 935 printk(KERN_ERR "Lance: Can't get irq %d\n", dev->irq);
937 return -EAGAIN; 936 return -EAGAIN;
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index 9da6d5b8717..817a40b6663 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -811,7 +811,7 @@ static struct sunqec * __init get_qec(struct sbus_dev *child_sdev)
811 qec_init_once(qecp, qec_sdev); 811 qec_init_once(qecp, qec_sdev);
812 812
813 if (request_irq(qec_sdev->irqs[0], &qec_interrupt, 813 if (request_irq(qec_sdev->irqs[0], &qec_interrupt,
814 SA_SHIRQ, "qec", (void *) qecp)) { 814 IRQF_SHARED, "qec", (void *) qecp)) {
815 printk(KERN_ERR "qec: Can't register irq.\n"); 815 printk(KERN_ERR "qec: Can't register irq.\n");
816 goto fail; 816 goto fail;
817 } 817 }
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index c2ec9fd8c31..8b53ded66d3 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -880,7 +880,7 @@ tc35815_open(struct net_device *dev)
880 */ 880 */
881 881
882 if (dev->irq == 0 || 882 if (dev->irq == 0 ||
883 request_irq(dev->irq, &tc35815_interrupt, SA_SHIRQ, cardname, dev)) { 883 request_irq(dev->irq, &tc35815_interrupt, IRQF_SHARED, cardname, dev)) {
884 return -EAGAIN; 884 return -EAGAIN;
885 } 885 }
886 886
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 35f93163875..e5e1b296293 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -15,7 +15,6 @@
15 * notice is accompanying it. 15 * notice is accompanying it.
16 */ 16 */
17 17
18#include <linux/config.h>
19 18
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/moduleparam.h> 20#include <linux/moduleparam.h>
@@ -69,8 +68,8 @@
69 68
70#define DRV_MODULE_NAME "tg3" 69#define DRV_MODULE_NAME "tg3"
71#define PFX DRV_MODULE_NAME ": " 70#define PFX DRV_MODULE_NAME ": "
72#define DRV_MODULE_VERSION "3.60" 71#define DRV_MODULE_VERSION "3.61"
73#define DRV_MODULE_RELDATE "June 17, 2006" 72#define DRV_MODULE_RELDATE "June 29, 2006"
74 73
75#define TG3_DEF_MAC_MODE 0 74#define TG3_DEF_MAC_MODE 0
76#define TG3_DEF_RX_MODE 0 75#define TG3_DEF_RX_MODE 0
@@ -3195,7 +3194,7 @@ static int tg3_vlan_rx(struct tg3 *tp, struct sk_buff *skb, u16 vlan_tag)
3195 */ 3194 */
3196static int tg3_rx(struct tg3 *tp, int budget) 3195static int tg3_rx(struct tg3 *tp, int budget)
3197{ 3196{
3198 u32 work_mask; 3197 u32 work_mask, rx_std_posted = 0;
3199 u32 sw_idx = tp->rx_rcb_ptr; 3198 u32 sw_idx = tp->rx_rcb_ptr;
3200 u16 hw_idx; 3199 u16 hw_idx;
3201 int received; 3200 int received;
@@ -3222,6 +3221,7 @@ static int tg3_rx(struct tg3 *tp, int budget)
3222 mapping); 3221 mapping);
3223 skb = tp->rx_std_buffers[desc_idx].skb; 3222 skb = tp->rx_std_buffers[desc_idx].skb;
3224 post_ptr = &tp->rx_std_ptr; 3223 post_ptr = &tp->rx_std_ptr;
3224 rx_std_posted++;
3225 } else if (opaque_key == RXD_OPAQUE_RING_JUMBO) { 3225 } else if (opaque_key == RXD_OPAQUE_RING_JUMBO) {
3226 dma_addr = pci_unmap_addr(&tp->rx_jumbo_buffers[desc_idx], 3226 dma_addr = pci_unmap_addr(&tp->rx_jumbo_buffers[desc_idx],
3227 mapping); 3227 mapping);
@@ -3309,6 +3309,15 @@ static int tg3_rx(struct tg3 *tp, int budget)
3309 3309
3310next_pkt: 3310next_pkt:
3311 (*post_ptr)++; 3311 (*post_ptr)++;
3312
3313 if (unlikely(rx_std_posted >= tp->rx_std_max_post)) {
3314 u32 idx = *post_ptr % TG3_RX_RING_SIZE;
3315
3316 tw32_rx_mbox(MAILBOX_RCV_STD_PROD_IDX +
3317 TG3_64BIT_REG_LOW, idx);
3318 work_mask &= ~RXD_OPAQUE_RING_STD;
3319 rx_std_posted = 0;
3320 }
3312next_pkt_nopost: 3321next_pkt_nopost:
3313 sw_idx++; 3322 sw_idx++;
3314 sw_idx %= TG3_RX_RCB_RING_SIZE(tp); 3323 sw_idx %= TG3_RX_RCB_RING_SIZE(tp);
@@ -3870,6 +3879,40 @@ out_unlock:
3870 return NETDEV_TX_OK; 3879 return NETDEV_TX_OK;
3871} 3880}
3872 3881
3882#if TG3_TSO_SUPPORT != 0
3883static int tg3_start_xmit_dma_bug(struct sk_buff *, struct net_device *);
3884
3885/* Use GSO to workaround a rare TSO bug that may be triggered when the
3886 * TSO header is greater than 80 bytes.
3887 */
3888static int tg3_tso_bug(struct tg3 *tp, struct sk_buff *skb)
3889{
3890 struct sk_buff *segs, *nskb;
3891
3892 /* Estimate the number of fragments in the worst case */
3893 if (unlikely(TX_BUFFS_AVAIL(tp) <= (skb_shinfo(skb)->gso_segs * 3))) {
3894 netif_stop_queue(tp->dev);
3895 return NETDEV_TX_BUSY;
3896 }
3897
3898 segs = skb_gso_segment(skb, tp->dev->features & ~NETIF_F_TSO);
3899 if (unlikely(IS_ERR(segs)))
3900 goto tg3_tso_bug_end;
3901
3902 do {
3903 nskb = segs;
3904 segs = segs->next;
3905 nskb->next = NULL;
3906 tg3_start_xmit_dma_bug(nskb, tp->dev);
3907 } while (segs);
3908
3909tg3_tso_bug_end:
3910 dev_kfree_skb(skb);
3911
3912 return NETDEV_TX_OK;
3913}
3914#endif
3915
3873/* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and 3916/* hard_start_xmit for devices that have the 4G bug and/or 40-bit bug and
3874 * support TG3_FLG2_HW_TSO_1 or firmware TSO only. 3917 * support TG3_FLG2_HW_TSO_1 or firmware TSO only.
3875 */ 3918 */
@@ -3906,7 +3949,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev)
3906 mss = 0; 3949 mss = 0;
3907 if (skb->len > (tp->dev->mtu + ETH_HLEN) && 3950 if (skb->len > (tp->dev->mtu + ETH_HLEN) &&
3908 (mss = skb_shinfo(skb)->gso_size) != 0) { 3951 (mss = skb_shinfo(skb)->gso_size) != 0) {
3909 int tcp_opt_len, ip_tcp_len; 3952 int tcp_opt_len, ip_tcp_len, hdr_len;
3910 3953
3911 if (skb_header_cloned(skb) && 3954 if (skb_header_cloned(skb) &&
3912 pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { 3955 pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
@@ -3917,11 +3960,16 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev)
3917 tcp_opt_len = ((skb->h.th->doff - 5) * 4); 3960 tcp_opt_len = ((skb->h.th->doff - 5) * 4);
3918 ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); 3961 ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr);
3919 3962
3963 hdr_len = ip_tcp_len + tcp_opt_len;
3964 if (unlikely((ETH_HLEN + hdr_len) > 80) &&
3965 (tp->tg3_flags2 & TG3_FLG2_HW_TSO_1_BUG))
3966 return (tg3_tso_bug(tp, skb));
3967
3920 base_flags |= (TXD_FLAG_CPU_PRE_DMA | 3968 base_flags |= (TXD_FLAG_CPU_PRE_DMA |
3921 TXD_FLAG_CPU_POST_DMA); 3969 TXD_FLAG_CPU_POST_DMA);
3922 3970
3923 skb->nh.iph->check = 0; 3971 skb->nh.iph->check = 0;
3924 skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); 3972 skb->nh.iph->tot_len = htons(mss + hdr_len);
3925 if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { 3973 if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) {
3926 skb->h.th->check = 0; 3974 skb->h.th->check = 0;
3927 base_flags &= ~TXD_FLAG_TCPUDP_CSUM; 3975 base_flags &= ~TXD_FLAG_TCPUDP_CSUM;
@@ -5981,7 +6029,13 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
5981 } 6029 }
5982 6030
5983 /* Setup replenish threshold. */ 6031 /* Setup replenish threshold. */
5984 tw32(RCVBDI_STD_THRESH, tp->rx_pending / 8); 6032 val = tp->rx_pending / 8;
6033 if (val == 0)
6034 val = 1;
6035 else if (val > tp->rx_std_max_post)
6036 val = tp->rx_std_max_post;
6037
6038 tw32(RCVBDI_STD_THRESH, val);
5985 6039
5986 /* Initialize TG3_BDINFO's at: 6040 /* Initialize TG3_BDINFO's at:
5987 * RCVDBDI_STD_BD: standard eth size rx ring 6041 * RCVDBDI_STD_BD: standard eth size rx ring
@@ -6141,8 +6195,12 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy)
6141#endif 6195#endif
6142 6196
6143 /* Receive/send statistics. */ 6197 /* Receive/send statistics. */
6144 if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) && 6198 if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) {
6145 (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) { 6199 val = tr32(RCVLPC_STATS_ENABLE);
6200 val &= ~RCVLPC_STATSENAB_DACK_FIX;
6201 tw32(RCVLPC_STATS_ENABLE, val);
6202 } else if ((rdmac_mode & RDMAC_MODE_FIFO_SIZE_128) &&
6203 (tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE)) {
6146 val = tr32(RCVLPC_STATS_ENABLE); 6204 val = tr32(RCVLPC_STATS_ENABLE);
6147 val &= ~RCVLPC_STATSENAB_LNGBRST_RFIX; 6205 val &= ~RCVLPC_STATSENAB_LNGBRST_RFIX;
6148 tw32(RCVLPC_STATS_ENABLE, val); 6206 tw32(RCVLPC_STATS_ENABLE, val);
@@ -6644,12 +6702,12 @@ static int tg3_request_irq(struct tg3 *tp)
6644 fn = tg3_msi; 6702 fn = tg3_msi;
6645 if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI) 6703 if (tp->tg3_flags2 & TG3_FLG2_1SHOT_MSI)
6646 fn = tg3_msi_1shot; 6704 fn = tg3_msi_1shot;
6647 flags = SA_SAMPLE_RANDOM; 6705 flags = IRQF_SAMPLE_RANDOM;
6648 } else { 6706 } else {
6649 fn = tg3_interrupt; 6707 fn = tg3_interrupt;
6650 if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS) 6708 if (tp->tg3_flags & TG3_FLAG_TAGGED_STATUS)
6651 fn = tg3_interrupt_tagged; 6709 fn = tg3_interrupt_tagged;
6652 flags = SA_SHIRQ | SA_SAMPLE_RANDOM; 6710 flags = IRQF_SHARED | IRQF_SAMPLE_RANDOM;
6653 } 6711 }
6654 return (request_irq(tp->pdev->irq, fn, flags, dev->name, dev)); 6712 return (request_irq(tp->pdev->irq, fn, flags, dev->name, dev));
6655} 6713}
@@ -6668,7 +6726,7 @@ static int tg3_test_interrupt(struct tg3 *tp)
6668 free_irq(tp->pdev->irq, dev); 6726 free_irq(tp->pdev->irq, dev);
6669 6727
6670 err = request_irq(tp->pdev->irq, tg3_test_isr, 6728 err = request_irq(tp->pdev->irq, tg3_test_isr,
6671 SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev); 6729 IRQF_SHARED | IRQF_SAMPLE_RANDOM, dev->name, dev);
6672 if (err) 6730 if (err)
6673 return err; 6731 return err;
6674 6732
@@ -8738,6 +8796,9 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
8738{ 8796{
8739 struct tg3 *tp = netdev_priv(dev); 8797 struct tg3 *tp = netdev_priv(dev);
8740 8798
8799 if (netif_running(dev))
8800 tg3_netif_stop(tp);
8801
8741 tg3_full_lock(tp, 0); 8802 tg3_full_lock(tp, 0);
8742 8803
8743 tp->vlgrp = grp; 8804 tp->vlgrp = grp;
@@ -8746,16 +8807,25 @@ static void tg3_vlan_rx_register(struct net_device *dev, struct vlan_group *grp)
8746 __tg3_set_rx_mode(dev); 8807 __tg3_set_rx_mode(dev);
8747 8808
8748 tg3_full_unlock(tp); 8809 tg3_full_unlock(tp);
8810
8811 if (netif_running(dev))
8812 tg3_netif_start(tp);
8749} 8813}
8750 8814
8751static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid) 8815static void tg3_vlan_rx_kill_vid(struct net_device *dev, unsigned short vid)
8752{ 8816{
8753 struct tg3 *tp = netdev_priv(dev); 8817 struct tg3 *tp = netdev_priv(dev);
8754 8818
8819 if (netif_running(dev))
8820 tg3_netif_stop(tp);
8821
8755 tg3_full_lock(tp, 0); 8822 tg3_full_lock(tp, 0);
8756 if (tp->vlgrp) 8823 if (tp->vlgrp)
8757 tp->vlgrp->vlan_devices[vid] = NULL; 8824 tp->vlgrp->vlan_devices[vid] = NULL;
8758 tg3_full_unlock(tp); 8825 tg3_full_unlock(tp);
8826
8827 if (netif_running(dev))
8828 tg3_netif_start(tp);
8759} 8829}
8760#endif 8830#endif
8761 8831
@@ -10160,8 +10230,14 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
10160 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) { 10230 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787) {
10161 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2; 10231 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_2;
10162 tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI; 10232 tp->tg3_flags2 |= TG3_FLG2_1SHOT_MSI;
10163 } else 10233 } else {
10164 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1; 10234 tp->tg3_flags2 |= TG3_FLG2_HW_TSO_1 |
10235 TG3_FLG2_HW_TSO_1_BUG;
10236 if (GET_ASIC_REV(tp->pci_chip_rev_id) ==
10237 ASIC_REV_5750 &&
10238 tp->pci_chip_rev_id >= CHIPREV_ID_5750_C2)
10239 tp->tg3_flags2 &= ~TG3_FLG2_HW_TSO_1_BUG;
10240 }
10165 } 10241 }
10166 10242
10167 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 && 10243 if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705 &&
@@ -10533,6 +10609,16 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
10533 (tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0) 10609 (tp->tg3_flags & TG3_FLAG_PCIX_MODE) != 0)
10534 tp->rx_offset = 0; 10610 tp->rx_offset = 0;
10535 10611
10612 tp->rx_std_max_post = TG3_RX_RING_SIZE;
10613
10614 /* Increment the rx prod index on the rx std ring by at most
10615 * 8 for these chips to workaround hw errata.
10616 */
10617 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5750 ||
10618 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752 ||
10619 GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5755)
10620 tp->rx_std_max_post = 8;
10621
10536 /* By default, disable wake-on-lan. User can change this 10622 /* By default, disable wake-on-lan. User can change this
10537 * using ETHTOOL_SWOL. 10623 * using ETHTOOL_SWOL.
10538 */ 10624 */
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h
index 8209da5dd15..ba2c98711c8 100644
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -125,6 +125,7 @@
125#define CHIPREV_ID_5750_A0 0x4000 125#define CHIPREV_ID_5750_A0 0x4000
126#define CHIPREV_ID_5750_A1 0x4001 126#define CHIPREV_ID_5750_A1 0x4001
127#define CHIPREV_ID_5750_A3 0x4003 127#define CHIPREV_ID_5750_A3 0x4003
128#define CHIPREV_ID_5750_C2 0x4202
128#define CHIPREV_ID_5752_A0_HW 0x5000 129#define CHIPREV_ID_5752_A0_HW 0x5000
129#define CHIPREV_ID_5752_A0 0x6000 130#define CHIPREV_ID_5752_A0 0x6000
130#define CHIPREV_ID_5752_A1 0x6001 131#define CHIPREV_ID_5752_A1 0x6001
@@ -760,6 +761,7 @@
760#define RCVLPC_STATSCTRL_ENABLE 0x00000001 761#define RCVLPC_STATSCTRL_ENABLE 0x00000001
761#define RCVLPC_STATSCTRL_FASTUPD 0x00000002 762#define RCVLPC_STATSCTRL_FASTUPD 0x00000002
762#define RCVLPC_STATS_ENABLE 0x00002018 763#define RCVLPC_STATS_ENABLE 0x00002018
764#define RCVLPC_STATSENAB_DACK_FIX 0x00040000
763#define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000 765#define RCVLPC_STATSENAB_LNGBRST_RFIX 0x00400000
764#define RCVLPC_STATS_INCMASK 0x0000201c 766#define RCVLPC_STATS_INCMASK 0x0000201c
765/* 0x2020 --> 0x2100 unused */ 767/* 0x2020 --> 0x2100 unused */
@@ -2137,6 +2139,7 @@ struct tg3 {
2137 struct tg3_rx_buffer_desc *rx_std; 2139 struct tg3_rx_buffer_desc *rx_std;
2138 struct ring_info *rx_std_buffers; 2140 struct ring_info *rx_std_buffers;
2139 dma_addr_t rx_std_mapping; 2141 dma_addr_t rx_std_mapping;
2142 u32 rx_std_max_post;
2140 2143
2141 struct tg3_rx_buffer_desc *rx_jumbo; 2144 struct tg3_rx_buffer_desc *rx_jumbo;
2142 struct ring_info *rx_jumbo_buffers; 2145 struct ring_info *rx_jumbo_buffers;
@@ -2191,7 +2194,7 @@ struct tg3 {
2191#define TG3_FLAG_INIT_COMPLETE 0x80000000 2194#define TG3_FLAG_INIT_COMPLETE 0x80000000
2192 u32 tg3_flags2; 2195 u32 tg3_flags2;
2193#define TG3_FLG2_RESTART_TIMER 0x00000001 2196#define TG3_FLG2_RESTART_TIMER 0x00000001
2194/* 0x00000002 available */ 2197#define TG3_FLG2_HW_TSO_1_BUG 0x00000002
2195#define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004 2198#define TG3_FLG2_NO_ETH_WIRE_SPEED 0x00000004
2196#define TG3_FLG2_IS_5788 0x00000008 2199#define TG3_FLG2_IS_5788 0x00000008
2197#define TG3_FLG2_MAX_RXPEND_64 0x00000010 2200#define TG3_FLG2_MAX_RXPEND_64 0x00000010
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c
index 12076f8f942..23c0017f25a 100644
--- a/drivers/net/tlan.c
+++ b/drivers/net/tlan.c
@@ -943,7 +943,7 @@ static int TLan_Open( struct net_device *dev )
943 int err; 943 int err;
944 944
945 priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION ); 945 priv->tlanRev = TLan_DioRead8( dev->base_addr, TLAN_DEF_REVISION );
946 err = request_irq( dev->irq, TLan_HandleInterrupt, SA_SHIRQ, TLanSignature, dev ); 946 err = request_irq( dev->irq, TLan_HandleInterrupt, IRQF_SHARED, TLanSignature, dev );
947 947
948 if ( err ) { 948 if ( err ) {
949 printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq ); 949 printk(KERN_ERR "TLAN: Cannot open %s because IRQ %d is already in use.\n", dev->name, dev->irq );
diff --git a/drivers/net/tokenring/3c359.c b/drivers/net/tokenring/3c359.c
index 41e0cd8f478..465921e3874 100644
--- a/drivers/net/tokenring/3c359.c
+++ b/drivers/net/tokenring/3c359.c
@@ -42,7 +42,6 @@
42 42
43#define XL_DEBUG 0 43#define XL_DEBUG 0
44 44
45#include <linux/config.h>
46#include <linux/module.h> 45#include <linux/module.h>
47#include <linux/kernel.h> 46#include <linux/kernel.h>
48#include <linux/errno.h> 47#include <linux/errno.h>
@@ -577,7 +576,7 @@ static int xl_open(struct net_device *dev)
577 576
578 u16 switchsettings, switchsettings_eeprom ; 577 u16 switchsettings, switchsettings_eeprom ;
579 578
580 if(request_irq(dev->irq, &xl_interrupt, SA_SHIRQ , "3c359", dev)) { 579 if(request_irq(dev->irq, &xl_interrupt, IRQF_SHARED , "3c359", dev)) {
581 return -EAGAIN; 580 return -EAGAIN;
582 } 581 }
583 582
diff --git a/drivers/net/tokenring/abyss.c b/drivers/net/tokenring/abyss.c
index 649d8ea354f..1bdd3beefbe 100644
--- a/drivers/net/tokenring/abyss.c
+++ b/drivers/net/tokenring/abyss.c
@@ -123,7 +123,7 @@ static int __devinit abyss_attach(struct pci_dev *pdev, const struct pci_device_
123 goto err_out_trdev; 123 goto err_out_trdev;
124 } 124 }
125 125
126 ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ, 126 ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED,
127 dev->name, dev); 127 dev->name, dev);
128 if (ret) 128 if (ret)
129 goto err_out_region; 129 goto err_out_region;
diff --git a/drivers/net/tokenring/lanstreamer.c b/drivers/net/tokenring/lanstreamer.c
index c58a4c31d0d..28d968ffd5d 100644
--- a/drivers/net/tokenring/lanstreamer.c
+++ b/drivers/net/tokenring/lanstreamer.c
@@ -100,7 +100,6 @@
100 100
101#define STREAMER_IOCTL 0 101#define STREAMER_IOCTL 0
102 102
103#include <linux/config.h>
104#include <linux/module.h> 103#include <linux/module.h>
105#include <linux/kernel.h> 104#include <linux/kernel.h>
106#include <linux/errno.h> 105#include <linux/errno.h>
@@ -602,7 +601,7 @@ static int streamer_open(struct net_device *dev)
602 rc=streamer_reset(dev); 601 rc=streamer_reset(dev);
603 } 602 }
604 603
605 if (request_irq(dev->irq, &streamer_interrupt, SA_SHIRQ, "lanstreamer", dev)) { 604 if (request_irq(dev->irq, &streamer_interrupt, IRQF_SHARED, "lanstreamer", dev)) {
606 return -EAGAIN; 605 return -EAGAIN;
607 } 606 }
608#if STREAMER_DEBUG 607#if STREAMER_DEBUG
diff --git a/drivers/net/tokenring/madgemc.c b/drivers/net/tokenring/madgemc.c
index 19e6f4dfd69..666bbaaae82 100644
--- a/drivers/net/tokenring/madgemc.c
+++ b/drivers/net/tokenring/madgemc.c
@@ -311,7 +311,7 @@ static int __devinit madgemc_probe(struct device *device)
311 */ 311 */
312 outb(0, dev->base_addr + MC_CONTROL_REG0); /* sanity */ 312 outb(0, dev->base_addr + MC_CONTROL_REG0); /* sanity */
313 madgemc_setsifsel(dev, 1); 313 madgemc_setsifsel(dev, 1);
314 if (request_irq(dev->irq, madgemc_interrupt, SA_SHIRQ, 314 if (request_irq(dev->irq, madgemc_interrupt, IRQF_SHARED,
315 "madgemc", dev)) { 315 "madgemc", dev)) {
316 ret = -EBUSY; 316 ret = -EBUSY;
317 goto getout3; 317 goto getout3;
diff --git a/drivers/net/tokenring/olympic.c b/drivers/net/tokenring/olympic.c
index c3cb8d26cfe..85831484bc4 100644
--- a/drivers/net/tokenring/olympic.c
+++ b/drivers/net/tokenring/olympic.c
@@ -80,7 +80,6 @@
80#define OLYMPIC_DEBUG 0 80#define OLYMPIC_DEBUG 0
81 81
82 82
83#include <linux/config.h>
84#include <linux/module.h> 83#include <linux/module.h>
85#include <linux/kernel.h> 84#include <linux/kernel.h>
86#include <linux/errno.h> 85#include <linux/errno.h>
@@ -446,7 +445,7 @@ static int olympic_open(struct net_device *dev)
446 445
447 olympic_init(dev); 446 olympic_init(dev);
448 447
449 if(request_irq(dev->irq, &olympic_interrupt, SA_SHIRQ , "olympic", dev)) { 448 if(request_irq(dev->irq, &olympic_interrupt, IRQF_SHARED , "olympic", dev)) {
450 return -EAGAIN; 449 return -EAGAIN;
451 } 450 }
452 451
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 67d2b596ce2..cd2e0251e2b 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -29,7 +29,6 @@
29 */ 29 */
30 30
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/config.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/types.h> 33#include <linux/types.h>
35#include <linux/fcntl.h> 34#include <linux/fcntl.h>
@@ -532,7 +531,7 @@ static int __init smctr_chk_mca(struct net_device *dev)
532 dev->irq = 15; 531 dev->irq = 15;
533 break; 532 break;
534 } 533 }
535 if (request_irq(dev->irq, smctr_interrupt, SA_SHIRQ, smctr_name, dev)) { 534 if (request_irq(dev->irq, smctr_interrupt, IRQF_SHARED, smctr_name, dev)) {
536 release_region(dev->base_addr, SMCTR_IO_EXTENT); 535 release_region(dev->base_addr, SMCTR_IO_EXTENT);
537 return -ENODEV; 536 return -ENODEV;
538 } 537 }
@@ -1062,7 +1061,7 @@ static int __init smctr_chk_isa(struct net_device *dev)
1062 goto out2; 1061 goto out2;
1063 } 1062 }
1064 1063
1065 if (request_irq(dev->irq, smctr_interrupt, SA_SHIRQ, smctr_name, dev)) 1064 if (request_irq(dev->irq, smctr_interrupt, IRQF_SHARED, smctr_name, dev))
1066 goto out2; 1065 goto out2;
1067 1066
1068 /* Get 58x Rom Base */ 1067 /* Get 58x Rom Base */
diff --git a/drivers/net/tokenring/smctr_firmware.h b/drivers/net/tokenring/smctr_firmware.h
index 48994b043b7..292e50ddf01 100644
--- a/drivers/net/tokenring/smctr_firmware.h
+++ b/drivers/net/tokenring/smctr_firmware.h
@@ -17,7 +17,6 @@
17 * - Jay Schulist <jschlst@samba.org> 17 * - Jay Schulist <jschlst@samba.org>
18 */ 18 */
19 19
20#include <linux/config.h>
21 20
22#if defined(CONFIG_SMCTR) || defined(CONFIG_SMCTR_MODULE) 21#if defined(CONFIG_SMCTR) || defined(CONFIG_SMCTR_MODULE)
23 22
diff --git a/drivers/net/tokenring/tmspci.c b/drivers/net/tokenring/tmspci.c
index ab47c0547a3..7d3e270c4f4 100644
--- a/drivers/net/tokenring/tmspci.c
+++ b/drivers/net/tokenring/tmspci.c
@@ -122,7 +122,7 @@ static int __devinit tms_pci_attach(struct pci_dev *pdev, const struct pci_devic
122 goto err_out_trdev; 122 goto err_out_trdev;
123 } 123 }
124 124
125 ret = request_irq(pdev->irq, tms380tr_interrupt, SA_SHIRQ, 125 ret = request_irq(pdev->irq, tms380tr_interrupt, IRQF_SHARED,
126 dev->name, dev); 126 dev->name, dev);
127 if (ret) 127 if (ret)
128 goto err_out_region; 128 goto err_out_region;
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index fc2468ecce0..d05c5aa254e 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -31,7 +31,6 @@
31#define DRV_VERSION "0.7" 31#define DRV_VERSION "0.7"
32#define DRV_RELDATE "Mar 17, 2004" 32#define DRV_RELDATE "Mar 17, 2004"
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
37#include <linux/netdevice.h> 36#include <linux/netdevice.h>
@@ -1372,7 +1371,7 @@ static int de_open (struct net_device *dev)
1372 1371
1373 dw32(IntrMask, 0); 1372 dw32(IntrMask, 0);
1374 1373
1375 rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev); 1374 rc = request_irq(dev->irq, de_interrupt, IRQF_SHARED, dev->name, dev);
1376 if (rc) { 1375 if (rc) {
1377 printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n", 1376 printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n",
1378 dev->name, dev->irq, rc); 1377 dev->name, dev->irq, rc);
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index da8bd0d62a3..75ff14a5523 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -292,7 +292,7 @@
292 0.41 21-Mar-96 Don't check for get_hw_addr checksum unless DEC card 292 0.41 21-Mar-96 Don't check for get_hw_addr checksum unless DEC card
293 only <niles@axp745gsfc.nasa.gov> 293 only <niles@axp745gsfc.nasa.gov>
294 Fix for multiple PCI cards reported by <jos@xos.nl> 294 Fix for multiple PCI cards reported by <jos@xos.nl>
295 Duh, put the SA_SHIRQ flag into request_interrupt(). 295 Duh, put the IRQF_SHARED flag into request_interrupt().
296 Fix SMC ethernet address in enet_det[]. 296 Fix SMC ethernet address in enet_det[].
297 Print chip name instead of "UNKNOWN" during boot. 297 Print chip name instead of "UNKNOWN" during boot.
298 0.42 26-Apr-96 Fix MII write TA bit error. 298 0.42 26-Apr-96 Fix MII write TA bit error.
@@ -353,7 +353,7 @@
353 infoblocks. 353 infoblocks.
354 Added DC21142 and DC21143 functions. 354 Added DC21142 and DC21143 functions.
355 Added byte counters from <phil@tazenda.demon.co.uk> 355 Added byte counters from <phil@tazenda.demon.co.uk>
356 Added SA_INTERRUPT temporary fix from 356 Added IRQF_DISABLED temporary fix from
357 <mjacob@feral.com>. 357 <mjacob@feral.com>.
358 0.53 12-Nov-97 Fix the *_probe() to include 'eth??' name during 358 0.53 12-Nov-97 Fix the *_probe() to include 'eth??' name during
359 module load: bug reported by 359 module load: bug reported by
@@ -443,7 +443,6 @@
443 ========================================================================= 443 =========================================================================
444*/ 444*/
445 445
446#include <linux/config.h>
447#include <linux/module.h> 446#include <linux/module.h>
448#include <linux/kernel.h> 447#include <linux/kernel.h>
449#include <linux/string.h> 448#include <linux/string.h>
@@ -1320,10 +1319,10 @@ de4x5_open(struct net_device *dev)
1320 lp->state = OPEN; 1319 lp->state = OPEN;
1321 de4x5_dbg_open(dev); 1320 de4x5_dbg_open(dev);
1322 1321
1323 if (request_irq(dev->irq, (void *)de4x5_interrupt, SA_SHIRQ, 1322 if (request_irq(dev->irq, (void *)de4x5_interrupt, IRQF_SHARED,
1324 lp->adapter_name, dev)) { 1323 lp->adapter_name, dev)) {
1325 printk("de4x5_open(): Requested IRQ%d is busy - attemping FAST/SHARE...", dev->irq); 1324 printk("de4x5_open(): Requested IRQ%d is busy - attemping FAST/SHARE...", dev->irq);
1326 if (request_irq(dev->irq, de4x5_interrupt, SA_INTERRUPT | SA_SHIRQ, 1325 if (request_irq(dev->irq, de4x5_interrupt, IRQF_DISABLED | IRQF_SHARED,
1327 lp->adapter_name, dev)) { 1326 lp->adapter_name, dev)) {
1328 printk("\n Cannot get IRQ- reconfigure your hardware.\n"); 1327 printk("\n Cannot get IRQ- reconfigure your hardware.\n");
1329 disable_ast(dev); 1328 disable_ast(dev);
diff --git a/drivers/net/tulip/dmfe.c b/drivers/net/tulip/dmfe.c
index ba5b112093f..4e5b0f2acc3 100644
--- a/drivers/net/tulip/dmfe.c
+++ b/drivers/net/tulip/dmfe.c
@@ -506,7 +506,7 @@ static int dmfe_open(struct DEVICE *dev)
506 506
507 DMFE_DBUG(0, "dmfe_open", 0); 507 DMFE_DBUG(0, "dmfe_open", 0);
508 508
509 ret = request_irq(dev->irq, &dmfe_interrupt, SA_SHIRQ, dev->name, dev); 509 ret = request_irq(dev->irq, &dmfe_interrupt, IRQF_SHARED, dev->name, dev);
510 if (ret) 510 if (ret)
511 return ret; 511 return ret;
512 512
diff --git a/drivers/net/tulip/interrupt.c b/drivers/net/tulip/interrupt.c
index da4f7593c50..99ccf2ebb34 100644
--- a/drivers/net/tulip/interrupt.c
+++ b/drivers/net/tulip/interrupt.c
@@ -16,7 +16,6 @@
16 16
17#include <linux/pci.h> 17#include <linux/pci.h>
18#include "tulip.h" 18#include "tulip.h"
19#include <linux/config.h>
20#include <linux/etherdevice.h> 19#include <linux/etherdevice.h>
21 20
22int tulip_rx_copybreak; 21int tulip_rx_copybreak;
diff --git a/drivers/net/tulip/tulip.h b/drivers/net/tulip/tulip.h
index d25020da679..3bcfbf3d23e 100644
--- a/drivers/net/tulip/tulip.h
+++ b/drivers/net/tulip/tulip.h
@@ -16,7 +16,6 @@
16#ifndef __NET_TULIP_H__ 16#ifndef __NET_TULIP_H__
17#define __NET_TULIP_H__ 17#define __NET_TULIP_H__
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/spinlock.h> 21#include <linux/spinlock.h>
diff --git a/drivers/net/tulip/tulip_core.c b/drivers/net/tulip/tulip_core.c
index 53fd9b56d0b..7351831f57c 100644
--- a/drivers/net/tulip/tulip_core.c
+++ b/drivers/net/tulip/tulip_core.c
@@ -14,7 +14,6 @@
14 14
15*/ 15*/
16 16
17#include <linux/config.h>
18 17
19#define DRV_NAME "tulip" 18#define DRV_NAME "tulip"
20#ifdef CONFIG_TULIP_NAPI 19#ifdef CONFIG_TULIP_NAPI
@@ -490,7 +489,7 @@ tulip_open(struct net_device *dev)
490{ 489{
491 int retval; 490 int retval;
492 491
493 if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) 492 if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev)))
494 return retval; 493 return retval;
495 494
496 tulip_init_ring (dev); 495 tulip_init_ring (dev);
@@ -1771,7 +1770,7 @@ static int tulip_resume(struct pci_dev *pdev)
1771 1770
1772 pci_enable_device(pdev); 1771 pci_enable_device(pdev);
1773 1772
1774 if ((retval = request_irq(dev->irq, &tulip_interrupt, SA_SHIRQ, dev->name, dev))) { 1773 if ((retval = request_irq(dev->irq, &tulip_interrupt, IRQF_SHARED, dev->name, dev))) {
1775 printk (KERN_ERR "tulip: request_irq failed in resume\n"); 1774 printk (KERN_ERR "tulip: request_irq failed in resume\n");
1776 return retval; 1775 return retval;
1777 } 1776 }
diff --git a/drivers/net/tulip/uli526x.c b/drivers/net/tulip/uli526x.c
index 8b3a28f53c3..fd64b2b3e99 100644
--- a/drivers/net/tulip/uli526x.c
+++ b/drivers/net/tulip/uli526x.c
@@ -436,7 +436,7 @@ static int uli526x_open(struct net_device *dev)
436 436
437 ULI526X_DBUG(0, "uli526x_open", 0); 437 ULI526X_DBUG(0, "uli526x_open", 0);
438 438
439 ret = request_irq(dev->irq, &uli526x_interrupt, SA_SHIRQ, dev->name, dev); 439 ret = request_irq(dev->irq, &uli526x_interrupt, IRQF_SHARED, dev->name, dev);
440 if (ret) 440 if (ret)
441 return ret; 441 return ret;
442 442
diff --git a/drivers/net/tulip/winbond-840.c b/drivers/net/tulip/winbond-840.c
index 602a6e5002a..b4c0d101a7d 100644
--- a/drivers/net/tulip/winbond-840.c
+++ b/drivers/net/tulip/winbond-840.c
@@ -658,7 +658,7 @@ static int netdev_open(struct net_device *dev)
658 iowrite32(0x00000001, ioaddr + PCIBusCfg); /* Reset */ 658 iowrite32(0x00000001, ioaddr + PCIBusCfg); /* Reset */
659 659
660 netif_device_detach(dev); 660 netif_device_detach(dev);
661 i = request_irq(dev->irq, &intr_handler, SA_SHIRQ, dev->name, dev); 661 i = request_irq(dev->irq, &intr_handler, IRQF_SHARED, dev->name, dev);
662 if (i) 662 if (i)
663 goto out_err; 663 goto out_err;
664 664
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
index 63c2175ed13..f874e4f6ccf 100644
--- a/drivers/net/tulip/xircom_cb.c
+++ b/drivers/net/tulip/xircom_cb.c
@@ -457,7 +457,7 @@ static int xircom_open(struct net_device *dev)
457 int retval; 457 int retval;
458 enter("xircom_open"); 458 enter("xircom_open");
459 printk(KERN_INFO "xircom cardbus adaptor found, registering as %s, using irq %i \n",dev->name,dev->irq); 459 printk(KERN_INFO "xircom cardbus adaptor found, registering as %s, using irq %i \n",dev->name,dev->irq);
460 retval = request_irq(dev->irq, &xircom_interrupt, SA_SHIRQ, dev->name, dev); 460 retval = request_irq(dev->irq, &xircom_interrupt, IRQF_SHARED, dev->name, dev);
461 if (retval) { 461 if (retval) {
462 leave("xircom_open - No IRQ"); 462 leave("xircom_open - No IRQ");
463 return retval; 463 return retval;
diff --git a/drivers/net/tulip/xircom_tulip_cb.c b/drivers/net/tulip/xircom_tulip_cb.c
index 887d7245fe7..091ebb7a62f 100644
--- a/drivers/net/tulip/xircom_tulip_cb.c
+++ b/drivers/net/tulip/xircom_tulip_cb.c
@@ -98,7 +98,6 @@ static int csr0 = 0x00A00000 | 0x4800;
98/* PCI registers */ 98/* PCI registers */
99#define PCI_POWERMGMT 0x40 99#define PCI_POWERMGMT 0x40
100 100
101#include <linux/config.h>
102#include <linux/module.h> 101#include <linux/module.h>
103#include <linux/moduleparam.h> 102#include <linux/moduleparam.h>
104#include <linux/kernel.h> 103#include <linux/kernel.h>
@@ -808,7 +807,7 @@ xircom_open(struct net_device *dev)
808{ 807{
809 struct xircom_private *tp = netdev_priv(dev); 808 struct xircom_private *tp = netdev_priv(dev);
810 809
811 if (request_irq(dev->irq, &xircom_interrupt, SA_SHIRQ, dev->name, dev)) 810 if (request_irq(dev->irq, &xircom_interrupt, IRQF_SHARED, dev->name, dev))
812 return -EAGAIN; 811 return -EAGAIN;
813 812
814 xircom_up(dev); 813 xircom_up(dev);
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 732c5edec2e..329d9feb9b8 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -39,7 +39,6 @@
39#define DRV_DESCRIPTION "Universal TUN/TAP device driver" 39#define DRV_DESCRIPTION "Universal TUN/TAP device driver"
40#define DRV_COPYRIGHT "(C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>" 40#define DRV_COPYRIGHT "(C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>"
41 41
42#include <linux/config.h>
43#include <linux/module.h> 42#include <linux/module.h>
44#include <linux/errno.h> 43#include <linux/errno.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index e24d2dafcf6..063816f2b11 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -2131,7 +2131,7 @@ typhoon_open(struct net_device *dev)
2131 goto out_sleep; 2131 goto out_sleep;
2132 } 2132 }
2133 2133
2134 err = request_irq(dev->irq, &typhoon_interrupt, SA_SHIRQ, 2134 err = request_irq(dev->irq, &typhoon_interrupt, IRQF_SHARED,
2135 dev->name, dev); 2135 dev->name, dev);
2136 if(err < 0) 2136 if(err < 0)
2137 goto out_sleep; 2137 goto out_sleep;
diff --git a/drivers/net/via-rhine.c b/drivers/net/via-rhine.c
index c80a4f1d5f7..98b6f3207d3 100644
--- a/drivers/net/via-rhine.c
+++ b/drivers/net/via-rhine.c
@@ -1210,7 +1210,7 @@ static int rhine_open(struct net_device *dev)
1210 void __iomem *ioaddr = rp->base; 1210 void __iomem *ioaddr = rp->base;
1211 int rc; 1211 int rc;
1212 1212
1213 rc = request_irq(rp->pdev->irq, &rhine_interrupt, SA_SHIRQ, dev->name, 1213 rc = request_irq(rp->pdev->irq, &rhine_interrupt, IRQF_SHARED, dev->name,
1214 dev); 1214 dev);
1215 if (rc) 1215 if (rc)
1216 return rc; 1216 return rc;
@@ -1999,7 +1999,7 @@ static int rhine_resume(struct pci_dev *pdev)
1999 if (!netif_running(dev)) 1999 if (!netif_running(dev))
2000 return 0; 2000 return 0;
2001 2001
2002 if (request_irq(dev->irq, rhine_interrupt, SA_SHIRQ, dev->name, dev)) 2002 if (request_irq(dev->irq, rhine_interrupt, IRQF_SHARED, dev->name, dev))
2003 printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name); 2003 printk(KERN_ERR "via-rhine %s: request_irq failed\n", dev->name);
2004 2004
2005 ret = pci_set_power_state(pdev, PCI_D0); 2005 ret = pci_set_power_state(pdev, PCI_D0);
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c
index 09e05fe40c3..ba2972ba375 100644
--- a/drivers/net/via-velocity.c
+++ b/drivers/net/via-velocity.c
@@ -47,7 +47,6 @@
47 47
48#include <linux/module.h> 48#include <linux/module.h>
49#include <linux/types.h> 49#include <linux/types.h>
50#include <linux/config.h>
51#include <linux/init.h> 50#include <linux/init.h>
52#include <linux/mm.h> 51#include <linux/mm.h>
53#include <linux/errno.h> 52#include <linux/errno.h>
@@ -65,7 +64,6 @@
65#include <linux/wait.h> 64#include <linux/wait.h>
66#include <asm/io.h> 65#include <asm/io.h>
67#include <linux/if.h> 66#include <linux/if.h>
68#include <linux/config.h>
69#include <asm/uaccess.h> 67#include <asm/uaccess.h>
70#include <linux/proc_fs.h> 68#include <linux/proc_fs.h>
71#include <linux/inetdevice.h> 69#include <linux/inetdevice.h>
@@ -1752,7 +1750,7 @@ static int velocity_open(struct net_device *dev)
1752 1750
1753 velocity_init_registers(vptr, VELOCITY_INIT_COLD); 1751 velocity_init_registers(vptr, VELOCITY_INIT_COLD);
1754 1752
1755 ret = request_irq(vptr->pdev->irq, &velocity_intr, SA_SHIRQ, 1753 ret = request_irq(vptr->pdev->irq, &velocity_intr, IRQF_SHARED,
1756 dev->name, dev); 1754 dev->name, dev);
1757 if (ret < 0) { 1755 if (ret < 0) {
1758 /* Power down the chip */ 1756 /* Power down the chip */
diff --git a/drivers/net/wan/cosa.c b/drivers/net/wan/cosa.c
index be5e33814cb..1f95b4864ea 100644
--- a/drivers/net/wan/cosa.c
+++ b/drivers/net/wan/cosa.c
@@ -79,7 +79,6 @@
79 79
80/* ---------- Headers, macros, data structures ---------- */ 80/* ---------- Headers, macros, data structures ---------- */
81 81
82#include <linux/config.h>
83#include <linux/module.h> 82#include <linux/module.h>
84#include <linux/kernel.h> 83#include <linux/kernel.h>
85#include <linux/slab.h> 84#include <linux/slab.h>
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index 04a376ec0ed..684af4316ff 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -752,7 +752,7 @@ static int __devinit dscc4_init_one(struct pci_dev *pdev,
752 752
753 priv = pci_get_drvdata(pdev); 753 priv = pci_get_drvdata(pdev);
754 754
755 rc = request_irq(pdev->irq, dscc4_irq, SA_SHIRQ, DRV_NAME, priv->root); 755 rc = request_irq(pdev->irq, dscc4_irq, IRQF_SHARED, DRV_NAME, priv->root);
756 if (rc < 0) { 756 if (rc < 0) {
757 printk(KERN_WARNING "%s: IRQ %d busy\n", DRV_NAME, pdev->irq); 757 printk(KERN_WARNING "%s: IRQ %d busy\n", DRV_NAME, pdev->irq);
758 goto err_release_4; 758 goto err_release_4;
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index 7981a2c7906..3705db04a34 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -2519,7 +2519,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2519 dbg(DBG_PCI, "kernel mem %p, ctlmem %p\n", card->mem, card->ctlmem); 2519 dbg(DBG_PCI, "kernel mem %p, ctlmem %p\n", card->mem, card->ctlmem);
2520 2520
2521 /* Register the interrupt handler */ 2521 /* Register the interrupt handler */
2522 if (request_irq(pdev->irq, fst_intr, SA_SHIRQ, FST_DEV_NAME, card)) { 2522 if (request_irq(pdev->irq, fst_intr, IRQF_SHARED, FST_DEV_NAME, card)) {
2523 printk_err("Unable to register interrupt %d\n", card->irq); 2523 printk_err("Unable to register interrupt %d\n", card->irq);
2524 pci_release_regions(pdev); 2524 pci_release_regions(pdev);
2525 pci_disable_device(pdev); 2525 pci_disable_device(pdev);
diff --git a/drivers/net/wan/hdlc_generic.c b/drivers/net/wan/hdlc_generic.c
index 57f9538b8fb..b7da55140fb 100644
--- a/drivers/net/wan/hdlc_generic.c
+++ b/drivers/net/wan/hdlc_generic.c
@@ -22,7 +22,6 @@
22 * - proto.start() and stop() are called with spin_lock_irq held. 22 * - proto.start() and stop() are called with spin_lock_irq held.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/slab.h> 27#include <linux/slab.h>
diff --git a/drivers/net/wan/hostess_sv11.c b/drivers/net/wan/hostess_sv11.c
index cf5c805452a..a4f735723c4 100644
--- a/drivers/net/wan/hostess_sv11.c
+++ b/drivers/net/wan/hostess_sv11.c
@@ -264,7 +264,7 @@ static struct sv11_device *sv11_init(int iobase, int irq)
264 /* We want a fast IRQ for this device. Actually we'd like an even faster 264 /* We want a fast IRQ for this device. Actually we'd like an even faster
265 IRQ ;) - This is one driver RtLinux is made for */ 265 IRQ ;) - This is one driver RtLinux is made for */
266 266
267 if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "Hostess SV11", dev)<0) 267 if(request_irq(irq, &z8530_interrupt, IRQF_DISABLED, "Hostess SV11", dev)<0)
268 { 268 {
269 printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq); 269 printk(KERN_WARNING "hostess: IRQ %d already in use.\n", irq);
270 goto fail1; 270 goto fail1;
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 40926d77916..39f44241a72 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -1058,7 +1058,7 @@ static int lmc_open (struct net_device *dev) /*fold00*/
1058 lmc_softreset (sc); 1058 lmc_softreset (sc);
1059 1059
1060 /* Since we have to use PCI bus, this should work on x86,alpha,ppc */ 1060 /* Since we have to use PCI bus, this should work on x86,alpha,ppc */
1061 if (request_irq (dev->irq, &lmc_interrupt, SA_SHIRQ, dev->name, dev)){ 1061 if (request_irq (dev->irq, &lmc_interrupt, IRQF_SHARED, dev->name, dev)){
1062 printk(KERN_WARNING "%s: could not get irq: %d\n", dev->name, dev->irq); 1062 printk(KERN_WARNING "%s: could not get irq: %d\n", dev->name, dev->irq);
1063 lmc_trace(dev, "lmc_open irq failed out"); 1063 lmc_trace(dev, "lmc_open irq failed out");
1064 return -EAGAIN; 1064 return -EAGAIN;
diff --git a/drivers/net/wan/lmc/lmc_media.c b/drivers/net/wan/lmc/lmc_media.c
index af8b55fdd9d..ae01555d24c 100644
--- a/drivers/net/wan/lmc/lmc_media.c
+++ b/drivers/net/wan/lmc/lmc_media.c
@@ -1,6 +1,5 @@
1/* $Id: lmc_media.c,v 1.13 2000/04/11 05:25:26 asj Exp $ */ 1/* $Id: lmc_media.c,v 1.13 2000/04/11 05:25:26 asj Exp $ */
2 2
3#include <linux/config.h>
4#include <linux/kernel.h> 3#include <linux/kernel.h>
5#include <linux/string.h> 4#include <linux/string.h>
6#include <linux/timer.h> 5#include <linux/timer.h>
diff --git a/drivers/net/wan/pc300_drv.c b/drivers/net/wan/pc300_drv.c
index d7897ae89f9..567effff4a3 100644
--- a/drivers/net/wan/pc300_drv.c
+++ b/drivers/net/wan/pc300_drv.c
@@ -3600,7 +3600,7 @@ cpc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
3600 } 3600 }
3601 3601
3602 /* Allocate IRQ */ 3602 /* Allocate IRQ */
3603 if (request_irq(card->hw.irq, cpc_intr, SA_SHIRQ, "Cyclades-PC300", card)) { 3603 if (request_irq(card->hw.irq, cpc_intr, IRQF_SHARED, "Cyclades-PC300", card)) {
3604 printk ("PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n", 3604 printk ("PC300 found at RAM 0x%08x, but could not allocate IRQ%d.\n",
3605 card->hw.ramphys, card->hw.irq); 3605 card->hw.ramphys, card->hw.irq);
3606 goto err_io_unmap; 3606 goto err_io_unmap;
diff --git a/drivers/net/wan/pci200syn.c b/drivers/net/wan/pci200syn.c
index 24c3c57c13c..4df61fa3214 100644
--- a/drivers/net/wan/pci200syn.c
+++ b/drivers/net/wan/pci200syn.c
@@ -402,7 +402,7 @@ static int __devinit pci200_pci_init_one(struct pci_dev *pdev,
402 writew(readw(p) | 0x0040, p); 402 writew(readw(p) | 0x0040, p);
403 403
404 /* Allocate IRQ */ 404 /* Allocate IRQ */
405 if (request_irq(pdev->irq, sca_intr, SA_SHIRQ, devname, card)) { 405 if (request_irq(pdev->irq, sca_intr, IRQF_SHARED, devname, card)) {
406 printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n", 406 printk(KERN_WARNING "pci200syn: could not allocate IRQ%d.\n",
407 pdev->irq); 407 pdev->irq);
408 pci200_pci_remove_one(pdev); 408 pci200_pci_remove_one(pdev);
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 175ba13bce4..fc75bec1902 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -37,7 +37,6 @@
37 * Known problem: this driver wasn't tested on multiprocessor machine. 37 * Known problem: this driver wasn't tested on multiprocessor machine.
38 */ 38 */
39 39
40#include <linux/config.h>
41#include <linux/module.h> 40#include <linux/module.h>
42#include <linux/kernel.h> 41#include <linux/kernel.h>
43#include <linux/ptrace.h> 42#include <linux/ptrace.h>
@@ -1193,7 +1192,7 @@ sbni_open( struct net_device *dev )
1193 } 1192 }
1194 } 1193 }
1195 1194
1196 if( request_irq(dev->irq, sbni_interrupt, SA_SHIRQ, dev->name, dev) ) { 1195 if( request_irq(dev->irq, sbni_interrupt, IRQF_SHARED, dev->name, dev) ) {
1197 printk( KERN_ERR "%s: unable to get IRQ %d.\n", 1196 printk( KERN_ERR "%s: unable to get IRQ %d.\n",
1198 dev->name, dev->irq ); 1197 dev->name, dev->irq );
1199 return -EAGAIN; 1198 return -EAGAIN;
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c
index 050e854e777..70fb1b98b1d 100644
--- a/drivers/net/wan/sealevel.c
+++ b/drivers/net/wan/sealevel.c
@@ -322,7 +322,7 @@ static __init struct slvl_board *slvl_init(int iobase, int irq,
322 /* We want a fast IRQ for this device. Actually we'd like an even faster 322 /* We want a fast IRQ for this device. Actually we'd like an even faster
323 IRQ ;) - This is one driver RtLinux is made for */ 323 IRQ ;) - This is one driver RtLinux is made for */
324 324
325 if(request_irq(irq, &z8530_interrupt, SA_INTERRUPT, "SeaLevel", dev)<0) 325 if(request_irq(irq, &z8530_interrupt, IRQF_DISABLED, "SeaLevel", dev)<0)
326 { 326 {
327 printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq); 327 printk(KERN_WARNING "sealevel: IRQ %d already in use.\n", irq);
328 goto fail1_1; 328 goto fail1_1;
diff --git a/drivers/net/wan/syncppp.c b/drivers/net/wan/syncppp.c
index 2d1bba06a08..c13b459a013 100644
--- a/drivers/net/wan/syncppp.c
+++ b/drivers/net/wan/syncppp.c
@@ -37,7 +37,6 @@
37 */ 37 */
38#undef DEBUG 38#undef DEBUG
39 39
40#include <linux/config.h>
41#include <linux/module.h> 40#include <linux/module.h>
42#include <linux/kernel.h> 41#include <linux/kernel.h>
43#include <linux/errno.h> 42#include <linux/errno.h>
diff --git a/drivers/net/wan/wanxl.c b/drivers/net/wan/wanxl.c
index 437e0e938e3..d564224cdca 100644
--- a/drivers/net/wan/wanxl.c
+++ b/drivers/net/wan/wanxl.c
@@ -755,7 +755,7 @@ static int __devinit wanxl_pci_init_one(struct pci_dev *pdev,
755 pci_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq); 755 pci_name(pdev), plx_phy, ramsize / 1024, mem_phy, pdev->irq);
756 756
757 /* Allocate IRQ */ 757 /* Allocate IRQ */
758 if (request_irq(pdev->irq, wanxl_intr, SA_SHIRQ, "wanXL", card)) { 758 if (request_irq(pdev->irq, wanxl_intr, IRQF_SHARED, "wanXL", card)) {
759 printk(KERN_WARNING "wanXL %s: could not allocate IRQ%i.\n", 759 printk(KERN_WARNING "wanXL %s: could not allocate IRQ%i.\n",
760 pci_name(pdev), pdev->irq); 760 pci_name(pdev), pdev->irq);
761 wanxl_pci_remove_one(pdev); 761 wanxl_pci_remove_one(pdev);
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c
index 4069b79d825..a4dd1394271 100644
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -19,7 +19,6 @@
19 19
20======================================================================*/ 20======================================================================*/
21 21
22#include <linux/config.h>
23#include <linux/init.h> 22#include <linux/init.h>
24 23
25#include <linux/kernel.h> 24#include <linux/kernel.h>
@@ -2849,7 +2848,7 @@ static struct net_device *_init_airo_card( unsigned short irq, int port,
2849 reset_card (dev, 1); 2848 reset_card (dev, 1);
2850 msleep(400); 2849 msleep(400);
2851 2850
2852 rc = request_irq( dev->irq, airo_interrupt, SA_SHIRQ, dev->name, dev ); 2851 rc = request_irq( dev->irq, airo_interrupt, IRQF_SHARED, dev->name, dev );
2853 if (rc) { 2852 if (rc) {
2854 airo_print_err(dev->name, "register interrupt %d failed, rc %d", 2853 airo_print_err(dev->name, "register interrupt %d failed, rc %d",
2855 irq, rc); 2854 irq, rc);
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index af0cbb6c5c0..ac9437d497f 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -20,7 +20,6 @@
20 20
21======================================================================*/ 21======================================================================*/
22 22
23#include <linux/config.h>
24#ifdef __IN_PCMCIA_PACKAGE__ 23#ifdef __IN_PCMCIA_PACKAGE__
25#include <pcmcia/k_compat.h> 24#include <pcmcia/k_compat.h>
26#endif 25#endif
diff --git a/drivers/net/wireless/airport.c b/drivers/net/wireless/airport.c
index 7b321f7cf35..38fac3bbcd8 100644
--- a/drivers/net/wireless/airport.c
+++ b/drivers/net/wireless/airport.c
@@ -14,7 +14,6 @@
14#define DRIVER_NAME "airport" 14#define DRIVER_NAME "airport"
15#define PFX DRIVER_NAME ": " 15#define PFX DRIVER_NAME ": "
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/init.h> 19#include <linux/init.h>
diff --git a/drivers/net/wireless/arlan-main.c b/drivers/net/wireless/arlan-main.c
index bed6823d980..bb6bea4f323 100644
--- a/drivers/net/wireless/arlan-main.c
+++ b/drivers/net/wireless/arlan-main.c
@@ -5,7 +5,6 @@
5 * This module provides support for the Arlan 655 card made by Aironet 5 * This module provides support for the Arlan 655 card made by Aironet
6 */ 6 */
7 7
8#include <linux/config.h>
9#include "arlan.h" 8#include "arlan.h"
10 9
11#if BITS_PER_LONG != 32 10#if BITS_PER_LONG != 32
diff --git a/drivers/net/wireless/arlan-proc.c b/drivers/net/wireless/arlan-proc.c
index a2cca521f44..5fa985435ff 100644
--- a/drivers/net/wireless/arlan-proc.c
+++ b/drivers/net/wireless/arlan-proc.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include "arlan.h" 1#include "arlan.h"
3 2
4#include <linux/sysctl.h> 3#include <linux/sysctl.h>
diff --git a/drivers/net/wireless/arlan.h b/drivers/net/wireless/arlan.h
index 70a6d7b83c4..3ed1df75900 100644
--- a/drivers/net/wireless/arlan.h
+++ b/drivers/net/wireless/arlan.h
@@ -5,7 +5,6 @@
5 */ 5 */
6 6
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/skbuff.h> 10#include <linux/skbuff.h>
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c
index 8606c88886f..995c7bea589 100644
--- a/drivers/net/wireless/atmel.c
+++ b/drivers/net/wireless/atmel.c
@@ -39,7 +39,6 @@
39 39
40******************************************************************************/ 40******************************************************************************/
41 41
42#include <linux/config.h>
43#include <linux/init.h> 42#include <linux/init.h>
44 43
45#include <linux/kernel.h> 44#include <linux/kernel.h>
@@ -1578,7 +1577,7 @@ struct net_device *init_atmel_card(unsigned short irq, unsigned long port,
1578 1577
1579 SET_NETDEV_DEV(dev, sys_dev); 1578 SET_NETDEV_DEV(dev, sys_dev);
1580 1579
1581 if ((rc = request_irq(dev->irq, service_interrupt, SA_SHIRQ, dev->name, dev))) { 1580 if ((rc = request_irq(dev->irq, service_interrupt, IRQF_SHARED, dev->name, dev))) {
1582 printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc); 1581 printk(KERN_ERR "%s: register interrupt %d failed, rc %d\n", dev->name, irq, rc);
1583 goto err_out_free; 1582 goto err_out_free;
1584 } 1583 }
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 26bf1127524..785664090bb 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -29,7 +29,6 @@
29 29
30******************************************************************************/ 30******************************************************************************/
31 31
32#include <linux/config.h>
33#ifdef __IN_PCMCIA_PACKAGE__ 32#ifdef __IN_PCMCIA_PACKAGE__
34#include <pcmcia/k_compat.h> 33#include <pcmcia/k_compat.h>
35#endif 34#endif
diff --git a/drivers/net/wireless/atmel_pci.c b/drivers/net/wireless/atmel_pci.c
index a61b3bc6ccc..d425c3cefde 100644
--- a/drivers/net/wireless/atmel_pci.c
+++ b/drivers/net/wireless/atmel_pci.c
@@ -19,7 +19,6 @@
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 20
21******************************************************************************/ 21******************************************************************************/
22#include <linux/config.h>
23#include <linux/pci.h> 22#include <linux/pci.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/module.h> 24#include <linux/module.h>
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
index 27bcf47228e..d8f5600578b 100644
--- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c
+++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c
@@ -2175,7 +2175,7 @@ static int bcm43xx_initialize_irq(struct bcm43xx_private *bcm)
2175 } 2175 }
2176#endif 2176#endif
2177 res = request_irq(bcm->irq, bcm43xx_interrupt_handler, 2177 res = request_irq(bcm->irq, bcm43xx_interrupt_handler,
2178 SA_SHIRQ, KBUILD_MODNAME, bcm); 2178 IRQF_SHARED, KBUILD_MODNAME, bcm);
2179 if (res) { 2179 if (res) {
2180 printk(KERN_ERR PFX "Cannot register IRQ%d\n", bcm->irq); 2180 printk(KERN_ERR PFX "Cannot register IRQ%d\n", bcm->irq);
2181 return -ENODEV; 2181 return -ENODEV;
diff --git a/drivers/net/wireless/hermes.c b/drivers/net/wireless/hermes.c
index 2aa2f389c0d..29d39105f5b 100644
--- a/drivers/net/wireless/hermes.c
+++ b/drivers/net/wireless/hermes.c
@@ -38,7 +38,6 @@
38 * under either the MPL or the GPL. 38 * under either the MPL or the GPL.
39 */ 39 */
40 40
41#include <linux/config.h>
42#include <linux/module.h> 41#include <linux/module.h>
43#include <linux/kernel.h> 42#include <linux/kernel.h>
44#include <linux/init.h> 43#include <linux/init.h>
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index db03dc2646d..52e6df5c1a9 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -1,6 +1,5 @@
1#define PRISM2_PCCARD 1#define PRISM2_PCCARD
2 2
3#include <linux/config.h>
4#include <linux/module.h> 3#include <linux/module.h>
5#include <linux/init.h> 4#include <linux/init.h>
6#include <linux/if.h> 5#include <linux/if.h>
@@ -844,7 +843,7 @@ static struct pcmcia_device_id hostap_cs_ids[] = {
844 PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001), 843 PCMCIA_DEVICE_MANF_CARD(0x02d2, 0x0001),
845 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001), 844 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x0001),
846 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), 845 PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300),
847 PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), 846/* PCMCIA_DEVICE_MANF_CARD(0xc00f, 0x0000), conflict with pcnet_cs */
848 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), 847 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002),
849 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), 848 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005),
850 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010), 849 PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0010),
diff --git a/drivers/net/wireless/hostap/hostap_hw.c b/drivers/net/wireless/hostap/hostap_hw.c
index 328e9a1d13b..b764cfda6e8 100644
--- a/drivers/net/wireless/hostap/hostap_hw.c
+++ b/drivers/net/wireless/hostap/hostap_hw.c
@@ -30,7 +30,6 @@
30 */ 30 */
31 31
32 32
33#include <linux/config.h>
34 33
35#include <asm/delay.h> 34#include <asm/delay.h>
36#include <asm/uaccess.h> 35#include <asm/uaccess.h>
diff --git a/drivers/net/wireless/hostap/hostap_main.c b/drivers/net/wireless/hostap/hostap_main.c
index 93786f4218f..53374fcba77 100644
--- a/drivers/net/wireless/hostap/hostap_main.c
+++ b/drivers/net/wireless/hostap/hostap_main.c
@@ -12,7 +12,6 @@
12 * more details. 12 * more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c
index 194f0709758..c2fa011be29 100644
--- a/drivers/net/wireless/hostap/hostap_pci.c
+++ b/drivers/net/wireless/hostap/hostap_pci.c
@@ -4,7 +4,6 @@
4 * driver patches from Reyk Floeter <reyk@vantronix.net> and 4 * driver patches from Reyk Floeter <reyk@vantronix.net> and
5 * Andy Warner <andyw@pobox.com> */ 5 * Andy Warner <andyw@pobox.com> */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/if.h> 9#include <linux/if.h>
@@ -338,7 +337,7 @@ static int prism2_pci_probe(struct pci_dev *pdev,
338 337
339 pci_set_drvdata(pdev, dev); 338 pci_set_drvdata(pdev, dev);
340 339
341 if (request_irq(dev->irq, prism2_interrupt, SA_SHIRQ, dev->name, 340 if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name,
342 dev)) { 341 dev)) {
343 printk(KERN_WARNING "%s: request_irq failed\n", dev->name); 342 printk(KERN_WARNING "%s: request_irq failed\n", dev->name);
344 goto fail; 343 goto fail;
diff --git a/drivers/net/wireless/hostap/hostap_plx.c b/drivers/net/wireless/hostap/hostap_plx.c
index edaaa943eb8..49860fa61c3 100644
--- a/drivers/net/wireless/hostap/hostap_plx.c
+++ b/drivers/net/wireless/hostap/hostap_plx.c
@@ -7,7 +7,6 @@
7 */ 7 */
8 8
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/if.h> 12#include <linux/if.h>
@@ -551,7 +550,7 @@ static int prism2_plx_probe(struct pci_dev *pdev,
551 550
552 pci_set_drvdata(pdev, dev); 551 pci_set_drvdata(pdev, dev);
553 552
554 if (request_irq(dev->irq, prism2_interrupt, SA_SHIRQ, dev->name, 553 if (request_irq(dev->irq, prism2_interrupt, IRQF_SHARED, dev->name,
555 dev)) { 554 dev)) {
556 printk(KERN_WARNING "%s: request_irq failed\n", dev->name); 555 printk(KERN_WARNING "%s: request_irq failed\n", dev->name);
557 goto fail; 556 goto fail;
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c
index 94aeb23a772..e955db435b3 100644
--- a/drivers/net/wireless/ipw2100.c
+++ b/drivers/net/wireless/ipw2100.c
@@ -134,7 +134,6 @@ that only one external action is invoked at a time.
134*/ 134*/
135 135
136#include <linux/compiler.h> 136#include <linux/compiler.h>
137#include <linux/config.h>
138#include <linux/errno.h> 137#include <linux/errno.h>
139#include <linux/if_arp.h> 138#include <linux/if_arp.h>
140#include <linux/in6.h> 139#include <linux/in6.h>
@@ -5358,7 +5357,7 @@ static int ipw2100_set_key(struct ipw2100_priv *priv,
5358 idx, keylen, len); 5357 idx, keylen, len);
5359 5358
5360 /* NOTE: We don't check cached values in case the firmware was reset 5359 /* NOTE: We don't check cached values in case the firmware was reset
5361 * or some other problem is occuring. If the user is setting the key, 5360 * or some other problem is occurring. If the user is setting the key,
5362 * then we push the change */ 5361 * then we push the change */
5363 5362
5364 wep_key->idx = idx; 5363 wep_key->idx = idx;
@@ -6230,7 +6229,7 @@ static int ipw2100_pci_init_one(struct pci_dev *pci_dev,
6230 ipw2100_queues_initialize(priv); 6229 ipw2100_queues_initialize(priv);
6231 6230
6232 err = request_irq(pci_dev->irq, 6231 err = request_irq(pci_dev->irq,
6233 ipw2100_interrupt, SA_SHIRQ, dev->name, priv); 6232 ipw2100_interrupt, IRQF_SHARED, dev->name, priv);
6234 if (err) { 6233 if (err) {
6235 printk(KERN_WARNING DRV_NAME 6234 printk(KERN_WARNING DRV_NAME
6236 "Error calling request_irq: %d.\n", pci_dev->irq); 6235 "Error calling request_irq: %d.\n", pci_dev->irq);
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index a8a8f975432..b3300ffe4ee 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -11545,7 +11545,7 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
11545 11545
11546 ipw_sw_reset(priv, 1); 11546 ipw_sw_reset(priv, 1);
11547 11547
11548 err = request_irq(pdev->irq, ipw_isr, SA_SHIRQ, DRV_NAME, priv); 11548 err = request_irq(pdev->irq, ipw_isr, IRQF_SHARED, DRV_NAME, priv);
11549 if (err) { 11549 if (err) {
11550 IPW_ERROR("Error allocating IRQ %d\n", pdev->irq); 11550 IPW_ERROR("Error allocating IRQ %d\n", pdev->irq);
11551 goto out_destroy_workqueue; 11551 goto out_destroy_workqueue;
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index ea12ad66b8e..8b1cd7c749a 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -31,7 +31,6 @@
31 31
32#include <linux/module.h> 32#include <linux/module.h>
33#include <linux/moduleparam.h> 33#include <linux/moduleparam.h>
34#include <linux/config.h>
35#include <linux/init.h> 34#include <linux/init.h>
36#include <linux/mutex.h> 35#include <linux/mutex.h>
37 36
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index 9343d970537..36b5e004305 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -37,7 +37,6 @@
37/* To have statistics (just packets sent) define this */ 37/* To have statistics (just packets sent) define this */
38#undef NETWAVE_STATS 38#undef NETWAVE_STATS
39 39
40#include <linux/config.h>
41#include <linux/module.h> 40#include <linux/module.h>
42#include <linux/kernel.h> 41#include <linux/kernel.h>
43#include <linux/init.h> 42#include <linux/init.h>
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index 8a31b591a90..d6ed5781b93 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -76,7 +76,6 @@
76 76
77#define DRIVER_NAME "orinoco" 77#define DRIVER_NAME "orinoco"
78 78
79#include <linux/config.h>
80#include <linux/module.h> 79#include <linux/module.h>
81#include <linux/kernel.h> 80#include <linux/kernel.h>
82#include <linux/init.h> 81#include <linux/init.h>
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index b2aec4d9fbb..bc14689cbf2 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -13,7 +13,6 @@
13#define DRIVER_NAME "orinoco_cs" 13#define DRIVER_NAME "orinoco_cs"
14#define PFX DRIVER_NAME ": " 14#define PFX DRIVER_NAME ": "
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/drivers/net/wireless/orinoco_nortel.c b/drivers/net/wireless/orinoco_nortel.c
index 74b9d5b2ba9..bf05b907747 100644
--- a/drivers/net/wireless/orinoco_nortel.c
+++ b/drivers/net/wireless/orinoco_nortel.c
@@ -40,7 +40,6 @@
40#define DRIVER_NAME "orinoco_nortel" 40#define DRIVER_NAME "orinoco_nortel"
41#define PFX DRIVER_NAME ": " 41#define PFX DRIVER_NAME ": "
42 42
43#include <linux/config.h>
44#include <linux/module.h> 43#include <linux/module.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
46#include <linux/init.h> 45#include <linux/init.h>
@@ -199,7 +198,7 @@ static int orinoco_nortel_init_one(struct pci_dev *pdev,
199 198
200 hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); 199 hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING);
201 200
202 err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, 201 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
203 dev->name, dev); 202 dev->name, dev);
204 if (err) { 203 if (err) {
205 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); 204 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
diff --git a/drivers/net/wireless/orinoco_pci.c b/drivers/net/wireless/orinoco_pci.c
index 1c105f40f8d..1759c543fbe 100644
--- a/drivers/net/wireless/orinoco_pci.c
+++ b/drivers/net/wireless/orinoco_pci.c
@@ -44,7 +44,6 @@
44#define DRIVER_NAME "orinoco_pci" 44#define DRIVER_NAME "orinoco_pci"
45#define PFX DRIVER_NAME ": " 45#define PFX DRIVER_NAME ": "
46 46
47#include <linux/config.h>
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/kernel.h> 48#include <linux/kernel.h>
50#include <linux/init.h> 49#include <linux/init.h>
@@ -154,7 +153,7 @@ static int orinoco_pci_init_one(struct pci_dev *pdev,
154 153
155 hermes_struct_init(&priv->hw, hermes_io, HERMES_32BIT_REGSPACING); 154 hermes_struct_init(&priv->hw, hermes_io, HERMES_32BIT_REGSPACING);
156 155
157 err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, 156 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
158 dev->name, dev); 157 dev->name, dev);
159 if (err) { 158 if (err) {
160 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); 159 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
diff --git a/drivers/net/wireless/orinoco_pci.h b/drivers/net/wireless/orinoco_pci.h
index 7eb1e08113e..be1abea4b64 100644
--- a/drivers/net/wireless/orinoco_pci.h
+++ b/drivers/net/wireless/orinoco_pci.h
@@ -63,7 +63,7 @@ static int orinoco_pci_resume(struct pci_dev *pdev)
63 pci_enable_device(pdev); 63 pci_enable_device(pdev);
64 pci_restore_state(pdev); 64 pci_restore_state(pdev);
65 65
66 err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, 66 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
67 dev->name, dev); 67 dev->name, dev);
68 if (err) { 68 if (err) {
69 printk(KERN_ERR "%s: cannot re-allocate IRQ on resume\n", 69 printk(KERN_ERR "%s: cannot re-allocate IRQ on resume\n",
diff --git a/drivers/net/wireless/orinoco_plx.c b/drivers/net/wireless/orinoco_plx.c
index 84f696c7755..7f006f62417 100644
--- a/drivers/net/wireless/orinoco_plx.c
+++ b/drivers/net/wireless/orinoco_plx.c
@@ -86,7 +86,6 @@
86#define DRIVER_NAME "orinoco_plx" 86#define DRIVER_NAME "orinoco_plx"
87#define PFX DRIVER_NAME ": " 87#define PFX DRIVER_NAME ": "
88 88
89#include <linux/config.h>
90#include <linux/module.h> 89#include <linux/module.h>
91#include <linux/kernel.h> 90#include <linux/kernel.h>
92#include <linux/init.h> 91#include <linux/init.h>
@@ -238,7 +237,7 @@ static int orinoco_plx_init_one(struct pci_dev *pdev,
238 237
239 hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); 238 hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING);
240 239
241 err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, 240 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
242 dev->name, dev); 241 dev->name, dev);
243 if (err) { 242 if (err) {
244 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); 243 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
diff --git a/drivers/net/wireless/orinoco_tmd.c b/drivers/net/wireless/orinoco_tmd.c
index d2b4decb7a7..0831721e4d6 100644
--- a/drivers/net/wireless/orinoco_tmd.c
+++ b/drivers/net/wireless/orinoco_tmd.c
@@ -40,7 +40,6 @@
40#define DRIVER_NAME "orinoco_tmd" 40#define DRIVER_NAME "orinoco_tmd"
41#define PFX DRIVER_NAME ": " 41#define PFX DRIVER_NAME ": "
42 42
43#include <linux/config.h>
44#include <linux/module.h> 43#include <linux/module.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
46#include <linux/init.h> 45#include <linux/init.h>
@@ -140,7 +139,7 @@ static int orinoco_tmd_init_one(struct pci_dev *pdev,
140 139
141 hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING); 140 hermes_struct_init(&priv->hw, hermes_io, HERMES_16BIT_REGSPACING);
142 141
143 err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ, 142 err = request_irq(pdev->irq, orinoco_interrupt, IRQF_SHARED,
144 dev->name, dev); 143 dev->name, dev);
145 if (err) { 144 if (err) {
146 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq); 145 printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
index bfa0cc319a0..09fc17a0f02 100644
--- a/drivers/net/wireless/prism54/islpci_hotplug.c
+++ b/drivers/net/wireless/prism54/islpci_hotplug.c
@@ -189,7 +189,7 @@ prism54_probe(struct pci_dev *pdev, const struct pci_device_id *id)
189 189
190 /* request for the interrupt before uploading the firmware */ 190 /* request for the interrupt before uploading the firmware */
191 rvalue = request_irq(pdev->irq, &islpci_interrupt, 191 rvalue = request_irq(pdev->irq, &islpci_interrupt,
192 SA_SHIRQ, ndev->name, priv); 192 IRQF_SHARED, ndev->name, priv);
193 193
194 if (rvalue) { 194 if (rvalue) {
195 /* error, could not hook the handler to the irq */ 195 /* error, could not hook the handler to the irq */
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c
index 6a60c5970cb..2e061a80b29 100644
--- a/drivers/net/wireless/prism54/islpci_mgt.c
+++ b/drivers/net/wireless/prism54/islpci_mgt.c
@@ -18,7 +18,6 @@
18 * 18 *
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/netdevice.h> 21#include <linux/netdevice.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/pci.h> 23#include <linux/pci.h>
diff --git a/drivers/net/wireless/prism54/prismcompat.h b/drivers/net/wireless/prism54/prismcompat.h
index 55541c01752..d71eca55a30 100644
--- a/drivers/net/wireless/prism54/prismcompat.h
+++ b/drivers/net/wireless/prism54/prismcompat.h
@@ -29,7 +29,6 @@
29 29
30#include <linux/device.h> 30#include <linux/device.h>
31#include <linux/firmware.h> 31#include <linux/firmware.h>
32#include <linux/config.h>
33#include <linux/moduleparam.h> 32#include <linux/moduleparam.h>
34#include <linux/workqueue.h> 33#include <linux/workqueue.h>
35#include <linux/compiler.h> 34#include <linux/compiler.h>
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index a915fe6c6aa..61b83a5e737 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -30,7 +30,6 @@
30 * 30 *
31=============================================================================*/ 31=============================================================================*/
32 32
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
36#include <linux/proc_fs.h> 35#include <linux/proc_fs.h>
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index 7f9aa139c34..15465278c78 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -21,7 +21,6 @@
21#define DRIVER_NAME "spectrum_cs" 21#define DRIVER_NAME "spectrum_cs"
22#define PFX DRIVER_NAME ": " 22#define PFX DRIVER_NAME ": "
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/init.h> 26#include <linux/init.h>
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index 18a44580b53..fd31885c684 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -81,7 +81,6 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE";
81/************************************************************************/ 81/************************************************************************/
82/* Header files */ 82/* Header files */
83 83
84#include <linux/config.h>
85#include <linux/kernel.h> 84#include <linux/kernel.h>
86#include <linux/module.h> 85#include <linux/module.h>
87#include <linux/init.h> 86#include <linux/init.h>
diff --git a/drivers/net/wireless/wavelan_cs.p.h b/drivers/net/wireless/wavelan_cs.p.h
index c65fe7a391e..f34a36b0c7b 100644
--- a/drivers/net/wireless/wavelan_cs.p.h
+++ b/drivers/net/wireless/wavelan_cs.p.h
@@ -411,7 +411,6 @@
411/***************************** INCLUDES *****************************/ 411/***************************** INCLUDES *****************************/
412 412
413/* Linux headers that we need */ 413/* Linux headers that we need */
414#include <linux/config.h>
415#include <linux/module.h> 414#include <linux/module.h>
416#include <linux/kernel.h> 415#include <linux/kernel.h>
417#include <linux/init.h> 416#include <linux/init.h>
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index e52a650f673..c03e400face 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -28,7 +28,6 @@
28 */ 28 */
29#undef REALLY_SLOW_IO /* most systems can safely undef this */ 29#undef REALLY_SLOW_IO /* most systems can safely undef this */
30 30
31#include <linux/config.h>
32#include <linux/delay.h> 31#include <linux/delay.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/ethtool.h> 33#include <linux/ethtool.h>
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c
index 569305f5756..bbbf7e274a2 100644
--- a/drivers/net/yellowfin.c
+++ b/drivers/net/yellowfin.c
@@ -602,7 +602,7 @@ static int yellowfin_open(struct net_device *dev)
602 /* Reset the chip. */ 602 /* Reset the chip. */
603 iowrite32(0x80000000, ioaddr + DMACtrl); 603 iowrite32(0x80000000, ioaddr + DMACtrl);
604 604
605 i = request_irq(dev->irq, &yellowfin_interrupt, SA_SHIRQ, dev->name, dev); 605 i = request_irq(dev->irq, &yellowfin_interrupt, IRQF_SHARED, dev->name, dev);
606 if (i) return i; 606 if (i) return i;
607 607
608 if (yellowfin_debug > 1) 608 if (yellowfin_debug > 1)
diff --git a/drivers/net/znet.c b/drivers/net/znet.c
index a7c089df66e..9f0291f3529 100644
--- a/drivers/net/znet.c
+++ b/drivers/net/znet.c
@@ -85,7 +85,6 @@
85 - Understand why some traffic patterns add a 1s latency... 85 - Understand why some traffic patterns add a 1s latency...
86 */ 86 */
87 87
88#include <linux/config.h>
89#include <linux/module.h> 88#include <linux/module.h>
90#include <linux/kernel.h> 89#include <linux/kernel.h>
91#include <linux/string.h> 90#include <linux/string.h>
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c
index 8037e5806d0..df04e050c64 100644
--- a/drivers/net/zorro8390.c
+++ b/drivers/net/zorro8390.c
@@ -201,7 +201,7 @@ static int __devinit zorro8390_init(struct net_device *dev,
201 dev->irq = IRQ_AMIGA_PORTS; 201 dev->irq = IRQ_AMIGA_PORTS;
202 202
203 /* Install the Interrupt handler */ 203 /* Install the Interrupt handler */
204 i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, SA_SHIRQ, DRV_NAME, dev); 204 i = request_irq(IRQ_AMIGA_PORTS, ei_interrupt, IRQF_SHARED, DRV_NAME, dev);
205 if (i) return i; 205 if (i) return i;
206 206
207 for(i = 0; i < ETHER_ADDR_LEN; i++) { 207 for(i = 0; i < ETHER_ADDR_LEN; i++) {
diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c
index 14cbe34eb89..3a0a3a73493 100644
--- a/drivers/nubus/nubus.c
+++ b/drivers/nubus/nubus.c
@@ -7,7 +7,6 @@
7 * and others. 7 * and others.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/string.h> 12#include <linux/string.h>
diff --git a/drivers/nubus/nubus_syms.c b/drivers/nubus/nubus_syms.c
index 22c1dc9f87b..9204f04fbf0 100644
--- a/drivers/nubus/nubus_syms.c
+++ b/drivers/nubus/nubus_syms.c
@@ -2,7 +2,6 @@
2 2
3 (c) 1999 David Huggins-Daines <dhd@debian.org> */ 3 (c) 1999 David Huggins-Daines <dhd@debian.org> */
4 4
5#include <linux/config.h>
6#include <linux/module.h> 5#include <linux/module.h>
7#include <linux/types.h> 6#include <linux/types.h>
8#include <linux/nubus.h> 7#include <linux/nubus.h>
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c
index a5d826237b2..68cb3a08005 100644
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -31,7 +31,6 @@
31** the coherency design originally worked out. Only PCX-W does. 31** the coherency design originally worked out. Only PCX-W does.
32*/ 32*/
33 33
34#include <linux/config.h>
35#include <linux/types.h> 34#include <linux/types.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/mm.h> 36#include <linux/mm.h>
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index ce0a6ebcff1..0d96c50ffe9 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -43,7 +43,6 @@
43** for PCI drivers devices which implement/use MMIO registers. 43** for PCI drivers devices which implement/use MMIO registers.
44*/ 44*/
45 45
46#include <linux/config.h>
47#include <linux/delay.h> 46#include <linux/delay.h>
48#include <linux/types.h> 47#include <linux/types.h>
49#include <linux/kernel.h> 48#include <linux/kernel.h>
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index 58f0ce8d78e..884965cedec 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -340,7 +340,7 @@ static int __devinit eisa_probe(struct parisc_device *dev)
340 } 340 }
341 pcibios_register_hba(&eisa_dev.hba); 341 pcibios_register_hba(&eisa_dev.hba);
342 342
343 result = request_irq(dev->irq, eisa_irq, SA_SHIRQ, "EISA", &eisa_dev); 343 result = request_irq(dev->irq, eisa_irq, IRQF_SHARED, "EISA", &eisa_dev);
344 if (result) { 344 if (result) {
345 printk(KERN_ERR "EISA: request_irq failed!\n"); 345 printk(KERN_ERR "EISA: request_irq failed!\n");
346 return result; 346 return result;
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c
index 5476ba7709b..b45aa5c675a 100644
--- a/drivers/parisc/gsc.c
+++ b/drivers/parisc/gsc.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16#include <linux/bitops.h> 16#include <linux/bitops.h>
17#include <linux/config.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/init.h> 18#include <linux/init.h>
20#include <linux/interrupt.h> 19#include <linux/interrupt.h>
diff --git a/drivers/parisc/led.c b/drivers/parisc/led.c
index d7024c7483b..bf00fa2537b 100644
--- a/drivers/parisc/led.c
+++ b/drivers/parisc/led.c
@@ -23,7 +23,6 @@
23 * David Pye <dmp@davidmpye.dyndns.org> 23 * David Pye <dmp@davidmpye.dyndns.org>
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/stddef.h> /* for offsetof() */ 27#include <linux/stddef.h> /* for offsetof() */
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/drivers/parisc/power.c b/drivers/parisc/power.c
index 0bcab83b408..fad5a33bf0f 100644
--- a/drivers/parisc/power.c
+++ b/drivers/parisc/power.c
@@ -35,7 +35,6 @@
35 * runtime through the "/proc/sys/kernel/power" procfs entry. 35 * runtime through the "/proc/sys/kernel/power" procfs entry.
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/init.h> 39#include <linux/init.h>
41#include <linux/kernel.h> 40#include <linux/kernel.h>
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index d09e39e39c6..8b473281551 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -19,7 +19,6 @@
19** FIXME: add DMA hint support programming in both sba and lba modules. 19** FIXME: add DMA hint support programming in both sba and lba modules.
20*/ 20*/
21 21
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/spinlock.h> 24#include <linux/spinlock.h>
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index a988dc7a9ab..4ee26a6d9e2 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -271,7 +271,7 @@ superio_init(struct pci_dev *pcidev)
271 else 271 else
272 printk(KERN_ERR PFX "USB regulator not initialized!\n"); 272 printk(KERN_ERR PFX "USB regulator not initialized!\n");
273 273
274 if (request_irq(pdev->irq, superio_interrupt, SA_INTERRUPT, 274 if (request_irq(pdev->irq, superio_interrupt, IRQF_DISABLED,
275 SUPERIO, (void *)sio)) { 275 SUPERIO, (void *)sio)) {
276 276
277 printk(KERN_ERR PFX "could not get irq\n"); 277 printk(KERN_ERR PFX "could not get irq\n");
diff --git a/drivers/parport/ieee1284.c b/drivers/parport/ieee1284.c
index 690b239ad3a..7ff09f0f858 100644
--- a/drivers/parport/ieee1284.c
+++ b/drivers/parport/ieee1284.c
@@ -16,7 +16,6 @@
16 * Various hacks, Fred Barnes <frmb2@ukc.ac.uk>, 04/2000 16 * Various hacks, Fred Barnes <frmb2@ukc.ac.uk>, 04/2000
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/threads.h> 20#include <linux/threads.h>
22#include <linux/parport.h> 21#include <linux/parport.h>
diff --git a/drivers/parport/ieee1284_ops.c b/drivers/parport/ieee1284_ops.c
index d6c77658231..525312f2fe9 100644
--- a/drivers/parport/ieee1284_ops.c
+++ b/drivers/parport/ieee1284_ops.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/parport.h> 18#include <linux/parport.h>
20#include <linux/delay.h> 19#include <linux/delay.h>
diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c
index 4baa719439a..1850632590f 100644
--- a/drivers/parport/parport_ax88796.c
+++ b/drivers/parport/parport_ax88796.c
@@ -345,7 +345,7 @@ static int parport_ax88796_probe(struct platform_device *pdev)
345 if (irq >= 0) { 345 if (irq >= 0) {
346 /* request irq */ 346 /* request irq */
347 ret = request_irq(irq, parport_ax88796_interrupt, 347 ret = request_irq(irq, parport_ax88796_interrupt,
348 SA_TRIGGER_FALLING, pdev->name, pp); 348 IRQF_TRIGGER_FALLING, pdev->name, pp);
349 349
350 if (ret < 0) 350 if (ret < 0)
351 goto exit_port; 351 goto exit_port;
diff --git a/drivers/parport/parport_mfc3.c b/drivers/parport/parport_mfc3.c
index c85364765ef..b2b8092a2b3 100644
--- a/drivers/parport/parport_mfc3.c
+++ b/drivers/parport/parport_mfc3.c
@@ -353,7 +353,7 @@ static int __init parport_mfc3_init(void)
353 353
354 if (p->irq != PARPORT_IRQ_NONE) { 354 if (p->irq != PARPORT_IRQ_NONE) {
355 if (use_cnt++ == 0) 355 if (use_cnt++ == 0)
356 if (request_irq(IRQ_AMIGA_PORTS, mfc3_interrupt, SA_SHIRQ, p->name, &pp_mfc3_ops)) 356 if (request_irq(IRQ_AMIGA_PORTS, mfc3_interrupt, IRQF_SHARED, p->name, &pp_mfc3_ops))
357 goto out_irq; 357 goto out_irq;
358 } 358 }
359 359
diff --git a/drivers/parport/parport_pc.c b/drivers/parport/parport_pc.c
index 7318e4a9e43..fe800dc0be9 100644
--- a/drivers/parport/parport_pc.c
+++ b/drivers/parport/parport_pc.c
@@ -42,7 +42,6 @@
42 * but rather will start at port->base_hi. 42 * but rather will start at port->base_hi.
43 */ 43 */
44 44
45#include <linux/config.h>
46#include <linux/module.h> 45#include <linux/module.h>
47#include <linux/init.h> 46#include <linux/init.h>
48#include <linux/sched.h> 47#include <linux/sched.h>
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
index 7c43c5392be..fac333b279b 100644
--- a/drivers/parport/parport_sunbpp.c
+++ b/drivers/parport/parport_sunbpp.c
@@ -322,7 +322,7 @@ static int __devinit init_one_port(struct sbus_dev *sdev)
322 p->size = size; 322 p->size = size;
323 323
324 if ((err = request_irq(p->irq, parport_sunbpp_interrupt, 324 if ((err = request_irq(p->irq, parport_sunbpp_interrupt,
325 SA_SHIRQ, p->name, p)) != 0) { 325 IRQF_SHARED, p->name, p)) != 0) {
326 goto out_put_port; 326 goto out_put_port;
327 } 327 }
328 328
diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
index 8610ae88b92..2e744a27451 100644
--- a/drivers/parport/procfs.c
+++ b/drivers/parport/procfs.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15#include <linux/string.h> 15#include <linux/string.h>
16#include <linux/config.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
diff --git a/drivers/parport/share.c b/drivers/parport/share.c
index 2cb22c8d335..94dc506b83d 100644
--- a/drivers/parport/share.c
+++ b/drivers/parport/share.c
@@ -17,7 +17,6 @@
17 17
18#undef PARPORT_DEBUG_SHARING /* undef for production */ 18#undef PARPORT_DEBUG_SHARING /* undef for production */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/string.h> 21#include <linux/string.h>
23#include <linux/threads.h> 22#include <linux/threads.h>
diff --git a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile
index 421cfffb175..34a1891191f 100644
--- a/drivers/pci/hotplug/Makefile
+++ b/drivers/pci/hotplug/Makefile
@@ -40,8 +40,7 @@ ibmphp-objs := ibmphp_core.o \
40 ibmphp_hpc.o 40 ibmphp_hpc.o
41 41
42acpiphp-objs := acpiphp_core.o \ 42acpiphp-objs := acpiphp_core.o \
43 acpiphp_glue.o \ 43 acpiphp_glue.o
44 acpiphp_dock.o
45 44
46rpaphp-objs := rpaphp_core.o \ 45rpaphp-objs := rpaphp_core.o \
47 rpaphp_pci.o \ 46 rpaphp_pci.o \
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h
index 17a93f890db..be104eced34 100644
--- a/drivers/pci/hotplug/acpiphp.h
+++ b/drivers/pci/hotplug/acpiphp.h
@@ -130,7 +130,7 @@ struct acpiphp_func {
130 130
131 struct list_head sibling; 131 struct list_head sibling;
132 struct pci_dev *pci_dev; 132 struct pci_dev *pci_dev;
133 133 struct notifier_block nb;
134 acpi_handle handle; 134 acpi_handle handle;
135 135
136 u8 function; /* pci function# */ 136 u8 function; /* pci function# */
@@ -151,24 +151,6 @@ struct acpiphp_attention_info
151}; 151};
152 152
153 153
154struct dependent_device {
155 struct list_head device_list;
156 struct list_head pci_list;
157 acpi_handle handle;
158 struct acpiphp_func *func;
159};
160
161
162struct acpiphp_dock_station {
163 acpi_handle handle;
164 u32 last_dock_time;
165 u32 flags;
166 struct acpiphp_func *dock_bridge;
167 struct list_head dependent_devices;
168 struct list_head pci_dependent_devices;
169};
170
171
172/* PCI bus bridge HID */ 154/* PCI bus bridge HID */
173#define ACPI_PCI_HOST_HID "PNP0A03" 155#define ACPI_PCI_HOST_HID "PNP0A03"
174 156
@@ -207,11 +189,6 @@ struct acpiphp_dock_station {
207#define FUNC_HAS_PS2 (0x00000040) 189#define FUNC_HAS_PS2 (0x00000040)
208#define FUNC_HAS_PS3 (0x00000080) 190#define FUNC_HAS_PS3 (0x00000080)
209#define FUNC_HAS_DCK (0x00000100) 191#define FUNC_HAS_DCK (0x00000100)
210#define FUNC_IS_DD (0x00000200)
211
212/* dock station flags */
213#define DOCK_DOCKING (0x00000001)
214#define DOCK_HAS_BRIDGE (0x00000002)
215 192
216/* function prototypes */ 193/* function prototypes */
217 194
@@ -226,7 +203,6 @@ extern int acpiphp_glue_init (void);
226extern void acpiphp_glue_exit (void); 203extern void acpiphp_glue_exit (void);
227extern int acpiphp_get_num_slots (void); 204extern int acpiphp_get_num_slots (void);
228typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data); 205typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data);
229void handle_hotplug_event_func(acpi_handle, u32, void*);
230 206
231extern int acpiphp_enable_slot (struct acpiphp_slot *slot); 207extern int acpiphp_enable_slot (struct acpiphp_slot *slot);
232extern int acpiphp_disable_slot (struct acpiphp_slot *slot); 208extern int acpiphp_disable_slot (struct acpiphp_slot *slot);
@@ -236,16 +212,6 @@ extern u8 acpiphp_get_latch_status (struct acpiphp_slot *slot);
236extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot); 212extern u8 acpiphp_get_adapter_status (struct acpiphp_slot *slot);
237extern u32 acpiphp_get_address (struct acpiphp_slot *slot); 213extern u32 acpiphp_get_address (struct acpiphp_slot *slot);
238 214
239/* acpiphp_dock.c */
240extern int find_dock_station(void);
241extern void remove_dock_station(void);
242extern void add_dependent_device(struct dependent_device *new_dd);
243extern void add_pci_dependent_device(struct dependent_device *new_dd);
244extern struct dependent_device *get_dependent_device(acpi_handle handle);
245extern int is_dependent_device(acpi_handle handle);
246extern int detect_dependent_devices(acpi_handle *bridge_handle);
247extern struct dependent_device *alloc_dependent_device(acpi_handle handle);
248
249/* variables */ 215/* variables */
250extern int acpiphp_debug; 216extern int acpiphp_debug;
251 217
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c
index 4f1b0da8e47..34de5697983 100644
--- a/drivers/pci/hotplug/acpiphp_core.c
+++ b/drivers/pci/hotplug/acpiphp_core.c
@@ -416,27 +416,12 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *acpiphp_slot)
416 416
417static int __init acpiphp_init(void) 417static int __init acpiphp_init(void)
418{ 418{
419 int retval;
420 int docking_station;
421
422 info(DRIVER_DESC " version: " DRIVER_VERSION "\n"); 419 info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
423 420
424 acpiphp_debug = debug; 421 acpiphp_debug = debug;
425 422
426 docking_station = find_dock_station();
427
428 /* read all the ACPI info from the system */ 423 /* read all the ACPI info from the system */
429 retval = init_acpi(); 424 return init_acpi();
430
431 /* if we have found a docking station, we should
432 * go ahead and load even if init_acpi has found
433 * no slots. This handles the case when the _DCK
434 * method not defined under the actual dock bridge
435 */
436 if (docking_station)
437 return 0;
438 else
439 return retval;
440} 425}
441 426
442 427
@@ -444,8 +429,6 @@ static void __exit acpiphp_exit(void)
444{ 429{
445 /* deallocate internal data structures etc. */ 430 /* deallocate internal data structures etc. */
446 acpiphp_glue_exit(); 431 acpiphp_glue_exit();
447
448 remove_dock_station();
449} 432}
450 433
451module_init(acpiphp_init); 434module_init(acpiphp_init);
diff --git a/drivers/pci/hotplug/acpiphp_dock.c b/drivers/pci/hotplug/acpiphp_dock.c
deleted file mode 100644
index 4f1aaf12831..00000000000
--- a/drivers/pci/hotplug/acpiphp_dock.c
+++ /dev/null
@@ -1,438 +0,0 @@
1/*
2 * ACPI PCI HotPlug dock functions to ACPI CA subsystem
3 *
4 * Copyright (C) 2006 Kristen Carlson Accardi (kristen.c.accardi@intel.com)
5 * Copyright (C) 2006 Intel Corporation
6 *
7 * All rights reserved.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or (at
12 * your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
17 * NON INFRINGEMENT. See the GNU General Public License for more
18 * details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 *
24 * Send feedback to <kristen.c.accardi@intel.com>
25 *
26 */
27#include <linux/init.h>
28#include <linux/module.h>
29
30#include <linux/kernel.h>
31#include <linux/pci.h>
32#include <linux/smp_lock.h>
33#include <linux/mutex.h>
34
35#include "../pci.h"
36#include "pci_hotplug.h"
37#include "acpiphp.h"
38
39static struct acpiphp_dock_station *ds;
40#define MY_NAME "acpiphp_dock"
41
42
43int is_dependent_device(acpi_handle handle)
44{
45 return (get_dependent_device(handle) ? 1 : 0);
46}
47
48
49static acpi_status
50find_dependent_device(acpi_handle handle, u32 lvl, void *context, void **rv)
51{
52 int *count = (int *)context;
53
54 if (is_dependent_device(handle)) {
55 (*count)++;
56 return AE_CTRL_TERMINATE;
57 } else {
58 return AE_OK;
59 }
60}
61
62
63
64
65void add_dependent_device(struct dependent_device *new_dd)
66{
67 list_add_tail(&new_dd->device_list, &ds->dependent_devices);
68}
69
70
71void add_pci_dependent_device(struct dependent_device *new_dd)
72{
73 list_add_tail(&new_dd->pci_list, &ds->pci_dependent_devices);
74}
75
76
77
78struct dependent_device * get_dependent_device(acpi_handle handle)
79{
80 struct dependent_device *dd;
81
82 if (!ds)
83 return NULL;
84
85 list_for_each_entry(dd, &ds->dependent_devices, device_list) {
86 if (handle == dd->handle)
87 return dd;
88 }
89 return NULL;
90}
91
92
93
94struct dependent_device *alloc_dependent_device(acpi_handle handle)
95{
96 struct dependent_device *dd;
97
98 dd = kzalloc(sizeof(*dd), GFP_KERNEL);
99 if (dd) {
100 INIT_LIST_HEAD(&dd->pci_list);
101 INIT_LIST_HEAD(&dd->device_list);
102 dd->handle = handle;
103 }
104 return dd;
105}
106
107
108
109static int is_dock(acpi_handle handle)
110{
111 acpi_status status;
112 acpi_handle tmp;
113
114 status = acpi_get_handle(handle, "_DCK", &tmp);
115 if (ACPI_FAILURE(status)) {
116 return 0;
117 }
118 return 1;
119}
120
121
122
123static int dock_present(void)
124{
125 unsigned long sta;
126 acpi_status status;
127
128 if (ds) {
129 status = acpi_evaluate_integer(ds->handle, "_STA", NULL, &sta);
130 if (ACPI_SUCCESS(status) && sta)
131 return 1;
132 }
133 return 0;
134}
135
136
137
138static void eject_dock(void)
139{
140 struct acpi_object_list arg_list;
141 union acpi_object arg;
142
143 arg_list.count = 1;
144 arg_list.pointer = &arg;
145 arg.type = ACPI_TYPE_INTEGER;
146 arg.integer.value = 1;
147
148 if (ACPI_FAILURE(acpi_evaluate_object(ds->handle, "_EJ0",
149 &arg_list, NULL)) || dock_present())
150 warn("%s: failed to eject dock!\n", __FUNCTION__);
151
152 return;
153}
154
155
156
157
158static acpi_status handle_dock(int dock)
159{
160 acpi_status status;
161 struct acpi_object_list arg_list;
162 union acpi_object arg;
163 struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
164
165 dbg("%s: %s\n", __FUNCTION__, dock ? "docking" : "undocking");
166
167 /* _DCK method has one argument */
168 arg_list.count = 1;
169 arg_list.pointer = &arg;
170 arg.type = ACPI_TYPE_INTEGER;
171 arg.integer.value = dock;
172 status = acpi_evaluate_object(ds->handle, "_DCK",
173 &arg_list, &buffer);
174 if (ACPI_FAILURE(status))
175 err("%s: failed to execute _DCK\n", __FUNCTION__);
176 acpi_os_free(buffer.pointer);
177
178 return status;
179}
180
181
182
183static inline void dock(void)
184{
185 handle_dock(1);
186}
187
188
189
190static inline void undock(void)
191{
192 handle_dock(0);
193}
194
195
196
197/*
198 * the _DCK method can do funny things... and sometimes not
199 * hah-hah funny.
200 *
201 * TBD - figure out a way to only call fixups for
202 * systems that require them.
203 */
204static void post_dock_fixups(void)
205{
206 struct pci_bus *bus;
207 u32 buses;
208 struct dependent_device *dd;
209
210 list_for_each_entry(dd, &ds->pci_dependent_devices, pci_list) {
211 bus = dd->func->slot->bridge->pci_bus;
212
213 /* fixup bad _DCK function that rewrites
214 * secondary bridge on slot
215 */
216 pci_read_config_dword(bus->self,
217 PCI_PRIMARY_BUS,
218 &buses);
219
220 if (((buses >> 8) & 0xff) != bus->secondary) {
221 buses = (buses & 0xff000000)
222 | ((unsigned int)(bus->primary) << 0)
223 | ((unsigned int)(bus->secondary) << 8)
224 | ((unsigned int)(bus->subordinate) << 16);
225 pci_write_config_dword(bus->self,
226 PCI_PRIMARY_BUS,
227 buses);
228 }
229 }
230}
231
232
233
234static void hotplug_pci(u32 type)
235{
236 struct dependent_device *dd;
237
238 list_for_each_entry(dd, &ds->pci_dependent_devices, pci_list)
239 handle_hotplug_event_func(dd->handle, type, dd->func);
240}
241
242
243
244static inline void begin_dock(void)
245{
246 ds->flags |= DOCK_DOCKING;
247}
248
249
250static inline void complete_dock(void)
251{
252 ds->flags &= ~(DOCK_DOCKING);
253 ds->last_dock_time = jiffies;
254}
255
256
257static int dock_in_progress(void)
258{
259 if (ds->flags & DOCK_DOCKING ||
260 ds->last_dock_time == jiffies) {
261 dbg("dock in progress\n");
262 return 1;
263 }
264 return 0;
265}
266
267
268
269static void
270handle_hotplug_event_dock(acpi_handle handle, u32 type, void *context)
271{
272 dbg("%s: enter\n", __FUNCTION__);
273
274 switch (type) {
275 case ACPI_NOTIFY_BUS_CHECK:
276 dbg("BUS Check\n");
277 if (!dock_in_progress() && dock_present()) {
278 begin_dock();
279 dock();
280 if (!dock_present()) {
281 err("Unable to dock!\n");
282 break;
283 }
284 post_dock_fixups();
285 hotplug_pci(type);
286 complete_dock();
287 }
288 break;
289 case ACPI_NOTIFY_EJECT_REQUEST:
290 dbg("EJECT request\n");
291 if (!dock_in_progress() && dock_present()) {
292 hotplug_pci(type);
293 undock();
294 eject_dock();
295 if (dock_present())
296 err("Unable to undock!\n");
297 }
298 break;
299 }
300}
301
302
303
304
305static acpi_status
306find_dock_ejd(acpi_handle handle, u32 lvl, void *context, void **rv)
307{
308 acpi_status status;
309 acpi_handle tmp;
310 acpi_handle dck_handle = (acpi_handle) context;
311 char objname[64];
312 struct acpi_buffer buffer = { .length = sizeof(objname),
313 .pointer = objname };
314 struct acpi_buffer ejd_buffer = {ACPI_ALLOCATE_BUFFER, NULL};
315 union acpi_object *ejd_obj;
316
317 status = acpi_get_handle(handle, "_EJD", &tmp);
318 if (ACPI_FAILURE(status))
319 return AE_OK;
320
321 /* make sure we are dependent on the dock device,
322 * by executing the _EJD method, then getting a handle
323 * to the device referenced by that name. If that
324 * device handle is the same handle as the dock station
325 * handle, then we are a device dependent on the dock station
326 */
327 acpi_get_name(dck_handle, ACPI_FULL_PATHNAME, &buffer);
328 status = acpi_evaluate_object(handle, "_EJD", NULL, &ejd_buffer);
329 if (ACPI_FAILURE(status)) {
330 err("Unable to execute _EJD!\n");
331 goto find_ejd_out;
332 }
333 ejd_obj = ejd_buffer.pointer;
334 status = acpi_get_handle(NULL, ejd_obj->string.pointer, &tmp);
335 if (ACPI_FAILURE(status))
336 goto find_ejd_out;
337
338 if (tmp == dck_handle) {
339 struct dependent_device *dd;
340 dbg("%s: found device dependent on dock\n", __FUNCTION__);
341 dd = alloc_dependent_device(handle);
342 if (!dd) {
343 err("Can't allocate memory for dependent device!\n");
344 goto find_ejd_out;
345 }
346 add_dependent_device(dd);
347 }
348
349find_ejd_out:
350 acpi_os_free(ejd_buffer.pointer);
351 return AE_OK;
352}
353
354
355
356int detect_dependent_devices(acpi_handle *bridge_handle)
357{
358 acpi_status status;
359 int count;
360
361 count = 0;
362
363 status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle,
364 (u32)1, find_dependent_device,
365 (void *)&count, NULL);
366
367 return count;
368}
369
370
371
372
373
374static acpi_status
375find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
376{
377 int *count = (int *)context;
378
379 if (is_dock(handle)) {
380 dbg("%s: found dock\n", __FUNCTION__);
381 ds = kzalloc(sizeof(*ds), GFP_KERNEL);
382 ds->handle = handle;
383 INIT_LIST_HEAD(&ds->dependent_devices);
384 INIT_LIST_HEAD(&ds->pci_dependent_devices);
385
386 /* look for devices dependent on dock station */
387 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
388 ACPI_UINT32_MAX, find_dock_ejd, handle, NULL);
389
390 acpi_install_notify_handler(handle, ACPI_SYSTEM_NOTIFY,
391 handle_hotplug_event_dock, ds);
392 (*count)++;
393 }
394
395 return AE_OK;
396}
397
398
399
400
401int find_dock_station(void)
402{
403 int num = 0;
404
405 ds = NULL;
406
407 /* start from the root object, because some laptops define
408 * _DCK methods outside the scope of PCI (IBM x-series laptop)
409 */
410 acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
411 ACPI_UINT32_MAX, find_dock, &num, NULL);
412
413 return num;
414}
415
416
417
418void remove_dock_station(void)
419{
420 struct dependent_device *dd, *tmp;
421 if (ds) {
422 if (ACPI_FAILURE(acpi_remove_notify_handler(ds->handle,
423 ACPI_SYSTEM_NOTIFY, handle_hotplug_event_dock)))
424 err("failed to remove dock notify handler\n");
425
426 /* free all dependent devices */
427 list_for_each_entry_safe(dd, tmp, &ds->dependent_devices,
428 device_list)
429 kfree(dd);
430
431 /* no need to touch the pci_dependent_device list,
432 * cause all memory was freed above
433 */
434 kfree(ds);
435 }
436}
437
438
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index d370f999782..ef95d12fb32 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -59,6 +59,7 @@ static LIST_HEAD(bridge_list);
59static void handle_hotplug_event_bridge (acpi_handle, u32, void *); 59static void handle_hotplug_event_bridge (acpi_handle, u32, void *);
60static void acpiphp_sanitize_bus(struct pci_bus *bus); 60static void acpiphp_sanitize_bus(struct pci_bus *bus);
61static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus); 61static void acpiphp_set_hpp_values(acpi_handle handle, struct pci_bus *bus);
62static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context);
62 63
63 64
64/* 65/*
@@ -116,6 +117,59 @@ is_ejectable_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
116 } 117 }
117} 118}
118 119
120/* callback routine to check for the existance of a pci dock device */
121static acpi_status
122is_pci_dock_device(acpi_handle handle, u32 lvl, void *context, void **rv)
123{
124 int *count = (int *)context;
125
126 if (is_dock_device(handle)) {
127 (*count)++;
128 return AE_CTRL_TERMINATE;
129 } else {
130 return AE_OK;
131 }
132}
133
134
135
136
137/*
138 * the _DCK method can do funny things... and sometimes not
139 * hah-hah funny.
140 *
141 * TBD - figure out a way to only call fixups for
142 * systems that require them.
143 */
144static int post_dock_fixups(struct notifier_block *nb, unsigned long val,
145 void *v)
146{
147 struct acpiphp_func *func = container_of(nb, struct acpiphp_func, nb);
148 struct pci_bus *bus = func->slot->bridge->pci_bus;
149 u32 buses;
150
151 if (!bus->self)
152 return NOTIFY_OK;
153
154 /* fixup bad _DCK function that rewrites
155 * secondary bridge on slot
156 */
157 pci_read_config_dword(bus->self,
158 PCI_PRIMARY_BUS,
159 &buses);
160
161 if (((buses >> 8) & 0xff) != bus->secondary) {
162 buses = (buses & 0xff000000)
163 | ((unsigned int)(bus->primary) << 0)
164 | ((unsigned int)(bus->secondary) << 8)
165 | ((unsigned int)(bus->subordinate) << 16);
166 pci_write_config_dword(bus->self, PCI_PRIMARY_BUS, buses);
167 }
168 return NOTIFY_OK;
169}
170
171
172
119 173
120/* callback routine to register each ACPI PCI slot object */ 174/* callback routine to register each ACPI PCI slot object */
121static acpi_status 175static acpi_status
@@ -124,7 +178,6 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
124 struct acpiphp_bridge *bridge = (struct acpiphp_bridge *)context; 178 struct acpiphp_bridge *bridge = (struct acpiphp_bridge *)context;
125 struct acpiphp_slot *slot; 179 struct acpiphp_slot *slot;
126 struct acpiphp_func *newfunc; 180 struct acpiphp_func *newfunc;
127 struct dependent_device *dd;
128 acpi_handle tmp; 181 acpi_handle tmp;
129 acpi_status status = AE_OK; 182 acpi_status status = AE_OK;
130 unsigned long adr, sun; 183 unsigned long adr, sun;
@@ -137,7 +190,7 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
137 190
138 status = acpi_get_handle(handle, "_EJ0", &tmp); 191 status = acpi_get_handle(handle, "_EJ0", &tmp);
139 192
140 if (ACPI_FAILURE(status) && !(is_dependent_device(handle))) 193 if (ACPI_FAILURE(status) && !(is_dock_device(handle)))
141 return AE_OK; 194 return AE_OK;
142 195
143 device = (adr >> 16) & 0xffff; 196 device = (adr >> 16) & 0xffff;
@@ -162,22 +215,17 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
162 if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS3", &tmp))) 215 if (ACPI_SUCCESS(acpi_get_handle(handle, "_PS3", &tmp)))
163 newfunc->flags |= FUNC_HAS_PS3; 216 newfunc->flags |= FUNC_HAS_PS3;
164 217
165 if (ACPI_SUCCESS(acpi_get_handle(handle, "_DCK", &tmp))) { 218 if (ACPI_SUCCESS(acpi_get_handle(handle, "_DCK", &tmp)))
166 newfunc->flags |= FUNC_HAS_DCK; 219 newfunc->flags |= FUNC_HAS_DCK;
167 /* add to devices dependent on dock station,
168 * because this may actually be the dock bridge
169 */
170 dd = alloc_dependent_device(handle);
171 if (!dd)
172 err("Can't allocate memory for "
173 "new dependent device!\n");
174 else
175 add_dependent_device(dd);
176 }
177 220
178 status = acpi_evaluate_integer(handle, "_SUN", NULL, &sun); 221 status = acpi_evaluate_integer(handle, "_SUN", NULL, &sun);
179 if (ACPI_FAILURE(status)) 222 if (ACPI_FAILURE(status)) {
180 sun = -1; 223 /*
224 * use the count of the number of slots we've found
225 * for the number of the slot
226 */
227 sun = bridge->nr_slots+1;
228 }
181 229
182 /* search for objects that share the same slot */ 230 /* search for objects that share the same slot */
183 for (slot = bridge->slots; slot; slot = slot->next) 231 for (slot = bridge->slots; slot; slot = slot->next)
@@ -225,20 +273,23 @@ register_slot(acpi_handle handle, u32 lvl, void *context, void **rv)
225 slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON); 273 slot->flags |= (SLOT_ENABLED | SLOT_POWEREDON);
226 } 274 }
227 275
228 /* if this is a device dependent on a dock station, 276 if (is_dock_device(handle)) {
229 * associate the acpiphp_func to the dependent_device 277 /* we don't want to call this device's _EJ0
230 * struct. 278 * because we want the dock notify handler
231 */ 279 * to call it after it calls _DCK
232 if ((dd = get_dependent_device(handle))) {
233 newfunc->flags |= FUNC_IS_DD;
234 /*
235 * we don't want any devices which is dependent
236 * on the dock to have it's _EJ0 method executed.
237 * because we need to run _DCK first.
238 */ 280 */
239 newfunc->flags &= ~FUNC_HAS_EJ0; 281 newfunc->flags &= ~FUNC_HAS_EJ0;
240 dd->func = newfunc; 282 if (register_hotplug_dock_device(handle,
241 add_pci_dependent_device(dd); 283 handle_hotplug_event_func, newfunc))
284 dbg("failed to register dock device\n");
285
286 /* we need to be notified when dock events happen
287 * outside of the hotplug operation, since we may
288 * need to do fixups before we can hotplug.
289 */
290 newfunc->nb.notifier_call = post_dock_fixups;
291 if (register_dock_notifier(&newfunc->nb))
292 dbg("failed to register a dock notifier");
242 } 293 }
243 294
244 /* install notify handler */ 295 /* install notify handler */
@@ -277,6 +328,15 @@ static int detect_ejectable_slots(acpi_handle *bridge_handle)
277 status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, (u32)1, 328 status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle, (u32)1,
278 is_ejectable_slot, (void *)&count, NULL); 329 is_ejectable_slot, (void *)&count, NULL);
279 330
331 /*
332 * we also need to add this bridge if there is a dock bridge or
333 * other pci device on a dock station (removable)
334 */
335 if (!count)
336 status = acpi_walk_namespace(ACPI_TYPE_DEVICE, bridge_handle,
337 (u32)1, is_pci_dock_device, (void *)&count,
338 NULL);
339
280 return count; 340 return count;
281} 341}
282 342
@@ -487,8 +547,7 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv)
487 goto out; 547 goto out;
488 548
489 /* check if this bridge has ejectable slots */ 549 /* check if this bridge has ejectable slots */
490 if ((detect_ejectable_slots(handle) > 0) || 550 if ((detect_ejectable_slots(handle) > 0)) {
491 (detect_dependent_devices(handle) > 0)) {
492 dbg("found PCI-to-PCI bridge at PCI %s\n", pci_name(dev)); 551 dbg("found PCI-to-PCI bridge at PCI %s\n", pci_name(dev));
493 add_p2p_bridge(handle, dev); 552 add_p2p_bridge(handle, dev);
494 } 553 }
@@ -605,6 +664,10 @@ static void cleanup_bridge(struct acpiphp_bridge *bridge)
605 list_for_each_safe (list, tmp, &slot->funcs) { 664 list_for_each_safe (list, tmp, &slot->funcs) {
606 struct acpiphp_func *func; 665 struct acpiphp_func *func;
607 func = list_entry(list, struct acpiphp_func, sibling); 666 func = list_entry(list, struct acpiphp_func, sibling);
667 if (is_dock_device(func->handle)) {
668 unregister_hotplug_dock_device(func->handle);
669 unregister_dock_notifier(&func->nb);
670 }
608 if (!(func->flags & FUNC_HAS_DCK)) { 671 if (!(func->flags & FUNC_HAS_DCK)) {
609 status = acpi_remove_notify_handler(func->handle, 672 status = acpi_remove_notify_handler(func->handle,
610 ACPI_SYSTEM_NOTIFY, 673 ACPI_SYSTEM_NOTIFY,
@@ -1440,7 +1503,7 @@ static void handle_hotplug_event_bridge(acpi_handle handle, u32 type, void *cont
1440 * handles ACPI event notification on slots 1503 * handles ACPI event notification on slots
1441 * 1504 *
1442 */ 1505 */
1443void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context) 1506static void handle_hotplug_event_func(acpi_handle handle, u32 type, void *context)
1444{ 1507{
1445 struct acpiphp_func *func; 1508 struct acpiphp_func *func;
1446 char objname[64]; 1509 char objname[64];
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c
index 037ce4c9168..d5df5871cfa 100644
--- a/drivers/pci/hotplug/cpci_hotplug_core.c
+++ b/drivers/pci/hotplug/cpci_hotplug_core.c
@@ -25,7 +25,6 @@
25 * Send feedback to <scottm@somanetworks.com> 25 * Send feedback to <scottm@somanetworks.com>
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/slab.h> 30#include <linux/slab.h>
@@ -348,7 +347,7 @@ cpci_hp_intr(int irq, void *data, struct pt_regs *regs)
348 dbg("entered cpci_hp_intr"); 347 dbg("entered cpci_hp_intr");
349 348
350 /* Check to see if it was our interrupt */ 349 /* Check to see if it was our interrupt */
351 if ((controller->irq_flags & SA_SHIRQ) && 350 if ((controller->irq_flags & IRQF_SHARED) &&
352 !controller->ops->check_irq(controller->dev_id)) { 351 !controller->ops->check_irq(controller->dev_id)) {
353 dbg("exited cpci_hp_intr, not our interrupt"); 352 dbg("exited cpci_hp_intr, not our interrupt");
354 return IRQ_NONE; 353 return IRQ_NONE;
diff --git a/drivers/pci/hotplug/cpci_hotplug_pci.c b/drivers/pci/hotplug/cpci_hotplug_pci.c
index 225b5e551dd..02be74caa89 100644
--- a/drivers/pci/hotplug/cpci_hotplug_pci.c
+++ b/drivers/pci/hotplug/cpci_hotplug_pci.c
@@ -23,7 +23,6 @@
23 * Send feedback to <scottm@somanetworks.com> 23 * Send feedback to <scottm@somanetworks.com>
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/pci.h> 28#include <linux/pci.h>
diff --git a/drivers/pci/hotplug/cpcihp_generic.c b/drivers/pci/hotplug/cpcihp_generic.c
index 2d4639d6841..e847f0d6c7f 100644
--- a/drivers/pci/hotplug/cpcihp_generic.c
+++ b/drivers/pci/hotplug/cpcihp_generic.c
@@ -34,7 +34,6 @@
34 * Send feedback to <scottm@somanetworks.com> 34 * Send feedback to <scottm@somanetworks.com>
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/init.h> 38#include <linux/init.h>
40#include <linux/errno.h> 39#include <linux/errno.h>
diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c
index 1ec165df852..1c12e917109 100644
--- a/drivers/pci/hotplug/cpcihp_zt5550.c
+++ b/drivers/pci/hotplug/cpcihp_zt5550.c
@@ -30,13 +30,13 @@
30 * Send feedback to <scottm@somanetworks.com> 30 * Send feedback to <scottm@somanetworks.com>
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/moduleparam.h> 34#include <linux/moduleparam.h>
36#include <linux/init.h> 35#include <linux/init.h>
37#include <linux/errno.h> 36#include <linux/errno.h>
38#include <linux/pci.h> 37#include <linux/pci.h>
39#include <linux/signal.h> /* SA_SHIRQ */ 38#include <linux/interrupt.h>
39#include <linux/signal.h> /* IRQF_SHARED */
40#include "cpci_hotplug.h" 40#include "cpci_hotplug.h"
41#include "cpcihp_zt5550.h" 41#include "cpcihp_zt5550.h"
42 42
@@ -220,7 +220,7 @@ static int zt5550_hc_init_one (struct pci_dev *pdev, const struct pci_device_id
220 zt5550_hpc.ops = &zt5550_hpc_ops; 220 zt5550_hpc.ops = &zt5550_hpc_ops;
221 if(!poll) { 221 if(!poll) {
222 zt5550_hpc.irq = hc_dev->irq; 222 zt5550_hpc.irq = hc_dev->irq;
223 zt5550_hpc.irq_flags = SA_SHIRQ; 223 zt5550_hpc.irq_flags = IRQF_SHARED;
224 zt5550_hpc.dev_id = hc_dev; 224 zt5550_hpc.dev_id = hc_dev;
225 225
226 zt5550_hpc_ops.enable_irq = zt5550_hc_enable_irq; 226 zt5550_hpc_ops.enable_irq = zt5550_hc_enable_irq;
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c
index f8658d63f07..1fc259913b6 100644
--- a/drivers/pci/hotplug/cpqphp_core.c
+++ b/drivers/pci/hotplug/cpqphp_core.c
@@ -29,7 +29,6 @@
29 * 29 *
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/moduleparam.h> 33#include <linux/moduleparam.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
@@ -1189,7 +1188,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1189 /* set up the interrupt */ 1188 /* set up the interrupt */
1190 dbg("HPC interrupt = %d \n", ctrl->interrupt); 1189 dbg("HPC interrupt = %d \n", ctrl->interrupt);
1191 if (request_irq(ctrl->interrupt, cpqhp_ctrl_intr, 1190 if (request_irq(ctrl->interrupt, cpqhp_ctrl_intr,
1192 SA_SHIRQ, MY_NAME, ctrl)) { 1191 IRQF_SHARED, MY_NAME, ctrl)) {
1193 err("Can't get irq %d for the hotplug pci controller\n", 1192 err("Can't get irq %d for the hotplug pci controller\n",
1194 ctrl->interrupt); 1193 ctrl->interrupt);
1195 rc = -ENODEV; 1194 rc = -ENODEV;
diff --git a/drivers/pci/hotplug/cpqphp_ctrl.c b/drivers/pci/hotplug/cpqphp_ctrl.c
index 55d2dc7e39c..ae2dd36efef 100644
--- a/drivers/pci/hotplug/cpqphp_ctrl.c
+++ b/drivers/pci/hotplug/cpqphp_ctrl.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/types.h> 31#include <linux/types.h>
diff --git a/drivers/pci/hotplug/cpqphp_nvram.c b/drivers/pci/hotplug/cpqphp_nvram.c
index ac98a11bd1e..cf087891753 100644
--- a/drivers/pci/hotplug/cpqphp_nvram.c
+++ b/drivers/pci/hotplug/cpqphp_nvram.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/types.h> 31#include <linux/types.h>
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c
index 00b81a7bdd2..0d9688952f4 100644
--- a/drivers/pci/hotplug/cpqphp_pci.c
+++ b/drivers/pci/hotplug/cpqphp_pci.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/types.h> 31#include <linux/types.h>
diff --git a/drivers/pci/hotplug/cpqphp_sysfs.c b/drivers/pci/hotplug/cpqphp_sysfs.c
index bbfeed767ff..8b3da007e85 100644
--- a/drivers/pci/hotplug/cpqphp_sysfs.c
+++ b/drivers/pci/hotplug/cpqphp_sysfs.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/types.h> 31#include <linux/types.h>
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c
index 71b80c23e8c..dd2b762777c 100644
--- a/drivers/pci/hotplug/fakephp.c
+++ b/drivers/pci/hotplug/fakephp.c
@@ -32,7 +32,6 @@
32 * Enabling PCI devices is left as an exercise for the reader... 32 * Enabling PCI devices is left as an exercise for the reader...
33 * 33 *
34 */ 34 */
35#include <linux/config.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/pci.h> 37#include <linux/pci.h>
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c
index c4282902cb5..b7b378df89e 100644
--- a/drivers/pci/hotplug/pci_hotplug_core.c
+++ b/drivers/pci/hotplug/pci_hotplug_core.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/moduleparam.h> 31#include <linux/moduleparam.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c
index 11f7858f006..0d8fb6e607a 100644
--- a/drivers/pci/hotplug/pciehp_hpc.c
+++ b/drivers/pci/hotplug/pciehp_hpc.c
@@ -1458,7 +1458,7 @@ int pcie_init(struct controller * ctrl, struct pcie_device *dev)
1458 start_int_poll_timer( php_ctlr, 10 ); /* start with 10 second delay */ 1458 start_int_poll_timer( php_ctlr, 10 ); /* start with 10 second delay */
1459 } else { 1459 } else {
1460 /* Installs the interrupt handler */ 1460 /* Installs the interrupt handler */
1461 rc = request_irq(php_ctlr->irq, pcie_isr, SA_SHIRQ, MY_NAME, (void *) ctrl); 1461 rc = request_irq(php_ctlr->irq, pcie_isr, IRQF_SHARED, MY_NAME, (void *) ctrl);
1462 dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); 1462 dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc);
1463 if (rc) { 1463 if (rc) {
1464 err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); 1464 err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq);
diff --git a/drivers/pci/hotplug/pcihp_skeleton.c b/drivers/pci/hotplug/pcihp_skeleton.c
index 0a46f549676..8ad446605f7 100644
--- a/drivers/pci/hotplug/pcihp_skeleton.c
+++ b/drivers/pci/hotplug/pcihp_skeleton.c
@@ -28,7 +28,6 @@
28 * 28 *
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/moduleparam.h> 32#include <linux/moduleparam.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
index 63800454670..076bd6dcafa 100644
--- a/drivers/pci/hotplug/rpaphp_core.c
+++ b/drivers/pci/hotplug/rpaphp_core.c
@@ -22,7 +22,6 @@
22 * Send feedback to <lxie@us.ibm.com> 22 * Send feedback to <lxie@us.ibm.com>
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/moduleparam.h> 27#include <linux/moduleparam.h>
diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 45facaad39b..0f9798df470 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -1246,7 +1246,7 @@ int shpc_init(struct controller * ctrl, struct pci_dev * pdev)
1246 } else 1246 } else
1247 php_ctlr->irq = pdev->irq; 1247 php_ctlr->irq = pdev->irq;
1248 1248
1249 rc = request_irq(php_ctlr->irq, shpc_isr, SA_SHIRQ, MY_NAME, (void *) ctrl); 1249 rc = request_irq(php_ctlr->irq, shpc_isr, IRQF_SHARED, MY_NAME, (void *) ctrl);
1250 dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc); 1250 dbg("%s: request_irq %d for hpc%d (returns %d)\n", __FUNCTION__, php_ctlr->irq, ctlr_seq_num, rc);
1251 if (rc) { 1251 if (rc) {
1252 err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq); 1252 err("Can't get irq %d for the hotplug controller\n", php_ctlr->irq);
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 76d023d8a33..36bc7c415af 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -10,7 +10,6 @@
10#include <linux/irq.h> 10#include <linux/irq.h>
11#include <linux/interrupt.h> 11#include <linux/interrupt.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/config.h>
14#include <linux/ioport.h> 13#include <linux/ioport.h>
15#include <linux/smp_lock.h> 14#include <linux/smp_lock.h>
16#include <linux/pci.h> 15#include <linux/pci.h>
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index 606f9b6f70e..fdefa7dcd15 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -15,7 +15,6 @@
15 */ 15 */
16 16
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/pci.h> 19#include <linux/pci.h>
21#include <linux/stat.h> 20#include <linux/stat.h>
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 4364d793f73..d1d7333bb71 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -15,7 +15,6 @@
15 * use the PowerTweak utility (see http://powertweak.sourceforge.net). 15 * use the PowerTweak utility (see http://powertweak.sourceforge.net).
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/pci.h> 20#include <linux/pci.h>
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c
index cbb69cf4131..f5ee7ce16fa 100644
--- a/drivers/pci/rom.c
+++ b/drivers/pci/rom.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * PCI ROM access routines 7 * PCI ROM access routines
8 */ 8 */
9#include <linux/config.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/pci.h> 10#include <linux/pci.h>
12#include <linux/slab.h> 11#include <linux/slab.h>
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index a4d50940ebe..40569f40e90 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -214,11 +214,10 @@ static struct pccard_operations at91_cf_ops = {
214 214
215/*--------------------------------------------------------------------------*/ 215/*--------------------------------------------------------------------------*/
216 216
217static int __init at91_cf_probe(struct device *dev) 217static int __init at91_cf_probe(struct platform_device *pdev)
218{ 218{
219 struct at91_cf_socket *cf; 219 struct at91_cf_socket *cf;
220 struct at91_cf_data *board = dev->platform_data; 220 struct at91_cf_data *board = pdev->dev.platform_data;
221 struct platform_device *pdev = to_platform_device(dev);
222 struct resource *io; 221 struct resource *io;
223 unsigned int csa; 222 unsigned int csa;
224 int status; 223 int status;
@@ -236,7 +235,7 @@ static int __init at91_cf_probe(struct device *dev)
236 235
237 cf->board = board; 236 cf->board = board;
238 cf->pdev = pdev; 237 cf->pdev = pdev;
239 dev_set_drvdata(dev, cf); 238 platform_set_drvdata(pdev, cf);
240 239
241 /* CF takes over CS4, CS5, CS6 */ 240 /* CF takes over CS4, CS5, CS6 */
242 csa = at91_sys_read(AT91_EBI_CSA); 241 csa = at91_sys_read(AT91_EBI_CSA);
@@ -268,9 +267,10 @@ static int __init at91_cf_probe(struct device *dev)
268 267
269 /* must be a GPIO; ergo must trigger on both edges */ 268 /* must be a GPIO; ergo must trigger on both edges */
270 status = request_irq(board->det_pin, at91_cf_irq, 269 status = request_irq(board->det_pin, at91_cf_irq,
271 SA_SAMPLE_RANDOM, driver_name, cf); 270 IRQF_SAMPLE_RANDOM, driver_name, cf);
272 if (status < 0) 271 if (status < 0)
273 goto fail0; 272 goto fail0;
273 device_init_wakeup(&pdev->dev, 1);
274 274
275 /* 275 /*
276 * The card driver will request this irq later as needed. 276 * The card driver will request this irq later as needed.
@@ -280,7 +280,7 @@ static int __init at91_cf_probe(struct device *dev)
280 */ 280 */
281 if (board->irq_pin) { 281 if (board->irq_pin) {
282 status = request_irq(board->irq_pin, at91_cf_irq, 282 status = request_irq(board->irq_pin, at91_cf_irq,
283 SA_SHIRQ, driver_name, cf); 283 IRQF_SHARED, driver_name, cf);
284 if (status < 0) 284 if (status < 0)
285 goto fail0a; 285 goto fail0a;
286 cf->socket.pci_irq = board->irq_pin; 286 cf->socket.pci_irq = board->irq_pin;
@@ -301,7 +301,7 @@ static int __init at91_cf_probe(struct device *dev)
301 board->det_pin, board->irq_pin); 301 board->det_pin, board->irq_pin);
302 302
303 cf->socket.owner = THIS_MODULE; 303 cf->socket.owner = THIS_MODULE;
304 cf->socket.dev.dev = dev; 304 cf->socket.dev.dev = &pdev->dev;
305 cf->socket.ops = &at91_cf_ops; 305 cf->socket.ops = &at91_cf_ops;
306 cf->socket.resource_ops = &pccard_static_ops; 306 cf->socket.resource_ops = &pccard_static_ops;
307 cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP 307 cf->socket.features = SS_CAP_PCCARD | SS_CAP_STATIC_MAP
@@ -323,21 +323,25 @@ fail1:
323 free_irq(board->irq_pin, cf); 323 free_irq(board->irq_pin, cf);
324fail0a: 324fail0a:
325 free_irq(board->det_pin, cf); 325 free_irq(board->det_pin, cf);
326 device_init_wakeup(&pdev->dev, 0);
326fail0: 327fail0:
327 at91_sys_write(AT91_EBI_CSA, csa); 328 at91_sys_write(AT91_EBI_CSA, csa);
328 kfree(cf); 329 kfree(cf);
329 return status; 330 return status;
330} 331}
331 332
332static int __exit at91_cf_remove(struct device *dev) 333static int __exit at91_cf_remove(struct platform_device *pdev)
333{ 334{
334 struct at91_cf_socket *cf = dev_get_drvdata(dev); 335 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
336 struct at91_cf_data *board = cf->board;
335 struct resource *io = cf->socket.io[0].res; 337 struct resource *io = cf->socket.io[0].res;
336 unsigned int csa; 338 unsigned int csa;
337 339
338 pcmcia_unregister_socket(&cf->socket); 340 pcmcia_unregister_socket(&cf->socket);
339 free_irq(cf->board->irq_pin, cf); 341 if (board->irq_pin)
340 free_irq(cf->board->det_pin, cf); 342 free_irq(board->irq_pin, cf);
343 free_irq(board->det_pin, cf);
344 device_init_wakeup(&pdev->dev, 0);
341 iounmap((void __iomem *) cf->socket.io_offset); 345 iounmap((void __iomem *) cf->socket.io_offset);
342 release_mem_region(io->start, io->end + 1 - io->start); 346 release_mem_region(io->start, io->end + 1 - io->start);
343 347
@@ -348,26 +352,65 @@ static int __exit at91_cf_remove(struct device *dev)
348 return 0; 352 return 0;
349} 353}
350 354
351static struct device_driver at91_cf_driver = { 355#ifdef CONFIG_PM
352 .name = (char *) driver_name, 356
353 .bus = &platform_bus_type, 357static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg)
358{
359 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
360 struct at91_cf_data *board = cf->board;
361
362 pcmcia_socket_dev_suspend(&pdev->dev, mesg);
363 if (device_may_wakeup(&pdev->dev))
364 enable_irq_wake(board->det_pin);
365 else {
366 disable_irq_wake(board->det_pin);
367 disable_irq(board->det_pin);
368 }
369 if (board->irq_pin)
370 disable_irq(board->irq_pin);
371 return 0;
372}
373
374static int at91_cf_resume(struct platform_device *pdev)
375{
376 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
377 struct at91_cf_data *board = cf->board;
378
379 if (board->irq_pin)
380 enable_irq(board->irq_pin);
381 if (!device_may_wakeup(&pdev->dev))
382 enable_irq(board->det_pin);
383 pcmcia_socket_dev_resume(&pdev->dev);
384 return 0;
385}
386
387#else
388#define at91_cf_suspend NULL
389#define at91_cf_resume NULL
390#endif
391
392static struct platform_driver at91_cf_driver = {
393 .driver = {
394 .name = (char *) driver_name,
395 .owner = THIS_MODULE,
396 },
354 .probe = at91_cf_probe, 397 .probe = at91_cf_probe,
355 .remove = __exit_p(at91_cf_remove), 398 .remove = __exit_p(at91_cf_remove),
356 .suspend = pcmcia_socket_dev_suspend, 399 .suspend = at91_cf_suspend,
357 .resume = pcmcia_socket_dev_resume, 400 .resume = at91_cf_resume,
358}; 401};
359 402
360/*--------------------------------------------------------------------------*/ 403/*--------------------------------------------------------------------------*/
361 404
362static int __init at91_cf_init(void) 405static int __init at91_cf_init(void)
363{ 406{
364 return driver_register(&at91_cf_driver); 407 return platform_driver_register(&at91_cf_driver);
365} 408}
366module_init(at91_cf_init); 409module_init(at91_cf_init);
367 410
368static void __exit at91_cf_exit(void) 411static void __exit at91_cf_exit(void)
369{ 412{
370 driver_unregister(&at91_cf_driver); 413 platform_driver_unregister(&at91_cf_driver);
371} 414}
372module_exit(at91_cf_exit); 415module_exit(at91_cf_exit);
373 416
diff --git a/drivers/pcmcia/au1000_db1x00.c b/drivers/pcmcia/au1000_db1x00.c
index abc13f28ba3..74e051535d6 100644
--- a/drivers/pcmcia/au1000_db1x00.c
+++ b/drivers/pcmcia/au1000_db1x00.c
@@ -30,7 +30,6 @@
30 * 30 *
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
36#include <linux/errno.h> 35#include <linux/errno.h>
@@ -296,7 +295,7 @@ struct pcmcia_low_level db1x00_pcmcia_ops = {
296 .socket_suspend = db1x00_socket_suspend 295 .socket_suspend = db1x00_socket_suspend
297}; 296};
298 297
299int __init au1x_board_init(struct device *dev) 298int au1x_board_init(struct device *dev)
300{ 299{
301 int ret = -ENODEV; 300 int ret = -ENODEV;
302 bcsr->pcmcia = 0; /* turn off power, if it's not already off */ 301 bcsr->pcmcia = 0; /* turn off power, if it's not already off */
diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c
index 971a3528164..d5dd0ce6553 100644
--- a/drivers/pcmcia/au1000_generic.c
+++ b/drivers/pcmcia/au1000_generic.c
@@ -33,7 +33,6 @@
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/moduleparam.h> 34#include <linux/moduleparam.h>
35#include <linux/init.h> 35#include <linux/init.h>
36#include <linux/config.h>
37#include <linux/cpufreq.h> 36#include <linux/cpufreq.h>
38#include <linux/ioport.h> 37#include <linux/ioport.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
diff --git a/drivers/pcmcia/au1000_generic.h b/drivers/pcmcia/au1000_generic.h
index f2c970b5f4f..1e467bb5407 100644
--- a/drivers/pcmcia/au1000_generic.h
+++ b/drivers/pcmcia/au1000_generic.h
@@ -22,7 +22,6 @@
22#define __ASM_AU1000_PCMCIA_H 22#define __ASM_AU1000_PCMCIA_H
23 23
24/* include the world */ 24/* include the world */
25#include <linux/config.h>
26 25
27#include <pcmcia/cs_types.h> 26#include <pcmcia/cs_types.h>
28#include <pcmcia/cs.h> 27#include <pcmcia/cs.h>
diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c
index fd5522ede86..86c0808d6a0 100644
--- a/drivers/pcmcia/au1000_pb1x00.c
+++ b/drivers/pcmcia/au1000_pb1x00.c
@@ -21,7 +21,6 @@
21 * with this program; if not, write to the Free Software Foundation, Inc., 21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 22 * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 */ 23 */
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/init.h> 25#include <linux/init.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 3162998579c..f9cd831a3f3 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -28,6 +28,7 @@
28#include <linux/pm.h> 28#include <linux/pm.h>
29#include <linux/pci.h> 29#include <linux/pci.h>
30#include <linux/device.h> 30#include <linux/device.h>
31#include <linux/kthread.h>
31#include <asm/system.h> 32#include <asm/system.h>
32#include <asm/irq.h> 33#include <asm/irq.h>
33 34
@@ -176,6 +177,7 @@ static int pccardd(void *__skt);
176 */ 177 */
177int pcmcia_register_socket(struct pcmcia_socket *socket) 178int pcmcia_register_socket(struct pcmcia_socket *socket)
178{ 179{
180 struct task_struct *tsk;
179 int ret; 181 int ret;
180 182
181 if (!socket || !socket->ops || !socket->dev.dev || !socket->resource_ops) 183 if (!socket || !socket->ops || !socket->dev.dev || !socket->resource_ops)
@@ -239,15 +241,18 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
239 mutex_init(&socket->skt_mutex); 241 mutex_init(&socket->skt_mutex);
240 spin_lock_init(&socket->thread_lock); 242 spin_lock_init(&socket->thread_lock);
241 243
242 ret = kernel_thread(pccardd, socket, CLONE_KERNEL); 244 tsk = kthread_run(pccardd, socket, "pccardd");
243 if (ret < 0) 245 if (IS_ERR(tsk)) {
246 ret = PTR_ERR(tsk);
244 goto err; 247 goto err;
248 }
245 249
246 wait_for_completion(&socket->thread_done); 250 wait_for_completion(&socket->thread_done);
247 if(!socket->thread) { 251 if (!socket->thread) {
248 printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket); 252 printk(KERN_WARNING "PCMCIA: warning: socket thread for socket %p did not start\n", socket);
249 return -EIO; 253 return -EIO;
250 } 254 }
255
251 pcmcia_parse_events(socket, SS_DETECT); 256 pcmcia_parse_events(socket, SS_DETECT);
252 257
253 return 0; 258 return 0;
@@ -272,10 +277,8 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket)
272 cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops); 277 cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops);
273 278
274 if (socket->thread) { 279 if (socket->thread) {
275 init_completion(&socket->thread_done);
276 socket->thread = NULL;
277 wake_up(&socket->thread_wait); 280 wake_up(&socket->thread_wait);
278 wait_for_completion(&socket->thread_done); 281 kthread_stop(socket->thread);
279 } 282 }
280 release_cis_mem(socket); 283 release_cis_mem(socket);
281 284
@@ -630,8 +633,6 @@ static int pccardd(void *__skt)
630 DECLARE_WAITQUEUE(wait, current); 633 DECLARE_WAITQUEUE(wait, current);
631 int ret; 634 int ret;
632 635
633 daemonize("pccardd");
634
635 skt->thread = current; 636 skt->thread = current;
636 skt->socket = dead_socket; 637 skt->socket = dead_socket;
637 skt->ops->init(skt); 638 skt->ops->init(skt);
@@ -643,7 +644,8 @@ static int pccardd(void *__skt)
643 printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n", 644 printk(KERN_WARNING "PCMCIA: unable to register socket 0x%p\n",
644 skt); 645 skt);
645 skt->thread = NULL; 646 skt->thread = NULL;
646 complete_and_exit(&skt->thread_done, 0); 647 complete(&skt->thread_done);
648 return 0;
647 } 649 }
648 650
649 add_wait_queue(&skt->thread_wait, &wait); 651 add_wait_queue(&skt->thread_wait, &wait);
@@ -674,7 +676,7 @@ static int pccardd(void *__skt)
674 continue; 676 continue;
675 } 677 }
676 678
677 if (!skt->thread) 679 if (kthread_should_stop())
678 break; 680 break;
679 681
680 schedule(); 682 schedule();
@@ -688,7 +690,7 @@ static int pccardd(void *__skt)
688 /* remove from the device core */ 690 /* remove from the device core */
689 class_device_unregister(&skt->dev); 691 class_device_unregister(&skt->dev);
690 692
691 complete_and_exit(&skt->thread_done, 0); 693 return 0;
692} 694}
693 695
694/* 696/*
@@ -697,11 +699,12 @@ static int pccardd(void *__skt)
697 */ 699 */
698void pcmcia_parse_events(struct pcmcia_socket *s, u_int events) 700void pcmcia_parse_events(struct pcmcia_socket *s, u_int events)
699{ 701{
702 unsigned long flags;
700 cs_dbg(s, 4, "parse_events: events %08x\n", events); 703 cs_dbg(s, 4, "parse_events: events %08x\n", events);
701 if (s->thread) { 704 if (s->thread) {
702 spin_lock(&s->thread_lock); 705 spin_lock_irqsave(&s->thread_lock, flags);
703 s->thread_events |= events; 706 s->thread_events |= events;
704 spin_unlock(&s->thread_lock); 707 spin_unlock_irqrestore(&s->thread_lock, flags);
705 708
706 wake_up(&s->thread_wait); 709 wake_up(&s->thread_wait);
707 } 710 }
diff --git a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c
index c662e4f89d4..ad02629c8be 100644
--- a/drivers/pcmcia/hd64465_ss.c
+++ b/drivers/pcmcia/hd64465_ss.c
@@ -761,7 +761,7 @@ static int hs_init_socket(hs_socket_t *sp, int irq, unsigned long mem_base,
761 761
762 hd64465_register_irq_demux(sp->irq, hs_irq_demux, sp); 762 hd64465_register_irq_demux(sp->irq, hs_irq_demux, sp);
763 763
764 if ((err = request_irq(sp->irq, hs_interrupt, SA_INTERRUPT, MODNAME, sp)) < 0) 764 if ((err = request_irq(sp->irq, hs_interrupt, IRQF_DISABLED, MODNAME, sp)) < 0)
765 return err; 765 return err;
766 if (request_mem_region(sp->mem_base, sp->mem_length, MODNAME) == 0) { 766 if (request_mem_region(sp->mem_base, sp->mem_length, MODNAME) == 0) {
767 sp->mem_base = 0; 767 sp->mem_base = 0;
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index d5f03a338c6..2163aa75a25 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -149,7 +149,7 @@ static int __devinit i82092aa_pci_probe(struct pci_dev *dev, const struct pci_de
149 149
150 /* Register the interrupt handler */ 150 /* Register the interrupt handler */
151 dprintk(KERN_DEBUG "Requesting interrupt %i \n",dev->irq); 151 dprintk(KERN_DEBUG "Requesting interrupt %i \n",dev->irq);
152 if ((ret = request_irq(dev->irq, i82092aa_interrupt, SA_SHIRQ, "i82092aa", i82092aa_interrupt))) { 152 if ((ret = request_irq(dev->irq, i82092aa_interrupt, IRQF_SHARED, "i82092aa", i82092aa_interrupt))) {
153 printk(KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n", dev->irq); 153 printk(KERN_ERR "i82092aa: Failed to register IRQ %d, aborting\n", dev->irq);
154 goto err_out_free_res; 154 goto err_out_free_res;
155 } 155 }
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index ff51a65d943..1cc2682394b 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -509,7 +509,7 @@ static irqreturn_t i365_count_irq(int irq, void *dev, struct pt_regs *regs)
509static u_int __init test_irq(u_short sock, int irq) 509static u_int __init test_irq(u_short sock, int irq)
510{ 510{
511 debug(2, " testing ISA irq %d\n", irq); 511 debug(2, " testing ISA irq %d\n", irq);
512 if (request_irq(irq, i365_count_irq, SA_PROBEIRQ, "scan", 512 if (request_irq(irq, i365_count_irq, IRQF_PROBE_SHARED, "scan",
513 i365_count_irq) != 0) 513 i365_count_irq) != 0)
514 return 1; 514 return 1;
515 irq_hits = 0; irq_sock = sock; 515 irq_hits = 0; irq_sock = sock;
@@ -562,7 +562,7 @@ static u_int __init isa_scan(u_short sock, u_int mask0)
562 } else { 562 } else {
563 /* Fallback: just find interrupts that aren't in use */ 563 /* Fallback: just find interrupts that aren't in use */
564 for (i = 0; i < 16; i++) 564 for (i = 0; i < 16; i++)
565 if ((mask0 & (1 << i)) && (_check_irq(i, SA_PROBEIRQ) == 0)) 565 if ((mask0 & (1 << i)) && (_check_irq(i, IRQF_PROBE_SHARED) == 0))
566 mask1 |= (1 << i); 566 mask1 |= (1 << i);
567 printk("default"); 567 printk("default");
568 /* If scan failed, default to polled status */ 568 /* If scan failed, default to polled status */
@@ -726,7 +726,7 @@ static void __init add_pcic(int ns, int type)
726 u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12)); 726 u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12));
727 for (cs_irq = 15; cs_irq > 0; cs_irq--) 727 for (cs_irq = 15; cs_irq > 0; cs_irq--)
728 if ((cs_mask & (1 << cs_irq)) && 728 if ((cs_mask & (1 << cs_irq)) &&
729 (_check_irq(cs_irq, SA_PROBEIRQ) == 0)) 729 (_check_irq(cs_irq, IRQF_PROBE_SHARED) == 0))
730 break; 730 break;
731 if (cs_irq) { 731 if (cs_irq) {
732 grab_irq = 1; 732 grab_irq = 1;
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c
index 071cf485e1a..9e768eaef17 100644
--- a/drivers/pcmcia/m32r_cfc.c
+++ b/drivers/pcmcia/m32r_cfc.c
@@ -10,7 +10,6 @@
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/moduleparam.h> 11#include <linux/moduleparam.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/fcntl.h> 14#include <linux/fcntl.h>
16#include <linux/string.h> 15#include <linux/string.h>
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c
index 70d5f0748d5..61d50b5620d 100644
--- a/drivers/pcmcia/m32r_pcc.c
+++ b/drivers/pcmcia/m32r_pcc.c
@@ -10,7 +10,6 @@
10#include <linux/module.h> 10#include <linux/module.h>
11#include <linux/moduleparam.h> 11#include <linux/moduleparam.h>
12#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/fcntl.h> 14#include <linux/fcntl.h>
16#include <linux/string.h> 15#include <linux/string.h>
diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
index 2c23d758439..420e10aec0a 100644
--- a/drivers/pcmcia/omap_cf.c
+++ b/drivers/pcmcia/omap_cf.c
@@ -232,7 +232,7 @@ static int __init omap_cf_probe(struct device *dev)
232 dev_set_drvdata(dev, cf); 232 dev_set_drvdata(dev, cf);
233 233
234 /* this primarily just shuts up irq handling noise */ 234 /* this primarily just shuts up irq handling noise */
235 status = request_irq(irq, omap_cf_irq, SA_SHIRQ, 235 status = request_irq(irq, omap_cf_irq, IRQF_SHARED,
236 driver_name, cf); 236 driver_name, cf);
237 if (status < 0) 237 if (status < 0)
238 goto fail0; 238 goto fail0;
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index 3131bb0a009..7bf25b88ea3 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -788,6 +788,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
788 struct pcmcia_socket *s = p_dev->socket; 788 struct pcmcia_socket *s = p_dev->socket;
789 config_t *c; 789 config_t *c;
790 int ret = CS_IN_USE, irq = 0; 790 int ret = CS_IN_USE, irq = 0;
791 int type;
791 792
792 if (!(s->state & SOCKET_PRESENT)) 793 if (!(s->state & SOCKET_PRESENT))
793 return CS_NO_CARD; 794 return CS_NO_CARD;
@@ -797,6 +798,13 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
797 if (c->state & CONFIG_IRQ_REQ) 798 if (c->state & CONFIG_IRQ_REQ)
798 return CS_IN_USE; 799 return CS_IN_USE;
799 800
801 /* Decide what type of interrupt we are registering */
802 type = 0;
803 if (s->functions > 1) /* All of this ought to be handled higher up */
804 type = IRQF_SHARED;
805 if (req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)
806 type = IRQF_SHARED;
807
800#ifdef CONFIG_PCMCIA_PROBE 808#ifdef CONFIG_PCMCIA_PROBE
801 if (s->irq.AssignedIRQ != 0) { 809 if (s->irq.AssignedIRQ != 0) {
802 /* If the interrupt is already assigned, it must be the same */ 810 /* If the interrupt is already assigned, it must be the same */
@@ -822,9 +830,7 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
822 * marked as used by the kernel resource management core */ 830 * marked as used by the kernel resource management core */
823 ret = request_irq(irq, 831 ret = request_irq(irq,
824 (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action, 832 (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Handler : test_action,
825 ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) || 833 type,
826 (s->functions > 1) ||
827 (irq == s->pci_irq)) ? SA_SHIRQ : 0,
828 p_dev->devname, 834 p_dev->devname,
829 (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data); 835 (req->Attributes & IRQ_HANDLE_PRESENT) ? req->Instance : data);
830 if (!ret) { 836 if (!ret) {
@@ -839,18 +845,21 @@ int pcmcia_request_irq(struct pcmcia_device *p_dev, irq_req_t *req)
839 if (ret && !s->irq.AssignedIRQ) { 845 if (ret && !s->irq.AssignedIRQ) {
840 if (!s->pci_irq) 846 if (!s->pci_irq)
841 return ret; 847 return ret;
848 type = IRQF_SHARED;
842 irq = s->pci_irq; 849 irq = s->pci_irq;
843 } 850 }
844 851
845 if (ret && req->Attributes & IRQ_HANDLE_PRESENT) { 852 if (ret && (req->Attributes & IRQ_HANDLE_PRESENT)) {
846 if (request_irq(irq, req->Handler, 853 if (request_irq(irq, req->Handler, type, p_dev->devname, req->Instance))
847 ((req->Attributes & IRQ_TYPE_DYNAMIC_SHARING) ||
848 (s->functions > 1) ||
849 (irq == s->pci_irq)) ? SA_SHIRQ : 0,
850 p_dev->devname, req->Instance))
851 return CS_IN_USE; 854 return CS_IN_USE;
852 } 855 }
853 856
857 /* Make sure the fact the request type was overridden is passed back */
858 if (type == IRQF_SHARED && !(req->Attributes & IRQ_TYPE_DYNAMIC_SHARING)) {
859 req->Attributes |= IRQ_TYPE_DYNAMIC_SHARING;
860 printk(KERN_WARNING "pcmcia: request for exclusive IRQ could not be fulfilled.\n");
861 printk(KERN_WARNING "pcmcia: the driver needs updating to supported shared IRQ lines.\n");
862 }
854 c->irq.Attributes = req->Attributes; 863 c->irq.Attributes = req->Attributes;
855 s->irq.AssignedIRQ = req->AssignedIRQ = irq; 864 s->irq.AssignedIRQ = req->AssignedIRQ = irq;
856 s->irq.Config++; 865 s->irq.Config++;
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c
index 9ee26c1b863..22c5e7427dd 100644
--- a/drivers/pcmcia/pd6729.c
+++ b/drivers/pcmcia/pd6729.c
@@ -689,7 +689,7 @@ static int __devinit pd6729_pci_probe(struct pci_dev *dev,
689 pci_set_drvdata(dev, socket); 689 pci_set_drvdata(dev, socket);
690 if (irq_mode == 1) { 690 if (irq_mode == 1) {
691 /* Register the interrupt handler */ 691 /* Register the interrupt handler */
692 if ((ret = request_irq(dev->irq, pd6729_interrupt, SA_SHIRQ, 692 if ((ret = request_irq(dev->irq, pd6729_interrupt, IRQF_SHARED,
693 "pd6729", socket))) { 693 "pd6729", socket))) {
694 printk(KERN_ERR "pd6729: Failed to register irq %d, " 694 printk(KERN_ERR "pd6729: Failed to register irq %d, "
695 "aborting\n", dev->irq); 695 "aborting\n", dev->irq);
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c
index 7fa18fb814b..b3518131ea0 100644
--- a/drivers/pcmcia/pxa2xx_base.c
+++ b/drivers/pcmcia/pxa2xx_base.c
@@ -18,7 +18,6 @@
18 18
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/config.h>
22#include <linux/cpufreq.h> 21#include <linux/cpufreq.h>
23#include <linux/ioport.h> 22#include <linux/ioport.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c
index 6d441ec75c6..c5b2a44b4c3 100644
--- a/drivers/pcmcia/sa1100_generic.c
+++ b/drivers/pcmcia/sa1100_generic.c
@@ -32,7 +32,6 @@
32 32
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/config.h>
36#include <linux/platform_device.h> 35#include <linux/platform_device.h>
37 36
38#include <pcmcia/cs_types.h> 37#include <pcmcia/cs_types.h>
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c
index 81ded52c895..658cddfbcf2 100644
--- a/drivers/pcmcia/sa1111_generic.c
+++ b/drivers/pcmcia/sa1111_generic.c
@@ -5,7 +5,6 @@
5 * basically means we handle everything except controlling the 5 * basically means we handle everything except controlling the
6 * power. Power is machine specific... 6 * power. Power is machine specific...
7 */ 7 */
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/ioport.h> 10#include <linux/ioport.h>
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c
index 59c5d968e9f..31a7abc55b2 100644
--- a/drivers/pcmcia/sa11xx_base.c
+++ b/drivers/pcmcia/sa11xx_base.c
@@ -32,7 +32,6 @@
32 32
33#include <linux/module.h> 33#include <linux/module.h>
34#include <linux/init.h> 34#include <linux/init.h>
35#include <linux/config.h>
36#include <linux/cpufreq.h> 35#include <linux/cpufreq.h>
37#include <linux/ioport.h> 36#include <linux/ioport.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index ea7d9ca160b..ecaa132fa59 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -31,7 +31,6 @@
31======================================================================*/ 31======================================================================*/
32 32
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
37#include <linux/init.h> 36#include <linux/init.h>
@@ -39,12 +38,12 @@
39#include <linux/timer.h> 38#include <linux/timer.h>
40#include <linux/mm.h> 39#include <linux/mm.h>
41#include <linux/interrupt.h> 40#include <linux/interrupt.h>
41#include <linux/irq.h>
42#include <linux/spinlock.h> 42#include <linux/spinlock.h>
43#include <linux/cpufreq.h> 43#include <linux/cpufreq.h>
44 44
45#include <asm/hardware.h> 45#include <asm/hardware.h>
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/irq.h>
48#include <asm/system.h> 47#include <asm/system.h>
49 48
50#include "soc_common.h" 49#include "soc_common.h"
@@ -524,7 +523,7 @@ int soc_pcmcia_request_irqs(struct soc_pcmcia_socket *skt,
524 if (irqs[i].sock != skt->nr) 523 if (irqs[i].sock != skt->nr)
525 continue; 524 continue;
526 res = request_irq(irqs[i].irq, soc_common_pcmcia_interrupt, 525 res = request_irq(irqs[i].irq, soc_common_pcmcia_interrupt,
527 SA_INTERRUPT, irqs[i].str, skt); 526 IRQF_DISABLED, irqs[i].str, skt);
528 if (res) 527 if (res)
529 break; 528 break;
530 set_irq_type(irqs[i].irq, IRQT_NOEDGE); 529 set_irq_type(irqs[i].irq, IRQT_NOEDGE);
diff --git a/drivers/pcmcia/ti113x.h b/drivers/pcmcia/ti113x.h
index 7a3d1b8e16b..62e9ebf967f 100644
--- a/drivers/pcmcia/ti113x.h
+++ b/drivers/pcmcia/ti113x.h
@@ -647,6 +647,7 @@ static int ti12xx_2nd_slot_empty(struct yenta_socket *socket)
647 */ 647 */
648 break; 648 break;
649 649
650 case PCI_DEVICE_ID_TI_XX12:
650 case PCI_DEVICE_ID_TI_X515: 651 case PCI_DEVICE_ID_TI_X515:
651 case PCI_DEVICE_ID_TI_X420: 652 case PCI_DEVICE_ID_TI_X420:
652 case PCI_DEVICE_ID_TI_X620: 653 case PCI_DEVICE_ID_TI_X620:
diff --git a/drivers/pcmcia/vrc4171_card.c b/drivers/pcmcia/vrc4171_card.c
index 459e6e1946f..e076a13db55 100644
--- a/drivers/pcmcia/vrc4171_card.c
+++ b/drivers/pcmcia/vrc4171_card.c
@@ -730,7 +730,7 @@ static int __devinit vrc4171_card_init(void)
730 730
731 retval = vrc4171_add_sockets(); 731 retval = vrc4171_add_sockets();
732 if (retval == 0) 732 if (retval == 0)
733 retval = request_irq(vrc4171_irq, pccard_interrupt, SA_SHIRQ, 733 retval = request_irq(vrc4171_irq, pccard_interrupt, IRQF_SHARED,
734 vrc4171_card_name, vrc4171_sockets); 734 vrc4171_card_name, vrc4171_sockets);
735 735
736 if (retval < 0) { 736 if (retval < 0) {
diff --git a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c
index 6004196f7cc..d19a9138135 100644
--- a/drivers/pcmcia/vrc4173_cardu.c
+++ b/drivers/pcmcia/vrc4173_cardu.c
@@ -500,7 +500,7 @@ static int __devinit vrc4173_cardu_probe(struct pci_dev *dev,
500 return -ENOMEM; 500 return -ENOMEM;
501 } 501 }
502 502
503 if (request_irq(dev->irq, cardu_interrupt, SA_SHIRQ, socket->name, socket) < 0) { 503 if (request_irq(dev->irq, cardu_interrupt, IRQF_SHARED, socket->name, socket) < 0) {
504 pcmcia_unregister_socket(socket->pcmcia_socket); 504 pcmcia_unregister_socket(socket->pcmcia_socket);
505 socket->pcmcia_socket = NULL; 505 socket->pcmcia_socket = NULL;
506 iounmap(socket->base); 506 iounmap(socket->base);
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 4145eb83b9b..1344746381e 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -287,7 +287,10 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
287 struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket); 287 struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
288 u16 bridge; 288 u16 bridge;
289 289
290 yenta_set_power(socket, state); 290 /* if powering down: do it immediately */
291 if (state->Vcc == 0)
292 yenta_set_power(socket, state);
293
291 socket->io_irq = state->io_irq; 294 socket->io_irq = state->io_irq;
292 bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~(CB_BRIDGE_CRST | CB_BRIDGE_INTR); 295 bridge = config_readw(socket, CB_BRIDGE_CONTROL) & ~(CB_BRIDGE_CRST | CB_BRIDGE_INTR);
293 if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) { 296 if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) {
@@ -339,6 +342,10 @@ static int yenta_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
339 /* Socket event mask: get card insert/remove events.. */ 342 /* Socket event mask: get card insert/remove events.. */
340 cb_writel(socket, CB_SOCKET_EVENT, -1); 343 cb_writel(socket, CB_SOCKET_EVENT, -1);
341 cb_writel(socket, CB_SOCKET_MASK, CB_CDMASK); 344 cb_writel(socket, CB_SOCKET_MASK, CB_CDMASK);
345
346 /* if powering up: do it as the last step when the socket is configured */
347 if (state->Vcc != 0)
348 yenta_set_power(socket, state);
342 return 0; 349 return 0;
343} 350}
344 351
@@ -916,7 +923,7 @@ static int yenta_probe_cb_irq(struct yenta_socket *socket)
916 923
917 socket->probe_status = 0; 924 socket->probe_status = 0;
918 925
919 if (request_irq(socket->cb_irq, yenta_probe_handler, SA_SHIRQ, "yenta", socket)) { 926 if (request_irq(socket->cb_irq, yenta_probe_handler, IRQF_SHARED, "yenta", socket)) {
920 printk(KERN_WARNING "Yenta: request_irq() in yenta_probe_cb_irq() failed!\n"); 927 printk(KERN_WARNING "Yenta: request_irq() in yenta_probe_cb_irq() failed!\n");
921 return -1; 928 return -1;
922 } 929 }
@@ -998,6 +1005,77 @@ static void yenta_config_init(struct yenta_socket *socket)
998 config_writew(socket, CB_BRIDGE_CONTROL, bridge); 1005 config_writew(socket, CB_BRIDGE_CONTROL, bridge);
999} 1006}
1000 1007
1008/**
1009 * yenta_fixup_parent_bridge - Fix subordinate bus# of the parent bridge
1010 * @cardbus_bridge: The PCI bus which the CardBus bridge bridges to
1011 *
1012 * Checks if devices on the bus which the CardBus bridge bridges to would be
1013 * invisible during PCI scans because of a misconfigured subordinate number
1014 * of the parent brige - some BIOSes seem to be too lazy to set it right.
1015 * Does the fixup carefully by checking how far it can go without conflicts.
1016 * See http://bugzilla.kernel.org/show_bug.cgi?id=2944 for more information.
1017 */
1018static void yenta_fixup_parent_bridge(struct pci_bus *cardbus_bridge)
1019{
1020 struct list_head *tmp;
1021 unsigned char upper_limit;
1022 /*
1023 * We only check and fix the parent bridge: All systems which need
1024 * this fixup that have been reviewed are laptops and the only bridge
1025 * which needed fixing was the parent bridge of the CardBus bridge:
1026 */
1027 struct pci_bus *bridge_to_fix = cardbus_bridge->parent;
1028
1029 /* Check bus numbers are already set up correctly: */
1030 if (bridge_to_fix->subordinate >= cardbus_bridge->subordinate)
1031 return; /* The subordinate number is ok, nothing to do */
1032
1033 if (!bridge_to_fix->parent)
1034 return; /* Root bridges are ok */
1035
1036 /* stay within the limits of the bus range of the parent: */
1037 upper_limit = bridge_to_fix->parent->subordinate;
1038
1039 /* check the bus ranges of all silbling bridges to prevent overlap */
1040 list_for_each(tmp, &bridge_to_fix->parent->children) {
1041 struct pci_bus * silbling = pci_bus_b(tmp);
1042 /*
1043 * If the silbling has a higher secondary bus number
1044 * and it's secondary is equal or smaller than our
1045 * current upper limit, set the new upper limit to
1046 * the bus number below the silbling's range:
1047 */
1048 if (silbling->secondary > bridge_to_fix->subordinate
1049 && silbling->secondary <= upper_limit)
1050 upper_limit = silbling->secondary - 1;
1051 }
1052
1053 /* Show that the wanted subordinate number is not possible: */
1054 if (cardbus_bridge->subordinate > upper_limit)
1055 printk(KERN_WARNING "Yenta: Upper limit for fixing this "
1056 "bridge's parent bridge: #%02x\n", upper_limit);
1057
1058 /* If we have room to increase the bridge's subordinate number, */
1059 if (bridge_to_fix->subordinate < upper_limit) {
1060
1061 /* use the highest number of the hidden bus, within limits */
1062 unsigned char subordinate_to_assign =
1063 min(cardbus_bridge->subordinate, upper_limit);
1064
1065 printk(KERN_INFO "Yenta: Raising subordinate bus# of parent "
1066 "bus (#%02x) from #%02x to #%02x\n",
1067 bridge_to_fix->number,
1068 bridge_to_fix->subordinate, subordinate_to_assign);
1069
1070 /* Save the new subordinate in the bus struct of the bridge */
1071 bridge_to_fix->subordinate = subordinate_to_assign;
1072
1073 /* and update the PCI config space with the new subordinate */
1074 pci_write_config_byte(bridge_to_fix->self,
1075 PCI_SUBORDINATE_BUS, bridge_to_fix->subordinate);
1076 }
1077}
1078
1001/* 1079/*
1002 * Initialize a cardbus controller. Make sure we have a usable 1080 * Initialize a cardbus controller. Make sure we have a usable
1003 * interrupt, and that we can map the cardbus area. Fill in the 1081 * interrupt, and that we can map the cardbus area. Fill in the
@@ -1094,7 +1172,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
1094 1172
1095 /* We must finish initialization here */ 1173 /* We must finish initialization here */
1096 1174
1097 if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, SA_SHIRQ, "yenta", socket)) { 1175 if (!socket->cb_irq || request_irq(socket->cb_irq, yenta_interrupt, IRQF_SHARED, "yenta", socket)) {
1098 /* No IRQ or request_irq failed. Poll */ 1176 /* No IRQ or request_irq failed. Poll */
1099 socket->cb_irq = 0; /* But zero is a valid IRQ number. */ 1177 socket->cb_irq = 0; /* But zero is a valid IRQ number. */
1100 init_timer(&socket->poll_timer); 1178 init_timer(&socket->poll_timer);
@@ -1113,6 +1191,8 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
1113 yenta_get_socket_capabilities(socket, isa_interrupts); 1191 yenta_get_socket_capabilities(socket, isa_interrupts);
1114 printk(KERN_INFO "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE)); 1192 printk(KERN_INFO "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
1115 1193
1194 yenta_fixup_parent_bridge(dev->subordinate);
1195
1116 /* Register it with the pcmcia layer.. */ 1196 /* Register it with the pcmcia layer.. */
1117 ret = pcmcia_register_socket(&socket->socket); 1197 ret = pcmcia_register_socket(&socket->socket);
1118 if (ret == 0) { 1198 if (ret == 0) {
@@ -1232,6 +1312,7 @@ static struct pci_device_id yenta_table [] = {
1232 1312
1233 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11, TI12XX), 1313 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX21_XX11, TI12XX),
1234 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X515, TI12XX), 1314 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X515, TI12XX),
1315 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_XX12, TI12XX),
1235 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X420, TI12XX), 1316 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X420, TI12XX),
1236 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X620, TI12XX), 1317 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_X620, TI12XX),
1237 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7410, TI12XX), 1318 CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_7410, TI12XX),
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index 0b4adcb60df..227600cd636 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/slab.h> 9#include <linux/slab.h>
11#include <linux/pnp.h> 10#include <linux/pnp.h>
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index e54c1538319..e161423b430 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/string.h> 8#include <linux/string.h>
10#include <linux/list.h> 9#include <linux/list.h>
11#include <linux/module.h> 10#include <linux/module.h>
diff --git a/drivers/pnp/isapnp/compat.c b/drivers/pnp/isapnp/compat.c
index 3ff7e76b33b..0697ab88a9a 100644
--- a/drivers/pnp/isapnp/compat.c
+++ b/drivers/pnp/isapnp/compat.c
@@ -8,7 +8,6 @@
8 8
9/* TODO: see if more isapnp functions are needed here */ 9/* TODO: see if more isapnp functions are needed here */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/isapnp.h> 12#include <linux/isapnp.h>
14#include <linux/string.h> 13#include <linux/string.h>
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index ac7c2bb6c69..f2e0179962e 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -34,7 +34,6 @@
34 * 2003-08-11 Resource Management Updates - Adam Belay <ambx1@neo.rr.com> 34 * 2003-08-11 Resource Management Updates - Adam Belay <ambx1@neo.rr.com>
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40#include <linux/errno.h> 39#include <linux/errno.h>
diff --git a/drivers/pnp/isapnp/proc.c b/drivers/pnp/isapnp/proc.c
index cf54b0a3628..958c11bedd0 100644
--- a/drivers/pnp/isapnp/proc.c
+++ b/drivers/pnp/isapnp/proc.c
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/isapnp.h> 23#include <linux/isapnp.h>
25#include <linux/proc_fs.h> 24#include <linux/proc_fs.h>
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 1d7a5b87f4c..5026b345cb3 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index f104577f73e..6cf34a63c79 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -19,7 +19,6 @@
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/acpi.h> 22#include <linux/acpi.h>
24#include <linux/pnp.h> 23#include <linux/pnp.h>
25#include <acpi/acpi_bus.h> 24#include <acpi/acpi_bus.h>
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index c89c98a2cca..ef508a4de55 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -3,7 +3,6 @@
3 * 3 *
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/ctype.h> 6#include <linux/ctype.h>
8#include <linux/pnp.h> 7#include <linux/pnp.h>
9#include <linux/pnpbios.h> 8#include <linux/pnpbios.h>
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c
index 8936b0cb2ec..e97ecefe858 100644
--- a/drivers/pnp/quirks.c
+++ b/drivers/pnp/quirks.c
@@ -11,7 +11,6 @@
11 * Copyright (c) 1999 Martin Mares <mj@ucw.cz> 11 * Copyright (c) 1999 Martin Mares <mj@ucw.cz>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/string.h> 16#include <linux/string.h>
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 7bb892f58cc..5c8ec21e108 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/interrupt.h> 11#include <linux/interrupt.h>
@@ -396,7 +395,8 @@ int pnp_check_irq(struct pnp_dev * dev, int idx)
396 /* check if the resource is already in use, skip if the 395 /* check if the resource is already in use, skip if the
397 * device is active because it itself may be in use */ 396 * device is active because it itself may be in use */
398 if(!dev->active) { 397 if(!dev->active) {
399 if (request_irq(*irq, pnp_test_handler, SA_INTERRUPT, "pnp", NULL)) 398 if (request_irq(*irq, pnp_test_handler,
399 IRQF_DISABLED|IRQF_PROBE_SHARED, "pnp", NULL))
400 return 0; 400 return 0;
401 free_irq(*irq, NULL); 401 free_irq(*irq, NULL);
402 } 402 }
diff --git a/drivers/pnp/support.c b/drivers/pnp/support.c
index 61fe998944b..946a0dcd627 100644
--- a/drivers/pnp/support.c
+++ b/drivers/pnp/support.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/ctype.h> 9#include <linux/ctype.h>
11#include <linux/pnp.h> 10#include <linux/pnp.h>
diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 94e30fe4b8f..7bf7b2c8824 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -10,7 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16 15
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c
index bef9316e95d..5687b8fcbf9 100644
--- a/drivers/rapidio/rio-sysfs.c
+++ b/drivers/rapidio/rio-sysfs.c
@@ -10,7 +10,6 @@
10 * option) any later version. 10 * option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/rio.h> 14#include <linux/rio.h>
16#include <linux/rio_drv.h> 15#include <linux/rio_drv.h>
diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 5e382470faa..f644807da2f 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.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/types.h> 14#include <linux/types.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17 16
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index f2fc81a9074..f5b9f187a93 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -15,7 +15,7 @@ config RTC_CLASS
15 help 15 help
16 Generic RTC class support. If you say yes here, you will 16 Generic RTC class support. If you say yes here, you will
17 be allowed to plug one or more RTCs to your system. You will 17 be allowed to plug one or more RTCs to your system. You will
18 probably want to enable one of more of the interfaces below. 18 probably want to enable one or more of the interfaces below.
19 19
20 This driver can also be built as a module. If so, the module 20 This driver can also be built as a module. If so, the module
21 will be called rtc-class. 21 will be called rtc-class.
@@ -182,6 +182,22 @@ config RTC_DRV_RS5C372
182 This driver can also be built as a module. If so, the module 182 This driver can also be built as a module. If so, the module
183 will be called rtc-rs5c372. 183 will be called rtc-rs5c372.
184 184
185config RTC_DRV_S3C
186 tristate "Samsung S3C series SoC RTC"
187 depends on RTC_CLASS && ARCH_S3C2410
188 help
189 RTC (Realtime Clock) driver for the clock inbuilt into the
190 Samsung S3C24XX series of SoCs. This can provide periodic
191 interrupt rates from 1Hz to 64Hz for user programs, and
192 wakeup from Alarm.
193
194 The driver currently supports the common features on all the
195 S3C24XX range, such as the S3C2410, S3C2412, S3C2413, S3C2440
196 and S3C2442.
197
198 This driver can also be build as a module. If so, the module
199 will be called rtc-s3c.
200
185config RTC_DRV_M48T86 201config RTC_DRV_M48T86
186 tristate "ST M48T86/Dallas DS12887" 202 tristate "ST M48T86/Dallas DS12887"
187 depends on RTC_CLASS 203 depends on RTC_CLASS
diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile
index da5e38774e1..54220714ff4 100644
--- a/drivers/rtc/Makefile
+++ b/drivers/rtc/Makefile
@@ -19,6 +19,7 @@ obj-$(CONFIG_RTC_DRV_DS1742) += rtc-ds1742.o
19obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o 19obj-$(CONFIG_RTC_DRV_PCF8563) += rtc-pcf8563.o
20obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o 20obj-$(CONFIG_RTC_DRV_PCF8583) += rtc-pcf8583.o
21obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o 21obj-$(CONFIG_RTC_DRV_RS5C372) += rtc-rs5c372.o
22obj-$(CONFIG_RTC_DRV_S3C) += rtc-s3c.o
22obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o 23obj-$(CONFIG_RTC_DRV_RS5C348) += rtc-rs5c348.o
23obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o 24obj-$(CONFIG_RTC_DRV_M48T86) += rtc-m48t86.o
24obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o 25obj-$(CONFIG_RTC_DRV_DS1553) += rtc-ds1553.o
diff --git a/drivers/rtc/rtc-at91.c b/drivers/rtc/rtc-at91.c
index b676f443c17..dfd0ce86f6a 100644
--- a/drivers/rtc/rtc-at91.c
+++ b/drivers/rtc/rtc-at91.c
@@ -293,7 +293,7 @@ static int __init at91_rtc_probe(struct platform_device *pdev)
293 AT91_RTC_CALEV); 293 AT91_RTC_CALEV);
294 294
295 ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt, 295 ret = request_irq(AT91_ID_SYS, at91_rtc_interrupt,
296 SA_SHIRQ, "at91_rtc", pdev); 296 IRQF_SHARED, "at91_rtc", pdev);
297 if (ret) { 297 if (ret) {
298 printk(KERN_ERR "at91_rtc: IRQ %d already in use.\n", 298 printk(KERN_ERR "at91_rtc: IRQ %d already in use.\n",
299 AT91_ID_SYS); 299 AT91_ID_SYS);
diff --git a/drivers/rtc/rtc-ds1553.c b/drivers/rtc/rtc-ds1553.c
index 762521a1419..20900149547 100644
--- a/drivers/rtc/rtc-ds1553.c
+++ b/drivers/rtc/rtc-ds1553.c
@@ -341,7 +341,7 @@ static int __init ds1553_rtc_probe(struct platform_device *pdev)
341 341
342 if (pdata->irq >= 0) { 342 if (pdata->irq >= 0) {
343 writeb(0, ioaddr + RTC_INTERRUPTS); 343 writeb(0, ioaddr + RTC_INTERRUPTS);
344 if (request_irq(pdata->irq, ds1553_rtc_interrupt, SA_SHIRQ, 344 if (request_irq(pdata->irq, ds1553_rtc_interrupt, IRQF_SHARED,
345 pdev->name, pdev) < 0) { 345 pdev->name, pdev) < 0) {
346 dev_warn(&pdev->dev, "interrupt not available.\n"); 346 dev_warn(&pdev->dev, "interrupt not available.\n");
347 pdata->irq = -1; 347 pdata->irq = -1;
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index ee538632660..d6d1c5726b0 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -173,7 +173,7 @@ static int pl031_probe(struct amba_device *adev, void *id)
173 goto out_no_remap; 173 goto out_no_remap;
174 } 174 }
175 175
176 if (request_irq(adev->irq[0], pl031_interrupt, SA_INTERRUPT, 176 if (request_irq(adev->irq[0], pl031_interrupt, IRQF_DISABLED,
177 "rtc-pl031", ldata->rtc)) { 177 "rtc-pl031", ldata->rtc)) {
178 ret = -EIO; 178 ret = -EIO;
179 goto out_no_irq; 179 goto out_no_irq;
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
new file mode 100644
index 00000000000..d6d1bff52b8
--- /dev/null
+++ b/drivers/rtc/rtc-s3c.c
@@ -0,0 +1,607 @@
1/* drivers/rtc/rtc-s3c.c
2 *
3 * Copyright (c) 2004,2006 Simtec Electronics
4 * Ben Dooks, <ben@simtec.co.uk>
5 * http://armlinux.simtec.co.uk/
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 *
11 * S3C2410/S3C2440/S3C24XX Internal RTC Driver
12*/
13
14#include <linux/module.h>
15#include <linux/fs.h>
16#include <linux/string.h>
17#include <linux/init.h>
18#include <linux/platform_device.h>
19#include <linux/interrupt.h>
20#include <linux/rtc.h>
21#include <linux/bcd.h>
22#include <linux/clk.h>
23
24#include <asm/hardware.h>
25#include <asm/uaccess.h>
26#include <asm/io.h>
27#include <asm/irq.h>
28#include <asm/rtc.h>
29
30#include <asm/mach/time.h>
31
32#include <asm/arch/regs-rtc.h>
33
34/* I have yet to find an S3C implementation with more than one
35 * of these rtc blocks in */
36
37static struct resource *s3c_rtc_mem;
38
39static void __iomem *s3c_rtc_base;
40static int s3c_rtc_alarmno = NO_IRQ;
41static int s3c_rtc_tickno = NO_IRQ;
42static int s3c_rtc_freq = 1;
43
44static DEFINE_SPINLOCK(s3c_rtc_pie_lock);
45static unsigned int tick_count;
46
47/* IRQ Handlers */
48
49static irqreturn_t s3c_rtc_alarmirq(int irq, void *id, struct pt_regs *r)
50{
51 struct rtc_device *rdev = id;
52
53 rtc_update_irq(&rdev->class_dev, 1, RTC_AF | RTC_IRQF);
54 return IRQ_HANDLED;
55}
56
57static irqreturn_t s3c_rtc_tickirq(int irq, void *id, struct pt_regs *r)
58{
59 struct rtc_device *rdev = id;
60
61 rtc_update_irq(&rdev->class_dev, tick_count++, RTC_PF | RTC_IRQF);
62 return IRQ_HANDLED;
63}
64
65/* Update control registers */
66static void s3c_rtc_setaie(int to)
67{
68 unsigned int tmp;
69
70 pr_debug("%s: aie=%d\n", __FUNCTION__, to);
71
72 tmp = readb(S3C2410_RTCALM) & ~S3C2410_RTCALM_ALMEN;
73
74 if (to)
75 tmp |= S3C2410_RTCALM_ALMEN;
76
77 writeb(tmp, S3C2410_RTCALM);
78}
79
80static void s3c_rtc_setpie(int to)
81{
82 unsigned int tmp;
83
84 pr_debug("%s: pie=%d\n", __FUNCTION__, to);
85
86 spin_lock_irq(&s3c_rtc_pie_lock);
87 tmp = readb(S3C2410_TICNT) & ~S3C2410_TICNT_ENABLE;
88
89 if (to)
90 tmp |= S3C2410_TICNT_ENABLE;
91
92 writeb(tmp, S3C2410_TICNT);
93 spin_unlock_irq(&s3c_rtc_pie_lock);
94}
95
96static void s3c_rtc_setfreq(int freq)
97{
98 unsigned int tmp;
99
100 spin_lock_irq(&s3c_rtc_pie_lock);
101 tmp = readb(S3C2410_TICNT) & S3C2410_TICNT_ENABLE;
102
103 s3c_rtc_freq = freq;
104
105 tmp |= (128 / freq)-1;
106
107 writeb(tmp, S3C2410_TICNT);
108 spin_unlock_irq(&s3c_rtc_pie_lock);
109}
110
111/* Time read/write */
112
113static int s3c_rtc_gettime(struct device *dev, struct rtc_time *rtc_tm)
114{
115 unsigned int have_retried = 0;
116
117 retry_get_time:
118 rtc_tm->tm_min = readb(S3C2410_RTCMIN);
119 rtc_tm->tm_hour = readb(S3C2410_RTCHOUR);
120 rtc_tm->tm_mday = readb(S3C2410_RTCDATE);
121 rtc_tm->tm_mon = readb(S3C2410_RTCMON);
122 rtc_tm->tm_year = readb(S3C2410_RTCYEAR);
123 rtc_tm->tm_sec = readb(S3C2410_RTCSEC);
124
125 /* the only way to work out wether the system was mid-update
126 * when we read it is to check the second counter, and if it
127 * is zero, then we re-try the entire read
128 */
129
130 if (rtc_tm->tm_sec == 0 && !have_retried) {
131 have_retried = 1;
132 goto retry_get_time;
133 }
134
135 pr_debug("read time %02x.%02x.%02x %02x/%02x/%02x\n",
136 rtc_tm->tm_year, rtc_tm->tm_mon, rtc_tm->tm_mday,
137 rtc_tm->tm_hour, rtc_tm->tm_min, rtc_tm->tm_sec);
138
139 BCD_TO_BIN(rtc_tm->tm_sec);
140 BCD_TO_BIN(rtc_tm->tm_min);
141 BCD_TO_BIN(rtc_tm->tm_hour);
142 BCD_TO_BIN(rtc_tm->tm_mday);
143 BCD_TO_BIN(rtc_tm->tm_mon);
144 BCD_TO_BIN(rtc_tm->tm_year);
145
146 rtc_tm->tm_year += 100;
147 rtc_tm->tm_mon -= 1;
148
149 return 0;
150}
151
152static int s3c_rtc_settime(struct device *dev, struct rtc_time *tm)
153{
154 /* the rtc gets round the y2k problem by just not supporting it */
155
156 if (tm->tm_year < 100)
157 return -EINVAL;
158
159 writeb(BIN2BCD(tm->tm_sec), S3C2410_RTCSEC);
160 writeb(BIN2BCD(tm->tm_min), S3C2410_RTCMIN);
161 writeb(BIN2BCD(tm->tm_hour), S3C2410_RTCHOUR);
162 writeb(BIN2BCD(tm->tm_mday), S3C2410_RTCDATE);
163 writeb(BIN2BCD(tm->tm_mon + 1), S3C2410_RTCMON);
164 writeb(BIN2BCD(tm->tm_year - 100), S3C2410_RTCYEAR);
165
166 return 0;
167}
168
169static int s3c_rtc_getalarm(struct device *dev, struct rtc_wkalrm *alrm)
170{
171 struct rtc_time *alm_tm = &alrm->time;
172 unsigned int alm_en;
173
174 alm_tm->tm_sec = readb(S3C2410_ALMSEC);
175 alm_tm->tm_min = readb(S3C2410_ALMMIN);
176 alm_tm->tm_hour = readb(S3C2410_ALMHOUR);
177 alm_tm->tm_mon = readb(S3C2410_ALMMON);
178 alm_tm->tm_mday = readb(S3C2410_ALMDATE);
179 alm_tm->tm_year = readb(S3C2410_ALMYEAR);
180
181 alm_en = readb(S3C2410_RTCALM);
182
183 pr_debug("read alarm %02x %02x.%02x.%02x %02x/%02x/%02x\n",
184 alm_en,
185 alm_tm->tm_year, alm_tm->tm_mon, alm_tm->tm_mday,
186 alm_tm->tm_hour, alm_tm->tm_min, alm_tm->tm_sec);
187
188
189 /* decode the alarm enable field */
190
191 if (alm_en & S3C2410_RTCALM_SECEN)
192 BCD_TO_BIN(alm_tm->tm_sec);
193 else
194 alm_tm->tm_sec = 0xff;
195
196 if (alm_en & S3C2410_RTCALM_MINEN)
197 BCD_TO_BIN(alm_tm->tm_min);
198 else
199 alm_tm->tm_min = 0xff;
200
201 if (alm_en & S3C2410_RTCALM_HOUREN)
202 BCD_TO_BIN(alm_tm->tm_hour);
203 else
204 alm_tm->tm_hour = 0xff;
205
206 if (alm_en & S3C2410_RTCALM_DAYEN)
207 BCD_TO_BIN(alm_tm->tm_mday);
208 else
209 alm_tm->tm_mday = 0xff;
210
211 if (alm_en & S3C2410_RTCALM_MONEN) {
212 BCD_TO_BIN(alm_tm->tm_mon);
213 alm_tm->tm_mon -= 1;
214 } else {
215 alm_tm->tm_mon = 0xff;
216 }
217
218 if (alm_en & S3C2410_RTCALM_YEAREN)
219 BCD_TO_BIN(alm_tm->tm_year);
220 else
221 alm_tm->tm_year = 0xffff;
222
223 return 0;
224}
225
226static int s3c_rtc_setalarm(struct device *dev, struct rtc_wkalrm *alrm)
227{
228 struct rtc_time *tm = &alrm->time;
229 unsigned int alrm_en;
230
231 pr_debug("s3c_rtc_setalarm: %d, %02x/%02x/%02x %02x.%02x.%02x\n",
232 alrm->enabled,
233 tm->tm_mday & 0xff, tm->tm_mon & 0xff, tm->tm_year & 0xff,
234 tm->tm_hour & 0xff, tm->tm_min & 0xff, tm->tm_sec);
235
236
237 alrm_en = readb(S3C2410_RTCALM) & S3C2410_RTCALM_ALMEN;
238 writeb(0x00, S3C2410_RTCALM);
239
240 if (tm->tm_sec < 60 && tm->tm_sec >= 0) {
241 alrm_en |= S3C2410_RTCALM_SECEN;
242 writeb(BIN2BCD(tm->tm_sec), S3C2410_ALMSEC);
243 }
244
245 if (tm->tm_min < 60 && tm->tm_min >= 0) {
246 alrm_en |= S3C2410_RTCALM_MINEN;
247 writeb(BIN2BCD(tm->tm_min), S3C2410_ALMMIN);
248 }
249
250 if (tm->tm_hour < 24 && tm->tm_hour >= 0) {
251 alrm_en |= S3C2410_RTCALM_HOUREN;
252 writeb(BIN2BCD(tm->tm_hour), S3C2410_ALMHOUR);
253 }
254
255 pr_debug("setting S3C2410_RTCALM to %08x\n", alrm_en);
256
257 writeb(alrm_en, S3C2410_RTCALM);
258
259 if (0) {
260 alrm_en = readb(S3C2410_RTCALM);
261 alrm_en &= ~S3C2410_RTCALM_ALMEN;
262 writeb(alrm_en, S3C2410_RTCALM);
263 disable_irq_wake(s3c_rtc_alarmno);
264 }
265
266 if (alrm->enabled)
267 enable_irq_wake(s3c_rtc_alarmno);
268 else
269 disable_irq_wake(s3c_rtc_alarmno);
270
271 return 0;
272}
273
274static int s3c_rtc_ioctl(struct device *dev,
275 unsigned int cmd, unsigned long arg)
276{
277 unsigned int ret = -ENOIOCTLCMD;
278
279 switch (cmd) {
280 case RTC_AIE_OFF:
281 case RTC_AIE_ON:
282 s3c_rtc_setaie((cmd == RTC_AIE_ON) ? 1 : 0);
283 ret = 0;
284 break;
285
286 case RTC_PIE_OFF:
287 case RTC_PIE_ON:
288 tick_count = 0;
289 s3c_rtc_setpie((cmd == RTC_PIE_ON) ? 1 : 0);
290 ret = 0;
291 break;
292
293 case RTC_IRQP_READ:
294 ret = put_user(s3c_rtc_freq, (unsigned long __user *)arg);
295 break;
296
297 case RTC_IRQP_SET:
298 /* check for power of 2 */
299
300 if ((arg & (arg-1)) != 0 || arg < 1) {
301 ret = -EINVAL;
302 goto exit;
303 }
304
305 pr_debug("s3c2410_rtc: setting frequency %ld\n", arg);
306
307 s3c_rtc_setfreq(arg);
308 ret = 0;
309 break;
310
311 case RTC_UIE_ON:
312 case RTC_UIE_OFF:
313 ret = -EINVAL;
314 }
315
316 exit:
317 return ret;
318}
319
320static int s3c_rtc_proc(struct device *dev, struct seq_file *seq)
321{
322 unsigned int rtcalm = readb(S3C2410_RTCALM);
323 unsigned int ticnt = readb (S3C2410_TICNT);
324
325 seq_printf(seq, "alarm_IRQ\t: %s\n",
326 (rtcalm & S3C2410_RTCALM_ALMEN) ? "yes" : "no" );
327
328 seq_printf(seq, "periodic_IRQ\t: %s\n",
329 (ticnt & S3C2410_TICNT_ENABLE) ? "yes" : "no" );
330
331 seq_printf(seq, "periodic_freq\t: %d\n", s3c_rtc_freq);
332
333 return 0;
334}
335
336static int s3c_rtc_open(struct device *dev)
337{
338 struct platform_device *pdev = to_platform_device(dev);
339 struct rtc_device *rtc_dev = platform_get_drvdata(pdev);
340 int ret;
341
342 ret = request_irq(s3c_rtc_alarmno, s3c_rtc_alarmirq,
343 SA_INTERRUPT, "s3c2410-rtc alarm", rtc_dev);
344
345 if (ret) {
346 dev_err(dev, "IRQ%d error %d\n", s3c_rtc_alarmno, ret);
347 return ret;
348 }
349
350 ret = request_irq(s3c_rtc_tickno, s3c_rtc_tickirq,
351 SA_INTERRUPT, "s3c2410-rtc tick", rtc_dev);
352
353 if (ret) {
354 dev_err(dev, "IRQ%d error %d\n", s3c_rtc_tickno, ret);
355 goto tick_err;
356 }
357
358 return ret;
359
360 tick_err:
361 free_irq(s3c_rtc_alarmno, rtc_dev);
362 return ret;
363}
364
365static void s3c_rtc_release(struct device *dev)
366{
367 struct platform_device *pdev = to_platform_device(dev);
368 struct rtc_device *rtc_dev = platform_get_drvdata(pdev);
369
370 /* do not clear AIE here, it may be needed for wake */
371
372 s3c_rtc_setpie(0);
373 free_irq(s3c_rtc_alarmno, rtc_dev);
374 free_irq(s3c_rtc_tickno, rtc_dev);
375}
376
377static struct rtc_class_ops s3c_rtcops = {
378 .open = s3c_rtc_open,
379 .release = s3c_rtc_release,
380 .ioctl = s3c_rtc_ioctl,
381 .read_time = s3c_rtc_gettime,
382 .set_time = s3c_rtc_settime,
383 .read_alarm = s3c_rtc_getalarm,
384 .set_alarm = s3c_rtc_setalarm,
385 .proc = s3c_rtc_proc,
386};
387
388static void s3c_rtc_enable(struct platform_device *pdev, int en)
389{
390 unsigned int tmp;
391
392 if (s3c_rtc_base == NULL)
393 return;
394
395 if (!en) {
396 tmp = readb(S3C2410_RTCCON);
397 writeb(tmp & ~S3C2410_RTCCON_RTCEN, S3C2410_RTCCON);
398
399 tmp = readb(S3C2410_TICNT);
400 writeb(tmp & ~S3C2410_TICNT_ENABLE, S3C2410_TICNT);
401 } else {
402 /* re-enable the device, and check it is ok */
403
404 if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_RTCEN) == 0){
405 dev_info(&pdev->dev, "rtc disabled, re-enabling\n");
406
407 tmp = readb(S3C2410_RTCCON);
408 writeb(tmp | S3C2410_RTCCON_RTCEN , S3C2410_RTCCON);
409 }
410
411 if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CNTSEL)){
412 dev_info(&pdev->dev, "removing RTCCON_CNTSEL\n");
413
414 tmp = readb(S3C2410_RTCCON);
415 writeb(tmp& ~S3C2410_RTCCON_CNTSEL , S3C2410_RTCCON);
416 }
417
418 if ((readb(S3C2410_RTCCON) & S3C2410_RTCCON_CLKRST)){
419 dev_info(&pdev->dev, "removing RTCCON_CLKRST\n");
420
421 tmp = readb(S3C2410_RTCCON);
422 writeb(tmp & ~S3C2410_RTCCON_CLKRST, S3C2410_RTCCON);
423 }
424 }
425}
426
427static int s3c_rtc_remove(struct platform_device *dev)
428{
429 struct rtc_device *rtc = platform_get_drvdata(dev);
430
431 platform_set_drvdata(dev, NULL);
432 rtc_device_unregister(rtc);
433
434 s3c_rtc_setpie(0);
435 s3c_rtc_setaie(0);
436
437 iounmap(s3c_rtc_base);
438 release_resource(s3c_rtc_mem);
439 kfree(s3c_rtc_mem);
440
441 return 0;
442}
443
444static int s3c_rtc_probe(struct platform_device *pdev)
445{
446 struct rtc_device *rtc;
447 struct resource *res;
448 int ret;
449
450 pr_debug("%s: probe=%p\n", __FUNCTION__, pdev);
451
452 /* find the IRQs */
453
454 s3c_rtc_tickno = platform_get_irq(pdev, 1);
455 if (s3c_rtc_tickno < 0) {
456 dev_err(&pdev->dev, "no irq for rtc tick\n");
457 return -ENOENT;
458 }
459
460 s3c_rtc_alarmno = platform_get_irq(pdev, 0);
461 if (s3c_rtc_alarmno < 0) {
462 dev_err(&pdev->dev, "no irq for alarm\n");
463 return -ENOENT;
464 }
465
466 pr_debug("s3c2410_rtc: tick irq %d, alarm irq %d\n",
467 s3c_rtc_tickno, s3c_rtc_alarmno);
468
469 /* get the memory region */
470
471 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
472 if (res == NULL) {
473 dev_err(&pdev->dev, "failed to get memory region resource\n");
474 return -ENOENT;
475 }
476
477 s3c_rtc_mem = request_mem_region(res->start,
478 res->end-res->start+1,
479 pdev->name);
480
481 if (s3c_rtc_mem == NULL) {
482 dev_err(&pdev->dev, "failed to reserve memory region\n");
483 ret = -ENOENT;
484 goto err_nores;
485 }
486
487 s3c_rtc_base = ioremap(res->start, res->end - res->start + 1);
488 if (s3c_rtc_base == NULL) {
489 dev_err(&pdev->dev, "failed ioremap()\n");
490 ret = -EINVAL;
491 goto err_nomap;
492 }
493
494 /* check to see if everything is setup correctly */
495
496 s3c_rtc_enable(pdev, 1);
497
498 pr_debug("s3c2410_rtc: RTCCON=%02x\n", readb(S3C2410_RTCCON));
499
500 s3c_rtc_setfreq(s3c_rtc_freq);
501
502 /* register RTC and exit */
503
504 rtc = rtc_device_register("s3c", &pdev->dev, &s3c_rtcops,
505 THIS_MODULE);
506
507 if (IS_ERR(rtc)) {
508 dev_err(&pdev->dev, "cannot attach rtc\n");
509 ret = PTR_ERR(rtc);
510 goto err_nortc;
511 }
512
513 rtc->max_user_freq = 128;
514
515 platform_set_drvdata(pdev, rtc);
516 return 0;
517
518 err_nortc:
519 s3c_rtc_enable(pdev, 0);
520 iounmap(s3c_rtc_base);
521
522 err_nomap:
523 release_resource(s3c_rtc_mem);
524
525 err_nores:
526 return ret;
527}
528
529#ifdef CONFIG_PM
530
531/* RTC Power management control */
532
533static struct timespec s3c_rtc_delta;
534
535static int ticnt_save;
536
537static int s3c_rtc_suspend(struct platform_device *pdev, pm_message_t state)
538{
539 struct rtc_time tm;
540 struct timespec time;
541
542 time.tv_nsec = 0;
543
544 /* save TICNT for anyone using periodic interrupts */
545
546 ticnt_save = readb(S3C2410_TICNT);
547
548 /* calculate time delta for suspend */
549
550 s3c_rtc_gettime(&pdev->dev, &tm);
551 rtc_tm_to_time(&tm, &time.tv_sec);
552 save_time_delta(&s3c_rtc_delta, &time);
553 s3c_rtc_enable(pdev, 0);
554
555 return 0;
556}
557
558static int s3c_rtc_resume(struct platform_device *pdev)
559{
560 struct rtc_time tm;
561 struct timespec time;
562
563 time.tv_nsec = 0;
564
565 s3c_rtc_enable(pdev, 1);
566 s3c_rtc_gettime(&pdev->dev, &tm);
567 rtc_tm_to_time(&tm, &time.tv_sec);
568 restore_time_delta(&s3c_rtc_delta, &time);
569
570 writeb(ticnt_save, S3C2410_TICNT);
571 return 0;
572}
573#else
574#define s3c_rtc_suspend NULL
575#define s3c_rtc_resume NULL
576#endif
577
578static struct platform_driver s3c2410_rtcdrv = {
579 .probe = s3c_rtc_probe,
580 .remove = s3c_rtc_remove,
581 .suspend = s3c_rtc_suspend,
582 .resume = s3c_rtc_resume,
583 .driver = {
584 .name = "s3c2410-rtc",
585 .owner = THIS_MODULE,
586 },
587};
588
589static char __initdata banner[] = "S3C24XX RTC, (c) 2004,2006 Simtec Electronics\n";
590
591static int __init s3c_rtc_init(void)
592{
593 printk(banner);
594 return platform_driver_register(&s3c2410_rtcdrv);
595}
596
597static void __exit s3c_rtc_exit(void)
598{
599 platform_driver_unregister(&s3c2410_rtcdrv);
600}
601
602module_init(s3c_rtc_init);
603module_exit(s3c_rtc_exit);
604
605MODULE_DESCRIPTION("Samsung S3C RTC Driver");
606MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
607MODULE_LICENSE("GPL");
diff --git a/drivers/rtc/rtc-sa1100.c b/drivers/rtc/rtc-sa1100.c
index 9cd1cb304bb..ee4b61ee67b 100644
--- a/drivers/rtc/rtc-sa1100.c
+++ b/drivers/rtc/rtc-sa1100.c
@@ -157,19 +157,19 @@ static int sa1100_rtc_open(struct device *dev)
157{ 157{
158 int ret; 158 int ret;
159 159
160 ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, SA_INTERRUPT, 160 ret = request_irq(IRQ_RTC1Hz, sa1100_rtc_interrupt, IRQF_DISABLED,
161 "rtc 1Hz", dev); 161 "rtc 1Hz", dev);
162 if (ret) { 162 if (ret) {
163 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTC1Hz); 163 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTC1Hz);
164 goto fail_ui; 164 goto fail_ui;
165 } 165 }
166 ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, SA_INTERRUPT, 166 ret = request_irq(IRQ_RTCAlrm, sa1100_rtc_interrupt, IRQF_DISABLED,
167 "rtc Alrm", dev); 167 "rtc Alrm", dev);
168 if (ret) { 168 if (ret) {
169 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTCAlrm); 169 dev_err(dev, "IRQ %d already in use.\n", IRQ_RTCAlrm);
170 goto fail_ai; 170 goto fail_ai;
171 } 171 }
172 ret = request_irq(IRQ_OST1, timer1_interrupt, SA_INTERRUPT, 172 ret = request_irq(IRQ_OST1, timer1_interrupt, IRQF_DISABLED,
173 "rtc timer", dev); 173 "rtc timer", dev);
174 if (ret) { 174 if (ret) {
175 dev_err(dev, "IRQ %d already in use.\n", IRQ_OST1); 175 dev_err(dev, "IRQ %d already in use.\n", IRQ_OST1);
diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c
index 4b9291dd444..bb6d5ff24fd 100644
--- a/drivers/rtc/rtc-vr41xx.c
+++ b/drivers/rtc/rtc-vr41xx.c
@@ -345,11 +345,11 @@ static int __devinit rtc_probe(struct platform_device *pdev)
345 spin_unlock_irq(&rtc_lock); 345 spin_unlock_irq(&rtc_lock);
346 346
347 irq = ELAPSEDTIME_IRQ; 347 irq = ELAPSEDTIME_IRQ;
348 retval = request_irq(irq, elapsedtime_interrupt, SA_INTERRUPT, 348 retval = request_irq(irq, elapsedtime_interrupt, IRQF_DISABLED,
349 "elapsed_time", pdev); 349 "elapsed_time", pdev);
350 if (retval == 0) { 350 if (retval == 0) {
351 irq = RTCLONG1_IRQ; 351 irq = RTCLONG1_IRQ;
352 retval = request_irq(irq, rtclong1_interrupt, SA_INTERRUPT, 352 retval = request_irq(irq, rtclong1_interrupt, IRQF_DISABLED,
353 "rtclong1", pdev); 353 "rtclong1", pdev);
354 } 354 }
355 355
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 2dc179b14ce..4bf03fb67f8 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kmod.h> 12#include <linux/kmod.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c
index 9e9ae717960..d7295386821 100644
--- a/drivers/s390/block/dasd_devmap.c
+++ b/drivers/s390/block/dasd_devmap.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/ctype.h> 16#include <linux/ctype.h>
18#include <linux/init.h> 17#include <linux/init.h>
19#include <linux/module.h> 18#include <linux/module.h>
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c
index 4002f6c1c1b..23fa0b28917 100644
--- a/drivers/s390/block/dasd_diag.c
+++ b/drivers/s390/block/dasd_diag.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/stddef.h> 11#include <linux/stddef.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 0dfab30e808..2e655f46674 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/stddef.h> 12#include <linux/stddef.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/drivers/s390/block/dasd_erp.c b/drivers/s390/block/dasd_erp.c
index 4108d96f6a5..58a65097922 100644
--- a/drivers/s390/block/dasd_erp.c
+++ b/drivers/s390/block/dasd_erp.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/ctype.h> 12#include <linux/ctype.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
diff --git a/drivers/s390/block/dasd_fba.c b/drivers/s390/block/dasd_fba.c
index bb7755b9b19..808434d3852 100644
--- a/drivers/s390/block/dasd_fba.c
+++ b/drivers/s390/block/dasd_fba.c
@@ -6,7 +6,6 @@
6 * 6 *
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/stddef.h> 9#include <linux/stddef.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <asm/debug.h> 11#include <asm/debug.h>
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c
index 61ffde718a7..12c7d296eaa 100644
--- a/drivers/s390/block/dasd_genhd.c
+++ b/drivers/s390/block/dasd_genhd.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/interrupt.h> 14#include <linux/interrupt.h>
16#include <linux/fs.h> 15#include <linux/fs.h>
17#include <linux/blkpg.h> 16#include <linux/blkpg.h>
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c
index 302bcd0f28b..e97f5316ad2 100644
--- a/drivers/s390/block/dasd_ioctl.c
+++ b/drivers/s390/block/dasd_ioctl.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * i/o controls for the dasd driver. 10 * i/o controls for the dasd driver.
11 */ 11 */
12#include <linux/config.h>
13#include <linux/interrupt.h> 12#include <linux/interrupt.h>
14#include <linux/major.h> 13#include <linux/major.h>
15#include <linux/fs.h> 14#include <linux/fs.h>
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c
index ad23aede356..bfa010f6dab 100644
--- a/drivers/s390/block/dasd_proc.c
+++ b/drivers/s390/block/dasd_proc.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/ctype.h> 14#include <linux/ctype.h>
16#include <linux/seq_file.h> 15#include <linux/seq_file.h>
17#include <linux/vmalloc.h> 16#include <linux/vmalloc.h>
diff --git a/drivers/s390/char/con3215.c b/drivers/s390/char/con3215.c
index 606f6ad285a..f25c6d116f6 100644
--- a/drivers/s390/char/con3215.c
+++ b/drivers/s390/char/con3215.c
@@ -11,7 +11,6 @@
11 * Dan Morrison, IBM Corporation (dmorriso@cse.buffalo.edu) 11 * Dan Morrison, IBM Corporation (dmorriso@cse.buffalo.edu)
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/kdev_t.h> 16#include <linux/kdev_t.h>
diff --git a/drivers/s390/char/con3270.c b/drivers/s390/char/con3270.c
index ef607a1de55..7566be89068 100644
--- a/drivers/s390/char/con3270.c
+++ b/drivers/s390/char/con3270.c
@@ -8,7 +8,6 @@
8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation 8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/bootmem.h> 11#include <linux/bootmem.h>
13#include <linux/console.h> 12#include <linux/console.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/s390/char/ctrlchar.c b/drivers/s390/char/ctrlchar.c
index be463242cf0..0ea6f36a252 100644
--- a/drivers/s390/char/ctrlchar.c
+++ b/drivers/s390/char/ctrlchar.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/stddef.h> 10#include <linux/stddef.h>
12#include <asm/errno.h> 11#include <asm/errno.h>
13#include <linux/sysrq.h> 12#include <linux/sysrq.h>
diff --git a/drivers/s390/char/fs3270.c b/drivers/s390/char/fs3270.c
index a6415377bc7..6099c14de42 100644
--- a/drivers/s390/char/fs3270.c
+++ b/drivers/s390/char/fs3270.c
@@ -8,7 +8,6 @@
8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation 8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/bootmem.h> 11#include <linux/bootmem.h>
13#include <linux/console.h> 12#include <linux/console.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/s390/char/keyboard.c b/drivers/s390/char/keyboard.c
index d4d2ff0a9da..547ef906ae2 100644
--- a/drivers/s390/char/keyboard.c
+++ b/drivers/s390/char/keyboard.c
@@ -7,7 +7,6 @@
7 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com), 7 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/sysrq.h> 12#include <linux/sysrq.h>
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c
index 3c1314b7391..e95b56f810d 100644
--- a/drivers/s390/char/raw3270.c
+++ b/drivers/s390/char/raw3270.c
@@ -8,7 +8,6 @@
8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation 8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/bootmem.h> 11#include <linux/bootmem.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/err.h> 13#include <linux/err.h>
diff --git a/drivers/s390/char/sclp_con.c b/drivers/s390/char/sclp_con.c
index 10ef22f1354..86864f64171 100644
--- a/drivers/s390/char/sclp_con.c
+++ b/drivers/s390/char/sclp_con.c
@@ -8,7 +8,6 @@
8 * Martin Schwidefsky <schwidefsky@de.ibm.com> 8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kmod.h> 11#include <linux/kmod.h>
13#include <linux/console.h> 12#include <linux/console.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/s390/char/sclp_cpi.c b/drivers/s390/char/sclp_cpi.c
index 80f7f31310e..732dfbdb85c 100644
--- a/drivers/s390/char/sclp_cpi.c
+++ b/drivers/s390/char/sclp_cpi.c
@@ -5,7 +5,6 @@
5 * SCLP Control-Program Identification. 5 * SCLP Control-Program Identification.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/version.h> 8#include <linux/version.h>
10#include <linux/kmod.h> 9#include <linux/kmod.h>
11#include <linux/module.h> 10#include <linux/module.h>
diff --git a/drivers/s390/char/sclp_quiesce.c b/drivers/s390/char/sclp_quiesce.c
index a4c53c172db..32004aae95c 100644
--- a/drivers/s390/char/sclp_quiesce.c
+++ b/drivers/s390/char/sclp_quiesce.c
@@ -7,7 +7,6 @@
7 * Peter Oberparleiter <peter.oberparleiter@de.ibm.com> 7 * Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/cpumask.h> 12#include <linux/cpumask.h>
diff --git a/drivers/s390/char/sclp_rw.c b/drivers/s390/char/sclp_rw.c
index 91e93c78f57..0c92d3909cc 100644
--- a/drivers/s390/char/sclp_rw.c
+++ b/drivers/s390/char/sclp_rw.c
@@ -8,7 +8,6 @@
8 * Martin Schwidefsky <schwidefsky@de.ibm.com> 8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kmod.h> 11#include <linux/kmod.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/err.h> 13#include <linux/err.h>
diff --git a/drivers/s390/char/sclp_tty.c b/drivers/s390/char/sclp_tty.c
index 6cbf067f1a8..f6cf9023039 100644
--- a/drivers/s390/char/sclp_tty.c
+++ b/drivers/s390/char/sclp_tty.c
@@ -8,7 +8,6 @@
8 * Martin Schwidefsky <schwidefsky@de.ibm.com> 8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kmod.h> 12#include <linux/kmod.h>
14#include <linux/tty.h> 13#include <linux/tty.h>
diff --git a/drivers/s390/char/sclp_vt220.c b/drivers/s390/char/sclp_vt220.c
index 9e02625c82c..54fba6f1718 100644
--- a/drivers/s390/char/sclp_vt220.c
+++ b/drivers/s390/char/sclp_vt220.c
@@ -7,7 +7,6 @@
7 * Author(s): Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com> 7 * Author(s): Peter Oberparleiter <Peter.Oberparleiter@de.ibm.com>
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/spinlock.h> 11#include <linux/spinlock.h>
13#include <linux/list.h> 12#include <linux/list.h>
diff --git a/drivers/s390/char/tape.h b/drivers/s390/char/tape.h
index cd51ace8b61..1f4c89967be 100644
--- a/drivers/s390/char/tape.h
+++ b/drivers/s390/char/tape.h
@@ -16,7 +16,6 @@
16#include <asm/ccwdev.h> 16#include <asm/ccwdev.h>
17#include <asm/debug.h> 17#include <asm/debug.h>
18#include <asm/idals.h> 18#include <asm/idals.h>
19#include <linux/config.h>
20#include <linux/blkdev.h> 19#include <linux/blkdev.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/module.h> 21#include <linux/module.h>
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c
index d4f2da73807..48b4d30a725 100644
--- a/drivers/s390/char/tape_34xx.c
+++ b/drivers/s390/char/tape_34xx.c
@@ -8,7 +8,6 @@
8 * Martin Schwidefsky <schwidefsky@de.ibm.com> 8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/bio.h> 13#include <linux/bio.h>
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c
index d71ef1adea5..928cbefc49d 100644
--- a/drivers/s390/char/tape_3590.c
+++ b/drivers/s390/char/tape_3590.c
@@ -8,7 +8,6 @@
8 * Martin Schwidefsky <schwidefsky@de.ibm.com> 8 * Martin Schwidefsky <schwidefsky@de.ibm.com>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/bio.h> 13#include <linux/bio.h>
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index b70d9269024..3225fcd1dcb 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/fs.h> 13#include <linux/fs.h>
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/blkdev.h> 15#include <linux/blkdev.h>
17#include <linux/interrupt.h> 16#include <linux/interrupt.h>
diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c
index 5ce7ca38ace..97f75237bed 100644
--- a/drivers/s390/char/tape_char.c
+++ b/drivers/s390/char/tape_char.c
@@ -10,7 +10,6 @@
10 * Martin Schwidefsky <schwidefsky@de.ibm.com> 10 * Martin Schwidefsky <schwidefsky@de.ibm.com>
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/proc_fs.h> 15#include <linux/proc_fs.h>
diff --git a/drivers/s390/char/tape_core.c b/drivers/s390/char/tape_core.c
index e6e4086d322..122b4d8965c 100644
--- a/drivers/s390/char/tape_core.c
+++ b/drivers/s390/char/tape_core.c
@@ -11,7 +11,6 @@
11 * Stefan Bader <shbader@de.ibm.com> 11 * Stefan Bader <shbader@de.ibm.com>
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/init.h> // for kernel parameters 15#include <linux/init.h> // for kernel parameters
17#include <linux/kmod.h> // for requesting modules 16#include <linux/kmod.h> // for requesting modules
diff --git a/drivers/s390/char/tape_proc.c b/drivers/s390/char/tape_proc.c
index 5fec0a10cc3..655d375ab22 100644
--- a/drivers/s390/char/tape_proc.c
+++ b/drivers/s390/char/tape_proc.c
@@ -11,7 +11,6 @@
11 * PROCFS Functions 11 * PROCFS Functions
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/vmalloc.h> 15#include <linux/vmalloc.h>
17#include <linux/seq_file.h> 16#include <linux/seq_file.h>
diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c
index 99cf881f41d..7a76ec413a3 100644
--- a/drivers/s390/char/tape_std.c
+++ b/drivers/s390/char/tape_std.c
@@ -11,7 +11,6 @@
11 * Stefan Bader <shbader@de.ibm.com> 11 * Stefan Bader <shbader@de.ibm.com>
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/bio.h> 16#include <linux/bio.h>
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c
index 7d26a3e4cb8..f496f236b9c 100644
--- a/drivers/s390/char/tty3270.c
+++ b/drivers/s390/char/tty3270.c
@@ -8,7 +8,6 @@
8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation 8 * -- Copyright (C) 2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/kdev_t.h> 13#include <linux/kdev_t.h>
diff --git a/drivers/s390/cio/blacklist.c b/drivers/s390/cio/blacklist.c
index 15b895496a4..12c2d6b746e 100644
--- a/drivers/s390/cio/blacklist.c
+++ b/drivers/s390/cio/blacklist.c
@@ -9,7 +9,6 @@
9 * Arnd Bergmann (arndb@de.ibm.com) 9 * Arnd Bergmann (arndb@de.ibm.com)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/vmalloc.h> 13#include <linux/vmalloc.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index b00f3ed051a..a01f3bba4a7 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/config.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/device.h> 15#include <linux/device.h>
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c
index 5b20d8c9c02..a3423267467 100644
--- a/drivers/s390/cio/cio.c
+++ b/drivers/s390/cio/cio.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/slab.h> 15#include <linux/slab.h>
17#include <linux/device.h> 16#include <linux/device.h>
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index eafde43e841..67f0de6aed3 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -8,7 +8,6 @@
8 * Cornelia Huck (cornelia.huck@de.ibm.com) 8 * Cornelia Huck (cornelia.huck@de.ibm.com)
9 * Martin Schwidefsky (schwidefsky@de.ibm.com) 9 * Martin Schwidefsky (schwidefsky@de.ibm.com)
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/spinlock.h> 13#include <linux/spinlock.h>
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index 7d0dd72635e..cb1af0b6f03 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/jiffies.h> 13#include <linux/jiffies.h>
15#include <linux/string.h> 14#include <linux/string.h>
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c
index e60b2d8103b..438db483035 100644
--- a/drivers/s390/cio/device_id.c
+++ b/drivers/s390/cio/device_id.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/config.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
16#include <asm/ccwdev.h> 15#include <asm/ccwdev.h>
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c
index b266ad8e14f..a60124264be 100644
--- a/drivers/s390/cio/device_ops.c
+++ b/drivers/s390/cio/device_ops.c
@@ -6,7 +6,6 @@
6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com) 6 * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com)
7 * Cornelia Huck (cornelia.huck@de.ibm.com) 7 * Cornelia Huck (cornelia.huck@de.ibm.com)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
diff --git a/drivers/s390/cio/device_pgid.c b/drivers/s390/cio/device_pgid.c
index 85b1020a1fc..54cb64ed078 100644
--- a/drivers/s390/cio/device_pgid.c
+++ b/drivers/s390/cio/device_pgid.c
@@ -9,7 +9,6 @@
9 * Path Group ID functions. 9 * Path Group ID functions.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
diff --git a/drivers/s390/cio/device_status.c b/drivers/s390/cio/device_status.c
index 6c762b43f92..14bef2c179b 100644
--- a/drivers/s390/cio/device_status.c
+++ b/drivers/s390/cio/device_status.c
@@ -9,7 +9,6 @@
9 * Status accumulation and basic sense functions. 9 * Status accumulation and basic sense functions.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15 14
diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index 96f519281d9..b70039af70d 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -30,7 +30,6 @@
30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 30 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/init.h> 34#include <linux/init.h>
36 35
diff --git a/drivers/s390/net/fsm.c b/drivers/s390/net/fsm.c
index 7145e2134cf..2c1db8036b7 100644
--- a/drivers/s390/net/fsm.c
+++ b/drivers/s390/net/fsm.c
@@ -4,7 +4,6 @@
4 */ 4 */
5 5
6#include "fsm.h" 6#include "fsm.h"
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/timer.h> 8#include <linux/timer.h>
10 9
diff --git a/drivers/s390/net/iucv.c b/drivers/s390/net/iucv.c
index e0c7deb9883..189a4927543 100644
--- a/drivers/s390/net/iucv.c
+++ b/drivers/s390/net/iucv.c
@@ -33,7 +33,6 @@
33 33
34#include <linux/module.h> 34#include <linux/module.h>
35#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
36#include <linux/config.h>
37 36
38#include <linux/spinlock.h> 37#include <linux/spinlock.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c
index 38aad832145..8491598f914 100644
--- a/drivers/s390/net/qeth_eddp.c
+++ b/drivers/s390/net/qeth_eddp.c
@@ -8,7 +8,6 @@
8 * Author(s): Thomas Spatzier <tspat@de.ibm.com> 8 * Author(s): Thomas Spatzier <tspat@de.ibm.com>
9 * 9 *
10 */ 10 */
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/ip.h> 12#include <linux/ip.h>
14#include <linux/inetdevice.h> 13#include <linux/inetdevice.h>
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c
index 56009d76832..36733b9823c 100644
--- a/drivers/s390/net/qeth_main.c
+++ b/drivers/s390/net/qeth_main.c
@@ -27,7 +27,6 @@
27 */ 27 */
28 28
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/moduleparam.h> 31#include <linux/moduleparam.h>
33#include <linux/string.h> 32#include <linux/string.h>
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c
index 8dc75002acb..432136f96e6 100644
--- a/drivers/s390/s390mach.c
+++ b/drivers/s390/s390mach.c
@@ -8,7 +8,6 @@
8 * Martin Schwidefsky (schwidefsky@de.ibm.com) 8 * Martin Schwidefsky (schwidefsky@de.ibm.com)
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
diff --git a/drivers/s390/sysinfo.c b/drivers/s390/sysinfo.c
index 66da840c931..d1c1e75bfd6 100644
--- a/drivers/s390/sysinfo.c
+++ b/drivers/s390/sysinfo.c
@@ -5,7 +5,6 @@
5 * Author(s): Ulrich Weigand (Ulrich.Weigand@de.ibm.com) 5 * Author(s): Ulrich Weigand (Ulrich.Weigand@de.ibm.com)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/proc_fs.h> 10#include <linux/proc_fs.h>
diff --git a/drivers/sbus/char/aurora.c b/drivers/sbus/char/aurora.c
index 015db40ad8a..4fdb2c93221 100644
--- a/drivers/sbus/char/aurora.c
+++ b/drivers/sbus/char/aurora.c
@@ -337,19 +337,19 @@ static int aurora_probe(void)
337 printk("intr pri %d\n", grrr); 337 printk("intr pri %d\n", grrr);
338#endif 338#endif
339 if ((bp->irq=irqs[bn]) && valid_irq(bp->irq) && 339 if ((bp->irq=irqs[bn]) && valid_irq(bp->irq) &&
340 !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { 340 !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) {
341 free_irq(bp->irq|0x30, bp); 341 free_irq(bp->irq|0x30, bp);
342 } else 342 } else
343 if ((bp->irq=prom_getint(sdev->prom_node, "bintr")) && valid_irq(bp->irq) && 343 if ((bp->irq=prom_getint(sdev->prom_node, "bintr")) && valid_irq(bp->irq) &&
344 !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { 344 !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) {
345 free_irq(bp->irq|0x30, bp); 345 free_irq(bp->irq|0x30, bp);
346 } else 346 } else
347 if ((bp->irq=prom_getint(sdev->prom_node, "intr")) && valid_irq(bp->irq) && 347 if ((bp->irq=prom_getint(sdev->prom_node, "intr")) && valid_irq(bp->irq) &&
348 !request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { 348 !request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) {
349 free_irq(bp->irq|0x30, bp); 349 free_irq(bp->irq|0x30, bp);
350 } else 350 } else
351 for(grrr=0;grrr<TYPE_1_IRQS;grrr++) { 351 for(grrr=0;grrr<TYPE_1_IRQS;grrr++) {
352 if ((bp->irq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, "sio16", bp)) { 352 if ((bp->irq=type_1_irq[grrr])&&!request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED, "sio16", bp)) {
353 free_irq(bp->irq|0x30, bp); 353 free_irq(bp->irq|0x30, bp);
354 break; 354 break;
355 } else { 355 } else {
@@ -909,14 +909,14 @@ static int aurora_setup_board(struct Aurora_board * bp)
909#ifdef AURORA_ALLIRQ 909#ifdef AURORA_ALLIRQ
910 int i; 910 int i;
911 for (i = 0; i < AURORA_ALLIRQ; i++) { 911 for (i = 0; i < AURORA_ALLIRQ; i++) {
912 error = request_irq(allirq[i]|0x30, aurora_interrupt, SA_SHIRQ, 912 error = request_irq(allirq[i]|0x30, aurora_interrupt, IRQF_SHARED,
913 "sio16", bp); 913 "sio16", bp);
914 if (error) 914 if (error)
915 printk(KERN_ERR "IRQ%d request error %d\n", 915 printk(KERN_ERR "IRQ%d request error %d\n",
916 allirq[i], error); 916 allirq[i], error);
917 } 917 }
918#else 918#else
919 error = request_irq(bp->irq|0x30, aurora_interrupt, SA_SHIRQ, 919 error = request_irq(bp->irq|0x30, aurora_interrupt, IRQF_SHARED,
920 "sio16", bp); 920 "sio16", bp);
921 if (error) { 921 if (error) {
922 printk(KERN_ERR "IRQ request error %d\n", error); 922 printk(KERN_ERR "IRQ request error %d\n", error);
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 73634371393..7186235594f 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -377,7 +377,7 @@ static int __init attach_one_i2c(struct linux_ebus_device *edev, int index)
377 bp->waiting = 0; 377 bp->waiting = 0;
378 init_waitqueue_head(&bp->wq); 378 init_waitqueue_head(&bp->wq);
379 if (request_irq(edev->irqs[0], bbc_i2c_interrupt, 379 if (request_irq(edev->irqs[0], bbc_i2c_interrupt,
380 SA_SHIRQ, "bbc_i2c", bp)) 380 IRQF_SHARED, "bbc_i2c", bp))
381 goto fail; 381 goto fail;
382 382
383 bp->index = index; 383 bp->index = index;
diff --git a/drivers/sbus/char/cpwatchdog.c b/drivers/sbus/char/cpwatchdog.c
index 21737b7e86a..836a58bb030 100644
--- a/drivers/sbus/char/cpwatchdog.c
+++ b/drivers/sbus/char/cpwatchdog.c
@@ -301,7 +301,7 @@ static int wd_open(struct inode *inode, struct file *f)
301 { 301 {
302 if (request_irq(wd_dev.irq, 302 if (request_irq(wd_dev.irq,
303 &wd_interrupt, 303 &wd_interrupt,
304 SA_SHIRQ, 304 IRQF_SHARED,
305 WD_OBPNAME, 305 WD_OBPNAME,
306 (void *)wd_dev.regs)) { 306 (void *)wd_dev.regs)) {
307 printk("%s: Cannot register IRQ %d\n", 307 printk("%s: Cannot register IRQ %d\n",
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index cf97e9efe9b..063e676a3ac 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -22,7 +22,6 @@
22#define __KERNEL_SYSCALLS__ 22#define __KERNEL_SYSCALLS__
23static int errno; 23static int errno;
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
28#include <linux/kthread.h> 27#include <linux/kthread.h>
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 31b8a5f6116..fa2418f7ad3 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c
index d7e4bb41bd7..293bb2fdb1d 100644
--- a/drivers/sbus/char/openprom.c
+++ b/drivers/sbus/char/openprom.c
@@ -29,7 +29,6 @@
29 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 29 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/sched.h> 34#include <linux/sched.h>
diff --git a/drivers/sbus/dvma.c b/drivers/sbus/dvma.c
index 378a1d68024..57e1526746a 100644
--- a/drivers/sbus/dvma.c
+++ b/drivers/sbus/dvma.c
@@ -3,7 +3,6 @@
3 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) 3 * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu)
4 */ 4 */
5 5
6#include <linux/config.h>
7#include <linux/string.h> 6#include <linux/string.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/slab.h> 8#include <linux/slab.h>
diff --git a/drivers/sbus/sbus.c b/drivers/sbus/sbus.c
index 387a6aa8c02..16b59773c0b 100644
--- a/drivers/sbus/sbus.c
+++ b/drivers/sbus/sbus.c
@@ -5,7 +5,6 @@
5 5
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/slab.h> 7#include <linux/slab.h>
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/pci.h> 9#include <linux/pci.h>
11 10
diff --git a/drivers/scsi/3w-9xxx.c b/drivers/scsi/3w-9xxx.c
index b003baf8d40..5a9475e56d0 100644
--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -2122,7 +2122,7 @@ static int __devinit twa_probe(struct pci_dev *pdev, const struct pci_device_id
2122 TW_PARAM_PORTCOUNT, TW_PARAM_PORTCOUNT_LENGTH))); 2122 TW_PARAM_PORTCOUNT, TW_PARAM_PORTCOUNT_LENGTH)));
2123 2123
2124 /* Now setup the interrupt handler */ 2124 /* Now setup the interrupt handler */
2125 retval = request_irq(pdev->irq, twa_interrupt, SA_SHIRQ, "3w-9xxx", tw_dev); 2125 retval = request_irq(pdev->irq, twa_interrupt, IRQF_SHARED, "3w-9xxx", tw_dev);
2126 if (retval) { 2126 if (retval) {
2127 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x30, "Error requesting IRQ"); 2127 TW_PRINTK(tw_dev->host, TW_DRIVER, 0x30, "Error requesting IRQ");
2128 goto out_remove_host; 2128 goto out_remove_host;
diff --git a/drivers/scsi/3w-xxxx.c b/drivers/scsi/3w-xxxx.c
index 17dbd4ac869..f3a5f422a8e 100644
--- a/drivers/scsi/3w-xxxx.c
+++ b/drivers/scsi/3w-xxxx.c
@@ -2397,7 +2397,7 @@ static int __devinit tw_probe(struct pci_dev *pdev, const struct pci_device_id *
2397 printk(KERN_WARNING "3w-xxxx: scsi%d: Found a 3ware Storage Controller at 0x%x, IRQ: %d.\n", host->host_no, tw_dev->base_addr, pdev->irq); 2397 printk(KERN_WARNING "3w-xxxx: scsi%d: Found a 3ware Storage Controller at 0x%x, IRQ: %d.\n", host->host_no, tw_dev->base_addr, pdev->irq);
2398 2398
2399 /* Now setup the interrupt handler */ 2399 /* Now setup the interrupt handler */
2400 retval = request_irq(pdev->irq, tw_interrupt, SA_SHIRQ, "3w-xxxx", tw_dev); 2400 retval = request_irq(pdev->irq, tw_interrupt, IRQF_SHARED, "3w-xxxx", tw_dev);
2401 if (retval) { 2401 if (retval) {
2402 printk(KERN_WARNING "3w-xxxx: Error requesting IRQ."); 2402 printk(KERN_WARNING "3w-xxxx: Error requesting IRQ.");
2403 goto out_remove_host; 2403 goto out_remove_host;
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 3c683dc2354..eb7a6a4ded7 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -114,7 +114,6 @@
114 * */ 114 * */
115#define NCR_700_VERSION "2.8" 115#define NCR_700_VERSION "2.8"
116 116
117#include <linux/config.h>
118#include <linux/kernel.h> 117#include <linux/kernel.h>
119#include <linux/types.h> 118#include <linux/types.h>
120#include <linux/string.h> 119#include <linux/string.h>
diff --git a/drivers/scsi/53c7xx.c b/drivers/scsi/53c7xx.c
index 765769a629e..c690c2b89e4 100644
--- a/drivers/scsi/53c7xx.c
+++ b/drivers/scsi/53c7xx.c
@@ -232,7 +232,6 @@
232 232
233#include <linux/module.h> 233#include <linux/module.h>
234 234
235#include <linux/config.h>
236 235
237#include <linux/types.h> 236#include <linux/types.h>
238#include <asm/setup.h> 237#include <asm/setup.h>
@@ -1071,7 +1070,7 @@ NCR53c7x0_init (struct Scsi_Host *host) {
1071 1070
1072 NCR53c7x0_driver_init (host); 1071 NCR53c7x0_driver_init (host);
1073 1072
1074 if (request_irq(host->irq, NCR53c7x0_intr, SA_SHIRQ, "53c7xx", host)) 1073 if (request_irq(host->irq, NCR53c7x0_intr, IRQF_SHARED, "53c7xx", host))
1075 { 1074 {
1076 printk("scsi%d : IRQ%d not free, detaching\n", 1075 printk("scsi%d : IRQ%d not free, detaching\n",
1077 host->host_no, host->irq); 1076 host->host_no, host->irq);
@@ -4233,7 +4232,7 @@ restart:
4233 * Purpose : handle NCR53c7x0 interrupts for all NCR devices sharing 4232 * Purpose : handle NCR53c7x0 interrupts for all NCR devices sharing
4234 * the same IRQ line. 4233 * the same IRQ line.
4235 * 4234 *
4236 * Inputs : Since we're using the SA_INTERRUPT interrupt handler 4235 * Inputs : Since we're using the IRQF_DISABLED interrupt handler
4237 * semantics, irq indicates the interrupt which invoked 4236 * semantics, irq indicates the interrupt which invoked
4238 * this handler. 4237 * this handler.
4239 * 4238 *
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
index bde3d5834ad..16a12a3b7b2 100644
--- a/drivers/scsi/BusLogic.c
+++ b/drivers/scsi/BusLogic.c
@@ -29,7 +29,6 @@
29#define BusLogic_DriverVersion "2.1.16" 29#define BusLogic_DriverVersion "2.1.16"
30#define BusLogic_DriverDate "18 July 2002" 30#define BusLogic_DriverDate "18 July 2002"
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/init.h> 33#include <linux/init.h>
35#include <linux/interrupt.h> 34#include <linux/interrupt.h>
@@ -1845,7 +1844,7 @@ static boolean __init BusLogic_AcquireResources(struct BusLogic_HostAdapter *Hos
1845 /* 1844 /*
1846 Acquire shared access to the IRQ Channel. 1845 Acquire shared access to the IRQ Channel.
1847 */ 1846 */
1848 if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, SA_SHIRQ, HostAdapter->FullModelName, HostAdapter) < 0) { 1847 if (request_irq(HostAdapter->IRQ_Channel, BusLogic_InterruptHandler, IRQF_SHARED, HostAdapter->FullModelName, HostAdapter) < 0) {
1849 BusLogic_Error("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n", HostAdapter, HostAdapter->IRQ_Channel); 1848 BusLogic_Error("UNABLE TO ACQUIRE IRQ CHANNEL %d - DETACHING\n", HostAdapter, HostAdapter->IRQ_Channel);
1850 return false; 1849 return false;
1851 } 1850 }
diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h
index 1aaa6569eda..9792e5af525 100644
--- a/drivers/scsi/BusLogic.h
+++ b/drivers/scsi/BusLogic.h
@@ -28,7 +28,6 @@
28#ifndef _BUSLOGIC_H 28#ifndef _BUSLOGIC_H
29#define _BUSLOGIC_H 29#define _BUSLOGIC_H
30 30
31#include <linux/config.h>
32 31
33#ifndef PACKED 32#ifndef PACKED
34#define PACKED __attribute__((packed)) 33#define PACKED __attribute__((packed))
diff --git a/drivers/scsi/FlashPoint.c b/drivers/scsi/FlashPoint.c
index 8e3d949b711..7c006804958 100644
--- a/drivers/scsi/FlashPoint.c
+++ b/drivers/scsi/FlashPoint.c
@@ -15,7 +15,6 @@
15 15
16*/ 16*/
17 17
18#include <linux/config.h>
19 18
20#ifndef CONFIG_SCSI_OMIT_FLASHPOINT 19#ifndef CONFIG_SCSI_OMIT_FLASHPOINT
21 20
diff --git a/drivers/scsi/NCR5380.c b/drivers/scsi/NCR5380.c
index 75f2f7ae2a8..616810ad17d 100644
--- a/drivers/scsi/NCR5380.c
+++ b/drivers/scsi/NCR5380.c
@@ -585,7 +585,7 @@ static int __init NCR5380_probe_irq(struct Scsi_Host *instance, int possible)
585 NCR5380_setup(instance); 585 NCR5380_setup(instance);
586 586
587 for (trying_irqs = i = 0, mask = 1; i < 16; ++i, mask <<= 1) 587 for (trying_irqs = i = 0, mask = 1; i < 16; ++i, mask <<= 1)
588 if ((mask & possible) && (request_irq(i, &probe_intr, SA_INTERRUPT, "NCR-probe", NULL) == 0)) 588 if ((mask & possible) && (request_irq(i, &probe_intr, IRQF_DISABLED, "NCR-probe", NULL) == 0))
589 trying_irqs |= mask; 589 trying_irqs |= mask;
590 590
591 timeout = jiffies + (250 * HZ / 1000); 591 timeout = jiffies + (250 * HZ / 1000);
diff --git a/drivers/scsi/NCR53C9x.c b/drivers/scsi/NCR53C9x.c
index c7dd0154d01..8a4659e9410 100644
--- a/drivers/scsi/NCR53C9x.c
+++ b/drivers/scsi/NCR53C9x.c
@@ -23,7 +23,6 @@
23 23
24#include <linux/module.h> 24#include <linux/module.h>
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/delay.h> 27#include <linux/delay.h>
29#include <linux/types.h> 28#include <linux/types.h>
diff --git a/drivers/scsi/NCR53C9x.h b/drivers/scsi/NCR53C9x.h
index 65a9b377a41..481653c977c 100644
--- a/drivers/scsi/NCR53C9x.h
+++ b/drivers/scsi/NCR53C9x.h
@@ -13,7 +13,6 @@
13#ifndef NCR53C9X_H 13#ifndef NCR53C9X_H
14#define NCR53C9X_H 14#define NCR53C9X_H
15 15
16#include <linux/config.h>
17#include <linux/interrupt.h> 16#include <linux/interrupt.h>
18 17
19/* djweis for mac driver */ 18/* djweis for mac driver */
diff --git a/drivers/scsi/NCR_D700.c b/drivers/scsi/NCR_D700.c
index 577e6349977..a06f547e87f 100644
--- a/drivers/scsi/NCR_D700.c
+++ b/drivers/scsi/NCR_D700.c
@@ -320,7 +320,7 @@ NCR_D700_probe(struct device *dev)
320 memset(p, '\0', sizeof(*p)); 320 memset(p, '\0', sizeof(*p));
321 p->dev = dev; 321 p->dev = dev;
322 snprintf(p->name, sizeof(p->name), "D700(%s)", dev->bus_id); 322 snprintf(p->name, sizeof(p->name), "D700(%s)", dev->bus_id);
323 if (request_irq(irq, NCR_D700_intr, SA_SHIRQ, p->name, p)) { 323 if (request_irq(irq, NCR_D700_intr, IRQF_SHARED, p->name, p)) {
324 printk(KERN_ERR "D700: request_irq failed\n"); 324 printk(KERN_ERR "D700: request_irq failed\n");
325 kfree(p); 325 kfree(p);
326 return -EBUSY; 326 return -EBUSY;
diff --git a/drivers/scsi/NCR_Q720.c b/drivers/scsi/NCR_Q720.c
index 9d18ec90510..c39ffbb86e3 100644
--- a/drivers/scsi/NCR_Q720.c
+++ b/drivers/scsi/NCR_Q720.c
@@ -265,7 +265,7 @@ NCR_Q720_probe(struct device *dev)
265 p->irq = irq; 265 p->irq = irq;
266 p->siops = siops; 266 p->siops = siops;
267 267
268 if (request_irq(irq, NCR_Q720_intr, SA_SHIRQ, "NCR_Q720", p)) { 268 if (request_irq(irq, NCR_Q720_intr, IRQF_SHARED, "NCR_Q720", p)) {
269 printk(KERN_ERR "NCR_Q720: request irq %d failed\n", irq); 269 printk(KERN_ERR "NCR_Q720: request irq %d failed\n", irq);
270 goto out_release; 270 goto out_release;
271 } 271 }
diff --git a/drivers/scsi/a100u2w.c b/drivers/scsi/a100u2w.c
index 3dce21c7873..d7e9fab54c6 100644
--- a/drivers/scsi/a100u2w.c
+++ b/drivers/scsi/a100u2w.c
@@ -1120,7 +1120,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
1120 shost->sg_tablesize = TOTAL_SG_ENTRY; 1120 shost->sg_tablesize = TOTAL_SG_ENTRY;
1121 1121
1122 /* Initial orc chip */ 1122 /* Initial orc chip */
1123 error = request_irq(pdev->irq, inia100_intr, SA_SHIRQ, 1123 error = request_irq(pdev->irq, inia100_intr, IRQF_SHARED,
1124 "inia100", shost); 1124 "inia100", shost);
1125 if (error < 0) { 1125 if (error < 0) {
1126 printk(KERN_WARNING "inia100: unable to get irq %d\n", 1126 printk(KERN_WARNING "inia100: unable to get irq %d\n",
diff --git a/drivers/scsi/a2091.c b/drivers/scsi/a2091.c
index 54996eaae97..fddfa2ebcd7 100644
--- a/drivers/scsi/a2091.c
+++ b/drivers/scsi/a2091.c
@@ -208,7 +208,7 @@ int __init a2091_detect(struct scsi_host_template *tpnt)
208 regs.SASR = &(DMA(instance)->SASR); 208 regs.SASR = &(DMA(instance)->SASR);
209 regs.SCMD = &(DMA(instance)->SCMD); 209 regs.SCMD = &(DMA(instance)->SCMD);
210 wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10); 210 wd33c93_init(instance, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
211 request_irq(IRQ_AMIGA_PORTS, a2091_intr, SA_SHIRQ, "A2091 SCSI", 211 request_irq(IRQ_AMIGA_PORTS, a2091_intr, IRQF_SHARED, "A2091 SCSI",
212 instance); 212 instance);
213 DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN; 213 DMA(instance)->CNTR = CNTR_PDMD | CNTR_INTEN;
214 num_a2091++; 214 num_a2091++;
diff --git a/drivers/scsi/a3000.c b/drivers/scsi/a3000.c
index f425d424bf0..ae9ab4b136a 100644
--- a/drivers/scsi/a3000.c
+++ b/drivers/scsi/a3000.c
@@ -190,7 +190,7 @@ int __init a3000_detect(struct scsi_host_template *tpnt)
190 regs.SASR = &(DMA(a3000_host)->SASR); 190 regs.SASR = &(DMA(a3000_host)->SASR);
191 regs.SCMD = &(DMA(a3000_host)->SCMD); 191 regs.SCMD = &(DMA(a3000_host)->SCMD);
192 wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15); 192 wd33c93_init(a3000_host, regs, dma_setup, dma_stop, WD33C93_FS_12_15);
193 if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, SA_SHIRQ, "A3000 SCSI", 193 if (request_irq(IRQ_AMIGA_PORTS, a3000_intr, IRQF_SHARED, "A3000 SCSI",
194 a3000_intr)) 194 a3000_intr))
195 goto fail_irq; 195 goto fail_irq;
196 DMA(a3000_host)->CNTR = CNTR_PDMD | CNTR_INTEN; 196 DMA(a3000_host)->CNTR = CNTR_PDMD | CNTR_INTEN;
diff --git a/drivers/scsi/aacraid/rkt.c b/drivers/scsi/aacraid/rkt.c
index 5b52966bbbf..458ea897fd7 100644
--- a/drivers/scsi/aacraid/rkt.c
+++ b/drivers/scsi/aacraid/rkt.c
@@ -453,7 +453,7 @@ int aac_rkt_init(struct aac_dev *dev)
453 } 453 }
454 msleep(1); 454 msleep(1);
455 } 455 }
456 if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) 456 if (request_irq(dev->scsi_host_ptr->irq, aac_rkt_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev)<0)
457 { 457 {
458 printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); 458 printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance);
459 goto error_iounmap; 459 goto error_iounmap;
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c
index 9dadfb28b3f..035018db69b 100644
--- a/drivers/scsi/aacraid/rx.c
+++ b/drivers/scsi/aacraid/rx.c
@@ -453,7 +453,7 @@ int aac_rx_init(struct aac_dev *dev)
453 } 453 }
454 msleep(1); 454 msleep(1);
455 } 455 }
456 if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev)<0) 456 if (request_irq(dev->scsi_host_ptr->irq, aac_rx_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev)<0)
457 { 457 {
458 printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance); 458 printk(KERN_ERR "%s%d: Interrupt unavailable.\n", name, instance);
459 goto error_iounmap; 459 goto error_iounmap;
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c
index 88d400fccc9..cd586cc8f9b 100644
--- a/drivers/scsi/aacraid/sa.c
+++ b/drivers/scsi/aacraid/sa.c
@@ -327,7 +327,7 @@ int aac_sa_init(struct aac_dev *dev)
327 msleep(1); 327 msleep(1);
328 } 328 }
329 329
330 if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, SA_SHIRQ|SA_INTERRUPT, "aacraid", (void *)dev ) < 0) { 330 if (request_irq(dev->scsi_host_ptr->irq, aac_sa_intr, IRQF_SHARED|IRQF_DISABLED, "aacraid", (void *)dev ) < 0) {
331 printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance); 331 printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", name, instance);
332 goto error_iounmap; 332 goto error_iounmap;
333 } 333 }
diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
index dd9fb3d9100..e32b4ab2f8f 100644
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -371,7 +371,7 @@
371 371
372 1.5 (8/8/96): 372 1.5 (8/8/96):
373 1. Add support for ABP-940U (PCI Ultra) adapter. 373 1. Add support for ABP-940U (PCI Ultra) adapter.
374 2. Add support for IRQ sharing by setting the SA_SHIRQ flag for 374 2. Add support for IRQ sharing by setting the IRQF_SHARED flag for
375 request_irq and supplying a dev_id pointer to both request_irq() 375 request_irq and supplying a dev_id pointer to both request_irq()
376 and free_irq(). 376 and free_irq().
377 3. In AscSearchIOPortAddr11() restore a call to check_region() which 377 3. In AscSearchIOPortAddr11() restore a call to check_region() which
@@ -504,9 +504,9 @@
504 3. For v2.1.93 and newer kernels use CONFIG_PCI and new PCI BIOS 504 3. For v2.1.93 and newer kernels use CONFIG_PCI and new PCI BIOS
505 access functions. 505 access functions.
506 4. Update board serial number printing. 506 4. Update board serial number printing.
507 5. Try allocating an IRQ both with and without the SA_INTERRUPT 507 5. Try allocating an IRQ both with and without the IRQF_DISABLED
508 flag set to allow IRQ sharing with drivers that do not set 508 flag set to allow IRQ sharing with drivers that do not set
509 the SA_INTERRUPT flag. Also display a more descriptive error 509 the IRQF_DISABLED flag. Also display a more descriptive error
510 message if request_irq() fails. 510 message if request_irq() fails.
511 6. Update to latest Asc and Adv Libraries. 511 6. Update to latest Asc and Adv Libraries.
512 512
@@ -754,7 +754,6 @@
754 * --- Linux Include Files 754 * --- Linux Include Files
755 */ 755 */
756 756
757#include <linux/config.h>
758#include <linux/module.h> 757#include <linux/module.h>
759 758
760#if defined(CONFIG_X86) && !defined(CONFIG_ISA) 759#if defined(CONFIG_X86) && !defined(CONFIG_ISA)
@@ -5203,19 +5202,19 @@ advansys_detect(struct scsi_host_template *tpnt)
5203 /* Register IRQ Number. */ 5202 /* Register IRQ Number. */
5204 ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq); 5203 ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq);
5205 /* 5204 /*
5206 * If request_irq() fails with the SA_INTERRUPT flag set, 5205 * If request_irq() fails with the IRQF_DISABLED flag set,
5207 * then try again without the SA_INTERRUPT flag set. This 5206 * then try again without the IRQF_DISABLED flag set. This
5208 * allows IRQ sharing to work even with other drivers that 5207 * allows IRQ sharing to work even with other drivers that
5209 * do not set the SA_INTERRUPT flag. 5208 * do not set the IRQF_DISABLED flag.
5210 * 5209 *
5211 * If SA_INTERRUPT is not set, then interrupts are enabled 5210 * If IRQF_DISABLED is not set, then interrupts are enabled
5212 * before the driver interrupt function is called. 5211 * before the driver interrupt function is called.
5213 */ 5212 */
5214 if (((ret = request_irq(shp->irq, advansys_interrupt, 5213 if (((ret = request_irq(shp->irq, advansys_interrupt,
5215 SA_INTERRUPT | (share_irq == TRUE ? SA_SHIRQ : 0), 5214 IRQF_DISABLED | (share_irq == TRUE ? IRQF_SHARED : 0),
5216 "advansys", boardp)) != 0) && 5215 "advansys", boardp)) != 0) &&
5217 ((ret = request_irq(shp->irq, advansys_interrupt, 5216 ((ret = request_irq(shp->irq, advansys_interrupt,
5218 (share_irq == TRUE ? SA_SHIRQ : 0), 5217 (share_irq == TRUE ? IRQF_SHARED : 0),
5219 "advansys", boardp)) != 0)) 5218 "advansys", boardp)) != 0))
5220 { 5219 {
5221 if (ret == -EBUSY) { 5220 if (ret == -EBUSY) {
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c
index de80cdfb5b9..36e63f82d9f 100644
--- a/drivers/scsi/aha152x.c
+++ b/drivers/scsi/aha152x.c
@@ -855,7 +855,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
855 SETPORT(SIMODE0, 0); 855 SETPORT(SIMODE0, 0);
856 SETPORT(SIMODE1, 0); 856 SETPORT(SIMODE1, 0);
857 857
858 if( request_irq(shpnt->irq, swintr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) { 858 if( request_irq(shpnt->irq, swintr, IRQF_DISABLED|IRQF_SHARED, "aha152x", shpnt) ) {
859 printk(KERN_ERR "aha152x%d: irq %d busy.\n", shpnt->host_no, shpnt->irq); 859 printk(KERN_ERR "aha152x%d: irq %d busy.\n", shpnt->host_no, shpnt->irq);
860 goto out_host_put; 860 goto out_host_put;
861 } 861 }
@@ -889,7 +889,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
889 SETPORT(SSTAT0, 0x7f); 889 SETPORT(SSTAT0, 0x7f);
890 SETPORT(SSTAT1, 0xef); 890 SETPORT(SSTAT1, 0xef);
891 891
892 if ( request_irq(shpnt->irq, intr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) ) { 892 if ( request_irq(shpnt->irq, intr, IRQF_DISABLED|IRQF_SHARED, "aha152x", shpnt) ) {
893 printk(KERN_ERR "aha152x%d: failed to reassign irq %d.\n", shpnt->host_no, shpnt->irq); 893 printk(KERN_ERR "aha152x%d: failed to reassign irq %d.\n", shpnt->host_no, shpnt->irq);
894 goto out_host_put; 894 goto out_host_put;
895 } 895 }
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index 86c6bd23459..24f0f546179 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -25,7 +25,6 @@
25 * Added proper detection of the AHA-1640 (MCA version of AHA-1540) 25 * Added proper detection of the AHA-1640 (MCA version of AHA-1540)
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/interrupt.h> 29#include <linux/interrupt.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
index 4b8c6a54392..0e4a7ebe300 100644
--- a/drivers/scsi/aha1740.c
+++ b/drivers/scsi/aha1740.c
@@ -634,7 +634,7 @@ static int aha1740_probe (struct device *dev)
634 } 634 }
635 635
636 DEB(printk("aha1740_probe: enable interrupt channel %d\n",irq_level)); 636 DEB(printk("aha1740_probe: enable interrupt channel %d\n",irq_level));
637 if (request_irq(irq_level,aha1740_intr_handle,irq_type ? 0 : SA_SHIRQ, 637 if (request_irq(irq_level,aha1740_intr_handle,irq_type ? 0 : IRQF_SHARED,
638 "aha1740",shpnt)) { 638 "aha1740",shpnt)) {
639 printk(KERN_ERR "aha1740_probe: Unable to allocate IRQ %d.\n", 639 printk(KERN_ERR "aha1740_probe: Unable to allocate IRQ %d.\n",
640 irq_level); 640 irq_level);
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index f0594677771..15f6cd4279b 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -1371,7 +1371,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1371 probe_ent->port_ops = ahci_port_info[board_idx].port_ops; 1371 probe_ent->port_ops = ahci_port_info[board_idx].port_ops;
1372 1372
1373 probe_ent->irq = pdev->irq; 1373 probe_ent->irq = pdev->irq;
1374 probe_ent->irq_flags = SA_SHIRQ; 1374 probe_ent->irq_flags = IRQF_SHARED;
1375 probe_ent->mmio_base = mmio_base; 1375 probe_ent->mmio_base = mmio_base;
1376 probe_ent->private_data = hpriv; 1376 probe_ent->private_data = hpriv;
1377 1377
diff --git a/drivers/scsi/aic7xxx/aic7770_osm.c b/drivers/scsi/aic7xxx/aic7770_osm.c
index d754b326786..867cbe23579 100644
--- a/drivers/scsi/aic7xxx/aic7770_osm.c
+++ b/drivers/scsi/aic7xxx/aic7770_osm.c
@@ -65,7 +65,7 @@ aic7770_map_int(struct ahc_softc *ahc, u_int irq)
65 65
66 shared = 0; 66 shared = 0;
67 if ((ahc->flags & AHC_EDGE_INTERRUPT) == 0) 67 if ((ahc->flags & AHC_EDGE_INTERRUPT) == 0)
68 shared = SA_SHIRQ; 68 shared = IRQF_SHARED;
69 69
70 error = request_irq(irq, ahc_linux_isr, shared, "aic7xxx", ahc); 70 error = request_irq(irq, ahc_linux_isr, shared, "aic7xxx", ahc);
71 if (error == 0) 71 if (error == 0)
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm.h b/drivers/scsi/aic7xxx/aic79xx_osm.h
index 2b8331649ee..92c6154575e 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm.h
+++ b/drivers/scsi/aic7xxx/aic79xx_osm.h
@@ -42,7 +42,6 @@
42#ifndef _AIC79XX_LINUX_H_ 42#ifndef _AIC79XX_LINUX_H_
43#define _AIC79XX_LINUX_H_ 43#define _AIC79XX_LINUX_H_
44 44
45#include <linux/config.h>
46#include <linux/types.h> 45#include <linux/types.h>
47#include <linux/blkdev.h> 46#include <linux/blkdev.h>
48#include <linux/delay.h> 47#include <linux/delay.h>
diff --git a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
index ebbf7e4ff4c..50a41eda580 100644
--- a/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic79xx_osm_pci.c
@@ -342,7 +342,7 @@ ahd_pci_map_int(struct ahd_softc *ahd)
342 int error; 342 int error;
343 343
344 error = request_irq(ahd->dev_softc->irq, ahd_linux_isr, 344 error = request_irq(ahd->dev_softc->irq, ahd_linux_isr,
345 SA_SHIRQ, "aic79xx", ahd); 345 IRQF_SHARED, "aic79xx", ahd);
346 if (!error) 346 if (!error)
347 ahd->platform_data->irq = ahd->dev_softc->irq; 347 ahd->platform_data->irq = ahd->dev_softc->irq;
348 348
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm.h b/drivers/scsi/aic7xxx/aic7xxx_osm.h
index a20b08c9ff1..d42a71ee076 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm.h
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm.h
@@ -59,7 +59,6 @@
59#ifndef _AIC7XXX_LINUX_H_ 59#ifndef _AIC7XXX_LINUX_H_
60#define _AIC7XXX_LINUX_H_ 60#define _AIC7XXX_LINUX_H_
61 61
62#include <linux/config.h>
63#include <linux/types.h> 62#include <linux/types.h>
64#include <linux/blkdev.h> 63#include <linux/blkdev.h>
65#include <linux/delay.h> 64#include <linux/delay.h>
diff --git a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
index 0c9c2f400bf..7e42f07a27f 100644
--- a/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
+++ b/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
@@ -375,7 +375,7 @@ ahc_pci_map_int(struct ahc_softc *ahc)
375 int error; 375 int error;
376 376
377 error = request_irq(ahc->dev_softc->irq, ahc_linux_isr, 377 error = request_irq(ahc->dev_softc->irq, ahc_linux_isr,
378 SA_SHIRQ, "aic7xxx", ahc); 378 IRQF_SHARED, "aic7xxx", ahc);
379 if (error == 0) 379 if (error == 0)
380 ahc->platform_data->irq = ahc->dev_softc->irq; 380 ahc->platform_data->irq = ahc->dev_softc->irq;
381 381
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c
index 5dba1c63122..3f85b5e978f 100644
--- a/drivers/scsi/aic7xxx_old.c
+++ b/drivers/scsi/aic7xxx_old.c
@@ -8322,11 +8322,11 @@ aic7xxx_register(struct scsi_host_template *template, struct aic7xxx_host *p,
8322 } 8322 }
8323 else 8323 else
8324 { 8324 {
8325 result = (request_irq(p->irq, do_aic7xxx_isr, SA_SHIRQ, 8325 result = (request_irq(p->irq, do_aic7xxx_isr, IRQF_SHARED,
8326 "aic7xxx", p)); 8326 "aic7xxx", p));
8327 if (result < 0) 8327 if (result < 0)
8328 { 8328 {
8329 result = (request_irq(p->irq, do_aic7xxx_isr, SA_INTERRUPT | SA_SHIRQ, 8329 result = (request_irq(p->irq, do_aic7xxx_isr, IRQF_DISABLED | IRQF_SHARED,
8330 "aic7xxx", p)); 8330 "aic7xxx", p));
8331 } 8331 }
8332 } 8332 }
diff --git a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c
index 3bf334931a8..b07e4f04fd0 100644
--- a/drivers/scsi/aic7xxx_old/aic7xxx_proc.c
+++ b/drivers/scsi/aic7xxx_old/aic7xxx_proc.c
@@ -29,7 +29,6 @@
29 * $Id: aic7xxx_proc.c,v 4.1 1997/06/97 08:23:42 deang Exp $ 29 * $Id: aic7xxx_proc.c,v 4.1 1997/06/97 08:23:42 deang Exp $
30 *-M*************************************************************************/ 30 *-M*************************************************************************/
31 31
32#include <linux/config.h>
33 32
34#define BLS (&aic7xxx_buffer[size]) 33#define BLS (&aic7xxx_buffer[size])
35#define HDRB \ 34#define HDRB \
diff --git a/drivers/scsi/amiga7xx.c b/drivers/scsi/amiga7xx.c
index c0844fa32c5..9099d531d5a 100644
--- a/drivers/scsi/amiga7xx.c
+++ b/drivers/scsi/amiga7xx.c
@@ -11,7 +11,6 @@
11#include <linux/mm.h> 11#include <linux/mm.h>
12#include <linux/blkdev.h> 12#include <linux/blkdev.h>
13#include <linux/sched.h> 13#include <linux/sched.h>
14#include <linux/config.h>
15#include <linux/zorro.h> 14#include <linux/zorro.h>
16#include <linux/stat.h> 15#include <linux/stat.h>
17 16
diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c
index dda5a5f79c5..7621e3fa37b 100644
--- a/drivers/scsi/arm/acornscsi.c
+++ b/drivers/scsi/arm/acornscsi.c
@@ -129,7 +129,6 @@
129#define STRx(x) STRINGIFY(x) 129#define STRx(x) STRINGIFY(x)
130#define NO_WRITE_STR STRx(NO_WRITE) 130#define NO_WRITE_STR STRx(NO_WRITE)
131 131
132#include <linux/config.h>
133#include <linux/module.h> 132#include <linux/module.h>
134#include <linux/kernel.h> 133#include <linux/kernel.h>
135#include <linux/sched.h> 134#include <linux/sched.h>
@@ -3031,7 +3030,7 @@ acornscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
3031 if (!request_region(host->io_port, 2048, "acornscsi(ram)")) 3030 if (!request_region(host->io_port, 2048, "acornscsi(ram)"))
3032 goto err_5; 3031 goto err_5;
3033 3032
3034 ret = request_irq(host->irq, acornscsi_intr, SA_INTERRUPT, "acornscsi", ashost); 3033 ret = request_irq(host->irq, acornscsi_intr, IRQF_DISABLED, "acornscsi", ashost);
3035 if (ret) { 3034 if (ret) {
3036 printk(KERN_CRIT "scsi%d: IRQ%d not free: %d\n", 3035 printk(KERN_CRIT "scsi%d: IRQ%d not free: %d\n",
3037 host->host_no, ashost->scsi.irq, ret); 3036 host->host_no, ashost->scsi.irq, ret);
diff --git a/drivers/scsi/arm/cumana_1.c b/drivers/scsi/arm/cumana_1.c
index e6c9491dc5c..3bdfc36481a 100644
--- a/drivers/scsi/arm/cumana_1.c
+++ b/drivers/scsi/arm/cumana_1.c
@@ -277,7 +277,7 @@ cumanascsi1_probe(struct expansion_card *ec, const struct ecard_id *id)
277 ((struct NCR5380_hostdata *)host->hostdata)->ctrl = 0; 277 ((struct NCR5380_hostdata *)host->hostdata)->ctrl = 0;
278 outb(0x00, host->io_port - 577); 278 outb(0x00, host->io_port - 577);
279 279
280 ret = request_irq(host->irq, cumanascsi_intr, SA_INTERRUPT, 280 ret = request_irq(host->irq, cumanascsi_intr, IRQF_DISABLED,
281 "CumanaSCSI-1", host); 281 "CumanaSCSI-1", host);
282 if (ret) { 282 if (ret) {
283 printk("scsi%d: IRQ%d not free: %d\n", 283 printk("scsi%d: IRQ%d not free: %d\n",
diff --git a/drivers/scsi/arm/cumana_2.c b/drivers/scsi/arm/cumana_2.c
index fad2109268b..719af0dcc0e 100644
--- a/drivers/scsi/arm/cumana_2.c
+++ b/drivers/scsi/arm/cumana_2.c
@@ -460,7 +460,7 @@ cumanascsi2_probe(struct expansion_card *ec, const struct ecard_id *id)
460 goto out_free; 460 goto out_free;
461 461
462 ret = request_irq(ec->irq, cumanascsi_2_intr, 462 ret = request_irq(ec->irq, cumanascsi_2_intr,
463 SA_INTERRUPT, "cumanascsi2", info); 463 IRQF_DISABLED, "cumanascsi2", info);
464 if (ret) { 464 if (ret) {
465 printk("scsi%d: IRQ%d not free: %d\n", 465 printk("scsi%d: IRQ%d not free: %d\n",
466 host->host_no, ec->irq, ret); 466 host->host_no, ec->irq, ret);
diff --git a/drivers/scsi/arm/powertec.c b/drivers/scsi/arm/powertec.c
index 3d69f6c45a6..b2c346a4705 100644
--- a/drivers/scsi/arm/powertec.c
+++ b/drivers/scsi/arm/powertec.c
@@ -373,7 +373,7 @@ powertecscsi_probe(struct expansion_card *ec, const struct ecard_id *id)
373 goto out_free; 373 goto out_free;
374 374
375 ret = request_irq(ec->irq, powertecscsi_intr, 375 ret = request_irq(ec->irq, powertecscsi_intr,
376 SA_INTERRUPT, "powertec", info); 376 IRQF_DISABLED, "powertec", info);
377 if (ret) { 377 if (ret) {
378 printk("scsi%d: IRQ%d not free: %d\n", 378 printk("scsi%d: IRQ%d not free: %d\n",
379 host->host_no, ec->irq, ret); 379 host->host_no, ec->irq, ret);
diff --git a/drivers/scsi/atari_NCR5380.c b/drivers/scsi/atari_NCR5380.c
index 57295bcea3e..007a14e5c3f 100644
--- a/drivers/scsi/atari_NCR5380.c
+++ b/drivers/scsi/atari_NCR5380.c
@@ -524,7 +524,6 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
524 } 524 }
525} 525}
526 526
527#include <linux/config.h>
528#include <linux/delay.h> 527#include <linux/delay.h>
529 528
530#if NDEBUG 529#if NDEBUG
diff --git a/drivers/scsi/atari_scsi.c b/drivers/scsi/atari_scsi.c
index f677c5a32a6..e1be4a4387c 100644
--- a/drivers/scsi/atari_scsi.c
+++ b/drivers/scsi/atari_scsi.c
@@ -65,7 +65,6 @@
65 65
66 66
67 67
68#include <linux/config.h>
69#include <linux/module.h> 68#include <linux/module.h>
70 69
71#define NDEBUG (0) 70#define NDEBUG (0)
diff --git a/drivers/scsi/atp870u.c b/drivers/scsi/atp870u.c
index 3ee4d4d3f44..412f8301b75 100644
--- a/drivers/scsi/atp870u.c
+++ b/drivers/scsi/atp870u.c
@@ -2751,7 +2751,7 @@ flash_ok_880:
2751 goto unregister; 2751 goto unregister;
2752 } 2752 }
2753 2753
2754 if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp880i", shpnt)) { 2754 if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp880i", shpnt)) {
2755 printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); 2755 printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq);
2756 goto free_tables; 2756 goto free_tables;
2757 } 2757 }
@@ -2822,7 +2822,7 @@ flash_ok_880:
2822#ifdef ED_DBGP 2822#ifdef ED_DBGP
2823 printk("request_irq() shpnt %p hostdata %p\n", shpnt, p); 2823 printk("request_irq() shpnt %p hostdata %p\n", shpnt, p);
2824#endif 2824#endif
2825 if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870u", shpnt)) { 2825 if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp870u", shpnt)) {
2826 printk(KERN_ERR "Unable to allocate IRQ for Acard controller.\n"); 2826 printk(KERN_ERR "Unable to allocate IRQ for Acard controller.\n");
2827 goto free_tables; 2827 goto free_tables;
2828 } 2828 }
@@ -3004,7 +3004,7 @@ flash_ok_885:
3004 if (atp870u_init_tables(shpnt) < 0) 3004 if (atp870u_init_tables(shpnt) < 0)
3005 goto unregister; 3005 goto unregister;
3006 3006
3007 if (request_irq(pdev->irq, atp870u_intr_handle, SA_SHIRQ, "atp870i", shpnt)) { 3007 if (request_irq(pdev->irq, atp870u_intr_handle, IRQF_SHARED, "atp870i", shpnt)) {
3008 printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq); 3008 printk(KERN_ERR "Unable to allocate IRQ%d for Acard controller.\n", pdev->irq);
3009 goto free_tables; 3009 goto free_tables;
3010 } 3010 }
diff --git a/drivers/scsi/blz1230.c b/drivers/scsi/blz1230.c
index 3867ac2de4c..329a8f297b3 100644
--- a/drivers/scsi/blz1230.c
+++ b/drivers/scsi/blz1230.c
@@ -172,7 +172,7 @@ int __init blz1230_esp_detect(struct scsi_host_template *tpnt)
172 172
173 esp->irq = IRQ_AMIGA_PORTS; 173 esp->irq = IRQ_AMIGA_PORTS;
174 esp->slot = board+REAL_BLZ1230_ESP_ADDR; 174 esp->slot = board+REAL_BLZ1230_ESP_ADDR;
175 if (request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, 175 if (request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED,
176 "Blizzard 1230 SCSI IV", esp->ehost)) 176 "Blizzard 1230 SCSI IV", esp->ehost))
177 goto err_out; 177 goto err_out;
178 178
diff --git a/drivers/scsi/blz2060.c b/drivers/scsi/blz2060.c
index 4ebe69e3275..b6c137b9735 100644
--- a/drivers/scsi/blz2060.c
+++ b/drivers/scsi/blz2060.c
@@ -146,7 +146,7 @@ int __init blz2060_esp_detect(struct scsi_host_template *tpnt)
146 esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); 146 esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer);
147 147
148 esp->irq = IRQ_AMIGA_PORTS; 148 esp->irq = IRQ_AMIGA_PORTS;
149 request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, 149 request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED,
150 "Blizzard 2060 SCSI", esp->ehost); 150 "Blizzard 2060 SCSI", esp->ehost);
151 151
152 /* Figure out our scsi ID on the bus */ 152 /* Figure out our scsi ID on the bus */
diff --git a/drivers/scsi/ch.c b/drivers/scsi/ch.c
index d9abd1645d1..f6caa430776 100644
--- a/drivers/scsi/ch.c
+++ b/drivers/scsi/ch.c
@@ -7,7 +7,6 @@
7 7
8#define VERSION "0.25" 8#define VERSION "0.25"
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/fs.h> 12#include <linux/fs.h>
diff --git a/drivers/scsi/constants.c b/drivers/scsi/constants.c
index d92d5040a9f..dddd2acce76 100644
--- a/drivers/scsi/constants.c
+++ b/drivers/scsi/constants.c
@@ -7,7 +7,6 @@
7 * Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025 7 * Additions for SPC-3 T10/1416-D Rev 21 22 Sept 2004, D. Gilbert 20041025
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/blkdev.h> 10#include <linux/blkdev.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/drivers/scsi/cyberstorm.c b/drivers/scsi/cyberstorm.c
index a4a4fac5c0a..7c7cfb54e89 100644
--- a/drivers/scsi/cyberstorm.c
+++ b/drivers/scsi/cyberstorm.c
@@ -172,7 +172,7 @@ int __init cyber_esp_detect(struct scsi_host_template *tpnt)
172 esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); 172 esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer);
173 173
174 esp->irq = IRQ_AMIGA_PORTS; 174 esp->irq = IRQ_AMIGA_PORTS;
175 request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, 175 request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED,
176 "CyberStorm SCSI", esp->ehost); 176 "CyberStorm SCSI", esp->ehost);
177 /* Figure out our scsi ID on the bus */ 177 /* Figure out our scsi ID on the bus */
178 /* The DMA cond flag contains a hardcoded jumper bit 178 /* The DMA cond flag contains a hardcoded jumper bit
diff --git a/drivers/scsi/cyberstormII.c b/drivers/scsi/cyberstormII.c
index 3a803d73bc5..d88cb9cf091 100644
--- a/drivers/scsi/cyberstormII.c
+++ b/drivers/scsi/cyberstormII.c
@@ -153,7 +153,7 @@ int __init cyberII_esp_detect(struct scsi_host_template *tpnt)
153 esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer); 153 esp->esp_command_dvma = virt_to_bus((void *)cmd_buffer);
154 154
155 esp->irq = IRQ_AMIGA_PORTS; 155 esp->irq = IRQ_AMIGA_PORTS;
156 request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, 156 request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED,
157 "CyberStorm SCSI Mk II", esp->ehost); 157 "CyberStorm SCSI Mk II", esp->ehost);
158 158
159 /* Figure out our scsi ID on the bus */ 159 /* Figure out our scsi ID on the bus */
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
index 58b0748045e..ff2b1796fa3 100644
--- a/drivers/scsi/dc395x.c
+++ b/drivers/scsi/dc395x.c
@@ -4562,7 +4562,7 @@ static int __devinit adapter_init(struct AdapterCtlBlk *acb,
4562 acb->io_port_base = io_port; 4562 acb->io_port_base = io_port;
4563 acb->io_port_len = io_port_len; 4563 acb->io_port_len = io_port_len;
4564 4564
4565 if (request_irq(irq, dc395x_interrupt, SA_SHIRQ, DC395X_NAME, acb)) { 4565 if (request_irq(irq, dc395x_interrupt, IRQF_SHARED, DC395X_NAME, acb)) {
4566 /* release the region we just claimed */ 4566 /* release the region we just claimed */
4567 dprintkl(KERN_INFO, "Failed to register IRQ\n"); 4567 dprintkl(KERN_INFO, "Failed to register IRQ\n");
4568 goto failed; 4568 goto failed;
diff --git a/drivers/scsi/dec_esp.c b/drivers/scsi/dec_esp.c
index a35ee43a48d..eb32062f7e6 100644
--- a/drivers/scsi/dec_esp.c
+++ b/drivers/scsi/dec_esp.c
@@ -202,19 +202,19 @@ static int dec_esp_detect(struct scsi_host_template * tpnt)
202 202
203 esp_initialize(esp); 203 esp_initialize(esp);
204 204
205 if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, 205 if (request_irq(esp->irq, esp_intr, IRQF_DISABLED,
206 "ncr53c94", esp->ehost)) 206 "ncr53c94", esp->ehost))
207 goto err_dealloc; 207 goto err_dealloc;
208 if (request_irq(dec_interrupt[DEC_IRQ_ASC_MERR], 208 if (request_irq(dec_interrupt[DEC_IRQ_ASC_MERR],
209 scsi_dma_merr_int, SA_INTERRUPT, 209 scsi_dma_merr_int, IRQF_DISABLED,
210 "ncr53c94 error", esp->ehost)) 210 "ncr53c94 error", esp->ehost))
211 goto err_free_irq; 211 goto err_free_irq;
212 if (request_irq(dec_interrupt[DEC_IRQ_ASC_ERR], 212 if (request_irq(dec_interrupt[DEC_IRQ_ASC_ERR],
213 scsi_dma_err_int, SA_INTERRUPT, 213 scsi_dma_err_int, IRQF_DISABLED,
214 "ncr53c94 overrun", esp->ehost)) 214 "ncr53c94 overrun", esp->ehost))
215 goto err_free_irq_merr; 215 goto err_free_irq_merr;
216 if (request_irq(dec_interrupt[DEC_IRQ_ASC_DMA], 216 if (request_irq(dec_interrupt[DEC_IRQ_ASC_DMA],
217 scsi_dma_int, SA_INTERRUPT, 217 scsi_dma_int, IRQF_DISABLED,
218 "ncr53c94 dma", esp->ehost)) 218 "ncr53c94 dma", esp->ehost))
219 goto err_free_irq_err; 219 goto err_free_irq_err;
220 220
@@ -276,7 +276,7 @@ static int dec_esp_detect(struct scsi_host_template * tpnt)
276 esp->dma_mmu_release_scsi_sgl = 0; 276 esp->dma_mmu_release_scsi_sgl = 0;
277 esp->dma_advance_sg = 0; 277 esp->dma_advance_sg = 0;
278 278
279 if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, 279 if (request_irq(esp->irq, esp_intr, IRQF_DISABLED,
280 "PMAZ_AA", esp->ehost)) { 280 "PMAZ_AA", esp->ehost)) {
281 esp_deallocate(esp); 281 esp_deallocate(esp);
282 release_tc_card(slot); 282 release_tc_card(slot);
diff --git a/drivers/scsi/dmx3191d.c b/drivers/scsi/dmx3191d.c
index 38e4010eff9..879a2665767 100644
--- a/drivers/scsi/dmx3191d.c
+++ b/drivers/scsi/dmx3191d.c
@@ -94,7 +94,7 @@ static int __devinit dmx3191d_probe_one(struct pci_dev *pdev,
94 94
95 NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E); 95 NCR5380_init(shost, FLAG_NO_PSEUDO_DMA | FLAG_DTC3181E);
96 96
97 if (request_irq(pdev->irq, NCR5380_intr, SA_SHIRQ, 97 if (request_irq(pdev->irq, NCR5380_intr, IRQF_SHARED,
98 DMX3191D_DRIVER_NAME, shost)) { 98 DMX3191D_DRIVER_NAME, shost)) {
99 /* 99 /*
100 * Steam powered scsi controllers run without an IRQ anyway 100 * Steam powered scsi controllers run without an IRQ anyway
diff --git a/drivers/scsi/dpt/dpti_i2o.h b/drivers/scsi/dpt/dpti_i2o.h
index a9585f5235d..d84a281ad94 100644
--- a/drivers/scsi/dpt/dpti_i2o.h
+++ b/drivers/scsi/dpt/dpti_i2o.h
@@ -23,7 +23,6 @@
23 23
24#include <asm/semaphore.h> /* Needed for MUTEX init macros */ 24#include <asm/semaphore.h> /* Needed for MUTEX init macros */
25#include <linux/version.h> 25#include <linux/version.h>
26#include <linux/config.h>
27#include <linux/notifier.h> 26#include <linux/notifier.h>
28#include <asm/atomic.h> 27#include <asm/atomic.h>
29 28
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index b1b704a42ef..e1337339cac 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -1009,7 +1009,7 @@ static int adpt_install_hba(struct scsi_host_template* sht, struct pci_dev* pDev
1009 printk(KERN_INFO" BAR1 %p - size= %x\n",msg_addr_virt,hba_map1_area_size); 1009 printk(KERN_INFO" BAR1 %p - size= %x\n",msg_addr_virt,hba_map1_area_size);
1010 } 1010 }
1011 1011
1012 if (request_irq (pDev->irq, adpt_isr, SA_SHIRQ, pHba->name, pHba)) { 1012 if (request_irq (pDev->irq, adpt_isr, IRQF_SHARED, pHba->name, pHba)) {
1013 printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq); 1013 printk(KERN_ERR"%s: Couldn't register IRQ %d\n", pHba->name, pDev->irq);
1014 adpt_i2o_delete_hba(pHba); 1014 adpt_i2o_delete_hba(pHba);
1015 return -EINVAL; 1015 return -EINVAL;
diff --git a/drivers/scsi/dtc.c b/drivers/scsi/dtc.c
index c5108c8c887..0d5713dfa20 100644
--- a/drivers/scsi/dtc.c
+++ b/drivers/scsi/dtc.c
@@ -280,7 +280,7 @@ found:
280 /* With interrupts enabled, it will sometimes hang when doing heavy 280 /* With interrupts enabled, it will sometimes hang when doing heavy
281 * reads. So better not enable them until I finger it out. */ 281 * reads. So better not enable them until I finger it out. */
282 if (instance->irq != SCSI_IRQ_NONE) 282 if (instance->irq != SCSI_IRQ_NONE)
283 if (request_irq(instance->irq, dtc_intr, SA_INTERRUPT, "dtc", instance)) { 283 if (request_irq(instance->irq, dtc_intr, IRQF_DISABLED, "dtc", instance)) {
284 printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); 284 printk(KERN_ERR "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
285 instance->irq = SCSI_IRQ_NONE; 285 instance->irq = SCSI_IRQ_NONE;
286 } 286 }
diff --git a/drivers/scsi/eata.c b/drivers/scsi/eata.c
index 059eeee4b55..a5ff43b1b26 100644
--- a/drivers/scsi/eata.c
+++ b/drivers/scsi/eata.c
@@ -477,7 +477,6 @@
477 * the driver sets host->wish_block = 1 for all ISA boards. 477 * the driver sets host->wish_block = 1 for all ISA boards.
478 */ 478 */
479 479
480#include <linux/config.h>
481#include <linux/string.h> 480#include <linux/string.h>
482#include <linux/kernel.h> 481#include <linux/kernel.h>
483#include <linux/ioport.h> 482#include <linux/ioport.h>
@@ -1222,7 +1221,7 @@ static int port_detect(unsigned long port_base, unsigned int j,
1222 1221
1223 /* Board detected, allocate its IRQ */ 1222 /* Board detected, allocate its IRQ */
1224 if (request_irq(irq, do_interrupt_handler, 1223 if (request_irq(irq, do_interrupt_handler,
1225 SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0), 1224 IRQF_DISABLED | ((subversion == ESA) ? IRQF_SHARED : 0),
1226 driver_name, (void *)&sha[j])) { 1225 driver_name, (void *)&sha[j])) {
1227 printk("%s: unable to allocate IRQ %u, detaching.\n", name, 1226 printk("%s: unable to allocate IRQ %u, detaching.\n", name,
1228 irq); 1227 irq);
diff --git a/drivers/scsi/eata_pio.c b/drivers/scsi/eata_pio.c
index 23beb48c79c..771b01984cb 100644
--- a/drivers/scsi/eata_pio.c
+++ b/drivers/scsi/eata_pio.c
@@ -46,7 +46,6 @@
46 * last change: 2002/11/02 OS: Linux 2.5.45 * 46 * last change: 2002/11/02 OS: Linux 2.5.45 *
47 ************************************************************/ 47 ************************************************************/
48 48
49#include <linux/config.h>
50#include <linux/module.h> 49#include <linux/module.h>
51#include <linux/kernel.h> 50#include <linux/kernel.h>
52#include <linux/sched.h> 51#include <linux/sched.h>
@@ -732,7 +731,7 @@ static int register_pio_HBA(long base, struct get_conf *gc)
732 return 0; 731 return 0;
733 732
734 if (!reg_IRQ[gc->IRQ]) { /* Interrupt already registered ? */ 733 if (!reg_IRQ[gc->IRQ]) { /* Interrupt already registered ? */
735 if (!request_irq(gc->IRQ, do_eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", sh)) { 734 if (!request_irq(gc->IRQ, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", sh)) {
736 reg_IRQ[gc->IRQ]++; 735 reg_IRQ[gc->IRQ]++;
737 if (!gc->IRQ_TR) 736 if (!gc->IRQ_TR)
738 reg_IRQL[gc->IRQ] = 1; /* IRQ is edge triggered */ 737 reg_IRQL[gc->IRQ] = 1; /* IRQ is edge triggered */
@@ -966,7 +965,7 @@ static int eata_pio_detect(struct scsi_host_template *tpnt)
966 965
967 for (i = 0; i <= MAXIRQ; i++) 966 for (i = 0; i <= MAXIRQ; i++)
968 if (reg_IRQ[i]) 967 if (reg_IRQ[i])
969 request_irq(i, do_eata_pio_int_handler, SA_INTERRUPT, "EATA-PIO", NULL); 968 request_irq(i, do_eata_pio_int_handler, IRQF_DISABLED, "EATA-PIO", NULL);
970 969
971 HBA_ptr = first_HBA; 970 HBA_ptr = first_HBA;
972 971
diff --git a/drivers/scsi/esp.c b/drivers/scsi/esp.c
index ddb512463b4..10573c24a50 100644
--- a/drivers/scsi/esp.c
+++ b/drivers/scsi/esp.c
@@ -12,7 +12,6 @@
12 * 3) Add tagged queueing. 12 * 3) Add tagged queueing.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/delay.h> 16#include <linux/delay.h>
18#include <linux/types.h> 17#include <linux/types.h>
@@ -779,7 +778,7 @@ static int __init esp_register_irq(struct esp *esp)
779 * sanely maintain. 778 * sanely maintain.
780 */ 779 */
781 if (request_irq(esp->ehost->irq, esp_intr, 780 if (request_irq(esp->ehost->irq, esp_intr,
782 SA_SHIRQ, "ESP SCSI", esp)) { 781 IRQF_SHARED, "ESP SCSI", esp)) {
783 printk("esp%d: Cannot acquire irq line\n", 782 printk("esp%d: Cannot acquire irq line\n",
784 esp->esp_id); 783 esp->esp_id);
785 return -1; 784 return -1;
diff --git a/drivers/scsi/fastlane.c b/drivers/scsi/fastlane.c
index 8ae9c406a83..2a1c5c22b9e 100644
--- a/drivers/scsi/fastlane.c
+++ b/drivers/scsi/fastlane.c
@@ -210,7 +210,7 @@ int __init fastlane_esp_detect(struct scsi_host_template *tpnt)
210 210
211 esp->irq = IRQ_AMIGA_PORTS; 211 esp->irq = IRQ_AMIGA_PORTS;
212 esp->slot = board+FASTLANE_ESP_ADDR; 212 esp->slot = board+FASTLANE_ESP_ADDR;
213 if (request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, 213 if (request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED,
214 "Fastlane SCSI", esp->ehost)) { 214 "Fastlane SCSI", esp->ehost)) {
215 printk(KERN_WARNING "Fastlane: Could not get IRQ%d, aborting.\n", IRQ_AMIGA_PORTS); 215 printk(KERN_WARNING "Fastlane: Could not get IRQ%d, aborting.\n", IRQ_AMIGA_PORTS);
216 goto err_unmap; 216 goto err_unmap;
diff --git a/drivers/scsi/fcal.c b/drivers/scsi/fcal.c
index 03416548f20..7f891023aa1 100644
--- a/drivers/scsi/fcal.c
+++ b/drivers/scsi/fcal.c
@@ -13,7 +13,6 @@
13#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
14#include <linux/stat.h> 14#include <linux/stat.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/config.h>
17#ifdef CONFIG_KMOD 16#ifdef CONFIG_KMOD
18#include <linux/kmod.h> 17#include <linux/kmod.h>
19#endif 18#endif
diff --git a/drivers/scsi/fd_mcs.c b/drivers/scsi/fd_mcs.c
index 70a1606bd58..dde3edf35c0 100644
--- a/drivers/scsi/fd_mcs.c
+++ b/drivers/scsi/fd_mcs.c
@@ -400,7 +400,7 @@ static int fd_mcs_detect(struct scsi_host_template * tpnt)
400 mca_set_adapter_name(slot - 1, fd_mcs_adapters[loop].name); 400 mca_set_adapter_name(slot - 1, fd_mcs_adapters[loop].name);
401 401
402 /* check irq/region */ 402 /* check irq/region */
403 if (request_irq(irq, fd_mcs_intr, SA_SHIRQ, "fd_mcs", hosts)) { 403 if (request_irq(irq, fd_mcs_intr, IRQF_SHARED, "fd_mcs", hosts)) {
404 printk(KERN_ERR "fd_mcs: interrupt is not available, skipping...\n"); 404 printk(KERN_ERR "fd_mcs: interrupt is not available, skipping...\n");
405 continue; 405 continue;
406 } 406 }
diff --git a/drivers/scsi/fdomain.c b/drivers/scsi/fdomain.c
index e16013f0ad6..b0694dcce24 100644
--- a/drivers/scsi/fdomain.c
+++ b/drivers/scsi/fdomain.c
@@ -266,7 +266,6 @@
266 266
267 **************************************************************************/ 267 **************************************************************************/
268 268
269#include <linux/config.h>
270#include <linux/module.h> 269#include <linux/module.h>
271#include <linux/init.h> 270#include <linux/init.h>
272#include <linux/interrupt.h> 271#include <linux/interrupt.h>
@@ -950,7 +949,7 @@ struct Scsi_Host *__fdomain_16x0_detect(struct scsi_host_template *tpnt )
950 /* Register the IRQ with the kernel */ 949 /* Register the IRQ with the kernel */
951 950
952 retcode = request_irq( interrupt_level, 951 retcode = request_irq( interrupt_level,
953 do_fdomain_16x0_intr, pdev?SA_SHIRQ:0, "fdomain", shpnt); 952 do_fdomain_16x0_intr, pdev?IRQF_SHARED:0, "fdomain", shpnt);
954 953
955 if (retcode < 0) { 954 if (retcode < 0) {
956 if (retcode == -EINVAL) { 955 if (retcode == -EINVAL) {
diff --git a/drivers/scsi/g_NCR5380.c b/drivers/scsi/g_NCR5380.c
index 5f313c93b7a..67f1100f310 100644
--- a/drivers/scsi/g_NCR5380.c
+++ b/drivers/scsi/g_NCR5380.c
@@ -91,7 +91,6 @@
91#define AUTOPROBE_IRQ 91#define AUTOPROBE_IRQ
92#define AUTOSENSE 92#define AUTOSENSE
93 93
94#include <linux/config.h>
95 94
96#ifdef CONFIG_SCSI_GENERIC_NCR53C400 95#ifdef CONFIG_SCSI_GENERIC_NCR53C400
97#define NCR53C400_PSEUDO_DMA 1 96#define NCR53C400_PSEUDO_DMA 1
@@ -462,7 +461,7 @@ int __init generic_NCR5380_detect(struct scsi_host_template * tpnt)
462 instance->irq = NCR5380_probe_irq(instance, 0xffff); 461 instance->irq = NCR5380_probe_irq(instance, 0xffff);
463 462
464 if (instance->irq != SCSI_IRQ_NONE) 463 if (instance->irq != SCSI_IRQ_NONE)
465 if (request_irq(instance->irq, generic_NCR5380_intr, SA_INTERRUPT, "NCR5380", instance)) { 464 if (request_irq(instance->irq, generic_NCR5380_intr, IRQF_DISABLED, "NCR5380", instance)) {
466 printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq); 465 printk(KERN_WARNING "scsi%d : IRQ%d not free, interrupts disabled\n", instance->host_no, instance->irq);
467 instance->irq = SCSI_IRQ_NONE; 466 instance->irq = SCSI_IRQ_NONE;
468 } 467 }
diff --git a/drivers/scsi/g_NCR5380.h b/drivers/scsi/g_NCR5380.h
index d60a89cb805..df0b3f69ef6 100644
--- a/drivers/scsi/g_NCR5380.h
+++ b/drivers/scsi/g_NCR5380.h
@@ -32,7 +32,6 @@
32#ifndef GENERIC_NCR5380_H 32#ifndef GENERIC_NCR5380_H
33#define GENERIC_NCR5380_H 33#define GENERIC_NCR5380_H
34 34
35#include <linux/config.h>
36 35
37#define GENERIC_NCR5380_PUBLIC_RELEASE 1 36#define GENERIC_NCR5380_PUBLIC_RELEASE 1
38 37
diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c
index 76071a15830..43afd476e60 100644
--- a/drivers/scsi/gdth.c
+++ b/drivers/scsi/gdth.c
@@ -4350,7 +4350,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp)
4350 printk("Configuring GDT-ISA HA at BIOS 0x%05X IRQ %u DRQ %u\n", 4350 printk("Configuring GDT-ISA HA at BIOS 0x%05X IRQ %u DRQ %u\n",
4351 isa_bios,ha->irq,ha->drq); 4351 isa_bios,ha->irq,ha->drq);
4352 4352
4353 if (request_irq(ha->irq,gdth_interrupt,SA_INTERRUPT,"gdth",ha)) { 4353 if (request_irq(ha->irq,gdth_interrupt,IRQF_DISABLED,"gdth",ha)) {
4354 printk("GDT-ISA: Unable to allocate IRQ\n"); 4354 printk("GDT-ISA: Unable to allocate IRQ\n");
4355 scsi_unregister(shp); 4355 scsi_unregister(shp);
4356 continue; 4356 continue;
@@ -4476,7 +4476,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp)
4476 printk("Configuring GDT-EISA HA at Slot %d IRQ %u\n", 4476 printk("Configuring GDT-EISA HA at Slot %d IRQ %u\n",
4477 eisa_slot>>12,ha->irq); 4477 eisa_slot>>12,ha->irq);
4478 4478
4479 if (request_irq(ha->irq,gdth_interrupt,SA_INTERRUPT,"gdth",ha)) { 4479 if (request_irq(ha->irq,gdth_interrupt,IRQF_DISABLED,"gdth",ha)) {
4480 printk("GDT-EISA: Unable to allocate IRQ\n"); 4480 printk("GDT-EISA: Unable to allocate IRQ\n");
4481 scsi_unregister(shp); 4481 scsi_unregister(shp);
4482 continue; 4482 continue;
@@ -4603,7 +4603,7 @@ static int __init gdth_detect(Scsi_Host_Template *shtp)
4603 pcistr[ctr].bus,PCI_SLOT(pcistr[ctr].device_fn),ha->irq); 4603 pcistr[ctr].bus,PCI_SLOT(pcistr[ctr].device_fn),ha->irq);
4604 4604
4605 if (request_irq(ha->irq, gdth_interrupt, 4605 if (request_irq(ha->irq, gdth_interrupt,
4606 SA_INTERRUPT|SA_SHIRQ, "gdth", ha)) 4606 IRQF_DISABLED|IRQF_SHARED, "gdth", ha))
4607 { 4607 {
4608 printk("GDT-PCI: Unable to allocate IRQ\n"); 4608 printk("GDT-PCI: Unable to allocate IRQ\n");
4609 scsi_unregister(shp); 4609 scsi_unregister(shp);
diff --git a/drivers/scsi/gvp11.c b/drivers/scsi/gvp11.c
index 5b154498056..a0d831b1bad 100644
--- a/drivers/scsi/gvp11.c
+++ b/drivers/scsi/gvp11.c
@@ -328,7 +328,7 @@ int __init gvp11_detect(struct scsi_host_template *tpnt)
328 (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10 328 (epc & GVP_SCSICLKMASK) ? WD33C93_FS_8_10
329 : WD33C93_FS_12_15); 329 : WD33C93_FS_12_15);
330 330
331 request_irq(IRQ_AMIGA_PORTS, gvp11_intr, SA_SHIRQ, "GVP11 SCSI", 331 request_irq(IRQ_AMIGA_PORTS, gvp11_intr, IRQF_SHARED, "GVP11 SCSI",
332 instance); 332 instance);
333 DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE; 333 DMA(instance)->CNTR = GVP11_DMAC_INT_ENABLE;
334 num_gvp11++; 334 num_gvp11++;
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index f77808329e7..ab2f8b26790 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -1304,7 +1304,7 @@ static int __devinit hptiop_probe(struct pci_dev *pcidev,
1304 1304
1305 pci_set_drvdata(pcidev, host); 1305 pci_set_drvdata(pcidev, host);
1306 1306
1307 if (request_irq(pcidev->irq, hptiop_intr, SA_SHIRQ, 1307 if (request_irq(pcidev->irq, hptiop_intr, IRQF_SHARED,
1308 driver_name, hba)) { 1308 driver_name, hba)) {
1309 printk(KERN_ERR "scsi%d: request irq %d failed\n", 1309 printk(KERN_ERR "scsi%d: request irq %d failed\n",
1310 hba->host->host_no, pcidev->irq); 1310 hba->host->host_no, pcidev->irq);
diff --git a/drivers/scsi/ibmmca.c b/drivers/scsi/ibmmca.c
index 497f6642b2d..2be1dc5d852 100644
--- a/drivers/scsi/ibmmca.c
+++ b/drivers/scsi/ibmmca.c
@@ -17,7 +17,6 @@
17 17
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/types.h> 22#include <linux/types.h>
@@ -1511,7 +1510,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template)
1511#endif 1510#endif
1512 1511
1513 /* get interrupt request level */ 1512 /* get interrupt request level */
1514 if (request_irq(IM_IRQ, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) { 1513 if (request_irq(IM_IRQ, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) {
1515 printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ); 1514 printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ);
1516 return 0; 1515 return 0;
1517 } else 1516 } else
@@ -1636,7 +1635,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template)
1636 /* IRQ11 is used by SCSI-2 F/W Adapter/A */ 1635 /* IRQ11 is used by SCSI-2 F/W Adapter/A */
1637 printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); 1636 printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n");
1638 /* get interrupt request level */ 1637 /* get interrupt request level */
1639 if (request_irq(IM_IRQ_FW, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) { 1638 if (request_irq(IM_IRQ_FW, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts)) {
1640 printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); 1639 printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW);
1641 } else 1640 } else
1642 IRQ11_registered++; 1641 IRQ11_registered++;
@@ -1697,7 +1696,7 @@ int ibmmca_detect(struct scsi_host_template * scsi_template)
1697 /* IRQ11 is used by SCSI-2 F/W Adapter/A */ 1696 /* IRQ11 is used by SCSI-2 F/W Adapter/A */
1698 printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n"); 1697 printk(KERN_DEBUG "IBM MCA SCSI: SCSI-2 F/W adapter needs IRQ 11.\n");
1699 /* get interrupt request level */ 1698 /* get interrupt request level */
1700 if (request_irq(IM_IRQ_FW, interrupt_handler, SA_SHIRQ, "ibmmcascsi", hosts)) 1699 if (request_irq(IM_IRQ_FW, interrupt_handler, IRQF_SHARED, "ibmmcascsi", hosts))
1701 printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW); 1700 printk(KERN_ERR "IBM MCA SCSI: Unable to get shared IRQ %d.\n", IM_IRQ_FW);
1702 else 1701 else
1703 IRQ11_registered++; 1702 IRQ11_registered++;
diff --git a/drivers/scsi/ide-scsi.c b/drivers/scsi/ide-scsi.c
index 988e6f7af01..f7b5d7372d2 100644
--- a/drivers/scsi/ide-scsi.c
+++ b/drivers/scsi/ide-scsi.c
@@ -34,7 +34,6 @@
34#define IDESCSI_VERSION "0.92" 34#define IDESCSI_VERSION "0.92"
35 35
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/config.h>
38#include <linux/types.h> 37#include <linux/types.h>
39#include <linux/string.h> 38#include <linux/string.h>
40#include <linux/kernel.h> 39#include <linux/kernel.h>
diff --git a/drivers/scsi/imm.c b/drivers/scsi/imm.c
index 681bd18493f..2d95ac9c32c 100644
--- a/drivers/scsi/imm.c
+++ b/drivers/scsi/imm.c
@@ -8,7 +8,6 @@
8 * future expansion to five letters. 8 * future expansion to five letters.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/module.h> 13#include <linux/module.h>
diff --git a/drivers/scsi/in2000.c b/drivers/scsi/in2000.c
index 883bc92b4d9..59a4097f125 100644
--- a/drivers/scsi/in2000.c
+++ b/drivers/scsi/in2000.c
@@ -2015,7 +2015,7 @@ static int __init in2000_detect(struct scsi_host_template * tpnt)
2015 write1_io(0, IO_FIFO_READ); /* start fifo out in read mode */ 2015 write1_io(0, IO_FIFO_READ); /* start fifo out in read mode */
2016 write1_io(0, IO_INTR_MASK); /* allow all ints */ 2016 write1_io(0, IO_INTR_MASK); /* allow all ints */
2017 x = int_tab[(switches & (SW_INT0 | SW_INT1)) >> SW_INT_SHIFT]; 2017 x = int_tab[(switches & (SW_INT0 | SW_INT1)) >> SW_INT_SHIFT];
2018 if (request_irq(x, in2000_intr, SA_INTERRUPT, "in2000", instance)) { 2018 if (request_irq(x, in2000_intr, IRQF_DISABLED, "in2000", instance)) {
2019 printk("in2000_detect: Unable to allocate IRQ.\n"); 2019 printk("in2000_detect: Unable to allocate IRQ.\n");
2020 detect_count--; 2020 detect_count--;
2021 continue; 2021 continue;
diff --git a/drivers/scsi/initio.c b/drivers/scsi/initio.c
index 913ba95f85b..9e10dac61cf 100644
--- a/drivers/scsi/initio.c
+++ b/drivers/scsi/initio.c
@@ -118,7 +118,6 @@
118#include <linux/blkdev.h> 118#include <linux/blkdev.h>
119#include <linux/spinlock.h> 119#include <linux/spinlock.h>
120#include <linux/stat.h> 120#include <linux/stat.h>
121#include <linux/config.h>
122#include <linux/kernel.h> 121#include <linux/kernel.h>
123#include <linux/proc_fs.h> 122#include <linux/proc_fs.h>
124#include <linux/string.h> 123#include <linux/string.h>
@@ -2868,7 +2867,7 @@ static int i91u_detect(struct scsi_host_template * tpnt)
2868 hreg->sg_tablesize = TOTAL_SG_ENTRY; /* Maximun support is 32 */ 2867 hreg->sg_tablesize = TOTAL_SG_ENTRY; /* Maximun support is 32 */
2869 2868
2870 /* Initial tulip chip */ 2869 /* Initial tulip chip */
2871 ok = request_irq(pHCB->HCS_Intr, i91u_intr, SA_INTERRUPT | SA_SHIRQ, "i91u", hreg); 2870 ok = request_irq(pHCB->HCS_Intr, i91u_intr, IRQF_DISABLED | IRQF_SHARED, "i91u", hreg);
2872 if (ok < 0) { 2871 if (ok < 0) {
2873 printk(KERN_WARNING "i91u: unable to request IRQ %d\n\n", pHCB->HCS_Intr); 2872 printk(KERN_WARNING "i91u: unable to request IRQ %d\n\n", pHCB->HCS_Intr);
2874 return 0; 2873 return 0;
diff --git a/drivers/scsi/initio.h b/drivers/scsi/initio.h
index 3efb1184fc3..acb67a4af2c 100644
--- a/drivers/scsi/initio.h
+++ b/drivers/scsi/initio.h
@@ -54,7 +54,6 @@
54 **************************************************************************/ 54 **************************************************************************/
55 55
56 56
57#include <linux/config.h>
58#include <linux/types.h> 57#include <linux/types.h>
59 58
60#define ULONG unsigned long 59#define ULONG unsigned long
@@ -193,13 +192,13 @@ typedef struct {
193#define TSC_SEL_ATN_DIRECT_OUT 0x15 /* Select With ATN Sequence */ 192#define TSC_SEL_ATN_DIRECT_OUT 0x15 /* Select With ATN Sequence */
194#define TSC_SEL_ATN3_DIRECT_IN 0xB5 /* Select With ATN3 Sequence */ 193#define TSC_SEL_ATN3_DIRECT_IN 0xB5 /* Select With ATN3 Sequence */
195#define TSC_SEL_ATN3_DIRECT_OUT 0x35 /* Select With ATN3 Sequence */ 194#define TSC_SEL_ATN3_DIRECT_OUT 0x35 /* Select With ATN3 Sequence */
196#define TSC_XF_DMA_OUT_DIRECT 0x06 /* DMA Xfer Infomation out */ 195#define TSC_XF_DMA_OUT_DIRECT 0x06 /* DMA Xfer Information out */
197#define TSC_XF_DMA_IN_DIRECT 0x86 /* DMA Xfer Infomation in */ 196#define TSC_XF_DMA_IN_DIRECT 0x86 /* DMA Xfer Information in */
198 197
199#define TSC_XF_DMA_OUT 0x43 /* DMA Xfer Infomation out */ 198#define TSC_XF_DMA_OUT 0x43 /* DMA Xfer Information out */
200#define TSC_XF_DMA_IN 0xC3 /* DMA Xfer Infomation in */ 199#define TSC_XF_DMA_IN 0xC3 /* DMA Xfer Information in */
201#define TSC_XF_FIFO_OUT 0x03 /* FIFO Xfer Infomation out */ 200#define TSC_XF_FIFO_OUT 0x03 /* FIFO Xfer Information out */
202#define TSC_XF_FIFO_IN 0x83 /* FIFO Xfer Infomation in */ 201#define TSC_XF_FIFO_IN 0x83 /* FIFO Xfer Information in */
203 202
204#define TSC_MSG_ACCEPT 0x0F /* Message Accept */ 203#define TSC_MSG_ACCEPT 0x0F /* Message Accept */
205 204
diff --git a/drivers/scsi/ipr.c b/drivers/scsi/ipr.c
index 96b65b307dd..01080b3acf5 100644
--- a/drivers/scsi/ipr.c
+++ b/drivers/scsi/ipr.c
@@ -54,7 +54,6 @@
54 * 54 *
55 */ 55 */
56 56
57#include <linux/config.h>
58#include <linux/fs.h> 57#include <linux/fs.h>
59#include <linux/init.h> 58#include <linux/init.h>
60#include <linux/types.h> 59#include <linux/types.h>
@@ -6429,7 +6428,7 @@ static int __devinit ipr_probe_ioa(struct pci_dev *pdev,
6429 ioa_cfg->needs_hard_reset = 1; 6428 ioa_cfg->needs_hard_reset = 1;
6430 6429
6431 ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER); 6430 ipr_mask_and_clear_interrupts(ioa_cfg, ~IPR_PCII_IOA_TRANS_TO_OPER);
6432 rc = request_irq(pdev->irq, ipr_isr, SA_SHIRQ, IPR_NAME, ioa_cfg); 6431 rc = request_irq(pdev->irq, ipr_isr, IRQF_SHARED, IPR_NAME, ioa_cfg);
6433 6432
6434 if (rc) { 6433 if (rc) {
6435 dev_err(&pdev->dev, "Couldn't register IRQ %d! rc=%d\n", 6434 dev_err(&pdev->dev, "Couldn't register IRQ %d! rc=%d\n",
diff --git a/drivers/scsi/ips.c b/drivers/scsi/ips.c
index 78f2ff736c3..3c639286ec1 100644
--- a/drivers/scsi/ips.c
+++ b/drivers/scsi/ips.c
@@ -196,7 +196,6 @@
196#include <linux/module.h> 196#include <linux/module.h>
197 197
198#include <linux/stat.h> 198#include <linux/stat.h>
199#include <linux/config.h>
200 199
201#include <linux/spinlock.h> 200#include <linux/spinlock.h>
202#include <linux/init.h> 201#include <linux/init.h>
@@ -7008,7 +7007,7 @@ ips_register_scsi(int index)
7008 memcpy(ha, oldha, sizeof (ips_ha_t)); 7007 memcpy(ha, oldha, sizeof (ips_ha_t));
7009 free_irq(oldha->irq, oldha); 7008 free_irq(oldha->irq, oldha);
7010 /* Install the interrupt handler with the new ha */ 7009 /* Install the interrupt handler with the new ha */
7011 if (request_irq(ha->irq, do_ipsintr, SA_SHIRQ, ips_name, ha)) { 7010 if (request_irq(ha->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) {
7012 IPS_PRINTK(KERN_WARNING, ha->pcidev, 7011 IPS_PRINTK(KERN_WARNING, ha->pcidev,
7013 "Unable to install interrupt handler\n"); 7012 "Unable to install interrupt handler\n");
7014 scsi_host_put(sh); 7013 scsi_host_put(sh);
@@ -7420,7 +7419,7 @@ ips_init_phase2(int index)
7420 } 7419 }
7421 7420
7422 /* Install the interrupt handler */ 7421 /* Install the interrupt handler */
7423 if (request_irq(ha->irq, do_ipsintr, SA_SHIRQ, ips_name, ha)) { 7422 if (request_irq(ha->irq, do_ipsintr, IRQF_SHARED, ips_name, ha)) {
7424 IPS_PRINTK(KERN_WARNING, ha->pcidev, 7423 IPS_PRINTK(KERN_WARNING, ha->pcidev,
7425 "Unable to install interrupt handler\n"); 7424 "Unable to install interrupt handler\n");
7426 return ips_abort_init(ha, index); 7425 return ips_abort_init(ha, index);
diff --git a/drivers/scsi/jazz_esp.c b/drivers/scsi/jazz_esp.c
index fc031c76dad..3fd8a96f2af 100644
--- a/drivers/scsi/jazz_esp.c
+++ b/drivers/scsi/jazz_esp.c
@@ -131,7 +131,7 @@ static int jazz_esp_detect(struct scsi_host_template *tpnt)
131 esp->esp_command_dvma = vdma_alloc(CPHYSADDR(cmd_buffer), sizeof (cmd_buffer)); 131 esp->esp_command_dvma = vdma_alloc(CPHYSADDR(cmd_buffer), sizeof (cmd_buffer));
132 132
133 esp->irq = JAZZ_SCSI_IRQ; 133 esp->irq = JAZZ_SCSI_IRQ;
134 request_irq(JAZZ_SCSI_IRQ, esp_intr, SA_INTERRUPT, "JAZZ SCSI", 134 request_irq(JAZZ_SCSI_IRQ, esp_intr, IRQF_DISABLED, "JAZZ SCSI",
135 esp->ehost); 135 esp->ehost);
136 136
137 /* 137 /*
diff --git a/drivers/scsi/lasi700.c b/drivers/scsi/lasi700.c
index eb7bd310cc8..f0871c3ac3d 100644
--- a/drivers/scsi/lasi700.c
+++ b/drivers/scsi/lasi700.c
@@ -131,7 +131,7 @@ lasi700_probe(struct parisc_device *dev)
131 host->this_id = 7; 131 host->this_id = 7;
132 host->base = base; 132 host->base = base;
133 host->irq = dev->irq; 133 host->irq = dev->irq;
134 if(request_irq(dev->irq, NCR_700_intr, SA_SHIRQ, "lasi700", host)) { 134 if(request_irq(dev->irq, NCR_700_intr, IRQF_SHARED, "lasi700", host)) {
135 printk(KERN_ERR "lasi700: request_irq failed!\n"); 135 printk(KERN_ERR "lasi700: request_irq failed!\n");
136 goto out_put_host; 136 goto out_put_host;
137 } 137 }
diff --git a/drivers/scsi/libata-bmdma.c b/drivers/scsi/libata-bmdma.c
index 004e1a0d8b7..9ce221f2595 100644
--- a/drivers/scsi/libata-bmdma.c
+++ b/drivers/scsi/libata-bmdma.c
@@ -32,7 +32,6 @@
32 * 32 *
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
37#include <linux/pci.h> 36#include <linux/pci.h>
38#include <linux/libata.h> 37#include <linux/libata.h>
@@ -854,7 +853,7 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int
854 return NULL; 853 return NULL;
855 854
856 probe_ent->irq = pdev->irq; 855 probe_ent->irq = pdev->irq;
857 probe_ent->irq_flags = SA_SHIRQ; 856 probe_ent->irq_flags = IRQF_SHARED;
858 probe_ent->private_data = port[0]->private_data; 857 probe_ent->private_data = port[0]->private_data;
859 858
860 if (ports & ATA_PORT_PRIMARY) { 859 if (ports & ATA_PORT_PRIMARY) {
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index d1c1c30d123..82caba46429 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -32,7 +32,6 @@
32 * 32 *
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/pci.h> 37#include <linux/pci.h>
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 908d0f27706..5a28d9bf8e4 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -1620,7 +1620,7 @@ lpfc_pci_probe_one(struct pci_dev *pdev, const struct pci_device_id *pid)
1620 if (error) 1620 if (error)
1621 goto out_remove_host; 1621 goto out_remove_host;
1622 1622
1623 error = request_irq(phba->pcidev->irq, lpfc_intr_handler, SA_SHIRQ, 1623 error = request_irq(phba->pcidev->irq, lpfc_intr_handler, IRQF_SHARED,
1624 LPFC_DRIVER_NAME, phba); 1624 LPFC_DRIVER_NAME, phba);
1625 if (error) { 1625 if (error) {
1626 lpfc_printf_log(phba, KERN_ERR, LOG_INIT, 1626 lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
index 5d2cefb5e52..76edbb639d3 100644
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -4714,7 +4714,7 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4714 4714
4715 if (request_irq(irq, (adapter->flag & BOARD_MEMMAP) ? 4715 if (request_irq(irq, (adapter->flag & BOARD_MEMMAP) ?
4716 megaraid_isr_memmapped : megaraid_isr_iomapped, 4716 megaraid_isr_memmapped : megaraid_isr_iomapped,
4717 SA_SHIRQ, "megaraid", adapter)) { 4717 IRQF_SHARED, "megaraid", adapter)) {
4718 printk(KERN_WARNING 4718 printk(KERN_WARNING
4719 "megaraid: Couldn't register IRQ %d!\n", irq); 4719 "megaraid: Couldn't register IRQ %d!\n", irq);
4720 goto out_free_scb_list; 4720 goto out_free_scb_list;
diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c
index b7caf60638e..92715130ac0 100644
--- a/drivers/scsi/megaraid/megaraid_mbox.c
+++ b/drivers/scsi/megaraid/megaraid_mbox.c
@@ -767,7 +767,7 @@ megaraid_init_mbox(adapter_t *adapter)
767 // 767 //
768 768
769 // request IRQ and register the interrupt service routine 769 // request IRQ and register the interrupt service routine
770 if (request_irq(adapter->irq, megaraid_isr, SA_SHIRQ, "megaraid", 770 if (request_irq(adapter->irq, megaraid_isr, IRQF_SHARED, "megaraid",
771 adapter)) { 771 adapter)) {
772 772
773 con_log(CL_ANN, (KERN_WARNING 773 con_log(CL_ANN, (KERN_WARNING
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c
index 0c9516ff636..e5c017ccda5 100644
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -2191,7 +2191,7 @@ megasas_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
2191 /* 2191 /*
2192 * Register IRQ 2192 * Register IRQ
2193 */ 2193 */
2194 if (request_irq(pdev->irq, megasas_isr, SA_SHIRQ, "megasas", instance)) { 2194 if (request_irq(pdev->irq, megasas_isr, IRQF_SHARED, "megasas", instance)) {
2195 printk(KERN_DEBUG "megasas: Failed to register IRQ\n"); 2195 printk(KERN_DEBUG "megasas: Failed to register IRQ\n");
2196 goto fail_irq; 2196 goto fail_irq;
2197 } 2197 }
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c
index f852421002e..c88717727be 100644
--- a/drivers/scsi/mesh.c
+++ b/drivers/scsi/mesh.c
@@ -18,7 +18,6 @@
18 * - retry arbitration if lost (unless higher levels do this for us) 18 * - retry arbitration if lost (unless higher levels do this for us)
19 * - power down the chip when no device is detected 19 * - power down the chip when no device is detected
20 */ 20 */
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/delay.h> 23#include <linux/delay.h>
diff --git a/drivers/scsi/ncr53c8xx.h b/drivers/scsi/ncr53c8xx.h
index 0e4e46a0133..78818b6684f 100644
--- a/drivers/scsi/ncr53c8xx.h
+++ b/drivers/scsi/ncr53c8xx.h
@@ -53,10 +53,8 @@
53#ifndef NCR53C8XX_H 53#ifndef NCR53C8XX_H
54#define NCR53C8XX_H 54#define NCR53C8XX_H
55 55
56#include <linux/config.h>
57#include <scsi/scsi_host.h> 56#include <scsi/scsi_host.h>
58 57
59#include <linux/config.h>
60 58
61/* 59/*
62** If you want a driver as small as possible, donnot define the 60** If you want a driver as small as possible, donnot define the
diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
index 5c55e152e71..bd337a91429 100644
--- a/drivers/scsi/nsp32.c
+++ b/drivers/scsi/nsp32.c
@@ -2867,7 +2867,7 @@ static int nsp32_detect(struct scsi_host_template *sht)
2867 nsp32_do_bus_reset(data); 2867 nsp32_do_bus_reset(data);
2868 2868
2869 ret = request_irq(host->irq, do_nsp32_isr, 2869 ret = request_irq(host->irq, do_nsp32_isr,
2870 SA_SHIRQ | SA_SAMPLE_RANDOM, "nsp32", data); 2870 IRQF_SHARED | IRQF_SAMPLE_RANDOM, "nsp32", data);
2871 if (ret < 0) { 2871 if (ret < 0) {
2872 nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 " 2872 nsp32_msg(KERN_ERR, "Unable to allocate IRQ for NinjaSCSI32 "
2873 "SCSI PCI controller. Interrupt: %d", host->irq); 2873 "SCSI PCI controller. Interrupt: %d", host->irq);
diff --git a/drivers/scsi/oktagon_esp.c b/drivers/scsi/oktagon_esp.c
index dee426f8c07..dd67a68c5c2 100644
--- a/drivers/scsi/oktagon_esp.c
+++ b/drivers/scsi/oktagon_esp.c
@@ -6,7 +6,6 @@
6 * Based on cyber_esp.c 6 * Based on cyber_esp.c
7 */ 7 */
8 8
9#include <linux/config.h>
10 9
11#if defined(CONFIG_AMIGA) || defined(CONFIG_APUS) 10#if defined(CONFIG_AMIGA) || defined(CONFIG_APUS)
12#define USE_BOTTOM_HALF 11#define USE_BOTTOM_HALF
@@ -198,7 +197,7 @@ int oktagon_esp_detect(struct scsi_host_template *tpnt)
198 esp->esp_command_dvma = (__u32) cmd_buffer; 197 esp->esp_command_dvma = (__u32) cmd_buffer;
199 198
200 esp->irq = IRQ_AMIGA_PORTS; 199 esp->irq = IRQ_AMIGA_PORTS;
201 request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ, 200 request_irq(IRQ_AMIGA_PORTS, esp_intr, IRQF_SHARED,
202 "BSC Oktagon SCSI", esp->ehost); 201 "BSC Oktagon SCSI", esp->ehost);
203 202
204 /* Figure out our scsi ID on the bus */ 203 /* Figure out our scsi ID on the bus */
diff --git a/drivers/scsi/oktagon_io.S b/drivers/scsi/oktagon_io.S
index 08ce8d80d8f..8a7340b0270 100644
--- a/drivers/scsi/oktagon_io.S
+++ b/drivers/scsi/oktagon_io.S
@@ -23,7 +23,6 @@ int oktag_from_io(long *addr,long *paddr,long len)
23 * is moved to/from the IO register. 23 * is moved to/from the IO register.
24 */ 24 */
25 25
26#include <linux/config.h>
27 26
28#ifdef CONFIG_APUS 27#ifdef CONFIG_APUS
29 28
diff --git a/drivers/scsi/osst.h b/drivers/scsi/osst.h
index 011d4d6ca9f..1e426f5d0ed 100644
--- a/drivers/scsi/osst.h
+++ b/drivers/scsi/osst.h
@@ -3,7 +3,6 @@
3 */ 3 */
4 4
5#include <asm/byteorder.h> 5#include <asm/byteorder.h>
6#include <linux/config.h>
7#include <linux/completion.h> 6#include <linux/completion.h>
8 7
9/* FIXME - rename and use the following two types or delete them! 8/* FIXME - rename and use the following two types or delete them!
diff --git a/drivers/scsi/pas16.c b/drivers/scsi/pas16.c
index 1bf96ed8f93..1434209a8ac 100644
--- a/drivers/scsi/pas16.c
+++ b/drivers/scsi/pas16.c
@@ -454,7 +454,7 @@ int __init pas16_detect(struct scsi_host_template * tpnt)
454 instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS); 454 instance->irq = NCR5380_probe_irq(instance, PAS16_IRQS);
455 455
456 if (instance->irq != SCSI_IRQ_NONE) 456 if (instance->irq != SCSI_IRQ_NONE)
457 if (request_irq(instance->irq, pas16_intr, SA_INTERRUPT, "pas16", instance)) { 457 if (request_irq(instance->irq, pas16_intr, IRQF_DISABLED, "pas16", instance)) {
458 printk("scsi%d : IRQ%d not free, interrupts disabled\n", 458 printk("scsi%d : IRQ%d not free, interrupts disabled\n",
459 instance->host_no, instance->irq); 459 instance->host_no, instance->irq);
460 instance->irq = SCSI_IRQ_NONE; 460 instance->irq = SCSI_IRQ_NONE;
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index 231f9c311c6..7ff5851c040 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -1623,7 +1623,7 @@ static int nsp_cs_probe(struct pcmcia_device *link)
1623 /* Interrupt handler */ 1623 /* Interrupt handler */
1624 link->irq.Handler = &nspintr; 1624 link->irq.Handler = &nspintr;
1625 link->irq.Instance = info; 1625 link->irq.Instance = info;
1626 link->irq.Attributes |= (SA_SHIRQ | SA_SAMPLE_RANDOM); 1626 link->irq.Attributes |= (IRQF_SHARED | IRQF_SAMPLE_RANDOM);
1627 1627
1628 /* General socket configuration */ 1628 /* General socket configuration */
1629 link->conf.Attributes = CONF_ENABLE_IRQ; 1629 link->conf.Attributes = CONF_ENABLE_IRQ;
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 9f59827707f..0b65099acb1 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -799,7 +799,7 @@ next_entry:
799 data = (struct sym53c500_data *)host->hostdata; 799 data = (struct sym53c500_data *)host->hostdata;
800 800
801 if (irq_level > 0) { 801 if (irq_level > 0) {
802 if (request_irq(irq_level, SYM53C500_intr, SA_SHIRQ, "SYM53C500", host)) { 802 if (request_irq(irq_level, SYM53C500_intr, IRQF_SHARED, "SYM53C500", host)) {
803 printk("SYM53C500: unable to allocate IRQ %d\n", irq_level); 803 printk("SYM53C500: unable to allocate IRQ %d\n", irq_level);
804 goto err_free_scsi; 804 goto err_free_scsi;
805 } 805 }
diff --git a/drivers/scsi/pdc_adma.c b/drivers/scsi/pdc_adma.c
index 7ebe8e03aa9..d1f38c32aa1 100644
--- a/drivers/scsi/pdc_adma.c
+++ b/drivers/scsi/pdc_adma.c
@@ -690,7 +690,7 @@ static int adma_ata_init_one(struct pci_dev *pdev,
690 probe_ent->port_ops = adma_port_info[board_idx].port_ops; 690 probe_ent->port_ops = adma_port_info[board_idx].port_ops;
691 691
692 probe_ent->irq = pdev->irq; 692 probe_ent->irq = pdev->irq;
693 probe_ent->irq_flags = SA_SHIRQ; 693 probe_ent->irq_flags = IRQF_SHARED;
694 probe_ent->mmio_base = mmio_base; 694 probe_ent->mmio_base = mmio_base;
695 probe_ent->n_ports = ADMA_PORTS; 695 probe_ent->n_ports = ADMA_PORTS;
696 696
diff --git a/drivers/scsi/pluto.c b/drivers/scsi/pluto.c
index 83a67179993..7abf64d1bfc 100644
--- a/drivers/scsi/pluto.c
+++ b/drivers/scsi/pluto.c
@@ -13,7 +13,6 @@
13#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
14#include <linux/stat.h> 14#include <linux/stat.h>
15#include <linux/init.h> 15#include <linux/init.h>
16#include <linux/config.h>
17#ifdef CONFIG_KMOD 16#ifdef CONFIG_KMOD
18#include <linux/kmod.h> 17#include <linux/kmod.h>
19#endif 18#endif
diff --git a/drivers/scsi/ppa.c b/drivers/scsi/ppa.c
index d58ac5ad509..b0eba39f208 100644
--- a/drivers/scsi/ppa.c
+++ b/drivers/scsi/ppa.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/module.h> 13#include <linux/module.h>
diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c
index 680f6063954..b818b9bfe67 100644
--- a/drivers/scsi/qla1280.c
+++ b/drivers/scsi/qla1280.c
@@ -192,7 +192,7 @@
192 - Don't walk the entire list in qla1280_putq_t() just to directly 192 - Don't walk the entire list in qla1280_putq_t() just to directly
193 grab the pointer to the last element afterwards 193 grab the pointer to the last element afterwards
194 Rev 3.23.5 Beta August 9, 2001, Jes Sorensen 194 Rev 3.23.5 Beta August 9, 2001, Jes Sorensen
195 - Don't use SA_INTERRUPT, it's use is deprecated for this kinda driver 195 - Don't use IRQF_DISABLED, it's use is deprecated for this kinda driver
196 Rev 3.23.4 Beta August 8, 2001, Jes Sorensen 196 Rev 3.23.4 Beta August 8, 2001, Jes Sorensen
197 - Set dev->max_sectors to 1024 197 - Set dev->max_sectors to 1024
198 Rev 3.23.3 Beta August 6, 2001, Jes Sorensen 198 Rev 3.23.3 Beta August 6, 2001, Jes Sorensen
@@ -331,7 +331,6 @@
331*****************************************************************************/ 331*****************************************************************************/
332 332
333 333
334#include <linux/config.h>
335#include <linux/module.h> 334#include <linux/module.h>
336 335
337#include <linux/version.h> 336#include <linux/version.h>
@@ -4370,7 +4369,7 @@ qla1280_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
4370 /* Disable ISP interrupts. */ 4369 /* Disable ISP interrupts. */
4371 qla1280_disable_intrs(ha); 4370 qla1280_disable_intrs(ha);
4372 4371
4373 if (request_irq(pdev->irq, qla1280_intr_handler, SA_SHIRQ, 4372 if (request_irq(pdev->irq, qla1280_intr_handler, IRQF_SHARED,
4374 "qla1280", ha)) { 4373 "qla1280", ha)) {
4375 printk("qla1280 : Failed to reserve interrupt %d already " 4374 printk("qla1280 : Failed to reserve interrupt %d already "
4376 "in use\n", pdev->irq); 4375 "in use\n", pdev->irq);
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index d6f6579cfd2..6734453ea28 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2134,7 +2134,7 @@ typedef struct scsi_qla_host {
2134 mempool_t *srb_mempool; 2134 mempool_t *srb_mempool;
2135 2135
2136 /* This spinlock is used to protect "io transactions", you must 2136 /* This spinlock is used to protect "io transactions", you must
2137 * aquire it before doing any IO to the card, eg with RD_REG*() and 2137 * acquire it before doing any IO to the card, eg with RD_REG*() and
2138 * WRT_REG*() for the duration of your entire commandtransaction. 2138 * WRT_REG*() for the duration of your entire commandtransaction.
2139 * 2139 *
2140 * This spinlock is of lower priority than the io request lock. 2140 * This spinlock is of lower priority than the io request lock.
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index ccaad0b08d3..93062593ebe 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1541,7 +1541,7 @@ static int qla2x00_probe_one(struct pci_dev *pdev)
1541 host->transportt = qla2xxx_transport_template; 1541 host->transportt = qla2xxx_transport_template;
1542 1542
1543 ret = request_irq(pdev->irq, ha->isp_ops.intr_handler, 1543 ret = request_irq(pdev->irq, ha->isp_ops.intr_handler,
1544 SA_INTERRUPT|SA_SHIRQ, QLA2XXX_DRIVER_NAME, ha); 1544 IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha);
1545 if (ret) { 1545 if (ret) {
1546 qla_printk(KERN_WARNING, ha, 1546 qla_printk(KERN_WARNING, ha,
1547 "Failed to reserve interrupt %d already in use.\n", 1547 "Failed to reserve interrupt %d already in use.\n",
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 329ead26371..69e0551a81d 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -718,7 +718,7 @@ static int __init qpti_register_irq(struct qlogicpti *qpti)
718 * sanely maintain. 718 * sanely maintain.
719 */ 719 */
720 if (request_irq(qpti->irq, qpti_intr, 720 if (request_irq(qpti->irq, qpti_intr,
721 SA_SHIRQ, "Qlogic/PTI", qpti)) 721 IRQF_SHARED, "Qlogic/PTI", qpti))
722 goto fail; 722 goto fail;
723 723
724 printk("qpti%d: IRQ %d ", qpti->qpti_id, qpti->irq); 724 printk("qpti%d: IRQ %d ", qpti->qpti_id, qpti->irq);
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index 4a71578df3c..1053c7c76b7 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -2395,7 +2395,7 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2395 probe_ent->port_ops = mv_port_info[board_idx].port_ops; 2395 probe_ent->port_ops = mv_port_info[board_idx].port_ops;
2396 2396
2397 probe_ent->irq = pdev->irq; 2397 probe_ent->irq = pdev->irq;
2398 probe_ent->irq_flags = SA_SHIRQ; 2398 probe_ent->irq_flags = IRQF_SHARED;
2399 probe_ent->mmio_base = mmio_base; 2399 probe_ent->mmio_base = mmio_base;
2400 probe_ent->private_data = hpriv; 2400 probe_ent->private_data = hpriv;
2401 2401
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
index 5cc42c6054e..56da25581f3 100644
--- a/drivers/scsi/sata_nv.c
+++ b/drivers/scsi/sata_nv.c
@@ -31,7 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/kernel.h> 34#include <linux/kernel.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/pci.h> 36#include <linux/pci.h>
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c
index b2b6ed5216e..64631bd3895 100644
--- a/drivers/scsi/sata_promise.c
+++ b/drivers/scsi/sata_promise.c
@@ -743,7 +743,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
743 probe_ent->port_ops = pdc_port_info[board_idx].port_ops; 743 probe_ent->port_ops = pdc_port_info[board_idx].port_ops;
744 744
745 probe_ent->irq = pdev->irq; 745 probe_ent->irq = pdev->irq;
746 probe_ent->irq_flags = SA_SHIRQ; 746 probe_ent->irq_flags = IRQF_SHARED;
747 probe_ent->mmio_base = mmio_base; 747 probe_ent->mmio_base = mmio_base;
748 748
749 pdc_ata_setup_port(&probe_ent->port[0], base + 0x200); 749 pdc_ata_setup_port(&probe_ent->port[0], base + 0x200);
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c
index 98ddc25655f..d374c1db0cf 100644
--- a/drivers/scsi/sata_qstor.c
+++ b/drivers/scsi/sata_qstor.c
@@ -680,7 +680,7 @@ static int qs_ata_init_one(struct pci_dev *pdev,
680 probe_ent->port_ops = qs_port_info[board_idx].port_ops; 680 probe_ent->port_ops = qs_port_info[board_idx].port_ops;
681 681
682 probe_ent->irq = pdev->irq; 682 probe_ent->irq = pdev->irq;
683 probe_ent->irq_flags = SA_SHIRQ; 683 probe_ent->irq_flags = IRQF_SHARED;
684 probe_ent->mmio_base = mmio_base; 684 probe_ent->mmio_base = mmio_base;
685 probe_ent->n_ports = QS_PORTS; 685 probe_ent->n_ports = QS_PORTS;
686 686
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c
index 51d86d750e8..7aabb45c35e 100644
--- a/drivers/scsi/sata_sil.c
+++ b/drivers/scsi/sata_sil.c
@@ -608,7 +608,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
608 probe_ent->mwdma_mask = sil_port_info[ent->driver_data].mwdma_mask; 608 probe_ent->mwdma_mask = sil_port_info[ent->driver_data].mwdma_mask;
609 probe_ent->udma_mask = sil_port_info[ent->driver_data].udma_mask; 609 probe_ent->udma_mask = sil_port_info[ent->driver_data].udma_mask;
610 probe_ent->irq = pdev->irq; 610 probe_ent->irq = pdev->irq;
611 probe_ent->irq_flags = SA_SHIRQ; 611 probe_ent->irq_flags = IRQF_SHARED;
612 probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; 612 probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags;
613 613
614 mmio_base = pci_iomap(pdev, 5, 0); 614 mmio_base = pci_iomap(pdev, 5, 0);
diff --git a/drivers/scsi/sata_sil24.c b/drivers/scsi/sata_sil24.c
index b5f8fa95567..07a1c6a8a41 100644
--- a/drivers/scsi/sata_sil24.c
+++ b/drivers/scsi/sata_sil24.c
@@ -1041,7 +1041,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1041 probe_ent->n_ports = SIL24_FLAG2NPORTS(pinfo->host_flags); 1041 probe_ent->n_ports = SIL24_FLAG2NPORTS(pinfo->host_flags);
1042 1042
1043 probe_ent->irq = pdev->irq; 1043 probe_ent->irq = pdev->irq;
1044 probe_ent->irq_flags = SA_SHIRQ; 1044 probe_ent->irq_flags = IRQF_SHARED;
1045 probe_ent->mmio_base = port_base; 1045 probe_ent->mmio_base = port_base;
1046 probe_ent->private_data = hpriv; 1046 probe_ent->private_data = hpriv;
1047 1047
diff --git a/drivers/scsi/sata_sis.c b/drivers/scsi/sata_sis.c
index 809d337ed64..ee6b5df41d3 100644
--- a/drivers/scsi/sata_sis.c
+++ b/drivers/scsi/sata_sis.c
@@ -30,7 +30,6 @@
30 * 30 *
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/pci.h> 35#include <linux/pci.h>
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c
index 7566c2cabaf..7d0858095e1 100644
--- a/drivers/scsi/sata_svw.c
+++ b/drivers/scsi/sata_svw.c
@@ -36,7 +36,6 @@
36 * 36 *
37 */ 37 */
38 38
39#include <linux/config.h>
40#include <linux/kernel.h> 39#include <linux/kernel.h>
41#include <linux/module.h> 40#include <linux/module.h>
42#include <linux/pci.h> 41#include <linux/pci.h>
@@ -429,7 +428,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
429 probe_ent->port_ops = &k2_sata_ops; 428 probe_ent->port_ops = &k2_sata_ops;
430 probe_ent->n_ports = 4; 429 probe_ent->n_ports = 4;
431 probe_ent->irq = pdev->irq; 430 probe_ent->irq = pdev->irq;
432 probe_ent->irq_flags = SA_SHIRQ; 431 probe_ent->irq_flags = IRQF_SHARED;
433 probe_ent->mmio_base = mmio_base; 432 probe_ent->mmio_base = mmio_base;
434 433
435 /* We don't care much about the PIO/UDMA masks, but the core won't like us 434 /* We don't care much about the PIO/UDMA masks, but the core won't like us
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c
index 7f864410f7c..ccc8cad24f7 100644
--- a/drivers/scsi/sata_sx4.c
+++ b/drivers/scsi/sata_sx4.c
@@ -1436,7 +1436,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
1436 probe_ent->port_ops = pdc_port_info[board_idx].port_ops; 1436 probe_ent->port_ops = pdc_port_info[board_idx].port_ops;
1437 1437
1438 probe_ent->irq = pdev->irq; 1438 probe_ent->irq = pdev->irq;
1439 probe_ent->irq_flags = SA_SHIRQ; 1439 probe_ent->irq_flags = IRQF_SHARED;
1440 probe_ent->mmio_base = mmio_base; 1440 probe_ent->mmio_base = mmio_base;
1441 1441
1442 probe_ent->private_data = hpriv; 1442 probe_ent->private_data = hpriv;
diff --git a/drivers/scsi/sata_uli.c b/drivers/scsi/sata_uli.c
index 64f3c1aeed2..33cdb4867ef 100644
--- a/drivers/scsi/sata_uli.c
+++ b/drivers/scsi/sata_uli.c
@@ -24,7 +24,6 @@
24 * 24 *
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/pci.h> 29#include <linux/pci.h>
diff --git a/drivers/scsi/sata_via.c b/drivers/scsi/sata_via.c
index 501ce179178..03baec2191b 100644
--- a/drivers/scsi/sata_via.c
+++ b/drivers/scsi/sata_via.c
@@ -242,7 +242,7 @@ static struct ata_probe_ent *vt6421_init_probe_ent(struct pci_dev *pdev)
242 probe_ent->port_ops = &svia_sata_ops; 242 probe_ent->port_ops = &svia_sata_ops;
243 probe_ent->n_ports = N_PORTS; 243 probe_ent->n_ports = N_PORTS;
244 probe_ent->irq = pdev->irq; 244 probe_ent->irq = pdev->irq;
245 probe_ent->irq_flags = SA_SHIRQ; 245 probe_ent->irq_flags = IRQF_SHARED;
246 probe_ent->pio_mask = 0x1f; 246 probe_ent->pio_mask = 0x1f;
247 probe_ent->mwdma_mask = 0x07; 247 probe_ent->mwdma_mask = 0x07;
248 probe_ent->udma_mask = 0x7f; 248 probe_ent->udma_mask = 0x7f;
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c
index 616fd9634b4..916fe6fba75 100644
--- a/drivers/scsi/sata_vsc.c
+++ b/drivers/scsi/sata_vsc.c
@@ -400,7 +400,7 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d
400 probe_ent->port_ops = &vsc_sata_ops; 400 probe_ent->port_ops = &vsc_sata_ops;
401 probe_ent->n_ports = 4; 401 probe_ent->n_ports = 4;
402 probe_ent->irq = pdev->irq; 402 probe_ent->irq = pdev->irq;
403 probe_ent->irq_flags = SA_SHIRQ; 403 probe_ent->irq_flags = IRQF_SHARED;
404 probe_ent->mmio_base = mmio_base; 404 probe_ent->mmio_base = mmio_base;
405 405
406 /* We don't care much about the PIO/UDMA masks, but the core won't like us 406 /* We don't care much about the PIO/UDMA masks, but the core won't like us
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 5a5d2af8ee4..e1168860045 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -24,7 +24,6 @@
24 * module options to "modprobe scsi_debug num_tgts=2" [20021221] 24 * module options to "modprobe scsi_debug num_tgts=2" [20021221]
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/kernel.h> 29#include <linux/kernel.h>
diff --git a/drivers/scsi/scsi_logging.h b/drivers/scsi/scsi_logging.h
index a3e2af6a846..1f65139e14f 100644
--- a/drivers/scsi/scsi_logging.h
+++ b/drivers/scsi/scsi_logging.h
@@ -1,7 +1,6 @@
1#ifndef _SCSI_LOGGING_H 1#ifndef _SCSI_LOGGING_H
2#define _SCSI_LOGGING_H 2#define _SCSI_LOGGING_H
3 3
4#include <linux/config.h>
5 4
6/* 5/*
7 * This defines the scsi logging feature. It is a means by which the user 6 * This defines the scsi logging feature. It is a means by which the user
diff --git a/drivers/scsi/scsi_priv.h b/drivers/scsi/scsi_priv.h
index a1727a0e1bd..015c90cf3ab 100644
--- a/drivers/scsi/scsi_priv.h
+++ b/drivers/scsi/scsi_priv.h
@@ -1,7 +1,6 @@
1#ifndef _SCSI_PRIV_H 1#ifndef _SCSI_PRIV_H
2#define _SCSI_PRIV_H 2#define _SCSI_PRIV_H
3 3
4#include <linux/config.h>
5#include <linux/device.h> 4#include <linux/device.h>
6 5
7struct request_queue; 6struct request_queue;
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 0f7e6f94d66..1341608e9e3 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -25,7 +25,6 @@
25 * or a LUN is seen that cannot have a device attached to it. 25 * or a LUN is seen that cannot have a device attached to it.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/moduleparam.h> 29#include <linux/moduleparam.h>
31#include <linux/init.h> 30#include <linux/init.h>
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 5ec7a4fb014..e7fe565b96d 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -6,7 +6,6 @@
6 * Created to pull SCSI mid layer sysfs routines into one file. 6 * Created to pull SCSI mid layer sysfs routines into one file.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/blkdev.h> 11#include <linux/blkdev.h>
diff --git a/drivers/scsi/scsi_transport_spi.c b/drivers/scsi/scsi_transport_spi.c
index ace49d5bd9c..29a9a53cdd1 100644
--- a/drivers/scsi/scsi_transport_spi.c
+++ b/drivers/scsi/scsi_transport_spi.c
@@ -18,7 +18,6 @@
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */ 20 */
21#include <linux/config.h>
22#include <linux/ctype.h> 21#include <linux/ctype.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/module.h> 23#include <linux/module.h>
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 35419901124..ea38757d12e 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -32,7 +32,6 @@
32 * than the level indicated above to trigger output. 32 * than the level indicated above to trigger output.
33 */ 33 */
34 34
35#include <linux/config.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/fs.h> 36#include <linux/fs.h>
38#include <linux/kernel.h> 37#include <linux/kernel.h>
diff --git a/drivers/scsi/seagate.c b/drivers/scsi/seagate.c
index 7fa4da4ea64..3f312a84c6a 100644
--- a/drivers/scsi/seagate.c
+++ b/drivers/scsi/seagate.c
@@ -497,7 +497,7 @@ int __init seagate_st0x_detect (struct scsi_host_template * tpnt)
497 return 0; 497 return 0;
498 498
499 hostno = instance->host_no; 499 hostno = instance->host_no;
500 if (request_irq (irq, do_seagate_reconnect_intr, SA_INTERRUPT, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) { 500 if (request_irq (irq, do_seagate_reconnect_intr, IRQF_DISABLED, (controller_type == SEAGATE) ? "seagate" : "tmc-8xx", instance)) {
501 printk(KERN_ERR "scsi%d : unable to allocate IRQ%d\n", hostno, irq); 501 printk(KERN_ERR "scsi%d : unable to allocate IRQ%d\n", hostno, irq);
502 return 0; 502 return 0;
503 } 503 }
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 98b9312ba8d..4e607d3065b 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -28,7 +28,6 @@ static int sg_version_num = 30533; /* 2 digits for each component */
28 * (otherwise the macros compile to empty statements). 28 * (otherwise the macros compile to empty statements).
29 * 29 *
30 */ 30 */
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33 32
34#include <linux/fs.h> 33#include <linux/fs.h>
diff --git a/drivers/scsi/sim710.c b/drivers/scsi/sim710.c
index 255886a9ac5..b27e85428da 100644
--- a/drivers/scsi/sim710.c
+++ b/drivers/scsi/sim710.c
@@ -26,7 +26,6 @@
26 * 26 *
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31 30
32#include <linux/blkdev.h> 31#include <linux/blkdev.h>
@@ -134,7 +133,7 @@ sim710_probe_common(struct device *dev, unsigned long base_addr,
134 host->this_id = scsi_id; 133 host->this_id = scsi_id;
135 host->base = base_addr; 134 host->base = base_addr;
136 host->irq = irq; 135 host->irq = irq;
137 if (request_irq(irq, NCR_700_intr, SA_SHIRQ, "sim710", host)) { 136 if (request_irq(irq, NCR_700_intr, IRQF_SHARED, "sim710", host)) {
138 printk(KERN_ERR "sim710: request_irq failed\n"); 137 printk(KERN_ERR "sim710: request_irq failed\n");
139 goto out_put_host; 138 goto out_put_host;
140 } 139 }
diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c
index 9dde8df2f5c..a3e9d0f2eb5 100644
--- a/drivers/scsi/sr_vendor.c
+++ b/drivers/scsi/sr_vendor.c
@@ -34,7 +34,6 @@
34 * HP 6020 writers now supported. 34 * HP 6020 writers now supported.
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/cdrom.h> 37#include <linux/cdrom.h>
39#include <linux/errno.h> 38#include <linux/errno.h>
40#include <linux/string.h> 39#include <linux/string.h>
diff --git a/drivers/scsi/sun3_NCR5380.c b/drivers/scsi/sun3_NCR5380.c
index 25cced91c8a..2ebe0d66389 100644
--- a/drivers/scsi/sun3_NCR5380.c
+++ b/drivers/scsi/sun3_NCR5380.c
@@ -535,7 +535,6 @@ static __inline__ void initialize_SCp(Scsi_Cmnd *cmd)
535 535
536} 536}
537 537
538#include <linux/config.h>
539#include <linux/delay.h> 538#include <linux/delay.h>
540 539
541#if 1 540#if 1
diff --git a/drivers/scsi/sun3x_esp.c b/drivers/scsi/sun3x_esp.c
index 2e2c1eb1563..1f328cae5c0 100644
--- a/drivers/scsi/sun3x_esp.c
+++ b/drivers/scsi/sun3x_esp.c
@@ -97,7 +97,7 @@ int sun3x_esp_detect(struct scsi_host_template *tpnt)
97 esp->esp_command_dvma = dvma_vtob((unsigned long)esp->esp_command); 97 esp->esp_command_dvma = dvma_vtob((unsigned long)esp->esp_command);
98 98
99 esp->irq = 2; 99 esp->irq = 2;
100 if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, 100 if (request_irq(esp->irq, esp_intr, IRQF_DISABLED,
101 "SUN3X SCSI", esp->ehost)) { 101 "SUN3X SCSI", esp->ehost)) {
102 esp_deallocate(esp); 102 esp_deallocate(esp);
103 return 0; 103 return 0;
diff --git a/drivers/scsi/sym53c8xx_2/sym53c8xx.h b/drivers/scsi/sym53c8xx_2/sym53c8xx.h
index 48110376972..7519728dfc3 100644
--- a/drivers/scsi/sym53c8xx_2/sym53c8xx.h
+++ b/drivers/scsi/sym53c8xx_2/sym53c8xx.h
@@ -40,7 +40,6 @@
40#ifndef SYM53C8XX_H 40#ifndef SYM53C8XX_H
41#define SYM53C8XX_H 41#define SYM53C8XX_H
42 42
43#include <linux/config.h>
44 43
45/* 44/*
46 * DMA addressing mode. 45 * DMA addressing mode.
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.c b/drivers/scsi/sym53c8xx_2/sym_glue.c
index ea82d3df63a..8c505076c0e 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.c
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.c
@@ -1547,7 +1547,7 @@ static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
1547 * If we synchonize the C code with SCRIPTS on interrupt, 1547 * If we synchonize the C code with SCRIPTS on interrupt,
1548 * we do not want to share the INTR line at all. 1548 * we do not want to share the INTR line at all.
1549 */ 1549 */
1550 if (request_irq(pdev->irq, sym53c8xx_intr, SA_SHIRQ, NAME53C8XX, np)) { 1550 if (request_irq(pdev->irq, sym53c8xx_intr, IRQF_SHARED, NAME53C8XX, np)) {
1551 printf_err("%s: request irq %d failure\n", 1551 printf_err("%s: request irq %d failure\n",
1552 sym_name(np), pdev->irq); 1552 sym_name(np), pdev->irq);
1553 goto attach_failed; 1553 goto attach_failed;
diff --git a/drivers/scsi/sym53c8xx_2/sym_glue.h b/drivers/scsi/sym53c8xx_2/sym_glue.h
index a446cda3f64..e022d3c71b5 100644
--- a/drivers/scsi/sym53c8xx_2/sym_glue.h
+++ b/drivers/scsi/sym53c8xx_2/sym_glue.h
@@ -40,7 +40,6 @@
40#ifndef SYM_GLUE_H 40#ifndef SYM_GLUE_H
41#define SYM_GLUE_H 41#define SYM_GLUE_H
42 42
43#include <linux/config.h>
44#include <linux/delay.h> 43#include <linux/delay.h>
45#include <linux/ioport.h> 44#include <linux/ioport.h>
46#include <linux/pci.h> 45#include <linux/pci.h>
diff --git a/drivers/scsi/t128.c b/drivers/scsi/t128.c
index a24f661b027..2df6747cb76 100644
--- a/drivers/scsi/t128.c
+++ b/drivers/scsi/t128.c
@@ -260,7 +260,7 @@ found:
260 instance->irq = NCR5380_probe_irq(instance, T128_IRQS); 260 instance->irq = NCR5380_probe_irq(instance, T128_IRQS);
261 261
262 if (instance->irq != SCSI_IRQ_NONE) 262 if (instance->irq != SCSI_IRQ_NONE)
263 if (request_irq(instance->irq, t128_intr, SA_INTERRUPT, "t128", instance)) { 263 if (request_irq(instance->irq, t128_intr, IRQF_DISABLED, "t128", instance)) {
264 printk("scsi%d : IRQ%d not free, interrupts disabled\n", 264 printk("scsi%d : IRQ%d not free, interrupts disabled\n",
265 instance->host_no, instance->irq); 265 instance->host_no, instance->irq);
266 instance->irq = SCSI_IRQ_NONE; 266 instance->irq = SCSI_IRQ_NONE;
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c
index 91322aff241..9404ff3d4c7 100644
--- a/drivers/scsi/tmscsim.c
+++ b/drivers/scsi/tmscsim.c
@@ -218,7 +218,6 @@
218#endif 218#endif
219#define DCBDEBUG1(x) C_NOP 219#define DCBDEBUG1(x) C_NOP
220 220
221#include <linux/config.h>
222#include <linux/module.h> 221#include <linux/module.h>
223#include <linux/delay.h> 222#include <linux/delay.h>
224#include <linux/signal.h> 223#include <linux/signal.h>
@@ -2585,7 +2584,7 @@ static int __devinit dc390_probe_one(struct pci_dev *pdev,
2585 /* Reset Pending INT */ 2584 /* Reset Pending INT */
2586 DC390_read8_(INT_Status, io_port); 2585 DC390_read8_(INT_Status, io_port);
2587 2586
2588 if (request_irq(pdev->irq, do_DC390_Interrupt, SA_SHIRQ, 2587 if (request_irq(pdev->irq, do_DC390_Interrupt, IRQF_SHARED,
2589 "tmscsim", pACB)) { 2588 "tmscsim", pACB)) {
2590 printk(KERN_ERR "DC390: register IRQ error!\n"); 2589 printk(KERN_ERR "DC390: register IRQ error!\n");
2591 goto out_release_region; 2590 goto out_release_region;
diff --git a/drivers/scsi/tmscsim.h b/drivers/scsi/tmscsim.h
index d4495272fb4..9b66fa8d38d 100644
--- a/drivers/scsi/tmscsim.h
+++ b/drivers/scsi/tmscsim.h
@@ -9,7 +9,6 @@
9#define _TMSCSIM_H 9#define _TMSCSIM_H
10 10
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/config.h>
13 12
14#define SCSI_IRQ_NONE 255 13#define SCSI_IRQ_NONE 255
15 14
diff --git a/drivers/scsi/u14-34f.c b/drivers/scsi/u14-34f.c
index 33cd90fc657..57449611e71 100644
--- a/drivers/scsi/u14-34f.c
+++ b/drivers/scsi/u14-34f.c
@@ -405,7 +405,6 @@
405 * the driver sets host->wish_block = TRUE for all ISA boards. 405 * the driver sets host->wish_block = TRUE for all ISA boards.
406 */ 406 */
407 407
408#include <linux/config.h>
409#include <linux/string.h> 408#include <linux/string.h>
410#include <linux/kernel.h> 409#include <linux/kernel.h>
411#include <linux/ioport.h> 410#include <linux/ioport.h>
@@ -873,7 +872,7 @@ static int port_detect \
873 872
874 /* Board detected, allocate its IRQ */ 873 /* Board detected, allocate its IRQ */
875 if (request_irq(irq, do_interrupt_handler, 874 if (request_irq(irq, do_interrupt_handler,
876 SA_INTERRUPT | ((subversion == ESA) ? SA_SHIRQ : 0), 875 IRQF_DISABLED | ((subversion == ESA) ? IRQF_SHARED : 0),
877 driver_name, (void *) &sha[j])) { 876 driver_name, (void *) &sha[j])) {
878 printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq); 877 printk("%s: unable to allocate IRQ %u, detaching.\n", name, irq);
879 goto freelock; 878 goto freelock;
diff --git a/drivers/scsi/wd33c93.c b/drivers/scsi/wd33c93.c
index 27307fe5a4c..680f38ab60d 100644
--- a/drivers/scsi/wd33c93.c
+++ b/drivers/scsi/wd33c93.c
@@ -71,7 +71,6 @@
71 * Richard Hirst <richard@sleepie.demon.co.uk> August 2000 71 * Richard Hirst <richard@sleepie.demon.co.uk> August 2000
72 */ 72 */
73 73
74#include <linux/config.h>
75#include <linux/module.h> 74#include <linux/module.h>
76 75
77#include <linux/sched.h> 76#include <linux/sched.h>
diff --git a/drivers/scsi/wd33c93.h b/drivers/scsi/wd33c93.h
index 193ec517d25..edcb0365cf0 100644
--- a/drivers/scsi/wd33c93.h
+++ b/drivers/scsi/wd33c93.h
@@ -22,7 +22,6 @@
22#ifndef WD33C93_H 22#ifndef WD33C93_H
23#define WD33C93_H 23#define WD33C93_H
24 24
25#include <linux/config.h>
26 25
27#define PROC_INTERFACE /* add code for /proc/scsi/wd33c93/xxx interface */ 26#define PROC_INTERFACE /* add code for /proc/scsi/wd33c93/xxx interface */
28#ifdef PROC_INTERFACE 27#ifdef PROC_INTERFACE
diff --git a/drivers/scsi/wd7000.c b/drivers/scsi/wd7000.c
index 574955b78a2..a0b61af48f1 100644
--- a/drivers/scsi/wd7000.c
+++ b/drivers/scsi/wd7000.c
@@ -1250,7 +1250,7 @@ static int wd7000_init(Adapter * host)
1250 return 0; 1250 return 0;
1251 1251
1252 1252
1253 if (request_irq(host->irq, wd7000_intr, SA_INTERRUPT, "wd7000", host)) { 1253 if (request_irq(host->irq, wd7000_intr, IRQF_DISABLED, "wd7000", host)) {
1254 printk("wd7000_init: can't get IRQ %d.\n", host->irq); 1254 printk("wd7000_init: can't get IRQ %d.\n", host->irq);
1255 return (0); 1255 return (0);
1256 } 1256 }
diff --git a/drivers/scsi/zalon.c b/drivers/scsi/zalon.c
index a6cfbb3b361..4b5f908d35c 100644
--- a/drivers/scsi/zalon.c
+++ b/drivers/scsi/zalon.c
@@ -136,7 +136,7 @@ zalon_probe(struct parisc_device *dev)
136 if (!host) 136 if (!host)
137 goto fail; 137 goto fail;
138 138
139 if (request_irq(dev->irq, ncr53c8xx_intr, SA_SHIRQ, "zalon", host)) { 139 if (request_irq(dev->irq, ncr53c8xx_intr, IRQF_SHARED, "zalon", host)) {
140 printk(KERN_ERR "%s: irq problem with %d, detaching\n ", 140 printk(KERN_ERR "%s: irq problem with %d, detaching\n ",
141 dev->dev.bus_id, dev->irq); 141 dev->dev.bus_id, dev->irq);
142 goto fail; 142 goto fail;
diff --git a/drivers/serial/21285.c b/drivers/serial/21285.c
index 9fd0de4b7af..57438326b07 100644
--- a/drivers/serial/21285.c
+++ b/drivers/serial/21285.c
@@ -7,7 +7,6 @@
7 * 7 *
8 * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $ 8 * $Id: 21285.c,v 1.37 2002/07/28 10:03:27 rmk Exp $
9 */ 9 */
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/tty.h> 11#include <linux/tty.h>
13#include <linux/ioport.h> 12#include <linux/ioport.h>
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c
index bff94541991..993a702422e 100644
--- a/drivers/serial/68328serial.c
+++ b/drivers/serial/68328serial.c
@@ -23,7 +23,6 @@
23#include <linux/interrupt.h> 23#include <linux/interrupt.h>
24#include <linux/tty.h> 24#include <linux/tty.h>
25#include <linux/tty_flip.h> 25#include <linux/tty_flip.h>
26#include <linux/config.h>
27#include <linux/major.h> 26#include <linux/major.h>
28#include <linux/string.h> 27#include <linux/string.h>
29#include <linux/fcntl.h> 28#include <linux/fcntl.h>
diff --git a/drivers/serial/68328serial.h b/drivers/serial/68328serial.h
index 978f8a609f3..58aa2154655 100644
--- a/drivers/serial/68328serial.h
+++ b/drivers/serial/68328serial.h
@@ -11,7 +11,6 @@
11#ifndef _MC683XX_SERIAL_H 11#ifndef _MC683XX_SERIAL_H
12#define _MC683XX_SERIAL_H 12#define _MC683XX_SERIAL_H
13 13
14#include <linux/config.h>
15 14
16struct serial_struct { 15struct serial_struct {
17 int type; 16 int type;
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c
index 9843ae3d420..e80e70e9b12 100644
--- a/drivers/serial/68360serial.c
+++ b/drivers/serial/68360serial.c
@@ -20,7 +20,6 @@
20 * int rs_360_init(void); 20 * int rs_360_init(void);
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
26#include <linux/signal.h> 25#include <linux/signal.h>
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index f361b356bd1..0995430e4cf 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -19,7 +19,6 @@
19 * mapbase is the physical address of the IO port. 19 * mapbase is the physical address of the IO port.
20 * membase is an 'ioremapped' cookie. 20 * membase is an 'ioremapped' cookie.
21 */ 21 */
22#include <linux/config.h>
23 22
24#if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 23#if defined(CONFIG_SERIAL_8250_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
25#define SUPPORT_SYSRQ 24#define SUPPORT_SYSRQ
@@ -49,7 +48,7 @@
49 48
50/* 49/*
51 * Configuration: 50 * Configuration:
52 * share_irqs - whether we pass SA_SHIRQ to request_irq(). This option 51 * share_irqs - whether we pass IRQF_SHARED to request_irq(). This option
53 * is unsafe when used on edge-triggered interrupts. 52 * is unsafe when used on edge-triggered interrupts.
54 */ 53 */
55static unsigned int share_irqs = SERIAL8250_SHARE_IRQS; 54static unsigned int share_irqs = SERIAL8250_SHARE_IRQS;
@@ -1401,7 +1400,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_8250_port *up)
1401static int serial_link_irq_chain(struct uart_8250_port *up) 1400static int serial_link_irq_chain(struct uart_8250_port *up)
1402{ 1401{
1403 struct irq_info *i = irq_lists + up->port.irq; 1402 struct irq_info *i = irq_lists + up->port.irq;
1404 int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; 1403 int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0;
1405 1404
1406 spin_lock_irq(&i->lock); 1405 spin_lock_irq(&i->lock);
1407 1406
diff --git a/drivers/serial/8250.h b/drivers/serial/8250.h
index 490606b8709..91bd28f2bb4 100644
--- a/drivers/serial/8250.h
+++ b/drivers/serial/8250.h
@@ -15,7 +15,6 @@
15 * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $ 15 * $Id: 8250.h,v 1.8 2002/07/21 21:32:30 rmk Exp $
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/serial_8250.h> 18#include <linux/serial_8250.h>
20 19
21struct old_serial_port { 20struct old_serial_port {
diff --git a/drivers/serial/8250_mca.c b/drivers/serial/8250_mca.c
index ac205256d5f..d10be944ad4 100644
--- a/drivers/serial/8250_mca.c
+++ b/drivers/serial/8250_mca.c
@@ -8,7 +8,6 @@
8 * it under the terms of the GNU General Public License version 2 as 8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/mca.h> 13#include <linux/mca.h>
diff --git a/drivers/serial/amba-pl010.c b/drivers/serial/amba-pl010.c
index e920d196d0b..7311d8487c9 100644
--- a/drivers/serial/amba-pl010.c
+++ b/drivers/serial/amba-pl010.c
@@ -31,7 +31,6 @@
31 * required, these have to be supplied via some other means (eg, GPIO) 31 * required, these have to be supplied via some other means (eg, GPIO)
32 * and hooked into this driver. 32 * and hooked into this driver.
33 */ 33 */
34#include <linux/config.h>
35 34
36#if defined(CONFIG_SERIAL_AMBA_PL010_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 35#if defined(CONFIG_SERIAL_AMBA_PL010_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
37#define SUPPORT_SYSRQ 36#define SUPPORT_SYSRQ
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c
index 3d966cfc9a3..a8d7124e84a 100644
--- a/drivers/serial/amba-pl011.c
+++ b/drivers/serial/amba-pl011.c
@@ -31,7 +31,6 @@
31 * required, these have to be supplied via some other means (eg, GPIO) 31 * required, these have to be supplied via some other means (eg, GPIO)
32 * and hooked into this driver. 32 * and hooked into this driver.
33 */ 33 */
34#include <linux/config.h>
35 34
36#if defined(CONFIG_SERIAL_AMBA_PL011_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 35#if defined(CONFIG_SERIAL_AMBA_PL011_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
37#define SUPPORT_SYSRQ 36#define SUPPORT_SYSRQ
diff --git a/drivers/serial/at91_serial.c b/drivers/serial/at91_serial.c
index df9500bdade..a7d664383da 100644
--- a/drivers/serial/at91_serial.c
+++ b/drivers/serial/at91_serial.c
@@ -22,7 +22,6 @@
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 * 23 *
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/tty.h> 26#include <linux/tty.h>
28#include <linux/ioport.h> 27#include <linux/ioport.h>
@@ -388,7 +387,7 @@ static int at91_startup(struct uart_port *port)
388 /* 387 /*
389 * Allocate the IRQ 388 * Allocate the IRQ
390 */ 389 */
391 retval = request_irq(port->irq, at91_interrupt, SA_SHIRQ, "at91_serial", port); 390 retval = request_irq(port->irq, at91_interrupt, IRQF_SHARED, "at91_serial", port);
392 if (retval) { 391 if (retval) {
393 printk("at91_serial: at91_startup - Can't get irq\n"); 392 printk("at91_serial: at91_startup - Can't get irq\n");
394 return retval; 393 return retval;
diff --git a/drivers/serial/clps711x.c b/drivers/serial/clps711x.c
index 2691112c84a..f27d852ce50 100644
--- a/drivers/serial/clps711x.c
+++ b/drivers/serial/clps711x.c
@@ -25,7 +25,6 @@
25 * $Id: clps711x.c,v 1.42 2002/07/28 10:03:28 rmk Exp $ 25 * $Id: clps711x.c,v 1.42 2002/07/28 10:03:28 rmk Exp $
26 * 26 *
27 */ 27 */
28#include <linux/config.h>
29 28
30#if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 29#if defined(CONFIG_SERIAL_CLPS711X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
31#define SUPPORT_SYSRQ 30#define SUPPORT_SYSRQ
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 5cba59ad7dc..90ff96e3339 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -31,7 +31,6 @@
31 * 31 *
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/tty.h> 35#include <linux/tty.h>
37#include <linux/ioport.h> 36#include <linux/ioport.h>
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm1.c b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
index 17406a05ce1..95afc37297a 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm1.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm1.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/tty.h> 31#include <linux/tty.h>
33#include <linux/ioport.h> 32#include <linux/ioport.h>
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
index cdba128250a..ef3bb476c43 100644
--- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c
+++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/tty.h> 31#include <linux/tty.h>
33#include <linux/ioport.h> 32#include <linux/ioport.h>
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c
index b84137cdeb2..cabd048c863 100644
--- a/drivers/serial/crisv10.c
+++ b/drivers/serial/crisv10.c
@@ -415,7 +415,7 @@
415 * Fixed DEF_TX value that caused the serial transmitter pin (txd) to go to 0 when 415 * Fixed DEF_TX value that caused the serial transmitter pin (txd) to go to 0 when
416 * closing the last filehandle, NASTY!. 416 * closing the last filehandle, NASTY!.
417 * Added break generation, not tested though! 417 * Added break generation, not tested though!
418 * Use SA_SHIRQ when request_irq() for ser2 and ser3 (shared with) par0 and par1. 418 * Use IRQF_SHARED when request_irq() for ser2 and ser3 (shared with) par0 and par1.
419 * You can't use them at the same time (yet..), but you can hopefully switch 419 * You can't use them at the same time (yet..), but you can hopefully switch
420 * between ser2/par0, ser3/par1 with the same kernel config. 420 * between ser2/par0, ser3/par1 with the same kernel config.
421 * Replaced some magic constants with defines 421 * Replaced some magic constants with defines
@@ -425,7 +425,6 @@
425 425
426static char *serial_version = "$Revision: 1.25 $"; 426static char *serial_version = "$Revision: 1.25 $";
427 427
428#include <linux/config.h>
429#include <linux/types.h> 428#include <linux/types.h>
430#include <linux/errno.h> 429#include <linux/errno.h>
431#include <linux/signal.h> 430#include <linux/signal.h>
@@ -4943,55 +4942,55 @@ rs_init(void)
4943 /* Not needed in simulator. May only complicate stuff. */ 4942 /* Not needed in simulator. May only complicate stuff. */
4944 /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */ 4943 /* hook the irq's for DMA channel 6 and 7, serial output and input, and some more... */
4945 4944
4946 if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial ", NULL)) 4945 if (request_irq(SERIAL_IRQ_NBR, ser_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial ", NULL))
4947 panic("irq8"); 4946 panic("irq8");
4948 4947
4949#ifdef CONFIG_ETRAX_SERIAL_PORT0 4948#ifdef CONFIG_ETRAX_SERIAL_PORT0
4950#ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT 4949#ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA6_OUT
4951 if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 0 dma tr", NULL)) 4950 if (request_irq(SER0_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 0 dma tr", NULL))
4952 panic("irq22"); 4951 panic("irq22");
4953#endif 4952#endif
4954#ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN 4953#ifdef CONFIG_ETRAX_SERIAL_PORT0_DMA7_IN
4955 if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 0 dma rec", NULL)) 4954 if (request_irq(SER0_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 0 dma rec", NULL))
4956 panic("irq23"); 4955 panic("irq23");
4957#endif 4956#endif
4958#endif 4957#endif
4959 4958
4960#ifdef CONFIG_ETRAX_SERIAL_PORT1 4959#ifdef CONFIG_ETRAX_SERIAL_PORT1
4961#ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA8_OUT 4960#ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA8_OUT
4962 if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, SA_INTERRUPT, "serial 1 dma tr", NULL)) 4961 if (request_irq(SER1_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_DISABLED, "serial 1 dma tr", NULL))
4963 panic("irq24"); 4962 panic("irq24");
4964#endif 4963#endif
4965#ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA9_IN 4964#ifdef CONFIG_ETRAX_SERIAL_PORT1_DMA9_IN
4966 if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, SA_INTERRUPT, "serial 1 dma rec", NULL)) 4965 if (request_irq(SER1_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_DISABLED, "serial 1 dma rec", NULL))
4967 panic("irq25"); 4966 panic("irq25");
4968#endif 4967#endif
4969#endif 4968#endif
4970#ifdef CONFIG_ETRAX_SERIAL_PORT2 4969#ifdef CONFIG_ETRAX_SERIAL_PORT2
4971 /* DMA Shared with par0 (and SCSI0 and ATA) */ 4970 /* DMA Shared with par0 (and SCSI0 and ATA) */
4972#ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT 4971#ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA2_OUT
4973 if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma tr", NULL)) 4972 if (request_irq(SER2_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma tr", NULL))
4974 panic("irq18"); 4973 panic("irq18");
4975#endif 4974#endif
4976#ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN 4975#ifdef CONFIG_ETRAX_SERIAL_PORT2_DMA3_IN
4977 if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 2 dma rec", NULL)) 4976 if (request_irq(SER2_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 2 dma rec", NULL))
4978 panic("irq19"); 4977 panic("irq19");
4979#endif 4978#endif
4980#endif 4979#endif
4981#ifdef CONFIG_ETRAX_SERIAL_PORT3 4980#ifdef CONFIG_ETRAX_SERIAL_PORT3
4982 /* DMA Shared with par1 (and SCSI1 and Extern DMA 0) */ 4981 /* DMA Shared with par1 (and SCSI1 and Extern DMA 0) */
4983#ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT 4982#ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA4_OUT
4984 if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma tr", NULL)) 4983 if (request_irq(SER3_DMA_TX_IRQ_NBR, tr_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma tr", NULL))
4985 panic("irq20"); 4984 panic("irq20");
4986#endif 4985#endif
4987#ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN 4986#ifdef CONFIG_ETRAX_SERIAL_PORT3_DMA5_IN
4988 if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, SA_SHIRQ | SA_INTERRUPT, "serial 3 dma rec", NULL)) 4987 if (request_irq(SER3_DMA_RX_IRQ_NBR, rec_interrupt, IRQF_SHARED | IRQF_DISABLED, "serial 3 dma rec", NULL))
4989 panic("irq21"); 4988 panic("irq21");
4990#endif 4989#endif
4991#endif 4990#endif
4992 4991
4993#ifdef CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST 4992#ifdef CONFIG_ETRAX_SERIAL_FLUSH_DMA_FAST
4994 if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, SA_SHIRQ | SA_INTERRUPT, 4993 if (request_irq(TIMER1_IRQ_NBR, timeout_interrupt, IRQF_SHARED | IRQF_DISABLED,
4995 "fast serial dma timeout", NULL)) { 4994 "fast serial dma timeout", NULL)) {
4996 printk(KERN_CRIT "err: timer1 irq\n"); 4995 printk(KERN_CRIT "err: timer1 irq\n");
4997 } 4996 }
diff --git a/drivers/serial/crisv10.h b/drivers/serial/crisv10.h
index 1800c0e7531..f30b93d6ef7 100644
--- a/drivers/serial/crisv10.h
+++ b/drivers/serial/crisv10.h
@@ -7,7 +7,6 @@
7#ifndef _ETRAX_SERIAL_H 7#ifndef _ETRAX_SERIAL_H
8#define _ETRAX_SERIAL_H 8#define _ETRAX_SERIAL_H
9 9
10#include <linux/config.h>
11#include <linux/circ_buf.h> 10#include <linux/circ_buf.h>
12#include <asm/termios.h> 11#include <asm/termios.h>
13 12
diff --git a/drivers/serial/dz.c b/drivers/serial/dz.c
index 466d06cc7d3..d119c8296a7 100644
--- a/drivers/serial/dz.c
+++ b/drivers/serial/dz.c
@@ -26,7 +26,6 @@
26 26
27#undef DEBUG_DZ 27#undef DEBUG_DZ
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/interrupt.h> 30#include <linux/interrupt.h>
32#include <linux/init.h> 31#include <linux/init.h>
@@ -798,7 +797,7 @@ int __init dz_init(void)
798 restore_flags(flags); 797 restore_flags(flags);
799 798
800 if (request_irq(dz_ports[0].port.irq, dz_interrupt, 799 if (request_irq(dz_ports[0].port.irq, dz_interrupt,
801 SA_INTERRUPT, "DZ", &dz_ports[0])) 800 IRQF_DISABLED, "DZ", &dz_ports[0]))
802 panic("Unable to register DZ interrupt"); 801 panic("Unable to register DZ interrupt");
803 802
804 ret = uart_register_driver(&dz_reg); 803 ret = uart_register_driver(&dz_reg);
diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 144a7a352b2..a3c00a25214 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -24,7 +24,6 @@
24 */ 24 */
25#define SERIAL_DO_RESTART 25#define SERIAL_DO_RESTART
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/signal.h> 29#include <linux/signal.h>
@@ -1564,7 +1563,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
1564 1563
1565 /* save off irq and request irq line */ 1564 /* save off irq and request irq line */
1566 if ( (retval = request_irq(dev->irq, icom_interrupt, 1565 if ( (retval = request_irq(dev->irq, icom_interrupt,
1567 SA_INTERRUPT | SA_SHIRQ, ICOM_DRIVER_NAME, 1566 IRQF_DISABLED | IRQF_SHARED, ICOM_DRIVER_NAME,
1568 (void *) icom_adapter))) { 1567 (void *) icom_adapter))) {
1569 goto probe_exit2; 1568 goto probe_exit2;
1570 } 1569 }
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index da85bafa094..4a142d6b8f3 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -25,7 +25,6 @@
25 * [29-Mar-2005] Mike Lee 25 * [29-Mar-2005] Mike Lee
26 * Added hardware handshake 26 * Added hardware handshake
27 */ 27 */
28#include <linux/config.h>
29 28
30#if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 29#if defined(CONFIG_SERIAL_IMX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
31#define SUPPORT_SYSRQ 30#define SUPPORT_SYSRQ
@@ -405,7 +404,7 @@ static int imx_startup(struct uart_port *port)
405 if (retval) goto error_out2; 404 if (retval) goto error_out2;
406 405
407 retval = request_irq(sport->rtsirq, imx_rtsint, 406 retval = request_irq(sport->rtsirq, imx_rtsint,
408 SA_TRIGGER_FALLING | SA_TRIGGER_RISING, 407 IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
409 DRIVER_NAME, sport); 408 DRIVER_NAME, sport);
410 if (retval) goto error_out3; 409 if (retval) goto error_out3;
411 410
diff --git a/drivers/serial/ioc4_serial.c b/drivers/serial/ioc4_serial.c
index 717e47bbd78..576ca1eaa2b 100644
--- a/drivers/serial/ioc4_serial.c
+++ b/drivers/serial/ioc4_serial.c
@@ -2855,7 +2855,7 @@ ioc4_serial_attach_one(struct ioc4_driver_data *idd)
2855 control->ic_soft = soft; 2855 control->ic_soft = soft;
2856 2856
2857 /* Hook up interrupt handler */ 2857 /* Hook up interrupt handler */
2858 if (!request_irq(idd->idd_pdev->irq, ioc4_intr, SA_SHIRQ, 2858 if (!request_irq(idd->idd_pdev->irq, ioc4_intr, IRQF_SHARED,
2859 "sgi-ioc4serial", soft)) { 2859 "sgi-ioc4serial", soft)) {
2860 control->ic_irq = idd->idd_pdev->irq; 2860 control->ic_irq = idd->idd_pdev->irq;
2861 } else { 2861 } else {
diff --git a/drivers/serial/ip22zilog.c b/drivers/serial/ip22zilog.c
index 56b093ecd77..342042889f6 100644
--- a/drivers/serial/ip22zilog.c
+++ b/drivers/serial/ip22zilog.c
@@ -12,7 +12,6 @@
12 * Copyright (C) 2002 Ralf Baechle (ralf@linux-mips.org) 12 * Copyright (C) 2002 Ralf Baechle (ralf@linux-mips.org)
13 * Copyright (C) 2002 David S. Miller (davem@redhat.com) 13 * Copyright (C) 2002 David S. Miller (davem@redhat.com)
14 */ 14 */
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c
index b3e1f71be4d..244f63be3a0 100644
--- a/drivers/serial/jsm/jsm_driver.c
+++ b/drivers/serial/jsm/jsm_driver.c
@@ -121,7 +121,7 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
121 } 121 }
122 122
123 rc = request_irq(brd->irq, brd->bd_ops->intr, 123 rc = request_irq(brd->irq, brd->bd_ops->intr,
124 SA_INTERRUPT|SA_SHIRQ, "JSM", brd); 124 IRQF_DISABLED|IRQF_SHARED, "JSM", brd);
125 if (rc) { 125 if (rc) {
126 printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq); 126 printk(KERN_WARNING "Failed to hook IRQ %d\n",brd->irq);
127 goto out_iounmap; 127 goto out_iounmap;
diff --git a/drivers/serial/m32r_sio.c b/drivers/serial/m32r_sio.c
index 6a2a25d9b59..e7fe4bb46ec 100644
--- a/drivers/serial/m32r_sio.c
+++ b/drivers/serial/m32r_sio.c
@@ -25,7 +25,6 @@
25 * membase is an 'ioremapped' cookie. This is compatible with the old 25 * membase is an 'ioremapped' cookie. This is compatible with the old
26 * serial.c driver, and is currently the preferred form. 26 * serial.c driver, and is currently the preferred form.
27 */ 27 */
28#include <linux/config.h>
29 28
30#if defined(CONFIG_SERIAL_M32R_SIO_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 29#if defined(CONFIG_SERIAL_M32R_SIO_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
31#define SUPPORT_SYSRQ 30#define SUPPORT_SYSRQ
@@ -543,7 +542,7 @@ static void serial_do_unlink(struct irq_info *i, struct uart_sio_port *up)
543static int serial_link_irq_chain(struct uart_sio_port *up) 542static int serial_link_irq_chain(struct uart_sio_port *up)
544{ 543{
545 struct irq_info *i = irq_lists + up->port.irq; 544 struct irq_info *i = irq_lists + up->port.irq;
546 int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? SA_SHIRQ : 0; 545 int ret, irq_flags = up->port.flags & UPF_SHARE_IRQ ? IRQF_SHARED : 0;
547 546
548 spin_lock_irq(&i->lock); 547 spin_lock_irq(&i->lock);
549 548
diff --git a/drivers/serial/m32r_sio.h b/drivers/serial/m32r_sio.h
index 7c3ec24f7e5..849f1b2c253 100644
--- a/drivers/serial/m32r_sio.h
+++ b/drivers/serial/m32r_sio.h
@@ -15,7 +15,6 @@
15 * (at your option) any later version. 15 * (at your option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19 18
20struct m32r_sio_probe { 19struct m32r_sio_probe {
21 struct module *owner; 20 struct module *owner;
diff --git a/drivers/serial/m32r_sio_reg.h b/drivers/serial/m32r_sio_reg.h
index 9c864529451..4671473793e 100644
--- a/drivers/serial/m32r_sio_reg.h
+++ b/drivers/serial/m32r_sio_reg.h
@@ -15,7 +15,6 @@
15#ifndef _M32R_SIO_REG_H 15#ifndef _M32R_SIO_REG_H
16#define _M32R_SIO_REG_H 16#define _M32R_SIO_REG_H
17 17
18#include <linux/config.h>
19 18
20#ifdef CONFIG_SERIAL_M32R_PLDSIO 19#ifdef CONFIG_SERIAL_M32R_PLDSIO
21 20
diff --git a/drivers/serial/mcfserial.c b/drivers/serial/mcfserial.c
index 29c0630e3e6..832abd3c470 100644
--- a/drivers/serial/mcfserial.c
+++ b/drivers/serial/mcfserial.c
@@ -1596,7 +1596,7 @@ static void mcfrs_irqinit(struct mcf_serial *info)
1596 /* Clear mask, so no surprise interrupts. */ 1596 /* Clear mask, so no surprise interrupts. */
1597 uartp[MCFUART_UIMR] = 0; 1597 uartp[MCFUART_UIMR] = 0;
1598 1598
1599 if (request_irq(info->irq, mcfrs_interrupt, SA_INTERRUPT, 1599 if (request_irq(info->irq, mcfrs_interrupt, IRQF_DISABLED,
1600 "ColdFire UART", NULL)) { 1600 "ColdFire UART", NULL)) {
1601 printk("MCFRS: Unable to attach ColdFire UART %d interrupt " 1601 printk("MCFRS: Unable to attach ColdFire UART %d interrupt "
1602 "vector=%d\n", info->line, info->irq); 1602 "vector=%d\n", info->line, info->irq);
diff --git a/drivers/serial/mcfserial.h b/drivers/serial/mcfserial.h
index a2b28e8629f..56420e2cb11 100644
--- a/drivers/serial/mcfserial.h
+++ b/drivers/serial/mcfserial.h
@@ -14,7 +14,6 @@
14#ifndef _MCF_SERIAL_H 14#ifndef _MCF_SERIAL_H
15#define _MCF_SERIAL_H 15#define _MCF_SERIAL_H
16 16
17#include <linux/config.h>
18#include <linux/serial.h> 17#include <linux/serial.h>
19 18
20#ifdef __KERNEL__ 19#ifdef __KERNEL__
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 1aa34844218..48eb22d3a63 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -44,7 +44,6 @@
44 * will be mapped to. 44 * will be mapped to.
45 */ 45 */
46 46
47#include <linux/config.h>
48#include <linux/platform_device.h> 47#include <linux/platform_device.h>
49#include <linux/module.h> 48#include <linux/module.h>
50#include <linux/tty.h> 49#include <linux/tty.h>
@@ -191,7 +190,7 @@ mpc52xx_uart_startup(struct uart_port *port)
191 190
192 /* Request IRQ */ 191 /* Request IRQ */
193 ret = request_irq(port->irq, mpc52xx_uart_int, 192 ret = request_irq(port->irq, mpc52xx_uart_int,
194 SA_INTERRUPT | SA_SAMPLE_RANDOM, "mpc52xx_psc_uart", port); 193 IRQF_DISABLED | IRQF_SAMPLE_RANDOM, "mpc52xx_psc_uart", port);
195 if (ret) 194 if (ret)
196 return ret; 195 return ret;
197 196
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c
index 1cd102f84bf..63d2a66e563 100644
--- a/drivers/serial/mpsc.c
+++ b/drivers/serial/mpsc.c
@@ -50,7 +50,6 @@
50 * 4) AFAICT, hardware flow control isn't supported by the controller --MAG. 50 * 4) AFAICT, hardware flow control isn't supported by the controller --MAG.
51 */ 51 */
52 52
53#include <linux/config.h>
54 53
55#if defined(CONFIG_SERIAL_MPSC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 54#if defined(CONFIG_SERIAL_MPSC_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
56#define SUPPORT_SYSRQ 55#define SUPPORT_SYSRQ
@@ -1413,7 +1412,7 @@ mpsc_startup(struct uart_port *port)
1413 1412
1414 /* If irq's are shared, need to set flag */ 1413 /* If irq's are shared, need to set flag */
1415 if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq) 1414 if (mpsc_ports[0].port.irq == mpsc_ports[1].port.irq)
1416 flag = SA_SHIRQ; 1415 flag = IRQF_SHARED;
1417 1416
1418 if (request_irq(pi->port.irq, mpsc_sdma_intr, flag, 1417 if (request_irq(pi->port.irq, mpsc_sdma_intr, flag,
1419 "mpsc-sdma", pi)) 1418 "mpsc-sdma", pi))
diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c
index 64c0e89124c..4a1c9983f38 100644
--- a/drivers/serial/mux.c
+++ b/drivers/serial/mux.c
@@ -16,7 +16,6 @@
16** 16**
17*/ 17*/
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/tty.h> 20#include <linux/tty.h>
22#include <linux/ioport.h> 21#include <linux/ioport.h>
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index e3ba7e17a24..459c0231aef 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -42,7 +42,6 @@
42#undef DEBUG_HARD 42#undef DEBUG_HARD
43#undef USE_CTRL_O_SYSRQ 43#undef USE_CTRL_O_SYSRQ
44 44
45#include <linux/config.h>
46#include <linux/module.h> 45#include <linux/module.h>
47#include <linux/tty.h> 46#include <linux/tty.h>
48 47
@@ -935,7 +934,7 @@ static int pmz_startup(struct uart_port *port)
935 } 934 }
936 935
937 pmz_get_port_A(uap)->flags |= PMACZILOG_FLAG_IS_IRQ_ON; 936 pmz_get_port_A(uap)->flags |= PMACZILOG_FLAG_IS_IRQ_ON;
938 if (request_irq(uap->port.irq, pmz_interrupt, SA_SHIRQ, "PowerMac Zilog", uap)) { 937 if (request_irq(uap->port.irq, pmz_interrupt, IRQF_SHARED, "PowerMac Zilog", uap)) {
939 dev_err(&uap->dev->ofdev.dev, 938 dev_err(&uap->dev->ofdev.dev,
940 "Unable to register zs interrupt handler.\n"); 939 "Unable to register zs interrupt handler.\n");
941 pmz_set_scc_power(uap, 0); 940 pmz_set_scc_power(uap, 0);
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 0fa0ccc9ed2..a720953a404 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -24,7 +24,6 @@
24 * with the serial core maintainer satisfaction to appear soon. 24 * with the serial core maintainer satisfaction to appear soon.
25 */ 25 */
26 26
27#include <linux/config.h>
28 27
29#if defined(CONFIG_SERIAL_PXA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 28#if defined(CONFIG_SERIAL_PXA_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
30#define SUPPORT_SYSRQ 29#define SUPPORT_SYSRQ
@@ -390,7 +389,7 @@ static int serial_pxa_startup(struct uart_port *port)
390 389
391 /* 390 /*
392 * Finally, enable interrupts. Note: Modem status interrupts 391 * Finally, enable interrupts. Note: Modem status interrupts
393 * are set via set_termios(), which will be occuring imminently 392 * are set via set_termios(), which will be occurring imminently
394 * anyway, so we don't enable them here. 393 * anyway, so we don't enable them here.
395 */ 394 */
396 up->ier = UART_IER_RLSI | UART_IER_RDI | UART_IER_RTOIE | UART_IER_UUE; 395 up->ier = UART_IER_RLSI | UART_IER_RDI | UART_IER_RTOIE | UART_IER_UUE;
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 4c62ab949ec..392bffcf96e 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -55,7 +55,6 @@
55 * BJD, 04-Nov-2004 55 * BJD, 04-Nov-2004
56*/ 56*/
57 57
58#include <linux/config.h>
59 58
60#if defined(CONFIG_SERIAL_S3C2410_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 59#if defined(CONFIG_SERIAL_S3C2410_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
61#define SUPPORT_SYSRQ 60#define SUPPORT_SYSRQ
diff --git a/drivers/serial/sa1100.c b/drivers/serial/sa1100.c
index 8bbd8567669..db3486d3387 100644
--- a/drivers/serial/sa1100.c
+++ b/drivers/serial/sa1100.c
@@ -24,7 +24,6 @@
24 * $Id: sa1100.c,v 1.50 2002/07/29 14:41:04 rmk Exp $ 24 * $Id: sa1100.c,v 1.50 2002/07/29 14:41:04 rmk Exp $
25 * 25 *
26 */ 26 */
27#include <linux/config.h>
28 27
29#if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 28#if defined(CONFIG_SERIAL_SA1100_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
30#define SUPPORT_SYSRQ 29#define SUPPORT_SYSRQ
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 7dc1e67b685..c54af877439 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -22,7 +22,6 @@
22 * along with this program; if not, write to the Free Software 22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 */ 24 */
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/tty.h> 26#include <linux/tty.h>
28#include <linux/slab.h> 27#include <linux/slab.h>
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 2c70773543e..cbf260bc225 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -786,6 +786,7 @@ static struct pcmcia_device_id serial_ids[] = {
786 PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "COMpad4.cis"), 786 PCMCIA_DEVICE_CIS_PROD_ID12("ADVANTECH", "COMpad-32/85B-4", 0x96913a85, 0xcec8f102, "COMpad4.cis"),
787 PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "COMpad2.cis"), 787 PCMCIA_DEVICE_CIS_PROD_ID123("ADVANTECH", "COMpad-32/85", "1.0", 0x96913a85, 0x8fbe92ae, 0x0877b627, "COMpad2.cis"),
788 PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "RS-COM-2P.cis"), 788 PCMCIA_DEVICE_CIS_PROD_ID2("RS-COM 2P", 0xad20b156, "RS-COM-2P.cis"),
789 PCMCIA_DEVICE_CIS_MANF_CARD(0x0013, 0x0000, "GLOBETROTTER.cis"),
789 /* too generic */ 790 /* too generic */
790 /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */ 791 /* PCMCIA_MFC_DEVICE_MANF_CARD(0, 0x0160, 0x0002), */
791 /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */ 792 /* PCMCIA_MFC_DEVICE_MANF_CARD(1, 0x0160, 0x0002), */
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 776d4ff0608..23ddedbaec0 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31 30
32#if defined(CONFIG_SERIAL_LH7A40X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 31#if defined(CONFIG_SERIAL_LH7A40X_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
33#define SUPPORT_SYSRQ 32#define SUPPORT_SYSRQ
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c
index a901a7e446f..b361669f85a 100644
--- a/drivers/serial/serial_txx9.c
+++ b/drivers/serial/serial_txx9.c
@@ -38,7 +38,6 @@
38 * Fix some spin_locks. 38 * Fix some spin_locks.
39 * Do not call uart_add_one_port for absent ports. 39 * Do not call uart_add_one_port for absent ports.
40 */ 40 */
41#include <linux/config.h>
42 41
43#if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 42#if defined(CONFIG_SERIAL_TXX9_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
44#define SUPPORT_SYSRQ 43#define SUPPORT_SYSRQ
@@ -496,7 +495,7 @@ static int serial_txx9_startup(struct uart_port *port)
496 sio_out(up, TXX9_SIDISR, 0); 495 sio_out(up, TXX9_SIDISR, 0);
497 496
498 retval = request_irq(up->port.irq, serial_txx9_interrupt, 497 retval = request_irq(up->port.irq, serial_txx9_interrupt,
499 SA_SHIRQ, "serial_txx9", up); 498 IRQF_SHARED, "serial_txx9", up);
500 if (retval) 499 if (retval)
501 return retval; 500 return retval;
502 501
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index d97f3ca6cc2..301573373c3 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -20,7 +20,6 @@
20 20
21#undef DEBUG 21#undef DEBUG
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
26#include <linux/signal.h> 25#include <linux/signal.h>
@@ -842,7 +841,7 @@ static int sci_request_irq(struct sci_port *port)
842 printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n"); 841 printk(KERN_ERR "sci: Cannot allocate irq.(IRQ=0)\n");
843 return -ENODEV; 842 return -ENODEV;
844 } 843 }
845 if (request_irq(port->irqs[0], sci_mpxed_interrupt, SA_INTERRUPT, 844 if (request_irq(port->irqs[0], sci_mpxed_interrupt, IRQF_DISABLED,
846 "sci", port)) { 845 "sci", port)) {
847 printk(KERN_ERR "sci: Cannot allocate irq.\n"); 846 printk(KERN_ERR "sci: Cannot allocate irq.\n");
848 return -ENODEV; 847 return -ENODEV;
@@ -851,7 +850,7 @@ static int sci_request_irq(struct sci_port *port)
851 for (i = 0; i < ARRAY_SIZE(handlers); i++) { 850 for (i = 0; i < ARRAY_SIZE(handlers); i++) {
852 if (!port->irqs[i]) 851 if (!port->irqs[i])
853 continue; 852 continue;
854 if (request_irq(port->irqs[i], handlers[i], SA_INTERRUPT, 853 if (request_irq(port->irqs[i], handlers[i], IRQF_DISABLED,
855 desc[i], port)) { 854 desc[i], port)) {
856 printk(KERN_ERR "sci: Cannot allocate irq.\n"); 855 printk(KERN_ERR "sci: Cannot allocate irq.\n");
857 return -ENODEV; 856 return -ENODEV;
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index 1f14bb4382f..ab320fa3237 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -10,7 +10,6 @@
10 * Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003). 10 * Modified to support SH7300(SH-Mobile) SCIF. Takashi Kusuda (Jun 2003).
11 * Modified to support H8/300 Series Yoshinori Sato (Feb 2004). 11 * Modified to support H8/300 Series Yoshinori Sato (Feb 2004).
12 */ 12 */
13#include <linux/config.h>
14#include <linux/serial_core.h> 13#include <linux/serial_core.h>
15 14
16#if defined(__H8300H__) || defined(__H8300S__) 15#if defined(__H8300H__) || defined(__H8300S__)
diff --git a/drivers/serial/sn_console.c b/drivers/serial/sn_console.c
index 60ea4a3f071..2f148e5b925 100644
--- a/drivers/serial/sn_console.c
+++ b/drivers/serial/sn_console.c
@@ -37,7 +37,6 @@
37 * http://oss.sgi.com/projects/GenInfo/NoticeExplan 37 * http://oss.sgi.com/projects/GenInfo/NoticeExplan
38 */ 38 */
39 39
40#include <linux/config.h>
41#include <linux/interrupt.h> 40#include <linux/interrupt.h>
42#include <linux/tty.h> 41#include <linux/tty.h>
43#include <linux/serial.h> 42#include <linux/serial.h>
@@ -649,7 +648,7 @@ static irqreturn_t sn_sal_interrupt(int irq, void *dev_id, struct pt_regs *regs)
649static int sn_sal_connect_interrupt(struct sn_cons_port *port) 648static int sn_sal_connect_interrupt(struct sn_cons_port *port)
650{ 649{
651 if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt, 650 if (request_irq(SGI_UART_VECTOR, sn_sal_interrupt,
652 SA_INTERRUPT | SA_SHIRQ, 651 IRQF_DISABLED | IRQF_SHARED,
653 "SAL console driver", port) >= 0) { 652 "SAL console driver", port) >= 0) {
654 return SGI_UART_VECTOR; 653 return SGI_UART_VECTOR;
655 } 654 }
diff --git a/drivers/serial/suncore.c b/drivers/serial/suncore.c
index fa4ae94243c..e35d9ab359f 100644
--- a/drivers/serial/suncore.c
+++ b/drivers/serial/suncore.c
@@ -10,7 +10,6 @@
10 * Copyright (C) 2002 David S. Miller (davem@redhat.com) 10 * Copyright (C) 2002 David S. Miller (davem@redhat.com)
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/console.h> 15#include <linux/console.h>
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index d36bc400339..f851f0f44f9 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -20,8 +20,8 @@
20 20
21#include <asm/hypervisor.h> 21#include <asm/hypervisor.h>
22#include <asm/spitfire.h> 22#include <asm/spitfire.h>
23#include <asm/vdev.h> 23#include <asm/prom.h>
24#include <asm/oplib.h> 24#include <asm/of_device.h>
25#include <asm/irq.h> 25#include <asm/irq.h>
26 26
27#if defined(CONFIG_MAGIC_SYSRQ) 27#if defined(CONFIG_MAGIC_SYSRQ)
@@ -407,144 +407,120 @@ static inline struct console *SUNHV_CONSOLE(void)
407 return &sunhv_console; 407 return &sunhv_console;
408} 408}
409 409
410static int __init hv_console_compatible(char *buf, int len) 410static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match)
411{
412 while (len) {
413 int this_len;
414
415 if (!strcmp(buf, "qcn"))
416 return 1;
417
418 this_len = strlen(buf) + 1;
419
420 buf += this_len;
421 len -= this_len;
422 }
423
424 return 0;
425}
426
427static unsigned int __init get_interrupt(void)
428{
429 struct device_node *dev_node;
430
431 dev_node = sun4v_vdev_root->child;
432 while (dev_node != NULL) {
433 struct property *prop;
434
435 if (strcmp(dev_node->name, "console"))
436 goto next_sibling;
437
438 prop = of_find_property(dev_node, "compatible", NULL);
439 if (!prop)
440 goto next_sibling;
441
442 if (hv_console_compatible(prop->value, prop->length))
443 break;
444
445 next_sibling:
446 dev_node = dev_node->sibling;
447 }
448 if (!dev_node)
449 return 0;
450
451 /* Ok, the this is the OBP node for the sun4v hypervisor
452 * console device. Decode the interrupt.
453 */
454 return sun4v_vdev_device_interrupt(dev_node);
455}
456
457static int __init sunhv_init(void)
458{ 411{
459 struct uart_port *port; 412 struct uart_port *port;
460 int ret; 413 int err;
461 414
462 if (tlb_type != hypervisor) 415 if (op->irqs[0] == 0xffffffff)
463 return -ENODEV; 416 return -ENODEV;
464 417
465 port = kmalloc(sizeof(struct uart_port), GFP_KERNEL); 418 port = kzalloc(sizeof(struct uart_port), GFP_KERNEL);
466 if (unlikely(!port)) 419 if (unlikely(!port))
467 return -ENOMEM; 420 return -ENOMEM;
468 421
469 memset(port, 0, sizeof(struct uart_port)); 422 sunhv_port = port;
470 423
471 port->line = 0; 424 port->line = 0;
472 port->ops = &sunhv_pops; 425 port->ops = &sunhv_pops;
473 port->type = PORT_SUNHV; 426 port->type = PORT_SUNHV;
474 port->uartclk = ( 29491200 / 16 ); /* arbitrary */ 427 port->uartclk = ( 29491200 / 16 ); /* arbitrary */
475 428
476 /* Set this just to make uart_configure_port() happy. */
477 port->membase = (unsigned char __iomem *) __pa(port); 429 port->membase = (unsigned char __iomem *) __pa(port);
478 430
479 port->irq = get_interrupt(); 431 port->irq = op->irqs[0];
480 if (!port->irq) { 432
481 kfree(port); 433 port->dev = &op->dev;
482 return -ENODEV;
483 }
484 434
485 sunhv_reg.minor = sunserial_current_minor; 435 sunhv_reg.minor = sunserial_current_minor;
486 sunhv_reg.nr = 1; 436 sunhv_reg.nr = 1;
487 437
488 ret = uart_register_driver(&sunhv_reg); 438 err = uart_register_driver(&sunhv_reg);
489 if (ret < 0) { 439 if (err)
490 printk(KERN_ERR "SUNHV: uart_register_driver() failed %d\n", 440 goto out_free_port;
491 ret);
492 kfree(port);
493
494 return ret;
495 }
496 441
497 sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64; 442 sunhv_reg.tty_driver->name_base = sunhv_reg.minor - 64;
498 sunserial_current_minor += 1; 443 sunserial_current_minor += 1;
499 444
500 sunhv_reg.cons = SUNHV_CONSOLE(); 445 sunhv_reg.cons = SUNHV_CONSOLE();
501 446
502 sunhv_port = port; 447 err = uart_add_one_port(&sunhv_reg, port);
448 if (err)
449 goto out_unregister_driver;
503 450
504 ret = uart_add_one_port(&sunhv_reg, port); 451 err = request_irq(port->irq, sunhv_interrupt, 0, "hvcons", port);
505 if (ret < 0) { 452 if (err)
506 printk(KERN_ERR "SUNHV: uart_add_one_port() failed %d\n", ret); 453 goto out_remove_port;
507 sunserial_current_minor -= 1;
508 uart_unregister_driver(&sunhv_reg);
509 kfree(port);
510 sunhv_port = NULL;
511 return -ENODEV;
512 }
513 454
514 if (request_irq(port->irq, sunhv_interrupt, 455 dev_set_drvdata(&op->dev, port);
515 SA_SHIRQ, "serial(sunhv)", port)) {
516 printk(KERN_ERR "sunhv: Cannot register IRQ\n");
517 uart_remove_one_port(&sunhv_reg, port);
518 sunserial_current_minor -= 1;
519 uart_unregister_driver(&sunhv_reg);
520 kfree(port);
521 sunhv_port = NULL;
522 return -ENODEV;
523 }
524 456
525 return 0; 457 return 0;
458
459out_remove_port:
460 uart_remove_one_port(&sunhv_reg, port);
461
462out_unregister_driver:
463 sunserial_current_minor -= 1;
464 uart_unregister_driver(&sunhv_reg);
465
466out_free_port:
467 kfree(port);
468 sunhv_port = NULL;
469 return err;
526} 470}
527 471
528static void __exit sunhv_exit(void) 472static int __devexit hv_remove(struct of_device *dev)
529{ 473{
530 struct uart_port *port = sunhv_port; 474 struct uart_port *port = dev_get_drvdata(&dev->dev);
531
532 BUG_ON(!port);
533 475
534 free_irq(port->irq, port); 476 free_irq(port->irq, port);
535 477
536 uart_remove_one_port(&sunhv_reg, port); 478 uart_remove_one_port(&sunhv_reg, port);
537 sunserial_current_minor -= 1;
538 479
480 sunserial_current_minor -= 1;
539 uart_unregister_driver(&sunhv_reg); 481 uart_unregister_driver(&sunhv_reg);
540 482
541 kfree(sunhv_port); 483 kfree(port);
542 sunhv_port = NULL; 484 sunhv_port = NULL;
485
486 dev_set_drvdata(&dev->dev, NULL);
487
488 return 0;
489}
490
491static struct of_device_id hv_match[] = {
492 {
493 .name = "console",
494 .compatible = "qcn",
495 },
496 {},
497};
498MODULE_DEVICE_TABLE(of, hv_match);
499
500static struct of_platform_driver hv_driver = {
501 .name = "hv",
502 .match_table = hv_match,
503 .probe = hv_probe,
504 .remove = __devexit_p(hv_remove),
505};
506
507static int __init sunhv_init(void)
508{
509 if (tlb_type != hypervisor)
510 return -ENODEV;
511
512 return of_register_driver(&hv_driver, &of_bus_type);
513}
514
515static void __exit sunhv_exit(void)
516{
517 of_unregister_driver(&hv_driver);
543} 518}
544 519
545module_init(sunhv_init); 520module_init(sunhv_init);
546module_exit(sunhv_exit); 521module_exit(sunhv_exit);
547 522
548MODULE_AUTHOR("David S. Miller"); 523MODULE_AUTHOR("David S. Miller");
549MODULE_DESCRIPTION("SUN4V Hypervisor console driver") 524MODULE_DESCRIPTION("SUN4V Hypervisor console driver");
525MODULE_VERSION("2.0");
550MODULE_LICENSE("GPL"); 526MODULE_LICENSE("GPL");
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index 141fedbefbc..0dbd4df44c0 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -15,7 +15,6 @@
15 * David S. Miller <davem@davemloft.net> 15 * David S. Miller <davem@davemloft.net>
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
@@ -1028,7 +1027,7 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
1028 int err; 1027 int err;
1029 1028
1030 err = request_irq(up->port.irq, sunsab_interrupt, 1029 err = request_irq(up->port.irq, sunsab_interrupt,
1031 SA_SHIRQ, "sab", up); 1030 IRQF_SHARED, "sab", up);
1032 if (err) { 1031 if (err) {
1033 of_iounmap(up->port.membase, 1032 of_iounmap(up->port.membase,
1034 sizeof(union sab82532_async_regs)); 1033 sizeof(union sab82532_async_regs));
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 73a043b914e..f9013baba05 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -15,7 +15,6 @@
15 * David S. Miller (davem@davemloft.net), 2002-Jul-29 15 * David S. Miller (davem@davemloft.net), 2002-Jul-29
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
@@ -668,10 +667,10 @@ static int sunsu_startup(struct uart_port *port)
668 667
669 if (up->su_type != SU_PORT_PORT) { 668 if (up->su_type != SU_PORT_PORT) {
670 retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt, 669 retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt,
671 SA_SHIRQ, su_typev[up->su_type], up); 670 IRQF_SHARED, su_typev[up->su_type], up);
672 } else { 671 } else {
673 retval = request_irq(up->port.irq, sunsu_serial_interrupt, 672 retval = request_irq(up->port.irq, sunsu_serial_interrupt,
674 SA_SHIRQ, su_typev[up->su_type], up); 673 IRQF_SHARED, su_typev[up->su_type], up);
675 } 674 }
676 if (retval) { 675 if (retval) {
677 printk("su: Cannot register IRQ %d\n", up->port.irq); 676 printk("su: Cannot register IRQ %d\n", up->port.irq);
@@ -1439,6 +1438,8 @@ static int __devinit su_probe(struct of_device *op, const struct of_device_id *m
1439 err = sunsu_kbd_ms_init(up); 1438 err = sunsu_kbd_ms_init(up);
1440 if (err) 1439 if (err)
1441 goto out_unmap; 1440 goto out_unmap;
1441
1442 return 0;
1442 } 1443 }
1443 1444
1444 up->port.flags |= UPF_BOOT_AUTOCONF; 1445 up->port.flags |= UPF_BOOT_AUTOCONF;
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index 1caa286a6be..a1456d9352c 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -12,7 +12,6 @@
12 * Copyright (C) 2002, 2006 David S. Miller (davem@davemloft.net) 12 * Copyright (C) 2002, 2006 David S. Miller (davem@davemloft.net)
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
@@ -1355,7 +1354,7 @@ static int __devinit zs_probe(struct of_device *dev, const struct of_device_id *
1355 1354
1356 if (zilog_irq == -1) { 1355 if (zilog_irq == -1) {
1357 zilog_irq = op->irqs[0]; 1356 zilog_irq = op->irqs[0];
1358 err = request_irq(zilog_irq, sunzilog_interrupt, SA_SHIRQ, 1357 err = request_irq(zilog_irq, sunzilog_interrupt, IRQF_SHARED,
1359 "zs", sunzilog_irq_chain); 1358 "zs", sunzilog_irq_chain);
1360 if (err) { 1359 if (err) {
1361 of_iounmap(rp, sizeof(struct zilog_layout)); 1360 of_iounmap(rp, sizeof(struct zilog_layout));
diff --git a/drivers/serial/v850e_uart.c b/drivers/serial/v850e_uart.c
index a0da2aaf71c..f802867c95c 100644
--- a/drivers/serial/v850e_uart.c
+++ b/drivers/serial/v850e_uart.c
@@ -372,13 +372,13 @@ static int v850e_uart_startup (struct uart_port *port)
372 372
373 /* Alloc RX irq. */ 373 /* Alloc RX irq. */
374 err = request_irq (V850E_UART_RX_IRQ (port->line), v850e_uart_rx_irq, 374 err = request_irq (V850E_UART_RX_IRQ (port->line), v850e_uart_rx_irq,
375 SA_INTERRUPT, "v850e_uart", port); 375 IRQF_DISABLED, "v850e_uart", port);
376 if (err) 376 if (err)
377 return err; 377 return err;
378 378
379 /* Alloc TX irq. */ 379 /* Alloc TX irq. */
380 err = request_irq (V850E_UART_TX_IRQ (port->line), v850e_uart_tx_irq, 380 err = request_irq (V850E_UART_TX_IRQ (port->line), v850e_uart_tx_irq,
381 SA_INTERRUPT, "v850e_uart", port); 381 IRQF_DISABLED, "v850e_uart", port);
382 if (err) { 382 if (err) {
383 free_irq (V850E_UART_RX_IRQ (port->line), port); 383 free_irq (V850E_UART_RX_IRQ (port->line), port);
384 return err; 384 return err;
diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c
index 017571ffa19..e93d0edc2e0 100644
--- a/drivers/serial/vr41xx_siu.c
+++ b/drivers/serial/vr41xx_siu.c
@@ -19,7 +19,6 @@
19 * along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22#include <linux/config.h>
23 22
24#if defined(CONFIG_SERIAL_VR41XX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) 23#if defined(CONFIG_SERIAL_VR41XX_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ)
25#define SUPPORT_SYSRQ 24#define SUPPORT_SYSRQ
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c
index ed946311d3a..6c7e0352d56 100644
--- a/drivers/sn/ioc3.c
+++ b/drivers/sn/ioc3.c
@@ -7,7 +7,6 @@
7 * Pat Gefre <pfg@sgi.com> - IOC3 serial port IRQ demuxer 7 * Pat Gefre <pfg@sgi.com> - IOC3 serial port IRQ demuxer
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/pci.h> 12#include <linux/pci.h>
@@ -707,7 +706,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
707 writel(~0, &idd->vma->eisr); 706 writel(~0, &idd->vma->eisr);
708 707
709 idd->dual_irq = 1; 708 idd->dual_irq = 1;
710 if (!request_irq(pdev->irq, ioc3_intr_eth, SA_SHIRQ, 709 if (!request_irq(pdev->irq, ioc3_intr_eth, IRQF_SHARED,
711 "ioc3-eth", (void *)idd)) { 710 "ioc3-eth", (void *)idd)) {
712 idd->irq_eth = pdev->irq; 711 idd->irq_eth = pdev->irq;
713 } else { 712 } else {
@@ -715,7 +714,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
715 "%s : request_irq fails for IRQ 0x%x\n ", 714 "%s : request_irq fails for IRQ 0x%x\n ",
716 __FUNCTION__, pdev->irq); 715 __FUNCTION__, pdev->irq);
717 } 716 }
718 if (!request_irq(pdev->irq+2, ioc3_intr_io, SA_SHIRQ, 717 if (!request_irq(pdev->irq+2, ioc3_intr_io, IRQF_SHARED,
719 "ioc3-io", (void *)idd)) { 718 "ioc3-io", (void *)idd)) {
720 idd->irq_io = pdev->irq+2; 719 idd->irq_io = pdev->irq+2;
721 } else { 720 } else {
@@ -724,7 +723,7 @@ static int ioc3_probe(struct pci_dev *pdev, const struct pci_device_id *pci_id)
724 __FUNCTION__, pdev->irq+2); 723 __FUNCTION__, pdev->irq+2);
725 } 724 }
726 } else { 725 } else {
727 if (!request_irq(pdev->irq, ioc3_intr_io, SA_SHIRQ, 726 if (!request_irq(pdev->irq, ioc3_intr_io, IRQF_SHARED,
728 "ioc3", (void *)idd)) { 727 "ioc3", (void *)idd)) {
729 idd->irq_io = pdev->irq; 728 idd->irq_io = pdev->irq;
730 } else { 729 } else {
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
index dd2f950b21a..a23862ef72b 100644
--- a/drivers/spi/spi_bitbang.c
+++ b/drivers/spi/spi_bitbang.c
@@ -16,7 +16,6 @@
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/spinlock.h> 20#include <linux/spinlock.h>
22#include <linux/workqueue.h> 21#include <linux/workqueue.h>
diff --git a/drivers/spi/spi_butterfly.c b/drivers/spi/spi_butterfly.c
index a006a1ee27a..39d9b20f203 100644
--- a/drivers/spi/spi_butterfly.c
+++ b/drivers/spi/spi_butterfly.c
@@ -17,7 +17,6 @@
17 * along with this program; if not, write to the Free Software 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */ 19 */
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <linux/delay.h> 22#include <linux/delay.h>
diff --git a/drivers/tc/lk201.c b/drivers/tc/lk201.c
index cf10d5cdfb9..757dec9c7ee 100644
--- a/drivers/tc/lk201.c
+++ b/drivers/tc/lk201.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 2001, 2002, 2003, 2004 Maciej W. Rozycki 8 * Copyright (C) 2001, 2002, 2003, 2004 Maciej W. Rozycki
9 */ 9 */
10 10
11#include <linux/config.h>
12 11
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/drivers/tc/zs.c b/drivers/tc/zs.c
index 7f27b356eaf..5e8a27620f6 100644
--- a/drivers/tc/zs.c
+++ b/drivers/tc/zs.c
@@ -39,7 +39,6 @@
39 * is shared with DSRS(DTE) at pin 23. 39 * is shared with DSRS(DTE) at pin 23.
40 */ 40 */
41 41
42#include <linux/config.h>
43#include <linux/errno.h> 42#include <linux/errno.h>
44#include <linux/signal.h> 43#include <linux/signal.h>
45#include <linux/sched.h> 44#include <linux/sched.h>
@@ -1792,7 +1791,7 @@ int __init zs_init(void)
1792 zs_soft[channel].clk_divisor = 16; 1791 zs_soft[channel].clk_divisor = 16;
1793 zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]); 1792 zs_soft[channel].zs_baud = get_zsbaud(&zs_soft[channel]);
1794 1793
1795 if (request_irq(zs_soft[channel].irq, rs_interrupt, SA_SHIRQ, 1794 if (request_irq(zs_soft[channel].irq, rs_interrupt, IRQF_SHARED,
1796 "scc", &zs_soft[channel])) 1795 "scc", &zs_soft[channel]))
1797 printk(KERN_ERR "decserial: can't get irq %d\n", 1796 printk(KERN_ERR "decserial: can't get irq %d\n",
1798 zs_soft[channel].irq); 1797 zs_soft[channel].irq);
diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c
index ad742cec94f..f4f4ef0f377 100644
--- a/drivers/usb/core/buffer.c
+++ b/drivers/usb/core/buffer.c
@@ -5,7 +5,6 @@
5 * and should work with all USB controllers, regardles of bus type. 5 * and should work with all USB controllers, regardles of bus type.
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/slab.h> 10#include <linux/slab.h>
diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c
index a9d89c78cc2..4c9e63e665b 100644
--- a/drivers/usb/core/config.c
+++ b/drivers/usb/core/config.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/usb.h> 1#include <linux/usb.h>
3#include <linux/module.h> 2#include <linux/module.h>
4#include <linux/init.h> 3#include <linux/init.h>
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
index c196f384530..ec890650141 100644
--- a/drivers/usb/core/driver.c
+++ b/drivers/usb/core/driver.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/device.h> 24#include <linux/device.h>
26#include <linux/usb.h> 25#include <linux/usb.h>
27#include "hcd.h" 26#include "hcd.h"
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index f65b193cde3..abee0f5b6a6 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -15,7 +15,6 @@
15 * 15 *
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/spinlock.h> 19#include <linux/spinlock.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c
index 66b78404ab3..5078fb3375e 100644
--- a/drivers/usb/core/hcd-pci.c
+++ b/drivers/usb/core/hcd-pci.c
@@ -16,7 +16,6 @@
16 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/pci.h> 21#include <linux/pci.h>
@@ -126,7 +125,7 @@ int usb_hcd_pci_probe (struct pci_dev *dev, const struct pci_device_id *id)
126 125
127 pci_set_master (dev); 126 pci_set_master (dev);
128 127
129 retval = usb_add_hcd (hcd, dev->irq, SA_SHIRQ); 128 retval = usb_add_hcd (hcd, dev->irq, IRQF_SHARED);
130 if (retval != 0) 129 if (retval != 0)
131 goto err4; 130 goto err4;
132 return retval; 131 return retval;
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 4bf914d00a1..fb4d058bbde 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -22,7 +22,6 @@
22 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/version.h> 26#include <linux/version.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index e1731ff8af4..875596e98e4 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/module.h> 13#include <linux/module.h>
diff --git a/drivers/usb/core/inode.c b/drivers/usb/core/inode.c
index d0a208de32c..e47e3a8ed6e 100644
--- a/drivers/usb/core/inode.c
+++ b/drivers/usb/core/inode.c
@@ -27,7 +27,6 @@
27 27
28/*****************************************************************************/ 28/*****************************************************************************/
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/fs.h> 31#include <linux/fs.h>
33#include <linux/mount.h> 32#include <linux/mount.h>
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 8569600f313..4cc8d3e67db 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -2,7 +2,6 @@
2 * message.c - synchronous message handling 2 * message.c - synchronous message handling
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/pci.h> /* for scatterlist macros */ 5#include <linux/pci.h> /* for scatterlist macros */
7#include <linux/usb.h> 6#include <linux/usb.h>
8#include <linux/module.h> 7#include <linux/module.h>
diff --git a/drivers/usb/core/notify.c b/drivers/usb/core/notify.c
index fe0ed54fa0a..b042676af0a 100644
--- a/drivers/usb/core/notify.c
+++ b/drivers/usb/core/notify.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/notifier.h> 13#include <linux/notifier.h>
15#include <linux/usb.h> 14#include <linux/usb.h>
diff --git a/drivers/usb/core/sysfs.c b/drivers/usb/core/sysfs.c
index 3f49bf51cff..dec973affb0 100644
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12 12
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/usb.h> 14#include <linux/usb.h>
16#include "usb.h" 15#include "usb.h"
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index dad4d8fd818..9864988377c 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/string.h> 2#include <linux/string.h>
4#include <linux/bitops.h> 3#include <linux/bitops.h>
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index fb488c8a860..184c24660a4 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -21,7 +21,6 @@
21 * are evil. 21 * are evil.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/string.h> 25#include <linux/string.h>
27#include <linux/bitops.h> 26#include <linux/bitops.h>
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index b8d0b7825bf..1c459ff037c 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -25,7 +25,6 @@
25#undef VERBOSE 25#undef VERBOSE
26#undef PACKET_TRACE 26#undef PACKET_TRACE
27 27
28#include <linux/config.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/platform_device.h> 30#include <linux/platform_device.h>
@@ -1654,13 +1653,13 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
1654 pullup(udc, 0); 1653 pullup(udc, 0);
1655 1654
1656 /* request UDC and maybe VBUS irqs */ 1655 /* request UDC and maybe VBUS irqs */
1657 if (request_irq(AT91_ID_UDP, at91_udc_irq, SA_INTERRUPT, driver_name, udc)) { 1656 if (request_irq(AT91_ID_UDP, at91_udc_irq, IRQF_DISABLED, driver_name, udc)) {
1658 DBG("request irq %d failed\n", AT91_ID_UDP); 1657 DBG("request irq %d failed\n", AT91_ID_UDP);
1659 retval = -EBUSY; 1658 retval = -EBUSY;
1660 goto fail1; 1659 goto fail1;
1661 } 1660 }
1662 if (udc->board.vbus_pin > 0) { 1661 if (udc->board.vbus_pin > 0) {
1663 if (request_irq(udc->board.vbus_pin, at91_vbus_irq, SA_INTERRUPT, driver_name, udc)) { 1662 if (request_irq(udc->board.vbus_pin, at91_vbus_irq, IRQF_DISABLED, driver_name, udc)) {
1664 DBG("request vbus irq %d failed\n", udc->board.vbus_pin); 1663 DBG("request vbus irq %d failed\n", udc->board.vbus_pin);
1665 free_irq(AT91_ID_UDP, udc); 1664 free_irq(AT91_ID_UDP, udc);
1666 retval = -EBUSY; 1665 retval = -EBUSY;
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 42ce41d71b7..4be47195bd3 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -36,7 +36,6 @@
36 36
37#define DEBUG 37#define DEBUG
38 38
39#include <linux/config.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/kernel.h> 40#include <linux/kernel.h>
42#include <linux/delay.h> 41#include <linux/delay.h>
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
index 078daa02671..8320fcef042 100644
--- a/drivers/usb/gadget/ether.c
+++ b/drivers/usb/gadget/ether.c
@@ -23,7 +23,6 @@
23// #define DEBUG 1 23// #define DEBUG 1
24// #define VERBOSE 24// #define VERBOSE
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/delay.h> 28#include <linux/delay.h>
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index a43dc908ac5..b1a9cf06f3e 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -221,7 +221,6 @@
221#undef VERBOSE 221#undef VERBOSE
222#undef DUMP_MSGS 222#undef DUMP_MSGS
223 223
224#include <linux/config.h>
225 224
226#include <asm/system.h> 225#include <asm/system.h>
227#include <asm/uaccess.h> 226#include <asm/uaccess.h>
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c
index 5378c175729..7cf2999e861 100644
--- a/drivers/usb/gadget/goku_udc.c
+++ b/drivers/usb/gadget/goku_udc.c
@@ -24,7 +24,6 @@
24// #define VERBOSE /* extra debug messages (success too) */ 24// #define VERBOSE /* extra debug messages (success too) */
25// #define USB_TRACE /* packet-level success messages */ 25// #define USB_TRACE /* packet-level success messages */
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/pci.h> 29#include <linux/pci.h>
@@ -1917,7 +1916,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
1917 /* init to known state, then setup irqs */ 1916 /* init to known state, then setup irqs */
1918 udc_reset(dev); 1917 udc_reset(dev);
1919 udc_reinit (dev); 1918 udc_reinit (dev);
1920 if (request_irq(pdev->irq, goku_irq, SA_SHIRQ/*|SA_SAMPLE_RANDOM*/, 1919 if (request_irq(pdev->irq, goku_irq, IRQF_SHARED/*|IRQF_SAMPLE_RANDOM*/,
1921 driver_name, dev) != 0) { 1920 driver_name, dev) != 0) {
1922 DBG(dev, "request interrupt %d failed\n", pdev->irq); 1921 DBG(dev, "request interrupt %d failed\n", pdev->irq);
1923 retval = -EBUSY; 1922 retval = -EBUSY;
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
index 0d3424eda03..bb22b7e8287 100644
--- a/drivers/usb/gadget/lh7a40x_udc.c
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -2107,7 +2107,7 @@ static int lh7a40x_udc_probe(struct platform_device *pdev)
2107 2107
2108 /* irq setup after old hardware state is cleaned up */ 2108 /* irq setup after old hardware state is cleaned up */
2109 retval = 2109 retval =
2110 request_irq(IRQ_USBINTR, lh7a40x_udc_irq, SA_INTERRUPT, driver_name, 2110 request_irq(IRQ_USBINTR, lh7a40x_udc_irq, IRQF_DISABLED, driver_name,
2111 dev); 2111 dev);
2112 if (retval != 0) { 2112 if (retval != 0) {
2113 DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name, 2113 DEBUG(KERN_ERR "%s: can't get irq %i, err %d\n", driver_name,
diff --git a/drivers/usb/gadget/lh7a40x_udc.h b/drivers/usb/gadget/lh7a40x_udc.h
index 9b2e6f7cbb8..e3bb78524c8 100644
--- a/drivers/usb/gadget/lh7a40x_udc.h
+++ b/drivers/usb/gadget/lh7a40x_udc.h
@@ -24,7 +24,6 @@
24#ifndef __LH7A40X_H_ 24#ifndef __LH7A40X_H_
25#define __LH7A40X_H_ 25#define __LH7A40X_H_
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/ioport.h> 29#include <linux/ioport.h>
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c
index 1facdea56a8..09243239d94 100644
--- a/drivers/usb/gadget/net2280.c
+++ b/drivers/usb/gadget/net2280.c
@@ -46,7 +46,6 @@
46#undef DEBUG /* messages on error and most fault paths */ 46#undef DEBUG /* messages on error and most fault paths */
47#undef VERBOSE /* extra debug messages (success too) */ 47#undef VERBOSE /* extra debug messages (success too) */
48 48
49#include <linux/config.h>
50#include <linux/module.h> 49#include <linux/module.h>
51#include <linux/pci.h> 50#include <linux/pci.h>
52#include <linux/dma-mapping.h> 51#include <linux/dma-mapping.h>
@@ -2896,7 +2895,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
2896 goto done; 2895 goto done;
2897 } 2896 }
2898 2897
2899 if (request_irq (pdev->irq, net2280_irq, SA_SHIRQ, driver_name, dev) 2898 if (request_irq (pdev->irq, net2280_irq, IRQF_SHARED, driver_name, dev)
2900 != 0) { 2899 != 0) {
2901 ERROR (dev, "request interrupt %d failed\n", pdev->irq); 2900 ERROR (dev, "request interrupt %d failed\n", pdev->irq);
2902 retval = -EBUSY; 2901 retval = -EBUSY;
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index fbea5144890..2de9748ee67 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -22,7 +22,6 @@
22#undef DEBUG 22#undef DEBUG
23#undef VERBOSE 23#undef VERBOSE
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/ioport.h> 27#include <linux/ioport.h>
@@ -773,7 +772,7 @@ static void dma_error(int lch, u16 ch_status, void *data)
773 struct omap_ep *ep = data; 772 struct omap_ep *ep = data;
774 773
775 /* if ch_status & OMAP_DMA_DROP_IRQ ... */ 774 /* if ch_status & OMAP_DMA_DROP_IRQ ... */
776 /* if ch_status & OMAP_DMA_TOUT_IRQ ... */ 775 /* if ch_status & OMAP1_DMA_TOUT_IRQ ... */
777 ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status); 776 ERR("%s dma error, lch %d status %02x\n", ep->ep.name, lch, ch_status);
778 777
779 /* complete current transfer ... */ 778 /* complete current transfer ... */
@@ -2819,7 +2818,7 @@ bad_on_1710:
2819 2818
2820 /* USB general purpose IRQ: ep0, state changes, dma, etc */ 2819 /* USB general purpose IRQ: ep0, state changes, dma, etc */
2821 status = request_irq(pdev->resource[1].start, omap_udc_irq, 2820 status = request_irq(pdev->resource[1].start, omap_udc_irq,
2822 SA_SAMPLE_RANDOM, driver_name, udc); 2821 IRQF_SAMPLE_RANDOM, driver_name, udc);
2823 if (status != 0) { 2822 if (status != 0) {
2824 ERR( "can't get irq %ld, err %d\n", 2823 ERR( "can't get irq %ld, err %d\n",
2825 pdev->resource[1].start, status); 2824 pdev->resource[1].start, status);
@@ -2828,7 +2827,7 @@ bad_on_1710:
2828 2827
2829 /* USB "non-iso" IRQ (PIO for all but ep0) */ 2828 /* USB "non-iso" IRQ (PIO for all but ep0) */
2830 status = request_irq(pdev->resource[2].start, omap_udc_pio_irq, 2829 status = request_irq(pdev->resource[2].start, omap_udc_pio_irq,
2831 SA_SAMPLE_RANDOM, "omap_udc pio", udc); 2830 IRQF_SAMPLE_RANDOM, "omap_udc pio", udc);
2832 if (status != 0) { 2831 if (status != 0) {
2833 ERR( "can't get irq %ld, err %d\n", 2832 ERR( "can't get irq %ld, err %d\n",
2834 pdev->resource[2].start, status); 2833 pdev->resource[2].start, status);
@@ -2836,7 +2835,7 @@ bad_on_1710:
2836 } 2835 }
2837#ifdef USE_ISO 2836#ifdef USE_ISO
2838 status = request_irq(pdev->resource[3].start, omap_udc_iso_irq, 2837 status = request_irq(pdev->resource[3].start, omap_udc_iso_irq,
2839 SA_INTERRUPT, "omap_udc iso", udc); 2838 IRQF_DISABLED, "omap_udc iso", udc);
2840 if (status != 0) { 2839 if (status != 0) {
2841 ERR("can't get irq %ld, err %d\n", 2840 ERR("can't get irq %ld, err %d\n",
2842 pdev->resource[3].start, status); 2841 pdev->resource[3].start, status);
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
index 735e9dbd39f..fff027d30a0 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -27,7 +27,6 @@
27#undef DEBUG 27#undef DEBUG
28// #define VERBOSE DBG_VERBOSE 28// #define VERBOSE DBG_VERBOSE
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/ioport.h> 32#include <linux/ioport.h>
@@ -2522,7 +2521,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev)
2522 2521
2523 /* irq setup after old hardware state is cleaned up */ 2522 /* irq setup after old hardware state is cleaned up */
2524 retval = request_irq(IRQ_USB, pxa2xx_udc_irq, 2523 retval = request_irq(IRQ_USB, pxa2xx_udc_irq,
2525 SA_INTERRUPT, driver_name, dev); 2524 IRQF_DISABLED, driver_name, dev);
2526 if (retval != 0) { 2525 if (retval != 0) {
2527 printk(KERN_ERR "%s: can't get irq %i, err %d\n", 2526 printk(KERN_ERR "%s: can't get irq %i, err %d\n",
2528 driver_name, IRQ_USB, retval); 2527 driver_name, IRQ_USB, retval);
@@ -2534,7 +2533,7 @@ static int __init pxa2xx_udc_probe(struct platform_device *pdev)
2534 if (machine_is_lubbock()) { 2533 if (machine_is_lubbock()) {
2535 retval = request_irq(LUBBOCK_USB_DISC_IRQ, 2534 retval = request_irq(LUBBOCK_USB_DISC_IRQ,
2536 lubbock_vbus_irq, 2535 lubbock_vbus_irq,
2537 SA_INTERRUPT | SA_SAMPLE_RANDOM, 2536 IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
2538 driver_name, dev); 2537 driver_name, dev);
2539 if (retval != 0) { 2538 if (retval != 0) {
2540 printk(KERN_ERR "%s: can't get irq %i, err %d\n", 2539 printk(KERN_ERR "%s: can't get irq %i, err %d\n",
@@ -2545,7 +2544,7 @@ lubbock_fail0:
2545 } 2544 }
2546 retval = request_irq(LUBBOCK_USB_IRQ, 2545 retval = request_irq(LUBBOCK_USB_IRQ,
2547 lubbock_vbus_irq, 2546 lubbock_vbus_irq,
2548 SA_INTERRUPT | SA_SAMPLE_RANDOM, 2547 IRQF_DISABLED | IRQF_SAMPLE_RANDOM,
2549 driver_name, dev); 2548 driver_name, dev);
2550 if (retval != 0) { 2549 if (retval != 0) {
2551 printk(KERN_ERR "%s: can't get irq %i, err %d\n", 2550 printk(KERN_ERR "%s: can't get irq %i, err %d\n",
diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/rndis.c
index 3ff6db7828a..354670d1230 100644
--- a/drivers/usb/gadget/rndis.c
+++ b/drivers/usb/gadget/rndis.c
@@ -23,7 +23,6 @@
23 * updates to merge with Linux 2.6, better match RNDIS spec 23 * updates to merge with Linux 2.6, better match RNDIS spec
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/moduleparam.h> 27#include <linux/moduleparam.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index 416acac879d..30d7664d449 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/delay.h> 22#include <linux/delay.h>
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
index 68e3d8f5da8..3a08a7ab4ce 100644
--- a/drivers/usb/gadget/zero.c
+++ b/drivers/usb/gadget/zero.c
@@ -62,7 +62,6 @@
62#define DEBUG 1 62#define DEBUG 1
63// #define VERBOSE 63// #define VERBOSE
64 64
65#include <linux/config.h>
66#include <linux/module.h> 65#include <linux/module.h>
67#include <linux/kernel.h> 66#include <linux/kernel.h>
68#include <linux/delay.h> 67#include <linux/delay.h>
diff --git a/drivers/usb/host/ehci-au1xxx.c b/drivers/usb/host/ehci-au1xxx.c
index 9b4697add31..d66867aa527 100644
--- a/drivers/usb/host/ehci-au1xxx.c
+++ b/drivers/usb/host/ehci-au1xxx.c
@@ -148,7 +148,7 @@ int usb_ehci_au1xxx_probe(const struct hc_driver *driver,
148 /* ehci_hcd_init(hcd_to_ehci(hcd)); */ 148 /* ehci_hcd_init(hcd_to_ehci(hcd)); */
149 149
150 retval = 150 retval =
151 usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT | SA_SHIRQ); 151 usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED | IRQF_SHARED);
152 if (retval == 0) 152 if (retval == 0)
153 return retval; 153 return retval;
154 154
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index a49a689bf42..d030516edfb 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -121,7 +121,7 @@ int usb_hcd_fsl_probe(const struct hc_driver *driver,
121 temp = in_le32(hcd->regs + 0x1a8); 121 temp = in_le32(hcd->regs + 0x1a8);
122 out_le32(hcd->regs + 0x1a8, temp | 0x3); 122 out_le32(hcd->regs + 0x1a8, temp | 0x3);
123 123
124 retval = usb_add_hcd(hcd, irq, SA_SHIRQ); 124 retval = usb_add_hcd(hcd, irq, IRQF_SHARED);
125 if (retval != 0) 125 if (retval != 0)
126 goto err4; 126 goto err4;
127 return retval; 127 return retval;
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index 9b37e508ada..cee6f538de0 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -16,7 +16,6 @@
16 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/pci.h> 20#include <linux/pci.h>
22#include <linux/dmapool.h> 21#include <linux/dmapool.h>
diff --git a/drivers/usb/host/hc_crisv10.c b/drivers/usb/host/hc_crisv10.c
index 4a22909518f..61e571782cf 100644
--- a/drivers/usb/host/hc_crisv10.c
+++ b/drivers/usb/host/hc_crisv10.c
@@ -4,7 +4,6 @@
4 * Copyright (c) 2002, 2003 Axis Communications AB. 4 * Copyright (c) 2002, 2003 Axis Communications AB.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/delay.h> 8#include <linux/delay.h>
10#include <linux/ioport.h> 9#include <linux/ioport.h>
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 14386254c87..5147ed4a666 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -1653,7 +1653,7 @@ static int __init isp116x_probe(struct platform_device *pdev)
1653 goto err6; 1653 goto err6;
1654 } 1654 }
1655 1655
1656 ret = usb_add_hcd(hcd, irq, SA_INTERRUPT); 1656 ret = usb_add_hcd(hcd, irq, IRQF_DISABLED);
1657 if (ret) 1657 if (ret)
1658 goto err6; 1658 goto err6;
1659 1659
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 6b7350b5241..cdbafb71000 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -125,7 +125,7 @@ int usb_hcd_at91_probe (const struct hc_driver *driver, struct platform_device *
125 at91_start_hc(pdev); 125 at91_start_hc(pdev);
126 ohci_hcd_init(hcd_to_ohci(hcd)); 126 ohci_hcd_init(hcd_to_ohci(hcd));
127 127
128 retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); 128 retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED);
129 if (retval == 0) 129 if (retval == 0)
130 return retval; 130 return retval;
131 131
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index a1c8b3b2fcc..689261e4401 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -191,7 +191,7 @@ static int usb_ohci_au1xxx_probe(const struct hc_driver *driver,
191 au1xxx_start_ohc(dev); 191 au1xxx_start_ohc(dev);
192 ohci_hcd_init(hcd_to_ohci(hcd)); 192 ohci_hcd_init(hcd_to_ohci(hcd));
193 193
194 retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT | SA_SHIRQ); 194 retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED | IRQF_SHARED);
195 if (retval == 0) 195 if (retval == 0)
196 return retval; 196 return retval;
197 197
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 73f5a379d9b..8fb842ed5f6 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -74,7 +74,6 @@
74 * This file is licenced under the GPL. 74 * This file is licenced under the GPL.
75 */ 75 */
76 76
77#include <linux/config.h>
78#include <linux/module.h> 77#include <linux/module.h>
79#include <linux/moduleparam.h> 78#include <linux/moduleparam.h>
80#include <linux/pci.h> 79#include <linux/pci.h>
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 0020ed7a39d..5602da9bd52 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -100,7 +100,7 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
100 lh7a404_start_hc(dev); 100 lh7a404_start_hc(dev);
101 ohci_hcd_init(hcd_to_ohci(hcd)); 101 ohci_hcd_init(hcd_to_ohci(hcd));
102 102
103 retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT); 103 retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED);
104 if (retval == 0) 104 if (retval == 0)
105 return retval; 105 return retval;
106 106
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index ca19abe01c5..c4c4babd476 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -14,7 +14,7 @@
14 * This file is licenced under the GPL. 14 * This file is licenced under the GPL.
15 */ 15 */
16 16
17#include <linux/signal.h> /* SA_INTERRUPT */ 17#include <linux/signal.h> /* IRQF_DISABLED */
18#include <linux/jiffies.h> 18#include <linux/jiffies.h>
19#include <linux/platform_device.h> 19#include <linux/platform_device.h>
20#include <linux/clk.h> 20#include <linux/clk.h>
@@ -334,7 +334,7 @@ int usb_hcd_omap_probe (const struct hc_driver *driver,
334 retval = -ENXIO; 334 retval = -ENXIO;
335 goto err2; 335 goto err2;
336 } 336 }
337 retval = usb_add_hcd(hcd, irq, SA_INTERRUPT); 337 retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
338 if (retval == 0) 338 if (retval == 0)
339 return retval; 339 return retval;
340 340
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
index b2a8dfa4887..9fe56ff1615 100644
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -75,7 +75,7 @@ static int usb_hcd_ppc_soc_probe(const struct hc_driver *driver,
75 ohci->flags |= OHCI_BIG_ENDIAN; 75 ohci->flags |= OHCI_BIG_ENDIAN;
76 ohci_hcd_init(ohci); 76 ohci_hcd_init(ohci);
77 77
78 retval = usb_add_hcd(hcd, irq, SA_INTERRUPT); 78 retval = usb_add_hcd(hcd, irq, IRQF_DISABLED);
79 if (retval == 0) 79 if (retval == 0)
80 return retval; 80 return retval;
81 81
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index fafe7c1265b..6f559e10278 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -190,7 +190,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver, struct platform_device
190 190
191 ohci_hcd_init(hcd_to_ohci(hcd)); 191 ohci_hcd_init(hcd_to_ohci(hcd));
192 192
193 retval = usb_add_hcd(hcd, pdev->resource[1].start, SA_INTERRUPT); 193 retval = usb_add_hcd(hcd, pdev->resource[1].start, IRQF_DISABLED);
194 if (retval == 0) 194 if (retval == 0)
195 return retval; 195 return retval;
196 196
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index 1da5de573a6..d2fc6969a9f 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -388,7 +388,7 @@ static int usb_hcd_s3c2410_probe (const struct hc_driver *driver,
388 388
389 ohci_hcd_init(hcd_to_ohci(hcd)); 389 ohci_hcd_init(hcd_to_ohci(hcd));
390 390
391 retval = usb_add_hcd(hcd, dev->resource[1].start, SA_INTERRUPT); 391 retval = usb_add_hcd(hcd, dev->resource[1].start, IRQF_DISABLED);
392 if (retval != 0) 392 if (retval != 0)
393 goto err_ioremap; 393 goto err_ioremap;
394 394
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c
index fb3221ebbb2..ce3de106cad 100644
--- a/drivers/usb/host/ohci-sa1111.c
+++ b/drivers/usb/host/ohci-sa1111.c
@@ -143,7 +143,7 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
143 sa1111_start_hc(dev); 143 sa1111_start_hc(dev);
144 ohci_hcd_init(hcd_to_ohci(hcd)); 144 ohci_hcd_init(hcd_to_ohci(hcd));
145 145
146 retval = usb_add_hcd(hcd, dev->irq[1], SA_INTERRUPT); 146 retval = usb_add_hcd(hcd, dev->irq[1], IRQF_DISABLED);
147 if (retval == 0) 147 if (retval == 0)
148 return retval; 148 return retval;
149 149
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 1045f846fbe..dff60568b4a 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -8,7 +8,6 @@
8 * (and others) 8 * (and others)
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/pci.h> 13#include <linux/pci.h>
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 89bcda5a329..fa34092bbcd 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -31,7 +31,6 @@
31#undef VERBOSE 31#undef VERBOSE
32#undef PACKET_TRACE 32#undef PACKET_TRACE
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
37#include <linux/kernel.h> 36#include <linux/kernel.h>
@@ -1750,7 +1749,7 @@ sl811h_probe(struct platform_device *dev)
1750 * was on a system with single edge triggering, so most sorts of 1749 * was on a system with single edge triggering, so most sorts of
1751 * triggering arrangement should work. 1750 * triggering arrangement should work.
1752 */ 1751 */
1753 retval = usb_add_hcd(hcd, irq, SA_INTERRUPT | SA_SHIRQ); 1752 retval = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED);
1754 if (retval != 0) 1753 if (retval != 0)
1755 goto err6; 1754 goto err6;
1756 1755
diff --git a/drivers/usb/host/uhci-debug.c b/drivers/usb/host/uhci-debug.c
index 6637a0e4997..dc286a48caf 100644
--- a/drivers/usb/host/uhci-debug.c
+++ b/drivers/usb/host/uhci-debug.c
@@ -9,7 +9,6 @@
9 * (C) Copyright 1999-2001 Johannes Erdfelt 9 * (C) Copyright 1999-2001 Johannes Erdfelt
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/debugfs.h> 13#include <linux/debugfs.h>
15#include <linux/smp_lock.h> 14#include <linux/smp_lock.h>
diff --git a/drivers/usb/host/uhci-hcd.c b/drivers/usb/host/uhci-hcd.c
index 7b48567622e..4151f618602 100644
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/pci.h> 26#include <linux/pci.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c
index 36855062eac..9e3f1390337 100644
--- a/drivers/usb/input/appletouch.c
+++ b/drivers/usb/input/appletouch.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/errno.h> 31#include <linux/errno.h>
33#include <linux/init.h> 32#include <linux/init.h>
diff --git a/drivers/usb/input/ati_remote.c b/drivers/usb/input/ati_remote.c
index 07c8c0e665d..05d2d6012eb 100644
--- a/drivers/usb/input/ati_remote.c
+++ b/drivers/usb/input/ati_remote.c
@@ -85,7 +85,6 @@
85 * 85 *
86 */ 86 */
87 87
88#include <linux/config.h>
89#include <linux/kernel.h> 88#include <linux/kernel.h>
90#include <linux/errno.h> 89#include <linux/errno.h>
91#include <linux/init.h> 90#include <linux/init.h>
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c
index c4670e1d465..70477f02cc2 100644
--- a/drivers/usb/input/hiddev.c
+++ b/drivers/usb/input/hiddev.c
@@ -25,7 +25,6 @@
25 * e-mail - mail your message to Paul Stewart <stewart@wetlogic.net> 25 * e-mail - mail your message to Paul Stewart <stewart@wetlogic.net>
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/poll.h> 28#include <linux/poll.h>
30#include <linux/slab.h> 29#include <linux/slab.h>
31#include <linux/module.h> 30#include <linux/module.h>
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c
index 5c570cc703f..86acb5f1907 100644
--- a/drivers/usb/input/itmtouch.c
+++ b/drivers/usb/input/itmtouch.c
@@ -39,7 +39,6 @@
39 * 39 *
40 *****************************************************************************/ 40 *****************************************************************************/
41 41
42#include <linux/config.h>
43#include <linux/kernel.h> 42#include <linux/kernel.h>
44#include <linux/slab.h> 43#include <linux/slab.h>
45#include <linux/module.h> 44#include <linux/module.h>
diff --git a/drivers/usb/input/keyspan_remote.c b/drivers/usb/input/keyspan_remote.c
index 70af985b5db..4723b310f27 100644
--- a/drivers/usb/input/keyspan_remote.c
+++ b/drivers/usb/input/keyspan_remote.c
@@ -11,7 +11,6 @@
11 * and Keyspan, Inc the manufacturers of the Keyspan USB DMR product. 11 * and Keyspan, Inc the manufacturers of the Keyspan USB DMR product.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/init.h> 16#include <linux/init.h>
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c
index 4fdee4db072..a9ccda8810e 100644
--- a/drivers/usb/input/mtouchusb.c
+++ b/drivers/usb/input/mtouchusb.c
@@ -39,7 +39,6 @@
39 * 39 *
40 *****************************************************************************/ 40 *****************************************************************************/
41 41
42#include <linux/config.h>
43#include <linux/kernel.h> 42#include <linux/kernel.h>
44#include <linux/slab.h> 43#include <linux/slab.h>
45#include <linux/module.h> 44#include <linux/module.h>
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c
index da7b0bf51af..0149043ffb9 100644
--- a/drivers/usb/input/touchkitusb.c
+++ b/drivers/usb/input/touchkitusb.c
@@ -24,7 +24,6 @@
24 24
25//#define DEBUG 25//#define DEBUG
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
30#include <linux/module.h> 29#include <linux/module.h>
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
index cfd4a4e0433..9889b1cda05 100644
--- a/drivers/usb/input/xpad.c
+++ b/drivers/usb/input/xpad.c
@@ -54,7 +54,6 @@
54 * 2002-07-17 - 0.0.5 : simplified d-pad handling 54 * 2002-07-17 - 0.0.5 : simplified d-pad handling
55 */ 55 */
56 56
57#include <linux/config.h>
58#include <linux/kernel.h> 57#include <linux/kernel.h>
59#include <linux/init.h> 58#include <linux/init.h>
60#include <linux/slab.h> 59#include <linux/slab.h>
diff --git a/drivers/usb/input/yealink.c b/drivers/usb/input/yealink.c
index 24aedbb20f0..575a4e672e9 100644
--- a/drivers/usb/input/yealink.c
+++ b/drivers/usb/input/yealink.c
@@ -46,7 +46,6 @@
46 * 20050816 henk Merge 2.6.13-rc6 46 * 20050816 henk Merge 2.6.13-rc6
47 */ 47 */
48 48
49#include <linux/config.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
51#include <linux/init.h> 50#include <linux/init.h>
52#include <linux/slab.h> 51#include <linux/slab.h>
diff --git a/drivers/usb/misc/cytherm.c b/drivers/usb/misc/cytherm.c
index a04204292aa..b20bec44555 100644
--- a/drivers/usb/misc/cytherm.c
+++ b/drivers/usb/misc/cytherm.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/init.h> 19#include <linux/init.h>
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c
index d0b16725669..fcd69c52aea 100644
--- a/drivers/usb/misc/idmouse.c
+++ b/drivers/usb/misc/idmouse.c
@@ -16,7 +16,6 @@
16 16
17*/ 17*/
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
22#include <linux/delay.h> 21#include <linux/delay.h>
diff --git a/drivers/usb/misc/ldusb.c b/drivers/usb/misc/ldusb.c
index 966acb474f6..f30ab1fbb3c 100644
--- a/drivers/usb/misc/ldusb.c
+++ b/drivers/usb/misc/ldusb.c
@@ -27,7 +27,6 @@
27 * V0.13 (mh) Added support for LD X-Ray and Machine Test System 27 * V0.13 (mh) Added support for LD X-Ray and Machine Test System
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/errno.h> 31#include <linux/errno.h>
33#include <linux/init.h> 32#include <linux/init.h>
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c
index 779bcf0373a..7699d970e68 100644
--- a/drivers/usb/misc/legousbtower.c
+++ b/drivers/usb/misc/legousbtower.c
@@ -75,7 +75,6 @@
75 * - move reset into open to clean out spurious data 75 * - move reset into open to clean out spurious data
76 */ 76 */
77 77
78#include <linux/config.h>
79#include <linux/kernel.h> 78#include <linux/kernel.h>
80#include <linux/errno.h> 79#include <linux/errno.h>
81#include <linux/init.h> 80#include <linux/init.h>
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c
index 13aeea2026c..bfbbbfbb92b 100644
--- a/drivers/usb/misc/phidgetkit.c
+++ b/drivers/usb/misc/phidgetkit.c
@@ -13,7 +13,6 @@
13 * This is a driver for the USB PhidgetInterfaceKit. 13 * This is a driver for the USB PhidgetInterfaceKit.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c
index 5a040c205ee..c0df79c9653 100644
--- a/drivers/usb/misc/phidgetservo.c
+++ b/drivers/usb/misc/phidgetservo.c
@@ -25,7 +25,6 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
31#include <linux/init.h> 30#include <linux/init.h>
diff --git a/drivers/usb/misc/sisusbvga/sisusb_init.c b/drivers/usb/misc/sisusbvga/sisusb_init.c
index 968f0d38cff..9b30f896281 100644
--- a/drivers/usb/misc/sisusbvga/sisusb_init.c
+++ b/drivers/usb/misc/sisusbvga/sisusb_init.c
@@ -36,7 +36,6 @@
36 * 36 *
37 */ 37 */
38 38
39#include <linux/config.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/kernel.h> 40#include <linux/kernel.h>
42#include <linux/errno.h> 41#include <linux/errno.h>
diff --git a/drivers/usb/misc/usbled.c b/drivers/usb/misc/usbled.c
index f441964132c..0c5ee0ad6bb 100644
--- a/drivers/usb/misc/usbled.c
+++ b/drivers/usb/misc/usbled.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/init.h> 14#include <linux/init.h>
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c
index 81ba14c73dc..786e1dbe88e 100644
--- a/drivers/usb/misc/usbtest.c
+++ b/drivers/usb/misc/usbtest.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/errno.h> 2#include <linux/errno.h>
4#include <linux/init.h> 3#include <linux/init.h>
diff --git a/drivers/usb/net/asix.c b/drivers/usb/net/asix.c
index 37111acec87..2e2bbc003e9 100644
--- a/drivers/usb/net/asix.c
+++ b/drivers/usb/net/asix.c
@@ -22,7 +22,6 @@
22// #define DEBUG // error path messages, extra info 22// #define DEBUG // error path messages, extra info
23// #define VERBOSE // more; success messages 23// #define VERBOSE // more; success messages
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kmod.h> 26#include <linux/kmod.h>
28#include <linux/sched.h> 27#include <linux/sched.h>
diff --git a/drivers/usb/net/cdc_ether.c b/drivers/usb/net/cdc_ether.c
index efd195b5912..82ce0358d9a 100644
--- a/drivers/usb/net/cdc_ether.c
+++ b/drivers/usb/net/cdc_ether.c
@@ -20,7 +20,6 @@
20// #define DEBUG // error path messages, extra info 20// #define DEBUG // error path messages, extra info
21// #define VERBOSE // more; success messages 21// #define VERBOSE // more; success messages
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/drivers/usb/net/cdc_subset.c b/drivers/usb/net/cdc_subset.c
index ec801e8bb1b..e2fae85851a 100644
--- a/drivers/usb/net/cdc_subset.c
+++ b/drivers/usb/net/cdc_subset.c
@@ -17,7 +17,6 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/kmod.h> 21#include <linux/kmod.h>
23#include <linux/sched.h> 22#include <linux/sched.h>
diff --git a/drivers/usb/net/gl620a.c b/drivers/usb/net/gl620a.c
index faf1e86be68..3155f25f1d4 100644
--- a/drivers/usb/net/gl620a.c
+++ b/drivers/usb/net/gl620a.c
@@ -21,7 +21,6 @@
21// #define DEBUG // error path messages, extra info 21// #define DEBUG // error path messages, extra info
22// #define VERBOSE // more; success messages 22// #define VERBOSE // more; success messages
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/sched.h> 25#include <linux/sched.h>
27#include <linux/init.h> 26#include <linux/init.h>
diff --git a/drivers/usb/net/net1080.c b/drivers/usb/net/net1080.c
index 78e6a43b108..a9b6eeac3e3 100644
--- a/drivers/usb/net/net1080.c
+++ b/drivers/usb/net/net1080.c
@@ -20,7 +20,6 @@
20// #define DEBUG // error path messages, extra info 20// #define DEBUG // error path messages, extra info
21// #define VERBOSE // more; success messages 21// #define VERBOSE // more; success messages
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/drivers/usb/net/plusb.c b/drivers/usb/net/plusb.c
index 4fe863389cb..5d17cdfc7ba 100644
--- a/drivers/usb/net/plusb.c
+++ b/drivers/usb/net/plusb.c
@@ -20,7 +20,6 @@
20// #define DEBUG // error path messages, extra info 20// #define DEBUG // error path messages, extra info
21// #define VERBOSE // more; success messages 21// #define VERBOSE // more; success messages
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/drivers/usb/net/rndis_host.c b/drivers/usb/net/rndis_host.c
index f551546d752..c2a28d88ef3 100644
--- a/drivers/usb/net/rndis_host.c
+++ b/drivers/usb/net/rndis_host.c
@@ -20,7 +20,6 @@
20// #define DEBUG // error path messages, extra info 20// #define DEBUG // error path messages, extra info
21// #define VERBOSE // more; success messages 21// #define VERBOSE // more; success messages
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/drivers/usb/net/rtl8150.c b/drivers/usb/net/rtl8150.c
index 1bbbae283c0..718f8e2b552 100644
--- a/drivers/usb/net/rtl8150.c
+++ b/drivers/usb/net/rtl8150.c
@@ -6,7 +6,6 @@
6 * version 2 as published by the Free Software Foundation. 6 * version 2 as published by the Free Software Foundation.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/sched.h> 9#include <linux/sched.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/signal.h> 11#include <linux/signal.h>
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c
index 362d6907c9b..54183e173a6 100644
--- a/drivers/usb/net/usbnet.c
+++ b/drivers/usb/net/usbnet.c
@@ -33,7 +33,6 @@
33// #define DEBUG // error path messages, extra info 33// #define DEBUG // error path messages, extra info
34// #define VERBOSE // more; success messages 34// #define VERBOSE // more; success messages
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/sched.h> 37#include <linux/sched.h>
39#include <linux/init.h> 38#include <linux/init.h>
diff --git a/drivers/usb/net/zaurus.c b/drivers/usb/net/zaurus.c
index 813e470d060..144566bda58 100644
--- a/drivers/usb/net/zaurus.c
+++ b/drivers/usb/net/zaurus.c
@@ -20,7 +20,6 @@
20// #define DEBUG // error path messages, extra info 20// #define DEBUG // error path messages, extra info
21// #define VERBOSE // more; success messages 21// #define VERBOSE // more; success messages
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c
index 4144777ea18..3faa7aa0111 100644
--- a/drivers/usb/serial/belkin_sa.c
+++ b/drivers/usb/serial/belkin_sa.c
@@ -63,7 +63,6 @@
63 * UsbSnoop on Windows2000 and from examining the other USB drivers. 63 * UsbSnoop on Windows2000 and from examining the other USB drivers.
64 */ 64 */
65 65
66#include <linux/config.h>
67#include <linux/kernel.h> 66#include <linux/kernel.h>
68#include <linux/errno.h> 67#include <linux/errno.h>
69#include <linux/init.h> 68#include <linux/init.h>
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c
index e9f9f4bafa1..f2d993b70c1 100644
--- a/drivers/usb/serial/bus.c
+++ b/drivers/usb/serial/bus.c
@@ -8,7 +8,6 @@
8 * 2 as published by the Free Software Foundation. 8 * 2 as published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/tty.h> 13#include <linux/tty.h>
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c
index f3404e10afb..3d456b32c31 100644
--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
diff --git a/drivers/usb/serial/cp2101.c b/drivers/usb/serial/cp2101.c
index f8c0cb28773..df0a4f98b4a 100644
--- a/drivers/usb/serial/cp2101.c
+++ b/drivers/usb/serial/cp2101.c
@@ -17,7 +17,6 @@
17 * 17 *
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c
index 1fd5c5a9f2e..49b51ab0d4c 100644
--- a/drivers/usb/serial/cyberjack.c
+++ b/drivers/usb/serial/cyberjack.c
@@ -28,7 +28,6 @@
28 */ 28 */
29 29
30 30
31#include <linux/config.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/errno.h> 32#include <linux/errno.h>
34#include <linux/init.h> 33#include <linux/init.h>
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 5de76efe1b3..4ff2dfb299b 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -48,7 +48,6 @@
48/* Code originates and was built up from ftdi_sio, belkin, pl2303 and others. */ 48/* Code originates and was built up from ftdi_sio, belkin, pl2303 and others. */
49 49
50 50
51#include <linux/config.h>
52#include <linux/kernel.h> 51#include <linux/kernel.h>
53#include <linux/errno.h> 52#include <linux/errno.h>
54#include <linux/init.h> 53#include <linux/init.h>
diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c
index b3f776a90c9..6953d3ef573 100644
--- a/drivers/usb/serial/digi_acceleport.c
+++ b/drivers/usb/serial/digi_acceleport.c
@@ -233,7 +233,6 @@
233* $Id: digi_acceleport.c,v 1.80.1.2 2000/11/02 05:45:08 root Exp $ 233* $Id: digi_acceleport.c,v 1.80.1.2 2000/11/02 05:45:08 root Exp $
234*/ 234*/
235 235
236#include <linux/config.h>
237#include <linux/kernel.h> 236#include <linux/kernel.h>
238#include <linux/errno.h> 237#include <linux/errno.h>
239#include <linux/init.h> 238#include <linux/init.h>
diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c
index afca1eae5fb..1e2b31eeb49 100644
--- a/drivers/usb/serial/empeg.c
+++ b/drivers/usb/serial/empeg.c
@@ -51,7 +51,6 @@
51 * 51 *
52 */ 52 */
53 53
54#include <linux/config.h>
55#include <linux/kernel.h> 54#include <linux/kernel.h>
56#include <linux/errno.h> 55#include <linux/errno.h>
57#include <linux/init.h> 56#include <linux/init.h>
diff --git a/drivers/usb/serial/ezusb.c b/drivers/usb/serial/ezusb.c
index 1e419c8d739..debc3b0f966 100644
--- a/drivers/usb/serial/ezusb.c
+++ b/drivers/usb/serial/ezusb.c
@@ -8,7 +8,6 @@
8 * 2 as published by the Free Software Foundation. 8 * 2 as published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index b2bfea7c815..8a74b19f128 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -245,7 +245,6 @@
245/* to talk to the device */ 245/* to talk to the device */
246/* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */ 246/* Thanx to gkh and the rest of the usb dev group for all code I have assimilated :-) */
247 247
248#include <linux/config.h>
249#include <linux/kernel.h> 248#include <linux/kernel.h>
250#include <linux/errno.h> 249#include <linux/errno.h>
251#include <linux/init.h> 250#include <linux/init.h>
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 04767759cf8..1f5d1620baa 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -23,7 +23,6 @@
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA 23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111 USA
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index 07a478c59fb..945b8bb38c9 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c
index e9719da2aca..7e06358b031 100644
--- a/drivers/usb/serial/hp4x.c
+++ b/drivers/usb/serial/hp4x.c
@@ -12,7 +12,6 @@
12 * See Documentation/usb/usb-serial.txt for more information on using this driver 12 * See Documentation/usb/usb-serial.txt for more information on using this driver
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/tty.h> 17#include <linux/tty.h>
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c
index b85d2156dfd..bd2c05dac2a 100644
--- a/drivers/usb/serial/io_edgeport.c
+++ b/drivers/usb/serial/io_edgeport.c
@@ -29,7 +29,6 @@
29 * 29 *
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/jiffies.h> 33#include <linux/jiffies.h>
35#include <linux/errno.h> 34#include <linux/errno.h>
diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c
index 8e1e2253748..723a12ae87b 100644
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -24,7 +24,6 @@
24 * 24 *
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29#include <linux/jiffies.h> 28#include <linux/jiffies.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c
index 9da6d2a8f2b..dbcfe172a5c 100644
--- a/drivers/usb/serial/ipaq.c
+++ b/drivers/usb/serial/ipaq.c
@@ -44,7 +44,6 @@
44 * Thanks to info from Heath Robinson and Arieh Davidoff. 44 * Thanks to info from Heath Robinson and Arieh Davidoff.
45 */ 45 */
46 46
47#include <linux/config.h>
48#include <linux/kernel.h> 47#include <linux/kernel.h>
49#include <linux/errno.h> 48#include <linux/errno.h>
50#include <linux/init.h> 49#include <linux/init.h>
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index d7f3f736a69..2cf1fed3de4 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -46,7 +46,6 @@
46 * initial version released. 46 * initial version released.
47 */ 47 */
48 48
49#include <linux/config.h>
50#include <linux/kernel.h> 49#include <linux/kernel.h>
51#include <linux/errno.h> 50#include <linux/errno.h>
52#include <linux/init.h> 51#include <linux/init.h>
diff --git a/drivers/usb/serial/keyspan.c b/drivers/usb/serial/keyspan.c
index 2cf6ade704e..d7c58f1bc96 100644
--- a/drivers/usb/serial/keyspan.c
+++ b/drivers/usb/serial/keyspan.c
@@ -95,7 +95,6 @@
95*/ 95*/
96 96
97 97
98#include <linux/config.h>
99#include <linux/kernel.h> 98#include <linux/kernel.h>
100#include <linux/jiffies.h> 99#include <linux/jiffies.h>
101#include <linux/errno.h> 100#include <linux/errno.h>
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c
index b0441c35f98..03ab3c0f3cc 100644
--- a/drivers/usb/serial/keyspan_pda.c
+++ b/drivers/usb/serial/keyspan_pda.c
@@ -66,7 +66,6 @@
66 */ 66 */
67 67
68 68
69#include <linux/config.h>
70#include <linux/kernel.h> 69#include <linux/kernel.h>
71#include <linux/errno.h> 70#include <linux/errno.h>
72#include <linux/init.h> 71#include <linux/init.h>
diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c
index 65d79f630fa..b45ff3e7ab4 100644
--- a/drivers/usb/serial/kl5kusb105.c
+++ b/drivers/usb/serial/kl5kusb105.c
@@ -45,7 +45,6 @@
45 */ 45 */
46 46
47 47
48#include <linux/config.h>
49#include <linux/kernel.h> 48#include <linux/kernel.h>
50#include <linux/errno.h> 49#include <linux/errno.h>
51#include <linux/init.h> 50#include <linux/init.h>
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c
index 87dfcd89ffa..45773337477 100644
--- a/drivers/usb/serial/kobil_sct.c
+++ b/drivers/usb/serial/kobil_sct.c
@@ -35,7 +35,6 @@
35 */ 35 */
36 36
37 37
38#include <linux/config.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40#include <linux/errno.h> 39#include <linux/errno.h>
41#include <linux/init.h> 40#include <linux/init.h>
diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c
index 35bd29b6c40..ca05d3275f3 100644
--- a/drivers/usb/serial/mct_u232.c
+++ b/drivers/usb/serial/mct_u232.c
@@ -64,7 +64,6 @@
64 * (via linux-usb-devel). 64 * (via linux-usb-devel).
65 */ 65 */
66 66
67#include <linux/config.h>
68#include <linux/kernel.h> 67#include <linux/kernel.h>
69#include <linux/errno.h> 68#include <linux/errno.h>
70#include <linux/init.h> 69#include <linux/init.h>
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index 6dcdb5f598b..cfb711a21a4 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -35,7 +35,6 @@
35 * 35 *
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40#include <linux/errno.h> 39#include <linux/errno.h>
41#include <linux/init.h> 40#include <linux/init.h>
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index b0861b61bba..78ad4b3126a 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -57,7 +57,6 @@
57#define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>" 57#define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>"
58#define DRIVER_DESC "USB Driver for GSM modems" 58#define DRIVER_DESC "USB Driver for GSM modems"
59 59
60#include <linux/config.h>
61#include <linux/kernel.h> 60#include <linux/kernel.h>
62#include <linux/jiffies.h> 61#include <linux/jiffies.h>
63#include <linux/errno.h> 62#include <linux/errno.h>
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index d8870438720..de93a2b909e 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -14,7 +14,6 @@
14 * 14 *
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/init.h> 19#include <linux/init.h>
diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c
index f0215f850d2..897d8447252 100644
--- a/drivers/usb/serial/safe_serial.c
+++ b/drivers/usb/serial/safe_serial.c
@@ -60,7 +60,6 @@
60 */ 60 */
61 61
62 62
63#include <linux/config.h>
64#include <linux/kernel.h> 63#include <linux/kernel.h>
65#include <linux/errno.h> 64#include <linux/errno.h>
66#include <linux/init.h> 65#include <linux/init.h>
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c
index c3a2071b802..a9afff31a92 100644
--- a/drivers/usb/serial/ti_usb_3410_5052.c
+++ b/drivers/usb/serial/ti_usb_3410_5052.c
@@ -68,7 +68,6 @@
68 * fi 68 * fi
69 */ 69 */
70 70
71#include <linux/config.h>
72#include <linux/kernel.h> 71#include <linux/kernel.h>
73#include <linux/errno.h> 72#include <linux/errno.h>
74#include <linux/init.h> 73#include <linux/init.h>
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index f466f89eeb6..b59a0536ea5 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -16,7 +16,6 @@
16 * 16 *
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
22#include <linux/init.h> 21#include <linux/init.h>
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
index d53ea9b11e8..0f2802a6019 100644
--- a/drivers/usb/serial/usb-serial.h
+++ b/drivers/usb/serial/usb-serial.h
@@ -14,7 +14,6 @@
14#ifndef __LINUX_USB_SERIAL_H 14#ifndef __LINUX_USB_SERIAL_H
15#define __LINUX_USB_SERIAL_H 15#define __LINUX_USB_SERIAL_H
16 16
17#include <linux/config.h>
18#include <linux/kref.h> 17#include <linux/kref.h>
19#include <linux/mutex.h> 18#include <linux/mutex.h>
20 19
diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c
index 9e89b8d54f7..95a2936e902 100644
--- a/drivers/usb/serial/visor.c
+++ b/drivers/usb/serial/visor.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 56ffc81302f..540438c3f38 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -65,7 +65,6 @@
65 * 65 *
66 */ 66 */
67 67
68#include <linux/config.h>
69#include <linux/kernel.h> 68#include <linux/kernel.h>
70#include <linux/errno.h> 69#include <linux/errno.h>
71#include <linux/init.h> 70#include <linux/init.h>
diff --git a/drivers/usb/storage/debug.h b/drivers/usb/storage/debug.h
index cd2096acc72..77e244a8c37 100644
--- a/drivers/usb/storage/debug.h
+++ b/drivers/usb/storage/debug.h
@@ -44,7 +44,6 @@
44#ifndef _DEBUG_H_ 44#ifndef _DEBUG_H_
45#define _DEBUG_H_ 45#define _DEBUG_H_
46 46
47#include <linux/config.h>
48#include <linux/kernel.h> 47#include <linux/kernel.h>
49 48
50#define USB_STORAGE "usb-storage: " 49#define USB_STORAGE "usb-storage: "
diff --git a/drivers/usb/storage/dpcm.c b/drivers/usb/storage/dpcm.c
index 92b69e4c804..1628cb25856 100644
--- a/drivers/usb/storage/dpcm.c
+++ b/drivers/usb/storage/dpcm.c
@@ -29,7 +29,6 @@
29 * 675 Mass Ave, Cambridge, MA 02139, USA. 29 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <scsi/scsi.h> 32#include <scsi/scsi.h>
34#include <scsi/scsi_cmnd.h> 33#include <scsi/scsi_cmnd.h>
35#include <scsi/scsi_device.h> 34#include <scsi/scsi_device.h>
diff --git a/drivers/usb/storage/freecom.c b/drivers/usb/storage/freecom.c
index 30e96050fe0..88aa59ab756 100644
--- a/drivers/usb/storage/freecom.c
+++ b/drivers/usb/storage/freecom.c
@@ -28,7 +28,6 @@
28 * (http://www.freecom.de/) 28 * (http://www.freecom.de/)
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/hdreg.h> 31#include <linux/hdreg.h>
33 32
34#include <scsi/scsi.h> 33#include <scsi/scsi.h>
diff --git a/drivers/usb/storage/initializers.h b/drivers/usb/storage/initializers.h
index f9907a5cf12..927f7781080 100644
--- a/drivers/usb/storage/initializers.h
+++ b/drivers/usb/storage/initializers.h
@@ -37,7 +37,6 @@
37 * 675 Mass Ave, Cambridge, MA 02139, USA. 37 * 675 Mass Ave, Cambridge, MA 02139, USA.
38 */ 38 */
39 39
40#include <linux/config.h>
41#include "usb.h" 40#include "usb.h"
42#include "transport.h" 41#include "transport.h"
43 42
diff --git a/drivers/usb/storage/onetouch.c b/drivers/usb/storage/onetouch.c
index 026a587eb8d..313920d980c 100644
--- a/drivers/usb/storage/onetouch.c
+++ b/drivers/usb/storage/onetouch.c
@@ -28,7 +28,6 @@
28 * 28 *
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
33#include <linux/input.h> 32#include <linux/input.h>
34#include <linux/init.h> 33#include <linux/init.h>
diff --git a/drivers/usb/storage/transport.c b/drivers/usb/storage/transport.c
index 19b25c5cafd..eb7188b3565 100644
--- a/drivers/usb/storage/transport.c
+++ b/drivers/usb/storage/transport.c
@@ -45,7 +45,6 @@
45 * 675 Mass Ave, Cambridge, MA 02139, USA. 45 * 675 Mass Ave, Cambridge, MA 02139, USA.
46 */ 46 */
47 47
48#include <linux/config.h>
49#include <linux/sched.h> 48#include <linux/sched.h>
50#include <linux/errno.h> 49#include <linux/errno.h>
51#include <linux/slab.h> 50#include <linux/slab.h>
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index 543244d421c..c7e84e653df 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -31,7 +31,6 @@
31 * the following thing for it to work: 31 * the following thing for it to work:
32 * The macro UNUSUAL_DEV() must be defined before this file is included 32 * The macro UNUSUAL_DEV() must be defined before this file is included
33 */ 33 */
34#include <linux/config.h>
35 34
36/* If you edit this file, please try to keep it sorted first by VendorID, 35/* If you edit this file, please try to keep it sorted first by VendorID,
37 * then by ProductID. 36 * then by ProductID.
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index e232c7c8990..1185acac4b2 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -47,7 +47,6 @@
47 * 675 Mass Ave, Cambridge, MA 02139, USA. 47 * 675 Mass Ave, Cambridge, MA 02139, USA.
48 */ 48 */
49 49
50#include <linux/config.h>
51#include <linux/sched.h> 50#include <linux/sched.h>
52#include <linux/errno.h> 51#include <linux/errno.h>
53#include <linux/suspend.h> 52#include <linux/suspend.h>
diff --git a/drivers/usb/usb-skeleton.c b/drivers/usb/usb-skeleton.c
index 4de9fb56ebf..b362039792b 100644
--- a/drivers/usb/usb-skeleton.c
+++ b/drivers/usb/usb-skeleton.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/init.h> 18#include <linux/init.h>
diff --git a/drivers/video/S3triofb.c b/drivers/video/S3triofb.c
index 455fda990ff..e714e8449c1 100644
--- a/drivers/video/S3triofb.c
+++ b/drivers/video/S3triofb.c
@@ -23,7 +23,6 @@
23 23
24*/ 24*/
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
diff --git a/drivers/video/acornfb.c b/drivers/video/acornfb.c
index 98baecccb3f..61a8bf159cb 100644
--- a/drivers/video/acornfb.c
+++ b/drivers/video/acornfb.c
@@ -17,7 +17,6 @@
17 * - Blanking 8bpp displays with VIDC 17 * - Blanking 8bpp displays with VIDC
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
diff --git a/drivers/video/amifb.c b/drivers/video/amifb.c
index 3033c72dea2..f9bc9f777e7 100644
--- a/drivers/video/amifb.c
+++ b/drivers/video/amifb.c
@@ -48,7 +48,6 @@
48#include <linux/tty.h> 48#include <linux/tty.h>
49#include <linux/slab.h> 49#include <linux/slab.h>
50#include <linux/delay.h> 50#include <linux/delay.h>
51#include <linux/config.h>
52#include <linux/interrupt.h> 51#include <linux/interrupt.h>
53#include <linux/fb.h> 52#include <linux/fb.h>
54#include <linux/init.h> 53#include <linux/init.h>
diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c
index 466042808da..fd95c2dbd4f 100644
--- a/drivers/video/arcfb.c
+++ b/drivers/video/arcfb.c
@@ -561,7 +561,7 @@ static int __init arcfb_probe(struct platform_device *dev)
561 platform_set_drvdata(dev, info); 561 platform_set_drvdata(dev, info);
562 if (irq) { 562 if (irq) {
563 par->irq = irq; 563 par->irq = irq;
564 if (request_irq(par->irq, &arcfb_interrupt, SA_SHIRQ, 564 if (request_irq(par->irq, &arcfb_interrupt, IRQF_SHARED,
565 "arcfb", info)) { 565 "arcfb", info)) {
566 printk(KERN_INFO 566 printk(KERN_INFO
567 "arcfb: Failed req IRQ %d\n", par->irq); 567 "arcfb: Failed req IRQ %d\n", par->irq);
diff --git a/drivers/video/asiliantfb.c b/drivers/video/asiliantfb.c
index 29f9f0dfe3b..eaeaf4d1a09 100644
--- a/drivers/video/asiliantfb.c
+++ b/drivers/video/asiliantfb.c
@@ -29,7 +29,6 @@
29 * more details. 29 * more details.
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/errno.h> 34#include <linux/errno.h>
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index 11cf7fcb1d5..72c58910947 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -46,7 +46,6 @@
46 */ 46 */
47 47
48 48
49#include <linux/config.h>
50#include <linux/module.h> 49#include <linux/module.h>
51#include <linux/moduleparam.h> 50#include <linux/moduleparam.h>
52#include <linux/kernel.h> 51#include <linux/kernel.h>
diff --git a/drivers/video/aty/atyfb.h b/drivers/video/aty/atyfb.h
index 43d2cb58af8..55fb8b04489 100644
--- a/drivers/video/aty/atyfb.h
+++ b/drivers/video/aty/atyfb.h
@@ -2,7 +2,6 @@
2 * ATI Frame Buffer Device Driver Core Definitions 2 * ATI Frame Buffer Device Driver Core Definitions
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/spinlock.h> 5#include <linux/spinlock.h>
7#include <linux/wait.h> 6#include <linux/wait.h>
8 /* 7 /*
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 22e720611bf..0c9706746d7 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -49,7 +49,6 @@
49******************************************************************************/ 49******************************************************************************/
50 50
51 51
52#include <linux/config.h>
53#include <linux/module.h> 52#include <linux/module.h>
54#include <linux/moduleparam.h> 53#include <linux/moduleparam.h>
55#include <linux/kernel.h> 54#include <linux/kernel.h>
@@ -1568,7 +1567,7 @@ static int aty_enable_irq(struct atyfb_par *par, int reenable)
1568 u32 int_cntl; 1567 u32 int_cntl;
1569 1568
1570 if (!test_and_set_bit(0, &par->irq_flags)) { 1569 if (!test_and_set_bit(0, &par->irq_flags)) {
1571 if (request_irq(par->irq, aty_irq, SA_SHIRQ, "atyfb", par)) { 1570 if (request_irq(par->irq, aty_irq, IRQF_SHARED, "atyfb", par)) {
1572 clear_bit(0, &par->irq_flags); 1571 clear_bit(0, &par->irq_flags);
1573 return -EINVAL; 1572 return -EINVAL;
1574 } 1573 }
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c
index 68b15645b89..51b78f8de94 100644
--- a/drivers/video/aty/radeon_base.c
+++ b/drivers/video/aty/radeon_base.c
@@ -52,7 +52,6 @@
52 52
53#define RADEON_VERSION "0.2.0" 53#define RADEON_VERSION "0.2.0"
54 54
55#include <linux/config.h>
56#include <linux/module.h> 55#include <linux/module.h>
57#include <linux/moduleparam.h> 56#include <linux/moduleparam.h>
58#include <linux/kernel.h> 57#include <linux/kernel.h>
diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c
index a9d0414e465..9aaca58c074 100644
--- a/drivers/video/aty/radeon_i2c.c
+++ b/drivers/video/aty/radeon_i2c.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/kernel.h> 2#include <linux/kernel.h>
4#include <linux/sched.h> 3#include <linux/sched.h>
diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h
index 1645943b112..38657b2d10e 100644
--- a/drivers/video/aty/radeonfb.h
+++ b/drivers/video/aty/radeonfb.h
@@ -1,7 +1,6 @@
1#ifndef __RADEONFB_H__ 1#ifndef __RADEONFB_H__
2#define __RADEONFB_H__ 2#define __RADEONFB_H__
3 3
4#include <linux/config.h>
5#include <linux/module.h> 4#include <linux/module.h>
6#include <linux/kernel.h> 5#include <linux/kernel.h>
7#include <linux/sched.h> 6#include <linux/sched.h>
@@ -382,7 +381,7 @@ struct radeonfb_info {
382/* Note about this function: we have some rare cases where we must not schedule, 381/* Note about this function: we have some rare cases where we must not schedule,
383 * this typically happen with our special "wake up early" hook which allows us to 382 * this typically happen with our special "wake up early" hook which allows us to
384 * wake up the graphic chip (and thus get the console back) before everything else 383 * wake up the graphic chip (and thus get the console back) before everything else
385 * on some machines that support that mecanism. At this point, interrupts are off 384 * on some machines that support that mechanism. At this point, interrupts are off
386 * and scheduling is not permitted 385 * and scheduling is not permitted
387 */ 386 */
388static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms) 387static inline void _radeon_msleep(struct radeonfb_info *rinfo, unsigned long ms)
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c
index 9ef68cd83bb..a92a91fef16 100644
--- a/drivers/video/au1100fb.c
+++ b/drivers/video/au1100fb.c
@@ -40,7 +40,6 @@
40 * with this program; if not, write to the Free Software Foundation, Inc., 40 * with this program; if not, write to the Free Software Foundation, Inc.,
41 * 675 Mass Ave, Cambridge, MA 02139, USA. 41 * 675 Mass Ave, Cambridge, MA 02139, USA.
42 */ 42 */
43#include <linux/config.h>
44#include <linux/module.h> 43#include <linux/module.h>
45#include <linux/kernel.h> 44#include <linux/kernel.h>
46#include <linux/errno.h> 45#include <linux/errno.h>
diff --git a/drivers/video/au1200fb.c b/drivers/video/au1200fb.c
index 600d3e0e08b..c6a5f0ccc10 100644
--- a/drivers/video/au1200fb.c
+++ b/drivers/video/au1200fb.c
@@ -1694,7 +1694,7 @@ static int au1200fb_drv_probe(struct device *dev)
1694 1694
1695 /* Now hook interrupt too */ 1695 /* Now hook interrupt too */
1696 if ((ret = request_irq(AU1200_LCD_INT, au1200fb_handle_irq, 1696 if ((ret = request_irq(AU1200_LCD_INT, au1200fb_handle_irq,
1697 SA_INTERRUPT | SA_SHIRQ, "lcd", (void *)dev)) < 0) { 1697 IRQF_DISABLED | IRQF_SHARED, "lcd", (void *)dev)) < 0) {
1698 print_err("fail to request interrupt line %d (err: %d)", 1698 print_err("fail to request interrupt line %d (err: %d)",
1699 AU1200_LCD_INT, ret); 1699 AU1200_LCD_INT, ret);
1700 goto failed; 1700 goto failed;
diff --git a/drivers/video/backlight/locomolcd.c b/drivers/video/backlight/locomolcd.c
index bd879b7ec11..caf1eca199b 100644
--- a/drivers/video/backlight/locomolcd.c
+++ b/drivers/video/backlight/locomolcd.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13/* LCD power functions */ 13/* LCD power functions */
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/delay.h> 16#include <linux/delay.h>
diff --git a/drivers/video/cfbcopyarea.c b/drivers/video/cfbcopyarea.c
index 74415325b01..6faea4034e3 100644
--- a/drivers/video/cfbcopyarea.c
+++ b/drivers/video/cfbcopyarea.c
@@ -24,7 +24,6 @@
24 24
25 25
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30#include <linux/string.h> 29#include <linux/string.h>
diff --git a/drivers/video/cfbfillrect.c b/drivers/video/cfbfillrect.c
index e5ff62e9cfb..f00b50aab60 100644
--- a/drivers/video/cfbfillrect.c
+++ b/drivers/video/cfbfillrect.c
@@ -17,7 +17,6 @@
17 * the native cpu endians. I also need to deal with MSB position in the word. 17 * the native cpu endians. I also need to deal with MSB position in the word.
18 * 18 *
19 */ 19 */
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/string.h> 21#include <linux/string.h>
23#include <linux/fb.h> 22#include <linux/fb.h>
diff --git a/drivers/video/cfbimgblt.c b/drivers/video/cfbimgblt.c
index ad8a89bf8ea..51d35386a94 100644
--- a/drivers/video/cfbimgblt.c
+++ b/drivers/video/cfbimgblt.c
@@ -29,7 +29,6 @@
29 * Also need to add code to deal with cards endians that are different than 29 * Also need to add code to deal with cards endians that are different than
30 * the native cpu endians. I also need to deal with MSB position in the word. 30 * the native cpu endians. I also need to deal with MSB position in the word.
31 */ 31 */
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/string.h> 33#include <linux/string.h>
35#include <linux/fb.h> 34#include <linux/fb.h>
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c
index d76bbfac92c..0e465c80ef2 100644
--- a/drivers/video/chipsfb.c
+++ b/drivers/video/chipsfb.c
@@ -14,7 +14,6 @@
14 * more details. 14 * more details.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/errno.h> 19#include <linux/errno.h>
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index dda240eb736..7355da09c72 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -36,7 +36,6 @@
36 36
37#define CIRRUSFB_VERSION "2.0-pre2" 37#define CIRRUSFB_VERSION "2.0-pre2"
38 38
39#include <linux/config.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/kernel.h> 40#include <linux/kernel.h>
42#include <linux/errno.h> 41#include <linux/errno.h>
diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
index eea422eb1ab..308850df16f 100644
--- a/drivers/video/console/bitblit.c
+++ b/drivers/video/console/bitblit.c
@@ -10,7 +10,6 @@
10 * more details. 10 * more details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/string.h> 14#include <linux/string.h>
16#include <linux/fb.h> 15#include <linux/fb.h>
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
index 1ecda91e5a9..878707a0439 100644
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -22,7 +22,6 @@
22#define DUMMY_ROWS ORIG_VIDEO_LINES 22#define DUMMY_ROWS ORIG_VIDEO_LINES
23#elif defined(__hppa__) 23#elif defined(__hppa__)
24/* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */ 24/* set by Kconfig. Use 80x25 for 640x480 and 160x64 for 1280x1024 */
25#include <linux/config.h>
26#define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS 25#define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS
27#define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS 26#define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS
28#else 27#else
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 5dc4083552d..94e9f7069be 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -58,7 +58,6 @@
58 58
59#undef FBCONDEBUG 59#undef FBCONDEBUG
60 60
61#include <linux/config.h>
62#include <linux/module.h> 61#include <linux/module.h>
63#include <linux/types.h> 62#include <linux/types.h>
64#include <linux/sched.h> 63#include <linux/sched.h>
diff --git a/drivers/video/console/fbcon.h b/drivers/video/console/fbcon.h
index 3487a636370..f244ad066d6 100644
--- a/drivers/video/console/fbcon.h
+++ b/drivers/video/console/fbcon.h
@@ -11,7 +11,6 @@
11#ifndef _VIDEO_FBCON_H 11#ifndef _VIDEO_FBCON_H
12#define _VIDEO_FBCON_H 12#define _VIDEO_FBCON_H
13 13
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/vt_buffer.h> 15#include <linux/vt_buffer.h>
17#include <linux/vt_kern.h> 16#include <linux/vt_kern.h>
diff --git a/drivers/video/console/fbcon_ccw.c b/drivers/video/console/fbcon_ccw.c
index 990289a69b7..4481c80b8b2 100644
--- a/drivers/video/console/fbcon_ccw.c
+++ b/drivers/video/console/fbcon_ccw.c
@@ -8,7 +8,6 @@
8 * more details. 8 * more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/fb.h> 13#include <linux/fb.h>
diff --git a/drivers/video/console/fbcon_cw.c b/drivers/video/console/fbcon_cw.c
index d44c5fa515f..7f92c06afea 100644
--- a/drivers/video/console/fbcon_cw.c
+++ b/drivers/video/console/fbcon_cw.c
@@ -8,7 +8,6 @@
8 * more details. 8 * more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/fb.h> 13#include <linux/fb.h>
diff --git a/drivers/video/console/fbcon_rotate.c b/drivers/video/console/fbcon_rotate.c
index 2dc091fbd5c..00884e013f0 100644
--- a/drivers/video/console/fbcon_rotate.c
+++ b/drivers/video/console/fbcon_rotate.c
@@ -8,7 +8,6 @@
8 * more details. 8 * more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/fb.h> 13#include <linux/fb.h>
diff --git a/drivers/video/console/fbcon_ud.c b/drivers/video/console/fbcon_ud.c
index f56ed068a5b..ab91005e64d 100644
--- a/drivers/video/console/fbcon_ud.c
+++ b/drivers/video/console/fbcon_ud.c
@@ -8,7 +8,6 @@
8 * more details. 8 * more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/fb.h> 13#include <linux/fb.h>
diff --git a/drivers/video/console/font_acorn_8x8.c b/drivers/video/console/font_acorn_8x8.c
index 2d2e39632e2..40f3d4eeb19 100644
--- a/drivers/video/console/font_acorn_8x8.c
+++ b/drivers/video/console/font_acorn_8x8.c
@@ -1,6 +1,5 @@
1/* Acorn-like font definition, with PC graphics characters */ 1/* Acorn-like font definition, with PC graphics characters */
2 2
3#include <linux/config.h>
4#include <linux/font.h> 3#include <linux/font.h>
5 4
6static const unsigned char acorndata_8x8[] = { 5static const unsigned char acorndata_8x8[] = {
diff --git a/drivers/video/console/fonts.c b/drivers/video/console/fonts.c
index 0cc1bfda76a..c960728b7e8 100644
--- a/drivers/video/console/fonts.c
+++ b/drivers/video/console/fonts.c
@@ -12,7 +12,6 @@
12 * for more details. 12 * for more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/string.h> 17#include <linux/string.h>
diff --git a/drivers/video/console/promcon.c b/drivers/video/console/promcon.c
index d6e6ad537f9..5cd5e114d1e 100644
--- a/drivers/video/console/promcon.c
+++ b/drivers/video/console/promcon.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) 5 * Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c
index 74ac2acaf72..88e7038eab8 100644
--- a/drivers/video/console/sticore.c
+++ b/drivers/video/console/sticore.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/drivers/video/console/tileblit.c b/drivers/video/console/tileblit.c
index 153352ca946..d981fe4d86c 100644
--- a/drivers/video/console/tileblit.c
+++ b/drivers/video/console/tileblit.c
@@ -8,7 +8,6 @@
8 * more details. 8 * more details.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/fb.h> 13#include <linux/fb.h>
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 01401cd63ac..05735ff4e9c 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -33,7 +33,6 @@
33 * more details. 33 * more details.
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/types.h> 37#include <linux/types.h>
39#include <linux/sched.h> 38#include <linux/sched.h>
diff --git a/drivers/video/controlfb.c b/drivers/video/controlfb.c
index 655301a8671..acdd6a103db 100644
--- a/drivers/video/controlfb.c
+++ b/drivers/video/controlfb.c
@@ -31,7 +31,6 @@
31 * more details. 31 * more details.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/kernel.h> 35#include <linux/kernel.h>
37#include <linux/errno.h> 36#include <linux/errno.h>
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index 55a3514157e..2e2924957d8 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -36,7 +36,6 @@
36 * (which, incidentally, is about the same saving as a 2.5in hard disk 36 * (which, incidentally, is about the same saving as a 2.5in hard disk
37 * entering standby mode.) 37 * entering standby mode.)
38 */ 38 */
39#include <linux/config.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/kernel.h> 40#include <linux/kernel.h>
42#include <linux/errno.h> 41#include <linux/errno.h>
diff --git a/drivers/video/cyber2000fb.h b/drivers/video/cyber2000fb.h
index bd7e1c04078..de4fc43e51c 100644
--- a/drivers/video/cyber2000fb.h
+++ b/drivers/video/cyber2000fb.h
@@ -9,7 +9,6 @@
9 * 9 *
10 * Integraphics Cyber2000 frame buffer device 10 * Integraphics Cyber2000 frame buffer device
11 */ 11 */
12#include <linux/config.h>
13 12
14/* 13/*
15 * Internal CyberPro sizes and offsets. 14 * Internal CyberPro sizes and offsets.
diff --git a/drivers/video/cyblafb.c b/drivers/video/cyblafb.c
index 0ae0a97b0fe..94a66c2d2cf 100644
--- a/drivers/video/cyblafb.c
+++ b/drivers/video/cyblafb.c
@@ -14,7 +14,6 @@
14 14
15#define CYBLAFB_PIXMAPSIZE 8192 15#define CYBLAFB_PIXMAPSIZE 8192
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/string.h> 18#include <linux/string.h>
20#include <linux/fb.h> 19#include <linux/fb.h>
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index a171daab0ad..33034f81114 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -11,7 +11,6 @@
11 * for more details. 11 * for more details.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16 15
17#include <linux/compat.h> 16#include <linux/compat.h>
diff --git a/drivers/video/gbefb.c b/drivers/video/gbefb.c
index 5e25b986019..bf0e60b5a3b 100644
--- a/drivers/video/gbefb.c
+++ b/drivers/video/gbefb.c
@@ -9,7 +9,6 @@
9 * more details. 9 * more details.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/delay.h> 12#include <linux/delay.h>
14#include <linux/platform_device.h> 13#include <linux/platform_device.h>
15#include <linux/dma-mapping.h> 14#include <linux/dma-mapping.h>
diff --git a/drivers/video/hitfb.c b/drivers/video/hitfb.c
index f04ca721f94..01864767450 100644
--- a/drivers/video/hitfb.c
+++ b/drivers/video/hitfb.c
@@ -11,7 +11,6 @@
11 * more details. 11 * more details.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
diff --git a/drivers/video/i810/i810-i2c.c b/drivers/video/i810/i810-i2c.c
index 3fe3ae1aff1..c1f7b49975d 100644
--- a/drivers/video/i810/i810-i2c.c
+++ b/drivers/video/i810/i810-i2c.c
@@ -8,7 +8,6 @@
8 * License. See the file COPYING in the main directory of this archive for 8 * License. See the file COPYING in the main directory of this archive for
9 * more details. 9 * more details.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c
index a1f7d80f0ac..fbe8a2c4b04 100644
--- a/drivers/video/i810/i810_main.c
+++ b/drivers/video/i810/i810_main.c
@@ -29,7 +29,6 @@
29 */ 29 */
30 30
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/config.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
34#include <linux/errno.h> 33#include <linux/errno.h>
35#include <linux/string.h> 34#include <linux/string.h>
diff --git a/drivers/video/imsttfb.c b/drivers/video/imsttfb.c
index f73c642b50c..5f393d985b1 100644
--- a/drivers/video/imsttfb.c
+++ b/drivers/video/imsttfb.c
@@ -16,7 +16,6 @@
16 * more details. 16 * more details.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
diff --git a/drivers/video/imxfb.c b/drivers/video/imxfb.c
index 1718baaeed2..0f9b2fdc28b 100644
--- a/drivers/video/imxfb.c
+++ b/drivers/video/imxfb.c
@@ -18,7 +18,6 @@
18 18
19//#define DEBUG 1 19//#define DEBUG 1
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
diff --git a/drivers/video/intelfb/intelfbdrv.c b/drivers/video/intelfb/intelfbdrv.c
index 0a0a8b199ec..3f39d84015f 100644
--- a/drivers/video/intelfb/intelfbdrv.c
+++ b/drivers/video/intelfb/intelfbdrv.c
@@ -108,7 +108,6 @@
108 * 108 *
109 */ 109 */
110 110
111#include <linux/config.h>
112#include <linux/module.h> 111#include <linux/module.h>
113#include <linux/kernel.h> 112#include <linux/kernel.h>
114#include <linux/errno.h> 113#include <linux/errno.h>
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c
index 7533b3dd08a..3b78a57924f 100644
--- a/drivers/video/intelfb/intelfbhw.c
+++ b/drivers/video/intelfb/intelfbhw.c
@@ -19,7 +19,6 @@
19 19
20/* $DHD: intelfb/intelfbhw.c,v 1.9 2003/06/27 15:06:25 dawes Exp $ */ 20/* $DHD: intelfb/intelfbhw.c,v 1.9 2003/06/27 15:06:25 dawes Exp $ */
21 21
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
diff --git a/drivers/video/kyro/fbdev.c b/drivers/video/kyro/fbdev.c
index 477ad297de4..2fdbe9b2b04 100644
--- a/drivers/video/kyro/fbdev.c
+++ b/drivers/video/kyro/fbdev.c
@@ -9,7 +9,6 @@
9 * for more details. 9 * for more details.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c
index 788fa812c87..80c03618eb5 100644
--- a/drivers/video/logo/logo.c
+++ b/drivers/video/logo/logo.c
@@ -9,7 +9,6 @@
9 * Copyright (C) 2003 Geert Uytterhoeven <geert@linux-m68k.org> 9 * Copyright (C) 2003 Geert Uytterhoeven <geert@linux-m68k.org>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/linux_logo.h> 12#include <linux/linux_logo.h>
14#include <linux/stddef.h> 13#include <linux/stddef.h>
15#include <linux/module.h> 14#include <linux/module.h>
diff --git a/drivers/video/macmodes.c b/drivers/video/macmodes.c
index d21321ca7c3..ab2149531a0 100644
--- a/drivers/video/macmodes.c
+++ b/drivers/video/macmodes.c
@@ -15,7 +15,6 @@
15 * more details. 15 * more details.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/fb.h> 19#include <linux/fb.h>
21#include <linux/string.h> 20#include <linux/string.h>
diff --git a/drivers/video/matrox/matroxfb_DAC1064.c b/drivers/video/matrox/matroxfb_DAC1064.c
index a456e67a5b0..c4b570b4a4d 100644
--- a/drivers/video/matrox/matroxfb_DAC1064.c
+++ b/drivers/video/matrox/matroxfb_DAC1064.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16 15
17#include "matroxfb_DAC1064.h" 16#include "matroxfb_DAC1064.h"
18#include "matroxfb_misc.h" 17#include "matroxfb_misc.h"
diff --git a/drivers/video/matrox/matroxfb_DAC1064.h b/drivers/video/matrox/matroxfb_DAC1064.h
index 56513a5d220..df39c319373 100644
--- a/drivers/video/matrox/matroxfb_DAC1064.h
+++ b/drivers/video/matrox/matroxfb_DAC1064.h
@@ -1,7 +1,6 @@
1#ifndef __MATROXFB_DAC1064_H__ 1#ifndef __MATROXFB_DAC1064_H__
2#define __MATROXFB_DAC1064_H__ 2#define __MATROXFB_DAC1064_H__
3 3
4#include <linux/config.h>
5 4
6#include "matroxfb_base.h" 5#include "matroxfb_base.h"
7 6
diff --git a/drivers/video/matrox/matroxfb_Ti3026.c b/drivers/video/matrox/matroxfb_Ti3026.c
index 23ebad0a12d..a5690a5f29d 100644
--- a/drivers/video/matrox/matroxfb_Ti3026.c
+++ b/drivers/video/matrox/matroxfb_Ti3026.c
@@ -78,7 +78,6 @@
78 * 78 *
79 */ 79 */
80 80
81#include <linux/config.h>
82 81
83#include "matroxfb_Ti3026.h" 82#include "matroxfb_Ti3026.h"
84#include "matroxfb_misc.h" 83#include "matroxfb_misc.h"
diff --git a/drivers/video/matrox/matroxfb_Ti3026.h b/drivers/video/matrox/matroxfb_Ti3026.h
index 536e5f69de9..27872aaa0a1 100644
--- a/drivers/video/matrox/matroxfb_Ti3026.h
+++ b/drivers/video/matrox/matroxfb_Ti3026.h
@@ -1,7 +1,6 @@
1#ifndef __MATROXFB_TI3026_H__ 1#ifndef __MATROXFB_TI3026_H__
2#define __MATROXFB_TI3026_H__ 2#define __MATROXFB_TI3026_H__
3 3
4#include <linux/config.h>
5 4
6#include "matroxfb_base.h" 5#include "matroxfb_base.h"
7 6
diff --git a/drivers/video/matrox/matroxfb_base.c b/drivers/video/matrox/matroxfb_base.c
index f4ddd3431f1..4a57dabb77d 100644
--- a/drivers/video/matrox/matroxfb_base.c
+++ b/drivers/video/matrox/matroxfb_base.c
@@ -99,7 +99,6 @@
99 * 99 *
100 */ 100 */
101 101
102#include <linux/config.h>
103#include <linux/version.h> 102#include <linux/version.h>
104 103
105#define __OLD_VIDIOC_ 104#define __OLD_VIDIOC_
@@ -234,7 +233,7 @@ int matroxfb_enable_irq(WPMINFO int reenable) {
234 233
235 if (!test_and_set_bit(0, &ACCESS_FBINFO(irq_flags))) { 234 if (!test_and_set_bit(0, &ACCESS_FBINFO(irq_flags))) {
236 if (request_irq(ACCESS_FBINFO(pcidev)->irq, matrox_irq, 235 if (request_irq(ACCESS_FBINFO(pcidev)->irq, matrox_irq,
237 SA_SHIRQ, "matroxfb", MINFO)) { 236 IRQF_SHARED, "matroxfb", MINFO)) {
238 clear_bit(0, &ACCESS_FBINFO(irq_flags)); 237 clear_bit(0, &ACCESS_FBINFO(irq_flags));
239 return -EINVAL; 238 return -EINVAL;
240 } 239 }
diff --git a/drivers/video/matrox/matroxfb_base.h b/drivers/video/matrox/matroxfb_base.h
index b71737178d0..b95779b57c0 100644
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -25,7 +25,6 @@
25/* Guard accelerator accesses with spin_lock_irqsave... */ 25/* Guard accelerator accesses with spin_lock_irqsave... */
26#undef MATROXFB_USE_SPINLOCKS 26#undef MATROXFB_USE_SPINLOCKS
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/errno.h> 30#include <linux/errno.h>
diff --git a/drivers/video/matrox/matroxfb_misc.c b/drivers/video/matrox/matroxfb_misc.c
index 263d801ef78..18886b629cb 100644
--- a/drivers/video/matrox/matroxfb_misc.c
+++ b/drivers/video/matrox/matroxfb_misc.c
@@ -84,7 +84,6 @@
84 * 84 *
85 */ 85 */
86 86
87#include <linux/config.h>
88 87
89#include "matroxfb_misc.h" 88#include "matroxfb_misc.h"
90#include <linux/interrupt.h> 89#include <linux/interrupt.h>
diff --git a/drivers/video/neofb.c b/drivers/video/neofb.c
index 2f156b724d1..773855a311e 100644
--- a/drivers/video/neofb.c
+++ b/drivers/video/neofb.c
@@ -54,7 +54,6 @@
54 * 54 *
55 */ 55 */
56 56
57#include <linux/config.h>
58#include <linux/module.h> 57#include <linux/module.h>
59#include <linux/kernel.h> 58#include <linux/kernel.h>
60#include <linux/errno.h> 59#include <linux/errno.h>
diff --git a/drivers/video/nvidia/nv_i2c.c b/drivers/video/nvidia/nv_i2c.c
index 1edb1c432b7..19eef3a0902 100644
--- a/drivers/video/nvidia/nv_i2c.c
+++ b/drivers/video/nvidia/nv_i2c.c
@@ -10,7 +10,6 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/drivers/video/nvidia/nv_of.c b/drivers/video/nvidia/nv_of.c
index 7a03d040b1a..8209106e26e 100644
--- a/drivers/video/nvidia/nv_of.c
+++ b/drivers/video/nvidia/nv_of.c
@@ -10,7 +10,6 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index 7b5cffb2785..b02d6033cc0 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index ad1434e3f22..bfeb11bd471 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -12,7 +12,6 @@
12 * more details. 12 * more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index 335e3746555..450e802e0aa 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -17,7 +17,6 @@
17 * more details. 17 * more details.
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
index 4e963930b50..49a203e1591 100644
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/moduleparam.h> 31#include <linux/moduleparam.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
diff --git a/drivers/video/pm3fb.c b/drivers/video/pm3fb.c
index 52c18a35fb4..0e0f977b05e 100644
--- a/drivers/video/pm3fb.c
+++ b/drivers/video/pm3fb.c
@@ -52,7 +52,6 @@
52 * Wed Feb 21 14:47:06 CET 2001, v 1.0.0: First working version 52 * Wed Feb 21 14:47:06 CET 2001, v 1.0.0: First working version
53 */ 53 */
54 54
55#include <linux/config.h>
56#include <linux/module.h> 55#include <linux/module.h>
57#include <linux/kernel.h> 56#include <linux/kernel.h>
58#include <linux/errno.h> 57#include <linux/errno.h>
diff --git a/drivers/video/pvr2fb.c b/drivers/video/pvr2fb.c
index ec4bacf9dd2..4a1e0e85692 100644
--- a/drivers/video/pvr2fb.c
+++ b/drivers/video/pvr2fb.c
@@ -56,7 +56,6 @@
56#include <linux/tty.h> 56#include <linux/tty.h>
57#include <linux/slab.h> 57#include <linux/slab.h>
58#include <linux/delay.h> 58#include <linux/delay.h>
59#include <linux/config.h>
60#include <linux/interrupt.h> 59#include <linux/interrupt.h>
61#include <linux/fb.h> 60#include <linux/fb.h>
62#include <linux/init.h> 61#include <linux/init.h>
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index 809fc5eefc1..bbb07106cd5 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
@@ -1335,7 +1334,7 @@ int __init pxafb_probe(struct platform_device *dev)
1335 goto failed; 1334 goto failed;
1336 } 1335 }
1337 1336
1338 ret = request_irq(IRQ_LCD, pxafb_handle_irq, SA_INTERRUPT, "LCD", fbi); 1337 ret = request_irq(IRQ_LCD, pxafb_handle_irq, IRQF_DISABLED, "LCD", fbi);
1339 if (ret) { 1338 if (ret) {
1340 dev_err(&dev->dev, "request_irq failed: %d\n", ret); 1339 dev_err(&dev->dev, "request_irq failed: %d\n", ret);
1341 ret = -EBUSY; 1340 ret = -EBUSY;
diff --git a/drivers/video/riva/fbdev.c b/drivers/video/riva/fbdev.c
index 12af58c5cf1..2788655e6e7 100644
--- a/drivers/video/riva/fbdev.c
+++ b/drivers/video/riva/fbdev.c
@@ -29,7 +29,6 @@
29 * doublescan modes are broken 29 * doublescan modes are broken
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
35#include <linux/errno.h> 34#include <linux/errno.h>
diff --git a/drivers/video/riva/rivafb-i2c.c b/drivers/video/riva/rivafb-i2c.c
index 8b1967fc116..9751c37c0bf 100644
--- a/drivers/video/riva/rivafb-i2c.c
+++ b/drivers/video/riva/rivafb-i2c.c
@@ -12,7 +12,6 @@
12 * for more details. 12 * for more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/drivers/video/riva/rivafb.h b/drivers/video/riva/rivafb.h
index 440ff445689..7fa13fc9c41 100644
--- a/drivers/video/riva/rivafb.h
+++ b/drivers/video/riva/rivafb.h
@@ -1,7 +1,6 @@
1#ifndef __RIVAFB_H 1#ifndef __RIVAFB_H
2#define __RIVAFB_H 2#define __RIVAFB_H
3 3
4#include <linux/config.h>
5#include <linux/fb.h> 4#include <linux/fb.h>
6#include <video/vga.h> 5#include <video/vga.h>
7#include <linux/i2c.h> 6#include <linux/i2c.h>
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c
index feec47bdd47..a5333c19078 100644
--- a/drivers/video/s1d13xxxfb.c
+++ b/drivers/video/s1d13xxxfb.c
@@ -28,7 +28,6 @@
28 * more details. 28 * more details.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/platform_device.h> 32#include <linux/platform_device.h>
34#include <linux/delay.h> 33#include <linux/delay.h>
diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index fbc41185068..f461eb10cc7 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -735,7 +735,7 @@ static int __init s3c2410fb_probe(struct platform_device *pdev)
735 735
736 dprintk("got LCD region\n"); 736 dprintk("got LCD region\n");
737 737
738 ret = request_irq(irq, s3c2410fb_irq, SA_INTERRUPT, pdev->name, info); 738 ret = request_irq(irq, s3c2410fb_irq, IRQF_DISABLED, pdev->name, info);
739 if (ret) { 739 if (ret) {
740 dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret); 740 dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret);
741 ret = -EBUSY; 741 ret = -EBUSY;
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index d9831fd4234..a2e6e7205d7 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -160,7 +160,6 @@
160 * - Add patch 681/1 and clean up stork definitions. 160 * - Add patch 681/1 and clean up stork definitions.
161 */ 161 */
162 162
163#include <linux/config.h>
164#include <linux/module.h> 163#include <linux/module.h>
165#include <linux/kernel.h> 164#include <linux/kernel.h>
166#include <linux/sched.h> 165#include <linux/sched.h>
@@ -1473,7 +1472,7 @@ static int __init sa1100fb_probe(struct platform_device *pdev)
1473 if (ret) 1472 if (ret)
1474 goto failed; 1473 goto failed;
1475 1474
1476 ret = request_irq(irq, sa1100fb_handle_irq, SA_INTERRUPT, 1475 ret = request_irq(irq, sa1100fb_handle_irq, IRQF_DISABLED,
1477 "LCD", fbi); 1476 "LCD", fbi);
1478 if (ret) { 1477 if (ret) {
1479 printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret); 1478 printk(KERN_ERR "sa1100fb: request_irq failed: %d\n", ret);
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c
index 21debed863a..e83befd16d6 100644
--- a/drivers/video/savage/savagefb-i2c.c
+++ b/drivers/video/savage/savagefb-i2c.c
@@ -10,7 +10,6 @@
10 * for more details. 10 * for more details.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index 78883cf66a4..4729af477fb 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -41,7 +41,6 @@
41 * 41 *
42 */ 42 */
43 43
44#include <linux/config.h>
45#include <linux/module.h> 44#include <linux/module.h>
46#include <linux/kernel.h> 45#include <linux/kernel.h>
47#include <linux/errno.h> 46#include <linux/errno.h>
diff --git a/drivers/video/sgivwfb.c b/drivers/video/sgivwfb.c
index c0cc5e3ba7b..ebb6756aea0 100644
--- a/drivers/video/sgivwfb.c
+++ b/drivers/video/sgivwfb.c
@@ -9,7 +9,6 @@
9 * more details. 9 * more details.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
diff --git a/drivers/video/sis/init.h b/drivers/video/sis/init.h
index 634c0a9d219..7ecab87cef0 100644
--- a/drivers/video/sis/init.h
+++ b/drivers/video/sis/init.h
@@ -73,7 +73,6 @@
73#ifdef SIS_CP 73#ifdef SIS_CP
74#undef SIS_CP 74#undef SIS_CP
75#endif 75#endif
76#include <linux/config.h>
77#include <linux/version.h> 76#include <linux/version.h>
78#include <linux/types.h> 77#include <linux/types.h>
79#include <asm/io.h> 78#include <asm/io.h>
diff --git a/drivers/video/sis/init301.c b/drivers/video/sis/init301.c
index c3e070a6eff..f13faddc618 100644
--- a/drivers/video/sis/init301.c
+++ b/drivers/video/sis/init301.c
@@ -8043,8 +8043,8 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short
8043 SiS_SetCH700x(SiS_Pr,0x01,0x28); 8043 SiS_SetCH700x(SiS_Pr,0x01,0x28);
8044 8044
8045 /* Set video bandwidth 8045 /* Set video bandwidth
8046 High bandwith Luma composite video filter(S0=1) 8046 High bandwidth Luma composite video filter(S0=1)
8047 low bandwith Luma S-video filter (S2-1=00) 8047 low bandwidth Luma S-video filter (S2-1=00)
8048 disable peak filter in S-video channel (S3=0) 8048 disable peak filter in S-video channel (S3=0)
8049 high bandwidth Chroma Filter (S5-4=11) 8049 high bandwidth Chroma Filter (S5-4=11)
8050 =00110001=0x31 8050 =00110001=0x31
diff --git a/drivers/video/sis/init301.h b/drivers/video/sis/init301.h
index f475b21a85c..bc321dc57e9 100644
--- a/drivers/video/sis/init301.h
+++ b/drivers/video/sis/init301.h
@@ -67,7 +67,6 @@
67#ifdef SIS_CP 67#ifdef SIS_CP
68#undef SIS_CP 68#undef SIS_CP
69#endif 69#endif
70#include <linux/config.h>
71#include <linux/version.h> 70#include <linux/version.h>
72#include <linux/types.h> 71#include <linux/types.h>
73#include <asm/io.h> 72#include <asm/io.h>
diff --git a/drivers/video/sis/initextlfb.c b/drivers/video/sis/initextlfb.c
index cc856d90903..09f5d758b6c 100644
--- a/drivers/video/sis/initextlfb.c
+++ b/drivers/video/sis/initextlfb.c
@@ -30,7 +30,6 @@
30#include "vgatypes.h" 30#include "vgatypes.h"
31#include "vstruct.h" 31#include "vstruct.h"
32 32
33#include <linux/config.h>
34#include <linux/version.h> 33#include <linux/version.h>
35#include <linux/types.h> 34#include <linux/types.h>
36#include <linux/fb.h> 35#include <linux/fb.h>
diff --git a/drivers/video/sis/osdef.h b/drivers/video/sis/osdef.h
index 841ca3190cd..f59568020eb 100644
--- a/drivers/video/sis/osdef.h
+++ b/drivers/video/sis/osdef.h
@@ -90,7 +90,6 @@
90/**********************************************************************/ 90/**********************************************************************/
91 91
92#ifdef SIS_LINUX_KERNEL 92#ifdef SIS_LINUX_KERNEL
93#include <linux/config.h>
94#include <linux/version.h> 93#include <linux/version.h>
95 94
96#ifdef CONFIG_FB_SIS_300 95#ifdef CONFIG_FB_SIS_300
diff --git a/drivers/video/sis/sis.h b/drivers/video/sis/sis.h
index 0b6e625d733..a259446ca7f 100644
--- a/drivers/video/sis/sis.h
+++ b/drivers/video/sis/sis.h
@@ -24,7 +24,6 @@
24#ifndef _SIS_H_ 24#ifndef _SIS_H_
25#define _SIS_H_ 25#define _SIS_H_
26 26
27#include <linux/config.h>
28#include <linux/version.h> 27#include <linux/version.h>
29 28
30#include "osdef.h" 29#include "osdef.h"
diff --git a/drivers/video/sis/sis_accel.c b/drivers/video/sis/sis_accel.c
index bab933e6c6a..3b7ce032e2e 100644
--- a/drivers/video/sis/sis_accel.c
+++ b/drivers/video/sis/sis_accel.c
@@ -28,7 +28,6 @@
28 * for more information and updates) 28 * for more information and updates)
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/version.h> 31#include <linux/version.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/kernel.h> 33#include <linux/kernel.h>
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index c63c0e721b8..b848ca7db7f 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -33,7 +33,6 @@
33 * 33 *
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/version.h> 36#include <linux/version.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) 38#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
diff --git a/drivers/video/sstfb.c b/drivers/video/sstfb.c
index c44de90ca12..dad54e73147 100644
--- a/drivers/video/sstfb.c
+++ b/drivers/video/sstfb.c
@@ -82,7 +82,6 @@
82 * Includes 82 * Includes
83 */ 83 */
84 84
85#include <linux/config.h>
86#include <linux/string.h> 85#include <linux/string.h>
87#include <linux/kernel.h> 86#include <linux/kernel.h>
88#include <linux/module.h> 87#include <linux/module.h>
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c
index 4a292aae6eb..3e16e2d9d55 100644
--- a/drivers/video/stifb.c
+++ b/drivers/video/stifb.c
@@ -54,7 +54,6 @@
54#undef DEBUG_STIFB_REGS /* debug sti register accesses */ 54#undef DEBUG_STIFB_REGS /* debug sti register accesses */
55 55
56 56
57#include <linux/config.h>
58#include <linux/module.h> 57#include <linux/module.h>
59#include <linux/kernel.h> 58#include <linux/kernel.h>
60#include <linux/errno.h> 59#include <linux/errno.h>
diff --git a/drivers/video/sun3fb.c b/drivers/video/sun3fb.c
index 9b36b9df535..e046e20f02b 100644
--- a/drivers/video/sun3fb.c
+++ b/drivers/video/sun3fb.c
@@ -25,7 +25,6 @@
25 * more details. 25 * more details.
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/errno.h> 30#include <linux/errno.h>
diff --git a/drivers/video/tdfxfb.c b/drivers/video/tdfxfb.c
index 5e5328d682d..239b1496874 100644
--- a/drivers/video/tdfxfb.c
+++ b/drivers/video/tdfxfb.c
@@ -58,7 +58,6 @@
58 * 58 *
59 */ 59 */
60 60
61#include <linux/config.h>
62#include <linux/module.h> 61#include <linux/module.h>
63#include <linux/kernel.h> 62#include <linux/kernel.h>
64#include <linux/errno.h> 63#include <linux/errno.h>
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c
index 41f8c2d9389..14175cdb9c9 100644
--- a/drivers/video/tridentfb.c
+++ b/drivers/video/tridentfb.c
@@ -15,7 +15,6 @@
15 * TGUI acceleration 15 * TGUI acceleration
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/fb.h> 19#include <linux/fb.h>
21#include <linux/init.h> 20#include <linux/init.h>
diff --git a/drivers/video/valkyriefb.c b/drivers/video/valkyriefb.c
index 2bdeb4baa95..1d76c035050 100644
--- a/drivers/video/valkyriefb.c
+++ b/drivers/video/valkyriefb.c
@@ -39,7 +39,6 @@
39 * more details. 39 * more details.
40 */ 40 */
41 41
42#include <linux/config.h>
43#include <linux/module.h> 42#include <linux/module.h>
44#include <linux/kernel.h> 43#include <linux/kernel.h>
45#include <linux/errno.h> 44#include <linux/errno.h>
diff --git a/drivers/video/vgastate.c b/drivers/video/vgastate.c
index 15179ec6233..d94efafc77b 100644
--- a/drivers/video/vgastate.c
+++ b/drivers/video/vgastate.c
@@ -13,7 +13,6 @@
13 * archive for more details. 13 * archive for more details.
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
19#include <linux/fb.h> 18#include <linux/fb.h>
diff --git a/drivers/zorro/names.c b/drivers/zorro/names.c
index 0dd532d3a5d..e8517c3d8e8 100644
--- a/drivers/zorro/names.c
+++ b/drivers/zorro/names.c
@@ -9,7 +9,6 @@
9 * David Mosberger-Tang, Martin Mares 9 * David Mosberger-Tang, Martin Mares
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/types.h> 14#include <linux/types.h>
diff --git a/fs/9p/conv.c b/fs/9p/conv.c
index a767e05b60b..1e898144eb7 100644
--- a/fs/9p/conv.c
+++ b/fs/9p/conv.c
@@ -24,7 +24,6 @@
24 * 24 *
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/fs.h> 29#include <linux/fs.h>
diff --git a/fs/9p/error.c b/fs/9p/error.c
index 981fe8ecd78..ae91555c155 100644
--- a/fs/9p/error.c
+++ b/fs/9p/error.c
@@ -27,7 +27,6 @@
27 * 27 *
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32 31
33#include <linux/list.h> 32#include <linux/list.h>
diff --git a/fs/9p/fcall.c b/fs/9p/fcall.c
index 6f2617820a4..8556097fcda 100644
--- a/fs/9p/fcall.c
+++ b/fs/9p/fcall.c
@@ -24,7 +24,6 @@
24 * 24 *
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/fs.h> 29#include <linux/fs.h>
diff --git a/fs/9p/fcprint.c b/fs/9p/fcprint.c
index 583e827baeb..34b96114a28 100644
--- a/fs/9p/fcprint.c
+++ b/fs/9p/fcprint.c
@@ -21,7 +21,6 @@
21 * Boston, MA 02111-1301 USA 21 * Boston, MA 02111-1301 USA
22 * 22 *
23 */ 23 */
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/errno.h> 25#include <linux/errno.h>
27#include <linux/fs.h> 26#include <linux/fs.h>
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index b7608af07ce..70492ccb438 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
26#include <linux/fs.h> 25#include <linux/fs.h>
diff --git a/fs/9p/mux.c b/fs/9p/mux.c
index 8d45ed66883..90a79c78454 100644
--- a/fs/9p/mux.c
+++ b/fs/9p/mux.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/fs.h> 28#include <linux/fs.h>
diff --git a/fs/9p/trans_fd.c b/fs/9p/trans_fd.c
index 94e0a7fd9fc..34d43355beb 100644
--- a/fs/9p/trans_fd.c
+++ b/fs/9p/trans_fd.c
@@ -25,7 +25,6 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/config.h>
29#include <linux/in.h> 28#include <linux/in.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/net.h> 30#include <linux/net.h>
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index d37416eb579..22f7ccd58d3 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/fs.h> 28#include <linux/fs.h>
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index d4f0aa3c87f..9dfd259a70b 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -31,7 +31,6 @@
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/smp_lock.h> 32#include <linux/smp_lock.h>
33#include <linux/inet.h> 33#include <linux/inet.h>
34#include <linux/version.h>
35#include <linux/pagemap.h> 34#include <linux/pagemap.h>
36#include <linux/idr.h> 35#include <linux/idr.h>
37 36
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 1a8e46084f0..c3c47eda757 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -31,7 +31,6 @@
31#include <linux/string.h> 31#include <linux/string.h>
32#include <linux/smp_lock.h> 32#include <linux/smp_lock.h>
33#include <linux/inet.h> 33#include <linux/inet.h>
34#include <linux/version.h>
35#include <linux/list.h> 34#include <linux/list.h>
36#include <asm/uaccess.h> 35#include <asm/uaccess.h>
37#include <linux/idr.h> 36#include <linux/idr.h>
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 8b15bb22cac..63320d4e15d 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -25,7 +25,6 @@
25 */ 25 */
26 26
27#include <linux/kernel.h> 27#include <linux/kernel.h>
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
31#include <linux/fs.h> 30#include <linux/fs.h>
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
index 7b075fc397d..d3c7905b2dd 100644
--- a/fs/adfs/dir.c
+++ b/fs/adfs/dir.c
@@ -9,7 +9,6 @@
9 * 9 *
10 * Common directory handling for ADFS 10 * Common directory handling for ADFS
11 */ 11 */
12#include <linux/config.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
14#include <linux/fs.h> 13#include <linux/fs.h>
15#include <linux/adfs_fs.h> 14#include <linux/adfs_fs.h>
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index a83e889a97c..fcaeead9696 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -325,7 +325,7 @@ befs_read_inode(struct inode *inode)
325 if (!bh) { 325 if (!bh) {
326 befs_error(sb, "unable to read inode block - " 326 befs_error(sb, "unable to read inode block - "
327 "inode = %lu", inode->i_ino); 327 "inode = %lu", inode->i_ino);
328 goto unaquire_none; 328 goto unacquire_none;
329 } 329 }
330 330
331 raw_inode = (befs_inode *) bh->b_data; 331 raw_inode = (befs_inode *) bh->b_data;
@@ -334,7 +334,7 @@ befs_read_inode(struct inode *inode)
334 334
335 if (befs_check_inode(sb, raw_inode, inode->i_ino) != BEFS_OK) { 335 if (befs_check_inode(sb, raw_inode, inode->i_ino) != BEFS_OK) {
336 befs_error(sb, "Bad inode: %lu", inode->i_ino); 336 befs_error(sb, "Bad inode: %lu", inode->i_ino);
337 goto unaquire_bh; 337 goto unacquire_bh;
338 } 338 }
339 339
340 inode->i_mode = (umode_t) fs32_to_cpu(sb, raw_inode->mode); 340 inode->i_mode = (umode_t) fs32_to_cpu(sb, raw_inode->mode);
@@ -402,17 +402,17 @@ befs_read_inode(struct inode *inode)
402 befs_error(sb, "Inode %lu is not a regular file, " 402 befs_error(sb, "Inode %lu is not a regular file, "
403 "directory or symlink. THAT IS WRONG! BeFS has no " 403 "directory or symlink. THAT IS WRONG! BeFS has no "
404 "on disk special files", inode->i_ino); 404 "on disk special files", inode->i_ino);
405 goto unaquire_bh; 405 goto unacquire_bh;
406 } 406 }
407 407
408 brelse(bh); 408 brelse(bh);
409 befs_debug(sb, "<--- befs_read_inode()"); 409 befs_debug(sb, "<--- befs_read_inode()");
410 return; 410 return;
411 411
412 unaquire_bh: 412 unacquire_bh:
413 brelse(bh); 413 brelse(bh);
414 414
415 unaquire_none: 415 unacquire_none:
416 make_bad_inode(inode); 416 make_bad_inode(inode);
417 befs_debug(sb, "<--- befs_read_inode() - Bad inode"); 417 befs_debug(sb, "<--- befs_read_inode() - Bad inode");
418 return; 418 return;
@@ -761,14 +761,14 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
761 printk(KERN_ERR 761 printk(KERN_ERR
762 "BeFS(%s): Unable to allocate memory for private " 762 "BeFS(%s): Unable to allocate memory for private "
763 "portion of superblock. Bailing.\n", sb->s_id); 763 "portion of superblock. Bailing.\n", sb->s_id);
764 goto unaquire_none; 764 goto unacquire_none;
765 } 765 }
766 befs_sb = BEFS_SB(sb); 766 befs_sb = BEFS_SB(sb);
767 memset(befs_sb, 0, sizeof(befs_sb_info)); 767 memset(befs_sb, 0, sizeof(befs_sb_info));
768 768
769 if (!parse_options((char *) data, &befs_sb->mount_opts)) { 769 if (!parse_options((char *) data, &befs_sb->mount_opts)) {
770 befs_error(sb, "cannot parse mount options"); 770 befs_error(sb, "cannot parse mount options");
771 goto unaquire_priv_sbp; 771 goto unacquire_priv_sbp;
772 } 772 }
773 773
774 befs_debug(sb, "---> befs_fill_super()"); 774 befs_debug(sb, "---> befs_fill_super()");
@@ -794,7 +794,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
794 794
795 if (!(bh = sb_bread(sb, sb_block))) { 795 if (!(bh = sb_bread(sb, sb_block))) {
796 befs_error(sb, "unable to read superblock"); 796 befs_error(sb, "unable to read superblock");
797 goto unaquire_priv_sbp; 797 goto unacquire_priv_sbp;
798 } 798 }
799 799
800 /* account for offset of super block on x86 */ 800 /* account for offset of super block on x86 */
@@ -809,20 +809,20 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
809 } 809 }
810 810
811 if (befs_load_sb(sb, disk_sb) != BEFS_OK) 811 if (befs_load_sb(sb, disk_sb) != BEFS_OK)
812 goto unaquire_bh; 812 goto unacquire_bh;
813 813
814 befs_dump_super_block(sb, disk_sb); 814 befs_dump_super_block(sb, disk_sb);
815 815
816 brelse(bh); 816 brelse(bh);
817 817
818 if (befs_check_sb(sb) != BEFS_OK) 818 if (befs_check_sb(sb) != BEFS_OK)
819 goto unaquire_priv_sbp; 819 goto unacquire_priv_sbp;
820 820
821 if( befs_sb->num_blocks > ~((sector_t)0) ) { 821 if( befs_sb->num_blocks > ~((sector_t)0) ) {
822 befs_error(sb, "blocks count: %Lu " 822 befs_error(sb, "blocks count: %Lu "
823 "is larger than the host can use", 823 "is larger than the host can use",
824 befs_sb->num_blocks); 824 befs_sb->num_blocks);
825 goto unaquire_priv_sbp; 825 goto unacquire_priv_sbp;
826 } 826 }
827 827
828 /* 828 /*
@@ -838,7 +838,7 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
838 if (!sb->s_root) { 838 if (!sb->s_root) {
839 iput(root); 839 iput(root);
840 befs_error(sb, "get root inode failed"); 840 befs_error(sb, "get root inode failed");
841 goto unaquire_priv_sbp; 841 goto unacquire_priv_sbp;
842 } 842 }
843 843
844 /* load nls library */ 844 /* load nls library */
@@ -860,13 +860,13 @@ befs_fill_super(struct super_block *sb, void *data, int silent)
860 860
861 return 0; 861 return 0;
862/*****************/ 862/*****************/
863 unaquire_bh: 863 unacquire_bh:
864 brelse(bh); 864 brelse(bh);
865 865
866 unaquire_priv_sbp: 866 unacquire_priv_sbp:
867 kfree(sb->s_fs_info); 867 kfree(sb->s_fs_info);
868 868
869 unaquire_none: 869 unacquire_none:
870 sb->s_fs_info = NULL; 870 sb->s_fs_info = NULL;
871 return -EINVAL; 871 return -EINVAL;
872} 872}
@@ -925,18 +925,18 @@ init_befs_fs(void)
925 925
926 err = befs_init_inodecache(); 926 err = befs_init_inodecache();
927 if (err) 927 if (err)
928 goto unaquire_none; 928 goto unacquire_none;
929 929
930 err = register_filesystem(&befs_fs_type); 930 err = register_filesystem(&befs_fs_type);
931 if (err) 931 if (err)
932 goto unaquire_inodecache; 932 goto unacquire_inodecache;
933 933
934 return 0; 934 return 0;
935 935
936unaquire_inodecache: 936unacquire_inodecache:
937 befs_destroy_inodecache(); 937 befs_destroy_inodecache();
938 938
939unaquire_none: 939unacquire_none:
940 return err; 940 return err;
941} 941}
942 942
diff --git a/fs/binfmt_flat.c b/fs/binfmt_flat.c
index c94d52eafd1..a62fd4018a2 100644
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -16,7 +16,6 @@
16 */ 16 */
17 17
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/config.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/mm.h> 21#include <linux/mm.h>
diff --git a/fs/binfmt_som.c b/fs/binfmt_som.c
index 00a91dc25d1..32b5d625ce9 100644
--- a/fs/binfmt_som.c
+++ b/fs/binfmt_som.c
@@ -32,7 +32,6 @@
32#include <asm/uaccess.h> 32#include <asm/uaccess.h>
33#include <asm/pgtable.h> 33#include <asm/pgtable.h>
34 34
35#include <linux/config.h>
36 35
37#include <linux/elf.h> 36#include <linux/elf.h>
38 37
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 909cb0595b4..9633a490dab 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE 5 * Copyright (C) 2001 Andrea Arcangeli <andrea@suse.de> SuSE
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/fcntl.h> 10#include <linux/fcntl.h>
diff --git a/fs/buffer.c b/fs/buffer.c
index 90e52e67720..3660dcb9759 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -18,7 +18,6 @@
18 * async buffer flushing, 1999 Andrea Arcangeli <andrea@suse.de> 18 * async buffer flushing, 1999 Andrea Arcangeli <andrea@suse.de>
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
23#include <linux/syscalls.h> 22#include <linux/syscalls.h>
24#include <linux/fs.h> 23#include <linux/fs.h>
diff --git a/fs/char_dev.c b/fs/char_dev.c
index 97986635b64..a4cbc6706ef 100644
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/fs.h> 8#include <linux/fs.h>
10#include <linux/slab.h> 9#include <linux/slab.h>
diff --git a/fs/cifs/asn1.c b/fs/cifs/asn1.c
index 031cdf29325..2e75883b7f5 100644
--- a/fs/cifs/asn1.c
+++ b/fs/cifs/asn1.c
@@ -17,7 +17,6 @@
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/types.h> 21#include <linux/types.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 5861eb42e62..944d2b9e092 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -324,7 +324,7 @@ out:
324 return rc; 324 return rc;
325} 325}
326 326
327/* Try to reaquire byte range locks that were released when session */ 327/* Try to reacquire byte range locks that were released when session */
328/* to server was lost */ 328/* to server was lost */
329static int cifs_relock_file(struct cifsFileInfo *cifsFile) 329static int cifs_relock_file(struct cifsFileInfo *cifsFile)
330{ 330{
diff --git a/fs/coda/sysctl.c b/fs/coda/sysctl.c
index f0b10757288..1c82e9a7d7c 100644
--- a/fs/coda/sysctl.c
+++ b/fs/coda/sysctl.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/time.h> 14#include <linux/time.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/sysctl.h> 16#include <linux/sysctl.h>
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c
index d8d50a70c58..4063a939697 100644
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@ -10,7 +10,6 @@
10 * ioctls. 10 * ioctls.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/compat.h> 14#include <linux/compat.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/fs/dcache.c b/fs/dcache.c
index 48b44a714b3..c6e3535be19 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -14,7 +14,6 @@
14 * the dcache entry is deleted or garbage collected. 14 * the dcache entry is deleted or garbage collected.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/syscalls.h> 17#include <linux/syscalls.h>
19#include <linux/string.h> 18#include <linux/string.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
diff --git a/fs/dcookies.c b/fs/dcookies.c
index 8749339bf4f..0c4b0674854 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -12,7 +12,6 @@
12 * to the pair and can be looked up from userspace. 12 * to the pair and can be looked up from userspace.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/syscalls.h> 15#include <linux/syscalls.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 66a505422e5..39640fd0345 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
19#include <linux/pagemap.h> 18#include <linux/pagemap.h>
diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c
index 6fa1e04f841..e8ae3042b80 100644
--- a/fs/debugfs/inode.c
+++ b/fs/debugfs/inode.c
@@ -16,7 +16,6 @@
16/* uncomment to get debug messages from the debug filesystem, ah the irony. */ 16/* uncomment to get debug messages from the debug filesystem, ah the irony. */
17/* #define DEBUG */ 17/* #define DEBUG */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/fs.h> 20#include <linux/fs.h>
22#include <linux/mount.h> 21#include <linux/mount.h>
diff --git a/fs/exec.c b/fs/exec.c
index c8494f513ea..8344ba73a2a 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -22,7 +22,6 @@
22 * formats. 22 * formats.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/slab.h> 25#include <linux/slab.h>
27#include <linux/file.h> 26#include <linux/file.h>
28#include <linux/mman.h> 27#include <linux/mman.h>
diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c
index 433a213a8bd..d4870432ecf 100644
--- a/fs/ext2/balloc.c
+++ b/fs/ext2/balloc.c
@@ -11,7 +11,6 @@
11 * David S. Miller (davem@caip.rutgers.edu), 1995 11 * David S. Miller (davem@caip.rutgers.edu), 1995
12 */ 12 */
13 13
14#include <linux/config.h>
15#include "ext2.h" 14#include "ext2.h"
16#include <linux/quotaops.h> 15#include <linux/quotaops.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
diff --git a/fs/ext2/ialloc.c b/fs/ext2/ialloc.c
index 308c252568c..de85c61c58c 100644
--- a/fs/ext2/ialloc.c
+++ b/fs/ext2/ialloc.c
@@ -12,7 +12,6 @@
12 * David S. Miller (davem@caip.rutgers.edu), 1995 12 * David S. Miller (davem@caip.rutgers.edu), 1995
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/quotaops.h> 15#include <linux/quotaops.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/backing-dev.h> 17#include <linux/backing-dev.h>
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index d4233b2e643..9f43879d6d6 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -16,7 +16,6 @@
16 * David S. Miller (davem@caip.rutgers.edu), 1995 16 * David S. Miller (davem@caip.rutgers.edu), 1995
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
diff --git a/fs/ext2/xattr.h b/fs/ext2/xattr.h
index 67cfeb66e89..bf8175b2ced 100644
--- a/fs/ext2/xattr.h
+++ b/fs/ext2/xattr.h
@@ -6,7 +6,6 @@
6 (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org> 6 (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
7*/ 7*/
8 8
9#include <linux/config.h>
10#include <linux/init.h> 9#include <linux/init.h>
11#include <linux/xattr.h> 10#include <linux/xattr.h>
12 11
diff --git a/fs/ext3/balloc.c b/fs/ext3/balloc.c
index 96172e89ddc..a504a40d6d2 100644
--- a/fs/ext3/balloc.c
+++ b/fs/ext3/balloc.c
@@ -11,7 +11,6 @@
11 * David S. Miller (davem@caip.rutgers.edu), 1995 11 * David S. Miller (davem@caip.rutgers.edu), 1995
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/time.h> 14#include <linux/time.h>
16#include <linux/capability.h> 15#include <linux/capability.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
diff --git a/fs/ext3/resize.c b/fs/ext3/resize.c
index dfd811895d8..5e1337fd878 100644
--- a/fs/ext3/resize.c
+++ b/fs/ext3/resize.c
@@ -8,7 +8,6 @@
8 * This could probably be made into a module, because it is not often in use. 8 * This could probably be made into a module, because it is not often in use.
9 */ 9 */
10 10
11#include <linux/config.h>
12 11
13#define EXT3FS_DEBUG 12#define EXT3FS_DEBUG
14 13
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index b7483360a2d..f2dd7133661 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -16,7 +16,6 @@
16 * David S. Miller (davem@caip.rutgers.edu), 1995 16 * David S. Miller (davem@caip.rutgers.edu), 1995
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/fs.h> 21#include <linux/fs.h>
diff --git a/fs/ext3/xattr.h b/fs/ext3/xattr.h
index 2ceae38f3d4..6b1ae1c6182 100644
--- a/fs/ext3/xattr.h
+++ b/fs/ext3/xattr.h
@@ -6,7 +6,6 @@
6 (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org> 6 (C) 2001 Andreas Gruenbacher, <a.gruenbacher@computer.org>
7*/ 7*/
8 8
9#include <linux/config.h>
10#include <linux/xattr.h> 9#include <linux/xattr.h>
11 10
12/* Magic value in attribute blocks */ 11/* Magic value in attribute blocks */
diff --git a/fs/file_table.c b/fs/file_table.c
index 506d5307108..0131ba06e1e 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) 5 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/string.h> 8#include <linux/string.h>
10#include <linux/slab.h> 9#include <linux/slab.h>
11#include <linux/file.h> 10#include <linux/file.h>
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index d9227bf14e8..34937ee83ab 100644
--- a/fs/hfs/super.c
+++ b/fs/hfs/super.c
@@ -12,7 +12,6 @@
12 * Based on the minix file system code, (C) 1991, 1992 by Linus Torvalds 12 * Based on the minix file system code, (C) 1991, 1992 by Linus Torvalds
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/blkdev.h> 16#include <linux/blkdev.h>
18#include <linux/mount.h> 17#include <linux/mount.h>
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c
index 0a92fa2336a..d279d5924f2 100644
--- a/fs/hfsplus/super.c
+++ b/fs/hfsplus/super.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/pagemap.h> 12#include <linux/pagemap.h>
diff --git a/fs/inode.c b/fs/inode.c
index 14a6c4147e4..0bf9f0444a9 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -4,7 +4,6 @@
4 * (C) 1997 Linus Torvalds 4 * (C) 1997 Linus Torvalds
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/fs.h> 7#include <linux/fs.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/dcache.h> 9#include <linux/dcache.h>
diff --git a/fs/ioctl.c b/fs/ioctl.c
index f8aeec3ca10..4b7660b09ac 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/syscalls.h> 7#include <linux/syscalls.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/smp_lock.h> 9#include <linux/smp_lock.h>
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c
index 3a39158cca9..731816332b1 100644
--- a/fs/isofs/compress.c
+++ b/fs/isofs/compress.c
@@ -16,7 +16,6 @@
16 * Transparent decompression of files on an iso9660 filesystem 16 * Transparent decompression of files on an iso9660 filesystem
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/init.h> 20#include <linux/init.h>
22 21
diff --git a/fs/isofs/dir.c b/fs/isofs/dir.c
index 5440ea292c6..27e276987fd 100644
--- a/fs/isofs/dir.c
+++ b/fs/isofs/dir.c
@@ -10,7 +10,6 @@
10 * 10 *
11 * isofs directory handling functions 11 * isofs directory handling functions
12 */ 12 */
13#include <linux/config.h>
14#include <linux/smp_lock.h> 13#include <linux/smp_lock.h>
15#include "isofs.h" 14#include "isofs.h"
16 15
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index bb11c7fb401..14391361c88 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -11,7 +11,6 @@
11 * 2004 Paul Serice - NFS Export Operations 11 * 2004 Paul Serice - NFS Export Operations
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17 16
diff --git a/fs/jffs/intrep.c b/fs/jffs/intrep.c
index 5371a403130..9000f1effed 100644
--- a/fs/jffs/intrep.c
+++ b/fs/jffs/intrep.c
@@ -55,7 +55,6 @@
55 * 55 *
56 */ 56 */
57 57
58#include <linux/config.h>
59#include <linux/types.h> 58#include <linux/types.h>
60#include <linux/slab.h> 59#include <linux/slab.h>
61#include <linux/jffs.h> 60#include <linux/jffs.h>
diff --git a/fs/jffs/jffs_fm.h b/fs/jffs/jffs_fm.h
index c794d923df2..9ee6ad29eff 100644
--- a/fs/jffs/jffs_fm.h
+++ b/fs/jffs/jffs_fm.h
@@ -20,7 +20,6 @@
20#ifndef __LINUX_JFFS_FM_H__ 20#ifndef __LINUX_JFFS_FM_H__
21#define __LINUX_JFFS_FM_H__ 21#define __LINUX_JFFS_FM_H__
22 22
23#include <linux/config.h>
24#include <linux/types.h> 23#include <linux/types.h>
25#include <linux/jffs.h> 24#include <linux/jffs.h>
26#include <linux/mtd/mtd.h> 25#include <linux/mtd/mtd.h>
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c
index 5c63e0cdcf4..3681d0728ac 100644
--- a/fs/jffs2/compr_zlib.c
+++ b/fs/jffs2/compr_zlib.c
@@ -15,7 +15,6 @@
15#error "The userspace support got too messy and was removed. Update your mkfs.jffs2" 15#error "The userspace support got too messy and was removed. Update your mkfs.jffs2"
16#endif 16#endif
17 17
18#include <linux/config.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
diff --git a/fs/jffs2/debug.h b/fs/jffs2/debug.h
index 5fa494a792b..3daf3bca037 100644
--- a/fs/jffs2/debug.h
+++ b/fs/jffs2/debug.h
@@ -13,7 +13,6 @@
13#ifndef _JFFS2_DEBUG_H_ 13#ifndef _JFFS2_DEBUG_H_
14#define _JFFS2_DEBUG_H_ 14#define _JFFS2_DEBUG_H_
15 15
16#include <linux/config.h>
17 16
18#ifndef CONFIG_JFFS2_FS_DEBUG 17#ifndef CONFIG_JFFS2_FS_DEBUG
19#define CONFIG_JFFS2_FS_DEBUG 0 18#define CONFIG_JFFS2_FS_DEBUG 0
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
index 97caa77d60c..4780f82825d 100644
--- a/fs/jffs2/fs.c
+++ b/fs/jffs2/fs.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14#include <linux/capability.h> 14#include <linux/capability.h>
15#include <linux/config.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
index b16c60bbcf6..f752baa8d39 100644
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -14,7 +14,6 @@
14#ifndef __JFFS2_NODELIST_H__ 14#ifndef __JFFS2_NODELIST_H__
15#define __JFFS2_NODELIST_H__ 15#define __JFFS2_NODELIST_H__
16 16
17#include <linux/config.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/jffs2.h> 19#include <linux/jffs2.h>
diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
index 2378a662c25..68e3953419b 100644
--- a/fs/jffs2/super.c
+++ b/fs/jffs2/super.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index ac3d66948e8..10c46231ce1 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -842,7 +842,7 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
842 TXN_UNLOCK(); 842 TXN_UNLOCK();
843 release_metapage(mp); 843 release_metapage(mp);
844 TXN_LOCK(); 844 TXN_LOCK();
845 xtid = tlck->tid; /* reaquire after dropping TXN_LOCK */ 845 xtid = tlck->tid; /* reacquire after dropping TXN_LOCK */
846 846
847 jfs_info("txLock: in waitLock, tid = %d, xtid = %d, lid = %d", 847 jfs_info("txLock: in waitLock, tid = %d, xtid = %d, lid = %d",
848 tid, xtid, lid); 848 tid, xtid, lid);
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 73d2aba084c..4f6cfebc82d 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -18,7 +18,6 @@
18 */ 18 */
19 19
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/parser.h> 22#include <linux/parser.h>
24#include <linux/completion.h> 23#include <linux/completion.h>
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 4db62098d3f..5980c45998c 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c
index fd56c8872f3..9a991b52c64 100644
--- a/fs/lockd/svc.c
+++ b/fs/lockd/svc.c
@@ -12,7 +12,6 @@
12 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> 12 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/sysctl.h> 17#include <linux/sysctl.h>
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 3ef739120df..baf5ae51348 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -20,7 +20,6 @@
20 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 20 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/types.h> 23#include <linux/types.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
26#include <linux/kernel.h> 25#include <linux/kernel.h>
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index d210cf304e9..dbb66a3b5cd 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -7,7 +7,6 @@
7 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 7 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/time.h> 11#include <linux/time.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c
index a570e5c8a93..2a4df9b3779 100644
--- a/fs/lockd/svcsubs.c
+++ b/fs/lockd/svcsubs.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/string.h> 10#include <linux/string.h>
12#include <linux/time.h> 11#include <linux/time.h>
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c
index f22a3764461..033ea4ac2c3 100644
--- a/fs/lockd/xdr.c
+++ b/fs/lockd/xdr.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> 6 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/sched.h> 10#include <linux/sched.h>
12#include <linux/utsname.h> 11#include <linux/utsname.h>
diff --git a/fs/namespace.c b/fs/namespace.c
index b3ed212ea41..fa7ed6a9fc2 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -8,7 +8,6 @@
8 * Heavily rewritten. 8 * Heavily rewritten.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/syscalls.h> 11#include <linux/syscalls.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/sched.h> 13#include <linux/sched.h>
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index f0860c602d8..b4ee89250e9 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14 13
15#include <linux/time.h> 14#include <linux/time.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
diff --git a/fs/ncpfs/inode.c b/fs/ncpfs/inode.c
index 6c51c119846..1ddf77b0b82 100644
--- a/fs/ncpfs/inode.c
+++ b/fs/ncpfs/inode.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14 13
15#include <asm/system.h> 14#include <asm/system.h>
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c
index eb3813ad136..42039fe0653 100644
--- a/fs/ncpfs/ioctl.c
+++ b/fs/ncpfs/ioctl.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11 10
12#include <asm/uaccess.h> 11#include <asm/uaccess.h>
13#include <linux/capability.h> 12#include <linux/capability.h>
diff --git a/fs/ncpfs/ncplib_kernel.c b/fs/ncpfs/ncplib_kernel.c
index d9ebf6439f5..551e0bac7aa 100644
--- a/fs/ncpfs/ncplib_kernel.c
+++ b/fs/ncpfs/ncplib_kernel.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12 12
13#include <linux/config.h>
14 13
15#include "ncplib_kernel.h" 14#include "ncplib_kernel.h"
16 15
diff --git a/fs/ncpfs/ncplib_kernel.h b/fs/ncpfs/ncplib_kernel.h
index 799e5c2bec5..2441d1ab57d 100644
--- a/fs/ncpfs/ncplib_kernel.h
+++ b/fs/ncpfs/ncplib_kernel.h
@@ -12,7 +12,6 @@
12#ifndef _NCPLIB_H 12#ifndef _NCPLIB_H
13#define _NCPLIB_H 13#define _NCPLIB_H
14 14
15#include <linux/config.h>
16 15
17#include <linux/fs.h> 16#include <linux/fs.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/fs/ncpfs/ncpsign_kernel.c b/fs/ncpfs/ncpsign_kernel.c
index a6ec90cd889..749a18d3359 100644
--- a/fs/ncpfs/ncpsign_kernel.c
+++ b/fs/ncpfs/ncpsign_kernel.c
@@ -5,7 +5,6 @@
5 * 5 *
6 */ 6 */
7 7
8#include <linux/config.h>
9 8
10#ifdef CONFIG_NCPFS_PACKET_SIGNING 9#ifdef CONFIG_NCPFS_PACKET_SIGNING
11 10
diff --git a/fs/ncpfs/sock.c b/fs/ncpfs/sock.c
index 8783eb7ec64..11c2b252ebe 100644
--- a/fs/ncpfs/sock.c
+++ b/fs/ncpfs/sock.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12 11
13#include <linux/time.h> 12#include <linux/time.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
diff --git a/fs/ncpfs/symlink.c b/fs/ncpfs/symlink.c
index f76b1392a01..ca92c240663 100644
--- a/fs/ncpfs/symlink.c
+++ b/fs/ncpfs/symlink.c
@@ -20,7 +20,6 @@
20 * 20 *
21 */ 21 */
22 22
23#include <linux/config.h>
24 23
25#include <asm/uaccess.h> 24#include <asm/uaccess.h>
26 25
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index d53f8c6a9ec..fe0a6b8ac14 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -6,7 +6,6 @@
6 * NFSv4 callback handling 6 * NFSv4 callback handling
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/completion.h> 9#include <linux/completion.h>
11#include <linux/ip.h> 10#include <linux/ip.h>
12#include <linux/module.h> 11#include <linux/module.h>
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 462cfceb50c..7719483ecdf 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * NFSv4 callback procedures 6 * NFSv4 callback procedures
7 */ 7 */
8#include <linux/config.h>
9#include <linux/nfs4.h> 8#include <linux/nfs4.h>
10#include <linux/nfs_fs.h> 9#include <linux/nfs_fs.h>
11#include "nfs4_fs.h" 10#include "nfs4_fs.h"
diff --git a/fs/nfs/callback_xdr.c b/fs/nfs/callback_xdr.c
index c92991328d9..29f93219205 100644
--- a/fs/nfs/callback_xdr.c
+++ b/fs/nfs/callback_xdr.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * NFSv4 callback encode/decode procedures 6 * NFSv4 callback encode/decode procedures
7 */ 7 */
8#include <linux/config.h>
9#include <linux/kernel.h> 8#include <linux/kernel.h>
10#include <linux/sunrpc/svc.h> 9#include <linux/sunrpc/svc.h>
11#include <linux/nfs4.h> 10#include <linux/nfs4.h>
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index d3be923d4e4..9540a316c05 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -6,7 +6,6 @@
6 * NFS file delegation management 6 * NFS file delegation management
7 * 7 *
8 */ 8 */
9#include <linux/config.h>
10#include <linux/completion.h> 9#include <linux/completion.h>
11#include <linux/kthread.h> 10#include <linux/kthread.h>
12#include <linux/module.h> 11#include <linux/module.h>
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 8ca9707be6c..4cdd1b499e3 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -38,7 +38,6 @@
38 * 38 *
39 */ 39 */
40 40
41#include <linux/config.h>
42#include <linux/errno.h> 41#include <linux/errno.h>
43#include <linux/sched.h> 42#include <linux/sched.h>
44#include <linux/kernel.h> 43#include <linux/kernel.h>
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index c5b916605fb..d349fb2245d 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/init.h> 17#include <linux/init.h>
19 18
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 4fe51c1292b..e4f4e5def0f 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -81,9 +81,9 @@ extern struct file_system_type clone_nfs_fs_type;
81#ifdef CONFIG_NFS_V4 81#ifdef CONFIG_NFS_V4
82extern struct file_system_type clone_nfs4_fs_type; 82extern struct file_system_type clone_nfs4_fs_type;
83#endif 83#endif
84#ifdef CONFIG_PROC_FS 84
85extern struct rpc_stat nfs_rpcstat; 85extern struct rpc_stat nfs_rpcstat;
86#endif 86
87extern int __init register_nfs_fs(void); 87extern int __init register_nfs_fs(void);
88extern void __exit unregister_nfs_fs(void); 88extern void __exit unregister_nfs_fs(void);
89 89
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 96e5b82c153..090a36b07a2 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -38,7 +38,6 @@
38 * subsequent patch. 38 * subsequent patch.
39 */ 39 */
40 40
41#include <linux/config.h>
42#include <linux/slab.h> 41#include <linux/slab.h>
43#include <linux/smp_lock.h> 42#include <linux/smp_lock.h>
44#include <linux/nfs_fs.h> 43#include <linux/nfs_fs.h>
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c
index 26b1fe90937..36e902a88ca 100644
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/file.h> 13#include <linux/file.h>
15#include <linux/sunrpc/clnt.h> 14#include <linux/sunrpc/clnt.h>
diff --git a/fs/nfs/read.c b/fs/nfs/read.c
index 32cf3773af0..52bf634260a 100644
--- a/fs/nfs/read.c
+++ b/fs/nfs/read.c
@@ -15,7 +15,6 @@
15 * within the RPC code when root squashing is suspected. 15 * within the RPC code when root squashing is suspected.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/time.h> 18#include <linux/time.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/errno.h> 20#include <linux/errno.h>
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c
index db61e51bb15..2fe3403c240 100644
--- a/fs/nfs/sysctl.c
+++ b/fs/nfs/sysctl.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Sysctl interface to NFS parameters 4 * Sysctl interface to NFS parameters
5 */ 5 */
6#include <linux/config.h>
7#include <linux/types.h> 6#include <linux/types.h>
8#include <linux/linkage.h> 7#include <linux/linkage.h>
9#include <linux/ctype.h> 8#include <linux/ctype.h>
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index f21e268705c..bca5734ca9f 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -46,7 +46,6 @@
46 * Copyright (C) 1996, 1997, Olaf Kirch <okir@monad.swb.de> 46 * Copyright (C) 1996, 1997, Olaf Kirch <okir@monad.swb.de>
47 */ 47 */
48 48
49#include <linux/config.h>
50#include <linux/types.h> 49#include <linux/types.h>
51#include <linux/slab.h> 50#include <linux/slab.h>
52#include <linux/mm.h> 51#include <linux/mm.h>
diff --git a/fs/nfsctl.c b/fs/nfsctl.c
index a5a18d4aca4..c043136a82c 100644
--- a/fs/nfsctl.c
+++ b/fs/nfsctl.c
@@ -4,7 +4,6 @@
4 * This should eventually move to userland. 4 * This should eventually move to userland.
5 * 5 *
6 */ 6 */
7#include <linux/config.h>
8#include <linux/types.h> 7#include <linux/types.h>
9#include <linux/file.h> 8#include <linux/file.h>
10#include <linux/fs.h> 9#include <linux/fs.h>
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index dbaf3f93f32..54b37b1d2e3 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -33,7 +33,6 @@
33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */ 34 */
35 35
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/list.h> 37#include <linux/list.h>
39#include <linux/inet.h> 38#include <linux/inet.h>
diff --git a/fs/nfsd/nfs4idmap.c b/fs/nfsd/nfs4idmap.c
index 4b6aa60dfce..bea6b947811 100644
--- a/fs/nfsd/nfs4idmap.c
+++ b/fs/nfsd/nfs4idmap.c
@@ -34,7 +34,6 @@
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/init.h> 38#include <linux/init.h>
40 39
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index a1810e6a93e..7046ac9cf97 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> 6 * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11 10
12#include <linux/linkage.h> 11#include <linux/linkage.h>
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 3790727e5df..ec1decf29ba 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -8,7 +8,6 @@
8 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> 8 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13 12
14#include <linux/time.h> 13#include <linux/time.h>
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index e170030d45d..c9e3b5a8fe0 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -16,7 +16,6 @@
16 * Zerocpy NFS support (C) 2002 Hirokazu Takahashi <taka@valinux.co.jp> 16 * Zerocpy NFS support (C) 2002 Hirokazu Takahashi <taka@valinux.co.jp>
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/string.h> 19#include <linux/string.h>
21#include <linux/time.h> 20#include <linux/time.h>
22#include <linux/errno.h> 21#include <linux/errno.h>
diff --git a/fs/nls/nls_base.c b/fs/nls/nls_base.c
index a912debcd20..9de6b495f11 100644
--- a/fs/nls/nls_base.c
+++ b/fs/nls/nls_base.c
@@ -10,7 +10,6 @@
10 10
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/config.h>
14#include <linux/nls.h> 13#include <linux/nls.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
diff --git a/fs/ntfs/sysctl.h b/fs/ntfs/sysctl.h
index c8064cae8f1..beda5bf9640 100644
--- a/fs/ntfs/sysctl.h
+++ b/fs/ntfs/sysctl.h
@@ -24,7 +24,6 @@
24#ifndef _LINUX_NTFS_SYSCTL_H 24#ifndef _LINUX_NTFS_SYSCTL_H
25#define _LINUX_NTFS_SYSCTL_H 25#define _LINUX_NTFS_SYSCTL_H
26 26
27#include <linux/config.h>
28 27
29#if defined(DEBUG) && defined(CONFIG_SYSCTL) 28#if defined(DEBUG) && defined(CONFIG_SYSCTL)
30 29
diff --git a/fs/partitions/acorn.c b/fs/partitions/acorn.c
index c05085710fc..1bc9f372c7d 100644
--- a/fs/partitions/acorn.c
+++ b/fs/partitions/acorn.c
@@ -12,7 +12,6 @@
12 * every single manufacturer of SCSI and IDE cards created their own 12 * every single manufacturer of SCSI and IDE cards created their own
13 * method. 13 * method.
14 */ 14 */
15#include <linux/config.h>
16#include <linux/buffer_head.h> 15#include <linux/buffer_head.h>
17#include <linux/adfs_fs.h> 16#include <linux/adfs_fs.h>
18 17
diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c
index 0f5b017aeba..63730282ad8 100644
--- a/fs/partitions/efi.c
+++ b/fs/partitions/efi.c
@@ -91,7 +91,6 @@
91 * - Code works, detects all the partitions. 91 * - Code works, detects all the partitions.
92 * 92 *
93 ************************************************************/ 93 ************************************************************/
94#include <linux/config.h>
95#include <linux/crc32.h> 94#include <linux/crc32.h>
96#include "check.h" 95#include "check.h"
97#include "efi.h" 96#include "efi.h"
diff --git a/fs/partitions/efi.h b/fs/partitions/efi.h
index c44fb056144..2cc89d0475b 100644
--- a/fs/partitions/efi.h
+++ b/fs/partitions/efi.h
@@ -26,7 +26,6 @@
26#define FS_PART_EFI_H_INCLUDED 26#define FS_PART_EFI_H_INCLUDED
27 27
28#include <linux/types.h> 28#include <linux/types.h>
29#include <linux/config.h>
30#include <linux/fs.h> 29#include <linux/fs.h>
31#include <linux/genhd.h> 30#include <linux/genhd.h>
32#include <linux/kernel.h> 31#include <linux/kernel.h>
diff --git a/fs/partitions/ibm.c b/fs/partitions/ibm.c
index 830c55d86ab..d352a7381fe 100644
--- a/fs/partitions/ibm.c
+++ b/fs/partitions/ibm.c
@@ -6,7 +6,6 @@
6 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 6 * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/buffer_head.h> 9#include <linux/buffer_head.h>
11#include <linux/hdreg.h> 10#include <linux/hdreg.h>
12#include <linux/slab.h> 11#include <linux/slab.h>
diff --git a/fs/partitions/mac.c b/fs/partitions/mac.c
index 813292f2121..c0871002d00 100644
--- a/fs/partitions/mac.c
+++ b/fs/partitions/mac.c
@@ -6,7 +6,6 @@
6 * Re-organised Feb 1998 Russell King 6 * Re-organised Feb 1998 Russell King
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/ctype.h> 9#include <linux/ctype.h>
11#include "check.h" 10#include "check.h"
12#include "mac.h" 11#include "mac.h"
diff --git a/fs/partitions/msdos.c b/fs/partitions/msdos.c
index 9935d254186..8f12587c312 100644
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -19,7 +19,6 @@
19 * Re-organised Feb 1998 Russell King 19 * Re-organised Feb 1998 Russell King
20 */ 20 */
21 21
22#include <linux/config.h>
23 22
24#include "check.h" 23#include "check.h"
25#include "msdos.h" 24#include "msdos.h"
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 7a76ad57023..7495d3e2077 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -52,7 +52,6 @@
52 * : base.c too. 52 * : base.c too.
53 */ 53 */
54 54
55#include <linux/config.h>
56#include <linux/types.h> 55#include <linux/types.h>
57#include <linux/errno.h> 56#include <linux/errno.h>
58#include <linux/time.h> 57#include <linux/time.h>
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 6ba7785319d..243a94af042 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -49,7 +49,6 @@
49 49
50#include <asm/uaccess.h> 50#include <asm/uaccess.h>
51 51
52#include <linux/config.h>
53#include <linux/errno.h> 52#include <linux/errno.h>
54#include <linux/time.h> 53#include <linux/time.h>
55#include <linux/proc_fs.h> 54#include <linux/proc_fs.h>
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 17f6e8fa139..036d14d8362 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -9,7 +9,6 @@
9 * Safe accesses to vmalloc/direct-mapped discontiguous areas, Kanoj Sarcar <kanoj@sgi.com> 9 * Safe accesses to vmalloc/direct-mapped discontiguous areas, Kanoj Sarcar <kanoj@sgi.com>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
15#include <linux/user.h> 14#include <linux/user.h>
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 6aa2aa779a0..9f2cfc30f9c 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -26,7 +26,6 @@
26#include <linux/mman.h> 26#include <linux/mman.h>
27#include <linux/proc_fs.h> 27#include <linux/proc_fs.h>
28#include <linux/ioport.h> 28#include <linux/ioport.h>
29#include <linux/config.h>
30#include <linux/mm.h> 29#include <linux/mm.h>
31#include <linux/mmzone.h> 30#include <linux/mmzone.h>
32#include <linux/pagemap.h> 31#include <linux/pagemap.h>
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 9995356ce73..8901c65caca 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -12,7 +12,6 @@
12#include <linux/time.h> 12#include <linux/time.h>
13#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
14#include <linux/stat.h> 14#include <linux/stat.h>
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/bitops.h> 17#include <linux/bitops.h>
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 20d4b2237fc..d96050728c4 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -7,7 +7,6 @@
7 * 7 *
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/mm.h> 10#include <linux/mm.h>
12#include <linux/proc_fs.h> 11#include <linux/proc_fs.h>
13#include <linux/user.h> 12#include <linux/user.h>
diff --git a/fs/qnx4/bitmap.c b/fs/qnx4/bitmap.c
index 46efbf52cbe..8425cf6e962 100644
--- a/fs/qnx4/bitmap.c
+++ b/fs/qnx4/bitmap.c
@@ -13,7 +13,6 @@
13 * 28-06-1998 by Frank Denis : qnx4_free_inode (to be fixed) . 13 * 28-06-1998 by Frank Denis : qnx4_free_inode (to be fixed) .
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/time.h> 16#include <linux/time.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
19#include <linux/qnx4_fs.h> 18#include <linux/qnx4_fs.h>
diff --git a/fs/qnx4/dir.c b/fs/qnx4/dir.c
index 9031948fefd..0d7103fa0df 100644
--- a/fs/qnx4/dir.c
+++ b/fs/qnx4/dir.c
@@ -11,7 +11,6 @@
11 * 20-06-1998 by Frank Denis : Linux 2.1.99+ & dcache support. 11 * 20-06-1998 by Frank Denis : Linux 2.1.99+ & dcache support.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/string.h> 14#include <linux/string.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
diff --git a/fs/qnx4/fsync.c b/fs/qnx4/fsync.c
index df5bc75d541..aa3b19544be 100644
--- a/fs/qnx4/fsync.c
+++ b/fs/qnx4/fsync.c
@@ -10,7 +10,6 @@
10 * 24-03-1998 by Richard Frowijn : first release. 10 * 24-03-1998 by Richard Frowijn : first release.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/time.h> 14#include <linux/time.h>
16#include <linux/stat.h> 15#include <linux/stat.h>
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c
index 8bc182a8874..5a903491e69 100644
--- a/fs/qnx4/inode.c
+++ b/fs/qnx4/inode.c
@@ -12,7 +12,6 @@
12 * 30-06-1998 by Frank Denis : first step to write inodes. 12 * 30-06-1998 by Frank Denis : first step to write inodes.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/string.h> 17#include <linux/string.h>
diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c
index 4af4951d7f5..c3d83f67154 100644
--- a/fs/qnx4/namei.c
+++ b/fs/qnx4/namei.c
@@ -12,7 +12,6 @@
12 * 04-07-1998 by Frank Denis : first step for rmdir/unlink. 12 * 04-07-1998 by Frank Denis : first step for rmdir/unlink.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/time.h> 15#include <linux/time.h>
17#include <linux/fs.h> 16#include <linux/fs.h>
18#include <linux/qnx4_fs.h> 17#include <linux/qnx4_fs.h>
diff --git a/fs/qnx4/truncate.c b/fs/qnx4/truncate.c
index 86563ec01b3..6437c1c3d1d 100644
--- a/fs/qnx4/truncate.c
+++ b/fs/qnx4/truncate.c
@@ -10,7 +10,6 @@
10 * 30-06-1998 by Frank DENIS : ugly filler. 10 * 30-06-1998 by Frank DENIS : ugly filler.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/errno.h> 14#include <linux/errno.h>
16#include <linux/fs.h> 15#include <linux/fs.h>
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c
index 909f71e9a30..4a7dbdee1b6 100644
--- a/fs/reiserfs/bitmap.c
+++ b/fs/reiserfs/bitmap.c
@@ -3,7 +3,6 @@
3 */ 3 */
4/* Reiserfs block (de)allocator, bitmap-based. */ 4/* Reiserfs block (de)allocator, bitmap-based. */
5 5
6#include <linux/config.h>
7#include <linux/time.h> 6#include <linux/time.h>
8#include <linux/reiserfs_fs.h> 7#include <linux/reiserfs_fs.h>
9#include <linux/errno.h> 8#include <linux/errno.h>
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c
index 973c819f803..9aabcc0ccd2 100644
--- a/fs/reiserfs/dir.c
+++ b/fs/reiserfs/dir.c
@@ -2,7 +2,6 @@
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README 2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/string.h> 5#include <linux/string.h>
7#include <linux/errno.h> 6#include <linux/errno.h>
8#include <linux/fs.h> 7#include <linux/fs.h>
diff --git a/fs/reiserfs/do_balan.c b/fs/reiserfs/do_balan.c
index b2264ba3cc5..fba304e64de 100644
--- a/fs/reiserfs/do_balan.c
+++ b/fs/reiserfs/do_balan.c
@@ -15,7 +15,6 @@
15 ** 15 **
16 **/ 16 **/
17 17
18#include <linux/config.h>
19#include <asm/uaccess.h> 18#include <asm/uaccess.h>
20#include <linux/time.h> 19#include <linux/time.h>
21#include <linux/reiserfs_fs.h> 20#include <linux/reiserfs_fs.h>
diff --git a/fs/reiserfs/fix_node.c b/fs/reiserfs/fix_node.c
index 5600d3d60cf..6d0e554daa9 100644
--- a/fs/reiserfs/fix_node.c
+++ b/fs/reiserfs/fix_node.c
@@ -34,7 +34,6 @@
34 ** 34 **
35 **/ 35 **/
36 36
37#include <linux/config.h>
38#include <linux/time.h> 37#include <linux/time.h>
39#include <linux/string.h> 38#include <linux/string.h>
40#include <linux/reiserfs_fs.h> 39#include <linux/reiserfs_fs.h>
diff --git a/fs/reiserfs/ibalance.c b/fs/reiserfs/ibalance.c
index 6c5a726fd34..de391a82b99 100644
--- a/fs/reiserfs/ibalance.c
+++ b/fs/reiserfs/ibalance.c
@@ -2,7 +2,6 @@
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README 2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <asm/uaccess.h> 5#include <asm/uaccess.h>
7#include <linux/string.h> 6#include <linux/string.h>
8#include <linux/time.h> 7#include <linux/time.h>
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index a24858a632f..12dfdcfbee3 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -2,7 +2,6 @@
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README 2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/time.h> 5#include <linux/time.h>
7#include <linux/fs.h> 6#include <linux/fs.h>
8#include <linux/reiserfs_fs.h> 7#include <linux/reiserfs_fs.h>
@@ -2933,6 +2932,11 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
2933 } 2932 }
2934 if (error) 2933 if (error)
2935 goto out; 2934 goto out;
2935 /*
2936 * file size is changed, ctime and mtime are
2937 * to be updated
2938 */
2939 attr->ia_valid |= (ATTR_MTIME | ATTR_CTIME);
2936 } 2940 }
2937 } 2941 }
2938 2942
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c
index 49d1a53dbef..9b3672d6936 100644
--- a/fs/reiserfs/journal.c
+++ b/fs/reiserfs/journal.c
@@ -34,7 +34,6 @@
34** from within kupdate, it will ignore the immediate flag 34** from within kupdate, it will ignore the immediate flag
35*/ 35*/
36 36
37#include <linux/config.h>
38#include <asm/uaccess.h> 37#include <asm/uaccess.h>
39#include <asm/system.h> 38#include <asm/system.h>
40 39
diff --git a/fs/reiserfs/lbalance.c b/fs/reiserfs/lbalance.c
index 2533c1f64ab..281f8061ac5 100644
--- a/fs/reiserfs/lbalance.c
+++ b/fs/reiserfs/lbalance.c
@@ -2,7 +2,6 @@
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README 2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <asm/uaccess.h> 5#include <asm/uaccess.h>
7#include <linux/string.h> 6#include <linux/string.h>
8#include <linux/time.h> 7#include <linux/time.h>
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c
index 284f7852de8..c61710e49c6 100644
--- a/fs/reiserfs/namei.c
+++ b/fs/reiserfs/namei.c
@@ -11,7 +11,6 @@
11 * NO WARRANTY 11 * NO WARRANTY
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/time.h> 14#include <linux/time.h>
16#include <linux/bitops.h> 15#include <linux/bitops.h>
17#include <linux/reiserfs_fs.h> 16#include <linux/reiserfs_fs.h>
diff --git a/fs/reiserfs/objectid.c b/fs/reiserfs/objectid.c
index f62590aa9c9..65feba4deb6 100644
--- a/fs/reiserfs/objectid.c
+++ b/fs/reiserfs/objectid.c
@@ -2,7 +2,6 @@
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README 2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/string.h> 5#include <linux/string.h>
7#include <linux/random.h> 6#include <linux/random.h>
8#include <linux/time.h> 7#include <linux/time.h>
diff --git a/fs/reiserfs/prints.c b/fs/reiserfs/prints.c
index 27bd3a1df2a..bc808a91eea 100644
--- a/fs/reiserfs/prints.c
+++ b/fs/reiserfs/prints.c
@@ -2,7 +2,6 @@
2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README 2 * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/time.h> 5#include <linux/time.h>
7#include <linux/fs.h> 6#include <linux/fs.h>
8#include <linux/reiserfs_fs.h> 7#include <linux/reiserfs_fs.h>
diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c
index 731688e1cfe..5d8a8cfebc7 100644
--- a/fs/reiserfs/procfs.c
+++ b/fs/reiserfs/procfs.c
@@ -10,7 +10,6 @@
10 10
11/* $Id: procfs.c,v 1.1.8.2 2001/07/15 17:08:42 god Exp $ */ 11/* $Id: procfs.c,v 1.1.8.2 2001/07/15 17:08:42 god Exp $ */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/time.h> 14#include <linux/time.h>
16#include <linux/seq_file.h> 15#include <linux/seq_file.h>
diff --git a/fs/reiserfs/stree.c b/fs/reiserfs/stree.c
index d2b25e1ba6e..8b9b1312713 100644
--- a/fs/reiserfs/stree.c
+++ b/fs/reiserfs/stree.c
@@ -49,7 +49,6 @@
49 * reiserfs_insert_item 49 * reiserfs_insert_item
50 */ 50 */
51 51
52#include <linux/config.h>
53#include <linux/time.h> 52#include <linux/time.h>
54#include <linux/string.h> 53#include <linux/string.h>
55#include <linux/pagemap.h> 54#include <linux/pagemap.h>
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 00f1321e920..28eb3c88603 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -11,7 +11,6 @@
11 * NO WARRANTY 11 * NO WARRANTY
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/vmalloc.h> 15#include <linux/vmalloc.h>
17#include <linux/time.h> 16#include <linux/time.h>
diff --git a/fs/reiserfs/tail_conversion.c b/fs/reiserfs/tail_conversion.c
index 196e971c03c..36f108fc1cf 100644
--- a/fs/reiserfs/tail_conversion.c
+++ b/fs/reiserfs/tail_conversion.c
@@ -2,7 +2,6 @@
2 * Copyright 1999 Hans Reiser, see reiserfs/README for licensing and copyright details 2 * Copyright 1999 Hans Reiser, see reiserfs/README for licensing and copyright details
3 */ 3 */
4 4
5#include <linux/config.h>
6#include <linux/time.h> 5#include <linux/time.h>
7#include <linux/pagemap.h> 6#include <linux/pagemap.h>
8#include <linux/buffer_head.h> 7#include <linux/buffer_head.h>
diff --git a/fs/smbfs/inode.c b/fs/smbfs/inode.c
index 506ff87c1d4..a1ed657c3c8 100644
--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -7,7 +7,6 @@
7 * Please add a note about your changes to smbfs in the ChangeLog file. 7 * Please add a note about your changes to smbfs in the ChangeLog file.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/time.h> 11#include <linux/time.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
diff --git a/fs/smbfs/smbiod.c b/fs/smbfs/smbiod.c
index 24577e2c489..e6754044128 100644
--- a/fs/smbfs/smbiod.c
+++ b/fs/smbfs/smbiod.c
@@ -5,7 +5,6 @@
5 * Copyright (C) 2001, Urban Widmark 5 * Copyright (C) 2001, Urban Widmark
6 */ 6 */
7 7
8#include <linux/config.h>
9 8
10#include <linux/sched.h> 9#include <linux/sched.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
diff --git a/fs/stat.c b/fs/stat.c
index 0f282face32..3a44dcf97da 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
diff --git a/fs/super.c b/fs/super.c
index 8a669f6f3f5..9b780c42d84 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -20,7 +20,6 @@
20 * Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000 20 * Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/slab.h> 24#include <linux/slab.h>
26#include <linux/init.h> 25#include <linux/init.h>
diff --git a/fs/udf/super.c b/fs/udf/super.c
index 44fe2cb0bbb..4df822c881b 100644
--- a/fs/udf/super.c
+++ b/fs/udf/super.c
@@ -40,7 +40,6 @@
40 40
41#include "udfdecl.h" 41#include "udfdecl.h"
42 42
43#include <linux/config.h>
44#include <linux/blkdev.h> 43#include <linux/blkdev.h>
45#include <linux/slab.h> 44#include <linux/slab.h>
46#include <linux/kernel.h> 45#include <linux/kernel.h>
diff --git a/fs/udf/udfdecl.h b/fs/udf/udfdecl.h
index 2f992387cc9..1033b7cf293 100644
--- a/fs/udf/udfdecl.h
+++ b/fs/udf/udfdecl.h
@@ -6,7 +6,6 @@
6#include "osta_udf.h" 6#include "osta_udf.h"
7 7
8#include <linux/fs.h> 8#include <linux/fs.h>
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/udf_fs_i.h> 10#include <linux/udf_fs_i.h>
12#include <linux/udf_fs_sb.h> 11#include <linux/udf_fs_sb.h>
diff --git a/fs/ufs/balloc.c b/fs/ufs/balloc.c
index 95b878e5c7a..b01804baa12 100644
--- a/fs/ufs/balloc.c
+++ b/fs/ufs/balloc.c
@@ -217,48 +217,6 @@ failed:
217 return; 217 return;
218} 218}
219 219
220static struct page *ufs_get_locked_page(struct address_space *mapping,
221 unsigned long index)
222{
223 struct page *page;
224
225try_again:
226 page = find_lock_page(mapping, index);
227 if (!page) {
228 page = read_cache_page(mapping, index,
229 (filler_t*)mapping->a_ops->readpage,
230 NULL);
231 if (IS_ERR(page)) {
232 printk(KERN_ERR "ufs_change_blocknr: "
233 "read_cache_page error: ino %lu, index: %lu\n",
234 mapping->host->i_ino, index);
235 goto out;
236 }
237
238 lock_page(page);
239
240 if (!PageUptodate(page) || PageError(page)) {
241 unlock_page(page);
242 page_cache_release(page);
243
244 printk(KERN_ERR "ufs_change_blocknr: "
245 "can not read page: ino %lu, index: %lu\n",
246 mapping->host->i_ino, index);
247
248 page = ERR_PTR(-EIO);
249 goto out;
250 }
251 }
252
253 if (unlikely(!page->mapping || !page_has_buffers(page))) {
254 unlock_page(page);
255 page_cache_release(page);
256 goto try_again;/*we really need these buffers*/
257 }
258out:
259 return page;
260}
261
262/* 220/*
263 * Modify inode page cache in such way: 221 * Modify inode page cache in such way:
264 * have - blocks with b_blocknr equal to oldb...oldb+count-1 222 * have - blocks with b_blocknr equal to oldb...oldb+count-1
@@ -311,10 +269,8 @@ static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk,
311 269
312 set_page_dirty(page); 270 set_page_dirty(page);
313 271
314 if (likely(cur_index != index)) { 272 if (likely(cur_index != index))
315 unlock_page(page); 273 ufs_put_locked_page(page);
316 page_cache_release(page);
317 }
318 } 274 }
319 UFSD("EXIT\n"); 275 UFSD("EXIT\n");
320} 276}
diff --git a/fs/ufs/file.c b/fs/ufs/file.c
index 0e5001512a9..a9c6e5f04fa 100644
--- a/fs/ufs/file.c
+++ b/fs/ufs/file.c
@@ -60,7 +60,3 @@ const struct file_operations ufs_file_operations = {
60 .fsync = ufs_sync_file, 60 .fsync = ufs_sync_file,
61 .sendfile = generic_file_sendfile, 61 .sendfile = generic_file_sendfile,
62}; 62};
63
64struct inode_operations ufs_file_inode_operations = {
65 .truncate = ufs_truncate,
66};
diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c
index 488b5ff48af..e7c8615beb6 100644
--- a/fs/ufs/inode.c
+++ b/fs/ufs/inode.c
@@ -843,14 +843,17 @@ int ufs_sync_inode (struct inode *inode)
843 843
844void ufs_delete_inode (struct inode * inode) 844void ufs_delete_inode (struct inode * inode)
845{ 845{
846 loff_t old_i_size;
847
846 truncate_inode_pages(&inode->i_data, 0); 848 truncate_inode_pages(&inode->i_data, 0);
847 /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/ 849 /*UFS_I(inode)->i_dtime = CURRENT_TIME;*/
848 lock_kernel(); 850 lock_kernel();
849 mark_inode_dirty(inode); 851 mark_inode_dirty(inode);
850 ufs_update_inode(inode, IS_SYNC(inode)); 852 ufs_update_inode(inode, IS_SYNC(inode));
853 old_i_size = inode->i_size;
851 inode->i_size = 0; 854 inode->i_size = 0;
852 if (inode->i_blocks) 855 if (inode->i_blocks && ufs_truncate(inode, old_i_size))
853 ufs_truncate (inode); 856 ufs_warning(inode->i_sb, __FUNCTION__, "ufs_truncate failed\n");
854 ufs_free_inode (inode); 857 ufs_free_inode (inode);
855 unlock_kernel(); 858 unlock_kernel();
856} 859}
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 74ef5e9bedf..19a99726e58 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -64,7 +64,6 @@
64 */ 64 */
65 65
66 66
67#include <linux/config.h>
68#include <linux/module.h> 67#include <linux/module.h>
69#include <linux/bitops.h> 68#include <linux/bitops.h>
70 69
diff --git a/fs/ufs/truncate.c b/fs/ufs/truncate.c
index 3c3b301f870..c9b55872079 100644
--- a/fs/ufs/truncate.c
+++ b/fs/ufs/truncate.c
@@ -369,24 +369,97 @@ static int ufs_trunc_tindirect (struct inode * inode)
369 UFSD("EXIT\n"); 369 UFSD("EXIT\n");
370 return retry; 370 return retry;
371} 371}
372 372
373void ufs_truncate (struct inode * inode) 373static int ufs_alloc_lastblock(struct inode *inode)
374{ 374{
375 int err = 0;
376 struct address_space *mapping = inode->i_mapping;
377 struct ufs_sb_private_info *uspi = UFS_SB(inode->i_sb)->s_uspi;
375 struct ufs_inode_info *ufsi = UFS_I(inode); 378 struct ufs_inode_info *ufsi = UFS_I(inode);
376 struct super_block * sb; 379 unsigned lastfrag, i, end;
377 struct ufs_sb_private_info * uspi; 380 struct page *lastpage;
378 int retry; 381 struct buffer_head *bh;
382
383 lastfrag = (i_size_read(inode) + uspi->s_fsize - 1) >> uspi->s_fshift;
384
385 if (!lastfrag) {
386 ufsi->i_lastfrag = 0;
387 goto out;
388 }
389 lastfrag--;
390
391 lastpage = ufs_get_locked_page(mapping, lastfrag >>
392 (PAGE_CACHE_SHIFT - inode->i_blkbits));
393 if (IS_ERR(lastpage)) {
394 err = -EIO;
395 goto out;
396 }
397
398 end = lastfrag & ((1 << (PAGE_CACHE_SHIFT - inode->i_blkbits)) - 1);
399 bh = page_buffers(lastpage);
400 for (i = 0; i < end; ++i)
401 bh = bh->b_this_page;
402
403 if (!buffer_mapped(bh)) {
404 err = ufs_getfrag_block(inode, lastfrag, bh, 1);
405
406 if (unlikely(err))
407 goto out_unlock;
408
409 if (buffer_new(bh)) {
410 clear_buffer_new(bh);
411 unmap_underlying_metadata(bh->b_bdev,
412 bh->b_blocknr);
413 /*
414 * we do not zeroize fragment, because of
415 * if it maped to hole, it already contains zeroes
416 */
417 set_buffer_uptodate(bh);
418 mark_buffer_dirty(bh);
419 set_page_dirty(lastpage);
420 }
421 }
422out_unlock:
423 ufs_put_locked_page(lastpage);
424out:
425 return err;
426}
427
428int ufs_truncate(struct inode *inode, loff_t old_i_size)
429{
430 struct ufs_inode_info *ufsi = UFS_I(inode);
431 struct super_block *sb = inode->i_sb;
432 struct ufs_sb_private_info *uspi = UFS_SB(sb)->s_uspi;
433 int retry, err = 0;
379 434
380 UFSD("ENTER\n"); 435 UFSD("ENTER\n");
381 sb = inode->i_sb;
382 uspi = UFS_SB(sb)->s_uspi;
383 436
384 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) 437 if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
385 return; 438 S_ISLNK(inode->i_mode)))
439 return -EINVAL;
386 if (IS_APPEND(inode) || IS_IMMUTABLE(inode)) 440 if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
387 return; 441 return -EPERM;
442
443 if (inode->i_size > old_i_size) {
444 /*
445 * if we expand file we should care about
446 * allocation of block for last byte first of all
447 */
448 err = ufs_alloc_lastblock(inode);
449
450 if (err) {
451 i_size_write(inode, old_i_size);
452 goto out;
453 }
454 /*
455 * go away, because of we expand file, and we do not
456 * need free blocks, and zeroizes page
457 */
458 lock_kernel();
459 goto almost_end;
460 }
388 461
389 block_truncate_page(inode->i_mapping, inode->i_size, ufs_getfrag_block); 462 block_truncate_page(inode->i_mapping, inode->i_size, ufs_getfrag_block);
390 463
391 lock_kernel(); 464 lock_kernel();
392 while (1) { 465 while (1) {
@@ -404,9 +477,58 @@ void ufs_truncate (struct inode * inode)
404 yield(); 477 yield();
405 } 478 }
406 479
480 if (inode->i_size < old_i_size) {
481 /*
482 * now we should have enough space
483 * to allocate block for last byte
484 */
485 err = ufs_alloc_lastblock(inode);
486 if (err)
487 /*
488 * looks like all the same - we have no space,
489 * but we truncate file already
490 */
491 inode->i_size = (ufsi->i_lastfrag - 1) * uspi->s_fsize;
492 }
493almost_end:
407 inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; 494 inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
408 ufsi->i_lastfrag = DIRECT_FRAGMENT;
409 unlock_kernel(); 495 unlock_kernel();
410 mark_inode_dirty(inode); 496 mark_inode_dirty(inode);
411 UFSD("EXIT\n"); 497out:
498 UFSD("EXIT: err %d\n", err);
499 return err;
412} 500}
501
502
503/*
504 * We don't define our `inode->i_op->truncate', and call it here,
505 * because of:
506 * - there is no way to know old size
507 * - there is no way inform user about error, if it happens in `truncate'
508 */
509static int ufs_setattr(struct dentry *dentry, struct iattr *attr)
510{
511 struct inode *inode = dentry->d_inode;
512 unsigned int ia_valid = attr->ia_valid;
513 int error;
514
515 error = inode_change_ok(inode, attr);
516 if (error)
517 return error;
518
519 if (ia_valid & ATTR_SIZE &&
520 attr->ia_size != i_size_read(inode)) {
521 loff_t old_i_size = inode->i_size;
522 error = vmtruncate(inode, attr->ia_size);
523 if (error)
524 return error;
525 error = ufs_truncate(inode, old_i_size);
526 if (error)
527 return error;
528 }
529 return inode_setattr(inode, attr);
530}
531
532struct inode_operations ufs_file_inode_operations = {
533 .setattr = ufs_setattr,
534};
diff --git a/fs/ufs/util.c b/fs/ufs/util.c
index a2f13f45708..337cf2c46d1 100644
--- a/fs/ufs/util.c
+++ b/fs/ufs/util.c
@@ -233,3 +233,57 @@ ufs_set_inode_dev(struct super_block *sb, struct ufs_inode_info *ufsi, dev_t dev
233 else 233 else
234 ufsi->i_u1.i_data[0] = fs32; 234 ufsi->i_u1.i_data[0] = fs32;
235} 235}
236
237/**
238 * ufs_get_locked_page() - locate, pin and lock a pagecache page, if not exist
239 * read it from disk.
240 * @mapping: the address_space to search
241 * @index: the page index
242 *
243 * Locates the desired pagecache page, if not exist we'll read it,
244 * locks it, increments its reference
245 * count and returns its address.
246 *
247 */
248
249struct page *ufs_get_locked_page(struct address_space *mapping,
250 pgoff_t index)
251{
252 struct page *page;
253
254try_again:
255 page = find_lock_page(mapping, index);
256 if (!page) {
257 page = read_cache_page(mapping, index,
258 (filler_t*)mapping->a_ops->readpage,
259 NULL);
260 if (IS_ERR(page)) {
261 printk(KERN_ERR "ufs_change_blocknr: "
262 "read_cache_page error: ino %lu, index: %lu\n",
263 mapping->host->i_ino, index);
264 goto out;
265 }
266
267 lock_page(page);
268
269 if (!PageUptodate(page) || PageError(page)) {
270 unlock_page(page);
271 page_cache_release(page);
272
273 printk(KERN_ERR "ufs_change_blocknr: "
274 "can not read page: ino %lu, index: %lu\n",
275 mapping->host->i_ino, index);
276
277 page = ERR_PTR(-EIO);
278 goto out;
279 }
280 }
281
282 if (unlikely(!page->mapping || !page_has_buffers(page))) {
283 unlock_page(page);
284 page_cache_release(page);
285 goto try_again;/*we really need these buffers*/
286 }
287out:
288 return page;
289}
diff --git a/fs/ufs/util.h b/fs/ufs/util.h
index 406981fff5e..28fce6c239b 100644
--- a/fs/ufs/util.h
+++ b/fs/ufs/util.h
@@ -251,6 +251,14 @@ extern void _ubh_ubhcpymem_(struct ufs_sb_private_info *, unsigned char *, struc
251#define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size) 251#define ubh_memcpyubh(ubh,mem,size) _ubh_memcpyubh_(uspi,ubh,mem,size)
252extern void _ubh_memcpyubh_(struct ufs_sb_private_info *, struct ufs_buffer_head *, unsigned char *, unsigned); 252extern void _ubh_memcpyubh_(struct ufs_sb_private_info *, struct ufs_buffer_head *, unsigned char *, unsigned);
253 253
254/* This functions works with cache pages*/
255extern struct page *ufs_get_locked_page(struct address_space *mapping,
256 pgoff_t index);
257static inline void ufs_put_locked_page(struct page *page)
258{
259 unlock_page(page);
260 page_cache_release(page);
261}
254 262
255 263
256/* 264/*
diff --git a/fs/xfs/linux-2.6/xfs_buf.h b/fs/xfs/linux-2.6/xfs_buf.h
index 4dd6592d5a4..ceda3a2859d 100644
--- a/fs/xfs/linux-2.6/xfs_buf.h
+++ b/fs/xfs/linux-2.6/xfs_buf.h
@@ -18,7 +18,6 @@
18#ifndef __XFS_BUF_H__ 18#ifndef __XFS_BUF_H__
19#define __XFS_BUF_H__ 19#define __XFS_BUF_H__
20 20
21#include <linux/config.h>
22#include <linux/list.h> 21#include <linux/list.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/spinlock.h> 23#include <linux/spinlock.h>
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index 601f01c92f7..270db0f3861 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -15,7 +15,6 @@
15 * along with this program; if not, write the Free Software Foundation, 15 * along with this program; if not, write the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17 */ 17 */
18#include <linux/config.h>
19#include <linux/compat.h> 18#include <linux/compat.h>
20#include <linux/init.h> 19#include <linux/init.h>
21#include <linux/ioctl.h> 20#include <linux/ioctl.h>
diff --git a/fs/xfs/linux-2.6/xfs_linux.h b/fs/xfs/linux-2.6/xfs_linux.h
index 028eb17ec2e..8c021dc57d1 100644
--- a/fs/xfs/linux-2.6/xfs_linux.h
+++ b/fs/xfs/linux-2.6/xfs_linux.h
@@ -19,7 +19,6 @@
19#define __XFS_LINUX__ 19#define __XFS_LINUX__
20 20
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/config.h>
23 22
24/* 23/*
25 * Some types are conditional depending on the target system. 24 * Some types are conditional depending on the target system.
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index b9beceb3314..b492857fe72 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -63,7 +63,7 @@
63 63
64/* Current ACPICA subsystem version in YYYYMMDD format */ 64/* Current ACPICA subsystem version in YYYYMMDD format */
65 65
66#define ACPI_CA_VERSION 0x20060608 66#define ACPI_CA_VERSION 0x20060623
67 67
68/* 68/*
69 * OS name, used for the _OS object. The _OS object is essentially obsolete, 69 * OS name, used for the _OS object. The _OS object is essentially obsolete,
diff --git a/include/acpi/acdispat.h b/include/acpi/acdispat.h
index 288f84903af..a22fe9cf849 100644
--- a/include/acpi/acdispat.h
+++ b/include/acpi/acdispat.h
@@ -201,7 +201,7 @@ acpi_ds_terminate_control_method(union acpi_operand_object *method_desc,
201acpi_status 201acpi_status
202acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node, 202acpi_ds_begin_method_execution(struct acpi_namespace_node *method_node,
203 union acpi_operand_object *obj_desc, 203 union acpi_operand_object *obj_desc,
204 struct acpi_namespace_node *calling_method_node); 204 struct acpi_walk_state *walk_state);
205 205
206acpi_status 206acpi_status
207acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state); 207acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state);
diff --git a/include/acpi/acglobal.h b/include/acpi/acglobal.h
index 14531d48f6b..06972e6637d 100644
--- a/include/acpi/acglobal.h
+++ b/include/acpi/acglobal.h
@@ -181,6 +181,12 @@ ACPI_EXTERN u8 acpi_gbl_integer_nybble_width;
181extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1]; 181extern struct acpi_table_list acpi_gbl_table_lists[ACPI_TABLE_ID_MAX + 1];
182extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1]; 182extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1];
183 183
184/*****************************************************************************
185 *
186 * Mutual exlusion within ACPICA subsystem
187 *
188 ****************************************************************************/
189
184/* 190/*
185 * Predefined mutex objects. This array contains the 191 * Predefined mutex objects. This array contains the
186 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. 192 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
@@ -188,6 +194,20 @@ extern struct acpi_table_support acpi_gbl_table_data[ACPI_TABLE_ID_MAX + 1];
188 */ 194 */
189ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX]; 195ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[ACPI_NUM_MUTEX];
190 196
197/*
198 * Global lock semaphore works in conjunction with the actual HW global lock
199 */
200ACPI_EXTERN acpi_semaphore acpi_gbl_global_lock_semaphore;
201
202/*
203 * Spinlocks are used for interfaces that can be possibly called at
204 * interrupt level
205 */
206ACPI_EXTERN spinlock_t _acpi_gbl_gpe_lock; /* For GPE data structs and registers */
207ACPI_EXTERN spinlock_t _acpi_gbl_hardware_lock; /* For ACPI H/W except GPE registers */
208#define acpi_gbl_gpe_lock &_acpi_gbl_gpe_lock
209#define acpi_gbl_hardware_lock &_acpi_gbl_hardware_lock
210
191/***************************************************************************** 211/*****************************************************************************
192 * 212 *
193 * Miscellaneous globals 213 * Miscellaneous globals
@@ -217,7 +237,6 @@ ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify;
217ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; 237ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler;
218ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; 238ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler;
219ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; 239ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk;
220ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
221 240
222/* Misc */ 241/* Misc */
223 242
@@ -315,11 +334,6 @@ ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head;
315ACPI_EXTERN struct acpi_gpe_block_info 334ACPI_EXTERN struct acpi_gpe_block_info
316 *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; 335 *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS];
317 336
318/* Spinlocks */
319
320ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock;
321ACPI_EXTERN acpi_handle acpi_gbl_hardware_lock;
322
323/***************************************************************************** 337/*****************************************************************************
324 * 338 *
325 * Debugger globals 339 * Debugger globals
diff --git a/include/acpi/acinterp.h b/include/acpi/acinterp.h
index 9f22cfcb624..216339a8f1f 100644
--- a/include/acpi/acinterp.h
+++ b/include/acpi/acinterp.h
@@ -287,7 +287,10 @@ acpi_ex_system_wait_event(union acpi_operand_object *time,
287 287
288acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc); 288acpi_status acpi_ex_system_reset_event(union acpi_operand_object *obj_desc);
289 289
290acpi_status acpi_ex_system_wait_semaphore(acpi_handle semaphore, u16 timeout); 290acpi_status
291acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout);
292
293acpi_status acpi_ex_system_wait_mutex(acpi_mutex mutex, u16 timeout);
291 294
292/* 295/*
293 * exoparg1 - ACPI AML execution, 1 operand 296 * exoparg1 - ACPI AML execution, 1 operand
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index 1eeca7adca9..56b80248616 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -47,10 +47,11 @@
47/* acpisrc:struct_defs -- for acpisrc conversion */ 47/* acpisrc:struct_defs -- for acpisrc conversion */
48 48
49#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ 49#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
50#define ACPI_INFINITE_CONCURRENCY 0xFF 50#define ACPI_DO_NOT_WAIT 0
51#define ACPI_SERIALIZED 0xFF
51 52
52typedef void *acpi_mutex;
53typedef u32 acpi_mutex_handle; 53typedef u32 acpi_mutex_handle;
54#define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1)
54 55
55/* Total number of aml opcodes defined */ 56/* Total number of aml opcodes defined */
56 57
@@ -79,16 +80,15 @@ union acpi_parse_object;
79 * table below also! 80 * table below also!
80 */ 81 */
81#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ 82#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */
82#define ACPI_MTX_CONTROL_METHOD 1 /* Control method termination [TBD: may no longer be necessary] */ 83#define ACPI_MTX_TABLES 1 /* Data for ACPI tables */
83#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */ 84#define ACPI_MTX_NAMESPACE 2 /* ACPI Namespace */
84#define ACPI_MTX_NAMESPACE 3 /* ACPI Namespace */ 85#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */
85#define ACPI_MTX_EVENTS 4 /* Data for ACPI events */ 86#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */
86#define ACPI_MTX_CACHES 5 /* Internal caches, general purposes */ 87#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */
87#define ACPI_MTX_MEMORY 6 /* Debug memory tracking lists */ 88#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */
88#define ACPI_MTX_DEBUG_CMD_COMPLETE 7 /* AML debugger */ 89#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */
89#define ACPI_MTX_DEBUG_CMD_READY 8 /* AML debugger */ 90
90 91#define ACPI_MAX_MUTEX 7
91#define ACPI_MAX_MUTEX 8
92#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 92#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1
93 93
94#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 94#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
@@ -98,14 +98,13 @@ union acpi_parse_object;
98 98
99static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = { 99static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
100 "ACPI_MTX_Interpreter", 100 "ACPI_MTX_Interpreter",
101 "ACPI_MTX_Method",
102 "ACPI_MTX_Tables", 101 "ACPI_MTX_Tables",
103 "ACPI_MTX_Namespace", 102 "ACPI_MTX_Namespace",
104 "ACPI_MTX_Events", 103 "ACPI_MTX_Events",
105 "ACPI_MTX_Caches", 104 "ACPI_MTX_Caches",
106 "ACPI_MTX_Memory", 105 "ACPI_MTX_Memory",
107 "ACPI_MTX_DebugCmdComplete", 106 "ACPI_MTX_CommandComplete",
108 "ACPI_MTX_DebugCmdReady" 107 "ACPI_MTX_CommandReady"
109}; 108};
110 109
111#endif 110#endif
@@ -705,6 +704,13 @@ struct acpi_bit_register_info {
705}; 704};
706 705
707/* 706/*
707 * Some ACPI registers have bits that must be ignored -- meaning that they
708 * must be preserved.
709 */
710#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */
711#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0201 /* Bit 9, Bit 0 (SCI_EN) */
712
713/*
708 * Register IDs 714 * Register IDs
709 * These are the full ACPI registers 715 * These are the full ACPI registers
710 */ 716 */
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 38f9aa4bef0..4bb38068f40 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -394,6 +394,8 @@
394#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask) 394#define ACPI_REGISTER_PREPARE_BITS(val, pos, mask) ((val << pos) & mask)
395#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask) 395#define ACPI_REGISTER_INSERT_VALUE(reg, pos, mask, val) reg = (reg & (~(mask))) | ACPI_REGISTER_PREPARE_BITS(val, pos, mask)
396 396
397#define ACPI_INSERT_BITS(target, mask, source) target = ((target & (~(mask))) | (source & mask))
398
397/* Generate a UUID */ 399/* Generate a UUID */
398 400
399#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \ 401#define ACPI_INIT_UUID(a,b,c,d0,d1,d2,d3,d4,d5,d6,d7) \
diff --git a/include/acpi/acobject.h b/include/acpi/acobject.h
index 1747d94084d..8fdee31119f 100644
--- a/include/acpi/acobject.h
+++ b/include/acpi/acobject.h
@@ -140,14 +140,14 @@ struct acpi_object_package {
140 *****************************************************************************/ 140 *****************************************************************************/
141 141
142struct acpi_object_event { 142struct acpi_object_event {
143 ACPI_OBJECT_COMMON_HEADER void *semaphore; 143 ACPI_OBJECT_COMMON_HEADER acpi_semaphore os_semaphore; /* Actual OS synchronization object */
144}; 144};
145 145
146struct acpi_object_mutex { 146struct acpi_object_mutex {
147 ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */ 147 ACPI_OBJECT_COMMON_HEADER u8 sync_level; /* 0-15, specified in Mutex() call */
148 u16 acquisition_depth; /* Allow multiple Acquires, same thread */ 148 u16 acquisition_depth; /* Allow multiple Acquires, same thread */
149 struct acpi_thread_state *owner_thread; /* Current owner of the mutex */ 149 struct acpi_thread_state *owner_thread; /* Current owner of the mutex */
150 void *semaphore; /* Actual OS synchronization object */ 150 acpi_mutex os_mutex; /* Actual OS synchronization object */
151 union acpi_operand_object *prev; /* Link for list of acquired mutexes */ 151 union acpi_operand_object *prev; /* Link for list of acquired mutexes */
152 union acpi_operand_object *next; /* Link for list of acquired mutexes */ 152 union acpi_operand_object *next; /* Link for list of acquired mutexes */
153 struct acpi_namespace_node *node; /* Containing namespace node */ 153 struct acpi_namespace_node *node; /* Containing namespace node */
@@ -166,8 +166,8 @@ struct acpi_object_region {
166struct acpi_object_method { 166struct acpi_object_method {
167 ACPI_OBJECT_COMMON_HEADER u8 method_flags; 167 ACPI_OBJECT_COMMON_HEADER u8 method_flags;
168 u8 param_count; 168 u8 param_count;
169 u8 concurrency; 169 u8 sync_level;
170 void *semaphore; 170 union acpi_operand_object *mutex;
171 u8 *aml_start; 171 u8 *aml_start;
172 ACPI_INTERNAL_METHOD implementation; 172 ACPI_INTERNAL_METHOD implementation;
173 u32 aml_length; 173 u32 aml_length;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index a2b3e390a50..f338e40bd54 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -334,7 +334,7 @@ int acpi_bus_add(struct acpi_device **child, struct acpi_device *parent,
334 acpi_handle handle, int type); 334 acpi_handle handle, int type);
335int acpi_bus_trim(struct acpi_device *start, int rmdevice); 335int acpi_bus_trim(struct acpi_device *start, int rmdevice);
336int acpi_bus_start(struct acpi_device *device); 336int acpi_bus_start(struct acpi_device *device);
337 337acpi_status acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd);
338int acpi_match_ids(struct acpi_device *device, char *ids); 338int acpi_match_ids(struct acpi_device *device, char *ids);
339int acpi_create_dir(struct acpi_device *); 339int acpi_create_dir(struct acpi_device *);
340void acpi_remove_dir(struct acpi_device *); 340void acpi_remove_dir(struct acpi_device *);
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index b425f9bb6d4..6a5bdcefec6 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -110,4 +110,21 @@ int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
110 110
111extern int acpi_specific_hotkey_enabled; 111extern int acpi_specific_hotkey_enabled;
112 112
113/*--------------------------------------------------------------------------
114 Dock Station
115 -------------------------------------------------------------------------- */
116#if defined(CONFIG_ACPI_DOCK) || defined(CONFIG_ACPI_DOCK_MODULE)
117extern int is_dock_device(acpi_handle handle);
118extern int register_dock_notifier(struct notifier_block *nb);
119extern void unregister_dock_notifier(struct notifier_block *nb);
120extern int register_hotplug_dock_device(acpi_handle handle,
121 acpi_notify_handler handler, void *context);
122extern void unregister_hotplug_dock_device(acpi_handle handle);
123#else
124#define is_dock_device(h) (0)
125#define register_dock_notifier(nb) (-ENODEV)
126#define unregister_dock_notifier(nb) do { } while(0)
127#define register_hotplug_dock_device(h1, h2, c) (-ENODEV)
128#define unregister_hotplug_dock_device(h) do { } while(0)
129#endif
113#endif /*__ACPI_DRIVERS_H__*/ 130#endif /*__ACPI_DRIVERS_H__*/
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 8f473c83b7c..89bc4a16c2e 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -96,25 +96,47 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
96 struct acpi_table_header **new_table); 96 struct acpi_table_header **new_table);
97 97
98/* 98/*
99 * Synchronization primitives 99 * Spinlock primitives
100 */
101acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
102
103void acpi_os_delete_lock(acpi_spinlock handle);
104
105acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
106
107void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags);
108
109/*
110 * Semaphore primitives
100 */ 111 */
101acpi_status 112acpi_status
102acpi_os_create_semaphore(u32 max_units, 113acpi_os_create_semaphore(u32 max_units,
103 u32 initial_units, acpi_handle * out_handle); 114 u32 initial_units, acpi_semaphore * out_handle);
104 115
105acpi_status acpi_os_delete_semaphore(acpi_handle handle); 116acpi_status acpi_os_delete_semaphore(acpi_semaphore handle);
106 117
107acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout); 118acpi_status
119acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout);
120
121acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);
122
123/*
124 * Mutex primitives
125 */
126acpi_status acpi_os_create_mutex(acpi_mutex * out_handle);
108 127
109acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units); 128void acpi_os_delete_mutex(acpi_mutex handle);
110 129
111acpi_status acpi_os_create_lock(acpi_handle * out_handle); 130acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout);
112 131
113void acpi_os_delete_lock(acpi_handle handle); 132void acpi_os_release_mutex(acpi_mutex handle);
114 133
115acpi_cpu_flags acpi_os_acquire_lock(acpi_handle handle); 134/* Temporary macros for Mutex* interfaces, map to existing semaphore xfaces */
116 135
117void acpi_os_release_lock(acpi_handle handle, acpi_cpu_flags flags); 136#define acpi_os_create_mutex(out_handle) acpi_os_create_semaphore (1, 1, out_handle)
137#define acpi_os_delete_mutex(handle) (void) acpi_os_delete_semaphore (handle)
138#define acpi_os_acquire_mutex(handle,time) acpi_os_wait_semaphore (handle, 1, time)
139#define acpi_os_release_mutex(handle) (void) acpi_os_signal_semaphore (handle, 1)
118 140
119/* 141/*
120 * Memory allocation and mapping 142 * Memory allocation and mapping
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 77cf1236b05..64b603cfe92 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -241,7 +241,7 @@ typedef acpi_native_uint acpi_size;
241 241
242/******************************************************************************* 242/*******************************************************************************
243 * 243 *
244 * OS- or compiler-dependent types 244 * OS-dependent and compiler-dependent types
245 * 245 *
246 * If the defaults below are not appropriate for the host system, they can 246 * If the defaults below are not appropriate for the host system, they can
247 * be defined in the compiler-specific or OS-specific header, and this will 247 * be defined in the compiler-specific or OS-specific header, and this will
@@ -249,29 +249,36 @@ typedef acpi_native_uint acpi_size;
249 * 249 *
250 ******************************************************************************/ 250 ******************************************************************************/
251 251
252/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ 252/* Value returned by acpi_os_get_thread_id */
253 253
254#ifndef acpi_uintptr_t 254#ifndef acpi_thread_id
255#define acpi_uintptr_t void * 255#define acpi_thread_id acpi_native_uint
256#endif 256#endif
257 257
258/* 258/* Object returned from acpi_os_create_lock */
259 * If acpi_cache_t was not defined in the OS-dependent header, 259
260 * define it now. This is typically the case where the local cache 260#ifndef acpi_spinlock
261 * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) 261#define acpi_spinlock void *
262 */
263#ifndef acpi_cache_t
264#define acpi_cache_t struct acpi_memory_list
265#endif 262#endif
266 263
267/* 264/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */
268 * Allow the CPU flags word to be defined per-OS to simplify the use of the 265
269 * lock and unlock OSL interfaces.
270 */
271#ifndef acpi_cpu_flags 266#ifndef acpi_cpu_flags
272#define acpi_cpu_flags acpi_native_uint 267#define acpi_cpu_flags acpi_native_uint
273#endif 268#endif
274 269
270/* Object returned from acpi_os_create_cache */
271
272#ifndef acpi_cache_t
273#define acpi_cache_t struct acpi_memory_list
274#endif
275
276/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */
277
278#ifndef acpi_uintptr_t
279#define acpi_uintptr_t void *
280#endif
281
275/* 282/*
276 * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because 283 * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because
277 * some compilers can catch printf format string problems 284 * some compilers can catch printf format string problems
@@ -298,13 +305,6 @@ typedef acpi_native_uint acpi_size;
298#define ACPI_EXPORT_SYMBOL(symbol) 305#define ACPI_EXPORT_SYMBOL(symbol)
299#endif 306#endif
300 307
301/*
302 * thread_id is returned by acpi_os_get_thread_id.
303 */
304#ifndef acpi_thread_id
305#define acpi_thread_id acpi_native_uint
306#endif
307
308/******************************************************************************* 308/*******************************************************************************
309 * 309 *
310 * Independent types 310 * Independent types
@@ -380,6 +380,11 @@ struct uint32_struct {
380 u32 hi; 380 u32 hi;
381}; 381};
382 382
383/* Synchronization objects */
384
385#define acpi_mutex void *
386#define acpi_semaphore void *
387
383/* 388/*
384 * Acpi integer width. In ACPI version 1, integers are 389 * Acpi integer width. In ACPI version 1, integers are
385 * 32 bits. In ACPI version 2, integers are 64 bits. 390 * 32 bits. In ACPI version 2, integers are 64 bits.
diff --git a/include/acpi/platform/aclinux.h b/include/acpi/platform/aclinux.h
index 277d35bced0..3f853cabbd4 100644
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -58,11 +58,13 @@
58#include <asm/div64.h> 58#include <asm/div64.h>
59#include <asm/acpi.h> 59#include <asm/acpi.h>
60#include <linux/slab.h> 60#include <linux/slab.h>
61#include <linux/spinlock_types.h>
61 62
62/* Host-dependent types and defines */ 63/* Host-dependent types and defines */
63 64
64#define ACPI_MACHINE_WIDTH BITS_PER_LONG 65#define ACPI_MACHINE_WIDTH BITS_PER_LONG
65#define acpi_cache_t kmem_cache_t 66#define acpi_cache_t kmem_cache_t
67#define acpi_spinlock spinlock_t *
66#define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol); 68#define ACPI_EXPORT_SYMBOL(symbol) EXPORT_SYMBOL(symbol);
67#define strtoul simple_strtoul 69#define strtoul simple_strtoul
68 70
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 77371b3cdc4..9dd5b75961f 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -62,6 +62,7 @@ struct acpi_processor_cx {
62 u32 latency_ticks; 62 u32 latency_ticks;
63 u32 power; 63 u32 power;
64 u32 usage; 64 u32 usage;
65 u64 time;
65 struct acpi_processor_cx_policy promotion; 66 struct acpi_processor_cx_policy promotion;
66 struct acpi_processor_cx_policy demotion; 67 struct acpi_processor_cx_policy demotion;
67}; 68};
diff --git a/include/asm-alpha/floppy.h b/include/asm-alpha/floppy.h
index 21816d35ef8..6a9f02af952 100644
--- a/include/asm-alpha/floppy.h
+++ b/include/asm-alpha/floppy.h
@@ -26,7 +26,7 @@
26#define fd_disable_irq() disable_irq(FLOPPY_IRQ) 26#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
27#define fd_cacheflush(addr,size) /* nothing */ 27#define fd_cacheflush(addr,size) /* nothing */
28#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\ 28#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt,\
29 SA_INTERRUPT, "floppy", NULL) 29 IRQF_DISABLED, "floppy", NULL)
30#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); 30#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL);
31 31
32#ifdef CONFIG_PCI 32#ifdef CONFIG_PCI
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h
index 1a2c52a056f..13c2305d35e 100644
--- a/include/asm-alpha/signal.h
+++ b/include/asm-alpha/signal.h
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t;
77 * SA_FLAGS values: 77 * SA_FLAGS values:
78 * 78 *
79 * SA_ONSTACK indicates that a registered stack_t will be used. 79 * SA_ONSTACK indicates that a registered stack_t will be used.
80 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
81 * SA_RESTART flag to get restarting signals (which were the default long ago) 80 * SA_RESTART flag to get restarting signals (which were the default long ago)
82 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 81 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
83 * SA_RESETHAND clears the handler when the signal is delivered. 82 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -98,7 +97,6 @@ typedef unsigned long sigset_t;
98 97
99#define SA_ONESHOT SA_RESETHAND 98#define SA_ONESHOT SA_RESETHAND
100#define SA_NOMASK SA_NODEFER 99#define SA_NOMASK SA_NODEFER
101#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
102 100
103/* 101/*
104 * sigaltstack controls 102 * sigaltstack controls
diff --git a/include/asm-arm/arch-at91rm9200/board.h b/include/asm-arm/arch-at91rm9200/board.h
index 1fdd70b2380..c1ca9a4658e 100644
--- a/include/asm-arm/arch-at91rm9200/board.h
+++ b/include/asm-arm/arch-at91rm9200/board.h
@@ -20,7 +20,7 @@
20 20
21/* 21/*
22 * These are data structures found in platform_device.dev.platform_data, 22 * These are data structures found in platform_device.dev.platform_data,
23 * and describing board-specfic data needed by drivers. For example, 23 * and describing board-specific data needed by drivers. For example,
24 * which pin is used for a given GPIO role. 24 * which pin is used for a given GPIO role.
25 * 25 *
26 * In 2.6, drivers should strongly avoid board-specific knowledge so 26 * In 2.6, drivers should strongly avoid board-specific knowledge so
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h
index b59520e56fc..0d517267fb6 100644
--- a/include/asm-arm/arch-ixp4xx/io.h
+++ b/include/asm-arm/arch-ixp4xx/io.h
@@ -38,7 +38,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
38 * 2) If > 64MB of memory space is required, the IXP4xx can be configured 38 * 2) If > 64MB of memory space is required, the IXP4xx can be configured
39 * to use indirect registers to access PCI (as we do below for I/O 39 * to use indirect registers to access PCI (as we do below for I/O
40 * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff) 40 * transactions). This allows for up to 128MB (0x48000000 to 0x4fffffff)
41 * of memory on the bus. The disadvantadge of this is that every 41 * of memory on the bus. The disadvantage of this is that every
42 * PCI access requires three local register accesses plus a spinlock, 42 * PCI access requires three local register accesses plus a spinlock,
43 * but in some cases the performance hit is acceptable. In addition, 43 * but in some cases the performance hit is acceptable. In addition,
44 * you cannot mmap() PCI devices in this case. 44 * you cannot mmap() PCI devices in this case.
diff --git a/include/asm-arm/arch-omap/board-fsample.h b/include/asm-arm/arch-omap/board-fsample.h
new file mode 100644
index 00000000000..89a1e529fb6
--- /dev/null
+++ b/include/asm-arm/arch-omap/board-fsample.h
@@ -0,0 +1,51 @@
1/*
2 * linux/include/asm-arm/arch-omap/board-fsample.h
3 *
4 * Board-specific goodies for TI F-Sample.
5 *
6 * Copyright (C) 2006 Google, Inc.
7 * Author: Brian Swetland <swetland@google.com>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 */
13
14#ifndef __ASM_ARCH_OMAP_FSAMPLE_H
15#define __ASM_ARCH_OMAP_FSAMPLE_H
16
17/* fsample is pretty close to p2-sample */
18#include <asm/arch/board-perseus2.h>
19
20#define fsample_cpld_read(reg) __raw_readb(reg)
21#define fsample_cpld_write(val, reg) __raw_writeb(val, reg)
22
23#define FSAMPLE_CPLD_BASE 0xE8100000
24#define FSAMPLE_CPLD_SIZE SZ_4K
25#define FSAMPLE_CPLD_START 0x05080000
26
27#define FSAMPLE_CPLD_REG_A (FSAMPLE_CPLD_BASE + 0x00)
28#define FSAMPLE_CPLD_SWITCH (FSAMPLE_CPLD_BASE + 0x02)
29#define FSAMPLE_CPLD_UART (FSAMPLE_CPLD_BASE + 0x02)
30#define FSAMPLE_CPLD_REG_B (FSAMPLE_CPLD_BASE + 0x04)
31#define FSAMPLE_CPLD_VERSION (FSAMPLE_CPLD_BASE + 0x06)
32#define FSAMPLE_CPLD_SET_CLR (FSAMPLE_CPLD_BASE + 0x06)
33
34#define FSAMPLE_CPLD_BIT_BT_RESET 0
35#define FSAMPLE_CPLD_BIT_LCD_RESET 1
36#define FSAMPLE_CPLD_BIT_CAM_PWDN 2
37#define FSAMPLE_CPLD_BIT_CHARGER_ENABLE 3
38#define FSAMPLE_CPLD_BIT_SD_MMC_EN 4
39#define FSAMPLE_CPLD_BIT_aGPS_PWREN 5
40#define FSAMPLE_CPLD_BIT_BACKLIGHT 6
41#define FSAMPLE_CPLD_BIT_aGPS_EN_RESET 7
42#define FSAMPLE_CPLD_BIT_aGPS_SLEEPx_N 8
43#define FSAMPLE_CPLD_BIT_OTG_RESET 9
44
45#define fsample_cpld_set(bit) \
46 fsample_cpld_write((((bit) & 15) << 4) | 0x0f, FSAMPLE_CPLD_SET_CLR)
47
48#define fsample_cpld_clear(bit) \
49 fsample_cpld_write(0xf0 | ((bit) & 15), FSAMPLE_CPLD_SET_CLR)
50
51#endif
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
index dfdbf06fd64..edf1dc6ad91 100644
--- a/include/asm-arm/arch-omap/board.h
+++ b/include/asm-arm/arch-omap/board.h
@@ -22,6 +22,7 @@
22#define OMAP_TAG_UART 0x4f07 22#define OMAP_TAG_UART 0x4f07
23#define OMAP_TAG_FBMEM 0x4f08 23#define OMAP_TAG_FBMEM 0x4f08
24#define OMAP_TAG_STI_CONSOLE 0x4f09 24#define OMAP_TAG_STI_CONSOLE 0x4f09
25#define OMAP_TAG_CAMERA_SENSOR 0x4f0a
25 26
26#define OMAP_TAG_BOOT_REASON 0x4f80 27#define OMAP_TAG_BOOT_REASON 0x4f80
27#define OMAP_TAG_FLASH_PART 0x4f81 28#define OMAP_TAG_FLASH_PART 0x4f81
@@ -61,6 +62,12 @@ struct omap_sti_console_config {
61 u8 channel; 62 u8 channel;
62}; 63};
63 64
65struct omap_camera_sensor_config {
66 u16 reset_gpio;
67 int (*power_on)(void * data);
68 int (*power_off)(void * data);
69};
70
64struct omap_usb_config { 71struct omap_usb_config {
65 /* Configure drivers according to the connectors on your board: 72 /* Configure drivers according to the connectors on your board:
66 * - "A" connector (rectagular) 73 * - "A" connector (rectagular)
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
index ca1202312a4..1b1b02307e7 100644
--- a/include/asm-arm/arch-omap/dma.h
+++ b/include/asm-arm/arch-omap/dma.h
@@ -185,8 +185,8 @@
185/* DMA channels for 24xx */ 185/* DMA channels for 24xx */
186#define OMAP24XX_DMA_NO_DEVICE 0 186#define OMAP24XX_DMA_NO_DEVICE 0
187#define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */ 187#define OMAP24XX_DMA_XTI_DMA 1 /* S_DMA_0 */
188#define OMAP24XX_DMA_EXT_NDMA_REQ0 2 /* S_DMA_1 */ 188#define OMAP24XX_DMA_EXT_DMAREQ0 2 /* S_DMA_1 */
189#define OMAP24XX_DMA_EXT_NDMA_REQ1 3 /* S_DMA_2 */ 189#define OMAP24XX_DMA_EXT_DMAREQ1 3 /* S_DMA_2 */
190#define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */ 190#define OMAP24XX_DMA_GPMC 4 /* S_DMA_3 */
191#define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */ 191#define OMAP24XX_DMA_GFX 5 /* S_DMA_4 */
192#define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */ 192#define OMAP24XX_DMA_DSS 6 /* S_DMA_5 */
@@ -197,7 +197,9 @@
197#define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */ 197#define OMAP24XX_DMA_DES_TX 11 /* S_DMA_10 */
198#define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */ 198#define OMAP24XX_DMA_DES_RX 12 /* S_DMA_11 */
199#define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */ 199#define OMAP24XX_DMA_SHA1MD5_RX 13 /* S_DMA_12 */
200 200#define OMAP24XX_DMA_EXT_DMAREQ2 14 /* S_DMA_13 */
201#define OMAP24XX_DMA_EXT_DMAREQ3 15 /* S_DMA_14 */
202#define OMAP24XX_DMA_EXT_DMAREQ4 16 /* S_DMA_15 */
201#define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */ 203#define OMAP24XX_DMA_EAC_AC_RD 17 /* S_DMA_16 */
202#define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */ 204#define OMAP24XX_DMA_EAC_AC_WR 18 /* S_DMA_17 */
203#define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */ 205#define OMAP24XX_DMA_EAC_MD_UL_RD 19 /* S_DMA_18 */
@@ -244,6 +246,7 @@
244#define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */ 246#define OMAP24XX_DMA_MMC1_TX 61 /* SDMA_60 */
245#define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */ 247#define OMAP24XX_DMA_MMC1_RX 62 /* SDMA_61 */
246#define OMAP24XX_DMA_MS 63 /* SDMA_62 */ 248#define OMAP24XX_DMA_MS 63 /* SDMA_62 */
249#define OMAP24XX_DMA_EXT_DMAREQ5 64 /* S_DMA_63 */
247 250
248/*----------------------------------------------------------------------------*/ 251/*----------------------------------------------------------------------------*/
249 252
@@ -274,7 +277,7 @@
274#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea) 277#define OMAP1610_DMA_LCD_LCH_CTRL (OMAP1610_DMA_LCD_BASE + 0xea)
275#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4) 278#define OMAP1610_DMA_LCD_SRC_FI_B1_U (OMAP1610_DMA_LCD_BASE + 0xf4)
276 279
277#define OMAP_DMA_TOUT_IRQ (1 << 0) /* Only on omap1 */ 280#define OMAP1_DMA_TOUT_IRQ (1 << 0)
278#define OMAP_DMA_DROP_IRQ (1 << 1) 281#define OMAP_DMA_DROP_IRQ (1 << 1)
279#define OMAP_DMA_HALF_IRQ (1 << 2) 282#define OMAP_DMA_HALF_IRQ (1 << 2)
280#define OMAP_DMA_FRAME_IRQ (1 << 3) 283#define OMAP_DMA_FRAME_IRQ (1 << 3)
@@ -315,11 +318,11 @@ enum {
315 OMAP_LCD_DMA_B2_BOTTOM 318 OMAP_LCD_DMA_B2_BOTTOM
316}; 319};
317 320
318/* REVISIT: Check if BURST_4 is really 1 (or 2) */
319enum omap_dma_burst_mode { 321enum omap_dma_burst_mode {
320 OMAP_DMA_DATA_BURST_DIS = 0, 322 OMAP_DMA_DATA_BURST_DIS = 0,
321 OMAP_DMA_DATA_BURST_4, 323 OMAP_DMA_DATA_BURST_4,
322 OMAP_DMA_DATA_BURST_8 324 OMAP_DMA_DATA_BURST_8,
325 OMAP_DMA_DATA_BURST_16,
323}; 326};
324 327
325enum omap_dma_color_mode { 328enum omap_dma_color_mode {
diff --git a/include/asm-arm/arch-omap/dmtimer.h b/include/asm-arm/arch-omap/dmtimer.h
index e6522e6a383..7a289ff0740 100644
--- a/include/asm-arm/arch-omap/dmtimer.h
+++ b/include/asm-arm/arch-omap/dmtimer.h
@@ -5,6 +5,7 @@
5 * 5 *
6 * Copyright (C) 2005 Nokia Corporation 6 * Copyright (C) 2005 Nokia Corporation
7 * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com> 7 * Author: Lauri Leukkunen <lauri.leukkunen@nokia.com>
8 * PWM and clock framwork support by Timo Teras.
8 * 9 *
9 * This program is free software; you can redistribute it and/or modify it 10 * 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 * under the terms of the GNU General Public License as published by the
@@ -25,69 +26,56 @@
25 * 675 Mass Ave, Cambridge, MA 02139, USA. 26 * 675 Mass Ave, Cambridge, MA 02139, USA.
26 */ 27 */
27 28
28#ifndef __ASM_ARCH_TIMER_H 29#ifndef __ASM_ARCH_DMTIMER_H
29#define __ASM_ARCH_TIMER_H 30#define __ASM_ARCH_DMTIMER_H
30
31#include <linux/list.h>
32
33#define OMAP_TIMER_SRC_ARMXOR 0x00
34#define OMAP_TIMER_SRC_32_KHZ 0x01
35#define OMAP_TIMER_SRC_EXT_CLK 0x02
36
37/* timer control reg bits */
38#define OMAP_TIMER_CTRL_CAPTMODE (1 << 13)
39#define OMAP_TIMER_CTRL_PT (1 << 12)
40#define OMAP_TIMER_CTRL_TRG_OVERFLOW (0x1 << 10)
41#define OMAP_TIMER_CTRL_TRG_OFANDMATCH (0x2 << 10)
42#define OMAP_TIMER_CTRL_TCM_LOWTOHIGH (0x1 << 8)
43#define OMAP_TIMER_CTRL_TCM_HIGHTOLOW (0x2 << 8)
44#define OMAP_TIMER_CTRL_TCM_BOTHEDGES (0x3 << 8)
45#define OMAP_TIMER_CTRL_SCPWM (1 << 7)
46#define OMAP_TIMER_CTRL_CE (1 << 6) /* compare enable */
47#define OMAP_TIMER_CTRL_PRE (1 << 5) /* prescaler enable */
48#define OMAP_TIMER_CTRL_PTV_SHIFT 2 /* how much to shift the prescaler value */
49#define OMAP_TIMER_CTRL_AR (1 << 1) /* auto-reload enable */
50#define OMAP_TIMER_CTRL_ST (1 << 0) /* start timer */
51 31
52/* timer interrupt enable bits */ 32/* clock sources */
53#define OMAP_TIMER_INT_CAPTURE (1 << 2) 33#define OMAP_TIMER_SRC_SYS_CLK 0x00
54#define OMAP_TIMER_INT_OVERFLOW (1 << 1) 34#define OMAP_TIMER_SRC_32_KHZ 0x01
55#define OMAP_TIMER_INT_MATCH (1 << 0) 35#define OMAP_TIMER_SRC_EXT_CLK 0x02
56 36
37/* timer interrupt enable bits */
38#define OMAP_TIMER_INT_CAPTURE (1 << 2)
39#define OMAP_TIMER_INT_OVERFLOW (1 << 1)
40#define OMAP_TIMER_INT_MATCH (1 << 0)
57 41
58struct omap_dm_timer { 42/* trigger types */
59 struct list_head timer_list; 43#define OMAP_TIMER_TRIGGER_NONE 0x00
44#define OMAP_TIMER_TRIGGER_OVERFLOW 0x01
45#define OMAP_TIMER_TRIGGER_OVERFLOW_AND_COMPARE 0x02
60 46
61 u32 base; 47struct omap_dm_timer;
62 unsigned int irq; 48struct clk;
63};
64 49
65u32 omap_dm_timer_read_reg(struct omap_dm_timer *timer, int reg); 50int omap_dm_timer_init(void);
66void omap_dm_timer_write_reg(struct omap_dm_timer *timer, int reg, u32 value);
67 51
68struct omap_dm_timer * omap_dm_timer_request(void); 52struct omap_dm_timer *omap_dm_timer_request(void);
53struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
69void omap_dm_timer_free(struct omap_dm_timer *timer); 54void omap_dm_timer_free(struct omap_dm_timer *timer);
70void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source);
71 55
72void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value); 56int omap_dm_timer_get_irq(struct omap_dm_timer *timer);
73void omap_dm_timer_set_trigger(struct omap_dm_timer *timer, unsigned int value); 57
74void omap_dm_timer_enable_compare(struct omap_dm_timer *timer); 58u32 omap_dm_timer_modify_idlect_mask(u32 inputmask);
75void omap_dm_timer_enable_autoreload(struct omap_dm_timer *timer); 59struct clk *omap_dm_timer_get_fclk(struct omap_dm_timer *timer);
76 60
77void omap_dm_timer_trigger(struct omap_dm_timer *timer); 61void omap_dm_timer_trigger(struct omap_dm_timer *timer);
78void omap_dm_timer_start(struct omap_dm_timer *timer); 62void omap_dm_timer_start(struct omap_dm_timer *timer);
79void omap_dm_timer_stop(struct omap_dm_timer *timer); 63void omap_dm_timer_stop(struct omap_dm_timer *timer);
80 64
81void omap_dm_timer_set_load(struct omap_dm_timer *timer, unsigned int load); 65void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source);
82void omap_dm_timer_set_match(struct omap_dm_timer *timer, unsigned int match); 66void omap_dm_timer_set_load(struct omap_dm_timer *timer, int autoreload, unsigned int value);
67void omap_dm_timer_set_match(struct omap_dm_timer *timer, int enable, unsigned int match);
68void omap_dm_timer_set_pwm(struct omap_dm_timer *timer, int def_on, int toggle, int trigger);
69void omap_dm_timer_set_prescaler(struct omap_dm_timer *timer, int prescaler);
70
71void omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, unsigned int value);
83 72
84unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer); 73unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer);
85void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value); 74void omap_dm_timer_write_status(struct omap_dm_timer *timer, unsigned int value);
86
87unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer); 75unsigned int omap_dm_timer_read_counter(struct omap_dm_timer *timer);
88void omap_dm_timer_reset_counter(struct omap_dm_timer *timer); 76void omap_dm_timer_write_counter(struct omap_dm_timer *timer, unsigned int value);
89 77
90int omap_dm_timers_active(void); 78int omap_dm_timers_active(void);
91u32 omap_dm_timer_modify_idlect_mask(u32 inputmask);
92 79
93#endif /* __ASM_ARCH_TIMER_H */ 80
81#endif /* __ASM_ARCH_DMTIMER_H */
diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h
new file mode 100644
index 00000000000..1a0a5207822
--- /dev/null
+++ b/include/asm-arm/arch-omap/gpmc.h
@@ -0,0 +1,91 @@
1/*
2 * General-Purpose Memory Controller for OMAP2
3 *
4 * Copyright (C) 2005-2006 Nokia Corporation
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10
11#ifndef __OMAP2_GPMC_H
12#define __OMAP2_GPMC_H
13
14#define GPMC_CS_CONFIG1 0x00
15#define GPMC_CS_CONFIG2 0x04
16#define GPMC_CS_CONFIG3 0x08
17#define GPMC_CS_CONFIG4 0x0c
18#define GPMC_CS_CONFIG5 0x10
19#define GPMC_CS_CONFIG6 0x14
20#define GPMC_CS_CONFIG7 0x18
21#define GPMC_CS_NAND_COMMAND 0x1c
22#define GPMC_CS_NAND_ADDRESS 0x20
23#define GPMC_CS_NAND_DATA 0x24
24
25#define GPMC_CONFIG1_WRAPBURST_SUPP (1 << 31)
26#define GPMC_CONFIG1_READMULTIPLE_SUPP (1 << 20)
27#define GPMC_CONFIG1_READTYPE_ASYNC (0 << 29)
28#define GPMC_CONFIG1_READTYPE_SYNC (1 << 29)
29#define GPMC_CONFIG1_WRITETYPE_ASYNC (0 << 27)
30#define GPMC_CONFIG1_WRITETYPE_SYNC (1 << 27)
31#define GPMC_CONFIG1_CLKACTIVATIONTIME(val) ((val & 3) << 25)
32#define GPMC_CONFIG1_PAGE_LEN(val) ((val & 3) << 23)
33#define GPMC_CONFIG1_WAIT_READ_MON (1 << 22)
34#define GPMC_CONFIG1_WAIT_WRITE_MON (1 << 21)
35#define GPMC_CONFIG1_WAIT_MON_IIME(val) ((val & 3) << 18)
36#define GPMC_CONFIG1_WAIT_PIN_SEL(val) ((val & 3) << 16)
37#define GPMC_CONFIG1_DEVICESIZE(val) ((val & 3) << 12)
38#define GPMC_CONFIG1_DEVICESIZE_16 GPMC_CONFIG1_DEVICESIZE(1)
39#define GPMC_CONFIG1_DEVICETYPE(val) ((val & 3) << 10)
40#define GPMC_CONFIG1_DEVICETYPE_NOR GPMC_CONFIG1_DEVICETYPE(0)
41#define GPMC_CONFIG1_DEVICETYPE_NAND GPMC_CONFIG1_DEVICETYPE(1)
42#define GPMC_CONFIG1_MUXADDDATA (1 << 9)
43#define GPMC_CONFIG1_TIME_PARA_GRAN (1 << 4)
44#define GPMC_CONFIG1_FCLK_DIV(val) (val & 3)
45#define GPMC_CONFIG1_FCLK_DIV2 (GPMC_CONFIG1_FCLK_DIV(1))
46#define GPMC_CONFIG1_FCLK_DIV3 (GPMC_CONFIG1_FCLK_DIV(2))
47#define GPMC_CONFIG1_FCLK_DIV4 (GPMC_CONFIG1_FCLK_DIV(3))
48
49/*
50 * Note that all values in this struct are in nanoseconds, while
51 * the register values are in gpmc_fck cycles.
52 */
53struct gpmc_timings {
54 /* Minimum clock period for synchronous mode */
55 u16 sync_clk;
56
57 /* Chip-select signal timings corresponding to GPMC_CS_CONFIG2 */
58 u16 cs_on; /* Assertion time */
59 u16 cs_rd_off; /* Read deassertion time */
60 u16 cs_wr_off; /* Write deassertion time */
61
62 /* ADV signal timings corresponding to GPMC_CONFIG3 */
63 u16 adv_on; /* Assertion time */
64 u16 adv_rd_off; /* Read deassertion time */
65 u16 adv_wr_off; /* Write deassertion time */
66
67 /* WE signals timings corresponding to GPMC_CONFIG4 */
68 u16 we_on; /* WE assertion time */
69 u16 we_off; /* WE deassertion time */
70
71 /* OE signals timings corresponding to GPMC_CONFIG4 */
72 u16 oe_on; /* OE assertion time */
73 u16 oe_off; /* OE deassertion time */
74
75 /* Access time and cycle time timings corresponding to GPMC_CONFIG5 */
76 u16 page_burst_access; /* Multiple access word delay */
77 u16 access; /* Start-cycle to first data valid delay */
78 u16 rd_cycle; /* Total read cycle time */
79 u16 wr_cycle; /* Total write cycle time */
80};
81
82extern unsigned int gpmc_ns_to_ticks(unsigned int time_ns);
83
84extern void gpmc_cs_write_reg(int cs, int idx, u32 val);
85extern u32 gpmc_cs_read_reg(int cs, int idx);
86extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk);
87extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
88extern unsigned long gpmc_cs_get_base_addr(int cs);
89
90
91#endif
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
index c7d9e857795..481048d6521 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -297,6 +297,10 @@
297#include "board-perseus2.h" 297#include "board-perseus2.h"
298#endif 298#endif
299 299
300#ifdef CONFIG_MACH_OMAP_FSAMPLE
301#include "board-fsample.h"
302#endif
303
300#ifdef CONFIG_MACH_OMAP_H3 304#ifdef CONFIG_MACH_OMAP_H3
301#include "board-h3.h" 305#include "board-h3.h"
302#endif 306#endif
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h
index 42098d99f30..2542495d8a4 100644
--- a/include/asm-arm/arch-omap/irqs.h
+++ b/include/asm-arm/arch-omap/irqs.h
@@ -242,10 +242,24 @@
242#define INT_24XX_GPIO_BANK2 30 242#define INT_24XX_GPIO_BANK2 30
243#define INT_24XX_GPIO_BANK3 31 243#define INT_24XX_GPIO_BANK3 31
244#define INT_24XX_GPIO_BANK4 32 244#define INT_24XX_GPIO_BANK4 32
245#define INT_24XX_GPTIMER1 37
246#define INT_24XX_GPTIMER2 38
247#define INT_24XX_GPTIMER3 39
248#define INT_24XX_GPTIMER4 40
249#define INT_24XX_GPTIMER5 41
250#define INT_24XX_GPTIMER6 42
251#define INT_24XX_GPTIMER7 43
252#define INT_24XX_GPTIMER8 44
253#define INT_24XX_GPTIMER9 45
254#define INT_24XX_GPTIMER10 46
255#define INT_24XX_GPTIMER11 47
256#define INT_24XX_GPTIMER12 48
245#define INT_24XX_MCBSP1_IRQ_TX 59 257#define INT_24XX_MCBSP1_IRQ_TX 59
246#define INT_24XX_MCBSP1_IRQ_RX 60 258#define INT_24XX_MCBSP1_IRQ_RX 60
247#define INT_24XX_MCBSP2_IRQ_TX 62 259#define INT_24XX_MCBSP2_IRQ_TX 62
248#define INT_24XX_MCBSP2_IRQ_RX 63 260#define INT_24XX_MCBSP2_IRQ_RX 63
261#define INT_24XX_UART1_IRQ 72
262#define INT_24XX_UART2_IRQ 73
249#define INT_24XX_UART3_IRQ 74 263#define INT_24XX_UART3_IRQ 74
250 264
251/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and 265/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
diff --git a/include/asm-arm/arch-omap/mux.h b/include/asm-arm/arch-omap/mux.h
index 0dc24d4ba59..679869c5e68 100644
--- a/include/asm-arm/arch-omap/mux.h
+++ b/include/asm-arm/arch-omap/mux.h
@@ -410,6 +410,12 @@ enum omap24xx_index {
410 /* 24xx clock */ 410 /* 24xx clock */
411 W14_24XX_SYS_CLKOUT, 411 W14_24XX_SYS_CLKOUT,
412 412
413 /* 24xx GPMC wait pin monitoring */
414 L3_GPMC_WAIT0,
415 N7_GPMC_WAIT1,
416 M1_GPMC_WAIT2,
417 P1_GPMC_WAIT3,
418
413 /* 242X McBSP */ 419 /* 242X McBSP */
414 Y15_24XX_MCBSP2_CLKX, 420 Y15_24XX_MCBSP2_CLKX,
415 R14_24XX_MCBSP2_FSX, 421 R14_24XX_MCBSP2_FSX,
@@ -429,6 +435,26 @@ enum omap24xx_index {
429 M15_24XX_GPIO92, 435 M15_24XX_GPIO92,
430 V14_24XX_GPIO117, 436 V14_24XX_GPIO117,
431 437
438 /* 242x DBG GPIO */
439 V4_242X_GPIO49,
440 W2_242X_GPIO50,
441 U4_242X_GPIO51,
442 V3_242X_GPIO52,
443 V2_242X_GPIO53,
444 V6_242X_GPIO53,
445 T4_242X_GPIO54,
446 Y4_242X_GPIO54,
447 T3_242X_GPIO55,
448 U2_242X_GPIO56,
449
450 /* 24xx external DMA requests */
451 AA10_242X_DMAREQ0,
452 AA6_242X_DMAREQ1,
453 E4_242X_DMAREQ2,
454 G4_242X_DMAREQ3,
455 D3_242X_DMAREQ4,
456 E3_242X_DMAREQ5,
457
432 P20_24XX_TSC_IRQ, 458 P20_24XX_TSC_IRQ,
433 459
434 /* UART3 */ 460 /* UART3 */
diff --git a/include/asm-arm/arch-omap/pm.h b/include/asm-arm/arch-omap/pm.h
index 05b003f3a94..e46623c61a7 100644
--- a/include/asm-arm/arch-omap/pm.h
+++ b/include/asm-arm/arch-omap/pm.h
@@ -299,10 +299,43 @@ enum omap24xx_save_state {
299 OMAP24XX_SLEEP_SAVE_INTC_MIR0, 299 OMAP24XX_SLEEP_SAVE_INTC_MIR0,
300 OMAP24XX_SLEEP_SAVE_INTC_MIR1, 300 OMAP24XX_SLEEP_SAVE_INTC_MIR1,
301 OMAP24XX_SLEEP_SAVE_INTC_MIR2, 301 OMAP24XX_SLEEP_SAVE_INTC_MIR2,
302
303 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MPU,
304 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_CORE,
305 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_GFX,
306 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_DSP,
307 OMAP24XX_SLEEP_SAVE_CM_CLKSTCTRL_MDM,
308
309 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MPU,
310 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_CORE,
311 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_GFX,
312 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_DSP,
313 OMAP24XX_SLEEP_SAVE_PM_PWSTCTRL_MDM,
314
315 OMAP24XX_SLEEP_SAVE_CM_IDLEST1_CORE,
316 OMAP24XX_SLEEP_SAVE_CM_IDLEST2_CORE,
317 OMAP24XX_SLEEP_SAVE_CM_IDLEST3_CORE,
318 OMAP24XX_SLEEP_SAVE_CM_IDLEST4_CORE,
319 OMAP24XX_SLEEP_SAVE_CM_IDLEST_GFX,
320 OMAP24XX_SLEEP_SAVE_CM_IDLEST_WKUP,
321 OMAP24XX_SLEEP_SAVE_CM_IDLEST_CKGEN,
322 OMAP24XX_SLEEP_SAVE_CM_IDLEST_DSP,
323 OMAP24XX_SLEEP_SAVE_CM_IDLEST_MDM,
324
325 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE1_CORE,
326 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE2_CORE,
327 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE3_CORE,
328 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE4_CORE,
329 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_WKUP,
330 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_PLL,
331 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_DSP,
332 OMAP24XX_SLEEP_SAVE_CM_AUTOIDLE_MDM,
333
302 OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE, 334 OMAP24XX_SLEEP_SAVE_CM_FCLKEN1_CORE,
303 OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE, 335 OMAP24XX_SLEEP_SAVE_CM_FCLKEN2_CORE,
304 OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE, 336 OMAP24XX_SLEEP_SAVE_CM_ICLKEN1_CORE,
305 OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE, 337 OMAP24XX_SLEEP_SAVE_CM_ICLKEN2_CORE,
338 OMAP24XX_SLEEP_SAVE_CM_ICLKEN3_CORE,
306 OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE, 339 OMAP24XX_SLEEP_SAVE_CM_ICLKEN4_CORE,
307 OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1, 340 OMAP24XX_SLEEP_SAVE_GPIO1_IRQENABLE1,
308 OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1, 341 OMAP24XX_SLEEP_SAVE_GPIO2_IRQENABLE1,
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index 9f83f4adfbf..f5cc65dd7d0 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -1329,6 +1329,7 @@
1329#define GPIO84_NSRXD 84 /* NSSP receive */ 1329#define GPIO84_NSRXD 84 /* NSSP receive */
1330#define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */ 1330#define GPIO85_nPCE_1 85 /* Card Enable for Card Space (PXA27x) */
1331#define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */ 1331#define GPIO92_MMCDAT0 92 /* MMC DAT0 (PXA27x) */
1332#define GPIO102_nPCE_1 102 /* PCMCIA (PXA27x) */
1332#define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */ 1333#define GPIO109_MMCDAT1 109 /* MMC DAT1 (PXA27x) */
1333#define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */ 1334#define GPIO110_MMCDAT2 110 /* MMC DAT2 (PXA27x) */
1334#define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */ 1335#define GPIO110_MMCCS0 110 /* MMC Chip Select 0 (PXA27x) */
@@ -1471,6 +1472,7 @@
1471#define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN) 1472#define GPIO84_NSSP_RX (84 | GPIO_ALT_FN_2_IN)
1472#define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT) 1473#define GPIO85_nPCE_1_MD (85 | GPIO_ALT_FN_1_OUT)
1473#define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT) 1474#define GPIO92_MMCDAT0_MD (92 | GPIO_ALT_FN_1_OUT)
1475#define GPIO102_nPCE_1_MD (102 | GPIO_ALT_FN_1_OUT)
1474#define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT) 1476#define GPIO104_pSKTSEL_MD (104 | GPIO_ALT_FN_1_OUT)
1475#define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT) 1477#define GPIO109_MMCDAT1_MD (109 | GPIO_ALT_FN_1_OUT)
1476#define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT) 1478#define GPIO110_MMCDAT2_MD (110 | GPIO_ALT_FN_1_OUT)
diff --git a/include/asm-arm/arch-pxa/trizeps4.h b/include/asm-arm/arch-pxa/trizeps4.h
new file mode 100644
index 00000000000..641d0ec110b
--- /dev/null
+++ b/include/asm-arm/arch-pxa/trizeps4.h
@@ -0,0 +1,106 @@
1/************************************************************************
2 * Include file for TRIZEPS4 SoM and ConXS eval-board
3 * Copyright (c) Jürgen Schindele
4 * 2006
5 ************************************************************************/
6
7/*
8 * Includes/Defines
9 */
10#ifndef _TRIPEPS4_H_
11#define _TRIPEPS4_H_
12
13/* physical memory regions */
14#define TRIZEPS4_FLASH_PHYS (PXA_CS0_PHYS) /* Flash region */
15#define TRIZEPS4_DISK_PHYS (PXA_CS1_PHYS) /* Disk On Chip region */
16#define TRIZEPS4_ETH_PHYS (PXA_CS2_PHYS) /* Ethernet DM9000 region */
17#define TRIZEPS4_PIC_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board */
18#define TRIZEPS4_SDRAM_BASE 0xa0000000 /* SDRAM region */
19
20#define TRIZEPS4_CFSR_PHYS (PXA_CS3_PHYS) /* Logic chip on ConXS-Board CSFR register */
21#define TRIZEPS4_BOCR_PHYS (PXA_CS3_PHYS+0x02000000) /* Logic chip on ConXS-Board BOCR register */
22#define TRIZEPS4_IRCR_PHYS (PXA_CS3_PHYS+0x02400000) /* Logic chip on ConXS-Board IRCR register*/
23#define TRIZEPS4_UPSR_PHYS (PXA_CS3_PHYS+0x02800000) /* Logic chip on ConXS-Board UPSR register*/
24#define TRIZEPS4_DICR_PHYS (PXA_CS3_PHYS+0x03800000) /* Logic chip on ConXS-Board DICR register*/
25
26/* virtual memory regions */
27#define TRIZEPS4_DISK_VIRT 0xF0000000 /* Disk On Chip region */
28
29#define TRIZEPS4_PIC_VIRT 0xF0100000 /* not used */
30#define TRIZEPS4_CFSR_VIRT 0xF0100000
31#define TRIZEPS4_BOCR_VIRT 0xF0200000
32#define TRIZEPS4_DICR_VIRT 0xF0300000
33#define TRIZEPS4_IRCR_VIRT 0xF0400000
34#define TRIZEPS4_UPSR_VIRT 0xF0500000
35
36/* size of flash */
37#define TRIZEPS4_FLASH_SIZE 0x02000000 /* Flash size 32 MB */
38
39/* Ethernet Controller Davicom DM9000 */
40#define GPIO_DM9000 101
41#define TRIZEPS4_ETH_IRQ IRQ_GPIO(GPIO_DM9000)
42
43/* UCB1400 audio / TS-controller */
44#define GPIO_UCB1400 1
45#define TRIZEPS4_UCB1400_IRQ IRQ_GPIO(GPIO_UCB1400)
46
47/* PCMCIA socket Compact Flash */
48#define GPIO_PCD 11 /* PCMCIA Card Detect */
49#define TRIZEPS4_CD_IRQ IRQ_GPIO(GPIO_PCD)
50#define GPIO_PRDY 13 /* READY / nINT */
51#define TRIZEPS4_READY_NINT IRQ_GPIO(GPIO_PRDY)
52
53/* MMC socket */
54#define GPIO_MMC_DET 12
55#define TRIZEPS4_MMC_IRQ IRQ_GPIO(GPIO_MMC_DET)
56
57/* LEDS using tx2 / rx2 */
58#define GPIO_SYS_BUSY_LED 46
59#define GPIO_HEARTBEAT_LED 47
60
61/* Off-module PIC on ConXS board */
62#define GPIO_PIC 0
63#define TRIZEPS4_PIC_IRQ IRQ_GPIO(GPIO_PIC)
64
65#define CFSR_P2V(x) ((x) - TRIZEPS4_CFSR_PHYS + TRIZEPS4_CFSR_VIRT)
66#define CFSR_V2P(x) ((x) - TRIZEPS4_CFSR_VIRT + TRIZEPS4_CFSR_PHYS)
67
68#define BCR_P2V(x) ((x) - TRIZEPS4_BOCR_PHYS + TRIZEPS4_BOCR_VIRT)
69#define BCR_V2P(x) ((x) - TRIZEPS4_BOCR_VIRT + TRIZEPS4_BOCR_PHYS)
70
71#define DCR_P2V(x) ((x) - TRIZEPS4_DICR_PHYS + TRIZEPS4_DICR_VIRT)
72#define DCR_V2P(x) ((x) - TRIZEPS4_DICR_VIRT + TRIZEPS4_DICR_PHYS)
73
74#ifndef __ASSEMBLY__
75#define ConXS_CFSR (*((volatile unsigned short *)CFSR_P2V(0x0C000000)))
76#define ConXS_BCR (*((volatile unsigned short *)BCR_P2V(0x0E000000)))
77#define ConXS_DCR (*((volatile unsigned short *)DCR_P2V(0x0F800000)))
78#else
79#define ConXS_CFSR CFSR_P2V(0x0C000000)
80#define ConXS_BCR BCR_P2V(0x0E000000)
81#define ConXS_DCR DCR_P2V(0x0F800000)
82#endif
83
84#define ConXS_CFSR_BVD_MASK 0x0003
85#define ConXS_CFSR_BVD1 (1 << 0)
86#define ConXS_CFSR_BVD2 (1 << 1)
87#define ConXS_CFSR_VS_MASK 0x000C
88#define ConXS_CFSR_VS1 (1 << 2)
89#define ConXS_CFSR_VS2 (1 << 3)
90#define ConXS_CFSR_VS_5V (0x3 << 2)
91#define ConXS_CFSR_VS_3V3 0x0
92
93#define ConXS_BCR_S0_POW_EN0 (1 << 0)
94#define ConXS_BCR_S0_POW_EN1 (1 << 1)
95#define ConXS_BCR_L_DISP (1 << 4)
96#define ConXS_BCR_CF_BUF_EN (1 << 5)
97#define ConXS_BCR_CF_RESET (1 << 7)
98#define ConXS_BCR_S0_VCC_3V3 0x1
99#define ConXS_BCR_S0_VCC_5V0 0x2
100#define ConXS_BCR_S0_VPP_12V 0x4
101#define ConXS_BCR_S0_VPP_3V3 0x8
102
103#define ConXS_IRCR_MODE (1 << 0)
104#define ConXS_IRCR_SD (1 << 1)
105
106#endif /* _TRIPEPS4_H_ */
diff --git a/include/asm-arm/bug.h b/include/asm-arm/bug.h
index 7fb02138f58..0e36fd5d87d 100644
--- a/include/asm-arm/bug.h
+++ b/include/asm-arm/bug.h
@@ -1,7 +1,6 @@
1#ifndef _ASMARM_BUG_H 1#ifndef _ASMARM_BUG_H
2#define _ASMARM_BUG_H 2#define _ASMARM_BUG_H
3 3
4#include <linux/config.h>
5 4
6#ifdef CONFIG_BUG 5#ifdef CONFIG_BUG
7#ifdef CONFIG_DEBUG_BUGVERBOSE 6#ifdef CONFIG_DEBUG_BUGVERBOSE
diff --git a/include/asm-arm/dyntick.h b/include/asm-arm/dyntick.h
new file mode 100644
index 00000000000..19fab2d2b76
--- /dev/null
+++ b/include/asm-arm/dyntick.h
@@ -0,0 +1,6 @@
1#ifndef _ASMARM_DYNTICK_H
2#define _ASMARM_DYNTICK_H
3
4#include <asm/mach/time.h>
5
6#endif /* _ASMARM_DYNTICK_H */
diff --git a/include/asm-arm/floppy.h b/include/asm-arm/floppy.h
index aa0c8d28d8d..54b5ae44ed9 100644
--- a/include/asm-arm/floppy.h
+++ b/include/asm-arm/floppy.h
@@ -25,7 +25,7 @@
25 25
26#define fd_inb(port) inb((port)) 26#define fd_inb(port) inb((port))
27#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ 27#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\
28 SA_INTERRUPT,"floppy",NULL) 28 IRQF_DISABLED,"floppy",NULL)
29#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) 29#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL)
30#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) 30#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
31#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) 31#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK)
diff --git a/include/asm-arm/hw_irq.h b/include/asm-arm/hw_irq.h
new file mode 100644
index 00000000000..ea856971989
--- /dev/null
+++ b/include/asm-arm/hw_irq.h
@@ -0,0 +1,20 @@
1/*
2 * Nothing to see here yet
3 */
4#ifndef _ARCH_ARM_HW_IRQ_H
5#define _ARCH_ARM_HW_IRQ_H
6
7#include <asm/mach/irq.h>
8
9#if defined(CONFIG_NO_IDLE_HZ)
10# include <asm/dyntick.h>
11# define handle_dynamic_tick(action) \
12 if (!(action->flags & IRQF_TIMER) && system_timer->dyn_tick) { \
13 write_seqlock(&xtime_lock); \
14 if (system_timer->dyn_tick->state & DYN_TICK_ENABLED) \
15 system_timer->dyn_tick->handler(irq, 0, regs); \
16 write_sequnlock(&xtime_lock); \
17 }
18#endif
19
20#endif
diff --git a/include/asm-arm/irq.h b/include/asm-arm/irq.h
index 66e67e60bc5..283af50a16c 100644
--- a/include/asm-arm/irq.h
+++ b/include/asm-arm/irq.h
@@ -21,18 +21,13 @@
21 21
22struct irqaction; 22struct irqaction;
23 23
24extern void disable_irq_nosync(unsigned int);
25extern void disable_irq(unsigned int);
26extern void enable_irq(unsigned int);
27
28/* 24/*
29 * These correspond with the SA_TRIGGER_* defines, and therefore the 25 * Migration helpers
30 * IORESOURCE_IRQ_* defines.
31 */ 26 */
32#define __IRQT_RISEDGE (1 << 0) 27#define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING
33#define __IRQT_FALEDGE (1 << 1) 28#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING
34#define __IRQT_HIGHLVL (1 << 2) 29#define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW
35#define __IRQT_LOWLVL (1 << 3) 30#define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH
36 31
37#define IRQT_NOEDGE (0) 32#define IRQT_NOEDGE (0)
38#define IRQT_RISING (__IRQT_RISEDGE) 33#define IRQT_RISING (__IRQT_RISEDGE)
@@ -40,12 +35,7 @@ extern void enable_irq(unsigned int);
40#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) 35#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
41#define IRQT_LOW (__IRQT_LOWLVL) 36#define IRQT_LOW (__IRQT_LOWLVL)
42#define IRQT_HIGH (__IRQT_HIGHLVL) 37#define IRQT_HIGH (__IRQT_HIGHLVL)
43#define IRQT_PROBE (1 << 4) 38#define IRQT_PROBE IRQ_TYPE_PROBE
44
45int set_irq_type(unsigned int irq, unsigned int type);
46void disable_irq_wake(unsigned int irq);
47void enable_irq_wake(unsigned int irq);
48int setup_irq(unsigned int, struct irqaction *);
49 39
50extern void migrate_irqs(void); 40extern void migrate_irqs(void);
51#endif 41#endif
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h
index d4d420ecf3a..131f33733d2 100644
--- a/include/asm-arm/mach/irq.h
+++ b/include/asm-arm/mach/irq.h
@@ -10,95 +10,9 @@
10#ifndef __ASM_ARM_MACH_IRQ_H 10#ifndef __ASM_ARM_MACH_IRQ_H
11#define __ASM_ARM_MACH_IRQ_H 11#define __ASM_ARM_MACH_IRQ_H
12 12
13struct irqdesc; 13#include <linux/irq.h>
14struct pt_regs;
15struct seq_file;
16
17typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *);
18typedef void (*irq_control_t)(unsigned int);
19
20struct irqchip {
21 /*
22 * Acknowledge the IRQ.
23 * If this is a level-based IRQ, then it is expected to mask the IRQ
24 * as well.
25 */
26 void (*ack)(unsigned int);
27 /*
28 * Mask the IRQ in hardware.
29 */
30 void (*mask)(unsigned int);
31 /*
32 * Unmask the IRQ in hardware.
33 */
34 void (*unmask)(unsigned int);
35 /*
36 * Ask the hardware to re-trigger the IRQ.
37 * Note: This method _must_ _not_ call the interrupt handler.
38 * If you are unable to retrigger the interrupt, do not
39 * provide a function, or if you do, return non-zero.
40 */
41 int (*retrigger)(unsigned int);
42 /*
43 * Set the type of the IRQ.
44 */
45 int (*set_type)(unsigned int, unsigned int);
46 /*
47 * Set wakeup-enable on the selected IRQ
48 */
49 int (*set_wake)(unsigned int, unsigned int);
50
51#ifdef CONFIG_SMP
52 /*
53 * Route an interrupt to a CPU
54 */
55 void (*set_cpu)(struct irqdesc *desc, unsigned int irq, unsigned int cpu);
56#endif
57};
58
59struct irqdesc {
60 irq_handler_t handle;
61 struct irqchip *chip;
62 struct irqaction *action;
63 struct list_head pend;
64 void __iomem *base;
65 void *data;
66 unsigned int disable_depth;
67
68 unsigned int triggered: 1; /* IRQ has occurred */
69 unsigned int running : 1; /* IRQ is running */
70 unsigned int pending : 1; /* IRQ is pending */
71 unsigned int probing : 1; /* IRQ in use for a probe */
72 unsigned int probe_ok : 1; /* IRQ can be used for probe */
73 unsigned int valid : 1; /* IRQ claimable */
74 unsigned int noautoenable : 1; /* don't automatically enable IRQ */
75 unsigned int unused :25;
76
77 unsigned int irqs_unhandled;
78 struct proc_dir_entry *procdir;
79
80#ifdef CONFIG_SMP
81 cpumask_t affinity;
82 unsigned int cpu;
83#endif
84
85 /*
86 * IRQ lock detection
87 */
88 unsigned int lck_cnt;
89 unsigned int lck_pc;
90 unsigned int lck_jif;
91};
92
93extern struct irqdesc irq_desc[];
94 14
95/* 15struct seq_file;
96 * Helpful inline function for calling irq descriptor handlers.
97 */
98static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
99{
100 desc->handle(irq, desc, regs);
101}
102 16
103/* 17/*
104 * This is internal. Do not use it. 18 * This is internal. Do not use it.
@@ -106,18 +20,22 @@ static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struc
106extern void (*init_arch_irq)(void); 20extern void (*init_arch_irq)(void);
107extern void init_FIQ(void); 21extern void init_FIQ(void);
108extern int show_fiq_list(struct seq_file *, void *); 22extern int show_fiq_list(struct seq_file *, void *);
109void __set_irq_handler(unsigned int irq, irq_handler_t, int);
110 23
111/* 24/*
112 * External stuff. 25 * Function wrappers
26 */
27#define set_irq_chipdata(irq, d) set_irq_chip_data(irq, d)
28#define get_irq_chipdata(irq) get_irq_chip_data(irq)
29
30/*
31 * Obsolete inline function for calling irq descriptor handlers.
113 */ 32 */
114#define set_irq_handler(irq,handler) __set_irq_handler(irq,handler,0) 33static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc,
115#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) 34 struct pt_regs *regs)
116#define set_irq_data(irq,d) do { irq_desc[irq].data = d; } while (0) 35{
117#define set_irq_chipdata(irq,d) do { irq_desc[irq].base = d; } while (0) 36 desc->handle_irq(irq, desc, regs);
118#define get_irq_chipdata(irq) (irq_desc[irq].base) 37}
119 38
120void set_irq_chip(unsigned int irq, struct irqchip *);
121void set_irq_flags(unsigned int irq, unsigned int flags); 39void set_irq_flags(unsigned int irq, unsigned int flags);
122 40
123#define IRQF_VALID (1 << 0) 41#define IRQF_VALID (1 << 0)
@@ -125,12 +43,25 @@ void set_irq_flags(unsigned int irq, unsigned int flags);
125#define IRQF_NOAUTOEN (1 << 2) 43#define IRQF_NOAUTOEN (1 << 2)
126 44
127/* 45/*
128 * Built-in IRQ handlers. 46 * This is for easy migration, but should be changed in the source
129 */ 47 */
130void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 48#define do_level_IRQ handle_level_irq
131void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 49#define do_edge_IRQ handle_edge_irq
132void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 50#define do_simple_IRQ handle_simple_irq
133void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); 51#define irqdesc irq_desc
134void dummy_mask_unmask_irq(unsigned int irq); 52#define irqchip irq_chip
53
54#define do_bad_IRQ(irq,desc,regs) \
55do { \
56 spin_lock(&desc->lock); \
57 handle_bad_irq(irq, desc, regs); \
58 spin_unlock(&desc->lock); \
59} while(0)
60
61extern unsigned long irq_err_count;
62static inline void ack_bad_irq(int irq)
63{
64 irq_err_count++;
65}
135 66
136#endif 67#endif
diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h
index 9f28073559e..dee0bc336fe 100644
--- a/include/asm-arm/mach/time.h
+++ b/include/asm-arm/mach/time.h
@@ -69,6 +69,7 @@ extern void timer_tick(struct pt_regs *);
69/* 69/*
70 * Kernel time keeping support. 70 * Kernel time keeping support.
71 */ 71 */
72struct timespec;
72extern int (*set_rtc)(void); 73extern int (*set_rtc)(void);
73extern void save_time_delta(struct timespec *delta, struct timespec *rtc); 74extern void save_time_delta(struct timespec *delta, struct timespec *rtc);
74extern void restore_time_delta(struct timespec *delta, struct timespec *rtc); 75extern void restore_time_delta(struct timespec *delta, struct timespec *rtc);
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index 94f973b704f..91d536c215d 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -68,6 +68,11 @@
68 */ 68 */
69#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) 69#define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff))
70 70
71/*
72 * Allow 16MB-aligned ioremap pages
73 */
74#define IOREMAP_MAX_ORDER 24
75
71#else /* CONFIG_MMU */ 76#else /* CONFIG_MMU */
72 77
73/* 78/*
diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h
index 23dde52e094..fe2a23b5627 100644
--- a/include/asm-arm/mmu.h
+++ b/include/asm-arm/mmu.h
@@ -7,6 +7,7 @@ typedef struct {
7#if __LINUX_ARM_ARCH__ >= 6 7#if __LINUX_ARM_ARCH__ >= 6
8 unsigned int id; 8 unsigned int id;
9#endif 9#endif
10 unsigned int kvm_seq;
10} mm_context_t; 11} mm_context_t;
11 12
12#if __LINUX_ARM_ARCH__ >= 6 13#if __LINUX_ARM_ARCH__ >= 6
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h
index 9fadb01e030..d1a65b1edca 100644
--- a/include/asm-arm/mmu_context.h
+++ b/include/asm-arm/mmu_context.h
@@ -17,6 +17,8 @@
17#include <asm/cacheflush.h> 17#include <asm/cacheflush.h>
18#include <asm/proc-fns.h> 18#include <asm/proc-fns.h>
19 19
20void __check_kvm_seq(struct mm_struct *mm);
21
20#if __LINUX_ARM_ARCH__ >= 6 22#if __LINUX_ARM_ARCH__ >= 6
21 23
22/* 24/*
@@ -45,13 +47,21 @@ static inline void check_context(struct mm_struct *mm)
45{ 47{
46 if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS)) 48 if (unlikely((mm->context.id ^ cpu_last_asid) >> ASID_BITS))
47 __new_context(mm); 49 __new_context(mm);
50
51 if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq))
52 __check_kvm_seq(mm);
48} 53}
49 54
50#define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0) 55#define init_new_context(tsk,mm) (__init_new_context(tsk,mm),0)
51 56
52#else 57#else
53 58
54#define check_context(mm) do { } while (0) 59static inline void check_context(struct mm_struct *mm)
60{
61 if (unlikely(mm->context.kvm_seq != init_mm.context.kvm_seq))
62 __check_kvm_seq(mm);
63}
64
55#define init_new_context(tsk,mm) 0 65#define init_new_context(tsk,mm) 0
56 66
57#endif 67#endif
diff --git a/include/asm-arm/pgtable-hwdef.h b/include/asm-arm/pgtable-hwdef.h
index 1bc1f997bda..f3b5120c99f 100644
--- a/include/asm-arm/pgtable-hwdef.h
+++ b/include/asm-arm/pgtable-hwdef.h
@@ -28,6 +28,7 @@
28 */ 28 */
29#define PMD_SECT_BUFFERABLE (1 << 2) 29#define PMD_SECT_BUFFERABLE (1 << 2)
30#define PMD_SECT_CACHEABLE (1 << 3) 30#define PMD_SECT_CACHEABLE (1 << 3)
31#define PMD_SECT_XN (1 << 4) /* v6 */
31#define PMD_SECT_AP_WRITE (1 << 10) 32#define PMD_SECT_AP_WRITE (1 << 10)
32#define PMD_SECT_AP_READ (1 << 11) 33#define PMD_SECT_AP_READ (1 << 11)
33#define PMD_SECT_TEX(x) ((x) << 12) /* v5 */ 34#define PMD_SECT_TEX(x) ((x) << 12) /* v5 */
diff --git a/include/asm-arm/procinfo.h b/include/asm-arm/procinfo.h
index 84252605522..edb7b6502fc 100644
--- a/include/asm-arm/procinfo.h
+++ b/include/asm-arm/procinfo.h
@@ -29,7 +29,8 @@ struct processor;
29struct proc_info_list { 29struct proc_info_list {
30 unsigned int cpu_val; 30 unsigned int cpu_val;
31 unsigned int cpu_mask; 31 unsigned int cpu_mask;
32 unsigned long __cpu_mmu_flags; /* used by head.S */ 32 unsigned long __cpu_mm_mmu_flags; /* used by head.S */
33 unsigned long __cpu_io_mmu_flags; /* used by head.S */
33 unsigned long __cpu_flush; /* used by head.S */ 34 unsigned long __cpu_flush; /* used by head.S */
34 const char *arch_name; 35 const char *arch_name;
35 const char *elf_name; 36 const char *elf_name;
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h
index ced69161917..d0fb487aba4 100644
--- a/include/asm-arm/signal.h
+++ b/include/asm-arm/signal.h
@@ -82,7 +82,6 @@ typedef unsigned long sigset_t;
82 * is running in 26-bit. 82 * is running in 26-bit.
83 * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). 83 * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)).
84 * SA_RESTART flag to get restarting signals (which were the default long ago) 84 * SA_RESTART flag to get restarting signals (which were the default long ago)
85 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
86 * SA_NODEFER prevents the current signal from being masked in the handler. 85 * SA_NODEFER prevents the current signal from being masked in the handler.
87 * SA_RESETHAND clears the handler when the signal is delivered. 86 * SA_RESETHAND clears the handler when the signal is delivered.
88 * 87 *
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t;
101 100
102#define SA_NOMASK SA_NODEFER 101#define SA_NOMASK SA_NODEFER
103#define SA_ONESHOT SA_RESETHAND 102#define SA_ONESHOT SA_RESETHAND
104#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
105 103
106 104
107/* 105/*
@@ -113,10 +111,6 @@ typedef unsigned long sigset_t;
113#define MINSIGSTKSZ 2048 111#define MINSIGSTKSZ 2048
114#define SIGSTKSZ 8192 112#define SIGSTKSZ 8192
115 113
116#ifdef __KERNEL__
117#define SA_TIMER 0x40000000
118#endif
119
120#include <asm-generic/signal.h> 114#include <asm-generic/signal.h>
121 115
122#ifdef __KERNEL__ 116#ifdef __KERNEL__
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h
index c46b5c84275..f28b236139e 100644
--- a/include/asm-arm/thread_info.h
+++ b/include/asm-arm/thread_info.h
@@ -111,12 +111,13 @@ extern void iwmmxt_task_disable(struct thread_info *);
111extern void iwmmxt_task_copy(struct thread_info *, void *); 111extern void iwmmxt_task_copy(struct thread_info *, void *);
112extern void iwmmxt_task_restore(struct thread_info *, void *); 112extern void iwmmxt_task_restore(struct thread_info *, void *);
113extern void iwmmxt_task_release(struct thread_info *); 113extern void iwmmxt_task_release(struct thread_info *);
114extern void iwmmxt_task_switch(struct thread_info *);
114 115
115#endif 116#endif
116 117
117/* 118/*
118 * We use bit 30 of the preempt_count to indicate that kernel 119 * We use bit 30 of the preempt_count to indicate that kernel
119 * preemption is occuring. See include/asm-arm/hardirq.h. 120 * preemption is occurring. See include/asm-arm/hardirq.h.
120 */ 121 */
121#define PREEMPT_ACTIVE 0x40000000 122#define PREEMPT_ACTIVE 0x40000000
122 123
diff --git a/include/asm-arm26/floppy.h b/include/asm-arm26/floppy.h
index a18af069ca2..efb732165a4 100644
--- a/include/asm-arm26/floppy.h
+++ b/include/asm-arm26/floppy.h
@@ -22,7 +22,7 @@
22 22
23#define fd_inb(port) inb((port)) 23#define fd_inb(port) inb((port))
24#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\ 24#define fd_request_irq() request_irq(IRQ_FLOPPYDISK,floppy_interrupt,\
25 SA_INTERRUPT,"floppy",NULL) 25 IRQF_DISABLED,"floppy",NULL)
26#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL) 26#define fd_free_irq() free_irq(IRQ_FLOPPYDISK,NULL)
27#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK) 27#define fd_disable_irq() disable_irq(IRQ_FLOPPYDISK)
28#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK) 28#define fd_enable_irq() enable_irq(IRQ_FLOPPYDISK)
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h
index 37ad2535559..967ba4947e4 100644
--- a/include/asm-arm26/signal.h
+++ b/include/asm-arm26/signal.h
@@ -82,7 +82,6 @@ typedef unsigned long sigset_t;
82 * is running in 26-bit. 82 * is running in 26-bit.
83 * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)). 83 * SA_ONSTACK allows alternate signal stacks (see sigaltstack(2)).
84 * SA_RESTART flag to get restarting signals (which were the default long ago) 84 * SA_RESTART flag to get restarting signals (which were the default long ago)
85 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
86 * SA_NODEFER prevents the current signal from being masked in the handler. 85 * SA_NODEFER prevents the current signal from being masked in the handler.
87 * SA_RESETHAND clears the handler when the signal is delivered. 86 * SA_RESETHAND clears the handler when the signal is delivered.
88 * 87 *
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t;
101 100
102#define SA_NOMASK SA_NODEFER 101#define SA_NOMASK SA_NODEFER
103#define SA_ONESHOT SA_RESETHAND 102#define SA_ONESHOT SA_RESETHAND
104#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
105 103
106 104
107/* 105/*
diff --git a/include/asm-cris/arch-v10/irq.h b/include/asm-cris/arch-v10/irq.h
index 4fa8945b026..b1128a9984a 100644
--- a/include/asm-cris/arch-v10/irq.h
+++ b/include/asm-cris/arch-v10/irq.h
@@ -141,7 +141,7 @@ __asm__ ( \
141 * it here, we would not get the multiple_irq at all. 141 * it here, we would not get the multiple_irq at all.
142 * 142 *
143 * The non-blocking here is based on the knowledge that the timer interrupt is 143 * The non-blocking here is based on the knowledge that the timer interrupt is
144 * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not 144 * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
145 * be an sti() before the timer irq handler is run to acknowledge the interrupt. 145 * be an sti() before the timer irq handler is run to acknowledge the interrupt.
146 */ 146 */
147 147
diff --git a/include/asm-cris/arch-v32/arbiter.h b/include/asm-cris/arch-v32/arbiter.h
index dba3c285cac..081a911d7af 100644
--- a/include/asm-cris/arch-v32/arbiter.h
+++ b/include/asm-cris/arch-v32/arbiter.h
@@ -20,8 +20,8 @@ enum
20 arbiter_all_accesses = 0xff 20 arbiter_all_accesses = 0xff
21}; 21};
22 22
23int crisv32_arbiter_allocate_bandwith(int client, int region, 23int crisv32_arbiter_allocate_bandwidth(int client, int region,
24 unsigned long bandwidth); 24 unsigned long bandwidth);
25int crisv32_arbiter_watch(unsigned long start, unsigned long size, 25int crisv32_arbiter_watch(unsigned long start, unsigned long size,
26 unsigned long clients, unsigned long accesses, 26 unsigned long clients, unsigned long accesses,
27 watch_callback* cb); 27 watch_callback* cb);
diff --git a/include/asm-cris/arch-v32/irq.h b/include/asm-cris/arch-v32/irq.h
index eeb0a80262c..bac94ee6bc9 100644
--- a/include/asm-cris/arch-v32/irq.h
+++ b/include/asm-cris/arch-v32/irq.h
@@ -98,7 +98,7 @@ __asm__ ( \
98 * if we had BLOCK'edit here, we would not get the multiple_irq at all. 98 * if we had BLOCK'edit here, we would not get the multiple_irq at all.
99 * 99 *
100 * The non-blocking here is based on the knowledge that the timer interrupt is 100 * The non-blocking here is based on the knowledge that the timer interrupt is
101 * registred as a fast interrupt (SA_INTERRUPT) so that we _know_ there will not 101 * registred as a fast interrupt (IRQF_DISABLED) so that we _know_ there will not
102 * be an sti() before the timer irq handler is run to acknowledge the interrupt. 102 * be an sti() before the timer irq handler is run to acknowledge the interrupt.
103 */ 103 */
104#define BUILD_TIMER_IRQ(nr, mask) \ 104#define BUILD_TIMER_IRQ(nr, mask) \
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h
index dfe039593a7..349ae682b56 100644
--- a/include/asm-cris/signal.h
+++ b/include/asm-cris/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -95,7 +94,6 @@ typedef unsigned long sigset_t;
95 94
96#define SA_NOMASK SA_NODEFER 95#define SA_NOMASK SA_NODEFER
97#define SA_ONESHOT SA_RESETHAND 96#define SA_ONESHOT SA_RESETHAND
98#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
99 97
100#define SA_RESTORER 0x04000000 98#define SA_RESTORER 0x04000000
101 99
diff --git a/include/asm-frv/irq-routing.h b/include/asm-frv/irq-routing.h
index 686fb2b39d6..ac3ab900a1d 100644
--- a/include/asm-frv/irq-routing.h
+++ b/include/asm-frv/irq-routing.h
@@ -51,7 +51,7 @@ struct irq_source {
51struct irq_level { 51struct irq_level {
52 int usage; 52 int usage;
53 int disable_count; 53 int disable_count;
54 unsigned long flags; /* current SA_INTERRUPT and SA_SHIRQ settings */ 54 unsigned long flags; /* current IRQF_DISABLED and IRQF_SHARED settings */
55 spinlock_t lock; 55 spinlock_t lock;
56 struct irq_source *sources; 56 struct irq_source *sources;
57}; 57};
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h
index dcc1b359291..2079197d483 100644
--- a/include/asm-frv/signal.h
+++ b/include/asm-frv/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99#define SA_RESTORER 0x04000000 97#define SA_RESTORER 0x04000000
100 98
diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h
new file mode 100644
index 00000000000..cb05bf69745
--- /dev/null
+++ b/include/asm-generic/audit_change_attr.h
@@ -0,0 +1,18 @@
1__NR_chmod,
2__NR_fchmod,
3__NR_chown,
4__NR_fchown,
5__NR_lchown,
6__NR_setxattr,
7__NR_lsetxattr,
8__NR_fsetxattr,
9__NR_removexattr,
10__NR_lremovexattr,
11__NR_fremovexattr,
12__NR_fchownat,
13__NR_fchmodat,
14#ifdef __NR_chown32
15__NR_chown32,
16__NR_fchown32,
17__NR_lchown32,
18#endif
diff --git a/include/asm-generic/audit_dir_write.h b/include/asm-generic/audit_dir_write.h
new file mode 100644
index 00000000000..161a7a58fba
--- /dev/null
+++ b/include/asm-generic/audit_dir_write.h
@@ -0,0 +1,14 @@
1__NR_rename,
2__NR_mkdir,
3__NR_rmdir,
4__NR_creat,
5__NR_link,
6__NR_unlink,
7__NR_symlink,
8__NR_mknod,
9__NR_mkdirat,
10__NR_mknodat,
11__NR_unlinkat,
12__NR_renameat,
13__NR_linkat,
14__NR_symlinkat,
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h
index 0b49f9e070f..962cad7cfbb 100644
--- a/include/asm-generic/sections.h
+++ b/include/asm-generic/sections.h
@@ -14,5 +14,6 @@ extern char _end[];
14extern char __per_cpu_start[], __per_cpu_end[]; 14extern char __per_cpu_start[], __per_cpu_end[];
15extern char __kprobes_text_start[], __kprobes_text_end[]; 15extern char __kprobes_text_start[], __kprobes_text_end[];
16extern char __initdata_begin[], __initdata_end[]; 16extern char __initdata_begin[], __initdata_end[];
17extern char __start_rodata[], __end_rodata[];
17 18
18#endif /* _ASM_GENERIC_SECTIONS_H_ */ 19#endif /* _ASM_GENERIC_SECTIONS_H_ */
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h
index 8eccdc17616..7bc15048a64 100644
--- a/include/asm-h8300/signal.h
+++ b/include/asm-h8300/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99#define SA_RESTORER 0x04000000 97#define SA_RESTORER 0x04000000
100 98
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h
index c61bd1a17f3..96adbabec74 100644
--- a/include/asm-i386/alternative.h
+++ b/include/asm-i386/alternative.h
@@ -19,11 +19,19 @@ struct alt_instr {
19extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); 19extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
20 20
21struct module; 21struct module;
22#ifdef CONFIG_SMP
22extern void alternatives_smp_module_add(struct module *mod, char *name, 23extern void alternatives_smp_module_add(struct module *mod, char *name,
23 void *locks, void *locks_end, 24 void *locks, void *locks_end,
24 void *text, void *text_end); 25 void *text, void *text_end);
25extern void alternatives_smp_module_del(struct module *mod); 26extern void alternatives_smp_module_del(struct module *mod);
26extern void alternatives_smp_switch(int smp); 27extern void alternatives_smp_switch(int smp);
28#else
29static inline void alternatives_smp_module_add(struct module *mod, char *name,
30 void *locks, void *locks_end,
31 void *text, void *text_end) {}
32static inline void alternatives_smp_module_del(struct module *mod) {}
33static inline void alternatives_smp_switch(int smp) {}
34#endif
27 35
28#endif 36#endif
29 37
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h
index 9cb2793eb21..359ead60b71 100644
--- a/include/asm-i386/floppy.h
+++ b/include/asm-i386/floppy.h
@@ -144,11 +144,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
144static int fd_request_irq(void) 144static int fd_request_irq(void)
145{ 145{
146 if(can_use_virtual_dma) 146 if(can_use_virtual_dma)
147 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 147 return request_irq(FLOPPY_IRQ, floppy_hardint,
148 "floppy", NULL); 148 IRQF_DISABLED, "floppy", NULL);
149 else 149 else
150 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 150 return request_irq(FLOPPY_IRQ, floppy_interrupt,
151 "floppy", NULL); 151 IRQF_DISABLED, "floppy", NULL);
152 152
153} 153}
154 154
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 026fd231488..3824a502351 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t;
77 * SA_FLAGS values: 77 * SA_FLAGS values:
78 * 78 *
79 * SA_ONSTACK indicates that a registered stack_t will be used. 79 * SA_ONSTACK indicates that a registered stack_t will be used.
80 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
81 * SA_RESTART flag to get restarting signals (which were the default long ago) 80 * SA_RESTART flag to get restarting signals (which were the default long ago)
82 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 81 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
83 * SA_RESETHAND clears the handler when the signal is delivered. 82 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -97,7 +96,6 @@ typedef unsigned long sigset_t;
97 96
98#define SA_NOMASK SA_NODEFER 97#define SA_NOMASK SA_NODEFER
99#define SA_ONESHOT SA_RESETHAND 98#define SA_ONESHOT SA_RESETHAND
100#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
101 99
102#define SA_RESTORER 0x04000000 100#define SA_RESTORER 0x04000000
103 101
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h
index 79479e2c696..8acb00190d5 100644
--- a/include/asm-ia64/irq.h
+++ b/include/asm-ia64/irq.h
@@ -14,6 +14,8 @@
14#define NR_IRQS 256 14#define NR_IRQS 256
15#define NR_IRQ_VECTORS NR_IRQS 15#define NR_IRQ_VECTORS NR_IRQS
16 16
17#define IRQF_PERCPU 0x02000000
18
17static __inline__ int 19static __inline__ int
18irq_canonicalize (int irq) 20irq_canonicalize (int irq)
19{ 21{
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h
index 5e328ed5d01..4f5ca5643cb 100644
--- a/include/asm-ia64/signal.h
+++ b/include/asm-ia64/signal.h
@@ -56,7 +56,6 @@
56 * SA_FLAGS values: 56 * SA_FLAGS values:
57 * 57 *
58 * SA_ONSTACK indicates that a registered stack_t will be used. 58 * SA_ONSTACK indicates that a registered stack_t will be used.
59 * SA_INTERRUPT is a no-op, but left due to historical reasons.
60 * SA_RESTART flag to get restarting signals (which were the default long ago) 59 * SA_RESTART flag to get restarting signals (which were the default long ago)
61 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 60 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
62 * SA_RESETHAND clears the handler when the signal is delivered. 61 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -76,7 +75,6 @@
76 75
77#define SA_NOMASK SA_NODEFER 76#define SA_NOMASK SA_NODEFER
78#define SA_ONESHOT SA_RESETHAND 77#define SA_ONESHOT SA_RESETHAND
79#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
80 78
81#define SA_RESTORER 0x04000000 79#define SA_RESTORER 0x04000000
82 80
@@ -114,8 +112,6 @@
114#define _NSIG_BPW 64 112#define _NSIG_BPW 64
115#define _NSIG_WORDS (_NSIG / _NSIG_BPW) 113#define _NSIG_WORDS (_NSIG / _NSIG_BPW)
116 114
117#define SA_PERCPU_IRQ 0x02000000
118
119#endif /* __KERNEL__ */ 115#endif /* __KERNEL__ */
120 116
121#include <asm-generic/signal.h> 117#include <asm-generic/signal.h>
diff --git a/include/asm-ia64/sn/tioca_provider.h b/include/asm-ia64/sn/tioca_provider.h
index ab7fe246346..65cdd73c2a5 100644
--- a/include/asm-ia64/sn/tioca_provider.h
+++ b/include/asm-ia64/sn/tioca_provider.h
@@ -27,7 +27,7 @@
27#define PV908234 (1 << 1) 27#define PV908234 (1 << 1)
28 /* CA:AGPDMA write request data mismatch with ABC1CL merge */ 28 /* CA:AGPDMA write request data mismatch with ABC1CL merge */
29#define PV895469 (1 << 1) 29#define PV895469 (1 << 1)
30 /* TIO:CA TLB invalidate of written GART entries possibly not occuring in CA*/ 30 /* TIO:CA TLB invalidate of written GART entries possibly not occurring in CA*/
31#define PV910244 (1 << 1) 31#define PV910244 (1 << 1)
32 32
33struct tioca_dmamap{ 33struct tioca_dmamap{
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h
index 95f69b19195..e750045164d 100644
--- a/include/asm-m32r/signal.h
+++ b/include/asm-m32r/signal.h
@@ -81,7 +81,6 @@ typedef unsigned long sigset_t;
81 * SA_FLAGS values: 81 * SA_FLAGS values:
82 * 82 *
83 * SA_ONSTACK indicates that a registered stack_t will be used. 83 * SA_ONSTACK indicates that a registered stack_t will be used.
84 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
85 * SA_RESTART flag to get restarting signals (which were the default long ago) 84 * SA_RESTART flag to get restarting signals (which were the default long ago)
86 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 85 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
87 * SA_RESETHAND clears the handler when the signal is delivered. 86 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -101,7 +100,6 @@ typedef unsigned long sigset_t;
101 100
102#define SA_NOMASK SA_NODEFER 101#define SA_NOMASK SA_NODEFER
103#define SA_ONESHOT SA_RESETHAND 102#define SA_ONESHOT SA_RESETHAND
104#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
105 103
106#define SA_RESTORER 0x04000000 104#define SA_RESTORER 0x04000000
107 105
diff --git a/include/asm-m68k/floppy.h b/include/asm-m68k/floppy.h
index 63a05ed95c1..57f4fdda65a 100644
--- a/include/asm-m68k/floppy.h
+++ b/include/asm-m68k/floppy.h
@@ -88,8 +88,8 @@ static __inline__ void fd_outb(unsigned char value, int port)
88static int fd_request_irq(void) 88static int fd_request_irq(void)
89{ 89{
90 if(MACH_IS_Q40) 90 if(MACH_IS_Q40)
91 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 91 return request_irq(FLOPPY_IRQ, floppy_hardint,
92 "floppy", floppy_hardint); 92 IRQF_DISABLED, "floppy", floppy_hardint);
93 else if(MACH_IS_SUN3X) 93 else if(MACH_IS_SUN3X)
94 return sun3xflop_request_irq(); 94 return sun3xflop_request_irq();
95 return -ENXIO; 95 return -ENXIO;
diff --git a/include/asm-m68k/irq.h b/include/asm-m68k/irq.h
index f4ae7d8feac..3257f988100 100644
--- a/include/asm-m68k/irq.h
+++ b/include/asm-m68k/irq.h
@@ -67,8 +67,8 @@ struct pt_regs;
67 67
68/* 68/*
69 * various flags for request_irq() - the Amiga now uses the standard 69 * various flags for request_irq() - the Amiga now uses the standard
70 * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ 70 * mechanism like all other architectures - IRQF_DISABLED and
71 * are your friends. 71 * IRQF_SHARED are your friends.
72 */ 72 */
73#ifndef MACH_AMIGA_ONLY 73#ifndef MACH_AMIGA_ONLY
74#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ 74#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h
index 85037a3d3e8..de1ba6ead3b 100644
--- a/include/asm-m68k/signal.h
+++ b/include/asm-m68k/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99/* 97/*
100 * sigaltstack controls 98 * sigaltstack controls
diff --git a/include/asm-m68k/sun3xflop.h b/include/asm-m68k/sun3xflop.h
index 98a9f79dab2..ca8cc411384 100644
--- a/include/asm-m68k/sun3xflop.h
+++ b/include/asm-m68k/sun3xflop.h
@@ -208,7 +208,8 @@ static int sun3xflop_request_irq(void)
208 208
209 if(!once) { 209 if(!once) {
210 once = 1; 210 once = 1;
211 error = request_irq(FLOPPY_IRQ, sun3xflop_hardint, SA_INTERRUPT, "floppy", NULL); 211 error = request_irq(FLOPPY_IRQ, sun3xflop_hardint,
212 IRQF_DISABLED, "floppy", NULL);
212 return ((error == 0) ? 0 : -1); 213 return ((error == 0) ? 0 : -1);
213 } else return 0; 214 } else return 0;
214} 215}
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h
index 53557274eef..45e7a2fd168 100644
--- a/include/asm-m68knommu/irq.h
+++ b/include/asm-m68knommu/irq.h
@@ -62,8 +62,8 @@ extern void (*mach_disable_irq)(unsigned int);
62 62
63/* 63/*
64 * various flags for request_irq() - the Amiga now uses the standard 64 * various flags for request_irq() - the Amiga now uses the standard
65 * mechanism like all other architectures - SA_INTERRUPT and SA_SHIRQ 65 * mechanism like all other architectures - IRQF_DISABLED and
66 * are your friends. 66 * IRQF_SHARED are your friends.
67 */ 67 */
68#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */ 68#define IRQ_FLG_LOCK (0x0001) /* handler is not replaceable */
69#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */ 69#define IRQ_FLG_REPLACE (0x0002) /* replace existing handler */
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h
index 1d13187f606..216c08be54a 100644
--- a/include/asm-m68knommu/signal.h
+++ b/include/asm-m68knommu/signal.h
@@ -74,7 +74,6 @@ typedef unsigned long sigset_t;
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef unsigned long sigset_t;
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99/* 97/*
100 * sigaltstack controls 98 * sigaltstack controls
diff --git a/include/asm-mips/mach-generic/floppy.h b/include/asm-mips/mach-generic/floppy.h
index 83cd69e30ec..001a8ce17c1 100644
--- a/include/asm-mips/mach-generic/floppy.h
+++ b/include/asm-mips/mach-generic/floppy.h
@@ -98,7 +98,7 @@ static inline void fd_disable_irq(void)
98static inline int fd_request_irq(void) 98static inline int fd_request_irq(void)
99{ 99{
100 return request_irq(FLOPPY_IRQ, floppy_interrupt, 100 return request_irq(FLOPPY_IRQ, floppy_interrupt,
101 SA_INTERRUPT, "floppy", NULL); 101 IRQF_DISABLED, "floppy", NULL);
102} 102}
103 103
104static inline void fd_free_irq(void) 104static inline void fd_free_irq(void)
diff --git a/include/asm-mips/mach-jazz/floppy.h b/include/asm-mips/mach-jazz/floppy.h
index 9413117915f..56e9ca6ae42 100644
--- a/include/asm-mips/mach-jazz/floppy.h
+++ b/include/asm-mips/mach-jazz/floppy.h
@@ -90,7 +90,7 @@ static inline void fd_disable_irq(void)
90static inline int fd_request_irq(void) 90static inline int fd_request_irq(void)
91{ 91{
92 return request_irq(FLOPPY_IRQ, floppy_interrupt, 92 return request_irq(FLOPPY_IRQ, floppy_interrupt,
93 SA_INTERRUPT, "floppy", NULL); 93 IRQF_DISABLED, "floppy", NULL);
94} 94}
95 95
96static inline void fd_free_irq(void) 96static inline void fd_free_irq(void)
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h
index a1f3a3fa9bd..87a1dff9519 100644
--- a/include/asm-mips/signal.h
+++ b/include/asm-mips/signal.h
@@ -64,7 +64,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
64 * SA_FLAGS values: 64 * SA_FLAGS values:
65 * 65 *
66 * SA_ONSTACK indicates that a registered stack_t will be used. 66 * SA_ONSTACK indicates that a registered stack_t will be used.
67 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
68 * SA_RESTART flag to get restarting signals (which were the default long ago) 67 * SA_RESTART flag to get restarting signals (which were the default long ago)
69 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 68 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
70 * SA_RESETHAND clears the handler when the signal is delivered. 69 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -84,7 +83,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
84 83
85#define SA_NOMASK SA_NODEFER 84#define SA_NOMASK SA_NODEFER
86#define SA_ONESHOT SA_RESETHAND 85#define SA_ONESHOT SA_RESETHAND
87#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
88 86
89#define SA_RESTORER 0x04000000 /* Only for o32 */ 87#define SA_RESTORER 0x04000000 /* Only for o32 */
90 88
@@ -99,15 +97,6 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */
99 97
100#ifdef __KERNEL__ 98#ifdef __KERNEL__
101 99
102/*
103 * These values of sa_flags are used only by the kernel as part of the
104 * irq handling routines.
105 *
106 * SA_INTERRUPT is also used by the irq handling routines.
107 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
108 */
109#define SA_SAMPLE_RANDOM SA_RESTART
110
111#ifdef CONFIG_TRAD_SIGNALS 100#ifdef CONFIG_TRAD_SIGNALS
112#define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO) 101#define sig_uses_siginfo(ka) ((ka)->sa.sa_flags & SA_SIGINFO)
113#else 102#else
diff --git a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h
index 458cdb2a753..da2f9c15714 100644
--- a/include/asm-parisc/floppy.h
+++ b/include/asm-parisc/floppy.h
@@ -156,11 +156,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
156static int fd_request_irq(void) 156static int fd_request_irq(void)
157{ 157{
158 if(can_use_virtual_dma) 158 if(can_use_virtual_dma)
159 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 159 return request_irq(FLOPPY_IRQ, floppy_hardint,
160 "floppy", NULL); 160 IRQF_DISABLED, "floppy", NULL);
161 else 161 else
162 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 162 return request_irq(FLOPPY_IRQ, floppy_interrupt,
163 "floppy", NULL); 163 IRQF_DISABLED, "floppy", NULL);
164} 164}
165 165
166static unsigned long dma_mem_alloc(unsigned long size) 166static unsigned long dma_mem_alloc(unsigned long size)
diff --git a/include/asm-parisc/signal.h b/include/asm-parisc/signal.h
index 25cb23ef7dd..98a82fa0cfd 100644
--- a/include/asm-parisc/signal.h
+++ b/include/asm-parisc/signal.h
@@ -48,7 +48,6 @@
48 * SA_FLAGS values: 48 * SA_FLAGS values:
49 * 49 *
50 * SA_ONSTACK indicates that a registered stack_t will be used. 50 * SA_ONSTACK indicates that a registered stack_t will be used.
51 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
52 * SA_RESTART flag to get restarting signals (which were the default long ago) 51 * SA_RESTART flag to get restarting signals (which were the default long ago)
53 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 52 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
54 * SA_RESETHAND clears the handler when the signal is delivered. 53 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -69,7 +68,6 @@
69 68
70#define SA_NOMASK SA_NODEFER 69#define SA_NOMASK SA_NODEFER
71#define SA_ONESHOT SA_RESETHAND 70#define SA_ONESHOT SA_RESETHAND
72#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
73 71
74#define SA_RESTORER 0x04000000 /* obsolete -- ignored */ 72#define SA_RESTORER 0x04000000 /* obsolete -- ignored */
75 73
diff --git a/include/asm-powerpc/floppy.h b/include/asm-powerpc/floppy.h
index 9c8d91bf5a0..fd242a22331 100644
--- a/include/asm-powerpc/floppy.h
+++ b/include/asm-powerpc/floppy.h
@@ -27,7 +27,7 @@
27#define fd_disable_irq() disable_irq(FLOPPY_IRQ) 27#define fd_disable_irq() disable_irq(FLOPPY_IRQ)
28#define fd_cacheflush(addr,size) /* nothing */ 28#define fd_cacheflush(addr,size) /* nothing */
29#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \ 29#define fd_request_irq() request_irq(FLOPPY_IRQ, floppy_interrupt, \
30 SA_INTERRUPT, "floppy", NULL) 30 IRQF_DISABLED, "floppy", NULL)
31#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL); 31#define fd_free_irq() free_irq(FLOPPY_IRQ, NULL);
32 32
33#ifdef CONFIG_PCI 33#ifdef CONFIG_PCI
diff --git a/include/asm-powerpc/of_device.h b/include/asm-powerpc/of_device.h
index 6249a7c3963..c5c0b0b3cd5 100644
--- a/include/asm-powerpc/of_device.h
+++ b/include/asm-powerpc/of_device.h
@@ -9,7 +9,7 @@
9/* 9/*
10 * The of_platform_bus_type is a bus type used by drivers that do not 10 * The of_platform_bus_type is a bus type used by drivers that do not
11 * attach to a macio or similar bus but still use OF probing 11 * attach to a macio or similar bus but still use OF probing
12 * mecanism 12 * mechanism
13 */ 13 */
14extern struct bus_type of_platform_bus_type; 14extern struct bus_type of_platform_bus_type;
15 15
diff --git a/include/asm-powerpc/pmac_pfunc.h b/include/asm-powerpc/pmac_pfunc.h
index cef61304ffc..1330d6a58c5 100644
--- a/include/asm-powerpc/pmac_pfunc.h
+++ b/include/asm-powerpc/pmac_pfunc.h
@@ -205,7 +205,7 @@ extern void pmf_do_irq(struct pmf_function *func);
205 * 205 *
206 * The args array contains as many arguments as is required by the function, 206 * The args array contains as many arguments as is required by the function,
207 * this is dependent on the function you are calling, unfortunately Apple 207 * this is dependent on the function you are calling, unfortunately Apple
208 * mecanism provides no way to encode that so you have to get it right at 208 * mechanism provides no way to encode that so you have to get it right at
209 * the call site. Some functions require no args, in which case, you can 209 * the call site. Some functions require no args, in which case, you can
210 * pass NULL. 210 * pass NULL.
211 * 211 *
diff --git a/include/asm-powerpc/signal.h b/include/asm-powerpc/signal.h
index a4d8f864854..a8c7babf495 100644
--- a/include/asm-powerpc/signal.h
+++ b/include/asm-powerpc/signal.h
@@ -63,7 +63,6 @@ typedef struct {
63 * SA_FLAGS values: 63 * SA_FLAGS values:
64 * 64 *
65 * SA_ONSTACK is not currently supported, but will allow sigaltstack(2). 65 * SA_ONSTACK is not currently supported, but will allow sigaltstack(2).
66 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
67 * SA_RESTART flag to get restarting signals (which were the default long ago) 66 * SA_RESTART flag to get restarting signals (which were the default long ago)
68 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 67 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
69 * SA_RESETHAND clears the handler when the signal is delivered. 68 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -83,7 +82,6 @@ typedef struct {
83 82
84#define SA_NOMASK SA_NODEFER 83#define SA_NOMASK SA_NODEFER
85#define SA_ONESHOT SA_RESETHAND 84#define SA_ONESHOT SA_RESETHAND
86#define SA_INTERRUPT 0x20000000u /* dummy -- ignored */
87 85
88#define SA_RESTORER 0x04000000U 86#define SA_RESTORER 0x04000000U
89 87
diff --git a/include/asm-ppc/floppy.h b/include/asm-ppc/floppy.h
index 2ba191eba44..d3963ca79ad 100644
--- a/include/asm-ppc/floppy.h
+++ b/include/asm-ppc/floppy.h
@@ -96,11 +96,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
96static int fd_request_irq(void) 96static int fd_request_irq(void)
97{ 97{
98 if (can_use_virtual_dma) 98 if (can_use_virtual_dma)
99 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 99 return request_irq(FLOPPY_IRQ, floppy_hardint,
100 "floppy", NULL); 100 IRQF_DISABLED, "floppy", NULL);
101 else 101 else
102 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 102 return request_irq(FLOPPY_IRQ, floppy_interrupt,
103 "floppy", NULL); 103 IRQF_DISABLED, "floppy", NULL);
104} 104}
105 105
106static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io) 106static int vdma_dma_setup(char *addr, unsigned long size, int mode, int io)
diff --git a/include/asm-ppc/page.h b/include/asm-ppc/page.h
index 0b19af82507..fe95c8258cf 100644
--- a/include/asm-ppc/page.h
+++ b/include/asm-ppc/page.h
@@ -170,7 +170,7 @@ extern __inline__ int get_order(unsigned long size)
170#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ 170#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
171 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) 171 VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
172 172
173/* We do define AT_SYSINFO_EHDR but don't use the gate mecanism */ 173/* We do define AT_SYSINFO_EHDR but don't use the gate mechanism */
174#define __HAVE_ARCH_GATE_AREA 1 174#define __HAVE_ARCH_GATE_AREA 1
175 175
176#include <asm-generic/memory_model.h> 176#include <asm-generic/memory_model.h>
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h
index 7084626de21..f6cfddb278c 100644
--- a/include/asm-s390/signal.h
+++ b/include/asm-s390/signal.h
@@ -84,7 +84,6 @@ typedef unsigned long sigset_t;
84 * SA_FLAGS values: 84 * SA_FLAGS values:
85 * 85 *
86 * SA_ONSTACK indicates that a registered stack_t will be used. 86 * SA_ONSTACK indicates that a registered stack_t will be used.
87 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
88 * SA_RESTART flag to get restarting signals (which were the default long ago) 87 * SA_RESTART flag to get restarting signals (which were the default long ago)
89 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 88 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
90 * SA_RESETHAND clears the handler when the signal is delivered. 89 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -104,7 +103,6 @@ typedef unsigned long sigset_t;
104 103
105#define SA_NOMASK SA_NODEFER 104#define SA_NOMASK SA_NODEFER
106#define SA_ONESHOT SA_RESETHAND 105#define SA_ONESHOT SA_RESETHAND
107#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
108 106
109#define SA_RESTORER 0x04000000 107#define SA_RESTORER 0x04000000
110 108
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h
index 307d9ce9f9e..dc1ad464fa3 100644
--- a/include/asm-sh/floppy.h
+++ b/include/asm-sh/floppy.h
@@ -146,12 +146,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
146static int fd_request_irq(void) 146static int fd_request_irq(void)
147{ 147{
148 if(can_use_virtual_dma) 148 if(can_use_virtual_dma)
149 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 149 return request_irq(FLOPPY_IRQ, floppy_hardint,
150 "floppy", NULL); 150 IRQF_DISABLED, "floppy", NULL);
151 else 151 else
152 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 152 return request_irq(FLOPPY_IRQ, floppy_interrupt,
153 "floppy", NULL); 153 IRQF_DISABLED, "floppy", NULL);
154
155} 154}
156 155
157static unsigned long dma_mem_alloc(unsigned long size) 156static unsigned long dma_mem_alloc(unsigned long size)
diff --git a/include/asm-sh/mpc1211/keyboard.h b/include/asm-sh/mpc1211/keyboard.h
index 5f0b9088c79..71ef4cf4242 100644
--- a/include/asm-sh/mpc1211/keyboard.h
+++ b/include/asm-sh/mpc1211/keyboard.h
@@ -57,7 +57,7 @@ extern unsigned char pckbd_sysrq_xlate[128];
57#define AUX_IRQ 12 57#define AUX_IRQ 12
58 58
59#define aux_request_irq(hand, dev_id) \ 59#define aux_request_irq(hand, dev_id) \
60 request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) 60 request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id)
61 61
62#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) 62#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
63 63
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h
index d6e8eb0e65c..5c5c1e85208 100644
--- a/include/asm-sh/signal.h
+++ b/include/asm-sh/signal.h
@@ -75,7 +75,6 @@ typedef unsigned long sigset_t;
75 * SA_FLAGS values: 75 * SA_FLAGS values:
76 * 76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used. 77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
79 * SA_RESTART flag to get restarting signals (which were the default long ago) 78 * SA_RESTART flag to get restarting signals (which were the default long ago)
80 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
81 * SA_RESETHAND clears the handler when the signal is delivered. 80 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -95,7 +94,6 @@ typedef unsigned long sigset_t;
95 94
96#define SA_NOMASK SA_NODEFER 95#define SA_NOMASK SA_NODEFER
97#define SA_ONESHOT SA_RESETHAND 96#define SA_ONESHOT SA_RESETHAND
98#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
99 97
100#define SA_RESTORER 0x04000000 98#define SA_RESTORER 0x04000000
101 99
diff --git a/include/asm-sh64/keyboard.h b/include/asm-sh64/keyboard.h
index 733e2bbe7b8..1fab96d792b 100644
--- a/include/asm-sh64/keyboard.h
+++ b/include/asm-sh64/keyboard.h
@@ -65,7 +65,7 @@ extern unsigned char pckbd_sysrq_xlate[128];
65#endif 65#endif
66 66
67#define aux_request_irq(hand, dev_id) \ 67#define aux_request_irq(hand, dev_id) \
68 request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS2 Mouse", dev_id) 68 request_irq(AUX_IRQ, hand, IRQF_SHARED, "PS2 Mouse", dev_id)
69 69
70#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id) 70#define aux_free_irq(dev_id) free_irq(AUX_IRQ, dev_id)
71 71
diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h
index 2400dc688a6..a5a28203cb3 100644
--- a/include/asm-sh64/signal.h
+++ b/include/asm-sh64/signal.h
@@ -74,7 +74,6 @@ typedef struct {
74 * SA_FLAGS values: 74 * SA_FLAGS values:
75 * 75 *
76 * SA_ONSTACK indicates that a registered stack_t will be used. 76 * SA_ONSTACK indicates that a registered stack_t will be used.
77 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
78 * SA_RESTART flag to get restarting signals (which were the default long ago) 77 * SA_RESTART flag to get restarting signals (which were the default long ago)
79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 78 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
80 * SA_RESETHAND clears the handler when the signal is delivered. 79 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -94,7 +93,6 @@ typedef struct {
94 93
95#define SA_NOMASK SA_NODEFER 94#define SA_NOMASK SA_NODEFER
96#define SA_ONESHOT SA_RESETHAND 95#define SA_ONESHOT SA_RESETHAND
97#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
98 96
99#define SA_RESTORER 0x04000000 97#define SA_RESTORER 0x04000000
100 98
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h
index 7a941b800b6..c53b332c850 100644
--- a/include/asm-sparc/floppy.h
+++ b/include/asm-sparc/floppy.h
@@ -271,7 +271,8 @@ static int sun_fd_request_irq(void)
271 271
272 if(!once) { 272 if(!once) {
273 once = 1; 273 once = 1;
274 error = request_fast_irq(FLOPPY_IRQ, floppy_hardint, SA_INTERRUPT, "floppy"); 274 error = request_fast_irq(FLOPPY_IRQ, floppy_hardint,
275 IRQF_DISABLED, "floppy");
275 return ((error == 0) ? 0 : -1); 276 return ((error == 0) ? 0 : -1);
276 } else return 0; 277 } else return 0;
277} 278}
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h
index aa9960ad0ca..0ae5084c427 100644
--- a/include/asm-sparc/signal.h
+++ b/include/asm-sparc/signal.h
@@ -132,16 +132,13 @@ struct sigstack {
132 * usage of signal stacks by using the (now obsolete) sa_restorer field in 132 * usage of signal stacks by using the (now obsolete) sa_restorer field in
133 * the sigaction structure as a stack pointer. This is now possible due to 133 * the sigaction structure as a stack pointer. This is now possible due to
134 * the changes in signal handling. LBT 010493. 134 * the changes in signal handling. LBT 010493.
135 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
136 * SA_RESTART flag to get restarting signals (which were the default long ago) 135 * SA_RESTART flag to get restarting signals (which were the default long ago)
137 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
138 */ 136 */
139#define SA_NOCLDSTOP _SV_IGNCHILD 137#define SA_NOCLDSTOP _SV_IGNCHILD
140#define SA_STACK _SV_SSTACK 138#define SA_STACK _SV_SSTACK
141#define SA_ONSTACK _SV_SSTACK 139#define SA_ONSTACK _SV_SSTACK
142#define SA_RESTART _SV_INTR 140#define SA_RESTART _SV_INTR
143#define SA_ONESHOT _SV_RESET 141#define SA_ONESHOT _SV_RESET
144#define SA_INTERRUPT 0x10u
145#define SA_NOMASK 0x20u 142#define SA_NOMASK 0x20u
146#define SA_NOCLDWAIT 0x100u 143#define SA_NOCLDWAIT 0x100u
147#define SA_SIGINFO 0x200u 144#define SA_SIGINFO 0x200u
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h
index b591d0e8d8f..abf15003801 100644
--- a/include/asm-sparc64/floppy.h
+++ b/include/asm-sparc64/floppy.h
@@ -267,7 +267,7 @@ static int sun_fd_request_irq(void)
267 once = 1; 267 once = 1;
268 268
269 error = request_irq(FLOPPY_IRQ, sparc_floppy_irq, 269 error = request_irq(FLOPPY_IRQ, sparc_floppy_irq,
270 SA_INTERRUPT, "floppy", NULL); 270 IRQF_DISABLED, "floppy", NULL);
271 271
272 return ((error == 0) ? 0 : -1); 272 return ((error == 0) ? 0 : -1);
273 } 273 }
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h
index fdc42a14d4e..9968871103b 100644
--- a/include/asm-sparc64/signal.h
+++ b/include/asm-sparc64/signal.h
@@ -133,16 +133,13 @@ struct sigstack {
133 * usage of signal stacks by using the (now obsolete) sa_restorer field in 133 * usage of signal stacks by using the (now obsolete) sa_restorer field in
134 * the sigaction structure as a stack pointer. This is now possible due to 134 * the sigaction structure as a stack pointer. This is now possible due to
135 * the changes in signal handling. LBT 010493. 135 * the changes in signal handling. LBT 010493.
136 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
137 * SA_RESTART flag to get restarting signals (which were the default long ago) 136 * SA_RESTART flag to get restarting signals (which were the default long ago)
138 * SA_SHIRQ flag is for shared interrupt support on PCI and EISA.
139 */ 137 */
140#define SA_NOCLDSTOP _SV_IGNCHILD 138#define SA_NOCLDSTOP _SV_IGNCHILD
141#define SA_STACK _SV_SSTACK 139#define SA_STACK _SV_SSTACK
142#define SA_ONSTACK _SV_SSTACK 140#define SA_ONSTACK _SV_SSTACK
143#define SA_RESTART _SV_INTR 141#define SA_RESTART _SV_INTR
144#define SA_ONESHOT _SV_RESET 142#define SA_ONESHOT _SV_RESET
145#define SA_INTERRUPT 0x10u
146#define SA_NOMASK 0x20u 143#define SA_NOMASK 0x20u
147#define SA_NOCLDWAIT 0x100u 144#define SA_NOCLDWAIT 0x100u
148#define SA_SIGINFO 0x200u 145#define SA_SIGINFO 0x200u
diff --git a/include/asm-sparc64/vdev.h b/include/asm-sparc64/vdev.h
deleted file mode 100644
index 25637c57675..00000000000
--- a/include/asm-sparc64/vdev.h
+++ /dev/null
@@ -1,17 +0,0 @@
1/* vdev.h: SUN4V virtual device interfaces and defines.
2 *
3 * Copyright (C) 2006 David S. Miller <davem@davemloft.net>
4 */
5
6#ifndef _SPARC64_VDEV_H
7#define _SPARC64_VDEV_H
8
9#include <linux/types.h>
10#include <asm/prom.h>
11
12extern u32 sun4v_vdev_devhandle;
13extern struct device_node *sun4v_vdev_root;
14
15extern unsigned int sun4v_vdev_device_interrupt(struct device_node *dev_node);
16
17#endif /* !(_SPARC64_VDEV_H) */
diff --git a/include/asm-um/kmap_types.h b/include/asm-um/kmap_types.h
index 0b22ad776e7..6c03acdb440 100644
--- a/include/asm-um/kmap_types.h
+++ b/include/asm-um/kmap_types.h
@@ -6,6 +6,24 @@
6#ifndef __UM_KMAP_TYPES_H 6#ifndef __UM_KMAP_TYPES_H
7#define __UM_KMAP_TYPES_H 7#define __UM_KMAP_TYPES_H
8 8
9#include "asm/arch/kmap_types.h" 9/* No more #include "asm/arch/kmap_types.h" ! */
10
11enum km_type {
12 KM_BOUNCE_READ,
13 KM_SKB_SUNRPC_DATA,
14 KM_SKB_DATA_SOFTIRQ,
15 KM_USER0,
16 KM_USER1,
17 KM_UML_USERCOPY, /* UML specific, for copy_*_user - used in do_op_one_page */
18 KM_BIO_SRC_IRQ,
19 KM_BIO_DST_IRQ,
20 KM_PTE0,
21 KM_PTE1,
22 KM_IRQ0,
23 KM_IRQ1,
24 KM_SOFTIRQ0,
25 KM_SOFTIRQ1,
26 KM_TYPE_NR
27};
10 28
11#endif 29#endif
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h
index cb52caa6992..a38df0834bb 100644
--- a/include/asm-v850/signal.h
+++ b/include/asm-v850/signal.h
@@ -77,7 +77,6 @@ typedef unsigned long sigset_t;
77 * SA_FLAGS values: 77 * SA_FLAGS values:
78 * 78 *
79 * SA_ONSTACK indicates that a registered stack_t will be used. 79 * SA_ONSTACK indicates that a registered stack_t will be used.
80 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
81 * SA_RESTART flag to get restarting signals (which were the default long ago) 80 * SA_RESTART flag to get restarting signals (which were the default long ago)
82 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 81 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
83 * SA_RESETHAND clears the handler when the signal is delivered. 82 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -97,7 +96,6 @@ typedef unsigned long sigset_t;
97 96
98#define SA_NOMASK SA_NODEFER 97#define SA_NOMASK SA_NODEFER
99#define SA_ONESHOT SA_RESETHAND 98#define SA_ONESHOT SA_RESETHAND
100#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
101 99
102#define SA_RESTORER 0x04000000 100#define SA_RESTORER 0x04000000
103 101
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h
index 387c8f66af7..aa67bfd1b3c 100644
--- a/include/asm-x86_64/alternative.h
+++ b/include/asm-x86_64/alternative.h
@@ -17,11 +17,20 @@ struct alt_instr {
17extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); 17extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
18 18
19struct module; 19struct module;
20
21#ifdef CONFIG_SMP
20extern void alternatives_smp_module_add(struct module *mod, char *name, 22extern void alternatives_smp_module_add(struct module *mod, char *name,
21 void *locks, void *locks_end, 23 void *locks, void *locks_end,
22 void *text, void *text_end); 24 void *text, void *text_end);
23extern void alternatives_smp_module_del(struct module *mod); 25extern void alternatives_smp_module_del(struct module *mod);
24extern void alternatives_smp_switch(int smp); 26extern void alternatives_smp_switch(int smp);
27#else
28static inline void alternatives_smp_module_add(struct module *mod, char *name,
29 void *locks, void *locks_end,
30 void *text, void *text_end) {}
31static inline void alternatives_smp_module_del(struct module *mod) {}
32static inline void alternatives_smp_switch(int smp) {}
33#endif
25 34
26#endif 35#endif
27 36
diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h
index 006291e89b4..32ff5d13271 100644
--- a/include/asm-x86_64/floppy.h
+++ b/include/asm-x86_64/floppy.h
@@ -144,11 +144,11 @@ static int vdma_get_dma_residue(unsigned int dummy)
144static int fd_request_irq(void) 144static int fd_request_irq(void)
145{ 145{
146 if(can_use_virtual_dma) 146 if(can_use_virtual_dma)
147 return request_irq(FLOPPY_IRQ, floppy_hardint,SA_INTERRUPT, 147 return request_irq(FLOPPY_IRQ, floppy_hardint,
148 "floppy", NULL); 148 IRQF_DISABLED, "floppy", NULL);
149 else 149 else
150 return request_irq(FLOPPY_IRQ, floppy_interrupt, SA_INTERRUPT, 150 return request_irq(FLOPPY_IRQ, floppy_interrupt,
151 "floppy", NULL); 151 IRQF_DISABLED, "floppy", NULL);
152} 152}
153 153
154static unsigned long dma_mem_alloc(unsigned long size) 154static unsigned long dma_mem_alloc(unsigned long size)
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h
index f8d55798535..cef7a7d51b7 100644
--- a/include/asm-x86_64/signal.h
+++ b/include/asm-x86_64/signal.h
@@ -83,7 +83,6 @@ typedef unsigned long sigset_t;
83 * SA_FLAGS values: 83 * SA_FLAGS values:
84 * 84 *
85 * SA_ONSTACK indicates that a registered stack_t will be used. 85 * SA_ONSTACK indicates that a registered stack_t will be used.
86 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
87 * SA_RESTART flag to get restarting signals (which were the default long ago) 86 * SA_RESTART flag to get restarting signals (which were the default long ago)
88 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 87 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
89 * SA_RESETHAND clears the handler when the signal is delivered. 88 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -103,7 +102,6 @@ typedef unsigned long sigset_t;
103 102
104#define SA_NOMASK SA_NODEFER 103#define SA_NOMASK SA_NODEFER
105#define SA_ONESHOT SA_RESETHAND 104#define SA_ONESHOT SA_RESETHAND
106#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
107 105
108#define SA_RESTORER 0x04000000 106#define SA_RESTORER 0x04000000
109 107
diff --git a/include/asm-xtensa/signal.h b/include/asm-xtensa/signal.h
index a99c9aec64e..633ba73bc4d 100644
--- a/include/asm-xtensa/signal.h
+++ b/include/asm-xtensa/signal.h
@@ -75,7 +75,6 @@ typedef struct {
75 * SA_FLAGS values: 75 * SA_FLAGS values:
76 * 76 *
77 * SA_ONSTACK indicates that a registered stack_t will be used. 77 * SA_ONSTACK indicates that a registered stack_t will be used.
78 * SA_INTERRUPT is a no-op, but left due to historical reasons. Use the
79 * SA_RESTART flag to get restarting signals (which were the default long ago) 78 * SA_RESTART flag to get restarting signals (which were the default long ago)
80 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 79 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
81 * SA_RESETHAND clears the handler when the signal is delivered. 80 * SA_RESETHAND clears the handler when the signal is delivered.
@@ -95,7 +94,6 @@ typedef struct {
95 94
96#define SA_NOMASK SA_NODEFER 95#define SA_NOMASK SA_NODEFER
97#define SA_ONESHOT SA_RESETHAND 96#define SA_ONESHOT SA_RESETHAND
98#define SA_INTERRUPT 0x20000000 /* dummy -- ignored */
99 97
100#define SA_RESTORER 0x04000000 98#define SA_RESTORER 0x04000000
101 99
@@ -109,19 +107,6 @@ typedef struct {
109#define SIGSTKSZ 8192 107#define SIGSTKSZ 8192
110 108
111#ifndef __ASSEMBLY__ 109#ifndef __ASSEMBLY__
112#ifdef __KERNEL__
113
114/*
115 * These values of sa_flags are used only by the kernel as part of the
116 * irq handling routines.
117 *
118 * SA_INTERRUPT is also used by the irq handling routines.
119 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
120 */
121#define SA_SAMPLE_RANDOM SA_RESTART
122#define SA_SHIRQ 0x04000000
123#define SA_PROBEIRQ 0x08000000
124#endif
125 110
126#define SIG_BLOCK 0 /* for blocking signals */ 111#define SIG_BLOCK 0 /* for blocking signals */
127#define SIG_UNBLOCK 1 /* for unblocking signals */ 112#define SIG_UNBLOCK 1 /* for unblocking signals */
diff --git a/include/linux/audit.h b/include/linux/audit.h
index e051ff9c5b5..b27d7debc5a 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -122,10 +122,17 @@
122/* Rule structure sizes -- if these change, different AUDIT_ADD and 122/* Rule structure sizes -- if these change, different AUDIT_ADD and
123 * AUDIT_LIST commands must be implemented. */ 123 * AUDIT_LIST commands must be implemented. */
124#define AUDIT_MAX_FIELDS 64 124#define AUDIT_MAX_FIELDS 64
125#define AUDIT_MAX_KEY_LEN 32
125#define AUDIT_BITMASK_SIZE 64 126#define AUDIT_BITMASK_SIZE 64
126#define AUDIT_WORD(nr) ((__u32)((nr)/32)) 127#define AUDIT_WORD(nr) ((__u32)((nr)/32))
127#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32)) 128#define AUDIT_BIT(nr) (1 << ((nr) - AUDIT_WORD(nr)*32))
128 129
130#define AUDIT_SYSCALL_CLASSES 16
131#define AUDIT_CLASS_DIR_WRITE 0
132#define AUDIT_CLASS_DIR_WRITE_32 1
133#define AUDIT_CLASS_CHATTR 2
134#define AUDIT_CLASS_CHATTR_32 3
135
129/* This bitmask is used to validate user input. It represents all bits that 136/* This bitmask is used to validate user input. It represents all bits that
130 * are currently used in an audit field constant understood by the kernel. 137 * are currently used in an audit field constant understood by the kernel.
131 * If you are adding a new #define AUDIT_<whatever>, please ensure that 138 * If you are adding a new #define AUDIT_<whatever>, please ensure that
@@ -150,12 +157,17 @@
150#define AUDIT_PERS 10 157#define AUDIT_PERS 10
151#define AUDIT_ARCH 11 158#define AUDIT_ARCH 11
152#define AUDIT_MSGTYPE 12 159#define AUDIT_MSGTYPE 12
153#define AUDIT_SE_USER 13 /* security label user */ 160#define AUDIT_SUBJ_USER 13 /* security label user */
154#define AUDIT_SE_ROLE 14 /* security label role */ 161#define AUDIT_SUBJ_ROLE 14 /* security label role */
155#define AUDIT_SE_TYPE 15 /* security label type */ 162#define AUDIT_SUBJ_TYPE 15 /* security label type */
156#define AUDIT_SE_SEN 16 /* security label sensitivity label */ 163#define AUDIT_SUBJ_SEN 16 /* security label sensitivity label */
157#define AUDIT_SE_CLR 17 /* security label clearance label */ 164#define AUDIT_SUBJ_CLR 17 /* security label clearance label */
158#define AUDIT_PPID 18 165#define AUDIT_PPID 18
166#define AUDIT_OBJ_USER 19
167#define AUDIT_OBJ_ROLE 20
168#define AUDIT_OBJ_TYPE 21
169#define AUDIT_OBJ_LEV_LOW 22
170#define AUDIT_OBJ_LEV_HIGH 23
159 171
160 /* These are ONLY useful when checking 172 /* These are ONLY useful when checking
161 * at syscall exit time (AUDIT_AT_EXIT). */ 173 * at syscall exit time (AUDIT_AT_EXIT). */
@@ -171,6 +183,8 @@
171#define AUDIT_ARG2 (AUDIT_ARG0+2) 183#define AUDIT_ARG2 (AUDIT_ARG0+2)
172#define AUDIT_ARG3 (AUDIT_ARG0+3) 184#define AUDIT_ARG3 (AUDIT_ARG0+3)
173 185
186#define AUDIT_FILTERKEY 210
187
174#define AUDIT_NEGATE 0x80000000 188#define AUDIT_NEGATE 0x80000000
175 189
176/* These are the supported operators. 190/* These are the supported operators.
@@ -299,6 +313,7 @@ struct mqstat;
299#define AUDITSC_SUCCESS 1 313#define AUDITSC_SUCCESS 1
300#define AUDITSC_FAILURE 2 314#define AUDITSC_FAILURE 2
301#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) 315#define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS )
316extern int __init audit_register_class(int class, unsigned *list);
302#ifdef CONFIG_AUDITSYSCALL 317#ifdef CONFIG_AUDITSYSCALL
303/* These are defined in auditsc.c */ 318/* These are defined in auditsc.c */
304 /* Public API */ 319 /* Public API */
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index a3caf6866ba..44a11f1ccaf 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -87,9 +87,9 @@ int cpu_down(unsigned int cpu);
87#define lock_cpu_hotplug() do { } while (0) 87#define lock_cpu_hotplug() do { } while (0)
88#define unlock_cpu_hotplug() do { } while (0) 88#define unlock_cpu_hotplug() do { } while (0)
89#define lock_cpu_hotplug_interruptible() 0 89#define lock_cpu_hotplug_interruptible() 0
90#define hotcpu_notifier(fn, pri) 90#define hotcpu_notifier(fn, pri) do { } while (0)
91#define register_hotcpu_notifier(nb) 91#define register_hotcpu_notifier(nb) do { } while (0)
92#define unregister_hotcpu_notifier(nb) 92#define unregister_hotcpu_notifier(nb) do { } while (0)
93 93
94/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ 94/* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */
95static inline int cpu_is_offline(int cpu) { return 0; } 95static inline int cpu_is_offline(int cpu) { return 0; }
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index 466fbe9e489..35e137636b0 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -100,8 +100,10 @@ struct cpufreq_policy {
100#define CPUFREQ_INCOMPATIBLE (1) 100#define CPUFREQ_INCOMPATIBLE (1)
101#define CPUFREQ_NOTIFY (2) 101#define CPUFREQ_NOTIFY (2)
102 102
103#define CPUFREQ_SHARED_TYPE_ALL (0) /* All dependent CPUs should set freq */ 103#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
104#define CPUFREQ_SHARED_TYPE_ANY (1) /* Freq can be set from any dependent CPU */ 104#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
105#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
106#define CPUFREQ_SHARED_TYPE_ANY (3) /* Freq can be set from any dependent CPU*/
105 107
106/******************** cpufreq transition notifiers *******************/ 108/******************** cpufreq transition notifiers *******************/
107 109
diff --git a/include/linux/dqblk_xfs.h b/include/linux/dqblk_xfs.h
index 2fda1b2aabd..527504c11c5 100644
--- a/include/linux/dqblk_xfs.h
+++ b/include/linux/dqblk_xfs.h
@@ -125,14 +125,14 @@ typedef struct fs_disk_quota {
125 125
126/* 126/*
127 * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system. 127 * fs_quota_stat is the struct returned in Q_XGETQSTAT for a given file system.
128 * Provides a centralized way to get meta infomation about the quota subsystem. 128 * Provides a centralized way to get meta information about the quota subsystem.
129 * eg. space taken up for user and group quotas, number of dquots currently 129 * eg. space taken up for user and group quotas, number of dquots currently
130 * incore. 130 * incore.
131 */ 131 */
132#define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */ 132#define FS_QSTAT_VERSION 1 /* fs_quota_stat.qs_version */
133 133
134/* 134/*
135 * Some basic infomation about 'quota files'. 135 * Some basic information about 'quota files'.
136 */ 136 */
137typedef struct fs_qfilestat { 137typedef struct fs_qfilestat {
138 __u64 qfs_ino; /* inode number */ 138 __u64 qfs_ino; /* inode number */
diff --git a/include/linux/err.h b/include/linux/err.h
index ff71d2af5da..cd3b367f744 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -13,7 +13,9 @@
13 * This should be a per-architecture thing, to allow different 13 * This should be a per-architecture thing, to allow different
14 * error and pointer decisions. 14 * error and pointer decisions.
15 */ 15 */
16#define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) 16#define MAX_ERRNO 4095
17
18#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
17 19
18static inline void *ERR_PTR(long error) 20static inline void *ERR_PTR(long error)
19{ 21{
diff --git a/include/linux/fb.h b/include/linux/fb.h
index b45928f5c63..ffefeeeeca9 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -557,7 +557,7 @@ struct fb_pixmap {
557 * Frame buffer operations 557 * Frame buffer operations
558 * 558 *
559 * LOCKING NOTE: those functions must _ALL_ be called with the console 559 * LOCKING NOTE: those functions must _ALL_ be called with the console
560 * semaphore held, this is the only suitable locking mecanism we have 560 * semaphore held, this is the only suitable locking mechanism we have
561 * in 2.6. Some may be called at interrupt time at this point though. 561 * in 2.6. Some may be called at interrupt time at this point though.
562 */ 562 */
563 563
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index db2a63a1163..da3e0dbe61d 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -14,6 +14,55 @@
14#include <asm/ptrace.h> 14#include <asm/ptrace.h>
15#include <asm/system.h> 15#include <asm/system.h>
16 16
17/*
18 * These correspond to the IORESOURCE_IRQ_* defines in
19 * linux/ioport.h to select the interrupt line behaviour. When
20 * requesting an interrupt without specifying a IRQF_TRIGGER, the
21 * setting should be assumed to be "as already configured", which
22 * may be as per machine or firmware initialisation.
23 */
24#define IRQF_TRIGGER_NONE 0x00000000
25#define IRQF_TRIGGER_RISING 0x00000001
26#define IRQF_TRIGGER_FALLING 0x00000002
27#define IRQF_TRIGGER_HIGH 0x00000004
28#define IRQF_TRIGGER_LOW 0x00000008
29#define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \
30 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)
31#define IRQF_TRIGGER_PROBE 0x00000010
32
33/*
34 * These flags used only by the kernel as part of the
35 * irq handling routines.
36 *
37 * IRQF_DISABLED - keep irqs disabled when calling the action handler
38 * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator
39 * IRQF_SHARED - allow sharing the irq among several devices
40 * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
41 * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
42 */
43#define IRQF_DISABLED 0x00000020
44#define IRQF_SAMPLE_RANDOM 0x00000040
45#define IRQF_SHARED 0x00000080
46#define IRQF_PROBE_SHARED 0x00000100
47#define IRQF_TIMER 0x00000200
48#define IRQF_PERCPU 0x00000400
49
50/*
51 * Migration helpers. Scheduled for removal in 1/2007
52 * Do not use for new code !
53 */
54#define SA_INTERRUPT IRQF_DISABLED
55#define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM
56#define SA_SHIRQ IRQF_SHARED
57#define SA_PROBEIRQ IRQF_PROBE_SHARED
58#define SA_PERCPU IRQF_PERCPU
59
60#define SA_TRIGGER_LOW IRQF_TRIGGER_LOW
61#define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH
62#define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING
63#define SA_TRIGGER_RISING IRQF_TRIGGER_RISING
64#define SA_TRIGGER_MASK IRQF_TRIGGER_MASK
65
17struct irqaction { 66struct irqaction {
18 irqreturn_t (*handler)(int, void *, struct pt_regs *); 67 irqreturn_t (*handler)(int, void *, struct pt_regs *);
19 unsigned long flags; 68 unsigned long flags;
diff --git a/include/linux/irq.h b/include/linux/irq.h
index 0832149cdb1..b48eae32dc6 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -24,41 +24,40 @@
24 24
25/* 25/*
26 * IRQ line status. 26 * IRQ line status.
27 *
28 * Bits 0-16 are reserved for the IRQF_* bits in linux/interrupt.h
29 *
30 * IRQ types
27 */ 31 */
28#define IRQ_INPROGRESS 1 /* IRQ handler active - do not enter! */ 32#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */
29#define IRQ_DISABLED 2 /* IRQ disabled - do not enter! */ 33#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */
30#define IRQ_PENDING 4 /* IRQ pending - replay on enable */ 34#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */
31#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */ 35#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
32#define IRQ_AUTODETECT 16 /* IRQ is being autodetected */ 36#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */
33#define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ 37#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */
34#define IRQ_LEVEL 64 /* IRQ level triggered */ 38#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */
35#define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ 39#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */
40
41/* Internal flags */
42#define IRQ_INPROGRESS 0x00010000 /* IRQ handler active - do not enter! */
43#define IRQ_DISABLED 0x00020000 /* IRQ disabled - do not enter! */
44#define IRQ_PENDING 0x00040000 /* IRQ pending - replay on enable */
45#define IRQ_REPLAY 0x00080000 /* IRQ has been replayed but not acked yet */
46#define IRQ_AUTODETECT 0x00100000 /* IRQ is being autodetected */
47#define IRQ_WAITING 0x00200000 /* IRQ not yet seen - for autodetection */
48#define IRQ_LEVEL 0x00400000 /* IRQ level triggered */
49#define IRQ_MASKED 0x00800000 /* IRQ masked - shouldn't be seen again */
36#ifdef CONFIG_IRQ_PER_CPU 50#ifdef CONFIG_IRQ_PER_CPU
37# define IRQ_PER_CPU 256 /* IRQ is per CPU */ 51# define IRQ_PER_CPU 0x01000000 /* IRQ is per CPU */
38# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) 52# define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU)
39#else 53#else
40# define CHECK_IRQ_PER_CPU(var) 0 54# define CHECK_IRQ_PER_CPU(var) 0
41#endif 55#endif
42 56
43#define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ 57#define IRQ_NOPROBE 0x02000000 /* IRQ is not valid for probing */
44#define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ 58#define IRQ_NOREQUEST 0x04000000 /* IRQ cannot be requested */
45#define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */ 59#define IRQ_NOAUTOEN 0x08000000 /* IRQ will not be enabled on request irq */
46#define IRQ_DELAYED_DISABLE \ 60#define IRQ_DELAYED_DISABLE 0x10000000 /* IRQ disable (masking) happens delayed. */
47 4096 /* IRQ disable (masking) happens delayed. */
48
49/*
50 * IRQ types, see also include/linux/interrupt.h
51 */
52#define IRQ_TYPE_NONE 0x0000 /* Default, unspecified type */
53#define IRQ_TYPE_EDGE_RISING 0x0001 /* Edge rising type */
54#define IRQ_TYPE_EDGE_FALLING 0x0002 /* Edge falling type */
55#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)
56#define IRQ_TYPE_LEVEL_HIGH 0x0004 /* Level high type */
57#define IRQ_TYPE_LEVEL_LOW 0x0008 /* Level low type */
58#define IRQ_TYPE_SENSE_MASK 0x000f /* Mask of the above */
59#define IRQ_TYPE_SIMPLE 0x0010 /* Simple type */
60#define IRQ_TYPE_PERCPU 0x0020 /* Per CPU type */
61#define IRQ_TYPE_PROBE 0x0040 /* Probing in progress */
62 61
63struct proc_dir_entry; 62struct proc_dir_entry;
64 63
@@ -183,6 +182,10 @@ extern int setup_irq(unsigned int irq, struct irqaction *new);
183 182
184#ifdef CONFIG_GENERIC_HARDIRQS 183#ifdef CONFIG_GENERIC_HARDIRQS
185 184
185#ifndef handle_dynamic_tick
186# define handle_dynamic_tick(a) do { } while (0)
187#endif
188
186#ifdef CONFIG_SMP 189#ifdef CONFIG_SMP
187static inline void set_native_irq_info(int irq, cpumask_t mask) 190static inline void set_native_irq_info(int irq, cpumask_t mask)
188{ 191{
@@ -348,8 +351,9 @@ extern int noirqdebug_setup(char *str);
348/* Checks whether the interrupt can be requested by request_irq(): */ 351/* Checks whether the interrupt can be requested by request_irq(): */
349extern int can_request_irq(unsigned int irq, unsigned long irqflags); 352extern int can_request_irq(unsigned int irq, unsigned long irqflags);
350 353
351/* Dummy irq-chip implementation: */ 354/* Dummy irq-chip implementations: */
352extern struct irq_chip no_irq_chip; 355extern struct irq_chip no_irq_chip;
356extern struct irq_chip dummy_irq_chip;
353 357
354extern void 358extern void
355set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, 359set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 2d229327959..0503b2ed8ba 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -46,6 +46,8 @@ enum kobject_action {
46 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */ 46 KOBJ_UMOUNT = (__force kobject_action_t) 0x05, /* umount event for block devices (broken) */
47 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */ 47 KOBJ_OFFLINE = (__force kobject_action_t) 0x06, /* device offline */
48 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */ 48 KOBJ_ONLINE = (__force kobject_action_t) 0x07, /* device online */
49 KOBJ_UNDOCK = (__force kobject_action_t) 0x08, /* undocking */
50 KOBJ_DOCK = (__force kobject_action_t) 0x09, /* dock */
49}; 51};
50 52
51struct kobject { 53struct kobject {
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index aa2d3c12c4d..85f99f60dee 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -313,10 +313,12 @@ struct net_device
313 313
314 /* Segmentation offload features */ 314 /* Segmentation offload features */
315#define NETIF_F_GSO_SHIFT 16 315#define NETIF_F_GSO_SHIFT 16
316#define NETIF_F_GSO_MASK 0xffff0000
316#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT) 317#define NETIF_F_TSO (SKB_GSO_TCPV4 << NETIF_F_GSO_SHIFT)
317#define NETIF_F_UFO (SKB_GSO_UDPV4 << NETIF_F_GSO_SHIFT) 318#define NETIF_F_UFO (SKB_GSO_UDP << NETIF_F_GSO_SHIFT)
318#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT) 319#define NETIF_F_GSO_ROBUST (SKB_GSO_DODGY << NETIF_F_GSO_SHIFT)
319#define NETIF_F_TSO_ECN (SKB_GSO_TCPV4_ECN << NETIF_F_GSO_SHIFT) 320#define NETIF_F_TSO_ECN (SKB_GSO_TCP_ECN << NETIF_F_GSO_SHIFT)
321#define NETIF_F_TSO6 (SKB_GSO_TCPV6 << NETIF_F_GSO_SHIFT)
320 322
321#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM) 323#define NETIF_F_GEN_CSUM (NETIF_F_NO_CSUM | NETIF_F_HW_CSUM)
322#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM) 324#define NETIF_F_ALL_CSUM (NETIF_F_IP_CSUM | NETIF_F_GEN_CSUM)
@@ -991,13 +993,18 @@ extern void dev_seq_stop(struct seq_file *seq, void *v);
991 993
992extern void linkwatch_run_queue(void); 994extern void linkwatch_run_queue(void);
993 995
994static inline int skb_gso_ok(struct sk_buff *skb, int features) 996static inline int net_gso_ok(int features, int gso_type)
995{ 997{
996 int feature = skb_shinfo(skb)->gso_size ? 998 int feature = gso_type << NETIF_F_GSO_SHIFT;
997 skb_shinfo(skb)->gso_type << NETIF_F_GSO_SHIFT : 0;
998 return (features & feature) == feature; 999 return (features & feature) == feature;
999} 1000}
1000 1001
1002static inline int skb_gso_ok(struct sk_buff *skb, int features)
1003{
1004 return net_gso_ok(features, skb_shinfo(skb)->gso_size ?
1005 skb_shinfo(skb)->gso_type : 0);
1006}
1007
1001static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb) 1008static inline int netif_needs_gso(struct net_device *dev, struct sk_buff *skb)
1002{ 1009{
1003 return !skb_gso_ok(skb, dev->features); 1010 return !skb_gso_ok(skb, dev->features);
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index d90b1bb3756..55ea853d57b 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -9,7 +9,6 @@
9#ifndef _LINUX_NFS_FS_H 9#ifndef _LINUX_NFS_FS_H
10#define _LINUX_NFS_FS_H 10#define _LINUX_NFS_FS_H
11 11
12#include <linux/config.h>
13#include <linux/in.h> 12#include <linux/in.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
15#include <linux/pagemap.h> 14#include <linux/pagemap.h>
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 9ae6b1a7536..685081c0134 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -728,7 +728,9 @@
728#define PCI_DEVICE_ID_TI_TVP4020 0x3d07 728#define PCI_DEVICE_ID_TI_TVP4020 0x3d07
729#define PCI_DEVICE_ID_TI_4450 0x8011 729#define PCI_DEVICE_ID_TI_4450 0x8011
730#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 730#define PCI_DEVICE_ID_TI_XX21_XX11 0x8031
731#define PCI_DEVICE_ID_TI_XX21_XX11_SD 0x8034
731#define PCI_DEVICE_ID_TI_X515 0x8036 732#define PCI_DEVICE_ID_TI_X515 0x8036
733#define PCI_DEVICE_ID_TI_XX12 0x8039
732#define PCI_DEVICE_ID_TI_1130 0xac12 734#define PCI_DEVICE_ID_TI_1130 0xac12
733#define PCI_DEVICE_ID_TI_1031 0xac13 735#define PCI_DEVICE_ID_TI_1031 0xac13
734#define PCI_DEVICE_ID_TI_1131 0xac15 736#define PCI_DEVICE_ID_TI_1131 0xac15
@@ -1441,6 +1443,7 @@
1441#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475 1443#define PCI_DEVICE_ID_RICOH_RL5C475 0x0475
1442#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476 1444#define PCI_DEVICE_ID_RICOH_RL5C476 0x0476
1443#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478 1445#define PCI_DEVICE_ID_RICOH_RL5C478 0x0478
1446#define PCI_DEVICE_ID_RICOH_R5C822 0x0822
1444 1447
1445#define PCI_VENDOR_ID_DLINK 0x1186 1448#define PCI_VENDOR_ID_DLINK 0x1186
1446#define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00 1449#define PCI_DEVICE_ID_DLINK_DGE510T 0x4c00
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 1e4ce7225ee..117135e33d6 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -9,32 +9,6 @@
9#include <linux/spinlock.h> 9#include <linux/spinlock.h>
10 10
11/* 11/*
12 * These values of sa_flags are used only by the kernel as part of the
13 * irq handling routines.
14 *
15 * SA_INTERRUPT is also used by the irq handling routines.
16 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
17 * SA_PROBEIRQ is set by callers when they expect sharing mismatches to occur
18 */
19#define SA_SAMPLE_RANDOM SA_RESTART
20#define SA_SHIRQ 0x04000000
21#define SA_PROBEIRQ 0x08000000
22
23/*
24 * As above, these correspond to the IORESOURCE_IRQ_* defines in
25 * linux/ioport.h to select the interrupt line behaviour. When
26 * requesting an interrupt without specifying a SA_TRIGGER, the
27 * setting should be assumed to be "as already configured", which
28 * may be as per machine or firmware initialisation.
29 */
30#define SA_TRIGGER_LOW 0x00000008
31#define SA_TRIGGER_HIGH 0x00000004
32#define SA_TRIGGER_FALLING 0x00000002
33#define SA_TRIGGER_RISING 0x00000001
34#define SA_TRIGGER_MASK (SA_TRIGGER_HIGH|SA_TRIGGER_LOW|\
35 SA_TRIGGER_RISING|SA_TRIGGER_FALLING)
36
37/*
38 * Real Time signals may be queued. 12 * Real Time signals may be queued.
39 */ 13 */
40 14
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 59918be91d0..57d7d4965f9 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -171,13 +171,15 @@ enum {
171 171
172enum { 172enum {
173 SKB_GSO_TCPV4 = 1 << 0, 173 SKB_GSO_TCPV4 = 1 << 0,
174 SKB_GSO_UDPV4 = 1 << 1, 174 SKB_GSO_UDP = 1 << 1,
175 175
176 /* This indicates the skb is from an untrusted source. */ 176 /* This indicates the skb is from an untrusted source. */
177 SKB_GSO_DODGY = 1 << 2, 177 SKB_GSO_DODGY = 1 << 2,
178 178
179 /* This indicates the tcp segment has CWR set. */ 179 /* This indicates the tcp segment has CWR set. */
180 SKB_GSO_TCPV4_ECN = 1 << 3, 180 SKB_GSO_TCP_ECN = 1 << 3,
181
182 SKB_GSO_TCPV6 = 1 << 4,
181}; 183};
182 184
183/** 185/**
diff --git a/include/linux/udp.h b/include/linux/udp.h
index bdd39be0940..90223f057d5 100644
--- a/include/linux/udp.h
+++ b/include/linux/udp.h
@@ -46,7 +46,7 @@ struct udp_sock {
46 unsigned int corkflag; /* Cork is required */ 46 unsigned int corkflag; /* Cork is required */
47 __u16 encap_type; /* Is this an Encapsulation socket? */ 47 __u16 encap_type; /* Is this an Encapsulation socket? */
48 /* 48 /*
49 * Following member retains the infomation to create a UDP header 49 * Following member retains the information to create a UDP header
50 * when the socket is uncorked. 50 * when the socket is uncorked.
51 */ 51 */
52 __u16 len; /* total length of pending frames */ 52 __u16 len; /* total length of pending frames */
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index e39b7cc4339..fc62887c520 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -993,7 +993,7 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __
993extern struct inode_operations ufs_fast_symlink_inode_operations; 993extern struct inode_operations ufs_fast_symlink_inode_operations;
994 994
995/* truncate.c */ 995/* truncate.c */
996extern void ufs_truncate (struct inode *); 996extern int ufs_truncate (struct inode *, loff_t);
997 997
998static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) 998static inline struct ufs_sb_info *UFS_SB(struct super_block *sb)
999{ 999{
diff --git a/include/media/tuner-types.h b/include/media/tuner-types.h
index ad9c171bfa0..3c43b95f4c0 100644
--- a/include/media/tuner-types.h
+++ b/include/media/tuner-types.h
@@ -20,6 +20,7 @@ struct tuner_range {
20 20
21struct tuner_params { 21struct tuner_params {
22 enum param_type type; 22 enum param_type type;
23
23 /* Many Philips based tuners have a comment like this in their 24 /* Many Philips based tuners have a comment like this in their
24 * datasheet: 25 * datasheet:
25 * 26 *
@@ -39,6 +40,60 @@ struct tuner_params {
39 * static unless the control byte was sent first. 40 * static unless the control byte was sent first.
40 */ 41 */
41 unsigned int cb_first_if_lower_freq:1; 42 unsigned int cb_first_if_lower_freq:1;
43 /* Set to 1 if this tuner uses a tda9887 */
44 unsigned int has_tda9887:1;
45 /* Many Philips tuners use tda9887 PORT1 to select the FM radio
46 sensitivity. If this setting is 1, then set PORT1 to 1 to
47 get proper FM reception. */
48 unsigned int port1_fm_high_sensitivity:1;
49 /* Some Philips tuners use tda9887 PORT2 to select the FM radio
50 sensitivity. If this setting is 1, then set PORT2 to 1 to
51 get proper FM reception. */
52 unsigned int port2_fm_high_sensitivity:1;
53 /* Most tuners with a tda9887 use QSS mode. Some (cheaper) tuners
54 use Intercarrier mode. If this setting is 1, then the tuner
55 needs to be set to intercarrier mode. */
56 unsigned int intercarrier_mode:1;
57 /* This setting sets the default value for PORT1.
58 0 means inactive, 1 means active. Note: the actual bit
59 value written to the tda9887 is inverted. So a 0 here
60 means a 1 in the B6 bit. */
61 unsigned int port1_active:1;
62 /* This setting sets the default value for PORT2.
63 0 means inactive, 1 means active. Note: the actual bit
64 value written to the tda9887 is inverted. So a 0 here
65 means a 1 in the B7 bit. */
66 unsigned int port2_active:1;
67 /* Sometimes PORT1 is inverted when the SECAM-L' standard is selected.
68 Set this bit to 1 if this is needed. */
69 unsigned int port1_invert_for_secam_lc:1;
70 /* Sometimes PORT2 is inverted when the SECAM-L' standard is selected.
71 Set this bit to 1 if this is needed. */
72 unsigned int port2_invert_for_secam_lc:1;
73 /* Some cards require PORT1 to be 1 for mono Radio FM and 0 for stereo. */
74 unsigned int port1_set_for_fm_mono:1;
75 /* Default tda9887 TOP value in dB for the low band. Default is 0.
76 Range: -16:+15 */
77 signed int default_top_low:5;
78 /* Default tda9887 TOP value in dB for the mid band. Default is 0.
79 Range: -16:+15 */
80 signed int default_top_mid:5;
81 /* Default tda9887 TOP value in dB for the high band. Default is 0.
82 Range: -16:+15 */
83 signed int default_top_high:5;
84 /* Default tda9887 TOP value in dB for SECAM-L/L' for the low band.
85 Default is 0. Several tuners require a different TOP value for
86 the SECAM-L/L' standards. Range: -16:+15 */
87 signed int default_top_secam_low:5;
88 /* Default tda9887 TOP value in dB for SECAM-L/L' for the mid band.
89 Default is 0. Several tuners require a different TOP value for
90 the SECAM-L/L' standards. Range: -16:+15 */
91 signed int default_top_secam_mid:5;
92 /* Default tda9887 TOP value in dB for SECAM-L/L' for the high band.
93 Default is 0. Several tuners require a different TOP value for
94 the SECAM-L/L' standards. Range: -16:+15 */
95 signed int default_top_secam_high:5;
96
42 97
43 unsigned int count; 98 unsigned int count;
44 struct tuner_range *ranges; 99 struct tuner_range *ranges;
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h
index a398ae5e30f..ab29dafb1a6 100644
--- a/include/net/ip6_route.h
+++ b/include/net/ip6_route.h
@@ -146,7 +146,7 @@ static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst,
146 struct rt6_info *rt = (struct rt6_info *) dst; 146 struct rt6_info *rt = (struct rt6_info *) dst;
147 147
148 write_lock(&sk->sk_dst_lock); 148 write_lock(&sk->sk_dst_lock);
149 __sk_dst_set(sk, dst); 149 sk_setup_caps(sk, dst);
150 np->daddr_cache = daddr; 150 np->daddr_cache = daddr;
151 np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; 151 np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0;
152 write_unlock(&sk->sk_dst_lock); 152 write_unlock(&sk->sk_dst_lock);
diff --git a/include/net/irda/irda_device.h b/include/net/irda/irda_device.h
index 0575c59a5c9..bca19ca7bdd 100644
--- a/include/net/irda/irda_device.h
+++ b/include/net/irda/irda_device.h
@@ -160,7 +160,7 @@ typedef struct {
160 int irq, irq2; /* Interrupts used */ 160 int irq, irq2; /* Interrupts used */
161 int dma, dma2; /* DMA channel(s) used */ 161 int dma, dma2; /* DMA channel(s) used */
162 int fifo_size; /* FIFO size */ 162 int fifo_size; /* FIFO size */
163 int irqflags; /* interrupt flags (ie, SA_SHIRQ|SA_INTERRUPT) */ 163 int irqflags; /* interrupt flags (ie, IRQF_SHARED|IRQF_DISABLED) */
164 int direction; /* Link direction, used by some FIR drivers */ 164 int direction; /* Link direction, used by some FIR drivers */
165 int enabled; /* Powered on? */ 165 int enabled; /* Powered on? */
166 int suspended; /* Suspended by APM */ 166 int suspended; /* Suspended by APM */
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 40b6b9c9973..a225d6371cb 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -50,11 +50,17 @@ struct inet6_protocol
50 struct inet6_skb_parm *opt, 50 struct inet6_skb_parm *opt,
51 int type, int code, int offset, 51 int type, int code, int offset,
52 __u32 info); 52 __u32 info);
53
54 struct sk_buff *(*gso_segment)(struct sk_buff *skb,
55 int features);
56
53 unsigned int flags; /* INET6_PROTO_xxx */ 57 unsigned int flags; /* INET6_PROTO_xxx */
54}; 58};
55 59
56#define INET6_PROTO_NOPOLICY 0x1 60#define INET6_PROTO_NOPOLICY 0x1
57#define INET6_PROTO_FINAL 0x2 61#define INET6_PROTO_FINAL 0x2
62/* This should be set for any extension header which is compatible with GSO. */
63#define INET6_PROTO_GSO_EXTHDR 0x4
58#endif 64#endif
59 65
60/* This is used to register socket interfaces for IP protocols. */ 66/* This is used to register socket interfaces for IP protocols. */
diff --git a/include/net/sock.h b/include/net/sock.h
index 7136bae48c2..7b3d6b85694 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -140,6 +140,7 @@ struct sock_common {
140 * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings 140 * @sk_flags: %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings
141 * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets 141 * @sk_no_check: %SO_NO_CHECK setting, wether or not checkup packets
142 * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO) 142 * @sk_route_caps: route capabilities (e.g. %NETIF_F_TSO)
143 * @sk_gso_type: GSO type (e.g. %SKB_GSO_TCPV4)
143 * @sk_lingertime: %SO_LINGER l_linger setting 144 * @sk_lingertime: %SO_LINGER l_linger setting
144 * @sk_backlog: always used with the per-socket spinlock held 145 * @sk_backlog: always used with the per-socket spinlock held
145 * @sk_callback_lock: used with the callbacks in the end of this struct 146 * @sk_callback_lock: used with the callbacks in the end of this struct
@@ -211,6 +212,7 @@ struct sock {
211 gfp_t sk_allocation; 212 gfp_t sk_allocation;
212 int sk_sndbuf; 213 int sk_sndbuf;
213 int sk_route_caps; 214 int sk_route_caps;
215 int sk_gso_type;
214 int sk_rcvlowat; 216 int sk_rcvlowat;
215 unsigned long sk_flags; 217 unsigned long sk_flags;
216 unsigned long sk_lingertime; 218 unsigned long sk_lingertime;
@@ -1025,15 +1027,20 @@ extern struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie);
1025 1027
1026extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie); 1028extern struct dst_entry *sk_dst_check(struct sock *sk, u32 cookie);
1027 1029
1030static inline int sk_can_gso(const struct sock *sk)
1031{
1032 return net_gso_ok(sk->sk_route_caps, sk->sk_gso_type);
1033}
1034
1028static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst) 1035static inline void sk_setup_caps(struct sock *sk, struct dst_entry *dst)
1029{ 1036{
1030 __sk_dst_set(sk, dst); 1037 __sk_dst_set(sk, dst);
1031 sk->sk_route_caps = dst->dev->features; 1038 sk->sk_route_caps = dst->dev->features;
1032 if (sk->sk_route_caps & NETIF_F_GSO) 1039 if (sk->sk_route_caps & NETIF_F_GSO)
1033 sk->sk_route_caps |= NETIF_F_TSO; 1040 sk->sk_route_caps |= NETIF_F_GSO_MASK;
1034 if (sk->sk_route_caps & NETIF_F_TSO) { 1041 if (sk_can_gso(sk)) {
1035 if (dst->header_len) 1042 if (dst->header_len)
1036 sk->sk_route_caps &= ~NETIF_F_TSO; 1043 sk->sk_route_caps &= ~NETIF_F_GSO_MASK;
1037 else 1044 else
1038 sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM; 1045 sk->sk_route_caps |= NETIF_F_SG | NETIF_F_HW_CSUM;
1039 } 1046 }
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 624921e7633..3cd803b0d7a 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -751,7 +751,7 @@ static inline int tcp_is_cwnd_limited(const struct sock *sk, u32 in_flight)
751 if (in_flight >= tp->snd_cwnd) 751 if (in_flight >= tp->snd_cwnd)
752 return 1; 752 return 1;
753 753
754 if (!(sk->sk_route_caps & NETIF_F_TSO)) 754 if (!sk_can_gso(sk))
755 return 0; 755 return 0;
756 756
757 left = tp->snd_cwnd - in_flight; 757 left = tp->snd_cwnd - in_flight;
diff --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h
index 7bb366f7093..4629d77173f 100644
--- a/include/net/tcp_ecn.h
+++ b/include/net/tcp_ecn.h
@@ -55,9 +55,7 @@ static inline void TCP_ECN_send(struct sock *sk, struct tcp_sock *tp,
55 if (tp->ecn_flags&TCP_ECN_QUEUE_CWR) { 55 if (tp->ecn_flags&TCP_ECN_QUEUE_CWR) {
56 tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR; 56 tp->ecn_flags &= ~TCP_ECN_QUEUE_CWR;
57 skb->h.th->cwr = 1; 57 skb->h.th->cwr = 1;
58 if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4) 58 skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
59 skb_shinfo(skb)->gso_type |=
60 SKB_GSO_TCPV4_ECN;
61 } 59 }
62 } else { 60 } else {
63 /* ACK or retransmitted segment: clear ECT|CE */ 61 /* ACK or retransmitted segment: clear ECT|CE */
diff --git a/include/sound/initval.h b/include/sound/initval.h
index d45170b9e0b..2ae76efc696 100644
--- a/include/sound/initval.h
+++ b/include/sound/initval.h
@@ -62,7 +62,7 @@ static int snd_legacy_find_free_irq(int *irq_table)
62{ 62{
63 while (*irq_table != -1) { 63 while (*irq_table != -1) {
64 if (!request_irq(*irq_table, snd_legacy_empty_irq_handler, 64 if (!request_irq(*irq_table, snd_legacy_empty_irq_handler,
65 SA_INTERRUPT | SA_PROBEIRQ, "ALSA Test IRQ", 65 IRQF_DISABLED | IRQF_PROBE_SHARED, "ALSA Test IRQ",
66 (void *) irq_table)) { 66 (void *) irq_table)) {
67 free_irq(*irq_table, (void *) irq_table); 67 free_irq(*irq_table, (void *) irq_table);
68 return *irq_table; 68 return *irq_table;
diff --git a/init/main.c b/init/main.c
index ae04eb78a93..b2f3b566790 100644
--- a/init/main.c
+++ b/init/main.c
@@ -11,7 +11,6 @@
11 11
12#define __KERNEL_SYSCALLS__ 12#define __KERNEL_SYSCALLS__
13 13
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/proc_fs.h> 16#include <linux/proc_fs.h>
diff --git a/ipc/compat.c b/ipc/compat.c
index a544dfbb082..4d20cfd38f0 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23#include <linux/compat.h> 23#include <linux/compat.h>
24#include <linux/config.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
26#include <linux/highuid.h> 25#include <linux/highuid.h>
27#include <linux/init.h> 26#include <linux/init.h>
diff --git a/ipc/msg.c b/ipc/msg.c
index 00f015a092d..cd92d342953 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21#include <linux/capability.h> 21#include <linux/capability.h>
22#include <linux/config.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include <linux/msg.h> 23#include <linux/msg.h>
25#include <linux/spinlock.h> 24#include <linux/spinlock.h>
diff --git a/ipc/sem.c b/ipc/sem.c
index fce0bc8b5ad..6013c751156 100644
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -66,7 +66,6 @@
66 * Dustin Kirkland <dustin.kirkland@us.ibm.com> 66 * Dustin Kirkland <dustin.kirkland@us.ibm.com>
67 */ 67 */
68 68
69#include <linux/config.h>
70#include <linux/slab.h> 69#include <linux/slab.h>
71#include <linux/spinlock.h> 70#include <linux/spinlock.h>
72#include <linux/init.h> 71#include <linux/init.h>
diff --git a/ipc/shm.c b/ipc/shm.c
index fe7ae73b698..940b0c9b13a 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -17,7 +17,6 @@
17 * Dustin Kirkland <dustin.kirkland@us.ibm.com> 17 * Dustin Kirkland <dustin.kirkland@us.ibm.com>
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/slab.h> 20#include <linux/slab.h>
22#include <linux/mm.h> 21#include <linux/mm.h>
23#include <linux/hugetlb.h> 22#include <linux/hugetlb.h>
diff --git a/ipc/util.c b/ipc/util.c
index 8193299f45f..67b6d178db6 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -14,7 +14,6 @@
14 * Dustin Kirkland <dustin.kirkland@us.ibm.com> 14 * Dustin Kirkland <dustin.kirkland@us.ibm.com>
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
19#include <linux/shm.h> 18#include <linux/shm.h>
20#include <linux/init.h> 19#include <linux/init.h>
diff --git a/kernel/acct.c b/kernel/acct.c
index 126ca43d5d2..f18e0b8df3e 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -43,7 +43,6 @@
43 * a struct file opened for write. Fixed. 2/6/2000, AV. 43 * a struct file opened for write. Fixed. 2/6/2000, AV.
44 */ 44 */
45 45
46#include <linux/config.h>
47#include <linux/mm.h> 46#include <linux/mm.h>
48#include <linux/slab.h> 47#include <linux/slab.h>
49#include <linux/acct.h> 48#include <linux/acct.h>
diff --git a/kernel/audit.h b/kernel/audit.h
index 8323e4132a3..6aa33b848cf 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -81,6 +81,7 @@ struct audit_krule {
81 u32 mask[AUDIT_BITMASK_SIZE]; 81 u32 mask[AUDIT_BITMASK_SIZE];
82 u32 buflen; /* for data alloc on list rules */ 82 u32 buflen; /* for data alloc on list rules */
83 u32 field_count; 83 u32 field_count;
84 char *filterkey; /* ties events to rules */
84 struct audit_field *fields; 85 struct audit_field *fields;
85 struct audit_field *inode_f; /* quick access to an inode field */ 86 struct audit_field *inode_f; /* quick access to an inode field */
86 struct audit_watch *watch; /* associated watch */ 87 struct audit_watch *watch; /* associated watch */
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 4c99d2c586e..5b4e16276ca 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -141,6 +141,7 @@ static inline void audit_free_rule(struct audit_entry *e)
141 selinux_audit_rule_free(f->se_rule); 141 selinux_audit_rule_free(f->se_rule);
142 } 142 }
143 kfree(e->rule.fields); 143 kfree(e->rule.fields);
144 kfree(e->rule.filterkey);
144 kfree(e); 145 kfree(e);
145} 146}
146 147
@@ -278,6 +279,29 @@ static int audit_to_watch(struct audit_krule *krule, char *path, int len,
278 return 0; 279 return 0;
279} 280}
280 281
282static __u32 *classes[AUDIT_SYSCALL_CLASSES];
283
284int __init audit_register_class(int class, unsigned *list)
285{
286 __u32 *p = kzalloc(AUDIT_BITMASK_SIZE * sizeof(__u32), GFP_KERNEL);
287 if (!p)
288 return -ENOMEM;
289 while (*list != ~0U) {
290 unsigned n = *list++;
291 if (n >= AUDIT_BITMASK_SIZE * 32 - AUDIT_SYSCALL_CLASSES) {
292 kfree(p);
293 return -EINVAL;
294 }
295 p[AUDIT_WORD(n)] |= AUDIT_BIT(n);
296 }
297 if (class >= AUDIT_SYSCALL_CLASSES || classes[class]) {
298 kfree(p);
299 return -EINVAL;
300 }
301 classes[class] = p;
302 return 0;
303}
304
281/* Common user-space to kernel rule translation. */ 305/* Common user-space to kernel rule translation. */
282static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule) 306static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
283{ 307{
@@ -321,6 +345,22 @@ static inline struct audit_entry *audit_to_entry_common(struct audit_rule *rule)
321 for (i = 0; i < AUDIT_BITMASK_SIZE; i++) 345 for (i = 0; i < AUDIT_BITMASK_SIZE; i++)
322 entry->rule.mask[i] = rule->mask[i]; 346 entry->rule.mask[i] = rule->mask[i];
323 347
348 for (i = 0; i < AUDIT_SYSCALL_CLASSES; i++) {
349 int bit = AUDIT_BITMASK_SIZE * 32 - i - 1;
350 __u32 *p = &entry->rule.mask[AUDIT_WORD(bit)];
351 __u32 *class;
352
353 if (!(*p & AUDIT_BIT(bit)))
354 continue;
355 *p &= ~AUDIT_BIT(bit);
356 class = classes[i];
357 if (class) {
358 int j;
359 for (j = 0; j < AUDIT_BITMASK_SIZE; j++)
360 entry->rule.mask[j] |= class[j];
361 }
362 }
363
324 return entry; 364 return entry;
325 365
326exit_err: 366exit_err:
@@ -469,11 +509,16 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
469 case AUDIT_ARG2: 509 case AUDIT_ARG2:
470 case AUDIT_ARG3: 510 case AUDIT_ARG3:
471 break; 511 break;
472 case AUDIT_SE_USER: 512 case AUDIT_SUBJ_USER:
473 case AUDIT_SE_ROLE: 513 case AUDIT_SUBJ_ROLE:
474 case AUDIT_SE_TYPE: 514 case AUDIT_SUBJ_TYPE:
475 case AUDIT_SE_SEN: 515 case AUDIT_SUBJ_SEN:
476 case AUDIT_SE_CLR: 516 case AUDIT_SUBJ_CLR:
517 case AUDIT_OBJ_USER:
518 case AUDIT_OBJ_ROLE:
519 case AUDIT_OBJ_TYPE:
520 case AUDIT_OBJ_LEV_LOW:
521 case AUDIT_OBJ_LEV_HIGH:
477 str = audit_unpack_string(&bufp, &remain, f->val); 522 str = audit_unpack_string(&bufp, &remain, f->val);
478 if (IS_ERR(str)) 523 if (IS_ERR(str))
479 goto exit_free; 524 goto exit_free;
@@ -511,6 +556,16 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data,
511 if (err) 556 if (err)
512 goto exit_free; 557 goto exit_free;
513 break; 558 break;
559 case AUDIT_FILTERKEY:
560 err = -EINVAL;
561 if (entry->rule.filterkey || f->val > AUDIT_MAX_KEY_LEN)
562 goto exit_free;
563 str = audit_unpack_string(&bufp, &remain, f->val);
564 if (IS_ERR(str))
565 goto exit_free;
566 entry->rule.buflen += f->val;
567 entry->rule.filterkey = str;
568 break;
514 default: 569 default:
515 goto exit_free; 570 goto exit_free;
516 } 571 }
@@ -600,11 +655,16 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule)
600 data->fields[i] = f->type; 655 data->fields[i] = f->type;
601 data->fieldflags[i] = f->op; 656 data->fieldflags[i] = f->op;
602 switch(f->type) { 657 switch(f->type) {
603 case AUDIT_SE_USER: 658 case AUDIT_SUBJ_USER:
604 case AUDIT_SE_ROLE: 659 case AUDIT_SUBJ_ROLE:
605 case AUDIT_SE_TYPE: 660 case AUDIT_SUBJ_TYPE:
606 case AUDIT_SE_SEN: 661 case AUDIT_SUBJ_SEN:
607 case AUDIT_SE_CLR: 662 case AUDIT_SUBJ_CLR:
663 case AUDIT_OBJ_USER:
664 case AUDIT_OBJ_ROLE:
665 case AUDIT_OBJ_TYPE:
666 case AUDIT_OBJ_LEV_LOW:
667 case AUDIT_OBJ_LEV_HIGH:
608 data->buflen += data->values[i] = 668 data->buflen += data->values[i] =
609 audit_pack_string(&bufp, f->se_str); 669 audit_pack_string(&bufp, f->se_str);
610 break; 670 break;
@@ -612,6 +672,10 @@ static struct audit_rule_data *audit_krule_to_data(struct audit_krule *krule)
612 data->buflen += data->values[i] = 672 data->buflen += data->values[i] =
613 audit_pack_string(&bufp, krule->watch->path); 673 audit_pack_string(&bufp, krule->watch->path);
614 break; 674 break;
675 case AUDIT_FILTERKEY:
676 data->buflen += data->values[i] =
677 audit_pack_string(&bufp, krule->filterkey);
678 break;
615 default: 679 default:
616 data->values[i] = f->val; 680 data->values[i] = f->val;
617 } 681 }
@@ -639,11 +703,16 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b)
639 return 1; 703 return 1;
640 704
641 switch(a->fields[i].type) { 705 switch(a->fields[i].type) {
642 case AUDIT_SE_USER: 706 case AUDIT_SUBJ_USER:
643 case AUDIT_SE_ROLE: 707 case AUDIT_SUBJ_ROLE:
644 case AUDIT_SE_TYPE: 708 case AUDIT_SUBJ_TYPE:
645 case AUDIT_SE_SEN: 709 case AUDIT_SUBJ_SEN:
646 case AUDIT_SE_CLR: 710 case AUDIT_SUBJ_CLR:
711 case AUDIT_OBJ_USER:
712 case AUDIT_OBJ_ROLE:
713 case AUDIT_OBJ_TYPE:
714 case AUDIT_OBJ_LEV_LOW:
715 case AUDIT_OBJ_LEV_HIGH:
647 if (strcmp(a->fields[i].se_str, b->fields[i].se_str)) 716 if (strcmp(a->fields[i].se_str, b->fields[i].se_str))
648 return 1; 717 return 1;
649 break; 718 break;
@@ -651,6 +720,11 @@ static int audit_compare_rule(struct audit_krule *a, struct audit_krule *b)
651 if (strcmp(a->watch->path, b->watch->path)) 720 if (strcmp(a->watch->path, b->watch->path))
652 return 1; 721 return 1;
653 break; 722 break;
723 case AUDIT_FILTERKEY:
724 /* both filterkeys exist based on above type compare */
725 if (strcmp(a->filterkey, b->filterkey))
726 return 1;
727 break;
654 default: 728 default:
655 if (a->fields[i].val != b->fields[i].val) 729 if (a->fields[i].val != b->fields[i].val)
656 return 1; 730 return 1;
@@ -730,6 +804,7 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old,
730 u32 fcount = old->field_count; 804 u32 fcount = old->field_count;
731 struct audit_entry *entry; 805 struct audit_entry *entry;
732 struct audit_krule *new; 806 struct audit_krule *new;
807 char *fk;
733 int i, err = 0; 808 int i, err = 0;
734 809
735 entry = audit_init_entry(fcount); 810 entry = audit_init_entry(fcount);
@@ -753,13 +828,25 @@ static struct audit_entry *audit_dupe_rule(struct audit_krule *old,
753 * the originals will all be freed when the old rule is freed. */ 828 * the originals will all be freed when the old rule is freed. */
754 for (i = 0; i < fcount; i++) { 829 for (i = 0; i < fcount; i++) {
755 switch (new->fields[i].type) { 830 switch (new->fields[i].type) {
756 case AUDIT_SE_USER: 831 case AUDIT_SUBJ_USER:
757 case AUDIT_SE_ROLE: 832 case AUDIT_SUBJ_ROLE:
758 case AUDIT_SE_TYPE: 833 case AUDIT_SUBJ_TYPE:
759 case AUDIT_SE_SEN: 834 case AUDIT_SUBJ_SEN:
760 case AUDIT_SE_CLR: 835 case AUDIT_SUBJ_CLR:
836 case AUDIT_OBJ_USER:
837 case AUDIT_OBJ_ROLE:
838 case AUDIT_OBJ_TYPE:
839 case AUDIT_OBJ_LEV_LOW:
840 case AUDIT_OBJ_LEV_HIGH:
761 err = audit_dupe_selinux_field(&new->fields[i], 841 err = audit_dupe_selinux_field(&new->fields[i],
762 &old->fields[i]); 842 &old->fields[i]);
843 break;
844 case AUDIT_FILTERKEY:
845 fk = kstrdup(old->filterkey, GFP_KERNEL);
846 if (unlikely(!fk))
847 err = -ENOMEM;
848 else
849 new->filterkey = fk;
763 } 850 }
764 if (err) { 851 if (err) {
765 audit_free_rule(entry); 852 audit_free_rule(entry);
@@ -1245,6 +1332,34 @@ static void audit_list_rules(int pid, int seq, struct sk_buff_head *q)
1245 skb_queue_tail(q, skb); 1332 skb_queue_tail(q, skb);
1246} 1333}
1247 1334
1335/* Log rule additions and removals */
1336static void audit_log_rule_change(uid_t loginuid, u32 sid, char *action,
1337 struct audit_krule *rule, int res)
1338{
1339 struct audit_buffer *ab;
1340
1341 ab = audit_log_start(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE);
1342 if (!ab)
1343 return;
1344 audit_log_format(ab, "auid=%u", loginuid);
1345 if (sid) {
1346 char *ctx = NULL;
1347 u32 len;
1348 if (selinux_ctxid_to_string(sid, &ctx, &len))
1349 audit_log_format(ab, " ssid=%u", sid);
1350 else
1351 audit_log_format(ab, " subj=%s", ctx);
1352 kfree(ctx);
1353 }
1354 audit_log_format(ab, " %s rule key=", action);
1355 if (rule->filterkey)
1356 audit_log_untrustedstring(ab, rule->filterkey);
1357 else
1358 audit_log_format(ab, "(null)");
1359 audit_log_format(ab, " list=%d res=%d", rule->listnr, res);
1360 audit_log_end(ab);
1361}
1362
1248/** 1363/**
1249 * audit_receive_filter - apply all rules to the specified message type 1364 * audit_receive_filter - apply all rules to the specified message type
1250 * @type: audit message type 1365 * @type: audit message type
@@ -1304,24 +1419,7 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data,
1304 1419
1305 err = audit_add_rule(entry, 1420 err = audit_add_rule(entry,
1306 &audit_filter_list[entry->rule.listnr]); 1421 &audit_filter_list[entry->rule.listnr]);
1307 1422 audit_log_rule_change(loginuid, sid, "add", &entry->rule, !err);
1308 if (sid) {
1309 char *ctx = NULL;
1310 u32 len;
1311 if (selinux_ctxid_to_string(sid, &ctx, &len)) {
1312 /* Maybe call audit_panic? */
1313 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
1314 "auid=%u ssid=%u add rule to list=%d res=%d",
1315 loginuid, sid, entry->rule.listnr, !err);
1316 } else
1317 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
1318 "auid=%u subj=%s add rule to list=%d res=%d",
1319 loginuid, ctx, entry->rule.listnr, !err);
1320 kfree(ctx);
1321 } else
1322 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
1323 "auid=%u add rule to list=%d res=%d",
1324 loginuid, entry->rule.listnr, !err);
1325 1423
1326 if (err) 1424 if (err)
1327 audit_free_rule(entry); 1425 audit_free_rule(entry);
@@ -1337,24 +1435,8 @@ int audit_receive_filter(int type, int pid, int uid, int seq, void *data,
1337 1435
1338 err = audit_del_rule(entry, 1436 err = audit_del_rule(entry,
1339 &audit_filter_list[entry->rule.listnr]); 1437 &audit_filter_list[entry->rule.listnr]);
1340 1438 audit_log_rule_change(loginuid, sid, "remove", &entry->rule,
1341 if (sid) { 1439 !err);
1342 char *ctx = NULL;
1343 u32 len;
1344 if (selinux_ctxid_to_string(sid, &ctx, &len)) {
1345 /* Maybe call audit_panic? */
1346 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
1347 "auid=%u ssid=%u remove rule from list=%d res=%d",
1348 loginuid, sid, entry->rule.listnr, !err);
1349 } else
1350 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
1351 "auid=%u subj=%s remove rule from list=%d res=%d",
1352 loginuid, ctx, entry->rule.listnr, !err);
1353 kfree(ctx);
1354 } else
1355 audit_log(NULL, GFP_KERNEL, AUDIT_CONFIG_CHANGE,
1356 "auid=%u remove rule from list=%d res=%d",
1357 loginuid, entry->rule.listnr, !err);
1358 1440
1359 audit_free_rule(entry); 1441 audit_free_rule(entry);
1360 break; 1442 break;
@@ -1514,11 +1596,16 @@ static inline int audit_rule_has_selinux(struct audit_krule *rule)
1514 for (i = 0; i < rule->field_count; i++) { 1596 for (i = 0; i < rule->field_count; i++) {
1515 struct audit_field *f = &rule->fields[i]; 1597 struct audit_field *f = &rule->fields[i];
1516 switch (f->type) { 1598 switch (f->type) {
1517 case AUDIT_SE_USER: 1599 case AUDIT_SUBJ_USER:
1518 case AUDIT_SE_ROLE: 1600 case AUDIT_SUBJ_ROLE:
1519 case AUDIT_SE_TYPE: 1601 case AUDIT_SUBJ_TYPE:
1520 case AUDIT_SE_SEN: 1602 case AUDIT_SUBJ_SEN:
1521 case AUDIT_SE_CLR: 1603 case AUDIT_SUBJ_CLR:
1604 case AUDIT_OBJ_USER:
1605 case AUDIT_OBJ_ROLE:
1606 case AUDIT_OBJ_TYPE:
1607 case AUDIT_OBJ_LEV_LOW:
1608 case AUDIT_OBJ_LEV_HIGH:
1522 return 1; 1609 return 1;
1523 } 1610 }
1524 } 1611 }
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index dc5e3f01efe..ae40ac8c39e 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -186,6 +186,7 @@ struct audit_context {
186 int auditable; /* 1 if record should be written */ 186 int auditable; /* 1 if record should be written */
187 int name_count; 187 int name_count;
188 struct audit_names names[AUDIT_NAMES]; 188 struct audit_names names[AUDIT_NAMES];
189 char * filterkey; /* key for rule that triggered record */
189 struct dentry * pwd; 190 struct dentry * pwd;
190 struct vfsmount * pwdmnt; 191 struct vfsmount * pwdmnt;
191 struct audit_context *previous; /* For nested syscalls */ 192 struct audit_context *previous; /* For nested syscalls */
@@ -320,11 +321,11 @@ static int audit_filter_rules(struct task_struct *tsk,
320 if (ctx) 321 if (ctx)
321 result = audit_comparator(ctx->loginuid, f->op, f->val); 322 result = audit_comparator(ctx->loginuid, f->op, f->val);
322 break; 323 break;
323 case AUDIT_SE_USER: 324 case AUDIT_SUBJ_USER:
324 case AUDIT_SE_ROLE: 325 case AUDIT_SUBJ_ROLE:
325 case AUDIT_SE_TYPE: 326 case AUDIT_SUBJ_TYPE:
326 case AUDIT_SE_SEN: 327 case AUDIT_SUBJ_SEN:
327 case AUDIT_SE_CLR: 328 case AUDIT_SUBJ_CLR:
328 /* NOTE: this may return negative values indicating 329 /* NOTE: this may return negative values indicating
329 a temporary error. We simply treat this as a 330 a temporary error. We simply treat this as a
330 match for now to avoid losing information that 331 match for now to avoid losing information that
@@ -341,6 +342,46 @@ static int audit_filter_rules(struct task_struct *tsk,
341 ctx); 342 ctx);
342 } 343 }
343 break; 344 break;
345 case AUDIT_OBJ_USER:
346 case AUDIT_OBJ_ROLE:
347 case AUDIT_OBJ_TYPE:
348 case AUDIT_OBJ_LEV_LOW:
349 case AUDIT_OBJ_LEV_HIGH:
350 /* The above note for AUDIT_SUBJ_USER...AUDIT_SUBJ_CLR
351 also applies here */
352 if (f->se_rule) {
353 /* Find files that match */
354 if (name) {
355 result = selinux_audit_rule_match(
356 name->osid, f->type, f->op,
357 f->se_rule, ctx);
358 } else if (ctx) {
359 for (j = 0; j < ctx->name_count; j++) {
360 if (selinux_audit_rule_match(
361 ctx->names[j].osid,
362 f->type, f->op,
363 f->se_rule, ctx)) {
364 ++result;
365 break;
366 }
367 }
368 }
369 /* Find ipc objects that match */
370 if (ctx) {
371 struct audit_aux_data *aux;
372 for (aux = ctx->aux; aux;
373 aux = aux->next) {
374 if (aux->type == AUDIT_IPC) {
375 struct audit_aux_data_ipcctl *axi = (void *)aux;
376 if (selinux_audit_rule_match(axi->osid, f->type, f->op, f->se_rule, ctx)) {
377 ++result;
378 break;
379 }
380 }
381 }
382 }
383 }
384 break;
344 case AUDIT_ARG0: 385 case AUDIT_ARG0:
345 case AUDIT_ARG1: 386 case AUDIT_ARG1:
346 case AUDIT_ARG2: 387 case AUDIT_ARG2:
@@ -348,11 +389,17 @@ static int audit_filter_rules(struct task_struct *tsk,
348 if (ctx) 389 if (ctx)
349 result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val); 390 result = audit_comparator(ctx->argv[f->type-AUDIT_ARG0], f->op, f->val);
350 break; 391 break;
392 case AUDIT_FILTERKEY:
393 /* ignore this field for filtering */
394 result = 1;
395 break;
351 } 396 }
352 397
353 if (!result) 398 if (!result)
354 return 0; 399 return 0;
355 } 400 }
401 if (rule->filterkey)
402 ctx->filterkey = kstrdup(rule->filterkey, GFP_ATOMIC);
356 switch (rule->action) { 403 switch (rule->action) {
357 case AUDIT_NEVER: *state = AUDIT_DISABLED; break; 404 case AUDIT_NEVER: *state = AUDIT_DISABLED; break;
358 case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break; 405 case AUDIT_ALWAYS: *state = AUDIT_RECORD_CONTEXT; break;
@@ -627,6 +674,7 @@ static inline void audit_free_context(struct audit_context *context)
627 } 674 }
628 audit_free_names(context); 675 audit_free_names(context);
629 audit_free_aux(context); 676 audit_free_aux(context);
677 kfree(context->filterkey);
630 kfree(context); 678 kfree(context);
631 context = previous; 679 context = previous;
632 } while (context); 680 } while (context);
@@ -735,6 +783,11 @@ static void audit_log_exit(struct audit_context *context, struct task_struct *ts
735 context->euid, context->suid, context->fsuid, 783 context->euid, context->suid, context->fsuid,
736 context->egid, context->sgid, context->fsgid, tty); 784 context->egid, context->sgid, context->fsgid, tty);
737 audit_log_task_info(ab, tsk); 785 audit_log_task_info(ab, tsk);
786 if (context->filterkey) {
787 audit_log_format(ab, " key=");
788 audit_log_untrustedstring(ab, context->filterkey);
789 } else
790 audit_log_format(ab, " key=(null)");
738 audit_log_end(ab); 791 audit_log_end(ab);
739 792
740 for (aux = context->aux; aux; aux = aux->next) { 793 for (aux = context->aux; aux; aux = aux->next) {
@@ -1060,6 +1113,8 @@ void audit_syscall_exit(int valid, long return_code)
1060 } else { 1113 } else {
1061 audit_free_names(context); 1114 audit_free_names(context);
1062 audit_free_aux(context); 1115 audit_free_aux(context);
1116 kfree(context->filterkey);
1117 context->filterkey = NULL;
1063 tsk->audit_context = context; 1118 tsk->audit_context = context;
1064 } 1119 }
1065} 1120}
diff --git a/kernel/configs.c b/kernel/configs.c
index 009e1ebdcb8..f9e31974f4a 100644
--- a/kernel/configs.c
+++ b/kernel/configs.c
@@ -23,7 +23,6 @@
23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/proc_fs.h> 28#include <linux/proc_fs.h>
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 1535af3a912..c232dc07743 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -18,7 +18,6 @@
18 * distribution for more details. 18 * distribution for more details.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/cpu.h> 21#include <linux/cpu.h>
23#include <linux/cpumask.h> 22#include <linux/cpumask.h>
24#include <linux/cpuset.h> 23#include <linux/cpuset.h>
@@ -1064,7 +1063,7 @@ static int update_flag(cpuset_flagbits_t bit, struct cpuset *cs, char *buf)
1064} 1063}
1065 1064
1066/* 1065/*
1067 * Frequency meter - How fast is some event occuring? 1066 * Frequency meter - How fast is some event occurring?
1068 * 1067 *
1069 * These routines manage a digitally filtered, constant time based, 1068 * These routines manage a digitally filtered, constant time based,
1070 * event frequency meter. There are four routines: 1069 * event frequency meter. There are four routines:
diff --git a/kernel/exec_domain.c b/kernel/exec_domain.c
index c01cead2cfd..3c2eaea66b1 100644
--- a/kernel/exec_domain.c
+++ b/kernel/exec_domain.c
@@ -7,7 +7,6 @@
7 * 2001-05-06 Complete rewrite, Christoph Hellwig (hch@infradead.org) 7 * 2001-05-06 Complete rewrite, Christoph Hellwig (hch@infradead.org)
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/init.h> 10#include <linux/init.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
13#include <linux/kmod.h> 12#include <linux/kmod.h>
diff --git a/kernel/exit.c b/kernel/exit.c
index ab06b9f88f6..7f7ef225855 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/mm.h> 7#include <linux/mm.h>
9#include <linux/slab.h> 8#include <linux/slab.h>
10#include <linux/interrupt.h> 9#include <linux/interrupt.h>
diff --git a/kernel/fork.c b/kernel/fork.c
index 628198a4f28..9064bf9e131 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -11,7 +11,6 @@
11 * management can be a bitch. See 'mm/memory.c': 'copy_page_range()' 11 * management can be a bitch. See 'mm/memory.c': 'copy_page_range()'
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/unistd.h> 16#include <linux/unistd.h>
diff --git a/kernel/futex.c b/kernel/futex.c
index 6c91f938005..15caf93e4a4 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -630,8 +630,10 @@ static int futex_wake(u32 __user *uaddr, int nr_wake)
630 630
631 list_for_each_entry_safe(this, next, head, list) { 631 list_for_each_entry_safe(this, next, head, list) {
632 if (match_futex (&this->key, &key)) { 632 if (match_futex (&this->key, &key)) {
633 if (this->pi_state) 633 if (this->pi_state) {
634 return -EINVAL; 634 ret = -EINVAL;
635 break;
636 }
635 wake_futex(this); 637 wake_futex(this);
636 if (++ret >= nr_wake) 638 if (++ret >= nr_wake)
637 break; 639 break;
@@ -1208,7 +1210,7 @@ static int do_futex_lock_pi(u32 __user *uaddr, int detect, int trylock,
1208 } 1210 }
1209 1211
1210 down_read(&curr->mm->mmap_sem); 1212 down_read(&curr->mm->mmap_sem);
1211 hb = queue_lock(&q, -1, NULL); 1213 spin_lock(q.lock_ptr);
1212 1214
1213 /* 1215 /*
1214 * Got the lock. We might not be the anticipated owner if we 1216 * Got the lock. We might not be the anticipated owner if we
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 4a0952d9458..54105bdfe20 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -462,9 +462,18 @@ __set_irq_handler(unsigned int irq,
462 if (!handle) 462 if (!handle)
463 handle = handle_bad_irq; 463 handle = handle_bad_irq;
464 464
465 if (is_chained && desc->chip == &no_irq_chip) 465 if (desc->chip == &no_irq_chip) {
466 printk(KERN_WARNING "Trying to install " 466 printk(KERN_WARNING "Trying to install %sinterrupt handler "
467 "chained interrupt type for IRQ%d\n", irq); 467 "for IRQ%d\n", is_chained ? "chained " : " ", irq);
468 /*
469 * Some ARM implementations install a handler for really dumb
470 * interrupt hardware without setting an irq_chip. This worked
471 * with the ARM no_irq_chip but the check in setup_irq would
472 * prevent us to setup the interrupt at all. Switch it to
473 * dummy_irq_chip for easy transition.
474 */
475 desc->chip = &dummy_irq_chip;
476 }
468 477
469 spin_lock_irqsave(&desc->lock, flags); 478 spin_lock_irqsave(&desc->lock, flags);
470 479
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 5a360dd4331..aeb6e391276 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -92,6 +92,22 @@ struct irq_chip no_irq_chip = {
92}; 92};
93 93
94/* 94/*
95 * Generic dummy implementation which can be used for
96 * real dumb interrupt sources
97 */
98struct irq_chip dummy_irq_chip = {
99 .name = "dummy",
100 .startup = noop_ret,
101 .shutdown = noop,
102 .enable = noop,
103 .disable = noop,
104 .ack = noop,
105 .mask = noop,
106 .unmask = noop,
107 .end = noop,
108};
109
110/*
95 * Special, empty irq handler: 111 * Special, empty irq handler:
96 */ 112 */
97irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs) 113irqreturn_t no_action(int cpl, void *dev_id, struct pt_regs *regs)
@@ -113,7 +129,9 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
113 irqreturn_t ret, retval = IRQ_NONE; 129 irqreturn_t ret, retval = IRQ_NONE;
114 unsigned int status = 0; 130 unsigned int status = 0;
115 131
116 if (!(action->flags & SA_INTERRUPT)) 132 handle_dynamic_tick(action);
133
134 if (!(action->flags & IRQF_DISABLED))
117 local_irq_enable(); 135 local_irq_enable();
118 136
119 do { 137 do {
@@ -124,7 +142,7 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
124 action = action->next; 142 action = action->next;
125 } while (action); 143 } while (action);
126 144
127 if (status & SA_SAMPLE_RANDOM) 145 if (status & IRQF_SAMPLE_RANDOM)
128 add_interrupt_randomness(irq); 146 add_interrupt_randomness(irq);
129 local_irq_disable(); 147 local_irq_disable();
130 148
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 9eb1d518ee1..c911c6ec4dd 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -7,7 +7,6 @@
7 * This file contains driver APIs to the irq subsystem. 7 * This file contains driver APIs to the irq subsystem.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/irq.h> 10#include <linux/irq.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/random.h> 12#include <linux/random.h>
@@ -115,7 +114,7 @@ void enable_irq(unsigned int irq)
115 spin_lock_irqsave(&desc->lock, flags); 114 spin_lock_irqsave(&desc->lock, flags);
116 switch (desc->depth) { 115 switch (desc->depth) {
117 case 0: 116 case 0:
118 printk(KERN_WARNING "Unablanced enable_irq(%d)\n", irq); 117 printk(KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
119 WARN_ON(1); 118 WARN_ON(1);
120 break; 119 break;
121 case 1: { 120 case 1: {
@@ -168,7 +167,7 @@ int can_request_irq(unsigned int irq, unsigned long irqflags)
168 167
169 action = irq_desc[irq].action; 168 action = irq_desc[irq].action;
170 if (action) 169 if (action)
171 if (irqflags & action->flags & SA_SHIRQ) 170 if (irqflags & action->flags & IRQF_SHARED)
172 action = NULL; 171 action = NULL;
173 172
174 return !action; 173 return !action;
@@ -206,7 +205,7 @@ int setup_irq(unsigned int irq, struct irqaction *new)
206 * so we have to be careful not to interfere with a 205 * so we have to be careful not to interfere with a
207 * running system. 206 * running system.
208 */ 207 */
209 if (new->flags & SA_SAMPLE_RANDOM) { 208 if (new->flags & IRQF_SAMPLE_RANDOM) {
210 /* 209 /*
211 * This function might sleep, we want to call it first, 210 * This function might sleep, we want to call it first,
212 * outside of the atomic block. 211 * outside of the atomic block.
@@ -228,16 +227,17 @@ int setup_irq(unsigned int irq, struct irqaction *new)
228 /* 227 /*
229 * Can't share interrupts unless both agree to and are 228 * Can't share interrupts unless both agree to and are
230 * the same type (level, edge, polarity). So both flag 229 * the same type (level, edge, polarity). So both flag
231 * fields must have SA_SHIRQ set and the bits which 230 * fields must have IRQF_SHARED set and the bits which
232 * set the trigger type must match. 231 * set the trigger type must match.
233 */ 232 */
234 if (!((old->flags & new->flags) & SA_SHIRQ) || 233 if (!((old->flags & new->flags) & IRQF_SHARED) ||
235 ((old->flags ^ new->flags) & SA_TRIGGER_MASK)) 234 ((old->flags ^ new->flags) & IRQF_TRIGGER_MASK))
236 goto mismatch; 235 goto mismatch;
237 236
238#if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) 237#if defined(CONFIG_IRQ_PER_CPU)
239 /* All handlers must agree on per-cpuness */ 238 /* All handlers must agree on per-cpuness */
240 if ((old->flags & IRQ_PER_CPU) != (new->flags & IRQ_PER_CPU)) 239 if ((old->flags & IRQF_PERCPU) !=
240 (new->flags & IRQF_PERCPU))
241 goto mismatch; 241 goto mismatch;
242#endif 242#endif
243 243
@@ -250,26 +250,27 @@ int setup_irq(unsigned int irq, struct irqaction *new)
250 } 250 }
251 251
252 *p = new; 252 *p = new;
253#if defined(CONFIG_IRQ_PER_CPU) && defined(SA_PERCPU_IRQ) 253#if defined(CONFIG_IRQ_PER_CPU)
254 if (new->flags & SA_PERCPU_IRQ) 254 if (new->flags & IRQF_PERCPU)
255 desc->status |= IRQ_PER_CPU; 255 desc->status |= IRQ_PER_CPU;
256#endif 256#endif
257 if (!shared) { 257 if (!shared) {
258 irq_chip_set_defaults(desc->chip); 258 irq_chip_set_defaults(desc->chip);
259 259
260 /* Setup the type (level, edge polarity) if configured: */ 260 /* Setup the type (level, edge polarity) if configured: */
261 if (new->flags & SA_TRIGGER_MASK) { 261 if (new->flags & IRQF_TRIGGER_MASK) {
262 if (desc->chip && desc->chip->set_type) 262 if (desc->chip && desc->chip->set_type)
263 desc->chip->set_type(irq, 263 desc->chip->set_type(irq,
264 new->flags & SA_TRIGGER_MASK); 264 new->flags & IRQF_TRIGGER_MASK);
265 else 265 else
266 /* 266 /*
267 * SA_TRIGGER_* but the PIC does not support 267 * IRQF_TRIGGER_* but the PIC does not support
268 * multiple flow-types? 268 * multiple flow-types?
269 */ 269 */
270 printk(KERN_WARNING "setup_irq(%d) SA_TRIGGER" 270 printk(KERN_WARNING "No IRQF_TRIGGER set_type "
271 "set. No set_type function available\n", 271 "function for IRQ %d (%s)\n", irq,
272 irq); 272 desc->chip ? desc->chip->name :
273 "unknown");
273 } else 274 } else
274 compat_irq_chip_set_default_handler(desc); 275 compat_irq_chip_set_default_handler(desc);
275 276
@@ -298,8 +299,8 @@ int setup_irq(unsigned int irq, struct irqaction *new)
298 299
299mismatch: 300mismatch:
300 spin_unlock_irqrestore(&desc->lock, flags); 301 spin_unlock_irqrestore(&desc->lock, flags);
301 if (!(new->flags & SA_PROBEIRQ)) { 302 if (!(new->flags & IRQF_PROBE_SHARED)) {
302 printk(KERN_ERR "%s: irq handler mismatch\n", __FUNCTION__); 303 printk(KERN_ERR "IRQ handler type mismatch for IRQ %d\n", irq);
303 dump_stack(); 304 dump_stack();
304 } 305 }
305 return -EBUSY; 306 return -EBUSY;
@@ -366,7 +367,7 @@ void free_irq(unsigned int irq, void *dev_id)
366 kfree(action); 367 kfree(action);
367 return; 368 return;
368 } 369 }
369 printk(KERN_ERR "Trying to free free IRQ%d\n", irq); 370 printk(KERN_ERR "Trying to free already-free IRQ %d\n", irq);
370 spin_unlock_irqrestore(&desc->lock, flags); 371 spin_unlock_irqrestore(&desc->lock, flags);
371 return; 372 return;
372 } 373 }
@@ -397,9 +398,9 @@ EXPORT_SYMBOL(free_irq);
397 * 398 *
398 * Flags: 399 * Flags:
399 * 400 *
400 * SA_SHIRQ Interrupt is shared 401 * IRQF_SHARED Interrupt is shared
401 * SA_INTERRUPT Disable local interrupts while processing 402 * IRQF_DISABLED Disable local interrupts while processing
402 * SA_SAMPLE_RANDOM The interrupt can be used for entropy 403 * IRQF_SAMPLE_RANDOM The interrupt can be used for entropy
403 * 404 *
404 */ 405 */
405int request_irq(unsigned int irq, 406int request_irq(unsigned int irq,
@@ -415,7 +416,7 @@ int request_irq(unsigned int irq,
415 * which interrupt is which (messes up the interrupt freeing 416 * which interrupt is which (messes up the interrupt freeing
416 * logic etc). 417 * logic etc).
417 */ 418 */
418 if ((irqflags & SA_SHIRQ) && !dev_id) 419 if ((irqflags & IRQF_SHARED) && !dev_id)
419 return -EINVAL; 420 return -EINVAL;
420 if (irq >= NR_IRQS) 421 if (irq >= NR_IRQS)
421 return -EINVAL; 422 return -EINVAL;
diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index b483deed311..417e98092cf 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -36,7 +36,7 @@ static int misrouted_irq(int irq, struct pt_regs *regs)
36 * Already running: If it is shared get the other 36 * Already running: If it is shared get the other
37 * CPU to go looking for our mystery interrupt too 37 * CPU to go looking for our mystery interrupt too
38 */ 38 */
39 if (desc->action && (desc->action->flags & SA_SHIRQ)) 39 if (desc->action && (desc->action->flags & IRQF_SHARED))
40 desc->status |= IRQ_PENDING; 40 desc->status |= IRQ_PENDING;
41 spin_unlock(&desc->lock); 41 spin_unlock(&desc->lock);
42 continue; 42 continue;
@@ -48,7 +48,7 @@ static int misrouted_irq(int irq, struct pt_regs *regs)
48 48
49 while (action) { 49 while (action) {
50 /* Only shared IRQ handlers are safe to call */ 50 /* Only shared IRQ handlers are safe to call */
51 if (action->flags & SA_SHIRQ) { 51 if (action->flags & IRQF_SHARED) {
52 if (action->handler(i, action->dev_id, regs) == 52 if (action->handler(i, action->dev_id, regs) ==
53 IRQ_HANDLED) 53 IRQ_HANDLED)
54 ok = 1; 54 ok = 1;
diff --git a/kernel/kmod.c b/kernel/kmod.c
index 20a997c73c3..1b7157af051 100644
--- a/kernel/kmod.c
+++ b/kernel/kmod.c
@@ -20,7 +20,6 @@
20*/ 20*/
21#define __KERNEL_SYSCALLS__ 21#define __KERNEL_SYSCALLS__
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25#include <linux/sched.h> 24#include <linux/sched.h>
26#include <linux/syscalls.h> 25#include <linux/syscalls.h>
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index 9e28478a17a..e0ffe4ab091 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/kobject.h> 11#include <linux/kobject.h>
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/sysfs.h> 13#include <linux/sysfs.h>
diff --git a/kernel/module.c b/kernel/module.c
index 99c022ac3d2..281172f01e9 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -16,7 +16,6 @@
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/ 18*/
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/moduleloader.h> 20#include <linux/moduleloader.h>
22#include <linux/init.h> 21#include <linux/init.h>
diff --git a/kernel/panic.c b/kernel/panic.c
index cc2a4c9c36a..ab13f0f668b 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -8,7 +8,6 @@
8 * This function is used through-out the kernel (including mm and fs) 8 * This function is used through-out the kernel (including mm and fs)
9 * to indicate a major problem. 9 * to indicate a major problem.
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/delay.h> 13#include <linux/delay.h>
diff --git a/kernel/params.c b/kernel/params.c
index af43ecdc8d9..91aea7aa532 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -15,7 +15,6 @@
15 along with this program; if not, write to the Free Software 15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17*/ 17*/
18#include <linux/config.h>
19#include <linux/moduleparam.h> 18#include <linux/moduleparam.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/string.h> 20#include <linux/string.h>
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig
index 857b4fa0912..ae44a70aae8 100644
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -100,18 +100,6 @@ config PM_STD_PARTITION
100 suspended image to. It will simply pick the first available swap 100 suspended image to. It will simply pick the first available swap
101 device. 101 device.
102 102
103config SWSUSP_ENCRYPT
104 bool "Encrypt suspend image"
105 depends on SOFTWARE_SUSPEND && CRYPTO=y && (CRYPTO_AES=y || CRYPTO_AES_586=y || CRYPTO_AES_X86_64=y)
106 default ""
107 ---help---
108 To prevent data gathering from swap after resume you can encrypt
109 the suspend image with a temporary key that is deleted on
110 resume.
111
112 Note that the temporary key is stored unencrypted on disk while the
113 system is suspended.
114
115config SUSPEND_SMP 103config SUSPEND_SMP
116 bool 104 bool
117 depends on HOTPLUG_CPU && X86 && PM 105 depends on HOTPLUG_CPU && X86 && PM
diff --git a/kernel/printk.c b/kernel/printk.c
index 95b7fe17f12..39ae24d2a41 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -26,7 +26,6 @@
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/moduleparam.h> 27#include <linux/moduleparam.h>
28#include <linux/interrupt.h> /* For in_interrupt() */ 28#include <linux/interrupt.h> /* For in_interrupt() */
29#include <linux/config.h>
30#include <linux/delay.h> 29#include <linux/delay.h>
31#include <linux/smp.h> 30#include <linux/smp.h>
32#include <linux/security.h> 31#include <linux/security.h>
diff --git a/kernel/profile.c b/kernel/profile.c
index 5a730fdb1a2..d5bd75e7501 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -13,7 +13,6 @@
13 * to resolve timer interrupt livelocks, William Irwin, Oracle, 2004 13 * to resolve timer interrupt livelocks, William Irwin, Oracle, 2004
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/profile.h> 17#include <linux/profile.h>
19#include <linux/bootmem.h> 18#include <linux/bootmem.h>
diff --git a/kernel/resource.c b/kernel/resource.c
index bf1130d81b7..129cf046e56 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -7,7 +7,6 @@
7 * Arbitrary resource management. 7 * Arbitrary resource management.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
13#include <linux/errno.h> 12#include <linux/errno.h>
diff --git a/kernel/signal.c b/kernel/signal.c
index 477d11adf3d..7fe874d12fa 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -10,7 +10,6 @@
10 * to allow signals to be sent reliably. 10 * to allow signals to be sent reliably.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/smp_lock.h> 15#include <linux/smp_lock.h>
diff --git a/kernel/spinlock.c b/kernel/spinlock.c
index d1b810782bc..b31e54eadf5 100644
--- a/kernel/spinlock.c
+++ b/kernel/spinlock.c
@@ -9,7 +9,6 @@
9 * SMP and the DEBUG_SPINLOCK cases. (UP-nondebug inlines them) 9 * SMP and the DEBUG_SPINLOCK cases. (UP-nondebug inlines them)
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/linkage.h> 12#include <linux/linkage.h>
14#include <linux/preempt.h> 13#include <linux/preempt.h>
15#include <linux/spinlock.h> 14#include <linux/spinlock.h>
diff --git a/kernel/sys.c b/kernel/sys.c
index 2d5179c67ce..dbb3b9c7ea6 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 1991, 1992 Linus Torvalds 4 * Copyright (C) 1991, 1992 Linus Torvalds
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/utsname.h> 9#include <linux/utsname.h>
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ee0db45e243..99a58f27907 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -18,7 +18,6 @@
18 * Removed it and replaced it with older style, 03/23/00, Bill Wendling 18 * Removed it and replaced it with older style, 03/23/00, Bill Wendling
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/mm.h> 22#include <linux/mm.h>
24#include <linux/swap.h> 23#include <linux/swap.h>
diff --git a/kernel/wait.c b/kernel/wait.c
index 791681cfea9..5985d866531 100644
--- a/kernel/wait.c
+++ b/kernel/wait.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * (C) 2004 William Irwin, Oracle 4 * (C) 2004 William Irwin, Oracle
5 */ 5 */
6#include <linux/config.h>
7#include <linux/init.h> 6#include <linux/init.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/sched.h> 8#include <linux/sched.h>
diff --git a/lib/bust_spinlocks.c b/lib/bust_spinlocks.c
index 6bb7319e09a..a2055bc3ef6 100644
--- a/lib/bust_spinlocks.c
+++ b/lib/bust_spinlocks.c
@@ -7,7 +7,6 @@
7 * and panic() information from reaching the user. 7 * and panic() information from reaching the user.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/kernel.h> 10#include <linux/kernel.h>
12#include <linux/spinlock.h> 11#include <linux/spinlock.h>
13#include <linux/tty.h> 12#include <linux/tty.h>
diff --git a/lib/extable.c b/lib/extable.c
index 01c08b5836f..463f4560f16 100644
--- a/lib/extable.c
+++ b/lib/extable.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/sort.h> 14#include <linux/sort.h>
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 7f20e7b857c..2b1530fc573 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -50,6 +50,10 @@ static char *action_to_string(enum kobject_action action)
50 return "offline"; 50 return "offline";
51 case KOBJ_ONLINE: 51 case KOBJ_ONLINE:
52 return "online"; 52 return "online";
53 case KOBJ_DOCK:
54 return "dock";
55 case KOBJ_UNDOCK:
56 return "undock";
53 default: 57 default:
54 return NULL; 58 return NULL;
55 } 59 }
diff --git a/lib/semaphore-sleepers.c b/lib/semaphore-sleepers.c
index 4d5f18889fa..12818052386 100644
--- a/lib/semaphore-sleepers.c
+++ b/lib/semaphore-sleepers.c
@@ -12,7 +12,6 @@
12 * 12 *
13 * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org> 13 * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org>
14 */ 14 */
15#include <linux/config.h>
16#include <linux/sched.h> 15#include <linux/sched.h>
17#include <linux/err.h> 16#include <linux/err.h>
18#include <linux/init.h> 17#include <linux/init.h>
diff --git a/lib/spinlock_debug.c b/lib/spinlock_debug.c
index d8b6bb419d4..93c15ee3f8e 100644
--- a/lib/spinlock_debug.c
+++ b/lib/spinlock_debug.c
@@ -6,7 +6,6 @@
6 * DEBUG_SPINLOCK. 6 * DEBUG_SPINLOCK.
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/spinlock.h> 9#include <linux/spinlock.h>
11#include <linux/interrupt.h> 10#include <linux/interrupt.h>
12#include <linux/delay.h> 11#include <linux/delay.h>
diff --git a/lib/textsearch.c b/lib/textsearch.c
index 6f3093efbd7..2cb4a437942 100644
--- a/lib/textsearch.c
+++ b/lib/textsearch.c
@@ -93,7 +93,6 @@
93 * ========================================================================== 93 * ==========================================================================
94 */ 94 */
95 95
96#include <linux/config.h>
97#include <linux/module.h> 96#include <linux/module.h>
98#include <linux/types.h> 97#include <linux/types.h>
99#include <linux/string.h> 98#include <linux/string.h>
diff --git a/lib/ts_bm.c b/lib/ts_bm.c
index c4c1ac5fbd1..0110e441480 100644
--- a/lib/ts_bm.c
+++ b/lib/ts_bm.c
@@ -35,7 +35,6 @@
35 * matchings spread over multiple fragments, then go BM. 35 * matchings spread over multiple fragments, then go BM.
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
40#include <linux/module.h> 39#include <linux/module.h>
41#include <linux/types.h> 40#include <linux/types.h>
diff --git a/lib/ts_fsm.c b/lib/ts_fsm.c
index ca3211206ee..87847c2ae9e 100644
--- a/lib/ts_fsm.c
+++ b/lib/ts_fsm.c
@@ -26,7 +26,6 @@
26 * however while in strict mode the average runtime can be better. 26 * however while in strict mode the average runtime can be better.
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/string.h> 31#include <linux/string.h>
diff --git a/lib/ts_kmp.c b/lib/ts_kmp.c
index 7fd45451b44..3ced628cab4 100644
--- a/lib/ts_kmp.c
+++ b/lib/ts_kmp.c
@@ -30,7 +30,6 @@
30 * [2] See finite automation theory 30 * [2] See finite automation theory
31 */ 31 */
32 32
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <linux/types.h> 34#include <linux/types.h>
36#include <linux/string.h> 35#include <linux/string.h>
diff --git a/mm/filemap.c b/mm/filemap.c
index 796a5471b49..d087fc3d328 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -9,7 +9,6 @@
9 * most "normal" filesystems (but you don't /have/ to use this: 9 * most "normal" filesystems (but you don't /have/ to use this:
10 * the NFS filesystem used to do this differently, for example) 10 * the NFS filesystem used to do this differently, for example)
11 */ 11 */
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
15#include <linux/compiler.h> 14#include <linux/compiler.h>
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index ea4038838b0..01c9fb97c61 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -4,7 +4,6 @@
4 * Copyright (C) 4 * Copyright (C)
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/stddef.h> 7#include <linux/stddef.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/swap.h> 9#include <linux/swap.h>
diff --git a/mm/mmzone.c b/mm/mmzone.c
index b022370e612..0959ee1a479 100644
--- a/mm/mmzone.c
+++ b/mm/mmzone.c
@@ -5,7 +5,6 @@
5 */ 5 */
6 6
7 7
8#include <linux/config.h>
9#include <linux/stddef.h> 8#include <linux/stddef.h>
10#include <linux/mmzone.h> 9#include <linux/mmzone.h>
11#include <linux/module.h> 10#include <linux/module.h>
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 30b0b97ad02..3e792a583f3 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -14,7 +14,6 @@
14 * (lots of bits borrowed from Ingo Molnar & Andrew Morton) 14 * (lots of bits borrowed from Ingo Molnar & Andrew Morton)
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/stddef.h> 17#include <linux/stddef.h>
19#include <linux/mm.h> 18#include <linux/mm.h>
20#include <linux/swap.h> 19#include <linux/swap.h>
diff --git a/mm/shmem.c b/mm/shmem.c
index a9c09e0ba70..db21c51531c 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -23,7 +23,6 @@
23 * which makes it a completely usable filesystem. 23 * which makes it a completely usable filesystem.
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/init.h> 27#include <linux/init.h>
29#include <linux/fs.h> 28#include <linux/fs.h>
diff --git a/mm/slob.c b/mm/slob.c
index a68255ba455..7b52b20b960 100644
--- a/mm/slob.c
+++ b/mm/slob.c
@@ -29,7 +29,6 @@
29 * essentially no allocation space overhead. 29 * essentially no allocation space overhead.
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/slab.h> 32#include <linux/slab.h>
34#include <linux/mm.h> 33#include <linux/mm.h>
35#include <linux/cache.h> 34#include <linux/cache.h>
diff --git a/mm/sparse.c b/mm/sparse.c
index c7a2b3a0e46..86c52ab8087 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -1,7 +1,6 @@
1/* 1/*
2 * sparse memory mappings. 2 * sparse memory mappings.
3 */ 3 */
4#include <linux/config.h>
5#include <linux/mm.h> 4#include <linux/mm.h>
6#include <linux/mmzone.h> 5#include <linux/mmzone.h>
7#include <linux/bootmem.h> 6#include <linux/bootmem.h>
diff --git a/mm/swapfile.c b/mm/swapfile.c
index cc367f7e75d..e70d6c6d6fe 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -5,7 +5,6 @@
5 * Swap reorganised 29.12.95, Stephen Tweedie 5 * Swap reorganised 29.12.95, Stephen Tweedie
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/mm.h> 8#include <linux/mm.h>
10#include <linux/hugetlb.h> 9#include <linux/hugetlb.h>
11#include <linux/mman.h> 10#include <linux/mman.h>
diff --git a/net/802/fc.c b/net/802/fc.c
index 282c4ab1abe..2a27e37bc4c 100644
--- a/net/802/fc.c
+++ b/net/802/fc.c
@@ -10,7 +10,6 @@
10 * v 1.0 03/22/99 10 * v 1.0 03/22/99
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <asm/uaccess.h> 13#include <asm/uaccess.h>
15#include <asm/system.h> 14#include <asm/system.h>
16#include <linux/types.h> 15#include <linux/types.h>
diff --git a/net/802/fddi.c b/net/802/fddi.c
index ac242a4bc34..797c6d961de 100644
--- a/net/802/fddi.c
+++ b/net/802/fddi.c
@@ -26,7 +26,6 @@
26 * Maciej W. Rozycki : IPv6 support 26 * Maciej W. Rozycki : IPv6 support
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <asm/system.h> 30#include <asm/system.h>
32#include <linux/types.h> 31#include <linux/types.h>
diff --git a/net/802/sysctl_net_802.c b/net/802/sysctl_net_802.c
index 700129556c1..ead56037398 100644
--- a/net/802/sysctl_net_802.c
+++ b/net/802/sysctl_net_802.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/mm.h> 13#include <linux/mm.h>
15#include <linux/if_tr.h> 14#include <linux/if_tr.h>
16#include <linux/sysctl.h> 15#include <linux/sysctl.h>
diff --git a/net/802/tr.c b/net/802/tr.c
index e9dc803f2fe..d7d8f40c4fe 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -17,7 +17,6 @@
17 17
18#include <asm/uaccess.h> 18#include <asm/uaccess.h>
19#include <asm/system.h> 19#include <asm/system.h>
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/types.h> 21#include <linux/types.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 7b214cffc95..a8fc0de1f96 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -17,7 +17,6 @@
17 * Jan 20, 1998 Ben Greear Initial Version 17 * Jan 20, 1998 Ben Greear Initial Version
18 *****************************************************************************/ 18 *****************************************************************************/
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/stddef.h> /* offsetof(), etc. */ 21#include <linux/stddef.h> /* offsetof(), etc. */
23#include <linux/errno.h> /* return codes */ 22#include <linux/errno.h> /* return codes */
diff --git a/net/appletalk/aarp.c b/net/appletalk/aarp.c
index 7076097debc..f3777ec5bcb 100644
--- a/net/appletalk/aarp.c
+++ b/net/appletalk/aarp.c
@@ -29,7 +29,6 @@
29 * 29 *
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/if_arp.h> 32#include <linux/if_arp.h>
34#include <net/sock.h> 33#include <net/sock.h>
35#include <net/datalink.h> 34#include <net/datalink.h>
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c
index dc4048dd98c..7ae4916cd26 100644
--- a/net/appletalk/atalk_proc.c
+++ b/net/appletalk/atalk_proc.c
@@ -8,7 +8,6 @@
8 * Free Software Foundation, version 2. 8 * Free Software Foundation, version 2.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/init.h> 11#include <linux/init.h>
13#include <linux/proc_fs.h> 12#include <linux/proc_fs.h>
14#include <linux/seq_file.h> 13#include <linux/seq_file.h>
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c
index 7b1eb9a4fc9..5ee96d4b40e 100644
--- a/net/appletalk/ddp.c
+++ b/net/appletalk/ddp.c
@@ -51,7 +51,6 @@
51 * 51 *
52 */ 52 */
53 53
54#include <linux/config.h>
55#include <linux/capability.h> 54#include <linux/capability.h>
56#include <linux/module.h> 55#include <linux/module.h>
57#include <linux/if_arp.h> 56#include <linux/if_arp.h>
diff --git a/net/appletalk/sysctl_net_atalk.c b/net/appletalk/sysctl_net_atalk.c
index af7f0604395..40b0af7437a 100644
--- a/net/appletalk/sysctl_net_atalk.c
+++ b/net/appletalk/sysctl_net_atalk.c
@@ -6,7 +6,6 @@
6 * Dynamic registration, added aarp entries. (5/30/97 Chris Horn) 6 * Dynamic registration, added aarp entries. (5/30/97 Chris Horn)
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/sysctl.h> 9#include <linux/sysctl.h>
11#include <net/sock.h> 10#include <net/sock.h>
12#include <linux/atalk.h> 11#include <linux/atalk.h>
diff --git a/net/atm/br2684.c b/net/atm/br2684.c
index 680ccb12aae..a487233dc46 100644
--- a/net/atm/br2684.c
+++ b/net/atm/br2684.c
@@ -5,7 +5,6 @@ Author: Marcell GAL, 2000, XDSL Ltd, Hungary
5*/ 5*/
6 6
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/config.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/list.h> 10#include <linux/list.h>
diff --git a/net/atm/clip.c b/net/atm/clip.c
index f92f9c94d2c..87a454f5c89 100644
--- a/net/atm/clip.c
+++ b/net/atm/clip.c
@@ -2,7 +2,6 @@
2 2
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4 4
5#include <linux/config.h>
6#include <linux/string.h> 5#include <linux/string.h>
7#include <linux/errno.h> 6#include <linux/errno.h>
8#include <linux/kernel.h> /* for UINT_MAX */ 7#include <linux/kernel.h> /* for UINT_MAX */
diff --git a/net/atm/common.c b/net/atm/common.c
index 35ab1a61e83..fbabff49446 100644
--- a/net/atm/common.c
+++ b/net/atm/common.c
@@ -3,7 +3,6 @@
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4 4
5 5
6#include <linux/config.h>
7#include <linux/module.h> 6#include <linux/module.h>
8#include <linux/kmod.h> 7#include <linux/kmod.h>
9#include <linux/net.h> /* struct socket, struct proto_ops */ 8#include <linux/net.h> /* struct socket, struct proto_ops */
diff --git a/net/atm/ioctl.c b/net/atm/ioctl.c
index 851cfa6312a..8c2022c3e81 100644
--- a/net/atm/ioctl.c
+++ b/net/atm/ioctl.c
@@ -4,7 +4,6 @@
4/* 2003 John Levon <levon@movementarian.org> */ 4/* 2003 John Levon <levon@movementarian.org> */
5 5
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/kmod.h> 8#include <linux/kmod.h>
10#include <linux/net.h> /* struct socket, struct proto_ops */ 9#include <linux/net.h> /* struct socket, struct proto_ops */
diff --git a/net/atm/lec.c b/net/atm/lec.c
index c4fc722fef9..4b68a18171c 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -4,7 +4,6 @@
4 * 4 *
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/kernel.h> 7#include <linux/kernel.h>
9#include <linux/bitops.h> 8#include <linux/bitops.h>
10#include <linux/capability.h> 9#include <linux/capability.h>
diff --git a/net/atm/lec.h b/net/atm/lec.h
index 6606082b29a..c22a8bfa1f8 100644
--- a/net/atm/lec.h
+++ b/net/atm/lec.h
@@ -9,7 +9,6 @@
9#ifndef _LEC_H_ 9#ifndef _LEC_H_
10#define _LEC_H_ 10#define _LEC_H_
11 11
12#include <linux/config.h>
13#include <linux/atmdev.h> 12#include <linux/atmdev.h>
14#include <linux/netdevice.h> 13#include <linux/netdevice.h>
15#include <linux/atmlec.h> 14#include <linux/atmlec.h>
diff --git a/net/atm/mpc.c b/net/atm/mpc.c
index 5fe77df0018..9aafe1e2f04 100644
--- a/net/atm/mpc.c
+++ b/net/atm/mpc.c
@@ -25,7 +25,6 @@
25#include <linux/atmlec.h> 25#include <linux/atmlec.h>
26#include <linux/atmmpc.h> 26#include <linux/atmmpc.h>
27/* Modular too */ 27/* Modular too */
28#include <linux/config.h>
29#include <linux/module.h> 28#include <linux/module.h>
30 29
31#include "lec.h" 30#include "lec.h"
diff --git a/net/atm/mpoa_proc.c b/net/atm/mpoa_proc.c
index 60834b5a14d..d37b8911b3a 100644
--- a/net/atm/mpoa_proc.c
+++ b/net/atm/mpoa_proc.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2 1
3#ifdef CONFIG_PROC_FS 2#ifdef CONFIG_PROC_FS
4#include <linux/errno.h> 3#include <linux/errno.h>
diff --git a/net/atm/pppoatm.c b/net/atm/pppoatm.c
index 1489067c1e8..76a7d8ff6c0 100644
--- a/net/atm/pppoatm.c
+++ b/net/atm/pppoatm.c
@@ -34,7 +34,6 @@
34 */ 34 */
35 35
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/config.h>
38#include <linux/init.h> 37#include <linux/init.h>
39#include <linux/skbuff.h> 38#include <linux/skbuff.h>
40#include <linux/atm.h> 39#include <linux/atm.h>
diff --git a/net/atm/proc.c b/net/atm/proc.c
index 4041054e528..3f95b0886a6 100644
--- a/net/atm/proc.c
+++ b/net/atm/proc.c
@@ -8,7 +8,6 @@
8 * the reader. 8 * the reader.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> /* for EXPORT_SYMBOL */ 11#include <linux/module.h> /* for EXPORT_SYMBOL */
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/types.h> 13#include <linux/types.h>
diff --git a/net/atm/pvc.c b/net/atm/pvc.c
index f2c541774dc..b2148b43a42 100644
--- a/net/atm/pvc.c
+++ b/net/atm/pvc.c
@@ -3,7 +3,6 @@
3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */ 3/* Written 1995-2000 by Werner Almesberger, EPFL LRC/ICA */
4 4
5 5
6#include <linux/config.h>
7#include <linux/net.h> /* struct socket, struct proto_ops */ 6#include <linux/net.h> /* struct socket, struct proto_ops */
8#include <linux/atm.h> /* ATM stuff */ 7#include <linux/atm.h> /* ATM stuff */
9#include <linux/atmdev.h> /* ATM devices */ 8#include <linux/atmdev.h> /* ATM devices */
diff --git a/net/atm/resources.c b/net/atm/resources.c
index 534baf70405..de25c6408b0 100644
--- a/net/atm/resources.c
+++ b/net/atm/resources.c
@@ -8,7 +8,6 @@
8 * use the default destruct function initialized by sock_init_data */ 8 * use the default destruct function initialized by sock_init_data */
9 9
10 10
11#include <linux/config.h>
12#include <linux/ctype.h> 11#include <linux/ctype.h>
13#include <linux/string.h> 12#include <linux/string.h>
14#include <linux/atmdev.h> 13#include <linux/atmdev.h>
diff --git a/net/atm/resources.h b/net/atm/resources.h
index 644989980c3..1d004aaaeec 100644
--- a/net/atm/resources.h
+++ b/net/atm/resources.h
@@ -6,7 +6,6 @@
6#ifndef NET_ATM_RESOURCES_H 6#ifndef NET_ATM_RESOURCES_H
7#define NET_ATM_RESOURCES_H 7#define NET_ATM_RESOURCES_H
8 8
9#include <linux/config.h>
10#include <linux/atmdev.h> 9#include <linux/atmdev.h>
11#include <linux/mutex.h> 10#include <linux/mutex.h>
12 11
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index a2e0dd047e9..10a3c0aa839 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -13,7 +13,6 @@
13 * Copyright (C) Hans Alblas PE1AYX (hans@esrac.ele.tue.nl) 13 * Copyright (C) Hans Alblas PE1AYX (hans@esrac.ele.tue.nl)
14 * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) 14 * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr)
15 */ 15 */
16#include <linux/config.h>
17#include <linux/capability.h> 16#include <linux/capability.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
diff --git a/net/ax25/ax25_dev.c b/net/ax25/ax25_dev.c
index dab77efe34a..47e6e790bd6 100644
--- a/net/ax25/ax25_dev.c
+++ b/net/ax25/ax25_dev.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/socket.h> 11#include <linux/socket.h>
diff --git a/net/ax25/ax25_iface.c b/net/ax25/ax25_iface.c
index 3bb152710b7..77ba07c6768 100644
--- a/net/ax25/ax25_iface.c
+++ b/net/ax25/ax25_iface.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/socket.h> 11#include <linux/socket.h>
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index a0b534f80f1..9be5c15e63d 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/errno.h> 9#include <linux/errno.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/socket.h> 11#include <linux/socket.h>
diff --git a/net/ax25/ax25_out.c b/net/ax25/ax25_out.c
index 5d99852b239..d7736e58533 100644
--- a/net/ax25/ax25_out.c
+++ b/net/ax25/ax25_out.c
@@ -8,7 +8,6 @@
8 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 8 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
9 * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de) 9 * Copyright (C) Joerg Reuter DL1BKE (jreuter@yaina.de)
10 */ 10 */
11#include <linux/config.h>
12#include <linux/errno.h> 11#include <linux/errno.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/socket.h> 13#include <linux/socket.h>
diff --git a/net/ax25/ax25_timer.c b/net/ax25/ax25_timer.c
index ec254057f21..72594867fab 100644
--- a/net/ax25/ax25_timer.c
+++ b/net/ax25/ax25_timer.c
@@ -12,7 +12,6 @@
12 * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr) 12 * Copyright (C) Frederic Rible F1OAT (frible@teaser.fr)
13 * Copyright (C) 2002 Ralf Baechle DO1GRB (ralf@gnu.org) 13 * Copyright (C) 2002 Ralf Baechle DO1GRB (ralf@gnu.org)
14 */ 14 */
15#include <linux/config.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/socket.h> 17#include <linux/socket.h>
diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c
index bdb64c36df1..369a75b160f 100644
--- a/net/ax25/sysctl_net_ax25.c
+++ b/net/ax25/sysctl_net_ax25.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com) 7 * Copyright (C) 1996 Mike Shaver (shaver@zeroknowledge.com)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/sysctl.h> 10#include <linux/sysctl.h>
12#include <linux/spinlock.h> 11#include <linux/spinlock.h>
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 469eda0f0df..51f867062e1 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth address family and sockets. */ 25/* Bluetooth address family and sockets. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/types.h> 29#include <linux/types.h>
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c
index d908d49dc9f..e620061fb50 100644
--- a/net/bluetooth/bnep/core.c
+++ b/net/bluetooth/bnep/core.c
@@ -29,7 +29,6 @@
29 * $Id: core.c,v 1.20 2002/08/04 21:23:58 maxk Exp $ 29 * $Id: core.c,v 1.20 2002/08/04 21:23:58 maxk Exp $
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34 33
35#include <linux/kernel.h> 34#include <linux/kernel.h>
diff --git a/net/bluetooth/bnep/netdev.c b/net/bluetooth/bnep/netdev.c
index 921204f95f4..7f7b27db6a8 100644
--- a/net/bluetooth/bnep/netdev.c
+++ b/net/bluetooth/bnep/netdev.c
@@ -29,7 +29,6 @@
29 * $Id: netdev.c,v 1.8 2002/08/04 21:23:58 maxk Exp $ 29 * $Id: netdev.c,v 1.8 2002/08/04 21:23:58 maxk Exp $
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34 33
35#include <linux/socket.h> 34#include <linux/socket.h>
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c
index 2bfe796cf05..28c55835422 100644
--- a/net/bluetooth/bnep/sock.c
+++ b/net/bluetooth/bnep/sock.c
@@ -28,7 +28,6 @@
28 * $Id: sock.c,v 1.4 2002/08/04 21:23:58 maxk Exp $ 28 * $Id: sock.c,v 1.4 2002/08/04 21:23:58 maxk Exp $
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33 32
34#include <linux/types.h> 33#include <linux/types.h>
diff --git a/net/bluetooth/cmtp/capi.c b/net/bluetooth/cmtp/capi.c
index b2e7e38531c..6fb47e00e18 100644
--- a/net/bluetooth/cmtp/capi.c
+++ b/net/bluetooth/cmtp/capi.c
@@ -20,7 +20,6 @@
20 SOFTWARE IS DISCLAIMED. 20 SOFTWARE IS DISCLAIMED.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c
index 901eff7ebe7..182254a580e 100644
--- a/net/bluetooth/cmtp/core.c
+++ b/net/bluetooth/cmtp/core.c
@@ -20,7 +20,6 @@
20 SOFTWARE IS DISCLAIMED. 20 SOFTWARE IS DISCLAIMED.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/net/bluetooth/cmtp/sock.c b/net/bluetooth/cmtp/sock.c
index 8f8fad23f78..10ad7fd91d8 100644
--- a/net/bluetooth/cmtp/sock.c
+++ b/net/bluetooth/cmtp/sock.c
@@ -20,7 +20,6 @@
20 SOFTWARE IS DISCLAIMED. 20 SOFTWARE IS DISCLAIMED.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index f812ed129e5..5c0c2b1ef34 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth HCI connection handling. */ 25/* Bluetooth HCI connection handling. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/types.h> 29#include <linux/types.h>
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index a49a6975092..f67240beb0d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth HCI core. */ 25/* Bluetooth HCI core. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/kmod.h> 28#include <linux/kmod.h>
30 29
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index eb64555d1fb..618bacee1b1 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth HCI event handling. */ 25/* Bluetooth HCI event handling. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/types.h> 29#include <linux/types.h>
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index 97bdec73d17..1a35d343e08 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth HCI sockets. */ 25/* Bluetooth HCI sockets. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/types.h> 29#include <linux/types.h>
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 0ed38740388..19b234c86f3 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -1,6 +1,5 @@
1/* Bluetooth HCI driver model support. */ 1/* Bluetooth HCI driver model support. */
2 2
3#include <linux/config.h>
4#include <linux/kernel.h> 3#include <linux/kernel.h>
5#include <linux/init.h> 4#include <linux/init.h>
6 5
diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c
index cdb9cfafd96..b9c24a55425 100644
--- a/net/bluetooth/hidp/core.c
+++ b/net/bluetooth/hidp/core.c
@@ -20,7 +20,6 @@
20 SOFTWARE IS DISCLAIMED. 20 SOFTWARE IS DISCLAIMED.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/net/bluetooth/hidp/sock.c b/net/bluetooth/hidp/sock.c
index b8f67761b88..099646e4e2e 100644
--- a/net/bluetooth/hidp/sock.c
+++ b/net/bluetooth/hidp/sock.c
@@ -20,7 +20,6 @@
20 SOFTWARE IS DISCLAIMED. 20 SOFTWARE IS DISCLAIMED.
21*/ 21*/
22 22
23#include <linux/config.h>
24#include <linux/module.h> 23#include <linux/module.h>
25 24
26#include <linux/types.h> 25#include <linux/types.h>
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index f6b4a808535..770101177da 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth L2CAP core and sockets. */ 25/* Bluetooth L2CAP core and sockets. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/types.h> 29#include <linux/types.h>
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index ee6a6697991..e5fd0cb70ae 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth kernel library. */ 25/* Bluetooth kernel library. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/kernel.h> 29#include <linux/kernel.h>
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c
index e99010ce8bb..bd46e8927f2 100644
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -27,7 +27,6 @@
27 * $Id: core.c,v 1.42 2002/10/01 23:26:25 maxk Exp $ 27 * $Id: core.c,v 1.42 2002/10/01 23:26:25 maxk Exp $
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <linux/errno.h> 31#include <linux/errno.h>
33#include <linux/kernel.h> 32#include <linux/kernel.h>
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 757d2dd3b02..4e9962c8cfa 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -27,7 +27,6 @@
27 * $Id: sock.c,v 1.24 2002/10/03 01:00:34 maxk Exp $ 27 * $Id: sock.c,v 1.24 2002/10/03 01:00:34 maxk Exp $
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32 31
33#include <linux/types.h> 32#include <linux/types.h>
diff --git a/net/bluetooth/rfcomm/tty.c b/net/bluetooth/rfcomm/tty.c
index b105a715fa9..2ff2d5b87c9 100644
--- a/net/bluetooth/rfcomm/tty.c
+++ b/net/bluetooth/rfcomm/tty.c
@@ -27,7 +27,6 @@
27 * $Id: tty.c,v 1.24 2002/10/03 01:54:38 holtmann Exp $ 27 * $Id: tty.c,v 1.24 2002/10/03 01:54:38 holtmann Exp $
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32 31
33#include <linux/tty.h> 32#include <linux/tty.h>
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index 0c2d13ad69b..a5f1e44db5d 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -24,7 +24,6 @@
24 24
25/* Bluetooth SCO sockets. */ 25/* Bluetooth SCO sockets. */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29 28
30#include <linux/types.h> 29#include <linux/types.h>
diff --git a/net/bridge/br.c b/net/bridge/br.c
index 654401ceb2d..2994387999a 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -13,7 +13,6 @@
13 * 2 of the License, or (at your option) any later version. 13 * 2 of the License, or (at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/netdevice.h> 18#include <linux/netdevice.h>
diff --git a/net/bridge/netfilter/ebt_ulog.c b/net/bridge/netfilter/ebt_ulog.c
index ee5a5176126..02693a230dc 100644
--- a/net/bridge/netfilter/ebt_ulog.c
+++ b/net/bridge/netfilter/ebt_ulog.c
@@ -29,7 +29,6 @@
29 */ 29 */
30 30
31#include <linux/module.h> 31#include <linux/module.h>
32#include <linux/config.h>
33#include <linux/spinlock.h> 32#include <linux/spinlock.h>
34#include <linux/socket.h> 33#include <linux/socket.h>
35#include <linux/skbuff.h> 34#include <linux/skbuff.h>
diff --git a/net/core/dev.c b/net/core/dev.c
index 08976b08df5..066a60a7528 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -76,7 +76,6 @@
76#include <asm/system.h> 76#include <asm/system.h>
77#include <linux/bitops.h> 77#include <linux/bitops.h>
78#include <linux/capability.h> 78#include <linux/capability.h>
79#include <linux/config.h>
80#include <linux/cpu.h> 79#include <linux/cpu.h>
81#include <linux/types.h> 80#include <linux/types.h>
82#include <linux/kernel.h> 81#include <linux/kernel.h>
diff --git a/net/core/link_watch.c b/net/core/link_watch.c
index 0f37266411b..4b36114744c 100644
--- a/net/core/link_watch.c
+++ b/net/core/link_watch.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/netdevice.h> 15#include <linux/netdevice.h>
17#include <linux/if.h> 16#include <linux/if.h>
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 50a8c73caf9..7ad681f5e71 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -15,7 +15,6 @@
15 * Harald Welte Add neighbour cache statistics like rtstat 15 * Harald Welte Add neighbour cache statistics like rtstat
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/module.h> 20#include <linux/module.h>
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 47a6fceb677..13472762b18 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/capability.h> 12#include <linux/capability.h>
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/netdevice.h> 14#include <linux/netdevice.h>
16#include <linux/if_arp.h> 15#include <linux/if_arp.h>
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index f25aac17497..20e5bb73f14 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -16,7 +16,6 @@
16 * Vitaly E. Lavrov RTA_OK arithmetics was wrong. 16 * Vitaly E. Lavrov RTA_OK arithmetics was wrong.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/errno.h> 19#include <linux/errno.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/types.h> 21#include <linux/types.h>
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index a1c9ecf4f1e..7cfbdb215ba 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -38,7 +38,6 @@
38 * The functions in this file will not compile correctly with gcc 2.4.x 38 * The functions in this file will not compile correctly with gcc 2.4.x
39 */ 39 */
40 40
41#include <linux/config.h>
42#include <linux/module.h> 41#include <linux/module.h>
43#include <linux/types.h> 42#include <linux/types.h>
44#include <linux/kernel.h> 43#include <linux/kernel.h>
diff --git a/net/core/sock.c b/net/core/sock.c
index 204a8dec65c..533b9317144 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -92,7 +92,6 @@
92 */ 92 */
93 93
94#include <linux/capability.h> 94#include <linux/capability.h>
95#include <linux/config.h>
96#include <linux/errno.h> 95#include <linux/errno.h>
97#include <linux/types.h> 96#include <linux/types.h>
98#include <linux/socket.h> 97#include <linux/socket.h>
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index 71045365672..02534131d88 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -7,7 +7,6 @@
7 7
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <linux/sysctl.h> 9#include <linux/sysctl.h>
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/socket.h> 11#include <linux/socket.h>
13#include <net/sock.h> 12#include <net/sock.h>
diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h
index ec7a89bb7b3..0adf4b56c34 100644
--- a/net/dccp/ackvec.h
+++ b/net/dccp/ackvec.h
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/compiler.h> 14#include <linux/compiler.h>
16#include <linux/list.h> 15#include <linux/list.h>
17#include <linux/time.h> 16#include <linux/time.h>
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c
index d4f9e2d3345..e9615627dcd 100644
--- a/net/dccp/ccids/ccid2.c
+++ b/net/dccp/ccids/ccid2.c
@@ -30,7 +30,6 @@
30 * - jiffies wrapping 30 * - jiffies wrapping
31 */ 31 */
32 32
33#include <linux/config.h>
34#include "../ccid.h" 33#include "../ccid.h"
35#include "../dccp.h" 34#include "../dccp.h"
36#include "ccid2.h" 35#include "ccid2.h"
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index b4a51d0355a..c39bff706cf 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -34,7 +34,6 @@
34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
35 */ 35 */
36 36
37#include <linux/config.h>
38#include "../ccid.h" 37#include "../ccid.h"
39#include "../dccp.h" 38#include "../dccp.h"
40#include "lib/packet_history.h" 39#include "lib/packet_history.h"
diff --git a/net/dccp/ccids/ccid3.h b/net/dccp/ccids/ccid3.h
index f18b96d4e5a..5ade4f668b2 100644
--- a/net/dccp/ccids/ccid3.h
+++ b/net/dccp/ccids/ccid3.h
@@ -36,7 +36,6 @@
36#ifndef _DCCP_CCID3_H_ 36#ifndef _DCCP_CCID3_H_
37#define _DCCP_CCID3_H_ 37#define _DCCP_CCID3_H_
38 38
39#include <linux/config.h>
40#include <linux/list.h> 39#include <linux/list.h>
41#include <linux/time.h> 40#include <linux/time.h>
42#include <linux/types.h> 41#include <linux/types.h>
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c
index 4c01a54143a..5d7b7d86438 100644
--- a/net/dccp/ccids/lib/loss_interval.c
+++ b/net/dccp/ccids/lib/loss_interval.c
@@ -11,7 +11,6 @@
11 * (at your option) any later version. 11 * (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16 15
17#include "loss_interval.h" 16#include "loss_interval.h"
diff --git a/net/dccp/ccids/lib/loss_interval.h b/net/dccp/ccids/lib/loss_interval.h
index 417d9d82df3..43bf78269d1 100644
--- a/net/dccp/ccids/lib/loss_interval.h
+++ b/net/dccp/ccids/lib/loss_interval.h
@@ -13,7 +13,6 @@
13 * any later version. 13 * any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/list.h> 16#include <linux/list.h>
18#include <linux/slab.h> 17#include <linux/slab.h>
19#include <linux/time.h> 18#include <linux/time.h>
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index d3f9d205383..ad98d6a322e 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -34,7 +34,6 @@
34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 34 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/string.h> 38#include <linux/string.h>
40 39
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h
index 122e96737ff..673c209e4e8 100644
--- a/net/dccp/ccids/lib/packet_history.h
+++ b/net/dccp/ccids/lib/packet_history.h
@@ -37,7 +37,6 @@
37#ifndef _DCCP_PKT_HIST_ 37#ifndef _DCCP_PKT_HIST_
38#define _DCCP_PKT_HIST_ 38#define _DCCP_PKT_HIST_
39 39
40#include <linux/config.h>
41#include <linux/list.h> 40#include <linux/list.h>
42#include <linux/slab.h> 41#include <linux/slab.h>
43#include <linux/time.h> 42#include <linux/time.h>
diff --git a/net/dccp/ccids/lib/tfrc_equation.c b/net/dccp/ccids/lib/tfrc_equation.c
index add3cae65e2..4fd2ebebf5a 100644
--- a/net/dccp/ccids/lib/tfrc_equation.c
+++ b/net/dccp/ccids/lib/tfrc_equation.c
@@ -12,7 +12,6 @@
12 * (at your option) any later version. 12 * (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17 16
18#include <asm/div64.h> 17#include <asm/div64.h>
diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
index 1fe50914868..d00a2f4ee5d 100644
--- a/net/dccp/dccp.h
+++ b/net/dccp/dccp.h
@@ -12,7 +12,6 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/dccp.h> 15#include <linux/dccp.h>
17#include <net/snmp.h> 16#include <net/snmp.h>
18#include <net/sock.h> 17#include <net/sock.h>
diff --git a/net/dccp/diag.c b/net/dccp/diag.c
index 0f25dc39596..0f3745585a9 100644
--- a/net/dccp/diag.c
+++ b/net/dccp/diag.c
@@ -9,7 +9,6 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/config.h>
13 12
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/inet_diag.h> 14#include <linux/inet_diag.h>
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index b39e2a59788..a1b0682ee77 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15 14
16#include "dccp.h" 15#include "dccp.h"
diff --git a/net/dccp/input.c b/net/dccp/input.c
index bfc53665516..7f9dc6ac58c 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/dccp.h> 13#include <linux/dccp.h>
15#include <linux/skbuff.h> 14#include <linux/skbuff.h>
16 15
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index f2c011fd2ba..c3073e7e81d 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/dccp.h> 13#include <linux/dccp.h>
15#include <linux/icmp.h> 14#include <linux/icmp.h>
16#include <linux/module.h> 15#include <linux/module.h>
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 65e2ab0886e..ff42bc43263 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/random.h> 16#include <linux/random.h>
18#include <linux/xfrm.h> 17#include <linux/xfrm.h>
diff --git a/net/dccp/ipv6.h b/net/dccp/ipv6.h
index e4d4e930927..6eef81fdbe5 100644
--- a/net/dccp/ipv6.h
+++ b/net/dccp/ipv6.h
@@ -11,7 +11,6 @@
11 * published by the Free Software Foundation. 11 * published by the Free Software Foundation.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/dccp.h> 14#include <linux/dccp.h>
16#include <linux/ipv6.h> 15#include <linux/ipv6.h>
17 16
diff --git a/net/dccp/minisocks.c b/net/dccp/minisocks.c
index c0349e5b055..9045438d6b3 100644
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/dccp.h> 13#include <linux/dccp.h>
15#include <linux/skbuff.h> 14#include <linux/skbuff.h>
16#include <linux/timer.h> 15#include <linux/timer.h>
diff --git a/net/dccp/options.c b/net/dccp/options.c
index e9feb2a0c77..c3cda1e39aa 100644
--- a/net/dccp/options.c
+++ b/net/dccp/options.c
@@ -11,7 +11,6 @@
11 * as published by the Free Software Foundation; either version 11 * as published by the Free Software Foundation; either version
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/dccp.h> 14#include <linux/dccp.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/types.h> 16#include <linux/types.h>
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 7409e4a3abd..58669beee13 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/dccp.h> 13#include <linux/dccp.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
16#include <linux/skbuff.h> 15#include <linux/skbuff.h>
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 5317fd3e669..f4f0627ea41 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -9,7 +9,6 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/dccp.h> 12#include <linux/dccp.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/types.h> 14#include <linux/types.h>
diff --git a/net/dccp/sysctl.c b/net/dccp/sysctl.c
index 64c89e9c229..c1ba9451bc3 100644
--- a/net/dccp/sysctl.c
+++ b/net/dccp/sysctl.c
@@ -9,7 +9,6 @@
9 * as published by the Free Software Foundation. 9 * as published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/mm.h> 12#include <linux/mm.h>
14#include <linux/sysctl.h> 13#include <linux/sysctl.h>
15 14
diff --git a/net/dccp/timer.c b/net/dccp/timer.c
index 5244415e5f1..8447742f561 100644
--- a/net/dccp/timer.c
+++ b/net/dccp/timer.c
@@ -10,7 +10,6 @@
10 * 2 of the License, or (at your option) any later version. 10 * 2 of the License, or (at your option) any later version.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/dccp.h> 13#include <linux/dccp.h>
15#include <linux/skbuff.h> 14#include <linux/skbuff.h>
16 15
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index 2b289ef20ab..5486247735f 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -99,7 +99,6 @@ Version 0.0.6 2.1.110 07-aug-98 Eduardo Marcelo Serrat
99 dn_bind fixes 99 dn_bind fixes
100*******************************************************************************/ 100*******************************************************************************/
101 101
102#include <linux/config.h>
103#include <linux/module.h> 102#include <linux/module.h>
104#include <linux/errno.h> 103#include <linux/errno.h>
105#include <linux/types.h> 104#include <linux/types.h>
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index a26ff9f4457..98a25208440 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -24,7 +24,6 @@
24 * devices. All mtu based now. 24 * devices. All mtu based now.
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/capability.h> 27#include <linux/capability.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/moduleparam.h> 29#include <linux/moduleparam.h>
diff --git a/net/decnet/dn_fib.c b/net/decnet/dn_fib.c
index bd4ce8681a1..0375077391b 100644
--- a/net/decnet/dn_fib.c
+++ b/net/decnet/dn_fib.c
@@ -17,7 +17,6 @@
17 * this code was copied from it. 17 * this code was copied from it.
18 * 18 *
19 */ 19 */
20#include <linux/config.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/net.h> 21#include <linux/net.h>
23#include <linux/socket.h> 22#include <linux/socket.h>
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c
index 66e230c3b32..5ce9c9e0565 100644
--- a/net/decnet/dn_neigh.c
+++ b/net/decnet/dn_neigh.c
@@ -24,7 +24,6 @@
24 * 24 *
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/net.h> 27#include <linux/net.h>
29#include <linux/module.h> 28#include <linux/module.h>
30#include <linux/socket.h> 29#include <linux/socket.h>
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c
index a2ba9db1c37..86f7f3b28e7 100644
--- a/net/decnet/dn_nsp_in.c
+++ b/net/decnet/dn_nsp_in.c
@@ -45,7 +45,6 @@
45 GNU General Public License for more details. 45 GNU General Public License for more details.
46*******************************************************************************/ 46*******************************************************************************/
47 47
48#include <linux/config.h>
49#include <linux/errno.h> 48#include <linux/errno.h>
50#include <linux/types.h> 49#include <linux/types.h>
51#include <linux/socket.h> 50#include <linux/socket.h>
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 5abf7057af0..1355614ec11 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -55,7 +55,6 @@
55 GNU General Public License for more details. 55 GNU General Public License for more details.
56*******************************************************************************/ 56*******************************************************************************/
57 57
58#include <linux/config.h>
59#include <linux/errno.h> 58#include <linux/errno.h>
60#include <linux/types.h> 59#include <linux/types.h>
61#include <linux/socket.h> 60#include <linux/socket.h>
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index 446faafe206..06e785fe575 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -13,7 +13,6 @@
13 * Changes: 13 * Changes:
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/string.h> 16#include <linux/string.h>
18#include <linux/net.h> 17#include <linux/net.h>
19#include <linux/socket.h> 18#include <linux/socket.h>
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c
index 0ebc46af1bd..37d9d0a1ac8 100644
--- a/net/decnet/dn_table.c
+++ b/net/decnet/dn_table.c
@@ -12,7 +12,6 @@
12 * Changes: 12 * Changes:
13 * 13 *
14 */ 14 */
15#include <linux/config.h>
16#include <linux/string.h> 15#include <linux/string.h>
17#include <linux/net.h> 16#include <linux/net.h>
18#include <linux/socket.h> 17#include <linux/socket.h>
diff --git a/net/decnet/sysctl_net_decnet.c b/net/decnet/sysctl_net_decnet.c
index bda5920215f..e246f054f36 100644
--- a/net/decnet/sysctl_net_decnet.c
+++ b/net/decnet/sysctl_net_decnet.c
@@ -13,7 +13,6 @@
13 * Steve Whitehouse - Memory buffer settings, like the tcp ones 13 * Steve Whitehouse - Memory buffer settings, like the tcp ones
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/mm.h> 16#include <linux/mm.h>
18#include <linux/sysctl.h> 17#include <linux/sysctl.h>
19#include <linux/fs.h> 18#include <linux/fs.h>
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 868265619db..309ae4c6549 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14 13
15#include <linux/types.h> 14#include <linux/types.h>
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index c971f14712e..387c71c584e 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -51,7 +51,6 @@
51#include <linux/etherdevice.h> 51#include <linux/etherdevice.h>
52#include <linux/skbuff.h> 52#include <linux/skbuff.h>
53#include <linux/errno.h> 53#include <linux/errno.h>
54#include <linux/config.h>
55#include <linux/init.h> 54#include <linux/init.h>
56#include <linux/if_ether.h> 55#include <linux/if_ether.h>
57#include <net/dst.h> 56#include <net/dst.h>
diff --git a/net/ieee80211/ieee80211_crypt_ccmp.c b/net/ieee80211/ieee80211_crypt_ccmp.c
index 78b2d13e80e..492647382ad 100644
--- a/net/ieee80211/ieee80211_crypt_ccmp.c
+++ b/net/ieee80211/ieee80211_crypt_ccmp.c
@@ -9,7 +9,6 @@
9 * more details. 9 * more details.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c
index 3fa5df2e1f0..34dba0ba545 100644
--- a/net/ieee80211/ieee80211_crypt_tkip.c
+++ b/net/ieee80211/ieee80211_crypt_tkip.c
@@ -9,7 +9,6 @@
9 * more details. 9 * more details.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/net/ieee80211/ieee80211_crypt_wep.c b/net/ieee80211/ieee80211_crypt_wep.c
index 649e581fa56..c5a87724aab 100644
--- a/net/ieee80211/ieee80211_crypt_wep.c
+++ b/net/ieee80211/ieee80211_crypt_wep.c
@@ -9,7 +9,6 @@
9 * more details. 9 * more details.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/init.h> 13#include <linux/init.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/net/ieee80211/ieee80211_geo.c b/net/ieee80211/ieee80211_geo.c
index 192243ab35e..305a09de85a 100644
--- a/net/ieee80211/ieee80211_geo.c
+++ b/net/ieee80211/ieee80211_geo.c
@@ -24,7 +24,6 @@
24 24
25******************************************************************************/ 25******************************************************************************/
26#include <linux/compiler.h> 26#include <linux/compiler.h>
27#include <linux/config.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/if_arp.h> 28#include <linux/if_arp.h>
30#include <linux/in6.h> 29#include <linux/in6.h>
diff --git a/net/ieee80211/ieee80211_module.c b/net/ieee80211/ieee80211_module.c
index 2cb84d84f67..13b1e5fff7e 100644
--- a/net/ieee80211/ieee80211_module.c
+++ b/net/ieee80211/ieee80211_module.c
@@ -31,7 +31,6 @@
31*******************************************************************************/ 31*******************************************************************************/
32 32
33#include <linux/compiler.h> 33#include <linux/compiler.h>
34#include <linux/config.h>
35#include <linux/errno.h> 34#include <linux/errno.h>
36#include <linux/if_arp.h> 35#include <linux/if_arp.h>
37#include <linux/in6.h> 36#include <linux/in6.h>
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c
index 2bf567fd5a1..47ccf159372 100644
--- a/net/ieee80211/ieee80211_rx.c
+++ b/net/ieee80211/ieee80211_rx.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16#include <linux/compiler.h> 16#include <linux/compiler.h>
17#include <linux/config.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/if_arp.h> 18#include <linux/if_arp.h>
20#include <linux/in6.h> 19#include <linux/in6.h>
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c
index 6a5de1b8445..de148ae594f 100644
--- a/net/ieee80211/ieee80211_tx.c
+++ b/net/ieee80211/ieee80211_tx.c
@@ -24,7 +24,6 @@
24 24
25******************************************************************************/ 25******************************************************************************/
26#include <linux/compiler.h> 26#include <linux/compiler.h>
27#include <linux/config.h>
28#include <linux/errno.h> 27#include <linux/errno.h>
29#include <linux/if_arp.h> 28#include <linux/if_arp.h>
30#include <linux/in6.h> 29#include <linux/in6.h>
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c
index c7782230080..8e748be36c5 100644
--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <net/ip.h> 2#include <net/ip.h>
4#include <net/xfrm.h> 3#include <net/xfrm.h>
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 4749d504c62..7b51b3bdb54 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -80,7 +80,6 @@
80#include <linux/kernel.h> 80#include <linux/kernel.h>
81#include <linux/sched.h> 81#include <linux/sched.h>
82#include <linux/capability.h> 82#include <linux/capability.h>
83#include <linux/config.h>
84#include <linux/socket.h> 83#include <linux/socket.h>
85#include <linux/sockios.h> 84#include <linux/sockios.h>
86#include <linux/errno.h> 85#include <linux/errno.h>
diff --git a/net/ipv4/datagram.c b/net/ipv4/datagram.c
index c1b42b5257f..ec5da4fbd9f 100644
--- a/net/ipv4/datagram.c
+++ b/net/ipv4/datagram.c
@@ -11,7 +11,6 @@
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/ip.h> 16#include <linux/ip.h>
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 54419b27686..a7c65e9e5ec 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -27,7 +27,6 @@
27 * if no match found. 27 * if no match found.
28 */ 28 */
29 29
30#include <linux/config.h>
31 30
32#include <asm/uaccess.h> 31#include <asm/uaccess.h>
33#include <asm/system.h> 32#include <asm/system.h>
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 9bbdd449455..4e112738b3f 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <net/ip.h> 2#include <net/ip.h>
4#include <net/xfrm.h> 3#include <net/xfrm.h>
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 31387abf53a..ba2a70745a6 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -15,7 +15,6 @@
15 * 2 of the License, or (at your option) any later version. 15 * 2 of the License, or (at your option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <asm/uaccess.h> 19#include <asm/uaccess.h>
21#include <asm/system.h> 20#include <asm/system.h>
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index e2890ec8159..3c1d32ad35f 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -15,7 +15,6 @@
15 * 2 of the License, or (at your option) any later version. 15 * 2 of the License, or (at your option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <asm/uaccess.h> 18#include <asm/uaccess.h>
20#include <asm/system.h> 19#include <asm/system.h>
21#include <linux/bitops.h> 20#include <linux/bitops.h>
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index ec566f3e66c..6c642d11d4c 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -19,7 +19,6 @@
19 * Marc Boucher : routing by fwmark 19 * Marc Boucher : routing by fwmark
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <asm/uaccess.h> 22#include <asm/uaccess.h>
24#include <asm/system.h> 23#include <asm/system.h>
25#include <linux/bitops.h> 24#include <linux/bitops.h>
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c
index 0f4145babb1..5f87533684d 100644
--- a/net/ipv4/fib_semantics.c
+++ b/net/ipv4/fib_semantics.c
@@ -15,7 +15,6 @@
15 * 2 of the License, or (at your option) any later version. 15 * 2 of the License, or (at your option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <asm/uaccess.h> 18#include <asm/uaccess.h>
20#include <asm/system.h> 19#include <asm/system.h>
21#include <linux/bitops.h> 20#include <linux/bitops.h>
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 95a639f2e3d..1cb65305e10 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -52,7 +52,6 @@
52 52
53#define VERSION "0.407" 53#define VERSION "0.407"
54 54
55#include <linux/config.h>
56#include <asm/uaccess.h> 55#include <asm/uaccess.h>
57#include <asm/system.h> 56#include <asm/system.h>
58#include <asm/bitops.h> 57#include <asm/bitops.h>
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 017900172f7..4c86ac3d882 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -64,7 +64,6 @@
64 * 64 *
65 */ 65 */
66 66
67#include <linux/config.h>
68#include <linux/module.h> 67#include <linux/module.h>
69#include <linux/types.h> 68#include <linux/types.h>
70#include <linux/jiffies.h> 69#include <linux/jiffies.h>
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index ab680c851aa..d299c8e547d 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -72,7 +72,6 @@
72 * Vinay Kulkarni 72 * Vinay Kulkarni
73 */ 73 */
74 74
75#include <linux/config.h>
76#include <linux/module.h> 75#include <linux/module.h>
77#include <asm/uaccess.h> 76#include <asm/uaccess.h>
78#include <asm/system.h> 77#include <asm/system.h>
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 9a01bb81f8b..e50a1bfd7cc 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -13,7 +13,6 @@
13 * 2 of the License, or(at your option) any later version. 13 * 2 of the License, or(at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/jhash.h> 17#include <linux/jhash.h>
19 18
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 457db99c76d..8e7e41b66c7 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -11,7 +11,6 @@
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/fcntl.h> 16#include <linux/fcntl.h>
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index ee9b5515b9a..95fac553299 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -13,7 +13,6 @@
13 * 2 of the License, or (at your option) any later version. 13 * 2 of the License, or (at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/random.h> 17#include <linux/random.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index 417f126c749..cdd805344c6 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -8,7 +8,6 @@
8 * From code orinally in TCP 8 * From code orinally in TCP
9 */ 9 */
10 10
11#include <linux/config.h>
12 11
13#include <net/inet_hashtables.h> 12#include <net/inet_hashtables.h>
14#include <net/inet_timewait_sock.h> 13#include <net/inet_timewait_sock.h>
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index 9f0bb529ab7..a22d11d2911 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -21,7 +21,6 @@
21 * Mike McLagan : Routing by source 21 * Mike McLagan : Routing by source
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/types.h> 24#include <linux/types.h>
26#include <linux/mm.h> 25#include <linux/mm.h>
27#include <linux/sched.h> 26#include <linux/sched.h>
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index da734c43917..b84b53a4752 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -23,7 +23,6 @@
23 */ 23 */
24 24
25#include <linux/compiler.h> 25#include <linux/compiler.h>
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/mm.h> 28#include <linux/mm.h>
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index ab99bebdcdc..6ff9b10d956 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -11,7 +11,6 @@
11 */ 11 */
12 12
13#include <linux/capability.h> 13#include <linux/capability.h>
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/sched.h> 16#include <linux/sched.h>
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index c9026dbf4c9..e1a7dba2fa8 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -121,7 +121,6 @@
121#include <linux/kernel.h> 121#include <linux/kernel.h>
122#include <linux/string.h> 122#include <linux/string.h>
123#include <linux/errno.h> 123#include <linux/errno.h>
124#include <linux/config.h>
125 124
126#include <linux/net.h> 125#include <linux/net.h>
127#include <linux/socket.h> 126#include <linux/socket.h>
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 7624fd1d8f9..ca0e714613f 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -53,7 +53,6 @@
53#include <linux/mm.h> 53#include <linux/mm.h>
54#include <linux/string.h> 54#include <linux/string.h>
55#include <linux/errno.h> 55#include <linux/errno.h>
56#include <linux/config.h>
57 56
58#include <linux/socket.h> 57#include <linux/socket.h>
59#include <linux/sockios.h> 58#include <linux/sockios.h>
@@ -744,7 +743,7 @@ static inline int ip_ufo_append_data(struct sock *sk,
744 if (!err) { 743 if (!err) {
745 /* specify the length of each IP datagram fragment*/ 744 /* specify the length of each IP datagram fragment*/
746 skb_shinfo(skb)->gso_size = mtu - fragheaderlen; 745 skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
747 skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4; 746 skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
748 __skb_queue_tail(&sk->sk_write_queue, skb); 747 __skb_queue_tail(&sk->sk_write_queue, skb);
749 748
750 return 0; 749 return 0;
@@ -1089,7 +1088,7 @@ ssize_t ip_append_page(struct sock *sk, struct page *page,
1089 if ((sk->sk_protocol == IPPROTO_UDP) && 1088 if ((sk->sk_protocol == IPPROTO_UDP) &&
1090 (rt->u.dst.dev->features & NETIF_F_UFO)) { 1089 (rt->u.dst.dev->features & NETIF_F_UFO)) {
1091 skb_shinfo(skb)->gso_size = mtu - fragheaderlen; 1090 skb_shinfo(skb)->gso_size = mtu - fragheaderlen;
1092 skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4; 1091 skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
1093 } 1092 }
1094 1093
1095 1094
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index 12e0bf19f24..84f43a3c909 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -17,7 +17,6 @@
17 * Mike McLagan : Routing by source 17 * Mike McLagan : Routing by source
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/types.h> 21#include <linux/types.h>
23#include <linux/mm.h> 22#include <linux/mm.h>
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index 3ed8b57a100..8e037484753 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -13,7 +13,6 @@
13 * - Compression stats. 13 * - Compression stats.
14 * - Adaptive compression. 14 * - Adaptive compression.
15 */ 15 */
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <asm/scatterlist.h> 17#include <asm/scatterlist.h>
19#include <asm/semaphore.h> 18#include <asm/semaphore.h>
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
index ea398ee43f2..3291d5192aa 100644
--- a/net/ipv4/ipip.c
+++ b/net/ipv4/ipip.c
@@ -94,7 +94,6 @@
94 94
95 95
96#include <linux/capability.h> 96#include <linux/capability.h>
97#include <linux/config.h>
98#include <linux/module.h> 97#include <linux/module.h>
99#include <linux/types.h> 98#include <linux/types.h>
100#include <linux/sched.h> 99#include <linux/sched.h>
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 717ab7d6d7b..ba33f8621c6 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -28,7 +28,6 @@
28 * 28 *
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <asm/system.h> 31#include <asm/system.h>
33#include <asm/uaccess.h> 32#include <asm/uaccess.h>
34#include <linux/types.h> 33#include <linux/types.h>
diff --git a/net/ipv4/ipvs/ip_vs_est.c b/net/ipv4/ipvs/ip_vs_est.c
index c453e1e57f4..4c1940381ba 100644
--- a/net/ipv4/ipvs/ip_vs_est.c
+++ b/net/ipv4/ipvs/ip_vs_est.c
@@ -13,7 +13,6 @@
13 * Changes: 13 * Changes:
14 * 14 *
15 */ 15 */
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/jiffies.h> 17#include <linux/jiffies.h>
19#include <linux/slab.h> 18#include <linux/slab.h>
diff --git a/net/ipv4/multipath_drr.c b/net/ipv4/multipath_drr.c
index db67373f9b3..252e837b17a 100644
--- a/net/ipv4/multipath_drr.c
+++ b/net/ipv4/multipath_drr.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <asm/system.h> 15#include <asm/system.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/net/ipv4/multipath_random.c b/net/ipv4/multipath_random.c
index 5249dbe7c55..b8c289f247c 100644
--- a/net/ipv4/multipath_random.c
+++ b/net/ipv4/multipath_random.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <asm/system.h> 15#include <asm/system.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/net/ipv4/multipath_rr.c b/net/ipv4/multipath_rr.c
index b6cd2870478..bba5abe5542 100644
--- a/net/ipv4/multipath_rr.c
+++ b/net/ipv4/multipath_rr.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <asm/system.h> 15#include <asm/system.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/net/ipv4/multipath_wrandom.c b/net/ipv4/multipath_wrandom.c
index 342d0b9098f..d25ec4ae09e 100644
--- a/net/ipv4/multipath_wrandom.c
+++ b/net/ipv4/multipath_wrandom.c
@@ -12,7 +12,6 @@
12 * 2 of the License, or (at your option) any later version. 12 * 2 of the License, or (at your option) any later version.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <asm/system.h> 15#include <asm/system.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
18#include <linux/types.h> 17#include <linux/types.h>
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index ad39bf64056..80c73ca9011 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -9,7 +9,6 @@
9 * 9 *
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/skbuff.h> 13#include <linux/skbuff.h>
15#include <linux/netdevice.h> 14#include <linux/netdevice.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index 7e4cf9a4d15..aa459177c3f 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -17,7 +17,6 @@
17 * - export ip_conntrack[_expect]_{find_get,put} functions 17 * - export ip_conntrack[_expect]_{find_get,put} functions
18 * */ 18 * */
19 19
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/icmp.h> 21#include <linux/icmp.h>
23#include <linux/ip.h> 22#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_ftp.c b/net/ipv4/netfilter/ip_conntrack_ftp.c
index 4dcf526c394..1d18c863f06 100644
--- a/net/ipv4/netfilter/ip_conntrack_ftp.c
+++ b/net/ipv4/netfilter/ip_conntrack_ftp.c
@@ -8,7 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/netfilter.h> 12#include <linux/netfilter.h>
14#include <linux/ip.h> 13#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_h323.c b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
index 0665674218c..af35235672d 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_h323.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_h323.c
@@ -11,7 +11,6 @@
11 * For more information, please see http://nath323.sourceforge.net/ 11 * For more information, please see http://nath323.sourceforge.net/
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/netfilter.h> 15#include <linux/netfilter.h>
17#include <linux/ip.h> 16#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
index 8ccfe17bb25..b020a33e65e 100644
--- a/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
+++ b/net/ipv4/netfilter/ip_conntrack_helper_pptp.c
@@ -46,7 +46,6 @@
46 * 46 *
47 */ 47 */
48 48
49#include <linux/config.h>
50#include <linux/module.h> 49#include <linux/module.h>
51#include <linux/netfilter.h> 50#include <linux/netfilter.h>
52#include <linux/ip.h> 51#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_irc.c b/net/ipv4/netfilter/ip_conntrack_irc.c
index a2ac5ce544b..44889075f3b 100644
--- a/net/ipv4/netfilter/ip_conntrack_irc.c
+++ b/net/ipv4/netfilter/ip_conntrack_irc.c
@@ -22,7 +22,6 @@
22 * 22 *
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/netfilter.h> 26#include <linux/netfilter.h>
28#include <linux/ip.h> 27#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_gre.c b/net/ipv4/netfilter/ip_conntrack_proto_gre.c
index 21ee124c046..4ee016c427b 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_gre.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_gre.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/timer.h> 28#include <linux/timer.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
index 0416073c560..2d3612cd5f1 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
@@ -254,7 +254,7 @@ static int do_basic_checks(struct ip_conntrack *conntrack,
254 } 254 }
255 255
256 DEBUGP("Basic checks passed\n"); 256 DEBUGP("Basic checks passed\n");
257 return 0; 257 return count == 0;
258} 258}
259 259
260static int new_state(enum ip_conntrack_dir dir, 260static int new_state(enum ip_conntrack_dir dir,
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
index c5c2ce5cdeb..fb920e76ec1 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
@@ -19,7 +19,6 @@
19 * version 2.2 19 * version 2.2
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/sched.h> 23#include <linux/sched.h>
25#include <linux/timer.h> 24#include <linux/timer.h>
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
index 88445aac3f2..7bd3c22003a 100644
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
@@ -12,7 +12,6 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/ip.h> 16#include <linux/ip.h>
18#include <linux/netfilter.h> 17#include <linux/netfilter.h>
diff --git a/net/ipv4/netfilter/ip_nat_helper.c b/net/ipv4/netfilter/ip_nat_helper.c
index 5d506e0564d..cbcaa45370a 100644
--- a/net/ipv4/netfilter/ip_nat_helper.c
+++ b/net/ipv4/netfilter/ip_nat_helper.c
@@ -15,7 +15,6 @@
15 * - make ip_nat_resize_packet more generic (TCP and UDP) 15 * - make ip_nat_resize_packet more generic (TCP and UDP)
16 * - add ip_nat_mangle_udp_packet 16 * - add ip_nat_mangle_udp_packet
17 */ 17 */
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kmod.h> 19#include <linux/kmod.h>
21#include <linux/types.h> 20#include <linux/types.h>
diff --git a/net/ipv4/netfilter/ip_nat_helper_pptp.c b/net/ipv4/netfilter/ip_nat_helper_pptp.c
index f3977726ff0..1d149964dc3 100644
--- a/net/ipv4/netfilter/ip_nat_helper_pptp.c
+++ b/net/ipv4/netfilter/ip_nat_helper_pptp.c
@@ -35,7 +35,6 @@
35 * 35 *
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/ip.h> 39#include <linux/ip.h>
41#include <linux/tcp.h> 40#include <linux/tcp.h>
diff --git a/net/ipv4/netfilter/ip_nat_proto_gre.c b/net/ipv4/netfilter/ip_nat_proto_gre.c
index 96ceabaec40..38acfdf540e 100644
--- a/net/ipv4/netfilter/ip_nat_proto_gre.c
+++ b/net/ipv4/netfilter/ip_nat_proto_gre.c
@@ -23,7 +23,6 @@
23 * 23 *
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28#include <linux/ip.h> 27#include <linux/ip.h>
29#include <linux/netfilter_ipv4/ip_nat.h> 28#include <linux/netfilter_ipv4/ip_nat.h>
diff --git a/net/ipv4/netfilter/ip_nat_snmp_basic.c b/net/ipv4/netfilter/ip_nat_snmp_basic.c
index d20d557f915..0b1b416759c 100644
--- a/net/ipv4/netfilter/ip_nat_snmp_basic.c
+++ b/net/ipv4/netfilter/ip_nat_snmp_basic.c
@@ -43,7 +43,6 @@
43 * 2000-08-06: Convert to new helper API (Harald Welte). 43 * 2000-08-06: Convert to new helper API (Harald Welte).
44 * 44 *
45 */ 45 */
46#include <linux/config.h>
47#include <linux/in.h> 46#include <linux/in.h>
48#include <linux/module.h> 47#include <linux/module.h>
49#include <linux/types.h> 48#include <linux/types.h>
diff --git a/net/ipv4/netfilter/ip_nat_standalone.c b/net/ipv4/netfilter/ip_nat_standalone.c
index 67e676783da..17de077a790 100644
--- a/net/ipv4/netfilter/ip_nat_standalone.c
+++ b/net/ipv4/netfilter/ip_nat_standalone.c
@@ -18,7 +18,6 @@
18 * - now capable of multiple expectations for one master 18 * - now capable of multiple expectations for one master
19 * */ 19 * */
20 20
21#include <linux/config.h>
22#include <linux/types.h> 21#include <linux/types.h>
23#include <linux/icmp.h> 22#include <linux/icmp.h>
24#include <linux/ip.h> 23#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 7aaaf92efb5..fc5bdd5eb7d 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -14,7 +14,6 @@
14 * 08 Oct 2005 Harald Welte <lafore@netfilter.org> 14 * 08 Oct 2005 Harald Welte <lafore@netfilter.org>
15 * - Generalize into "x_tables" layer and "{ip,ip6,arp}_tables" 15 * - Generalize into "x_tables" layer and "{ip,ip6,arp}_tables"
16 */ 16 */
17#include <linux/config.h>
18#include <linux/cache.h> 17#include <linux/cache.h>
19#include <linux/capability.h> 18#include <linux/capability.h>
20#include <linux/skbuff.h> 19#include <linux/skbuff.h>
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index dbc83c5d7aa..cbffeae3f56 100644
--- a/net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/config.h>
14#include <linux/proc_fs.h> 13#include <linux/proc_fs.h>
15#include <linux/jhash.h> 14#include <linux/jhash.h>
16#include <linux/bitops.h> 15#include <linux/bitops.h>
diff --git a/net/ipv4/netfilter/ipt_MASQUERADE.c b/net/ipv4/netfilter/ipt_MASQUERADE.c
index 8b3e7f99b86..ebd94f2abf0 100644
--- a/net/ipv4/netfilter/ipt_MASQUERADE.c
+++ b/net/ipv4/netfilter/ipt_MASQUERADE.c
@@ -9,7 +9,6 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/types.h> 12#include <linux/types.h>
14#include <linux/inetdevice.h> 13#include <linux/inetdevice.h>
15#include <linux/ip.h> 14#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ipt_NETMAP.c b/net/ipv4/netfilter/ipt_NETMAP.c
index 2fcf1075b02..736c4b5a86a 100644
--- a/net/ipv4/netfilter/ipt_NETMAP.c
+++ b/net/ipv4/netfilter/ipt_NETMAP.c
@@ -10,7 +10,6 @@
10 * published by the Free Software Foundation. 10 * published by the Free Software Foundation.
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/ip.h> 13#include <linux/ip.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/netdevice.h> 15#include <linux/netdevice.h>
diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index 431a3ce6f7b..269bc2067cb 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -12,7 +12,6 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/skbuff.h> 16#include <linux/skbuff.h>
18#include <linux/ip.h> 17#include <linux/ip.h>
diff --git a/net/ipv4/netfilter/ipt_ULOG.c b/net/ipv4/netfilter/ipt_ULOG.c
index c84cc03389d..d7dd7fe7051 100644
--- a/net/ipv4/netfilter/ipt_ULOG.c
+++ b/net/ipv4/netfilter/ipt_ULOG.c
@@ -47,7 +47,6 @@
47 */ 47 */
48 48
49#include <linux/module.h> 49#include <linux/module.h>
50#include <linux/config.h>
51#include <linux/spinlock.h> 50#include <linux/spinlock.h>
52#include <linux/socket.h> 51#include <linux/socket.h>
53#include <linux/skbuff.h> 52#include <linux/skbuff.h>
diff --git a/net/ipv4/netfilter/iptable_mangle.c b/net/ipv4/netfilter/iptable_mangle.c
index 397b95cc026..4e7998beda6 100644
--- a/net/ipv4/netfilter/iptable_mangle.c
+++ b/net/ipv4/netfilter/iptable_mangle.c
@@ -10,7 +10,6 @@
10 * 10 *
11 * Extended to all five netfilter hooks by Brad Chapman & Harald Welte 11 * Extended to all five netfilter hooks by Brad Chapman & Harald Welte
12 */ 12 */
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/netfilter_ipv4/ip_tables.h> 14#include <linux/netfilter_ipv4/ip_tables.h>
16#include <linux/netdevice.h> 15#include <linux/netdevice.h>
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
index 8cc8e1b3677..0af803df82b 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
@@ -14,7 +14,6 @@
14 * Derived from net/ipv4/netfilter/ip_conntrack_standalone.c 14 * Derived from net/ipv4/netfilter/ip_conntrack_standalone.c
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/ip.h> 18#include <linux/ip.h>
20#include <linux/netfilter.h> 19#include <linux/netfilter.h>
diff --git a/net/ipv4/protocol.c b/net/ipv4/protocol.c
index 291831e792a..05f5114828e 100644
--- a/net/ipv4/protocol.c
+++ b/net/ipv4/protocol.c
@@ -32,7 +32,6 @@
32#include <linux/kernel.h> 32#include <linux/kernel.h>
33#include <linux/sched.h> 33#include <linux/sched.h>
34#include <linux/string.h> 34#include <linux/string.h>
35#include <linux/config.h>
36#include <linux/socket.h> 35#include <linux/socket.h>
37#include <linux/in.h> 36#include <linux/in.h>
38#include <linux/inet.h> 37#include <linux/inet.h>
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 60b11aece5c..da44fabf4dc 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -64,7 +64,6 @@
64 * 2 of the License, or (at your option) any later version. 64 * 2 of the License, or (at your option) any later version.
65 */ 65 */
66 66
67#include <linux/config.h>
68#include <linux/module.h> 67#include <linux/module.h>
69#include <asm/uaccess.h> 68#include <asm/uaccess.h>
70#include <asm/system.h> 69#include <asm/system.h>
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index ce4cd5f3551..70cea9d08a3 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -10,7 +10,6 @@
10#include <linux/mm.h> 10#include <linux/mm.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/sysctl.h> 12#include <linux/sysctl.h>
13#include <linux/config.h>
14#include <linux/igmp.h> 13#include <linux/igmp.h>
15#include <linux/inetdevice.h> 14#include <linux/inetdevice.h>
16#include <net/snmp.h> 15#include <net/snmp.h>
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 0336422c88a..804458712d8 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -247,7 +247,6 @@
247 * TCP_CLOSE socket is finished 247 * TCP_CLOSE socket is finished
248 */ 248 */
249 249
250#include <linux/config.h>
251#include <linux/module.h> 250#include <linux/module.h>
252#include <linux/types.h> 251#include <linux/types.h>
253#include <linux/fcntl.h> 252#include <linux/fcntl.h>
@@ -643,7 +642,7 @@ static inline int select_size(struct sock *sk, struct tcp_sock *tp)
643 int tmp = tp->mss_cache; 642 int tmp = tp->mss_cache;
644 643
645 if (sk->sk_route_caps & NETIF_F_SG) { 644 if (sk->sk_route_caps & NETIF_F_SG) {
646 if (sk->sk_route_caps & NETIF_F_TSO) 645 if (sk_can_gso(sk))
647 tmp = 0; 646 tmp = 0;
648 else { 647 else {
649 int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER); 648 int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER);
@@ -2166,13 +2165,19 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2166 if (!pskb_may_pull(skb, thlen)) 2165 if (!pskb_may_pull(skb, thlen))
2167 goto out; 2166 goto out;
2168 2167
2169 segs = NULL;
2170 if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST))
2171 goto out;
2172
2173 oldlen = (u16)~skb->len; 2168 oldlen = (u16)~skb->len;
2174 __skb_pull(skb, thlen); 2169 __skb_pull(skb, thlen);
2175 2170
2171 if (skb_gso_ok(skb, features | NETIF_F_GSO_ROBUST)) {
2172 /* Packet is from an untrusted source, reset gso_segs. */
2173 int mss = skb_shinfo(skb)->gso_size;
2174
2175 skb_shinfo(skb)->gso_segs = (skb->len + mss - 1) / mss;
2176
2177 segs = NULL;
2178 goto out;
2179 }
2180
2176 segs = skb_segment(skb, features); 2181 segs = skb_segment(skb, features);
2177 if (IS_ERR(segs)) 2182 if (IS_ERR(segs))
2178 goto out; 2183 goto out;
@@ -2209,6 +2214,7 @@ struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features)
2209out: 2214out:
2210 return segs; 2215 return segs;
2211} 2216}
2217EXPORT_SYMBOL(tcp_tso_segment);
2212 2218
2213extern void __skb_cb_too_small_for_tcp(int, int); 2219extern void __skb_cb_too_small_for_tcp(int, int);
2214extern struct tcp_congestion_ops tcp_reno; 2220extern struct tcp_congestion_ops tcp_reno;
diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c
index b2d9021ad22..b0134ab0837 100644
--- a/net/ipv4/tcp_bic.c
+++ b/net/ipv4/tcp_bic.c
@@ -12,7 +12,6 @@
12 * this behaves the same as the original Reno. 12 * this behaves the same as the original Reno.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <net/tcp.h> 17#include <net/tcp.h>
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 857eefc52aa..5765f9d0317 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org> 6 * Copyright (C) 2005 Stephen Hemminger <shemminger@osdl.org>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/mm.h> 10#include <linux/mm.h>
12#include <linux/types.h> 11#include <linux/types.h>
diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
index 78b7a6b9e4d..2be27980ca7 100644
--- a/net/ipv4/tcp_cubic.c
+++ b/net/ipv4/tcp_cubic.c
@@ -12,7 +12,6 @@
12 * this behaves the same as the original Reno. 12 * this behaves the same as the original Reno.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <net/tcp.h> 17#include <net/tcp.h>
diff --git a/net/ipv4/tcp_diag.c b/net/ipv4/tcp_diag.c
index b56399c7cc1..57c5f0b10e6 100644
--- a/net/ipv4/tcp_diag.c
+++ b/net/ipv4/tcp_diag.c
@@ -11,7 +11,6 @@
11 * 2 of the License, or (at your option) any later version. 11 * 2 of the License, or (at your option) any later version.
12 */ 12 */
13 13
14#include <linux/config.h>
15 14
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/inet_diag.h> 16#include <linux/inet_diag.h>
diff --git a/net/ipv4/tcp_highspeed.c b/net/ipv4/tcp_highspeed.c
index 1120245b237..aaa1538c069 100644
--- a/net/ipv4/tcp_highspeed.c
+++ b/net/ipv4/tcp_highspeed.c
@@ -6,7 +6,6 @@
6 * John Heffner <jheffner@psc.edu> 6 * John Heffner <jheffner@psc.edu>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <net/tcp.h> 10#include <net/tcp.h>
12 11
diff --git a/net/ipv4/tcp_htcp.c b/net/ipv4/tcp_htcp.c
index 3d92c185926..6edfe5e4510 100644
--- a/net/ipv4/tcp_htcp.c
+++ b/net/ipv4/tcp_htcp.c
@@ -6,7 +6,6 @@
6 * http://www.hamilton.ie/net/htcp3.pdf 6 * http://www.hamilton.ie/net/htcp3.pdf
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <net/tcp.h> 11#include <net/tcp.h>
diff --git a/net/ipv4/tcp_hybla.c b/net/ipv4/tcp_hybla.c
index 40dbb387751..7406e0c5fb8 100644
--- a/net/ipv4/tcp_hybla.c
+++ b/net/ipv4/tcp_hybla.c
@@ -10,7 +10,6 @@
10 * root at danielinux.net 10 * root at danielinux.net
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <net/tcp.h> 14#include <net/tcp.h>
16 15
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 7fa0b4a8a38..738dad9f7d4 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -63,7 +63,6 @@
63 * Pasi Sarolahti: F-RTO for dealing with spurious RTOs 63 * Pasi Sarolahti: F-RTO for dealing with spurious RTOs
64 */ 64 */
65 65
66#include <linux/config.h>
67#include <linux/mm.h> 66#include <linux/mm.h>
68#include <linux/module.h> 67#include <linux/module.h>
69#include <linux/sysctl.h> 68#include <linux/sysctl.h>
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 4c6ef47eb1c..8355b729fa9 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -52,7 +52,6 @@
52 * a single port at the same time. 52 * a single port at the same time.
53 */ 53 */
54 54
55#include <linux/config.h>
56 55
57#include <linux/types.h> 56#include <linux/types.h>
58#include <linux/fcntl.h> 57#include <linux/fcntl.h>
@@ -242,6 +241,7 @@ int tcp_v4_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
242 goto failure; 241 goto failure;
243 242
244 /* OK, now commit destination to socket. */ 243 /* OK, now commit destination to socket. */
244 sk->sk_gso_type = SKB_GSO_TCPV4;
245 sk_setup_caps(sk, &rt->u.dst); 245 sk_setup_caps(sk, &rt->u.dst);
246 246
247 if (!tp->write_seq) 247 if (!tp->write_seq)
@@ -884,6 +884,7 @@ struct sock *tcp_v4_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
884 if (!newsk) 884 if (!newsk)
885 goto exit; 885 goto exit;
886 886
887 newsk->sk_gso_type = SKB_GSO_TCPV4;
887 sk_setup_caps(newsk, dst); 888 sk_setup_caps(newsk, dst);
888 889
889 newtp = tcp_sk(newsk); 890 newtp = tcp_sk(newsk);
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c
index 54b2ef7d3ef..e0851697ad5 100644
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -20,7 +20,6 @@
20 * Jorge Cwik, <jorge@laser.satlink.net> 20 * Jorge Cwik, <jorge@laser.satlink.net>
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/sysctl.h> 25#include <linux/sysctl.h>
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 5a7cb4a9c86..5c08ea20a18 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -510,8 +510,7 @@ static void tcp_queue_skb(struct sock *sk, struct sk_buff *skb)
510 510
511static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned int mss_now) 511static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned int mss_now)
512{ 512{
513 if (skb->len <= mss_now || 513 if (skb->len <= mss_now || !sk_can_gso(sk)) {
514 !(sk->sk_route_caps & NETIF_F_TSO)) {
515 /* Avoid the costly divide in the normal 514 /* Avoid the costly divide in the normal
516 * non-TSO case. 515 * non-TSO case.
517 */ 516 */
@@ -525,7 +524,7 @@ static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned
525 factor /= mss_now; 524 factor /= mss_now;
526 skb_shinfo(skb)->gso_segs = factor; 525 skb_shinfo(skb)->gso_segs = factor;
527 skb_shinfo(skb)->gso_size = mss_now; 526 skb_shinfo(skb)->gso_size = mss_now;
528 skb_shinfo(skb)->gso_type = SKB_GSO_TCPV4; 527 skb_shinfo(skb)->gso_type = sk->sk_gso_type;
529 } 528 }
530} 529}
531 530
@@ -824,9 +823,7 @@ unsigned int tcp_current_mss(struct sock *sk, int large_allowed)
824 823
825 mss_now = tp->mss_cache; 824 mss_now = tp->mss_cache;
826 825
827 if (large_allowed && 826 if (large_allowed && sk_can_gso(sk) && !tp->urg_mode)
828 (sk->sk_route_caps & NETIF_F_TSO) &&
829 !tp->urg_mode)
830 doing_tso = 1; 827 doing_tso = 1;
831 828
832 if (dst) { 829 if (dst) {
diff --git a/net/ipv4/tcp_scalable.c b/net/ipv4/tcp_scalable.c
index 26d7486ee50..4624501e968 100644
--- a/net/ipv4/tcp_scalable.c
+++ b/net/ipv4/tcp_scalable.c
@@ -5,7 +5,6 @@
5 * John Heffner <jheffner@sc.edu> 5 * John Heffner <jheffner@sc.edu>
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <net/tcp.h> 9#include <net/tcp.h>
11 10
diff --git a/net/ipv4/tcp_vegas.c b/net/ipv4/tcp_vegas.c
index 3b740349505..490360b5b4b 100644
--- a/net/ipv4/tcp_vegas.c
+++ b/net/ipv4/tcp_vegas.c
@@ -31,7 +31,6 @@
31 * assumed senders never went idle. 31 * assumed senders never went idle.
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/mm.h> 34#include <linux/mm.h>
36#include <linux/module.h> 35#include <linux/module.h>
37#include <linux/skbuff.h> 36#include <linux/skbuff.h>
diff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c
index 4247da1384b..5446312ffd2 100644
--- a/net/ipv4/tcp_westwood.c
+++ b/net/ipv4/tcp_westwood.c
@@ -21,7 +21,6 @@
21 * ssthresh after packet loss. The probing phase is as the original Reno. 21 * ssthresh after packet loss. The probing phase is as the original Reno.
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/mm.h> 24#include <linux/mm.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/skbuff.h> 26#include <linux/skbuff.h>
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 3f93292b0ad..9bfcddad695 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -91,7 +91,6 @@
91#include <linux/errno.h> 91#include <linux/errno.h>
92#include <linux/timer.h> 92#include <linux/timer.h>
93#include <linux/mm.h> 93#include <linux/mm.h>
94#include <linux/config.h>
95#include <linux/inet.h> 94#include <linux/inet.h>
96#include <linux/ipv6.h> 95#include <linux/ipv6.h>
97#include <linux/netdevice.h> 96#include <linux/netdevice.h>
diff --git a/net/ipv4/xfrm4_policy.c b/net/ipv4/xfrm4_policy.c
index c0465284dfa..8f50eae47d0 100644
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -9,7 +9,6 @@
9 */ 9 */
10 10
11#include <linux/compiler.h> 11#include <linux/compiler.h>
12#include <linux/config.h>
13#include <linux/inetdevice.h> 12#include <linux/inetdevice.h>
14#include <net/xfrm.h> 13#include <net/xfrm.h>
15#include <net/ip.h> 14#include <net/ip.h>
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 4da664538f5..c250d0af10d 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -40,7 +40,6 @@
40 * status etc. 40 * status etc.
41 */ 41 */
42 42
43#include <linux/config.h>
44#include <linux/errno.h> 43#include <linux/errno.h>
45#include <linux/types.h> 44#include <linux/types.h>
46#include <linux/socket.h> 45#include <linux/socket.h>
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index e19457fe4f6..5a0ba58b86c 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -23,7 +23,6 @@
23 23
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/capability.h> 25#include <linux/capability.h>
26#include <linux/config.h>
27#include <linux/errno.h> 26#include <linux/errno.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/socket.h> 28#include <linux/socket.h>
@@ -660,8 +659,6 @@ int inet6_sk_rebuild_header(struct sock *sk)
660 } 659 }
661 660
662 ip6_dst_store(sk, dst, NULL); 661 ip6_dst_store(sk, dst, NULL);
663 sk->sk_route_caps = dst->dev->features &
664 ~(NETIF_F_IP_CSUM | NETIF_F_TSO);
665 } 662 }
666 663
667 return 0; 664 return 0;
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c
index d31c0d6c044..9d4831bd433 100644
--- a/net/ipv6/ah6.c
+++ b/net/ipv6/ah6.c
@@ -24,7 +24,6 @@
24 * This file is derived from net/ipv4/ah.c. 24 * This file is derived from net/ipv4/ah.c.
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <net/ip.h> 28#include <net/ip.h>
30#include <net/ah.h> 29#include <net/ah.h>
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 39ec528923f..f6881d7a038 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -14,7 +14,6 @@
14 */ 14 */
15 15
16#include <linux/capability.h> 16#include <linux/capability.h>
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/errno.h> 18#include <linux/errno.h>
20#include <linux/types.h> 19#include <linux/types.h>
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index a15a6f320f7..a278d5e862f 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -24,7 +24,6 @@
24 * This file is derived from net/ipv4/esp.c 24 * This file is derived from net/ipv4/esp.c
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <net/ip.h> 28#include <net/ip.h>
30#include <net/xfrm.h> 29#include <net/xfrm.h>
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index a18d4256372..9d0ee7f0eeb 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -179,7 +179,7 @@ static int ipv6_destopt_rcv(struct sk_buff **skbp)
179 179
180static struct inet6_protocol destopt_protocol = { 180static struct inet6_protocol destopt_protocol = {
181 .handler = ipv6_destopt_rcv, 181 .handler = ipv6_destopt_rcv,
182 .flags = INET6_PROTO_NOPOLICY, 182 .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR,
183}; 183};
184 184
185void __init ipv6_destopt_init(void) 185void __init ipv6_destopt_init(void)
@@ -340,7 +340,7 @@ looped_back:
340 340
341static struct inet6_protocol rthdr_protocol = { 341static struct inet6_protocol rthdr_protocol = {
342 .handler = ipv6_rthdr_rcv, 342 .handler = ipv6_rthdr_rcv,
343 .flags = INET6_PROTO_NOPOLICY, 343 .flags = INET6_PROTO_NOPOLICY | INET6_PROTO_GSO_EXTHDR,
344}; 344};
345 345
346void __init ipv6_rthdr_init(void) 346void __init ipv6_rthdr_init(void)
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index eb2865d5ae2..5c950cc79d8 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -13,7 +13,6 @@
13 * 2 of the License, or(at your option) any later version. 13 * 2 of the License, or(at your option) any later version.
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/in6.h> 17#include <linux/in6.h>
19#include <linux/ipv6.h> 18#include <linux/ipv6.h>
@@ -187,8 +186,6 @@ int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)
187 } 186 }
188 187
189 ip6_dst_store(sk, dst, NULL); 188 ip6_dst_store(sk, dst, NULL);
190 sk->sk_route_caps = dst->dev->features &
191 ~(NETIF_F_IP_CSUM | NETIF_F_TSO);
192 } 189 }
193 190
194 skb->dst = dst_clone(dst); 191 skb->dst = dst_clone(dst);
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index 2ae84c96167..d2f3fc990bf 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -14,7 +14,6 @@
14 * 2 of the License, or (at your option) any later version. 14 * 2 of the License, or (at your option) any later version.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/random.h> 18#include <linux/random.h>
20 19
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 2cb6149349b..764221220af 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -19,7 +19,6 @@
19 * remove ip6_null_entry from the top of 19 * remove ip6_null_entry from the top of
20 * routing table. 20 * routing table.
21 */ 21 */
22#include <linux/config.h>
23#include <linux/errno.h> 22#include <linux/errno.h>
24#include <linux/types.h> 23#include <linux/types.h>
25#include <linux/net.h> 24#include <linux/net.h>
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c
index f9ca63912fb..1d672b0547f 100644
--- a/net/ipv6/ip6_flowlabel.c
+++ b/net/ipv6/ip6_flowlabel.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/capability.h> 12#include <linux/capability.h>
13#include <linux/config.h>
14#include <linux/errno.h> 13#include <linux/errno.h>
15#include <linux/types.h> 14#include <linux/types.h>
16#include <linux/socket.h> 15#include <linux/socket.h>
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index aceee252503..df8f051c0fc 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -84,14 +84,9 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
84 */ 84 */
85 IP6CB(skb)->iif = skb->dst ? ((struct rt6_info *)skb->dst)->rt6i_idev->dev->ifindex : dev->ifindex; 85 IP6CB(skb)->iif = skb->dst ? ((struct rt6_info *)skb->dst)->rt6i_idev->dev->ifindex : dev->ifindex;
86 86
87 if (skb->len < sizeof(struct ipv6hdr)) 87 if (unlikely(!pskb_may_pull(skb, sizeof(*hdr))))
88 goto err; 88 goto err;
89 89
90 if (!pskb_may_pull(skb, sizeof(struct ipv6hdr))) {
91 IP6_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS);
92 goto drop;
93 }
94
95 hdr = skb->nh.ipv6h; 90 hdr = skb->nh.ipv6h;
96 91
97 if (hdr->version != 6) 92 if (hdr->version != 6)
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index abb94de3376..2c5b44575af 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -28,7 +28,6 @@
28 * for datagram xmit 28 * for datagram xmit
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/errno.h> 31#include <linux/errno.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/string.h> 33#include <linux/string.h>
@@ -230,7 +229,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl,
230 skb->priority = sk->sk_priority; 229 skb->priority = sk->sk_priority;
231 230
232 mtu = dst_mtu(dst); 231 mtu = dst_mtu(dst);
233 if ((skb->len <= mtu) || ipfragok) { 232 if ((skb->len <= mtu) || ipfragok || skb_shinfo(skb)->gso_size) {
234 IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS); 233 IP6_INC_STATS(IPSTATS_MIB_OUTREQUESTS);
235 return NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, 234 return NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev,
236 dst_output); 235 dst_output);
@@ -835,7 +834,7 @@ static inline int ip6_ufo_append_data(struct sock *sk,
835 /* specify the length of each IP datagram fragment*/ 834 /* specify the length of each IP datagram fragment*/
836 skb_shinfo(skb)->gso_size = mtu - fragheaderlen - 835 skb_shinfo(skb)->gso_size = mtu - fragheaderlen -
837 sizeof(struct frag_hdr); 836 sizeof(struct frag_hdr);
838 skb_shinfo(skb)->gso_type = SKB_GSO_UDPV4; 837 skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
839 ipv6_select_ident(skb, &fhdr); 838 ipv6_select_ident(skb, &fhdr);
840 skb_shinfo(skb)->ip6_frag_id = fhdr.identification; 839 skb_shinfo(skb)->ip6_frag_id = fhdr.identification;
841 __skb_queue_tail(&sk->sk_write_queue, skb); 840 __skb_queue_tail(&sk->sk_write_queue, skb);
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c
index a995796b5a5..bc77c0e1a94 100644
--- a/net/ipv6/ip6_tunnel.c
+++ b/net/ipv6/ip6_tunnel.c
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/module.h> 22#include <linux/module.h>
24#include <linux/capability.h> 23#include <linux/capability.h>
25#include <linux/errno.h> 24#include <linux/errno.h>
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index f28cd37feed..b285b035708 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -30,7 +30,6 @@
30 * The decompression of IP datagram MUST be done after the reassembly, 30 * The decompression of IP datagram MUST be done after the reassembly,
31 * AH/ESP processing. 31 * AH/ESP processing.
32 */ 32 */
33#include <linux/config.h>
34#include <linux/module.h> 33#include <linux/module.h>
35#include <net/ip.h> 34#include <net/ip.h>
36#include <net/xfrm.h> 35#include <net/xfrm.h>
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c
index 4c20eeb3d56..c28e5c28744 100644
--- a/net/ipv6/ipv6_sockglue.c
+++ b/net/ipv6/ipv6_sockglue.c
@@ -27,7 +27,6 @@
27 27
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/capability.h> 29#include <linux/capability.h>
30#include <linux/config.h>
31#include <linux/errno.h> 30#include <linux/errno.h>
32#include <linux/types.h> 31#include <linux/types.h>
33#include <linux/socket.h> 32#include <linux/socket.h>
@@ -58,9 +57,71 @@
58 57
59DEFINE_SNMP_STAT(struct ipstats_mib, ipv6_statistics) __read_mostly; 58DEFINE_SNMP_STAT(struct ipstats_mib, ipv6_statistics) __read_mostly;
60 59
60static struct sk_buff *ipv6_gso_segment(struct sk_buff *skb, int features)
61{
62 struct sk_buff *segs = ERR_PTR(-EINVAL);
63 struct ipv6hdr *ipv6h;
64 struct inet6_protocol *ops;
65 int proto;
66
67 if (unlikely(!pskb_may_pull(skb, sizeof(*ipv6h))))
68 goto out;
69
70 ipv6h = skb->nh.ipv6h;
71 proto = ipv6h->nexthdr;
72 __skb_pull(skb, sizeof(*ipv6h));
73
74 rcu_read_lock();
75 for (;;) {
76 struct ipv6_opt_hdr *opth;
77 int len;
78
79 if (proto != NEXTHDR_HOP) {
80 ops = rcu_dereference(inet6_protos[proto]);
81
82 if (unlikely(!ops))
83 goto unlock;
84
85 if (!(ops->flags & INET6_PROTO_GSO_EXTHDR))
86 break;
87 }
88
89 if (unlikely(!pskb_may_pull(skb, 8)))
90 goto unlock;
91
92 opth = (void *)skb->data;
93 len = opth->hdrlen * 8 + 8;
94
95 if (unlikely(!pskb_may_pull(skb, len)))
96 goto unlock;
97
98 proto = opth->nexthdr;
99 __skb_pull(skb, len);
100 }
101
102 skb->h.raw = skb->data;
103 if (likely(ops->gso_segment))
104 segs = ops->gso_segment(skb, features);
105
106unlock:
107 rcu_read_unlock();
108
109 if (unlikely(IS_ERR(segs)))
110 goto out;
111
112 for (skb = segs; skb; skb = skb->next) {
113 ipv6h = skb->nh.ipv6h;
114 ipv6h->payload_len = htons(skb->len - skb->mac_len);
115 }
116
117out:
118 return segs;
119}
120
61static struct packet_type ipv6_packet_type = { 121static struct packet_type ipv6_packet_type = {
62 .type = __constant_htons(ETH_P_IPV6), 122 .type = __constant_htons(ETH_P_IPV6),
63 .func = ipv6_rcv, 123 .func = ipv6_rcv,
124 .gso_segment = ipv6_gso_segment,
64}; 125};
65 126
66struct ip6_ra_chain *ip6_ra_chain; 127struct ip6_ra_chain *ip6_ra_chain;
diff --git a/net/ipv6/ipv6_syms.c b/net/ipv6/ipv6_syms.c
index 16482785bdf..dd4d1ce7776 100644
--- a/net/ipv6/ipv6_syms.c
+++ b/net/ipv6/ipv6_syms.c
@@ -1,5 +1,4 @@
1 1
2#include <linux/config.h>
3#include <linux/module.h> 2#include <linux/module.h>
4#include <net/protocol.h> 3#include <net/protocol.h>
5#include <net/ipv6.h> 4#include <net/ipv6.h>
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 6e871afbb2c..9d697d4dcff 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -28,7 +28,6 @@
28 * - MLDv2 support 28 * - MLDv2 support
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/module.h> 31#include <linux/module.h>
33#include <linux/errno.h> 32#include <linux/errno.h>
34#include <linux/types.h> 33#include <linux/types.h>
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index dfa20d3be9b..b50055b9278 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -48,7 +48,6 @@
48#endif 48#endif
49 49
50#include <linux/module.h> 50#include <linux/module.h>
51#include <linux/config.h>
52#include <linux/errno.h> 51#include <linux/errno.h>
53#include <linux/types.h> 52#include <linux/types.h>
54#include <linux/socket.h> 53#include <linux/socket.h>
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 0b5bd5587a3..7ef143c0ebf 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -19,7 +19,6 @@
19 */ 19 */
20 20
21#include <linux/capability.h> 21#include <linux/capability.h>
22#include <linux/config.h>
23#include <linux/in.h> 22#include <linux/in.h>
24#include <linux/skbuff.h> 23#include <linux/skbuff.h>
25#include <linux/kmod.h> 24#include <linux/kmod.h>
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c
index de1175c27f6..8629ba195d2 100644
--- a/net/ipv6/netfilter/ip6t_REJECT.c
+++ b/net/ipv6/netfilter/ip6t_REJECT.c
@@ -15,7 +15,6 @@
15 * 2 of the License, or (at your option) any later version. 15 * 2 of the License, or (at your option) any later version.
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/skbuff.h> 19#include <linux/skbuff.h>
21#include <linux/icmpv6.h> 20#include <linux/icmpv6.h>
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
index 2a71c3b669f..c2ab38ff46a 100644
--- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
+++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
@@ -20,7 +20,6 @@
20 * structures. 20 * structures.
21 */ 21 */
22 22
23#include <linux/config.h>
24#include <linux/types.h> 23#include <linux/types.h>
25#include <linux/ipv6.h> 24#include <linux/ipv6.h>
26#include <linux/in6.h> 25#include <linux/in6.h>
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c
index c32a029e43f..00d5583807f 100644
--- a/net/ipv6/netfilter/nf_conntrack_reasm.c
+++ b/net/ipv6/netfilter/nf_conntrack_reasm.c
@@ -14,7 +14,6 @@
14 * 2 of the License, or (at your option) any later version. 14 * 2 of the License, or (at your option) any later version.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/errno.h> 17#include <linux/errno.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/string.h> 19#include <linux/string.h>
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 779ddf77f4d..efee7a6301a 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -17,7 +17,6 @@
17 * as published by the Free Software Foundation; either version 17 * as published by the Free Software Foundation; either version
18 * 2 of the License, or (at your option) any later version. 18 * 2 of the License, or (at your option) any later version.
19 */ 19 */
20#include <linux/config.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
22#include <linux/socket.h> 21#include <linux/socket.h>
23#include <linux/net.h> 22#include <linux/net.h>
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c
index eef985e010e..4e299c69e1c 100644
--- a/net/ipv6/reassembly.c
+++ b/net/ipv6/reassembly.c
@@ -28,7 +28,6 @@
28 * YOSHIFUJI,H. @USAGI Always remove fragment header to 28 * YOSHIFUJI,H. @USAGI Always remove fragment header to
29 * calculate ICV correctly. 29 * calculate ICV correctly.
30 */ 30 */
31#include <linux/config.h>
32#include <linux/errno.h> 31#include <linux/errno.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/string.h> 33#include <linux/string.h>
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index e728980160d..87c39c978cd 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -25,7 +25,6 @@
25 */ 25 */
26 26
27#include <linux/capability.h> 27#include <linux/capability.h>
28#include <linux/config.h>
29#include <linux/errno.h> 28#include <linux/errno.h>
30#include <linux/types.h> 29#include <linux/types.h>
31#include <linux/times.h> 30#include <linux/times.h>
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c
index 6578c3080f4..c56aeece2bf 100644
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -18,7 +18,6 @@
18 * Nate Thompson <nate@thebog.net>: 6to4 support 18 * Nate Thompson <nate@thebog.net>: 6to4 support
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/capability.h> 22#include <linux/capability.h>
24#include <linux/errno.h> 23#include <linux/errno.h>
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c
index 8eff9fa1e98..7a4639db134 100644
--- a/net/ipv6/sysctl_net_ipv6.c
+++ b/net/ipv6/sysctl_net_ipv6.c
@@ -7,7 +7,6 @@
7 7
8#include <linux/mm.h> 8#include <linux/mm.h>
9#include <linux/sysctl.h> 9#include <linux/sysctl.h>
10#include <linux/config.h>
11#include <linux/in6.h> 10#include <linux/in6.h>
12#include <linux/ipv6.h> 11#include <linux/ipv6.h>
13#include <net/ndisc.h> 12#include <net/ndisc.h>
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index b36d5b2e7c3..5bdcb9002cf 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -26,7 +26,6 @@
26 */ 26 */
27 27
28#include <linux/module.h> 28#include <linux/module.h>
29#include <linux/config.h>
30#include <linux/errno.h> 29#include <linux/errno.h>
31#include <linux/types.h> 30#include <linux/types.h>
32#include <linux/socket.h> 31#include <linux/socket.h>
@@ -270,9 +269,8 @@ static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
270 ipv6_addr_copy(&np->saddr, saddr); 269 ipv6_addr_copy(&np->saddr, saddr);
271 inet->rcv_saddr = LOOPBACK4_IPV6; 270 inet->rcv_saddr = LOOPBACK4_IPV6;
272 271
272 sk->sk_gso_type = SKB_GSO_TCPV6;
273 ip6_dst_store(sk, dst, NULL); 273 ip6_dst_store(sk, dst, NULL);
274 sk->sk_route_caps = dst->dev->features &
275 ~(NETIF_F_IP_CSUM | NETIF_F_TSO);
276 274
277 icsk->icsk_ext_hdr_len = 0; 275 icsk->icsk_ext_hdr_len = 0;
278 if (np->opt) 276 if (np->opt)
@@ -930,9 +928,8 @@ static struct sock * tcp_v6_syn_recv_sock(struct sock *sk, struct sk_buff *skb,
930 * comment in that function for the gory details. -acme 928 * comment in that function for the gory details. -acme
931 */ 929 */
932 930
931 sk->sk_gso_type = SKB_GSO_TCPV6;
933 ip6_dst_store(newsk, dst, NULL); 932 ip6_dst_store(newsk, dst, NULL);
934 newsk->sk_route_caps = dst->dev->features &
935 ~(NETIF_F_IP_CSUM | NETIF_F_TSO);
936 933
937 newtcp6sk = (struct tcp6_sock *)newsk; 934 newtcp6sk = (struct tcp6_sock *)newsk;
938 inet_sk(newsk)->pinet6 = &newtcp6sk->inet6; 935 inet_sk(newsk)->pinet6 = &newtcp6sk->inet6;
@@ -1606,6 +1603,7 @@ struct proto tcpv6_prot = {
1606static struct inet6_protocol tcpv6_protocol = { 1603static struct inet6_protocol tcpv6_protocol = {
1607 .handler = tcp_v6_rcv, 1604 .handler = tcp_v6_rcv,
1608 .err_handler = tcp_v6_err, 1605 .err_handler = tcp_v6_err,
1606 .gso_segment = tcp_tso_segment,
1609 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL, 1607 .flags = INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
1610}; 1608};
1611 1609
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 8d3432a70f3..ccc57f434cd 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -23,7 +23,6 @@
23 * 2 of the License, or (at your option) any later version. 23 * 2 of the License, or (at your option) any later version.
24 */ 24 */
25 25
26#include <linux/config.h>
27#include <linux/errno.h> 26#include <linux/errno.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/socket.h> 28#include <linux/socket.h>
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c
index ee715f2691e..73cd250aecb 100644
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14#include <linux/compiler.h> 14#include <linux/compiler.h>
15#include <linux/config.h>
16#include <linux/netdevice.h> 15#include <linux/netdevice.h>
17#include <net/addrconf.h> 16#include <net/addrconf.h>
18#include <net/xfrm.h> 17#include <net/xfrm.h>
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c
index d37768e5064..6b44fe8516c 100644
--- a/net/ipv6/xfrm6_tunnel.c
+++ b/net/ipv6/xfrm6_tunnel.c
@@ -21,7 +21,6 @@
21 * Based on net/ipv4/xfrm4_tunnel.c 21 * Based on net/ipv4/xfrm4_tunnel.c
22 * 22 *
23 */ 23 */
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/xfrm.h> 25#include <linux/xfrm.h>
27#include <linux/list.h> 26#include <linux/list.h>
diff --git a/net/ipx/af_ipx.c b/net/ipx/af_ipx.c
index 811d998725b..aa34ff4b707 100644
--- a/net/ipx/af_ipx.c
+++ b/net/ipx/af_ipx.c
@@ -28,7 +28,6 @@
28 * See net/ipx/ChangeLog. 28 * See net/ipx/ChangeLog.
29 */ 29 */
30 30
31#include <linux/config.h>
32#include <linux/capability.h> 31#include <linux/capability.h>
33#include <linux/errno.h> 32#include <linux/errno.h>
34#include <linux/if_arp.h> 33#include <linux/if_arp.h>
diff --git a/net/ipx/ipx_proc.c b/net/ipx/ipx_proc.c
index 1f73d9ea434..4c0c71206e5 100644
--- a/net/ipx/ipx_proc.c
+++ b/net/ipx/ipx_proc.c
@@ -4,7 +4,6 @@
4 * Copyright(C) Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2002 4 * Copyright(C) Arnaldo Carvalho de Melo <acme@conectiva.com.br>, 2002
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#ifdef CONFIG_PROC_FS 8#ifdef CONFIG_PROC_FS
10#include <linux/proc_fs.h> 9#include <linux/proc_fs.h>
diff --git a/net/ipx/ipx_route.c b/net/ipx/ipx_route.c
index bba3431cd9a..a30dbb1e08f 100644
--- a/net/ipx/ipx_route.c
+++ b/net/ipx/ipx_route.c
@@ -7,7 +7,6 @@
7 * See net/ipx/ChangeLog. 7 * See net/ipx/ChangeLog.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/list.h> 10#include <linux/list.h>
12#include <linux/route.h> 11#include <linux/route.h>
13#include <linux/spinlock.h> 12#include <linux/spinlock.h>
diff --git a/net/ipx/sysctl_net_ipx.c b/net/ipx/sysctl_net_ipx.c
index 510eda96d10..fa574735c76 100644
--- a/net/ipx/sysctl_net_ipx.c
+++ b/net/ipx/sysctl_net_ipx.c
@@ -6,7 +6,6 @@
6 * Added /proc/sys/net/ipx/ipx_pprop_broadcasting - acme March 4, 2001 6 * Added /proc/sys/net/ipx/ipx_pprop_broadcasting - acme March 4, 2001
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/mm.h> 9#include <linux/mm.h>
11#include <linux/sysctl.h> 10#include <linux/sysctl.h>
12 11
diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index 2f37c9f35e2..7fae48a53bf 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -42,7 +42,6 @@
42 * 42 *
43 ********************************************************************/ 43 ********************************************************************/
44 44
45#include <linux/config.h>
46#include <linux/capability.h> 45#include <linux/capability.h>
47#include <linux/module.h> 46#include <linux/module.h>
48#include <linux/types.h> 47#include <linux/types.h>
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index 28688197885..9c4a902a9db 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -29,7 +29,6 @@
29 * 29 *
30 ********************************************************************/ 30 ********************************************************************/
31 31
32#include <linux/config.h>
33#include <linux/module.h> 32#include <linux/module.h>
34#include <linux/sched.h> 33#include <linux/sched.h>
35#include <linux/proc_fs.h> 34#include <linux/proc_fs.h>
diff --git a/net/irda/ircomm/ircomm_tty.c b/net/irda/ircomm/ircomm_tty.c
index b592c4bc333..b400f27851f 100644
--- a/net/irda/ircomm/ircomm_tty.c
+++ b/net/irda/ircomm/ircomm_tty.c
@@ -30,7 +30,6 @@
30 * 30 *
31 ********************************************************************/ 31 ********************************************************************/
32 32
33#include <linux/config.h>
34#include <linux/init.h> 33#include <linux/init.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/fs.h> 35#include <linux/fs.h>
diff --git a/net/irda/irda_device.c b/net/irda/irda_device.c
index e3debbdb67f..ba40e5495f5 100644
--- a/net/irda/irda_device.c
+++ b/net/irda/irda_device.c
@@ -29,7 +29,6 @@
29 * 29 *
30 ********************************************************************/ 30 ********************************************************************/
31 31
32#include <linux/config.h>
33#include <linux/string.h> 32#include <linux/string.h>
34#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
35#include <linux/skbuff.h> 34#include <linux/skbuff.h>
diff --git a/net/irda/iriap.c b/net/irda/iriap.c
index 2d2e2b1919f..a0472652a44 100644
--- a/net/irda/iriap.c
+++ b/net/irda/iriap.c
@@ -24,7 +24,6 @@
24 * 24 *
25 ********************************************************************/ 25 ********************************************************************/
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/types.h> 28#include <linux/types.h>
30#include <linux/skbuff.h> 29#include <linux/skbuff.h>
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c
index 657d1221057..bd659dd545a 100644
--- a/net/irda/irlan/irlan_common.c
+++ b/net/irda/irlan/irlan_common.c
@@ -23,7 +23,6 @@
23 * 23 *
24 ********************************************************************/ 24 ********************************************************************/
25 25
26#include <linux/config.h>
27#include <linux/module.h> 26#include <linux/module.h>
28 27
29#include <linux/kernel.h> 28#include <linux/kernel.h>
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index 953e255d2bc..b0ccc455b74 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -25,7 +25,6 @@
25 * 25 *
26 ********************************************************************/ 26 ********************************************************************/
27 27
28#include <linux/config.h>
29#include <linux/netdevice.h> 28#include <linux/netdevice.h>
30#include <linux/etherdevice.h> 29#include <linux/etherdevice.h>
31#include <linux/inetdevice.h> 30#include <linux/inetdevice.h>
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index a16528657b4..cade355ac8a 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -29,7 +29,6 @@
29 * 29 *
30 ********************************************************************/ 30 ********************************************************************/
31 31
32#include <linux/config.h>
33#include <linux/slab.h> 32#include <linux/slab.h>
34#include <linux/string.h> 33#include <linux/string.h>
35#include <linux/skbuff.h> 34#include <linux/skbuff.h>
diff --git a/net/irda/irlap_event.c b/net/irda/irlap_event.c
index a505b545760..99faff68c39 100644
--- a/net/irda/irlap_event.c
+++ b/net/irda/irlap_event.c
@@ -25,7 +25,6 @@
25 * 25 *
26 ********************************************************************/ 26 ********************************************************************/
27 27
28#include <linux/config.h>
29#include <linux/string.h> 28#include <linux/string.h>
30#include <linux/kernel.h> 29#include <linux/kernel.h>
31#include <linux/delay.h> 30#include <linux/delay.h>
diff --git a/net/irda/irlmp.c b/net/irda/irlmp.c
index 57ea160f470..129ad64c15b 100644
--- a/net/irda/irlmp.c
+++ b/net/irda/irlmp.c
@@ -24,7 +24,6 @@
24 * 24 *
25 ********************************************************************/ 25 ********************************************************************/
26 26
27#include <linux/config.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/slab.h> 28#include <linux/slab.h>
30#include <linux/string.h> 29#include <linux/string.h>
diff --git a/net/irda/irlmp_event.c b/net/irda/irlmp_event.c
index 26649f6528e..4c90dd1b450 100644
--- a/net/irda/irlmp_event.c
+++ b/net/irda/irlmp_event.c
@@ -24,7 +24,6 @@
24 * 24 *
25 ********************************************************************/ 25 ********************************************************************/
26 26
27#include <linux/config.h>
28#include <linux/kernel.h> 27#include <linux/kernel.h>
29 28
30#include <net/irda/irda.h> 29#include <net/irda/irda.h>
diff --git a/net/irda/irlmp_frame.c b/net/irda/irlmp_frame.c
index 91cd268172f..39761a1d18f 100644
--- a/net/irda/irlmp_frame.c
+++ b/net/irda/irlmp_frame.c
@@ -24,7 +24,6 @@
24 * 24 *
25 ********************************************************************/ 25 ********************************************************************/
26 26
27#include <linux/config.h>
28#include <linux/skbuff.h> 27#include <linux/skbuff.h>
29#include <linux/kernel.h> 28#include <linux/kernel.h>
30 29
diff --git a/net/irda/irmod.c b/net/irda/irmod.c
index 634901dd156..2869b16e417 100644
--- a/net/irda/irmod.c
+++ b/net/irda/irmod.c
@@ -31,7 +31,6 @@
31 * Jean II 31 * Jean II
32 */ 32 */
33 33
34#include <linux/config.h>
35#include <linux/module.h> 34#include <linux/module.h>
36#include <linux/moduleparam.h> 35#include <linux/moduleparam.h>
37 36
diff --git a/net/irda/irnet/irnet.h b/net/irda/irnet/irnet.h
index ad6caba02a7..80887528e77 100644
--- a/net/irda/irnet/irnet.h
+++ b/net/irda/irnet/irnet.h
@@ -248,7 +248,6 @@
248#include <linux/miscdevice.h> 248#include <linux/miscdevice.h>
249#include <linux/poll.h> 249#include <linux/poll.h>
250#include <linux/capability.h> 250#include <linux/capability.h>
251#include <linux/config.h>
252#include <linux/ctype.h> /* isspace() */ 251#include <linux/ctype.h> /* isspace() */
253#include <asm/uaccess.h> 252#include <asm/uaccess.h>
254#include <linux/init.h> 253#include <linux/init.h>
diff --git a/net/irda/irsysctl.c b/net/irda/irsysctl.c
index 1b1c4193359..86805c3d832 100644
--- a/net/irda/irsysctl.c
+++ b/net/irda/irsysctl.c
@@ -23,7 +23,6 @@
23 * 23 *
24 ********************************************************************/ 24 ********************************************************************/
25 25
26#include <linux/config.h>
27#include <linux/mm.h> 26#include <linux/mm.h>
28#include <linux/ctype.h> 27#include <linux/ctype.h>
29#include <linux/sysctl.h> 28#include <linux/sysctl.h>
diff --git a/net/irda/irttp.c b/net/irda/irttp.c
index 8aff254cb41..49c51c5f1a8 100644
--- a/net/irda/irttp.c
+++ b/net/irda/irttp.c
@@ -24,7 +24,6 @@
24 * 24 *
25 ********************************************************************/ 25 ********************************************************************/
26 26
27#include <linux/config.h>
28#include <linux/skbuff.h> 27#include <linux/skbuff.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <linux/seq_file.h> 29#include <linux/seq_file.h>
diff --git a/net/irda/qos.c b/net/irda/qos.c
index ddfb5c502a9..95a69c013ee 100644
--- a/net/irda/qos.c
+++ b/net/irda/qos.c
@@ -30,7 +30,6 @@
30 * 30 *
31 ********************************************************************/ 31 ********************************************************************/
32 32
33#include <linux/config.h>
34#include <asm/byteorder.h> 33#include <asm/byteorder.h>
35 34
36#include <net/irda/irda.h> 35#include <net/irda/irda.h>
diff --git a/net/irda/timer.c b/net/irda/timer.c
index 0e17f976add..3871a2b911f 100644
--- a/net/irda/timer.c
+++ b/net/irda/timer.c
@@ -25,7 +25,6 @@
25 ********************************************************************/ 25 ********************************************************************/
26 26
27#include <asm/system.h> 27#include <asm/system.h>
28#include <linux/config.h>
29#include <linux/delay.h> 28#include <linux/delay.h>
30 29
31#include <net/irda/timer.h> 30#include <net/irda/timer.h>
diff --git a/net/key/af_key.c b/net/key/af_key.c
index d5e2121ea20..3a95b2ee469 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -14,7 +14,6 @@
14 * Derek Atkins <derek@ihtfp.com> 14 * Derek Atkins <derek@ihtfp.com>
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/capability.h> 17#include <linux/capability.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 75c9b148080..d6cfe84d521 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -20,7 +20,6 @@
20 * 20 *
21 * See the GNU General Public License for more details. 21 * See the GNU General Public License for more details.
22 */ 22 */
23#include <linux/config.h>
24#include <linux/compiler.h> 23#include <linux/compiler.h>
25#include <linux/kernel.h> 24#include <linux/kernel.h>
26#include <linux/module.h> 25#include <linux/module.h>
diff --git a/net/llc/llc_if.c b/net/llc/llc_if.c
index 5ae47be7dde..a89917130a7 100644
--- a/net/llc/llc_if.c
+++ b/net/llc/llc_if.c
@@ -11,7 +11,6 @@
11 * 11 *
12 * See the GNU General Public License for more details. 12 * See the GNU General Public License for more details.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
17#include <linux/netdevice.h> 16#include <linux/netdevice.h>
diff --git a/net/llc/llc_proc.c b/net/llc/llc_proc.c
index bd531cb235a..19308fece3a 100644
--- a/net/llc/llc_proc.c
+++ b/net/llc/llc_proc.c
@@ -12,7 +12,6 @@
12 * See the GNU General Public License for more details. 12 * See the GNU General Public License for more details.
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/init.h> 15#include <linux/init.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/proc_fs.h> 17#include <linux/proc_fs.h>
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index f37dbf8ef12..8275bd33bd9 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -11,7 +11,6 @@
11 * 11 *
12 * See the GNU General Public License for more details. 12 * See the GNU General Public License for more details.
13 */ 13 */
14#include <linux/config.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <net/llc.h> 16#include <net/llc.h>
diff --git a/net/llc/sysctl_net_llc.c b/net/llc/sysctl_net_llc.c
index d1eaddb1363..45d7dd92a08 100644
--- a/net/llc/sysctl_net_llc.c
+++ b/net/llc/sysctl_net_llc.c
@@ -4,7 +4,6 @@
4 * Arnaldo Carvalho de Melo <acme@conectiva.com.br> 4 * Arnaldo Carvalho de Melo <acme@conectiva.com.br>
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/mm.h> 7#include <linux/mm.h>
9#include <linux/init.h> 8#include <linux/init.h>
10#include <linux/sysctl.h> 9#include <linux/sysctl.h>
diff --git a/net/netfilter/core.c b/net/netfilter/core.c
index 8455a32ea5c..5d29d5e2362 100644
--- a/net/netfilter/core.c
+++ b/net/netfilter/core.c
@@ -10,7 +10,6 @@
10 * 15-Mar-2000: Added NF_REPEAT --RR. 10 * 15-Mar-2000: Added NF_REPEAT --RR.
11 * 08-May-2003: Internal logging interface added by Jozsef Kadlecsik. 11 * 08-May-2003: Internal logging interface added by Jozsef Kadlecsik.
12 */ 12 */
13#include <linux/config.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/netfilter.h> 14#include <linux/netfilter.h>
16#include <net/protocol.h> 15#include <net/protocol.h>
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index cd299f4b7db..8f2261965a6 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -29,7 +29,6 @@
29 * Derived from net/ipv4/netfilter/ip_conntrack_core.c 29 * Derived from net/ipv4/netfilter/ip_conntrack_core.c
30 */ 30 */
31 31
32#include <linux/config.h>
33#include <linux/types.h> 32#include <linux/types.h>
34#include <linux/netfilter.h> 33#include <linux/netfilter.h>
35#include <linux/module.h> 34#include <linux/module.h>
diff --git a/net/netfilter/nf_conntrack_ftp.c b/net/netfilter/nf_conntrack_ftp.c
index 11d3be24353..960972d225f 100644
--- a/net/netfilter/nf_conntrack_ftp.c
+++ b/net/netfilter/nf_conntrack_ftp.c
@@ -15,7 +15,6 @@
15 * Derived from net/ipv4/netfilter/ip_conntrack_ftp.c 15 * Derived from net/ipv4/netfilter/ip_conntrack_ftp.c
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/moduleparam.h> 19#include <linux/moduleparam.h>
21#include <linux/netfilter.h> 20#include <linux/netfilter.h>
diff --git a/net/netfilter/nf_conntrack_l3proto_generic.c b/net/netfilter/nf_conntrack_l3proto_generic.c
index 3fc58e454d4..21e0bc91cf2 100644
--- a/net/netfilter/nf_conntrack_l3proto_generic.c
+++ b/net/netfilter/nf_conntrack_l3proto_generic.c
@@ -15,7 +15,6 @@
15 * Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp> 15 * Yasuyuki Kozakai @USAGI <yasuyuki.kozakai@toshiba.co.jp>
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/ip.h> 19#include <linux/ip.h>
21#include <linux/netfilter.h> 20#include <linux/netfilter.h>
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 0839b701b93..9bd8a7877fd 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -261,7 +261,7 @@ static int do_basic_checks(struct nf_conn *conntrack,
261 } 261 }
262 262
263 DEBUGP("Basic checks passed\n"); 263 DEBUGP("Basic checks passed\n");
264 return 0; 264 return count == 0;
265} 265}
266 266
267static int new_state(enum ip_conntrack_dir dir, 267static int new_state(enum ip_conntrack_dir dir,
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 12fb7c0a150..af8adcba23a 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -24,7 +24,6 @@
24 * version 2.2 24 * version 2.2
25 */ 25 */
26 26
27#include <linux/config.h>
28#include <linux/types.h> 27#include <linux/types.h>
29#include <linux/sched.h> 28#include <linux/sched.h>
30#include <linux/timer.h> 29#include <linux/timer.h>
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index e34c574f035..5fcab2ef231 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -17,7 +17,6 @@
17 * Derived from net/ipv4/netfilter/ip_conntrack_standalone.c 17 * Derived from net/ipv4/netfilter/ip_conntrack_standalone.c
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/types.h> 20#include <linux/types.h>
22#include <linux/netfilter.h> 21#include <linux/netfilter.h>
23#include <linux/module.h> 22#include <linux/module.h>
diff --git a/net/netfilter/nf_internals.h b/net/netfilter/nf_internals.h
index 6bdee291061..86e392bfe83 100644
--- a/net/netfilter/nf_internals.h
+++ b/net/netfilter/nf_internals.h
@@ -1,7 +1,6 @@
1#ifndef _NF_INTERNALS_H 1#ifndef _NF_INTERNALS_H
2#define _NF_INTERNALS_H 2#define _NF_INTERNALS_H
3 3
4#include <linux/config.h>
5#include <linux/list.h> 4#include <linux/list.h>
6#include <linux/skbuff.h> 5#include <linux/skbuff.h>
7#include <linux/netdevice.h> 6#include <linux/netdevice.h>
diff --git a/net/netfilter/nf_log.c b/net/netfilter/nf_log.c
index 3e76bd0824a..8901b3a07f7 100644
--- a/net/netfilter/nf_log.c
+++ b/net/netfilter/nf_log.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include <linux/module.h> 3#include <linux/module.h>
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c
index ee8f70889f4..bb6fcee452c 100644
--- a/net/netfilter/nf_queue.c
+++ b/net/netfilter/nf_queue.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include <linux/module.h> 3#include <linux/module.h>
diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c
index 0a63d7dac7b..c2e44e90e43 100644
--- a/net/netfilter/nf_sockopt.c
+++ b/net/netfilter/nf_sockopt.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/kernel.h> 1#include <linux/kernel.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include <linux/module.h> 3#include <linux/module.h>
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index ec9f0efea6b..52fdfa2686c 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -14,7 +14,6 @@
14 * of the GNU General Public License, incorporated herein by reference. 14 * of the GNU General Public License, incorporated herein by reference.
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/socket.h> 19#include <linux/socket.h>
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index 99293c63ff7..174e8f97009 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/socket.h> 17#include <linux/socket.h>
19#include <linux/net.h> 18#include <linux/net.h>
diff --git a/net/netfilter/xt_policy.c b/net/netfilter/xt_policy.c
index a3aa62fbda6..ba1ca03abad 100644
--- a/net/netfilter/xt_policy.c
+++ b/net/netfilter/xt_policy.c
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#include <linux/kernel.h> 10#include <linux/kernel.h>
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/skbuff.h> 12#include <linux/skbuff.h>
14#include <linux/init.h> 13#include <linux/init.h>
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 3862e73d14d..70cee82a98b 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -21,7 +21,6 @@
21 * mandatory if CONFIG_NET=y these days 21 * mandatory if CONFIG_NET=y these days
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26 25
27#include <linux/capability.h> 26#include <linux/capability.h>
diff --git a/net/netlink/attr.c b/net/netlink/attr.c
index fffef4ab276..dddbd15135a 100644
--- a/net/netlink/attr.c
+++ b/net/netlink/attr.c
@@ -5,7 +5,6 @@
5 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> 5 * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index edf084becd5..a298f77cc3e 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -5,7 +5,6 @@
5 * Thomas Graf <tgraf@suug.ch> 5 * Thomas Graf <tgraf@suug.ch>
6 */ 6 */
7 7
8#include <linux/config.h>
9#include <linux/module.h> 8#include <linux/module.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
11#include <linux/errno.h> 10#include <linux/errno.h>
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
index 3669cb953e6..eba6df054b1 100644
--- a/net/netrom/af_netrom.c
+++ b/net/netrom/af_netrom.c
@@ -8,7 +8,6 @@
8 * Copyright Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk) 8 * Copyright Alan Cox GW4PTS (alan@lxorguk.ukuu.org.uk)
9 * Copyright Darryl Miles G7LED (dlm@g7led.demon.co.uk) 9 * Copyright Darryl Miles G7LED (dlm@g7led.demon.co.uk)
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/moduleparam.h> 12#include <linux/moduleparam.h>
14#include <linux/capability.h> 13#include <linux/capability.h>
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c
index 621e5586ab0..9b8eb54971a 100644
--- a/net/netrom/nr_dev.c
+++ b/net/netrom/nr_dev.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 7 * Copyright Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/proc_fs.h> 10#include <linux/proc_fs.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 9db7dbdb16e..f9cef367159 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -49,7 +49,6 @@
49 * 49 *
50 */ 50 */
51 51
52#include <linux/config.h>
53#include <linux/types.h> 52#include <linux/types.h>
54#include <linux/sched.h> 53#include <linux/sched.h>
55#include <linux/mm.h> 54#include <linux/mm.h>
diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c
index 55564efccf1..7799fe82aeb 100644
--- a/net/rose/af_rose.c
+++ b/net/rose/af_rose.c
@@ -10,7 +10,6 @@
10 * Copyright (C) Tomi Manninen OH2BNS (oh2bns@sral.fi) 10 * Copyright (C) Tomi Manninen OH2BNS (oh2bns@sral.fi)
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/capability.h> 13#include <linux/capability.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/moduleparam.h> 15#include <linux/moduleparam.h>
diff --git a/net/rose/rose_dev.c b/net/rose/rose_dev.c
index 2a1bf8e119e..9d0bf2a1ea3 100644
--- a/net/rose/rose_dev.c
+++ b/net/rose/rose_dev.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) 7 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
8 */ 8 */
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11#include <linux/proc_fs.h> 10#include <linux/proc_fs.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
diff --git a/net/rxrpc/rxrpc_syms.c b/net/rxrpc/rxrpc_syms.c
index 56adf16fed0..9896fd87a4d 100644
--- a/net/rxrpc/rxrpc_syms.c
+++ b/net/rxrpc/rxrpc_syms.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14 13
15#include <rxrpc/transport.h> 14#include <rxrpc/transport.h>
diff --git a/net/rxrpc/sysctl.c b/net/rxrpc/sysctl.c
index fbf98729c74..6374df7e77d 100644
--- a/net/rxrpc/sysctl.c
+++ b/net/rxrpc/sysctl.c
@@ -9,7 +9,6 @@
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/sched.h> 12#include <linux/sched.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
15#include <linux/module.h> 14#include <linux/module.h>
diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index 13eeee58288..8298ea9ffe1 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -305,7 +305,7 @@ config NET_CLS_U32
305 tristate "Universal 32bit comparisons w/ hashing (U32)" 305 tristate "Universal 32bit comparisons w/ hashing (U32)"
306 select NET_CLS 306 select NET_CLS
307 ---help--- 307 ---help---
308 Say Y here to be able to classify packetes using a universal 308 Say Y here to be able to classify packets using a universal
309 32bit pieces based comparison scheme. 309 32bit pieces based comparison scheme.
310 310
311 To compile this code as a module, choose M here: the 311 To compile this code as a module, choose M here: the
@@ -485,7 +485,7 @@ config NET_ACT_IPT
485 tristate "IPtables targets" 485 tristate "IPtables targets"
486 depends on NET_CLS_ACT && NETFILTER && IP_NF_IPTABLES 486 depends on NET_CLS_ACT && NETFILTER && IP_NF_IPTABLES
487 ---help--- 487 ---help---
488 Say Y here to be able to invoke iptables targets after succesful 488 Say Y here to be able to invoke iptables targets after successful
489 classification. 489 classification.
490 490
491 To compile this code as a module, choose M here: the 491 To compile this code as a module, choose M here: the
@@ -537,8 +537,8 @@ config NET_ESTIMATOR
537 ---help--- 537 ---help---
538 Say Y here to allow using rate estimators to estimate the current 538 Say Y here to allow using rate estimators to estimate the current
539 rate-of-flow for network devices, queues, etc. This module is 539 rate-of-flow for network devices, queues, etc. This module is
540 automaticaly selected if needed but can be selected manually for 540 automatically selected if needed but can be selected manually for
541 statstical purposes. 541 statistical purposes.
542 542
543endif # NET_SCHED 543endif # NET_SCHED
544 544
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 2ffa11c6e8d..5b9397b3323 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -14,7 +14,6 @@
14#include <asm/uaccess.h> 14#include <asm/uaccess.h>
15#include <asm/system.h> 15#include <asm/system.h>
16#include <linux/bitops.h> 16#include <linux/bitops.h>
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
diff --git a/net/sched/act_gact.c b/net/sched/act_gact.c
index a1e68f78dcc..e75a147ad60 100644
--- a/net/sched/act_gact.c
+++ b/net/sched/act_gact.c
@@ -13,7 +13,6 @@
13#include <asm/uaccess.h> 13#include <asm/uaccess.h>
14#include <asm/system.h> 14#include <asm/system.h>
15#include <linux/bitops.h> 15#include <linux/bitops.h>
16#include <linux/config.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
19#include <linux/sched.h> 18#include <linux/sched.h>
diff --git a/net/sched/act_ipt.c b/net/sched/act_ipt.c
index 37640c6fc01..d799e01248c 100644
--- a/net/sched/act_ipt.c
+++ b/net/sched/act_ipt.c
@@ -14,7 +14,6 @@
14#include <asm/uaccess.h> 14#include <asm/uaccess.h>
15#include <asm/system.h> 15#include <asm/system.h>
16#include <asm/bitops.h> 16#include <asm/bitops.h>
17#include <linux/config.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
20#include <linux/sched.h> 19#include <linux/sched.h>
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 4fcccbd5088..fc562047ecc 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -15,7 +15,6 @@
15#include <asm/uaccess.h> 15#include <asm/uaccess.h>
16#include <asm/system.h> 16#include <asm/system.h>
17#include <asm/bitops.h> 17#include <asm/bitops.h>
18#include <linux/config.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/sched.h> 20#include <linux/sched.h>
diff --git a/net/sched/act_pedit.c b/net/sched/act_pedit.c
index 1742a68e012..58b3a865204 100644
--- a/net/sched/act_pedit.c
+++ b/net/sched/act_pedit.c
@@ -12,7 +12,6 @@
12#include <asm/uaccess.h> 12#include <asm/uaccess.h>
13#include <asm/system.h> 13#include <asm/system.h>
14#include <asm/bitops.h> 14#include <asm/bitops.h>
15#include <linux/config.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
18#include <linux/sched.h> 17#include <linux/sched.h>
diff --git a/net/sched/act_police.c b/net/sched/act_police.c
index 24c348fa892..47e00bd9625 100644
--- a/net/sched/act_police.c
+++ b/net/sched/act_police.c
@@ -13,7 +13,6 @@
13#include <asm/uaccess.h> 13#include <asm/uaccess.h>
14#include <asm/system.h> 14#include <asm/system.h>
15#include <linux/bitops.h> 15#include <linux/bitops.h>
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/types.h> 17#include <linux/types.h>
19#include <linux/kernel.h> 18#include <linux/kernel.h>
diff --git a/net/sched/act_simple.c b/net/sched/act_simple.c
index e5f2e1f431e..17105c82537 100644
--- a/net/sched/act_simple.c
+++ b/net/sched/act_simple.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <linux/init.h> 14#include <linux/init.h>
16#include <linux/kernel.h> 15#include <linux/kernel.h>
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index b4d89fbb378..7e14f14058e 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -17,7 +17,6 @@
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18#include <asm/system.h> 18#include <asm/system.h>
19#include <linux/bitops.h> 19#include <linux/bitops.h>
20#include <linux/config.h>
21#include <linux/module.h> 20#include <linux/module.h>
22#include <linux/types.h> 21#include <linux/types.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index dfb300bb6ba..61507f006b1 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -9,7 +9,6 @@
9 * Authors: Thomas Graf <tgraf@suug.ch> 9 * Authors: Thomas Graf <tgraf@suug.ch>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c
index 75470486e40..d41de91fc4f 100644
--- a/net/sched/cls_fw.c
+++ b/net/sched/cls_fw.c
@@ -18,7 +18,6 @@
18 * 18 *
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <asm/uaccess.h> 22#include <asm/uaccess.h>
24#include <asm/system.h> 23#include <asm/system.h>
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c
index 520ff716dab..c2e71900f7b 100644
--- a/net/sched/cls_route.c
+++ b/net/sched/cls_route.c
@@ -10,7 +10,6 @@
10 */ 10 */
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/config.h>
14#include <asm/uaccess.h> 13#include <asm/uaccess.h>
15#include <asm/system.h> 14#include <asm/system.h>
16#include <linux/bitops.h> 15#include <linux/bitops.h>
diff --git a/net/sched/cls_rsvp.h b/net/sched/cls_rsvp.h
index 572f06be3b0..ba874197162 100644
--- a/net/sched/cls_rsvp.h
+++ b/net/sched/cls_rsvp.h
@@ -65,7 +65,6 @@
65 Well, as result, despite its simplicity, we get a pretty 65 Well, as result, despite its simplicity, we get a pretty
66 powerful classification engine. */ 66 powerful classification engine. */
67 67
68#include <linux/config.h>
69 68
70struct rsvp_head 69struct rsvp_head
71{ 70{
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
index 9f921174c8a..7870e7bb0ba 100644
--- a/net/sched/cls_tcindex.c
+++ b/net/sched/cls_tcindex.c
@@ -4,7 +4,6 @@
4 * Written 1998,1999 by Werner Almesberger, EPFL ICA 4 * Written 1998,1999 by Werner Almesberger, EPFL ICA
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/module.h> 7#include <linux/module.h>
9#include <linux/types.h> 8#include <linux/types.h>
10#include <linux/kernel.h> 9#include <linux/kernel.h>
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 78e052591fa..d712edcd1bc 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -33,7 +33,6 @@
33#include <asm/uaccess.h> 33#include <asm/uaccess.h>
34#include <asm/system.h> 34#include <asm/system.h>
35#include <linux/bitops.h> 35#include <linux/bitops.h>
36#include <linux/config.h>
37#include <linux/module.h> 36#include <linux/module.h>
38#include <linux/types.h> 37#include <linux/types.h>
39#include <linux/kernel.h> 38#include <linux/kernel.h>
diff --git a/net/sched/em_cmp.c b/net/sched/em_cmp.c
index bf1f00f8b1b..8ed93c39b4e 100644
--- a/net/sched/em_cmp.c
+++ b/net/sched/em_cmp.c
@@ -9,7 +9,6 @@
9 * Authors: Thomas Graf <tgraf@suug.ch> 9 * Authors: Thomas Graf <tgraf@suug.ch>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/net/sched/em_meta.c b/net/sched/em_meta.c
index 700844d49d7..698372954f4 100644
--- a/net/sched/em_meta.c
+++ b/net/sched/em_meta.c
@@ -58,7 +58,6 @@
58 * only available if that subsytem is enabled in the kernel. 58 * only available if that subsytem is enabled in the kernel.
59 */ 59 */
60 60
61#include <linux/config.h>
62#include <linux/module.h> 61#include <linux/module.h>
63#include <linux/types.h> 62#include <linux/types.h>
64#include <linux/kernel.h> 63#include <linux/kernel.h>
diff --git a/net/sched/em_nbyte.c b/net/sched/em_nbyte.c
index 71ea926a9f0..cc80babfd79 100644
--- a/net/sched/em_nbyte.c
+++ b/net/sched/em_nbyte.c
@@ -9,7 +9,6 @@
9 * Authors: Thomas Graf <tgraf@suug.ch> 9 * Authors: Thomas Graf <tgraf@suug.ch>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/net/sched/em_text.c b/net/sched/em_text.c
index 77beabc91fa..aa17d8f7c4c 100644
--- a/net/sched/em_text.c
+++ b/net/sched/em_text.c
@@ -9,7 +9,6 @@
9 * Authors: Thomas Graf <tgraf@suug.ch> 9 * Authors: Thomas Graf <tgraf@suug.ch>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/net/sched/em_u32.c b/net/sched/em_u32.c
index 34e7e51e601..e3ddfce0ac8 100644
--- a/net/sched/em_u32.c
+++ b/net/sched/em_u32.c
@@ -12,7 +12,6 @@
12 * Based on net/sched/cls_u32.c 12 * Based on net/sched/cls_u32.c
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
diff --git a/net/sched/ematch.c b/net/sched/ematch.c
index 5cb956b721e..2405a86093a 100644
--- a/net/sched/ematch.c
+++ b/net/sched/ematch.c
@@ -81,7 +81,6 @@
81 * open up a beer to watch the compilation going. 81 * open up a beer to watch the compilation going.
82 */ 82 */
83 83
84#include <linux/config.h>
85#include <linux/module.h> 84#include <linux/module.h>
86#include <linux/types.h> 85#include <linux/types.h>
87#include <linux/kernel.h> 86#include <linux/kernel.h>
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 31570b9a6e9..c7844bacbbc 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -15,7 +15,6 @@
15 * Jamal Hadi Salim <hadi@nortelnetworks.com>: 990601: ingress support 15 * Jamal Hadi Salim <hadi@nortelnetworks.com>: 990601: ingress support
16 */ 16 */
17 17
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/types.h> 19#include <linux/types.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/net/sched/sch_atm.c b/net/sched/sch_atm.c
index ac7cb60d1e2..dbf44da0912 100644
--- a/net/sched/sch_atm.c
+++ b/net/sched/sch_atm.c
@@ -3,7 +3,6 @@
3/* Written 1998-2000 by Werner Almesberger, EPFL ICA */ 3/* Written 1998-2000 by Werner Almesberger, EPFL ICA */
4 4
5 5
6#include <linux/config.h>
7#include <linux/module.h> 6#include <linux/module.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/string.h> 8#include <linux/string.h>
diff --git a/net/sched/sch_blackhole.c b/net/sched/sch_blackhole.c
index 81f0b8346d1..cb0c456aa34 100644
--- a/net/sched/sch_blackhole.c
+++ b/net/sched/sch_blackhole.c
@@ -11,7 +11,6 @@
11 * Note: Quantum tunneling is not supported. 11 * Note: Quantum tunneling is not supported.
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <linux/types.h> 15#include <linux/types.h>
17#include <linux/kernel.h> 16#include <linux/kernel.h>
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c
index 6cd81708bf7..80b7f6a8d00 100644
--- a/net/sched/sch_cbq.c
+++ b/net/sched/sch_cbq.c
@@ -10,7 +10,6 @@
10 * 10 *
11 */ 11 */
12 12
13#include <linux/config.h>
14#include <linux/module.h> 13#include <linux/module.h>
15#include <asm/uaccess.h> 14#include <asm/uaccess.h>
16#include <asm/system.h> 15#include <asm/system.h>
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c
index f6320ca7049..11c8a2119b9 100644
--- a/net/sched/sch_dsmark.c
+++ b/net/sched/sch_dsmark.c
@@ -3,7 +3,6 @@
3/* Written 1998-2000 by Werner Almesberger, EPFL ICA */ 3/* Written 1998-2000 by Werner Almesberger, EPFL ICA */
4 4
5 5
6#include <linux/config.h>
7#include <linux/module.h> 6#include <linux/module.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/types.h> 8#include <linux/types.h>
diff --git a/net/sched/sch_fifo.c b/net/sched/sch_fifo.c
index 033083bf0e7..c2689f4ba8d 100644
--- a/net/sched/sch_fifo.c
+++ b/net/sched/sch_fifo.c
@@ -9,7 +9,6 @@
9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/types.h> 13#include <linux/types.h>
15#include <linux/kernel.h> 14#include <linux/kernel.h>
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index 74d4a1dceee..d735f51686a 100644
--- a/net/sched/sch_generic.c
+++ b/net/sched/sch_generic.c
@@ -14,7 +14,6 @@
14#include <asm/uaccess.h> 14#include <asm/uaccess.h>
15#include <asm/system.h> 15#include <asm/system.h>
16#include <linux/bitops.h> 16#include <linux/bitops.h>
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/net/sched/sch_gred.c b/net/sched/sch_gred.c
index 29a2dd9f302..0cafdd5feb1 100644
--- a/net/sched/sch_gred.c
+++ b/net/sched/sch_gred.c
@@ -18,7 +18,6 @@
18 * For all the glorious comments look at include/net/red.h 18 * For all the glorious comments look at include/net/red.h
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/types.h> 22#include <linux/types.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index f1c7bd29f2c..6b1b4a981e8 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -50,7 +50,6 @@
50 */ 50 */
51 51
52#include <linux/kernel.h> 52#include <linux/kernel.h>
53#include <linux/config.h>
54#include <linux/module.h> 53#include <linux/module.h>
55#include <linux/types.h> 54#include <linux/types.h>
56#include <linux/errno.h> 55#include <linux/errno.h>
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 3ec95df4a85..34afe41fa2f 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -27,7 +27,6 @@
27 * 27 *
28 * $Id: sch_htb.c,v 1.25 2003/12/07 11:08:25 devik Exp devik $ 28 * $Id: sch_htb.c,v 1.25 2003/12/07 11:08:25 devik Exp devik $
29 */ 29 */
30#include <linux/config.h>
31#include <linux/module.h> 30#include <linux/module.h>
32#include <asm/uaccess.h> 31#include <asm/uaccess.h>
33#include <asm/system.h> 32#include <asm/system.h>
diff --git a/net/sched/sch_ingress.c b/net/sched/sch_ingress.c
index 8edc32a6ad2..c3242f727d4 100644
--- a/net/sched/sch_ingress.c
+++ b/net/sched/sch_ingress.c
@@ -7,7 +7,6 @@
7 * Authors: Jamal Hadi Salim 1999 7 * Authors: Jamal Hadi Salim 1999
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/module.h> 10#include <linux/module.h>
12#include <linux/types.h> 11#include <linux/types.h>
13#include <linux/skbuff.h> 12#include <linux/skbuff.h>
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c
index 5a4a4d0ae50..c5bd8064e6d 100644
--- a/net/sched/sch_netem.c
+++ b/net/sched/sch_netem.c
@@ -13,7 +13,6 @@
13 * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro> 13 * Catalin(ux aka Dino) BOIE <catab at umbrella dot ro>
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/bitops.h> 17#include <linux/bitops.h>
19#include <linux/types.h> 18#include <linux/types.h>
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c
index 3395ca7bcad..a5fa03c0c19 100644
--- a/net/sched/sch_prio.c
+++ b/net/sched/sch_prio.c
@@ -11,7 +11,6 @@
11 * Init -- EINVAL when opt undefined 11 * Init -- EINVAL when opt undefined
12 */ 12 */
13 13
14#include <linux/config.h>
15#include <linux/module.h> 14#include <linux/module.h>
16#include <asm/uaccess.h> 15#include <asm/uaccess.h>
17#include <asm/system.h> 16#include <asm/system.h>
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index 2be563cba72..d65cadddea6 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -14,7 +14,6 @@
14 * J Hadi Salim 980816: ECN support 14 * J Hadi Salim 980816: ECN support
15 */ 15 */
16 16
17#include <linux/config.h>
18#include <linux/module.h> 17#include <linux/module.h>
19#include <linux/types.h> 18#include <linux/types.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index e057768f68b..d0d6e595a78 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -9,7 +9,6 @@
9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> 9 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <asm/uaccess.h> 13#include <asm/uaccess.h>
15#include <asm/system.h> 14#include <asm/system.h>
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c
index d8e03c74ca7..d9a5d298d75 100644
--- a/net/sched/sch_tbf.c
+++ b/net/sched/sch_tbf.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <asm/uaccess.h> 16#include <asm/uaccess.h>
18#include <asm/system.h> 17#include <asm/system.h>
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index b811691c35b..0a2c71d0d8a 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -57,7 +57,6 @@
57 * be incorporated into the next SCTP release. 57 * be incorporated into the next SCTP release.
58 */ 58 */
59 59
60#include <linux/config.h>
61#include <linux/types.h> 60#include <linux/types.h>
62#include <linux/kernel.h> 61#include <linux/kernel.h>
63#include <linux/wait.h> 62#include <linux/wait.h>
diff --git a/net/socket.c b/net/socket.c
index 565f5e8d119..b4848ce0d6a 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -58,7 +58,6 @@
58 * Based upon Swansea University Computer Society NET3.039 58 * Based upon Swansea University Computer Society NET3.039
59 */ 59 */
60 60
61#include <linux/config.h>
62#include <linux/mm.h> 61#include <linux/mm.h>
63#include <linux/smp_lock.h> 62#include <linux/smp_lock.h>
64#include <linux/socket.h> 63#include <linux/socket.h>
diff --git a/net/sunrpc/pmap_clnt.c b/net/sunrpc/pmap_clnt.c
index d25b054ec92..623180f224c 100644
--- a/net/sunrpc/pmap_clnt.c
+++ b/net/sunrpc/pmap_clnt.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> 6 * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/types.h> 9#include <linux/types.h>
11#include <linux/socket.h> 10#include <linux/socket.h>
12#include <linux/kernel.h> 11#include <linux/kernel.h>
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index dafe793c774..6db6006616c 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -8,7 +8,6 @@
8 * Copyright (c) 2002, Trond Myklebust <trond.myklebust@fys.uio.no> 8 * Copyright (c) 2002, Trond Myklebust <trond.myklebust@fys.uio.no>
9 * 9 *
10 */ 10 */
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/slab.h> 12#include <linux/slab.h>
14#include <linux/string.h> 13#include <linux/string.h>
diff --git a/net/sunrpc/sunrpc_syms.c b/net/sunrpc/sunrpc_syms.c
index 769114f0f88..f38f939ce95 100644
--- a/net/sunrpc/sunrpc_syms.c
+++ b/net/sunrpc/sunrpc_syms.c
@@ -6,7 +6,6 @@
6 * Copyright (C) 1997 Olaf Kirch <okir@monad.swb.de> 6 * Copyright (C) 1997 Olaf Kirch <okir@monad.swb.de>
7 */ 7 */
8 8
9#include <linux/config.h>
10#include <linux/module.h> 9#include <linux/module.h>
11 10
12#include <linux/types.h> 11#include <linux/types.h>
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c
index 1065904841f..d89b048ad6b 100644
--- a/net/sunrpc/sysctl.c
+++ b/net/sunrpc/sysctl.c
@@ -7,7 +7,6 @@
7 * impossible at the moment. 7 * impossible at the moment.
8 */ 8 */
9 9
10#include <linux/config.h>
11#include <linux/types.h> 10#include <linux/types.h>
12#include <linux/linkage.h> 11#include <linux/linkage.h>
13#include <linux/ctype.h> 12#include <linux/ctype.h>
diff --git a/net/sysctl_net.c b/net/sysctl_net.c
index 58a1b6b42dd..cd4eafbab1b 100644
--- a/net/sysctl_net.c
+++ b/net/sysctl_net.c
@@ -12,7 +12,6 @@
12 * 12 *
13 */ 13 */
14 14
15#include <linux/config.h>
16#include <linux/mm.h> 15#include <linux/mm.h>
17#include <linux/sysctl.h> 16#include <linux/sysctl.h>
18 17
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index fd11d4048b5..aca65010942 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -83,7 +83,6 @@
83 */ 83 */
84 84
85#include <linux/module.h> 85#include <linux/module.h>
86#include <linux/config.h>
87#include <linux/kernel.h> 86#include <linux/kernel.h>
88#include <linux/signal.h> 87#include <linux/signal.h>
89#include <linux/sched.h> 88#include <linux/sched.h>
diff --git a/net/wanrouter/af_wanpipe.c b/net/wanrouter/af_wanpipe.c
index b1265187b4a..a690cf773b6 100644
--- a/net/wanrouter/af_wanpipe.c
+++ b/net/wanrouter/af_wanpipe.c
@@ -32,7 +32,6 @@
32* 32*
33******************************************************************************/ 33******************************************************************************/
34 34
35#include <linux/config.h>
36#include <linux/types.h> 35#include <linux/types.h>
37#include <linux/sched.h> 36#include <linux/sched.h>
38#include <linux/mm.h> 37#include <linux/mm.h>
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c
index c34833dc7cc..ad8e8a79779 100644
--- a/net/wanrouter/wanmain.c
+++ b/net/wanrouter/wanmain.c
@@ -42,7 +42,6 @@
42* Jun 02, 1999 Gideon Hack Updates for Linux 2.0.X and 2.2.X kernels. 42* Jun 02, 1999 Gideon Hack Updates for Linux 2.0.X and 2.2.X kernels.
43*****************************************************************************/ 43*****************************************************************************/
44 44
45#include <linux/config.h>
46#include <linux/stddef.h> /* offsetof(), etc. */ 45#include <linux/stddef.h> /* offsetof(), etc. */
47#include <linux/capability.h> 46#include <linux/capability.h>
48#include <linux/errno.h> /* return codes */ 47#include <linux/errno.h> /* return codes */
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c
index c28ba5a4720..930ea59463a 100644
--- a/net/wanrouter/wanproc.c
+++ b/net/wanrouter/wanproc.c
@@ -20,7 +20,6 @@
20* Dec 13, 1996 Gene Kozin Initial version (based on Sangoma's WANPIPE) 20* Dec 13, 1996 Gene Kozin Initial version (based on Sangoma's WANPIPE)
21*****************************************************************************/ 21*****************************************************************************/
22 22
23#include <linux/config.h>
24#include <linux/init.h> /* __initfunc et al. */ 23#include <linux/init.h> /* __initfunc et al. */
25#include <linux/stddef.h> /* offsetof(), etc. */ 24#include <linux/stddef.h> /* offsetof(), etc. */
26#include <linux/errno.h> /* return codes */ 25#include <linux/errno.h> /* return codes */
diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c
index 282ce4e40d7..52a2726d327 100644
--- a/net/x25/af_x25.c
+++ b/net/x25/af_x25.c
@@ -35,7 +35,6 @@
35 * response 35 * response
36 */ 36 */
37 37
38#include <linux/config.h>
39#include <linux/module.h> 38#include <linux/module.h>
40#include <linux/capability.h> 39#include <linux/capability.h>
41#include <linux/errno.h> 40#include <linux/errno.h>
diff --git a/net/x25/x25_dev.c b/net/x25/x25_dev.c
index adfe7b8df35..47b68a30167 100644
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -17,7 +17,6 @@
17 * 2000-09-04 Henner Eisen Prevent freeing a dangling skb. 17 * 2000-09-04 Henner Eisen Prevent freeing a dangling skb.
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/kernel.h> 20#include <linux/kernel.h>
22#include <linux/netdevice.h> 21#include <linux/netdevice.h>
23#include <linux/skbuff.h> 22#include <linux/skbuff.h>
diff --git a/net/x25/x25_proc.c b/net/x25/x25_proc.c
index dfb80116c59..a11837d361d 100644
--- a/net/x25/x25_proc.c
+++ b/net/x25/x25_proc.c
@@ -17,7 +17,6 @@
17 * 2002/10/06 Arnaldo Carvalho de Melo seq_file support 17 * 2002/10/06 Arnaldo Carvalho de Melo seq_file support
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/proc_fs.h> 21#include <linux/proc_fs.h>
23#include <linux/seq_file.h> 22#include <linux/seq_file.h>
diff --git a/net/x25/x25_route.c b/net/x25/x25_route.c
index 6c5d3751703..2a3fe986b24 100644
--- a/net/x25/x25_route.c
+++ b/net/x25/x25_route.c
@@ -17,7 +17,6 @@
17 * X.25 001 Jonathan Naylor Started coding. 17 * X.25 001 Jonathan Naylor Started coding.
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/if_arp.h> 20#include <linux/if_arp.h>
22#include <linux/init.h> 21#include <linux/init.h>
23#include <net/x25.h> 22#include <net/x25.h>
diff --git a/net/xfrm/xfrm_algo.c b/net/xfrm/xfrm_algo.c
index 6ed3302312f..04e1aea58bc 100644
--- a/net/xfrm/xfrm_algo.c
+++ b/net/xfrm/xfrm_algo.c
@@ -9,7 +9,6 @@
9 * any later version. 9 * any later version.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/module.h> 12#include <linux/module.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
15#include <linux/pfkeyv2.h> 14#include <linux/pfkeyv2.h>
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index b8936926c24..405b741dff4 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -13,7 +13,6 @@
13 * 13 *
14 */ 14 */
15 15
16#include <linux/config.h>
17#include <linux/slab.h> 16#include <linux/slab.h>
18#include <linux/kmod.h> 17#include <linux/kmod.h>
19#include <linux/list.h> 18#include <linux/list.h>
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 00e21297aef..f9460a6218d 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1056,7 +1056,8 @@ sub output_struct_man(%) {
1056 # pointer-to-function 1056 # pointer-to-function
1057 print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n"; 1057 print ".BI \" ".$1."\" ".$parameter." \") (".$2.")"."\"\n;\n";
1058 } elsif ($type =~ m/^(.*?)\s*(:.*)/) { 1058 } elsif ($type =~ m/^(.*?)\s*(:.*)/) {
1059 print ".BI \" ".$1."\" ".$parameter.$2." \""."\"\n;\n"; 1059 # bitfield
1060 print ".BI \" ".$1."\ \" ".$parameter.$2." \""."\"\n;\n";
1060 } else { 1061 } else {
1061 $type =~ s/([^\*])$/$1 /; 1062 $type =~ s/([^\*])$/$1 /;
1062 print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n"; 1063 print ".BI \" ".$type."\" ".$parameter." \""."\"\n;\n";
@@ -1118,7 +1119,10 @@ sub output_function_text(%) {
1118 my %args = %{$_[0]}; 1119 my %args = %{$_[0]};
1119 my ($parameter, $section); 1120 my ($parameter, $section);
1120 1121
1121 print "Function:\n\n"; 1122 print "Name:\n\n";
1123 print $args{'function'}." - ".$args{'purpose'}."\n";
1124
1125 print "\nSynopsis:\n\n";
1122 my $start=$args{'functiontype'}." ".$args{'function'}." ("; 1126 my $start=$args{'functiontype'}." ".$args{'function'}." (";
1123 print $start; 1127 print $start;
1124 my $count = 0; 1128 my $count = 0;
@@ -1169,6 +1173,7 @@ sub output_enum_text(%) {
1169 my $count; 1173 my $count;
1170 print "Enum:\n\n"; 1174 print "Enum:\n\n";
1171 1175
1176 print "enum ".$args{'enum'}." - ".$args{'purpose'}."\n\n";
1172 print "enum ".$args{'enum'}." {\n"; 1177 print "enum ".$args{'enum'}." {\n";
1173 $count = 0; 1178 $count = 0;
1174 foreach $parameter (@{$args{'parameterlist'}}) { 1179 foreach $parameter (@{$args{'parameterlist'}}) {
@@ -1197,7 +1202,7 @@ sub output_typedef_text(%) {
1197 my $count; 1202 my $count;
1198 print "Typedef:\n\n"; 1203 print "Typedef:\n\n";
1199 1204
1200 print "typedef ".$args{'typedef'}."\n"; 1205 print "typedef ".$args{'typedef'}." - ".$args{'purpose'}."\n";
1201 output_section_text(@_); 1206 output_section_text(@_);
1202} 1207}
1203 1208
@@ -1206,7 +1211,7 @@ sub output_struct_text(%) {
1206 my %args = %{$_[0]}; 1211 my %args = %{$_[0]};
1207 my ($parameter); 1212 my ($parameter);
1208 1213
1209 print $args{'type'}." ".$args{'struct'}.":\n\n"; 1214 print $args{'type'}." ".$args{'struct'}." - ".$args{'purpose'}."\n\n";
1210 print $args{'type'}." ".$args{'struct'}." {\n"; 1215 print $args{'type'}." ".$args{'struct'}." {\n";
1211 foreach $parameter (@{$args{'parameterlist'}}) { 1216 foreach $parameter (@{$args{'parameterlist'}}) {
1212 if ($parameter =~ /^#/) { 1217 if ($parameter =~ /^#/) {
diff --git a/security/capability.c b/security/capability.c
index f9b35cc0b24..b868e7eda5f 100644
--- a/security/capability.c
+++ b/security/capability.c
@@ -8,7 +8,6 @@
8 * 8 *
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/security/commoncap.c b/security/commoncap.c
index 57673ee07ce..f50fc298cf8 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -8,7 +8,6 @@
8 */ 8 */
9 9
10#include <linux/capability.h> 10#include <linux/capability.h>
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
diff --git a/security/dummy.c b/security/dummy.c
index d417936562d..bbbfda70e13 100644
--- a/security/dummy.c
+++ b/security/dummy.c
@@ -15,7 +15,6 @@
15#undef DEBUG 15#undef DEBUG
16 16
17#include <linux/capability.h> 17#include <linux/capability.h>
18#include <linux/config.h>
19#include <linux/module.h> 18#include <linux/module.h>
20#include <linux/kernel.h> 19#include <linux/kernel.h>
21#include <linux/mman.h> 20#include <linux/mman.h>
diff --git a/security/inode.c b/security/inode.c
index 98a0df500dc..47eb63480da 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -13,7 +13,6 @@
13 */ 13 */
14 14
15/* #define DEBUG */ 15/* #define DEBUG */
16#include <linux/config.h>
17#include <linux/module.h> 16#include <linux/module.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
19#include <linux/mount.h> 18#include <linux/mount.h>
diff --git a/security/root_plug.c b/security/root_plug.c
index 07651def2f7..38dd4f3e641 100644
--- a/security/root_plug.c
+++ b/security/root_plug.c
@@ -22,7 +22,6 @@
22 * License. 22 * License.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/kernel.h> 26#include <linux/kernel.h>
28#include <linux/init.h> 27#include <linux/init.h>
diff --git a/security/seclvl.c b/security/seclvl.c
index 441beaf1bbc..c26dd7de047 100644
--- a/security/seclvl.c
+++ b/security/seclvl.c
@@ -16,7 +16,6 @@
16 * (at your option) any later version. 16 * (at your option) any later version.
17 */ 17 */
18 18
19#include <linux/config.h>
20#include <linux/module.h> 19#include <linux/module.h>
21#include <linux/moduleparam.h> 20#include <linux/moduleparam.h>
22#include <linux/kernel.h> 21#include <linux/kernel.h>
diff --git a/security/security.c b/security/security.c
index 51ef509710b..ee4e0701b6e 100644
--- a/security/security.c
+++ b/security/security.c
@@ -12,7 +12,6 @@
12 */ 12 */
13 13
14#include <linux/capability.h> 14#include <linux/capability.h>
15#include <linux/config.h>
16#include <linux/module.h> 15#include <linux/module.h>
17#include <linux/init.h> 16#include <linux/init.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 51bec4c88f1..24caaeec889 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -18,7 +18,6 @@
18 * as published by the Free Software Foundation. 18 * as published by the Free Software Foundation.
19 */ 19 */
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/init.h> 22#include <linux/init.h>
24#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 7029bbc9bef..00534c302ba 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -9,7 +9,6 @@
9 * the Free Software Foundation, version 2. 9 * the Free Software Foundation, version 2.
10 */ 10 */
11 11
12#include <linux/config.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/pagemap.h> 13#include <linux/pagemap.h>
15#include <linux/slab.h> 14#include <linux/slab.h>
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index e9548bc049e..d2e80e62ff0 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -1845,15 +1845,20 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr,
1845 return -ENOTSUPP; 1845 return -ENOTSUPP;
1846 1846
1847 switch (field) { 1847 switch (field) {
1848 case AUDIT_SE_USER: 1848 case AUDIT_SUBJ_USER:
1849 case AUDIT_SE_ROLE: 1849 case AUDIT_SUBJ_ROLE:
1850 case AUDIT_SE_TYPE: 1850 case AUDIT_SUBJ_TYPE:
1851 case AUDIT_OBJ_USER:
1852 case AUDIT_OBJ_ROLE:
1853 case AUDIT_OBJ_TYPE:
1851 /* only 'equals' and 'not equals' fit user, role, and type */ 1854 /* only 'equals' and 'not equals' fit user, role, and type */
1852 if (op != AUDIT_EQUAL && op != AUDIT_NOT_EQUAL) 1855 if (op != AUDIT_EQUAL && op != AUDIT_NOT_EQUAL)
1853 return -EINVAL; 1856 return -EINVAL;
1854 break; 1857 break;
1855 case AUDIT_SE_SEN: 1858 case AUDIT_SUBJ_SEN:
1856 case AUDIT_SE_CLR: 1859 case AUDIT_SUBJ_CLR:
1860 case AUDIT_OBJ_LEV_LOW:
1861 case AUDIT_OBJ_LEV_HIGH:
1857 /* we do not allow a range, indicated by the presense of '-' */ 1862 /* we do not allow a range, indicated by the presense of '-' */
1858 if (strchr(rulestr, '-')) 1863 if (strchr(rulestr, '-'))
1859 return -EINVAL; 1864 return -EINVAL;
@@ -1874,29 +1879,34 @@ int selinux_audit_rule_init(u32 field, u32 op, char *rulestr,
1874 tmprule->au_seqno = latest_granting; 1879 tmprule->au_seqno = latest_granting;
1875 1880
1876 switch (field) { 1881 switch (field) {
1877 case AUDIT_SE_USER: 1882 case AUDIT_SUBJ_USER:
1883 case AUDIT_OBJ_USER:
1878 userdatum = hashtab_search(policydb.p_users.table, rulestr); 1884 userdatum = hashtab_search(policydb.p_users.table, rulestr);
1879 if (!userdatum) 1885 if (!userdatum)
1880 rc = -EINVAL; 1886 rc = -EINVAL;
1881 else 1887 else
1882 tmprule->au_ctxt.user = userdatum->value; 1888 tmprule->au_ctxt.user = userdatum->value;
1883 break; 1889 break;
1884 case AUDIT_SE_ROLE: 1890 case AUDIT_SUBJ_ROLE:
1891 case AUDIT_OBJ_ROLE:
1885 roledatum = hashtab_search(policydb.p_roles.table, rulestr); 1892 roledatum = hashtab_search(policydb.p_roles.table, rulestr);
1886 if (!roledatum) 1893 if (!roledatum)
1887 rc = -EINVAL; 1894 rc = -EINVAL;
1888 else 1895 else
1889 tmprule->au_ctxt.role = roledatum->value; 1896 tmprule->au_ctxt.role = roledatum->value;
1890 break; 1897 break;
1891 case AUDIT_SE_TYPE: 1898 case AUDIT_SUBJ_TYPE:
1899 case AUDIT_OBJ_TYPE:
1892 typedatum = hashtab_search(policydb.p_types.table, rulestr); 1900 typedatum = hashtab_search(policydb.p_types.table, rulestr);
1893 if (!typedatum) 1901 if (!typedatum)
1894 rc = -EINVAL; 1902 rc = -EINVAL;
1895 else 1903 else
1896 tmprule->au_ctxt.type = typedatum->value; 1904 tmprule->au_ctxt.type = typedatum->value;
1897 break; 1905 break;
1898 case AUDIT_SE_SEN: 1906 case AUDIT_SUBJ_SEN:
1899 case AUDIT_SE_CLR: 1907 case AUDIT_SUBJ_CLR:
1908 case AUDIT_OBJ_LEV_LOW:
1909 case AUDIT_OBJ_LEV_HIGH:
1900 rc = mls_from_string(rulestr, &tmprule->au_ctxt, GFP_ATOMIC); 1910 rc = mls_from_string(rulestr, &tmprule->au_ctxt, GFP_ATOMIC);
1901 break; 1911 break;
1902 } 1912 }
@@ -1948,7 +1958,8 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op,
1948 /* a field/op pair that is not caught here will simply fall through 1958 /* a field/op pair that is not caught here will simply fall through
1949 without a match */ 1959 without a match */
1950 switch (field) { 1960 switch (field) {
1951 case AUDIT_SE_USER: 1961 case AUDIT_SUBJ_USER:
1962 case AUDIT_OBJ_USER:
1952 switch (op) { 1963 switch (op) {
1953 case AUDIT_EQUAL: 1964 case AUDIT_EQUAL:
1954 match = (ctxt->user == rule->au_ctxt.user); 1965 match = (ctxt->user == rule->au_ctxt.user);
@@ -1958,7 +1969,8 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op,
1958 break; 1969 break;
1959 } 1970 }
1960 break; 1971 break;
1961 case AUDIT_SE_ROLE: 1972 case AUDIT_SUBJ_ROLE:
1973 case AUDIT_OBJ_ROLE:
1962 switch (op) { 1974 switch (op) {
1963 case AUDIT_EQUAL: 1975 case AUDIT_EQUAL:
1964 match = (ctxt->role == rule->au_ctxt.role); 1976 match = (ctxt->role == rule->au_ctxt.role);
@@ -1968,7 +1980,8 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op,
1968 break; 1980 break;
1969 } 1981 }
1970 break; 1982 break;
1971 case AUDIT_SE_TYPE: 1983 case AUDIT_SUBJ_TYPE:
1984 case AUDIT_OBJ_TYPE:
1972 switch (op) { 1985 switch (op) {
1973 case AUDIT_EQUAL: 1986 case AUDIT_EQUAL:
1974 match = (ctxt->type == rule->au_ctxt.type); 1987 match = (ctxt->type == rule->au_ctxt.type);
@@ -1978,9 +1991,12 @@ int selinux_audit_rule_match(u32 ctxid, u32 field, u32 op,
1978 break; 1991 break;
1979 } 1992 }
1980 break; 1993 break;
1981 case AUDIT_SE_SEN: 1994 case AUDIT_SUBJ_SEN:
1982 case AUDIT_SE_CLR: 1995 case AUDIT_SUBJ_CLR:
1983 level = (field == AUDIT_SE_SEN ? 1996 case AUDIT_OBJ_LEV_LOW:
1997 case AUDIT_OBJ_LEV_HIGH:
1998 level = ((field == AUDIT_SUBJ_SEN ||
1999 field == AUDIT_OBJ_LEV_LOW) ?
1984 &ctxt->range.level[0] : &ctxt->range.level[1]); 2000 &ctxt->range.level[0] : &ctxt->range.level[1]);
1985 switch (op) { 2001 switch (op) {
1986 case AUDIT_EQUAL: 2002 case AUDIT_EQUAL:
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 6633fb05931..6c985ced810 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -26,7 +26,6 @@
26 * 2. Emulating a reasonable SO_PEERSEC across machines 26 * 2. Emulating a reasonable SO_PEERSEC across machines
27 * 3. Testing addition of sk_policy's with security context via setsockopt 27 * 3. Testing addition of sk_policy's with security context via setsockopt
28 */ 28 */
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/kernel.h> 30#include <linux/kernel.h>
32#include <linux/init.h> 31#include <linux/init.h>
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 6b18225672c..8435fdd1c87 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -360,7 +360,7 @@ static int aaci_pcm_open(struct aaci *aaci, struct snd_pcm_substream *substream,
360 if (ret) 360 if (ret)
361 goto out; 361 goto out;
362 362
363 ret = request_irq(aaci->dev->irq[0], aaci_irq, SA_SHIRQ|SA_INTERRUPT, 363 ret = request_irq(aaci->dev->irq[0], aaci_irq, IRQF_SHARED|IRQF_DISABLED,
364 DRIVER_NAME, aaci); 364 DRIVER_NAME, aaci);
365 if (ret) 365 if (ret)
366 goto out; 366 goto out;
diff --git a/sound/arm/sa11xx-uda1341.c b/sound/arm/sa11xx-uda1341.c
index b88fb0c5a68..c79a9afd095 100644
--- a/sound/arm/sa11xx-uda1341.c
+++ b/sound/arm/sa11xx-uda1341.c
@@ -59,7 +59,6 @@
59* 59*
60***************************************************************************************************/ 60***************************************************************************************************/
61 61
62#include <linux/config.h>
63#include <sound/driver.h> 62#include <sound/driver.h>
64#include <linux/module.h> 63#include <linux/module.h>
65#include <linux/moduleparam.h> 64#include <linux/moduleparam.h>
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c
index 3fc6f97075e..bc0bd0910a6 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -21,7 +21,6 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/config.h>
25#include <linux/module.h> 24#include <linux/module.h>
26#include <linux/proc_fs.h> 25#include <linux/proc_fs.h>
27#include <linux/init.h> 26#include <linux/init.h>
diff --git a/sound/core/sgbuf.c b/sound/core/sgbuf.c
index 74745da9deb..6e4d4ab3463 100644
--- a/sound/core/sgbuf.c
+++ b/sound/core/sgbuf.c
@@ -19,7 +19,6 @@
19 * 19 *
20 */ 20 */
21 21
22#include <linux/config.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include <linux/mm.h> 23#include <linux/mm.h>
25#include <linux/vmalloc.h> 24#include <linux/vmalloc.h>
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index 8b80024968b..17cc105b26f 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -83,7 +83,7 @@ static int snd_mpu401_create(int dev, struct snd_card **rcard)
83 if ((err = snd_mpu401_uart_new(card, 0, 83 if ((err = snd_mpu401_uart_new(card, 0,
84 MPU401_HW_MPU401, 84 MPU401_HW_MPU401,
85 port[dev], 0, 85 port[dev], 0,
86 irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL)) < 0) { 86 irq[dev], irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL)) < 0) {
87 printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); 87 printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]);
88 goto _err; 88 goto _err;
89 } 89 }
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
index 474eed06e70..e064d6c5685 100644
--- a/sound/drivers/mtpav.c
+++ b/sound/drivers/mtpav.c
@@ -590,7 +590,7 @@ static int __init snd_mtpav_get_ISA(struct mtpav * mcard)
590 return -EBUSY; 590 return -EBUSY;
591 } 591 }
592 mcard->port = port; 592 mcard->port = port;
593 if (request_irq(irq, snd_mtpav_irqh, SA_INTERRUPT, "MOTU MTPAV", mcard)) { 593 if (request_irq(irq, snd_mtpav_irqh, IRQF_DISABLED, "MOTU MTPAV", mcard)) {
594 snd_printk("MTVAP IRQ %d busy\n", irq); 594 snd_printk("MTVAP IRQ %d busy\n", irq);
595 return -EBUSY; 595 return -EBUSY;
596 } 596 }
diff --git a/sound/drivers/serial-u16550.c b/sound/drivers/serial-u16550.c
index 2330fec505d..52afb4bd207 100644
--- a/sound/drivers/serial-u16550.c
+++ b/sound/drivers/serial-u16550.c
@@ -795,7 +795,7 @@ static int __init snd_uart16550_create(struct snd_card *card,
795 795
796 if (irq >= 0 && irq != SNDRV_AUTO_IRQ) { 796 if (irq >= 0 && irq != SNDRV_AUTO_IRQ) {
797 if (request_irq(irq, snd_uart16550_interrupt, 797 if (request_irq(irq, snd_uart16550_interrupt,
798 SA_INTERRUPT, "Serial MIDI", (void *) uart)) { 798 IRQF_DISABLED, "Serial MIDI", (void *) uart)) {
799 snd_printk("irq %d busy. Using Polling.\n", irq); 799 snd_printk("irq %d busy. Using Polling.\n", irq);
800 } else { 800 } else {
801 uart->irq = irq; 801 uart->irq = irq;
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 31f299aed28..b33a5fb59ec 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -232,7 +232,7 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
232 232
233 if (mpu_port[dev] > 0) { 233 if (mpu_port[dev] > 0) {
234 if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, 234 if (snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
235 mpu_port[dev], 0, mpu_irq[dev], SA_INTERRUPT, 235 mpu_port[dev], 0, mpu_irq[dev], IRQF_DISABLED,
236 NULL) < 0) 236 NULL) < 0)
237 printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", mpu_port[dev]); 237 printk(KERN_ERR PFX "no MPU-401 device at 0x%lx.\n", mpu_port[dev]);
238 } 238 }
diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index fd8fe16c09e..8fcf2c15182 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -599,7 +599,7 @@ int __devinit snd_ad1816a_create(struct snd_card *card,
599 snd_ad1816a_free(chip); 599 snd_ad1816a_free(chip);
600 return -EBUSY; 600 return -EBUSY;
601 } 601 }
602 if (request_irq(irq, snd_ad1816a_interrupt, SA_INTERRUPT, "AD1816A", (void *) chip)) { 602 if (request_irq(irq, snd_ad1816a_interrupt, IRQF_DISABLED, "AD1816A", (void *) chip)) {
603 snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq); 603 snd_printk(KERN_ERR "ad1816a: can't grab IRQ %d\n", irq);
604 snd_ad1816a_free(chip); 604 snd_ad1816a_free(chip);
605 return -EBUSY; 605 return -EBUSY;
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index e0f8baa843b..e711f87d5fd 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -902,7 +902,7 @@ int snd_ad1848_create(struct snd_card *card,
902 snd_ad1848_free(chip); 902 snd_ad1848_free(chip);
903 return -EBUSY; 903 return -EBUSY;
904 } 904 }
905 if (request_irq(irq, snd_ad1848_interrupt, SA_INTERRUPT, "AD1848", (void *) chip)) { 905 if (request_irq(irq, snd_ad1848_interrupt, IRQF_DISABLED, "AD1848", (void *) chip)) {
906 snd_printk(KERN_ERR "ad1848: can't grab IRQ %d\n", irq); 906 snd_printk(KERN_ERR "ad1848: can't grab IRQ %d\n", irq);
907 snd_ad1848_free(chip); 907 snd_ad1848_free(chip);
908 return -EBUSY; 908 return -EBUSY;
diff --git a/sound/isa/als100.c b/sound/isa/als100.c
index a52bd8a14c9..f2bcfb2cf5f 100644
--- a/sound/isa/als100.c
+++ b/sound/isa/als100.c
@@ -250,7 +250,7 @@ static int __devinit snd_card_als100_probe(int dev,
250 if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { 250 if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
251 if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100, 251 if (snd_mpu401_uart_new(card, 0, MPU401_HW_ALS100,
252 mpu_port[dev], 0, 252 mpu_port[dev], 0,
253 mpu_irq[dev], SA_INTERRUPT, 253 mpu_irq[dev], IRQF_DISABLED,
254 NULL) < 0) 254 NULL) < 0)
255 snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); 255 snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]);
256 } 256 }
diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c
index 15e59283aac..b615538a928 100644
--- a/sound/isa/azt2320.c
+++ b/sound/isa/azt2320.c
@@ -279,7 +279,7 @@ static int __devinit snd_card_azt2320_probe(int dev,
279 if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) { 279 if (mpu_port[dev] > 0 && mpu_port[dev] != SNDRV_AUTO_PORT) {
280 if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320, 280 if (snd_mpu401_uart_new(card, 0, MPU401_HW_AZT2320,
281 mpu_port[dev], 0, 281 mpu_port[dev], 0,
282 mpu_irq[dev], SA_INTERRUPT, 282 mpu_irq[dev], IRQF_DISABLED,
283 NULL) < 0) 283 NULL) < 0)
284 snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]); 284 snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx\n", mpu_port[dev]);
285 } 285 }
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index 397310f358b..696a5c86bcf 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -122,7 +122,7 @@ static int __init snd_cs4231_probe(struct platform_device *pdev)
122 if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, 122 if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
123 mpu_port[dev], 0, 123 mpu_port[dev], 0,
124 mpu_irq[dev], 124 mpu_irq[dev],
125 mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, 125 mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0,
126 NULL) < 0) 126 NULL) < 0)
127 printk(KERN_WARNING "cs4231: MPU401 not detected\n"); 127 printk(KERN_WARNING "cs4231: MPU401 not detected\n");
128 } 128 }
diff --git a/sound/isa/cs423x/cs4231_lib.c b/sound/isa/cs423x/cs4231_lib.c
index 823db824670..fbb20176cca 100644
--- a/sound/isa/cs423x/cs4231_lib.c
+++ b/sound/isa/cs423x/cs4231_lib.c
@@ -1454,7 +1454,7 @@ int snd_cs4231_create(struct snd_card *card,
1454 return -ENODEV; 1454 return -ENODEV;
1455 } 1455 }
1456 chip->cport = cport; 1456 chip->cport = cport;
1457 if (!(hwshare & CS4231_HWSHARE_IRQ) && request_irq(irq, snd_cs4231_interrupt, SA_INTERRUPT, "CS4231", (void *) chip)) { 1457 if (!(hwshare & CS4231_HWSHARE_IRQ) && request_irq(irq, snd_cs4231_interrupt, IRQF_DISABLED, "CS4231", (void *) chip)) {
1458 snd_printk(KERN_ERR "cs4231: can't grab IRQ %d\n", irq); 1458 snd_printk(KERN_ERR "cs4231: can't grab IRQ %d\n", irq);
1459 snd_cs4231_free(chip); 1459 snd_cs4231_free(chip);
1460 return -EBUSY; 1460 return -EBUSY;
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index f7fa779347f..07ffd5c22e8 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -535,7 +535,7 @@ static int __devinit snd_cs423x_probe(struct snd_card *card, int dev)
535 if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232, 535 if (snd_mpu401_uart_new(card, 0, MPU401_HW_CS4232,
536 mpu_port[dev], 0, 536 mpu_port[dev], 0,
537 mpu_irq[dev], 537 mpu_irq[dev],
538 mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) 538 mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0, NULL) < 0)
539 printk(KERN_WARNING IDENT ": MPU401 not detected\n"); 539 printk(KERN_WARNING IDENT ": MPU401 not detected\n");
540 } 540 }
541 541
diff --git a/sound/isa/dt019x.c b/sound/isa/dt019x.c
index 0acb4e5da47..c20a4b1b153 100644
--- a/sound/isa/dt019x.c
+++ b/sound/isa/dt019x.c
@@ -240,7 +240,7 @@ static int __devinit snd_card_dt019x_probe(int dev, struct pnp_card_link *pcard,
240 MPU401_HW_MPU401, 240 MPU401_HW_MPU401,
241 mpu_port[dev], 0, 241 mpu_port[dev], 0,
242 mpu_irq[dev], 242 mpu_irq[dev],
243 mpu_irq[dev] >= 0 ? SA_INTERRUPT : 0, 243 mpu_irq[dev] >= 0 ? IRQF_DISABLED : 0,
244 NULL) < 0) 244 NULL) < 0)
245 snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n", mpu_port[dev]); 245 snd_printk(KERN_ERR PFX "no MPU-401 device at 0x%lx ?\n", mpu_port[dev]);
246 } 246 }
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index e90689ee162..7f29f56e405 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -153,7 +153,7 @@ static int __init snd_es1688_probe(struct platform_device *pdev)
153 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, 153 if ((err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688,
154 chip->mpu_port, 0, 154 chip->mpu_port, 0,
155 xmpu_irq, 155 xmpu_irq,
156 SA_INTERRUPT, 156 IRQF_DISABLED,
157 NULL)) < 0) 157 NULL)) < 0)
158 goto _err; 158 goto _err;
159 } 159 }
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index 702ad51ee9d..7e985d3bc51 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -659,7 +659,7 @@ int snd_es1688_create(struct snd_card *card,
659 snd_es1688_free(chip); 659 snd_es1688_free(chip);
660 return -EBUSY; 660 return -EBUSY;
661 } 661 }
662 if (request_irq(irq, snd_es1688_interrupt, SA_INTERRUPT, "ES1688", (void *) chip)) { 662 if (request_irq(irq, snd_es1688_interrupt, IRQF_DISABLED, "ES1688", (void *) chip)) {
663 snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq); 663 snd_printk(KERN_ERR "es1688: can't grab IRQ %d\n", irq);
664 snd_es1688_free(chip); 664 snd_es1688_free(chip);
665 return -EBUSY; 665 return -EBUSY;
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index af60b0bc811..34998de9968 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -1837,7 +1837,7 @@ static int __devinit snd_es18xx_new_device(struct snd_card *card,
1837 return -EBUSY; 1837 return -EBUSY;
1838 } 1838 }
1839 1839
1840 if (request_irq(irq, snd_es18xx_interrupt, SA_INTERRUPT, "ES18xx", (void *) chip)) { 1840 if (request_irq(irq, snd_es18xx_interrupt, IRQF_DISABLED, "ES18xx", (void *) chip)) {
1841 snd_es18xx_free(chip); 1841 snd_es18xx_free(chip);
1842 snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq); 1842 snd_printk(KERN_ERR PFX "unable to grap IRQ %d\n", irq);
1843 return -EBUSY; 1843 return -EBUSY;
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
index 53eeaf37007..b680fddf0d7 100644
--- a/sound/isa/gus/gus_main.c
+++ b/sound/isa/gus/gus_main.c
@@ -179,7 +179,7 @@ int snd_gus_create(struct snd_card *card,
179 snd_gus_free(gus); 179 snd_gus_free(gus);
180 return -EBUSY; 180 return -EBUSY;
181 } 181 }
182 if (irq >= 0 && request_irq(irq, snd_gus_interrupt, SA_INTERRUPT, "GUS GF1", (void *) gus)) { 182 if (irq >= 0 && request_irq(irq, snd_gus_interrupt, IRQF_DISABLED, "GUS GF1", (void *) gus)) {
183 snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq); 183 snd_printk(KERN_ERR "gus: can't grab irq %d\n", irq);
184 snd_gus_free(gus); 184 snd_gus_free(gus);
185 return -EBUSY; 185 return -EBUSY;
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c
index 05852fcc613..22cdddbfd82 100644
--- a/sound/isa/gus/gusextreme.c
+++ b/sound/isa/gus/gusextreme.c
@@ -301,7 +301,7 @@ static int __init snd_gusextreme_probe(struct platform_device *pdev)
301 (err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688, 301 (err = snd_mpu401_uart_new(card, 0, MPU401_HW_ES1688,
302 es1688->mpu_port, 0, 302 es1688->mpu_port, 0,
303 xmpu_irq, 303 xmpu_irq,
304 SA_INTERRUPT, 304 IRQF_DISABLED,
305 NULL)) < 0) 305 NULL)) < 0)
306 goto out; 306 goto out;
307 307
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c
index fcf2c8fe6f9..ac11cae8589 100644
--- a/sound/isa/gus/gusmax.c
+++ b/sound/isa/gus/gusmax.c
@@ -292,7 +292,7 @@ static int __init snd_gusmax_probe(struct platform_device *pdev)
292 goto _err; 292 goto _err;
293 } 293 }
294 294
295 if (request_irq(xirq, snd_gusmax_interrupt, SA_INTERRUPT, "GUS MAX", (void *)maxcard)) { 295 if (request_irq(xirq, snd_gusmax_interrupt, IRQF_DISABLED, "GUS MAX", (void *)maxcard)) {
296 snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); 296 snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
297 err = -EBUSY; 297 err = -EBUSY;
298 goto _err; 298 goto _err;
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c
index c1c86e0fa56..ea69f25506f 100644
--- a/sound/isa/gus/interwave.c
+++ b/sound/isa/gus/interwave.c
@@ -706,7 +706,7 @@ static int __devinit snd_interwave_probe(struct snd_card *card, int dev)
706 if ((err = snd_gus_initialize(gus)) < 0) 706 if ((err = snd_gus_initialize(gus)) < 0)
707 return err; 707 return err;
708 708
709 if (request_irq(xirq, snd_interwave_interrupt, SA_INTERRUPT, 709 if (request_irq(xirq, snd_interwave_interrupt, IRQF_DISABLED,
710 "InterWave", iwcard)) { 710 "InterWave", iwcard)) {
711 snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq); 711 snd_printk(KERN_ERR PFX "unable to grab IRQ %d\n", xirq);
712 return -EBUSY; 712 return -EBUSY;
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index 647a996791e..4031b61b797 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -683,7 +683,7 @@ static int __devinit snd_opl3sa2_probe(struct snd_card *card, int dev)
683 chip->single_dma = 1; 683 chip->single_dma = 1;
684 if ((err = snd_opl3sa2_detect(chip)) < 0) 684 if ((err = snd_opl3sa2_detect(chip)) < 0)
685 return err; 685 return err;
686 if (request_irq(xirq, snd_opl3sa2_interrupt, SA_INTERRUPT, "OPL3-SA2", chip)) { 686 if (request_irq(xirq, snd_opl3sa2_interrupt, IRQF_DISABLED, "OPL3-SA2", chip)) {
687 snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq); 687 snd_printk(KERN_ERR PFX "can't grab IRQ %d\n", xirq);
688 return -ENODEV; 688 return -ENODEV;
689 } 689 }
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 283817f2de7..1dd98375ac8 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1382,7 +1382,7 @@ static int __init snd_miro_probe(struct platform_device *devptr)
1382 rmidi = NULL; 1382 rmidi = NULL;
1383 else 1383 else
1384 if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, 1384 if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
1385 miro->mpu_port, 0, miro->mpu_irq, SA_INTERRUPT, 1385 miro->mpu_port, 0, miro->mpu_irq, IRQF_DISABLED,
1386 &rmidi))) 1386 &rmidi)))
1387 snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", miro->mpu_port); 1387 snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", miro->mpu_port);
1388 1388
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 8ee0d70536f..9d528ae00bf 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -1291,7 +1291,7 @@ static int snd_opti93x_create(struct snd_card *card, struct snd_opti9xx *chip,
1291 } 1291 }
1292 codec->dma2 = chip->dma2; 1292 codec->dma2 = chip->dma2;
1293 1293
1294 if (request_irq(chip->irq, snd_opti93x_interrupt, SA_INTERRUPT, DRIVER_NAME" - WSS", codec)) { 1294 if (request_irq(chip->irq, snd_opti93x_interrupt, IRQF_DISABLED, DRIVER_NAME" - WSS", codec)) {
1295 snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq); 1295 snd_printk(KERN_ERR "opti9xx: can't grab IRQ %d\n", chip->irq);
1296 snd_opti93x_free(codec); 1296 snd_opti93x_free(codec);
1297 return -EBUSY; 1297 return -EBUSY;
@@ -1863,7 +1863,7 @@ static int __init snd_opti9xx_probe(struct snd_card *card)
1863 rmidi = NULL; 1863 rmidi = NULL;
1864 else 1864 else
1865 if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401, 1865 if ((error = snd_mpu401_uart_new(card, 0, MPU401_HW_MPU401,
1866 chip->mpu_port, 0, chip->mpu_irq, SA_INTERRUPT, 1866 chip->mpu_port, 0, chip->mpu_irq, IRQF_DISABLED,
1867 &rmidi))) 1867 &rmidi)))
1868 snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n", 1868 snd_printk(KERN_WARNING "no MPU-401 device at 0x%lx?\n",
1869 chip->mpu_port); 1869 chip->mpu_port);
diff --git a/sound/isa/sb/sb_common.c b/sound/isa/sb/sb_common.c
index f343a8211d2..f17de2bdd9e 100644
--- a/sound/isa/sb/sb_common.c
+++ b/sound/isa/sb/sb_common.c
@@ -232,7 +232,7 @@ int snd_sbdsp_create(struct snd_card *card,
232 chip->port = port; 232 chip->port = port;
233 233
234 if (request_irq(irq, irq_handler, hardware == SB_HW_ALS4000 ? 234 if (request_irq(irq, irq_handler, hardware == SB_HW_ALS4000 ?
235 SA_INTERRUPT | SA_SHIRQ : SA_INTERRUPT, 235 IRQF_DISABLED | IRQF_SHARED : IRQF_DISABLED,
236 "SoundBlaster", (void *) chip)) { 236 "SoundBlaster", (void *) chip)) {
237 snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq); 237 snd_printk(KERN_ERR "sb: can't grab irq %d\n", irq);
238 snd_sbdsp_free(chip); 238 snd_sbdsp_free(chip);
diff --git a/sound/isa/sgalaxy.c b/sound/isa/sgalaxy.c
index 09c8e8c6b5e..8742fa51749 100644
--- a/sound/isa/sgalaxy.c
+++ b/sound/isa/sgalaxy.c
@@ -147,7 +147,7 @@ static int __init snd_sgalaxy_setup_wss(unsigned long port, int irq, int dma)
147 if (tmp < 0) 147 if (tmp < 0)
148 return -EINVAL; 148 return -EINVAL;
149 149
150 if (request_irq(irq, snd_sgalaxy_dummy_interrupt, SA_INTERRUPT, "sgalaxy", NULL)) { 150 if (request_irq(irq, snd_sgalaxy_dummy_interrupt, IRQF_DISABLED, "sgalaxy", NULL)) {
151 snd_printk(KERN_ERR "sgalaxy: can't grab irq %d\n", irq); 151 snd_printk(KERN_ERR "sgalaxy: can't grab irq %d\n", irq);
152 return -EIO; 152 return -EIO;
153 } 153 }
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 27271c9446d..b1f25823c65 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -900,7 +900,7 @@ static int __devinit create_mpu401(struct snd_card *card, int devnum, unsigned l
900 if ((err = snd_mpu401_uart_new(card, devnum, 900 if ((err = snd_mpu401_uart_new(card, devnum,
901 MPU401_HW_MPU401, 901 MPU401_HW_MPU401,
902 port, MPU401_INFO_INTEGRATED, 902 port, MPU401_INFO_INTEGRATED,
903 irq, SA_INTERRUPT, 903 irq, IRQF_DISABLED,
904 &rawmidi)) == 0) { 904 &rawmidi)) == 0) {
905 struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data; 905 struct snd_mpu401 *mpu = (struct snd_mpu401 *) rawmidi->private_data;
906 mpu->open_input = mpu401_open; 906 mpu->open_input = mpu401_open;
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index 9eb27082c65..a8f8d2fa9d7 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -467,7 +467,7 @@ snd_wavefront_probe (struct snd_card *card, int dev)
467 return -EBUSY; 467 return -EBUSY;
468 } 468 }
469 if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt, 469 if (request_irq(ics2115_irq[dev], snd_wavefront_ics2115_interrupt,
470 SA_INTERRUPT, "ICS2115", acard)) { 470 IRQF_DISABLED, "ICS2115", acard)) {
471 snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]); 471 snd_printk(KERN_ERR "unable to use ICS2115 IRQ %d\n", ics2115_irq[dev]);
472 return -EBUSY; 472 return -EBUSY;
473 } 473 }
@@ -497,7 +497,7 @@ snd_wavefront_probe (struct snd_card *card, int dev)
497 if ((err = snd_mpu401_uart_new(card, midi_dev, MPU401_HW_CS4232, 497 if ((err = snd_mpu401_uart_new(card, midi_dev, MPU401_HW_CS4232,
498 cs4232_mpu_port[dev], 0, 498 cs4232_mpu_port[dev], 0,
499 cs4232_mpu_irq[dev], 499 cs4232_mpu_irq[dev],
500 SA_INTERRUPT, 500 IRQF_DISABLED,
501 NULL)) < 0) { 501 NULL)) < 0) {
502 snd_printk (KERN_ERR "can't allocate CS4232 MPU-401 device\n"); 502 snd_printk (KERN_ERR "can't allocate CS4232 MPU-401 device\n");
503 return err; 503 return err;
diff --git a/sound/mips/au1x00.c b/sound/mips/au1x00.c
index cf476fe1ac5..c31b3865922 100644
--- a/sound/mips/au1x00.c
+++ b/sound/mips/au1x00.c
@@ -465,13 +465,13 @@ snd_au1000_pcm_new(struct snd_au1000 *au1000)
465 465
466 flags = claim_dma_lock(); 466 flags = claim_dma_lock();
467 if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX, 467 if ((au1000->stream[PLAYBACK]->dma = request_au1000_dma(DMA_ID_AC97C_TX,
468 "AC97 TX", au1000_dma_interrupt, SA_INTERRUPT, 468 "AC97 TX", au1000_dma_interrupt, IRQF_DISABLED,
469 au1000->stream[PLAYBACK])) < 0) { 469 au1000->stream[PLAYBACK])) < 0) {
470 release_dma_lock(flags); 470 release_dma_lock(flags);
471 return -EBUSY; 471 return -EBUSY;
472 } 472 }
473 if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX, 473 if ((au1000->stream[CAPTURE]->dma = request_au1000_dma(DMA_ID_AC97C_RX,
474 "AC97 RX", au1000_dma_interrupt, SA_INTERRUPT, 474 "AC97 RX", au1000_dma_interrupt, IRQF_DISABLED,
475 au1000->stream[CAPTURE])) < 0){ 475 au1000->stream[CAPTURE])) < 0){
476 release_dma_lock(flags); 476 release_dma_lock(flags);
477 return -EBUSY; 477 return -EBUSY;
diff --git a/sound/oss/ad1816.c b/sound/oss/ad1816.c
index 95586de0202..29057836c64 100644
--- a/sound/oss/ad1816.c
+++ b/sound/oss/ad1816.c
@@ -41,7 +41,6 @@
41 */ 41 */
42 42
43 43
44#include <linux/config.h>
45#include <linux/module.h> 44#include <linux/module.h>
46#include <linux/init.h> 45#include <linux/init.h>
47#include <linux/interrupt.h> 46#include <linux/interrupt.h>
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c
index e04fa49b0dc..3b45e11e530 100644
--- a/sound/oss/ad1848.c
+++ b/sound/oss/ad1848.c
@@ -41,7 +41,6 @@
41 * Tested. Believed fully functional. 41 * Tested. Believed fully functional.
42 */ 42 */
43 43
44#include <linux/config.h>
45#include <linux/init.h> 44#include <linux/init.h>
46#include <linux/interrupt.h> 45#include <linux/interrupt.h>
47#include <linux/module.h> 46#include <linux/module.h>
diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c
index a4ca7569e70..f56f870b484 100644
--- a/sound/oss/ad1889.c
+++ b/sound/oss/ad1889.c
@@ -26,7 +26,6 @@
26 * 26 *
27 * $Id: ad1889.c,v 1.3 2002/10/19 21:31:44 grundler Exp $ 27 * $Id: ad1889.c,v 1.3 2002/10/19 21:31:44 grundler Exp $
28 */ 28 */
29#include <linux/config.h>
30#include <linux/module.h> 29#include <linux/module.h>
31#include <linux/init.h> 30#include <linux/init.h>
32#include <linux/ioport.h> 31#include <linux/ioport.h>
@@ -1011,7 +1010,7 @@ static int __devinit ad1889_probe(struct pci_dev *pcidev, const struct pci_devic
1011 goto out2; 1010 goto out2;
1012 } 1011 }
1013 1012
1014 if (request_irq(pcidev->irq, ad1889_interrupt, SA_SHIRQ, DEVNAME, dev) != 0) { 1013 if (request_irq(pcidev->irq, ad1889_interrupt, IRQF_SHARED, DEVNAME, dev) != 0) {
1015 printk(KERN_ERR DEVNAME ": unable to request interrupt\n"); 1014 printk(KERN_ERR DEVNAME ": unable to request interrupt\n");
1016 goto out3; 1015 goto out3;
1017 } 1016 }
diff --git a/sound/oss/aedsp16.c b/sound/oss/aedsp16.c
index b556263a57f..51e1fde62e8 100644
--- a/sound/oss/aedsp16.c
+++ b/sound/oss/aedsp16.c
@@ -23,7 +23,6 @@
23 * Include the main OSS Lite header file. It include all the os, OSS Lite, etc 23 * Include the main OSS Lite header file. It include all the os, OSS Lite, etc
24 * headers needed by this source. 24 * headers needed by this source.
25 */ 25 */
26#include <linux/config.h>
27#include <linux/delay.h> 26#include <linux/delay.h>
28#include <linux/module.h> 27#include <linux/module.h>
29#include <linux/init.h> 28#include <linux/init.h>
diff --git a/sound/oss/ali5455.c b/sound/oss/ali5455.c
index 62bb936b1f3..70dcd703a66 100644
--- a/sound/oss/ali5455.c
+++ b/sound/oss/ali5455.c
@@ -3460,7 +3460,7 @@ static int __devinit ali_probe(struct pci_dev *pci_dev,
3460 card->channel[4].num = 4; 3460 card->channel[4].num = 4;
3461 /* claim our iospace and irq */ 3461 /* claim our iospace and irq */
3462 request_region(card->iobase, 256, card_names[pci_id->driver_data]); 3462 request_region(card->iobase, 256, card_names[pci_id->driver_data]);
3463 if (request_irq(card->irq, &ali_interrupt, SA_SHIRQ, 3463 if (request_irq(card->irq, &ali_interrupt, IRQF_SHARED,
3464 card_names[pci_id->driver_data], card)) { 3464 card_names[pci_id->driver_data], card)) {
3465 printk(KERN_ERR "ali_audio: unable to allocate irq %d\n", 3465 printk(KERN_ERR "ali_audio: unable to allocate irq %d\n",
3466 card->irq); 3466 card->irq);
diff --git a/sound/oss/au1000.c b/sound/oss/au1000.c
index eacb0aef21e..e3796231452 100644
--- a/sound/oss/au1000.c
+++ b/sound/oss/au1000.c
@@ -2015,14 +2015,14 @@ static int __devinit au1000_probe(void)
2015 if ((s->dma_dac.dmanr = request_au1000_dma(DMA_ID_AC97C_TX, 2015 if ((s->dma_dac.dmanr = request_au1000_dma(DMA_ID_AC97C_TX,
2016 "audio DAC", 2016 "audio DAC",
2017 dac_dma_interrupt, 2017 dac_dma_interrupt,
2018 SA_INTERRUPT, s)) < 0) { 2018 IRQF_DISABLED, s)) < 0) {
2019 err("Can't get DAC DMA"); 2019 err("Can't get DAC DMA");
2020 goto err_dma1; 2020 goto err_dma1;
2021 } 2021 }
2022 if ((s->dma_adc.dmanr = request_au1000_dma(DMA_ID_AC97C_RX, 2022 if ((s->dma_adc.dmanr = request_au1000_dma(DMA_ID_AC97C_RX,
2023 "audio ADC", 2023 "audio ADC",
2024 adc_dma_interrupt, 2024 adc_dma_interrupt,
2025 SA_INTERRUPT, s)) < 0) { 2025 IRQF_DISABLED, s)) < 0) {
2026 err("Can't get ADC DMA"); 2026 err("Can't get ADC DMA");
2027 goto err_dma2; 2027 goto err_dma2;
2028 } 2028 }
diff --git a/sound/oss/btaudio.c b/sound/oss/btaudio.c
index bfe3b534ef3..324a81fd3a3 100644
--- a/sound/oss/btaudio.c
+++ b/sound/oss/btaudio.c
@@ -966,7 +966,7 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev,
966 btwrite(~0U, REG_INT_STAT); 966 btwrite(~0U, REG_INT_STAT);
967 pci_set_master(pci_dev); 967 pci_set_master(pci_dev);
968 968
969 if ((rc = request_irq(bta->irq, btaudio_irq, SA_SHIRQ|SA_INTERRUPT, 969 if ((rc = request_irq(bta->irq, btaudio_irq, IRQF_SHARED|IRQF_DISABLED,
970 "btaudio",(void *)bta)) < 0) { 970 "btaudio",(void *)bta)) < 0) {
971 printk(KERN_WARNING 971 printk(KERN_WARNING
972 "btaudio: can't request irq (rc=%d)\n",rc); 972 "btaudio: can't request irq (rc=%d)\n",rc);
diff --git a/sound/oss/cmpci.c b/sound/oss/cmpci.c
index de60a059ff5..ea51aafaf40 100644
--- a/sound/oss/cmpci.c
+++ b/sound/oss/cmpci.c
@@ -3122,7 +3122,7 @@ static int __devinit cm_probe(struct pci_dev *pcidev, const struct pci_device_id
3122 wrmixer(s, DSP_MIX_DATARESETIDX, 0); 3122 wrmixer(s, DSP_MIX_DATARESETIDX, 0);
3123 3123
3124 /* request irq */ 3124 /* request irq */
3125 if ((ret = request_irq(s->irq, cm_interrupt, SA_SHIRQ, "cmpci", s))) { 3125 if ((ret = request_irq(s->irq, cm_interrupt, IRQF_SHARED, "cmpci", s))) {
3126 printk(KERN_ERR "cmpci: irq %u in use\n", s->irq); 3126 printk(KERN_ERR "cmpci: irq %u in use\n", s->irq);
3127 goto err_irq; 3127 goto err_irq;
3128 } 3128 }
diff --git a/sound/oss/cs4232.c b/sound/oss/cs4232.c
index 80f6c08e26e..b6924c7f148 100644
--- a/sound/oss/cs4232.c
+++ b/sound/oss/cs4232.c
@@ -47,7 +47,6 @@
47 * Marcus Meissner Added ISA PnP support. 47 * Marcus Meissner Added ISA PnP support.
48 */ 48 */
49 49
50#include <linux/config.h>
51#include <linux/pnp.h> 50#include <linux/pnp.h>
52#include <linux/module.h> 51#include <linux/module.h>
53#include <linux/init.h> 52#include <linux/init.h>
diff --git a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c
index 0004442f9b7..0400a416dc9 100644
--- a/sound/oss/cs4281/cs4281m.c
+++ b/sound/oss/cs4281/cs4281m.c
@@ -4346,7 +4346,7 @@ static int __devinit cs4281_probe(struct pci_dev *pcidev,
4346 s->pcidev = pcidev; 4346 s->pcidev = pcidev;
4347 s->irq = pcidev->irq; 4347 s->irq = pcidev->irq;
4348 if (request_irq 4348 if (request_irq
4349 (s->irq, cs4281_interrupt, SA_SHIRQ, "Crystal CS4281", s)) { 4349 (s->irq, cs4281_interrupt, IRQF_SHARED, "Crystal CS4281", s)) {
4350 CS_DBGOUT(CS_INIT | CS_ERROR, 1, 4350 CS_DBGOUT(CS_INIT | CS_ERROR, 1,
4351 printk(KERN_ERR "cs4281: irq %u in use\n", s->irq)); 4351 printk(KERN_ERR "cs4281: irq %u in use\n", s->irq));
4352 goto err_irq; 4352 goto err_irq;
diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c
index 994c71e986e..5195bf933cb 100644
--- a/sound/oss/cs46xx.c
+++ b/sound/oss/cs46xx.c
@@ -5177,7 +5177,7 @@ static int __devinit cs46xx_probe(struct pci_dev *pci_dev,
5177 card->ba1.name.reg == 0) 5177 card->ba1.name.reg == 0)
5178 goto fail2; 5178 goto fail2;
5179 5179
5180 if (request_irq(card->irq, &cs_interrupt, SA_SHIRQ, "cs46xx", card)) { 5180 if (request_irq(card->irq, &cs_interrupt, IRQF_SHARED, "cs46xx", card)) {
5181 printk(KERN_ERR "cs46xx: unable to allocate irq %d\n", card->irq); 5181 printk(KERN_ERR "cs46xx: unable to allocate irq %d\n", card->irq);
5182 goto fail2; 5182 goto fail2;
5183 } 5183 }
diff --git a/sound/oss/dmabuf.c b/sound/oss/dmabuf.c
index baf4244a54f..15ce7119c5f 100644
--- a/sound/oss/dmabuf.c
+++ b/sound/oss/dmabuf.c
@@ -547,7 +547,7 @@ int DMAbuf_activate_recording(int dev, struct dma_buffparms *dmap)
547 } 547 }
548 return 0; 548 return 0;
549} 549}
550/* aquires lock */ 550/* acquires lock */
551int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock) 551int DMAbuf_getrdbuffer(int dev, char **buf, int *len, int dontblock)
552{ 552{
553 struct audio_operations *adev = audio_devs[dev]; 553 struct audio_operations *adev = audio_devs[dev];
@@ -821,7 +821,7 @@ static int find_output_space(int dev, char **buf, int *size)
821 *size = len & ~SAMPLE_ROUNDUP; 821 *size = len & ~SAMPLE_ROUNDUP;
822 return (*size > 0); 822 return (*size > 0);
823} 823}
824/* aquires lock */ 824/* acquires lock */
825int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock) 825int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock)
826{ 826{
827 struct audio_operations *adev = audio_devs[dev]; 827 struct audio_operations *adev = audio_devs[dev];
@@ -855,7 +855,7 @@ int DMAbuf_getwrbuffer(int dev, char **buf, int *size, int dontblock)
855 spin_unlock_irqrestore(&dmap->lock,flags); 855 spin_unlock_irqrestore(&dmap->lock,flags);
856 return 0; 856 return 0;
857} 857}
858/* has to aquire dmap->lock */ 858/* has to acquire dmap->lock */
859int DMAbuf_move_wrpointer(int dev, int l) 859int DMAbuf_move_wrpointer(int dev, int l)
860{ 860{
861 struct audio_operations *adev = audio_devs[dev]; 861 struct audio_operations *adev = audio_devs[dev];
diff --git a/sound/oss/dmasound/dmasound.h b/sound/oss/dmasound/dmasound.h
index a1b0b92af4b..25dd5a318eb 100644
--- a/sound/oss/dmasound/dmasound.h
+++ b/sound/oss/dmasound/dmasound.h
@@ -13,7 +13,6 @@
13#define _dmasound_h_ 13#define _dmasound_h_
14 14
15#include <linux/types.h> 15#include <linux/types.h>
16#include <linux/config.h>
17 16
18#define SND_NDEVS 256 /* Number of supported devices */ 17#define SND_NDEVS 256 /* Number of supported devices */
19#define SND_DEV_CTL 0 /* Control port /dev/mixer */ 18#define SND_DEV_CTL 0 /* Control port /dev/mixer */
diff --git a/sound/oss/dmasound/dmasound_awacs.c b/sound/oss/dmasound/dmasound_awacs.c
index c8e21032689..de454ca3922 100644
--- a/sound/oss/dmasound/dmasound_awacs.c
+++ b/sound/oss/dmasound/dmasound_awacs.c
@@ -67,7 +67,6 @@
67 67
68#include <linux/types.h> 68#include <linux/types.h>
69#include <linux/module.h> 69#include <linux/module.h>
70#include <linux/config.h>
71#include <linux/slab.h> 70#include <linux/slab.h>
72#include <linux/init.h> 71#include <linux/init.h>
73#include <linux/delay.h> 72#include <linux/delay.h>
diff --git a/sound/oss/dmasound/dmasound_paula.c b/sound/oss/dmasound/dmasound_paula.c
index 494070a3f87..68e1d8f6c35 100644
--- a/sound/oss/dmasound/dmasound_paula.c
+++ b/sound/oss/dmasound/dmasound_paula.c
@@ -16,7 +16,6 @@
16 16
17 17
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/config.h>
20#include <linux/mm.h> 19#include <linux/mm.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/ioport.h> 21#include <linux/ioport.h>
diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c
index 3721c5857b9..c4ce94d6e10 100644
--- a/sound/oss/emu10k1/main.c
+++ b/sound/oss/emu10k1/main.c
@@ -1301,7 +1301,7 @@ static int __devinit emu10k1_probe(struct pci_dev *pci_dev, const struct pci_dev
1301 card->pci_dev = pci_dev; 1301 card->pci_dev = pci_dev;
1302 1302
1303 /* Reserve IRQ Line */ 1303 /* Reserve IRQ Line */
1304 if (request_irq(card->irq, emu10k1_interrupt, SA_SHIRQ, card_names[pci_id->driver_data], card)) { 1304 if (request_irq(card->irq, emu10k1_interrupt, IRQF_SHARED, card_names[pci_id->driver_data], card)) {
1305 printk(KERN_ERR "emu10k1: IRQ in use\n"); 1305 printk(KERN_ERR "emu10k1: IRQ in use\n");
1306 ret = -EBUSY; 1306 ret = -EBUSY;
1307 goto err_irq; 1307 goto err_irq;
diff --git a/sound/oss/es1370.c b/sound/oss/es1370.c
index 094f569cc6e..13f48314973 100644
--- a/sound/oss/es1370.c
+++ b/sound/oss/es1370.c
@@ -2650,7 +2650,7 @@ static int __devinit es1370_probe(struct pci_dev *pcidev, const struct pci_devic
2650 ret = -EBUSY; 2650 ret = -EBUSY;
2651 goto err_region; 2651 goto err_region;
2652 } 2652 }
2653 if ((ret=request_irq(s->irq, es1370_interrupt, SA_SHIRQ, "es1370",s))) { 2653 if ((ret=request_irq(s->irq, es1370_interrupt, IRQF_SHARED, "es1370",s))) {
2654 printk(KERN_ERR "es1370: irq %u in use\n", s->irq); 2654 printk(KERN_ERR "es1370: irq %u in use\n", s->irq);
2655 goto err_irq; 2655 goto err_irq;
2656 } 2656 }
diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c
index 4400c853868..a2ffe723dad 100644
--- a/sound/oss/es1371.c
+++ b/sound/oss/es1371.c
@@ -2905,7 +2905,7 @@ static int __devinit es1371_probe(struct pci_dev *pcidev, const struct pci_devic
2905 res = -EBUSY; 2905 res = -EBUSY;
2906 goto err_region; 2906 goto err_region;
2907 } 2907 }
2908 if ((res=request_irq(s->irq, es1371_interrupt, SA_SHIRQ, "es1371",s))) { 2908 if ((res=request_irq(s->irq, es1371_interrupt, IRQF_SHARED, "es1371",s))) {
2909 printk(KERN_ERR PFX "irq %u in use\n", s->irq); 2909 printk(KERN_ERR PFX "irq %u in use\n", s->irq);
2910 goto err_irq; 2910 goto err_irq;
2911 } 2911 }
diff --git a/sound/oss/esssolo1.c b/sound/oss/esssolo1.c
index 6861563d752..82f40a0a5c9 100644
--- a/sound/oss/esssolo1.c
+++ b/sound/oss/esssolo1.c
@@ -2392,7 +2392,7 @@ static int __devinit solo1_probe(struct pci_dev *pcidev, const struct pci_device
2392 printk(KERN_ERR "solo1: io ports in use\n"); 2392 printk(KERN_ERR "solo1: io ports in use\n");
2393 goto err_region4; 2393 goto err_region4;
2394 } 2394 }
2395 if ((ret=request_irq(s->irq,solo1_interrupt,SA_SHIRQ,"ESS Solo1",s))) { 2395 if ((ret=request_irq(s->irq,solo1_interrupt,IRQF_SHARED,"ESS Solo1",s))) {
2396 printk(KERN_ERR "solo1: irq %u in use\n", s->irq); 2396 printk(KERN_ERR "solo1: irq %u in use\n", s->irq);
2397 goto err_irq; 2397 goto err_irq;
2398 } 2398 }
diff --git a/sound/oss/forte.c b/sound/oss/forte.c
index 44e578098d7..ea1c0207aef 100644
--- a/sound/oss/forte.c
+++ b/sound/oss/forte.c
@@ -2026,7 +2026,7 @@ forte_probe (struct pci_dev *pci_dev, const struct pci_device_id *pci_id)
2026 chip->iobase = pci_resource_start (pci_dev, 0); 2026 chip->iobase = pci_resource_start (pci_dev, 0);
2027 chip->irq = pci_dev->irq; 2027 chip->irq = pci_dev->irq;
2028 2028
2029 if (request_irq (chip->irq, forte_interrupt, SA_SHIRQ, DRIVER_NAME, 2029 if (request_irq (chip->irq, forte_interrupt, IRQF_SHARED, DRIVER_NAME,
2030 chip)) { 2030 chip)) {
2031 printk (KERN_WARNING PFX "Unable to reserve IRQ"); 2031 printk (KERN_WARNING PFX "Unable to reserve IRQ");
2032 ret = -EIO; 2032 ret = -EIO;
diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c
index dd4f59d30a3..80ab402dae9 100644
--- a/sound/oss/hal2.c
+++ b/sound/oss/hal2.c
@@ -1479,7 +1479,7 @@ static int hal2_init_card(struct hal2_card **phal2, struct hpc3_regs *hpc3)
1479 hpc3->pbus_dmacfg[hal2->dac.pbus.pbusnr][0] = 0x8208844; 1479 hpc3->pbus_dmacfg[hal2->dac.pbus.pbusnr][0] = 0x8208844;
1480 hpc3->pbus_dmacfg[hal2->adc.pbus.pbusnr][0] = 0x8208844; 1480 hpc3->pbus_dmacfg[hal2->adc.pbus.pbusnr][0] = 0x8208844;
1481 1481
1482 if (request_irq(SGI_HPCDMA_IRQ, hal2_interrupt, SA_SHIRQ, 1482 if (request_irq(SGI_HPCDMA_IRQ, hal2_interrupt, IRQF_SHARED,
1483 hal2str, hal2)) { 1483 hal2str, hal2)) {
1484 printk(KERN_ERR "HAL2: Can't get irq %d\n", SGI_HPCDMA_IRQ); 1484 printk(KERN_ERR "HAL2: Can't get irq %d\n", SGI_HPCDMA_IRQ);
1485 ret = -EAGAIN; 1485 ret = -EAGAIN;
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c
index dd2b871cdac..ddcddc2347f 100644
--- a/sound/oss/i810_audio.c
+++ b/sound/oss/i810_audio.c
@@ -3413,7 +3413,7 @@ static int __devinit i810_probe(struct pci_dev *pci_dev, const struct pci_device
3413 goto out_iospace; 3413 goto out_iospace;
3414 } 3414 }
3415 3415
3416 if (request_irq(card->irq, &i810_interrupt, SA_SHIRQ, 3416 if (request_irq(card->irq, &i810_interrupt, IRQF_SHARED,
3417 card_names[pci_id->driver_data], card)) { 3417 card_names[pci_id->driver_data], card)) {
3418 printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq); 3418 printk(KERN_ERR "i810_audio: unable to allocate irq %d\n", card->irq);
3419 goto out_iospace; 3419 goto out_iospace;
diff --git a/sound/oss/ite8172.c b/sound/oss/ite8172.c
index 00ac1c95a42..68aab3605d7 100644
--- a/sound/oss/ite8172.c
+++ b/sound/oss/ite8172.c
@@ -2019,7 +2019,7 @@ static int __devinit it8172_probe(struct pci_dev *pcidev,
2019 s->io, s->io + pci_resource_len(pcidev,0)-1); 2019 s->io, s->io + pci_resource_len(pcidev,0)-1);
2020 goto err_region; 2020 goto err_region;
2021 } 2021 }
2022 if (request_irq(s->irq, it8172_interrupt, SA_INTERRUPT, 2022 if (request_irq(s->irq, it8172_interrupt, IRQF_DISABLED,
2023 IT8172_MODULE_NAME, s)) { 2023 IT8172_MODULE_NAME, s)) {
2024 err("irq %u in use", s->irq); 2024 err("irq %u in use", s->irq);
2025 goto err_irq; 2025 goto err_irq;
diff --git a/sound/oss/kahlua.c b/sound/oss/kahlua.c
index 2835a7c038e..12e7b3038be 100644
--- a/sound/oss/kahlua.c
+++ b/sound/oss/kahlua.c
@@ -27,7 +27,6 @@
27 * same manner. 27 * same manner.
28 */ 28 */
29 29
30#include <linux/config.h>
31#include <linux/delay.h> 30#include <linux/delay.h>
32#include <linux/init.h> 31#include <linux/init.h>
33#include <linux/module.h> 32#include <linux/module.h>
diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c
index e647f2f8627..1d98d100d73 100644
--- a/sound/oss/maestro.c
+++ b/sound/oss/maestro.c
@@ -3545,7 +3545,7 @@ maestro_probe(struct pci_dev *pcidev,const struct pci_device_id *pdid)
3545 mixer_push_state(card); 3545 mixer_push_state(card);
3546 } 3546 }
3547 3547
3548 if((ret=request_irq(card->irq, ess_interrupt, SA_SHIRQ, card_names[card_type], card))) 3548 if((ret=request_irq(card->irq, ess_interrupt, IRQF_SHARED, card_names[card_type], card)))
3549 { 3549 {
3550 printk(KERN_ERR "maestro: unable to allocate irq %d,\n", card->irq); 3550 printk(KERN_ERR "maestro: unable to allocate irq %d,\n", card->irq);
3551 unregister_sound_mixer(card->dev_mixer); 3551 unregister_sound_mixer(card->dev_mixer);
diff --git a/sound/oss/maestro3.c b/sound/oss/maestro3.c
index 4a5e4237a11..5548e3cff7c 100644
--- a/sound/oss/maestro3.c
+++ b/sound/oss/maestro3.c
@@ -2694,7 +2694,7 @@ static int __devinit m3_probe(struct pci_dev *pci_dev, const struct pci_device_i
2694 } 2694 }
2695 } 2695 }
2696 2696
2697 if(request_irq(card->irq, m3_interrupt, SA_SHIRQ, card_names[card->card_type], card)) { 2697 if(request_irq(card->irq, m3_interrupt, IRQF_SHARED, card_names[card->card_type], card)) {
2698 2698
2699 printk(KERN_ERR PFX "unable to allocate irq %d,\n", card->irq); 2699 printk(KERN_ERR PFX "unable to allocate irq %d,\n", card->irq);
2700 2700
diff --git a/sound/oss/msnd_classic.h b/sound/oss/msnd_classic.h
index 83c3c46ffff..7ffea5267f9 100644
--- a/sound/oss/msnd_classic.h
+++ b/sound/oss/msnd_classic.h
@@ -30,7 +30,6 @@
30#ifndef __MSND_CLASSIC_H 30#ifndef __MSND_CLASSIC_H
31#define __MSND_CLASSIC_H 31#define __MSND_CLASSIC_H
32 32
33#include <linux/config.h>
34 33
35#define DSP_NUMIO 0x10 34#define DSP_NUMIO 0x10
36 35
diff --git a/sound/oss/msnd_pinnacle.c b/sound/oss/msnd_pinnacle.c
index 0c2db657bad..6d7763dae89 100644
--- a/sound/oss/msnd_pinnacle.c
+++ b/sound/oss/msnd_pinnacle.c
@@ -39,7 +39,6 @@
39 ********************************************************************/ 39 ********************************************************************/
40 40
41#include <linux/kernel.h> 41#include <linux/kernel.h>
42#include <linux/config.h>
43#include <linux/module.h> 42#include <linux/module.h>
44#include <linux/slab.h> 43#include <linux/slab.h>
45#include <linux/types.h> 44#include <linux/types.h>
diff --git a/sound/oss/msnd_pinnacle.h b/sound/oss/msnd_pinnacle.h
index e85aef4a55e..cce91148700 100644
--- a/sound/oss/msnd_pinnacle.h
+++ b/sound/oss/msnd_pinnacle.h
@@ -30,7 +30,6 @@
30#ifndef __MSND_PINNACLE_H 30#ifndef __MSND_PINNACLE_H
31#define __MSND_PINNACLE_H 31#define __MSND_PINNACLE_H
32 32
33#include <linux/config.h>
34 33
35#define DSP_NUMIO 0x08 34#define DSP_NUMIO 0x08
36 35
diff --git a/sound/oss/nec_vrc5477.c b/sound/oss/nec_vrc5477.c
index 21c1954d910..6f7f2f0423e 100644
--- a/sound/oss/nec_vrc5477.c
+++ b/sound/oss/nec_vrc5477.c
@@ -1909,7 +1909,7 @@ static int __devinit vrc5477_ac97_probe(struct pci_dev *pcidev,
1909 s->io, s->io + pci_resource_len(pcidev,0)-1); 1909 s->io, s->io + pci_resource_len(pcidev,0)-1);
1910 goto err_region; 1910 goto err_region;
1911 } 1911 }
1912 if (request_irq(s->irq, vrc5477_ac97_interrupt, SA_INTERRUPT, 1912 if (request_irq(s->irq, vrc5477_ac97_interrupt, IRQF_DISABLED,
1913 VRC5477_AC97_MODULE_NAME, s)) { 1913 VRC5477_AC97_MODULE_NAME, s)) {
1914 printk(KERN_ERR PFX "irq %u in use\n", s->irq); 1914 printk(KERN_ERR PFX "irq %u in use\n", s->irq);
1915 goto err_irq; 1915 goto err_irq;
diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c
index 6e662ac009a..7760dddf2b3 100644
--- a/sound/oss/nm256_audio.c
+++ b/sound/oss/nm256_audio.c
@@ -733,7 +733,7 @@ static int
733nm256_grabInterrupt (struct nm256_info *card) 733nm256_grabInterrupt (struct nm256_info *card)
734{ 734{
735 if (card->has_irq++ == 0) { 735 if (card->has_irq++ == 0) {
736 if (request_irq (card->irq, card->introutine, SA_SHIRQ, 736 if (request_irq (card->irq, card->introutine, IRQF_SHARED,
737 "NM256_audio", card) < 0) { 737 "NM256_audio", card) < 0) {
738 printk (KERN_ERR "NM256: can't obtain IRQ %d\n", card->irq); 738 printk (KERN_ERR "NM256: can't obtain IRQ %d\n", card->irq);
739 return -1; 739 return -1;
diff --git a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c
index 0e161c6a047..aec05a2bfc8 100644
--- a/sound/oss/opl3sa2.c
+++ b/sound/oss/opl3sa2.c
@@ -64,7 +64,6 @@
64 * 64 *
65 */ 65 */
66 66
67#include <linux/config.h>
68#include <linux/pnp.h> 67#include <linux/pnp.h>
69#include <linux/init.h> 68#include <linux/init.h>
70#include <linux/module.h> 69#include <linux/module.h>
diff --git a/sound/oss/pas2_card.c b/sound/oss/pas2_card.c
index c9696dc9fdf..97666007b27 100644
--- a/sound/oss/pas2_card.c
+++ b/sound/oss/pas2_card.c
@@ -4,7 +4,6 @@
4 * Detection routine for the Pro Audio Spectrum cards. 4 * Detection routine for the Pro Audio Spectrum cards.
5 */ 5 */
6 6
7#include <linux/config.h>
8#include <linux/init.h> 7#include <linux/init.h>
9#include <linux/interrupt.h> 8#include <linux/interrupt.h>
10#include <linux/module.h> 9#include <linux/module.h>
diff --git a/sound/oss/pss.c b/sound/oss/pss.c
index a617ccb40e0..37ee234b587 100644
--- a/sound/oss/pss.c
+++ b/sound/oss/pss.c
@@ -57,7 +57,6 @@
57 */ 57 */
58 58
59 59
60#include <linux/config.h>
61#include <linux/init.h> 60#include <linux/init.h>
62#include <linux/module.h> 61#include <linux/module.h>
63#include <linux/spinlock.h> 62#include <linux/spinlock.h>
diff --git a/sound/oss/rme96xx.c b/sound/oss/rme96xx.c
index a1ec9d131ab..f17d25b6f83 100644
--- a/sound/oss/rme96xx.c
+++ b/sound/oss/rme96xx.c
@@ -994,7 +994,7 @@ static int __devinit rme96xx_probe(struct pci_dev *pcidev, const struct pci_devi
994 994
995 if (pci_enable_device(pcidev)) 995 if (pci_enable_device(pcidev))
996 goto err_irq; 996 goto err_irq;
997 if (request_irq(s->irq, rme96xx_interrupt, SA_SHIRQ, "rme96xx", s)) { 997 if (request_irq(s->irq, rme96xx_interrupt, IRQF_SHARED, "rme96xx", s)) {
998 printk(KERN_ERR RME_MESS" irq %u in use\n", s->irq); 998 printk(KERN_ERR RME_MESS" irq %u in use\n", s->irq);
999 goto err_irq; 999 goto err_irq;
1000 } 1000 }
diff --git a/sound/oss/sb_card.c b/sound/oss/sb_card.c
index 4708cbdc314..8666291c005 100644
--- a/sound/oss/sb_card.c
+++ b/sound/oss/sb_card.c
@@ -22,7 +22,6 @@
22 * 02-07-2003 Bug made it into first release. Take two. 22 * 02-07-2003 Bug made it into first release. Take two.
23 */ 23 */
24 24
25#include <linux/config.h>
26#include <linux/module.h> 25#include <linux/module.h>
27#include <linux/moduleparam.h> 26#include <linux/moduleparam.h>
28#include <linux/init.h> 27#include <linux/init.h>
diff --git a/sound/oss/sb_common.c b/sound/oss/sb_common.c
index 5f955e3d2e2..35bab6e2f99 100644
--- a/sound/oss/sb_common.c
+++ b/sound/oss/sb_common.c
@@ -26,7 +26,6 @@
26 * Chris Rankin <rankinc@zipworld.com.au> 26 * Chris Rankin <rankinc@zipworld.com.au>
27 */ 27 */
28 28
29#include <linux/config.h>
30#include <linux/init.h> 29#include <linux/init.h>
31#include <linux/interrupt.h> 30#include <linux/interrupt.h>
32#include <linux/module.h> 31#include <linux/module.h>
@@ -678,7 +677,7 @@ int sb_dsp_init(struct address_info *hw_config, struct module *owner)
678 * will get shared PCI irq lines we must cope. 677 * will get shared PCI irq lines we must cope.
679 */ 678 */
680 679
681 int i=(devc->caps&SB_PCI_IRQ)?SA_SHIRQ:0; 680 int i=(devc->caps&SB_PCI_IRQ)?IRQF_SHARED:0;
682 681
683 if (request_irq(hw_config->irq, sbintr, i, "soundblaster", devc) < 0) 682 if (request_irq(hw_config->irq, sbintr, i, "soundblaster", devc) < 0)
684 { 683 {
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index 3f7427cd195..7b168d85f4a 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -1,4 +1,3 @@
1#include <linux/config.h>
2#include <linux/module.h> 1#include <linux/module.h>
3#include <linux/init.h> 2#include <linux/init.h>
4#include <linux/sched.h> 3#include <linux/sched.h>
@@ -298,7 +297,7 @@ static int __init dac_audio_init(void)
298 dac_audio_set_rate(); 297 dac_audio_set_rate();
299 298
300 retval = 299 retval =
301 request_irq(TIMER1_IRQ, timer1_interrupt, SA_INTERRUPT, MODNAME, 0); 300 request_irq(TIMER1_IRQ, timer1_interrupt, IRQF_DISABLED, MODNAME, 0);
302 if (retval < 0) { 301 if (retval < 0) {
303 printk(KERN_ERR "sh_dac_audio: IRQ %d request failed\n", 302 printk(KERN_ERR "sh_dac_audio: IRQ %d request failed\n",
304 TIMER1_IRQ); 303 TIMER1_IRQ);
diff --git a/sound/oss/sonicvibes.c b/sound/oss/sonicvibes.c
index 42bd276cfc3..8ea532d4019 100644
--- a/sound/oss/sonicvibes.c
+++ b/sound/oss/sonicvibes.c
@@ -2632,7 +2632,7 @@ static int __devinit sv_probe(struct pci_dev *pcidev, const struct pci_device_id
2632 wrindir(s, SV_CIPCMSR1, ((8000 * 65536 / FULLRATE) >> 8) & 0xff); 2632 wrindir(s, SV_CIPCMSR1, ((8000 * 65536 / FULLRATE) >> 8) & 0xff);
2633 wrindir(s, SV_CIADCOUTPUT, 0); 2633 wrindir(s, SV_CIADCOUTPUT, 0);
2634 /* request irq */ 2634 /* request irq */
2635 if ((ret=request_irq(s->irq,sv_interrupt,SA_SHIRQ,"S3 SonicVibes",s))) { 2635 if ((ret=request_irq(s->irq,sv_interrupt,IRQF_SHARED,"S3 SonicVibes",s))) {
2636 printk(KERN_ERR "sv: irq %u in use\n", s->irq); 2636 printk(KERN_ERR "sv: irq %u in use\n", s->irq);
2637 goto err_irq; 2637 goto err_irq;
2638 } 2638 }
diff --git a/sound/oss/sound_config.h b/sound/oss/sound_config.h
index 9f912b8a296..1a00a321061 100644
--- a/sound/oss/sound_config.h
+++ b/sound/oss/sound_config.h
@@ -14,7 +14,6 @@
14#ifndef _SOUND_CONFIG_H_ 14#ifndef _SOUND_CONFIG_H_
15#define _SOUND_CONFIG_H_ 15#define _SOUND_CONFIG_H_
16 16
17#include <linux/config.h>
18#include <linux/fs.h> 17#include <linux/fs.h>
19#include <linux/sound.h> 18#include <linux/sound.h>
20 19
diff --git a/sound/oss/soundcard.c b/sound/oss/soundcard.c
index a3328994890..0860d678971 100644
--- a/sound/oss/soundcard.c
+++ b/sound/oss/soundcard.c
@@ -22,7 +22,6 @@
22 * Christoph Hellwig : Some cleanup work (2000/03/01) 22 * Christoph Hellwig : Some cleanup work (2000/03/01)
23 */ 23 */
24 24
25#include <linux/config.h>
26 25
27#include "sound_config.h" 26#include "sound_config.h"
28#include <linux/init.h> 27#include <linux/init.h>
diff --git a/sound/oss/trident.c b/sound/oss/trident.c
index e61a454a815..2813e4c8e36 100644
--- a/sound/oss/trident.c
+++ b/sound/oss/trident.c
@@ -194,7 +194,6 @@
194 * sem - guard dmabuf, write re-entry etc 194 * sem - guard dmabuf, write re-entry etc
195 */ 195 */
196 196
197#include <linux/config.h>
198#include <linux/module.h> 197#include <linux/module.h>
199#include <linux/string.h> 198#include <linux/string.h>
200#include <linux/ctype.h> 199#include <linux/ctype.h>
@@ -4473,7 +4472,7 @@ trident_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id)
4473 4472
4474 /* claim our irq */ 4473 /* claim our irq */
4475 rc = -ENODEV; 4474 rc = -ENODEV;
4476 if (request_irq(card->irq, &trident_interrupt, SA_SHIRQ, 4475 if (request_irq(card->irq, &trident_interrupt, IRQF_SHARED,
4477 card_names[pci_id->driver_data], card)) { 4476 card_names[pci_id->driver_data], card)) {
4478 printk(KERN_ERR "trident: unable to allocate irq %d\n", 4477 printk(KERN_ERR "trident: unable to allocate irq %d\n",
4479 card->irq); 4478 card->irq);
diff --git a/sound/oss/via82cxxx_audio.c b/sound/oss/via82cxxx_audio.c
index 29a6e0cff79..08d8c94d01b 100644
--- a/sound/oss/via82cxxx_audio.c
+++ b/sound/oss/via82cxxx_audio.c
@@ -18,7 +18,6 @@
18#define VIA_VERSION "1.9.1-ac4-2.5" 18#define VIA_VERSION "1.9.1-ac4-2.5"
19 19
20 20
21#include <linux/config.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
24#include <linux/fs.h> 23#include <linux/fs.h>
@@ -2014,7 +2013,7 @@ static int via_interrupt_init (struct via_info *card)
2014 tmp8 |= VIA_CR48_FM_TRAP_TO_NMI; 2013 tmp8 |= VIA_CR48_FM_TRAP_TO_NMI;
2015 pci_write_config_byte (card->pdev, VIA_FM_NMI_CTRL, tmp8); 2014 pci_write_config_byte (card->pdev, VIA_FM_NMI_CTRL, tmp8);
2016 } 2015 }
2017 if (request_irq (card->pdev->irq, via_interrupt, SA_SHIRQ, VIA_MODULE_NAME, card)) { 2016 if (request_irq (card->pdev->irq, via_interrupt, IRQF_SHARED, VIA_MODULE_NAME, card)) {
2018 printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", 2017 printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n",
2019 card->pdev->irq); 2018 card->pdev->irq);
2020 DPRINTK ("EXIT, returning -EBUSY\n"); 2019 DPRINTK ("EXIT, returning -EBUSY\n");
@@ -2023,7 +2022,7 @@ static int via_interrupt_init (struct via_info *card)
2023 } 2022 }
2024 else 2023 else
2025 { 2024 {
2026 if (request_irq (card->pdev->irq, via_new_interrupt, SA_SHIRQ, VIA_MODULE_NAME, card)) { 2025 if (request_irq (card->pdev->irq, via_new_interrupt, IRQF_SHARED, VIA_MODULE_NAME, card)) {
2027 printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n", 2026 printk (KERN_ERR PFX "unable to obtain IRQ %d, aborting\n",
2028 card->pdev->irq); 2027 card->pdev->irq);
2029 DPRINTK ("EXIT, returning -EBUSY\n"); 2028 DPRINTK ("EXIT, returning -EBUSY\n");
diff --git a/sound/oss/vidc.c b/sound/oss/vidc.c
index 00fe5cec9dc..8932d89408e 100644
--- a/sound/oss/vidc.c
+++ b/sound/oss/vidc.c
@@ -17,7 +17,6 @@
17 * We currently support a mixer device, but it is currently non-functional. 17 * We currently support a mixer device, but it is currently non-functional.
18 */ 18 */
19 19
20#include <linux/config.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/module.h> 21#include <linux/module.h>
23#include <linux/kernel.h> 22#include <linux/kernel.h>
diff --git a/sound/oss/waveartist.c b/sound/oss/waveartist.c
index afcb524a40e..22d26624b34 100644
--- a/sound/oss/waveartist.c
+++ b/sound/oss/waveartist.c
@@ -35,7 +35,6 @@
35 35
36#include <linux/module.h> 36#include <linux/module.h>
37#include <linux/init.h> 37#include <linux/init.h>
38#include <linux/config.h>
39#include <linux/sched.h> 38#include <linux/sched.h>
40#include <linux/interrupt.h> 39#include <linux/interrupt.h>
41#include <linux/delay.h> 40#include <linux/delay.h>
diff --git a/sound/oss/wavfront.c b/sound/oss/wavfront.c
index b1a4eeb9dc0..1dec3958cc7 100644
--- a/sound/oss/wavfront.c
+++ b/sound/oss/wavfront.c
@@ -2268,7 +2268,7 @@ static int __init wavefront_hw_reset (void)
2268 } 2268 }
2269 2269
2270 if (request_irq (dev.irq, wavefrontintr, 2270 if (request_irq (dev.irq, wavefrontintr,
2271 SA_INTERRUPT|SA_SHIRQ, 2271 IRQF_DISABLED|IRQF_SHARED,
2272 "wavefront synth", &dev) < 0) { 2272 "wavefront synth", &dev) < 0) {
2273 printk (KERN_WARNING LOGNAME "IRQ %d not available!\n", 2273 printk (KERN_WARNING LOGNAME "IRQ %d not available!\n",
2274 dev.irq); 2274 dev.irq);
diff --git a/sound/oss/wf_midi.c b/sound/oss/wf_midi.c
index 7b167b74375..3f3a390014c 100644
--- a/sound/oss/wf_midi.c
+++ b/sound/oss/wf_midi.c
@@ -820,7 +820,7 @@ int __init install_wf_mpu (void)
820 820
821 /* OK, now we're configured to handle an interrupt ... */ 821 /* OK, now we're configured to handle an interrupt ... */
822 822
823 if (request_irq (phys_dev->irq, wf_mpuintr, SA_INTERRUPT|SA_SHIRQ, 823 if (request_irq (phys_dev->irq, wf_mpuintr, IRQF_DISABLED|IRQF_SHARED,
824 "wavefront midi", phys_dev) < 0) { 824 "wavefront midi", phys_dev) < 0) {
825 825
826 printk (KERN_ERR "WF-MPU: Failed to allocate IRQ%d\n", 826 printk (KERN_ERR "WF-MPU: Failed to allocate IRQ%d\n",
diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c
index bf90c124a7e..6e22472df95 100644
--- a/sound/oss/ymfpci.c
+++ b/sound/oss/ymfpci.c
@@ -2573,7 +2573,7 @@ static int __devinit ymf_probe_one(struct pci_dev *pcidev, const struct pci_devi
2573 goto out_disable_dsp; 2573 goto out_disable_dsp;
2574 ymf_memload(codec); 2574 ymf_memload(codec);
2575 2575
2576 if (request_irq(pcidev->irq, ymf_interrupt, SA_SHIRQ, "ymfpci", codec) != 0) { 2576 if (request_irq(pcidev->irq, ymf_interrupt, IRQF_SHARED, "ymfpci", codec) != 0) {
2577 printk(KERN_ERR "ymfpci: unable to request IRQ %d\n", 2577 printk(KERN_ERR "ymfpci: unable to request IRQ %d\n",
2578 pcidev->irq); 2578 pcidev->irq);
2579 goto out_memfree; 2579 goto out_memfree;
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index d42bf457036..f7aef8c9cf4 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -947,7 +947,7 @@ snd_ad1889_create(struct snd_card *card,
947 spin_lock_init(&chip->lock); /* only now can we call ad1889_free */ 947 spin_lock_init(&chip->lock); /* only now can we call ad1889_free */
948 948
949 if (request_irq(pci->irq, snd_ad1889_interrupt, 949 if (request_irq(pci->irq, snd_ad1889_interrupt,
950 SA_INTERRUPT|SA_SHIRQ, card->driver, (void*)chip)) { 950 IRQF_DISABLED|IRQF_SHARED, card->driver, (void*)chip)) {
951 printk(KERN_ERR PFX "cannot obtain IRQ %d\n", pci->irq); 951 printk(KERN_ERR PFX "cannot obtain IRQ %d\n", pci->irq);
952 snd_ad1889_free(chip); 952 snd_ad1889_free(chip);
953 return -EBUSY; 953 return -EBUSY;
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index 5dfdbf6657f..e0a815e53d1 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -2185,7 +2185,7 @@ static int __devinit snd_ali_resources(struct snd_ali *codec)
2185 return err; 2185 return err;
2186 codec->port = pci_resource_start(codec->pci, 0); 2186 codec->port = pci_resource_start(codec->pci, 0);
2187 2187
2188 if (request_irq(codec->pci->irq, snd_ali_card_interrupt, SA_INTERRUPT|SA_SHIRQ, "ALI 5451", (void *)codec)) { 2188 if (request_irq(codec->pci->irq, snd_ali_card_interrupt, IRQF_DISABLED|IRQF_SHARED, "ALI 5451", (void *)codec)) {
2189 snd_printk(KERN_ERR "Unable to request irq.\n"); 2189 snd_printk(KERN_ERR "Unable to request irq.\n");
2190 return -EBUSY; 2190 return -EBUSY;
2191 } 2191 }
diff --git a/sound/pci/als300.c b/sound/pci/als300.c
index 901b08ae917..a9c38963188 100644
--- a/sound/pci/als300.c
+++ b/sound/pci/als300.c
@@ -724,7 +724,7 @@ static int __devinit snd_als300_create(snd_card_t *card,
724 else 724 else
725 irq_handler = snd_als300_interrupt; 725 irq_handler = snd_als300_interrupt;
726 726
727 if (request_irq(pci->irq, irq_handler, SA_INTERRUPT|SA_SHIRQ, 727 if (request_irq(pci->irq, irq_handler, IRQF_DISABLED|IRQF_SHARED,
728 card->shortname, (void *)chip)) { 728 card->shortname, (void *)chip)) {
729 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 729 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
730 snd_als300_free(chip); 730 snd_als300_free(chip);
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index f18a8c0e468..9fbb065a810 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1578,7 +1578,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
1578 return -EIO; 1578 return -EIO;
1579 } 1579 }
1580 1580
1581 if (request_irq(pci->irq, snd_atiixp_interrupt, SA_INTERRUPT|SA_SHIRQ, 1581 if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED,
1582 card->shortname, chip)) { 1582 card->shortname, chip)) {
1583 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1583 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1584 snd_atiixp_free(chip); 1584 snd_atiixp_free(chip);
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 40739057076..7dcf4941dce 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -1251,7 +1251,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
1251 return -EIO; 1251 return -EIO;
1252 } 1252 }
1253 1253
1254 if (request_irq(pci->irq, snd_atiixp_interrupt, SA_INTERRUPT|SA_SHIRQ, 1254 if (request_irq(pci->irq, snd_atiixp_interrupt, IRQF_DISABLED|IRQF_SHARED,
1255 card->shortname, chip)) { 1255 card->shortname, chip)) {
1256 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1256 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1257 snd_atiixp_free(chip); 1257 snd_atiixp_free(chip);
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 8a3b118989b..ef189d7f09d 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -197,7 +197,7 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
197 } 197 }
198 198
199 if ((err = request_irq(pci->irq, vortex_interrupt, 199 if ((err = request_irq(pci->irq, vortex_interrupt,
200 SA_INTERRUPT | SA_SHIRQ, CARD_NAME_SHORT, 200 IRQF_DISABLED | IRQF_SHARED, CARD_NAME_SHORT,
201 chip)) != 0) { 201 chip)) != 0) {
202 printk(KERN_ERR "cannot grab irq\n"); 202 printk(KERN_ERR "cannot grab irq\n");
203 goto irq_out; 203 goto irq_out;
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index 6e62dafb66c..15447a3216d 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -1724,7 +1724,7 @@ snd_azf3328_create(struct snd_card *card,
1724 chip->synth_port = pci_resource_start(pci, 3); 1724 chip->synth_port = pci_resource_start(pci, 3);
1725 chip->mixer_port = pci_resource_start(pci, 4); 1725 chip->mixer_port = pci_resource_start(pci, 4);
1726 1726
1727 if (request_irq(pci->irq, snd_azf3328_interrupt, SA_INTERRUPT|SA_SHIRQ, card->shortname, (void *)chip)) { 1727 if (request_irq(pci->irq, snd_azf3328_interrupt, IRQF_DISABLED|IRQF_SHARED, card->shortname, (void *)chip)) {
1728 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1728 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1729 err = -EBUSY; 1729 err = -EBUSY;
1730 goto out_err; 1730 goto out_err;
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c
index 497ed6b2006..4d4277d045a 100644
--- a/sound/pci/bt87x.c
+++ b/sound/pci/bt87x.c
@@ -747,7 +747,7 @@ static int __devinit snd_bt87x_create(struct snd_card *card,
747 snd_bt87x_writel(chip, REG_INT_MASK, 0); 747 snd_bt87x_writel(chip, REG_INT_MASK, 0);
748 snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS); 748 snd_bt87x_writel(chip, REG_INT_STAT, MY_INTERRUPTS);
749 749
750 if (request_irq(pci->irq, snd_bt87x_interrupt, SA_INTERRUPT | SA_SHIRQ, 750 if (request_irq(pci->irq, snd_bt87x_interrupt, IRQF_DISABLED | IRQF_SHARED,
751 "Bt87x audio", chip)) { 751 "Bt87x audio", chip)) {
752 snd_bt87x_free(chip); 752 snd_bt87x_free(chip);
753 snd_printk(KERN_ERR "cannot grab irq\n"); 753 snd_printk(KERN_ERR "cannot grab irq\n");
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index 59bf9bd0253..a30c019bab6 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1268,7 +1268,7 @@ static int __devinit snd_ca0106_create(struct snd_card *card,
1268 } 1268 }
1269 1269
1270 if (request_irq(pci->irq, snd_ca0106_interrupt, 1270 if (request_irq(pci->irq, snd_ca0106_interrupt,
1271 SA_INTERRUPT|SA_SHIRQ, "snd_ca0106", 1271 IRQF_DISABLED|IRQF_SHARED, "snd_ca0106",
1272 (void *)chip)) { 1272 (void *)chip)) {
1273 snd_ca0106_free(chip); 1273 snd_ca0106_free(chip);
1274 printk(KERN_ERR "cannot grab irq\n"); 1274 printk(KERN_ERR "cannot grab irq\n");
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c
index 0938c158b5c..03766ad7499 100644
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -2862,7 +2862,7 @@ static int __devinit snd_cmipci_create(struct snd_card *card, struct pci_dev *pc
2862 cm->iobase = pci_resource_start(pci, 0); 2862 cm->iobase = pci_resource_start(pci, 0);
2863 2863
2864 if (request_irq(pci->irq, snd_cmipci_interrupt, 2864 if (request_irq(pci->irq, snd_cmipci_interrupt,
2865 SA_INTERRUPT|SA_SHIRQ, card->driver, cm)) { 2865 IRQF_DISABLED|IRQF_SHARED, card->driver, cm)) {
2866 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2866 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2867 snd_cmipci_free(cm); 2867 snd_cmipci_free(cm);
2868 return -EBUSY; 2868 return -EBUSY;
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c
index e77a4ce314b..d1802487f5b 100644
--- a/sound/pci/cs4281.c
+++ b/sound/pci/cs4281.c
@@ -1386,7 +1386,7 @@ static int __devinit snd_cs4281_create(struct snd_card *card,
1386 return -ENOMEM; 1386 return -ENOMEM;
1387 } 1387 }
1388 1388
1389 if (request_irq(pci->irq, snd_cs4281_interrupt, SA_INTERRUPT|SA_SHIRQ, 1389 if (request_irq(pci->irq, snd_cs4281_interrupt, IRQF_DISABLED|IRQF_SHARED,
1390 "CS4281", chip)) { 1390 "CS4281", chip)) {
1391 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1391 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1392 snd_cs4281_free(chip); 1392 snd_cs4281_free(chip);
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 5c211443920..894545ea41f 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -3853,7 +3853,7 @@ int __devinit snd_cs46xx_create(struct snd_card *card,
3853 } 3853 }
3854 } 3854 }
3855 3855
3856 if (request_irq(pci->irq, snd_cs46xx_interrupt, SA_INTERRUPT|SA_SHIRQ, 3856 if (request_irq(pci->irq, snd_cs46xx_interrupt, IRQF_DISABLED|IRQF_SHARED,
3857 "CS46XX", chip)) { 3857 "CS46XX", chip)) {
3858 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 3858 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
3859 snd_cs46xx_free(chip); 3859 snd_cs46xx_free(chip);
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
index 91c18a11fe8..c12b24c679f 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -321,7 +321,7 @@ static int __devinit snd_cs5535audio_create(struct snd_card *card,
321 cs5535au->port = pci_resource_start(pci, 0); 321 cs5535au->port = pci_resource_start(pci, 0);
322 322
323 if (request_irq(pci->irq, snd_cs5535audio_interrupt, 323 if (request_irq(pci->irq, snd_cs5535audio_interrupt,
324 SA_INTERRUPT|SA_SHIRQ, "CS5535 Audio", cs5535au)) { 324 IRQF_DISABLED|IRQF_SHARED, "CS5535 Audio", cs5535au)) {
325 snd_printk("unable to grab IRQ %d\n", pci->irq); 325 snd_printk("unable to grab IRQ %d\n", pci->irq);
326 err = -EBUSY; 326 err = -EBUSY;
327 goto sndfail; 327 goto sndfail;
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c
index 43b408ada1d..27a8dbe6f6a 100644
--- a/sound/pci/echoaudio/echoaudio.c
+++ b/sound/pci/echoaudio/echoaudio.c
@@ -1951,7 +1951,7 @@ static __devinit int snd_echo_create(struct snd_card *card,
1951 chip->dsp_registers = (volatile u32 __iomem *) 1951 chip->dsp_registers = (volatile u32 __iomem *)
1952 ioremap_nocache(chip->dsp_registers_phys, sz); 1952 ioremap_nocache(chip->dsp_registers_phys, sz);
1953 1953
1954 if (request_irq(pci->irq, snd_echo_interrupt, SA_INTERRUPT | SA_SHIRQ, 1954 if (request_irq(pci->irq, snd_echo_interrupt, IRQF_DISABLED | IRQF_SHARED,
1955 ECHOCARD_NAME, (void *)chip)) { 1955 ECHOCARD_NAME, (void *)chip)) {
1956 snd_echo_free(chip); 1956 snd_echo_free(chip);
1957 snd_printk(KERN_ERR "cannot grab irq\n"); 1957 snd_printk(KERN_ERR "cannot grab irq\n");
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 42a358f989c..d6f135fe295 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -1233,7 +1233,7 @@ int __devinit snd_emu10k1_create(struct snd_card *card,
1233 } 1233 }
1234 emu->port = pci_resource_start(pci, 0); 1234 emu->port = pci_resource_start(pci, 0);
1235 1235
1236 if (request_irq(pci->irq, snd_emu10k1_interrupt, SA_INTERRUPT|SA_SHIRQ, "EMU10K1", (void *)emu)) { 1236 if (request_irq(pci->irq, snd_emu10k1_interrupt, IRQF_DISABLED|IRQF_SHARED, "EMU10K1", (void *)emu)) {
1237 err = -EBUSY; 1237 err = -EBUSY;
1238 goto error; 1238 goto error;
1239 } 1239 }
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index 0fb27e4be07..2167279429b 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -928,7 +928,7 @@ static int __devinit snd_emu10k1x_create(struct snd_card *card,
928 } 928 }
929 929
930 if (request_irq(pci->irq, snd_emu10k1x_interrupt, 930 if (request_irq(pci->irq, snd_emu10k1x_interrupt,
931 SA_INTERRUPT|SA_SHIRQ, "EMU10K1X", 931 IRQF_DISABLED|IRQF_SHARED, "EMU10K1X",
932 (void *)chip)) { 932 (void *)chip)) {
933 snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq); 933 snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq);
934 snd_emu10k1x_free(chip); 934 snd_emu10k1x_free(chip);
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c
index 9d46bbee2a4..7a985c86800 100644
--- a/sound/pci/ens1370.c
+++ b/sound/pci/ens1370.c
@@ -2135,7 +2135,7 @@ static int __devinit snd_ensoniq_create(struct snd_card *card,
2135 return err; 2135 return err;
2136 } 2136 }
2137 ensoniq->port = pci_resource_start(pci, 0); 2137 ensoniq->port = pci_resource_start(pci, 0);
2138 if (request_irq(pci->irq, snd_audiopci_interrupt, SA_INTERRUPT|SA_SHIRQ, 2138 if (request_irq(pci->irq, snd_audiopci_interrupt, IRQF_DISABLED|IRQF_SHARED,
2139 "Ensoniq AudioPCI", ensoniq)) { 2139 "Ensoniq AudioPCI", ensoniq)) {
2140 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2140 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2141 snd_ensoniq_free(ensoniq); 2141 snd_ensoniq_free(ensoniq);
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index ca6603fe0b1..1113b10259c 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -1429,7 +1429,7 @@ static int es1938_resume(struct pci_dev *pci)
1429 pci_restore_state(pci); 1429 pci_restore_state(pci);
1430 pci_enable_device(pci); 1430 pci_enable_device(pci);
1431 request_irq(pci->irq, snd_es1938_interrupt, 1431 request_irq(pci->irq, snd_es1938_interrupt,
1432 SA_INTERRUPT|SA_SHIRQ, "ES1938", chip); 1432 IRQF_DISABLED|IRQF_SHARED, "ES1938", chip);
1433 chip->irq = pci->irq; 1433 chip->irq = pci->irq;
1434 snd_es1938_chip_init(chip); 1434 snd_es1938_chip_init(chip);
1435 1435
@@ -1544,7 +1544,7 @@ static int __devinit snd_es1938_create(struct snd_card *card,
1544 chip->vc_port = pci_resource_start(pci, 2); 1544 chip->vc_port = pci_resource_start(pci, 2);
1545 chip->mpu_port = pci_resource_start(pci, 3); 1545 chip->mpu_port = pci_resource_start(pci, 3);
1546 chip->game_port = pci_resource_start(pci, 4); 1546 chip->game_port = pci_resource_start(pci, 4);
1547 if (request_irq(pci->irq, snd_es1938_interrupt, SA_INTERRUPT|SA_SHIRQ, 1547 if (request_irq(pci->irq, snd_es1938_interrupt, IRQF_DISABLED|IRQF_SHARED,
1548 "ES1938", chip)) { 1548 "ES1938", chip)) {
1549 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1549 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1550 snd_es1938_free(chip); 1550 snd_es1938_free(chip);
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index bfa0876e715..a491c8f8a6a 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2597,7 +2597,7 @@ static int __devinit snd_es1968_create(struct snd_card *card,
2597 return err; 2597 return err;
2598 } 2598 }
2599 chip->io_port = pci_resource_start(pci, 0); 2599 chip->io_port = pci_resource_start(pci, 0);
2600 if (request_irq(pci->irq, snd_es1968_interrupt, SA_INTERRUPT|SA_SHIRQ, 2600 if (request_irq(pci->irq, snd_es1968_interrupt, IRQF_DISABLED|IRQF_SHARED,
2601 "ESS Maestro", (void*)chip)) { 2601 "ESS Maestro", (void*)chip)) {
2602 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2602 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2603 snd_es1968_free(chip); 2603 snd_es1968_free(chip);
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 0afa573dd24..3aed27eace2 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1371,7 +1371,7 @@ static int __devinit snd_fm801_create(struct snd_card *card,
1371 return err; 1371 return err;
1372 } 1372 }
1373 chip->port = pci_resource_start(pci, 0); 1373 chip->port = pci_resource_start(pci, 0);
1374 if (request_irq(pci->irq, snd_fm801_interrupt, SA_INTERRUPT|SA_SHIRQ, 1374 if (request_irq(pci->irq, snd_fm801_interrupt, IRQF_DISABLED|IRQF_SHARED,
1375 "FM801", chip)) { 1375 "FM801", chip)) {
1376 snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->irq); 1376 snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->irq);
1377 snd_fm801_free(chip); 1377 snd_fm801_free(chip);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 4070b5cd9b6..025af7c0c6e 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1486,7 +1486,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
1486 goto errout; 1486 goto errout;
1487 } 1487 }
1488 1488
1489 if (request_irq(pci->irq, azx_interrupt, SA_INTERRUPT|SA_SHIRQ, 1489 if (request_irq(pci->irq, azx_interrupt, IRQF_DISABLED|IRQF_SHARED,
1490 "HDA Intel", (void*)chip)) { 1490 "HDA Intel", (void*)chip)) {
1491 snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq); 1491 snd_printk(KERN_ERR SFX "unable to grab IRQ %d\n", pci->irq);
1492 err = -EBUSY; 1492 err = -EBUSY;
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index 845907159b7..89a06dec436 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2606,7 +2606,7 @@ static int __devinit snd_ice1712_create(struct snd_card *card,
2606 ice->dmapath_port = pci_resource_start(pci, 2); 2606 ice->dmapath_port = pci_resource_start(pci, 2);
2607 ice->profi_port = pci_resource_start(pci, 3); 2607 ice->profi_port = pci_resource_start(pci, 3);
2608 2608
2609 if (request_irq(pci->irq, snd_ice1712_interrupt, SA_INTERRUPT|SA_SHIRQ, 2609 if (request_irq(pci->irq, snd_ice1712_interrupt, IRQF_DISABLED|IRQF_SHARED,
2610 "ICE1712", ice)) { 2610 "ICE1712", ice)) {
2611 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2611 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2612 snd_ice1712_free(ice); 2612 snd_ice1712_free(ice);
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 34a58c629f4..ad69ed7c1b8 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -2253,7 +2253,7 @@ static int __devinit snd_vt1724_create(struct snd_card *card,
2253 ice->profi_port = pci_resource_start(pci, 1); 2253 ice->profi_port = pci_resource_start(pci, 1);
2254 2254
2255 if (request_irq(pci->irq, snd_vt1724_interrupt, 2255 if (request_irq(pci->irq, snd_vt1724_interrupt,
2256 SA_INTERRUPT|SA_SHIRQ, "ICE1724", ice)) { 2256 IRQF_DISABLED|IRQF_SHARED, "ICE1724", ice)) {
2257 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2257 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2258 snd_vt1724_free(ice); 2258 snd_vt1724_free(ice);
2259 return -EIO; 2259 return -EIO;
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index edc14475ef8..5634bc34925 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -2475,7 +2475,7 @@ static int intel8x0_resume(struct pci_dev *pci)
2475 pci_restore_state(pci); 2475 pci_restore_state(pci);
2476 pci_enable_device(pci); 2476 pci_enable_device(pci);
2477 pci_set_master(pci); 2477 pci_set_master(pci);
2478 request_irq(pci->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, 2478 request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_DISABLED|IRQF_SHARED,
2479 card->shortname, chip); 2479 card->shortname, chip);
2480 chip->irq = pci->irq; 2480 chip->irq = pci->irq;
2481 synchronize_irq(chip->irq); 2481 synchronize_irq(chip->irq);
@@ -2848,7 +2848,7 @@ static int __devinit snd_intel8x0_create(struct snd_card *card,
2848 2848
2849 /* request irq after initializaing int_sta_mask, etc */ 2849 /* request irq after initializaing int_sta_mask, etc */
2850 if (request_irq(pci->irq, snd_intel8x0_interrupt, 2850 if (request_irq(pci->irq, snd_intel8x0_interrupt,
2851 SA_INTERRUPT|SA_SHIRQ, card->shortname, chip)) { 2851 IRQF_DISABLED|IRQF_SHARED, card->shortname, chip)) {
2852 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2852 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2853 snd_intel8x0_free(chip); 2853 snd_intel8x0_free(chip);
2854 return -EBUSY; 2854 return -EBUSY;
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c
index 24703d75b65..f28e273ae27 100644
--- a/sound/pci/intel8x0m.c
+++ b/sound/pci/intel8x0m.c
@@ -1185,7 +1185,7 @@ static int __devinit snd_intel8x0m_create(struct snd_card *card,
1185 } 1185 }
1186 1186
1187 port_inited: 1187 port_inited:
1188 if (request_irq(pci->irq, snd_intel8x0_interrupt, SA_INTERRUPT|SA_SHIRQ, 1188 if (request_irq(pci->irq, snd_intel8x0_interrupt, IRQF_DISABLED|IRQF_SHARED,
1189 card->shortname, chip)) { 1189 card->shortname, chip)) {
1190 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1190 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1191 snd_intel8x0_free(chip); 1191 snd_intel8x0_free(chip);
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c
index 6e97932de34..2b4ce002794 100644
--- a/sound/pci/korg1212/korg1212.c
+++ b/sound/pci/korg1212/korg1212.c
@@ -2237,7 +2237,7 @@ static int __devinit snd_korg1212_create(struct snd_card *card, struct pci_dev *
2237 } 2237 }
2238 2238
2239 err = request_irq(pci->irq, snd_korg1212_interrupt, 2239 err = request_irq(pci->irq, snd_korg1212_interrupt,
2240 SA_INTERRUPT|SA_SHIRQ, 2240 IRQF_DISABLED|IRQF_SHARED,
2241 "korg1212", korg1212); 2241 "korg1212", korg1212);
2242 2242
2243 if (err) { 2243 if (err) {
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 1c344fbd964..828eab59253 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2760,7 +2760,7 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
2760 2760
2761 tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip); 2761 tasklet_init(&chip->hwvol_tq, snd_m3_update_hw_volume, (unsigned long)chip);
2762 2762
2763 if (request_irq(pci->irq, snd_m3_interrupt, SA_INTERRUPT|SA_SHIRQ, 2763 if (request_irq(pci->irq, snd_m3_interrupt, IRQF_DISABLED|IRQF_SHARED,
2764 card->driver, chip)) { 2764 card->driver, chip)) {
2765 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2765 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2766 snd_m3_free(chip); 2766 snd_m3_free(chip);
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index 366c4a7e65c..a4aaa7b9a23 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1319,7 +1319,7 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
1319 pci_resource_len(pci, i)); 1319 pci_resource_len(pci, i));
1320 } 1320 }
1321 1321
1322 if (request_irq(pci->irq, snd_mixart_interrupt, SA_INTERRUPT|SA_SHIRQ, CARD_NAME, (void *)mgr)) { 1322 if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_DISABLED|IRQF_SHARED, CARD_NAME, (void *)mgr)) {
1323 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1323 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1324 snd_mixart_free(mgr); 1324 snd_mixart_free(mgr);
1325 return -EBUSY; 1325 return -EBUSY;
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c
index b92d6600deb..56d7282e665 100644
--- a/sound/pci/nm256/nm256.c
+++ b/sound/pci/nm256/nm256.c
@@ -465,7 +465,7 @@ static int snd_nm256_acquire_irq(struct nm256 *chip)
465{ 465{
466 mutex_lock(&chip->irq_mutex); 466 mutex_lock(&chip->irq_mutex);
467 if (chip->irq < 0) { 467 if (chip->irq < 0) {
468 if (request_irq(chip->pci->irq, chip->interrupt, SA_INTERRUPT|SA_SHIRQ, 468 if (request_irq(chip->pci->irq, chip->interrupt, IRQF_DISABLED|IRQF_SHARED,
469 chip->card->driver, chip)) { 469 chip->card->driver, chip)) {
470 snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->pci->irq); 470 snd_printk(KERN_ERR "unable to grab IRQ %d\n", chip->pci->irq);
471 mutex_unlock(&chip->irq_mutex); 471 mutex_unlock(&chip->irq_mutex);
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index 8198884b51e..ae980e11827 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1250,7 +1250,7 @@ static int __devinit pcxhr_probe(struct pci_dev *pci, const struct pci_device_id
1250 mgr->pci = pci; 1250 mgr->pci = pci;
1251 mgr->irq = -1; 1251 mgr->irq = -1;
1252 1252
1253 if (request_irq(pci->irq, pcxhr_interrupt, SA_INTERRUPT|SA_SHIRQ, 1253 if (request_irq(pci->irq, pcxhr_interrupt, IRQF_DISABLED|IRQF_SHARED,
1254 card_name, mgr)) { 1254 card_name, mgr)) {
1255 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1255 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1256 pcxhr_free(mgr); 1256 pcxhr_free(mgr);
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c
index 5618ec9740b..5501a08ca23 100644
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -1892,7 +1892,7 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci,
1892 UNSET_AIE(hwport); 1892 UNSET_AIE(hwport);
1893 1893
1894 if (request_irq 1894 if (request_irq
1895 (pci->irq, snd_riptide_interrupt, SA_INTERRUPT | SA_SHIRQ, 1895 (pci->irq, snd_riptide_interrupt, IRQF_DISABLED | IRQF_SHARED,
1896 "RIPTIDE", chip)) { 1896 "RIPTIDE", chip)) {
1897 snd_printk(KERN_ERR "Riptide: unable to grab IRQ %d\n", 1897 snd_printk(KERN_ERR "Riptide: unable to grab IRQ %d\n",
1898 pci->irq); 1898 pci->irq);
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c
index 2cb9fe98db2..2e24b68d07a 100644
--- a/sound/pci/rme32.c
+++ b/sound/pci/rme32.c
@@ -1374,7 +1374,7 @@ static int __devinit snd_rme32_create(struct rme32 * rme32)
1374 return -ENOMEM; 1374 return -ENOMEM;
1375 } 1375 }
1376 1376
1377 if (request_irq(pci->irq, snd_rme32_interrupt, SA_INTERRUPT | SA_SHIRQ, "RME32", (void *) rme32)) { 1377 if (request_irq(pci->irq, snd_rme32_interrupt, IRQF_DISABLED | IRQF_SHARED, "RME32", (void *) rme32)) {
1378 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1378 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1379 return -EBUSY; 1379 return -EBUSY;
1380 } 1380 }
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
index 991cb18c14f..fde0f3e2053 100644
--- a/sound/pci/rme96.c
+++ b/sound/pci/rme96.c
@@ -1588,7 +1588,7 @@ snd_rme96_create(struct rme96 *rme96)
1588 return -ENOMEM; 1588 return -ENOMEM;
1589 } 1589 }
1590 1590
1591 if (request_irq(pci->irq, snd_rme96_interrupt, SA_INTERRUPT|SA_SHIRQ, "RME96", (void *)rme96)) { 1591 if (request_irq(pci->irq, snd_rme96_interrupt, IRQF_DISABLED|IRQF_SHARED, "RME96", (void *)rme96)) {
1592 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1592 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1593 return -EBUSY; 1593 return -EBUSY;
1594 } 1594 }
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c
index eaf3c22449a..99cf86244ac 100644
--- a/sound/pci/rme9652/hdsp.c
+++ b/sound/pci/rme9652/hdsp.c
@@ -4912,7 +4912,7 @@ static int __devinit snd_hdsp_create(struct snd_card *card,
4912 return -EBUSY; 4912 return -EBUSY;
4913 } 4913 }
4914 4914
4915 if (request_irq(pci->irq, snd_hdsp_interrupt, SA_INTERRUPT|SA_SHIRQ, "hdsp", (void *)hdsp)) { 4915 if (request_irq(pci->irq, snd_hdsp_interrupt, IRQF_DISABLED|IRQF_SHARED, "hdsp", (void *)hdsp)) {
4916 snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq); 4916 snd_printk(KERN_ERR "Hammerfall-DSP: unable to use IRQ %d\n", pci->irq);
4917 return -EBUSY; 4917 return -EBUSY;
4918 } 4918 }
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c
index bba1615504d..7d03ae066d5 100644
--- a/sound/pci/rme9652/hdspm.c
+++ b/sound/pci/rme9652/hdspm.c
@@ -3497,7 +3497,7 @@ static int __devinit snd_hdspm_create(struct snd_card *card, struct hdspm * hdsp
3497 hdspm->port + io_extent - 1); 3497 hdspm->port + io_extent - 1);
3498 3498
3499 if (request_irq(pci->irq, snd_hdspm_interrupt, 3499 if (request_irq(pci->irq, snd_hdspm_interrupt,
3500 SA_INTERRUPT | SA_SHIRQ, "hdspm", 3500 IRQF_DISABLED | IRQF_SHARED, "hdspm",
3501 (void *) hdspm)) { 3501 (void *) hdspm)) {
3502 snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq); 3502 snd_printk(KERN_ERR "HDSPM: unable to use IRQ %d\n", pci->irq);
3503 return -EBUSY; 3503 return -EBUSY;
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c
index 3b945e8c1b1..9534e183413 100644
--- a/sound/pci/rme9652/rme9652.c
+++ b/sound/pci/rme9652/rme9652.c
@@ -2500,7 +2500,7 @@ static int __devinit snd_rme9652_create(struct snd_card *card,
2500 return -EBUSY; 2500 return -EBUSY;
2501 } 2501 }
2502 2502
2503 if (request_irq(pci->irq, snd_rme9652_interrupt, SA_INTERRUPT|SA_SHIRQ, "rme9652", (void *)rme9652)) { 2503 if (request_irq(pci->irq, snd_rme9652_interrupt, IRQF_DISABLED|IRQF_SHARED, "rme9652", (void *)rme9652)) {
2504 snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq); 2504 snd_printk(KERN_ERR "unable to request IRQ %d\n", pci->irq);
2505 return -EBUSY; 2505 return -EBUSY;
2506 } 2506 }
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
index e5511606af0..c4303418668 100644
--- a/sound/pci/sonicvibes.c
+++ b/sound/pci/sonicvibes.c
@@ -1257,7 +1257,7 @@ static int __devinit snd_sonicvibes_create(struct snd_card *card,
1257 sonic->midi_port = pci_resource_start(pci, 3); 1257 sonic->midi_port = pci_resource_start(pci, 3);
1258 sonic->game_port = pci_resource_start(pci, 4); 1258 sonic->game_port = pci_resource_start(pci, 4);
1259 1259
1260 if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) { 1260 if (request_irq(pci->irq, snd_sonicvibes_interrupt, IRQF_DISABLED|IRQF_SHARED, "S3 SonicVibes", (void *)sonic)) {
1261 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1261 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1262 snd_sonicvibes_free(sonic); 1262 snd_sonicvibes_free(sonic);
1263 return -EBUSY; 1263 return -EBUSY;
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index d99ed723775..4930cc6b054 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -3599,7 +3599,7 @@ int __devinit snd_trident_create(struct snd_card *card,
3599 } 3599 }
3600 trident->port = pci_resource_start(pci, 0); 3600 trident->port = pci_resource_start(pci, 0);
3601 3601
3602 if (request_irq(pci->irq, snd_trident_interrupt, SA_INTERRUPT|SA_SHIRQ, 3602 if (request_irq(pci->irq, snd_trident_interrupt, IRQF_DISABLED|IRQF_SHARED,
3603 "Trident Audio", trident)) { 3603 "Trident Audio", trident)) {
3604 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 3604 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
3605 snd_trident_free(trident); 3605 snd_trident_free(trident);
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 2527bbd958c..37bd5eb7a38 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -2281,7 +2281,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card,
2281 if (request_irq(pci->irq, 2281 if (request_irq(pci->irq,
2282 chip_type == TYPE_VIA8233 ? 2282 chip_type == TYPE_VIA8233 ?
2283 snd_via8233_interrupt : snd_via686_interrupt, 2283 snd_via8233_interrupt : snd_via686_interrupt,
2284 SA_INTERRUPT|SA_SHIRQ, 2284 IRQF_DISABLED|IRQF_SHARED,
2285 card->driver, chip)) { 2285 card->driver, chip)) {
2286 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2286 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2287 snd_via82xx_free(chip); 2287 snd_via82xx_free(chip);
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c
index 577a2b03759..c1ede6c2a6d 100644
--- a/sound/pci/via82xx_modem.c
+++ b/sound/pci/via82xx_modem.c
@@ -1118,7 +1118,7 @@ static int __devinit snd_via82xx_create(struct snd_card *card,
1118 return err; 1118 return err;
1119 } 1119 }
1120 chip->port = pci_resource_start(pci, 0); 1120 chip->port = pci_resource_start(pci, 0);
1121 if (request_irq(pci->irq, snd_via82xx_interrupt, SA_INTERRUPT|SA_SHIRQ, 1121 if (request_irq(pci->irq, snd_via82xx_interrupt, IRQF_DISABLED|IRQF_SHARED,
1122 card->driver, chip)) { 1122 card->driver, chip)) {
1123 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 1123 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1124 snd_via82xx_free(chip); 1124 snd_via82xx_free(chip);
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c
index 0f1ebb010a5..7deda25f7ad 100644
--- a/sound/pci/vx222/vx222.c
+++ b/sound/pci/vx222/vx222.c
@@ -162,7 +162,7 @@ static int __devinit snd_vx222_create(struct snd_card *card, struct pci_dev *pci
162 for (i = 0; i < 2; i++) 162 for (i = 0; i < 2; i++)
163 vx->port[i] = pci_resource_start(pci, i + 1); 163 vx->port[i] = pci_resource_start(pci, i + 1);
164 164
165 if (request_irq(pci->irq, snd_vx_irq_handler, SA_INTERRUPT|SA_SHIRQ, 165 if (request_irq(pci->irq, snd_vx_irq_handler, IRQF_DISABLED|IRQF_SHARED,
166 CARD_NAME, (void *) chip)) { 166 CARD_NAME, (void *) chip)) {
167 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 167 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
168 snd_vx222_free(chip); 168 snd_vx222_free(chip);
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index f894752523b..a55b5fd7da6 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -2288,7 +2288,7 @@ int __devinit snd_ymfpci_create(struct snd_card *card,
2288 snd_ymfpci_free(chip); 2288 snd_ymfpci_free(chip);
2289 return -EBUSY; 2289 return -EBUSY;
2290 } 2290 }
2291 if (request_irq(pci->irq, snd_ymfpci_interrupt, SA_INTERRUPT|SA_SHIRQ, "YMFPCI", (void *) chip)) { 2291 if (request_irq(pci->irq, snd_ymfpci_interrupt, IRQF_DISABLED|IRQF_SHARED, "YMFPCI", (void *) chip)) {
2292 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); 2292 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
2293 snd_ymfpci_free(chip); 2293 snd_ymfpci_free(chip);
2294 return -EBUSY; 2294 return -EBUSY;
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index be98f637733..90db9a1d1e0 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -1170,7 +1170,7 @@ int __init snd_pmac_new(struct snd_card *card, struct snd_pmac **chip_return)
1170 chip->rsrc[i].start + 1, 1170 chip->rsrc[i].start + 1,
1171 rnames[i]) == NULL) { 1171 rnames[i]) == NULL) {
1172 printk(KERN_ERR "snd: can't request rsrc " 1172 printk(KERN_ERR "snd: can't request rsrc "
1173 " %d (%s: 0x%016lx:%016lx)\n", 1173 " %d (%s: 0x%016llx:%016llx)\n",
1174 i, rnames[i], 1174 i, rnames[i],
1175 (unsigned long long)chip->rsrc[i].start, 1175 (unsigned long long)chip->rsrc[i].start,
1176 (unsigned long long)chip->rsrc[i].end); 1176 (unsigned long long)chip->rsrc[i].end);
diff --git a/sound/sound_core.c b/sound/sound_core.c
index 7535ec821dc..62d4d0c8126 100644
--- a/sound/sound_core.c
+++ b/sound/sound_core.c
@@ -34,7 +34,6 @@
34 * locking at some point in 2.3.x. 34 * locking at some point in 2.3.x.
35 */ 35 */
36 36
37#include <linux/config.h>
38#include <linux/module.h> 37#include <linux/module.h>
39#include <linux/init.h> 38#include <linux/init.h>
40#include <linux/slab.h> 39#include <linux/slab.h>
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index ba1b2a3443d..db3e22efd02 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -973,7 +973,7 @@ static int __init snd_amd7930_create(struct snd_card *card,
973 amd7930_idle(amd); 973 amd7930_idle(amd);
974 974
975 if (request_irq(irq, snd_amd7930_interrupt, 975 if (request_irq(irq, snd_amd7930_interrupt,
976 SA_INTERRUPT | SA_SHIRQ, "amd7930", amd)) { 976 IRQF_DISABLED | IRQF_SHARED, "amd7930", amd)) {
977 snd_printk("amd7930-%d: Unable to grab IRQ %d\n", 977 snd_printk("amd7930-%d: Unable to grab IRQ %d\n",
978 dev, irq); 978 dev, irq);
979 snd_amd7930_free(amd); 979 snd_amd7930_free(amd);
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index d9d14c2707d..5018fcf41df 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -8,7 +8,6 @@
8 * Copyright (c) by Jaroslav Kysela <perex@suse.cz> 8 * Copyright (c) by Jaroslav Kysela <perex@suse.cz>
9 */ 9 */
10 10
11#include <linux/config.h>
12#include <linux/module.h> 11#include <linux/module.h>
13#include <linux/kernel.h> 12#include <linux/kernel.h>
14#include <linux/slab.h> 13#include <linux/slab.h>
@@ -2002,7 +2001,7 @@ static int __init snd_cs4231_sbus_create(struct snd_card *card,
2002 chip->c_dma.preallocate = sbus_dma_preallocate; 2001 chip->c_dma.preallocate = sbus_dma_preallocate;
2003 2002
2004 if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt, 2003 if (request_irq(sdev->irqs[0], snd_cs4231_sbus_interrupt,
2005 SA_SHIRQ, "cs4231", chip)) { 2004 IRQF_SHARED, "cs4231", chip)) {
2006 snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n", 2005 snd_printdd("cs4231-%d: Unable to grab SBUS IRQ %d\n",
2007 dev, sdev->irqs[0]); 2006 dev, sdev->irqs[0]);
2008 snd_cs4231_sbus_free(chip); 2007 snd_cs4231_sbus_free(chip);
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index a7489a3dd75..59a02a0d9af 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -46,7 +46,7 @@
46 * 46 *
47 * I've tried to stick to the following function naming conventions: 47 * I've tried to stick to the following function naming conventions:
48 * snd_* ALSA stuff 48 * snd_* ALSA stuff
49 * cs4215_* CS4215 codec specfic stuff 49 * cs4215_* CS4215 codec specific stuff
50 * dbri_* DBRI high-level stuff 50 * dbri_* DBRI high-level stuff
51 * other DBRI low-level stuff 51 * other DBRI low-level stuff
52 */ 52 */
@@ -2569,7 +2569,7 @@ static int __init snd_dbri_create(struct snd_card *card,
2569 return -EIO; 2569 return -EIO;
2570 } 2570 }
2571 2571
2572 err = request_irq(dbri->irq, snd_dbri_interrupt, SA_SHIRQ, 2572 err = request_irq(dbri->irq, snd_dbri_interrupt, IRQF_SHARED,
2573 "DBRI audio", dbri); 2573 "DBRI audio", dbri);
2574 if (err) { 2574 if (err) {
2575 printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq); 2575 printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq);