From 53bcd88fd2bcd1f187b36fadb1cff9c17fe6c737 Mon Sep 17 00:00:00 2001 From: Jamie Lentin Date: Tue, 27 Mar 2012 22:54:15 +0100 Subject: [PATCH] --- yaml --- r: 297756 b: refs/heads/master c: 83619ea08e9abe0f5ebcfc569a829d1105a1685e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/ABI/testing/debugfs-olpc | 16 - .../Documentation/ABI/testing/sysfs-block-dm | 25 - .../ABI/testing/sysfs-driver-samsung-laptop | 18 - trunk/Documentation/Makefile | 2 +- .../device-mapper/thin-provisioning.txt | 65 +- trunk/Documentation/device-mapper/verity.txt | 194 -- .../devicetree/bindings/gpio/gpio-omap.txt | 36 - .../devicetree/bindings/gpio/gpio-twl4030.txt | 23 - .../devicetree/bindings/gpio/sodaville.txt | 48 - .../devicetree/bindings/mmc/ti-omap-hsmmc.txt | 33 - .../devicetree/bindings/mtd/arm-versatile.txt | 4 +- .../bindings/mtd/atmel-dataflash.txt | 3 + .../devicetree/bindings/mtd/fsl-upm-nand.txt | 4 + .../bindings/mtd/gpio-control-nand.txt | 3 + .../devicetree/bindings/mtd/mtd-physmap.txt | 23 +- .../devicetree/bindings/mtd/partition.txt | 38 + trunk/Documentation/dma-buf-sharing.txt | 120 +- trunk/Documentation/filesystems/files.txt | 4 +- trunk/Documentation/gpio.txt | 40 +- trunk/Documentation/i2c/busses/i2c-i801 | 1 - trunk/Documentation/kernel-parameters.txt | 8 - trunk/Documentation/laptops/asus-laptop.txt | 2 +- trunk/Documentation/laptops/sony-laptop.txt | 5 - trunk/Documentation/virtual/kvm/api.txt | 259 +- trunk/Documentation/virtual/kvm/ppc-pv.txt | 24 +- trunk/Documentation/vm/Makefile | 8 + .../vm/hugepage-mmap.c | 13 +- .../vm/hugepage-shm.c | 10 +- .../vm/map_hugetlb.c | 10 +- .../{tools => Documentation}/vm/page-types.c | 6 +- trunk/Documentation/watchdog/00-INDEX | 19 + .../convert_drivers_to_kernel_api.txt | 4 - .../watchdog/watchdog-kernel-api.txt | 11 +- trunk/MAINTAINERS | 15 +- trunk/arch/Kconfig | 3 - trunk/arch/alpha/boot/bootp.c | 1 + trunk/arch/alpha/boot/bootpz.c | 1 + trunk/arch/alpha/boot/head.S | 1 + trunk/arch/alpha/boot/main.c | 1 + trunk/arch/alpha/include/asm/atomic.h | 68 +- trunk/arch/alpha/include/asm/auxvec.h | 2 - trunk/arch/alpha/include/asm/core_lca.h | 2 +- trunk/arch/alpha/include/asm/core_mcpcia.h | 1 - trunk/arch/alpha/include/asm/core_t2.h | 1 + trunk/arch/alpha/include/asm/elf.h | 1 - trunk/arch/alpha/include/asm/exec.h | 6 - trunk/arch/alpha/include/asm/fpu.h | 2 - trunk/arch/alpha/include/asm/io.h | 1 + trunk/arch/alpha/include/asm/irqflags.h | 2 +- trunk/arch/alpha/include/asm/mce.h | 83 - trunk/arch/alpha/include/asm/mmu_context.h | 1 + trunk/arch/alpha/include/asm/pal.h | 112 - trunk/arch/alpha/include/asm/pgtable.h | 1 - trunk/arch/alpha/include/asm/posix_types.h | 113 +- trunk/arch/alpha/include/asm/setup.h | 36 - trunk/arch/alpha/include/asm/special_insns.h | 41 - trunk/arch/alpha/include/asm/spinlock.h | 1 + trunk/arch/alpha/include/asm/switch_to.h | 14 - trunk/arch/alpha/include/asm/system.h | 354 +++ trunk/arch/alpha/include/asm/xchg.h | 2 +- trunk/arch/alpha/kernel/core_apecs.c | 1 - trunk/arch/alpha/kernel/core_cia.c | 1 - trunk/arch/alpha/kernel/core_t2.c | 1 - trunk/arch/alpha/kernel/err_impl.h | 2 - trunk/arch/alpha/kernel/head.S | 6 +- trunk/arch/alpha/kernel/irq.c | 1 + trunk/arch/alpha/kernel/irq_alpha.c | 1 - trunk/arch/alpha/kernel/osf_sys.c | 1 + trunk/arch/alpha/kernel/process.c | 1 + trunk/arch/alpha/kernel/ptrace.c | 1 + trunk/arch/alpha/kernel/setup.c | 1 + trunk/arch/alpha/kernel/sys_alcor.c | 1 + trunk/arch/alpha/kernel/sys_cabriolet.c | 1 + trunk/arch/alpha/kernel/sys_dp264.c | 1 + trunk/arch/alpha/kernel/sys_eb64p.c | 1 + trunk/arch/alpha/kernel/sys_eiger.c | 1 + trunk/arch/alpha/kernel/sys_jensen.c | 1 + trunk/arch/alpha/kernel/sys_marvel.c | 1 + trunk/arch/alpha/kernel/sys_miata.c | 1 + trunk/arch/alpha/kernel/sys_mikasa.c | 2 +- trunk/arch/alpha/kernel/sys_nautilus.c | 1 + trunk/arch/alpha/kernel/sys_noritake.c | 2 +- trunk/arch/alpha/kernel/sys_rawhide.c | 1 + trunk/arch/alpha/kernel/sys_ruffian.c | 1 + trunk/arch/alpha/kernel/sys_rx164.c | 1 + trunk/arch/alpha/kernel/sys_sable.c | 1 + trunk/arch/alpha/kernel/sys_sio.c | 1 + trunk/arch/alpha/kernel/sys_sx164.c | 2 +- trunk/arch/alpha/kernel/sys_takara.c | 1 + trunk/arch/alpha/kernel/sys_titan.c | 1 + trunk/arch/alpha/kernel/sys_wildfire.c | 1 + trunk/arch/alpha/kernel/traps.c | 1 - trunk/arch/alpha/kernel/vmlinux.lds.S | 2 - trunk/arch/alpha/lib/stacktrace.c | 1 + trunk/arch/alpha/mm/fault.c | 1 + trunk/arch/alpha/mm/init.c | 2 +- trunk/arch/alpha/oprofile/common.c | 1 + trunk/arch/alpha/oprofile/op_model_ev4.c | 1 + trunk/arch/alpha/oprofile/op_model_ev5.c | 1 + trunk/arch/alpha/oprofile/op_model_ev6.c | 1 + trunk/arch/alpha/oprofile/op_model_ev67.c | 1 + trunk/arch/arm/Kconfig | 50 +- trunk/arch/arm/Kconfig.debug | 16 - trunk/arch/arm/Makefile | 1 - trunk/arch/arm/boot/compressed/.gitignore | 2 - trunk/arch/arm/boot/compressed/Makefile | 15 +- trunk/arch/arm/boot/compressed/decompress.c | 6 - trunk/arch/arm/boot/compressed/piggy.xzkern.S | 6 - trunk/arch/arm/common/Kconfig | 3 + trunk/arch/arm/common/Makefile | 1 + trunk/arch/arm/common/gic.c | 13 +- trunk/arch/arm/common/pl330.c | 1960 ++++++++++++++ trunk/arch/arm/common/via82c505.c | 1 + trunk/arch/arm/configs/integrator_defconfig | 8 - trunk/arch/arm/include/asm/assembler.h | 2 - trunk/arch/arm/include/asm/atomic.h | 4 +- trunk/arch/arm/include/asm/barrier.h | 69 - trunk/arch/arm/include/asm/bitops.h | 2 +- trunk/arch/arm/include/asm/bug.h | 30 - trunk/arch/arm/include/asm/cmpxchg.h | 295 --- trunk/arch/arm/include/asm/compiler.h | 15 - trunk/arch/arm/include/asm/cp15.h | 87 - trunk/arch/arm/include/asm/div64.h | 2 +- trunk/arch/arm/include/asm/dma.h | 1 + trunk/arch/arm/include/asm/domain.h | 4 - trunk/arch/arm/include/asm/elf.h | 4 + trunk/arch/arm/include/asm/exec.h | 6 - .../arm/include/asm/hardware/cache-l2x0.h | 6 +- trunk/arch/arm/include/asm/hardware/iop3xx.h | 3 - .../arch/arm/include/asm/hardware/iop_adma.h | 2 + trunk/arch/arm/include/asm/hardware/it8152.h | 3 - trunk/arch/arm/include/asm/hardware/pl330.h | 217 ++ trunk/arch/arm/include/asm/io.h | 73 +- trunk/arch/arm/include/asm/irq.h | 8 +- trunk/arch/arm/include/asm/jump_label.h | 41 - trunk/arch/arm/include/asm/mc146818rtc.h | 4 +- trunk/arch/arm/include/asm/memory.h | 2 - trunk/arch/arm/include/asm/mmu.h | 7 - trunk/arch/arm/include/asm/mmu_context.h | 29 +- trunk/arch/arm/include/asm/opcodes.h | 59 - trunk/arch/arm/include/asm/page.h | 2 - trunk/arch/arm/include/asm/perf_event.h | 1 - trunk/arch/arm/include/asm/posix_types.h | 55 +- trunk/arch/arm/include/asm/processor.h | 4 +- trunk/arch/arm/include/asm/prom.h | 2 + trunk/arch/arm/include/asm/switch_to.h | 18 - trunk/arch/arm/include/asm/system.h | 552 +++- trunk/arch/arm/include/asm/system_info.h | 27 - trunk/arch/arm/include/asm/system_misc.h | 29 - trunk/arch/arm/include/asm/tlbflush.h | 136 +- trunk/arch/arm/include/asm/traps.h | 2 +- trunk/arch/arm/include/asm/uaccess.h | 2 +- trunk/arch/arm/kernel/Makefile | 14 +- trunk/arch/arm/kernel/armksyms.c | 1 + trunk/arch/arm/kernel/debug.S | 26 +- trunk/arch/arm/kernel/elf.c | 1 - trunk/arch/arm/kernel/entry-armv.S | 3 +- trunk/arch/arm/kernel/fiq.c | 2 +- trunk/arch/arm/kernel/ftrace.c | 100 +- trunk/arch/arm/kernel/head-nommu.S | 2 +- trunk/arch/arm/kernel/head.S | 10 +- trunk/arch/arm/kernel/hw_breakpoint.c | 1 + trunk/arch/arm/kernel/insn.c | 61 - trunk/arch/arm/kernel/insn.h | 29 - trunk/arch/arm/kernel/irq.c | 6 +- trunk/arch/arm/kernel/jump_label.c | 39 - trunk/arch/arm/kernel/kprobes-common.c | 1 - trunk/arch/arm/kernel/kprobes.c | 86 +- trunk/arch/arm/kernel/machine_kexec.c | 27 +- trunk/arch/arm/kernel/patch.c | 75 - trunk/arch/arm/kernel/patch.h | 7 - trunk/arch/arm/kernel/perf_event.c | 3 - trunk/arch/arm/kernel/perf_event_v7.c | 145 - trunk/arch/arm/kernel/process.c | 37 +- trunk/arch/arm/kernel/ptrace.c | 1 + trunk/arch/arm/kernel/sched_clock.c | 18 - trunk/arch/arm/kernel/setup.c | 5 +- trunk/arch/arm/kernel/signal.c | 24 +- trunk/arch/arm/kernel/sleep.S | 1 + trunk/arch/arm/kernel/smp.c | 17 +- trunk/arch/arm/kernel/smp_tlb.c | 20 +- trunk/arch/arm/kernel/tcm.c | 1 - trunk/arch/arm/kernel/thumbee.c | 1 - trunk/arch/arm/kernel/time.c | 4 + trunk/arch/arm/kernel/traps.c | 21 +- trunk/arch/arm/mach-at91/at91rm9200.c | 1 - trunk/arch/arm/mach-at91/at91sam9260.c | 1 - trunk/arch/arm/mach-at91/at91sam9261.c | 1 - trunk/arch/arm/mach-at91/at91sam9263.c | 1 - trunk/arch/arm/mach-at91/at91sam9g45.c | 1 - .../arch/arm/mach-at91/at91sam9g45_devices.c | 1 + trunk/arch/arm/mach-at91/at91sam9rl.c | 1 - .../arm/mach-at91/include/mach/at_hdmac.h | 15 + trunk/arch/arm/mach-at91/include/mach/io.h | 31 + .../arm/mach-at91/include/mach/system_rev.h | 2 - .../arm/mach-at91/include/mach/uncompress.h | 1 - .../arm/mach-bcmring/include/mach/io.h} | 29 +- trunk/arch/arm/mach-clps711x/common.c | 1 - .../arch/arm/mach-clps711x/include/mach/io.h | 36 + .../mach-clps711x/include/mach/uncompress.h | 1 + trunk/arch/arm/mach-clps711x/p720t-leds.c | 1 + trunk/arch/arm/mach-cns3xxx/core.c | 8 +- trunk/arch/arm/mach-cns3xxx/devices.c | 2 +- trunk/arch/arm/mach-cns3xxx/include/mach/io.h | 17 + trunk/arch/arm/mach-davinci/board-da850-evm.c | 1 - .../mach-davinci/include/mach/entry-macro.S | 1 + .../arm/mach-davinci/include/mach/hardware.h | 6 + trunk/arch/arm/mach-davinci/include/mach/io.h | 24 + .../mach-davinci/include/mach/uncompress.h | 2 - trunk/arch/arm/mach-davinci/time.c | 28 +- trunk/arch/arm/mach-dove/addr-map.c | 1 - trunk/arch/arm/mach-dove/include/mach/io.h | 1 + trunk/arch/arm/mach-ebsa110/core.c | 17 +- trunk/arch/arm/mach-ebsa110/include/mach/io.h | 9 + trunk/arch/arm/mach-ebsa110/leds.c | 1 + trunk/arch/arm/mach-ep93xx/include/mach/io.h | 22 + trunk/arch/arm/mach-exynos/hotplug.c | 1 - trunk/arch/arm/mach-exynos/include/mach/io.h | 26 + trunk/arch/arm/mach-exynos/mach-nuri.c | 5 +- .../arm/mach-exynos/mach-universal_c210.c | 9 +- trunk/arch/arm/mach-footbridge/common.c | 1 - .../arch/arm/mach-footbridge/dc21285-timer.c | 1 - trunk/arch/arm/mach-footbridge/dc21285.c | 1 + trunk/arch/arm/mach-footbridge/ebsa285-leds.c | 1 + .../arm/mach-footbridge/include/mach/io.h | 13 + trunk/arch/arm/mach-footbridge/netwinder-hw.c | 1 - .../arch/arm/mach-footbridge/netwinder-leds.c | 1 + trunk/arch/arm/mach-gemini/include/mach/io.h | 18 + trunk/arch/arm/mach-h720x/include/mach/io.h | 22 + trunk/arch/arm/mach-highbank/highbank.c | 1 + .../arch/arm/mach-highbank/include/mach/io.h | 7 + .../arm/mach-highbank/include/mach/irqs.h | 6 + trunk/arch/arm/mach-imx/Kconfig | 6 + trunk/arch/arm/mach-imx/Makefile | 2 + trunk/arch/arm/mach-imx/dma-v1.c | 846 ++++++ trunk/arch/arm/mach-imx/include/mach/dma-v1.h | 103 + trunk/arch/arm/mach-imx/mach-imx6q.c | 1 - trunk/arch/arm/mach-imx/mach-mx51_efikamx.c | 1 - trunk/arch/arm/mach-imx/mach-mx51_efikasb.c | 1 - trunk/arch/arm/mach-imx/mm-imx3.c | 10 +- trunk/arch/arm/mach-integrator/core.c | 4 +- .../arm/mach-integrator/include/mach/io.h | 1 + .../arm/mach-integrator/include/mach/irqs.h | 3 +- .../arch/arm/mach-integrator/integrator_ap.c | 10 +- .../arch/arm/mach-integrator/integrator_cp.c | 3 +- trunk/arch/arm/mach-integrator/leds.c | 1 + trunk/arch/arm/mach-integrator/pci.c | 4 +- trunk/arch/arm/mach-integrator/pci_v3.c | 4 +- trunk/arch/arm/mach-iop13xx/include/mach/io.h | 13 + .../arm/mach-iop13xx/include/mach/iop13xx.h | 1 - trunk/arch/arm/mach-iop13xx/io.c | 20 +- trunk/arch/arm/mach-iop13xx/iq81340mc.c | 1 - trunk/arch/arm/mach-iop13xx/iq81340sc.c | 1 - trunk/arch/arm/mach-iop13xx/pci.h | 6 - trunk/arch/arm/mach-iop32x/include/mach/io.h | 1 + trunk/arch/arm/mach-iop33x/include/mach/io.h | 1 + trunk/arch/arm/mach-iop33x/uart.c | 1 + trunk/arch/arm/mach-ixp2000/core.c | 1 + trunk/arch/arm/mach-ixp2000/enp2611.c | 1 + trunk/arch/arm/mach-ixp2000/include/mach/io.h | 1 + trunk/arch/arm/mach-ixp2000/ixdp2400.c | 1 + trunk/arch/arm/mach-ixp2000/ixdp2800.c | 1 + trunk/arch/arm/mach-ixp2000/ixdp2x00.c | 1 + trunk/arch/arm/mach-ixp2000/ixdp2x01.c | 1 + trunk/arch/arm/mach-ixp2000/pci.c | 1 + trunk/arch/arm/mach-ixp23xx/core.c | 1 + trunk/arch/arm/mach-ixp23xx/espresso.c | 1 + trunk/arch/arm/mach-ixp23xx/include/mach/io.h | 1 + trunk/arch/arm/mach-ixp23xx/ixdp2351.c | 1 + trunk/arch/arm/mach-ixp23xx/pci.c | 1 + trunk/arch/arm/mach-ixp23xx/roadrunner.c | 1 + trunk/arch/arm/mach-ixp4xx/avila-setup.c | 2 - trunk/arch/arm/mach-ixp4xx/common-pci.c | 1 + trunk/arch/arm/mach-ixp4xx/common.c | 33 - trunk/arch/arm/mach-ixp4xx/coyote-setup.c | 2 - trunk/arch/arm/mach-ixp4xx/dsmg600-setup.c | 1 - trunk/arch/arm/mach-ixp4xx/fsg-setup.c | 1 - .../arch/arm/mach-ixp4xx/gateway7001-setup.c | 1 - trunk/arch/arm/mach-ixp4xx/goramo_mlr.c | 2 +- trunk/arch/arm/mach-ixp4xx/gtwx5715-setup.c | 1 - .../arm/mach-ixp4xx/include/mach/hardware.h | 2 + trunk/arch/arm/mach-ixp4xx/include/mach/io.h | 24 +- .../arm/mach-ixp4xx/include/mach/platform.h | 1 - trunk/arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 - trunk/arch/arm/mach-ixp4xx/nas100d-setup.c | 1 - trunk/arch/arm/mach-ixp4xx/nslu2-setup.c | 1 - trunk/arch/arm/mach-ixp4xx/omixp-setup.c | 3 - trunk/arch/arm/mach-ixp4xx/vulcan-setup.c | 1 - trunk/arch/arm/mach-ixp4xx/wg302v2-setup.c | 1 - .../arch/arm/mach-kirkwood/include/mach/io.h | 2 + trunk/arch/arm/mach-ks8695/include/mach/io.h | 19 + trunk/arch/arm/mach-ks8695/time.c | 1 - trunk/arch/arm/mach-lpc32xx/include/mach/io.h | 27 + trunk/arch/arm/mach-mmp/aspenite.c | 5 +- trunk/arch/arm/mach-mmp/avengers_lite.c | 1 - trunk/arch/arm/mach-mmp/brownstone.c | 4 +- trunk/arch/arm/mach-mmp/common.c | 1 - trunk/arch/arm/mach-mmp/flint.c | 3 +- trunk/arch/arm/mach-mmp/gplugd.c | 2 +- .../arch/arm/mach-mmp/include/mach/addr-map.h | 6 + trunk/arch/arm/mach-mmp/include/mach/io.h | 21 + trunk/arch/arm/mach-mmp/include/mach/irqs.h | 3 +- trunk/arch/arm/mach-mmp/irq-mmp2.c | 1 - trunk/arch/arm/mach-mmp/jasper.c | 5 +- trunk/arch/arm/mach-mmp/pxa168.c | 1 - trunk/arch/arm/mach-mmp/tavorevb.c | 1 - trunk/arch/arm/mach-mmp/teton_bga.c | 3 +- trunk/arch/arm/mach-mmp/ttc_dkb.c | 4 +- trunk/arch/arm/mach-msm/board-halibut.c | 6 - trunk/arch/arm/mach-msm/board-sapphire.c | 1 + trunk/arch/arm/mach-msm/board-trout.c | 6 - trunk/arch/arm/mach-msm/include/mach/io.h | 36 + .../mach-msm/include/mach/msm_iomap-7x00.h | 12 +- .../mach-msm/include/mach/msm_iomap-7x30.h | 4 - .../mach-msm/include/mach/msm_iomap-8960.h | 4 - .../mach-msm/include/mach/msm_iomap-8x50.h | 4 - .../mach-msm/include/mach/msm_iomap-8x60.h | 4 - .../arm/mach-msm/include/mach/msm_iomap.h | 6 + trunk/arch/arm/mach-msm/io.c | 8 +- trunk/arch/arm/mach-msm/timer.c | 12 +- trunk/arch/arm/mach-mv78xx0/include/mach/io.h | 2 + .../arch/arm/mach-mxs/include/mach/hardware.h | 6 + trunk/arch/arm/mach-mxs/include/mach/io.h | 22 + trunk/arch/arm/mach-mxs/system.c | 2 +- trunk/arch/arm/mach-netx/generic.c | 2 +- .../arm/mach-netx/include/mach/hardware.h | 2 +- .../mach-netx/include/mach/io.h} | 24 +- .../arm/mach-netx/include/mach/netx-regs.h | 16 +- trunk/arch/arm/mach-nomadik/include/mach/io.h | 22 + .../arm/mach-omap1/ams-delta-fiq-handler.S | 1 - trunk/arch/arm/mach-omap1/id.c | 1 - .../arm/mach-omap1/include/mach/entry-macro.S | 1 + trunk/arch/arm/mach-omap1/include/mach/io.h | 46 + trunk/arch/arm/mach-omap1/iomap.h | 6 + trunk/arch/arm/mach-omap1/leds-h2p2-debug.c | 1 + trunk/arch/arm/mach-omap1/leds-innovator.c | 1 + trunk/arch/arm/mach-omap1/leds-osk.c | 1 + trunk/arch/arm/mach-omap1/mux.c | 1 + trunk/arch/arm/mach-omap1/sleep.S | 2 + trunk/arch/arm/mach-omap1/sram.S | 1 + trunk/arch/arm/mach-omap1/time.c | 1 + trunk/arch/arm/mach-omap1/timer32k.c | 1 + trunk/arch/arm/mach-omap2/board-4430sdp.c | 13 +- .../arm/mach-omap2/board-omap3touchbook.c | 1 - trunk/arch/arm/mach-omap2/board-omap4panda.c | 15 +- .../arm/mach-omap2/board-rx51-peripherals.c | 1 - trunk/arch/arm/mach-omap2/clock3xxx_data.c | 1 - trunk/arch/arm/mach-omap2/clock44xx_data.c | 1 - trunk/arch/arm/mach-omap2/hsmmc.c | 1 - trunk/arch/arm/mach-omap2/hsmmc.h | 2 - trunk/arch/arm/mach-omap2/include/mach/io.h | 49 + trunk/arch/arm/mach-omap2/iomap.h | 6 + trunk/arch/arm/mach-omap2/mux.c | 1 + .../arch/arm/mach-omap2/omap-mpuss-lowpower.c | 1 + trunk/arch/arm/mach-omap2/pm24xx.c | 1 - trunk/arch/arm/mach-omap2/pm34xx.c | 1 - trunk/arch/arm/mach-omap2/pm44xx.c | 1 - trunk/arch/arm/mach-omap2/sleep44xx.S | 1 + trunk/arch/arm/mach-orion5x/common.c | 1 - trunk/arch/arm/mach-orion5x/common.h | 9 - trunk/arch/arm/mach-orion5x/dns323-setup.c | 1 - trunk/arch/arm/mach-orion5x/include/mach/io.h | 33 + trunk/arch/arm/mach-orion5x/ls-chl-setup.c | 1 + trunk/arch/arm/mach-orion5x/ls_hgl-setup.c | 1 + trunk/arch/arm/mach-orion5x/lsmini-setup.c | 1 + trunk/arch/arm/mach-orion5x/pci.c | 1 - trunk/arch/arm/mach-orion5x/tsx09-common.c | 1 - .../arch/arm/mach-picoxcell/include/mach/io.h | 22 + .../arm/mach-picoxcell/include/mach/irqs.h | 20 + trunk/arch/arm/mach-pnx4008/core.c | 2 +- trunk/arch/arm/mach-pnx4008/dma.c | 1 + trunk/arch/arm/mach-pnx4008/include/mach/io.h | 21 + trunk/arch/arm/mach-pnx4008/irq.c | 1 + trunk/arch/arm/mach-pnx4008/time.c | 1 + trunk/arch/arm/mach-prima2/include/mach/io.h | 16 + trunk/arch/arm/mach-prima2/timer.c | 21 +- trunk/arch/arm/mach-pxa/Kconfig | 1 - trunk/arch/arm/mach-pxa/capc7117.c | 1 - trunk/arch/arm/mach-pxa/clock-pxa2xx.c | 1 - trunk/arch/arm/mach-pxa/cm-x300.c | 2 - trunk/arch/arm/mach-pxa/colibri-pxa270.c | 2 - trunk/arch/arm/mach-pxa/colibri-pxa300.c | 1 - trunk/arch/arm/mach-pxa/colibri-pxa320.c | 1 - trunk/arch/arm/mach-pxa/colibri-pxa3xx.c | 1 - trunk/arch/arm/mach-pxa/corgi.c | 4 +- trunk/arch/arm/mach-pxa/corgi_pm.c | 1 - trunk/arch/arm/mach-pxa/cpufreq-pxa3xx.c | 1 - trunk/arch/arm/mach-pxa/csb726.c | 1 - trunk/arch/arm/mach-pxa/devices.c | 1 - trunk/arch/arm/mach-pxa/em-x270.c | 2 - trunk/arch/arm/mach-pxa/generic.c | 1 + trunk/arch/arm/mach-pxa/gumstix.c | 1 - trunk/arch/arm/mach-pxa/h5000.c | 1 - trunk/arch/arm/mach-pxa/himalaya.c | 1 - trunk/arch/arm/mach-pxa/icontrol.c | 1 - trunk/arch/arm/mach-pxa/idp.c | 1 - .../arch/arm/mach-pxa/include/mach/hardware.h | 6 + trunk/arch/arm/mach-pxa/include/mach/io.h | 20 + trunk/arch/arm/mach-pxa/include/mach/irqs.h | 2 +- .../arm/mach-pxa/include/mach/mainstone.h | 2 - trunk/arch/arm/mach-pxa/leds-idp.c | 1 + trunk/arch/arm/mach-pxa/leds-lubbock.c | 1 + trunk/arch/arm/mach-pxa/leds-mainstone.c | 1 + trunk/arch/arm/mach-pxa/magician.c | 1 - trunk/arch/arm/mach-pxa/mfp-pxa2xx.c | 1 - trunk/arch/arm/mach-pxa/mioa701.c | 1 - trunk/arch/arm/mach-pxa/mp900.c | 1 - trunk/arch/arm/mach-pxa/palmld.c | 1 - trunk/arch/arm/mach-pxa/palmt5.c | 1 - trunk/arch/arm/mach-pxa/palmtc.c | 1 - trunk/arch/arm/mach-pxa/palmte2.c | 1 - trunk/arch/arm/mach-pxa/palmtreo.c | 2 - trunk/arch/arm/mach-pxa/palmtx.c | 1 - trunk/arch/arm/mach-pxa/palmz72.c | 1 - trunk/arch/arm/mach-pxa/poodle.c | 1 + trunk/arch/arm/mach-pxa/pxa2xx.c | 1 - trunk/arch/arm/mach-pxa/pxa300.c | 1 - trunk/arch/arm/mach-pxa/pxa320.c | 1 - trunk/arch/arm/mach-pxa/pxa3xx.c | 1 - trunk/arch/arm/mach-pxa/raumfeld.c | 3 - trunk/arch/arm/mach-pxa/reset.c | 1 - trunk/arch/arm/mach-pxa/saar.c | 1 - trunk/arch/arm/mach-pxa/sharpsl_pm.c | 1 - trunk/arch/arm/mach-pxa/spitz.c | 3 - trunk/arch/arm/mach-pxa/stargate2.c | 1 - trunk/arch/arm/mach-pxa/tavorevb.c | 1 - trunk/arch/arm/mach-pxa/time.c | 1 - trunk/arch/arm/mach-pxa/trizeps4.c | 2 - trunk/arch/arm/mach-pxa/viper.c | 2 - trunk/arch/arm/mach-pxa/vpac270.c | 1 - trunk/arch/arm/mach-pxa/xcep.c | 1 - trunk/arch/arm/mach-pxa/z2.c | 1 - trunk/arch/arm/mach-pxa/zeus.c | 1 - trunk/arch/arm/mach-realview/core.c | 1 + trunk/arch/arm/mach-realview/hotplug.c | 1 - .../arm/mach-realview/include/mach/hardware.h | 2 +- .../arch/arm/mach-realview/include/mach/io.h | 28 + .../arch/arm/mach-rpc/include/mach/hardware.h | 6 + trunk/arch/arm/mach-rpc/include/mach/io.h | 5 + trunk/arch/arm/mach-rpc/riscpc.c | 1 - trunk/arch/arm/mach-s3c24xx/include/mach/io.h | 5 + trunk/arch/arm/mach-s3c24xx/s3c2410.c | 1 - trunk/arch/arm/mach-s3c24xx/s3c2412.c | 1 - trunk/arch/arm/mach-s3c24xx/s3c2416.c | 1 - trunk/arch/arm/mach-s3c24xx/s3c2443.c | 1 - trunk/arch/arm/mach-s3c24xx/s3c244x.c | 1 - trunk/arch/arm/mach-s3c64xx/common.c | 1 - trunk/arch/arm/mach-s3c64xx/include/mach/io.h | 18 + .../arm/mach-s3c64xx/mach-crag6410-module.c | 14 +- trunk/arch/arm/mach-s5p64x0/common.c | 1 - trunk/arch/arm/mach-s5p64x0/include/mach/io.h | 25 + trunk/arch/arm/mach-s5pc100/common.c | 1 - trunk/arch/arm/mach-s5pc100/include/mach/io.h | 18 + trunk/arch/arm/mach-s5pv210/include/mach/io.h | 26 + trunk/arch/arm/mach-sa1100/generic.c | 2 +- trunk/arch/arm/mach-sa1100/include/mach/io.h | 20 + trunk/arch/arm/mach-sa1100/leds-assabet.c | 1 + trunk/arch/arm/mach-sa1100/leds-badge4.c | 1 + trunk/arch/arm/mach-sa1100/leds-cerf.c | 1 + trunk/arch/arm/mach-sa1100/leds-hackkit.c | 1 + trunk/arch/arm/mach-sa1100/leds-lart.c | 1 + trunk/arch/arm/mach-sa1100/pm.c | 1 + trunk/arch/arm/mach-shark/include/mach/io.h | 2 + trunk/arch/arm/mach-shark/leds.c | 1 + trunk/arch/arm/mach-shmobile/Kconfig | 4 - trunk/arch/arm/mach-shmobile/board-ag5evm.c | 3 +- trunk/arch/arm/mach-shmobile/board-bonito.c | 3 +- trunk/arch/arm/mach-shmobile/board-g3evm.c | 1 - trunk/arch/arm/mach-shmobile/board-g4evm.c | 1 - trunk/arch/arm/mach-shmobile/board-kota2.c | 3 +- trunk/arch/arm/mach-shmobile/board-mackerel.c | 1 - trunk/arch/arm/mach-shmobile/board-marzen.c | 1 - trunk/arch/arm/mach-shmobile/cpuidle.c | 1 + .../arch/arm/mach-shmobile/include/mach/io.h | 9 + .../arm/mach-shmobile/include/mach/irqs.h | 6 +- .../arm/mach-shmobile/include/mach/system.h | 2 - trunk/arch/arm/mach-shmobile/intc-r8a7740.c | 1 - trunk/arch/arm/mach-shmobile/intc-r8a7779.c | 4 +- trunk/arch/arm/mach-shmobile/intc-sh7367.c | 1 - trunk/arch/arm/mach-shmobile/intc-sh7372.c | 1 - trunk/arch/arm/mach-shmobile/intc-sh7377.c | 1 - trunk/arch/arm/mach-shmobile/intc-sh73a0.c | 5 +- trunk/arch/arm/mach-shmobile/pm-r8a7779.c | 1 + trunk/arch/arm/mach-shmobile/pm-sh7372.c | 1 + trunk/arch/arm/mach-shmobile/setup-r8a7740.c | 1 - trunk/arch/arm/mach-shmobile/setup-r8a7779.c | 1 - trunk/arch/arm/mach-shmobile/setup-sh7367.c | 1 - trunk/arch/arm/mach-shmobile/setup-sh7372.c | 1 - trunk/arch/arm/mach-shmobile/setup-sh7377.c | 1 - trunk/arch/arm/mach-shmobile/setup-sh73a0.c | 1 - trunk/arch/arm/mach-shmobile/smp-r8a7779.c | 4 +- trunk/arch/arm/mach-shmobile/smp-sh73a0.c | 20 +- trunk/arch/arm/mach-shmobile/suspend.c | 2 +- trunk/arch/arm/mach-spear3xx/clock.c | 1 - .../arch/arm/mach-spear3xx/include/mach/io.h | 19 + trunk/arch/arm/mach-spear6xx/clock.c | 1 - .../arch/arm/mach-spear6xx/include/mach/io.h | 20 + trunk/arch/arm/mach-tegra/cpu-tegra.c | 1 + trunk/arch/arm/mach-tegra/hotplug.c | 1 - .../arm/mach-tegra/include/mach/debug-macro.S | 1 + trunk/arch/arm/mach-tegra/include/mach/io.h | 49 + .../arch/arm/mach-tegra/include/mach/iomap.h | 42 - trunk/arch/arm/mach-tegra/io.c | 1 - trunk/arch/arm/mach-tegra/sleep.S | 4 +- trunk/arch/arm/mach-u300/include/mach/io.h | 20 + .../arm/mach-u300/include/mach/u300-regs.h | 6 + .../arm/mach-ux500/include/mach/hardware.h | 2 +- trunk/arch/arm/mach-ux500/include/mach/io.h | 22 + .../include/mach/irqs-board-mop500.h | 2 +- trunk/arch/arm/mach-versatile/core.c | 1 + .../arch/arm/mach-versatile/include/mach/io.h | 28 + trunk/arch/arm/mach-versatile/pci.c | 1 + trunk/arch/arm/mach-vexpress/hotplug.c | 2 +- .../arch/arm/mach-vexpress/include/mach/io.h | 26 + trunk/arch/arm/mach-vt8500/include/mach/io.h | 26 + trunk/arch/arm/mach-w90x900/cpu.c | 1 - trunk/arch/arm/mach-w90x900/include/mach/io.h | 30 + trunk/arch/arm/mach-zynq/include/mach/io.h | 33 + trunk/arch/arm/mm/alignment.c | 3 +- trunk/arch/arm/mm/cache-feroceon-l2.c | 1 - trunk/arch/arm/mm/cache-l2x0.c | 22 +- trunk/arch/arm/mm/cache-tauros2.c | 1 - trunk/arch/arm/mm/cache-xsc3l2.c | 2 +- trunk/arch/arm/mm/copypage-v4mc.c | 9 +- trunk/arch/arm/mm/copypage-v6.c | 20 +- trunk/arch/arm/mm/copypage-xscale.c | 9 +- trunk/arch/arm/mm/dma-mapping.c | 20 +- trunk/arch/arm/mm/fault.c | 6 +- trunk/arch/arm/mm/flush.c | 15 +- trunk/arch/arm/mm/highmem.c | 21 +- trunk/arch/arm/mm/idmap.c | 1 - trunk/arch/arm/mm/init.c | 4 - trunk/arch/arm/mm/ioremap.c | 19 +- trunk/arch/arm/mm/mm.h | 26 +- trunk/arch/arm/mm/mmu.c | 9 +- trunk/arch/arm/mm/nommu.c | 8 +- trunk/arch/arm/mm/pgd.c | 1 - trunk/arch/arm/mm/proc-fa526.S | 1 + trunk/arch/arm/mm/vmregion.c | 76 +- trunk/arch/arm/mm/vmregion.h | 5 +- trunk/arch/arm/net/Makefile | 3 - trunk/arch/arm/net/bpf_jit_32.c | 915 ------- trunk/arch/arm/net/bpf_jit_32.h | 190 -- trunk/arch/arm/nwfpe/fpa11.c | 1 + trunk/arch/arm/plat-iop/i2c.c | 1 + trunk/arch/arm/plat-iop/pci.c | 1 + trunk/arch/arm/plat-iop/restart.c | 1 - .../arch/arm/plat-mxc/include/mach/hardware.h | 7 +- trunk/arch/arm/plat-mxc/include/mach/io.h | 39 + trunk/arch/arm/plat-mxc/system.c | 2 +- trunk/arch/arm/plat-nomadik/Kconfig | 1 + .../arm/plat-nomadik/include/plat/ste_dma40.h | 3 +- trunk/arch/arm/plat-omap/debug-leds.c | 1 + trunk/arch/arm/plat-omap/dma.c | 1 + trunk/arch/arm/plat-omap/include/plat/gpio.h | 22 +- .../arm/plat-omap/include/plat/hardware.h | 6 + trunk/arch/arm/plat-omap/include/plat/mmc.h | 2 + trunk/arch/arm/plat-omap/include/plat/sdrc.h | 1 + trunk/arch/arm/plat-omap/include/plat/usb.h | 1 + trunk/arch/arm/plat-pxa/dma.c | 1 + trunk/arch/arm/plat-s3c24xx/cpu.c | 1 - trunk/arch/arm/plat-s3c24xx/dma.c | 1 + trunk/arch/arm/plat-samsung/cpu.c | 1 + trunk/arch/arm/plat-samsung/dma-ops.c | 4 +- trunk/arch/arm/plat-samsung/time.c | 1 + .../arm/plat-spear/include/plat/hardware.h | 6 + trunk/arch/arm/plat-spear/include/plat/io.h | 22 + trunk/arch/arm/plat-spear/restart.c | 1 - trunk/arch/arm/plat-versatile/Kconfig | 3 +- trunk/arch/arm/vfp/vfpmodule.c | 2 - trunk/arch/avr32/include/asm/atomic.h | 2 +- trunk/arch/avr32/include/asm/barrier.h | 27 - trunk/arch/avr32/include/asm/bitops.h | 1 + trunk/arch/avr32/include/asm/bug.h | 5 - trunk/arch/avr32/include/asm/exec.h | 13 - trunk/arch/avr32/include/asm/posix_types.h | 107 +- trunk/arch/avr32/include/asm/special_insns.h | 13 - trunk/arch/avr32/include/asm/switch_to.h | 46 - .../avr32/include/asm/{cmpxchg.h => system.h} | 79 +- trunk/arch/avr32/mach-at32ap/at32ap700x.c | 13 + trunk/arch/avr32/mach-at32ap/cpufreq.c | 1 + .../mach-at32ap/include/mach/atmel-mci.h | 7 + trunk/arch/avr32/oprofile/op_model_avr32.c | 1 + trunk/arch/blackfin/include/asm/system.h | 5 + trunk/arch/c6x/Kconfig | 2 +- trunk/arch/c6x/include/asm/Kbuild | 1 + trunk/arch/c6x/include/asm/barrier.h | 27 - trunk/arch/c6x/include/asm/bitops.h | 1 + trunk/arch/c6x/include/asm/bug.h | 23 - trunk/arch/c6x/include/asm/cmpxchg.h | 68 - trunk/arch/c6x/include/asm/exec.h | 6 - trunk/arch/c6x/include/asm/processor.h | 9 - trunk/arch/c6x/include/asm/setup.h | 1 - trunk/arch/c6x/include/asm/special_insns.h | 63 - trunk/arch/c6x/include/asm/switch_to.h | 33 - trunk/arch/c6x/include/asm/system.h | 168 ++ trunk/arch/c6x/kernel/irq.c | 1 - trunk/arch/c6x/kernel/setup.c | 1 - trunk/arch/c6x/kernel/soc.c | 1 + trunk/arch/c6x/kernel/time.c | 1 - trunk/arch/c6x/kernel/traps.c | 1 - trunk/arch/c6x/platforms/timer64.c | 1 - trunk/arch/cris/arch-v10/drivers/ds1302.c | 1 + trunk/arch/cris/arch-v10/drivers/gpio.c | 1 + trunk/arch/cris/arch-v10/drivers/i2c.c | 1 + trunk/arch/cris/arch-v10/drivers/pcf8563.c | 1 + .../arch/cris/arch-v10/drivers/sync_serial.c | 1 + trunk/arch/cris/arch-v10/kernel/debugport.c | 1 + trunk/arch/cris/arch-v10/kernel/dma.c | 1 - .../cris/arch-v10/kernel/io_interface_mux.c | 1 - trunk/arch/cris/arch-v10/kernel/process.c | 1 - trunk/arch/cris/arch-v10/kernel/ptrace.c | 1 + trunk/arch/cris/arch-v10/kernel/setup.c | 1 - trunk/arch/cris/arch-v10/kernel/signal.c | 1 - trunk/arch/cris/arch-v10/kernel/traps.c | 1 - trunk/arch/cris/arch-v32/drivers/i2c.c | 1 + .../arch/cris/arch-v32/drivers/mach-a3/gpio.c | 1 + .../arch/cris/arch-v32/drivers/mach-fs/gpio.c | 1 + trunk/arch/cris/arch-v32/kernel/debugport.c | 1 + trunk/arch/cris/arch-v32/kernel/fasttimer.c | 1 + trunk/arch/cris/arch-v32/kernel/ptrace.c | 1 + trunk/arch/cris/arch-v32/mach-a3/dma.c | 1 + trunk/arch/cris/arch-v32/mach-fs/dma.c | 1 + trunk/arch/cris/include/arch-v10/arch/elf.h | 2 - trunk/arch/cris/include/arch-v32/arch/elf.h | 2 - .../arch/cris/include/arch-v32/arch/system.h | 10 + trunk/arch/cris/include/asm/atomic.h | 2 +- trunk/arch/cris/include/asm/barrier.h | 25 - trunk/arch/cris/include/asm/bitops.h | 1 + trunk/arch/cris/include/asm/exec.h | 6 - trunk/arch/cris/include/asm/posix_types.h | 50 +- trunk/arch/cris/include/asm/processor.h | 11 +- trunk/arch/cris/include/asm/switch_to.h | 12 - .../cris/include/asm/{cmpxchg.h => system.h} | 52 +- trunk/arch/cris/kernel/irq.c | 1 - trunk/arch/cris/kernel/process.c | 1 + trunk/arch/cris/kernel/ptrace.c | 1 + trunk/arch/cris/kernel/setup.c | 1 - trunk/arch/cris/kernel/traps.c | 1 - trunk/arch/cris/mm/fault.c | 1 - trunk/arch/frv/include/asm/atomic.h | 57 +- trunk/arch/frv/include/asm/barrier.h | 29 - trunk/arch/frv/include/asm/bug.h | 2 - trunk/arch/frv/include/asm/exec.h | 17 - trunk/arch/frv/include/asm/posix_types.h | 53 +- trunk/arch/frv/include/asm/switch_to.h | 35 - .../frv/include/asm/{cmpxchg.h => system.h} | 98 +- trunk/arch/frv/kernel/debug-stub.c | 1 + trunk/arch/frv/kernel/gdb-io.c | 1 + trunk/arch/frv/kernel/gdb-stub.c | 1 + trunk/arch/frv/kernel/irq-mb93091.c | 1 + trunk/arch/frv/kernel/irq-mb93093.c | 1 + trunk/arch/frv/kernel/irq-mb93493.c | 1 + trunk/arch/frv/kernel/irq.c | 1 + trunk/arch/frv/kernel/process.c | 1 + trunk/arch/frv/kernel/ptrace.c | 1 + trunk/arch/frv/kernel/traps.c | 1 + trunk/arch/frv/mm/fault.c | 1 + trunk/arch/frv/mm/init.c | 1 + trunk/arch/frv/mm/kmap.c | 1 + trunk/arch/h8300/include/asm/atomic.h | 4 +- trunk/arch/h8300/include/asm/barrier.h | 27 - trunk/arch/h8300/include/asm/bitops.h | 1 + trunk/arch/h8300/include/asm/bug.h | 4 - trunk/arch/h8300/include/asm/cmpxchg.h | 60 - trunk/arch/h8300/include/asm/exec.h | 6 - trunk/arch/h8300/include/asm/posix_types.h | 49 +- trunk/arch/h8300/include/asm/processor.h | 5 - trunk/arch/h8300/include/asm/switch_to.h | 50 - trunk/arch/h8300/include/asm/system.h | 140 + trunk/arch/h8300/kernel/irq.c | 1 + trunk/arch/h8300/kernel/process.c | 1 + trunk/arch/h8300/kernel/ptrace.c | 1 + trunk/arch/h8300/kernel/traps.c | 1 + trunk/arch/h8300/mm/fault.c | 1 + trunk/arch/h8300/mm/init.c | 1 + trunk/arch/h8300/mm/kmap.c | 1 + trunk/arch/h8300/mm/memory.c | 1 + trunk/arch/hexagon/include/asm/atomic.h | 1 - trunk/arch/hexagon/include/asm/barrier.h | 41 - trunk/arch/hexagon/include/asm/bitops.h | 1 + trunk/arch/hexagon/include/asm/switch_to.h | 34 - .../include/asm/{cmpxchg.h => system.h} | 46 +- trunk/arch/hexagon/kernel/ptrace.c | 1 + trunk/arch/hexagon/kernel/smp.c | 1 + trunk/arch/hexagon/kernel/vm_events.c | 1 + trunk/arch/ia64/dig/setup.c | 2 +- trunk/arch/ia64/hp/common/sba_iommu.c | 1 + trunk/arch/ia64/hp/sim/boot/bootloader.c | 1 + trunk/arch/ia64/hp/sim/boot/fw-emu.c | 1 - trunk/arch/ia64/hp/sim/simeth.c | 1 + trunk/arch/ia64/include/asm/acpi.h | 1 + trunk/arch/ia64/include/asm/atomic.h | 1 + trunk/arch/ia64/include/asm/auxvec.h | 2 - trunk/arch/ia64/include/asm/barrier.h | 68 - trunk/arch/ia64/include/asm/cmpxchg.h | 1 - trunk/arch/ia64/include/asm/exec.h | 14 - trunk/arch/ia64/include/asm/futex.h | 1 + trunk/arch/ia64/include/asm/io.h | 1 + trunk/arch/ia64/include/asm/irqflags.h | 2 - trunk/arch/ia64/include/asm/kexec.h | 1 - trunk/arch/ia64/include/asm/kvm.h | 4 - trunk/arch/ia64/include/asm/kvm_host.h | 3 - trunk/arch/ia64/include/asm/mca_asm.h | 2 - trunk/arch/ia64/include/asm/page.h | 10 - trunk/arch/ia64/include/asm/pci.h | 8 - trunk/arch/ia64/include/asm/pgtable.h | 1 + trunk/arch/ia64/include/asm/posix_types.h | 121 +- trunk/arch/ia64/include/asm/processor.h | 8 - trunk/arch/ia64/include/asm/sal.h | 1 + trunk/arch/ia64/include/asm/setup.h | 18 - trunk/arch/ia64/include/asm/sn/pda.h | 1 + trunk/arch/ia64/include/asm/spinlock.h | 1 + trunk/arch/ia64/include/asm/switch_to.h | 87 - trunk/arch/ia64/include/asm/system.h | 203 ++ trunk/arch/ia64/include/asm/uv/uv.h | 1 + trunk/arch/ia64/kernel/acpi.c | 7 +- trunk/arch/ia64/kernel/asm-offsets.c | 4 +- trunk/arch/ia64/kernel/efi.c | 1 - trunk/arch/ia64/kernel/fsys.S | 3 +- trunk/arch/ia64/kernel/fsyscall_gtod_data.h | 2 +- trunk/arch/ia64/kernel/gate.S | 3 +- trunk/arch/ia64/kernel/gate.lds.S | 3 +- trunk/arch/ia64/kernel/head.S | 1 + trunk/arch/ia64/kernel/iosapic.c | 1 + trunk/arch/ia64/kernel/irq_ia64.c | 9 +- trunk/arch/ia64/kernel/ivt.S | 1 + trunk/arch/ia64/kernel/machvec.c | 1 + trunk/arch/ia64/kernel/mca.c | 7 +- trunk/arch/ia64/kernel/mca_drv.c | 1 + trunk/arch/ia64/kernel/msi_ia64.c | 4 +- trunk/arch/ia64/kernel/patch.c | 1 + trunk/arch/ia64/kernel/pci-dma.c | 1 + trunk/arch/ia64/kernel/perfmon.c | 1 + trunk/arch/ia64/kernel/process.c | 1 - trunk/arch/ia64/kernel/ptrace.c | 1 + trunk/arch/ia64/kernel/setup.c | 3 +- trunk/arch/ia64/kernel/smp.c | 3 +- trunk/arch/ia64/kernel/smpboot.c | 20 +- trunk/arch/ia64/kernel/time.c | 11 +- trunk/arch/ia64/kernel/topology.c | 3 +- trunk/arch/ia64/kernel/traps.c | 1 - trunk/arch/ia64/kernel/uncached.c | 1 + trunk/arch/ia64/kernel/unwind.c | 1 + trunk/arch/ia64/kernel/vmlinux.lds.S | 1 + trunk/arch/ia64/kvm/kvm-ia64.c | 25 +- trunk/arch/ia64/mm/fault.c | 1 + trunk/arch/ia64/mm/init.c | 1 + trunk/arch/ia64/oprofile/backtrace.c | 1 + trunk/arch/ia64/pci/pci.c | 1 + trunk/arch/ia64/sn/kernel/setup.c | 2 +- trunk/arch/ia64/sn/kernel/sn2/prominfo_proc.c | 1 + trunk/arch/ia64/sn/kernel/sn2/sn2_smp.c | 1 + trunk/arch/ia64/sn/kernel/sn2/timer.c | 1 + trunk/arch/ia64/sn/kernel/tiocx.c | 1 + trunk/arch/ia64/xen/xensetup.S | 1 + trunk/arch/m32r/include/asm/atomic.h | 3 +- trunk/arch/m32r/include/asm/barrier.h | 94 - trunk/arch/m32r/include/asm/bitops.h | 3 +- trunk/arch/m32r/include/asm/cmpxchg.h | 221 -- trunk/arch/m32r/include/asm/dcache_clear.h | 29 - trunk/arch/m32r/include/asm/exec.h | 14 - trunk/arch/m32r/include/asm/local.h | 1 + trunk/arch/m32r/include/asm/posix_types.h | 108 +- trunk/arch/m32r/include/asm/spinlock.h | 1 - trunk/arch/m32r/include/asm/switch_to.h | 51 - trunk/arch/m32r/include/asm/system.h | 367 +++ trunk/arch/m32r/kernel/ptrace.c | 1 + trunk/arch/m32r/kernel/traps.c | 1 + trunk/arch/m32r/mm/fault-nommu.c | 1 + trunk/arch/m32r/mm/fault.c | 1 + trunk/arch/m32r/platforms/m32104ut/setup.c | 1 + trunk/arch/m32r/platforms/m32700ut/setup.c | 1 + trunk/arch/m32r/platforms/mappi/setup.c | 1 + trunk/arch/m32r/platforms/mappi2/setup.c | 1 + trunk/arch/m32r/platforms/mappi3/setup.c | 1 + trunk/arch/m32r/platforms/oaks32r/setup.c | 1 + trunk/arch/m32r/platforms/opsput/setup.c | 1 + trunk/arch/m32r/platforms/usrv/setup.c | 1 + trunk/arch/m68k/amiga/amisound.c | 1 + trunk/arch/m68k/amiga/config.c | 1 + trunk/arch/m68k/apollo/config.c | 1 + trunk/arch/m68k/atari/ataints.c | 1 + trunk/arch/m68k/atari/atasound.c | 1 + trunk/arch/m68k/atari/config.c | 1 + trunk/arch/m68k/bvme6000/config.c | 1 + trunk/arch/m68k/bvme6000/rtc.c | 1 + trunk/arch/m68k/hp300/time.c | 1 + trunk/arch/m68k/include/asm/atomic.h | 2 +- trunk/arch/m68k/include/asm/barrier.h | 20 - trunk/arch/m68k/include/asm/exec.h | 6 - trunk/arch/m68k/include/asm/posix_types.h | 53 +- trunk/arch/m68k/include/asm/sun3xflop.h | 1 + trunk/arch/m68k/include/asm/switch_to.h | 41 - .../m68k/include/asm/{cmpxchg.h => system.h} | 95 +- trunk/arch/m68k/kernel/ints.c | 1 + trunk/arch/m68k/kernel/irq.c | 1 + trunk/arch/m68k/kernel/process.c | 1 + trunk/arch/m68k/kernel/ptrace.c | 1 + trunk/arch/m68k/kernel/traps.c | 1 + trunk/arch/m68k/kernel/vectors.c | 1 + trunk/arch/m68k/mac/config.c | 1 + trunk/arch/m68k/mac/misc.c | 1 + trunk/arch/m68k/mm/fault.c | 1 + trunk/arch/m68k/mm/init_mm.c | 1 + trunk/arch/m68k/mm/init_no.c | 1 + trunk/arch/m68k/mm/kmap.c | 1 + trunk/arch/m68k/mm/memory.c | 1 + trunk/arch/m68k/mm/motorola.c | 1 + trunk/arch/m68k/mm/sun3mmu.c | 1 + trunk/arch/m68k/mvme147/config.c | 1 + trunk/arch/m68k/mvme16x/config.c | 1 + trunk/arch/m68k/mvme16x/rtc.c | 1 + trunk/arch/m68k/platform/68328/config.c | 1 + trunk/arch/m68k/platform/68328/timers.c | 1 + trunk/arch/m68k/platform/68360/config.c | 1 + trunk/arch/m68k/platform/68EZ328/config.c | 1 + trunk/arch/m68k/platform/68VZ328/config.c | 1 + trunk/arch/m68k/q40/config.c | 1 + trunk/arch/m68k/q40/q40ints.c | 1 + trunk/arch/m68k/sun3/intersil.c | 1 + trunk/arch/m68k/sun3/mmu_emu.c | 1 + trunk/arch/m68k/sun3/prom/console.c | 1 + trunk/arch/m68k/sun3x/config.c | 1 + trunk/arch/m68k/sun3x/time.c | 1 + trunk/arch/microblaze/include/asm/atomic.h | 1 - trunk/arch/microblaze/include/asm/barrier.h | 27 - trunk/arch/microblaze/include/asm/cmpxchg.h | 40 - trunk/arch/microblaze/include/asm/exec.h | 14 - trunk/arch/microblaze/include/asm/page.h | 2 - trunk/arch/microblaze/include/asm/processor.h | 11 +- trunk/arch/microblaze/include/asm/setup.h | 6 - trunk/arch/microblaze/include/asm/switch_to.h | 24 - trunk/arch/microblaze/include/asm/system.h | 98 + trunk/arch/microblaze/kernel/cpu/pvr.c | 1 + .../arch/microblaze/kernel/microblaze_ksyms.c | 1 + trunk/arch/microblaze/kernel/process.c | 1 + trunk/arch/microblaze/kernel/prom.c | 1 + trunk/arch/microblaze/kernel/setup.c | 1 + trunk/arch/microblaze/kernel/timer.c | 1 + trunk/arch/microblaze/kernel/traps.c | 1 + trunk/arch/microblaze/lib/memcpy.c | 1 + trunk/arch/microblaze/mm/fault.c | 1 + trunk/arch/mips/Kconfig | 1 - trunk/arch/mips/cavium-octeon/setup.c | 1 + trunk/arch/mips/cavium-octeon/smp.c | 2 +- trunk/arch/mips/configs/db1300_defconfig | 2 +- trunk/arch/mips/dec/ecc-berr.c | 1 + trunk/arch/mips/dec/kn01-berr.c | 1 + trunk/arch/mips/dec/kn02xa-berr.c | 1 + trunk/arch/mips/dec/wbflush.c | 2 +- trunk/arch/mips/emma/markeins/irq.c | 1 + trunk/arch/mips/fw/arc/misc.c | 1 + trunk/arch/mips/include/asm/atomic.h | 2 +- trunk/arch/mips/include/asm/barrier.h | 2 - trunk/arch/mips/include/asm/cmpxchg.h | 124 - trunk/arch/mips/include/asm/dma.h | 1 + trunk/arch/mips/include/asm/exec.h | 17 - .../mips/include/asm/mach-au1x00/au1000_dma.h | 1 + trunk/arch/mips/include/asm/posix_types.h | 121 +- trunk/arch/mips/include/asm/processor.h | 7 +- trunk/arch/mips/include/asm/setup.h | 11 - trunk/arch/mips/include/asm/switch_to.h | 85 - trunk/arch/mips/include/asm/system.h | 235 ++ trunk/arch/mips/include/asm/txx9/jmr3927.h | 1 + trunk/arch/mips/kernel/cpu-bugs64.c | 2 +- trunk/arch/mips/kernel/cpu-probe.c | 1 + trunk/arch/mips/kernel/irq-rm7000.c | 1 + trunk/arch/mips/kernel/irq-rm9000.c | 1 + trunk/arch/mips/kernel/irq.c | 1 + trunk/arch/mips/kernel/irq_cpu.c | 1 + trunk/arch/mips/kernel/kspd.c | 2 +- trunk/arch/mips/kernel/mips-mt.c | 1 + trunk/arch/mips/kernel/process.c | 1 + trunk/arch/mips/kernel/ptrace.c | 1 + trunk/arch/mips/kernel/ptrace32.c | 1 + trunk/arch/mips/kernel/rtlx.c | 1 + trunk/arch/mips/kernel/setup.c | 1 + trunk/arch/mips/kernel/signal.c | 1 - trunk/arch/mips/kernel/signal32.c | 2 +- trunk/arch/mips/kernel/signal_n32.c | 1 + trunk/arch/mips/kernel/smp-bmips.c | 1 + trunk/arch/mips/kernel/smp-cmp.c | 1 + trunk/arch/mips/kernel/smp-mt.c | 1 + trunk/arch/mips/kernel/smp.c | 2 +- trunk/arch/mips/kernel/smtc-proc.c | 1 + trunk/arch/mips/kernel/smtc.c | 1 + trunk/arch/mips/kernel/spram.c | 1 + trunk/arch/mips/kernel/syscall.c | 1 - trunk/arch/mips/kernel/traps.c | 1 + trunk/arch/mips/kernel/unaligned.c | 1 + trunk/arch/mips/kernel/vpe.c | 1 + trunk/arch/mips/lasat/reset.c | 1 + trunk/arch/mips/math-emu/dsemul.c | 1 + trunk/arch/mips/mipssim/sim_smtc.c | 1 + trunk/arch/mips/mipssim/sim_time.c | 1 - trunk/arch/mips/mm/c-octeon.c | 1 + trunk/arch/mips/mm/c-r3k.c | 1 + trunk/arch/mips/mm/c-r4k.c | 1 + trunk/arch/mips/mm/c-tx39.c | 1 + trunk/arch/mips/mm/fault.c | 1 + trunk/arch/mips/mm/page.c | 1 + trunk/arch/mips/mm/sc-ip22.c | 1 + trunk/arch/mips/mm/sc-mips.c | 1 + trunk/arch/mips/mm/sc-r5k.c | 1 + trunk/arch/mips/mm/tlb-r3k.c | 1 + trunk/arch/mips/mm/tlb-r4k.c | 1 + trunk/arch/mips/mm/tlb-r8k.c | 1 + trunk/arch/mips/mm/tlbex.c | 1 - trunk/arch/mips/mti-malta/malta-init.c | 1 + trunk/arch/mips/mti-malta/malta-int.c | 1 - trunk/arch/mips/mti-malta/malta-time.c | 1 - trunk/arch/mips/netlogic/common/irq.c | 1 + .../mips/pmc-sierra/msp71xx/msp_irq_cic.c | 1 + .../mips/pmc-sierra/msp71xx/msp_irq_per.c | 1 + .../mips/pmc-sierra/msp71xx/msp_irq_slp.c | 1 + trunk/arch/mips/pmc-sierra/yosemite/irq.c | 1 + trunk/arch/mips/pmc-sierra/yosemite/prom.c | 1 + trunk/arch/mips/pnx833x/common/interrupts.c | 1 - trunk/arch/mips/powertv/asic/asic_int.c | 1 - trunk/arch/mips/powertv/asic/irq_asic.c | 1 + trunk/arch/mips/powertv/init.c | 1 + trunk/arch/mips/rb532/irq.c | 1 + trunk/arch/mips/sgi-ip22/ip22-berr.c | 1 + trunk/arch/mips/sgi-ip22/ip22-reset.c | 1 + trunk/arch/mips/sgi-ip22/ip28-berr.c | 1 + trunk/arch/mips/sgi-ip27/ip27-irq.c | 1 + trunk/arch/mips/sgi-ip27/ip27-reset.c | 1 + trunk/arch/mips/sgi-ip32/ip32-irq.c | 1 + trunk/arch/mips/sgi-ip32/ip32-reset.c | 1 + trunk/arch/mips/sibyte/bcm1480/irq.c | 1 + trunk/arch/mips/sibyte/common/sb_tbprof.c | 1 + trunk/arch/mips/sibyte/sb1250/bus_watcher.c | 1 + trunk/arch/mips/sibyte/sb1250/irq.c | 1 + trunk/arch/mips/sni/reset.c | 1 + trunk/arch/mips/vr41xx/common/irq.c | 1 + trunk/arch/mips/vr41xx/common/pmu.c | 1 + trunk/arch/mn10300/include/asm/atomic.h | 109 +- trunk/arch/mn10300/include/asm/barrier.h | 37 - trunk/arch/mn10300/include/asm/cmpxchg.h | 115 - trunk/arch/mn10300/include/asm/dma.h | 1 + trunk/arch/mn10300/include/asm/exec.h | 16 - trunk/arch/mn10300/include/asm/posix_types.h | 111 +- trunk/arch/mn10300/include/asm/switch_to.h | 49 - trunk/arch/mn10300/include/asm/system.h | 102 + trunk/arch/mn10300/kernel/entry.S | 1 + trunk/arch/mn10300/kernel/fpu.c | 1 + trunk/arch/mn10300/kernel/gdb-io-serial.c | 1 + trunk/arch/mn10300/kernel/gdb-io-ttysm.c | 1 + trunk/arch/mn10300/kernel/gdb-stub.c | 1 + trunk/arch/mn10300/kernel/mn10300-serial.c | 1 + trunk/arch/mn10300/kernel/mn10300-watchdog.c | 1 + trunk/arch/mn10300/kernel/process.c | 1 + trunk/arch/mn10300/kernel/ptrace.c | 1 + trunk/arch/mn10300/kernel/setup.c | 1 + trunk/arch/mn10300/kernel/smp-low.S | 2 +- trunk/arch/mn10300/kernel/smp.c | 1 + trunk/arch/mn10300/kernel/traps.c | 1 + trunk/arch/mn10300/lib/bitops.c | 1 + trunk/arch/mn10300/mm/fault.c | 1 + trunk/arch/mn10300/mm/init.c | 1 + trunk/arch/mn10300/mm/misalignment.c | 1 + trunk/arch/mn10300/mm/pgtable.c | 1 + trunk/arch/mn10300/mm/tlb-smp.c | 1 + trunk/arch/mn10300/proc-mn2ws0050/proc-init.c | 1 + trunk/arch/openrisc/include/asm/Kbuild | 3 - trunk/arch/openrisc/include/asm/system.h | 35 + trunk/arch/openrisc/kernel/idle.c | 1 + trunk/arch/openrisc/kernel/process.c | 1 + trunk/arch/openrisc/kernel/prom.c | 1 + trunk/arch/openrisc/kernel/ptrace.c | 1 + trunk/arch/openrisc/kernel/setup.c | 1 + trunk/arch/openrisc/kernel/traps.c | 1 + trunk/arch/openrisc/mm/init.c | 1 + trunk/arch/openrisc/mm/tlb.c | 1 + trunk/arch/parisc/include/asm/atomic.h | 1 + trunk/arch/parisc/include/asm/barrier.h | 35 - trunk/arch/parisc/include/asm/delay.h | 2 +- trunk/arch/parisc/include/asm/dma.h | 1 + trunk/arch/parisc/include/asm/exec.h | 6 - trunk/arch/parisc/include/asm/ldcw.h | 48 - trunk/arch/parisc/include/asm/posix_types.h | 119 +- trunk/arch/parisc/include/asm/processor.h | 2 +- trunk/arch/parisc/include/asm/psw.h | 41 - trunk/arch/parisc/include/asm/special_insns.h | 40 - trunk/arch/parisc/include/asm/spinlock.h | 1 + trunk/arch/parisc/include/asm/switch_to.h | 12 - trunk/arch/parisc/include/asm/system.h | 165 ++ trunk/arch/parisc/include/asm/thread_info.h | 1 - trunk/arch/parisc/include/asm/timex.h | 1 + trunk/arch/parisc/include/asm/uaccess.h | 1 + trunk/arch/parisc/kernel/cache.c | 1 + trunk/arch/parisc/kernel/firmware.c | 1 + trunk/arch/parisc/kernel/pci.c | 1 + trunk/arch/parisc/kernel/ptrace.c | 1 + trunk/arch/parisc/kernel/smp.c | 1 + trunk/arch/parisc/kernel/traps.c | 1 + trunk/arch/parisc/lib/bitops.c | 1 + trunk/arch/powerpc/Kconfig | 2 +- trunk/arch/powerpc/Kconfig.debug | 10 + trunk/arch/powerpc/boot/.gitignore | 1 + .../powerpc/configs/85xx/p1023rds_defconfig | 2 +- trunk/arch/powerpc/configs/chroma_defconfig | 2 +- .../powerpc/configs/corenet64_smp_defconfig | 2 +- trunk/arch/powerpc/configs/mpc85xx_defconfig | 2 +- .../powerpc/configs/mpc85xx_smp_defconfig | 2 +- trunk/arch/powerpc/configs/ppc64_defconfig | 2 +- trunk/arch/powerpc/configs/pseries_defconfig | 2 +- trunk/arch/powerpc/include/asm/atomic.h | 8 +- trunk/arch/powerpc/include/asm/auxvec.h | 2 - trunk/arch/powerpc/include/asm/barrier.h | 68 - trunk/arch/powerpc/include/asm/bug.h | 11 - trunk/arch/powerpc/include/asm/cache.h | 16 - trunk/arch/powerpc/include/asm/cmpxchg.h | 309 --- trunk/arch/powerpc/include/asm/debug.h | 56 - trunk/arch/powerpc/include/asm/dma.h | 1 + trunk/arch/powerpc/include/asm/exec.h | 9 - .../arch/powerpc/include/asm/hw_breakpoint.h | 2 +- trunk/arch/powerpc/include/asm/iommu.h | 1 + trunk/arch/powerpc/include/asm/irq.h | 6 + trunk/arch/powerpc/include/asm/kvm.h | 46 +- trunk/arch/powerpc/include/asm/kvm_book3s.h | 98 +- .../arch/powerpc/include/asm/kvm_book3s_32.h | 6 +- .../arch/powerpc/include/asm/kvm_book3s_64.h | 180 +- trunk/arch/powerpc/include/asm/kvm_e500.h | 52 +- trunk/arch/powerpc/include/asm/kvm_host.h | 90 +- trunk/arch/powerpc/include/asm/kvm_para.h | 41 +- trunk/arch/powerpc/include/asm/kvm_ppc.h | 25 +- trunk/arch/powerpc/include/asm/machdep.h | 4 +- trunk/arch/powerpc/include/asm/mmu-book3e.h | 6 +- trunk/arch/powerpc/include/asm/mmu-hash64.h | 14 +- trunk/arch/powerpc/include/asm/pci-bridge.h | 16 +- .../powerpc/include/asm/perf_event_server.h | 2 - trunk/arch/powerpc/include/asm/posix_types.h | 118 +- trunk/arch/powerpc/include/asm/ppc-opcode.h | 4 +- trunk/arch/powerpc/include/asm/processor.h | 30 - trunk/arch/powerpc/include/asm/reg.h | 5 - trunk/arch/powerpc/include/asm/reg_booke.h | 5 - trunk/arch/powerpc/include/asm/rtas.h | 36 +- trunk/arch/powerpc/include/asm/runlatch.h | 45 - trunk/arch/powerpc/include/asm/setup.h | 24 +- trunk/arch/powerpc/include/asm/smp.h | 1 + trunk/arch/powerpc/include/asm/switch_to.h | 65 - trunk/arch/powerpc/include/asm/system.h | 592 +++++ trunk/arch/powerpc/include/asm/udbg.h | 1 + trunk/arch/powerpc/include/asm/vio.h | 10 +- trunk/arch/powerpc/kernel/align.c | 2 +- trunk/arch/powerpc/kernel/asm-offsets.c | 16 +- trunk/arch/powerpc/kernel/cputable.c | 1 - trunk/arch/powerpc/kernel/crash.c | 2 +- trunk/arch/powerpc/kernel/exceptions-64s.S | 8 +- trunk/arch/powerpc/kernel/idle.c | 2 +- trunk/arch/powerpc/kernel/irq.c | 10 +- trunk/arch/powerpc/kernel/kprobes.c | 1 + trunk/arch/powerpc/kernel/kvm.c | 307 +-- trunk/arch/powerpc/kernel/kvm_emul.S | 112 +- trunk/arch/powerpc/kernel/lparcfg.c | 1 + trunk/arch/powerpc/kernel/ppc_ksyms.c | 2 +- trunk/arch/powerpc/kernel/process.c | 4 +- trunk/arch/powerpc/kernel/prom.c | 1 + trunk/arch/powerpc/kernel/prom_init.c | 3 +- trunk/arch/powerpc/kernel/ptrace.c | 2 +- trunk/arch/powerpc/kernel/ptrace32.c | 2 +- trunk/arch/powerpc/kernel/rtas.c | 35 +- trunk/arch/powerpc/kernel/setup-common.c | 1 + trunk/arch/powerpc/kernel/setup_32.c | 1 + trunk/arch/powerpc/kernel/setup_64.c | 3 +- trunk/arch/powerpc/kernel/signal.c | 1 - trunk/arch/powerpc/kernel/signal_32.c | 1 - trunk/arch/powerpc/kernel/signal_64.c | 1 - trunk/arch/powerpc/kernel/smp.c | 2 +- trunk/arch/powerpc/kernel/softemu8xx.c | 1 + trunk/arch/powerpc/kernel/swsusp.c | 2 +- trunk/arch/powerpc/kernel/swsusp_64.c | 1 + trunk/arch/powerpc/kernel/sys_ppc32.c | 1 - trunk/arch/powerpc/kernel/sysfs.c | 1 + trunk/arch/powerpc/kernel/traps.c | 3 +- trunk/arch/powerpc/kernel/udbg.c | 3 + trunk/arch/powerpc/kernel/vdso.c | 5 +- trunk/arch/powerpc/kernel/vio.c | 12 +- trunk/arch/powerpc/kvm/Kconfig | 1 - trunk/arch/powerpc/kvm/book3s.c | 57 +- trunk/arch/powerpc/kvm/book3s_32_mmu_host.c | 21 +- trunk/arch/powerpc/kvm/book3s_64_mmu_host.c | 66 +- trunk/arch/powerpc/kvm/book3s_64_mmu_hv.c | 919 +------ trunk/arch/powerpc/kvm/book3s_emulate.c | 8 +- trunk/arch/powerpc/kvm/book3s_hv.c | 466 ++-- trunk/arch/powerpc/kvm/book3s_hv_builtin.c | 209 +- trunk/arch/powerpc/kvm/book3s_hv_rm_mmu.c | 835 ++---- trunk/arch/powerpc/kvm/book3s_hv_rmhandlers.S | 176 +- .../arch/powerpc/kvm/book3s_paired_singles.c | 9 +- trunk/arch/powerpc/kvm/book3s_pr.c | 178 +- trunk/arch/powerpc/kvm/booke.c | 150 +- trunk/arch/powerpc/kvm/booke.h | 4 - trunk/arch/powerpc/kvm/booke_emulate.c | 23 +- trunk/arch/powerpc/kvm/booke_interrupts.S | 18 +- trunk/arch/powerpc/kvm/e500.c | 32 +- trunk/arch/powerpc/kvm/e500_emulate.c | 38 +- trunk/arch/powerpc/kvm/e500_tlb.c | 775 ++---- trunk/arch/powerpc/kvm/e500_tlb.h | 80 +- trunk/arch/powerpc/kvm/emulate.c | 61 +- trunk/arch/powerpc/kvm/powerpc.c | 148 +- trunk/arch/powerpc/kvm/trace.h | 62 +- trunk/arch/powerpc/lib/alloc.c | 2 +- trunk/arch/powerpc/lib/copyuser_power7_vmx.c | 1 - trunk/arch/powerpc/mm/44x_mmu.c | 1 + trunk/arch/powerpc/mm/fault.c | 2 +- trunk/arch/powerpc/mm/hash_utils_64.c | 1 + trunk/arch/powerpc/mm/hugetlbpage.c | 5 +- trunk/arch/powerpc/mm/init_32.c | 1 + trunk/arch/powerpc/mm/init_64.c | 1 + trunk/arch/powerpc/mm/numa.c | 2 +- trunk/arch/powerpc/mm/pgtable_32.c | 1 - trunk/arch/powerpc/mm/pgtable_64.c | 1 + trunk/arch/powerpc/oprofile/common.c | 1 + trunk/arch/powerpc/oprofile/op_model_7450.c | 1 + trunk/arch/powerpc/oprofile/op_model_cell.c | 1 + .../arch/powerpc/oprofile/op_model_fsl_emb.c | 1 + trunk/arch/powerpc/oprofile/op_model_power4.c | 1 + trunk/arch/powerpc/oprofile/op_model_rs64.c | 1 + trunk/arch/powerpc/perf/core-book3s.c | 46 +- trunk/arch/powerpc/perf/power4-pmu.c | 1 - trunk/arch/powerpc/perf/ppc970-pmu.c | 1 - .../arch/powerpc/platforms/52xx/lite5200_pm.c | 1 - trunk/arch/powerpc/platforms/82xx/pq2.c | 1 + trunk/arch/powerpc/platforms/83xx/km83xx.c | 1 + .../arch/powerpc/platforms/83xx/mpc832x_mds.c | 1 + .../arch/powerpc/platforms/83xx/mpc834x_itx.c | 1 + .../arch/powerpc/platforms/83xx/mpc834x_mds.c | 1 + .../arch/powerpc/platforms/83xx/mpc836x_mds.c | 1 + trunk/arch/powerpc/platforms/83xx/sbc834x.c | 1 + trunk/arch/powerpc/platforms/83xx/suspend.c | 1 - .../arch/powerpc/platforms/85xx/corenet_ds.c | 1 + trunk/arch/powerpc/platforms/85xx/ge_imp3a.c | 1 + trunk/arch/powerpc/platforms/85xx/ksi8560.c | 1 + .../arch/powerpc/platforms/85xx/mpc8536_ds.c | 1 + .../arch/powerpc/platforms/85xx/mpc85xx_ads.c | 1 + .../arch/powerpc/platforms/85xx/mpc85xx_cds.c | 1 + .../arch/powerpc/platforms/85xx/mpc85xx_ds.c | 1 + .../arch/powerpc/platforms/85xx/mpc85xx_mds.c | 1 + .../arch/powerpc/platforms/85xx/mpc85xx_rdb.c | 1 + trunk/arch/powerpc/platforms/85xx/p1010rdb.c | 1 + trunk/arch/powerpc/platforms/85xx/p1023_rds.c | 1 + trunk/arch/powerpc/platforms/85xx/p2041_rdb.c | 1 + trunk/arch/powerpc/platforms/85xx/p3041_ds.c | 1 + trunk/arch/powerpc/platforms/85xx/p4080_ds.c | 1 + trunk/arch/powerpc/platforms/85xx/p5020_ds.c | 1 + trunk/arch/powerpc/platforms/85xx/sbc8548.c | 1 + trunk/arch/powerpc/platforms/85xx/sbc8560.c | 1 + trunk/arch/powerpc/platforms/85xx/socrates.c | 1 + trunk/arch/powerpc/platforms/85xx/stx_gp3.c | 1 + trunk/arch/powerpc/platforms/85xx/tqm85xx.c | 1 + .../arch/powerpc/platforms/85xx/xes_mpc85xx.c | 1 + trunk/arch/powerpc/platforms/86xx/gef_ppc9a.c | 1 + .../arch/powerpc/platforms/86xx/gef_sbc310.c | 1 + .../arch/powerpc/platforms/86xx/gef_sbc610.c | 1 + .../powerpc/platforms/86xx/mpc8610_hpcd.c | 1 + .../powerpc/platforms/86xx/mpc86xx_hpcn.c | 1 + trunk/arch/powerpc/platforms/86xx/pic.c | 1 + trunk/arch/powerpc/platforms/86xx/sbc8641d.c | 1 + .../powerpc/platforms/8xx/mpc86xads_setup.c | 1 + .../powerpc/platforms/8xx/mpc885ads_setup.c | 1 + .../arch/powerpc/platforms/8xx/tqm8xx_setup.c | 1 + trunk/arch/powerpc/platforms/cell/beat_htab.c | 2 + trunk/arch/powerpc/platforms/cell/smp.c | 1 + .../powerpc/platforms/cell/spufs/coredump.c | 2 +- .../arch/powerpc/platforms/embedded6xx/c2k.c | 1 + .../powerpc/platforms/embedded6xx/holly.c | 1 + .../platforms/embedded6xx/mpc7448_hpc2.c | 1 + .../powerpc/platforms/embedded6xx/prpmc2800.c | 1 + .../platforms/embedded6xx/storcenter.c | 1 + trunk/arch/powerpc/platforms/fsl_uli1575.c | 1 + trunk/arch/powerpc/platforms/maple/setup.c | 1 + trunk/arch/powerpc/platforms/maple/time.c | 1 + trunk/arch/powerpc/platforms/pasemi/setup.c | 2 +- .../powerpc/platforms/powermac/bootx_init.c | 1 - .../powerpc/platforms/powermac/cpufreq_32.c | 2 +- trunk/arch/powerpc/platforms/powermac/nvram.c | 1 + trunk/arch/powerpc/platforms/powermac/setup.c | 1 + trunk/arch/powerpc/platforms/powermac/time.c | 1 + trunk/arch/powerpc/platforms/powernv/smp.c | 1 + trunk/arch/powerpc/platforms/ps3/mm.c | 1 - trunk/arch/powerpc/platforms/pseries/dtl.c | 2 +- trunk/arch/powerpc/platforms/pseries/eeh.c | 19 +- .../arch/powerpc/platforms/pseries/eeh_dev.c | 2 +- .../powerpc/platforms/pseries/hotplug-cpu.c | 1 + .../powerpc/platforms/pseries/io_event_irq.c | 68 +- trunk/arch/powerpc/platforms/pseries/iommu.c | 29 +- .../platforms/pseries/processor_idle.c | 2 +- trunk/arch/powerpc/platforms/pseries/ras.c | 195 +- trunk/arch/powerpc/platforms/pseries/smp.c | 1 + trunk/arch/powerpc/platforms/wsp/chroma.c | 1 + trunk/arch/powerpc/platforms/wsp/psr2.c | 1 + trunk/arch/powerpc/platforms/wsp/wsp_pci.c | 1 - trunk/arch/powerpc/sysdev/cpm_common.c | 1 + trunk/arch/powerpc/sysdev/fsl_soc.c | 1 + trunk/arch/powerpc/sysdev/msi_bitmap.c | 1 - trunk/arch/powerpc/sysdev/tsi108_dev.c | 1 + trunk/arch/powerpc/xmon/xmon.c | 1 - trunk/arch/s390/Kconfig | 1 - trunk/arch/s390/crypto/crypt_s390.h | 1 - trunk/arch/s390/include/asm/atomic.h | 2 +- trunk/arch/s390/include/asm/barrier.h | 35 - trunk/arch/s390/include/asm/ctl_reg.h | 76 - trunk/arch/s390/include/asm/elf.h | 1 + trunk/arch/s390/include/asm/exec.h | 12 - trunk/arch/s390/include/asm/facility.h | 63 - trunk/arch/s390/include/asm/kvm.h | 11 - trunk/arch/s390/include/asm/kvm_host.h | 12 +- trunk/arch/s390/include/asm/mmu.h | 14 - trunk/arch/s390/include/asm/mmu_context.h | 1 - trunk/arch/s390/include/asm/posix_types.h | 70 +- trunk/arch/s390/include/asm/processor.h | 24 - trunk/arch/s390/include/asm/setup.h | 14 - trunk/arch/s390/include/asm/smp.h | 2 +- trunk/arch/s390/include/asm/switch_to.h | 100 - trunk/arch/s390/include/asm/system.h | 315 +++ trunk/arch/s390/include/asm/uaccess.h | 6 - trunk/arch/s390/kernel/asm-offsets.c | 1 + trunk/arch/s390/kernel/compat_signal.c | 1 - trunk/arch/s390/kernel/cpcmd.c | 1 + trunk/arch/s390/kernel/dis.c | 1 + trunk/arch/s390/kernel/early.c | 2 +- trunk/arch/s390/kernel/lgr.c | 1 + trunk/arch/s390/kernel/machine_kexec.c | 1 + trunk/arch/s390/kernel/os_info.c | 1 + trunk/arch/s390/kernel/process.c | 2 +- trunk/arch/s390/kernel/ptrace.c | 2 +- trunk/arch/s390/kernel/setup.c | 1 + trunk/arch/s390/kernel/signal.c | 1 - trunk/arch/s390/kernel/suspend.c | 2 +- trunk/arch/s390/kernel/traps.c | 1 + trunk/arch/s390/kernel/vdso.c | 2 +- trunk/arch/s390/kvm/Kconfig | 9 - trunk/arch/s390/kvm/diag.c | 6 +- trunk/arch/s390/kvm/intercept.c | 24 +- trunk/arch/s390/kvm/interrupt.c | 3 +- trunk/arch/s390/kvm/kvm-s390.c | 223 +- trunk/arch/s390/kvm/kvm-s390.h | 18 - trunk/arch/s390/kvm/priv.c | 27 +- trunk/arch/s390/kvm/sigp.c | 57 +- trunk/arch/s390/mm/fault.c | 2 +- trunk/arch/s390/mm/init.c | 2 +- trunk/arch/s390/mm/maccess.c | 2 +- trunk/arch/s390/mm/pgtable.c | 1 + trunk/arch/s390/oprofile/hwsampler.c | 2 - trunk/arch/score/include/asm/atomic.h | 1 - trunk/arch/score/include/asm/barrier.h | 16 - trunk/arch/score/include/asm/bitops.h | 1 + trunk/arch/score/include/asm/bug.h | 11 - trunk/arch/score/include/asm/cmpxchg.h | 49 - trunk/arch/score/include/asm/exec.h | 6 - trunk/arch/score/include/asm/switch_to.h | 13 - trunk/arch/score/include/asm/system.h | 90 + trunk/arch/sh/Kconfig | 2 +- trunk/arch/sh/boards/mach-microdev/irq.c | 1 + trunk/arch/sh/include/asm/atomic-irq.h | 2 - trunk/arch/sh/include/asm/atomic.h | 2 +- trunk/arch/sh/include/asm/auxvec.h | 2 - trunk/arch/sh/include/asm/barrier.h | 54 - trunk/arch/sh/include/asm/bitops.h | 1 + trunk/arch/sh/include/asm/bl_bit.h | 10 - trunk/arch/sh/include/asm/bl_bit_32.h | 33 - trunk/arch/sh/include/asm/bl_bit_64.h | 40 - trunk/arch/sh/include/asm/bug.h | 5 - trunk/arch/sh/include/asm/cache_insns.h | 11 - trunk/arch/sh/include/asm/cache_insns_32.h | 21 - trunk/arch/sh/include/asm/cache_insns_64.h | 23 - trunk/arch/sh/include/asm/cmpxchg-irq.h | 2 - trunk/arch/sh/include/asm/cmpxchg.h | 70 - trunk/arch/sh/include/asm/exec.h | 10 - trunk/arch/sh/include/asm/futex-irq.h | 1 + trunk/arch/sh/include/asm/io.h | 1 + trunk/arch/sh/include/asm/irq.h | 11 + trunk/arch/sh/include/asm/posix_types_32.h | 5 + trunk/arch/sh/include/asm/posix_types_64.h | 4 + trunk/arch/sh/include/asm/processor.h | 15 - trunk/arch/sh/include/asm/ptrace.h | 1 + trunk/arch/sh/include/asm/setup.h | 1 - trunk/arch/sh/include/asm/switch_to.h | 19 - trunk/arch/sh/include/asm/switch_to_64.h | 35 - trunk/arch/sh/include/asm/system.h | 184 ++ .../asm/{switch_to_32.h => system_32.h} | 108 +- trunk/arch/sh/include/asm/system_64.h | 79 + trunk/arch/sh/include/asm/traps.h | 21 - trunk/arch/sh/include/asm/traps_32.h | 68 - trunk/arch/sh/include/asm/traps_64.h | 24 - trunk/arch/sh/include/asm/uaccess.h | 14 - trunk/arch/sh/kernel/cpu/init.c | 2 +- trunk/arch/sh/kernel/cpu/irq/imask.c | 1 + trunk/arch/sh/kernel/cpu/sh2a/opcode_helper.c | 1 + trunk/arch/sh/kernel/cpu/sh4/fpu.c | 1 + trunk/arch/sh/kernel/hw_breakpoint.c | 1 - trunk/arch/sh/kernel/idle.c | 2 +- trunk/arch/sh/kernel/io_trapped.c | 1 + trunk/arch/sh/kernel/process_32.c | 1 + trunk/arch/sh/kernel/process_64.c | 1 - trunk/arch/sh/kernel/ptrace_32.c | 1 + trunk/arch/sh/kernel/ptrace_64.c | 2 +- trunk/arch/sh/kernel/reboot.c | 2 +- trunk/arch/sh/kernel/signal_32.c | 1 + trunk/arch/sh/kernel/smp.c | 1 + trunk/arch/sh/kernel/traps.c | 2 +- trunk/arch/sh/kernel/traps_32.c | 3 +- trunk/arch/sh/kernel/traps_64.c | 1 + trunk/arch/sh/math-emu/math.c | 1 + trunk/arch/sh/mm/fault_32.c | 2 +- trunk/arch/sh/mm/fault_64.c | 1 + trunk/arch/sh/mm/flush-sh4.c | 1 - trunk/arch/sh/mm/pmb.c | 1 + trunk/arch/sh/mm/tlb-pteaex.c | 1 + trunk/arch/sh/mm/tlb-sh3.c | 1 + trunk/arch/sh/mm/tlb-sh4.c | 1 + trunk/arch/sh/mm/tlbflush_64.c | 1 + trunk/arch/sparc/Kconfig | 1 - trunk/arch/sparc/include/asm/atomic_32.h | 2 +- trunk/arch/sparc/include/asm/atomic_64.h | 3 +- trunk/arch/sparc/include/asm/auxio_32.h | 1 + trunk/arch/sparc/include/asm/barrier.h | 8 - trunk/arch/sparc/include/asm/barrier_32.h | 15 - trunk/arch/sparc/include/asm/barrier_64.h | 56 - trunk/arch/sparc/include/asm/bug.h | 3 - trunk/arch/sparc/include/asm/cacheflush_32.h | 9 - trunk/arch/sparc/include/asm/cacheflush_64.h | 10 - trunk/arch/sparc/include/asm/cmpxchg.h | 8 - trunk/arch/sparc/include/asm/cmpxchg_32.h | 112 - trunk/arch/sparc/include/asm/cmpxchg_64.h | 145 - trunk/arch/sparc/include/asm/cpu_type.h | 34 - trunk/arch/sparc/include/asm/exec.h | 6 - trunk/arch/sparc/include/asm/floppy_32.h | 1 + trunk/arch/sparc/include/asm/futex_64.h | 1 + trunk/arch/sparc/include/asm/io_32.h | 1 + trunk/arch/sparc/include/asm/io_64.h | 1 + trunk/arch/sparc/include/asm/irqflags_32.h | 1 - trunk/arch/sparc/include/asm/mmu_context_64.h | 1 + trunk/arch/sparc/include/asm/ns87303.h | 1 + trunk/arch/sparc/include/asm/perfctr.h | 23 - trunk/arch/sparc/include/asm/pgtable_32.h | 2 +- trunk/arch/sparc/include/asm/pgtable_64.h | 1 + trunk/arch/sparc/include/asm/posix_types.h | 133 +- trunk/arch/sparc/include/asm/processor.h | 3 - trunk/arch/sparc/include/asm/processor_64.h | 3 - trunk/arch/sparc/include/asm/ptrace.h | 5 +- trunk/arch/sparc/include/asm/setup.h | 16 - trunk/arch/sparc/include/asm/switch_to.h | 8 - trunk/arch/sparc/include/asm/switch_to_32.h | 106 - trunk/arch/sparc/include/asm/switch_to_64.h | 72 - trunk/arch/sparc/include/asm/system.h | 8 + trunk/arch/sparc/include/asm/system_32.h | 284 ++ trunk/arch/sparc/include/asm/system_64.h | 331 +++ trunk/arch/sparc/include/asm/timer_32.h | 3 +- trunk/arch/sparc/include/asm/uaccess_64.h | 1 + trunk/arch/sparc/include/asm/vio.h | 9 +- trunk/arch/sparc/kernel/auxio_32.c | 1 - trunk/arch/sparc/kernel/devices.c | 2 +- trunk/arch/sparc/kernel/ds.c | 5 +- trunk/arch/sparc/kernel/irq.h | 1 - trunk/arch/sparc/kernel/irq_64.c | 1 + trunk/arch/sparc/kernel/kgdb_32.c | 1 - trunk/arch/sparc/kernel/module.c | 1 - trunk/arch/sparc/kernel/muldiv.c | 1 + trunk/arch/sparc/kernel/nmi.c | 1 - trunk/arch/sparc/kernel/pcr.c | 1 - trunk/arch/sparc/kernel/perf_event.c | 2 - trunk/arch/sparc/kernel/process_32.c | 2 +- trunk/arch/sparc/kernel/process_64.c | 1 + trunk/arch/sparc/kernel/ptrace_32.c | 2 +- trunk/arch/sparc/kernel/ptrace_64.c | 1 + trunk/arch/sparc/kernel/reboot.c | 2 +- trunk/arch/sparc/kernel/setup_32.c | 2 +- trunk/arch/sparc/kernel/setup_64.c | 2 +- trunk/arch/sparc/kernel/signal32.c | 1 - trunk/arch/sparc/kernel/signal_32.c | 1 - trunk/arch/sparc/kernel/signal_64.c | 2 - trunk/arch/sparc/kernel/sigutil_32.c | 1 - trunk/arch/sparc/kernel/sigutil_64.c | 1 - trunk/arch/sparc/kernel/sparc_ksyms_64.c | 2 +- trunk/arch/sparc/kernel/time_32.c | 1 + trunk/arch/sparc/kernel/traps_32.c | 1 + trunk/arch/sparc/kernel/traps_64.c | 2 +- trunk/arch/sparc/kernel/unaligned_32.c | 1 + trunk/arch/sparc/kernel/unaligned_64.c | 2 +- trunk/arch/sparc/kernel/vio.c | 8 +- trunk/arch/sparc/kernel/visemul.c | 2 +- trunk/arch/sparc/math-emu/math_64.c | 1 - trunk/arch/sparc/mm/btfixup.c | 1 + trunk/arch/sparc/mm/fault_32.c | 1 + trunk/arch/sparc/mm/init_32.c | 1 + trunk/arch/sparc/mm/init_64.c | 1 + trunk/arch/sparc/mm/init_64.h | 2 + trunk/arch/sparc/mm/loadmmu.c | 1 + trunk/arch/sparc/mm/tsb.c | 1 + trunk/arch/sparc/prom/console_32.c | 1 + trunk/arch/sparc/prom/console_64.c | 1 + trunk/arch/sparc/prom/misc_32.c | 1 + trunk/arch/sparc/prom/misc_64.c | 1 + trunk/arch/sparc/prom/p1275.c | 1 + trunk/arch/sparc/prom/ranges.c | 1 + trunk/arch/tile/include/asm/atomic.h | 2 +- trunk/arch/tile/include/asm/atomic_32.h | 1 - trunk/arch/tile/include/asm/atomic_64.h | 1 - trunk/arch/tile/include/asm/bitops_32.h | 1 + trunk/arch/tile/include/asm/bitops_64.h | 1 + trunk/arch/tile/include/asm/cacheflush.h | 11 +- trunk/arch/tile/include/asm/compat.h | 11 + trunk/arch/tile/include/asm/exec.h | 20 - trunk/arch/tile/include/asm/pgtable.h | 1 + trunk/arch/tile/include/asm/setup.h | 22 - trunk/arch/tile/include/asm/smp.h | 7 + trunk/arch/tile/include/asm/spinlock_32.h | 1 + trunk/arch/tile/include/asm/switch_to.h | 76 - .../tile/include/asm/{barrier.h => system.h} | 121 +- trunk/arch/tile/include/asm/timex.h | 2 - trunk/arch/tile/include/asm/unaligned.h | 15 - trunk/arch/tile/kernel/compat.c | 43 + trunk/arch/tile/kernel/early_printk.c | 1 - trunk/arch/tile/kernel/proc.c | 1 - trunk/arch/tile/kernel/process.c | 3 +- trunk/arch/tile/kernel/regs_32.S | 2 +- trunk/arch/tile/kernel/regs_64.S | 2 +- trunk/arch/tile/kernel/single_step.c | 1 - trunk/arch/tile/kernel/smp.c | 19 + trunk/arch/tile/kernel/traps.c | 1 - trunk/arch/tile/mm/elf.c | 1 - trunk/arch/tile/mm/fault.c | 1 + trunk/arch/tile/mm/init.c | 1 + trunk/arch/tile/mm/pgtable.c | 1 + trunk/arch/um/include/asm/fixmap.h | 1 + trunk/arch/unicore32/include/asm/Kbuild | 1 + trunk/arch/unicore32/include/asm/barrier.h | 28 - trunk/arch/unicore32/include/asm/bug.h | 27 - trunk/arch/unicore32/include/asm/cmpxchg.h | 61 - trunk/arch/unicore32/include/asm/exec.h | 15 - .../arch/unicore32/include/asm/hwdef-copro.h | 48 - trunk/arch/unicore32/include/asm/io.h | 1 + trunk/arch/unicore32/include/asm/switch_to.h | 30 - trunk/arch/unicore32/include/asm/system.h | 161 ++ trunk/arch/unicore32/include/asm/uaccess.h | 1 + trunk/arch/unicore32/kernel/dma.c | 1 + trunk/arch/unicore32/kernel/head.S | 2 +- trunk/arch/unicore32/kernel/hibernate.c | 1 + trunk/arch/unicore32/kernel/irq.c | 1 + trunk/arch/unicore32/kernel/ksyms.c | 1 + trunk/arch/unicore32/kernel/process.c | 1 + trunk/arch/unicore32/kernel/setup.h | 3 - trunk/arch/unicore32/kernel/traps.c | 1 + trunk/arch/unicore32/mm/alignment.c | 2 - trunk/arch/unicore32/mm/fault.c | 1 + trunk/arch/unicore32/mm/flush.c | 1 + trunk/arch/unicore32/mm/mm.h | 5 - trunk/arch/x86/Kconfig | 30 +- trunk/arch/x86/Makefile | 16 - trunk/arch/x86/configs/i386_defconfig | 64 +- trunk/arch/x86/configs/x86_64_defconfig | 67 +- trunk/arch/x86/ia32/ia32_aout.c | 1 + trunk/arch/x86/ia32/ia32_signal.c | 24 +- trunk/arch/x86/ia32/sys_ia32.c | 40 + trunk/arch/x86/include/asm/Kbuild | 2 - trunk/arch/x86/include/asm/apic.h | 3 +- trunk/arch/x86/include/asm/auxvec.h | 7 - trunk/arch/x86/include/asm/barrier.h | 116 - trunk/arch/x86/include/asm/bug.h | 4 - trunk/arch/x86/include/asm/cacheflush.h | 1 - trunk/arch/x86/include/asm/compat.h | 40 +- trunk/arch/x86/include/asm/elf.h | 32 +- trunk/arch/x86/include/asm/exec.h | 1 - trunk/arch/x86/include/asm/futex.h | 1 + trunk/arch/x86/include/asm/i387.h | 1 + trunk/arch/x86/include/asm/ia32.h | 18 - trunk/arch/x86/include/asm/idle.h | 1 - trunk/arch/x86/include/asm/io_apic.h | 9 - trunk/arch/x86/include/asm/kvm.h | 4 - trunk/arch/x86/include/asm/kvm_emulate.h | 3 +- trunk/arch/x86/include/asm/kvm_host.h | 63 +- trunk/arch/x86/include/asm/local.h | 1 + trunk/arch/x86/include/asm/mc146818rtc.h | 1 + trunk/arch/x86/include/asm/mtrr.h | 28 +- trunk/arch/x86/include/asm/page_types.h | 1 + trunk/arch/x86/include/asm/perf_event.h | 1 - trunk/arch/x86/include/asm/posix_types.h | 4 +- trunk/arch/x86/include/asm/posix_types_32.h | 75 +- trunk/arch/x86/include/asm/posix_types_64.h | 106 +- trunk/arch/x86/include/asm/posix_types_x32.h | 19 - trunk/arch/x86/include/asm/processor.h | 43 +- trunk/arch/x86/include/asm/ptrace.h | 1 + trunk/arch/x86/include/asm/segment.h | 58 +- trunk/arch/x86/include/asm/sigcontext.h | 57 +- trunk/arch/x86/include/asm/sigframe.h | 13 - trunk/arch/x86/include/asm/sighandling.h | 24 - trunk/arch/x86/include/asm/special_insns.h | 199 -- trunk/arch/x86/include/asm/stackprotector.h | 1 + trunk/arch/x86/include/asm/switch_to.h | 129 - trunk/arch/x86/include/asm/sys_ia32.h | 7 +- trunk/arch/x86/include/asm/syscall.h | 5 +- trunk/arch/x86/include/asm/system.h | 523 ++++ trunk/arch/x86/include/asm/thread_info.h | 18 +- trunk/arch/x86/include/asm/tlbflush.h | 2 +- trunk/arch/x86/include/asm/traps.h | 25 - trunk/arch/x86/include/asm/tsc.h | 4 +- trunk/arch/x86/include/asm/unistd.h | 15 +- trunk/arch/x86/include/asm/vgtod.h | 17 +- trunk/arch/x86/include/asm/virtext.h | 1 + trunk/arch/x86/include/asm/x2apic.h | 5 - trunk/arch/x86/include/asm/x86_init.h | 6 - trunk/arch/x86/kernel/acpi/boot.c | 2 +- trunk/arch/x86/kernel/acpi/cstate.c | 1 - trunk/arch/x86/kernel/apic/apic.c | 13 +- trunk/arch/x86/kernel/apic/apic_numachip.c | 3 +- trunk/arch/x86/kernel/apic/io_apic.c | 159 +- trunk/arch/x86/kernel/apic/x2apic_cluster.c | 2 +- trunk/arch/x86/kernel/apic/x2apic_phys.c | 2 +- trunk/arch/x86/kernel/apic/x2apic_uv_x.c | 7 +- trunk/arch/x86/kernel/apm_32.c | 1 + trunk/arch/x86/kernel/asm-offsets_64.c | 6 - trunk/arch/x86/kernel/cpu/common.c | 2 +- trunk/arch/x86/kernel/cpu/mcheck/p5.c | 1 + .../arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 + trunk/arch/x86/kernel/cpu/mcheck/winchip.c | 1 + trunk/arch/x86/kernel/cpu/mtrr/generic.c | 1 + trunk/arch/x86/kernel/cpu/mtrr/if.c | 10 +- trunk/arch/x86/kernel/cpu/perf_event.c | 4 +- trunk/arch/x86/kernel/cpuid.c | 1 + trunk/arch/x86/kernel/dumpstack.c | 9 +- trunk/arch/x86/kernel/entry_64.S | 44 - trunk/arch/x86/kernel/i8259.c | 1 + trunk/arch/x86/kernel/irqinit.c | 3 +- trunk/arch/x86/kernel/kgdb.c | 1 + trunk/arch/x86/kernel/kvmclock.c | 15 +- trunk/arch/x86/kernel/ldt.c | 1 + trunk/arch/x86/kernel/machine_kexec_32.c | 1 + trunk/arch/x86/kernel/mca_32.c | 1 + trunk/arch/x86/kernel/module.c | 1 + trunk/arch/x86/kernel/msr.c | 1 + trunk/arch/x86/kernel/paravirt.c | 1 - trunk/arch/x86/kernel/pci-calgary_64.c | 1 + trunk/arch/x86/kernel/process.c | 115 +- trunk/arch/x86/kernel/process_32.c | 60 +- trunk/arch/x86/kernel/process_64.c | 136 +- trunk/arch/x86/kernel/ptrace.c | 103 +- trunk/arch/x86/kernel/setup.c | 12 +- trunk/arch/x86/kernel/signal.c | 140 +- trunk/arch/x86/kernel/smpboot.c | 6 +- trunk/arch/x86/kernel/sys_x86_64.c | 6 +- trunk/arch/x86/kernel/syscall_64.c | 8 - trunk/arch/x86/kernel/tce_64.c | 1 - trunk/arch/x86/kernel/tls.c | 5 +- trunk/arch/x86/kernel/traps.c | 134 +- trunk/arch/x86/kernel/tsc.c | 14 +- trunk/arch/x86/kernel/vm86_32.c | 2 +- trunk/arch/x86/kernel/vsyscall_64.c | 27 +- trunk/arch/x86/kernel/x86_init.c | 5 +- trunk/arch/x86/kvm/cpuid.c | 2 +- trunk/arch/x86/kvm/cpuid.h | 8 - trunk/arch/x86/kvm/emulate.c | 112 +- trunk/arch/x86/kvm/i8259.c | 1 - trunk/arch/x86/kvm/lapic.c | 4 +- trunk/arch/x86/kvm/mmu.c | 85 +- trunk/arch/x86/kvm/mmu_audit.c | 4 +- trunk/arch/x86/kvm/pmu.c | 10 +- trunk/arch/x86/kvm/svm.c | 119 +- trunk/arch/x86/kvm/vmx.c | 53 +- trunk/arch/x86/kvm/x86.c | 403 +-- trunk/arch/x86/math-emu/fpu_entry.c | 5 +- trunk/arch/x86/mm/fault.c | 10 +- trunk/arch/x86/mm/init.c | 1 + trunk/arch/x86/mm/init_32.c | 1 + trunk/arch/x86/mm/init_64.c | 1 + trunk/arch/x86/mm/pgtable_32.c | 1 + trunk/arch/x86/mm/srat.c | 2 +- trunk/arch/x86/oprofile/backtrace.c | 2 +- .../arch/x86/platform/ce4100/falconfalls.dts | 7 +- trunk/arch/x86/platform/geode/Makefile | 1 - trunk/arch/x86/platform/geode/geos.c | 128 - trunk/arch/x86/platform/olpc/olpc.c | 97 - trunk/arch/x86/power/cpu.c | 4 +- trunk/arch/x86/power/hibernate_32.c | 1 + trunk/arch/x86/syscalls/Makefile | 22 +- trunk/arch/x86/syscalls/syscall_32.tbl | 2 +- trunk/arch/x86/syscalls/syscall_64.tbl | 579 ++-- trunk/arch/x86/um/sys_call_table_64.c | 3 - trunk/arch/x86/um/user-offsets.c | 2 - trunk/arch/x86/vdso/.gitignore | 2 - trunk/arch/x86/vdso/Makefile | 46 +- trunk/arch/x86/vdso/vclock_gettime.c | 135 +- trunk/arch/x86/vdso/vdso32-setup.c | 5 - trunk/arch/x86/vdso/vdsox32.S | 22 - trunk/arch/x86/vdso/vdsox32.lds.S | 28 - trunk/arch/x86/vdso/vma.c | 78 +- trunk/arch/xtensa/configs/iss_defconfig | 2 +- trunk/arch/xtensa/include/asm/atomic.h | 2 +- trunk/arch/xtensa/include/asm/barrier.h | 29 - trunk/arch/xtensa/include/asm/bitops.h | 1 + trunk/arch/xtensa/include/asm/exec.h | 14 - trunk/arch/xtensa/include/asm/posix_types.h | 97 +- trunk/arch/xtensa/include/asm/setup.h | 2 - trunk/arch/xtensa/include/asm/switch_to.h | 22 - .../include/asm/{cmpxchg.h => system.h} | 67 +- trunk/arch/xtensa/include/asm/uaccess.h | 2 - trunk/arch/xtensa/kernel/process.c | 1 + trunk/arch/xtensa/kernel/ptrace.c | 1 + trunk/arch/xtensa/kernel/setup.c | 1 + trunk/arch/xtensa/kernel/traps.c | 19 - trunk/arch/xtensa/mm/fault.c | 1 + trunk/arch/xtensa/mm/tlb.c | 1 + trunk/drivers/acpi/ec.c | 10 - trunk/drivers/acpi/processor_driver.c | 1 + trunk/drivers/acpi/video_detect.c | 2 +- trunk/drivers/atm/eni.c | 1 + trunk/drivers/atm/firestream.c | 1 + trunk/drivers/atm/horizon.c | 1 + trunk/drivers/atm/idt77105.c | 1 + trunk/drivers/atm/iphase.c | 1 + trunk/drivers/atm/suni.c | 1 + trunk/drivers/atm/zatm.c | 1 + trunk/drivers/base/dma-buf.c | 165 +- trunk/drivers/block/floppy.c | 1 + trunk/drivers/block/hd.c | 1 + trunk/drivers/block/nbd.c | 296 +-- trunk/drivers/block/sunvdc.c | 5 +- trunk/drivers/block/xd.c | 1 + trunk/drivers/bluetooth/bt3c_cs.c | 1 + trunk/drivers/bluetooth/btuart_cs.c | 1 + trunk/drivers/bluetooth/dtl1_cs.c | 1 + trunk/drivers/char/apm-emulation.c | 1 + trunk/drivers/char/ds1302.c | 1 + trunk/drivers/char/efirtc.c | 1 + trunk/drivers/char/genrtc.c | 1 + trunk/drivers/char/hpet.c | 1 + trunk/drivers/char/ipmi/ipmi_devintf.c | 1 + trunk/drivers/char/ipmi/ipmi_kcs_sm.c | 4 +- trunk/drivers/char/ipmi/ipmi_msghandler.c | 243 +- trunk/drivers/char/ipmi/ipmi_si_intf.c | 73 +- trunk/drivers/char/ipmi/ipmi_watchdog.c | 25 +- trunk/drivers/char/lp.c | 6 +- trunk/drivers/char/mbcs.c | 1 + trunk/drivers/char/mspec.c | 1 + trunk/drivers/char/mwave/3780i.c | 1 + trunk/drivers/char/nvram.c | 1 + trunk/drivers/char/nwflash.c | 1 + trunk/drivers/char/pcmcia/synclink_cs.c | 1 + trunk/drivers/char/rtc.c | 1 + trunk/drivers/char/sonypi.c | 1 + .../char/xilinx_hwicap/xilinx_hwicap.c | 1 + trunk/drivers/clocksource/Kconfig | 1 + trunk/drivers/cpufreq/db8500-cpufreq.c | 13 +- trunk/drivers/cpufreq/omap-cpufreq.c | 1 + trunk/drivers/cpufreq/powernow-k7.c | 1 + trunk/drivers/dma/Kconfig | 3 +- trunk/drivers/dma/amba-pl08x.c | 46 +- trunk/drivers/dma/at_hdmac.c | 111 +- trunk/drivers/dma/at_hdmac_regs.h | 34 +- trunk/drivers/dma/coh901318.c | 41 +- trunk/drivers/dma/dmaengine.c | 8 +- trunk/drivers/dma/dmaengine.h | 89 - trunk/drivers/dma/dw_dmac.c | 228 +- trunk/drivers/dma/dw_dmac_regs.h | 16 +- trunk/drivers/dma/ep93xx_dma.c | 31 +- trunk/drivers/dma/fsldma.c | 28 +- trunk/drivers/dma/fsldma.h | 1 + trunk/drivers/dma/imx-dma.c | 950 +------ trunk/drivers/dma/imx-sdma.c | 187 +- trunk/drivers/dma/intel_mid_dma.c | 46 +- trunk/drivers/dma/intel_mid_dma_regs.h | 2 + trunk/drivers/dma/ioat/dma.c | 21 +- trunk/drivers/dma/ioat/dma.h | 23 + trunk/drivers/dma/ioat/dma_v2.c | 13 +- trunk/drivers/dma/ioat/dma_v3.c | 12 +- trunk/drivers/dma/iop-adma.c | 52 +- trunk/drivers/dma/ipu/ipu_idmac.c | 25 +- trunk/drivers/dma/mpc512x_dma.c | 25 +- trunk/drivers/dma/mv_xor.c | 34 +- trunk/drivers/dma/mv_xor.h | 3 + trunk/drivers/dma/mxs-dma.c | 28 +- trunk/drivers/dma/pch_dma.c | 37 +- trunk/drivers/dma/pl330.c | 2321 +---------------- trunk/drivers/dma/ppc4xx/adma.c | 49 +- trunk/drivers/dma/ppc4xx/adma.h | 2 + trunk/drivers/dma/shdma.c | 33 +- trunk/drivers/dma/shdma.h | 1 + trunk/drivers/dma/sirf-dma.c | 27 +- trunk/drivers/dma/ste_dma40.c | 41 +- trunk/drivers/dma/timb_dma.c | 37 +- trunk/drivers/dma/txx9dmac.c | 43 +- trunk/drivers/dma/txx9dmac.h | 1 + trunk/drivers/edac/Kconfig | 2 +- trunk/drivers/edac/edac_mc.c | 6 +- trunk/drivers/edac/i5100_edac.c | 13 +- trunk/drivers/edac/i5400_edac.c | 54 +- trunk/drivers/edac/ppc4xx_edac.c | 4 +- trunk/drivers/edac/sb_edac.c | 52 +- trunk/drivers/firewire/core-cdev.c | 1 + trunk/drivers/firewire/core-device.c | 1 + trunk/drivers/firewire/core-topology.c | 1 + trunk/drivers/firewire/ohci.c | 1 + trunk/drivers/firewire/sbp2.c | 1 + trunk/drivers/gpio/Kconfig | 14 - trunk/drivers/gpio/Makefile | 2 - trunk/drivers/gpio/gpio-davinci.c | 26 +- trunk/drivers/gpio/gpio-ep93xx.c | 8 + trunk/drivers/gpio/gpio-lpc32xx.c | 19 +- trunk/drivers/gpio/gpio-mc9s08dz60.c | 161 -- trunk/drivers/gpio/gpio-omap.c | 291 +-- trunk/drivers/gpio/gpio-pl061.c | 7 +- trunk/drivers/gpio/gpio-pxa.c | 2 - trunk/drivers/gpio/gpio-sodaville.c | 302 --- trunk/drivers/gpio/gpio-stmpe.c | 43 +- trunk/drivers/gpio/gpio-tegra.c | 4 +- trunk/drivers/gpio/gpio-tps65910.c | 20 +- trunk/drivers/gpio/gpio-twl4030.c | 111 +- trunk/drivers/gpio/gpiolib.c | 98 +- .../drivers/gpu/drm/gma500/mdfld_dsi_output.c | 5 +- trunk/drivers/gpu/drm/i915/i915_drv.c | 7 - trunk/drivers/gpu/drm/i915/intel_drv.h | 2 +- trunk/drivers/gpu/drm/i915/intel_fb.c | 10 - .../gpu/drm/nouveau/nouveau_connector.c | 9 +- trunk/drivers/gpu/drm/nouveau/nouveau_i2c.c | 6 +- trunk/drivers/gpu/drm/nouveau/nouveau_state.c | 2 +- trunk/drivers/gpu/drm/radeon/atombios_crtc.c | 8 +- trunk/drivers/gpu/drm/radeon/atombios_dp.c | 3 - .../gpu/drm/radeon/atombios_encoders.c | 4 +- trunk/drivers/gpu/drm/radeon/evergreen_cs.c | 98 +- trunk/drivers/gpu/drm/radeon/evergreend.h | 8 - trunk/drivers/gpu/drm/radeon/r600_cs.c | 391 +-- trunk/drivers/gpu/drm/radeon/r600d.h | 8 - trunk/drivers/gpu/drm/radeon/radeon_object.c | 12 +- trunk/drivers/gpu/drm/radeon/reg_srcs/cayman | 1 + .../drivers/gpu/drm/radeon/reg_srcs/evergreen | 1 + trunk/drivers/gpu/drm/radeon/reg_srcs/r600 | 1 + trunk/drivers/hwmon/fschmd.c | 4 +- trunk/drivers/hwmon/mc13783-adc.c | 2 +- trunk/drivers/hwmon/w83793.c | 4 +- trunk/drivers/i2c/algos/i2c-algo-bit.c | 5 +- trunk/drivers/i2c/algos/i2c-algo-pca.c | 3 +- trunk/drivers/i2c/algos/i2c-algo-pcf.c | 3 +- trunk/drivers/i2c/algos/i2c-algo-pcf.h | 3 +- trunk/drivers/i2c/busses/Kconfig | 1 - trunk/drivers/i2c/busses/i2c-acorn.c | 1 + trunk/drivers/i2c/busses/i2c-i801.c | 27 +- trunk/drivers/i2c/busses/i2c-isch.c | 10 +- trunk/drivers/i2c/i2c-boardinfo.c | 3 +- trunk/drivers/i2c/i2c-core.c | 3 +- trunk/drivers/i2c/i2c-core.h | 3 +- trunk/drivers/i2c/i2c-dev.c | 3 +- trunk/drivers/i2c/i2c-smbus.c | 3 +- trunk/drivers/i2c/muxes/pca9541.c | 13 +- trunk/drivers/i2c/muxes/pca954x.c | 13 +- trunk/drivers/ide/ide-cs.c | 1 + trunk/drivers/ide/qd65xx.c | 1 + trunk/drivers/infiniband/hw/ehca/ehca_reqs.c | 1 + trunk/drivers/input/input-compat.c | 4 +- trunk/drivers/input/input-compat.h | 2 +- trunk/drivers/input/joydev.c | 1 + trunk/drivers/input/joystick/amijoy.c | 1 + trunk/drivers/input/misc/88pm860x_onkey.c | 26 - trunk/drivers/input/mouse/amimouse.c | 1 + trunk/drivers/input/mouse/atarimouse.c | 1 + trunk/drivers/input/serio/hp_sdc.c | 1 + trunk/drivers/input/serio/maceps2.c | 1 + trunk/drivers/input/serio/rpckbd.c | 1 + trunk/drivers/input/serio/sa1111ps2.c | 1 + trunk/drivers/input/touchscreen/mc13783_ts.c | 11 +- trunk/drivers/isdn/hardware/avm/avm_cs.c | 1 + trunk/drivers/isdn/hisax/avma1_cs.c | 1 + trunk/drivers/isdn/hisax/elsa_cs.c | 1 + trunk/drivers/isdn/hisax/sedlbauer_cs.c | 1 + trunk/drivers/isdn/hisax/teles_cs.c | 1 + trunk/drivers/isdn/i4l/isdn_bsdcomp.c | 1 + trunk/drivers/isdn/pcbit/layer2.c | 1 + trunk/drivers/leds/leds-88pm860x.c | 23 - trunk/drivers/macintosh/macio-adb.c | 1 + trunk/drivers/macintosh/therm_adt746x.c | 1 + trunk/drivers/macintosh/therm_pm72.c | 1 + trunk/drivers/macintosh/therm_windtunnel.c | 1 + trunk/drivers/macintosh/via-cuda.c | 1 + trunk/drivers/macintosh/via-macii.c | 1 + trunk/drivers/macintosh/via-pmu.c | 1 + trunk/drivers/macintosh/via-pmu68k.c | 1 + .../drivers/macintosh/windfarm_lm75_sensor.c | 1 + trunk/drivers/macintosh/windfarm_pm121.c | 1 + trunk/drivers/macintosh/windfarm_pm81.c | 1 + trunk/drivers/macintosh/windfarm_pm91.c | 1 + .../drivers/macintosh/windfarm_smu_controls.c | 1 + .../drivers/macintosh/windfarm_smu_sensors.c | 1 + trunk/drivers/md/Kconfig | 28 +- trunk/drivers/md/Makefile | 1 - trunk/drivers/md/dm-bufio.c | 108 +- trunk/drivers/md/dm-bufio.h | 8 - trunk/drivers/md/dm-crypt.c | 46 +- trunk/drivers/md/dm-delay.c | 9 +- trunk/drivers/md/dm-exception-store.c | 2 +- trunk/drivers/md/dm-flakey.c | 3 +- trunk/drivers/md/dm-ioctl.c | 5 +- trunk/drivers/md/dm-linear.c | 3 +- trunk/drivers/md/dm-log.c | 3 +- trunk/drivers/md/dm-mpath.c | 52 +- trunk/drivers/md/dm-queue-length.c | 3 +- trunk/drivers/md/dm-raid.c | 53 +- trunk/drivers/md/dm-raid1.c | 12 +- trunk/drivers/md/dm-round-robin.c | 3 +- trunk/drivers/md/dm-service-time.c | 5 +- trunk/drivers/md/dm-stripe.c | 3 +- trunk/drivers/md/dm-table.c | 9 +- trunk/drivers/md/dm-thin-metadata.c | 5 +- trunk/drivers/md/dm-thin-metadata.h | 13 - trunk/drivers/md/dm-thin.c | 680 ++--- trunk/drivers/md/dm-verity.c | 913 ------- trunk/drivers/md/dm.c | 1 - .../md/persistent-data/dm-btree-internal.h | 7 +- .../md/persistent-data/dm-btree-remove.c | 202 +- trunk/drivers/md/persistent-data/dm-btree.c | 27 +- .../md/persistent-data/dm-space-map-common.c | 3 + trunk/drivers/media/dvb/dvb-core/dmxdev.c | 1 + trunk/drivers/media/dvb/firewire/firedtv-fw.c | 1 + trunk/drivers/media/dvb/ttpci/av7110.c | 1 + trunk/drivers/media/media-devnode.c | 1 + trunk/drivers/media/video/davinci/vpbe_osd.c | 1 + trunk/drivers/media/video/davinci/vpbe_venc.c | 1 + trunk/drivers/media/video/ivtv/ivtv-driver.h | 1 + trunk/drivers/media/video/mx3_camera.c | 2 +- trunk/drivers/media/video/timblogiw.c | 2 +- trunk/drivers/media/video/v4l2-common.c | 1 + trunk/drivers/media/video/v4l2-dev.c | 1 + trunk/drivers/message/i2o/i2o_scsi.c | 1 + trunk/drivers/mfd/88pm860x-core.c | 110 +- trunk/drivers/mfd/88pm860x-i2c.c | 25 - trunk/drivers/mfd/Kconfig | 54 +- trunk/drivers/mfd/Makefile | 4 - trunk/drivers/mfd/ab8500-core.c | 375 +-- trunk/drivers/mfd/ab8500-i2c.c | 30 +- trunk/drivers/mfd/anatop-mfd.c | 137 - trunk/drivers/mfd/asic3.c | 6 - trunk/drivers/mfd/da9052-core.c | 3 + trunk/drivers/mfd/da9052-i2c.c | 11 +- trunk/drivers/mfd/da9052-spi.c | 9 +- trunk/drivers/mfd/db8500-prcmu.c | 1220 +++------ trunk/drivers/mfd/dbx500-prcmu-regs.h | 130 +- trunk/drivers/mfd/mc13xxx-core.c | 11 +- trunk/drivers/mfd/mcp-core.c | 2 + trunk/drivers/mfd/mcp-sa11x0.c | 1 + trunk/drivers/mfd/mfd-core.c | 2 +- trunk/drivers/mfd/omap-usb-host.c | 7 +- trunk/drivers/mfd/pcf50633-core.c | 8 +- trunk/drivers/mfd/pcf50633-gpio.c | 27 +- trunk/drivers/mfd/pcf50633-irq.c | 7 +- trunk/drivers/mfd/rc5t583-irq.c | 408 --- trunk/drivers/mfd/rc5t583.c | 386 --- trunk/drivers/mfd/s5m-core.c | 58 +- trunk/drivers/mfd/s5m-irq.c | 14 +- trunk/drivers/mfd/sm501.c | 10 +- trunk/drivers/mfd/stmpe.c | 134 +- trunk/drivers/mfd/tps65090.c | 387 --- trunk/drivers/mfd/tps65217.c | 242 -- trunk/drivers/mfd/tps65910-irq.c | 11 - trunk/drivers/mfd/tps65910.c | 123 +- trunk/drivers/mfd/twl-core.c | 153 +- trunk/drivers/mfd/twl-core.h | 4 +- trunk/drivers/mfd/twl4030-irq.c | 107 +- trunk/drivers/mfd/twl6030-irq.c | 86 +- trunk/drivers/mfd/wm831x-spi.c | 2 +- trunk/drivers/mfd/wm8400-core.c | 3 +- trunk/drivers/mfd/wm8994-core.c | 2 +- trunk/drivers/mfd/wm8994-regmap.c | 20 +- trunk/drivers/misc/sgi-gru/gru_instructions.h | 1 - trunk/drivers/misc/sgi-xp/xp.h | 1 + trunk/drivers/mmc/card/block.c | 22 +- trunk/drivers/mmc/core/cd-gpio.c | 13 +- trunk/drivers/mmc/core/core.c | 252 +- trunk/drivers/mmc/core/host.c | 1 + trunk/drivers/mmc/core/host.h | 1 + trunk/drivers/mmc/core/mmc.c | 55 +- trunk/drivers/mmc/core/mmc_ops.c | 12 +- trunk/drivers/mmc/host/Kconfig | 25 - trunk/drivers/mmc/host/Makefile | 2 - trunk/drivers/mmc/host/atmel-mci.c | 23 +- trunk/drivers/mmc/host/davinci_mmc.c | 66 +- trunk/drivers/mmc/host/dw_mmc-pci.c | 158 -- trunk/drivers/mmc/host/dw_mmc-pltfm.c | 134 - trunk/drivers/mmc/host/dw_mmc.c | 280 +- trunk/drivers/mmc/host/dw_mmc.h | 7 - trunk/drivers/mmc/host/mmci.c | 4 +- trunk/drivers/mmc/host/mxcmmc.c | 5 +- trunk/drivers/mmc/host/mxs-mmc.c | 2 +- trunk/drivers/mmc/host/omap_hsmmc.c | 293 ++- trunk/drivers/mmc/host/sdhci-of-esdhc.c | 37 +- trunk/drivers/mmc/host/sdhci-pci.c | 47 +- trunk/drivers/mmc/host/sdhci-spear.c | 9 +- trunk/drivers/mmc/host/sdhci-tegra.c | 100 +- trunk/drivers/mmc/host/sdhci.c | 38 +- trunk/drivers/mmc/host/sdhci.h | 2 - trunk/drivers/mmc/host/sh_mmcif.c | 6 +- trunk/drivers/mmc/host/sh_mobile_sdhi.c | 29 +- trunk/drivers/mmc/host/tmio_mmc.h | 9 +- trunk/drivers/mmc/host/tmio_mmc_dma.c | 4 +- trunk/drivers/mmc/host/tmio_mmc_pio.c | 108 +- trunk/drivers/mtd/devices/pmc551.c | 1 + trunk/drivers/mtd/devices/slram.c | 1 + trunk/drivers/mtd/maps/pcmciamtd.c | 1 + trunk/drivers/mtd/nand/bcm_umi_nand.c | 1 + trunk/drivers/mtd/nand/gpmi-nand/gpmi-lib.c | 25 +- trunk/drivers/net/appletalk/cops.c | 1 + trunk/drivers/net/appletalk/ltpc.c | 1 + trunk/drivers/net/arcnet/com20020_cs.c | 1 + trunk/drivers/net/bonding/bond_main.c | 1 + trunk/drivers/net/can/slcan.c | 1 + trunk/drivers/net/cris/eth_v10.c | 1 + trunk/drivers/net/ethernet/3com/3c574_cs.c | 1 + trunk/drivers/net/ethernet/3com/3c589_cs.c | 1 + trunk/drivers/net/ethernet/8390/3c503.c | 1 + trunk/drivers/net/ethernet/8390/ac3200.c | 1 + trunk/drivers/net/ethernet/8390/apne.c | 1 + trunk/drivers/net/ethernet/8390/ax88796.c | 1 + trunk/drivers/net/ethernet/8390/axnet_cs.c | 1 + trunk/drivers/net/ethernet/8390/e2100.c | 1 + trunk/drivers/net/ethernet/8390/es3210.c | 1 + trunk/drivers/net/ethernet/8390/etherh.c | 2 +- trunk/drivers/net/ethernet/8390/hp-plus.c | 1 + trunk/drivers/net/ethernet/8390/hp.c | 1 + trunk/drivers/net/ethernet/8390/lib8390.c | 1 + trunk/drivers/net/ethernet/8390/lne390.c | 1 + trunk/drivers/net/ethernet/8390/mac8390.c | 1 + trunk/drivers/net/ethernet/8390/ne-h8300.c | 1 + trunk/drivers/net/ethernet/8390/ne.c | 1 + trunk/drivers/net/ethernet/8390/ne2.c | 1 + trunk/drivers/net/ethernet/8390/ne2k-pci.c | 1 + trunk/drivers/net/ethernet/8390/ne3210.c | 1 + trunk/drivers/net/ethernet/8390/pcnet_cs.c | 1 + trunk/drivers/net/ethernet/8390/smc-mca.c | 1 + trunk/drivers/net/ethernet/8390/smc-ultra.c | 1 + trunk/drivers/net/ethernet/8390/smc-ultra32.c | 1 + trunk/drivers/net/ethernet/8390/stnic.c | 1 + trunk/drivers/net/ethernet/8390/wd.c | 1 + trunk/drivers/net/ethernet/8390/zorro8390.c | 1 + trunk/drivers/net/ethernet/alteon/acenic.c | 1 + trunk/drivers/net/ethernet/amd/7990.c | 1 + trunk/drivers/net/ethernet/amd/am79c961a.c | 1 + trunk/drivers/net/ethernet/amd/amd8111e.c | 1 + trunk/drivers/net/ethernet/amd/declance.c | 1 + trunk/drivers/net/ethernet/amd/hplance.c | 1 + trunk/drivers/net/ethernet/amd/mvme147.c | 1 + trunk/drivers/net/ethernet/amd/nmclan_cs.c | 1 + trunk/drivers/net/ethernet/amd/sunlance.c | 1 + trunk/drivers/net/ethernet/broadcom/tg3.c | 1 + trunk/drivers/net/ethernet/cirrus/cs89x0.c | 1 + trunk/drivers/net/ethernet/cirrus/mac89x0.c | 1 + trunk/drivers/net/ethernet/dlink/de600.c | 1 + trunk/drivers/net/ethernet/dlink/de620.c | 1 + trunk/drivers/net/ethernet/fujitsu/at1700.c | 1 + trunk/drivers/net/ethernet/fujitsu/eth16i.c | 1 + .../drivers/net/ethernet/fujitsu/fmvj18x_cs.c | 1 + trunk/drivers/net/ethernet/i825xx/3c507.c | 1 + trunk/drivers/net/ethernet/i825xx/3c527.c | 1 + trunk/drivers/net/ethernet/i825xx/eepro.c | 1 + trunk/drivers/net/ethernet/i825xx/eexpress.c | 1 + trunk/drivers/net/ethernet/i825xx/ether1.c | 1 + trunk/drivers/net/ethernet/i825xx/znet.c | 1 + trunk/drivers/net/ethernet/ibm/ibmveth.c | 7 +- trunk/drivers/net/ethernet/korina.c | 1 + .../net/ethernet/marvell/mv643xx_eth.c | 1 + .../drivers/net/ethernet/marvell/pxa168_eth.c | 1 + trunk/drivers/net/ethernet/micrel/ks8842.c | 4 +- .../drivers/net/ethernet/natsemi/jazzsonic.c | 1 + trunk/drivers/net/ethernet/natsemi/macsonic.c | 1 + trunk/drivers/net/ethernet/natsemi/ns83820.c | 1 + trunk/drivers/net/ethernet/neterion/s2io.c | 1 + trunk/drivers/net/ethernet/nvidia/forcedeth.c | 1 + trunk/drivers/net/ethernet/realtek/atp.c | 1 + trunk/drivers/net/ethernet/realtek/r8169.c | 1 + trunk/drivers/net/ethernet/seeq/ether3.c | 1 + trunk/drivers/net/ethernet/seeq/seeq8005.c | 1 + trunk/drivers/net/ethernet/smsc/smc91c92_cs.c | 1 + trunk/drivers/net/ethernet/sun/cassini.c | 1 + trunk/drivers/net/ethernet/sun/sunbmac.c | 1 + trunk/drivers/net/ethernet/sun/sungem.c | 1 + trunk/drivers/net/ethernet/sun/sunhme.c | 1 + trunk/drivers/net/ethernet/sun/sunqe.c | 1 + trunk/drivers/net/ethernet/sun/sunvnet.c | 5 +- .../drivers/net/ethernet/tundra/tsi108_eth.c | 1 + .../drivers/net/ethernet/xircom/xirc2ps_cs.c | 1 + trunk/drivers/net/hamradio/6pack.c | 1 + trunk/drivers/net/hamradio/baycom_par.c | 1 + trunk/drivers/net/hamradio/bpqether.c | 1 + trunk/drivers/net/hamradio/mkiss.c | 1 + trunk/drivers/net/hamradio/scc.c | 1 + trunk/drivers/net/hamradio/yam.c | 1 + trunk/drivers/net/hippi/rrunner.c | 1 + trunk/drivers/net/irda/donauboe.c | 1 + trunk/drivers/net/loopback.c | 1 + trunk/drivers/net/plip/plip.c | 1 + trunk/drivers/net/slip/slhc.c | 1 + trunk/drivers/net/slip/slip.c | 1 + trunk/drivers/net/tokenring/3c359.c | 1 + trunk/drivers/net/tokenring/abyss.c | 1 + trunk/drivers/net/tokenring/ibmtr_cs.c | 1 + trunk/drivers/net/tokenring/lanstreamer.c | 1 + trunk/drivers/net/tokenring/madgemc.c | 1 + trunk/drivers/net/tokenring/olympic.c | 1 + trunk/drivers/net/tokenring/proteon.c | 1 + trunk/drivers/net/tokenring/skisa.c | 1 + trunk/drivers/net/tokenring/smctr.c | 1 + trunk/drivers/net/tokenring/tms380tr.c | 1 + trunk/drivers/net/tokenring/tmspci.c | 1 + trunk/drivers/net/tun.c | 1 + trunk/drivers/net/wan/dlci.c | 1 + trunk/drivers/net/wan/dscc4.c | 1 + trunk/drivers/net/wan/hd64570.c | 1 + trunk/drivers/net/wan/hd64572.c | 1 + trunk/drivers/net/wan/lapbether.c | 1 + trunk/drivers/net/wan/sdla.c | 1 + trunk/drivers/net/wan/x25_asy.c | 1 + trunk/drivers/net/wireless/airo.c | 1 + trunk/drivers/net/wireless/airo_cs.c | 1 + trunk/drivers/net/wireless/atmel.c | 1 + trunk/drivers/net/wireless/atmel_cs.c | 1 + .../drivers/net/wireless/prism54/islpci_mgt.c | 1 + trunk/drivers/net/wireless/ray_cs.c | 1 + trunk/drivers/net/wireless/wl3501_cs.c | 1 + trunk/drivers/nubus/nubus.c | 1 + trunk/drivers/of/gpio.c | 11 +- trunk/drivers/parisc/dino.c | 1 + trunk/drivers/parisc/iosapic.c | 1 + trunk/drivers/parisc/lba_pci.c | 1 + trunk/drivers/pcmcia/at91_cf.c | 52 +- trunk/drivers/pcmcia/bcm63xx_pcmcia.c | 2 +- trunk/drivers/pcmcia/bfin_cf_pcmcia.c | 13 +- trunk/drivers/pcmcia/cs.c | 1 + trunk/drivers/pcmcia/db1xxx_ss.c | 17 +- trunk/drivers/pcmcia/electra_cf.c | 12 +- trunk/drivers/pcmcia/i82092.c | 12 +- trunk/drivers/pcmcia/i82365.c | 1 + trunk/drivers/pcmcia/m32r_cfc.c | 1 + trunk/drivers/pcmcia/m32r_pcc.c | 1 + trunk/drivers/pcmcia/m8xx_pcmcia.c | 14 +- trunk/drivers/pcmcia/pd6729.c | 10 +- trunk/drivers/pcmcia/pxa2xx_base.c | 1 + trunk/drivers/pcmcia/pxa2xx_viper.c | 13 +- trunk/drivers/pcmcia/sa11xx_base.c | 1 + trunk/drivers/pcmcia/soc_common.c | 1 + trunk/drivers/pcmcia/socket_sysfs.c | 1 + trunk/drivers/pcmcia/tcic.c | 1 + trunk/drivers/pcmcia/vrc4173_cardu.c | 7 +- trunk/drivers/pcmcia/xxs1500_ss.c | 14 +- trunk/drivers/pcmcia/yenta_socket.c | 2 +- trunk/drivers/platform/x86/Kconfig | 71 +- trunk/drivers/platform/x86/Makefile | 6 +- trunk/drivers/platform/x86/acer-wmi.c | 152 +- trunk/drivers/platform/x86/acerhdf.c | 19 +- trunk/drivers/platform/x86/amilo-rfkill.c | 5 +- trunk/drivers/platform/x86/apple-gmux.c | 244 -- trunk/drivers/platform/x86/asus-laptop.c | 273 +- trunk/drivers/platform/x86/asus-nb-wmi.c | 12 +- trunk/drivers/platform/x86/asus-wmi.c | 68 +- trunk/drivers/platform/x86/asus-wmi.h | 14 +- trunk/drivers/platform/x86/asus_acpi.c | 1513 +++++++++++ trunk/drivers/platform/x86/compal-laptop.c | 14 +- trunk/drivers/platform/x86/dell-laptop.c | 34 +- trunk/drivers/platform/x86/eeepc-laptop.c | 13 +- trunk/drivers/platform/x86/eeepc-wmi.c | 108 +- trunk/drivers/platform/x86/hdaps.c | 4 +- .../drivers/platform/x86/intel_mid_powerbtn.c | 12 +- .../drivers/platform/x86/intel_mid_thermal.c | 14 +- trunk/drivers/platform/x86/intel_oaktrail.c | 2 +- trunk/drivers/platform/x86/samsung-laptop.c | 1751 ++++--------- trunk/drivers/platform/x86/sony-laptop.c | 15 +- trunk/drivers/platform/x86/thinkpad_acpi.c | 2 +- trunk/drivers/platform/x86/toshiba_acpi.c | 254 +- trunk/drivers/platform/x86/xo1-rfkill.c | 13 +- trunk/drivers/pnp/pnpbios/bioscalls.c | 1 + trunk/drivers/pnp/pnpbios/core.c | 1 + trunk/drivers/rtc/interface.c | 5 - trunk/drivers/rtc/rtc-88pm860x.c | 27 - trunk/drivers/rtc/rtc-mpc5121.c | 2 - trunk/drivers/rtc/rtc-sa1100.c | 1 - trunk/drivers/s390/char/sclp_cmd.c | 1 - trunk/drivers/s390/cio/crw.c | 1 - trunk/drivers/s390/crypto/ap_bus.c | 2 +- trunk/drivers/sbus/char/flash.c | 1 + trunk/drivers/sbus/char/openprom.c | 1 + trunk/drivers/sbus/char/uctrl.c | 1 + trunk/drivers/scsi/53c700.c | 1 + trunk/drivers/scsi/BusLogic.c | 1 + trunk/drivers/scsi/advansys.c | 1 + trunk/drivers/scsi/aha152x.c | 1 + trunk/drivers/scsi/aha1542.c | 1 + trunk/drivers/scsi/aha1740.c | 1 + trunk/drivers/scsi/arcmsr/arcmsr_hba.c | 1 + trunk/drivers/scsi/arm/acornscsi.c | 1 + trunk/drivers/scsi/arm/cumana_1.c | 1 + trunk/drivers/scsi/arm/oak.c | 1 + trunk/drivers/scsi/atp870u.c | 1 + trunk/drivers/scsi/dtc.c | 1 + trunk/drivers/scsi/fd_mcs.c | 1 + trunk/drivers/scsi/fdomain.c | 1 + trunk/drivers/scsi/g_NCR5380.c | 1 + trunk/drivers/scsi/gdth.c | 1 + trunk/drivers/scsi/ibmmca.c | 1 + trunk/drivers/scsi/ibmvscsi/ibmvfc.c | 7 +- trunk/drivers/scsi/ibmvscsi/ibmvscsi.c | 7 +- trunk/drivers/scsi/ibmvscsi/ibmvstgt.c | 5 +- trunk/drivers/scsi/in2000.c | 1 + trunk/drivers/scsi/mac53c94.c | 1 + trunk/drivers/scsi/mac_scsi.c | 1 + trunk/drivers/scsi/mesh.c | 1 + trunk/drivers/scsi/ncr53c8xx.c | 1 + trunk/drivers/scsi/nsp32.c | 1 + trunk/drivers/scsi/osst.c | 1 + trunk/drivers/scsi/pas16.c | 1 + trunk/drivers/scsi/qla1280.c | 1 + trunk/drivers/scsi/qlogicpti.c | 1 + trunk/drivers/scsi/st.c | 1 + trunk/drivers/scsi/sun3_scsi.c | 1 + trunk/drivers/scsi/sun3_scsi_vme.c | 1 + trunk/drivers/scsi/sym53c416.c | 1 + trunk/drivers/scsi/t128.c | 1 + trunk/drivers/scsi/u14-34f.c | 1 + trunk/drivers/scsi/ultrastor.c | 1 + trunk/drivers/scsi/wd7000.c | 1 + trunk/drivers/sh/intc/balancing.c | 2 +- trunk/drivers/sh/intc/core.c | 2 +- trunk/drivers/sh/intc/handle.c | 2 +- trunk/drivers/sh/intc/virq.c | 2 +- trunk/drivers/spi/spi-dw-mid.c | 7 +- trunk/drivers/spi/spi-ep93xx.c | 4 +- trunk/drivers/spi/spi-omap-uwire.c | 1 + trunk/drivers/spi/spi-pl022.c | 6 +- trunk/drivers/spi/spi-topcliff-pch.c | 4 +- trunk/drivers/staging/android/binder.c | 13 +- trunk/drivers/staging/comedi/drivers.c | 1 + .../staging/comedi/drivers/cb_pcidas64.c | 1 + trunk/drivers/staging/comedi/drivers/mite.c | 1 + trunk/drivers/staging/crystalhd/bc_dts_defs.h | 2 - trunk/drivers/staging/crystalhd/crystalhd.h | 1 + .../drivers/staging/crystalhd/crystalhd_lnx.h | 1 + .../staging/crystalhd/crystalhd_misc.h | 1 - trunk/drivers/staging/et131x/et131x.c | 1 + .../staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 1 + .../staging/media/go7007/go7007-driver.c | 1 + .../drivers/staging/media/go7007/go7007-i2c.c | 1 + .../staging/media/go7007/go7007-v4l2.c | 1 + .../drivers/staging/media/go7007/snd-go7007.c | 1 + .../drivers/staging/media/lirc/lirc_serial.c | 1 + trunk/drivers/staging/media/lirc/lirc_sir.c | 1 + trunk/drivers/staging/mei/wd.c | 1 - trunk/drivers/staging/panel/panel.c | 1 + trunk/drivers/staging/sbe-2t3e3/io.c | 1 + trunk/drivers/staging/telephony/phonedev.c | 1 + .../tidspbridge/include/dspbridge/host_os.h | 1 + trunk/drivers/staging/wlags49_h2/wl_cs.c | 1 + trunk/drivers/staging/wlags49_h2/wl_main.c | 3 +- trunk/drivers/staging/wlags49_h2/wl_netdev.c | 3 +- trunk/drivers/staging/wlags49_h2/wl_pci.c | 1 + trunk/drivers/staging/wlags49_h2/wl_util.c | 3 +- trunk/drivers/tty/amiserial.c | 1 + trunk/drivers/tty/hvc/hvc_vio.c | 7 +- trunk/drivers/tty/hvc/hvcs.c | 5 +- trunk/drivers/tty/isicom.c | 1 + trunk/drivers/tty/moxa.c | 1 + trunk/drivers/tty/mxser.c | 1 + trunk/drivers/tty/n_hdlc.c | 1 + trunk/drivers/tty/n_tty.c | 1 + trunk/drivers/tty/pty.c | 1 + trunk/drivers/tty/serial/21285.c | 1 - trunk/drivers/tty/serial/68328serial.c | 1 + trunk/drivers/tty/serial/8250/serial_cs.c | 1 + trunk/drivers/tty/serial/amba-pl011.c | 9 +- trunk/drivers/tty/serial/crisv10.c | 2 +- trunk/drivers/tty/serial/dz.c | 1 + trunk/drivers/tty/serial/icom.c | 1 + trunk/drivers/tty/serial/msm_serial_hs.c | 1 + trunk/drivers/tty/serial/pch_uart.c | 4 +- trunk/drivers/tty/serial/sh-sci.c | 4 +- trunk/drivers/tty/serial/sunhv.c | 1 - trunk/drivers/tty/serial/sunsab.c | 1 - trunk/drivers/tty/serial/sunsu.c | 1 - trunk/drivers/tty/serial/sunzilog.c | 1 - trunk/drivers/tty/serial/zs.c | 1 + trunk/drivers/tty/synclink.c | 1 + trunk/drivers/tty/synclink_gt.c | 1 + trunk/drivers/tty/synclinkmp.c | 1 + trunk/drivers/tty/tty_io.c | 1 + trunk/drivers/tty/tty_ioctl.c | 1 + trunk/drivers/tty/vt/vt.c | 1 + trunk/drivers/usb/gadget/amd5536udc.c | 1 + trunk/drivers/usb/gadget/at91_udc.c | 1 + trunk/drivers/usb/gadget/dummy_hcd.c | 1 + trunk/drivers/usb/gadget/fsl_udc_core.c | 1 + trunk/drivers/usb/gadget/goku_udc.c | 1 + trunk/drivers/usb/gadget/langwell_udc.c | 1 + trunk/drivers/usb/gadget/mv_udc_core.c | 1 + trunk/drivers/usb/gadget/net2272.c | 1 + trunk/drivers/usb/gadget/net2280.c | 1 + trunk/drivers/usb/gadget/omap_udc.c | 1 + trunk/drivers/usb/gadget/printer.c | 1 + trunk/drivers/usb/gadget/pxa25x_udc.c | 1 + trunk/drivers/usb/gadget/rndis.c | 1 + trunk/drivers/usb/gadget/s3c2410_udc.c | 1 + trunk/drivers/usb/host/ehci-hcd.c | 1 + trunk/drivers/usb/host/isp116x-hcd.c | 1 + trunk/drivers/usb/host/isp1362-hcd.c | 1 + trunk/drivers/usb/host/ohci-hcd.c | 1 + trunk/drivers/usb/host/oxu210hp-hcd.c | 1 + trunk/drivers/usb/host/sl811-hcd.c | 1 + trunk/drivers/usb/host/u132-hcd.c | 1 + trunk/drivers/usb/host/uhci-hcd.c | 1 + trunk/drivers/usb/musb/ux500_dma.c | 4 +- trunk/drivers/usb/renesas_usbhs/fifo.c | 5 +- trunk/drivers/video/amifb.c | 1 + trunk/drivers/video/backlight/88pm860x_bl.c | 49 +- trunk/drivers/video/backlight/apple_bl.c | 23 +- trunk/drivers/video/backlight/tosa_lcd.c | 2 +- trunk/drivers/video/bt431.h | 1 + trunk/drivers/video/bt455.h | 1 + trunk/drivers/video/console/fbcon.c | 1 + trunk/drivers/video/console/newport_con.c | 1 + trunk/drivers/video/cyber2000fb.c | 1 + trunk/drivers/video/dnfb.c | 1 + trunk/drivers/video/mx3fb.c | 4 +- trunk/drivers/video/neofb.c | 1 + trunk/drivers/video/omap2/vrfb.c | 1 + trunk/drivers/video/pmag-ba-fb.c | 1 + trunk/drivers/video/pmagb-b-fb.c | 1 + trunk/drivers/video/q40fb.c | 1 + trunk/drivers/video/savage/savagefb_driver.c | 1 + trunk/drivers/virtio/config.c | 1 + trunk/drivers/watchdog/Kconfig | 8 - trunk/drivers/watchdog/acquirewdt.c | 28 +- trunk/drivers/watchdog/advantechwdt.c | 35 +- trunk/drivers/watchdog/alim1535_wdt.c | 25 +- trunk/drivers/watchdog/alim7101_wdt.c | 56 +- trunk/drivers/watchdog/ar7_wdt.c | 38 +- trunk/drivers/watchdog/at32ap700x_wdt.c | 4 +- trunk/drivers/watchdog/at91rm9200_wdt.c | 14 +- trunk/drivers/watchdog/at91sam9_wdt.c | 12 +- trunk/drivers/watchdog/ath79_wdt.c | 9 +- trunk/drivers/watchdog/bcm47xx_wdt.c | 18 +- trunk/drivers/watchdog/bcm63xx_wdt.c | 11 +- trunk/drivers/watchdog/bfin_wdt.c | 31 +- trunk/drivers/watchdog/booke_wdt.c | 15 +- trunk/drivers/watchdog/coh901327_wdt.c | 206 +- trunk/drivers/watchdog/cpu5wdt.c | 19 +- trunk/drivers/watchdog/cpwd.c | 20 +- trunk/drivers/watchdog/dw_wdt.c | 7 +- trunk/drivers/watchdog/ep93xx_wdt.c | 220 +- trunk/drivers/watchdog/eurotechwdt.c | 33 +- trunk/drivers/watchdog/f71808e_wdt.c | 40 +- trunk/drivers/watchdog/gef_wdt.c | 15 +- trunk/drivers/watchdog/geodewdt.c | 9 +- trunk/drivers/watchdog/hpwdt.c | 31 +- trunk/drivers/watchdog/i6300esb.c | 39 +- trunk/drivers/watchdog/iTCO_vendor_support.c | 7 +- trunk/drivers/watchdog/iTCO_wdt.c | 59 +- trunk/drivers/watchdog/ib700wdt.c | 27 +- trunk/drivers/watchdog/ibmasr.c | 18 +- trunk/drivers/watchdog/imx2_wdt.c | 14 +- trunk/drivers/watchdog/indydog.c | 24 +- trunk/drivers/watchdog/intel_scu_watchdog.c | 71 +- trunk/drivers/watchdog/intel_scu_watchdog.h | 1 + trunk/drivers/watchdog/iop_wdt.c | 15 +- trunk/drivers/watchdog/it8712f_wdt.c | 39 +- trunk/drivers/watchdog/it87_wdt.c | 47 +- trunk/drivers/watchdog/ixp2000_wdt.c | 11 +- trunk/drivers/watchdog/ixp4xx_wdt.c | 15 +- trunk/drivers/watchdog/jz4740_wdt.c | 265 +- trunk/drivers/watchdog/ks8695_wdt.c | 10 +- trunk/drivers/watchdog/lantiq_wdt.c | 8 +- trunk/drivers/watchdog/m54xx_wdt.c | 14 +- trunk/drivers/watchdog/machzwd.c | 38 +- trunk/drivers/watchdog/max63xx_wdt.c | 194 +- trunk/drivers/watchdog/mixcomwd.c | 29 +- trunk/drivers/watchdog/mpc8xxx_wdt.c | 17 +- trunk/drivers/watchdog/mpcore_wdt.c | 111 +- trunk/drivers/watchdog/mv64x60_wdt.c | 15 +- trunk/drivers/watchdog/nuc900_wdt.c | 4 +- trunk/drivers/watchdog/nv_tco.c | 46 +- trunk/drivers/watchdog/octeon-wdt-main.c | 16 +- trunk/drivers/watchdog/of_xilinx_wdt.c | 41 +- trunk/drivers/watchdog/omap_wdt.c | 4 +- trunk/drivers/watchdog/orion_wdt.c | 15 +- trunk/drivers/watchdog/pc87413_wdt.c | 58 +- trunk/drivers/watchdog/pcwd.c | 127 +- trunk/drivers/watchdog/pcwd_pci.c | 113 +- trunk/drivers/watchdog/pcwd_usb.c | 78 +- trunk/drivers/watchdog/pika_wdt.c | 23 +- trunk/drivers/watchdog/pnx4008_wdt.c | 263 +- trunk/drivers/watchdog/pnx833x_wdt.c | 30 +- trunk/drivers/watchdog/rc32434_wdt.c | 33 +- trunk/drivers/watchdog/riowd.c | 10 +- trunk/drivers/watchdog/s3c2410_wdt.c | 31 +- trunk/drivers/watchdog/sa1100_wdt.c | 11 +- trunk/drivers/watchdog/sb_wdog.c | 28 +- trunk/drivers/watchdog/sbc60xxwdt.c | 42 +- trunk/drivers/watchdog/sbc7240_wdt.c | 45 +- trunk/drivers/watchdog/sbc8360.c | 25 +- trunk/drivers/watchdog/sbc_epx_c3.c | 23 +- trunk/drivers/watchdog/sbc_fitpc2_wdt.c | 14 +- trunk/drivers/watchdog/sc1200wdt.c | 34 +- trunk/drivers/watchdog/sc520_wdt.c | 40 +- trunk/drivers/watchdog/sch311x_wdt.c | 17 +- trunk/drivers/watchdog/scx200_wdt.c | 25 +- trunk/drivers/watchdog/shwdt.c | 19 +- trunk/drivers/watchdog/smsc37b787_wdt.c | 43 +- trunk/drivers/watchdog/softdog.c | 211 +- trunk/drivers/watchdog/sp5100_tco.c | 35 +- trunk/drivers/watchdog/sp805_wdt.c | 111 +- trunk/drivers/watchdog/stmp3xxx_wdt.c | 8 +- trunk/drivers/watchdog/ts72xx_wdt.c | 4 +- trunk/drivers/watchdog/twl4030_wdt.c | 4 +- trunk/drivers/watchdog/txx9wdt.c | 184 +- trunk/drivers/watchdog/via_wdt.c | 13 +- trunk/drivers/watchdog/w83627hf_wdt.c | 39 +- trunk/drivers/watchdog/w83697hf_wdt.c | 44 +- trunk/drivers/watchdog/w83697ug_wdt.c | 39 +- trunk/drivers/watchdog/w83877f_wdt.c | 41 +- trunk/drivers/watchdog/w83977f_wdt.c | 39 +- trunk/drivers/watchdog/wafer5823wdt.c | 34 +- trunk/drivers/watchdog/watchdog_core.c | 4 +- trunk/drivers/watchdog/watchdog_dev.c | 16 +- trunk/drivers/watchdog/wdrtas.c | 71 +- trunk/drivers/watchdog/wdt.c | 56 +- trunk/drivers/watchdog/wdt285.c | 13 +- trunk/drivers/watchdog/wdt977.c | 41 +- trunk/drivers/watchdog/wdt_pci.c | 71 +- trunk/drivers/watchdog/wm831x_wdt.c | 6 +- trunk/drivers/watchdog/wm8350_wdt.c | 223 +- trunk/drivers/watchdog/xen_wdt.c | 42 +- trunk/fs/autofs4/dev-ioctl.c | 2 +- trunk/fs/binfmt_aout.c | 1 + trunk/fs/binfmt_elf.c | 25 +- trunk/fs/binfmt_elf_fdpic.c | 1 - trunk/fs/binfmt_flat.c | 1 + trunk/fs/buffer.c | 15 +- trunk/fs/coda/inode.c | 1 + trunk/fs/coda/psdev.c | 1 + trunk/fs/coda/upcall.c | 1 + trunk/fs/compat.c | 26 +- trunk/fs/eventpoll.c | 1 + trunk/fs/exec.c | 9 +- trunk/fs/exofs/super.c | 7 +- trunk/fs/ext4/dir.c | 214 +- trunk/fs/ext4/ext4.h | 6 +- trunk/fs/ext4/hash.c | 4 +- trunk/fs/ext4/page-io.c | 7 +- trunk/fs/fcntl.c | 18 +- trunk/fs/file.c | 52 +- trunk/fs/jbd2/commit.c | 1 + trunk/fs/jbd2/journal.c | 1 + trunk/fs/lockd/svc.c | 2 +- trunk/fs/ncpfs/file.c | 1 + trunk/fs/ncpfs/inode.c | 1 + trunk/fs/ncpfs/mmap.c | 1 + trunk/fs/nfs/client.c | 1 + trunk/fs/nfs/direct.c | 1 + trunk/fs/nfs/file.c | 1 + trunk/fs/nfs/getroot.c | 1 + trunk/fs/nfs/inode.c | 1 + trunk/fs/nfs/nfs4filelayout.c | 1 + trunk/fs/nfs/nfs4proc.c | 43 +- trunk/fs/nfs/read.c | 1 + trunk/fs/nfs/super.c | 1 + trunk/fs/nfsd/current_stateid.h | 28 - trunk/fs/nfsd/export.c | 2 +- trunk/fs/nfsd/netns.h | 34 - trunk/fs/nfsd/nfs4callback.c | 19 +- trunk/fs/nfsd/nfs4idmap.c | 53 +- trunk/fs/nfsd/nfs4proc.c | 118 +- trunk/fs/nfsd/nfs4recover.c | 647 +---- trunk/fs/nfsd/nfs4state.c | 365 +-- trunk/fs/nfsd/nfs4xdr.c | 132 +- trunk/fs/nfsd/nfsctl.c | 22 +- trunk/fs/nfsd/nfsd.h | 7 +- trunk/fs/nfsd/nfssvc.c | 44 +- trunk/fs/nfsd/state.h | 47 +- trunk/fs/nfsd/vfs.c | 33 +- trunk/fs/nfsd/vfs.h | 2 - trunk/fs/nfsd/xdr4.h | 34 +- trunk/fs/open.c | 4 +- trunk/fs/proc/array.c | 2 +- trunk/fs/proc/base.c | 2 +- trunk/fs/proc/inode.c | 1 + trunk/fs/proc/namespaces.c | 6 +- trunk/fs/proc/task_mmu.c | 6 +- trunk/fs/reiserfs/journal.c | 1 + trunk/fs/select.c | 2 +- trunk/fs/squashfs/block.c | 3 +- trunk/fs/squashfs/dir.c | 7 +- trunk/fs/squashfs/namei.c | 5 +- trunk/fs/squashfs/squashfs_fs.h | 19 +- trunk/fs/squashfs/super.c | 5 - trunk/fs/ufs/inode.c | 1 + trunk/fs/ufs/super.c | 1 + trunk/fs/xfs/xfs_alloc.c | 36 +- trunk/fs/xfs/xfs_alloc.h | 12 - trunk/fs/xfs/xfs_attr.c | 16 - trunk/fs/xfs/xfs_attr_leaf.c | 40 +- trunk/fs/xfs/xfs_bmap.c | 9 - trunk/fs/xfs/xfs_buf.h | 1 + trunk/fs/xfs/xfs_da_btree.c | 32 - trunk/fs/xfs/xfs_discard.c | 61 +- trunk/fs/xfs/xfs_dquot.c | 2 +- trunk/fs/xfs/xfs_iget.c | 8 +- trunk/fs/xfs/xfs_inode.h | 4 +- trunk/fs/xfs/xfs_ioctl.c | 14 +- trunk/fs/xfs/xfs_itable.c | 3 +- trunk/fs/xfs/xfs_log.c | 3 +- trunk/fs/xfs/xfs_log_recover.c | 33 +- trunk/fs/xfs/xfs_rtalloc.c | 9 +- trunk/fs/xfs/xfs_super.c | 33 - trunk/fs/xfs/xfs_trace.h | 78 +- trunk/include/acpi/platform/aclinux.h | 1 + trunk/include/asm-generic/atomic.h | 3 +- trunk/include/asm-generic/barrier.h | 50 - trunk/include/asm-generic/bitops/atomic.h | 2 +- trunk/include/asm-generic/cmpxchg.h | 87 +- trunk/include/asm-generic/exec.h | 19 - trunk/include/asm-generic/gpio.h | 4 +- trunk/include/asm-generic/posix_types.h | 109 +- trunk/include/asm-generic/switch_to.h | 30 - trunk/include/asm-generic/system.h | 141 + trunk/include/asm-generic/unistd.h | 2 +- trunk/include/asm-generic/vmlinux.lds.h | 35 +- trunk/include/linux/Kbuild | 1 - trunk/include/linux/acpi.h | 1 - trunk/include/linux/aio_abi.h | 2 +- trunk/include/linux/amba/pl08x.h | 10 +- trunk/include/linux/amba/pl330.h | 1 + trunk/include/linux/apple_bl.h | 26 - trunk/include/linux/cnt32_to_63.h | 1 + trunk/include/linux/compat.h | 32 +- trunk/include/linux/cpumask.h | 3 +- trunk/include/linux/cpuset.h | 6 +- trunk/include/linux/debug_locks.h | 1 + trunk/include/linux/dma-buf.h | 97 +- trunk/include/linux/dma-mapping.h | 2 +- trunk/include/linux/dmaengine.h | 35 +- trunk/include/linux/dw_dmac.h | 38 + trunk/include/linux/edac.h | 179 +- trunk/include/linux/efi.h | 1 + trunk/include/linux/fdtable.h | 46 +- trunk/include/linux/fs.h | 4 - trunk/include/linux/gpio.h | 6 - trunk/include/linux/i2c-algo-bit.h | 3 +- trunk/include/linux/i2c-algo-pcf.h | 3 +- trunk/include/linux/i2c-dev.h | 3 +- trunk/include/linux/i2c-mux.h | 3 +- trunk/include/linux/i2c-smbus.h | 3 +- trunk/include/linux/i2c.h | 3 +- trunk/include/linux/i2c/twl.h | 2 +- trunk/include/linux/ide.h | 1 + trunk/include/linux/interrupt.h | 1 + trunk/include/linux/kernel.h | 21 +- trunk/include/linux/kvm.h | 98 - trunk/include/linux/kvm_host.h | 69 +- trunk/include/linux/llist.h | 3 +- trunk/include/linux/lsm_audit.h | 1 + trunk/include/linux/mfd/88pm860x.h | 23 - trunk/include/linux/mfd/abx500.h | 7 + trunk/include/linux/mfd/abx500/ab8500-gpio.h | 4 +- .../include/linux/mfd/abx500/ab8500-sysctrl.h | 43 - trunk/include/linux/mfd/abx500/ab8500.h | 208 +- trunk/include/linux/mfd/da9052/da9052.h | 2 + trunk/include/linux/mfd/db8500-prcmu.h | 183 +- trunk/include/linux/mfd/dbx500-prcmu.h | 414 +-- trunk/include/linux/mfd/mc13xxx.h | 16 +- trunk/include/linux/mfd/rc5t583.h | 295 --- trunk/include/linux/mfd/stmpe.h | 1 - trunk/include/linux/mfd/tmio.h | 26 +- trunk/include/linux/mfd/tps65090.h | 46 - trunk/include/linux/mfd/tps65217.h | 283 -- trunk/include/linux/mfd/tps65910.h | 11 - trunk/include/linux/mfd/wm8994/pdata.h | 1 + trunk/include/linux/mm.h | 4 +- trunk/include/linux/mmc/card.h | 2 - trunk/include/linux/mmc/cd-gpio.h | 3 +- trunk/include/linux/mmc/core.h | 1 + trunk/include/linux/mmc/dw_mmc.h | 8 +- trunk/include/linux/mmc/host.h | 48 +- trunk/include/linux/mmc/mmc.h | 3 - trunk/include/linux/mmc/sdhci.h | 2 - trunk/include/linux/mmc/sh_mmcif.h | 21 +- trunk/include/linux/mmc/sh_mobile_sdhi.h | 14 - trunk/include/linux/module.h | 32 +- trunk/include/linux/moduleparam.h | 58 +- trunk/include/linux/mtd/map.h | 2 +- trunk/include/linux/nfs4.h | 15 +- trunk/include/linux/nfsd/cld.h | 56 - trunk/include/linux/of.h | 10 + trunk/include/linux/of_gpio.h | 27 +- trunk/include/linux/parport.h | 1 + trunk/include/linux/pid_namespace.h | 8 +- trunk/include/linux/radix-tree.h | 196 -- trunk/include/linux/regulator/ab8500.h | 70 +- trunk/include/linux/rtc.h | 3 +- trunk/include/linux/rwsem.h | 1 + trunk/include/linux/sched.h | 1 + trunk/include/linux/sh_intc.h | 17 - trunk/include/linux/skbuff.h | 1 + trunk/include/linux/slab.h | 17 +- trunk/include/linux/slub_def.h | 6 +- trunk/include/linux/smp.h | 46 - trunk/include/linux/spinlock.h | 2 +- trunk/include/linux/spinlock_api_smp.h | 2 +- trunk/include/linux/stop_machine.h | 1 + trunk/include/linux/sunrpc/svc_rdma.h | 4 +- trunk/include/linux/swap.h | 3 - trunk/include/linux/sysinfo.h | 24 - trunk/include/linux/time.h | 2 +- trunk/include/linux/timex.h | 2 +- trunk/include/linux/tty.h | 1 + trunk/include/linux/wait.h | 1 + trunk/include/linux/watchdog.h | 4 +- trunk/include/xen/xen-ops.h | 1 - trunk/init/main.c | 66 +- trunk/ipc/compat.c | 70 +- trunk/kernel/Kconfig.locks | 4 +- trunk/kernel/Kconfig.preempt | 1 - trunk/kernel/compat.c | 68 +- trunk/kernel/cpuset.c | 21 +- trunk/kernel/debug/debug_core.c | 1 + trunk/kernel/debug/kdb/kdb_bt.c | 1 + trunk/kernel/dma.c | 1 + trunk/kernel/exit.c | 2 +- trunk/kernel/irq/Kconfig | 15 +- trunk/kernel/irq/irqdomain.c | 8 +- trunk/kernel/kexec.c | 7 +- trunk/kernel/module.c | 37 +- trunk/kernel/params.c | 39 +- trunk/kernel/pid_namespace.c | 33 - trunk/kernel/rwsem.c | 1 + trunk/kernel/sched/core.c | 63 +- trunk/kernel/sched/fair.c | 16 +- trunk/kernel/sched/rt.c | 2 +- trunk/kernel/signal.c | 1 - trunk/kernel/smp.c | 90 - trunk/kernel/spinlock.c | 2 +- trunk/kernel/sys.c | 9 - trunk/kernel/sysctl.c | 12 +- trunk/kernel/time.c | 6 + trunk/kernel/time/alarmtimer.c | 8 - trunk/kernel/time/clocksource.c | 2 +- trunk/kernel/time/ntp.c | 134 +- trunk/kernel/time/timekeeping.c | 51 +- trunk/lib/Kconfig | 4 - trunk/lib/Kconfig.debug | 1 - trunk/lib/cpumask.c | 12 + trunk/lib/llist.c | 1 + trunk/lib/radix-tree.c | 442 ++-- trunk/lib/raid6/altivec.uc | 2 +- trunk/mm/filemap.c | 86 +- trunk/mm/memcontrol.c | 4 - trunk/mm/page_alloc.c | 44 +- trunk/mm/slab.c | 56 +- trunk/mm/slub.c | 36 +- trunk/mm/swapfile.c | 3 - trunk/mm/truncate.c | 40 - trunk/net/802/fc.c | 1 + trunk/net/802/fddi.c | 1 + trunk/net/802/hippi.c | 1 + trunk/net/802/tr.c | 1 + trunk/net/atm/clip.c | 1 + trunk/net/ax25/af_ax25.c | 1 + trunk/net/ax25/ax25_addr.c | 1 + trunk/net/ax25/ax25_dev.c | 1 + trunk/net/ax25/ax25_ds_in.c | 1 + trunk/net/ax25/ax25_ds_subr.c | 1 + trunk/net/ax25/ax25_ds_timer.c | 1 + trunk/net/ax25/ax25_iface.c | 1 + trunk/net/ax25/ax25_in.c | 1 + trunk/net/ax25/ax25_ip.c | 1 + trunk/net/ax25/ax25_out.c | 1 + trunk/net/ax25/ax25_route.c | 1 + trunk/net/ax25/ax25_std_in.c | 1 + trunk/net/ax25/ax25_std_subr.c | 1 + trunk/net/ax25/ax25_std_timer.c | 1 + trunk/net/ax25/ax25_subr.c | 1 + trunk/net/ax25/ax25_timer.c | 1 + trunk/net/ax25/ax25_uid.c | 1 + trunk/net/bluetooth/bnep/sock.c | 1 + trunk/net/bluetooth/cmtp/sock.c | 1 + trunk/net/bluetooth/hci_conn.c | 1 + trunk/net/bluetooth/hci_core.c | 1 + trunk/net/bluetooth/hci_event.c | 1 + trunk/net/bluetooth/hci_sock.c | 4 +- trunk/net/bluetooth/l2cap_core.c | 1 + trunk/net/bluetooth/rfcomm/sock.c | 1 + trunk/net/bluetooth/sco.c | 1 + trunk/net/compat.c | 65 +- trunk/net/core/datagram.c | 1 + trunk/net/core/dev.c | 1 + trunk/net/core/filter.c | 1 + trunk/net/core/gen_estimator.c | 1 + trunk/net/core/rtnetlink.c | 1 + trunk/net/core/scm.c | 1 + trunk/net/core/skbuff.c | 1 + trunk/net/core/sock.c | 1 + trunk/net/core/utils.c | 1 + trunk/net/decnet/af_decnet.c | 1 + trunk/net/decnet/dn_dev.c | 1 + trunk/net/decnet/dn_nsp_in.c | 1 + trunk/net/decnet/dn_nsp_out.c | 1 + trunk/net/econet/af_econet.c | 1 + trunk/net/ethernet/eth.c | 1 + trunk/net/ipv4/af_inet.c | 1 + trunk/net/ipv4/arp.c | 1 + trunk/net/ipv4/devinet.c | 1 + trunk/net/ipv4/fib_frontend.c | 1 + trunk/net/ipv4/fib_semantics.c | 1 + trunk/net/ipv4/fib_trie.c | 1 + trunk/net/ipv4/icmp.c | 1 + trunk/net/ipv4/igmp.c | 1 + trunk/net/ipv4/ip_input.c | 1 + trunk/net/ipv4/ip_output.c | 1 + trunk/net/ipv4/ipmr.c | 1 + trunk/net/ipv4/ping.c | 1 + trunk/net/ipv4/route.c | 1 + trunk/net/ipv4/udp.c | 1 + trunk/net/ipv6/af_inet6.c | 1 + trunk/net/ipv6/icmp.c | 1 + trunk/net/ipv6/ip6mr.c | 1 + trunk/net/irda/irlan/irlan_client.c | 1 + trunk/net/irda/irlan/irlan_common.c | 1 + trunk/net/irda/irlan/irlan_provider.c | 1 + trunk/net/irda/timer.c | 1 + trunk/net/lapb/lapb_iface.c | 1 + trunk/net/lapb/lapb_in.c | 1 + trunk/net/lapb/lapb_out.c | 1 + trunk/net/lapb/lapb_subr.c | 1 + trunk/net/lapb/lapb_timer.c | 1 + trunk/net/netfilter/ipvs/ip_vs_app.c | 1 + trunk/net/netfilter/ipvs/ip_vs_proto.c | 1 + trunk/net/netfilter/nfnetlink.c | 1 + trunk/net/netrom/af_netrom.c | 1 + trunk/net/netrom/nr_dev.c | 1 + trunk/net/netrom/nr_in.c | 1 + trunk/net/netrom/nr_out.c | 1 + trunk/net/netrom/nr_route.c | 1 + trunk/net/netrom/nr_subr.c | 1 + trunk/net/netrom/nr_timer.c | 1 + trunk/net/openvswitch/datapath.c | 1 + trunk/net/packet/af_packet.c | 1 + trunk/net/rose/af_rose.c | 1 + trunk/net/rose/rose_dev.c | 1 + trunk/net/rose/rose_in.c | 1 + trunk/net/rose/rose_link.c | 1 + trunk/net/rose/rose_out.c | 1 + trunk/net/rose/rose_route.c | 1 + trunk/net/rose/rose_subr.c | 1 + trunk/net/rose/rose_timer.c | 1 + trunk/net/socket.c | 18 +- trunk/net/sunrpc/cache.c | 2 - trunk/net/sunrpc/clnt.c | 1 + trunk/net/sunrpc/rpc_pipe.c | 5 - trunk/net/sunrpc/rpcb_clnt.c | 2 +- trunk/net/sunrpc/svcauth_unix.c | 2 +- trunk/net/sunrpc/svcsock.c | 2 + trunk/net/sunrpc/xprtrdma/svc_rdma.c | 1 - trunk/net/sunrpc/xprtrdma/svc_rdma_marshal.c | 66 +- trunk/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 20 +- trunk/net/sunrpc/xprtrdma/svc_rdma_sendto.c | 26 +- .../net/sunrpc/xprtrdma/svc_rdma_transport.c | 10 +- trunk/net/sunrpc/xprtrdma/xprt_rdma.h | 7 - trunk/net/sunrpc/xprtsock.c | 1 - trunk/scripts/gcc-goto.sh | 18 +- trunk/security/apparmor/domain.c | 3 +- trunk/security/apparmor/file.c | 2 - trunk/security/selinux/hooks.c | 2 +- trunk/security/selinux/include/avc.h | 1 + trunk/security/selinux/include/xfrm.h | 2 - trunk/sound/arm/pxa2xx-ac97-lib.c | 3 +- trunk/sound/arm/pxa2xx-ac97.c | 1 - trunk/sound/atmel/abdac.c | 18 +- trunk/sound/atmel/ac97c.c | 41 +- trunk/sound/oss/os.h | 1 + trunk/sound/oss/vidc.c | 1 + trunk/sound/oss/waveartist.c | 1 + trunk/sound/pci/asihpi/hpios.h | 1 + trunk/sound/pci/aw2/aw2-saa7146.c | 1 + trunk/sound/soc/imx/imx-pcm-dma-mx2.c | 3 - trunk/sound/soc/pxa/pxa2xx-ac97.c | 1 - trunk/sound/soc/sh/siu_pcm.c | 4 +- trunk/sound/soc/txx9/txx9aclc.c | 2 +- trunk/tools/power/cpupower/Makefile | 93 +- trunk/tools/power/cpupower/bench/Makefile | 23 +- .../tools/power/cpupower/debug/i386/Makefile | 40 +- .../power/cpupower/debug/x86_64/Makefile | 26 +- .../cpupower/man/cpupower-frequency-info.1 | 4 +- .../cpupower/man/cpupower-frequency-set.1 | 4 +- .../power/cpupower/man/cpupower-idle-info.1 | 90 - .../power/cpupower/man/cpupower-monitor.1 | 2 +- .../tools/power/cpupower/utils/cpuidle-info.c | 12 +- .../tools/power/cpupower/utils/helpers/amd.c | 4 +- .../power/cpupower/utils/helpers/helpers.h | 11 +- .../tools/power/cpupower/utils/helpers/pci.c | 35 +- .../utils/idle_monitor/amd_fam14h_idle.c | 25 +- trunk/tools/{vm => slub}/slabinfo.c | 0 trunk/tools/testing/selftests/Makefile | 7 +- .../testing/selftests/breakpoints/Makefile | 7 +- trunk/tools/testing/selftests/run_tests | 8 + trunk/tools/testing/selftests/vm/Makefile | 14 - trunk/tools/testing/selftests/vm/run_vmtests | 77 - trunk/tools/vm/Makefile | 11 - trunk/virt/kvm/assigned-dev.c | 213 +- trunk/virt/kvm/kvm_main.c | 144 +- 2702 files changed, 27819 insertions(+), 40477 deletions(-) delete mode 100644 trunk/Documentation/ABI/testing/debugfs-olpc delete mode 100644 trunk/Documentation/ABI/testing/sysfs-block-dm delete mode 100644 trunk/Documentation/device-mapper/verity.txt delete mode 100644 trunk/Documentation/devicetree/bindings/gpio/gpio-omap.txt delete mode 100644 trunk/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt delete mode 100644 trunk/Documentation/devicetree/bindings/gpio/sodaville.txt delete mode 100644 trunk/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt create mode 100644 trunk/Documentation/devicetree/bindings/mtd/partition.txt create mode 100644 trunk/Documentation/vm/Makefile rename trunk/{tools/testing/selftests => Documentation}/vm/hugepage-mmap.c (93%) rename trunk/{tools/testing/selftests => Documentation}/vm/hugepage-shm.c (94%) rename trunk/{tools/testing/selftests => Documentation}/vm/map_hugetlb.c (94%) rename trunk/{tools => Documentation}/vm/page-types.c (99%) create mode 100644 trunk/Documentation/watchdog/00-INDEX delete mode 100644 trunk/arch/alpha/include/asm/exec.h delete mode 100644 trunk/arch/alpha/include/asm/mce.h delete mode 100644 trunk/arch/alpha/include/asm/special_insns.h delete mode 100644 trunk/arch/alpha/include/asm/switch_to.h create mode 100644 trunk/arch/alpha/include/asm/system.h delete mode 100644 trunk/arch/arm/boot/compressed/piggy.xzkern.S create mode 100644 trunk/arch/arm/common/pl330.c delete mode 100644 trunk/arch/arm/include/asm/barrier.h delete mode 100644 trunk/arch/arm/include/asm/cmpxchg.h delete mode 100644 trunk/arch/arm/include/asm/compiler.h delete mode 100644 trunk/arch/arm/include/asm/cp15.h delete mode 100644 trunk/arch/arm/include/asm/exec.h create mode 100644 trunk/arch/arm/include/asm/hardware/pl330.h delete mode 100644 trunk/arch/arm/include/asm/jump_label.h delete mode 100644 trunk/arch/arm/include/asm/switch_to.h delete mode 100644 trunk/arch/arm/include/asm/system_info.h delete mode 100644 trunk/arch/arm/include/asm/system_misc.h delete mode 100644 trunk/arch/arm/kernel/insn.c delete mode 100644 trunk/arch/arm/kernel/insn.h delete mode 100644 trunk/arch/arm/kernel/jump_label.c delete mode 100644 trunk/arch/arm/kernel/patch.c delete mode 100644 trunk/arch/arm/kernel/patch.h create mode 100644 trunk/arch/arm/mach-at91/include/mach/io.h rename trunk/{include/linux/mfd/anatop.h => arch/arm/mach-bcmring/include/mach/io.h} (57%) create mode 100644 trunk/arch/arm/mach-clps711x/include/mach/io.h create mode 100644 trunk/arch/arm/mach-cns3xxx/include/mach/io.h create mode 100644 trunk/arch/arm/mach-davinci/include/mach/io.h create mode 100644 trunk/arch/arm/mach-ep93xx/include/mach/io.h create mode 100644 trunk/arch/arm/mach-exynos/include/mach/io.h create mode 100644 trunk/arch/arm/mach-gemini/include/mach/io.h create mode 100644 trunk/arch/arm/mach-h720x/include/mach/io.h create mode 100644 trunk/arch/arm/mach-highbank/include/mach/io.h create mode 100644 trunk/arch/arm/mach-highbank/include/mach/irqs.h create mode 100644 trunk/arch/arm/mach-imx/dma-v1.c create mode 100644 trunk/arch/arm/mach-imx/include/mach/dma-v1.h delete mode 100644 trunk/arch/arm/mach-iop13xx/pci.h create mode 100644 trunk/arch/arm/mach-ks8695/include/mach/io.h create mode 100644 trunk/arch/arm/mach-lpc32xx/include/mach/io.h create mode 100644 trunk/arch/arm/mach-mmp/include/mach/io.h create mode 100644 trunk/arch/arm/mach-msm/include/mach/io.h create mode 100644 trunk/arch/arm/mach-mxs/include/mach/io.h rename trunk/arch/{hexagon/include/asm/exec.h => arm/mach-netx/include/mach/io.h} (52%) create mode 100644 trunk/arch/arm/mach-nomadik/include/mach/io.h create mode 100644 trunk/arch/arm/mach-omap1/include/mach/io.h create mode 100644 trunk/arch/arm/mach-omap2/include/mach/io.h create mode 100644 trunk/arch/arm/mach-orion5x/include/mach/io.h create mode 100644 trunk/arch/arm/mach-picoxcell/include/mach/io.h create mode 100644 trunk/arch/arm/mach-picoxcell/include/mach/irqs.h create mode 100644 trunk/arch/arm/mach-pnx4008/include/mach/io.h create mode 100644 trunk/arch/arm/mach-prima2/include/mach/io.h create mode 100644 trunk/arch/arm/mach-pxa/include/mach/io.h create mode 100644 trunk/arch/arm/mach-realview/include/mach/io.h create mode 100644 trunk/arch/arm/mach-s3c64xx/include/mach/io.h create mode 100644 trunk/arch/arm/mach-s5p64x0/include/mach/io.h create mode 100644 trunk/arch/arm/mach-s5pc100/include/mach/io.h create mode 100644 trunk/arch/arm/mach-s5pv210/include/mach/io.h create mode 100644 trunk/arch/arm/mach-sa1100/include/mach/io.h create mode 100644 trunk/arch/arm/mach-shmobile/include/mach/io.h create mode 100644 trunk/arch/arm/mach-spear3xx/include/mach/io.h create mode 100644 trunk/arch/arm/mach-spear6xx/include/mach/io.h create mode 100644 trunk/arch/arm/mach-u300/include/mach/io.h create mode 100644 trunk/arch/arm/mach-ux500/include/mach/io.h create mode 100644 trunk/arch/arm/mach-versatile/include/mach/io.h create mode 100644 trunk/arch/arm/mach-vexpress/include/mach/io.h create mode 100644 trunk/arch/arm/mach-vt8500/include/mach/io.h create mode 100644 trunk/arch/arm/mach-w90x900/include/mach/io.h create mode 100644 trunk/arch/arm/mach-zynq/include/mach/io.h delete mode 100644 trunk/arch/arm/net/Makefile delete mode 100644 trunk/arch/arm/net/bpf_jit_32.c delete mode 100644 trunk/arch/arm/net/bpf_jit_32.h create mode 100644 trunk/arch/arm/plat-mxc/include/mach/io.h create mode 100644 trunk/arch/arm/plat-spear/include/plat/io.h delete mode 100644 trunk/arch/avr32/include/asm/barrier.h delete mode 100644 trunk/arch/avr32/include/asm/exec.h delete mode 100644 trunk/arch/avr32/include/asm/special_insns.h delete mode 100644 trunk/arch/avr32/include/asm/switch_to.h rename trunk/arch/avr32/include/asm/{cmpxchg.h => system.h} (57%) create mode 100644 trunk/arch/blackfin/include/asm/system.h delete mode 100644 trunk/arch/c6x/include/asm/barrier.h delete mode 100644 trunk/arch/c6x/include/asm/bug.h delete mode 100644 trunk/arch/c6x/include/asm/cmpxchg.h delete mode 100644 trunk/arch/c6x/include/asm/exec.h delete mode 100644 trunk/arch/c6x/include/asm/special_insns.h delete mode 100644 trunk/arch/c6x/include/asm/switch_to.h create mode 100644 trunk/arch/c6x/include/asm/system.h delete mode 100644 trunk/arch/cris/include/asm/barrier.h delete mode 100644 trunk/arch/cris/include/asm/exec.h delete mode 100644 trunk/arch/cris/include/asm/switch_to.h rename trunk/arch/cris/include/asm/{cmpxchg.h => system.h} (52%) delete mode 100644 trunk/arch/frv/include/asm/barrier.h delete mode 100644 trunk/arch/frv/include/asm/exec.h delete mode 100644 trunk/arch/frv/include/asm/switch_to.h rename trunk/arch/frv/include/asm/{cmpxchg.h => system.h} (66%) delete mode 100644 trunk/arch/h8300/include/asm/barrier.h delete mode 100644 trunk/arch/h8300/include/asm/cmpxchg.h delete mode 100644 trunk/arch/h8300/include/asm/exec.h delete mode 100644 trunk/arch/h8300/include/asm/switch_to.h create mode 100644 trunk/arch/h8300/include/asm/system.h delete mode 100644 trunk/arch/hexagon/include/asm/barrier.h delete mode 100644 trunk/arch/hexagon/include/asm/switch_to.h rename trunk/arch/hexagon/include/asm/{cmpxchg.h => system.h} (68%) delete mode 100644 trunk/arch/ia64/include/asm/barrier.h delete mode 100644 trunk/arch/ia64/include/asm/cmpxchg.h delete mode 100644 trunk/arch/ia64/include/asm/exec.h delete mode 100644 trunk/arch/ia64/include/asm/switch_to.h create mode 100644 trunk/arch/ia64/include/asm/system.h delete mode 100644 trunk/arch/m32r/include/asm/barrier.h delete mode 100644 trunk/arch/m32r/include/asm/cmpxchg.h delete mode 100644 trunk/arch/m32r/include/asm/dcache_clear.h delete mode 100644 trunk/arch/m32r/include/asm/exec.h delete mode 100644 trunk/arch/m32r/include/asm/switch_to.h create mode 100644 trunk/arch/m32r/include/asm/system.h delete mode 100644 trunk/arch/m68k/include/asm/barrier.h delete mode 100644 trunk/arch/m68k/include/asm/exec.h delete mode 100644 trunk/arch/m68k/include/asm/switch_to.h rename trunk/arch/m68k/include/asm/{cmpxchg.h => system.h} (56%) delete mode 100644 trunk/arch/microblaze/include/asm/barrier.h delete mode 100644 trunk/arch/microblaze/include/asm/cmpxchg.h delete mode 100644 trunk/arch/microblaze/include/asm/exec.h delete mode 100644 trunk/arch/microblaze/include/asm/switch_to.h create mode 100644 trunk/arch/microblaze/include/asm/system.h delete mode 100644 trunk/arch/mips/include/asm/exec.h delete mode 100644 trunk/arch/mips/include/asm/switch_to.h create mode 100644 trunk/arch/mips/include/asm/system.h delete mode 100644 trunk/arch/mn10300/include/asm/barrier.h delete mode 100644 trunk/arch/mn10300/include/asm/cmpxchg.h delete mode 100644 trunk/arch/mn10300/include/asm/exec.h delete mode 100644 trunk/arch/mn10300/include/asm/switch_to.h create mode 100644 trunk/arch/mn10300/include/asm/system.h create mode 100644 trunk/arch/openrisc/include/asm/system.h delete mode 100644 trunk/arch/parisc/include/asm/barrier.h delete mode 100644 trunk/arch/parisc/include/asm/exec.h delete mode 100644 trunk/arch/parisc/include/asm/ldcw.h delete mode 100644 trunk/arch/parisc/include/asm/special_insns.h delete mode 100644 trunk/arch/parisc/include/asm/switch_to.h create mode 100644 trunk/arch/parisc/include/asm/system.h delete mode 100644 trunk/arch/powerpc/include/asm/barrier.h delete mode 100644 trunk/arch/powerpc/include/asm/cmpxchg.h delete mode 100644 trunk/arch/powerpc/include/asm/debug.h delete mode 100644 trunk/arch/powerpc/include/asm/exec.h delete mode 100644 trunk/arch/powerpc/include/asm/runlatch.h delete mode 100644 trunk/arch/powerpc/include/asm/switch_to.h create mode 100644 trunk/arch/powerpc/include/asm/system.h delete mode 100644 trunk/arch/s390/include/asm/barrier.h delete mode 100644 trunk/arch/s390/include/asm/ctl_reg.h delete mode 100644 trunk/arch/s390/include/asm/exec.h delete mode 100644 trunk/arch/s390/include/asm/facility.h delete mode 100644 trunk/arch/s390/include/asm/switch_to.h create mode 100644 trunk/arch/s390/include/asm/system.h delete mode 100644 trunk/arch/score/include/asm/barrier.h delete mode 100644 trunk/arch/score/include/asm/cmpxchg.h delete mode 100644 trunk/arch/score/include/asm/exec.h delete mode 100644 trunk/arch/score/include/asm/switch_to.h create mode 100644 trunk/arch/score/include/asm/system.h delete mode 100644 trunk/arch/sh/include/asm/barrier.h delete mode 100644 trunk/arch/sh/include/asm/bl_bit.h delete mode 100644 trunk/arch/sh/include/asm/bl_bit_32.h delete mode 100644 trunk/arch/sh/include/asm/bl_bit_64.h delete mode 100644 trunk/arch/sh/include/asm/cache_insns.h delete mode 100644 trunk/arch/sh/include/asm/cache_insns_32.h delete mode 100644 trunk/arch/sh/include/asm/cache_insns_64.h delete mode 100644 trunk/arch/sh/include/asm/cmpxchg.h delete mode 100644 trunk/arch/sh/include/asm/exec.h delete mode 100644 trunk/arch/sh/include/asm/switch_to.h delete mode 100644 trunk/arch/sh/include/asm/switch_to_64.h create mode 100644 trunk/arch/sh/include/asm/system.h rename trunk/arch/sh/include/asm/{switch_to_32.h => system_32.h} (58%) create mode 100644 trunk/arch/sh/include/asm/system_64.h delete mode 100644 trunk/arch/sh/include/asm/traps.h delete mode 100644 trunk/arch/sh/include/asm/traps_32.h delete mode 100644 trunk/arch/sh/include/asm/traps_64.h delete mode 100644 trunk/arch/sparc/include/asm/barrier.h delete mode 100644 trunk/arch/sparc/include/asm/barrier_32.h delete mode 100644 trunk/arch/sparc/include/asm/barrier_64.h delete mode 100644 trunk/arch/sparc/include/asm/cmpxchg.h delete mode 100644 trunk/arch/sparc/include/asm/cmpxchg_32.h delete mode 100644 trunk/arch/sparc/include/asm/cmpxchg_64.h delete mode 100644 trunk/arch/sparc/include/asm/cpu_type.h delete mode 100644 trunk/arch/sparc/include/asm/exec.h delete mode 100644 trunk/arch/sparc/include/asm/switch_to.h delete mode 100644 trunk/arch/sparc/include/asm/switch_to_32.h delete mode 100644 trunk/arch/sparc/include/asm/switch_to_64.h create mode 100644 trunk/arch/sparc/include/asm/system.h create mode 100644 trunk/arch/sparc/include/asm/system_32.h create mode 100644 trunk/arch/sparc/include/asm/system_64.h delete mode 100644 trunk/arch/tile/include/asm/exec.h delete mode 100644 trunk/arch/tile/include/asm/switch_to.h rename trunk/arch/tile/include/asm/{barrier.h => system.h} (51%) delete mode 100644 trunk/arch/unicore32/include/asm/barrier.h delete mode 100644 trunk/arch/unicore32/include/asm/bug.h delete mode 100644 trunk/arch/unicore32/include/asm/cmpxchg.h delete mode 100644 trunk/arch/unicore32/include/asm/exec.h delete mode 100644 trunk/arch/unicore32/include/asm/hwdef-copro.h delete mode 100644 trunk/arch/unicore32/include/asm/switch_to.h create mode 100644 trunk/arch/unicore32/include/asm/system.h delete mode 100644 trunk/arch/x86/include/asm/barrier.h delete mode 100644 trunk/arch/x86/include/asm/exec.h delete mode 100644 trunk/arch/x86/include/asm/posix_types_x32.h delete mode 100644 trunk/arch/x86/include/asm/sighandling.h delete mode 100644 trunk/arch/x86/include/asm/special_insns.h delete mode 100644 trunk/arch/x86/include/asm/switch_to.h create mode 100644 trunk/arch/x86/include/asm/system.h delete mode 100644 trunk/arch/x86/platform/geode/geos.c delete mode 100644 trunk/arch/x86/vdso/vdsox32.S delete mode 100644 trunk/arch/x86/vdso/vdsox32.lds.S delete mode 100644 trunk/arch/xtensa/include/asm/barrier.h delete mode 100644 trunk/arch/xtensa/include/asm/exec.h delete mode 100644 trunk/arch/xtensa/include/asm/switch_to.h rename trunk/arch/xtensa/include/asm/{cmpxchg.h => system.h} (70%) delete mode 100644 trunk/drivers/dma/dmaengine.h delete mode 100644 trunk/drivers/gpio/gpio-mc9s08dz60.c delete mode 100644 trunk/drivers/gpio/gpio-sodaville.c delete mode 100644 trunk/drivers/md/dm-verity.c delete mode 100644 trunk/drivers/mfd/anatop-mfd.c delete mode 100644 trunk/drivers/mfd/rc5t583-irq.c delete mode 100644 trunk/drivers/mfd/rc5t583.c delete mode 100644 trunk/drivers/mfd/tps65090.c delete mode 100644 trunk/drivers/mfd/tps65217.c delete mode 100644 trunk/drivers/mmc/host/dw_mmc-pci.c delete mode 100644 trunk/drivers/mmc/host/dw_mmc-pltfm.c delete mode 100644 trunk/drivers/platform/x86/apple-gmux.c create mode 100644 trunk/drivers/platform/x86/asus_acpi.c delete mode 100644 trunk/fs/nfsd/current_stateid.h delete mode 100644 trunk/fs/nfsd/netns.h delete mode 100644 trunk/include/asm-generic/barrier.h delete mode 100644 trunk/include/asm-generic/exec.h delete mode 100644 trunk/include/asm-generic/switch_to.h create mode 100644 trunk/include/asm-generic/system.h delete mode 100644 trunk/include/linux/apple_bl.h delete mode 100644 trunk/include/linux/mfd/rc5t583.h delete mode 100644 trunk/include/linux/mfd/tps65090.h delete mode 100644 trunk/include/linux/mfd/tps65217.h delete mode 100644 trunk/include/linux/nfsd/cld.h delete mode 100644 trunk/include/linux/sysinfo.h delete mode 100644 trunk/tools/power/cpupower/man/cpupower-idle-info.1 rename trunk/tools/{vm => slub}/slabinfo.c (100%) create mode 100644 trunk/tools/testing/selftests/run_tests delete mode 100644 trunk/tools/testing/selftests/vm/Makefile delete mode 100644 trunk/tools/testing/selftests/vm/run_vmtests delete mode 100644 trunk/tools/vm/Makefile diff --git a/[refs] b/[refs] index fb8159acfb60..9e6269e58691 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eb05df9e7e793f3134dbb574c7ccc05f7932bc59 +refs/heads/master: 83619ea08e9abe0f5ebcfc569a829d1105a1685e diff --git a/trunk/Documentation/ABI/testing/debugfs-olpc b/trunk/Documentation/ABI/testing/debugfs-olpc deleted file mode 100644 index bd76cc6d55f9..000000000000 --- a/trunk/Documentation/ABI/testing/debugfs-olpc +++ /dev/null @@ -1,16 +0,0 @@ -What: /sys/kernel/debug/olpc-ec/cmd -Date: Dec 2011 -KernelVersion: 3.4 -Contact: devel@lists.laptop.org -Description: - -A generic interface for executing OLPC Embedded Controller commands and -reading their responses. - -To execute a command, write data with the format: CC:N A A A A -CC is the (hex) command, N is the count of expected reply bytes, and A A A A -are optional (hex) arguments. - -To read the response (if any), read from the generic node after executing -a command. Hex reply bytes will be returned, *whether or not* they came from -the immediately previous command. diff --git a/trunk/Documentation/ABI/testing/sysfs-block-dm b/trunk/Documentation/ABI/testing/sysfs-block-dm deleted file mode 100644 index 87ca5691e29b..000000000000 --- a/trunk/Documentation/ABI/testing/sysfs-block-dm +++ /dev/null @@ -1,25 +0,0 @@ -What: /sys/block/dm-/dm/name -Date: January 2009 -KernelVersion: 2.6.29 -Contact: dm-devel@redhat.com -Description: Device-mapper device name. - Read-only string containing mapped device name. -Users: util-linux, device-mapper udev rules - -What: /sys/block/dm-/dm/uuid -Date: January 2009 -KernelVersion: 2.6.29 -Contact: dm-devel@redhat.com -Description: Device-mapper device UUID. - Read-only string containing DM-UUID or empty string - if DM-UUID is not set. -Users: util-linux, device-mapper udev rules - -What: /sys/block/dm-/dm/suspended -Date: June 2009 -KernelVersion: 2.6.31 -Contact: dm-devel@redhat.com -Description: Device-mapper device suspend state. - Contains the value 1 while the device is suspended. - Otherwise it contains 0. Read-only attribute. -Users: util-linux, device-mapper udev rules diff --git a/trunk/Documentation/ABI/testing/sysfs-driver-samsung-laptop b/trunk/Documentation/ABI/testing/sysfs-driver-samsung-laptop index 678819a3f8bf..e82e7c2b8f80 100644 --- a/trunk/Documentation/ABI/testing/sysfs-driver-samsung-laptop +++ b/trunk/Documentation/ABI/testing/sysfs-driver-samsung-laptop @@ -17,21 +17,3 @@ Description: Some Samsung laptops have different "performance levels" Specifically, not all support the "overclock" option, and it's still unknown if this value even changes anything, other than making the user feel a bit better. - -What: /sys/devices/platform/samsung/battery_life_extender -Date: December 1, 2011 -KernelVersion: 3.3 -Contact: Corentin Chary -Description: Max battery charge level can be modified, battery cycle - life can be extended by reducing the max battery charge - level. - 0 means normal battery mode (100% charge) - 1 means battery life extender mode (80% charge) - -What: /sys/devices/platform/samsung/usb_charge -Date: December 1, 2011 -KernelVersion: 3.3 -Contact: Corentin Chary -Description: Use your USB ports to charge devices, even - when your laptop is powered off. - 1 means enabled, 0 means disabled. diff --git a/trunk/Documentation/Makefile b/trunk/Documentation/Makefile index 30b656ece7aa..9b4bc5c76f33 100644 --- a/trunk/Documentation/Makefile +++ b/trunk/Documentation/Makefile @@ -1,3 +1,3 @@ obj-m := DocBook/ accounting/ auxdisplay/ connector/ \ filesystems/ filesystems/configfs/ ia64/ laptops/ networking/ \ - pcmcia/ spi/ timers/ watchdog/src/ + pcmcia/ spi/ timers/ vm/ watchdog/src/ diff --git a/trunk/Documentation/device-mapper/thin-provisioning.txt b/trunk/Documentation/device-mapper/thin-provisioning.txt index 3370bc4d7b98..1ff044d87ca4 100644 --- a/trunk/Documentation/device-mapper/thin-provisioning.txt +++ b/trunk/Documentation/device-mapper/thin-provisioning.txt @@ -75,12 +75,10 @@ less sharing than average you'll need a larger-than-average metadata device. As a guide, we suggest you calculate the number of bytes to use in the metadata device as 48 * $data_dev_size / $data_block_size but round it up -to 2MB if the answer is smaller. If you're creating large numbers of -snapshots which are recording large amounts of change, you may find you -need to increase this. +to 2MB if the answer is smaller. The largest size supported is 16GB. -The largest size supported is 16GB: If the device is larger, -a warning will be issued and the excess space will not be used. +If you're creating large numbers of snapshots which are recording large +amounts of change, you may need find you need to increase this. Reloading a pool table ---------------------- @@ -169,38 +167,6 @@ ii) Using an internal snapshot. dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 1" -External snapshots ------------------- - -You can use an external _read only_ device as an origin for a -thinly-provisioned volume. Any read to an unprovisioned area of the -thin device will be passed through to the origin. Writes trigger -the allocation of new blocks as usual. - -One use case for this is VM hosts that want to run guests on -thinly-provisioned volumes but have the base image on another device -(possibly shared between many VMs). - -You must not write to the origin device if you use this technique! -Of course, you may write to the thin device and take internal snapshots -of the thin volume. - -i) Creating a snapshot of an external device - - This is the same as creating a thin device. - You don't mention the origin at this stage. - - dmsetup message /dev/mapper/pool 0 "create_thin 0" - -ii) Using a snapshot of an external device. - - Append an extra parameter to the thin target specifying the origin: - - dmsetup create snap --table "0 2097152 thin /dev/mapper/pool 0 /dev/image" - - N.B. All descendants (internal snapshots) of this snapshot require the - same extra origin parameter. - Deactivation ------------ @@ -223,13 +189,7 @@ i) Constructor [ []*] Optional feature arguments: - - skip_block_zeroing: Skip the zeroing of newly-provisioned blocks. - - ignore_discard: Disable discard support. - - no_discard_passdown: Don't pass discards down to the underlying - data device, but just remove the mapping. + - 'skip_block_zeroing': skips the zeroing of newly-provisioned blocks. Data block size must be between 64KB (128 sectors) and 1GB (2097152 sectors) inclusive. @@ -277,6 +237,16 @@ iii) Messages Deletes a thin device. Irreversible. + trim + + Delete mappings from the end of a thin device. Irreversible. + You might want to use this if you're reducing the size of + your thinly-provisioned device. In many cases, due to the + sharing of blocks between devices, it is not possible to + determine in advance how much space 'trim' will release. (In + future a userspace tool might be able to perform this + calculation.) + set_transaction_id Userland volume managers, such as LVM, need a way to @@ -292,7 +262,7 @@ iii) Messages i) Constructor - thin [] + thin pool dev: the thin-pool device, e.g. /dev/mapper/my_pool or 253:0 @@ -301,11 +271,6 @@ i) Constructor the internal device identifier of the device to be activated. - external origin dev: - an optional block device outside the pool to be treated as a - read-only snapshot origin: reads to unprovisioned areas of the - thin target will be mapped to this device. - The pool doesn't store any size against the thin devices. If you load a thin target that is smaller than you've been using previously, then you'll have no access to blocks mapped beyond the end. If you diff --git a/trunk/Documentation/device-mapper/verity.txt b/trunk/Documentation/device-mapper/verity.txt deleted file mode 100644 index 32e48797a14f..000000000000 --- a/trunk/Documentation/device-mapper/verity.txt +++ /dev/null @@ -1,194 +0,0 @@ -dm-verity -========== - -Device-Mapper's "verity" target provides transparent integrity checking of -block devices using a cryptographic digest provided by the kernel crypto API. -This target is read-only. - -Construction Parameters -======================= - - - - - - - This is the version number of the on-disk format. - - 0 is the original format used in the Chromium OS. - The salt is appended when hashing, digests are stored continuously and - the rest of the block is padded with zeros. - - 1 is the current format that should be used for new devices. - The salt is prepended when hashing and each digest is - padded with zeros to the power of two. - - - This is the device containing the data the integrity of which needs to be - checked. It may be specified as a path, like /dev/sdaX, or a device number, - :. - - - This is the device that that supplies the hash tree data. It may be - specified similarly to the device path and may be the same device. If the - same device is used, the hash_start should be outside of the dm-verity - configured device size. - - - The block size on a data device. Each block corresponds to one digest on - the hash device. - - - The size of a hash block. - - - The number of data blocks on the data device. Additional blocks are - inaccessible. You can place hashes to the same partition as data, in this - case hashes are placed after . - - - This is the offset, in -blocks, from the start of hash_dev - to the root block of the hash tree. - - - The cryptographic hash algorithm used for this device. This should - be the name of the algorithm, like "sha1". - - - The hexadecimal encoding of the cryptographic hash of the root hash block - and the salt. This hash should be trusted as there is no other authenticity - beyond this point. - - - The hexadecimal encoding of the salt value. - -Theory of operation -=================== - -dm-verity is meant to be setup as part of a verified boot path. This -may be anything ranging from a boot using tboot or trustedgrub to just -booting from a known-good device (like a USB drive or CD). - -When a dm-verity device is configured, it is expected that the caller -has been authenticated in some way (cryptographic signatures, etc). -After instantiation, all hashes will be verified on-demand during -disk access. If they cannot be verified up to the root node of the -tree, the root hash, then the I/O will fail. This should identify -tampering with any data on the device and the hash data. - -Cryptographic hashes are used to assert the integrity of the device on a -per-block basis. This allows for a lightweight hash computation on first read -into the page cache. Block hashes are stored linearly-aligned to the nearest -block the size of a page. - -Hash Tree ---------- - -Each node in the tree is a cryptographic hash. If it is a leaf node, the hash -is of some block data on disk. If it is an intermediary node, then the hash is -of a number of child nodes. - -Each entry in the tree is a collection of neighboring nodes that fit in one -block. The number is determined based on block_size and the size of the -selected cryptographic digest algorithm. The hashes are linearly-ordered in -this entry and any unaligned trailing space is ignored but included when -calculating the parent node. - -The tree looks something like: - -alg = sha256, num_blocks = 32768, block_size = 4096 - - [ root ] - / . . . \ - [entry_0] [entry_1] - / . . . \ . . . \ - [entry_0_0] . . . [entry_0_127] . . . . [entry_1_127] - / ... \ / . . . \ / \ - blk_0 ... blk_127 blk_16256 blk_16383 blk_32640 . . . blk_32767 - - -On-disk format -============== - -Below is the recommended on-disk format. The verity kernel code does not -read the on-disk header. It only reads the hash blocks which directly -follow the header. It is expected that a user-space tool will verify the -integrity of the verity_header and then call dmsetup with the correct -parameters. Alternatively, the header can be omitted and the dmsetup -parameters can be passed via the kernel command-line in a rooted chain -of trust where the command-line is verified. - -The on-disk format is especially useful in cases where the hash blocks -are on a separate partition. The magic number allows easy identification -of the partition contents. Alternatively, the hash blocks can be stored -in the same partition as the data to be verified. In such a configuration -the filesystem on the partition would be sized a little smaller than -the full-partition, leaving room for the hash blocks. - -struct superblock { - uint8_t signature[8] - "verity\0\0"; - - uint8_t version; - 1 - current format - - uint8_t data_block_bits; - log2(data block size) - - uint8_t hash_block_bits; - log2(hash block size) - - uint8_t pad1[1]; - zero padding - - uint16_t salt_size; - big-endian salt size - - uint8_t pad2[2]; - zero padding - - uint32_t data_blocks_hi; - big-endian high 32 bits of the 64-bit number of data blocks - - uint32_t data_blocks_lo; - big-endian low 32 bits of the 64-bit number of data blocks - - uint8_t algorithm[16]; - cryptographic algorithm - - uint8_t salt[384]; - salt (the salt size is specified above) - - uint8_t pad3[88]; - zero padding to 512-byte boundary -} - -Directly following the header (and with sector number padded to the next hash -block boundary) are the hash blocks which are stored a depth at a time -(starting from the root), sorted in order of increasing index. - -Status -====== -V (for Valid) is returned if every check performed so far was valid. -If any check failed, C (for Corruption) is returned. - -Example -======= - -Setup a device: - dmsetup create vroot --table \ - "0 2097152 "\ - "verity 1 /dev/sda1 /dev/sda2 4096 4096 2097152 1 "\ - "4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 "\ - "1234000000000000000000000000000000000000000000000000000000000000" - -A command line tool veritysetup is available to compute or verify -the hash tree or activate the kernel driver. This is available from -the LVM2 upstream repository and may be supplied as a package called -device-mapper-verity-tools: - git://sources.redhat.com/git/lvm2 - http://sourceware.org/git/?p=lvm2.git - http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/verity?cvsroot=lvm2 - -veritysetup -a vroot /dev/sda1 /dev/sda2 \ - 4392712ba01368efdf14b05c76f9e4df0d53664630b5d48632ed17a137f39076 diff --git a/trunk/Documentation/devicetree/bindings/gpio/gpio-omap.txt b/trunk/Documentation/devicetree/bindings/gpio/gpio-omap.txt deleted file mode 100644 index bff51a2fee1e..000000000000 --- a/trunk/Documentation/devicetree/bindings/gpio/gpio-omap.txt +++ /dev/null @@ -1,36 +0,0 @@ -OMAP GPIO controller bindings - -Required properties: -- compatible: - - "ti,omap2-gpio" for OMAP2 controllers - - "ti,omap3-gpio" for OMAP3 controllers - - "ti,omap4-gpio" for OMAP4 controllers -- #gpio-cells : Should be two. - - first cell is the pin number - - second cell is used to specify optional parameters (unused) -- gpio-controller : Marks the device node as a GPIO controller. -- #interrupt-cells : Should be 2. -- interrupt-controller: Mark the device node as an interrupt controller - The first cell is the GPIO number. - The second cell is used to specify flags: - bits[3:0] trigger type and level flags: - 1 = low-to-high edge triggered. - 2 = high-to-low edge triggered. - 4 = active high level-sensitive. - 8 = active low level-sensitive. - -OMAP specific properties: -- ti,hwmods: Name of the hwmod associated to the GPIO: - "gpio", being the 1-based instance number from the HW spec - - -Example: - -gpio4: gpio4 { - compatible = "ti,omap4-gpio"; - ti,hwmods = "gpio4"; - #gpio-cells = <2>; - gpio-controller; - #interrupt-cells = <2>; - interrupt-controller; -}; diff --git a/trunk/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt b/trunk/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt deleted file mode 100644 index 16695d9cf1e8..000000000000 --- a/trunk/Documentation/devicetree/bindings/gpio/gpio-twl4030.txt +++ /dev/null @@ -1,23 +0,0 @@ -twl4030 GPIO controller bindings - -Required properties: -- compatible: - - "ti,twl4030-gpio" for twl4030 GPIO controller -- #gpio-cells : Should be two. - - first cell is the pin number - - second cell is used to specify optional parameters (unused) -- gpio-controller : Marks the device node as a GPIO controller. -- #interrupt-cells : Should be 2. -- interrupt-controller: Mark the device node as an interrupt controller - The first cell is the GPIO number. - The second cell is not used. - -Example: - -twl_gpio: gpio { - compatible = "ti,twl4030-gpio"; - #gpio-cells = <2>; - gpio-controller; - #interrupt-cells = <2>; - interrupt-controller; -}; diff --git a/trunk/Documentation/devicetree/bindings/gpio/sodaville.txt b/trunk/Documentation/devicetree/bindings/gpio/sodaville.txt deleted file mode 100644 index 563eff22b975..000000000000 --- a/trunk/Documentation/devicetree/bindings/gpio/sodaville.txt +++ /dev/null @@ -1,48 +0,0 @@ -GPIO controller on CE4100 / Sodaville SoCs -========================================== - -The bindings for CE4100's GPIO controller match the generic description -which is covered by the gpio.txt file in this folder. - -The only additional property is the intel,muxctl property which holds the -value which is written into the MUXCNTL register. - -There is no compatible property for now because the driver is probed via -PCI id (vendor 0x8086 device 0x2e67). - -The interrupt specifier consists of two cells encoded as follows: - - <1st cell>: The interrupt-number that identifies the interrupt source. - - <2nd cell>: The level-sense information, encoded as follows: - 4 - active high level-sensitive - 8 - active low level-sensitive - -Example of the GPIO device and one user: - - pcigpio: gpio@b,1 { - /* two cells for GPIO and interrupt */ - #gpio-cells = <2>; - #interrupt-cells = <2>; - compatible = "pci8086,2e67.2", - "pci8086,2e67", - "pciclassff0000", - "pciclassff00"; - - reg = <0x15900 0x0 0x0 0x0 0x0>; - /* Interrupt line of the gpio device */ - interrupts = <15 1>; - /* It is an interrupt and GPIO controller itself */ - interrupt-controller; - gpio-controller; - intel,muxctl = <0>; - }; - - testuser@20 { - compatible = "example,testuser"; - /* User the 11th GPIO line as an active high triggered - * level interrupt - */ - interrupts = <11 8>; - interrupt-parent = <&pcigpio>; - /* Use this GPIO also with the gpio functions */ - gpios = <&pcigpio 11 0>; - }; diff --git a/trunk/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt b/trunk/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt deleted file mode 100644 index dbd4368ab8cc..000000000000 --- a/trunk/Documentation/devicetree/bindings/mmc/ti-omap-hsmmc.txt +++ /dev/null @@ -1,33 +0,0 @@ -* TI Highspeed MMC host controller for OMAP - -The Highspeed MMC Host Controller on TI OMAP family -provides an interface for MMC, SD, and SDIO types of memory cards. - -Required properties: -- compatible: - Should be "ti,omap2-hsmmc", for OMAP2 controllers - Should be "ti,omap3-hsmmc", for OMAP3 controllers - Should be "ti,omap4-hsmmc", for OMAP4 controllers -- ti,hwmods: Must be "mmc", n is controller instance starting 1 -- reg : should contain hsmmc registers location and length - -Optional properties: -ti,dual-volt: boolean, supports dual voltage cards --supply: phandle to the regulator device tree node -"supply-name" examples are "vmmc", "vmmc_aux" etc -ti,bus-width: Number of data lines, default assumed is 1 if the property is missing. -cd-gpios: GPIOs for card detection -wp-gpios: GPIOs for write protection -ti,non-removable: non-removable slot (like eMMC) -ti,needs-special-reset: Requires a special softreset sequence - -Example: - mmc1: mmc@0x4809c000 { - compatible = "ti,omap4-hsmmc"; - reg = <0x4809c000 0x400>; - ti,hwmods = "mmc1"; - ti,dual-volt; - ti,bus-width = <4>; - vmmc-supply = <&vmmc>; /* phandle to regulator node */ - ti,non-removable; - }; diff --git a/trunk/Documentation/devicetree/bindings/mtd/arm-versatile.txt b/trunk/Documentation/devicetree/bindings/mtd/arm-versatile.txt index 476845db94d0..beace4b89daa 100644 --- a/trunk/Documentation/devicetree/bindings/mtd/arm-versatile.txt +++ b/trunk/Documentation/devicetree/bindings/mtd/arm-versatile.txt @@ -4,5 +4,5 @@ Required properties: - compatible : must be "arm,versatile-flash"; - bank-width : width in bytes of flash interface. -Optional properties: -- Subnode partition map from mtd flash binding +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. diff --git a/trunk/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt b/trunk/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt index ef66ddd01da0..1889a4db5b7c 100644 --- a/trunk/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt +++ b/trunk/Documentation/devicetree/bindings/mtd/atmel-dataflash.txt @@ -3,6 +3,9 @@ Required properties: - compatible : "atmel,", "atmel,", "atmel,dataflash". +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + Example: flash@1 { diff --git a/trunk/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt b/trunk/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt index 00f1f546b32e..fce4894f5a98 100644 --- a/trunk/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt +++ b/trunk/Documentation/devicetree/bindings/mtd/fsl-upm-nand.txt @@ -19,6 +19,10 @@ Optional properties: read registers (tR). Required if property "gpios" is not used (R/B# pins not connected). +Each flash chip described may optionally contain additional sub-nodes +describing partitions of the address space. See partition.txt for more +detail. + Examples: upm@1,0 { diff --git a/trunk/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt b/trunk/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt index 719f4dc58df7..36ef07d3c90f 100644 --- a/trunk/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt +++ b/trunk/Documentation/devicetree/bindings/mtd/gpio-control-nand.txt @@ -25,6 +25,9 @@ Optional properties: GPIO state and before and after command byte writes, this register will be read to ensure that the GPIO accesses have completed. +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. + Examples: gpio-nand@1,0 { diff --git a/trunk/Documentation/devicetree/bindings/mtd/mtd-physmap.txt b/trunk/Documentation/devicetree/bindings/mtd/mtd-physmap.txt index 80152cb567d9..a63c2bd7de2b 100644 --- a/trunk/Documentation/devicetree/bindings/mtd/mtd-physmap.txt +++ b/trunk/Documentation/devicetree/bindings/mtd/mtd-physmap.txt @@ -23,27 +23,8 @@ are defined: - vendor-id : Contains the flash chip's vendor id (1 byte). - device-id : Contains the flash chip's device id (1 byte). -In addition to the information on the mtd bank itself, the -device tree may optionally contain additional information -describing partitions of the address space. This can be -used on platforms which have strong conventions about which -portions of a flash are used for what purposes, but which don't -use an on-flash partition table such as RedBoot. - -Each partition is represented as a sub-node of the mtd device. -Each node's name represents the name of the corresponding -partition of the mtd device. - -Flash partitions - - reg : The partition's offset and size within the mtd bank. - - label : (optional) The label / name for this partition. - If omitted, the label is taken from the node name (excluding - the unit address). - - read-only : (optional) This parameter, if present, is a hint to - Linux that this partition should only be mounted - read-only. This is usually used for flash partitions - containing early-boot firmware images or data which should not - be clobbered. +The device tree may optionally contain sub-nodes describing partitions of the +address space. See partition.txt for more detail. Example: diff --git a/trunk/Documentation/devicetree/bindings/mtd/partition.txt b/trunk/Documentation/devicetree/bindings/mtd/partition.txt new file mode 100644 index 000000000000..f114ce1657c2 --- /dev/null +++ b/trunk/Documentation/devicetree/bindings/mtd/partition.txt @@ -0,0 +1,38 @@ +Representing flash partitions in devicetree + +Partitions can be represented by sub-nodes of an mtd device. This can be used +on platforms which have strong conventions about which portions of a flash are +used for what purposes, but which don't use an on-flash partition table such +as RedBoot. + +#address-cells & #size-cells must both be present in the mtd device and be +equal to 1. + +Required properties: +- reg : The partition's offset and size within the mtd bank. + +Optional properties: +- label : The label / name for this partition. If omitted, the label is taken + from the node name (excluding the unit address). +- read-only : This parameter, if present, is a hint to Linux that this + partition should only be mounted read-only. This is usually used for flash + partitions containing early-boot firmware images or data which should not be + clobbered. + +Examples: + + +flash@0 { + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0000000 0x100000>; + read-only; + }; + + uimage@100000 { + reg = <0x0100000 0x200000>; + }; +]; diff --git a/trunk/Documentation/dma-buf-sharing.txt b/trunk/Documentation/dma-buf-sharing.txt index 3bbd5c51605a..225f96d88f55 100644 --- a/trunk/Documentation/dma-buf-sharing.txt +++ b/trunk/Documentation/dma-buf-sharing.txt @@ -32,12 +32,8 @@ The buffer-user *IMPORTANT*: [see https://lkml.org/lkml/2011/12/20/211 for more details] For this first version, A buffer shared using the dma_buf sharing API: - *may* be exported to user space using "mmap" *ONLY* by exporter, outside of - this framework. -- with this new iteration of the dma-buf api cpu access from the kernel has been - enable, see below for the details. - -dma-buf operations for device dma only --------------------------------------- + this framework. +- may be used *ONLY* by importers that do not need CPU access to the buffer. The dma_buf buffer sharing API usage contains the following steps: @@ -223,120 +219,10 @@ NOTES: If the exporter chooses not to allow an attach() operation once a map_dma_buf() API has been called, it simply returns an error. -Kernel cpu access to a dma-buf buffer object --------------------------------------------- - -The motivation to allow cpu access from the kernel to a dma-buf object from the -importers side are: -- fallback operations, e.g. if the devices is connected to a usb bus and the - kernel needs to shuffle the data around first before sending it away. -- full transparency for existing users on the importer side, i.e. userspace - should not notice the difference between a normal object from that subsystem - and an imported one backed by a dma-buf. This is really important for drm - opengl drivers that expect to still use all the existing upload/download - paths. - -Access to a dma_buf from the kernel context involves three steps: - -1. Prepare access, which invalidate any necessary caches and make the object - available for cpu access. -2. Access the object page-by-page with the dma_buf map apis -3. Finish access, which will flush any necessary cpu caches and free reserved - resources. - -1. Prepare access - - Before an importer can access a dma_buf object with the cpu from the kernel - context, it needs to notify the exporter of the access that is about to - happen. - - Interface: - int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, - size_t start, size_t len, - enum dma_data_direction direction) - - This allows the exporter to ensure that the memory is actually available for - cpu access - the exporter might need to allocate or swap-in and pin the - backing storage. The exporter also needs to ensure that cpu access is - coherent for the given range and access direction. The range and access - direction can be used by the exporter to optimize the cache flushing, i.e. - access outside of the range or with a different direction (read instead of - write) might return stale or even bogus data (e.g. when the exporter needs to - copy the data to temporary storage). - - This step might fail, e.g. in oom conditions. - -2. Accessing the buffer - - To support dma_buf objects residing in highmem cpu access is page-based using - an api similar to kmap. Accessing a dma_buf is done in aligned chunks of - PAGE_SIZE size. Before accessing a chunk it needs to be mapped, which returns - a pointer in kernel virtual address space. Afterwards the chunk needs to be - unmapped again. There is no limit on how often a given chunk can be mapped - and unmapped, i.e. the importer does not need to call begin_cpu_access again - before mapping the same chunk again. - - Interfaces: - void *dma_buf_kmap(struct dma_buf *, unsigned long); - void dma_buf_kunmap(struct dma_buf *, unsigned long, void *); - - There are also atomic variants of these interfaces. Like for kmap they - facilitate non-blocking fast-paths. Neither the importer nor the exporter (in - the callback) is allowed to block when using these. - - Interfaces: - void *dma_buf_kmap_atomic(struct dma_buf *, unsigned long); - void dma_buf_kunmap_atomic(struct dma_buf *, unsigned long, void *); - - For importers all the restrictions of using kmap apply, like the limited - supply of kmap_atomic slots. Hence an importer shall only hold onto at most 2 - atomic dma_buf kmaps at the same time (in any given process context). - - dma_buf kmap calls outside of the range specified in begin_cpu_access are - undefined. If the range is not PAGE_SIZE aligned, kmap needs to succeed on - the partial chunks at the beginning and end but may return stale or bogus - data outside of the range (in these partial chunks). - - Note that these calls need to always succeed. The exporter needs to complete - any preparations that might fail in begin_cpu_access. - -3. Finish access - - When the importer is done accessing the range specified in begin_cpu_access, - it needs to announce this to the exporter (to facilitate cache flushing and - unpinning of any pinned resources). The result of of any dma_buf kmap calls - after end_cpu_access is undefined. - - Interface: - void dma_buf_end_cpu_access(struct dma_buf *dma_buf, - size_t start, size_t len, - enum dma_data_direction dir); - - -Miscellaneous notes -------------------- - +Miscellaneous notes: - Any exporters or users of the dma-buf buffer sharing framework must have a 'select DMA_SHARED_BUFFER' in their respective Kconfigs. -- In order to avoid fd leaks on exec, the FD_CLOEXEC flag must be set - on the file descriptor. This is not just a resource leak, but a - potential security hole. It could give the newly exec'd application - access to buffers, via the leaked fd, to which it should otherwise - not be permitted access. - - The problem with doing this via a separate fcntl() call, versus doing it - atomically when the fd is created, is that this is inherently racy in a - multi-threaded app[3]. The issue is made worse when it is library code - opening/creating the file descriptor, as the application may not even be - aware of the fd's. - - To avoid this problem, userspace must have a way to request O_CLOEXEC - flag be set when the dma-buf fd is created. So any API provided by - the exporting driver to create a dmabuf fd must provide a way to let - userspace control setting of O_CLOEXEC flag passed in to dma_buf_fd(). - References: [1] struct dma_buf_ops in include/linux/dma-buf.h [2] All interfaces mentioned above defined in include/linux/dma-buf.h -[3] https://lwn.net/Articles/236486/ diff --git a/trunk/Documentation/filesystems/files.txt b/trunk/Documentation/filesystems/files.txt index 46dfc6b038c3..ac2facc50d2a 100644 --- a/trunk/Documentation/filesystems/files.txt +++ b/trunk/Documentation/filesystems/files.txt @@ -113,8 +113,8 @@ the fdtable structure - if (fd >= 0) { /* locate_fd() may have expanded fdtable, load the ptr */ fdt = files_fdtable(files); - __set_open_fd(fd, fdt); - __clear_close_on_exec(fd, fdt); + FD_SET(fd, fdt->open_fds); + FD_CLR(fd, fdt->close_on_exec); spin_unlock(&files->file_lock); ..... diff --git a/trunk/Documentation/gpio.txt b/trunk/Documentation/gpio.txt index 620a07844e8c..792faa3c06cf 100644 --- a/trunk/Documentation/gpio.txt +++ b/trunk/Documentation/gpio.txt @@ -271,26 +271,9 @@ Some platforms may also use knowledge about what GPIOs are active for power management, such as by powering down unused chip sectors and, more easily, gating off unused clocks. -For GPIOs that use pins known to the pinctrl subsystem, that subsystem should -be informed of their use; a gpiolib driver's .request() operation may call -pinctrl_request_gpio(), and a gpiolib driver's .free() operation may call -pinctrl_free_gpio(). The pinctrl subsystem allows a pinctrl_request_gpio() -to succeed concurrently with a pin or pingroup being "owned" by a device for -pin multiplexing. - -Any programming of pin multiplexing hardware that is needed to route the -GPIO signal to the appropriate pin should occur within a GPIO driver's -.direction_input() or .direction_output() operations, and occur after any -setup of an output GPIO's value. This allows a glitch-free migration from a -pin's special function to GPIO. This is sometimes required when using a GPIO -to implement a workaround on signals typically driven by a non-GPIO HW block. - -Some platforms allow some or all GPIO signals to be routed to different pins. -Similarly, other aspects of the GPIO or pin may need to be configured, such as -pullup/pulldown. Platform software should arrange that any such details are -configured prior to gpio_request() being called for those GPIOs, e.g. using -the pinctrl subsystem's mapping table, so that GPIO users need not be aware -of these details. +Note that requesting a GPIO does NOT cause it to be configured in any +way; it just marks that GPIO as in use. Separate code must handle any +pin setup (e.g. controlling which pin the GPIO uses, pullup/pulldown). Also note that it's your responsibility to have stopped using a GPIO before you free it. @@ -319,8 +302,6 @@ where 'flags' is currently defined to specify the following properties: * GPIOF_INIT_LOW - as output, set initial level to LOW * GPIOF_INIT_HIGH - as output, set initial level to HIGH - * GPIOF_OPEN_DRAIN - gpio pin is open drain type. - * GPIOF_OPEN_SOURCE - gpio pin is open source type. since GPIOF_INIT_* are only valid when configured as output, so group valid combinations as: @@ -329,19 +310,8 @@ combinations as: * GPIOF_OUT_INIT_LOW - configured as output, initial level LOW * GPIOF_OUT_INIT_HIGH - configured as output, initial level HIGH -When setting the flag as GPIOF_OPEN_DRAIN then it will assume that pins is -open drain type. Such pins will not be driven to 1 in output mode. It is -require to connect pull-up on such pins. By enabling this flag, gpio lib will -make the direction to input when it is asked to set value of 1 in output mode -to make the pin HIGH. The pin is make to LOW by driving value 0 in output mode. - -When setting the flag as GPIOF_OPEN_SOURCE then it will assume that pins is -open source type. Such pins will not be driven to 0 in output mode. It is -require to connect pull-down on such pin. By enabling this flag, gpio lib will -make the direction to input when it is asked to set value of 0 in output mode -to make the pin LOW. The pin is make to HIGH by driving value 1 in output mode. - -In the future, these flags can be extended to support more properties. +In the future, these flags can be extended to support more properties such +as open-drain status. Further more, to ease the claim/release of multiple GPIOs, 'struct gpio' is introduced to encapsulate all three fields as: diff --git a/trunk/Documentation/i2c/busses/i2c-i801 b/trunk/Documentation/i2c/busses/i2c-i801 index 71f55bbcefc8..2871fd500349 100644 --- a/trunk/Documentation/i2c/busses/i2c-i801 +++ b/trunk/Documentation/i2c/busses/i2c-i801 @@ -20,7 +20,6 @@ Supported adapters: * Intel Patsburg (PCH) * Intel DH89xxCC (PCH) * Intel Panther Point (PCH) - * Intel Lynx Point (PCH) Datasheets: Publicly available at the Intel website On Intel Patsburg and later chipsets, both the normal host SMBus controller diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index c1601e5a8b71..58eac231fe69 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -1699,12 +1699,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. The default is to send the implementation identification information. - nfsd.nfs4_disable_idmapping= - [NFSv4] When set to the default of '1', the NFSv4 - server will return only numeric uids and gids to - clients using auth_sys, and will accept numeric uids - and gids from such clients. This is intended to ease - migration from NFSv2/v3. objlayoutdriver.osd_login_prog= [NFS] [OBJLAYOUT] sets the pathname to the program which @@ -1875,8 +1869,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted. shutdown the other cpus. Instead use the REBOOT_VECTOR irq. - nomodule Disable module load - nopat [X86] Disable PAT (page attribute table extension of pagetables) support. diff --git a/trunk/Documentation/laptops/asus-laptop.txt b/trunk/Documentation/laptops/asus-laptop.txt index a1e04d679289..803e51f6768b 100644 --- a/trunk/Documentation/laptops/asus-laptop.txt +++ b/trunk/Documentation/laptops/asus-laptop.txt @@ -45,7 +45,7 @@ Status Usage ----- - Try "modprobe asus-laptop". Check your dmesg (simply type dmesg). You should + Try "modprobe asus_acpi". Check your dmesg (simply type dmesg). You should see some lines like this : Asus Laptop Extras version 0.42 diff --git a/trunk/Documentation/laptops/sony-laptop.txt b/trunk/Documentation/laptops/sony-laptop.txt index 0d5ac7f5287e..2bd4e82e5d9f 100644 --- a/trunk/Documentation/laptops/sony-laptop.txt +++ b/trunk/Documentation/laptops/sony-laptop.txt @@ -17,11 +17,6 @@ subsystem. See the logs of acpid or /proc/acpi/event and devices are created by the driver. Additionally, loading the driver with the debug option will report all events in the kernel log. -The "scancodes" passed to the input system (that can be remapped with udev) -are indexes to the table "sony_laptop_input_keycode_map" in the sony-laptop.c -module. For example the "FN/E" key combination (EJECTCD on some models) -generates the scancode 20 (0x14). - Backlight control: ------------------ If your laptop model supports it, you will find sysfs files in the diff --git a/trunk/Documentation/virtual/kvm/api.txt b/trunk/Documentation/virtual/kvm/api.txt index 6386f8c0482e..e1d94bf4056e 100644 --- a/trunk/Documentation/virtual/kvm/api.txt +++ b/trunk/Documentation/virtual/kvm/api.txt @@ -95,7 +95,7 @@ described as 'basic' will be available. Capability: basic Architectures: all Type: system ioctl -Parameters: machine type identifier (KVM_VM_*) +Parameters: none Returns: a VM fd that can be used to control the new virtual machine. The new VM has no virtual cpus and no memory. An mmap() of a VM fd @@ -103,11 +103,6 @@ will access the virtual machine's physical address space; offset zero corresponds to guest physical address zero. Use of mmap() on a VM fd is discouraged if userspace memory allocation (KVM_CAP_USER_MEMORY) is available. -You most certainly want to use 0 as machine type. - -In order to create user controlled virtual machines on S390, check -KVM_CAP_S390_UCONTROL and use the flag KVM_VM_S390_UCONTROL as -privileged user (CAP_SYS_ADMIN). 4.3 KVM_GET_MSR_INDEX_LIST @@ -218,11 +213,6 @@ allocation of vcpu ids. For example, if userspace wants single-threaded guest vcpus, it should make all vcpu ids be a multiple of the number of vcpus per vcore. -For virtual cpus that have been created with S390 user controlled virtual -machines, the resulting vcpu fd can be memory mapped at page offset -KVM_S390_SIE_PAGE_OFFSET in order to obtain a memory map of the virtual -cpu's hardware control block. - 4.8 KVM_GET_DIRTY_LOG (vm ioctl) Capability: basic @@ -1169,14 +1159,6 @@ following flags are specified: /* Depends on KVM_CAP_IOMMU */ #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) -/* The following two depend on KVM_CAP_PCI_2_3 */ -#define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) -#define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) - -If KVM_DEV_ASSIGN_PCI_2_3 is set, the kernel will manage legacy INTx interrupts -via the PCI-2.3-compliant device-level mask, thus enable IRQ sharing with other -assigned devices or host devices. KVM_DEV_ASSIGN_MASK_INTX specifies the -guest's view on the INTx mask, see KVM_ASSIGN_SET_INTX_MASK for details. The KVM_DEV_ASSIGN_ENABLE_IOMMU flag is a mandatory option to ensure isolation of the device. Usages not specifying this flag are deprecated. @@ -1417,71 +1399,6 @@ The following flags are defined: If datamatch flag is set, the event will be signaled only if the written value to the registered address is equal to datamatch in struct kvm_ioeventfd. -4.59 KVM_DIRTY_TLB - -Capability: KVM_CAP_SW_TLB -Architectures: ppc -Type: vcpu ioctl -Parameters: struct kvm_dirty_tlb (in) -Returns: 0 on success, -1 on error - -struct kvm_dirty_tlb { - __u64 bitmap; - __u32 num_dirty; -}; - -This must be called whenever userspace has changed an entry in the shared -TLB, prior to calling KVM_RUN on the associated vcpu. - -The "bitmap" field is the userspace address of an array. This array -consists of a number of bits, equal to the total number of TLB entries as -determined by the last successful call to KVM_CONFIG_TLB, rounded up to the -nearest multiple of 64. - -Each bit corresponds to one TLB entry, ordered the same as in the shared TLB -array. - -The array is little-endian: the bit 0 is the least significant bit of the -first byte, bit 8 is the least significant bit of the second byte, etc. -This avoids any complications with differing word sizes. - -The "num_dirty" field is a performance hint for KVM to determine whether it -should skip processing the bitmap and just invalidate everything. It must -be set to the number of set bits in the bitmap. - -4.60 KVM_ASSIGN_SET_INTX_MASK - -Capability: KVM_CAP_PCI_2_3 -Architectures: x86 -Type: vm ioctl -Parameters: struct kvm_assigned_pci_dev (in) -Returns: 0 on success, -1 on error - -Allows userspace to mask PCI INTx interrupts from the assigned device. The -kernel will not deliver INTx interrupts to the guest between setting and -clearing of KVM_ASSIGN_SET_INTX_MASK via this interface. This enables use of -and emulation of PCI 2.3 INTx disable command register behavior. - -This may be used for both PCI 2.3 devices supporting INTx disable natively and -older devices lacking this support. Userspace is responsible for emulating the -read value of the INTx disable bit in the guest visible PCI command register. -When modifying the INTx disable state, userspace should precede updating the -physical device command register by calling this ioctl to inform the kernel of -the new intended INTx mask state. - -Note that the kernel uses the device INTx disable bit to internally manage the -device interrupt state for PCI 2.3 devices. Reads of this register may -therefore not match the expected value. Writes should always use the guest -intended INTx disable value rather than attempting to read-copy-update the -current physical device state. Races between user and kernel updates to the -INTx disable bit are handled lazily in the kernel. It's possible the device -may generate unintended interrupts, but they will not be injected into the -guest. - -See KVM_ASSIGN_DEV_IRQ for the data structure. The target device is specified -by assigned_dev_id. In the flags field, only KVM_DEV_ASSIGN_MASK_INTX is -evaluated. - 4.62 KVM_CREATE_SPAPR_TCE Capability: KVM_CAP_SPAPR_TCE @@ -1574,101 +1491,6 @@ following algorithm: Some guests configure the LINT1 NMI input to cause a panic, aiding in debugging. -4.65 KVM_S390_UCAS_MAP - -Capability: KVM_CAP_S390_UCONTROL -Architectures: s390 -Type: vcpu ioctl -Parameters: struct kvm_s390_ucas_mapping (in) -Returns: 0 in case of success - -The parameter is defined like this: - struct kvm_s390_ucas_mapping { - __u64 user_addr; - __u64 vcpu_addr; - __u64 length; - }; - -This ioctl maps the memory at "user_addr" with the length "length" to -the vcpu's address space starting at "vcpu_addr". All parameters need to -be alligned by 1 megabyte. - -4.66 KVM_S390_UCAS_UNMAP - -Capability: KVM_CAP_S390_UCONTROL -Architectures: s390 -Type: vcpu ioctl -Parameters: struct kvm_s390_ucas_mapping (in) -Returns: 0 in case of success - -The parameter is defined like this: - struct kvm_s390_ucas_mapping { - __u64 user_addr; - __u64 vcpu_addr; - __u64 length; - }; - -This ioctl unmaps the memory in the vcpu's address space starting at -"vcpu_addr" with the length "length". The field "user_addr" is ignored. -All parameters need to be alligned by 1 megabyte. - -4.67 KVM_S390_VCPU_FAULT - -Capability: KVM_CAP_S390_UCONTROL -Architectures: s390 -Type: vcpu ioctl -Parameters: vcpu absolute address (in) -Returns: 0 in case of success - -This call creates a page table entry on the virtual cpu's address space -(for user controlled virtual machines) or the virtual machine's address -space (for regular virtual machines). This only works for minor faults, -thus it's recommended to access subject memory page via the user page -table upfront. This is useful to handle validity intercepts for user -controlled virtual machines to fault in the virtual cpu's lowcore pages -prior to calling the KVM_RUN ioctl. - -4.68 KVM_SET_ONE_REG - -Capability: KVM_CAP_ONE_REG -Architectures: all -Type: vcpu ioctl -Parameters: struct kvm_one_reg (in) -Returns: 0 on success, negative value on failure - -struct kvm_one_reg { - __u64 id; - __u64 addr; -}; - -Using this ioctl, a single vcpu register can be set to a specific value -defined by user space with the passed in struct kvm_one_reg, where id -refers to the register identifier as described below and addr is a pointer -to a variable with the respective size. There can be architecture agnostic -and architecture specific registers. Each have their own range of operation -and their own constants and width. To keep track of the implemented -registers, find a list below: - - Arch | Register | Width (bits) - | | - PPC | KVM_REG_PPC_HIOR | 64 - -4.69 KVM_GET_ONE_REG - -Capability: KVM_CAP_ONE_REG -Architectures: all -Type: vcpu ioctl -Parameters: struct kvm_one_reg (in and out) -Returns: 0 on success, negative value on failure - -This ioctl allows to receive the value of a single register implemented -in a vcpu. The register to read is indicated by the "id" field of the -kvm_one_reg struct passed in. On success, the register value can be found -at the memory location pointed to by "addr". - -The list of registers accessible using this interface is identical to the -list in 4.64. - 5. The kvm_run structure Application code obtains a pointer to the kvm_run structure by @@ -1829,20 +1651,6 @@ s390 specific. s390 specific. - /* KVM_EXIT_S390_UCONTROL */ - struct { - __u64 trans_exc_code; - __u32 pgm_code; - } s390_ucontrol; - -s390 specific. A page fault has occurred for a user controlled virtual -machine (KVM_VM_S390_UNCONTROL) on it's host page table that cannot be -resolved by the kernel. -The program code and the translation exception code that were placed -in the cpu's lowcore are presented here as defined by the z Architecture -Principles of Operation Book in the Chapter for Dynamic Address Translation -(DAT) - /* KVM_EXIT_DCR */ struct { __u32 dcrn; @@ -1885,29 +1693,6 @@ developer registration required to access it). /* Fix the size of the union. */ char padding[256]; }; - - /* - * shared registers between kvm and userspace. - * kvm_valid_regs specifies the register classes set by the host - * kvm_dirty_regs specified the register classes dirtied by userspace - * struct kvm_sync_regs is architecture specific, as well as the - * bits for kvm_valid_regs and kvm_dirty_regs - */ - __u64 kvm_valid_regs; - __u64 kvm_dirty_regs; - union { - struct kvm_sync_regs regs; - char padding[1024]; - } s; - -If KVM_CAP_SYNC_REGS is defined, these fields allow userspace to access -certain guest registers without having to call SET/GET_*REGS. Thus we can -avoid some system call overhead if userspace has to handle the exit. -Userspace can query the validity of the structure by checking -kvm_valid_regs for specific bits. These bits are architecture specific -and usually define the validity of a groups of registers. (e.g. one bit - for general purpose registers) - }; 6. Capabilities that can be enabled @@ -1956,45 +1741,3 @@ HTAB address part of SDR1 contains an HVA instead of a GPA, as PAPR keeps the HTAB invisible to the guest. When this capability is enabled, KVM_EXIT_PAPR_HCALL can occur. - -6.3 KVM_CAP_SW_TLB - -Architectures: ppc -Parameters: args[0] is the address of a struct kvm_config_tlb -Returns: 0 on success; -1 on error - -struct kvm_config_tlb { - __u64 params; - __u64 array; - __u32 mmu_type; - __u32 array_len; -}; - -Configures the virtual CPU's TLB array, establishing a shared memory area -between userspace and KVM. The "params" and "array" fields are userspace -addresses of mmu-type-specific data structures. The "array_len" field is an -safety mechanism, and should be set to the size in bytes of the memory that -userspace has reserved for the array. It must be at least the size dictated -by "mmu_type" and "params". - -While KVM_RUN is active, the shared region is under control of KVM. Its -contents are undefined, and any modification by userspace results in -boundedly undefined behavior. - -On return from KVM_RUN, the shared region will reflect the current state of -the guest's TLB. If userspace makes any changes, it must call KVM_DIRTY_TLB -to tell KVM which entries have been changed, prior to calling KVM_RUN again -on this vcpu. - -For mmu types KVM_MMU_FSL_BOOKE_NOHV and KVM_MMU_FSL_BOOKE_HV: - - The "params" field is of type "struct kvm_book3e_206_tlb_params". - - The "array" field points to an array of type "struct - kvm_book3e_206_tlb_entry". - - The array consists of all entries in the first TLB, followed by all - entries in the second TLB. - - Within a TLB, entries are ordered first by increasing set number. Within a - set, entries are ordered by way (increasing ESEL). - - The hash for determining set number in TLB0 is: (MAS2 >> 12) & (num_sets - 1) - where "num_sets" is the tlb_sizes[] value divided by the tlb_ways[] value. - - The tsize field of mas1 shall be set to 4K on TLB0, even though the - hardware ignores this value for TLB0. diff --git a/trunk/Documentation/virtual/kvm/ppc-pv.txt b/trunk/Documentation/virtual/kvm/ppc-pv.txt index 6e7c37050930..2b7ce190cde4 100644 --- a/trunk/Documentation/virtual/kvm/ppc-pv.txt +++ b/trunk/Documentation/virtual/kvm/ppc-pv.txt @@ -81,8 +81,28 @@ additional registers to the magic page. If you add fields to the magic page, also define a new hypercall feature to indicate that the host can give you more registers. Only if the host supports the additional features, make use of them. -The magic page layout is described by struct kvm_vcpu_arch_shared -in arch/powerpc/include/asm/kvm_para.h. +The magic page has the following layout as described in +arch/powerpc/include/asm/kvm_para.h: + +struct kvm_vcpu_arch_shared { + __u64 scratch1; + __u64 scratch2; + __u64 scratch3; + __u64 critical; /* Guest may not get interrupts if == r1 */ + __u64 sprg0; + __u64 sprg1; + __u64 sprg2; + __u64 sprg3; + __u64 srr0; + __u64 srr1; + __u64 dar; + __u64 msr; + __u32 dsisr; + __u32 int_pending; /* Tells the guest if we have an interrupt */ +}; + +Additions to the page must only occur at the end. Struct fields are always 32 +or 64 bit aligned, depending on them being 32 or 64 bit wide respectively. Magic page features =================== diff --git a/trunk/Documentation/vm/Makefile b/trunk/Documentation/vm/Makefile new file mode 100644 index 000000000000..3fa4d0668864 --- /dev/null +++ b/trunk/Documentation/vm/Makefile @@ -0,0 +1,8 @@ +# kbuild trick to avoid linker error. Can be omitted if a module is built. +obj- := dummy.o + +# List of programs to build +hostprogs-y := page-types hugepage-mmap hugepage-shm map_hugetlb + +# Tell kbuild to always build the programs +always := $(hostprogs-y) diff --git a/trunk/tools/testing/selftests/vm/hugepage-mmap.c b/trunk/Documentation/vm/hugepage-mmap.c similarity index 93% rename from trunk/tools/testing/selftests/vm/hugepage-mmap.c rename to trunk/Documentation/vm/hugepage-mmap.c index a10f310d2362..db0dd9a33d54 100644 --- a/trunk/tools/testing/selftests/vm/hugepage-mmap.c +++ b/trunk/Documentation/vm/hugepage-mmap.c @@ -22,7 +22,7 @@ #include #include -#define FILE_NAME "huge/hugepagefile" +#define FILE_NAME "/mnt/hugepagefile" #define LENGTH (256UL*1024*1024) #define PROTECTION (PROT_READ | PROT_WRITE) @@ -48,7 +48,7 @@ static void write_bytes(char *addr) *(addr + i) = (char)i; } -static int read_bytes(char *addr) +static void read_bytes(char *addr) { unsigned long i; @@ -56,15 +56,14 @@ static int read_bytes(char *addr) for (i = 0; i < LENGTH; i++) if (*(addr + i) != (char)i) { printf("Mismatch at %lu\n", i); - return 1; + break; } - return 0; } int main(void) { void *addr; - int fd, ret; + int fd; fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755); if (fd < 0) { @@ -82,11 +81,11 @@ int main(void) printf("Returned address is %p\n", addr); check_bytes(addr); write_bytes(addr); - ret = read_bytes(addr); + read_bytes(addr); munmap(addr, LENGTH); close(fd); unlink(FILE_NAME); - return ret; + return 0; } diff --git a/trunk/tools/testing/selftests/vm/hugepage-shm.c b/trunk/Documentation/vm/hugepage-shm.c similarity index 94% rename from trunk/tools/testing/selftests/vm/hugepage-shm.c rename to trunk/Documentation/vm/hugepage-shm.c index 0d0ef4fc0c04..07956d8592c9 100644 --- a/trunk/tools/testing/selftests/vm/hugepage-shm.c +++ b/trunk/Documentation/vm/hugepage-shm.c @@ -57,8 +57,8 @@ int main(void) unsigned long i; char *shmaddr; - shmid = shmget(2, LENGTH, SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W); - if (shmid < 0) { + if ((shmid = shmget(2, LENGTH, + SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W)) < 0) { perror("shmget"); exit(1); } @@ -82,16 +82,14 @@ int main(void) dprintf("Starting the Check..."); for (i = 0; i < LENGTH; i++) - if (shmaddr[i] != (char)i) { + if (shmaddr[i] != (char)i) printf("\nIndex %lu mismatched\n", i); - exit(3); - } dprintf("Done.\n"); if (shmdt((const void *)shmaddr) != 0) { perror("Detach failure"); shmctl(shmid, IPC_RMID, NULL); - exit(4); + exit(3); } shmctl(shmid, IPC_RMID, NULL); diff --git a/trunk/tools/testing/selftests/vm/map_hugetlb.c b/trunk/Documentation/vm/map_hugetlb.c similarity index 94% rename from trunk/tools/testing/selftests/vm/map_hugetlb.c rename to trunk/Documentation/vm/map_hugetlb.c index ac56639dd4a9..eda1a6d3578a 100644 --- a/trunk/tools/testing/selftests/vm/map_hugetlb.c +++ b/trunk/Documentation/vm/map_hugetlb.c @@ -44,7 +44,7 @@ static void write_bytes(char *addr) *(addr + i) = (char)i; } -static int read_bytes(char *addr) +static void read_bytes(char *addr) { unsigned long i; @@ -52,15 +52,13 @@ static int read_bytes(char *addr) for (i = 0; i < LENGTH; i++) if (*(addr + i) != (char)i) { printf("Mismatch at %lu\n", i); - return 1; + break; } - return 0; } int main(void) { void *addr; - int ret; addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, 0, 0); if (addr == MAP_FAILED) { @@ -71,9 +69,9 @@ int main(void) printf("Returned address is %p\n", addr); check_bytes(addr); write_bytes(addr); - ret = read_bytes(addr); + read_bytes(addr); munmap(addr, LENGTH); - return ret; + return 0; } diff --git a/trunk/tools/vm/page-types.c b/trunk/Documentation/vm/page-types.c similarity index 99% rename from trunk/tools/vm/page-types.c rename to trunk/Documentation/vm/page-types.c index 7dab7b25b5c6..0b13f02d4059 100644 --- a/trunk/tools/vm/page-types.c +++ b/trunk/Documentation/vm/page-types.c @@ -124,7 +124,7 @@ #define BIT(name) (1ULL << KPF_##name) #define BITS_COMPOUND (BIT(COMPOUND_HEAD) | BIT(COMPOUND_TAIL)) -static const char * const page_flag_names[] = { +static const char *page_flag_names[] = { [KPF_LOCKED] = "L:locked", [KPF_ERROR] = "E:error", [KPF_REFERENCED] = "R:referenced", @@ -166,7 +166,7 @@ static const char * const page_flag_names[] = { }; -static const char * const debugfs_known_mountpoints[] = { +static const char *debugfs_known_mountpoints[] = { "/sys/kernel/debug", "/debug", 0, @@ -215,7 +215,7 @@ static int hwpoison_forget_fd; static unsigned long total_pages; static unsigned long nr_pages[HASH_SIZE]; -static uint64_t page_flags[HASH_SIZE]; +static uint64_t page_flags[HASH_SIZE]; /* diff --git a/trunk/Documentation/watchdog/00-INDEX b/trunk/Documentation/watchdog/00-INDEX new file mode 100644 index 000000000000..fc9082a1477a --- /dev/null +++ b/trunk/Documentation/watchdog/00-INDEX @@ -0,0 +1,19 @@ +00-INDEX + - this file. +convert_drivers_to_kernel_api.txt + - how-to for converting old watchdog drivers to the new kernel API. +hpwdt.txt + - information on the HP iLO2 NMI watchdog +pcwd-watchdog.txt + - documentation for Berkshire Products PC Watchdog ISA cards. +src/ + - directory holding watchdog related example programs. +watchdog-api.txt + - description of the Linux Watchdog driver API. +watchdog-kernel-api.txt + - description of the Linux WatchDog Timer Driver Core kernel API. +watchdog-parameters.txt + - information on driver parameters (for drivers other than + the ones that have driver-specific files here) +wdt.txt + - description of the Watchdog Timer Interfaces for Linux. diff --git a/trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt b/trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt index 271b8850dde7..be8119bb15d2 100644 --- a/trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt +++ b/trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt @@ -59,10 +59,6 @@ Here is a overview of the functions and probably needed actions: WDIOC_GETTIMEOUT: No preparations needed - WDIOC_GETTIMELEFT: - It needs get_timeleft() callback to be defined. Otherwise it - will return EOPNOTSUPP - Other IOCTLs can be served using the ioctl-callback. Note that this is mainly intended for porting old drivers; new drivers should not invent private IOCTLs. Private IOCTLs are processed first. When the callback returns with diff --git a/trunk/Documentation/watchdog/watchdog-kernel-api.txt b/trunk/Documentation/watchdog/watchdog-kernel-api.txt index 227f6cd0e5fa..9e162465b0cf 100644 --- a/trunk/Documentation/watchdog/watchdog-kernel-api.txt +++ b/trunk/Documentation/watchdog/watchdog-kernel-api.txt @@ -1,6 +1,6 @@ The Linux WatchDog Timer Driver Core kernel API. =============================================== -Last reviewed: 16-Mar-2012 +Last reviewed: 29-Nov-2011 Wim Van Sebroeck @@ -77,7 +77,6 @@ struct watchdog_ops { int (*ping)(struct watchdog_device *); unsigned int (*status)(struct watchdog_device *); int (*set_timeout)(struct watchdog_device *, unsigned int); - unsigned int (*get_timeleft)(struct watchdog_device *); long (*ioctl)(struct watchdog_device *, unsigned int, unsigned long); }; @@ -118,13 +117,11 @@ they are supported. These optional routines/operations are: status of the device is reported with watchdog WDIOF_* status flags/bits. * set_timeout: this routine checks and changes the timeout of the watchdog timer device. It returns 0 on success, -EINVAL for "parameter out of range" - and -EIO for "could not write value to the watchdog". On success this - routine should set the timeout value of the watchdog_device to the - achieved timeout value (which may be different from the requested one - because the watchdog does not necessarily has a 1 second resolution). + and -EIO for "could not write value to the watchdog". On success the timeout + value of the watchdog_device will be changed to the value that was just used + to re-program the watchdog timer device. (Note: the WDIOF_SETTIMEOUT needs to be set in the options field of the watchdog's info structure). -* get_timeleft: this routines returns the time that's left before a reset. * ioctl: if this routine is present then it will be called first before we do our own internal ioctl call handling. This routine should return -ENOIOCTLCMD if a command is not supported. The parameters that are passed to the ioctl diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index 64168f6dd89e..3d11fa581bb7 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2225,16 +2225,13 @@ W: http://lanana.org/docs/device-list/index.html S: Maintained DEVICE-MAPPER (LVM) -M: Alasdair Kergon -M: dm-devel@redhat.com +P: Alasdair Kergon L: dm-devel@redhat.com W: http://sources.redhat.com/dm Q: http://patchwork.kernel.org/project/dm-devel/list/ -T: quilt http://people.redhat.com/agk/patches/linux/editing/ S: Maintained F: Documentation/device-mapper/ F: drivers/md/dm* -F: drivers/md/persistent-data/ F: include/linux/device-mapper.h F: include/linux/dm-*.h @@ -5185,7 +5182,7 @@ F: kernel/delayacct.c PERFORMANCE EVENTS SUBSYSTEM M: Peter Zijlstra M: Paul Mackerras -M: Ingo Molnar +M: Ingo Molnar M: Arnaldo Carvalho de Melo T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core S: Supported @@ -5776,12 +5773,6 @@ F: drivers/media/common/saa7146* F: drivers/media/video/*7146* F: include/media/*7146* -SAMSUNG LAPTOP DRIVER -M: Corentin Chary -L: platform-driver-x86@vger.kernel.org -S: Maintained -F: drivers/platform/x86/samsung-laptop.c - SAMSUNG AUDIO (ASoC) DRIVERS M: Sangbeom Kim L: alsa-devel@alsa-project.org (moderated for non-subscribers) @@ -5833,7 +5824,7 @@ S: Maintained F: drivers/watchdog/sc1200wdt.c SCHEDULER -M: Ingo Molnar +M: Ingo Molnar M: Peter Zijlstra T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core S: Maintained diff --git a/trunk/arch/Kconfig b/trunk/arch/Kconfig index 684eb5af439d..a6f14f622d13 100644 --- a/trunk/arch/Kconfig +++ b/trunk/arch/Kconfig @@ -213,7 +213,4 @@ config HAVE_CMPXCHG_LOCAL config HAVE_CMPXCHG_DOUBLE bool -config ARCH_WANT_OLD_COMPAT_IPC - bool - source "kernel/gcov/Kconfig" diff --git a/trunk/arch/alpha/boot/bootp.c b/trunk/arch/alpha/boot/bootp.c index 2a542a506557..be61670d4096 100644 --- a/trunk/arch/alpha/boot/bootp.c +++ b/trunk/arch/alpha/boot/bootp.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/boot/bootpz.c b/trunk/arch/alpha/boot/bootpz.c index d6ad191698da..c98865f21423 100644 --- a/trunk/arch/alpha/boot/bootpz.c +++ b/trunk/arch/alpha/boot/bootpz.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/boot/head.S b/trunk/arch/alpha/boot/head.S index b06812bcac83..f3d98089b3dc 100644 --- a/trunk/arch/alpha/boot/head.S +++ b/trunk/arch/alpha/boot/head.S @@ -4,6 +4,7 @@ * initial bootloader stuff.. */ +#include .set noreorder .globl __start diff --git a/trunk/arch/alpha/boot/main.c b/trunk/arch/alpha/boot/main.c index 3baf2d1e908d..ded57d9a80e1 100644 --- a/trunk/arch/alpha/boot/main.c +++ b/trunk/arch/alpha/boot/main.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/include/asm/atomic.h b/trunk/arch/alpha/include/asm/atomic.h index f62251e82ffa..640f909ddd41 100644 --- a/trunk/arch/alpha/include/asm/atomic.h +++ b/trunk/arch/alpha/include/asm/atomic.h @@ -3,6 +3,7 @@ #include #include +#include /* * Atomic operations that C can't guarantee us. Useful for @@ -168,73 +169,6 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) return result; } -/* - * Atomic exchange routines. - */ - -#define __ASM__MB -#define ____xchg(type, args...) __xchg ## type ## _local(args) -#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args) -#include - -#define xchg_local(ptr,x) \ - ({ \ - __typeof__(*(ptr)) _x_ = (x); \ - (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \ - sizeof(*(ptr))); \ - }) - -#define cmpxchg_local(ptr, o, n) \ - ({ \ - __typeof__(*(ptr)) _o_ = (o); \ - __typeof__(*(ptr)) _n_ = (n); \ - (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \ - (unsigned long)_n_, \ - sizeof(*(ptr))); \ - }) - -#define cmpxchg64_local(ptr, o, n) \ - ({ \ - BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ - cmpxchg_local((ptr), (o), (n)); \ - }) - -#ifdef CONFIG_SMP -#undef __ASM__MB -#define __ASM__MB "\tmb\n" -#endif -#undef ____xchg -#undef ____cmpxchg -#define ____xchg(type, args...) __xchg ##type(args) -#define ____cmpxchg(type, args...) __cmpxchg ##type(args) -#include - -#define xchg(ptr,x) \ - ({ \ - __typeof__(*(ptr)) _x_ = (x); \ - (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \ - sizeof(*(ptr))); \ - }) - -#define cmpxchg(ptr, o, n) \ - ({ \ - __typeof__(*(ptr)) _o_ = (o); \ - __typeof__(*(ptr)) _n_ = (n); \ - (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ - (unsigned long)_n_, sizeof(*(ptr)));\ - }) - -#define cmpxchg64(ptr, o, n) \ - ({ \ - BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ - cmpxchg((ptr), (o), (n)); \ - }) - -#undef __ASM__MB -#undef ____cmpxchg - -#define __HAVE_ARCH_CMPXCHG 1 - #define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new)) #define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) diff --git a/trunk/arch/alpha/include/asm/auxvec.h b/trunk/arch/alpha/include/asm/auxvec.h index a3a579dfdb4d..e96fe880e310 100644 --- a/trunk/arch/alpha/include/asm/auxvec.h +++ b/trunk/arch/alpha/include/asm/auxvec.h @@ -21,6 +21,4 @@ #define AT_L2_CACHESHAPE 36 #define AT_L3_CACHESHAPE 37 -#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */ - #endif /* __ASM_ALPHA_AUXVEC_H */ diff --git a/trunk/arch/alpha/include/asm/core_lca.h b/trunk/arch/alpha/include/asm/core_lca.h index 8ee6c516279c..f7cb4b460954 100644 --- a/trunk/arch/alpha/include/asm/core_lca.h +++ b/trunk/arch/alpha/include/asm/core_lca.h @@ -1,8 +1,8 @@ #ifndef __ALPHA_LCA__H__ #define __ALPHA_LCA__H__ +#include #include -#include /* * Low Cost Alpha (LCA) definitions (these apply to 21066 and 21068, diff --git a/trunk/arch/alpha/include/asm/core_mcpcia.h b/trunk/arch/alpha/include/asm/core_mcpcia.h index ad44bef29fba..9f67a056b461 100644 --- a/trunk/arch/alpha/include/asm/core_mcpcia.h +++ b/trunk/arch/alpha/include/asm/core_mcpcia.h @@ -7,7 +7,6 @@ #include #include -#include /* * MCPCIA is the internal name for a core logic chipset which provides diff --git a/trunk/arch/alpha/include/asm/core_t2.h b/trunk/arch/alpha/include/asm/core_t2.h index ade9d92e68b4..91b46801b290 100644 --- a/trunk/arch/alpha/include/asm/core_t2.h +++ b/trunk/arch/alpha/include/asm/core_t2.h @@ -7,6 +7,7 @@ #include #include #include +#include /* * T2 is the internal name for the core logic chipset which provides diff --git a/trunk/arch/alpha/include/asm/elf.h b/trunk/arch/alpha/include/asm/elf.h index 968d9991f5ee..da5449e22175 100644 --- a/trunk/arch/alpha/include/asm/elf.h +++ b/trunk/arch/alpha/include/asm/elf.h @@ -2,7 +2,6 @@ #define __ASM_ALPHA_ELF_H #include -#include /* Special values for the st_other field in the symbol table. */ diff --git a/trunk/arch/alpha/include/asm/exec.h b/trunk/arch/alpha/include/asm/exec.h deleted file mode 100644 index 4a5a41f30779..000000000000 --- a/trunk/arch/alpha/include/asm/exec.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ALPHA_EXEC_H -#define __ALPHA_EXEC_H - -#define arch_align_stack(x) (x) - -#endif /* __ALPHA_EXEC_H */ diff --git a/trunk/arch/alpha/include/asm/fpu.h b/trunk/arch/alpha/include/asm/fpu.h index db00f7885faa..ecb17a72acc3 100644 --- a/trunk/arch/alpha/include/asm/fpu.h +++ b/trunk/arch/alpha/include/asm/fpu.h @@ -1,8 +1,6 @@ #ifndef __ASM_ALPHA_FPU_H #define __ASM_ALPHA_FPU_H -#include - /* * Alpha floating-point control register defines: */ diff --git a/trunk/arch/alpha/include/asm/io.h b/trunk/arch/alpha/include/asm/io.h index 7a3d38d5ed6b..56ff96501350 100644 --- a/trunk/arch/alpha/include/asm/io.h +++ b/trunk/arch/alpha/include/asm/io.h @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/include/asm/irqflags.h b/trunk/arch/alpha/include/asm/irqflags.h index ffb1726484af..299bbc7e9d71 100644 --- a/trunk/arch/alpha/include/asm/irqflags.h +++ b/trunk/arch/alpha/include/asm/irqflags.h @@ -1,7 +1,7 @@ #ifndef __ALPHA_IRQFLAGS_H #define __ALPHA_IRQFLAGS_H -#include +#include #define IPL_MIN 0 #define IPL_SW0 1 diff --git a/trunk/arch/alpha/include/asm/mce.h b/trunk/arch/alpha/include/asm/mce.h deleted file mode 100644 index 660285b9aca8..000000000000 --- a/trunk/arch/alpha/include/asm/mce.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef __ALPHA_MCE_H -#define __ALPHA_MCE_H - -/* - * This is the logout header that should be common to all platforms - * (assuming they are running OSF/1 PALcode, I guess). - */ -struct el_common { - unsigned int size; /* size in bytes of logout area */ - unsigned int sbz1 : 30; /* should be zero */ - unsigned int err2 : 1; /* second error */ - unsigned int retry : 1; /* retry flag */ - unsigned int proc_offset; /* processor-specific offset */ - unsigned int sys_offset; /* system-specific offset */ - unsigned int code; /* machine check code */ - unsigned int frame_rev; /* frame revision */ -}; - -/* Machine Check Frame for uncorrectable errors (Large format) - * --- This is used to log uncorrectable errors such as - * double bit ECC errors. - * --- These errors are detected by both processor and systems. - */ -struct el_common_EV5_uncorrectable_mcheck { - unsigned long shadow[8]; /* Shadow reg. 8-14, 25 */ - unsigned long paltemp[24]; /* PAL TEMP REGS. */ - unsigned long exc_addr; /* Address of excepting instruction*/ - unsigned long exc_sum; /* Summary of arithmetic traps. */ - unsigned long exc_mask; /* Exception mask (from exc_sum). */ - unsigned long pal_base; /* Base address for PALcode. */ - unsigned long isr; /* Interrupt Status Reg. */ - unsigned long icsr; /* CURRENT SETUP OF EV5 IBOX */ - unsigned long ic_perr_stat; /* I-CACHE Reg. <11> set Data parity - <12> set TAG parity*/ - unsigned long dc_perr_stat; /* D-CACHE error Reg. Bits set to 1: - <2> Data error in bank 0 - <3> Data error in bank 1 - <4> Tag error in bank 0 - <5> Tag error in bank 1 */ - unsigned long va; /* Effective VA of fault or miss. */ - unsigned long mm_stat; /* Holds the reason for D-stream - fault or D-cache parity errors */ - unsigned long sc_addr; /* Address that was being accessed - when EV5 detected Secondary cache - failure. */ - unsigned long sc_stat; /* Helps determine if the error was - TAG/Data parity(Secondary Cache)*/ - unsigned long bc_tag_addr; /* Contents of EV5 BC_TAG_ADDR */ - unsigned long ei_addr; /* Physical address of any transfer - that is logged in EV5 EI_STAT */ - unsigned long fill_syndrome; /* For correcting ECC errors. */ - unsigned long ei_stat; /* Helps identify reason of any - processor uncorrectable error - at its external interface. */ - unsigned long ld_lock; /* Contents of EV5 LD_LOCK register*/ -}; - -struct el_common_EV6_mcheck { - unsigned int FrameSize; /* Bytes, including this field */ - unsigned int FrameFlags; /* <31> = Retry, <30> = Second Error */ - unsigned int CpuOffset; /* Offset to CPU-specific info */ - unsigned int SystemOffset; /* Offset to system-specific info */ - unsigned int MCHK_Code; - unsigned int MCHK_Frame_Rev; - unsigned long I_STAT; /* EV6 Internal Processor Registers */ - unsigned long DC_STAT; /* (See the 21264 Spec) */ - unsigned long C_ADDR; - unsigned long DC1_SYNDROME; - unsigned long DC0_SYNDROME; - unsigned long C_STAT; - unsigned long C_STS; - unsigned long MM_STAT; - unsigned long EXC_ADDR; - unsigned long IER_CM; - unsigned long ISUM; - unsigned long RESERVED0; - unsigned long PAL_BASE; - unsigned long I_CTL; - unsigned long PCTX; -}; - - -#endif /* __ALPHA_MCE_H */ diff --git a/trunk/arch/alpha/include/asm/mmu_context.h b/trunk/arch/alpha/include/asm/mmu_context.h index 4c51c05333c6..86c08a02d239 100644 --- a/trunk/arch/alpha/include/asm/mmu_context.h +++ b/trunk/arch/alpha/include/asm/mmu_context.h @@ -7,6 +7,7 @@ * Copyright (C) 1996, Linus Torvalds */ +#include #include #include #include diff --git a/trunk/arch/alpha/include/asm/pal.h b/trunk/arch/alpha/include/asm/pal.h index 6699ee583429..9b4ba0d6f00b 100644 --- a/trunk/arch/alpha/include/asm/pal.h +++ b/trunk/arch/alpha/include/asm/pal.h @@ -48,116 +48,4 @@ #define PAL_retsys 61 #define PAL_rti 63 -#ifdef __KERNEL__ -#ifndef __ASSEMBLY__ - -extern void halt(void) __attribute__((noreturn)); -#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt)) - -#define imb() \ -__asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") - -#define draina() \ -__asm__ __volatile__ ("call_pal %0 #draina" : : "i" (PAL_draina) : "memory") - -#define __CALL_PAL_R0(NAME, TYPE) \ -extern inline TYPE NAME(void) \ -{ \ - register TYPE __r0 __asm__("$0"); \ - __asm__ __volatile__( \ - "call_pal %1 # " #NAME \ - :"=r" (__r0) \ - :"i" (PAL_ ## NAME) \ - :"$1", "$16", "$22", "$23", "$24", "$25"); \ - return __r0; \ -} - -#define __CALL_PAL_W1(NAME, TYPE0) \ -extern inline void NAME(TYPE0 arg0) \ -{ \ - register TYPE0 __r16 __asm__("$16") = arg0; \ - __asm__ __volatile__( \ - "call_pal %1 # "#NAME \ - : "=r"(__r16) \ - : "i"(PAL_ ## NAME), "0"(__r16) \ - : "$1", "$22", "$23", "$24", "$25"); \ -} - -#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ -extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \ -{ \ - register TYPE0 __r16 __asm__("$16") = arg0; \ - register TYPE1 __r17 __asm__("$17") = arg1; \ - __asm__ __volatile__( \ - "call_pal %2 # "#NAME \ - : "=r"(__r16), "=r"(__r17) \ - : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \ - : "$1", "$22", "$23", "$24", "$25"); \ -} - -#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ -extern inline RTYPE NAME(TYPE0 arg0) \ -{ \ - register RTYPE __r0 __asm__("$0"); \ - register TYPE0 __r16 __asm__("$16") = arg0; \ - __asm__ __volatile__( \ - "call_pal %2 # "#NAME \ - : "=r"(__r16), "=r"(__r0) \ - : "i"(PAL_ ## NAME), "0"(__r16) \ - : "$1", "$22", "$23", "$24", "$25"); \ - return __r0; \ -} - -#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ -extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ -{ \ - register RTYPE __r0 __asm__("$0"); \ - register TYPE0 __r16 __asm__("$16") = arg0; \ - register TYPE1 __r17 __asm__("$17") = arg1; \ - __asm__ __volatile__( \ - "call_pal %3 # "#NAME \ - : "=r"(__r16), "=r"(__r17), "=r"(__r0) \ - : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \ - : "$1", "$22", "$23", "$24", "$25"); \ - return __r0; \ -} - -__CALL_PAL_W1(cflush, unsigned long); -__CALL_PAL_R0(rdmces, unsigned long); -__CALL_PAL_R0(rdps, unsigned long); -__CALL_PAL_R0(rdusp, unsigned long); -__CALL_PAL_RW1(swpipl, unsigned long, unsigned long); -__CALL_PAL_R0(whami, unsigned long); -__CALL_PAL_W2(wrent, void*, unsigned long); -__CALL_PAL_W1(wripir, unsigned long); -__CALL_PAL_W1(wrkgp, unsigned long); -__CALL_PAL_W1(wrmces, unsigned long); -__CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long); -__CALL_PAL_W1(wrusp, unsigned long); -__CALL_PAL_W1(wrvptptr, unsigned long); - -/* - * TB routines.. - */ -#define __tbi(nr,arg,arg1...) \ -({ \ - register unsigned long __r16 __asm__("$16") = (nr); \ - register unsigned long __r17 __asm__("$17"); arg; \ - __asm__ __volatile__( \ - "call_pal %3 #__tbi" \ - :"=r" (__r16),"=r" (__r17) \ - :"0" (__r16),"i" (PAL_tbi) ,##arg1 \ - :"$0", "$1", "$22", "$23", "$24", "$25"); \ -}) - -#define tbi(x,y) __tbi(x,__r17=(y),"1" (__r17)) -#define tbisi(x) __tbi(1,__r17=(x),"1" (__r17)) -#define tbisd(x) __tbi(2,__r17=(x),"1" (__r17)) -#define tbis(x) __tbi(3,__r17=(x),"1" (__r17)) -#define tbiap() __tbi(-1, /* no second argument */) -#define tbia() __tbi(-2, /* no second argument */) - -#endif /* !__ASSEMBLY__ */ -#endif /* __KERNEL__ */ - #endif /* __ALPHA_PAL_H */ diff --git a/trunk/arch/alpha/include/asm/pgtable.h b/trunk/arch/alpha/include/asm/pgtable.h index 81a4342d5a3f..de98a732683d 100644 --- a/trunk/arch/alpha/include/asm/pgtable.h +++ b/trunk/arch/alpha/include/asm/pgtable.h @@ -15,7 +15,6 @@ #include #include /* For TASK_SIZE */ #include -#include struct mm_struct; struct vm_area_struct; diff --git a/trunk/arch/alpha/include/asm/posix_types.h b/trunk/arch/alpha/include/asm/posix_types.h index 24779fc95994..db167413300b 100644 --- a/trunk/arch/alpha/include/asm/posix_types.h +++ b/trunk/arch/alpha/include/asm/posix_types.h @@ -8,13 +8,116 @@ */ typedef unsigned int __kernel_ino_t; -#define __kernel_ino_t __kernel_ino_t - +typedef unsigned int __kernel_mode_t; typedef unsigned int __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t - +typedef long __kernel_off_t; +typedef long long __kernel_loff_t; +typedef int __kernel_pid_t; +typedef int __kernel_ipc_pid_t; +typedef unsigned int __kernel_uid_t; +typedef unsigned int __kernel_gid_t; +typedef unsigned long __kernel_size_t; +typedef long __kernel_ssize_t; +typedef long __kernel_ptrdiff_t; +typedef long __kernel_time_t; +typedef long __kernel_suseconds_t; +typedef long __kernel_clock_t; +typedef int __kernel_daddr_t; +typedef char * __kernel_caddr_t; typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ +typedef unsigned short __kernel_uid16_t; +typedef unsigned short __kernel_gid16_t; +typedef int __kernel_clockid_t; +typedef int __kernel_timer_t; + +typedef struct { + int val[2]; +} __kernel_fsid_t; + +typedef __kernel_uid_t __kernel_old_uid_t; +typedef __kernel_gid_t __kernel_old_gid_t; +typedef __kernel_uid_t __kernel_uid32_t; +typedef __kernel_gid_t __kernel_gid32_t; + +typedef unsigned int __kernel_old_dev_t; + +#ifdef __KERNEL__ + +#ifndef __GNUC__ + +#define __FD_SET(d, set) ((set)->fds_bits[__FDELT(d)] |= __FDMASK(d)) +#define __FD_CLR(d, set) ((set)->fds_bits[__FDELT(d)] &= ~__FDMASK(d)) +#define __FD_ISSET(d, set) (((set)->fds_bits[__FDELT(d)] & __FDMASK(d)) != 0) +#define __FD_ZERO(set) \ + ((void) memset ((void *) (set), 0, sizeof (__kernel_fd_set))) + +#else /* __GNUC__ */ + +/* With GNU C, use inline functions instead so args are evaluated only once: */ + +#undef __FD_SET +static __inline__ void __FD_SET(unsigned long fd, __kernel_fd_set *fdsetp) +{ + unsigned long _tmp = fd / __NFDBITS; + unsigned long _rem = fd % __NFDBITS; + fdsetp->fds_bits[_tmp] |= (1UL<<_rem); +} + +#undef __FD_CLR +static __inline__ void __FD_CLR(unsigned long fd, __kernel_fd_set *fdsetp) +{ + unsigned long _tmp = fd / __NFDBITS; + unsigned long _rem = fd % __NFDBITS; + fdsetp->fds_bits[_tmp] &= ~(1UL<<_rem); +} + +#undef __FD_ISSET +static __inline__ int __FD_ISSET(unsigned long fd, const __kernel_fd_set *p) +{ + unsigned long _tmp = fd / __NFDBITS; + unsigned long _rem = fd % __NFDBITS; + return (p->fds_bits[_tmp] & (1UL<<_rem)) != 0; +} + +/* + * This will unroll the loop for the normal constant case (8 ints, + * for a 256-bit fd_set) + */ +#undef __FD_ZERO +static __inline__ void __FD_ZERO(__kernel_fd_set *p) +{ + unsigned long *tmp = p->fds_bits; + int i; + + if (__builtin_constant_p(__FDSET_LONGS)) { + switch (__FDSET_LONGS) { + case 16: + tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; + tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0; + tmp[ 8] = 0; tmp[ 9] = 0; tmp[10] = 0; tmp[11] = 0; + tmp[12] = 0; tmp[13] = 0; tmp[14] = 0; tmp[15] = 0; + return; + + case 8: + tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; + tmp[ 4] = 0; tmp[ 5] = 0; tmp[ 6] = 0; tmp[ 7] = 0; + return; + + case 4: + tmp[ 0] = 0; tmp[ 1] = 0; tmp[ 2] = 0; tmp[ 3] = 0; + return; + } + } + i = __FDSET_LONGS; + while (i) { + i--; + *tmp = 0; + tmp++; + } +} + +#endif /* __GNUC__ */ -#include +#endif /* __KERNEL__ */ #endif /* _ALPHA_POSIX_TYPES_H */ diff --git a/trunk/arch/alpha/include/asm/setup.h b/trunk/arch/alpha/include/asm/setup.h index b50014b30909..2e023a4aa317 100644 --- a/trunk/arch/alpha/include/asm/setup.h +++ b/trunk/arch/alpha/include/asm/setup.h @@ -3,40 +3,4 @@ #define COMMAND_LINE_SIZE 256 -/* - * We leave one page for the initial stack page, and one page for - * the initial process structure. Also, the console eats 3 MB for - * the initial bootloader (one of which we can reclaim later). - */ -#define BOOT_PCB 0x20000000 -#define BOOT_ADDR 0x20000000 -/* Remove when official MILO sources have ELF support: */ -#define BOOT_SIZE (16*1024) - -#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS -#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */ -#else -#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */ -#endif - -#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS) -#define SWAPPER_PGD KERNEL_START -#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000) -#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000) -#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000) -#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000) - -#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000) - -/* - * This is setup by the secondary bootstrap loader. Because - * the zero page is zeroed out as soon as the vm system is - * initialized, we need to copy things out into a more permanent - * place. - */ -#define PARAM ZERO_PGE -#define COMMAND_LINE ((char*)(PARAM + 0x0000)) -#define INITRD_START (*(unsigned long *) (PARAM+0x100)) -#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108)) - #endif diff --git a/trunk/arch/alpha/include/asm/special_insns.h b/trunk/arch/alpha/include/asm/special_insns.h deleted file mode 100644 index 88d3452b21f0..000000000000 --- a/trunk/arch/alpha/include/asm/special_insns.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef __ALPHA_SPECIAL_INSNS_H -#define __ALPHA_SPECIAL_INSNS_H - -enum implver_enum { - IMPLVER_EV4, - IMPLVER_EV5, - IMPLVER_EV6 -}; - -#ifdef CONFIG_ALPHA_GENERIC -#define implver() \ -({ unsigned long __implver; \ - __asm__ ("implver %0" : "=r"(__implver)); \ - (enum implver_enum) __implver; }) -#else -/* Try to eliminate some dead code. */ -#ifdef CONFIG_ALPHA_EV4 -#define implver() IMPLVER_EV4 -#endif -#ifdef CONFIG_ALPHA_EV5 -#define implver() IMPLVER_EV5 -#endif -#if defined(CONFIG_ALPHA_EV6) -#define implver() IMPLVER_EV6 -#endif -#endif - -enum amask_enum { - AMASK_BWX = (1UL << 0), - AMASK_FIX = (1UL << 1), - AMASK_CIX = (1UL << 2), - AMASK_MAX = (1UL << 8), - AMASK_PRECISE_TRAP = (1UL << 9), -}; - -#define amask(mask) \ -({ unsigned long __amask, __input = (mask); \ - __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \ - __amask; }) - -#endif /* __ALPHA_SPECIAL_INSNS_H */ diff --git a/trunk/arch/alpha/include/asm/spinlock.h b/trunk/arch/alpha/include/asm/spinlock.h index 3bba21e41b81..d0faca1e992d 100644 --- a/trunk/arch/alpha/include/asm/spinlock.h +++ b/trunk/arch/alpha/include/asm/spinlock.h @@ -1,6 +1,7 @@ #ifndef _ALPHA_SPINLOCK_H #define _ALPHA_SPINLOCK_H +#include #include #include diff --git a/trunk/arch/alpha/include/asm/switch_to.h b/trunk/arch/alpha/include/asm/switch_to.h deleted file mode 100644 index 44c0d4f2c0b2..000000000000 --- a/trunk/arch/alpha/include/asm/switch_to.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __ALPHA_SWITCH_TO_H -#define __ALPHA_SWITCH_TO_H - - -struct task_struct; -extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct *); - -#define switch_to(P,N,L) \ - do { \ - (L) = alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P)); \ - check_mmu_context(); \ - } while (0) - -#endif /* __ALPHA_SWITCH_TO_H */ diff --git a/trunk/arch/alpha/include/asm/system.h b/trunk/arch/alpha/include/asm/system.h new file mode 100644 index 000000000000..9f78e6934637 --- /dev/null +++ b/trunk/arch/alpha/include/asm/system.h @@ -0,0 +1,354 @@ +#ifndef __ALPHA_SYSTEM_H +#define __ALPHA_SYSTEM_H + +#include +#include +#include + +/* + * System defines.. Note that this is included both from .c and .S + * files, so it does only defines, not any C code. + */ + +/* + * We leave one page for the initial stack page, and one page for + * the initial process structure. Also, the console eats 3 MB for + * the initial bootloader (one of which we can reclaim later). + */ +#define BOOT_PCB 0x20000000 +#define BOOT_ADDR 0x20000000 +/* Remove when official MILO sources have ELF support: */ +#define BOOT_SIZE (16*1024) + +#ifdef CONFIG_ALPHA_LEGACY_START_ADDRESS +#define KERNEL_START_PHYS 0x300000 /* Old bootloaders hardcoded this. */ +#else +#define KERNEL_START_PHYS 0x1000000 /* required: Wildfire/Titan/Marvel */ +#endif + +#define KERNEL_START (PAGE_OFFSET+KERNEL_START_PHYS) +#define SWAPPER_PGD KERNEL_START +#define INIT_STACK (PAGE_OFFSET+KERNEL_START_PHYS+0x02000) +#define EMPTY_PGT (PAGE_OFFSET+KERNEL_START_PHYS+0x04000) +#define EMPTY_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x08000) +#define ZERO_PGE (PAGE_OFFSET+KERNEL_START_PHYS+0x0A000) + +#define START_ADDR (PAGE_OFFSET+KERNEL_START_PHYS+0x10000) + +/* + * This is setup by the secondary bootstrap loader. Because + * the zero page is zeroed out as soon as the vm system is + * initialized, we need to copy things out into a more permanent + * place. + */ +#define PARAM ZERO_PGE +#define COMMAND_LINE ((char*)(PARAM + 0x0000)) +#define INITRD_START (*(unsigned long *) (PARAM+0x100)) +#define INITRD_SIZE (*(unsigned long *) (PARAM+0x108)) + +#ifndef __ASSEMBLY__ +#include +#define AT_VECTOR_SIZE_ARCH 4 /* entries in ARCH_DLINFO */ + +/* + * This is the logout header that should be common to all platforms + * (assuming they are running OSF/1 PALcode, I guess). + */ +struct el_common { + unsigned int size; /* size in bytes of logout area */ + unsigned int sbz1 : 30; /* should be zero */ + unsigned int err2 : 1; /* second error */ + unsigned int retry : 1; /* retry flag */ + unsigned int proc_offset; /* processor-specific offset */ + unsigned int sys_offset; /* system-specific offset */ + unsigned int code; /* machine check code */ + unsigned int frame_rev; /* frame revision */ +}; + +/* Machine Check Frame for uncorrectable errors (Large format) + * --- This is used to log uncorrectable errors such as + * double bit ECC errors. + * --- These errors are detected by both processor and systems. + */ +struct el_common_EV5_uncorrectable_mcheck { + unsigned long shadow[8]; /* Shadow reg. 8-14, 25 */ + unsigned long paltemp[24]; /* PAL TEMP REGS. */ + unsigned long exc_addr; /* Address of excepting instruction*/ + unsigned long exc_sum; /* Summary of arithmetic traps. */ + unsigned long exc_mask; /* Exception mask (from exc_sum). */ + unsigned long pal_base; /* Base address for PALcode. */ + unsigned long isr; /* Interrupt Status Reg. */ + unsigned long icsr; /* CURRENT SETUP OF EV5 IBOX */ + unsigned long ic_perr_stat; /* I-CACHE Reg. <11> set Data parity + <12> set TAG parity*/ + unsigned long dc_perr_stat; /* D-CACHE error Reg. Bits set to 1: + <2> Data error in bank 0 + <3> Data error in bank 1 + <4> Tag error in bank 0 + <5> Tag error in bank 1 */ + unsigned long va; /* Effective VA of fault or miss. */ + unsigned long mm_stat; /* Holds the reason for D-stream + fault or D-cache parity errors */ + unsigned long sc_addr; /* Address that was being accessed + when EV5 detected Secondary cache + failure. */ + unsigned long sc_stat; /* Helps determine if the error was + TAG/Data parity(Secondary Cache)*/ + unsigned long bc_tag_addr; /* Contents of EV5 BC_TAG_ADDR */ + unsigned long ei_addr; /* Physical address of any transfer + that is logged in EV5 EI_STAT */ + unsigned long fill_syndrome; /* For correcting ECC errors. */ + unsigned long ei_stat; /* Helps identify reason of any + processor uncorrectable error + at its external interface. */ + unsigned long ld_lock; /* Contents of EV5 LD_LOCK register*/ +}; + +struct el_common_EV6_mcheck { + unsigned int FrameSize; /* Bytes, including this field */ + unsigned int FrameFlags; /* <31> = Retry, <30> = Second Error */ + unsigned int CpuOffset; /* Offset to CPU-specific info */ + unsigned int SystemOffset; /* Offset to system-specific info */ + unsigned int MCHK_Code; + unsigned int MCHK_Frame_Rev; + unsigned long I_STAT; /* EV6 Internal Processor Registers */ + unsigned long DC_STAT; /* (See the 21264 Spec) */ + unsigned long C_ADDR; + unsigned long DC1_SYNDROME; + unsigned long DC0_SYNDROME; + unsigned long C_STAT; + unsigned long C_STS; + unsigned long MM_STAT; + unsigned long EXC_ADDR; + unsigned long IER_CM; + unsigned long ISUM; + unsigned long RESERVED0; + unsigned long PAL_BASE; + unsigned long I_CTL; + unsigned long PCTX; +}; + +extern void halt(void) __attribute__((noreturn)); +#define __halt() __asm__ __volatile__ ("call_pal %0 #halt" : : "i" (PAL_halt)) + +#define switch_to(P,N,L) \ + do { \ + (L) = alpha_switch_to(virt_to_phys(&task_thread_info(N)->pcb), (P)); \ + check_mmu_context(); \ + } while (0) + +struct task_struct; +extern struct task_struct *alpha_switch_to(unsigned long, struct task_struct*); + +#define imb() \ +__asm__ __volatile__ ("call_pal %0 #imb" : : "i" (PAL_imb) : "memory") + +#define draina() \ +__asm__ __volatile__ ("call_pal %0 #draina" : : "i" (PAL_draina) : "memory") + +enum implver_enum { + IMPLVER_EV4, + IMPLVER_EV5, + IMPLVER_EV6 +}; + +#ifdef CONFIG_ALPHA_GENERIC +#define implver() \ +({ unsigned long __implver; \ + __asm__ ("implver %0" : "=r"(__implver)); \ + (enum implver_enum) __implver; }) +#else +/* Try to eliminate some dead code. */ +#ifdef CONFIG_ALPHA_EV4 +#define implver() IMPLVER_EV4 +#endif +#ifdef CONFIG_ALPHA_EV5 +#define implver() IMPLVER_EV5 +#endif +#if defined(CONFIG_ALPHA_EV6) +#define implver() IMPLVER_EV6 +#endif +#endif + +enum amask_enum { + AMASK_BWX = (1UL << 0), + AMASK_FIX = (1UL << 1), + AMASK_CIX = (1UL << 2), + AMASK_MAX = (1UL << 8), + AMASK_PRECISE_TRAP = (1UL << 9), +}; + +#define amask(mask) \ +({ unsigned long __amask, __input = (mask); \ + __asm__ ("amask %1,%0" : "=r"(__amask) : "rI"(__input)); \ + __amask; }) + +#define __CALL_PAL_R0(NAME, TYPE) \ +extern inline TYPE NAME(void) \ +{ \ + register TYPE __r0 __asm__("$0"); \ + __asm__ __volatile__( \ + "call_pal %1 # " #NAME \ + :"=r" (__r0) \ + :"i" (PAL_ ## NAME) \ + :"$1", "$16", "$22", "$23", "$24", "$25"); \ + return __r0; \ +} + +#define __CALL_PAL_W1(NAME, TYPE0) \ +extern inline void NAME(TYPE0 arg0) \ +{ \ + register TYPE0 __r16 __asm__("$16") = arg0; \ + __asm__ __volatile__( \ + "call_pal %1 # "#NAME \ + : "=r"(__r16) \ + : "i"(PAL_ ## NAME), "0"(__r16) \ + : "$1", "$22", "$23", "$24", "$25"); \ +} + +#define __CALL_PAL_W2(NAME, TYPE0, TYPE1) \ +extern inline void NAME(TYPE0 arg0, TYPE1 arg1) \ +{ \ + register TYPE0 __r16 __asm__("$16") = arg0; \ + register TYPE1 __r17 __asm__("$17") = arg1; \ + __asm__ __volatile__( \ + "call_pal %2 # "#NAME \ + : "=r"(__r16), "=r"(__r17) \ + : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \ + : "$1", "$22", "$23", "$24", "$25"); \ +} + +#define __CALL_PAL_RW1(NAME, RTYPE, TYPE0) \ +extern inline RTYPE NAME(TYPE0 arg0) \ +{ \ + register RTYPE __r0 __asm__("$0"); \ + register TYPE0 __r16 __asm__("$16") = arg0; \ + __asm__ __volatile__( \ + "call_pal %2 # "#NAME \ + : "=r"(__r16), "=r"(__r0) \ + : "i"(PAL_ ## NAME), "0"(__r16) \ + : "$1", "$22", "$23", "$24", "$25"); \ + return __r0; \ +} + +#define __CALL_PAL_RW2(NAME, RTYPE, TYPE0, TYPE1) \ +extern inline RTYPE NAME(TYPE0 arg0, TYPE1 arg1) \ +{ \ + register RTYPE __r0 __asm__("$0"); \ + register TYPE0 __r16 __asm__("$16") = arg0; \ + register TYPE1 __r17 __asm__("$17") = arg1; \ + __asm__ __volatile__( \ + "call_pal %3 # "#NAME \ + : "=r"(__r16), "=r"(__r17), "=r"(__r0) \ + : "i"(PAL_ ## NAME), "0"(__r16), "1"(__r17) \ + : "$1", "$22", "$23", "$24", "$25"); \ + return __r0; \ +} + +__CALL_PAL_W1(cflush, unsigned long); +__CALL_PAL_R0(rdmces, unsigned long); +__CALL_PAL_R0(rdps, unsigned long); +__CALL_PAL_R0(rdusp, unsigned long); +__CALL_PAL_RW1(swpipl, unsigned long, unsigned long); +__CALL_PAL_R0(whami, unsigned long); +__CALL_PAL_W2(wrent, void*, unsigned long); +__CALL_PAL_W1(wripir, unsigned long); +__CALL_PAL_W1(wrkgp, unsigned long); +__CALL_PAL_W1(wrmces, unsigned long); +__CALL_PAL_RW2(wrperfmon, unsigned long, unsigned long, unsigned long); +__CALL_PAL_W1(wrusp, unsigned long); +__CALL_PAL_W1(wrvptptr, unsigned long); + +/* + * TB routines.. + */ +#define __tbi(nr,arg,arg1...) \ +({ \ + register unsigned long __r16 __asm__("$16") = (nr); \ + register unsigned long __r17 __asm__("$17"); arg; \ + __asm__ __volatile__( \ + "call_pal %3 #__tbi" \ + :"=r" (__r16),"=r" (__r17) \ + :"0" (__r16),"i" (PAL_tbi) ,##arg1 \ + :"$0", "$1", "$22", "$23", "$24", "$25"); \ +}) + +#define tbi(x,y) __tbi(x,__r17=(y),"1" (__r17)) +#define tbisi(x) __tbi(1,__r17=(x),"1" (__r17)) +#define tbisd(x) __tbi(2,__r17=(x),"1" (__r17)) +#define tbis(x) __tbi(3,__r17=(x),"1" (__r17)) +#define tbiap() __tbi(-1, /* no second argument */) +#define tbia() __tbi(-2, /* no second argument */) + +/* + * Atomic exchange routines. + */ + +#define __ASM__MB +#define ____xchg(type, args...) __xchg ## type ## _local(args) +#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args) +#include + +#define xchg_local(ptr,x) \ + ({ \ + __typeof__(*(ptr)) _x_ = (x); \ + (__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \ + sizeof(*(ptr))); \ + }) + +#define cmpxchg_local(ptr, o, n) \ + ({ \ + __typeof__(*(ptr)) _o_ = (o); \ + __typeof__(*(ptr)) _n_ = (n); \ + (__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \ + (unsigned long)_n_, \ + sizeof(*(ptr))); \ + }) + +#define cmpxchg64_local(ptr, o, n) \ + ({ \ + BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ + cmpxchg_local((ptr), (o), (n)); \ + }) + +#ifdef CONFIG_SMP +#undef __ASM__MB +#define __ASM__MB "\tmb\n" +#endif +#undef ____xchg +#undef ____cmpxchg +#define ____xchg(type, args...) __xchg ##type(args) +#define ____cmpxchg(type, args...) __cmpxchg ##type(args) +#include + +#define xchg(ptr,x) \ + ({ \ + __typeof__(*(ptr)) _x_ = (x); \ + (__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \ + sizeof(*(ptr))); \ + }) + +#define cmpxchg(ptr, o, n) \ + ({ \ + __typeof__(*(ptr)) _o_ = (o); \ + __typeof__(*(ptr)) _n_ = (n); \ + (__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \ + (unsigned long)_n_, sizeof(*(ptr)));\ + }) + +#define cmpxchg64(ptr, o, n) \ + ({ \ + BUILD_BUG_ON(sizeof(*(ptr)) != 8); \ + cmpxchg((ptr), (o), (n)); \ + }) + +#undef __ASM__MB +#undef ____cmpxchg + +#define __HAVE_ARCH_CMPXCHG 1 + +#endif /* __ASSEMBLY__ */ + +#define arch_align_stack(x) (x) + +#endif diff --git a/trunk/arch/alpha/include/asm/xchg.h b/trunk/arch/alpha/include/asm/xchg.h index 1d1b436fbff2..beba1b803e0d 100644 --- a/trunk/arch/alpha/include/asm/xchg.h +++ b/trunk/arch/alpha/include/asm/xchg.h @@ -1,4 +1,4 @@ -#ifndef _ALPHA_ATOMIC_H +#ifndef __ALPHA_SYSTEM_H #error Do not include xchg.h directly! #else /* diff --git a/trunk/arch/alpha/kernel/core_apecs.c b/trunk/arch/alpha/kernel/core_apecs.c index 708c831efa76..ca46b2c24457 100644 --- a/trunk/arch/alpha/kernel/core_apecs.c +++ b/trunk/arch/alpha/kernel/core_apecs.c @@ -21,7 +21,6 @@ #include #include -#include #include "proto.h" #include "pci_impl.h" diff --git a/trunk/arch/alpha/kernel/core_cia.c b/trunk/arch/alpha/kernel/core_cia.c index c44339e176c1..1d6ee6c985f9 100644 --- a/trunk/arch/alpha/kernel/core_cia.c +++ b/trunk/arch/alpha/kernel/core_cia.c @@ -23,7 +23,6 @@ #include #include -#include #include "proto.h" #include "pci_impl.h" diff --git a/trunk/arch/alpha/kernel/core_t2.c b/trunk/arch/alpha/kernel/core_t2.c index 3ada4f7b085d..2f770e994289 100644 --- a/trunk/arch/alpha/kernel/core_t2.c +++ b/trunk/arch/alpha/kernel/core_t2.c @@ -21,7 +21,6 @@ #include #include -#include #include "proto.h" #include "pci_impl.h" diff --git a/trunk/arch/alpha/kernel/err_impl.h b/trunk/arch/alpha/kernel/err_impl.h index ae529c416037..0c010ca4611e 100644 --- a/trunk/arch/alpha/kernel/err_impl.h +++ b/trunk/arch/alpha/kernel/err_impl.h @@ -7,8 +7,6 @@ * implementations. */ -#include - union el_timestamp; struct el_subpacket; struct ev7_lf_subpackets; diff --git a/trunk/arch/alpha/kernel/head.S b/trunk/arch/alpha/kernel/head.S index c352499ab9f8..4bdd1d2ff353 100644 --- a/trunk/arch/alpha/kernel/head.S +++ b/trunk/arch/alpha/kernel/head.S @@ -8,12 +8,14 @@ */ #include +#include #include -#include -#include __HEAD +.globl swapper_pg_dir .globl _stext +swapper_pg_dir=SWAPPER_PGD + .set noreorder .globl __start .ent __start diff --git a/trunk/arch/alpha/kernel/irq.c b/trunk/arch/alpha/kernel/irq.c index 2872accd2215..381431a2d6d9 100644 --- a/trunk/arch/alpha/kernel/irq.c +++ b/trunk/arch/alpha/kernel/irq.c @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/trunk/arch/alpha/kernel/irq_alpha.c b/trunk/arch/alpha/kernel/irq_alpha.c index 772ddfdb71a8..51b7fbd9e4c1 100644 --- a/trunk/arch/alpha/kernel/irq_alpha.c +++ b/trunk/arch/alpha/kernel/irq_alpha.c @@ -11,7 +11,6 @@ #include #include #include -#include #include "proto.h" #include "irq_impl.h" diff --git a/trunk/arch/alpha/kernel/osf_sys.c b/trunk/arch/alpha/kernel/osf_sys.c index 49ee3193477a..01e8715e26d9 100644 --- a/trunk/arch/alpha/kernel/osf_sys.c +++ b/trunk/arch/alpha/kernel/osf_sys.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/process.c b/trunk/arch/alpha/kernel/process.c index 153d3fce3e8e..89bbe5b41145 100644 --- a/trunk/arch/alpha/kernel/process.c +++ b/trunk/arch/alpha/kernel/process.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/ptrace.c b/trunk/arch/alpha/kernel/ptrace.c index 54616f496aed..e2af5eb59bb4 100644 --- a/trunk/arch/alpha/kernel/ptrace.c +++ b/trunk/arch/alpha/kernel/ptrace.c @@ -16,6 +16,7 @@ #include #include +#include #include #include "proto.h" diff --git a/trunk/arch/alpha/kernel/setup.c b/trunk/arch/alpha/kernel/setup.c index 9e3107cc5ebb..32de56067e63 100644 --- a/trunk/arch/alpha/kernel/setup.c +++ b/trunk/arch/alpha/kernel/setup.c @@ -55,6 +55,7 @@ static struct notifier_block alpha_panic_block = { #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_alcor.c b/trunk/arch/alpha/kernel/sys_alcor.c index 118dc6af1805..8606d77e5163 100644 --- a/trunk/arch/alpha/kernel/sys_alcor.c +++ b/trunk/arch/alpha/kernel/sys_alcor.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_cabriolet.c b/trunk/arch/alpha/kernel/sys_cabriolet.c index 4c50f8f40cbb..1029619fb6c0 100644 --- a/trunk/arch/alpha/kernel/sys_cabriolet.c +++ b/trunk/arch/alpha/kernel/sys_cabriolet.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_dp264.c b/trunk/arch/alpha/kernel/sys_dp264.c index 5bf401f7ea97..13f0717fc7fe 100644 --- a/trunk/arch/alpha/kernel/sys_dp264.c +++ b/trunk/arch/alpha/kernel/sys_dp264.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_eb64p.c b/trunk/arch/alpha/kernel/sys_eb64p.c index ad40a425e841..3c6c13cd8b19 100644 --- a/trunk/arch/alpha/kernel/sys_eb64p.c +++ b/trunk/arch/alpha/kernel/sys_eb64p.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_eiger.c b/trunk/arch/alpha/kernel/sys_eiger.c index 79d69d7f63f8..35f480db7719 100644 --- a/trunk/arch/alpha/kernel/sys_eiger.c +++ b/trunk/arch/alpha/kernel/sys_eiger.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_jensen.c b/trunk/arch/alpha/kernel/sys_jensen.c index 5a0af11b3a61..7f1a87f176e2 100644 --- a/trunk/arch/alpha/kernel/sys_jensen.c +++ b/trunk/arch/alpha/kernel/sys_jensen.c @@ -15,6 +15,7 @@ #include #include +#include #define __EXTERN_INLINE inline #include diff --git a/trunk/arch/alpha/kernel/sys_marvel.c b/trunk/arch/alpha/kernel/sys_marvel.c index 14a4b6a7cf59..fc8b12508611 100644 --- a/trunk/arch/alpha/kernel/sys_marvel.c +++ b/trunk/arch/alpha/kernel/sys_marvel.c @@ -13,6 +13,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_miata.c b/trunk/arch/alpha/kernel/sys_miata.c index d5b9776a608d..258da684670b 100644 --- a/trunk/arch/alpha/kernel/sys_miata.c +++ b/trunk/arch/alpha/kernel/sys_miata.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_mikasa.c b/trunk/arch/alpha/kernel/sys_mikasa.c index 5e82dc1ad6f2..c0fd7284dec3 100644 --- a/trunk/arch/alpha/kernel/sys_mikasa.c +++ b/trunk/arch/alpha/kernel/sys_mikasa.c @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_nautilus.c b/trunk/arch/alpha/kernel/sys_nautilus.c index 4d4c046f708d..4112200307c7 100644 --- a/trunk/arch/alpha/kernel/sys_nautilus.c +++ b/trunk/arch/alpha/kernel/sys_nautilus.c @@ -35,6 +35,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_noritake.c b/trunk/arch/alpha/kernel/sys_noritake.c index 063e594fd969..21725283cdd7 100644 --- a/trunk/arch/alpha/kernel/sys_noritake.c +++ b/trunk/arch/alpha/kernel/sys_noritake.c @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_rawhide.c b/trunk/arch/alpha/kernel/sys_rawhide.c index dfd510ae5d8c..a125d6bea7e1 100644 --- a/trunk/arch/alpha/kernel/sys_rawhide.c +++ b/trunk/arch/alpha/kernel/sys_rawhide.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_ruffian.c b/trunk/arch/alpha/kernel/sys_ruffian.c index a3f485257170..2581cbec6fc2 100644 --- a/trunk/arch/alpha/kernel/sys_ruffian.c +++ b/trunk/arch/alpha/kernel/sys_ruffian.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_rx164.c b/trunk/arch/alpha/kernel/sys_rx164.c index 08ee737d4fba..b172b27555a7 100644 --- a/trunk/arch/alpha/kernel/sys_rx164.c +++ b/trunk/arch/alpha/kernel/sys_rx164.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_sable.c b/trunk/arch/alpha/kernel/sys_sable.c index 8a0aa6d67b53..98d1dbffe98f 100644 --- a/trunk/arch/alpha/kernel/sys_sable.c +++ b/trunk/arch/alpha/kernel/sys_sable.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_sio.c b/trunk/arch/alpha/kernel/sys_sio.c index febd24eba7a6..47bec1e97d1c 100644 --- a/trunk/arch/alpha/kernel/sys_sio.c +++ b/trunk/arch/alpha/kernel/sys_sio.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_sx164.c b/trunk/arch/alpha/kernel/sys_sx164.c index d063b360efed..73e1c317afcb 100644 --- a/trunk/arch/alpha/kernel/sys_sx164.c +++ b/trunk/arch/alpha/kernel/sys_sx164.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,6 @@ #include #include #include -#include #include "proto.h" #include "irq_impl.h" diff --git a/trunk/arch/alpha/kernel/sys_takara.c b/trunk/arch/alpha/kernel/sys_takara.c index dd0f1eae3c68..2ae99ad6975e 100644 --- a/trunk/arch/alpha/kernel/sys_takara.c +++ b/trunk/arch/alpha/kernel/sys_takara.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_titan.c b/trunk/arch/alpha/kernel/sys_titan.c index 2533db280d9b..b8eafa053539 100644 --- a/trunk/arch/alpha/kernel/sys_titan.c +++ b/trunk/arch/alpha/kernel/sys_titan.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/sys_wildfire.c b/trunk/arch/alpha/kernel/sys_wildfire.c index ee1874887776..17c85a65e7b0 100644 --- a/trunk/arch/alpha/kernel/sys_wildfire.c +++ b/trunk/arch/alpha/kernel/sys_wildfire.c @@ -15,6 +15,7 @@ #include #include +#include #include #include #include diff --git a/trunk/arch/alpha/kernel/traps.c b/trunk/arch/alpha/kernel/traps.c index 80d987c0e9aa..0414e021a91c 100644 --- a/trunk/arch/alpha/kernel/traps.c +++ b/trunk/arch/alpha/kernel/traps.c @@ -24,7 +24,6 @@ #include #include #include -#include #include "proto.h" diff --git a/trunk/arch/alpha/kernel/vmlinux.lds.S b/trunk/arch/alpha/kernel/vmlinux.lds.S index 647b84c15382..f937ad123852 100644 --- a/trunk/arch/alpha/kernel/vmlinux.lds.S +++ b/trunk/arch/alpha/kernel/vmlinux.lds.S @@ -2,7 +2,6 @@ #include #include #include -#include OUTPUT_FORMAT("elf64-alpha") OUTPUT_ARCH(alpha) @@ -26,7 +25,6 @@ SECTIONS *(.fixup) *(.gnu.warning) } :kernel - swapper_pg_dir = SWAPPER_PGD; _etext = .; /* End of text section */ NOTES :kernel :note diff --git a/trunk/arch/alpha/lib/stacktrace.c b/trunk/arch/alpha/lib/stacktrace.c index 5e832161e6d2..6d432e42aedc 100644 --- a/trunk/arch/alpha/lib/stacktrace.c +++ b/trunk/arch/alpha/lib/stacktrace.c @@ -1,4 +1,5 @@ #include +#include typedef unsigned int instr; diff --git a/trunk/arch/alpha/mm/fault.c b/trunk/arch/alpha/mm/fault.c index 5eecab1a84ef..fadd5f882ff9 100644 --- a/trunk/arch/alpha/mm/fault.c +++ b/trunk/arch/alpha/mm/fault.c @@ -24,6 +24,7 @@ #include #include +#include #include extern void die_if_kernel(char *,struct pt_regs *,long, unsigned long *); diff --git a/trunk/arch/alpha/mm/init.c b/trunk/arch/alpha/mm/init.c index 1ad6ca74bed2..69d0c5761e2f 100644 --- a/trunk/arch/alpha/mm/init.c +++ b/trunk/arch/alpha/mm/init.c @@ -22,6 +22,7 @@ #include #include +#include #include #include #include @@ -30,7 +31,6 @@ #include #include #include -#include extern void die_if_kernel(char *,struct pt_regs *,long); diff --git a/trunk/arch/alpha/oprofile/common.c b/trunk/arch/alpha/oprofile/common.c index a0a5d27aa215..bd8ac533a504 100644 --- a/trunk/arch/alpha/oprofile/common.c +++ b/trunk/arch/alpha/oprofile/common.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "op_impl.h" diff --git a/trunk/arch/alpha/oprofile/op_model_ev4.c b/trunk/arch/alpha/oprofile/op_model_ev4.c index 18aa9b4f94f1..80d764dbf22f 100644 --- a/trunk/arch/alpha/oprofile/op_model_ev4.c +++ b/trunk/arch/alpha/oprofile/op_model_ev4.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "op_impl.h" diff --git a/trunk/arch/alpha/oprofile/op_model_ev5.c b/trunk/arch/alpha/oprofile/op_model_ev5.c index c32f8a0ad925..ceea6e1ad79a 100644 --- a/trunk/arch/alpha/oprofile/op_model_ev5.c +++ b/trunk/arch/alpha/oprofile/op_model_ev5.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "op_impl.h" diff --git a/trunk/arch/alpha/oprofile/op_model_ev6.c b/trunk/arch/alpha/oprofile/op_model_ev6.c index 1c84cc257fc7..0869f85f5748 100644 --- a/trunk/arch/alpha/oprofile/op_model_ev6.c +++ b/trunk/arch/alpha/oprofile/op_model_ev6.c @@ -11,6 +11,7 @@ #include #include #include +#include #include "op_impl.h" diff --git a/trunk/arch/alpha/oprofile/op_model_ev67.c b/trunk/arch/alpha/oprofile/op_model_ev67.c index 34a57a126553..5b9d178e0228 100644 --- a/trunk/arch/alpha/oprofile/op_model_ev67.c +++ b/trunk/arch/alpha/oprofile/op_model_ev67.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "op_impl.h" diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index 93180845ae16..5098564d5879 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -9,7 +9,6 @@ config ARM select SYS_SUPPORTS_APM_EMULATION select GENERIC_ATOMIC64 if (CPU_V6 || !CPU_32v6K || !AEABI) select HAVE_OPROFILE if (HAVE_PERF_EVENTS) - select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL select HAVE_ARCH_KGDB select HAVE_KPROBES if !XIP_KERNEL select HAVE_KRETPROBES if (HAVE_KPROBES) @@ -22,7 +21,6 @@ config ARM select HAVE_KERNEL_GZIP select HAVE_KERNEL_LZO select HAVE_KERNEL_LZMA - select HAVE_KERNEL_XZ select HAVE_IRQ_WORK select HAVE_PERF_EVENTS select PERF_USE_VMALLOC @@ -30,10 +28,10 @@ config ARM select HAVE_HW_BREAKPOINT if (PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7)) select HAVE_C_RECORDMCOUNT select HAVE_GENERIC_HARDIRQS + select HAVE_SPARSE_IRQ select GENERIC_IRQ_SHOW select CPU_PM if (SUSPEND || CPU_IDLE) select GENERIC_PCI_IOMAP - select HAVE_BPF_JIT if NET help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and @@ -54,6 +52,9 @@ config MIGHT_HAVE_PCI config SYS_SUPPORTS_APM_EMULATION bool +config HAVE_SCHED_CLOCK + bool + config GENERIC_GPIO bool @@ -179,9 +180,6 @@ config ZONE_DMA config NEED_DMA_MAP_STATE def_bool y -config ARCH_HAS_DMA_SET_COHERENT_MASK - bool - config GENERIC_ISA_DMA bool @@ -219,13 +217,6 @@ config ARM_PATCH_PHYS_VIRT this feature (eg, building a kernel for a single machine) and you need to shrink the kernel to the minimal size. -config NEED_MACH_IO_H - bool - help - Select this when mach/io.h is required to provide special - definitions for this platform. The need for mach/io.h should - be avoided when possible. - config NEED_MACH_MEMORY_H bool help @@ -277,9 +268,7 @@ config ARCH_INTEGRATOR select GENERIC_CLOCKEVENTS select PLAT_VERSATILE select PLAT_VERSATILE_FPGA_IRQ - select NEED_MACH_IO_H select NEED_MACH_MEMORY_H - select SPARSE_IRQ help Support for ARM's Integrator platform. @@ -326,7 +315,6 @@ config ARCH_VEXPRESS select HAVE_CLK select HAVE_PATA_PLATFORM select ICST - select NO_IOPORT select PLAT_VERSATILE select PLAT_VERSATILE_CLCD help @@ -366,7 +354,6 @@ config ARCH_HIGHBANK select GENERIC_CLOCKEVENTS select HAVE_ARM_SCU select HAVE_SMP - select SPARSE_IRQ select USE_OF help Support for the Calxeda Highbank SoC based boards. @@ -417,7 +404,6 @@ config ARCH_EBSA110 select ISA select NO_IOPORT select ARCH_USES_GETTIMEOFFSET - select NEED_MACH_IO_H select NEED_MACH_MEMORY_H help This is an evaluation board for the StrongARM processor available @@ -444,7 +430,6 @@ config ARCH_FOOTBRIDGE select FOOTBRIDGE select GENERIC_CLOCKEVENTS select HAVE_IDE - select NEED_MACH_IO_H select NEED_MACH_MEMORY_H help Support for systems based on the DC21285 companion chip @@ -457,6 +442,7 @@ config ARCH_MXC select CLKDEV_LOOKUP select CLKSRC_MMIO select GENERIC_IRQ_CHIP + select HAVE_SCHED_CLOCK select MULTI_IRQ_HANDLER help Support for Freescale MXC/iMX-based family of processors @@ -496,7 +482,6 @@ config ARCH_IOP13XX select PCI select ARCH_SUPPORTS_MSI select VMSPLIT_1G - select NEED_MACH_IO_H select NEED_MACH_MEMORY_H select NEED_RET_TO_USER help @@ -506,7 +491,6 @@ config ARCH_IOP32X bool "IOP32x-based" depends on MMU select CPU_XSCALE - select NEED_MACH_IO_H select NEED_RET_TO_USER select PLAT_IOP select PCI @@ -519,7 +503,6 @@ config ARCH_IOP33X bool "IOP33x-based" depends on MMU select CPU_XSCALE - select NEED_MACH_IO_H select NEED_RET_TO_USER select PLAT_IOP select PCI @@ -533,7 +516,6 @@ config ARCH_IXP23XX select CPU_XSC3 select PCI select ARCH_USES_GETTIMEOFFSET - select NEED_MACH_IO_H select NEED_MACH_MEMORY_H help Support for Intel's IXP23xx (XScale) family of processors. @@ -544,7 +526,6 @@ config ARCH_IXP2000 select CPU_XSCALE select PCI select ARCH_USES_GETTIMEOFFSET - select NEED_MACH_IO_H select NEED_MACH_MEMORY_H help Support for Intel's IXP2400/2800 (XScale) family of processors. @@ -552,13 +533,12 @@ config ARCH_IXP2000 config ARCH_IXP4XX bool "IXP4xx-based" depends on MMU - select ARCH_HAS_DMA_SET_COHERENT_MASK select CLKSRC_MMIO select CPU_XSCALE select GENERIC_GPIO select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK select MIGHT_HAVE_PCI - select NEED_MACH_IO_H select DMABOUNCE if PCI help Support for Intel's IXP4XX (XScale) family of processors. @@ -569,7 +549,6 @@ config ARCH_DOVE select PCI select ARCH_REQUIRE_GPIOLIB select GENERIC_CLOCKEVENTS - select NEED_MACH_IO_H select PLAT_ORION help Support for the Marvell Dove SoC 88AP510 @@ -580,7 +559,6 @@ config ARCH_KIRKWOOD select PCI select ARCH_REQUIRE_GPIOLIB select GENERIC_CLOCKEVENTS - select NEED_MACH_IO_H select PLAT_ORION help Support for the following Marvell Kirkwood series SoCs: @@ -605,7 +583,6 @@ config ARCH_MV78XX0 select PCI select ARCH_REQUIRE_GPIOLIB select GENERIC_CLOCKEVENTS - select NEED_MACH_IO_H select PLAT_ORION help Support for the following Marvell MV78xx0 series SoCs: @@ -631,6 +608,7 @@ config ARCH_MMP select CLKDEV_LOOKUP select GENERIC_CLOCKEVENTS select GPIO_PXA + select HAVE_SCHED_CLOCK select TICK_ONESHOT select PLAT_PXA select SPARSE_IRQ @@ -671,9 +649,9 @@ config ARCH_TEGRA select GENERIC_CLOCKEVENTS select GENERIC_GPIO select HAVE_CLK + select HAVE_SCHED_CLOCK select HAVE_SMP select MIGHT_HAVE_CACHE_L2X0 - select NEED_MACH_IO_H if PCI select ARCH_HAS_CPUFREQ help This enables support for NVIDIA Tegra based systems (Tegra APX, @@ -688,6 +666,7 @@ config ARCH_PICOXCELL select DW_APB_TIMER select GENERIC_CLOCKEVENTS select GENERIC_GPIO + select HAVE_SCHED_CLOCK select HAVE_TCM select NO_IOPORT select SPARSE_IRQ @@ -715,6 +694,7 @@ config ARCH_PXA select ARCH_REQUIRE_GPIOLIB select GENERIC_CLOCKEVENTS select GPIO_PXA + select HAVE_SCHED_CLOCK select TICK_ONESHOT select PLAT_PXA select SPARSE_IRQ @@ -765,7 +745,6 @@ config ARCH_RPC select ARCH_SPARSEMEM_ENABLE select ARCH_USES_GETTIMEOFFSET select HAVE_IDE - select NEED_MACH_IO_H select NEED_MACH_MEMORY_H help On the Acorn Risc-PC, Linux can support the internal IDE disk and @@ -782,6 +761,7 @@ config ARCH_SA1100 select CPU_FREQ select GENERIC_CLOCKEVENTS select CLKDEV_LOOKUP + select HAVE_SCHED_CLOCK select TICK_ONESHOT select ARCH_REQUIRE_GPIOLIB select HAVE_IDE @@ -800,7 +780,6 @@ config ARCH_S3C24XX select HAVE_S3C2410_I2C if I2C select HAVE_S3C_RTC if RTC_CLASS select HAVE_S3C2410_WATCHDOG if WATCHDOG - select NEED_MACH_IO_H help Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443 and S3C2450 SoCs based systems, such as the Simtec Electronics BAST @@ -839,6 +818,7 @@ config ARCH_S5P64X0 select CLKSRC_MMIO select HAVE_S3C2410_WATCHDOG if WATCHDOG select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK select HAVE_S3C2410_I2C if I2C select HAVE_S3C_RTC if RTC_CLASS help @@ -869,6 +849,7 @@ config ARCH_S5PV210 select CLKSRC_MMIO select ARCH_HAS_CPUFREQ select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK select HAVE_S3C2410_I2C if I2C select HAVE_S3C_RTC if RTC_CLASS select HAVE_S3C2410_WATCHDOG if WATCHDOG @@ -902,7 +883,6 @@ config ARCH_SHARK select PCI select ARCH_USES_GETTIMEOFFSET select NEED_MACH_MEMORY_H - select NEED_MACH_IO_H help Support for the StrongARM based Digital DNARD machine, also known as "Shark" (). @@ -912,6 +892,7 @@ config ARCH_U300 depends on MMU select CLKSRC_MMIO select CPU_ARM926T + select HAVE_SCHED_CLOCK select HAVE_TCM select ARM_AMBA select ARM_PATCH_PHYS_VIRT @@ -970,6 +951,7 @@ config ARCH_OMAP select ARCH_HAS_CPUFREQ select CLKSRC_MMIO select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK select ARCH_HAS_HOLES_MEMORYMODEL help Support for TI's OMAP platform (OMAP1/2/3/4). @@ -1133,11 +1115,13 @@ config ARCH_ACORN config PLAT_IOP bool select GENERIC_CLOCKEVENTS + select HAVE_SCHED_CLOCK config PLAT_ORION bool select CLKSRC_MMIO select GENERIC_IRQ_CHIP + select HAVE_SCHED_CLOCK config PLAT_PXA bool diff --git a/trunk/arch/arm/Kconfig.debug b/trunk/arch/arm/Kconfig.debug index 85348a09d655..66ca8014ff3e 100644 --- a/trunk/arch/arm/Kconfig.debug +++ b/trunk/arch/arm/Kconfig.debug @@ -292,22 +292,6 @@ choice Note that the system will appear to hang during boot if there is nothing connected to read from the DCC. - config DEBUG_SEMIHOSTING - bool "Kernel low-level debug output via semihosting I" - help - Semihosting enables code running on an ARM target to use - the I/O facilities on a host debugger/emulator through a - simple SVC calls. The host debugger or emulator must have - semihosting enabled for the special svc call to be trapped - otherwise the kernel will crash. - - This is known to work with OpenOCD, as wellas - ARM's Fast Models, or any other controlling environment - that implements semihosting. - - For more details about semihosting, please see - chapter 8 of DUI0203I_rvct_developer_guide.pdf from ARM Ltd. - endchoice config EARLY_PRINTK diff --git a/trunk/arch/arm/Makefile b/trunk/arch/arm/Makefile index 047a20780fc1..dcb088e868fe 100644 --- a/trunk/arch/arm/Makefile +++ b/trunk/arch/arm/Makefile @@ -253,7 +253,6 @@ core-$(CONFIG_VFP) += arch/arm/vfp/ # If we have a machine-specific directory, then include it in the build. core-y += arch/arm/kernel/ arch/arm/mm/ arch/arm/common/ -core-y += arch/arm/net/ core-y += $(machdirs) $(platdirs) drivers-$(CONFIG_OPROFILE) += arch/arm/oprofile/ diff --git a/trunk/arch/arm/boot/compressed/.gitignore b/trunk/arch/arm/boot/compressed/.gitignore index d0d441c429ae..e0936a148516 100644 --- a/trunk/arch/arm/boot/compressed/.gitignore +++ b/trunk/arch/arm/boot/compressed/.gitignore @@ -1,10 +1,8 @@ -ashldi3.S font.c lib1funcs.S piggy.gzip piggy.lzo piggy.lzma -piggy.xzkern vmlinux vmlinux.lds diff --git a/trunk/arch/arm/boot/compressed/Makefile b/trunk/arch/arm/boot/compressed/Makefile index bb267562e7ed..cf0a64ce4b83 100644 --- a/trunk/arch/arm/boot/compressed/Makefile +++ b/trunk/arch/arm/boot/compressed/Makefile @@ -92,7 +92,6 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ suffix_$(CONFIG_KERNEL_GZIP) = gzip suffix_$(CONFIG_KERNEL_LZO) = lzo suffix_$(CONFIG_KERNEL_LZMA) = lzma -suffix_$(CONFIG_KERNEL_XZ) = xzkern # Borrowed libfdt files for the ATAG compatibility mode @@ -113,12 +112,10 @@ endif targets := vmlinux vmlinux.lds \ piggy.$(suffix_y) piggy.$(suffix_y).o \ - lib1funcs.o lib1funcs.S ashldi3.o ashldi3.S \ - font.o font.c head.o misc.o $(OBJS) + lib1funcs.o lib1funcs.S font.o font.c head.o misc.o $(OBJS) # Make sure files are removed during clean -extra-y += piggy.gzip piggy.lzo piggy.lzma piggy.xzkern \ - lib1funcs.S ashldi3.S $(libfdt) $(libfdt_hdrs) +extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S $(libfdt) $(libfdt_hdrs) ifeq ($(CONFIG_FUNCTION_TRACER),y) ORIG_CFLAGS := $(KBUILD_CFLAGS) @@ -154,12 +151,6 @@ lib1funcs = $(obj)/lib1funcs.o $(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S $(call cmd,shipped) -# For __aeabi_llsl -ashldi3 = $(obj)/ashldi3.o - -$(obj)/ashldi3.S: $(srctree)/arch/$(SRCARCH)/lib/ashldi3.S - $(call cmd,shipped) - # We need to prevent any GOTOFF relocs being used with references # to symbols in the .bss section since we cannot relocate them # independently from the rest at run time. This can be achieved by @@ -181,7 +172,7 @@ if [ $(words $(ZRELADDR)) -gt 1 -a "$(CONFIG_AUTO_ZRELADDR)" = "" ]; then \ fi $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ - $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) $(ashldi3) FORCE + $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE @$(check_for_multiple_zreladdr) $(call if_changed,ld) @$(check_for_bad_syms) diff --git a/trunk/arch/arm/boot/compressed/decompress.c b/trunk/arch/arm/boot/compressed/decompress.c index f41b38cafce8..07be5a2f8302 100644 --- a/trunk/arch/arm/boot/compressed/decompress.c +++ b/trunk/arch/arm/boot/compressed/decompress.c @@ -44,12 +44,6 @@ extern void error(char *); #include "../../../../lib/decompress_unlzma.c" #endif -#ifdef CONFIG_KERNEL_XZ -#define memmove memmove -#define memcpy memcpy -#include "../../../../lib/decompress_unxz.c" -#endif - int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) { return decompress(input, len, NULL, NULL, output, NULL, error); diff --git a/trunk/arch/arm/boot/compressed/piggy.xzkern.S b/trunk/arch/arm/boot/compressed/piggy.xzkern.S deleted file mode 100644 index 5703f300d027..000000000000 --- a/trunk/arch/arm/boot/compressed/piggy.xzkern.S +++ /dev/null @@ -1,6 +0,0 @@ - .section .piggydata,#alloc - .globl input_data -input_data: - .incbin "arch/arm/boot/compressed/piggy.xzkern" - .globl input_data_end -input_data_end: diff --git a/trunk/arch/arm/common/Kconfig b/trunk/arch/arm/common/Kconfig index 283fa1d804f4..3bb1d7589bd9 100644 --- a/trunk/arch/arm/common/Kconfig +++ b/trunk/arch/arm/common/Kconfig @@ -24,6 +24,9 @@ config ARM_VIC_NR config ICST bool +config PL330 + bool + config SA1111 bool select DMABOUNCE if !ARCH_PXA diff --git a/trunk/arch/arm/common/Makefile b/trunk/arch/arm/common/Makefile index 215816f1775f..69feafe7286c 100644 --- a/trunk/arch/arm/common/Makefile +++ b/trunk/arch/arm/common/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_ARM_GIC) += gic.o obj-$(CONFIG_ARM_VIC) += vic.o obj-$(CONFIG_ICST) += icst.o +obj-$(CONFIG_PL330) += pl330.o obj-$(CONFIG_SA1111) += sa1111.o obj-$(CONFIG_PCI_HOST_VIA82C505) += via82c505.o obj-$(CONFIG_DMABOUNCE) += dmabounce.o diff --git a/trunk/arch/arm/common/gic.c b/trunk/arch/arm/common/gic.c index aa5269984187..f0783be17352 100644 --- a/trunk/arch/arm/common/gic.c +++ b/trunk/arch/arm/common/gic.c @@ -686,12 +686,13 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, * For primary GICs, skip over SGIs. * For secondary GICs, skip over PPIs, too. */ - if (gic_nr == 0 && (irq_start & 31) > 0) { - hwirq_base = 16; - if (irq_start != -1) - irq_start = (irq_start & ~31) + 16; - } else { - hwirq_base = 32; + hwirq_base = 32; + if (gic_nr == 0) { + if ((irq_start & 31) > 0) { + hwirq_base = 16; + if (irq_start != -1) + irq_start = (irq_start & ~31) + 16; + } } /* diff --git a/trunk/arch/arm/common/pl330.c b/trunk/arch/arm/common/pl330.c new file mode 100644 index 000000000000..ff3ad2244824 --- /dev/null +++ b/trunk/arch/arm/common/pl330.c @@ -0,0 +1,1960 @@ +/* linux/arch/arm/common/pl330.c + * + * Copyright (C) 2010 Samsung Electronics Co Ltd. + * Jaswinder Singh + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +/* Register and Bit field Definitions */ +#define DS 0x0 +#define DS_ST_STOP 0x0 +#define DS_ST_EXEC 0x1 +#define DS_ST_CMISS 0x2 +#define DS_ST_UPDTPC 0x3 +#define DS_ST_WFE 0x4 +#define DS_ST_ATBRR 0x5 +#define DS_ST_QBUSY 0x6 +#define DS_ST_WFP 0x7 +#define DS_ST_KILL 0x8 +#define DS_ST_CMPLT 0x9 +#define DS_ST_FLTCMP 0xe +#define DS_ST_FAULT 0xf + +#define DPC 0x4 +#define INTEN 0x20 +#define ES 0x24 +#define INTSTATUS 0x28 +#define INTCLR 0x2c +#define FSM 0x30 +#define FSC 0x34 +#define FTM 0x38 + +#define _FTC 0x40 +#define FTC(n) (_FTC + (n)*0x4) + +#define _CS 0x100 +#define CS(n) (_CS + (n)*0x8) +#define CS_CNS (1 << 21) + +#define _CPC 0x104 +#define CPC(n) (_CPC + (n)*0x8) + +#define _SA 0x400 +#define SA(n) (_SA + (n)*0x20) + +#define _DA 0x404 +#define DA(n) (_DA + (n)*0x20) + +#define _CC 0x408 +#define CC(n) (_CC + (n)*0x20) + +#define CC_SRCINC (1 << 0) +#define CC_DSTINC (1 << 14) +#define CC_SRCPRI (1 << 8) +#define CC_DSTPRI (1 << 22) +#define CC_SRCNS (1 << 9) +#define CC_DSTNS (1 << 23) +#define CC_SRCIA (1 << 10) +#define CC_DSTIA (1 << 24) +#define CC_SRCBRSTLEN_SHFT 4 +#define CC_DSTBRSTLEN_SHFT 18 +#define CC_SRCBRSTSIZE_SHFT 1 +#define CC_DSTBRSTSIZE_SHFT 15 +#define CC_SRCCCTRL_SHFT 11 +#define CC_SRCCCTRL_MASK 0x7 +#define CC_DSTCCTRL_SHFT 25 +#define CC_DRCCCTRL_MASK 0x7 +#define CC_SWAP_SHFT 28 + +#define _LC0 0x40c +#define LC0(n) (_LC0 + (n)*0x20) + +#define _LC1 0x410 +#define LC1(n) (_LC1 + (n)*0x20) + +#define DBGSTATUS 0xd00 +#define DBG_BUSY (1 << 0) + +#define DBGCMD 0xd04 +#define DBGINST0 0xd08 +#define DBGINST1 0xd0c + +#define CR0 0xe00 +#define CR1 0xe04 +#define CR2 0xe08 +#define CR3 0xe0c +#define CR4 0xe10 +#define CRD 0xe14 + +#define PERIPH_ID 0xfe0 +#define PCELL_ID 0xff0 + +#define CR0_PERIPH_REQ_SET (1 << 0) +#define CR0_BOOT_EN_SET (1 << 1) +#define CR0_BOOT_MAN_NS (1 << 2) +#define CR0_NUM_CHANS_SHIFT 4 +#define CR0_NUM_CHANS_MASK 0x7 +#define CR0_NUM_PERIPH_SHIFT 12 +#define CR0_NUM_PERIPH_MASK 0x1f +#define CR0_NUM_EVENTS_SHIFT 17 +#define CR0_NUM_EVENTS_MASK 0x1f + +#define CR1_ICACHE_LEN_SHIFT 0 +#define CR1_ICACHE_LEN_MASK 0x7 +#define CR1_NUM_ICACHELINES_SHIFT 4 +#define CR1_NUM_ICACHELINES_MASK 0xf + +#define CRD_DATA_WIDTH_SHIFT 0 +#define CRD_DATA_WIDTH_MASK 0x7 +#define CRD_WR_CAP_SHIFT 4 +#define CRD_WR_CAP_MASK 0x7 +#define CRD_WR_Q_DEP_SHIFT 8 +#define CRD_WR_Q_DEP_MASK 0xf +#define CRD_RD_CAP_SHIFT 12 +#define CRD_RD_CAP_MASK 0x7 +#define CRD_RD_Q_DEP_SHIFT 16 +#define CRD_RD_Q_DEP_MASK 0xf +#define CRD_DATA_BUFF_SHIFT 20 +#define CRD_DATA_BUFF_MASK 0x3ff + +#define PART 0x330 +#define DESIGNER 0x41 +#define REVISION 0x0 +#define INTEG_CFG 0x0 +#define PERIPH_ID_VAL ((PART << 0) | (DESIGNER << 12)) + +#define PCELL_ID_VAL 0xb105f00d + +#define PL330_STATE_STOPPED (1 << 0) +#define PL330_STATE_EXECUTING (1 << 1) +#define PL330_STATE_WFE (1 << 2) +#define PL330_STATE_FAULTING (1 << 3) +#define PL330_STATE_COMPLETING (1 << 4) +#define PL330_STATE_WFP (1 << 5) +#define PL330_STATE_KILLING (1 << 6) +#define PL330_STATE_FAULT_COMPLETING (1 << 7) +#define PL330_STATE_CACHEMISS (1 << 8) +#define PL330_STATE_UPDTPC (1 << 9) +#define PL330_STATE_ATBARRIER (1 << 10) +#define PL330_STATE_QUEUEBUSY (1 << 11) +#define PL330_STATE_INVALID (1 << 15) + +#define PL330_STABLE_STATES (PL330_STATE_STOPPED | PL330_STATE_EXECUTING \ + | PL330_STATE_WFE | PL330_STATE_FAULTING) + +#define CMD_DMAADDH 0x54 +#define CMD_DMAEND 0x00 +#define CMD_DMAFLUSHP 0x35 +#define CMD_DMAGO 0xa0 +#define CMD_DMALD 0x04 +#define CMD_DMALDP 0x25 +#define CMD_DMALP 0x20 +#define CMD_DMALPEND 0x28 +#define CMD_DMAKILL 0x01 +#define CMD_DMAMOV 0xbc +#define CMD_DMANOP 0x18 +#define CMD_DMARMB 0x12 +#define CMD_DMASEV 0x34 +#define CMD_DMAST 0x08 +#define CMD_DMASTP 0x29 +#define CMD_DMASTZ 0x0c +#define CMD_DMAWFE 0x36 +#define CMD_DMAWFP 0x30 +#define CMD_DMAWMB 0x13 + +#define SZ_DMAADDH 3 +#define SZ_DMAEND 1 +#define SZ_DMAFLUSHP 2 +#define SZ_DMALD 1 +#define SZ_DMALDP 2 +#define SZ_DMALP 2 +#define SZ_DMALPEND 2 +#define SZ_DMAKILL 1 +#define SZ_DMAMOV 6 +#define SZ_DMANOP 1 +#define SZ_DMARMB 1 +#define SZ_DMASEV 2 +#define SZ_DMAST 1 +#define SZ_DMASTP 2 +#define SZ_DMASTZ 1 +#define SZ_DMAWFE 2 +#define SZ_DMAWFP 2 +#define SZ_DMAWMB 1 +#define SZ_DMAGO 6 + +#define BRST_LEN(ccr) ((((ccr) >> CC_SRCBRSTLEN_SHFT) & 0xf) + 1) +#define BRST_SIZE(ccr) (1 << (((ccr) >> CC_SRCBRSTSIZE_SHFT) & 0x7)) + +#define BYTE_TO_BURST(b, ccr) ((b) / BRST_SIZE(ccr) / BRST_LEN(ccr)) +#define BURST_TO_BYTE(c, ccr) ((c) * BRST_SIZE(ccr) * BRST_LEN(ccr)) + +/* + * With 256 bytes, we can do more than 2.5MB and 5MB xfers per req + * at 1byte/burst for P<->M and M<->M respectively. + * For typical scenario, at 1word/burst, 10MB and 20MB xfers per req + * should be enough for P<->M and M<->M respectively. + */ +#define MCODE_BUFF_PER_REQ 256 + +/* If the _pl330_req is available to the client */ +#define IS_FREE(req) (*((u8 *)((req)->mc_cpu)) == CMD_DMAEND) + +/* Use this _only_ to wait on transient states */ +#define UNTIL(t, s) while (!(_state(t) & (s))) cpu_relax(); + +#ifdef PL330_DEBUG_MCGEN +static unsigned cmd_line; +#define PL330_DBGCMD_DUMP(off, x...) do { \ + printk("%x:", cmd_line); \ + printk(x); \ + cmd_line += off; \ + } while (0) +#define PL330_DBGMC_START(addr) (cmd_line = addr) +#else +#define PL330_DBGCMD_DUMP(off, x...) do {} while (0) +#define PL330_DBGMC_START(addr) do {} while (0) +#endif + +struct _xfer_spec { + u32 ccr; + struct pl330_req *r; + struct pl330_xfer *x; +}; + +enum dmamov_dst { + SAR = 0, + CCR, + DAR, +}; + +enum pl330_dst { + SRC = 0, + DST, +}; + +enum pl330_cond { + SINGLE, + BURST, + ALWAYS, +}; + +struct _pl330_req { + u32 mc_bus; + void *mc_cpu; + /* Number of bytes taken to setup MC for the req */ + u32 mc_len; + struct pl330_req *r; + /* Hook to attach to DMAC's list of reqs with due callback */ + struct list_head rqd; +}; + +/* ToBeDone for tasklet */ +struct _pl330_tbd { + bool reset_dmac; + bool reset_mngr; + u8 reset_chan; +}; + +/* A DMAC Thread */ +struct pl330_thread { + u8 id; + int ev; + /* If the channel is not yet acquired by any client */ + bool free; + /* Parent DMAC */ + struct pl330_dmac *dmac; + /* Only two at a time */ + struct _pl330_req req[2]; + /* Index of the last enqueued request */ + unsigned lstenq; + /* Index of the last submitted request or -1 if the DMA is stopped */ + int req_running; +}; + +enum pl330_dmac_state { + UNINIT, + INIT, + DYING, +}; + +/* A DMAC */ +struct pl330_dmac { + spinlock_t lock; + /* Holds list of reqs with due callbacks */ + struct list_head req_done; + /* Pointer to platform specific stuff */ + struct pl330_info *pinfo; + /* Maximum possible events/irqs */ + int events[32]; + /* BUS address of MicroCode buffer */ + u32 mcode_bus; + /* CPU address of MicroCode buffer */ + void *mcode_cpu; + /* List of all Channel threads */ + struct pl330_thread *channels; + /* Pointer to the MANAGER thread */ + struct pl330_thread *manager; + /* To handle bad news in interrupt */ + struct tasklet_struct tasks; + struct _pl330_tbd dmac_tbd; + /* State of DMAC operation */ + enum pl330_dmac_state state; +}; + +static inline void _callback(struct pl330_req *r, enum pl330_op_err err) +{ + if (r && r->xfer_cb) + r->xfer_cb(r->token, err); +} + +static inline bool _queue_empty(struct pl330_thread *thrd) +{ + return (IS_FREE(&thrd->req[0]) && IS_FREE(&thrd->req[1])) + ? true : false; +} + +static inline bool _queue_full(struct pl330_thread *thrd) +{ + return (IS_FREE(&thrd->req[0]) || IS_FREE(&thrd->req[1])) + ? false : true; +} + +static inline bool is_manager(struct pl330_thread *thrd) +{ + struct pl330_dmac *pl330 = thrd->dmac; + + /* MANAGER is indexed at the end */ + if (thrd->id == pl330->pinfo->pcfg.num_chan) + return true; + else + return false; +} + +/* If manager of the thread is in Non-Secure mode */ +static inline bool _manager_ns(struct pl330_thread *thrd) +{ + struct pl330_dmac *pl330 = thrd->dmac; + + return (pl330->pinfo->pcfg.mode & DMAC_MODE_NS) ? true : false; +} + +static inline u32 get_id(struct pl330_info *pi, u32 off) +{ + void __iomem *regs = pi->base; + u32 id = 0; + + id |= (readb(regs + off + 0x0) << 0); + id |= (readb(regs + off + 0x4) << 8); + id |= (readb(regs + off + 0x8) << 16); + id |= (readb(regs + off + 0xc) << 24); + + return id; +} + +static inline u32 _emit_ADDH(unsigned dry_run, u8 buf[], + enum pl330_dst da, u16 val) +{ + if (dry_run) + return SZ_DMAADDH; + + buf[0] = CMD_DMAADDH; + buf[0] |= (da << 1); + *((u16 *)&buf[1]) = val; + + PL330_DBGCMD_DUMP(SZ_DMAADDH, "\tDMAADDH %s %u\n", + da == 1 ? "DA" : "SA", val); + + return SZ_DMAADDH; +} + +static inline u32 _emit_END(unsigned dry_run, u8 buf[]) +{ + if (dry_run) + return SZ_DMAEND; + + buf[0] = CMD_DMAEND; + + PL330_DBGCMD_DUMP(SZ_DMAEND, "\tDMAEND\n"); + + return SZ_DMAEND; +} + +static inline u32 _emit_FLUSHP(unsigned dry_run, u8 buf[], u8 peri) +{ + if (dry_run) + return SZ_DMAFLUSHP; + + buf[0] = CMD_DMAFLUSHP; + + peri &= 0x1f; + peri <<= 3; + buf[1] = peri; + + PL330_DBGCMD_DUMP(SZ_DMAFLUSHP, "\tDMAFLUSHP %u\n", peri >> 3); + + return SZ_DMAFLUSHP; +} + +static inline u32 _emit_LD(unsigned dry_run, u8 buf[], enum pl330_cond cond) +{ + if (dry_run) + return SZ_DMALD; + + buf[0] = CMD_DMALD; + + if (cond == SINGLE) + buf[0] |= (0 << 1) | (1 << 0); + else if (cond == BURST) + buf[0] |= (1 << 1) | (1 << 0); + + PL330_DBGCMD_DUMP(SZ_DMALD, "\tDMALD%c\n", + cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'A')); + + return SZ_DMALD; +} + +static inline u32 _emit_LDP(unsigned dry_run, u8 buf[], + enum pl330_cond cond, u8 peri) +{ + if (dry_run) + return SZ_DMALDP; + + buf[0] = CMD_DMALDP; + + if (cond == BURST) + buf[0] |= (1 << 1); + + peri &= 0x1f; + peri <<= 3; + buf[1] = peri; + + PL330_DBGCMD_DUMP(SZ_DMALDP, "\tDMALDP%c %u\n", + cond == SINGLE ? 'S' : 'B', peri >> 3); + + return SZ_DMALDP; +} + +static inline u32 _emit_LP(unsigned dry_run, u8 buf[], + unsigned loop, u8 cnt) +{ + if (dry_run) + return SZ_DMALP; + + buf[0] = CMD_DMALP; + + if (loop) + buf[0] |= (1 << 1); + + cnt--; /* DMAC increments by 1 internally */ + buf[1] = cnt; + + PL330_DBGCMD_DUMP(SZ_DMALP, "\tDMALP_%c %u\n", loop ? '1' : '0', cnt); + + return SZ_DMALP; +} + +struct _arg_LPEND { + enum pl330_cond cond; + bool forever; + unsigned loop; + u8 bjump; +}; + +static inline u32 _emit_LPEND(unsigned dry_run, u8 buf[], + const struct _arg_LPEND *arg) +{ + enum pl330_cond cond = arg->cond; + bool forever = arg->forever; + unsigned loop = arg->loop; + u8 bjump = arg->bjump; + + if (dry_run) + return SZ_DMALPEND; + + buf[0] = CMD_DMALPEND; + + if (loop) + buf[0] |= (1 << 2); + + if (!forever) + buf[0] |= (1 << 4); + + if (cond == SINGLE) + buf[0] |= (0 << 1) | (1 << 0); + else if (cond == BURST) + buf[0] |= (1 << 1) | (1 << 0); + + buf[1] = bjump; + + PL330_DBGCMD_DUMP(SZ_DMALPEND, "\tDMALP%s%c_%c bjmpto_%x\n", + forever ? "FE" : "END", + cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'A'), + loop ? '1' : '0', + bjump); + + return SZ_DMALPEND; +} + +static inline u32 _emit_KILL(unsigned dry_run, u8 buf[]) +{ + if (dry_run) + return SZ_DMAKILL; + + buf[0] = CMD_DMAKILL; + + return SZ_DMAKILL; +} + +static inline u32 _emit_MOV(unsigned dry_run, u8 buf[], + enum dmamov_dst dst, u32 val) +{ + if (dry_run) + return SZ_DMAMOV; + + buf[0] = CMD_DMAMOV; + buf[1] = dst; + *((u32 *)&buf[2]) = val; + + PL330_DBGCMD_DUMP(SZ_DMAMOV, "\tDMAMOV %s 0x%x\n", + dst == SAR ? "SAR" : (dst == DAR ? "DAR" : "CCR"), val); + + return SZ_DMAMOV; +} + +static inline u32 _emit_NOP(unsigned dry_run, u8 buf[]) +{ + if (dry_run) + return SZ_DMANOP; + + buf[0] = CMD_DMANOP; + + PL330_DBGCMD_DUMP(SZ_DMANOP, "\tDMANOP\n"); + + return SZ_DMANOP; +} + +static inline u32 _emit_RMB(unsigned dry_run, u8 buf[]) +{ + if (dry_run) + return SZ_DMARMB; + + buf[0] = CMD_DMARMB; + + PL330_DBGCMD_DUMP(SZ_DMARMB, "\tDMARMB\n"); + + return SZ_DMARMB; +} + +static inline u32 _emit_SEV(unsigned dry_run, u8 buf[], u8 ev) +{ + if (dry_run) + return SZ_DMASEV; + + buf[0] = CMD_DMASEV; + + ev &= 0x1f; + ev <<= 3; + buf[1] = ev; + + PL330_DBGCMD_DUMP(SZ_DMASEV, "\tDMASEV %u\n", ev >> 3); + + return SZ_DMASEV; +} + +static inline u32 _emit_ST(unsigned dry_run, u8 buf[], enum pl330_cond cond) +{ + if (dry_run) + return SZ_DMAST; + + buf[0] = CMD_DMAST; + + if (cond == SINGLE) + buf[0] |= (0 << 1) | (1 << 0); + else if (cond == BURST) + buf[0] |= (1 << 1) | (1 << 0); + + PL330_DBGCMD_DUMP(SZ_DMAST, "\tDMAST%c\n", + cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'A')); + + return SZ_DMAST; +} + +static inline u32 _emit_STP(unsigned dry_run, u8 buf[], + enum pl330_cond cond, u8 peri) +{ + if (dry_run) + return SZ_DMASTP; + + buf[0] = CMD_DMASTP; + + if (cond == BURST) + buf[0] |= (1 << 1); + + peri &= 0x1f; + peri <<= 3; + buf[1] = peri; + + PL330_DBGCMD_DUMP(SZ_DMASTP, "\tDMASTP%c %u\n", + cond == SINGLE ? 'S' : 'B', peri >> 3); + + return SZ_DMASTP; +} + +static inline u32 _emit_STZ(unsigned dry_run, u8 buf[]) +{ + if (dry_run) + return SZ_DMASTZ; + + buf[0] = CMD_DMASTZ; + + PL330_DBGCMD_DUMP(SZ_DMASTZ, "\tDMASTZ\n"); + + return SZ_DMASTZ; +} + +static inline u32 _emit_WFE(unsigned dry_run, u8 buf[], u8 ev, + unsigned invalidate) +{ + if (dry_run) + return SZ_DMAWFE; + + buf[0] = CMD_DMAWFE; + + ev &= 0x1f; + ev <<= 3; + buf[1] = ev; + + if (invalidate) + buf[1] |= (1 << 1); + + PL330_DBGCMD_DUMP(SZ_DMAWFE, "\tDMAWFE %u%s\n", + ev >> 3, invalidate ? ", I" : ""); + + return SZ_DMAWFE; +} + +static inline u32 _emit_WFP(unsigned dry_run, u8 buf[], + enum pl330_cond cond, u8 peri) +{ + if (dry_run) + return SZ_DMAWFP; + + buf[0] = CMD_DMAWFP; + + if (cond == SINGLE) + buf[0] |= (0 << 1) | (0 << 0); + else if (cond == BURST) + buf[0] |= (1 << 1) | (0 << 0); + else + buf[0] |= (0 << 1) | (1 << 0); + + peri &= 0x1f; + peri <<= 3; + buf[1] = peri; + + PL330_DBGCMD_DUMP(SZ_DMAWFP, "\tDMAWFP%c %u\n", + cond == SINGLE ? 'S' : (cond == BURST ? 'B' : 'P'), peri >> 3); + + return SZ_DMAWFP; +} + +static inline u32 _emit_WMB(unsigned dry_run, u8 buf[]) +{ + if (dry_run) + return SZ_DMAWMB; + + buf[0] = CMD_DMAWMB; + + PL330_DBGCMD_DUMP(SZ_DMAWMB, "\tDMAWMB\n"); + + return SZ_DMAWMB; +} + +struct _arg_GO { + u8 chan; + u32 addr; + unsigned ns; +}; + +static inline u32 _emit_GO(unsigned dry_run, u8 buf[], + const struct _arg_GO *arg) +{ + u8 chan = arg->chan; + u32 addr = arg->addr; + unsigned ns = arg->ns; + + if (dry_run) + return SZ_DMAGO; + + buf[0] = CMD_DMAGO; + buf[0] |= (ns << 1); + + buf[1] = chan & 0x7; + + *((u32 *)&buf[2]) = addr; + + return SZ_DMAGO; +} + +#define msecs_to_loops(t) (loops_per_jiffy / 1000 * HZ * t) + +/* Returns Time-Out */ +static bool _until_dmac_idle(struct pl330_thread *thrd) +{ + void __iomem *regs = thrd->dmac->pinfo->base; + unsigned long loops = msecs_to_loops(5); + + do { + /* Until Manager is Idle */ + if (!(readl(regs + DBGSTATUS) & DBG_BUSY)) + break; + + cpu_relax(); + } while (--loops); + + if (!loops) + return true; + + return false; +} + +static inline void _execute_DBGINSN(struct pl330_thread *thrd, + u8 insn[], bool as_manager) +{ + void __iomem *regs = thrd->dmac->pinfo->base; + u32 val; + + val = (insn[0] << 16) | (insn[1] << 24); + if (!as_manager) { + val |= (1 << 0); + val |= (thrd->id << 8); /* Channel Number */ + } + writel(val, regs + DBGINST0); + + val = *((u32 *)&insn[2]); + writel(val, regs + DBGINST1); + + /* If timed out due to halted state-machine */ + if (_until_dmac_idle(thrd)) { + dev_err(thrd->dmac->pinfo->dev, "DMAC halted!\n"); + return; + } + + /* Get going */ + writel(0, regs + DBGCMD); +} + +/* + * Mark a _pl330_req as free. + * We do it by writing DMAEND as the first instruction + * because no valid request is going to have DMAEND as + * its first instruction to execute. + */ +static void mark_free(struct pl330_thread *thrd, int idx) +{ + struct _pl330_req *req = &thrd->req[idx]; + + _emit_END(0, req->mc_cpu); + req->mc_len = 0; + + thrd->req_running = -1; +} + +static inline u32 _state(struct pl330_thread *thrd) +{ + void __iomem *regs = thrd->dmac->pinfo->base; + u32 val; + + if (is_manager(thrd)) + val = readl(regs + DS) & 0xf; + else + val = readl(regs + CS(thrd->id)) & 0xf; + + switch (val) { + case DS_ST_STOP: + return PL330_STATE_STOPPED; + case DS_ST_EXEC: + return PL330_STATE_EXECUTING; + case DS_ST_CMISS: + return PL330_STATE_CACHEMISS; + case DS_ST_UPDTPC: + return PL330_STATE_UPDTPC; + case DS_ST_WFE: + return PL330_STATE_WFE; + case DS_ST_FAULT: + return PL330_STATE_FAULTING; + case DS_ST_ATBRR: + if (is_manager(thrd)) + return PL330_STATE_INVALID; + else + return PL330_STATE_ATBARRIER; + case DS_ST_QBUSY: + if (is_manager(thrd)) + return PL330_STATE_INVALID; + else + return PL330_STATE_QUEUEBUSY; + case DS_ST_WFP: + if (is_manager(thrd)) + return PL330_STATE_INVALID; + else + return PL330_STATE_WFP; + case DS_ST_KILL: + if (is_manager(thrd)) + return PL330_STATE_INVALID; + else + return PL330_STATE_KILLING; + case DS_ST_CMPLT: + if (is_manager(thrd)) + return PL330_STATE_INVALID; + else + return PL330_STATE_COMPLETING; + case DS_ST_FLTCMP: + if (is_manager(thrd)) + return PL330_STATE_INVALID; + else + return PL330_STATE_FAULT_COMPLETING; + default: + return PL330_STATE_INVALID; + } +} + +static void _stop(struct pl330_thread *thrd) +{ + void __iomem *regs = thrd->dmac->pinfo->base; + u8 insn[6] = {0, 0, 0, 0, 0, 0}; + + if (_state(thrd) == PL330_STATE_FAULT_COMPLETING) + UNTIL(thrd, PL330_STATE_FAULTING | PL330_STATE_KILLING); + + /* Return if nothing needs to be done */ + if (_state(thrd) == PL330_STATE_COMPLETING + || _state(thrd) == PL330_STATE_KILLING + || _state(thrd) == PL330_STATE_STOPPED) + return; + + _emit_KILL(0, insn); + + /* Stop generating interrupts for SEV */ + writel(readl(regs + INTEN) & ~(1 << thrd->ev), regs + INTEN); + + _execute_DBGINSN(thrd, insn, is_manager(thrd)); +} + +/* Start doing req 'idx' of thread 'thrd' */ +static bool _trigger(struct pl330_thread *thrd) +{ + void __iomem *regs = thrd->dmac->pinfo->base; + struct _pl330_req *req; + struct pl330_req *r; + struct _arg_GO go; + unsigned ns; + u8 insn[6] = {0, 0, 0, 0, 0, 0}; + int idx; + + /* Return if already ACTIVE */ + if (_state(thrd) != PL330_STATE_STOPPED) + return true; + + idx = 1 - thrd->lstenq; + if (!IS_FREE(&thrd->req[idx])) + req = &thrd->req[idx]; + else { + idx = thrd->lstenq; + if (!IS_FREE(&thrd->req[idx])) + req = &thrd->req[idx]; + else + req = NULL; + } + + /* Return if no request */ + if (!req || !req->r) + return true; + + r = req->r; + + if (r->cfg) + ns = r->cfg->nonsecure ? 1 : 0; + else if (readl(regs + CS(thrd->id)) & CS_CNS) + ns = 1; + else + ns = 0; + + /* See 'Abort Sources' point-4 at Page 2-25 */ + if (_manager_ns(thrd) && !ns) + dev_info(thrd->dmac->pinfo->dev, "%s:%d Recipe for ABORT!\n", + __func__, __LINE__); + + go.chan = thrd->id; + go.addr = req->mc_bus; + go.ns = ns; + _emit_GO(0, insn, &go); + + /* Set to generate interrupts for SEV */ + writel(readl(regs + INTEN) | (1 << thrd->ev), regs + INTEN); + + /* Only manager can execute GO */ + _execute_DBGINSN(thrd, insn, true); + + thrd->req_running = idx; + + return true; +} + +static bool _start(struct pl330_thread *thrd) +{ + switch (_state(thrd)) { + case PL330_STATE_FAULT_COMPLETING: + UNTIL(thrd, PL330_STATE_FAULTING | PL330_STATE_KILLING); + + if (_state(thrd) == PL330_STATE_KILLING) + UNTIL(thrd, PL330_STATE_STOPPED) + + case PL330_STATE_FAULTING: + _stop(thrd); + + case PL330_STATE_KILLING: + case PL330_STATE_COMPLETING: + UNTIL(thrd, PL330_STATE_STOPPED) + + case PL330_STATE_STOPPED: + return _trigger(thrd); + + case PL330_STATE_WFP: + case PL330_STATE_QUEUEBUSY: + case PL330_STATE_ATBARRIER: + case PL330_STATE_UPDTPC: + case PL330_STATE_CACHEMISS: + case PL330_STATE_EXECUTING: + return true; + + case PL330_STATE_WFE: /* For RESUME, nothing yet */ + default: + return false; + } +} + +static inline int _ldst_memtomem(unsigned dry_run, u8 buf[], + const struct _xfer_spec *pxs, int cyc) +{ + int off = 0; + + while (cyc--) { + off += _emit_LD(dry_run, &buf[off], ALWAYS); + off += _emit_RMB(dry_run, &buf[off]); + off += _emit_ST(dry_run, &buf[off], ALWAYS); + off += _emit_WMB(dry_run, &buf[off]); + } + + return off; +} + +static inline int _ldst_devtomem(unsigned dry_run, u8 buf[], + const struct _xfer_spec *pxs, int cyc) +{ + int off = 0; + + while (cyc--) { + off += _emit_WFP(dry_run, &buf[off], SINGLE, pxs->r->peri); + off += _emit_LDP(dry_run, &buf[off], SINGLE, pxs->r->peri); + off += _emit_ST(dry_run, &buf[off], ALWAYS); + off += _emit_FLUSHP(dry_run, &buf[off], pxs->r->peri); + } + + return off; +} + +static inline int _ldst_memtodev(unsigned dry_run, u8 buf[], + const struct _xfer_spec *pxs, int cyc) +{ + int off = 0; + + while (cyc--) { + off += _emit_WFP(dry_run, &buf[off], SINGLE, pxs->r->peri); + off += _emit_LD(dry_run, &buf[off], ALWAYS); + off += _emit_STP(dry_run, &buf[off], SINGLE, pxs->r->peri); + off += _emit_FLUSHP(dry_run, &buf[off], pxs->r->peri); + } + + return off; +} + +static int _bursts(unsigned dry_run, u8 buf[], + const struct _xfer_spec *pxs, int cyc) +{ + int off = 0; + + switch (pxs->r->rqtype) { + case MEMTODEV: + off += _ldst_memtodev(dry_run, &buf[off], pxs, cyc); + break; + case DEVTOMEM: + off += _ldst_devtomem(dry_run, &buf[off], pxs, cyc); + break; + case MEMTOMEM: + off += _ldst_memtomem(dry_run, &buf[off], pxs, cyc); + break; + default: + off += 0x40000000; /* Scare off the Client */ + break; + } + + return off; +} + +/* Returns bytes consumed and updates bursts */ +static inline int _loop(unsigned dry_run, u8 buf[], + unsigned long *bursts, const struct _xfer_spec *pxs) +{ + int cyc, cycmax, szlp, szlpend, szbrst, off; + unsigned lcnt0, lcnt1, ljmp0, ljmp1; + struct _arg_LPEND lpend; + + /* Max iterations possible in DMALP is 256 */ + if (*bursts >= 256*256) { + lcnt1 = 256; + lcnt0 = 256; + cyc = *bursts / lcnt1 / lcnt0; + } else if (*bursts > 256) { + lcnt1 = 256; + lcnt0 = *bursts / lcnt1; + cyc = 1; + } else { + lcnt1 = *bursts; + lcnt0 = 0; + cyc = 1; + } + + szlp = _emit_LP(1, buf, 0, 0); + szbrst = _bursts(1, buf, pxs, 1); + + lpend.cond = ALWAYS; + lpend.forever = false; + lpend.loop = 0; + lpend.bjump = 0; + szlpend = _emit_LPEND(1, buf, &lpend); + + if (lcnt0) { + szlp *= 2; + szlpend *= 2; + } + + /* + * Max bursts that we can unroll due to limit on the + * size of backward jump that can be encoded in DMALPEND + * which is 8-bits and hence 255 + */ + cycmax = (255 - (szlp + szlpend)) / szbrst; + + cyc = (cycmax < cyc) ? cycmax : cyc; + + off = 0; + + if (lcnt0) { + off += _emit_LP(dry_run, &buf[off], 0, lcnt0); + ljmp0 = off; + } + + off += _emit_LP(dry_run, &buf[off], 1, lcnt1); + ljmp1 = off; + + off += _bursts(dry_run, &buf[off], pxs, cyc); + + lpend.cond = ALWAYS; + lpend.forever = false; + lpend.loop = 1; + lpend.bjump = off - ljmp1; + off += _emit_LPEND(dry_run, &buf[off], &lpend); + + if (lcnt0) { + lpend.cond = ALWAYS; + lpend.forever = false; + lpend.loop = 0; + lpend.bjump = off - ljmp0; + off += _emit_LPEND(dry_run, &buf[off], &lpend); + } + + *bursts = lcnt1 * cyc; + if (lcnt0) + *bursts *= lcnt0; + + return off; +} + +static inline int _setup_loops(unsigned dry_run, u8 buf[], + const struct _xfer_spec *pxs) +{ + struct pl330_xfer *x = pxs->x; + u32 ccr = pxs->ccr; + unsigned long c, bursts = BYTE_TO_BURST(x->bytes, ccr); + int off = 0; + + while (bursts) { + c = bursts; + off += _loop(dry_run, &buf[off], &c, pxs); + bursts -= c; + } + + return off; +} + +static inline int _setup_xfer(unsigned dry_run, u8 buf[], + const struct _xfer_spec *pxs) +{ + struct pl330_xfer *x = pxs->x; + int off = 0; + + /* DMAMOV SAR, x->src_addr */ + off += _emit_MOV(dry_run, &buf[off], SAR, x->src_addr); + /* DMAMOV DAR, x->dst_addr */ + off += _emit_MOV(dry_run, &buf[off], DAR, x->dst_addr); + + /* Setup Loop(s) */ + off += _setup_loops(dry_run, &buf[off], pxs); + + return off; +} + +/* + * A req is a sequence of one or more xfer units. + * Returns the number of bytes taken to setup the MC for the req. + */ +static int _setup_req(unsigned dry_run, struct pl330_thread *thrd, + unsigned index, struct _xfer_spec *pxs) +{ + struct _pl330_req *req = &thrd->req[index]; + struct pl330_xfer *x; + u8 *buf = req->mc_cpu; + int off = 0; + + PL330_DBGMC_START(req->mc_bus); + + /* DMAMOV CCR, ccr */ + off += _emit_MOV(dry_run, &buf[off], CCR, pxs->ccr); + + x = pxs->r->x; + do { + /* Error if xfer length is not aligned at burst size */ + if (x->bytes % (BRST_SIZE(pxs->ccr) * BRST_LEN(pxs->ccr))) + return -EINVAL; + + pxs->x = x; + off += _setup_xfer(dry_run, &buf[off], pxs); + + x = x->next; + } while (x); + + /* DMASEV peripheral/event */ + off += _emit_SEV(dry_run, &buf[off], thrd->ev); + /* DMAEND */ + off += _emit_END(dry_run, &buf[off]); + + return off; +} + +static inline u32 _prepare_ccr(const struct pl330_reqcfg *rqc) +{ + u32 ccr = 0; + + if (rqc->src_inc) + ccr |= CC_SRCINC; + + if (rqc->dst_inc) + ccr |= CC_DSTINC; + + /* We set same protection levels for Src and DST for now */ + if (rqc->privileged) + ccr |= CC_SRCPRI | CC_DSTPRI; + if (rqc->nonsecure) + ccr |= CC_SRCNS | CC_DSTNS; + if (rqc->insnaccess) + ccr |= CC_SRCIA | CC_DSTIA; + + ccr |= (((rqc->brst_len - 1) & 0xf) << CC_SRCBRSTLEN_SHFT); + ccr |= (((rqc->brst_len - 1) & 0xf) << CC_DSTBRSTLEN_SHFT); + + ccr |= (rqc->brst_size << CC_SRCBRSTSIZE_SHFT); + ccr |= (rqc->brst_size << CC_DSTBRSTSIZE_SHFT); + + ccr |= (rqc->scctl << CC_SRCCCTRL_SHFT); + ccr |= (rqc->dcctl << CC_DSTCCTRL_SHFT); + + ccr |= (rqc->swap << CC_SWAP_SHFT); + + return ccr; +} + +static inline bool _is_valid(u32 ccr) +{ + enum pl330_dstcachectrl dcctl; + enum pl330_srccachectrl scctl; + + dcctl = (ccr >> CC_DSTCCTRL_SHFT) & CC_DRCCCTRL_MASK; + scctl = (ccr >> CC_SRCCCTRL_SHFT) & CC_SRCCCTRL_MASK; + + if (dcctl == DINVALID1 || dcctl == DINVALID2 + || scctl == SINVALID1 || scctl == SINVALID2) + return false; + else + return true; +} + +/* + * Submit a list of xfers after which the client wants notification. + * Client is not notified after each xfer unit, just once after all + * xfer units are done or some error occurs. + */ +int pl330_submit_req(void *ch_id, struct pl330_req *r) +{ + struct pl330_thread *thrd = ch_id; + struct pl330_dmac *pl330; + struct pl330_info *pi; + struct _xfer_spec xs; + unsigned long flags; + void __iomem *regs; + unsigned idx; + u32 ccr; + int ret = 0; + + /* No Req or Unacquired Channel or DMAC */ + if (!r || !thrd || thrd->free) + return -EINVAL; + + pl330 = thrd->dmac; + pi = pl330->pinfo; + regs = pi->base; + + if (pl330->state == DYING + || pl330->dmac_tbd.reset_chan & (1 << thrd->id)) { + dev_info(thrd->dmac->pinfo->dev, "%s:%d\n", + __func__, __LINE__); + return -EAGAIN; + } + + /* If request for non-existing peripheral */ + if (r->rqtype != MEMTOMEM && r->peri >= pi->pcfg.num_peri) { + dev_info(thrd->dmac->pinfo->dev, + "%s:%d Invalid peripheral(%u)!\n", + __func__, __LINE__, r->peri); + return -EINVAL; + } + + spin_lock_irqsave(&pl330->lock, flags); + + if (_queue_full(thrd)) { + ret = -EAGAIN; + goto xfer_exit; + } + + /* Prefer Secure Channel */ + if (!_manager_ns(thrd)) + r->cfg->nonsecure = 0; + else + r->cfg->nonsecure = 1; + + /* Use last settings, if not provided */ + if (r->cfg) + ccr = _prepare_ccr(r->cfg); + else + ccr = readl(regs + CC(thrd->id)); + + /* If this req doesn't have valid xfer settings */ + if (!_is_valid(ccr)) { + ret = -EINVAL; + dev_info(thrd->dmac->pinfo->dev, "%s:%d Invalid CCR(%x)!\n", + __func__, __LINE__, ccr); + goto xfer_exit; + } + + idx = IS_FREE(&thrd->req[0]) ? 0 : 1; + + xs.ccr = ccr; + xs.r = r; + + /* First dry run to check if req is acceptable */ + ret = _setup_req(1, thrd, idx, &xs); + if (ret < 0) + goto xfer_exit; + + if (ret > pi->mcbufsz / 2) { + dev_info(thrd->dmac->pinfo->dev, + "%s:%d Trying increasing mcbufsz\n", + __func__, __LINE__); + ret = -ENOMEM; + goto xfer_exit; + } + + /* Hook the request */ + thrd->lstenq = idx; + thrd->req[idx].mc_len = _setup_req(0, thrd, idx, &xs); + thrd->req[idx].r = r; + + ret = 0; + +xfer_exit: + spin_unlock_irqrestore(&pl330->lock, flags); + + return ret; +} +EXPORT_SYMBOL(pl330_submit_req); + +static void pl330_dotask(unsigned long data) +{ + struct pl330_dmac *pl330 = (struct pl330_dmac *) data; + struct pl330_info *pi = pl330->pinfo; + unsigned long flags; + int i; + + spin_lock_irqsave(&pl330->lock, flags); + + /* The DMAC itself gone nuts */ + if (pl330->dmac_tbd.reset_dmac) { + pl330->state = DYING; + /* Reset the manager too */ + pl330->dmac_tbd.reset_mngr = true; + /* Clear the reset flag */ + pl330->dmac_tbd.reset_dmac = false; + } + + if (pl330->dmac_tbd.reset_mngr) { + _stop(pl330->manager); + /* Reset all channels */ + pl330->dmac_tbd.reset_chan = (1 << pi->pcfg.num_chan) - 1; + /* Clear the reset flag */ + pl330->dmac_tbd.reset_mngr = false; + } + + for (i = 0; i < pi->pcfg.num_chan; i++) { + + if (pl330->dmac_tbd.reset_chan & (1 << i)) { + struct pl330_thread *thrd = &pl330->channels[i]; + void __iomem *regs = pi->base; + enum pl330_op_err err; + + _stop(thrd); + + if (readl(regs + FSC) & (1 << thrd->id)) + err = PL330_ERR_FAIL; + else + err = PL330_ERR_ABORT; + + spin_unlock_irqrestore(&pl330->lock, flags); + + _callback(thrd->req[1 - thrd->lstenq].r, err); + _callback(thrd->req[thrd->lstenq].r, err); + + spin_lock_irqsave(&pl330->lock, flags); + + thrd->req[0].r = NULL; + thrd->req[1].r = NULL; + mark_free(thrd, 0); + mark_free(thrd, 1); + + /* Clear the reset flag */ + pl330->dmac_tbd.reset_chan &= ~(1 << i); + } + } + + spin_unlock_irqrestore(&pl330->lock, flags); + + return; +} + +/* Returns 1 if state was updated, 0 otherwise */ +int pl330_update(const struct pl330_info *pi) +{ + struct _pl330_req *rqdone; + struct pl330_dmac *pl330; + unsigned long flags; + void __iomem *regs; + u32 val; + int id, ev, ret = 0; + + if (!pi || !pi->pl330_data) + return 0; + + regs = pi->base; + pl330 = pi->pl330_data; + + spin_lock_irqsave(&pl330->lock, flags); + + val = readl(regs + FSM) & 0x1; + if (val) + pl330->dmac_tbd.reset_mngr = true; + else + pl330->dmac_tbd.reset_mngr = false; + + val = readl(regs + FSC) & ((1 << pi->pcfg.num_chan) - 1); + pl330->dmac_tbd.reset_chan |= val; + if (val) { + int i = 0; + while (i < pi->pcfg.num_chan) { + if (val & (1 << i)) { + dev_info(pi->dev, + "Reset Channel-%d\t CS-%x FTC-%x\n", + i, readl(regs + CS(i)), + readl(regs + FTC(i))); + _stop(&pl330->channels[i]); + } + i++; + } + } + + /* Check which event happened i.e, thread notified */ + val = readl(regs + ES); + if (pi->pcfg.num_events < 32 + && val & ~((1 << pi->pcfg.num_events) - 1)) { + pl330->dmac_tbd.reset_dmac = true; + dev_err(pi->dev, "%s:%d Unexpected!\n", __func__, __LINE__); + ret = 1; + goto updt_exit; + } + + for (ev = 0; ev < pi->pcfg.num_events; ev++) { + if (val & (1 << ev)) { /* Event occurred */ + struct pl330_thread *thrd; + u32 inten = readl(regs + INTEN); + int active; + + /* Clear the event */ + if (inten & (1 << ev)) + writel(1 << ev, regs + INTCLR); + + ret = 1; + + id = pl330->events[ev]; + + thrd = &pl330->channels[id]; + + active = thrd->req_running; + if (active == -1) /* Aborted */ + continue; + + rqdone = &thrd->req[active]; + mark_free(thrd, active); + + /* Get going again ASAP */ + _start(thrd); + + /* For now, just make a list of callbacks to be done */ + list_add_tail(&rqdone->rqd, &pl330->req_done); + } + } + + /* Now that we are in no hurry, do the callbacks */ + while (!list_empty(&pl330->req_done)) { + struct pl330_req *r; + + rqdone = container_of(pl330->req_done.next, + struct _pl330_req, rqd); + + list_del_init(&rqdone->rqd); + + /* Detach the req */ + r = rqdone->r; + rqdone->r = NULL; + + spin_unlock_irqrestore(&pl330->lock, flags); + _callback(r, PL330_ERR_NONE); + spin_lock_irqsave(&pl330->lock, flags); + } + +updt_exit: + spin_unlock_irqrestore(&pl330->lock, flags); + + if (pl330->dmac_tbd.reset_dmac + || pl330->dmac_tbd.reset_mngr + || pl330->dmac_tbd.reset_chan) { + ret = 1; + tasklet_schedule(&pl330->tasks); + } + + return ret; +} +EXPORT_SYMBOL(pl330_update); + +int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op) +{ + struct pl330_thread *thrd = ch_id; + struct pl330_dmac *pl330; + unsigned long flags; + int ret = 0, active; + + if (!thrd || thrd->free || thrd->dmac->state == DYING) + return -EINVAL; + + pl330 = thrd->dmac; + active = thrd->req_running; + + spin_lock_irqsave(&pl330->lock, flags); + + switch (op) { + case PL330_OP_FLUSH: + /* Make sure the channel is stopped */ + _stop(thrd); + + thrd->req[0].r = NULL; + thrd->req[1].r = NULL; + mark_free(thrd, 0); + mark_free(thrd, 1); + break; + + case PL330_OP_ABORT: + /* Make sure the channel is stopped */ + _stop(thrd); + + /* ABORT is only for the active req */ + if (active == -1) + break; + + thrd->req[active].r = NULL; + mark_free(thrd, active); + + /* Start the next */ + case PL330_OP_START: + if ((active == -1) && !_start(thrd)) + ret = -EIO; + break; + + default: + ret = -EINVAL; + } + + spin_unlock_irqrestore(&pl330->lock, flags); + return ret; +} +EXPORT_SYMBOL(pl330_chan_ctrl); + +int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus) +{ + struct pl330_thread *thrd = ch_id; + struct pl330_dmac *pl330; + struct pl330_info *pi; + void __iomem *regs; + int active; + u32 val; + + if (!pstatus || !thrd || thrd->free) + return -EINVAL; + + pl330 = thrd->dmac; + pi = pl330->pinfo; + regs = pi->base; + + /* The client should remove the DMAC and add again */ + if (pl330->state == DYING) + pstatus->dmac_halted = true; + else + pstatus->dmac_halted = false; + + val = readl(regs + FSC); + if (val & (1 << thrd->id)) + pstatus->faulting = true; + else + pstatus->faulting = false; + + active = thrd->req_running; + + if (active == -1) { + /* Indicate that the thread is not running */ + pstatus->top_req = NULL; + pstatus->wait_req = NULL; + } else { + pstatus->top_req = thrd->req[active].r; + pstatus->wait_req = !IS_FREE(&thrd->req[1 - active]) + ? thrd->req[1 - active].r : NULL; + } + + pstatus->src_addr = readl(regs + SA(thrd->id)); + pstatus->dst_addr = readl(regs + DA(thrd->id)); + + return 0; +} +EXPORT_SYMBOL(pl330_chan_status); + +/* Reserve an event */ +static inline int _alloc_event(struct pl330_thread *thrd) +{ + struct pl330_dmac *pl330 = thrd->dmac; + struct pl330_info *pi = pl330->pinfo; + int ev; + + for (ev = 0; ev < pi->pcfg.num_events; ev++) + if (pl330->events[ev] == -1) { + pl330->events[ev] = thrd->id; + return ev; + } + + return -1; +} + +static bool _chan_ns(const struct pl330_info *pi, int i) +{ + return pi->pcfg.irq_ns & (1 << i); +} + +/* Upon success, returns IdentityToken for the + * allocated channel, NULL otherwise. + */ +void *pl330_request_channel(const struct pl330_info *pi) +{ + struct pl330_thread *thrd = NULL; + struct pl330_dmac *pl330; + unsigned long flags; + int chans, i; + + if (!pi || !pi->pl330_data) + return NULL; + + pl330 = pi->pl330_data; + + if (pl330->state == DYING) + return NULL; + + chans = pi->pcfg.num_chan; + + spin_lock_irqsave(&pl330->lock, flags); + + for (i = 0; i < chans; i++) { + thrd = &pl330->channels[i]; + if ((thrd->free) && (!_manager_ns(thrd) || + _chan_ns(pi, i))) { + thrd->ev = _alloc_event(thrd); + if (thrd->ev >= 0) { + thrd->free = false; + thrd->lstenq = 1; + thrd->req[0].r = NULL; + mark_free(thrd, 0); + thrd->req[1].r = NULL; + mark_free(thrd, 1); + break; + } + } + thrd = NULL; + } + + spin_unlock_irqrestore(&pl330->lock, flags); + + return thrd; +} +EXPORT_SYMBOL(pl330_request_channel); + +/* Release an event */ +static inline void _free_event(struct pl330_thread *thrd, int ev) +{ + struct pl330_dmac *pl330 = thrd->dmac; + struct pl330_info *pi = pl330->pinfo; + + /* If the event is valid and was held by the thread */ + if (ev >= 0 && ev < pi->pcfg.num_events + && pl330->events[ev] == thrd->id) + pl330->events[ev] = -1; +} + +void pl330_release_channel(void *ch_id) +{ + struct pl330_thread *thrd = ch_id; + struct pl330_dmac *pl330; + unsigned long flags; + + if (!thrd || thrd->free) + return; + + _stop(thrd); + + _callback(thrd->req[1 - thrd->lstenq].r, PL330_ERR_ABORT); + _callback(thrd->req[thrd->lstenq].r, PL330_ERR_ABORT); + + pl330 = thrd->dmac; + + spin_lock_irqsave(&pl330->lock, flags); + _free_event(thrd, thrd->ev); + thrd->free = true; + spin_unlock_irqrestore(&pl330->lock, flags); +} +EXPORT_SYMBOL(pl330_release_channel); + +/* Initialize the structure for PL330 configuration, that can be used + * by the client driver the make best use of the DMAC + */ +static void read_dmac_config(struct pl330_info *pi) +{ + void __iomem *regs = pi->base; + u32 val; + + val = readl(regs + CRD) >> CRD_DATA_WIDTH_SHIFT; + val &= CRD_DATA_WIDTH_MASK; + pi->pcfg.data_bus_width = 8 * (1 << val); + + val = readl(regs + CRD) >> CRD_DATA_BUFF_SHIFT; + val &= CRD_DATA_BUFF_MASK; + pi->pcfg.data_buf_dep = val + 1; + + val = readl(regs + CR0) >> CR0_NUM_CHANS_SHIFT; + val &= CR0_NUM_CHANS_MASK; + val += 1; + pi->pcfg.num_chan = val; + + val = readl(regs + CR0); + if (val & CR0_PERIPH_REQ_SET) { + val = (val >> CR0_NUM_PERIPH_SHIFT) & CR0_NUM_PERIPH_MASK; + val += 1; + pi->pcfg.num_peri = val; + pi->pcfg.peri_ns = readl(regs + CR4); + } else { + pi->pcfg.num_peri = 0; + } + + val = readl(regs + CR0); + if (val & CR0_BOOT_MAN_NS) + pi->pcfg.mode |= DMAC_MODE_NS; + else + pi->pcfg.mode &= ~DMAC_MODE_NS; + + val = readl(regs + CR0) >> CR0_NUM_EVENTS_SHIFT; + val &= CR0_NUM_EVENTS_MASK; + val += 1; + pi->pcfg.num_events = val; + + pi->pcfg.irq_ns = readl(regs + CR3); + + pi->pcfg.periph_id = get_id(pi, PERIPH_ID); + pi->pcfg.pcell_id = get_id(pi, PCELL_ID); +} + +static inline void _reset_thread(struct pl330_thread *thrd) +{ + struct pl330_dmac *pl330 = thrd->dmac; + struct pl330_info *pi = pl330->pinfo; + + thrd->req[0].mc_cpu = pl330->mcode_cpu + + (thrd->id * pi->mcbufsz); + thrd->req[0].mc_bus = pl330->mcode_bus + + (thrd->id * pi->mcbufsz); + thrd->req[0].r = NULL; + mark_free(thrd, 0); + + thrd->req[1].mc_cpu = thrd->req[0].mc_cpu + + pi->mcbufsz / 2; + thrd->req[1].mc_bus = thrd->req[0].mc_bus + + pi->mcbufsz / 2; + thrd->req[1].r = NULL; + mark_free(thrd, 1); +} + +static int dmac_alloc_threads(struct pl330_dmac *pl330) +{ + struct pl330_info *pi = pl330->pinfo; + int chans = pi->pcfg.num_chan; + struct pl330_thread *thrd; + int i; + + /* Allocate 1 Manager and 'chans' Channel threads */ + pl330->channels = kzalloc((1 + chans) * sizeof(*thrd), + GFP_KERNEL); + if (!pl330->channels) + return -ENOMEM; + + /* Init Channel threads */ + for (i = 0; i < chans; i++) { + thrd = &pl330->channels[i]; + thrd->id = i; + thrd->dmac = pl330; + _reset_thread(thrd); + thrd->free = true; + } + + /* MANAGER is indexed at the end */ + thrd = &pl330->channels[chans]; + thrd->id = chans; + thrd->dmac = pl330; + thrd->free = false; + pl330->manager = thrd; + + return 0; +} + +static int dmac_alloc_resources(struct pl330_dmac *pl330) +{ + struct pl330_info *pi = pl330->pinfo; + int chans = pi->pcfg.num_chan; + int ret; + + /* + * Alloc MicroCode buffer for 'chans' Channel threads. + * A channel's buffer offset is (Channel_Id * MCODE_BUFF_PERCHAN) + */ + pl330->mcode_cpu = dma_alloc_coherent(pi->dev, + chans * pi->mcbufsz, + &pl330->mcode_bus, GFP_KERNEL); + if (!pl330->mcode_cpu) { + dev_err(pi->dev, "%s:%d Can't allocate memory!\n", + __func__, __LINE__); + return -ENOMEM; + } + + ret = dmac_alloc_threads(pl330); + if (ret) { + dev_err(pi->dev, "%s:%d Can't to create channels for DMAC!\n", + __func__, __LINE__); + dma_free_coherent(pi->dev, + chans * pi->mcbufsz, + pl330->mcode_cpu, pl330->mcode_bus); + return ret; + } + + return 0; +} + +int pl330_add(struct pl330_info *pi) +{ + struct pl330_dmac *pl330; + void __iomem *regs; + int i, ret; + + if (!pi || !pi->dev) + return -EINVAL; + + /* If already added */ + if (pi->pl330_data) + return -EINVAL; + + /* + * If the SoC can perform reset on the DMAC, then do it + * before reading its configuration. + */ + if (pi->dmac_reset) + pi->dmac_reset(pi); + + regs = pi->base; + + /* Check if we can handle this DMAC */ + if ((get_id(pi, PERIPH_ID) & 0xfffff) != PERIPH_ID_VAL + || get_id(pi, PCELL_ID) != PCELL_ID_VAL) { + dev_err(pi->dev, "PERIPH_ID 0x%x, PCELL_ID 0x%x !\n", + get_id(pi, PERIPH_ID), get_id(pi, PCELL_ID)); + return -EINVAL; + } + + /* Read the configuration of the DMAC */ + read_dmac_config(pi); + + if (pi->pcfg.num_events == 0) { + dev_err(pi->dev, "%s:%d Can't work without events!\n", + __func__, __LINE__); + return -EINVAL; + } + + pl330 = kzalloc(sizeof(*pl330), GFP_KERNEL); + if (!pl330) { + dev_err(pi->dev, "%s:%d Can't allocate memory!\n", + __func__, __LINE__); + return -ENOMEM; + } + + /* Assign the info structure and private data */ + pl330->pinfo = pi; + pi->pl330_data = pl330; + + spin_lock_init(&pl330->lock); + + INIT_LIST_HEAD(&pl330->req_done); + + /* Use default MC buffer size if not provided */ + if (!pi->mcbufsz) + pi->mcbufsz = MCODE_BUFF_PER_REQ * 2; + + /* Mark all events as free */ + for (i = 0; i < pi->pcfg.num_events; i++) + pl330->events[i] = -1; + + /* Allocate resources needed by the DMAC */ + ret = dmac_alloc_resources(pl330); + if (ret) { + dev_err(pi->dev, "Unable to create channels for DMAC\n"); + kfree(pl330); + return ret; + } + + tasklet_init(&pl330->tasks, pl330_dotask, (unsigned long) pl330); + + pl330->state = INIT; + + return 0; +} +EXPORT_SYMBOL(pl330_add); + +static int dmac_free_threads(struct pl330_dmac *pl330) +{ + struct pl330_info *pi = pl330->pinfo; + int chans = pi->pcfg.num_chan; + struct pl330_thread *thrd; + int i; + + /* Release Channel threads */ + for (i = 0; i < chans; i++) { + thrd = &pl330->channels[i]; + pl330_release_channel((void *)thrd); + } + + /* Free memory */ + kfree(pl330->channels); + + return 0; +} + +static void dmac_free_resources(struct pl330_dmac *pl330) +{ + struct pl330_info *pi = pl330->pinfo; + int chans = pi->pcfg.num_chan; + + dmac_free_threads(pl330); + + dma_free_coherent(pi->dev, chans * pi->mcbufsz, + pl330->mcode_cpu, pl330->mcode_bus); +} + +void pl330_del(struct pl330_info *pi) +{ + struct pl330_dmac *pl330; + + if (!pi || !pi->pl330_data) + return; + + pl330 = pi->pl330_data; + + pl330->state = UNINIT; + + tasklet_kill(&pl330->tasks); + + /* Free DMAC resources */ + dmac_free_resources(pl330); + + kfree(pl330); + pi->pl330_data = NULL; +} +EXPORT_SYMBOL(pl330_del); diff --git a/trunk/arch/arm/common/via82c505.c b/trunk/arch/arm/common/via82c505.c index 1171a5010aea..67dd2affc57a 100644 --- a/trunk/arch/arm/common/via82c505.c +++ b/trunk/arch/arm/common/via82c505.c @@ -6,6 +6,7 @@ #include #include +#include #include diff --git a/trunk/arch/arm/configs/integrator_defconfig b/trunk/arch/arm/configs/integrator_defconfig index a8314c3ee84d..1103f62a1964 100644 --- a/trunk/arch/arm/configs/integrator_defconfig +++ b/trunk/arch/arm/configs/integrator_defconfig @@ -57,24 +57,18 @@ CONFIG_NETDEVICES=y CONFIG_NET_ETHERNET=y CONFIG_NET_PCI=y CONFIG_E100=y -CONFIG_SMC91X=y # CONFIG_KEYBOARD_ATKBD is not set # CONFIG_SERIO_SERPORT is not set CONFIG_SERIAL_AMBA_PL010=y CONFIG_SERIAL_AMBA_PL010_CONSOLE=y CONFIG_FB=y CONFIG_FB_MODE_HELPERS=y -CONFIG_FB_ARMCLCD=y CONFIG_FB_MATROX=y CONFIG_FB_MATROX_MILLENIUM=y CONFIG_FB_MATROX_MYSTIQUE=y -# CONFIG_VGA_CONSOLE is not set -CONFIG_MMC=y -CONFIG_MMC_ARMMMCI=y CONFIG_RTC_CLASS=y CONFIG_RTC_DRV_PL030=y CONFIG_EXT2_FS=y -CONFIG_VFAT_FS=y CONFIG_TMPFS=y CONFIG_JFFS2_FS=y CONFIG_CRAMFS=y @@ -84,7 +78,5 @@ CONFIG_ROOT_NFS=y CONFIG_NFSD=y CONFIG_NFSD_V3=y CONFIG_PARTITION_ADVANCED=y -CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_ISO8859_1=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y diff --git a/trunk/arch/arm/include/asm/assembler.h b/trunk/arch/arm/include/asm/assembler.h index 03fb93621d0d..23371b17b23e 100644 --- a/trunk/arch/arm/include/asm/assembler.h +++ b/trunk/arch/arm/include/asm/assembler.h @@ -23,8 +23,6 @@ #include #include -#define IOMEM(x) (x) - /* * Endian independent macros for shifting bytes within registers. */ diff --git a/trunk/arch/arm/include/asm/atomic.h b/trunk/arch/arm/include/asm/atomic.h index 68374ba6a943..86976d034382 100644 --- a/trunk/arch/arm/include/asm/atomic.h +++ b/trunk/arch/arm/include/asm/atomic.h @@ -13,9 +13,7 @@ #include #include -#include -#include -#include +#include #define ATOMIC_INIT(i) { (i) } diff --git a/trunk/arch/arm/include/asm/barrier.h b/trunk/arch/arm/include/asm/barrier.h deleted file mode 100644 index 44f4a09ff37b..000000000000 --- a/trunk/arch/arm/include/asm/barrier.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef __ASM_BARRIER_H -#define __ASM_BARRIER_H - -#ifndef __ASSEMBLY__ - -#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); - -#if __LINUX_ARM_ARCH__ >= 7 || \ - (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) -#define sev() __asm__ __volatile__ ("sev" : : : "memory") -#define wfe() __asm__ __volatile__ ("wfe" : : : "memory") -#define wfi() __asm__ __volatile__ ("wfi" : : : "memory") -#endif - -#if __LINUX_ARM_ARCH__ >= 7 -#define isb() __asm__ __volatile__ ("isb" : : : "memory") -#define dsb() __asm__ __volatile__ ("dsb" : : : "memory") -#define dmb() __asm__ __volatile__ ("dmb" : : : "memory") -#elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6 -#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ - : : "r" (0) : "memory") -#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ - : : "r" (0) : "memory") -#define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ - : : "r" (0) : "memory") -#elif defined(CONFIG_CPU_FA526) -#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ - : : "r" (0) : "memory") -#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ - : : "r" (0) : "memory") -#define dmb() __asm__ __volatile__ ("" : : : "memory") -#else -#define isb() __asm__ __volatile__ ("" : : : "memory") -#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ - : : "r" (0) : "memory") -#define dmb() __asm__ __volatile__ ("" : : : "memory") -#endif - -#ifdef CONFIG_ARCH_HAS_BARRIERS -#include -#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) -#include -#define mb() do { dsb(); outer_sync(); } while (0) -#define rmb() dsb() -#define wmb() mb() -#else -#include -#define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) -#define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) -#define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) -#endif - -#ifndef CONFIG_SMP -#define smp_mb() barrier() -#define smp_rmb() barrier() -#define smp_wmb() barrier() -#else -#define smp_mb() dmb() -#define smp_rmb() dmb() -#define smp_wmb() dmb() -#endif - -#define read_barrier_depends() do { } while(0) -#define smp_read_barrier_depends() do { } while(0) - -#define set_mb(var, value) do { var = value; smp_mb(); } while (0) - -#endif /* !__ASSEMBLY__ */ -#endif /* __ASM_BARRIER_H */ diff --git a/trunk/arch/arm/include/asm/bitops.h b/trunk/arch/arm/include/asm/bitops.h index e691ec91e4d3..f7419ef9c8f9 100644 --- a/trunk/arch/arm/include/asm/bitops.h +++ b/trunk/arch/arm/include/asm/bitops.h @@ -24,7 +24,7 @@ #endif #include -#include +#include #define smp_mb__before_clear_bit() smp_mb() #define smp_mb__after_clear_bit() smp_mb() diff --git a/trunk/arch/arm/include/asm/bug.h b/trunk/arch/arm/include/asm/bug.h index 7af5c6c3653a..fac79dceb736 100644 --- a/trunk/arch/arm/include/asm/bug.h +++ b/trunk/arch/arm/include/asm/bug.h @@ -1,7 +1,6 @@ #ifndef _ASMARM_BUG_H #define _ASMARM_BUG_H -#include #ifdef CONFIG_BUG @@ -58,33 +57,4 @@ do { \ #include -struct pt_regs; -void die(const char *msg, struct pt_regs *regs, int err); - -struct siginfo; -void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, - unsigned long err, unsigned long trap); - -#ifdef CONFIG_ARM_LPAE -#define FAULT_CODE_ALIGNMENT 33 -#define FAULT_CODE_DEBUG 34 -#else -#define FAULT_CODE_ALIGNMENT 1 -#define FAULT_CODE_DEBUG 2 -#endif - -void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, - struct pt_regs *), - int sig, int code, const char *name); - -void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, - struct pt_regs *), - int sig, int code, const char *name); - -extern asmlinkage void c_backtrace(unsigned long fp, int pmode); - -struct mm_struct; -extern void show_pte(struct mm_struct *mm, unsigned long addr); -extern void __show_regs(struct pt_regs *); - #endif diff --git a/trunk/arch/arm/include/asm/cmpxchg.h b/trunk/arch/arm/include/asm/cmpxchg.h deleted file mode 100644 index d41d7cbf0ada..000000000000 --- a/trunk/arch/arm/include/asm/cmpxchg.h +++ /dev/null @@ -1,295 +0,0 @@ -#ifndef __ASM_ARM_CMPXCHG_H -#define __ASM_ARM_CMPXCHG_H - -#include -#include - -#if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) -/* - * On the StrongARM, "swp" is terminally broken since it bypasses the - * cache totally. This means that the cache becomes inconsistent, and, - * since we use normal loads/stores as well, this is really bad. - * Typically, this causes oopsen in filp_close, but could have other, - * more disastrous effects. There are two work-arounds: - * 1. Disable interrupts and emulate the atomic swap - * 2. Clean the cache, perform atomic swap, flush the cache - * - * We choose (1) since its the "easiest" to achieve here and is not - * dependent on the processor type. - * - * NOTE that this solution won't work on an SMP system, so explcitly - * forbid it here. - */ -#define swp_is_buggy -#endif - -static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) -{ - extern void __bad_xchg(volatile void *, int); - unsigned long ret; -#ifdef swp_is_buggy - unsigned long flags; -#endif -#if __LINUX_ARM_ARCH__ >= 6 - unsigned int tmp; -#endif - - smp_mb(); - - switch (size) { -#if __LINUX_ARM_ARCH__ >= 6 - case 1: - asm volatile("@ __xchg1\n" - "1: ldrexb %0, [%3]\n" - " strexb %1, %2, [%3]\n" - " teq %1, #0\n" - " bne 1b" - : "=&r" (ret), "=&r" (tmp) - : "r" (x), "r" (ptr) - : "memory", "cc"); - break; - case 4: - asm volatile("@ __xchg4\n" - "1: ldrex %0, [%3]\n" - " strex %1, %2, [%3]\n" - " teq %1, #0\n" - " bne 1b" - : "=&r" (ret), "=&r" (tmp) - : "r" (x), "r" (ptr) - : "memory", "cc"); - break; -#elif defined(swp_is_buggy) -#ifdef CONFIG_SMP -#error SMP is not supported on this platform -#endif - case 1: - raw_local_irq_save(flags); - ret = *(volatile unsigned char *)ptr; - *(volatile unsigned char *)ptr = x; - raw_local_irq_restore(flags); - break; - - case 4: - raw_local_irq_save(flags); - ret = *(volatile unsigned long *)ptr; - *(volatile unsigned long *)ptr = x; - raw_local_irq_restore(flags); - break; -#else - case 1: - asm volatile("@ __xchg1\n" - " swpb %0, %1, [%2]" - : "=&r" (ret) - : "r" (x), "r" (ptr) - : "memory", "cc"); - break; - case 4: - asm volatile("@ __xchg4\n" - " swp %0, %1, [%2]" - : "=&r" (ret) - : "r" (x), "r" (ptr) - : "memory", "cc"); - break; -#endif - default: - __bad_xchg(ptr, size), ret = 0; - break; - } - smp_mb(); - - return ret; -} - -#define xchg(ptr,x) \ - ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) - -#include - -#if __LINUX_ARM_ARCH__ < 6 -/* min ARCH < ARMv6 */ - -#ifdef CONFIG_SMP -#error "SMP is not supported on this platform" -#endif - -/* - * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make - * them available. - */ -#define cmpxchg_local(ptr, o, n) \ - ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ - (unsigned long)(n), sizeof(*(ptr)))) -#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) - -#ifndef CONFIG_SMP -#include -#endif - -#else /* min ARCH >= ARMv6 */ - -extern void __bad_cmpxchg(volatile void *ptr, int size); - -/* - * cmpxchg only support 32-bits operands on ARMv6. - */ - -static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, - unsigned long new, int size) -{ - unsigned long oldval, res; - - switch (size) { -#ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ - case 1: - do { - asm volatile("@ __cmpxchg1\n" - " ldrexb %1, [%2]\n" - " mov %0, #0\n" - " teq %1, %3\n" - " strexbeq %0, %4, [%2]\n" - : "=&r" (res), "=&r" (oldval) - : "r" (ptr), "Ir" (old), "r" (new) - : "memory", "cc"); - } while (res); - break; - case 2: - do { - asm volatile("@ __cmpxchg1\n" - " ldrexh %1, [%2]\n" - " mov %0, #0\n" - " teq %1, %3\n" - " strexheq %0, %4, [%2]\n" - : "=&r" (res), "=&r" (oldval) - : "r" (ptr), "Ir" (old), "r" (new) - : "memory", "cc"); - } while (res); - break; -#endif - case 4: - do { - asm volatile("@ __cmpxchg4\n" - " ldrex %1, [%2]\n" - " mov %0, #0\n" - " teq %1, %3\n" - " strexeq %0, %4, [%2]\n" - : "=&r" (res), "=&r" (oldval) - : "r" (ptr), "Ir" (old), "r" (new) - : "memory", "cc"); - } while (res); - break; - default: - __bad_cmpxchg(ptr, size); - oldval = 0; - } - - return oldval; -} - -static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, - unsigned long new, int size) -{ - unsigned long ret; - - smp_mb(); - ret = __cmpxchg(ptr, old, new, size); - smp_mb(); - - return ret; -} - -#define cmpxchg(ptr,o,n) \ - ((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \ - (unsigned long)(o), \ - (unsigned long)(n), \ - sizeof(*(ptr)))) - -static inline unsigned long __cmpxchg_local(volatile void *ptr, - unsigned long old, - unsigned long new, int size) -{ - unsigned long ret; - - switch (size) { -#ifdef CONFIG_CPU_V6 /* min ARCH == ARMv6 */ - case 1: - case 2: - ret = __cmpxchg_local_generic(ptr, old, new, size); - break; -#endif - default: - ret = __cmpxchg(ptr, old, new, size); - } - - return ret; -} - -#define cmpxchg_local(ptr,o,n) \ - ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \ - (unsigned long)(o), \ - (unsigned long)(n), \ - sizeof(*(ptr)))) - -#ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ - -/* - * Note : ARMv7-M (currently unsupported by Linux) does not support - * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should - * not be allowed to use __cmpxchg64. - */ -static inline unsigned long long __cmpxchg64(volatile void *ptr, - unsigned long long old, - unsigned long long new) -{ - register unsigned long long oldval asm("r0"); - register unsigned long long __old asm("r2") = old; - register unsigned long long __new asm("r4") = new; - unsigned long res; - - do { - asm volatile( - " @ __cmpxchg8\n" - " ldrexd %1, %H1, [%2]\n" - " mov %0, #0\n" - " teq %1, %3\n" - " teqeq %H1, %H3\n" - " strexdeq %0, %4, %H4, [%2]\n" - : "=&r" (res), "=&r" (oldval) - : "r" (ptr), "Ir" (__old), "r" (__new) - : "memory", "cc"); - } while (res); - - return oldval; -} - -static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, - unsigned long long old, - unsigned long long new) -{ - unsigned long long ret; - - smp_mb(); - ret = __cmpxchg64(ptr, old, new); - smp_mb(); - - return ret; -} - -#define cmpxchg64(ptr,o,n) \ - ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ - (unsigned long long)(o), \ - (unsigned long long)(n))) - -#define cmpxchg64_local(ptr,o,n) \ - ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ - (unsigned long long)(o), \ - (unsigned long long)(n))) - -#else /* min ARCH = ARMv6 */ - -#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) - -#endif - -#endif /* __LINUX_ARM_ARCH__ >= 6 */ - -#endif /* __ASM_ARM_CMPXCHG_H */ diff --git a/trunk/arch/arm/include/asm/compiler.h b/trunk/arch/arm/include/asm/compiler.h deleted file mode 100644 index 8155db2f7fa1..000000000000 --- a/trunk/arch/arm/include/asm/compiler.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef __ASM_ARM_COMPILER_H -#define __ASM_ARM_COMPILER_H - -/* - * This is used to ensure the compiler did actually allocate the register we - * asked it for some inline assembly sequences. Apparently we can't trust - * the compiler from one version to another so a bit of paranoia won't hurt. - * This string is meant to be concatenated with the inline asm string and - * will cause compilation to stop on mismatch. - * (for details, see gcc PR 15089) - */ -#define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t" - - -#endif /* __ASM_ARM_COMPILER_H */ diff --git a/trunk/arch/arm/include/asm/cp15.h b/trunk/arch/arm/include/asm/cp15.h deleted file mode 100644 index 5ef4d8015a60..000000000000 --- a/trunk/arch/arm/include/asm/cp15.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef __ASM_ARM_CP15_H -#define __ASM_ARM_CP15_H - -#include - -/* - * CR1 bits (CP#15 CR1) - */ -#define CR_M (1 << 0) /* MMU enable */ -#define CR_A (1 << 1) /* Alignment abort enable */ -#define CR_C (1 << 2) /* Dcache enable */ -#define CR_W (1 << 3) /* Write buffer enable */ -#define CR_P (1 << 4) /* 32-bit exception handler */ -#define CR_D (1 << 5) /* 32-bit data address range */ -#define CR_L (1 << 6) /* Implementation defined */ -#define CR_B (1 << 7) /* Big endian */ -#define CR_S (1 << 8) /* System MMU protection */ -#define CR_R (1 << 9) /* ROM MMU protection */ -#define CR_F (1 << 10) /* Implementation defined */ -#define CR_Z (1 << 11) /* Implementation defined */ -#define CR_I (1 << 12) /* Icache enable */ -#define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */ -#define CR_RR (1 << 14) /* Round Robin cache replacement */ -#define CR_L4 (1 << 15) /* LDR pc can set T bit */ -#define CR_DT (1 << 16) -#define CR_IT (1 << 18) -#define CR_ST (1 << 19) -#define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */ -#define CR_U (1 << 22) /* Unaligned access operation */ -#define CR_XP (1 << 23) /* Extended page tables */ -#define CR_VE (1 << 24) /* Vectored interrupts */ -#define CR_EE (1 << 25) /* Exception (Big) Endian */ -#define CR_TRE (1 << 28) /* TEX remap enable */ -#define CR_AFE (1 << 29) /* Access flag enable */ -#define CR_TE (1 << 30) /* Thumb exception enable */ - -#ifndef __ASSEMBLY__ - -#if __LINUX_ARM_ARCH__ >= 4 -#define vectors_high() (cr_alignment & CR_V) -#else -#define vectors_high() (0) -#endif - -extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ -extern unsigned long cr_alignment; /* defined in entry-armv.S */ - -static inline unsigned int get_cr(void) -{ - unsigned int val; - asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); - return val; -} - -static inline void set_cr(unsigned int val) -{ - asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" - : : "r" (val) : "cc"); - isb(); -} - -#ifndef CONFIG_SMP -extern void adjust_cr(unsigned long mask, unsigned long set); -#endif - -#define CPACC_FULL(n) (3 << (n * 2)) -#define CPACC_SVC(n) (1 << (n * 2)) -#define CPACC_DISABLE(n) (0 << (n * 2)) - -static inline unsigned int get_copro_access(void) -{ - unsigned int val; - asm("mrc p15, 0, %0, c1, c0, 2 @ get copro access" - : "=r" (val) : : "cc"); - return val; -} - -static inline void set_copro_access(unsigned int val) -{ - asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" - : : "r" (val) : "cc"); - isb(); -} - -#endif - -#endif diff --git a/trunk/arch/arm/include/asm/div64.h b/trunk/arch/arm/include/asm/div64.h index fe92ccf1d0b0..d3f0a9eee9f6 100644 --- a/trunk/arch/arm/include/asm/div64.h +++ b/trunk/arch/arm/include/asm/div64.h @@ -1,8 +1,8 @@ #ifndef __ASM_ARM_DIV64 #define __ASM_ARM_DIV64 +#include #include -#include /* * The semantics of do_div() are: diff --git a/trunk/arch/arm/include/asm/dma.h b/trunk/arch/arm/include/asm/dma.h index 5694a0d6576b..69a5b0b6455c 100644 --- a/trunk/arch/arm/include/asm/dma.h +++ b/trunk/arch/arm/include/asm/dma.h @@ -19,6 +19,7 @@ * It should not be re-used except for that purpose. */ #include +#include #include #include diff --git a/trunk/arch/arm/include/asm/domain.h b/trunk/arch/arm/include/asm/domain.h index 3d2220498abc..b5dc173d336f 100644 --- a/trunk/arch/arm/include/asm/domain.h +++ b/trunk/arch/arm/include/asm/domain.h @@ -10,10 +10,6 @@ #ifndef __ASM_PROC_DOMAIN_H #define __ASM_PROC_DOMAIN_H -#ifndef __ASSEMBLY__ -#include -#endif - /* * Domain numbers * diff --git a/trunk/arch/arm/include/asm/elf.h b/trunk/arch/arm/include/asm/elf.h index 38050b1c4800..0e9ce8d9686e 100644 --- a/trunk/arch/arm/include/asm/elf.h +++ b/trunk/arch/arm/include/asm/elf.h @@ -130,4 +130,8 @@ struct mm_struct; extern unsigned long arch_randomize_brk(struct mm_struct *mm); #define arch_randomize_brk arch_randomize_brk +extern int vectors_user_mapping(void); +#define arch_setup_additional_pages(bprm, uses_interp) vectors_user_mapping() +#define ARCH_HAS_SETUP_ADDITIONAL_PAGES + #endif diff --git a/trunk/arch/arm/include/asm/exec.h b/trunk/arch/arm/include/asm/exec.h deleted file mode 100644 index 7c4fbef72b3a..000000000000 --- a/trunk/arch/arm/include/asm/exec.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef __ASM_ARM_EXEC_H -#define __ASM_ARM_EXEC_H - -#define arch_align_stack(x) (x) - -#endif /* __ASM_ARM_EXEC_H */ diff --git a/trunk/arch/arm/include/asm/hardware/cache-l2x0.h b/trunk/arch/arm/include/asm/hardware/cache-l2x0.h index c4c87bc12231..7df239bcdf27 100644 --- a/trunk/arch/arm/include/asm/hardware/cache-l2x0.h +++ b/trunk/arch/arm/include/asm/hardware/cache-l2x0.h @@ -103,11 +103,11 @@ #define L2X0_ADDR_FILTER_EN 1 #ifndef __ASSEMBLY__ -extern void __init l2x0_init(void __iomem *base, u32 aux_val, u32 aux_mask); +extern void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask); #if defined(CONFIG_CACHE_L2X0) && defined(CONFIG_OF) -extern int l2x0_of_init(u32 aux_val, u32 aux_mask); +extern int l2x0_of_init(__u32 aux_val, __u32 aux_mask); #else -static inline int l2x0_of_init(u32 aux_val, u32 aux_mask) +static inline int l2x0_of_init(__u32 aux_val, __u32 aux_mask) { return -ENODEV; } diff --git a/trunk/arch/arm/include/asm/hardware/iop3xx.h b/trunk/arch/arm/include/asm/hardware/iop3xx.h index 2ff2c75a4639..077c32326c63 100644 --- a/trunk/arch/arm/include/asm/hardware/iop3xx.h +++ b/trunk/arch/arm/include/asm/hardware/iop3xx.h @@ -231,9 +231,6 @@ extern int iop3xx_get_init_atu(void); #ifndef __ASSEMBLY__ - -#include - void iop3xx_map_io(void); void iop_init_cp6_handler(void); void iop_init_time(unsigned long tickrate); diff --git a/trunk/arch/arm/include/asm/hardware/iop_adma.h b/trunk/arch/arm/include/asm/hardware/iop_adma.h index 122f86d8c991..59b8c3892f76 100644 --- a/trunk/arch/arm/include/asm/hardware/iop_adma.h +++ b/trunk/arch/arm/include/asm/hardware/iop_adma.h @@ -49,6 +49,7 @@ struct iop_adma_device { /** * struct iop_adma_chan - internal representation of an ADMA device * @pending: allows batching of hardware operations + * @completed_cookie: identifier for the most recently completed operation * @lock: serializes enqueue/dequeue operations to the slot pool * @mmr_base: memory mapped register base * @chain: device chain view of the descriptors @@ -61,6 +62,7 @@ struct iop_adma_device { */ struct iop_adma_chan { int pending; + dma_cookie_t completed_cookie; spinlock_t lock; /* protects the descriptor slot pool */ void __iomem *mmr_base; struct list_head chain; diff --git a/trunk/arch/arm/include/asm/hardware/it8152.h b/trunk/arch/arm/include/asm/hardware/it8152.h index 73f84fa4f366..43cab498bc27 100644 --- a/trunk/arch/arm/include/asm/hardware/it8152.h +++ b/trunk/arch/arm/include/asm/hardware/it8152.h @@ -9,9 +9,6 @@ #ifndef __ASM_HARDWARE_IT8152_H #define __ASM_HARDWARE_IT8152_H - -#include - extern void __iomem *it8152_base_address; #define IT8152_IO_BASE (it8152_base_address + 0x03e00000) diff --git a/trunk/arch/arm/include/asm/hardware/pl330.h b/trunk/arch/arm/include/asm/hardware/pl330.h new file mode 100644 index 000000000000..c1821385abfa --- /dev/null +++ b/trunk/arch/arm/include/asm/hardware/pl330.h @@ -0,0 +1,217 @@ +/* linux/include/asm/hardware/pl330.h + * + * Copyright (C) 2010 Samsung Electronics Co. Ltd. + * Jaswinder Singh + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef __PL330_CORE_H +#define __PL330_CORE_H + +#define PL330_MAX_CHAN 8 +#define PL330_MAX_IRQS 32 +#define PL330_MAX_PERI 32 + +enum pl330_srccachectrl { + SCCTRL0 = 0, /* Noncacheable and nonbufferable */ + SCCTRL1, /* Bufferable only */ + SCCTRL2, /* Cacheable, but do not allocate */ + SCCTRL3, /* Cacheable and bufferable, but do not allocate */ + SINVALID1, + SINVALID2, + SCCTRL6, /* Cacheable write-through, allocate on reads only */ + SCCTRL7, /* Cacheable write-back, allocate on reads only */ +}; + +enum pl330_dstcachectrl { + DCCTRL0 = 0, /* Noncacheable and nonbufferable */ + DCCTRL1, /* Bufferable only */ + DCCTRL2, /* Cacheable, but do not allocate */ + DCCTRL3, /* Cacheable and bufferable, but do not allocate */ + DINVALID1, /* AWCACHE = 0x1000 */ + DINVALID2, + DCCTRL6, /* Cacheable write-through, allocate on writes only */ + DCCTRL7, /* Cacheable write-back, allocate on writes only */ +}; + +/* Populated by the PL330 core driver for DMA API driver's info */ +struct pl330_config { + u32 periph_id; + u32 pcell_id; +#define DMAC_MODE_NS (1 << 0) + unsigned int mode; + unsigned int data_bus_width:10; /* In number of bits */ + unsigned int data_buf_dep:10; + unsigned int num_chan:4; + unsigned int num_peri:6; + u32 peri_ns; + unsigned int num_events:6; + u32 irq_ns; +}; + +/* Handle to the DMAC provided to the PL330 core */ +struct pl330_info { + /* Owning device */ + struct device *dev; + /* Size of MicroCode buffers for each channel. */ + unsigned mcbufsz; + /* ioremap'ed address of PL330 registers. */ + void __iomem *base; + /* Client can freely use it. */ + void *client_data; + /* PL330 core data, Client must not touch it. */ + void *pl330_data; + /* Populated by the PL330 core driver during pl330_add */ + struct pl330_config pcfg; + /* + * If the DMAC has some reset mechanism, then the + * client may want to provide pointer to the method. + */ + void (*dmac_reset)(struct pl330_info *pi); +}; + +enum pl330_byteswap { + SWAP_NO = 0, + SWAP_2, + SWAP_4, + SWAP_8, + SWAP_16, +}; + +/** + * Request Configuration. + * The PL330 core does not modify this and uses the last + * working configuration if the request doesn't provide any. + * + * The Client may want to provide this info only for the + * first request and a request with new settings. + */ +struct pl330_reqcfg { + /* Address Incrementing */ + unsigned dst_inc:1; + unsigned src_inc:1; + + /* + * For now, the SRC & DST protection levels + * and burst size/length are assumed same. + */ + bool nonsecure; + bool privileged; + bool insnaccess; + unsigned brst_len:5; + unsigned brst_size:3; /* in power of 2 */ + + enum pl330_dstcachectrl dcctl; + enum pl330_srccachectrl scctl; + enum pl330_byteswap swap; +}; + +/* + * One cycle of DMAC operation. + * There may be more than one xfer in a request. + */ +struct pl330_xfer { + u32 src_addr; + u32 dst_addr; + /* Size to xfer */ + u32 bytes; + /* + * Pointer to next xfer in the list. + * The last xfer in the req must point to NULL. + */ + struct pl330_xfer *next; +}; + +/* The xfer callbacks are made with one of these arguments. */ +enum pl330_op_err { + /* The all xfers in the request were success. */ + PL330_ERR_NONE, + /* If req aborted due to global error. */ + PL330_ERR_ABORT, + /* If req failed due to problem with Channel. */ + PL330_ERR_FAIL, +}; + +enum pl330_reqtype { + MEMTOMEM, + MEMTODEV, + DEVTOMEM, + DEVTODEV, +}; + +/* A request defining Scatter-Gather List ending with NULL xfer. */ +struct pl330_req { + enum pl330_reqtype rqtype; + /* Index of peripheral for the xfer. */ + unsigned peri:5; + /* Unique token for this xfer, set by the client. */ + void *token; + /* Callback to be called after xfer. */ + void (*xfer_cb)(void *token, enum pl330_op_err err); + /* If NULL, req will be done at last set parameters. */ + struct pl330_reqcfg *cfg; + /* Pointer to first xfer in the request. */ + struct pl330_xfer *x; +}; + +/* + * To know the status of the channel and DMAC, the client + * provides a pointer to this structure. The PL330 core + * fills it with current information. + */ +struct pl330_chanstatus { + /* + * If the DMAC engine halted due to some error, + * the client should remove-add DMAC. + */ + bool dmac_halted; + /* + * If channel is halted due to some error, + * the client should ABORT/FLUSH and START the channel. + */ + bool faulting; + /* Location of last load */ + u32 src_addr; + /* Location of last store */ + u32 dst_addr; + /* + * Pointer to the currently active req, NULL if channel is + * inactive, even though the requests may be present. + */ + struct pl330_req *top_req; + /* Pointer to req waiting second in the queue if any. */ + struct pl330_req *wait_req; +}; + +enum pl330_chan_op { + /* Start the channel */ + PL330_OP_START, + /* Abort the active xfer */ + PL330_OP_ABORT, + /* Stop xfer and flush queue */ + PL330_OP_FLUSH, +}; + +extern int pl330_add(struct pl330_info *); +extern void pl330_del(struct pl330_info *pi); +extern int pl330_update(const struct pl330_info *pi); +extern void pl330_release_channel(void *ch_id); +extern void *pl330_request_channel(const struct pl330_info *pi); +extern int pl330_chan_status(void *ch_id, struct pl330_chanstatus *pstatus); +extern int pl330_chan_ctrl(void *ch_id, enum pl330_chan_op op); +extern int pl330_submit_req(void *ch_id, struct pl330_req *r); + +#endif /* __PL330_CORE_H */ diff --git a/trunk/arch/arm/include/asm/io.h b/trunk/arch/arm/include/asm/io.h index df0ac0bb39aa..9275828feb3d 100644 --- a/trunk/arch/arm/include/asm/io.h +++ b/trunk/arch/arm/include/asm/io.h @@ -26,6 +26,7 @@ #include #include #include +#include #include /* @@ -82,11 +83,6 @@ extern void __iomem *__arm_ioremap_pfn(unsigned long, unsigned long, size_t, uns extern void __iomem *__arm_ioremap(unsigned long, size_t, unsigned int); extern void __iomem *__arm_ioremap_exec(unsigned long, size_t, bool cached); extern void __iounmap(volatile void __iomem *addr); -extern void __arm_iounmap(volatile void __iomem *addr); - -extern void __iomem * (*arch_ioremap_caller)(unsigned long, size_t, - unsigned int, void *); -extern void (*arch_iounmap)(volatile void __iomem *); /* * Bad read/write accesses... @@ -101,11 +97,8 @@ static inline void __iomem *__typesafe_io(unsigned long addr) return (void __iomem *)addr; } -#define IOMEM(x) ((void __force __iomem *)(x)) - /* IO barriers */ #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE -#include #define __iormb() rmb() #define __iowmb() wmb() #else @@ -116,11 +109,7 @@ static inline void __iomem *__typesafe_io(unsigned long addr) /* * Now, pick up the machine-defined IO definitions */ -#ifdef CONFIG_NEED_MACH_IO_H #include -#else -#define __io(a) ({ (void)(a); __typesafe_io(0); }) -#endif /* * This is the limit of PC card/PCI/ISA IO space, which is by default @@ -222,18 +211,18 @@ extern void _memset_io(volatile void __iomem *, int, size_t); * Again, this are defined to perform little endian accesses. See the * IO port primitives for more information. */ -#ifndef readl -#define readb_relaxed(c) ({ u8 __r = __raw_readb(c); __r; }) +#ifdef __mem_pci +#define readb_relaxed(c) ({ u8 __r = __raw_readb(__mem_pci(c)); __r; }) #define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \ - __raw_readw(c)); __r; }) + __raw_readw(__mem_pci(c))); __r; }) #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \ - __raw_readl(c)); __r; }) + __raw_readl(__mem_pci(c))); __r; }) -#define writeb_relaxed(v,c) ((void)__raw_writeb(v,c)) +#define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c))) #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ - cpu_to_le16(v),c)) + cpu_to_le16(v),__mem_pci(c))) #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \ - cpu_to_le32(v),c)) + cpu_to_le32(v),__mem_pci(c))) #define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; }) #define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; }) @@ -243,19 +232,30 @@ extern void _memset_io(volatile void __iomem *, int, size_t); #define writew(v,c) ({ __iowmb(); writew_relaxed(v,c); }) #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); }) -#define readsb(p,d,l) __raw_readsb(p,d,l) -#define readsw(p,d,l) __raw_readsw(p,d,l) -#define readsl(p,d,l) __raw_readsl(p,d,l) +#define readsb(p,d,l) __raw_readsb(__mem_pci(p),d,l) +#define readsw(p,d,l) __raw_readsw(__mem_pci(p),d,l) +#define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l) + +#define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l) +#define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l) +#define writesl(p,d,l) __raw_writesl(__mem_pci(p),d,l) -#define writesb(p,d,l) __raw_writesb(p,d,l) -#define writesw(p,d,l) __raw_writesw(p,d,l) -#define writesl(p,d,l) __raw_writesl(p,d,l) +#define memset_io(c,v,l) _memset_io(__mem_pci(c),(v),(l)) +#define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) +#define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) -#define memset_io(c,v,l) _memset_io(c,(v),(l)) -#define memcpy_fromio(a,c,l) _memcpy_fromio((a),c,(l)) -#define memcpy_toio(c,a,l) _memcpy_toio(c,(a),(l)) +#elif !defined(readb) -#endif /* readl */ +#define readb(c) (__readwrite_bug("readb"),0) +#define readw(c) (__readwrite_bug("readw"),0) +#define readl(c) (__readwrite_bug("readl"),0) +#define writeb(v,c) __readwrite_bug("writeb") +#define writew(v,c) __readwrite_bug("writew") +#define writel(v,c) __readwrite_bug("writel") + +#define check_signature(io,sig,len) (0) + +#endif /* __mem_pci */ /* * ioremap and friends. @@ -264,11 +264,16 @@ extern void _memset_io(volatile void __iomem *, int, size_t); * Documentation/io-mapping.txt. * */ -#define ioremap(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) -#define ioremap_nocache(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE) -#define ioremap_cached(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_CACHED) -#define ioremap_wc(cookie,size) __arm_ioremap((cookie), (size), MT_DEVICE_WC) -#define iounmap __arm_iounmap +#ifndef __arch_ioremap +#define __arch_ioremap __arm_ioremap +#define __arch_iounmap __iounmap +#endif + +#define ioremap(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) +#define ioremap_nocache(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE) +#define ioremap_cached(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_CACHED) +#define ioremap_wc(cookie,size) __arch_ioremap((cookie), (size), MT_DEVICE_WC) +#define iounmap __arch_iounmap /* * io{read,write}{8,16,32} macros diff --git a/trunk/arch/arm/include/asm/irq.h b/trunk/arch/arm/include/asm/irq.h index 35c21c375d81..5a526afb5f18 100644 --- a/trunk/arch/arm/include/asm/irq.h +++ b/trunk/arch/arm/include/asm/irq.h @@ -1,18 +1,14 @@ #ifndef __ASM_ARM_IRQ_H #define __ASM_ARM_IRQ_H -#define NR_IRQS_LEGACY 16 - -#ifndef CONFIG_SPARSE_IRQ #include -#else -#define NR_IRQS NR_IRQS_LEGACY -#endif #ifndef irq_canonicalize #define irq_canonicalize(i) (i) #endif +#define NR_IRQS_LEGACY 16 + /* * Use this value to indicate lack of interrupt * capability diff --git a/trunk/arch/arm/include/asm/jump_label.h b/trunk/arch/arm/include/asm/jump_label.h deleted file mode 100644 index 5c5ca2ea62b0..000000000000 --- a/trunk/arch/arm/include/asm/jump_label.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _ASM_ARM_JUMP_LABEL_H -#define _ASM_ARM_JUMP_LABEL_H - -#ifdef __KERNEL__ - -#include -#include - -#define JUMP_LABEL_NOP_SIZE 4 - -#ifdef CONFIG_THUMB2_KERNEL -#define JUMP_LABEL_NOP "nop.w" -#else -#define JUMP_LABEL_NOP "nop" -#endif - -static __always_inline bool arch_static_branch(struct jump_label_key *key) -{ - asm goto("1:\n\t" - JUMP_LABEL_NOP "\n\t" - ".pushsection __jump_table, \"aw\"\n\t" - ".word 1b, %l[l_yes], %c0\n\t" - ".popsection\n\t" - : : "i" (key) : : l_yes); - - return false; -l_yes: - return true; -} - -#endif /* __KERNEL__ */ - -typedef u32 jump_label_t; - -struct jump_entry { - jump_label_t code; - jump_label_t target; - jump_label_t key; -}; - -#endif diff --git a/trunk/arch/arm/include/asm/mc146818rtc.h b/trunk/arch/arm/include/asm/mc146818rtc.h index e8567bb99dfc..6b884d2b0b69 100644 --- a/trunk/arch/arm/include/asm/mc146818rtc.h +++ b/trunk/arch/arm/include/asm/mc146818rtc.h @@ -5,9 +5,7 @@ #define _ASM_MC146818RTC_H #include -#include - -#define RTC_IRQ BUILD_BUG_ON(1) +#include #ifndef RTC_PORT #define RTC_PORT(x) (0x70 + (x)) diff --git a/trunk/arch/arm/include/asm/memory.h b/trunk/arch/arm/include/asm/memory.h index fcb575747e5e..a8997d71084e 100644 --- a/trunk/arch/arm/include/asm/memory.h +++ b/trunk/arch/arm/include/asm/memory.h @@ -116,8 +116,6 @@ #define MODULES_END (END_MEM) #define MODULES_VADDR (PHYS_OFFSET) -#define XIP_VIRT_ADDR(physaddr) (physaddr) - #endif /* !CONFIG_MMU */ /* diff --git a/trunk/arch/arm/include/asm/mmu.h b/trunk/arch/arm/include/asm/mmu.h index b8e580a297e4..14965658a923 100644 --- a/trunk/arch/arm/include/asm/mmu.h +++ b/trunk/arch/arm/include/asm/mmu.h @@ -34,11 +34,4 @@ typedef struct { #endif -/* - * switch_mm() may do a full cache flush over the context switch, - * so enable interrupts over the context switch to avoid high - * latency. - */ -#define __ARCH_WANT_INTERRUPTS_ON_CTXSW - #endif diff --git a/trunk/arch/arm/include/asm/mmu_context.h b/trunk/arch/arm/include/asm/mmu_context.h index a0b3cac0547c..71605d9f8e42 100644 --- a/trunk/arch/arm/include/asm/mmu_context.h +++ b/trunk/arch/arm/include/asm/mmu_context.h @@ -18,7 +18,6 @@ #include #include #include -#include void __check_kvm_seq(struct mm_struct *mm); @@ -134,4 +133,32 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, #define deactivate_mm(tsk,mm) do { } while (0) #define activate_mm(prev,next) switch_mm(prev, next, NULL) +/* + * We are inserting a "fake" vma for the user-accessible vector page so + * gdb and friends can get to it through ptrace and /proc//mem. + * But we also want to remove it before the generic code gets to see it + * during process exit or the unmapping of it would cause total havoc. + * (the macro is used as remove_vma() is static to mm/mmap.c) + */ +#define arch_exit_mmap(mm) \ +do { \ + struct vm_area_struct *high_vma = find_vma(mm, 0xffff0000); \ + if (high_vma) { \ + BUG_ON(high_vma->vm_next); /* it should be last */ \ + if (high_vma->vm_prev) \ + high_vma->vm_prev->vm_next = NULL; \ + else \ + mm->mmap = NULL; \ + rb_erase(&high_vma->vm_rb, &mm->mm_rb); \ + mm->mmap_cache = NULL; \ + mm->map_count--; \ + remove_vma(high_vma); \ + } \ +} while (0) + +static inline void arch_dup_mmap(struct mm_struct *oldmm, + struct mm_struct *mm) +{ +} + #endif diff --git a/trunk/arch/arm/include/asm/opcodes.h b/trunk/arch/arm/include/asm/opcodes.h index 19c48deda70f..c0efdd60966f 100644 --- a/trunk/arch/arm/include/asm/opcodes.h +++ b/trunk/arch/arm/include/asm/opcodes.h @@ -17,63 +17,4 @@ extern asmlinkage unsigned int arm_check_condition(u32 opcode, u32 psr); #define ARM_OPCODE_CONDTEST_PASS 1 #define ARM_OPCODE_CONDTEST_UNCOND 2 - -/* - * Opcode byteswap helpers - * - * These macros help with converting instructions between a canonical integer - * format and in-memory representation, in an endianness-agnostic manner. - * - * __mem_to_opcode_*() convert from in-memory representation to canonical form. - * __opcode_to_mem_*() convert from canonical form to in-memory representation. - * - * - * Canonical instruction representation: - * - * ARM: 0xKKLLMMNN - * Thumb 16-bit: 0x0000KKLL, where KK < 0xE8 - * Thumb 32-bit: 0xKKLLMMNN, where KK >= 0xE8 - * - * There is no way to distinguish an ARM instruction in canonical representation - * from a Thumb instruction (just as these cannot be distinguished in memory). - * Where this distinction is important, it needs to be tracked separately. - * - * Note that values in the range 0x0000E800..0xE7FFFFFF intentionally do not - * represent any valid Thumb-2 instruction. For this range, - * __opcode_is_thumb32() and __opcode_is_thumb16() will both be false. - */ - -#ifndef __ASSEMBLY__ - -#include -#include - -#ifdef CONFIG_CPU_ENDIAN_BE8 -#define __opcode_to_mem_arm(x) swab32(x) -#define __opcode_to_mem_thumb16(x) swab16(x) -#define __opcode_to_mem_thumb32(x) swahb32(x) -#else -#define __opcode_to_mem_arm(x) ((u32)(x)) -#define __opcode_to_mem_thumb16(x) ((u16)(x)) -#define __opcode_to_mem_thumb32(x) swahw32(x) -#endif - -#define __mem_to_opcode_arm(x) __opcode_to_mem_arm(x) -#define __mem_to_opcode_thumb16(x) __opcode_to_mem_thumb16(x) -#define __mem_to_opcode_thumb32(x) __opcode_to_mem_thumb32(x) - -/* Operations specific to Thumb opcodes */ - -/* Instruction size checks: */ -#define __opcode_is_thumb32(x) ((u32)(x) >= 0xE8000000UL) -#define __opcode_is_thumb16(x) ((u32)(x) < 0xE800UL) - -/* Operations to construct or split 32-bit Thumb instructions: */ -#define __opcode_thumb32_first(x) ((u16)((x) >> 16)) -#define __opcode_thumb32_second(x) ((u16)(x)) -#define __opcode_thumb32_compose(first, second) \ - (((u32)(u16)(first) << 16) | (u32)(u16)(second)) - -#endif /* __ASSEMBLY__ */ - #endif /* __ASM_ARM_OPCODES_H */ diff --git a/trunk/arch/arm/include/asm/page.h b/trunk/arch/arm/include/asm/page.h index 5838361c48b3..97b440c25c58 100644 --- a/trunk/arch/arm/include/asm/page.h +++ b/trunk/arch/arm/include/asm/page.h @@ -151,8 +151,6 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from, #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) extern void copy_page(void *to, const void *from); -#define __HAVE_ARCH_GATE_AREA 1 - #ifdef CONFIG_ARM_LPAE #include #else diff --git a/trunk/arch/arm/include/asm/perf_event.h b/trunk/arch/arm/include/asm/perf_event.h index 00cbe10a50e3..7523340afb8a 100644 --- a/trunk/arch/arm/include/asm/perf_event.h +++ b/trunk/arch/arm/include/asm/perf_event.h @@ -22,7 +22,6 @@ enum arm_perf_pmu_ids { ARM_PERF_PMU_ID_CA9, ARM_PERF_PMU_ID_CA5, ARM_PERF_PMU_ID_CA15, - ARM_PERF_PMU_ID_CA7, ARM_NUM_PMU_IDS, }; diff --git a/trunk/arch/arm/include/asm/posix_types.h b/trunk/arch/arm/include/asm/posix_types.h index efdf99045d87..2446d23bfdbf 100644 --- a/trunk/arch/arm/include/asm/posix_types.h +++ b/trunk/arch/arm/include/asm/posix_types.h @@ -19,22 +19,59 @@ * assume GCC is being used. */ +typedef unsigned long __kernel_ino_t; typedef unsigned short __kernel_mode_t; -#define __kernel_mode_t __kernel_mode_t - typedef unsigned short __kernel_nlink_t; -#define __kernel_nlink_t __kernel_nlink_t - +typedef long __kernel_off_t; +typedef int __kernel_pid_t; typedef unsigned short __kernel_ipc_pid_t; -#define __kernel_ipc_pid_t __kernel_ipc_pid_t - typedef unsigned short __kernel_uid_t; typedef unsigned short __kernel_gid_t; -#define __kernel_uid_t __kernel_uid_t +typedef unsigned int __kernel_size_t; +typedef int __kernel_ssize_t; +typedef int __kernel_ptrdiff_t; +typedef long __kernel_time_t; +typedef long __kernel_suseconds_t; +typedef long __kernel_clock_t; +typedef int __kernel_timer_t; +typedef int __kernel_clockid_t; +typedef int __kernel_daddr_t; +typedef char * __kernel_caddr_t; +typedef unsigned short __kernel_uid16_t; +typedef unsigned short __kernel_gid16_t; +typedef unsigned int __kernel_uid32_t; +typedef unsigned int __kernel_gid32_t; +typedef unsigned short __kernel_old_uid_t; +typedef unsigned short __kernel_old_gid_t; typedef unsigned short __kernel_old_dev_t; -#define __kernel_old_dev_t __kernel_old_dev_t -#include +#ifdef __GNUC__ +typedef long long __kernel_loff_t; +#endif + +typedef struct { + int val[2]; +} __kernel_fsid_t; + +#if defined(__KERNEL__) + +#undef __FD_SET +#define __FD_SET(fd, fdsetp) \ + (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] |= (1<<((fd) & 31))) + +#undef __FD_CLR +#define __FD_CLR(fd, fdsetp) \ + (((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] &= ~(1<<((fd) & 31))) + +#undef __FD_ISSET +#define __FD_ISSET(fd, fdsetp) \ + ((((fd_set *)(fdsetp))->fds_bits[(fd) >> 5] & (1<<((fd) & 31))) != 0) + +#undef __FD_ZERO +#define __FD_ZERO(fdsetp) \ + (memset (fdsetp, 0, sizeof (*(fd_set *)(fdsetp)))) + +#endif #endif diff --git a/trunk/arch/arm/include/asm/processor.h b/trunk/arch/arm/include/asm/processor.h index 5ac8d3d3e025..cb8d638924fd 100644 --- a/trunk/arch/arm/include/asm/processor.h +++ b/trunk/arch/arm/include/asm/processor.h @@ -22,6 +22,7 @@ #include #include #include +#include #ifdef __KERNEL__ #define STACK_TOP ((current->personality & ADDR_LIMIT_32BIT) ? \ @@ -55,6 +56,7 @@ struct thread_struct { #define start_thread(regs,pc,sp) \ ({ \ unsigned long *stack = (unsigned long *)sp; \ + set_fs(USER_DS); \ memset(regs->uregs, 0, sizeof(regs->uregs)); \ if (current->personality & ADDR_LIMIT_32BIT) \ regs->ARM_cpsr = USR_MODE; \ @@ -88,8 +90,6 @@ unsigned long get_wchan(struct task_struct *p); #define cpu_relax() barrier() #endif -void cpu_idle_wait(void); - /* * Create a new kernel thread */ diff --git a/trunk/arch/arm/include/asm/prom.h b/trunk/arch/arm/include/asm/prom.h index aeae9c609df4..ee0363307918 100644 --- a/trunk/arch/arm/include/asm/prom.h +++ b/trunk/arch/arm/include/asm/prom.h @@ -13,6 +13,8 @@ #ifdef CONFIG_OF +#include + extern struct machine_desc *setup_machine_fdt(unsigned int dt_phys); extern void arm_dt_memblock_reserve(void); diff --git a/trunk/arch/arm/include/asm/switch_to.h b/trunk/arch/arm/include/asm/switch_to.h deleted file mode 100644 index fa09e6b49bf1..000000000000 --- a/trunk/arch/arm/include/asm/switch_to.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __ASM_ARM_SWITCH_TO_H -#define __ASM_ARM_SWITCH_TO_H - -#include - -/* - * switch_to(prev, next) should switch from task `prev' to `next' - * `prev' will never be the same as `next'. schedule() itself - * contains the memory barrier to tell GCC not to cache `current'. - */ -extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *); - -#define switch_to(prev,next,last) \ -do { \ - last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ -} while (0) - -#endif /* __ASM_ARM_SWITCH_TO_H */ diff --git a/trunk/arch/arm/include/asm/system.h b/trunk/arch/arm/include/asm/system.h index 74542c52f9be..424aa458c487 100644 --- a/trunk/arch/arm/include/asm/system.h +++ b/trunk/arch/arm/include/asm/system.h @@ -1,8 +1,544 @@ -/* FILE TO BE DELETED. DO NOT ADD STUFF HERE! */ -#include -#include -#include -#include -#include -#include -#include +#ifndef __ASM_ARM_SYSTEM_H +#define __ASM_ARM_SYSTEM_H + +#ifdef __KERNEL__ + +#define CPU_ARCH_UNKNOWN 0 +#define CPU_ARCH_ARMv3 1 +#define CPU_ARCH_ARMv4 2 +#define CPU_ARCH_ARMv4T 3 +#define CPU_ARCH_ARMv5 4 +#define CPU_ARCH_ARMv5T 5 +#define CPU_ARCH_ARMv5TE 6 +#define CPU_ARCH_ARMv5TEJ 7 +#define CPU_ARCH_ARMv6 8 +#define CPU_ARCH_ARMv7 9 + +/* + * CR1 bits (CP#15 CR1) + */ +#define CR_M (1 << 0) /* MMU enable */ +#define CR_A (1 << 1) /* Alignment abort enable */ +#define CR_C (1 << 2) /* Dcache enable */ +#define CR_W (1 << 3) /* Write buffer enable */ +#define CR_P (1 << 4) /* 32-bit exception handler */ +#define CR_D (1 << 5) /* 32-bit data address range */ +#define CR_L (1 << 6) /* Implementation defined */ +#define CR_B (1 << 7) /* Big endian */ +#define CR_S (1 << 8) /* System MMU protection */ +#define CR_R (1 << 9) /* ROM MMU protection */ +#define CR_F (1 << 10) /* Implementation defined */ +#define CR_Z (1 << 11) /* Implementation defined */ +#define CR_I (1 << 12) /* Icache enable */ +#define CR_V (1 << 13) /* Vectors relocated to 0xffff0000 */ +#define CR_RR (1 << 14) /* Round Robin cache replacement */ +#define CR_L4 (1 << 15) /* LDR pc can set T bit */ +#define CR_DT (1 << 16) +#define CR_IT (1 << 18) +#define CR_ST (1 << 19) +#define CR_FI (1 << 21) /* Fast interrupt (lower latency mode) */ +#define CR_U (1 << 22) /* Unaligned access operation */ +#define CR_XP (1 << 23) /* Extended page tables */ +#define CR_VE (1 << 24) /* Vectored interrupts */ +#define CR_EE (1 << 25) /* Exception (Big) Endian */ +#define CR_TRE (1 << 28) /* TEX remap enable */ +#define CR_AFE (1 << 29) /* Access flag enable */ +#define CR_TE (1 << 30) /* Thumb exception enable */ + +/* + * This is used to ensure the compiler did actually allocate the register we + * asked it for some inline assembly sequences. Apparently we can't trust + * the compiler from one version to another so a bit of paranoia won't hurt. + * This string is meant to be concatenated with the inline asm string and + * will cause compilation to stop on mismatch. + * (for details, see gcc PR 15089) + */ +#define __asmeq(x, y) ".ifnc " x "," y " ; .err ; .endif\n\t" + +#ifndef __ASSEMBLY__ + +#include +#include +#include + +#include + +struct thread_info; +struct task_struct; + +/* information about the system we're running on */ +extern unsigned int system_rev; +extern unsigned int system_serial_low; +extern unsigned int system_serial_high; +extern unsigned int mem_fclk_21285; + +struct pt_regs; + +void die(const char *msg, struct pt_regs *regs, int err); + +struct siginfo; +void arm_notify_die(const char *str, struct pt_regs *regs, struct siginfo *info, + unsigned long err, unsigned long trap); + +#ifdef CONFIG_ARM_LPAE +#define FAULT_CODE_ALIGNMENT 33 +#define FAULT_CODE_DEBUG 34 +#else +#define FAULT_CODE_ALIGNMENT 1 +#define FAULT_CODE_DEBUG 2 +#endif + +void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int, + struct pt_regs *), + int sig, int code, const char *name); + +void hook_ifault_code(int nr, int (*fn)(unsigned long, unsigned int, + struct pt_regs *), + int sig, int code, const char *name); + +#define xchg(ptr,x) \ + ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) + +extern asmlinkage void c_backtrace(unsigned long fp, int pmode); + +struct mm_struct; +extern void show_pte(struct mm_struct *mm, unsigned long addr); +extern void __show_regs(struct pt_regs *); + +extern int __pure cpu_architecture(void); +extern void cpu_init(void); + +void soft_restart(unsigned long); +extern void (*arm_pm_restart)(char str, const char *cmd); +extern void (*arm_pm_idle)(void); + +#define UDBG_UNDEFINED (1 << 0) +#define UDBG_SYSCALL (1 << 1) +#define UDBG_BADABORT (1 << 2) +#define UDBG_SEGV (1 << 3) +#define UDBG_BUS (1 << 4) + +extern unsigned int user_debug; + +#if __LINUX_ARM_ARCH__ >= 4 +#define vectors_high() (cr_alignment & CR_V) +#else +#define vectors_high() (0) +#endif + +#if __LINUX_ARM_ARCH__ >= 7 || \ + (__LINUX_ARM_ARCH__ == 6 && defined(CONFIG_CPU_32v6K)) +#define sev() __asm__ __volatile__ ("sev" : : : "memory") +#define wfe() __asm__ __volatile__ ("wfe" : : : "memory") +#define wfi() __asm__ __volatile__ ("wfi" : : : "memory") +#endif + +#if __LINUX_ARM_ARCH__ >= 7 +#define isb() __asm__ __volatile__ ("isb" : : : "memory") +#define dsb() __asm__ __volatile__ ("dsb" : : : "memory") +#define dmb() __asm__ __volatile__ ("dmb" : : : "memory") +#elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6 +#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ + : : "r" (0) : "memory") +#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ + : : "r" (0) : "memory") +#define dmb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" \ + : : "r" (0) : "memory") +#elif defined(CONFIG_CPU_FA526) +#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ + : : "r" (0) : "memory") +#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ + : : "r" (0) : "memory") +#define dmb() __asm__ __volatile__ ("" : : : "memory") +#else +#define isb() __asm__ __volatile__ ("" : : : "memory") +#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ + : : "r" (0) : "memory") +#define dmb() __asm__ __volatile__ ("" : : : "memory") +#endif + +#ifdef CONFIG_ARCH_HAS_BARRIERS +#include +#elif defined(CONFIG_ARM_DMA_MEM_BUFFERABLE) || defined(CONFIG_SMP) +#define mb() do { dsb(); outer_sync(); } while (0) +#define rmb() dsb() +#define wmb() mb() +#else +#include +#define mb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) +#define rmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) +#define wmb() do { if (arch_is_coherent()) dmb(); else barrier(); } while (0) +#endif + +#ifndef CONFIG_SMP +#define smp_mb() barrier() +#define smp_rmb() barrier() +#define smp_wmb() barrier() +#else +#define smp_mb() dmb() +#define smp_rmb() dmb() +#define smp_wmb() dmb() +#endif + +#define read_barrier_depends() do { } while(0) +#define smp_read_barrier_depends() do { } while(0) + +#define set_mb(var, value) do { var = value; smp_mb(); } while (0) +#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t"); + +extern unsigned long cr_no_alignment; /* defined in entry-armv.S */ +extern unsigned long cr_alignment; /* defined in entry-armv.S */ + +static inline unsigned int get_cr(void) +{ + unsigned int val; + asm("mrc p15, 0, %0, c1, c0, 0 @ get CR" : "=r" (val) : : "cc"); + return val; +} + +static inline void set_cr(unsigned int val) +{ + asm volatile("mcr p15, 0, %0, c1, c0, 0 @ set CR" + : : "r" (val) : "cc"); + isb(); +} + +#ifndef CONFIG_SMP +extern void adjust_cr(unsigned long mask, unsigned long set); +#endif + +#define CPACC_FULL(n) (3 << (n * 2)) +#define CPACC_SVC(n) (1 << (n * 2)) +#define CPACC_DISABLE(n) (0 << (n * 2)) + +static inline unsigned int get_copro_access(void) +{ + unsigned int val; + asm("mrc p15, 0, %0, c1, c0, 2 @ get copro access" + : "=r" (val) : : "cc"); + return val; +} + +static inline void set_copro_access(unsigned int val) +{ + asm volatile("mcr p15, 0, %0, c1, c0, 2 @ set copro access" + : : "r" (val) : "cc"); + isb(); +} + +/* + * switch_mm() may do a full cache flush over the context switch, + * so enable interrupts over the context switch to avoid high + * latency. + */ +#define __ARCH_WANT_INTERRUPTS_ON_CTXSW + +/* + * switch_to(prev, next) should switch from task `prev' to `next' + * `prev' will never be the same as `next'. schedule() itself + * contains the memory barrier to tell GCC not to cache `current'. + */ +extern struct task_struct *__switch_to(struct task_struct *, struct thread_info *, struct thread_info *); + +#define switch_to(prev,next,last) \ +do { \ + last = __switch_to(prev,task_thread_info(prev), task_thread_info(next)); \ +} while (0) + +#if defined(CONFIG_CPU_SA1100) || defined(CONFIG_CPU_SA110) +/* + * On the StrongARM, "swp" is terminally broken since it bypasses the + * cache totally. This means that the cache becomes inconsistent, and, + * since we use normal loads/stores as well, this is really bad. + * Typically, this causes oopsen in filp_close, but could have other, + * more disastrous effects. There are two work-arounds: + * 1. Disable interrupts and emulate the atomic swap + * 2. Clean the cache, perform atomic swap, flush the cache + * + * We choose (1) since its the "easiest" to achieve here and is not + * dependent on the processor type. + * + * NOTE that this solution won't work on an SMP system, so explcitly + * forbid it here. + */ +#define swp_is_buggy +#endif + +static inline unsigned long __xchg(unsigned long x, volatile void *ptr, int size) +{ + extern void __bad_xchg(volatile void *, int); + unsigned long ret; +#ifdef swp_is_buggy + unsigned long flags; +#endif +#if __LINUX_ARM_ARCH__ >= 6 + unsigned int tmp; +#endif + + smp_mb(); + + switch (size) { +#if __LINUX_ARM_ARCH__ >= 6 + case 1: + asm volatile("@ __xchg1\n" + "1: ldrexb %0, [%3]\n" + " strexb %1, %2, [%3]\n" + " teq %1, #0\n" + " bne 1b" + : "=&r" (ret), "=&r" (tmp) + : "r" (x), "r" (ptr) + : "memory", "cc"); + break; + case 4: + asm volatile("@ __xchg4\n" + "1: ldrex %0, [%3]\n" + " strex %1, %2, [%3]\n" + " teq %1, #0\n" + " bne 1b" + : "=&r" (ret), "=&r" (tmp) + : "r" (x), "r" (ptr) + : "memory", "cc"); + break; +#elif defined(swp_is_buggy) +#ifdef CONFIG_SMP +#error SMP is not supported on this platform +#endif + case 1: + raw_local_irq_save(flags); + ret = *(volatile unsigned char *)ptr; + *(volatile unsigned char *)ptr = x; + raw_local_irq_restore(flags); + break; + + case 4: + raw_local_irq_save(flags); + ret = *(volatile unsigned long *)ptr; + *(volatile unsigned long *)ptr = x; + raw_local_irq_restore(flags); + break; +#else + case 1: + asm volatile("@ __xchg1\n" + " swpb %0, %1, [%2]" + : "=&r" (ret) + : "r" (x), "r" (ptr) + : "memory", "cc"); + break; + case 4: + asm volatile("@ __xchg4\n" + " swp %0, %1, [%2]" + : "=&r" (ret) + : "r" (x), "r" (ptr) + : "memory", "cc"); + break; +#endif + default: + __bad_xchg(ptr, size), ret = 0; + break; + } + smp_mb(); + + return ret; +} + +extern void disable_hlt(void); +extern void enable_hlt(void); + +void cpu_idle_wait(void); + +#include + +#if __LINUX_ARM_ARCH__ < 6 +/* min ARCH < ARMv6 */ + +#ifdef CONFIG_SMP +#error "SMP is not supported on this platform" +#endif + +/* + * cmpxchg_local and cmpxchg64_local are atomic wrt current CPU. Always make + * them available. + */ +#define cmpxchg_local(ptr, o, n) \ + ((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\ + (unsigned long)(n), sizeof(*(ptr)))) +#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) + +#ifndef CONFIG_SMP +#include +#endif + +#else /* min ARCH >= ARMv6 */ + +extern void __bad_cmpxchg(volatile void *ptr, int size); + +/* + * cmpxchg only support 32-bits operands on ARMv6. + */ + +static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, + unsigned long new, int size) +{ + unsigned long oldval, res; + + switch (size) { +#ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ + case 1: + do { + asm volatile("@ __cmpxchg1\n" + " ldrexb %1, [%2]\n" + " mov %0, #0\n" + " teq %1, %3\n" + " strexbeq %0, %4, [%2]\n" + : "=&r" (res), "=&r" (oldval) + : "r" (ptr), "Ir" (old), "r" (new) + : "memory", "cc"); + } while (res); + break; + case 2: + do { + asm volatile("@ __cmpxchg1\n" + " ldrexh %1, [%2]\n" + " mov %0, #0\n" + " teq %1, %3\n" + " strexheq %0, %4, [%2]\n" + : "=&r" (res), "=&r" (oldval) + : "r" (ptr), "Ir" (old), "r" (new) + : "memory", "cc"); + } while (res); + break; +#endif + case 4: + do { + asm volatile("@ __cmpxchg4\n" + " ldrex %1, [%2]\n" + " mov %0, #0\n" + " teq %1, %3\n" + " strexeq %0, %4, [%2]\n" + : "=&r" (res), "=&r" (oldval) + : "r" (ptr), "Ir" (old), "r" (new) + : "memory", "cc"); + } while (res); + break; + default: + __bad_cmpxchg(ptr, size); + oldval = 0; + } + + return oldval; +} + +static inline unsigned long __cmpxchg_mb(volatile void *ptr, unsigned long old, + unsigned long new, int size) +{ + unsigned long ret; + + smp_mb(); + ret = __cmpxchg(ptr, old, new, size); + smp_mb(); + + return ret; +} + +#define cmpxchg(ptr,o,n) \ + ((__typeof__(*(ptr)))__cmpxchg_mb((ptr), \ + (unsigned long)(o), \ + (unsigned long)(n), \ + sizeof(*(ptr)))) + +static inline unsigned long __cmpxchg_local(volatile void *ptr, + unsigned long old, + unsigned long new, int size) +{ + unsigned long ret; + + switch (size) { +#ifdef CONFIG_CPU_V6 /* min ARCH == ARMv6 */ + case 1: + case 2: + ret = __cmpxchg_local_generic(ptr, old, new, size); + break; +#endif + default: + ret = __cmpxchg(ptr, old, new, size); + } + + return ret; +} + +#define cmpxchg_local(ptr,o,n) \ + ((__typeof__(*(ptr)))__cmpxchg_local((ptr), \ + (unsigned long)(o), \ + (unsigned long)(n), \ + sizeof(*(ptr)))) + +#ifndef CONFIG_CPU_V6 /* min ARCH >= ARMv6K */ + +/* + * Note : ARMv7-M (currently unsupported by Linux) does not support + * ldrexd/strexd. If ARMv7-M is ever supported by the Linux kernel, it should + * not be allowed to use __cmpxchg64. + */ +static inline unsigned long long __cmpxchg64(volatile void *ptr, + unsigned long long old, + unsigned long long new) +{ + register unsigned long long oldval asm("r0"); + register unsigned long long __old asm("r2") = old; + register unsigned long long __new asm("r4") = new; + unsigned long res; + + do { + asm volatile( + " @ __cmpxchg8\n" + " ldrexd %1, %H1, [%2]\n" + " mov %0, #0\n" + " teq %1, %3\n" + " teqeq %H1, %H3\n" + " strexdeq %0, %4, %H4, [%2]\n" + : "=&r" (res), "=&r" (oldval) + : "r" (ptr), "Ir" (__old), "r" (__new) + : "memory", "cc"); + } while (res); + + return oldval; +} + +static inline unsigned long long __cmpxchg64_mb(volatile void *ptr, + unsigned long long old, + unsigned long long new) +{ + unsigned long long ret; + + smp_mb(); + ret = __cmpxchg64(ptr, old, new); + smp_mb(); + + return ret; +} + +#define cmpxchg64(ptr,o,n) \ + ((__typeof__(*(ptr)))__cmpxchg64_mb((ptr), \ + (unsigned long long)(o), \ + (unsigned long long)(n))) + +#define cmpxchg64_local(ptr,o,n) \ + ((__typeof__(*(ptr)))__cmpxchg64((ptr), \ + (unsigned long long)(o), \ + (unsigned long long)(n))) + +#else /* min ARCH = ARMv6 */ + +#define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n)) + +#endif + +#endif /* __LINUX_ARM_ARCH__ >= 6 */ + +#endif /* __ASSEMBLY__ */ + +#define arch_align_stack(x) (x) + +#endif /* __KERNEL__ */ + +#endif diff --git a/trunk/arch/arm/include/asm/system_info.h b/trunk/arch/arm/include/asm/system_info.h deleted file mode 100644 index dfd386d0c022..000000000000 --- a/trunk/arch/arm/include/asm/system_info.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef __ASM_ARM_SYSTEM_INFO_H -#define __ASM_ARM_SYSTEM_INFO_H - -#define CPU_ARCH_UNKNOWN 0 -#define CPU_ARCH_ARMv3 1 -#define CPU_ARCH_ARMv4 2 -#define CPU_ARCH_ARMv4T 3 -#define CPU_ARCH_ARMv5 4 -#define CPU_ARCH_ARMv5T 5 -#define CPU_ARCH_ARMv5TE 6 -#define CPU_ARCH_ARMv5TEJ 7 -#define CPU_ARCH_ARMv6 8 -#define CPU_ARCH_ARMv7 9 - -#ifndef __ASSEMBLY__ - -/* information about the system we're running on */ -extern unsigned int system_rev; -extern unsigned int system_serial_low; -extern unsigned int system_serial_high; -extern unsigned int mem_fclk_21285; - -extern int __pure cpu_architecture(void); - -#endif /* !__ASSEMBLY__ */ - -#endif /* __ASM_ARM_SYSTEM_INFO_H */ diff --git a/trunk/arch/arm/include/asm/system_misc.h b/trunk/arch/arm/include/asm/system_misc.h deleted file mode 100644 index 5a85f148b607..000000000000 --- a/trunk/arch/arm/include/asm/system_misc.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __ASM_ARM_SYSTEM_MISC_H -#define __ASM_ARM_SYSTEM_MISC_H - -#ifndef __ASSEMBLY__ - -#include -#include -#include - -extern void cpu_init(void); - -void soft_restart(unsigned long); -extern void (*arm_pm_restart)(char str, const char *cmd); -extern void (*arm_pm_idle)(void); - -#define UDBG_UNDEFINED (1 << 0) -#define UDBG_SYSCALL (1 << 1) -#define UDBG_BADABORT (1 << 2) -#define UDBG_SEGV (1 << 3) -#define UDBG_BUS (1 << 4) - -extern unsigned int user_debug; - -extern void disable_hlt(void); -extern void enable_hlt(void); - -#endif /* !__ASSEMBLY__ */ - -#endif /* __ASM_ARM_SYSTEM_MISC_H */ diff --git a/trunk/arch/arm/include/asm/tlbflush.h b/trunk/arch/arm/include/asm/tlbflush.h index 85fe61e73202..02b2f8203982 100644 --- a/trunk/arch/arm/include/asm/tlbflush.h +++ b/trunk/arch/arm/include/asm/tlbflush.h @@ -318,21 +318,6 @@ extern struct cpu_tlb_fns cpu_tlb; #define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f))) -#define __tlb_op(f, insnarg, arg) \ - do { \ - if (always_tlb_flags & (f)) \ - asm("mcr " insnarg \ - : : "r" (arg) : "cc"); \ - else if (possible_tlb_flags & (f)) \ - asm("tst %1, %2\n\t" \ - "mcrne " insnarg \ - : : "r" (arg), "r" (__tlb_flag), "Ir" (f) \ - : "cc"); \ - } while (0) - -#define tlb_op(f, regs, arg) __tlb_op(f, "p15, 0, %0, " regs, arg) -#define tlb_l2_op(f, regs, arg) __tlb_op(f, "p15, 1, %0, " regs, arg) - static inline void local_flush_tlb_all(void) { const int zero = 0; @@ -341,11 +326,16 @@ static inline void local_flush_tlb_all(void) if (tlb_flag(TLB_WB)) dsb(); - tlb_op(TLB_V3_FULL, "c6, c0, 0", zero); - tlb_op(TLB_V4_U_FULL | TLB_V6_U_FULL, "c8, c7, 0", zero); - tlb_op(TLB_V4_D_FULL | TLB_V6_D_FULL, "c8, c6, 0", zero); - tlb_op(TLB_V4_I_FULL | TLB_V6_I_FULL, "c8, c5, 0", zero); - tlb_op(TLB_V7_UIS_FULL, "c8, c3, 0", zero); + if (tlb_flag(TLB_V3_FULL)) + asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc"); + if (tlb_flag(TLB_V4_U_FULL | TLB_V6_U_FULL)) + asm("mcr p15, 0, %0, c8, c7, 0" : : "r" (zero) : "cc"); + if (tlb_flag(TLB_V4_D_FULL | TLB_V6_D_FULL)) + asm("mcr p15, 0, %0, c8, c6, 0" : : "r" (zero) : "cc"); + if (tlb_flag(TLB_V4_I_FULL | TLB_V6_I_FULL)) + asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); + if (tlb_flag(TLB_V7_UIS_FULL)) + asm("mcr p15, 0, %0, c8, c3, 0" : : "r" (zero) : "cc"); if (tlb_flag(TLB_BARRIER)) { dsb(); @@ -362,23 +352,29 @@ static inline void local_flush_tlb_mm(struct mm_struct *mm) if (tlb_flag(TLB_WB)) dsb(); - if (possible_tlb_flags & (TLB_V3_FULL|TLB_V4_U_FULL|TLB_V4_D_FULL|TLB_V4_I_FULL)) { - if (cpumask_test_cpu(get_cpu(), mm_cpumask(mm))) { - tlb_op(TLB_V3_FULL, "c6, c0, 0", zero); - tlb_op(TLB_V4_U_FULL, "c8, c7, 0", zero); - tlb_op(TLB_V4_D_FULL, "c8, c6, 0", zero); - tlb_op(TLB_V4_I_FULL, "c8, c5, 0", zero); - } - put_cpu(); + if (cpumask_test_cpu(get_cpu(), mm_cpumask(mm))) { + if (tlb_flag(TLB_V3_FULL)) + asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (zero) : "cc"); + if (tlb_flag(TLB_V4_U_FULL)) + asm("mcr p15, 0, %0, c8, c7, 0" : : "r" (zero) : "cc"); + if (tlb_flag(TLB_V4_D_FULL)) + asm("mcr p15, 0, %0, c8, c6, 0" : : "r" (zero) : "cc"); + if (tlb_flag(TLB_V4_I_FULL)) + asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); } - - tlb_op(TLB_V6_U_ASID, "c8, c7, 2", asid); - tlb_op(TLB_V6_D_ASID, "c8, c6, 2", asid); - tlb_op(TLB_V6_I_ASID, "c8, c5, 2", asid); + put_cpu(); + + if (tlb_flag(TLB_V6_U_ASID)) + asm("mcr p15, 0, %0, c8, c7, 2" : : "r" (asid) : "cc"); + if (tlb_flag(TLB_V6_D_ASID)) + asm("mcr p15, 0, %0, c8, c6, 2" : : "r" (asid) : "cc"); + if (tlb_flag(TLB_V6_I_ASID)) + asm("mcr p15, 0, %0, c8, c5, 2" : : "r" (asid) : "cc"); + if (tlb_flag(TLB_V7_UIS_ASID)) #ifdef CONFIG_ARM_ERRATA_720789 - tlb_op(TLB_V7_UIS_ASID, "c8, c3, 0", zero); + asm("mcr p15, 0, %0, c8, c3, 0" : : "r" (zero) : "cc"); #else - tlb_op(TLB_V7_UIS_ASID, "c8, c3, 2", asid); + asm("mcr p15, 0, %0, c8, c3, 2" : : "r" (asid) : "cc"); #endif if (tlb_flag(TLB_BARRIER)) @@ -396,23 +392,30 @@ local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) if (tlb_flag(TLB_WB)) dsb(); - if (possible_tlb_flags & (TLB_V3_PAGE|TLB_V4_U_PAGE|TLB_V4_D_PAGE|TLB_V4_I_PAGE|TLB_V4_I_FULL) && - cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { - tlb_op(TLB_V3_PAGE, "c6, c0, 0", uaddr); - tlb_op(TLB_V4_U_PAGE, "c8, c7, 1", uaddr); - tlb_op(TLB_V4_D_PAGE, "c8, c6, 1", uaddr); - tlb_op(TLB_V4_I_PAGE, "c8, c5, 1", uaddr); + if (cpumask_test_cpu(smp_processor_id(), mm_cpumask(vma->vm_mm))) { + if (tlb_flag(TLB_V3_PAGE)) + asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (uaddr) : "cc"); + if (tlb_flag(TLB_V4_U_PAGE)) + asm("mcr p15, 0, %0, c8, c7, 1" : : "r" (uaddr) : "cc"); + if (tlb_flag(TLB_V4_D_PAGE)) + asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (uaddr) : "cc"); + if (tlb_flag(TLB_V4_I_PAGE)) + asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); if (!tlb_flag(TLB_V4_I_PAGE) && tlb_flag(TLB_V4_I_FULL)) asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); } - tlb_op(TLB_V6_U_PAGE, "c8, c7, 1", uaddr); - tlb_op(TLB_V6_D_PAGE, "c8, c6, 1", uaddr); - tlb_op(TLB_V6_I_PAGE, "c8, c5, 1", uaddr); + if (tlb_flag(TLB_V6_U_PAGE)) + asm("mcr p15, 0, %0, c8, c7, 1" : : "r" (uaddr) : "cc"); + if (tlb_flag(TLB_V6_D_PAGE)) + asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (uaddr) : "cc"); + if (tlb_flag(TLB_V6_I_PAGE)) + asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (uaddr) : "cc"); + if (tlb_flag(TLB_V7_UIS_PAGE)) #ifdef CONFIG_ARM_ERRATA_720789 - tlb_op(TLB_V7_UIS_PAGE, "c8, c3, 3", uaddr & PAGE_MASK); + asm("mcr p15, 0, %0, c8, c3, 3" : : "r" (uaddr & PAGE_MASK) : "cc"); #else - tlb_op(TLB_V7_UIS_PAGE, "c8, c3, 1", uaddr); + asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (uaddr) : "cc"); #endif if (tlb_flag(TLB_BARRIER)) @@ -429,17 +432,25 @@ static inline void local_flush_tlb_kernel_page(unsigned long kaddr) if (tlb_flag(TLB_WB)) dsb(); - tlb_op(TLB_V3_PAGE, "c6, c0, 0", kaddr); - tlb_op(TLB_V4_U_PAGE, "c8, c7, 1", kaddr); - tlb_op(TLB_V4_D_PAGE, "c8, c6, 1", kaddr); - tlb_op(TLB_V4_I_PAGE, "c8, c5, 1", kaddr); + if (tlb_flag(TLB_V3_PAGE)) + asm("mcr p15, 0, %0, c6, c0, 0" : : "r" (kaddr) : "cc"); + if (tlb_flag(TLB_V4_U_PAGE)) + asm("mcr p15, 0, %0, c8, c7, 1" : : "r" (kaddr) : "cc"); + if (tlb_flag(TLB_V4_D_PAGE)) + asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (kaddr) : "cc"); + if (tlb_flag(TLB_V4_I_PAGE)) + asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); if (!tlb_flag(TLB_V4_I_PAGE) && tlb_flag(TLB_V4_I_FULL)) asm("mcr p15, 0, %0, c8, c5, 0" : : "r" (zero) : "cc"); - tlb_op(TLB_V6_U_PAGE, "c8, c7, 1", kaddr); - tlb_op(TLB_V6_D_PAGE, "c8, c6, 1", kaddr); - tlb_op(TLB_V6_I_PAGE, "c8, c5, 1", kaddr); - tlb_op(TLB_V7_UIS_PAGE, "c8, c3, 1", kaddr); + if (tlb_flag(TLB_V6_U_PAGE)) + asm("mcr p15, 0, %0, c8, c7, 1" : : "r" (kaddr) : "cc"); + if (tlb_flag(TLB_V6_D_PAGE)) + asm("mcr p15, 0, %0, c8, c6, 1" : : "r" (kaddr) : "cc"); + if (tlb_flag(TLB_V6_I_PAGE)) + asm("mcr p15, 0, %0, c8, c5, 1" : : "r" (kaddr) : "cc"); + if (tlb_flag(TLB_V7_UIS_PAGE)) + asm("mcr p15, 0, %0, c8, c3, 1" : : "r" (kaddr) : "cc"); if (tlb_flag(TLB_BARRIER)) { dsb(); @@ -464,8 +475,13 @@ static inline void flush_pmd_entry(void *pmd) { const unsigned int __tlb_flag = __cpu_tlb_flags; - tlb_op(TLB_DCLEAN, "c7, c10, 1 @ flush_pmd", pmd); - tlb_l2_op(TLB_L2CLEAN_FR, "c15, c9, 1 @ L2 flush_pmd", pmd); + if (tlb_flag(TLB_DCLEAN)) + asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" + : : "r" (pmd) : "cc"); + + if (tlb_flag(TLB_L2CLEAN_FR)) + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd" + : : "r" (pmd) : "cc"); if (tlb_flag(TLB_WB)) dsb(); @@ -475,11 +491,15 @@ static inline void clean_pmd_entry(void *pmd) { const unsigned int __tlb_flag = __cpu_tlb_flags; - tlb_op(TLB_DCLEAN, "c7, c10, 1 @ flush_pmd", pmd); - tlb_l2_op(TLB_L2CLEAN_FR, "c15, c9, 1 @ L2 flush_pmd", pmd); + if (tlb_flag(TLB_DCLEAN)) + asm("mcr p15, 0, %0, c7, c10, 1 @ flush_pmd" + : : "r" (pmd) : "cc"); + + if (tlb_flag(TLB_L2CLEAN_FR)) + asm("mcr p15, 1, %0, c15, c9, 1 @ L2 flush_pmd" + : : "r" (pmd) : "cc"); } -#undef tlb_op #undef tlb_flag #undef always_tlb_flags #undef possible_tlb_flags diff --git a/trunk/arch/arm/include/asm/traps.h b/trunk/arch/arm/include/asm/traps.h index f555bb3664dc..5b29a6673625 100644 --- a/trunk/arch/arm/include/asm/traps.h +++ b/trunk/arch/arm/include/asm/traps.h @@ -46,7 +46,7 @@ static inline int in_exception_text(unsigned long ptr) return in ? : __in_irqentry_text(ptr); } -extern void __init early_trap_init(void *); +extern void __init early_trap_init(void); extern void dump_backtrace_entry(unsigned long where, unsigned long from, unsigned long frame); extern void ptrace_break(struct task_struct *tsk, struct pt_regs *regs); diff --git a/trunk/arch/arm/include/asm/uaccess.h b/trunk/arch/arm/include/asm/uaccess.h index 71f6536d17ac..2958976d867b 100644 --- a/trunk/arch/arm/include/asm/uaccess.h +++ b/trunk/arch/arm/include/asm/uaccess.h @@ -16,8 +16,8 @@ #include #include #include +#include #include -#include #define VERIFY_READ 0 #define VERIFY_WRITE 1 diff --git a/trunk/arch/arm/kernel/Makefile b/trunk/arch/arm/kernel/Makefile index 8269d8928742..3a274878412e 100644 --- a/trunk/arch/arm/kernel/Makefile +++ b/trunk/arch/arm/kernel/Makefile @@ -7,8 +7,6 @@ AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) ifdef CONFIG_FUNCTION_TRACER CFLAGS_REMOVE_ftrace.o = -pg -CFLAGS_REMOVE_insn.o = -pg -CFLAGS_REMOVE_patch.o = -pg endif CFLAGS_REMOVE_return_address.o = -pg @@ -16,8 +14,8 @@ CFLAGS_REMOVE_return_address.o = -pg # Object file lists. obj-y := elf.o entry-armv.o entry-common.o irq.o opcodes.o \ - process.o ptrace.o return_address.o sched_clock.o \ - setup.o signal.o stacktrace.o sys_arm.o time.o traps.o + process.o ptrace.o return_address.o setup.o signal.o \ + sys_arm.o stacktrace.o time.o traps.o obj-$(CONFIG_DEPRECATED_PARAM_STRUCT) += compat.o @@ -31,14 +29,14 @@ obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o isa.o obj-$(CONFIG_ARM_CPU_SUSPEND) += sleep.o suspend.o +obj-$(CONFIG_HAVE_SCHED_CLOCK) += sched_clock.o obj-$(CONFIG_SMP) += smp.o smp_tlb.o obj-$(CONFIG_HAVE_ARM_SCU) += smp_scu.o obj-$(CONFIG_HAVE_ARM_TWD) += smp_twd.o -obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o insn.o -obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o insn.o -obj-$(CONFIG_JUMP_LABEL) += jump_label.o insn.o patch.o +obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o -obj-$(CONFIG_KPROBES) += kprobes.o kprobes-common.o patch.o +obj-$(CONFIG_KPROBES) += kprobes.o kprobes-common.o ifdef CONFIG_THUMB2_KERNEL obj-$(CONFIG_KPROBES) += kprobes-thumb.o else diff --git a/trunk/arch/arm/kernel/armksyms.c b/trunk/arch/arm/kernel/armksyms.c index b57c75e0b01f..5b0bce61eb69 100644 --- a/trunk/arch/arm/kernel/armksyms.c +++ b/trunk/arch/arm/kernel/armksyms.c @@ -18,6 +18,7 @@ #include #include +#include #include /* diff --git a/trunk/arch/arm/kernel/debug.S b/trunk/arch/arm/kernel/debug.S index c45522c36787..204e2160cfcc 100644 --- a/trunk/arch/arm/kernel/debug.S +++ b/trunk/arch/arm/kernel/debug.S @@ -10,7 +10,6 @@ * 32-bit debugging code */ #include -#include .text @@ -101,7 +100,7 @@ #endif /* CONFIG_CPU_V6 */ -#elif !defined(CONFIG_DEBUG_SEMIHOSTING) +#else #include #endif /* CONFIG_DEBUG_ICEDCC */ @@ -156,8 +155,6 @@ hexbuf: .space 16 .ltorg -#ifndef CONFIG_DEBUG_SEMIHOSTING - ENTRY(printascii) addruart_current r3, r1, r2 b 2f @@ -180,24 +177,3 @@ ENTRY(printch) mov r0, #0 b 1b ENDPROC(printch) - -#else - -ENTRY(printascii) - mov r1, r0 - mov r0, #0x04 @ SYS_WRITE0 - ARM( svc #0x123456 ) - THUMB( svc #0xab ) - mov pc, lr -ENDPROC(printascii) - -ENTRY(printch) - adr r1, hexbuf - strb r0, [r1] - mov r0, #0x03 @ SYS_WRITEC - ARM( svc #0x123456 ) - THUMB( svc #0xab ) - mov pc, lr -ENDPROC(printch) - -#endif diff --git a/trunk/arch/arm/kernel/elf.c b/trunk/arch/arm/kernel/elf.c index d0d1e83150c9..ddba41d1fcf1 100644 --- a/trunk/arch/arm/kernel/elf.c +++ b/trunk/arch/arm/kernel/elf.c @@ -3,7 +3,6 @@ #include #include #include -#include int elf_check_arch(const struct elf32_hdr *x) { diff --git a/trunk/arch/arm/kernel/entry-armv.S b/trunk/arch/arm/kernel/entry-armv.S index 7fd3ad048da9..22f0ed324f37 100644 --- a/trunk/arch/arm/kernel/entry-armv.S +++ b/trunk/arch/arm/kernel/entry-armv.S @@ -15,7 +15,6 @@ * that causes it to save wrong values... Be aware! */ -#include #include #include #include @@ -27,7 +26,7 @@ #include #include #include -#include +#include #include "entry-header.S" #include diff --git a/trunk/arch/arm/kernel/fiq.c b/trunk/arch/arm/kernel/fiq.c index c32f8456aa09..4c164ece5891 100644 --- a/trunk/arch/arm/kernel/fiq.c +++ b/trunk/arch/arm/kernel/fiq.c @@ -42,9 +42,9 @@ #include #include -#include #include #include +#include #include static unsigned long no_fiq_insn; diff --git a/trunk/arch/arm/kernel/ftrace.c b/trunk/arch/arm/kernel/ftrace.c index df0bf0c8cb79..c0062ad1e847 100644 --- a/trunk/arch/arm/kernel/ftrace.c +++ b/trunk/arch/arm/kernel/ftrace.c @@ -16,13 +16,10 @@ #include #include -#include #include -#include "insn.h" - #ifdef CONFIG_THUMB2_KERNEL -#define NOP 0xf85deb04 /* pop.w {lr} */ +#define NOP 0xeb04f85d /* pop.w {lr} */ #else #define NOP 0xe8bd4000 /* pop {lr} */ #endif @@ -63,31 +60,76 @@ static unsigned long adjust_address(struct dyn_ftrace *rec, unsigned long addr) } #endif +#ifdef CONFIG_THUMB2_KERNEL +static unsigned long ftrace_gen_branch(unsigned long pc, unsigned long addr, + bool link) +{ + unsigned long s, j1, j2, i1, i2, imm10, imm11; + unsigned long first, second; + long offset; + + offset = (long)addr - (long)(pc + 4); + if (offset < -16777216 || offset > 16777214) { + WARN_ON_ONCE(1); + return 0; + } + + s = (offset >> 24) & 0x1; + i1 = (offset >> 23) & 0x1; + i2 = (offset >> 22) & 0x1; + imm10 = (offset >> 12) & 0x3ff; + imm11 = (offset >> 1) & 0x7ff; + + j1 = (!i1) ^ s; + j2 = (!i2) ^ s; + + first = 0xf000 | (s << 10) | imm10; + second = 0x9000 | (j1 << 13) | (j2 << 11) | imm11; + if (link) + second |= 1 << 14; + + return (second << 16) | first; +} +#else +static unsigned long ftrace_gen_branch(unsigned long pc, unsigned long addr, + bool link) +{ + unsigned long opcode = 0xea000000; + long offset; + + if (link) + opcode |= 1 << 24; + + offset = (long)addr - (long)(pc + 8); + if (unlikely(offset < -33554432 || offset > 33554428)) { + /* Can't generate branches that far (from ARM ARM). Ftrace + * doesn't generate branches outside of kernel text. + */ + WARN_ON_ONCE(1); + return 0; + } + + offset = (offset >> 2) & 0x00ffffff; + + return opcode | offset; +} +#endif + static unsigned long ftrace_call_replace(unsigned long pc, unsigned long addr) { - return arm_gen_branch_link(pc, addr); + return ftrace_gen_branch(pc, addr, true); } static int ftrace_modify_code(unsigned long pc, unsigned long old, - unsigned long new, bool validate) + unsigned long new) { unsigned long replaced; - if (IS_ENABLED(CONFIG_THUMB2_KERNEL)) { - old = __opcode_to_mem_thumb32(old); - new = __opcode_to_mem_thumb32(new); - } else { - old = __opcode_to_mem_arm(old); - new = __opcode_to_mem_arm(new); - } + if (probe_kernel_read(&replaced, (void *)pc, MCOUNT_INSN_SIZE)) + return -EFAULT; - if (validate) { - if (probe_kernel_read(&replaced, (void *)pc, MCOUNT_INSN_SIZE)) - return -EFAULT; - - if (replaced != old) - return -EINVAL; - } + if (replaced != old) + return -EINVAL; if (probe_kernel_write((void *)pc, &new, MCOUNT_INSN_SIZE)) return -EPERM; @@ -99,21 +141,23 @@ static int ftrace_modify_code(unsigned long pc, unsigned long old, int ftrace_update_ftrace_func(ftrace_func_t func) { - unsigned long pc; + unsigned long pc, old; unsigned long new; int ret; pc = (unsigned long)&ftrace_call; + memcpy(&old, &ftrace_call, MCOUNT_INSN_SIZE); new = ftrace_call_replace(pc, (unsigned long)func); - ret = ftrace_modify_code(pc, 0, new, false); + ret = ftrace_modify_code(pc, old, new); #ifdef CONFIG_OLD_MCOUNT if (!ret) { pc = (unsigned long)&ftrace_call_old; + memcpy(&old, &ftrace_call_old, MCOUNT_INSN_SIZE); new = ftrace_call_replace(pc, (unsigned long)func); - ret = ftrace_modify_code(pc, 0, new, false); + ret = ftrace_modify_code(pc, old, new); } #endif @@ -128,7 +172,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) old = ftrace_nop_replace(rec); new = ftrace_call_replace(ip, adjust_address(rec, addr)); - return ftrace_modify_code(rec->ip, old, new, true); + return ftrace_modify_code(rec->ip, old, new); } int ftrace_make_nop(struct module *mod, @@ -141,7 +185,7 @@ int ftrace_make_nop(struct module *mod, old = ftrace_call_replace(ip, adjust_address(rec, addr)); new = ftrace_nop_replace(rec); - ret = ftrace_modify_code(ip, old, new, true); + ret = ftrace_modify_code(ip, old, new); #ifdef CONFIG_OLD_MCOUNT if (ret == -EINVAL && addr == MCOUNT_ADDR) { @@ -149,7 +193,7 @@ int ftrace_make_nop(struct module *mod, old = ftrace_call_replace(ip, adjust_address(rec, addr)); new = ftrace_nop_replace(rec); - ret = ftrace_modify_code(ip, old, new, true); + ret = ftrace_modify_code(ip, old, new); } #endif @@ -205,12 +249,12 @@ static int __ftrace_modify_caller(unsigned long *callsite, { unsigned long caller_fn = (unsigned long) func; unsigned long pc = (unsigned long) callsite; - unsigned long branch = arm_gen_branch(pc, caller_fn); + unsigned long branch = ftrace_gen_branch(pc, caller_fn, false); unsigned long nop = 0xe1a00000; /* mov r0, r0 */ unsigned long old = enable ? nop : branch; unsigned long new = enable ? branch : nop; - return ftrace_modify_code(pc, old, new, true); + return ftrace_modify_code(pc, old, new); } static int ftrace_modify_graph_caller(bool enable) diff --git a/trunk/arch/arm/kernel/head-nommu.S b/trunk/arch/arm/kernel/head-nommu.S index 278cfc144f44..d46f25968bec 100644 --- a/trunk/arch/arm/kernel/head-nommu.S +++ b/trunk/arch/arm/kernel/head-nommu.S @@ -17,8 +17,8 @@ #include #include #include -#include #include +#include /* * Kernel startup entry point. diff --git a/trunk/arch/arm/kernel/head.S b/trunk/arch/arm/kernel/head.S index 3bf0c7f8b043..6d5791144066 100644 --- a/trunk/arch/arm/kernel/head.S +++ b/trunk/arch/arm/kernel/head.S @@ -15,12 +15,12 @@ #include #include -#include #include #include #include #include #include +#include #include #ifdef CONFIG_DEBUG_LL @@ -265,7 +265,7 @@ __create_page_tables: str r6, [r3] #ifdef CONFIG_DEBUG_LL -#if !defined(CONFIG_DEBUG_ICEDCC) && !defined(CONFIG_DEBUG_SEMIHOSTING) +#ifndef CONFIG_DEBUG_ICEDCC /* * Map in IO space for serial debugging. * This allows debug messages to be output @@ -297,10 +297,10 @@ __create_page_tables: cmp r0, r6 blo 1b -#else /* CONFIG_DEBUG_ICEDCC || CONFIG_DEBUG_SEMIHOSTING */ - /* we don't need any serial debugging mappings */ +#else /* CONFIG_DEBUG_ICEDCC */ + /* we don't need any serial debugging mappings for ICEDCC */ ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags -#endif +#endif /* !CONFIG_DEBUG_ICEDCC */ #if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS) /* diff --git a/trunk/arch/arm/kernel/hw_breakpoint.c b/trunk/arch/arm/kernel/hw_breakpoint.c index ba386bd94107..d6a95ef9131d 100644 --- a/trunk/arch/arm/kernel/hw_breakpoint.c +++ b/trunk/arch/arm/kernel/hw_breakpoint.c @@ -34,6 +34,7 @@ #include #include #include +#include #include /* Breakpoint currently in use for each BRP. */ diff --git a/trunk/arch/arm/kernel/insn.c b/trunk/arch/arm/kernel/insn.c deleted file mode 100644 index ab312e516546..000000000000 --- a/trunk/arch/arm/kernel/insn.c +++ /dev/null @@ -1,61 +0,0 @@ -#include -#include - -static unsigned long -__arm_gen_branch_thumb2(unsigned long pc, unsigned long addr, bool link) -{ - unsigned long s, j1, j2, i1, i2, imm10, imm11; - unsigned long first, second; - long offset; - - offset = (long)addr - (long)(pc + 4); - if (offset < -16777216 || offset > 16777214) { - WARN_ON_ONCE(1); - return 0; - } - - s = (offset >> 24) & 0x1; - i1 = (offset >> 23) & 0x1; - i2 = (offset >> 22) & 0x1; - imm10 = (offset >> 12) & 0x3ff; - imm11 = (offset >> 1) & 0x7ff; - - j1 = (!i1) ^ s; - j2 = (!i2) ^ s; - - first = 0xf000 | (s << 10) | imm10; - second = 0x9000 | (j1 << 13) | (j2 << 11) | imm11; - if (link) - second |= 1 << 14; - - return __opcode_thumb32_compose(first, second); -} - -static unsigned long -__arm_gen_branch_arm(unsigned long pc, unsigned long addr, bool link) -{ - unsigned long opcode = 0xea000000; - long offset; - - if (link) - opcode |= 1 << 24; - - offset = (long)addr - (long)(pc + 8); - if (unlikely(offset < -33554432 || offset > 33554428)) { - WARN_ON_ONCE(1); - return 0; - } - - offset = (offset >> 2) & 0x00ffffff; - - return opcode | offset; -} - -unsigned long -__arm_gen_branch(unsigned long pc, unsigned long addr, bool link) -{ - if (IS_ENABLED(CONFIG_THUMB2_KERNEL)) - return __arm_gen_branch_thumb2(pc, addr, link); - else - return __arm_gen_branch_arm(pc, addr, link); -} diff --git a/trunk/arch/arm/kernel/insn.h b/trunk/arch/arm/kernel/insn.h deleted file mode 100644 index e96065da4dae..000000000000 --- a/trunk/arch/arm/kernel/insn.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef __ASM_ARM_INSN_H -#define __ASM_ARM_INSN_H - -static inline unsigned long -arm_gen_nop(void) -{ -#ifdef CONFIG_THUMB2_KERNEL - return 0xf3af8000; /* nop.w */ -#else - return 0xe1a00000; /* mov r0, r0 */ -#endif -} - -unsigned long -__arm_gen_branch(unsigned long pc, unsigned long addr, bool link); - -static inline unsigned long -arm_gen_branch(unsigned long pc, unsigned long addr) -{ - return __arm_gen_branch(pc, addr, false); -} - -static inline unsigned long -arm_gen_branch_link(unsigned long pc, unsigned long addr) -{ - return __arm_gen_branch(pc, addr, true); -} - -#endif diff --git a/trunk/arch/arm/kernel/irq.c b/trunk/arch/arm/kernel/irq.c index 71ccdbfed662..3efd82cc95f0 100644 --- a/trunk/arch/arm/kernel/irq.c +++ b/trunk/arch/arm/kernel/irq.c @@ -36,6 +36,7 @@ #include #include +#include #include #include #include @@ -180,7 +181,10 @@ void migrate_irqs(void) local_irq_save(flags); for_each_irq_desc(i, desc) { - bool affinity_broken; + bool affinity_broken = false; + + if (!desc) + continue; raw_spin_lock(&desc->lock); affinity_broken = migrate_one_irq(desc); diff --git a/trunk/arch/arm/kernel/jump_label.c b/trunk/arch/arm/kernel/jump_label.c deleted file mode 100644 index 4ce4f789446d..000000000000 --- a/trunk/arch/arm/kernel/jump_label.c +++ /dev/null @@ -1,39 +0,0 @@ -#include -#include - -#include "insn.h" -#include "patch.h" - -#ifdef HAVE_JUMP_LABEL - -static void __arch_jump_label_transform(struct jump_entry *entry, - enum jump_label_type type, - bool is_static) -{ - void *addr = (void *)entry->code; - unsigned int insn; - - if (type == JUMP_LABEL_ENABLE) - insn = arm_gen_branch(entry->code, entry->target); - else - insn = arm_gen_nop(); - - if (is_static) - __patch_text(addr, insn); - else - patch_text(addr, insn); -} - -void arch_jump_label_transform(struct jump_entry *entry, - enum jump_label_type type) -{ - __arch_jump_label_transform(entry, type, false); -} - -void arch_jump_label_transform_static(struct jump_entry *entry, - enum jump_label_type type) -{ - __arch_jump_label_transform(entry, type, true); -} - -#endif diff --git a/trunk/arch/arm/kernel/kprobes-common.c b/trunk/arch/arm/kernel/kprobes-common.c index 18a76282970e..a5394fb4e4e0 100644 --- a/trunk/arch/arm/kernel/kprobes-common.c +++ b/trunk/arch/arm/kernel/kprobes-common.c @@ -13,7 +13,6 @@ #include #include -#include #include "kprobes.h" diff --git a/trunk/arch/arm/kernel/kprobes.c b/trunk/arch/arm/kernel/kprobes.c index ab1869dac97a..129c1163248b 100644 --- a/trunk/arch/arm/kernel/kprobes.c +++ b/trunk/arch/arm/kernel/kprobes.c @@ -29,7 +29,6 @@ #include #include "kprobes.h" -#include "patch.h" #define MIN_STACK_SIZE(addr) \ min((unsigned long)MAX_STACK_SIZE, \ @@ -104,34 +103,58 @@ int __kprobes arch_prepare_kprobe(struct kprobe *p) return 0; } -void __kprobes arch_arm_kprobe(struct kprobe *p) -{ - unsigned int brkp; - void *addr; +#ifdef CONFIG_THUMB2_KERNEL - if (IS_ENABLED(CONFIG_THUMB2_KERNEL)) { - /* Remove any Thumb flag */ - addr = (void *)((uintptr_t)p->addr & ~1); +/* + * For a 32-bit Thumb breakpoint spanning two memory words we need to take + * special precautions to insert the breakpoint atomically, especially on SMP + * systems. This is achieved by calling this arming function using stop_machine. + */ +static int __kprobes set_t32_breakpoint(void *addr) +{ + ((u16 *)addr)[0] = KPROBE_THUMB32_BREAKPOINT_INSTRUCTION >> 16; + ((u16 *)addr)[1] = KPROBE_THUMB32_BREAKPOINT_INSTRUCTION & 0xffff; + flush_insns(addr, 2*sizeof(u16)); + return 0; +} - if (is_wide_instruction(p->opcode)) - brkp = KPROBE_THUMB32_BREAKPOINT_INSTRUCTION; - else - brkp = KPROBE_THUMB16_BREAKPOINT_INSTRUCTION; +void __kprobes arch_arm_kprobe(struct kprobe *p) +{ + uintptr_t addr = (uintptr_t)p->addr & ~1; /* Remove any Thumb flag */ + + if (!is_wide_instruction(p->opcode)) { + *(u16 *)addr = KPROBE_THUMB16_BREAKPOINT_INSTRUCTION; + flush_insns(addr, sizeof(u16)); + } else if (addr & 2) { + /* A 32-bit instruction spanning two words needs special care */ + stop_machine(set_t32_breakpoint, (void *)addr, &cpu_online_map); } else { - kprobe_opcode_t insn = p->opcode; - - addr = p->addr; - brkp = KPROBE_ARM_BREAKPOINT_INSTRUCTION; - - if (insn >= 0xe0000000) - brkp |= 0xe0000000; /* Unconditional instruction */ - else - brkp |= insn & 0xf0000000; /* Copy condition from insn */ + /* Word aligned 32-bit instruction can be written atomically */ + u32 bkp = KPROBE_THUMB32_BREAKPOINT_INSTRUCTION; +#ifndef __ARMEB__ /* Swap halfwords for little-endian */ + bkp = (bkp >> 16) | (bkp << 16); +#endif + *(u32 *)addr = bkp; + flush_insns(addr, sizeof(u32)); } +} - patch_text(addr, brkp); +#else /* !CONFIG_THUMB2_KERNEL */ + +void __kprobes arch_arm_kprobe(struct kprobe *p) +{ + kprobe_opcode_t insn = p->opcode; + kprobe_opcode_t brkp = KPROBE_ARM_BREAKPOINT_INSTRUCTION; + if (insn >= 0xe0000000) + brkp |= 0xe0000000; /* Unconditional instruction */ + else + brkp |= insn & 0xf0000000; /* Copy condition from insn */ + *p->addr = brkp; + flush_insns(p->addr, sizeof(p->addr[0])); } +#endif /* !CONFIG_THUMB2_KERNEL */ + /* * The actual disarming is done here on each CPU and synchronized using * stop_machine. This synchronization is necessary on SMP to avoid removing @@ -143,10 +166,25 @@ void __kprobes arch_arm_kprobe(struct kprobe *p) int __kprobes __arch_disarm_kprobe(void *p) { struct kprobe *kp = p; - void *addr = (void *)((uintptr_t)kp->addr & ~1); +#ifdef CONFIG_THUMB2_KERNEL + u16 *addr = (u16 *)((uintptr_t)kp->addr & ~1); + kprobe_opcode_t insn = kp->opcode; + unsigned int len; - __patch_text(addr, kp->opcode); + if (is_wide_instruction(insn)) { + ((u16 *)addr)[0] = insn>>16; + ((u16 *)addr)[1] = insn; + len = 2*sizeof(u16); + } else { + ((u16 *)addr)[0] = insn; + len = sizeof(u16); + } + flush_insns(addr, len); +#else /* !CONFIG_THUMB2_KERNEL */ + *kp->addr = kp->opcode; + flush_insns(kp->addr, sizeof(kp->addr[0])); +#endif return 0; } diff --git a/trunk/arch/arm/kernel/machine_kexec.c b/trunk/arch/arm/kernel/machine_kexec.c index dfcdb9f7c126..764bd456d84f 100644 --- a/trunk/arch/arm/kernel/machine_kexec.c +++ b/trunk/arch/arm/kernel/machine_kexec.c @@ -7,13 +7,12 @@ #include #include #include -#include #include #include #include #include #include -#include +#include extern const unsigned char relocate_new_kernel[]; extern const unsigned int relocate_new_kernel_size; @@ -54,29 +53,6 @@ void machine_crash_nonpanic_core(void *unused) cpu_relax(); } -static void machine_kexec_mask_interrupts(void) -{ - unsigned int i; - struct irq_desc *desc; - - for_each_irq_desc(i, desc) { - struct irq_chip *chip; - - chip = irq_desc_get_chip(desc); - if (!chip) - continue; - - if (chip->irq_eoi && irqd_irq_inprogress(&desc->irq_data)) - chip->irq_eoi(&desc->irq_data); - - if (chip->irq_mask) - chip->irq_mask(&desc->irq_data); - - if (chip->irq_disable && !irqd_irq_disabled(&desc->irq_data)) - chip->irq_disable(&desc->irq_data); - } -} - void machine_crash_shutdown(struct pt_regs *regs) { unsigned long msecs; @@ -94,7 +70,6 @@ void machine_crash_shutdown(struct pt_regs *regs) printk(KERN_WARNING "Non-crashing CPUs did not react to IPI\n"); crash_save_cpu(regs, smp_processor_id()); - machine_kexec_mask_interrupts(); printk(KERN_INFO "Loading crashdump kernel...\n"); } diff --git a/trunk/arch/arm/kernel/patch.c b/trunk/arch/arm/kernel/patch.c deleted file mode 100644 index 07314af47733..000000000000 --- a/trunk/arch/arm/kernel/patch.c +++ /dev/null @@ -1,75 +0,0 @@ -#include -#include -#include - -#include -#include -#include - -#include "patch.h" - -struct patch { - void *addr; - unsigned int insn; -}; - -void __kprobes __patch_text(void *addr, unsigned int insn) -{ - bool thumb2 = IS_ENABLED(CONFIG_THUMB2_KERNEL); - int size; - - if (thumb2 && __opcode_is_thumb16(insn)) { - *(u16 *)addr = __opcode_to_mem_thumb16(insn); - size = sizeof(u16); - } else if (thumb2 && ((uintptr_t)addr & 2)) { - u16 first = __opcode_thumb32_first(insn); - u16 second = __opcode_thumb32_second(insn); - u16 *addrh = addr; - - addrh[0] = __opcode_to_mem_thumb16(first); - addrh[1] = __opcode_to_mem_thumb16(second); - - size = sizeof(u32); - } else { - if (thumb2) - insn = __opcode_to_mem_thumb32(insn); - else - insn = __opcode_to_mem_arm(insn); - - *(u32 *)addr = insn; - size = sizeof(u32); - } - - flush_icache_range((uintptr_t)(addr), - (uintptr_t)(addr) + size); -} - -static int __kprobes patch_text_stop_machine(void *data) -{ - struct patch *patch = data; - - __patch_text(patch->addr, patch->insn); - - return 0; -} - -void __kprobes patch_text(void *addr, unsigned int insn) -{ - struct patch patch = { - .addr = addr, - .insn = insn, - }; - - if (cache_ops_need_broadcast()) { - stop_machine(patch_text_stop_machine, &patch, cpu_online_mask); - } else { - bool straddles_word = IS_ENABLED(CONFIG_THUMB2_KERNEL) - && __opcode_is_thumb32(insn) - && ((uintptr_t)addr & 2); - - if (straddles_word) - stop_machine(patch_text_stop_machine, &patch, NULL); - else - __patch_text(addr, insn); - } -} diff --git a/trunk/arch/arm/kernel/patch.h b/trunk/arch/arm/kernel/patch.h deleted file mode 100644 index b4731f2dac38..000000000000 --- a/trunk/arch/arm/kernel/patch.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _ARM_KERNEL_PATCH_H -#define _ARM_KERNEL_PATCH_H - -void patch_text(void *addr, unsigned int insn); -void __patch_text(void *addr, unsigned int insn); - -#endif diff --git a/trunk/arch/arm/kernel/perf_event.c b/trunk/arch/arm/kernel/perf_event.c index 186c8cb982c5..8a89d3b7626b 100644 --- a/trunk/arch/arm/kernel/perf_event.c +++ b/trunk/arch/arm/kernel/perf_event.c @@ -738,9 +738,6 @@ init_hw_perf_events(void) case 0xC0F0: /* Cortex-A15 */ cpu_pmu = armv7_a15_pmu_init(); break; - case 0xC070: /* Cortex-A7 */ - cpu_pmu = armv7_a7_pmu_init(); - break; } /* Intel CPUs [xscale]. */ } else if (0x69 == implementor) { diff --git a/trunk/arch/arm/kernel/perf_event_v7.c b/trunk/arch/arm/kernel/perf_event_v7.c index 00755d82e2f2..4d7095af2ab3 100644 --- a/trunk/arch/arm/kernel/perf_event_v7.c +++ b/trunk/arch/arm/kernel/perf_event_v7.c @@ -609,130 +609,6 @@ static const unsigned armv7_a15_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] }, }; -/* - * Cortex-A7 HW events mapping - */ -static const unsigned armv7_a7_perf_map[PERF_COUNT_HW_MAX] = { - [PERF_COUNT_HW_CPU_CYCLES] = ARMV7_PERFCTR_CPU_CYCLES, - [PERF_COUNT_HW_INSTRUCTIONS] = ARMV7_PERFCTR_INSTR_EXECUTED, - [PERF_COUNT_HW_CACHE_REFERENCES] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, - [PERF_COUNT_HW_CACHE_MISSES] = ARMV7_PERFCTR_L1_DCACHE_REFILL, - [PERF_COUNT_HW_BRANCH_INSTRUCTIONS] = ARMV7_PERFCTR_PC_WRITE, - [PERF_COUNT_HW_BRANCH_MISSES] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, - [PERF_COUNT_HW_BUS_CYCLES] = ARMV7_PERFCTR_BUS_CYCLES, - [PERF_COUNT_HW_STALLED_CYCLES_FRONTEND] = HW_OP_UNSUPPORTED, - [PERF_COUNT_HW_STALLED_CYCLES_BACKEND] = HW_OP_UNSUPPORTED, -}; - -static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX] - [PERF_COUNT_HW_CACHE_OP_MAX] - [PERF_COUNT_HW_CACHE_RESULT_MAX] = { - [C(L1D)] = { - /* - * The performance counters don't differentiate between read - * and write accesses/misses so this isn't strictly correct, - * but it's the best we can do. Writes and reads get - * combined. - */ - [C(OP_READ)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, - }, - [C(OP_WRITE)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_DCACHE_ACCESS, - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_DCACHE_REFILL, - }, - [C(OP_PREFETCH)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - }, - [C(L1I)] = { - [C(OP_READ)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, - }, - [C(OP_WRITE)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L1_ICACHE_ACCESS, - [C(RESULT_MISS)] = ARMV7_PERFCTR_L1_ICACHE_REFILL, - }, - [C(OP_PREFETCH)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - }, - [C(LL)] = { - [C(OP_READ)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_CACHE_ACCESS, - [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACHE_REFILL, - }, - [C(OP_WRITE)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_L2_CACHE_ACCESS, - [C(RESULT_MISS)] = ARMV7_PERFCTR_L2_CACHE_REFILL, - }, - [C(OP_PREFETCH)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - }, - [C(DTLB)] = { - [C(OP_READ)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = ARMV7_PERFCTR_DTLB_REFILL, - }, - [C(OP_WRITE)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = ARMV7_PERFCTR_DTLB_REFILL, - }, - [C(OP_PREFETCH)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - }, - [C(ITLB)] = { - [C(OP_READ)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, - }, - [C(OP_WRITE)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = ARMV7_PERFCTR_ITLB_REFILL, - }, - [C(OP_PREFETCH)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - }, - [C(BPU)] = { - [C(OP_READ)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, - [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, - }, - [C(OP_WRITE)] = { - [C(RESULT_ACCESS)] = ARMV7_PERFCTR_PC_BRANCH_PRED, - [C(RESULT_MISS)] = ARMV7_PERFCTR_PC_BRANCH_MIS_PRED, - }, - [C(OP_PREFETCH)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - }, - [C(NODE)] = { - [C(OP_READ)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - [C(OP_WRITE)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - [C(OP_PREFETCH)] = { - [C(RESULT_ACCESS)] = CACHE_OP_UNSUPPORTED, - [C(RESULT_MISS)] = CACHE_OP_UNSUPPORTED, - }, - }, -}; - /* * Perf Events' indices */ @@ -1228,12 +1104,6 @@ static int armv7_a15_map_event(struct perf_event *event) &armv7_a15_perf_cache_map, 0xFF); } -static int armv7_a7_map_event(struct perf_event *event) -{ - return map_cpu_event(event, &armv7_a7_perf_map, - &armv7_a7_perf_cache_map, 0xFF); -} - static struct arm_pmu armv7pmu = { .handle_irq = armv7pmu_handle_irq, .enable = armv7pmu_enable_event, @@ -1294,16 +1164,6 @@ static struct arm_pmu *__init armv7_a15_pmu_init(void) armv7pmu.set_event_filter = armv7pmu_set_event_filter; return &armv7pmu; } - -static struct arm_pmu *__init armv7_a7_pmu_init(void) -{ - armv7pmu.id = ARM_PERF_PMU_ID_CA7; - armv7pmu.name = "ARMv7 Cortex-A7"; - armv7pmu.map_event = armv7_a7_map_event; - armv7pmu.num_events = armv7_read_num_pmnc_events(); - armv7pmu.set_event_filter = armv7pmu_set_event_filter; - return &armv7pmu; -} #else static struct arm_pmu *__init armv7_a8_pmu_init(void) { @@ -1324,9 +1184,4 @@ static struct arm_pmu *__init armv7_a15_pmu_init(void) { return NULL; } - -static struct arm_pmu *__init armv7_a7_pmu_init(void) -{ - return NULL; -} #endif /* CONFIG_CPU_V7 */ diff --git a/trunk/arch/arm/kernel/process.c b/trunk/arch/arm/kernel/process.c index 2b7b017a20cd..d3eca4524533 100644 --- a/trunk/arch/arm/kernel/process.c +++ b/trunk/arch/arm/kernel/process.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -528,39 +529,21 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) #ifdef CONFIG_MMU /* * The vectors page is always readable from user space for the - * atomic helpers and the signal restart code. Insert it into the - * gate_vma so that it is visible through ptrace and /proc//mem. + * atomic helpers and the signal restart code. Let's declare a mapping + * for it so it is visible through ptrace and /proc//mem. */ -static struct vm_area_struct gate_vma; -static int __init gate_vma_init(void) +int vectors_user_mapping(void) { - gate_vma.vm_start = 0xffff0000; - gate_vma.vm_end = 0xffff0000 + PAGE_SIZE; - gate_vma.vm_page_prot = PAGE_READONLY_EXEC; - gate_vma.vm_flags = VM_READ | VM_EXEC | - VM_MAYREAD | VM_MAYEXEC; - return 0; -} -arch_initcall(gate_vma_init); - -struct vm_area_struct *get_gate_vma(struct mm_struct *mm) -{ - return &gate_vma; -} - -int in_gate_area(struct mm_struct *mm, unsigned long addr) -{ - return (addr >= gate_vma.vm_start) && (addr < gate_vma.vm_end); -} - -int in_gate_area_no_mm(unsigned long addr) -{ - return in_gate_area(NULL, addr); + struct mm_struct *mm = current->mm; + return install_special_mapping(mm, 0xffff0000, PAGE_SIZE, + VM_READ | VM_EXEC | + VM_MAYREAD | VM_MAYEXEC | VM_RESERVED, + NULL); } const char *arch_vma_name(struct vm_area_struct *vma) { - return (vma == &gate_vma) ? "[vectors]" : NULL; + return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL; } #endif diff --git a/trunk/arch/arm/kernel/ptrace.c b/trunk/arch/arm/kernel/ptrace.c index 45956c9d0ef0..ede6443c34d9 100644 --- a/trunk/arch/arm/kernel/ptrace.c +++ b/trunk/arch/arm/kernel/ptrace.c @@ -26,6 +26,7 @@ #include #include +#include #include #define REG_PC 15 diff --git a/trunk/arch/arm/kernel/sched_clock.c b/trunk/arch/arm/kernel/sched_clock.c index 27d186abbc06..5416c7c12528 100644 --- a/trunk/arch/arm/kernel/sched_clock.c +++ b/trunk/arch/arm/kernel/sched_clock.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include @@ -165,20 +164,3 @@ void __init sched_clock_postinit(void) sched_clock_poll(sched_clock_timer.data); } - -static int sched_clock_suspend(void) -{ - sched_clock_poll(sched_clock_timer.data); - return 0; -} - -static struct syscore_ops sched_clock_ops = { - .suspend = sched_clock_suspend, -}; - -static int __init sched_clock_syscore_init(void) -{ - register_syscore_ops(&sched_clock_ops); - return 0; -} -device_initcall(sched_clock_syscore_init); diff --git a/trunk/arch/arm/kernel/setup.c b/trunk/arch/arm/kernel/setup.c index b91411371ae1..a255c39612ca 100644 --- a/trunk/arch/arm/kernel/setup.c +++ b/trunk/arch/arm/kernel/setup.c @@ -33,7 +33,6 @@ #include #include -#include #include #include #include @@ -45,13 +44,12 @@ #include #include #include +#include #include #include #include #include -#include -#include #include #include #include @@ -976,6 +974,7 @@ void __init setup_arch(char **cmdline_p) conswitchp = &dummy_con; #endif #endif + early_trap_init(); if (mdesc->init_early) mdesc->init_early(); diff --git a/trunk/arch/arm/kernel/signal.c b/trunk/arch/arm/kernel/signal.c index 7cb532fc8aa4..9e617bd4a146 100644 --- a/trunk/arch/arm/kernel/signal.c +++ b/trunk/arch/arm/kernel/signal.c @@ -66,13 +66,12 @@ const unsigned long syscall_restart_code[2] = { */ asmlinkage int sys_sigsuspend(int restart, unsigned long oldmask, old_sigset_t mask) { - sigset_t blocked; - - current->saved_sigmask = current->blocked; - mask &= _BLOCKABLE; - siginitset(&blocked, mask); - set_current_blocked(&blocked); + spin_lock_irq(¤t->sighand->siglock); + current->saved_sigmask = current->blocked; + siginitset(¤t->blocked, mask); + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); current->state = TASK_INTERRUPTIBLE; schedule(); @@ -281,7 +280,10 @@ static int restore_sigframe(struct pt_regs *regs, struct sigframe __user *sf) err = __copy_from_user(&set, &sf->uc.uc_sigmask, sizeof(set)); if (err == 0) { sigdelsetmask(&set, ~_BLOCKABLE); - set_current_blocked(&set); + spin_lock_irq(¤t->sighand->siglock); + current->blocked = set; + recalc_sigpending(); + spin_unlock_irq(¤t->sighand->siglock); } __get_user_error(regs->ARM_r0, &sf->uc.uc_mcontext.arm_r0, err); @@ -634,7 +636,13 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, /* * Block the signal if we were successful. */ - block_sigmask(ka, sig); + spin_lock_irq(&tsk->sighand->siglock); + sigorsets(&tsk->blocked, &tsk->blocked, + &ka->sa.sa_mask); + if (!(ka->sa.sa_flags & SA_NODEFER)) + sigaddset(&tsk->blocked, sig); + recalc_sigpending(); + spin_unlock_irq(&tsk->sighand->siglock); return 0; } diff --git a/trunk/arch/arm/kernel/sleep.S b/trunk/arch/arm/kernel/sleep.S index 987dcf33415c..1f268bda4552 100644 --- a/trunk/arch/arm/kernel/sleep.S +++ b/trunk/arch/arm/kernel/sleep.S @@ -4,6 +4,7 @@ #include #include #include +#include .text /* diff --git a/trunk/arch/arm/kernel/smp.c b/trunk/arch/arm/kernel/smp.c index 2cee7d1eb958..8f8cce2c46c4 100644 --- a/trunk/arch/arm/kernel/smp.c +++ b/trunk/arch/arm/kernel/smp.c @@ -58,8 +58,6 @@ enum ipi_msg_type { IPI_CPU_STOP, }; -static DECLARE_COMPLETION(cpu_running); - int __cpuinit __cpu_up(unsigned int cpu) { struct cpuinfo_arm *ci = &per_cpu(cpu_data, cpu); @@ -100,12 +98,20 @@ int __cpuinit __cpu_up(unsigned int cpu) */ ret = boot_secondary(cpu, idle); if (ret == 0) { + unsigned long timeout; + /* * CPU was successfully started, wait for it * to come online or time out. */ - wait_for_completion_timeout(&cpu_running, - msecs_to_jiffies(1000)); + timeout = jiffies + HZ; + while (time_before(jiffies, timeout)) { + if (cpu_online(cpu)) + break; + + udelay(10); + barrier(); + } if (!cpu_online(cpu)) { pr_crit("CPU%u: failed to come online\n", cpu); @@ -282,10 +288,9 @@ asmlinkage void __cpuinit secondary_start_kernel(void) /* * OK, now it's safe to let the boot CPU continue. Wait for * the CPU migration code to notice that the CPU is online - * before we continue - which happens after __cpu_up returns. + * before we continue. */ set_cpu_online(cpu, true); - complete(&cpu_running); /* * Setup the percpu timer for this CPU. diff --git a/trunk/arch/arm/kernel/smp_tlb.c b/trunk/arch/arm/kernel/smp_tlb.c index 02c5d2ce23bf..7dcb35285be7 100644 --- a/trunk/arch/arm/kernel/smp_tlb.c +++ b/trunk/arch/arm/kernel/smp_tlb.c @@ -13,6 +13,18 @@ #include #include +static void on_each_cpu_mask(void (*func)(void *), void *info, int wait, + const struct cpumask *mask) +{ + preempt_disable(); + + smp_call_function_many(mask, func, info, wait); + if (cpumask_test_cpu(smp_processor_id(), mask)) + func(info); + + preempt_enable(); +} + /**********************************************************************/ /* @@ -75,7 +87,7 @@ void flush_tlb_all(void) void flush_tlb_mm(struct mm_struct *mm) { if (tlb_ops_need_broadcast()) - on_each_cpu_mask(mm_cpumask(mm), ipi_flush_tlb_mm, mm, 1); + on_each_cpu_mask(ipi_flush_tlb_mm, mm, 1, mm_cpumask(mm)); else local_flush_tlb_mm(mm); } @@ -86,8 +98,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) struct tlb_args ta; ta.ta_vma = vma; ta.ta_start = uaddr; - on_each_cpu_mask(mm_cpumask(vma->vm_mm), ipi_flush_tlb_page, - &ta, 1); + on_each_cpu_mask(ipi_flush_tlb_page, &ta, 1, mm_cpumask(vma->vm_mm)); } else local_flush_tlb_page(vma, uaddr); } @@ -110,8 +121,7 @@ void flush_tlb_range(struct vm_area_struct *vma, ta.ta_vma = vma; ta.ta_start = start; ta.ta_end = end; - on_each_cpu_mask(mm_cpumask(vma->vm_mm), ipi_flush_tlb_range, - &ta, 1); + on_each_cpu_mask(ipi_flush_tlb_range, &ta, 1, mm_cpumask(vma->vm_mm)); } else local_flush_tlb_range(vma, start, end); } diff --git a/trunk/arch/arm/kernel/tcm.c b/trunk/arch/arm/kernel/tcm.c index 30ae6bb4a310..01ec453bb924 100644 --- a/trunk/arch/arm/kernel/tcm.c +++ b/trunk/arch/arm/kernel/tcm.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "tcm.h" static struct gen_pool *tcm_pool; diff --git a/trunk/arch/arm/kernel/thumbee.c b/trunk/arch/arm/kernel/thumbee.c index aab899764053..9cb7aaca159f 100644 --- a/trunk/arch/arm/kernel/thumbee.c +++ b/trunk/arch/arm/kernel/thumbee.c @@ -20,7 +20,6 @@ #include #include -#include #include /* diff --git a/trunk/arch/arm/kernel/time.c b/trunk/arch/arm/kernel/time.c index fe31b22f18fd..8c57dd3680e9 100644 --- a/trunk/arch/arm/kernel/time.c +++ b/trunk/arch/arm/kernel/time.c @@ -25,6 +25,8 @@ #include #include +#include + #include #include #include @@ -147,6 +149,8 @@ void __init time_init(void) { system_timer = machine_desc->timer; system_timer->init(); +#ifdef CONFIG_HAVE_SCHED_CLOCK sched_clock_postinit(); +#endif } diff --git a/trunk/arch/arm/kernel/traps.c b/trunk/arch/arm/kernel/traps.c index 778454750a6c..f84dfe67724f 100644 --- a/trunk/arch/arm/kernel/traps.c +++ b/trunk/arch/arm/kernel/traps.c @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include #include -#include #include "signal.h" @@ -227,11 +227,6 @@ void show_stack(struct task_struct *tsk, unsigned long *sp) #else #define S_SMP "" #endif -#ifdef CONFIG_THUMB2_KERNEL -#define S_ISA " THUMB2" -#else -#define S_ISA " ARM" -#endif static int __die(const char *str, int err, struct thread_info *thread, struct pt_regs *regs) { @@ -239,8 +234,8 @@ static int __die(const char *str, int err, struct thread_info *thread, struct pt static int die_counter; int ret; - printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP - S_ISA "\n", str, err, ++die_counter); + printk(KERN_EMERG "Internal error: %s: %x [#%d]" S_PREEMPT S_SMP "\n", + str, err, ++die_counter); /* trap and error numbers are mostly meaningless on ARM */ ret = notify_die(DIE_OOPS, str, regs, err, tsk->thread.trap_no, SIGSEGV); @@ -789,16 +784,18 @@ static void __init kuser_get_tls_init(unsigned long vectors) memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); } -void __init early_trap_init(void *vectors_base) +void __init early_trap_init(void) { - unsigned long vectors = (unsigned long)vectors_base; +#if defined(CONFIG_CPU_USE_DOMAINS) + unsigned long vectors = CONFIG_VECTORS_BASE; +#else + unsigned long vectors = (unsigned long)vectors_page; +#endif extern char __stubs_start[], __stubs_end[]; extern char __vectors_start[], __vectors_end[]; extern char __kuser_helper_start[], __kuser_helper_end[]; int kuser_sz = __kuser_helper_end - __kuser_helper_start; - vectors_page = vectors_base; - /* * Copy the vectors, stubs and kuser helpers (in entry-armv.S) * into the vector page, mapped at 0xffff0000, and ensure these diff --git a/trunk/arch/arm/mach-at91/at91rm9200.c b/trunk/arch/arm/mach-at91/at91rm9200.c index 364c19357e60..0df1045311e4 100644 --- a/trunk/arch/arm/mach-at91/at91rm9200.c +++ b/trunk/arch/arm/mach-at91/at91rm9200.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-at91/at91sam9260.c b/trunk/arch/arm/mach-at91/at91sam9260.c index 46f774233298..d1e5750a6a04 100644 --- a/trunk/arch/arm/mach-at91/at91sam9260.c +++ b/trunk/arch/arm/mach-at91/at91sam9260.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-at91/at91sam9261.c b/trunk/arch/arm/mach-at91/at91sam9261.c index 7de81e6222f1..684c5dfd92ac 100644 --- a/trunk/arch/arm/mach-at91/at91sam9261.c +++ b/trunk/arch/arm/mach-at91/at91sam9261.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-at91/at91sam9263.c b/trunk/arch/arm/mach-at91/at91sam9263.c index ef301be66575..0b4fa5a7f685 100644 --- a/trunk/arch/arm/mach-at91/at91sam9263.c +++ b/trunk/arch/arm/mach-at91/at91sam9263.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-at91/at91sam9g45.c b/trunk/arch/arm/mach-at91/at91sam9g45.c index d222f8333dab..df3bceacc86c 100644 --- a/trunk/arch/arm/mach-at91/at91sam9g45.c +++ b/trunk/arch/arm/mach-at91/at91sam9g45.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-at91/at91sam9g45_devices.c b/trunk/arch/arm/mach-at91/at91sam9g45_devices.c index 698479f1e197..4320b2096789 100644 --- a/trunk/arch/arm/mach-at91/at91sam9g45_devices.c +++ b/trunk/arch/arm/mach-at91/at91sam9g45_devices.c @@ -437,6 +437,7 @@ void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) /* DMA slave channel configuration */ atslave->dma_dev = &at_hdmac_device.dev; + atslave->reg_width = AT_DMA_SLAVE_WIDTH_32BIT; atslave->cfg = ATC_FIFOCFG_HALFFIFO | ATC_SRC_H2SEL_HW | ATC_DST_H2SEL_HW; atslave->ctrla = ATC_SCSIZE_16 | ATC_DCSIZE_16; diff --git a/trunk/arch/arm/mach-at91/at91sam9rl.c b/trunk/arch/arm/mach-at91/at91sam9rl.c index d9f2774f385e..63d9372eb18e 100644 --- a/trunk/arch/arm/mach-at91/at91sam9rl.c +++ b/trunk/arch/arm/mach-at91/at91sam9rl.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/trunk/arch/arm/mach-at91/include/mach/at_hdmac.h b/trunk/arch/arm/mach-at91/include/mach/at_hdmac.h index fff48d1a0f4e..187cb58345c0 100644 --- a/trunk/arch/arm/mach-at91/include/mach/at_hdmac.h +++ b/trunk/arch/arm/mach-at91/include/mach/at_hdmac.h @@ -23,6 +23,18 @@ struct at_dma_platform_data { dma_cap_mask_t cap_mask; }; +/** + * enum at_dma_slave_width - DMA slave register access width. + * @AT_DMA_SLAVE_WIDTH_8BIT: Do 8-bit slave register accesses + * @AT_DMA_SLAVE_WIDTH_16BIT: Do 16-bit slave register accesses + * @AT_DMA_SLAVE_WIDTH_32BIT: Do 32-bit slave register accesses + */ +enum at_dma_slave_width { + AT_DMA_SLAVE_WIDTH_8BIT = 0, + AT_DMA_SLAVE_WIDTH_16BIT, + AT_DMA_SLAVE_WIDTH_32BIT, +}; + /** * struct at_dma_slave - Controller-specific information about a slave * @dma_dev: required DMA master device @@ -36,6 +48,9 @@ struct at_dma_platform_data { */ struct at_dma_slave { struct device *dma_dev; + dma_addr_t tx_reg; + dma_addr_t rx_reg; + enum at_dma_slave_width reg_width; u32 cfg; u32 ctrla; }; diff --git a/trunk/arch/arm/mach-at91/include/mach/io.h b/trunk/arch/arm/mach-at91/include/mach/io.h new file mode 100644 index 000000000000..4003001eca3d --- /dev/null +++ b/trunk/arch/arm/mach-at91/include/mach/io.h @@ -0,0 +1,31 @@ +/* + * arch/arm/mach-at91/include/mach/io.h + * + * Copyright (C) 2003 SAN People + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef __ASM_ARCH_IO_H +#define __ASM_ARCH_IO_H + +#include + +#define IO_SPACE_LIMIT 0xFFFFFFFF + +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) + +#endif diff --git a/trunk/arch/arm/mach-at91/include/mach/system_rev.h b/trunk/arch/arm/mach-at91/include/mach/system_rev.h index ef79a9aafc08..ec164a4124c9 100644 --- a/trunk/arch/arm/mach-at91/include/mach/system_rev.h +++ b/trunk/arch/arm/mach-at91/include/mach/system_rev.h @@ -7,8 +7,6 @@ #ifndef __ARCH_SYSTEM_REV_H__ #define __ARCH_SYSTEM_REV_H__ -#include - /* * board revision encoding * mach specific diff --git a/trunk/arch/arm/mach-at91/include/mach/uncompress.h b/trunk/arch/arm/mach-at91/include/mach/uncompress.h index 4218647c1fcd..0234fd9d20d6 100644 --- a/trunk/arch/arm/mach-at91/include/mach/uncompress.h +++ b/trunk/arch/arm/mach-at91/include/mach/uncompress.h @@ -23,7 +23,6 @@ #include #include -#include #if defined(CONFIG_AT91_EARLY_DBGU0) #define UART_OFFSET AT91_BASE_DBGU0 diff --git a/trunk/include/linux/mfd/anatop.h b/trunk/arch/arm/mach-bcmring/include/mach/io.h similarity index 57% rename from trunk/include/linux/mfd/anatop.h rename to trunk/arch/arm/mach-bcmring/include/mach/io.h index 22c1007d3ec5..dae5e9b166ea 100644 --- a/trunk/include/linux/mfd/anatop.h +++ b/trunk/arch/arm/mach-bcmring/include/mach/io.h @@ -1,8 +1,6 @@ /* - * anatop.h - Anatop MFD driver * - * Copyright (C) 2012 Ying-Chun Liu (PaulLiu) - * Copyright (C) 2012 Linaro + * Copyright (C) 1999 ARM Limited * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,23 +16,18 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H -#ifndef __LINUX_MFD_ANATOP_H -#define __LINUX_MFD_ANATOP_H +#include -#include +#define IO_SPACE_LIMIT 0xffffffff -/** - * anatop - MFD data - * @ioreg: ioremap register - * @reglock: spinlock for register read/write +/* + * We don't actually have real ISA nor PCI buses, but there is so many + * drivers out there that might just work if we fake them... */ -struct anatop { - void *ioreg; - spinlock_t reglock; -}; - -extern u32 anatop_get_bits(struct anatop *, u32, int, int); -extern void anatop_set_bits(struct anatop *, u32, int, int, u32); +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) -#endif /* __LINUX_MFD_ANATOP_H */ +#endif diff --git a/trunk/arch/arm/mach-clps711x/common.c b/trunk/arch/arm/mach-clps711x/common.c index 3c5b5bbf24e5..8736c1acc166 100644 --- a/trunk/arch/arm/mach-clps711x/common.c +++ b/trunk/arch/arm/mach-clps711x/common.c @@ -37,7 +37,6 @@ #include #include #include -#include /* * This maps the generic CLPS711x registers diff --git a/trunk/arch/arm/mach-clps711x/include/mach/io.h b/trunk/arch/arm/mach-clps711x/include/mach/io.h new file mode 100644 index 000000000000..2e0b3ced8f07 --- /dev/null +++ b/trunk/arch/arm/mach-clps711x/include/mach/io.h @@ -0,0 +1,36 @@ +/* + * arch/arm/mach-clps711x/include/mach/io.h + * + * Copyright (C) 1999 ARM Limited + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) + +/* + * We don't support ins[lb]/outs[lb]. Make them fault. + */ +#define __raw_readsb(p,d,l) do { *(int *)0 = 0; } while (0) +#define __raw_readsl(p,d,l) do { *(int *)0 = 0; } while (0) +#define __raw_writesb(p,d,l) do { *(int *)0 = 0; } while (0) +#define __raw_writesl(p,d,l) do { *(int *)0 = 0; } while (0) + +#endif diff --git a/trunk/arch/arm/mach-clps711x/include/mach/uncompress.h b/trunk/arch/arm/mach-clps711x/include/mach/uncompress.h index 35ed731b9f16..7164310dea7c 100644 --- a/trunk/arch/arm/mach-clps711x/include/mach/uncompress.h +++ b/trunk/arch/arm/mach-clps711x/include/mach/uncompress.h @@ -17,6 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include #include #include diff --git a/trunk/arch/arm/mach-clps711x/p720t-leds.c b/trunk/arch/arm/mach-clps711x/p720t-leds.c index dd9a6cdbeb02..15121446efc8 100644 --- a/trunk/arch/arm/mach-clps711x/p720t-leds.c +++ b/trunk/arch/arm/mach-clps711x/p720t-leds.c @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/trunk/arch/arm/mach-cns3xxx/core.c b/trunk/arch/arm/mach-cns3xxx/core.c index 031805b1428d..941a308e1253 100644 --- a/trunk/arch/arm/mach-cns3xxx/core.c +++ b/trunk/arch/arm/mach-cns3xxx/core.c @@ -72,13 +72,13 @@ void __init cns3xxx_map_io(void) /* used by entry-macro.S */ void __init cns3xxx_init_irq(void) { - gic_init(0, 29, IOMEM(CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT), - IOMEM(CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT)); + gic_init(0, 29, __io(CNS3XXX_TC11MP_GIC_DIST_BASE_VIRT), + __io(CNS3XXX_TC11MP_GIC_CPU_BASE_VIRT)); } void cns3xxx_power_off(void) { - u32 __iomem *pm_base = IOMEM(CNS3XXX_PM_BASE_VIRT); + u32 __iomem *pm_base = __io(CNS3XXX_PM_BASE_VIRT); u32 clkctrl; printk(KERN_INFO "powering system down...\n"); @@ -237,7 +237,7 @@ static void __init __cns3xxx_timer_init(unsigned int timer_irq) static void __init cns3xxx_timer_init(void) { - cns3xxx_tmr1 = IOMEM(CNS3XXX_TIMER1_2_3_BASE_VIRT); + cns3xxx_tmr1 = __io(CNS3XXX_TIMER1_2_3_BASE_VIRT); __cns3xxx_timer_init(IRQ_CNS3XXX_TIMER0); } diff --git a/trunk/arch/arm/mach-cns3xxx/devices.c b/trunk/arch/arm/mach-cns3xxx/devices.c index 1e40c99b015f..79d1fb02c23f 100644 --- a/trunk/arch/arm/mach-cns3xxx/devices.c +++ b/trunk/arch/arm/mach-cns3xxx/devices.c @@ -98,7 +98,7 @@ static struct platform_device cns3xxx_sdhci_pdev = { void __init cns3xxx_sdhci_init(void) { - u32 __iomem *gpioa = IOMEM(CNS3XXX_MISC_BASE_VIRT + 0x0014); + u32 __iomem *gpioa = __io(CNS3XXX_MISC_BASE_VIRT + 0x0014); u32 gpioa_pins = __raw_readl(gpioa); /* MMC/SD pins share with GPIOA */ diff --git a/trunk/arch/arm/mach-cns3xxx/include/mach/io.h b/trunk/arch/arm/mach-cns3xxx/include/mach/io.h new file mode 100644 index 000000000000..33b6fc1ece7c --- /dev/null +++ b/trunk/arch/arm/mach-cns3xxx/include/mach/io.h @@ -0,0 +1,17 @@ +/* + * Copyright 2008 Cavium Networks + * Copyright 2003 ARM Limited + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License, Version 2, as + * published by the Free Software Foundation. + */ +#ifndef __MACH_IO_H +#define __MACH_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) + +#endif diff --git a/trunk/arch/arm/mach-davinci/board-da850-evm.c b/trunk/arch/arm/mach-davinci/board-da850-evm.c index a70de24d1cbc..d5088900af6c 100644 --- a/trunk/arch/arm/mach-davinci/board-da850-evm.c +++ b/trunk/arch/arm/mach-davinci/board-da850-evm.c @@ -36,7 +36,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-davinci/include/mach/entry-macro.S b/trunk/arch/arm/mach-davinci/include/mach/entry-macro.S index 768b3c060214..c1661d2feca9 100644 --- a/trunk/arch/arm/mach-davinci/include/mach/entry-macro.S +++ b/trunk/arch/arm/mach-davinci/include/mach/entry-macro.S @@ -8,6 +8,7 @@ * is licensed "as is" without any warranty of any kind, whether express * or implied. */ +#include #include .macro get_irqnr_preamble, base, tmp diff --git a/trunk/arch/arm/mach-davinci/include/mach/hardware.h b/trunk/arch/arm/mach-davinci/include/mach/hardware.h index 2184691ebc2f..0209b1fc22a1 100644 --- a/trunk/arch/arm/mach-davinci/include/mach/hardware.h +++ b/trunk/arch/arm/mach-davinci/include/mach/hardware.h @@ -30,4 +30,10 @@ #define __IO_ADDRESS(x) ((x) + IO_OFFSET) #define IO_ADDRESS(pa) IOMEM(__IO_ADDRESS(pa)) +#ifdef __ASSEMBLER__ +#define IOMEM(x) x +#else +#define IOMEM(x) ((void __force __iomem *)(x)) +#endif + #endif /* __ASM_ARCH_HARDWARE_H */ diff --git a/trunk/arch/arm/mach-davinci/include/mach/io.h b/trunk/arch/arm/mach-davinci/include/mach/io.h new file mode 100644 index 000000000000..b2267d1e1a71 --- /dev/null +++ b/trunk/arch/arm/mach-davinci/include/mach/io.h @@ -0,0 +1,24 @@ +/* + * DaVinci IO address definitions + * + * Copied from include/asm/arm/arch-omap/io.h + * + * 2007 (c) MontaVista Software, Inc. This file is licensed under + * the terms of the GNU General Public License version 2. This program + * is licensed "as is" without any warranty of any kind, whether express + * or implied. + */ +#ifndef __ASM_ARCH_IO_H +#define __ASM_ARCH_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +/* + * We don't actually have real ISA nor PCI buses, but there is so many + * drivers out there that might just work if we fake them... + */ +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) +#define __mem_isa(a) (a) + +#endif /* __ASM_ARCH_IO_H */ diff --git a/trunk/arch/arm/mach-davinci/include/mach/uncompress.h b/trunk/arch/arm/mach-davinci/include/mach/uncompress.h index da2fb2c2155a..9dc7cf9664fe 100644 --- a/trunk/arch/arm/mach-davinci/include/mach/uncompress.h +++ b/trunk/arch/arm/mach-davinci/include/mach/uncompress.h @@ -25,8 +25,6 @@ #include -#define IOMEM(x) ((void __force __iomem *)(x)) - u32 *uart; /* PORT_16C550A, in polled non-fifo mode */ diff --git a/trunk/arch/arm/mach-davinci/time.c b/trunk/arch/arm/mach-davinci/time.c index 75da315b6587..e1969ce904dc 100644 --- a/trunk/arch/arm/mach-davinci/time.c +++ b/trunk/arch/arm/mach-davinci/time.c @@ -19,14 +19,11 @@ #include #include -#include +#include #include #include - #include -#include #include - #include "clock.h" static struct clock_event_device clockevent_davinci; @@ -275,9 +272,19 @@ static cycle_t read_cycles(struct clocksource *cs) return (cycles_t)timer32_read(t); } +/* + * Kernel assumes that sched_clock can be called early but may not have + * things ready yet. + */ +static cycle_t read_dummy(struct clocksource *cs) +{ + return 0; +} + + static struct clocksource clocksource_davinci = { .rating = 300, - .read = read_cycles, + .read = read_dummy, .mask = CLOCKSOURCE_MASK(32), .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; @@ -285,9 +292,12 @@ static struct clocksource clocksource_davinci = { /* * Overwrite weak default sched_clock with something more precise */ -static u32 notrace davinci_read_sched_clock(void) +unsigned long long notrace sched_clock(void) { - return timer32_read(&timers[TID_CLOCKSOURCE]); + const cycle_t cyc = clocksource_davinci.read(&clocksource_davinci); + + return clocksource_cyc2ns(cyc, clocksource_davinci.mult, + clocksource_davinci.shift); } /* @@ -387,14 +397,12 @@ static void __init davinci_timer_init(void) davinci_clock_tick_rate = clk_get_rate(timer_clk); /* setup clocksource */ + clocksource_davinci.read = read_cycles; clocksource_davinci.name = id_to_name[clocksource_id]; if (clocksource_register_hz(&clocksource_davinci, davinci_clock_tick_rate)) printk(err, clocksource_davinci.name); - setup_sched_clock(davinci_read_sched_clock, 32, - davinci_clock_tick_rate); - /* setup clockevent */ clockevent_davinci.name = id_to_name[timers[TID_CLOCKEVENT].id]; clockevent_davinci.mult = div_sc(davinci_clock_tick_rate, NSEC_PER_SEC, diff --git a/trunk/arch/arm/mach-dove/addr-map.c b/trunk/arch/arm/mach-dove/addr-map.c index 2a06c0163418..98b8c83b09ab 100644 --- a/trunk/arch/arm/mach-dove/addr-map.c +++ b/trunk/arch/arm/mach-dove/addr-map.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include "common.h" diff --git a/trunk/arch/arm/mach-dove/include/mach/io.h b/trunk/arch/arm/mach-dove/include/mach/io.h index 29c8b85355a5..eb4936ff90ad 100644 --- a/trunk/arch/arm/mach-dove/include/mach/io.h +++ b/trunk/arch/arm/mach-dove/include/mach/io.h @@ -15,5 +15,6 @@ #define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \ DOVE_PCIE0_IO_VIRT_BASE)) +#define __mem_pci(a) (a) #endif diff --git a/trunk/arch/arm/mach-ebsa110/core.c b/trunk/arch/arm/mach-ebsa110/core.c index 6f8068692edf..e400d75d11ae 100644 --- a/trunk/arch/arm/mach-ebsa110/core.c +++ b/trunk/arch/arm/mach-ebsa110/core.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -116,20 +116,6 @@ static void __init ebsa110_map_io(void) iotable_init(ebsa110_io_desc, ARRAY_SIZE(ebsa110_io_desc)); } -static void __iomem *ebsa110_ioremap_caller(unsigned long cookie, size_t size, - unsigned int flags, void *caller) -{ - return (void __iomem *)cookie; -} - -static void ebsa110_iounmap(volatile void __iomem *io_addr) -{} - -static void __init ebsa110_init_early(void) -{ - arch_ioremap_caller = ebsa110_ioremap_caller; - arch_iounmap = ebsa110_iounmap; -} #define PIT_CTRL (PIT_BASE + 0x0d) #define PIT_T2 (PIT_BASE + 0x09) @@ -326,7 +312,6 @@ MACHINE_START(EBSA110, "EBSA110") .reserve_lp2 = 1, .restart_mode = 's', .map_io = ebsa110_map_io, - .init_early = ebsa110_init_early, .init_irq = ebsa110_init_irq, .timer = &ebsa110_timer, .restart = ebsa110_restart, diff --git a/trunk/arch/arm/mach-ebsa110/include/mach/io.h b/trunk/arch/arm/mach-ebsa110/include/mach/io.h index 11bb0799424b..44679db672fb 100644 --- a/trunk/arch/arm/mach-ebsa110/include/mach/io.h +++ b/trunk/arch/arm/mach-ebsa110/include/mach/io.h @@ -62,6 +62,15 @@ void __writel(u32 val, void __iomem *addr); #define writew(v,b) __writew(v,b) #define writel(v,b) __writel(v,b) +static inline void __iomem *__arch_ioremap(unsigned long cookie, size_t size, + unsigned int flags) +{ + return (void __iomem *)cookie; +} + +#define __arch_ioremap __arch_ioremap +#define __arch_iounmap(cookie) do { } while (0) + extern void insb(unsigned int port, void *buf, int sz); extern void insw(unsigned int port, void *buf, int sz); extern void insl(unsigned int port, void *buf, int sz); diff --git a/trunk/arch/arm/mach-ebsa110/leds.c b/trunk/arch/arm/mach-ebsa110/leds.c index 99e14e362500..d43121a30aa7 100644 --- a/trunk/arch/arm/mach-ebsa110/leds.c +++ b/trunk/arch/arm/mach-ebsa110/leds.c @@ -17,6 +17,7 @@ #include #include +#include #include #include "core.h" diff --git a/trunk/arch/arm/mach-ep93xx/include/mach/io.h b/trunk/arch/arm/mach-ep93xx/include/mach/io.h new file mode 100644 index 000000000000..594b77f21054 --- /dev/null +++ b/trunk/arch/arm/mach-ep93xx/include/mach/io.h @@ -0,0 +1,22 @@ +/* + * arch/arm/mach-ep93xx/include/mach/io.h + */ + +#ifndef __ASM_MACH_IO_H +#define __ASM_MACH_IO_H + +#define IO_SPACE_LIMIT 0xffffffff + +#define __io(p) __typesafe_io(p) +#define __mem_pci(p) (p) + +/* + * A typesafe __io() variation for variable initialisers + */ +#ifdef __ASSEMBLER__ +#define IOMEM(p) p +#else +#define IOMEM(p) ((void __iomem __force *)(p)) +#endif + +#endif /* __ASM_MACH_IO_H */ diff --git a/trunk/arch/arm/mach-exynos/hotplug.c b/trunk/arch/arm/mach-exynos/hotplug.c index 9c17a0a43858..dd1ad55524c9 100644 --- a/trunk/arch/arm/mach-exynos/hotplug.c +++ b/trunk/arch/arm/mach-exynos/hotplug.c @@ -16,7 +16,6 @@ #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-exynos/include/mach/io.h b/trunk/arch/arm/mach-exynos/include/mach/io.h new file mode 100644 index 000000000000..d5478d247535 --- /dev/null +++ b/trunk/arch/arm/mach-exynos/include/mach/io.h @@ -0,0 +1,26 @@ +/* linux/arch/arm/mach-exynos4/include/mach/io.h + * + * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Copyright 2008-2010 Ben Dooks + * + * Based on arch/arm/mach-s5p6442/include/mach/io.h + * + * Default IO routines for EXYNOS4 + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +*/ + +#ifndef __ASM_ARM_ARCH_IO_H +#define __ASM_ARM_ARCH_IO_H __FILE__ + +/* No current ISA/PCI bus support. */ +#define __io(a) __typesafe_io(a) +#define __mem_pci(a) (a) + +#define IO_SPACE_LIMIT (0xFFFFFFFF) + +#endif /* __ASM_ARM_ARCH_IO_H */ diff --git a/trunk/arch/arm/mach-exynos/mach-nuri.c b/trunk/arch/arm/mach-exynos/mach-nuri.c index b3982c867c9c..82ea6fccfb34 100644 --- a/trunk/arch/arm/mach-exynos/mach-nuri.c +++ b/trunk/arch/arm/mach-exynos/mach-nuri.c @@ -111,7 +111,7 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = { .max_width = 8, .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | - MMC_CAP_ERASE), + MMC_CAP_DISABLE | MMC_CAP_ERASE), .cd_type = S3C_SDHCI_CD_PERMANENT, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, }; @@ -150,7 +150,8 @@ static struct platform_device emmc_fixed_voltage = { static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = { .max_width = 4, .host_caps = MMC_CAP_4_BIT_DATA | - MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, + MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | + MMC_CAP_DISABLE, .ext_cd_gpio = EXYNOS4_GPX3(3), /* XEINT_27 */ .ext_cd_gpio_invert = 1, .cd_type = S3C_SDHCI_CD_GPIO, diff --git a/trunk/arch/arm/mach-exynos/mach-universal_c210.c b/trunk/arch/arm/mach-exynos/mach-universal_c210.c index 6bb9dbdd73fd..28658da9f423 100644 --- a/trunk/arch/arm/mach-exynos/mach-universal_c210.c +++ b/trunk/arch/arm/mach-exynos/mach-universal_c210.c @@ -745,7 +745,8 @@ static struct platform_device universal_gpio_keys = { static struct s3c_sdhci_platdata universal_hsmmc0_data __initdata = { .max_width = 8, .host_caps = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA | - MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED), + MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | + MMC_CAP_DISABLE), .cd_type = S3C_SDHCI_CD_PERMANENT, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, }; @@ -783,7 +784,8 @@ static struct platform_device mmc0_fixed_voltage = { static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = { .max_width = 4, .host_caps = MMC_CAP_4_BIT_DATA | - MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, + MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | + MMC_CAP_DISABLE, .ext_cd_gpio = EXYNOS4_GPX3(4), /* XEINT_28 */ .ext_cd_gpio_invert = 1, .cd_type = S3C_SDHCI_CD_GPIO, @@ -794,7 +796,8 @@ static struct s3c_sdhci_platdata universal_hsmmc2_data __initdata = { static struct s3c_sdhci_platdata universal_hsmmc3_data __initdata = { .max_width = 4, .host_caps = MMC_CAP_4_BIT_DATA | - MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED, + MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | + MMC_CAP_DISABLE, .cd_type = S3C_SDHCI_CD_EXTERNAL, }; diff --git a/trunk/arch/arm/mach-footbridge/common.c b/trunk/arch/arm/mach-footbridge/common.c index 3e6aaa6361da..41978ee4f9d0 100644 --- a/trunk/arch/arm/mach-footbridge/common.c +++ b/trunk/arch/arm/mach-footbridge/common.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/trunk/arch/arm/mach-footbridge/dc21285-timer.c b/trunk/arch/arm/mach-footbridge/dc21285-timer.c index 3b54196447c7..121ad1d4fa39 100644 --- a/trunk/arch/arm/mach-footbridge/dc21285-timer.c +++ b/trunk/arch/arm/mach-footbridge/dc21285-timer.c @@ -14,7 +14,6 @@ #include #include -#include #include "common.h" diff --git a/trunk/arch/arm/mach-footbridge/dc21285.c b/trunk/arch/arm/mach-footbridge/dc21285.c index e17e11de4f5e..3194d3f73503 100644 --- a/trunk/arch/arm/mach-footbridge/dc21285.c +++ b/trunk/arch/arm/mach-footbridge/dc21285.c @@ -21,6 +21,7 @@ #include