aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-04-08 12:26:15 -0400
committerArnd Bergmann <arnd@arndb.de>2013-04-08 12:26:15 -0400
commite9069cf8b74b50d804fd540a9fd1383504f4af93 (patch)
tree0b3a30308ffc00a73f681bfdf19214b5ba9ae5a6 /arch
parent4680ebc2c90f663ba70c6bb3d8596b0f2c4dfa9e (diff)
parentce63d6d4bb9f601de32d4b99f925a65182521873 (diff)
Merge tag 'vt8500/pinctrl' of git://server.prisktech.co.nz/git/linuxwmt into next/drivers
From Tony Prisk <linux@prisktech.co.nz>: arm: vt8500: Add pinctrl driver for arch-vt8500 This series adds support for the pinctrl/gpio module on all arch-vt8500 supported SoCs. As part of the review process, some tidy up is also done to drivers/of/base.c to remove some code that is being constantly duplicated. Also, a patch for the bcm2835 pinctrl driver is included to take advantage of the new of/base.c code. * tag 'vt8500/pinctrl' of git://server.prisktech.co.nz/git/linuxwmt: (606 commits) pinctrl: bcm2835: make use of of_property_read_u32_index() gpio: vt8500: Remove arch-vt8500 gpio driver arm: vt8500: Remove gpio devicetree nodes arm: dts: vt8500: Update Wondermedia SoC dtsi files for pinctrl driver pinctrl: gpio: vt8500: Add pincontrol driver for arch-vt8500 arm: vt8500: Increase available GPIOs on arch-vt8500 of: Remove duplicated code for validating property and value of: Add support for reading a u32 from a multi-value property. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/Kconfig7
-rw-r--r--arch/alpha/Kconfig2
-rw-r--r--arch/arm/Kconfig23
-rw-r--r--arch/arm/Kconfig.debug2
-rw-r--r--arch/arm/boot/Makefile2
-rw-r--r--arch/arm/boot/dts/armada-370-rd.dts8
-rw-r--r--arch/arm/boot/dts/armada-370-xp.dtsi5
-rw-r--r--arch/arm/boot/dts/armada-xp.dtsi4
-rw-r--r--arch/arm/boot/dts/at91sam9x5.dtsi28
-rw-r--r--arch/arm/boot/dts/bcm2835.dtsi2
-rw-r--r--arch/arm/boot/dts/dbx5x0.dtsi3
-rw-r--r--arch/arm/boot/dts/dove.dtsi5
-rw-r--r--arch/arm/boot/dts/exynos4.dtsi9
-rw-r--r--arch/arm/boot/dts/exynos5440.dtsi6
-rw-r--r--arch/arm/boot/dts/href.dtsi2
-rw-r--r--arch/arm/boot/dts/hrefv60plus.dts2
-rw-r--r--arch/arm/boot/dts/imx53-mba53.dts3
-rw-r--r--arch/arm/boot/dts/kirkwood-dns320.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-dns325.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-dockstar.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-dreamplug.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-goflexnet.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ib62x0.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-iconnect.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-km_kirkwood.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-lschlv2.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-lsxhl.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-mplcec4.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2-common.dtsi1
-rw-r--r--arch/arm/boot/dts/kirkwood-nsa310.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood-openblocks_a6.dts2
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts1
-rw-r--r--arch/arm/boot/dts/kirkwood.dtsi5
-rw-r--r--arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts2
-rw-r--r--arch/arm/boot/dts/snowball.dts2
-rw-r--r--arch/arm/boot/dts/socfpga.dtsi3
-rw-r--r--arch/arm/boot/dts/tegra20.dtsi1
-rw-r--r--arch/arm/boot/dts/tegra30.dtsi1
-rw-r--r--arch/arm/boot/dts/vt8500.dtsi10
-rw-r--r--arch/arm/boot/dts/wm8505.dtsi10
-rw-r--r--arch/arm/boot/dts/wm8650.dtsi10
-rw-r--r--arch/arm/boot/dts/wm8850.dtsi10
-rw-r--r--arch/arm/configs/mxs_defconfig1
-rw-r--r--arch/arm/configs/omap2plus_defconfig2
-rw-r--r--arch/arm/include/asm/xen/events.h25
-rw-r--r--arch/arm/kernel/smp.c2
-rw-r--r--arch/arm/lib/memset.S33
-rw-r--r--arch/arm/mach-at91/board-foxg20.c1
-rw-r--r--arch/arm/mach-at91/board-stamp9g20.c1
-rw-r--r--arch/arm/mach-at91/include/mach/gpio.h8
-rw-r--r--arch/arm/mach-at91/irq.c20
-rw-r--r--arch/arm/mach-at91/pm.c10
-rw-r--r--arch/arm/mach-davinci/dma.c3
-rw-r--r--arch/arm/mach-footbridge/Kconfig1
-rw-r--r--arch/arm/mach-imx/clk-imx35.c1
-rw-r--r--arch/arm/mach-imx/clk-imx6q.c2
-rw-r--r--arch/arm/mach-imx/headsmp.S18
-rw-r--r--arch/arm/mach-imx/imx25-dt.c5
-rw-r--r--arch/arm/mach-imx/pm-imx6q.c15
-rw-r--r--arch/arm/mach-ixp4xx/vulcan-setup.c1
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c25
-rw-r--r--arch/arm/mach-mmp/gplugd.c1
-rw-r--r--arch/arm/mach-mxs/icoll.c2
-rw-r--r--arch/arm/mach-mxs/mach-mxs.c10
-rw-r--r--arch/arm/mach-mxs/mm.c1
-rw-r--r--arch/arm/mach-mxs/ocotp.c1
-rw-r--r--arch/arm/mach-omap1/common.h2
-rw-r--r--arch/arm/mach-omap2/Kconfig6
-rw-r--r--arch/arm/mach-omap2/board-generic.c2
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
-rw-r--r--arch/arm/mach-omap2/common.h1
-rw-r--r--arch/arm/mach-omap2/gpmc.c6
-rw-r--r--arch/arm/mach-omap2/mux.c9
-rw-r--r--arch/arm/mach-pxa/raumfeld.c1
-rw-r--r--arch/arm/mach-s5pv210/clock.c36
-rw-r--r--arch/arm/mach-s5pv210/mach-goni.c2
-rw-r--r--arch/arm/mach-shmobile/board-marzen.c1
-rw-r--r--arch/arm/mach-spear3xx/spear3xx.c2
-rw-r--r--arch/arm/mach-vt8500/Kconfig1
-rw-r--r--arch/arm/mm/dma-mapping.c5
-rw-r--r--arch/arm/net/bpf_jit_32.c2
-rw-r--r--arch/arm/plat-orion/addr-map.c7
-rw-r--r--arch/arm/plat-spear/Kconfig2
-rw-r--r--arch/arm64/Kconfig1
-rw-r--r--arch/arm64/Kconfig.debug11
-rw-r--r--arch/arm64/configs/defconfig1
-rw-r--r--arch/arm64/include/asm/ucontext.h2
-rw-r--r--arch/arm64/kernel/arm64ksyms.c2
-rw-r--r--arch/arm64/kernel/signal32.c1
-rw-r--r--arch/avr32/Kconfig2
-rw-r--r--arch/blackfin/Kconfig2
-rw-r--r--arch/cris/Kconfig2
-rw-r--r--arch/frv/Kconfig2
-rw-r--r--arch/h8300/Kconfig2
-rw-r--r--arch/ia64/Kconfig2
-rw-r--r--arch/m32r/Kconfig2
-rw-r--r--arch/m32r/include/uapi/asm/stat.h4
-rw-r--r--arch/m68k/Kconfig2
-rw-r--r--arch/m68k/Kconfig.machine1
-rw-r--r--arch/m68k/include/asm/MC68328.h10
-rw-r--r--arch/m68k/kernel/setup_no.c3
-rw-r--r--arch/m68k/mm/init.c2
-rw-r--r--arch/m68k/platform/coldfire/m528x.c2
-rw-r--r--arch/microblaze/Kconfig2
-rw-r--r--arch/mips/Kconfig2
-rw-r--r--arch/mn10300/Kconfig2
-rw-r--r--arch/openrisc/Kconfig3
-rw-r--r--arch/parisc/Kconfig2
-rw-r--r--arch/powerpc/Kconfig3
-rw-r--r--arch/powerpc/include/asm/mmu-hash64.h128
-rw-r--r--arch/powerpc/kernel/cputable.c2
-rw-r--r--arch/powerpc/kernel/exceptions-64s.S34
-rw-r--r--arch/powerpc/kernel/prom_init.c14
-rw-r--r--arch/powerpc/kernel/ptrace.c1
-rw-r--r--arch/powerpc/kvm/book3s_64_mmu_host.c4
-rw-r--r--arch/powerpc/mm/hash_utils_64.c22
-rw-r--r--arch/powerpc/mm/mmu_context_hash64.c11
-rw-r--r--arch/powerpc/mm/pgtable_64.c2
-rw-r--r--arch/powerpc/mm/slb_low.S50
-rw-r--r--arch/powerpc/mm/tlb_hash64.c2
-rw-r--r--arch/powerpc/perf/power7-pmu.c13
-rw-r--r--arch/powerpc/platforms/85xx/sgy_cts1000.c6
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype6
-rw-r--r--arch/s390/Kconfig2
-rw-r--r--arch/s390/include/asm/cpu_mf.h1
-rw-r--r--arch/s390/include/asm/eadm.h6
-rw-r--r--arch/s390/include/asm/tlbflush.h2
-rw-r--r--arch/s390/kernel/entry.S3
-rw-r--r--arch/s390/kernel/entry64.S5
-rw-r--r--arch/s390/kernel/setup.c2
-rw-r--r--arch/score/Kconfig2
-rw-r--r--arch/sparc/Kconfig8
-rw-r--r--arch/sparc/include/asm/spitfire.h1
-rw-r--r--arch/sparc/kernel/cpu.c6
-rw-r--r--arch/sparc/kernel/head_64.S25
-rw-r--r--arch/sparc/kernel/leon_pci_grpci2.c41
-rw-r--r--arch/tile/Kconfig2
-rw-r--r--arch/tile/configs/tilegx_defconfig1
-rw-r--r--arch/tile/configs/tilepro_defconfig1
-rw-r--r--arch/um/drivers/chan.h2
-rw-r--r--arch/um/drivers/chan_kern.c4
-rw-r--r--arch/um/drivers/chan_user.c12
-rw-r--r--arch/um/drivers/chan_user.h6
-rw-r--r--arch/um/drivers/line.c42
-rw-r--r--arch/um/drivers/net_kern.c2
-rw-r--r--arch/um/drivers/ssl.c1
-rw-r--r--arch/um/drivers/stdio_console.c1
-rw-r--r--arch/um/os-Linux/signal.c2
-rw-r--r--arch/um/os-Linux/start_up.c2
-rw-r--r--arch/unicore32/Kconfig2
-rw-r--r--arch/x86/Kconfig2
-rw-r--r--arch/x86/include/asm/kprobes.h1
-rw-r--r--arch/x86/include/asm/kvm_host.h4
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel.c4
-rw-r--r--arch/x86/kernel/cpu/perf_event_intel_ds.c10
-rw-r--r--arch/x86/kernel/kprobes/core.c5
-rw-r--r--arch/x86/kvm/x86.c64
-rw-r--r--arch/x86/power/cpu.c2
-rw-r--r--arch/xtensa/Kconfig2
160 files changed, 620 insertions, 484 deletions
diff --git a/arch/Kconfig b/arch/Kconfig
index 5a1779c93940..1455579791ec 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -319,13 +319,6 @@ config ARCH_WANT_OLD_COMPAT_IPC
319 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION 319 select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
320 bool 320 bool
321 321
322config HAVE_VIRT_TO_BUS
323 bool
324 help
325 An architecture should select this if it implements the
326 deprecated interface virt_to_bus(). All new architectures
327 should probably not select this.
328
329config HAVE_ARCH_SECCOMP_FILTER 322config HAVE_ARCH_SECCOMP_FILTER
330 bool 323 bool
331 help 324 help
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 5833aa441481..8a33ba01301f 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -9,7 +9,7 @@ config ALPHA
9 select HAVE_PERF_EVENTS 9 select HAVE_PERF_EVENTS
10 select HAVE_DMA_ATTRS 10 select HAVE_DMA_ATTRS
11 select HAVE_GENERIC_HARDIRQS 11 select HAVE_GENERIC_HARDIRQS
12 select HAVE_VIRT_TO_BUS 12 select VIRT_TO_BUS
13 select GENERIC_IRQ_PROBE 13 select GENERIC_IRQ_PROBE
14 select AUTO_IRQ_AFFINITY if SMP 14 select AUTO_IRQ_AFFINITY if SMP
15 select GENERIC_IRQ_SHOW 15 select GENERIC_IRQ_SHOW
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 46fcfa8805f8..c6a82c74fcbb 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -49,7 +49,6 @@ config ARM
49 select HAVE_REGS_AND_STACK_ACCESS_API 49 select HAVE_REGS_AND_STACK_ACCESS_API
50 select HAVE_SYSCALL_TRACEPOINTS 50 select HAVE_SYSCALL_TRACEPOINTS
51 select HAVE_UID16 51 select HAVE_UID16
52 select HAVE_VIRT_TO_BUS
53 select KTIME_SCALAR 52 select KTIME_SCALAR
54 select PERF_USE_VMALLOC 53 select PERF_USE_VMALLOC
55 select RTC_LIB 54 select RTC_LIB
@@ -556,7 +555,6 @@ config ARCH_IXP4XX
556config ARCH_DOVE 555config ARCH_DOVE
557 bool "Marvell Dove" 556 bool "Marvell Dove"
558 select ARCH_REQUIRE_GPIOLIB 557 select ARCH_REQUIRE_GPIOLIB
559 select COMMON_CLK_DOVE
560 select CPU_V7 558 select CPU_V7
561 select GENERIC_CLOCKEVENTS 559 select GENERIC_CLOCKEVENTS
562 select MIGHT_HAVE_PCI 560 select MIGHT_HAVE_PCI
@@ -744,6 +742,7 @@ config ARCH_RPC
744 select NEED_MACH_IO_H 742 select NEED_MACH_IO_H
745 select NEED_MACH_MEMORY_H 743 select NEED_MACH_MEMORY_H
746 select NO_IOPORT 744 select NO_IOPORT
745 select VIRT_TO_BUS
747 help 746 help
748 On the Acorn Risc-PC, Linux can support the internal IDE disk and 747 On the Acorn Risc-PC, Linux can support the internal IDE disk and
749 CD-ROM interface, serial and parallel port, and the floppy drive. 748 CD-ROM interface, serial and parallel port, and the floppy drive.
@@ -884,6 +883,7 @@ config ARCH_SHARK
884 select ISA_DMA 883 select ISA_DMA
885 select NEED_MACH_MEMORY_H 884 select NEED_MACH_MEMORY_H
886 select PCI 885 select PCI
886 select VIRT_TO_BUS
887 select ZONE_DMA 887 select ZONE_DMA
888 help 888 help
889 Support for the StrongARM based Digital DNARD machine, also known 889 Support for the StrongARM based Digital DNARD machine, also known
@@ -1011,12 +1011,12 @@ config ARCH_MULTI_V4_V5
1011 bool 1011 bool
1012 1012
1013config ARCH_MULTI_V6 1013config ARCH_MULTI_V6
1014 bool "ARMv6 based platforms (ARM11, Scorpion, ...)" 1014 bool "ARMv6 based platforms (ARM11)"
1015 select ARCH_MULTI_V6_V7 1015 select ARCH_MULTI_V6_V7
1016 select CPU_V6 1016 select CPU_V6
1017 1017
1018config ARCH_MULTI_V7 1018config ARCH_MULTI_V7
1019 bool "ARMv7 based platforms (Cortex-A, PJ4, Krait)" 1019 bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"
1020 default y 1020 default y
1021 select ARCH_MULTI_V6_V7 1021 select ARCH_MULTI_V6_V7
1022 select ARCH_VEXPRESS 1022 select ARCH_VEXPRESS
@@ -1467,10 +1467,6 @@ config ISA_DMA
1467 bool 1467 bool
1468 select ISA_DMA_API 1468 select ISA_DMA_API
1469 1469
1470config ARCH_NO_VIRT_TO_BUS
1471 def_bool y
1472 depends on !ARCH_RPC && !ARCH_NETWINDER && !ARCH_SHARK
1473
1474# Select ISA DMA interface 1470# Select ISA DMA interface
1475config ISA_DMA_API 1471config ISA_DMA_API
1476 bool 1472 bool
@@ -1662,13 +1658,17 @@ config LOCAL_TIMERS
1662 accounting to be spread across the timer interval, preventing a 1658 accounting to be spread across the timer interval, preventing a
1663 "thundering herd" at every timer tick. 1659 "thundering herd" at every timer tick.
1664 1660
1661# The GPIO number here must be sorted by descending number. In case of
1662# a multiplatform kernel, we just want the highest value required by the
1663# selected platforms.
1665config ARCH_NR_GPIO 1664config ARCH_NR_GPIO
1666 int 1665 int
1667 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA 1666 default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
1667 default 512 if SOC_OMAP5
1668 default 355 if ARCH_U8500 1668 default 355 if ARCH_U8500
1669 default 352 if ARCH_VT8500
1670 default 288 if ARCH_SUNXI
1669 default 264 if MACH_H4700 1671 default 264 if MACH_H4700
1670 default 512 if SOC_OMAP5
1671 default 288 if ARCH_VT8500 || ARCH_SUNXI
1672 default 0 1672 default 0
1673 help 1673 help
1674 Maximum number of GPIOs in the system. 1674 Maximum number of GPIOs in the system.
@@ -1892,8 +1892,9 @@ config XEN_DOM0
1892 1892
1893config XEN 1893config XEN
1894 bool "Xen guest support on ARM (EXPERIMENTAL)" 1894 bool "Xen guest support on ARM (EXPERIMENTAL)"
1895 depends on ARM && OF 1895 depends on ARM && AEABI && OF
1896 depends on CPU_V7 && !CPU_V6 1896 depends on CPU_V7 && !CPU_V6
1897 depends on !GENERIC_ATOMIC64
1897 help 1898 help
1898 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. 1899 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
1899 1900
diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
index acddddac7ee4..ecfcdba2d17c 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -492,7 +492,7 @@ config DEBUG_IMX_UART_PORT
492 DEBUG_IMX31_UART || \ 492 DEBUG_IMX31_UART || \
493 DEBUG_IMX35_UART || \ 493 DEBUG_IMX35_UART || \
494 DEBUG_IMX51_UART || \ 494 DEBUG_IMX51_UART || \
495 DEBUG_IMX50_IMX53_UART || \ 495 DEBUG_IMX53_UART || \
496 DEBUG_IMX6Q_UART 496 DEBUG_IMX6Q_UART
497 default 1 497 default 1
498 help 498 help
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index 71768b8a1ab9..84aa2caf07ed 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
@@ -115,4 +115,4 @@ i:
115 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \ 115 $(CONFIG_SHELL) $(srctree)/$(src)/install.sh $(KERNELRELEASE) \
116 $(obj)/Image System.map "$(INSTALL_PATH)" 116 $(obj)/Image System.map "$(INSTALL_PATH)"
117 117
118subdir- := bootp compressed 118subdir- := bootp compressed dts
diff --git a/arch/arm/boot/dts/armada-370-rd.dts b/arch/arm/boot/dts/armada-370-rd.dts
index f8e4855bc9a5..070bba4f2585 100644
--- a/arch/arm/boot/dts/armada-370-rd.dts
+++ b/arch/arm/boot/dts/armada-370-rd.dts
@@ -64,5 +64,13 @@
64 status = "okay"; 64 status = "okay";
65 /* No CD or WP GPIOs */ 65 /* No CD or WP GPIOs */
66 }; 66 };
67
68 usb@d0050000 {
69 status = "okay";
70 };
71
72 usb@d0051000 {
73 status = "okay";
74 };
67 }; 75 };
68}; 76};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 6f1acc75e155..5b708208b607 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -31,7 +31,6 @@
31 mpic: interrupt-controller@d0020000 { 31 mpic: interrupt-controller@d0020000 {
32 compatible = "marvell,mpic"; 32 compatible = "marvell,mpic";
33 #interrupt-cells = <1>; 33 #interrupt-cells = <1>;
34 #address-cells = <1>;
35 #size-cells = <1>; 34 #size-cells = <1>;
36 interrupt-controller; 35 interrupt-controller;
37 }; 36 };
@@ -54,7 +53,7 @@
54 reg = <0xd0012000 0x100>; 53 reg = <0xd0012000 0x100>;
55 reg-shift = <2>; 54 reg-shift = <2>;
56 interrupts = <41>; 55 interrupts = <41>;
57 reg-io-width = <4>; 56 reg-io-width = <1>;
58 status = "disabled"; 57 status = "disabled";
59 }; 58 };
60 serial@d0012100 { 59 serial@d0012100 {
@@ -62,7 +61,7 @@
62 reg = <0xd0012100 0x100>; 61 reg = <0xd0012100 0x100>;
63 reg-shift = <2>; 62 reg-shift = <2>;
64 interrupts = <42>; 63 interrupts = <42>;
65 reg-io-width = <4>; 64 reg-io-width = <1>;
66 status = "disabled"; 65 status = "disabled";
67 }; 66 };
68 67
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 1443949c165e..ca00d8326c87 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -46,7 +46,7 @@
46 reg = <0xd0012200 0x100>; 46 reg = <0xd0012200 0x100>;
47 reg-shift = <2>; 47 reg-shift = <2>;
48 interrupts = <43>; 48 interrupts = <43>;
49 reg-io-width = <4>; 49 reg-io-width = <1>;
50 status = "disabled"; 50 status = "disabled";
51 }; 51 };
52 serial@d0012300 { 52 serial@d0012300 {
@@ -54,7 +54,7 @@
54 reg = <0xd0012300 0x100>; 54 reg = <0xd0012300 0x100>;
55 reg-shift = <2>; 55 reg-shift = <2>;
56 interrupts = <44>; 56 interrupts = <44>;
57 reg-io-width = <4>; 57 reg-io-width = <1>;
58 status = "disabled"; 58 status = "disabled";
59 }; 59 };
60 60
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index aa98e641931f..a98c0d50fbbe 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -238,8 +238,32 @@
238 nand { 238 nand {
239 pinctrl_nand: nand-0 { 239 pinctrl_nand: nand-0 {
240 atmel,pins = 240 atmel,pins =
241 <3 4 0x0 0x1 /* PD5 gpio RDY pin pull_up */ 241 <3 0 0x1 0x0 /* PD0 periph A Read Enable */
242 3 5 0x0 0x1>; /* PD4 gpio enable pin pull_up */ 242 3 1 0x1 0x0 /* PD1 periph A Write Enable */
243 3 2 0x1 0x0 /* PD2 periph A Address Latch Enable */
244 3 3 0x1 0x0 /* PD3 periph A Command Latch Enable */
245 3 4 0x0 0x1 /* PD4 gpio Chip Enable pin pull_up */
246 3 5 0x0 0x1 /* PD5 gpio RDY/BUSY pin pull_up */
247 3 6 0x1 0x0 /* PD6 periph A Data bit 0 */
248 3 7 0x1 0x0 /* PD7 periph A Data bit 1 */
249 3 8 0x1 0x0 /* PD8 periph A Data bit 2 */
250 3 9 0x1 0x0 /* PD9 periph A Data bit 3 */
251 3 10 0x1 0x0 /* PD10 periph A Data bit 4 */
252 3 11 0x1 0x0 /* PD11 periph A Data bit 5 */
253 3 12 0x1 0x0 /* PD12 periph A Data bit 6 */
254 3 13 0x1 0x0>; /* PD13 periph A Data bit 7 */
255 };
256
257 pinctrl_nand_16bits: nand_16bits-0 {
258 atmel,pins =
259 <3 14 0x1 0x0 /* PD14 periph A Data bit 8 */
260 3 15 0x1 0x0 /* PD15 periph A Data bit 9 */
261 3 16 0x1 0x0 /* PD16 periph A Data bit 10 */
262 3 17 0x1 0x0 /* PD17 periph A Data bit 11 */
263 3 18 0x1 0x0 /* PD18 periph A Data bit 12 */
264 3 19 0x1 0x0 /* PD19 periph A Data bit 13 */
265 3 20 0x1 0x0 /* PD20 periph A Data bit 14 */
266 3 21 0x1 0x0>; /* PD21 periph A Data bit 15 */
243 }; 267 };
244 }; 268 };
245 269
diff --git a/arch/arm/boot/dts/bcm2835.dtsi b/arch/arm/boot/dts/bcm2835.dtsi
index 4bf2a8774aa7..7e0481e2441a 100644
--- a/arch/arm/boot/dts/bcm2835.dtsi
+++ b/arch/arm/boot/dts/bcm2835.dtsi
@@ -105,7 +105,7 @@
105 compatible = "fixed-clock"; 105 compatible = "fixed-clock";
106 reg = <1>; 106 reg = <1>;
107 #clock-cells = <0>; 107 #clock-cells = <0>;
108 clock-frequency = <150000000>; 108 clock-frequency = <250000000>;
109 }; 109 };
110 }; 110 };
111}; 111};
diff --git a/arch/arm/boot/dts/dbx5x0.dtsi b/arch/arm/boot/dts/dbx5x0.dtsi
index 69140ba99f46..9de93096601a 100644
--- a/arch/arm/boot/dts/dbx5x0.dtsi
+++ b/arch/arm/boot/dts/dbx5x0.dtsi
@@ -319,9 +319,8 @@
319 }; 319 };
320 }; 320 };
321 321
322 ab8500@5 { 322 ab8500 {
323 compatible = "stericsson,ab8500"; 323 compatible = "stericsson,ab8500";
324 reg = <5>; /* mailbox 5 is i2c */
325 interrupt-parent = <&intc>; 324 interrupt-parent = <&intc>;
326 interrupts = <0 40 0x4>; 325 interrupts = <0 40 0x4>;
327 interrupt-controller; 326 interrupt-controller;
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 67dbe20868a2..f7509cafc377 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -197,6 +197,11 @@
197 status = "disabled"; 197 status = "disabled";
198 }; 198 };
199 199
200 rtc@d8500 {
201 compatible = "marvell,orion-rtc";
202 reg = <0xd8500 0x20>;
203 };
204
200 crypto: crypto@30000 { 205 crypto: crypto@30000 {
201 compatible = "marvell,orion-crypto"; 206 compatible = "marvell,orion-crypto";
202 reg = <0x30000 0x10000>, 207 reg = <0x30000 0x10000>,
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index e1347fceb5bc..1a62bcf18aa3 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -275,18 +275,27 @@
275 compatible = "arm,pl330", "arm,primecell"; 275 compatible = "arm,pl330", "arm,primecell";
276 reg = <0x12680000 0x1000>; 276 reg = <0x12680000 0x1000>;
277 interrupts = <0 35 0>; 277 interrupts = <0 35 0>;
278 #dma-cells = <1>;
279 #dma-channels = <8>;
280 #dma-requests = <32>;
278 }; 281 };
279 282
280 pdma1: pdma@12690000 { 283 pdma1: pdma@12690000 {
281 compatible = "arm,pl330", "arm,primecell"; 284 compatible = "arm,pl330", "arm,primecell";
282 reg = <0x12690000 0x1000>; 285 reg = <0x12690000 0x1000>;
283 interrupts = <0 36 0>; 286 interrupts = <0 36 0>;
287 #dma-cells = <1>;
288 #dma-channels = <8>;
289 #dma-requests = <32>;
284 }; 290 };
285 291
286 mdma1: mdma@12850000 { 292 mdma1: mdma@12850000 {
287 compatible = "arm,pl330", "arm,primecell"; 293 compatible = "arm,pl330", "arm,primecell";
288 reg = <0x12850000 0x1000>; 294 reg = <0x12850000 0x1000>;
289 interrupts = <0 34 0>; 295 interrupts = <0 34 0>;
296 #dma-cells = <1>;
297 #dma-channels = <8>;
298 #dma-requests = <1>;
290 }; 299 };
291 }; 300 };
292}; 301};
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index 5f3562ad6746..9a99755920c0 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -142,12 +142,18 @@
142 compatible = "arm,pl330", "arm,primecell"; 142 compatible = "arm,pl330", "arm,primecell";
143 reg = <0x120000 0x1000>; 143 reg = <0x120000 0x1000>;
144 interrupts = <0 34 0>; 144 interrupts = <0 34 0>;
145 #dma-cells = <1>;
146 #dma-channels = <8>;
147 #dma-requests = <32>;
145 }; 148 };
146 149
147 pdma1: pdma@121B0000 { 150 pdma1: pdma@121B0000 {
148 compatible = "arm,pl330", "arm,primecell"; 151 compatible = "arm,pl330", "arm,primecell";
149 reg = <0x121000 0x1000>; 152 reg = <0x121000 0x1000>;
150 interrupts = <0 35 0>; 153 interrupts = <0 35 0>;
154 #dma-cells = <1>;
155 #dma-channels = <8>;
156 #dma-requests = <32>;
151 }; 157 };
152 }; 158 };
153 159
diff --git a/arch/arm/boot/dts/href.dtsi b/arch/arm/boot/dts/href.dtsi
index 592fb9dc35bd..379128eb9d98 100644
--- a/arch/arm/boot/dts/href.dtsi
+++ b/arch/arm/boot/dts/href.dtsi
@@ -221,7 +221,7 @@
221 }; 221 };
222 }; 222 };
223 223
224 ab8500@5 { 224 ab8500 {
225 ab8500-regulators { 225 ab8500-regulators {
226 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 226 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
227 regulator-name = "V-DISPLAY"; 227 regulator-name = "V-DISPLAY";
diff --git a/arch/arm/boot/dts/hrefv60plus.dts b/arch/arm/boot/dts/hrefv60plus.dts
index 55f4191a626e..2b587a74b813 100644
--- a/arch/arm/boot/dts/hrefv60plus.dts
+++ b/arch/arm/boot/dts/hrefv60plus.dts
@@ -158,7 +158,7 @@
158 }; 158 };
159 }; 159 };
160 160
161 ab8500@5 { 161 ab8500 {
162 ab8500-regulators { 162 ab8500-regulators {
163 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 163 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
164 regulator-name = "V-DISPLAY"; 164 regulator-name = "V-DISPLAY";
diff --git a/arch/arm/boot/dts/imx53-mba53.dts b/arch/arm/boot/dts/imx53-mba53.dts
index e54fffd48369..468c0a1d48d9 100644
--- a/arch/arm/boot/dts/imx53-mba53.dts
+++ b/arch/arm/boot/dts/imx53-mba53.dts
@@ -42,10 +42,9 @@
42 fsl,pins = <689 0x10000 /* DISP1_DRDY */ 42 fsl,pins = <689 0x10000 /* DISP1_DRDY */
43 482 0x10000 /* DISP1_HSYNC */ 43 482 0x10000 /* DISP1_HSYNC */
44 489 0x10000 /* DISP1_VSYNC */ 44 489 0x10000 /* DISP1_VSYNC */
45 684 0x10000 /* DISP1_DAT_0 */
46 515 0x10000 /* DISP1_DAT_22 */ 45 515 0x10000 /* DISP1_DAT_22 */
47 523 0x10000 /* DISP1_DAT_23 */ 46 523 0x10000 /* DISP1_DAT_23 */
48 543 0x10000 /* DISP1_DAT_21 */ 47 545 0x10000 /* DISP1_DAT_21 */
49 553 0x10000 /* DISP1_DAT_20 */ 48 553 0x10000 /* DISP1_DAT_20 */
50 558 0x10000 /* DISP1_DAT_19 */ 49 558 0x10000 /* DISP1_DAT_19 */
51 564 0x10000 /* DISP1_DAT_18 */ 50 564 0x10000 /* DISP1_DAT_18 */
diff --git a/arch/arm/boot/dts/kirkwood-dns320.dts b/arch/arm/boot/dts/kirkwood-dns320.dts
index 5bb0bf39d3b8..c9c44b2f62d7 100644
--- a/arch/arm/boot/dts/kirkwood-dns320.dts
+++ b/arch/arm/boot/dts/kirkwood-dns320.dts
@@ -42,12 +42,10 @@
42 42
43 ocp@f1000000 { 43 ocp@f1000000 {
44 serial@12000 { 44 serial@12000 {
45 clock-frequency = <166666667>;
46 status = "okay"; 45 status = "okay";
47 }; 46 };
48 47
49 serial@12100 { 48 serial@12100 {
50 clock-frequency = <166666667>;
51 status = "okay"; 49 status = "okay";
52 }; 50 };
53 }; 51 };
diff --git a/arch/arm/boot/dts/kirkwood-dns325.dts b/arch/arm/boot/dts/kirkwood-dns325.dts
index d430713ea9b9..e4e4930dc5cf 100644
--- a/arch/arm/boot/dts/kirkwood-dns325.dts
+++ b/arch/arm/boot/dts/kirkwood-dns325.dts
@@ -50,7 +50,6 @@
50 }; 50 };
51 }; 51 };
52 serial@12000 { 52 serial@12000 {
53 clock-frequency = <200000000>;
54 status = "okay"; 53 status = "okay";
55 }; 54 };
56 }; 55 };
diff --git a/arch/arm/boot/dts/kirkwood-dockstar.dts b/arch/arm/boot/dts/kirkwood-dockstar.dts
index 2e3dd34e21a5..0196cf6b0ef2 100644
--- a/arch/arm/boot/dts/kirkwood-dockstar.dts
+++ b/arch/arm/boot/dts/kirkwood-dockstar.dts
@@ -37,7 +37,6 @@
37 }; 37 };
38 }; 38 };
39 serial@12000 { 39 serial@12000 {
40 clock-frequency = <200000000>;
41 status = "ok"; 40 status = "ok";
42 }; 41 };
43 42
diff --git a/arch/arm/boot/dts/kirkwood-dreamplug.dts b/arch/arm/boot/dts/kirkwood-dreamplug.dts
index ef2d8c705709..289e51d86372 100644
--- a/arch/arm/boot/dts/kirkwood-dreamplug.dts
+++ b/arch/arm/boot/dts/kirkwood-dreamplug.dts
@@ -38,7 +38,6 @@
38 }; 38 };
39 }; 39 };
40 serial@12000 { 40 serial@12000 {
41 clock-frequency = <200000000>;
42 status = "ok"; 41 status = "ok";
43 }; 42 };
44 43
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts
index 1b133e0c566e..bd83b8fc7c83 100644
--- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
+++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
@@ -73,7 +73,6 @@
73 }; 73 };
74 }; 74 };
75 serial@12000 { 75 serial@12000 {
76 clock-frequency = <200000000>;
77 status = "ok"; 76 status = "ok";
78 }; 77 };
79 78
diff --git a/arch/arm/boot/dts/kirkwood-ib62x0.dts b/arch/arm/boot/dts/kirkwood-ib62x0.dts
index 71902da33d63..5335b1aa8601 100644
--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
@@ -51,7 +51,6 @@
51 }; 51 };
52 }; 52 };
53 serial@12000 { 53 serial@12000 {
54 clock-frequency = <200000000>;
55 status = "okay"; 54 status = "okay";
56 }; 55 };
57 56
diff --git a/arch/arm/boot/dts/kirkwood-iconnect.dts b/arch/arm/boot/dts/kirkwood-iconnect.dts
index 504f16be8b54..12ccf74ac3c4 100644
--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
@@ -78,7 +78,6 @@
78 }; 78 };
79 }; 79 };
80 serial@12000 { 80 serial@12000 {
81 clock-frequency = <200000000>;
82 status = "ok"; 81 status = "ok";
83 }; 82 };
84 83
diff --git a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
index 6cae4599c4b3..93c3afbef9ee 100644
--- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
+++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
@@ -115,7 +115,6 @@
115 }; 115 };
116 116
117 serial@12000 { 117 serial@12000 {
118 clock-frequency = <200000000>;
119 status = "ok"; 118 status = "ok";
120 }; 119 };
121 120
diff --git a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
index 8db3123ac80f..5bbd0542cdd3 100644
--- a/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
+++ b/arch/arm/boot/dts/kirkwood-km_kirkwood.dts
@@ -34,7 +34,6 @@
34 }; 34 };
35 35
36 serial@12000 { 36 serial@12000 {
37 clock-frequency = <200000000>;
38 status = "ok"; 37 status = "ok";
39 }; 38 };
40 39
diff --git a/arch/arm/boot/dts/kirkwood-lschlv2.dts b/arch/arm/boot/dts/kirkwood-lschlv2.dts
index 9510c9ea666c..9f55d95f35f5 100644
--- a/arch/arm/boot/dts/kirkwood-lschlv2.dts
+++ b/arch/arm/boot/dts/kirkwood-lschlv2.dts
@@ -13,7 +13,6 @@
13 13
14 ocp@f1000000 { 14 ocp@f1000000 {
15 serial@12000 { 15 serial@12000 {
16 clock-frequency = <166666667>;
17 status = "okay"; 16 status = "okay";
18 }; 17 };
19 }; 18 };
diff --git a/arch/arm/boot/dts/kirkwood-lsxhl.dts b/arch/arm/boot/dts/kirkwood-lsxhl.dts
index 739019c4cba9..5c84c118ed8d 100644
--- a/arch/arm/boot/dts/kirkwood-lsxhl.dts
+++ b/arch/arm/boot/dts/kirkwood-lsxhl.dts
@@ -13,7 +13,6 @@
13 13
14 ocp@f1000000 { 14 ocp@f1000000 {
15 serial@12000 { 15 serial@12000 {
16 clock-frequency = <200000000>;
17 status = "okay"; 16 status = "okay";
18 }; 17 };
19 }; 18 };
diff --git a/arch/arm/boot/dts/kirkwood-mplcec4.dts b/arch/arm/boot/dts/kirkwood-mplcec4.dts
index 662dfd81b1ce..758824118a9a 100644
--- a/arch/arm/boot/dts/kirkwood-mplcec4.dts
+++ b/arch/arm/boot/dts/kirkwood-mplcec4.dts
@@ -90,7 +90,6 @@
90 }; 90 };
91 91
92 serial@12000 { 92 serial@12000 {
93 clock-frequency = <200000000>;
94 status = "ok"; 93 status = "ok";
95 }; 94 };
96 95
diff --git a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
index e8e7ecef1650..6affd924fe11 100644
--- a/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
+++ b/arch/arm/boot/dts/kirkwood-ns2-common.dtsi
@@ -23,7 +23,6 @@
23 }; 23 };
24 24
25 serial@12000 { 25 serial@12000 {
26 clock-frequency = <166666667>;
27 status = "okay"; 26 status = "okay";
28 }; 27 };
29 28
diff --git a/arch/arm/boot/dts/kirkwood-nsa310.dts b/arch/arm/boot/dts/kirkwood-nsa310.dts
index 3a178cf708d7..a7412b937a8a 100644
--- a/arch/arm/boot/dts/kirkwood-nsa310.dts
+++ b/arch/arm/boot/dts/kirkwood-nsa310.dts
@@ -117,7 +117,6 @@
117 }; 117 };
118 118
119 serial@12000 { 119 serial@12000 {
120 clock-frequency = <200000000>;
121 status = "ok"; 120 status = "ok";
122 }; 121 };
123 122
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
index ede7fe0d7a87..d27f7245f8e7 100644
--- a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
@@ -18,12 +18,10 @@
18 18
19 ocp@f1000000 { 19 ocp@f1000000 {
20 serial@12000 { 20 serial@12000 {
21 clock-frequency = <200000000>;
22 status = "ok"; 21 status = "ok";
23 }; 22 };
24 23
25 serial@12100 { 24 serial@12100 {
26 clock-frequency = <200000000>;
27 status = "ok"; 25 status = "ok";
28 }; 26 };
29 27
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index 842ff95d60df..66eb45b00b25 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -108,7 +108,6 @@
108 }; 108 };
109 109
110 serial@12000 { 110 serial@12000 {
111 clock-frequency = <200000000>;
112 status = "ok"; 111 status = "ok";
113 }; 112 };
114 113
diff --git a/arch/arm/boot/dts/kirkwood.dtsi b/arch/arm/boot/dts/kirkwood.dtsi
index 2c738d9dc82a..fada7e6d24d8 100644
--- a/arch/arm/boot/dts/kirkwood.dtsi
+++ b/arch/arm/boot/dts/kirkwood.dtsi
@@ -38,6 +38,7 @@
38 interrupt-controller; 38 interrupt-controller;
39 #interrupt-cells = <2>; 39 #interrupt-cells = <2>;
40 interrupts = <35>, <36>, <37>, <38>; 40 interrupts = <35>, <36>, <37>, <38>;
41 clocks = <&gate_clk 7>;
41 }; 42 };
42 43
43 gpio1: gpio@10140 { 44 gpio1: gpio@10140 {
@@ -49,6 +50,7 @@
49 interrupt-controller; 50 interrupt-controller;
50 #interrupt-cells = <2>; 51 #interrupt-cells = <2>;
51 interrupts = <39>, <40>, <41>; 52 interrupts = <39>, <40>, <41>;
53 clocks = <&gate_clk 7>;
52 }; 54 };
53 55
54 serial@12000 { 56 serial@12000 {
@@ -57,7 +59,6 @@
57 reg-shift = <2>; 59 reg-shift = <2>;
58 interrupts = <33>; 60 interrupts = <33>;
59 clocks = <&gate_clk 7>; 61 clocks = <&gate_clk 7>;
60 /* set clock-frequency in board dts */
61 status = "disabled"; 62 status = "disabled";
62 }; 63 };
63 64
@@ -67,7 +68,6 @@
67 reg-shift = <2>; 68 reg-shift = <2>;
68 interrupts = <34>; 69 interrupts = <34>;
69 clocks = <&gate_clk 7>; 70 clocks = <&gate_clk 7>;
70 /* set clock-frequency in board dts */
71 status = "disabled"; 71 status = "disabled";
72 }; 72 };
73 73
@@ -75,6 +75,7 @@
75 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc"; 75 compatible = "marvell,kirkwood-rtc", "marvell,orion-rtc";
76 reg = <0x10300 0x20>; 76 reg = <0x10300 0x20>;
77 interrupts = <53>; 77 interrupts = <53>;
78 clocks = <&gate_clk 7>;
78 }; 79 };
79 80
80 spi@10600 { 81 spi@10600 {
diff --git a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
index 5a3a58b7e18f..0077fc8510b7 100644
--- a/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
+++ b/arch/arm/boot/dts/orion5x-lacie-ethernet-disk-mini-v2.dts
@@ -11,7 +11,7 @@
11 11
12/ { 12/ {
13 model = "LaCie Ethernet Disk mini V2"; 13 model = "LaCie Ethernet Disk mini V2";
14 compatible = "lacie,ethernet-disk-mini-v2", "marvell-orion5x-88f5182", "marvell,orion5x"; 14 compatible = "lacie,ethernet-disk-mini-v2", "marvell,orion5x-88f5182", "marvell,orion5x";
15 15
16 memory { 16 memory {
17 reg = <0x00000000 0x4000000>; /* 64 MB */ 17 reg = <0x00000000 0x4000000>; /* 64 MB */
diff --git a/arch/arm/boot/dts/snowball.dts b/arch/arm/boot/dts/snowball.dts
index 27f31a5fa494..d3ec32f6b790 100644
--- a/arch/arm/boot/dts/snowball.dts
+++ b/arch/arm/boot/dts/snowball.dts
@@ -298,7 +298,7 @@
298 }; 298 };
299 }; 299 };
300 300
301 ab8500@5 { 301 ab8500 {
302 ab8500-regulators { 302 ab8500-regulators {
303 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 { 303 ab8500_ldo_aux1_reg: ab8500_ldo_aux1 {
304 regulator-name = "V-DISPLAY"; 304 regulator-name = "V-DISPLAY";
diff --git a/arch/arm/boot/dts/socfpga.dtsi b/arch/arm/boot/dts/socfpga.dtsi
index 936d2306e7e1..7e8769bd5977 100644
--- a/arch/arm/boot/dts/socfpga.dtsi
+++ b/arch/arm/boot/dts/socfpga.dtsi
@@ -75,6 +75,9 @@
75 compatible = "arm,pl330", "arm,primecell"; 75 compatible = "arm,pl330", "arm,primecell";
76 reg = <0xffe01000 0x1000>; 76 reg = <0xffe01000 0x1000>;
77 interrupts = <0 180 4>; 77 interrupts = <0 180 4>;
78 #dma-cells = <1>;
79 #dma-channels = <8>;
80 #dma-requests = <32>;
78 }; 81 };
79 }; 82 };
80 83
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index 9a428931d042..48d00a099ce3 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -118,6 +118,7 @@
118 compatible = "arm,cortex-a9-twd-timer"; 118 compatible = "arm,cortex-a9-twd-timer";
119 reg = <0x50040600 0x20>; 119 reg = <0x50040600 0x20>;
120 interrupts = <1 13 0x304>; 120 interrupts = <1 13 0x304>;
121 clocks = <&tegra_car 132>;
121 }; 122 };
122 123
123 intc: interrupt-controller { 124 intc: interrupt-controller {
diff --git a/arch/arm/boot/dts/tegra30.dtsi b/arch/arm/boot/dts/tegra30.dtsi
index 767803e1fd55..9d87a3ffe998 100644
--- a/arch/arm/boot/dts/tegra30.dtsi
+++ b/arch/arm/boot/dts/tegra30.dtsi
@@ -119,6 +119,7 @@
119 compatible = "arm,cortex-a9-twd-timer"; 119 compatible = "arm,cortex-a9-twd-timer";
120 reg = <0x50040600 0x20>; 120 reg = <0x50040600 0x20>;
121 interrupts = <1 13 0xf04>; 121 interrupts = <1 13 0xf04>;
122 clocks = <&tegra_car 214>;
122 }; 123 };
123 124
124 intc: interrupt-controller { 125 intc: interrupt-controller {
diff --git a/arch/arm/boot/dts/vt8500.dtsi b/arch/arm/boot/dts/vt8500.dtsi
index cf31ced46602..e1c3926aca52 100644
--- a/arch/arm/boot/dts/vt8500.dtsi
+++ b/arch/arm/boot/dts/vt8500.dtsi
@@ -25,11 +25,13 @@
25 #interrupt-cells = <1>; 25 #interrupt-cells = <1>;
26 }; 26 };
27 27
28 gpio: gpio-controller@d8110000 { 28 pinctrl: pinctrl@d8110000 {
29 compatible = "via,vt8500-gpio"; 29 compatible = "via,vt8500-pinctrl";
30 gpio-controller;
31 reg = <0xd8110000 0x10000>; 30 reg = <0xd8110000 0x10000>;
32 #gpio-cells = <3>; 31 interrupt-controller;
32 #interrupt-cells = <2>;
33 gpio-controller;
34 #gpio-cells = <2>;
33 }; 35 };
34 36
35 pmc@d8130000 { 37 pmc@d8130000 {
diff --git a/arch/arm/boot/dts/wm8505.dtsi b/arch/arm/boot/dts/wm8505.dtsi
index e74a1c0fb9a2..bb92ef8ce665 100644
--- a/arch/arm/boot/dts/wm8505.dtsi
+++ b/arch/arm/boot/dts/wm8505.dtsi
@@ -40,11 +40,13 @@
40 interrupts = <56 57 58 59 60 61 62 63>; 40 interrupts = <56 57 58 59 60 61 62 63>;
41 }; 41 };
42 42
43 gpio: gpio-controller@d8110000 { 43 pinctrl: pinctrl@d8110000 {
44 compatible = "wm,wm8505-gpio"; 44 compatible = "wm,wm8505-pinctrl";
45 gpio-controller;
46 reg = <0xd8110000 0x10000>; 45 reg = <0xd8110000 0x10000>;
47 #gpio-cells = <3>; 46 interrupt-controller;
47 #interrupt-cells = <2>;
48 gpio-controller;
49 #gpio-cells = <2>;
48 }; 50 };
49 51
50 pmc@d8130000 { 52 pmc@d8130000 {
diff --git a/arch/arm/boot/dts/wm8650.dtsi b/arch/arm/boot/dts/wm8650.dtsi
index db3c0a12e052..bb4af580f40b 100644
--- a/arch/arm/boot/dts/wm8650.dtsi
+++ b/arch/arm/boot/dts/wm8650.dtsi
@@ -34,11 +34,13 @@
34 interrupts = <56 57 58 59 60 61 62 63>; 34 interrupts = <56 57 58 59 60 61 62 63>;
35 }; 35 };
36 36
37 gpio: gpio-controller@d8110000 { 37 pinctrl: pinctrl@d8110000 {
38 compatible = "wm,wm8650-gpio"; 38 compatible = "wm,wm8650-pinctrl";
39 gpio-controller;
40 reg = <0xd8110000 0x10000>; 39 reg = <0xd8110000 0x10000>;
41 #gpio-cells = <3>; 40 interrupt-controller;
41 #interrupt-cells = <2>;
42 gpio-controller;
43 #gpio-cells = <2>;
42 }; 44 };
43 45
44 pmc@d8130000 { 46 pmc@d8130000 {
diff --git a/arch/arm/boot/dts/wm8850.dtsi b/arch/arm/boot/dts/wm8850.dtsi
index e8cbfdc87bba..11cd180c58d3 100644
--- a/arch/arm/boot/dts/wm8850.dtsi
+++ b/arch/arm/boot/dts/wm8850.dtsi
@@ -41,11 +41,13 @@
41 interrupts = <56 57 58 59 60 61 62 63>; 41 interrupts = <56 57 58 59 60 61 62 63>;
42 }; 42 };
43 43
44 gpio: gpio-controller@d8110000 { 44 pinctrl: pinctrl@d8110000 {
45 compatible = "wm,wm8650-gpio"; 45 compatible = "wm,wm8850-pinctrl";
46 gpio-controller;
47 reg = <0xd8110000 0x10000>; 46 reg = <0xd8110000 0x10000>;
48 #gpio-cells = <3>; 47 interrupt-controller;
48 #interrupt-cells = <2>;
49 gpio-controller;
50 #gpio-cells = <2>;
49 }; 51 };
50 52
51 pmc@d8130000 { 53 pmc@d8130000 {
diff --git a/arch/arm/configs/mxs_defconfig b/arch/arm/configs/mxs_defconfig
index fbbc5bb022d5..6a99e30f81d2 100644
--- a/arch/arm/configs/mxs_defconfig
+++ b/arch/arm/configs/mxs_defconfig
@@ -116,6 +116,7 @@ CONFIG_SND_SOC=y
116CONFIG_SND_MXS_SOC=y 116CONFIG_SND_MXS_SOC=y
117CONFIG_SND_SOC_MXS_SGTL5000=y 117CONFIG_SND_SOC_MXS_SGTL5000=y
118CONFIG_USB=y 118CONFIG_USB=y
119CONFIG_USB_EHCI_HCD=y
119CONFIG_USB_CHIPIDEA=y 120CONFIG_USB_CHIPIDEA=y
120CONFIG_USB_CHIPIDEA_HOST=y 121CONFIG_USB_CHIPIDEA_HOST=y
121CONFIG_USB_STORAGE=y 122CONFIG_USB_STORAGE=y
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index b16bae2c9a60..bd07864f14a0 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -126,6 +126,8 @@ CONFIG_INPUT_MISC=y
126CONFIG_INPUT_TWL4030_PWRBUTTON=y 126CONFIG_INPUT_TWL4030_PWRBUTTON=y
127CONFIG_VT_HW_CONSOLE_BINDING=y 127CONFIG_VT_HW_CONSOLE_BINDING=y
128# CONFIG_LEGACY_PTYS is not set 128# CONFIG_LEGACY_PTYS is not set
129CONFIG_SERIAL_8250=y
130CONFIG_SERIAL_8250_CONSOLE=y
129CONFIG_SERIAL_8250_NR_UARTS=32 131CONFIG_SERIAL_8250_NR_UARTS=32
130CONFIG_SERIAL_8250_EXTENDED=y 132CONFIG_SERIAL_8250_EXTENDED=y
131CONFIG_SERIAL_8250_MANY_PORTS=y 133CONFIG_SERIAL_8250_MANY_PORTS=y
diff --git a/arch/arm/include/asm/xen/events.h b/arch/arm/include/asm/xen/events.h
index 5c27696de14f..8b1f37bfeeec 100644
--- a/arch/arm/include/asm/xen/events.h
+++ b/arch/arm/include/asm/xen/events.h
@@ -2,6 +2,7 @@
2#define _ASM_ARM_XEN_EVENTS_H 2#define _ASM_ARM_XEN_EVENTS_H
3 3
4#include <asm/ptrace.h> 4#include <asm/ptrace.h>
5#include <asm/atomic.h>
5 6
6enum ipi_vector { 7enum ipi_vector {
7 XEN_PLACEHOLDER_VECTOR, 8 XEN_PLACEHOLDER_VECTOR,
@@ -15,26 +16,8 @@ static inline int xen_irqs_disabled(struct pt_regs *regs)
15 return raw_irqs_disabled_flags(regs->ARM_cpsr); 16 return raw_irqs_disabled_flags(regs->ARM_cpsr);
16} 17}
17 18
18/* 19#define xchg_xen_ulong(ptr, val) atomic64_xchg(container_of((ptr), \
19 * We cannot use xchg because it does not support 8-byte 20 atomic64_t, \
20 * values. However it is safe to use {ldr,dtd}exd directly because all 21 counter), (val))
21 * platforms which Xen can run on support those instructions.
22 */
23static inline xen_ulong_t xchg_xen_ulong(xen_ulong_t *ptr, xen_ulong_t val)
24{
25 xen_ulong_t oldval;
26 unsigned int tmp;
27
28 wmb();
29 asm volatile("@ xchg_xen_ulong\n"
30 "1: ldrexd %0, %H0, [%3]\n"
31 " strexd %1, %2, %H2, [%3]\n"
32 " teq %1, #0\n"
33 " bne 1b"
34 : "=&r" (oldval), "=&r" (tmp)
35 : "r" (val), "r" (ptr)
36 : "memory", "cc");
37 return oldval;
38}
39 22
40#endif /* _ASM_ARM_XEN_EVENTS_H */ 23#endif /* _ASM_ARM_XEN_EVENTS_H */
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 31644f1978d5..79078edbb9bc 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -480,7 +480,7 @@ static void __cpuinit broadcast_timer_setup(struct clock_event_device *evt)
480 evt->features = CLOCK_EVT_FEAT_ONESHOT | 480 evt->features = CLOCK_EVT_FEAT_ONESHOT |
481 CLOCK_EVT_FEAT_PERIODIC | 481 CLOCK_EVT_FEAT_PERIODIC |
482 CLOCK_EVT_FEAT_DUMMY; 482 CLOCK_EVT_FEAT_DUMMY;
483 evt->rating = 400; 483 evt->rating = 100;
484 evt->mult = 1; 484 evt->mult = 1;
485 evt->set_mode = broadcast_timer_set_mode; 485 evt->set_mode = broadcast_timer_set_mode;
486 486
diff --git a/arch/arm/lib/memset.S b/arch/arm/lib/memset.S
index d912e7397ecc..94b0650ea98f 100644
--- a/arch/arm/lib/memset.S
+++ b/arch/arm/lib/memset.S
@@ -14,31 +14,15 @@
14 14
15 .text 15 .text
16 .align 5 16 .align 5
17 .word 0
18
191: subs r2, r2, #4 @ 1 do we have enough
20 blt 5f @ 1 bytes to align with?
21 cmp r3, #2 @ 1
22 strltb r1, [ip], #1 @ 1
23 strleb r1, [ip], #1 @ 1
24 strb r1, [ip], #1 @ 1
25 add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))
26/*
27 * The pointer is now aligned and the length is adjusted. Try doing the
28 * memset again.
29 */
30 17
31ENTRY(memset) 18ENTRY(memset)
32/* 19 ands r3, r0, #3 @ 1 unaligned?
33 * Preserve the contents of r0 for the return value. 20 mov ip, r0 @ preserve r0 as return value
34 */ 21 bne 6f @ 1
35 mov ip, r0
36 ands r3, ip, #3 @ 1 unaligned?
37 bne 1b @ 1
38/* 22/*
39 * we know that the pointer in ip is aligned to a word boundary. 23 * we know that the pointer in ip is aligned to a word boundary.
40 */ 24 */
41 orr r1, r1, r1, lsl #8 251: orr r1, r1, r1, lsl #8
42 orr r1, r1, r1, lsl #16 26 orr r1, r1, r1, lsl #16
43 mov r3, r1 27 mov r3, r1
44 cmp r2, #16 28 cmp r2, #16
@@ -127,4 +111,13 @@ ENTRY(memset)
127 tst r2, #1 111 tst r2, #1
128 strneb r1, [ip], #1 112 strneb r1, [ip], #1
129 mov pc, lr 113 mov pc, lr
114
1156: subs r2, r2, #4 @ 1 do we have enough
116 blt 5b @ 1 bytes to align with?
117 cmp r3, #2 @ 1
118 strltb r1, [ip], #1 @ 1
119 strleb r1, [ip], #1 @ 1
120 strb r1, [ip], #1 @ 1
121 add r2, r2, r3 @ 1 (r2 = r2 - (4 - r3))
122 b 1b
130ENDPROC(memset) 123ENDPROC(memset)
diff --git a/arch/arm/mach-at91/board-foxg20.c b/arch/arm/mach-at91/board-foxg20.c
index 2ea7059b840b..c20a870ea9c9 100644
--- a/arch/arm/mach-at91/board-foxg20.c
+++ b/arch/arm/mach-at91/board-foxg20.c
@@ -176,6 +176,7 @@ static struct w1_gpio_platform_data w1_gpio_pdata = {
176 /* If you choose to use a pin other than PB16 it needs to be 3.3V */ 176 /* If you choose to use a pin other than PB16 it needs to be 3.3V */
177 .pin = AT91_PIN_PB16, 177 .pin = AT91_PIN_PB16,
178 .is_open_drain = 1, 178 .is_open_drain = 1,
179 .ext_pullup_enable_pin = -EINVAL,
179}; 180};
180 181
181static struct platform_device w1_device = { 182static struct platform_device w1_device = {
diff --git a/arch/arm/mach-at91/board-stamp9g20.c b/arch/arm/mach-at91/board-stamp9g20.c
index a033b8df9fb2..869cbecf00b7 100644
--- a/arch/arm/mach-at91/board-stamp9g20.c
+++ b/arch/arm/mach-at91/board-stamp9g20.c
@@ -188,6 +188,7 @@ static struct spi_board_info portuxg20_spi_devices[] = {
188static struct w1_gpio_platform_data w1_gpio_pdata = { 188static struct w1_gpio_platform_data w1_gpio_pdata = {
189 .pin = AT91_PIN_PA29, 189 .pin = AT91_PIN_PA29,
190 .is_open_drain = 1, 190 .is_open_drain = 1,
191 .ext_pullup_enable_pin = -EINVAL,
191}; 192};
192 193
193static struct platform_device w1_device = { 194static struct platform_device w1_device = {
diff --git a/arch/arm/mach-at91/include/mach/gpio.h b/arch/arm/mach-at91/include/mach/gpio.h
index eed465ab0dd7..5fc23771c154 100644
--- a/arch/arm/mach-at91/include/mach/gpio.h
+++ b/arch/arm/mach-at91/include/mach/gpio.h
@@ -209,6 +209,14 @@ extern int at91_get_gpio_value(unsigned pin);
209extern void at91_gpio_suspend(void); 209extern void at91_gpio_suspend(void);
210extern void at91_gpio_resume(void); 210extern void at91_gpio_resume(void);
211 211
212#ifdef CONFIG_PINCTRL_AT91
213extern void at91_pinctrl_gpio_suspend(void);
214extern void at91_pinctrl_gpio_resume(void);
215#else
216static inline void at91_pinctrl_gpio_suspend(void) {}
217static inline void at91_pinctrl_gpio_resume(void) {}
218#endif
219
212#endif /* __ASSEMBLY__ */ 220#endif /* __ASSEMBLY__ */
213 221
214#endif 222#endif
diff --git a/arch/arm/mach-at91/irq.c b/arch/arm/mach-at91/irq.c
index 8e210262aeee..e0ca59171022 100644
--- a/arch/arm/mach-at91/irq.c
+++ b/arch/arm/mach-at91/irq.c
@@ -92,23 +92,21 @@ static int at91_aic_set_wake(struct irq_data *d, unsigned value)
92 92
93void at91_irq_suspend(void) 93void at91_irq_suspend(void)
94{ 94{
95 int i = 0, bit; 95 int bit = -1;
96 96
97 if (has_aic5()) { 97 if (has_aic5()) {
98 /* disable enabled irqs */ 98 /* disable enabled irqs */
99 while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) { 99 while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
100 at91_aic_write(AT91_AIC5_SSR, 100 at91_aic_write(AT91_AIC5_SSR,
101 bit & AT91_AIC5_INTSEL_MSK); 101 bit & AT91_AIC5_INTSEL_MSK);
102 at91_aic_write(AT91_AIC5_IDCR, 1); 102 at91_aic_write(AT91_AIC5_IDCR, 1);
103 i = bit;
104 } 103 }
105 /* enable wakeup irqs */ 104 /* enable wakeup irqs */
106 i = 0; 105 bit = -1;
107 while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) { 106 while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
108 at91_aic_write(AT91_AIC5_SSR, 107 at91_aic_write(AT91_AIC5_SSR,
109 bit & AT91_AIC5_INTSEL_MSK); 108 bit & AT91_AIC5_INTSEL_MSK);
110 at91_aic_write(AT91_AIC5_IECR, 1); 109 at91_aic_write(AT91_AIC5_IECR, 1);
111 i = bit;
112 } 110 }
113 } else { 111 } else {
114 at91_aic_write(AT91_AIC_IDCR, *backups); 112 at91_aic_write(AT91_AIC_IDCR, *backups);
@@ -118,23 +116,21 @@ void at91_irq_suspend(void)
118 116
119void at91_irq_resume(void) 117void at91_irq_resume(void)
120{ 118{
121 int i = 0, bit; 119 int bit = -1;
122 120
123 if (has_aic5()) { 121 if (has_aic5()) {
124 /* disable wakeup irqs */ 122 /* disable wakeup irqs */
125 while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) { 123 while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
126 at91_aic_write(AT91_AIC5_SSR, 124 at91_aic_write(AT91_AIC5_SSR,
127 bit & AT91_AIC5_INTSEL_MSK); 125 bit & AT91_AIC5_INTSEL_MSK);
128 at91_aic_write(AT91_AIC5_IDCR, 1); 126 at91_aic_write(AT91_AIC5_IDCR, 1);
129 i = bit;
130 } 127 }
131 /* enable irqs disabled for suspend */ 128 /* enable irqs disabled for suspend */
132 i = 0; 129 bit = -1;
133 while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) { 130 while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
134 at91_aic_write(AT91_AIC5_SSR, 131 at91_aic_write(AT91_AIC5_SSR,
135 bit & AT91_AIC5_INTSEL_MSK); 132 bit & AT91_AIC5_INTSEL_MSK);
136 at91_aic_write(AT91_AIC5_IECR, 1); 133 at91_aic_write(AT91_AIC5_IECR, 1);
137 i = bit;
138 } 134 }
139 } else { 135 } else {
140 at91_aic_write(AT91_AIC_IDCR, *wakeups); 136 at91_aic_write(AT91_AIC_IDCR, *wakeups);
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index adb6db888a1f..73f1f250403a 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -201,7 +201,10 @@ extern u32 at91_slow_clock_sz;
201 201
202static int at91_pm_enter(suspend_state_t state) 202static int at91_pm_enter(suspend_state_t state)
203{ 203{
204 at91_gpio_suspend(); 204 if (of_have_populated_dt())
205 at91_pinctrl_gpio_suspend();
206 else
207 at91_gpio_suspend();
205 at91_irq_suspend(); 208 at91_irq_suspend();
206 209
207 pr_debug("AT91: PM - wake mask %08x, pm state %d\n", 210 pr_debug("AT91: PM - wake mask %08x, pm state %d\n",
@@ -286,7 +289,10 @@ static int at91_pm_enter(suspend_state_t state)
286error: 289error:
287 target_state = PM_SUSPEND_ON; 290 target_state = PM_SUSPEND_ON;
288 at91_irq_resume(); 291 at91_irq_resume();
289 at91_gpio_resume(); 292 if (of_have_populated_dt())
293 at91_pinctrl_gpio_resume();
294 else
295 at91_gpio_resume();
290 return 0; 296 return 0;
291} 297}
292 298
diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c
index a685e9706b7b..45b7c71d9cc1 100644
--- a/arch/arm/mach-davinci/dma.c
+++ b/arch/arm/mach-davinci/dma.c
@@ -743,6 +743,9 @@ EXPORT_SYMBOL(edma_free_channel);
743 */ 743 */
744int edma_alloc_slot(unsigned ctlr, int slot) 744int edma_alloc_slot(unsigned ctlr, int slot)
745{ 745{
746 if (!edma_cc[ctlr])
747 return -EINVAL;
748
746 if (slot >= 0) 749 if (slot >= 0)
747 slot = EDMA_CHAN_SLOT(slot); 750 slot = EDMA_CHAN_SLOT(slot);
748 751
diff --git a/arch/arm/mach-footbridge/Kconfig b/arch/arm/mach-footbridge/Kconfig
index abda5a18a664..0f2111a11315 100644
--- a/arch/arm/mach-footbridge/Kconfig
+++ b/arch/arm/mach-footbridge/Kconfig
@@ -67,6 +67,7 @@ config ARCH_NETWINDER
67 select ISA 67 select ISA
68 select ISA_DMA 68 select ISA_DMA
69 select PCI 69 select PCI
70 select VIRT_TO_BUS
70 help 71 help
71 Say Y here if you intend to run this kernel on the Rebel.COM 72 Say Y here if you intend to run this kernel on the Rebel.COM
72 NetWinder. Information about this machine can be found at: 73 NetWinder. Information about this machine can be found at:
diff --git a/arch/arm/mach-imx/clk-imx35.c b/arch/arm/mach-imx/clk-imx35.c
index 74e3a34d78b8..e13a8fa5e62c 100644
--- a/arch/arm/mach-imx/clk-imx35.c
+++ b/arch/arm/mach-imx/clk-imx35.c
@@ -264,6 +264,7 @@ int __init mx35_clocks_init(void)
264 clk_prepare_enable(clk[gpio3_gate]); 264 clk_prepare_enable(clk[gpio3_gate]);
265 clk_prepare_enable(clk[iim_gate]); 265 clk_prepare_enable(clk[iim_gate]);
266 clk_prepare_enable(clk[emi_gate]); 266 clk_prepare_enable(clk[emi_gate]);
267 clk_prepare_enable(clk[max_gate]);
267 268
268 /* 269 /*
269 * SCC is needed to boot via mmc after a watchdog reset. The clock code 270 * SCC is needed to boot via mmc after a watchdog reset. The clock code
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c
index 7b025ee528a5..2f9ff93a4e61 100644
--- a/arch/arm/mach-imx/clk-imx6q.c
+++ b/arch/arm/mach-imx/clk-imx6q.c
@@ -172,7 +172,7 @@ static struct clk *clk[clk_max];
172static struct clk_onecell_data clk_data; 172static struct clk_onecell_data clk_data;
173 173
174static enum mx6q_clks const clks_init_on[] __initconst = { 174static enum mx6q_clks const clks_init_on[] __initconst = {
175 mmdc_ch0_axi, rom, 175 mmdc_ch0_axi, rom, pll1_sys,
176}; 176};
177 177
178static struct clk_div_table clk_enet_ref_table[] = { 178static struct clk_div_table clk_enet_ref_table[] = {
diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S
index 921fc1555854..a58c8b0527cc 100644
--- a/arch/arm/mach-imx/headsmp.S
+++ b/arch/arm/mach-imx/headsmp.S
@@ -26,16 +26,16 @@ ENDPROC(v7_secondary_startup)
26 26
27#ifdef CONFIG_PM 27#ifdef CONFIG_PM
28/* 28/*
29 * The following code is located into the .data section. This is to 29 * The following code must assume it is running from physical address
30 * allow phys_l2x0_saved_regs to be accessed with a relative load 30 * where absolute virtual addresses to the data section have to be
31 * as we are running on physical address here. 31 * turned into relative ones.
32 */ 32 */
33 .data
34 .align
35 33
36#ifdef CONFIG_CACHE_L2X0 34#ifdef CONFIG_CACHE_L2X0
37 .macro pl310_resume 35 .macro pl310_resume
38 ldr r2, phys_l2x0_saved_regs 36 adr r0, l2x0_saved_regs_offset
37 ldr r2, [r0]
38 add r2, r2, r0
39 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0 39 ldr r0, [r2, #L2X0_R_PHY_BASE] @ get physical base of l2x0
40 ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value 40 ldr r1, [r2, #L2X0_R_AUX_CTRL] @ get aux_ctrl value
41 str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl 41 str r1, [r0, #L2X0_AUX_CTRL] @ restore aux_ctrl
@@ -43,9 +43,9 @@ ENDPROC(v7_secondary_startup)
43 str r1, [r0, #L2X0_CTRL] @ re-enable L2 43 str r1, [r0, #L2X0_CTRL] @ re-enable L2
44 .endm 44 .endm
45 45
46 .globl phys_l2x0_saved_regs 46l2x0_saved_regs_offset:
47phys_l2x0_saved_regs: 47 .word l2x0_saved_regs - .
48 .long 0 48
49#else 49#else
50 .macro pl310_resume 50 .macro pl310_resume
51 .endm 51 .endm
diff --git a/arch/arm/mach-imx/imx25-dt.c b/arch/arm/mach-imx/imx25-dt.c
index 03b65e5ea541..82348391582a 100644
--- a/arch/arm/mach-imx/imx25-dt.c
+++ b/arch/arm/mach-imx/imx25-dt.c
@@ -27,6 +27,11 @@ static const char * const imx25_dt_board_compat[] __initconst = {
27 NULL 27 NULL
28}; 28};
29 29
30static void __init imx25_timer_init(void)
31{
32 mx25_clocks_init_dt();
33}
34
30DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)") 35DT_MACHINE_START(IMX25_DT, "Freescale i.MX25 (Device Tree Support)")
31 .map_io = mx25_map_io, 36 .map_io = mx25_map_io,
32 .init_early = imx25_init_early, 37 .init_early = imx25_init_early,
diff --git a/arch/arm/mach-imx/pm-imx6q.c b/arch/arm/mach-imx/pm-imx6q.c
index ee42d20cba19..5faba7a3c95f 100644
--- a/arch/arm/mach-imx/pm-imx6q.c
+++ b/arch/arm/mach-imx/pm-imx6q.c
@@ -22,8 +22,6 @@
22#include "common.h" 22#include "common.h"
23#include "hardware.h" 23#include "hardware.h"
24 24
25extern unsigned long phys_l2x0_saved_regs;
26
27static int imx6q_suspend_finish(unsigned long val) 25static int imx6q_suspend_finish(unsigned long val)
28{ 26{
29 cpu_do_idle(); 27 cpu_do_idle();
@@ -57,18 +55,5 @@ static const struct platform_suspend_ops imx6q_pm_ops = {
57 55
58void __init imx6q_pm_init(void) 56void __init imx6q_pm_init(void)
59{ 57{
60 /*
61 * The l2x0 core code provides an infrastucture to save and restore
62 * l2x0 registers across suspend/resume cycle. But because imx6q
63 * retains L2 content during suspend and needs to resume L2 before
64 * MMU is enabled, it can only utilize register saving support and
65 * have to take care of restoring on its own. So we save physical
66 * address of the data structure used by l2x0 core to save registers,
67 * and later restore the necessary ones in imx6q resume entry.
68 */
69#ifdef CONFIG_CACHE_L2X0
70 phys_l2x0_saved_regs = __pa(&l2x0_saved_regs);
71#endif
72
73 suspend_set_ops(&imx6q_pm_ops); 58 suspend_set_ops(&imx6q_pm_ops);
74} 59}
diff --git a/arch/arm/mach-ixp4xx/vulcan-setup.c b/arch/arm/mach-ixp4xx/vulcan-setup.c
index d42730a1d4ab..d599e354ca57 100644
--- a/arch/arm/mach-ixp4xx/vulcan-setup.c
+++ b/arch/arm/mach-ixp4xx/vulcan-setup.c
@@ -163,6 +163,7 @@ static struct platform_device vulcan_max6369 = {
163 163
164static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = { 164static struct w1_gpio_platform_data vulcan_w1_gpio_pdata = {
165 .pin = 14, 165 .pin = 14,
166 .ext_pullup_enable_pin = -EINVAL,
166}; 167};
167 168
168static struct platform_device vulcan_w1_gpio = { 169static struct platform_device vulcan_w1_gpio = {
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 2e73e9d53f70..d367aa6b47bb 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -41,16 +41,12 @@ static void __init kirkwood_legacy_clk_init(void)
41 41
42 struct device_node *np = of_find_compatible_node( 42 struct device_node *np = of_find_compatible_node(
43 NULL, NULL, "marvell,kirkwood-gating-clock"); 43 NULL, NULL, "marvell,kirkwood-gating-clock");
44
45 struct of_phandle_args clkspec; 44 struct of_phandle_args clkspec;
45 struct clk *clk;
46 46
47 clkspec.np = np; 47 clkspec.np = np;
48 clkspec.args_count = 1; 48 clkspec.args_count = 1;
49 49
50 clkspec.args[0] = CGC_BIT_GE0;
51 orion_clkdev_add(NULL, "mv643xx_eth_port.0",
52 of_clk_get_from_provider(&clkspec));
53
54 clkspec.args[0] = CGC_BIT_PEX0; 50 clkspec.args[0] = CGC_BIT_PEX0;
55 orion_clkdev_add("0", "pcie", 51 orion_clkdev_add("0", "pcie",
56 of_clk_get_from_provider(&clkspec)); 52 of_clk_get_from_provider(&clkspec));
@@ -59,9 +55,24 @@ static void __init kirkwood_legacy_clk_init(void)
59 orion_clkdev_add("1", "pcie", 55 orion_clkdev_add("1", "pcie",
60 of_clk_get_from_provider(&clkspec)); 56 of_clk_get_from_provider(&clkspec));
61 57
62 clkspec.args[0] = CGC_BIT_GE1; 58 clkspec.args[0] = CGC_BIT_SDIO;
63 orion_clkdev_add(NULL, "mv643xx_eth_port.1", 59 orion_clkdev_add(NULL, "mvsdio",
64 of_clk_get_from_provider(&clkspec)); 60 of_clk_get_from_provider(&clkspec));
61
62 /*
63 * The ethernet interfaces forget the MAC address assigned by
64 * u-boot if the clocks are turned off. Until proper DT support
65 * is available we always enable them for now.
66 */
67 clkspec.args[0] = CGC_BIT_GE0;
68 clk = of_clk_get_from_provider(&clkspec);
69 orion_clkdev_add(NULL, "mv643xx_eth_port.0", clk);
70 clk_prepare_enable(clk);
71
72 clkspec.args[0] = CGC_BIT_GE1;
73 clk = of_clk_get_from_provider(&clkspec);
74 orion_clkdev_add(NULL, "mv643xx_eth_port.1", clk);
75 clk_prepare_enable(clk);
65} 76}
66 77
67static void __init kirkwood_of_clk_init(void) 78static void __init kirkwood_of_clk_init(void)
diff --git a/arch/arm/mach-mmp/gplugd.c b/arch/arm/mach-mmp/gplugd.c
index d1e2d595e79c..f62b68d926f4 100644
--- a/arch/arm/mach-mmp/gplugd.c
+++ b/arch/arm/mach-mmp/gplugd.c
@@ -9,6 +9,7 @@
9 */ 9 */
10 10
11#include <linux/init.h> 11#include <linux/init.h>
12#include <linux/platform_device.h>
12#include <linux/gpio.h> 13#include <linux/gpio.h>
13 14
14#include <asm/mach/arch.h> 15#include <asm/mach/arch.h>
diff --git a/arch/arm/mach-mxs/icoll.c b/arch/arm/mach-mxs/icoll.c
index 8fb23af154b3..e26eeba46598 100644
--- a/arch/arm/mach-mxs/icoll.c
+++ b/arch/arm/mach-mxs/icoll.c
@@ -100,7 +100,7 @@ static struct irq_domain_ops icoll_irq_domain_ops = {
100 .xlate = irq_domain_xlate_onecell, 100 .xlate = irq_domain_xlate_onecell,
101}; 101};
102 102
103void __init icoll_of_init(struct device_node *np, 103static void __init icoll_of_init(struct device_node *np,
104 struct device_node *interrupt_parent) 104 struct device_node *interrupt_parent)
105{ 105{
106 /* 106 /*
diff --git a/arch/arm/mach-mxs/mach-mxs.c b/arch/arm/mach-mxs/mach-mxs.c
index 052186713347..3218f1f2c0e0 100644
--- a/arch/arm/mach-mxs/mach-mxs.c
+++ b/arch/arm/mach-mxs/mach-mxs.c
@@ -402,17 +402,17 @@ static void __init cfa10049_init(void)
402{ 402{
403 enable_clk_enet_out(); 403 enable_clk_enet_out();
404 update_fec_mac_prop(OUI_CRYSTALFONTZ); 404 update_fec_mac_prop(OUI_CRYSTALFONTZ);
405
406 mxsfb_pdata.mode_list = cfa10049_video_modes;
407 mxsfb_pdata.mode_count = ARRAY_SIZE(cfa10049_video_modes);
408 mxsfb_pdata.default_bpp = 32;
409 mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT;
405} 410}
406 411
407static void __init cfa10037_init(void) 412static void __init cfa10037_init(void)
408{ 413{
409 enable_clk_enet_out(); 414 enable_clk_enet_out();
410 update_fec_mac_prop(OUI_CRYSTALFONTZ); 415 update_fec_mac_prop(OUI_CRYSTALFONTZ);
411
412 mxsfb_pdata.mode_list = cfa10049_video_modes;
413 mxsfb_pdata.mode_count = ARRAY_SIZE(cfa10049_video_modes);
414 mxsfb_pdata.default_bpp = 32;
415 mxsfb_pdata.ld_intf_width = STMLCDIF_18BIT;
416} 416}
417 417
418static void __init apf28_init(void) 418static void __init apf28_init(void)
diff --git a/arch/arm/mach-mxs/mm.c b/arch/arm/mach-mxs/mm.c
index a4294aa9f301..e63b7d87acbd 100644
--- a/arch/arm/mach-mxs/mm.c
+++ b/arch/arm/mach-mxs/mm.c
@@ -18,6 +18,7 @@
18 18
19#include <mach/mx23.h> 19#include <mach/mx23.h>
20#include <mach/mx28.h> 20#include <mach/mx28.h>
21#include <mach/common.h>
21 22
22/* 23/*
23 * Define the MX23 memory map. 24 * Define the MX23 memory map.
diff --git a/arch/arm/mach-mxs/ocotp.c b/arch/arm/mach-mxs/ocotp.c
index 54add60f94c9..1dff46703753 100644
--- a/arch/arm/mach-mxs/ocotp.c
+++ b/arch/arm/mach-mxs/ocotp.c
@@ -19,6 +19,7 @@
19#include <asm/processor.h> /* for cpu_relax() */ 19#include <asm/processor.h> /* for cpu_relax() */
20 20
21#include <mach/mxs.h> 21#include <mach/mxs.h>
22#include <mach/common.h>
22 23
23#define OCOTP_WORD_OFFSET 0x20 24#define OCOTP_WORD_OFFSET 0x20
24#define OCOTP_WORD_COUNT 0x20 25#define OCOTP_WORD_COUNT 0x20
diff --git a/arch/arm/mach-omap1/common.h b/arch/arm/mach-omap1/common.h
index fb18831e88aa..14f7e9920479 100644
--- a/arch/arm/mach-omap1/common.h
+++ b/arch/arm/mach-omap1/common.h
@@ -31,6 +31,8 @@
31 31
32#include <plat/i2c.h> 32#include <plat/i2c.h>
33 33
34#include <mach/irqs.h>
35
34#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850) 36#if defined(CONFIG_ARCH_OMAP730) || defined(CONFIG_ARCH_OMAP850)
35void omap7xx_map_io(void); 37void omap7xx_map_io(void);
36#else 38#else
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 49ac3dfebef9..8111cd9ff3e5 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -311,9 +311,6 @@ config MACH_OMAP_ZOOM2
311 default y 311 default y
312 select OMAP_PACKAGE_CBB 312 select OMAP_PACKAGE_CBB
313 select REGULATOR_FIXED_VOLTAGE if REGULATOR 313 select REGULATOR_FIXED_VOLTAGE if REGULATOR
314 select SERIAL_8250
315 select SERIAL_8250_CONSOLE
316 select SERIAL_CORE_CONSOLE
317 314
318config MACH_OMAP_ZOOM3 315config MACH_OMAP_ZOOM3
319 bool "OMAP3630 Zoom3 board" 316 bool "OMAP3630 Zoom3 board"
@@ -321,9 +318,6 @@ config MACH_OMAP_ZOOM3
321 default y 318 default y
322 select OMAP_PACKAGE_CBP 319 select OMAP_PACKAGE_CBP
323 select REGULATOR_FIXED_VOLTAGE if REGULATOR 320 select REGULATOR_FIXED_VOLTAGE if REGULATOR
324 select SERIAL_8250
325 select SERIAL_8250_CONSOLE
326 select SERIAL_CORE_CONSOLE
327 321
328config MACH_CM_T35 322config MACH_CM_T35
329 bool "CompuLab CM-T35/CM-T3730 modules" 323 bool "CompuLab CM-T35/CM-T3730 modules"
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c
index 0274ff7a2a2b..e54a48060198 100644
--- a/arch/arm/mach-omap2/board-generic.c
+++ b/arch/arm/mach-omap2/board-generic.c
@@ -102,6 +102,7 @@ DT_MACHINE_START(OMAP3_DT, "Generic OMAP3 (Flattened Device Tree)")
102 .init_irq = omap_intc_of_init, 102 .init_irq = omap_intc_of_init,
103 .handle_irq = omap3_intc_handle_irq, 103 .handle_irq = omap3_intc_handle_irq,
104 .init_machine = omap_generic_init, 104 .init_machine = omap_generic_init,
105 .init_late = omap3_init_late,
105 .init_time = omap3_sync32k_timer_init, 106 .init_time = omap3_sync32k_timer_init,
106 .dt_compat = omap3_boards_compat, 107 .dt_compat = omap3_boards_compat,
107 .restart = omap3xxx_restart, 108 .restart = omap3xxx_restart,
@@ -119,6 +120,7 @@ DT_MACHINE_START(OMAP3_GP_DT, "Generic OMAP3-GP (Flattened Device Tree)")
119 .init_irq = omap_intc_of_init, 120 .init_irq = omap_intc_of_init,
120 .handle_irq = omap3_intc_handle_irq, 121 .handle_irq = omap3_intc_handle_irq,
121 .init_machine = omap_generic_init, 122 .init_machine = omap_generic_init,
123 .init_late = omap3_init_late,
122 .init_time = omap3_secure_sync32k_timer_init, 124 .init_time = omap3_secure_sync32k_timer_init,
123 .dt_compat = omap3_gp_boards_compat, 125 .dt_compat = omap3_gp_boards_compat,
124 .restart = omap3xxx_restart, 126 .restart = omap3xxx_restart,
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c
index f7c4616cbb60..d2ea68ea678a 100644
--- a/arch/arm/mach-omap2/board-rx51.c
+++ b/arch/arm/mach-omap2/board-rx51.c
@@ -17,6 +17,7 @@
17#include <linux/io.h> 17#include <linux/io.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include <linux/leds.h> 19#include <linux/leds.h>
20#include <linux/usb/phy.h>
20#include <linux/usb/musb.h> 21#include <linux/usb/musb.h>
21#include <linux/platform_data/spi-omap2-mcspi.h> 22#include <linux/platform_data/spi-omap2-mcspi.h>
22 23
@@ -98,6 +99,7 @@ static void __init rx51_init(void)
98 sdrc_params = nokia_get_sdram_timings(); 99 sdrc_params = nokia_get_sdram_timings();
99 omap_sdrc_init(sdrc_params, sdrc_params); 100 omap_sdrc_init(sdrc_params, sdrc_params);
100 101
102 usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
101 usb_musb_init(&musb_board_data); 103 usb_musb_init(&musb_board_data);
102 rx51_peripherals_init(); 104 rx51_peripherals_init();
103 105
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h
index 0a6b9c7a63da..40f4a03d728f 100644
--- a/arch/arm/mach-omap2/common.h
+++ b/arch/arm/mach-omap2/common.h
@@ -108,7 +108,6 @@ void omap35xx_init_late(void);
108void omap3630_init_late(void); 108void omap3630_init_late(void);
109void am35xx_init_late(void); 109void am35xx_init_late(void);
110void ti81xx_init_late(void); 110void ti81xx_init_late(void);
111void omap4430_init_late(void);
112int omap2_common_pm_late_init(void); 111int omap2_common_pm_late_init(void);
113 112
114#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430) 113#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430)
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index e4b16c8efe8b..410e1bac7815 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1122,9 +1122,6 @@ int gpmc_calc_timings(struct gpmc_timings *gpmc_t,
1122 /* TODO: remove, see function definition */ 1122 /* TODO: remove, see function definition */
1123 gpmc_convert_ps_to_ns(gpmc_t); 1123 gpmc_convert_ps_to_ns(gpmc_t);
1124 1124
1125 /* Now the GPMC is initialised, unreserve the chip-selects */
1126 gpmc_cs_map = 0;
1127
1128 return 0; 1125 return 0;
1129} 1126}
1130 1127
@@ -1383,6 +1380,9 @@ static int gpmc_probe(struct platform_device *pdev)
1383 if (IS_ERR_VALUE(gpmc_setup_irq())) 1380 if (IS_ERR_VALUE(gpmc_setup_irq()))
1384 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n"); 1381 dev_warn(gpmc_dev, "gpmc_setup_irq failed\n");
1385 1382
1383 /* Now the GPMC is initialised, unreserve the chip-selects */
1384 gpmc_cs_map = 0;
1385
1386 rc = gpmc_probe_dt(pdev); 1386 rc = gpmc_probe_dt(pdev);
1387 if (rc < 0) { 1387 if (rc < 0) {
1388 clk_disable_unprepare(gpmc_l3_clk); 1388 clk_disable_unprepare(gpmc_l3_clk);
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index 6a217c98db54..f82cf878d6af 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -211,8 +211,6 @@ static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition,
211 return -EINVAL; 211 return -EINVAL;
212 } 212 }
213 213
214 pr_err("%s: Could not find signal %s\n", __func__, muxname);
215
216 return -ENODEV; 214 return -ENODEV;
217} 215}
218 216
@@ -234,6 +232,8 @@ int __init omap_mux_get_by_name(const char *muxname,
234 return mux_mode; 232 return mux_mode;
235 } 233 }
236 234
235 pr_err("%s: Could not find signal %s\n", __func__, muxname);
236
237 return -ENODEV; 237 return -ENODEV;
238} 238}
239 239
@@ -739,8 +739,9 @@ static void __init omap_mux_dbg_create_entry(
739 list_for_each_entry(e, &partition->muxmodes, node) { 739 list_for_each_entry(e, &partition->muxmodes, node) {
740 struct omap_mux *m = &e->mux; 740 struct omap_mux *m = &e->mux;
741 741
742 (void)debugfs_create_file(m->muxnames[0], S_IWUSR, mux_dbg_dir, 742 (void)debugfs_create_file(m->muxnames[0], S_IWUSR | S_IRUGO,
743 m, &omap_mux_dbg_signal_fops); 743 mux_dbg_dir, m,
744 &omap_mux_dbg_signal_fops);
744 } 745 }
745} 746}
746 747
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index af41888acbd6..969b0ba7fa70 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -505,6 +505,7 @@ static struct w1_gpio_platform_data w1_gpio_platform_data = {
505 .pin = GPIO_ONE_WIRE, 505 .pin = GPIO_ONE_WIRE,
506 .is_open_drain = 0, 506 .is_open_drain = 0,
507 .enable_external_pullup = w1_enable_external_pullup, 507 .enable_external_pullup = w1_enable_external_pullup,
508 .ext_pullup_enable_pin = -EINVAL,
508}; 509};
509 510
510struct platform_device raumfeld_w1_gpio_device = { 511struct platform_device raumfeld_w1_gpio_device = {
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c
index fcdf52dbcc49..f051f53e35b7 100644
--- a/arch/arm/mach-s5pv210/clock.c
+++ b/arch/arm/mach-s5pv210/clock.c
@@ -214,11 +214,6 @@ static struct clk clk_pcmcdclk2 = {
214 .name = "pcmcdclk", 214 .name = "pcmcdclk",
215}; 215};
216 216
217static struct clk dummy_apb_pclk = {
218 .name = "apb_pclk",
219 .id = -1,
220};
221
222static struct clk *clkset_vpllsrc_list[] = { 217static struct clk *clkset_vpllsrc_list[] = {
223 [0] = &clk_fin_vpll, 218 [0] = &clk_fin_vpll,
224 [1] = &clk_sclk_hdmi27m, 219 [1] = &clk_sclk_hdmi27m,
@@ -305,18 +300,6 @@ static struct clk_ops clk_fout_apll_ops = {
305 300
306static struct clk init_clocks_off[] = { 301static struct clk init_clocks_off[] = {
307 { 302 {
308 .name = "dma",
309 .devname = "dma-pl330.0",
310 .parent = &clk_hclk_psys.clk,
311 .enable = s5pv210_clk_ip0_ctrl,
312 .ctrlbit = (1 << 3),
313 }, {
314 .name = "dma",
315 .devname = "dma-pl330.1",
316 .parent = &clk_hclk_psys.clk,
317 .enable = s5pv210_clk_ip0_ctrl,
318 .ctrlbit = (1 << 4),
319 }, {
320 .name = "rot", 303 .name = "rot",
321 .parent = &clk_hclk_dsys.clk, 304 .parent = &clk_hclk_dsys.clk,
322 .enable = s5pv210_clk_ip0_ctrl, 305 .enable = s5pv210_clk_ip0_ctrl,
@@ -573,6 +556,20 @@ static struct clk clk_hsmmc3 = {
573 .ctrlbit = (1<<19), 556 .ctrlbit = (1<<19),
574}; 557};
575 558
559static struct clk clk_pdma0 = {
560 .name = "pdma0",
561 .parent = &clk_hclk_psys.clk,
562 .enable = s5pv210_clk_ip0_ctrl,
563 .ctrlbit = (1 << 3),
564};
565
566static struct clk clk_pdma1 = {
567 .name = "pdma1",
568 .parent = &clk_hclk_psys.clk,
569 .enable = s5pv210_clk_ip0_ctrl,
570 .ctrlbit = (1 << 4),
571};
572
576static struct clk *clkset_uart_list[] = { 573static struct clk *clkset_uart_list[] = {
577 [6] = &clk_mout_mpll.clk, 574 [6] = &clk_mout_mpll.clk,
578 [7] = &clk_mout_epll.clk, 575 [7] = &clk_mout_epll.clk,
@@ -1075,6 +1072,8 @@ static struct clk *clk_cdev[] = {
1075 &clk_hsmmc1, 1072 &clk_hsmmc1,
1076 &clk_hsmmc2, 1073 &clk_hsmmc2,
1077 &clk_hsmmc3, 1074 &clk_hsmmc3,
1075 &clk_pdma0,
1076 &clk_pdma1,
1078}; 1077};
1079 1078
1080/* Clock initialisation code */ 1079/* Clock initialisation code */
@@ -1333,6 +1332,8 @@ static struct clk_lookup s5pv210_clk_lookup[] = {
1333 CLKDEV_INIT(NULL, "spi_busclk0", &clk_p), 1332 CLKDEV_INIT(NULL, "spi_busclk0", &clk_p),
1334 CLKDEV_INIT("s5pv210-spi.0", "spi_busclk1", &clk_sclk_spi0.clk), 1333 CLKDEV_INIT("s5pv210-spi.0", "spi_busclk1", &clk_sclk_spi0.clk),
1335 CLKDEV_INIT("s5pv210-spi.1", "spi_busclk1", &clk_sclk_spi1.clk), 1334 CLKDEV_INIT("s5pv210-spi.1", "spi_busclk1", &clk_sclk_spi1.clk),
1335 CLKDEV_INIT("dma-pl330.0", "apb_pclk", &clk_pdma0),
1336 CLKDEV_INIT("dma-pl330.1", "apb_pclk", &clk_pdma1),
1336}; 1337};
1337 1338
1338void __init s5pv210_register_clocks(void) 1339void __init s5pv210_register_clocks(void)
@@ -1361,6 +1362,5 @@ void __init s5pv210_register_clocks(void)
1361 for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++) 1362 for (ptr = 0; ptr < ARRAY_SIZE(clk_cdev); ptr++)
1362 s3c_disable_clocks(clk_cdev[ptr], 1); 1363 s3c_disable_clocks(clk_cdev[ptr], 1);
1363 1364
1364 s3c24xx_register_clock(&dummy_apb_pclk);
1365 s3c_pwmclk_init(); 1365 s3c_pwmclk_init();
1366} 1366}
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c
index 256439448364..30b24ad84f49 100644
--- a/arch/arm/mach-s5pv210/mach-goni.c
+++ b/arch/arm/mach-s5pv210/mach-goni.c
@@ -845,7 +845,7 @@ static struct fimc_source_info goni_camera_sensors[] = {
845 .mux_id = 0, 845 .mux_id = 0,
846 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING | 846 .flags = V4L2_MBUS_PCLK_SAMPLE_FALLING |
847 V4L2_MBUS_VSYNC_ACTIVE_LOW, 847 V4L2_MBUS_VSYNC_ACTIVE_LOW,
848 .bus_type = FIMC_BUS_TYPE_ITU_601, 848 .fimc_bus_type = FIMC_BUS_TYPE_ITU_601,
849 .board_info = &noon010pc30_board_info, 849 .board_info = &noon010pc30_board_info,
850 .i2c_bus_num = 0, 850 .i2c_bus_num = 0,
851 .clk_frequency = 16000000UL, 851 .clk_frequency = 16000000UL,
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
index cdcb799e802f..fec49ebc359a 100644
--- a/arch/arm/mach-shmobile/board-marzen.c
+++ b/arch/arm/mach-shmobile/board-marzen.c
@@ -32,6 +32,7 @@
32#include <linux/smsc911x.h> 32#include <linux/smsc911x.h>
33#include <linux/spi/spi.h> 33#include <linux/spi/spi.h>
34#include <linux/spi/sh_hspi.h> 34#include <linux/spi/sh_hspi.h>
35#include <linux/mmc/host.h>
35#include <linux/mmc/sh_mobile_sdhi.h> 36#include <linux/mmc/sh_mobile_sdhi.h>
36#include <linux/mfd/tmio.h> 37#include <linux/mfd/tmio.h>
37#include <linux/usb/otg.h> 38#include <linux/usb/otg.h>
diff --git a/arch/arm/mach-spear3xx/spear3xx.c b/arch/arm/mach-spear3xx/spear3xx.c
index f9d754f90c59..d2b3937c4014 100644
--- a/arch/arm/mach-spear3xx/spear3xx.c
+++ b/arch/arm/mach-spear3xx/spear3xx.c
@@ -14,7 +14,7 @@
14#define pr_fmt(fmt) "SPEAr3xx: " fmt 14#define pr_fmt(fmt) "SPEAr3xx: " fmt
15 15
16#include <linux/amba/pl022.h> 16#include <linux/amba/pl022.h>
17#include <linux/amba/pl08x.h> 17#include <linux/amba/pl080.h>
18#include <linux/io.h> 18#include <linux/io.h>
19#include <plat/pl080.h> 19#include <plat/pl080.h>
20#include <mach/generic.h> 20#include <mach/generic.h>
diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
index e3e94b2fa145..9b252934b206 100644
--- a/arch/arm/mach-vt8500/Kconfig
+++ b/arch/arm/mach-vt8500/Kconfig
@@ -7,6 +7,7 @@ config ARCH_VT8500
7 select GENERIC_CLOCKEVENTS 7 select GENERIC_CLOCKEVENTS
8 select HAVE_CLK 8 select HAVE_CLK
9 select VT8500_TIMER 9 select VT8500_TIMER
10 select PINCTRL
10 help 11 help
11 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip. 12 Support for VIA/WonderMedia VT8500/WM85xx System-on-Chip.
12 13
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index c7e3759f16d3..e9db6b4bf65a 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -342,6 +342,7 @@ static int __init atomic_pool_init(void)
342{ 342{
343 struct dma_pool *pool = &atomic_pool; 343 struct dma_pool *pool = &atomic_pool;
344 pgprot_t prot = pgprot_dmacoherent(pgprot_kernel); 344 pgprot_t prot = pgprot_dmacoherent(pgprot_kernel);
345 gfp_t gfp = GFP_KERNEL | GFP_DMA;
345 unsigned long nr_pages = pool->size >> PAGE_SHIFT; 346 unsigned long nr_pages = pool->size >> PAGE_SHIFT;
346 unsigned long *bitmap; 347 unsigned long *bitmap;
347 struct page *page; 348 struct page *page;
@@ -361,8 +362,8 @@ static int __init atomic_pool_init(void)
361 ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page, 362 ptr = __alloc_from_contiguous(NULL, pool->size, prot, &page,
362 atomic_pool_init); 363 atomic_pool_init);
363 else 364 else
364 ptr = __alloc_remap_buffer(NULL, pool->size, GFP_KERNEL, prot, 365 ptr = __alloc_remap_buffer(NULL, pool->size, gfp, prot, &page,
365 &page, atomic_pool_init); 366 atomic_pool_init);
366 if (ptr) { 367 if (ptr) {
367 int i; 368 int i;
368 369
diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 6828ef6ce80e..a0bd8a755bdf 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -576,7 +576,7 @@ load_ind:
576 /* x = ((*(frame + k)) & 0xf) << 2; */ 576 /* x = ((*(frame + k)) & 0xf) << 2; */
577 ctx->seen |= SEEN_X | SEEN_DATA | SEEN_CALL; 577 ctx->seen |= SEEN_X | SEEN_DATA | SEEN_CALL;
578 /* the interpreter should deal with the negative K */ 578 /* the interpreter should deal with the negative K */
579 if (k < 0) 579 if ((int)k < 0)
580 return -1; 580 return -1;
581 /* offset in r1: we might have to take the slow path */ 581 /* offset in r1: we might have to take the slow path */
582 emit_mov_i(r_off, k, ctx); 582 emit_mov_i(r_off, k, ctx);
diff --git a/arch/arm/plat-orion/addr-map.c b/arch/arm/plat-orion/addr-map.c
index febe3862873c..807ac8e5cbc0 100644
--- a/arch/arm/plat-orion/addr-map.c
+++ b/arch/arm/plat-orion/addr-map.c
@@ -157,9 +157,12 @@ void __init orion_setup_cpu_mbus_target(const struct orion_addr_map_cfg *cfg,
157 u32 size = readl(ddr_window_cpu_base + DDR_SIZE_CS_OFF(i)); 157 u32 size = readl(ddr_window_cpu_base + DDR_SIZE_CS_OFF(i));
158 158
159 /* 159 /*
160 * Chip select enabled? 160 * We only take care of entries for which the chip
161 * select is enabled, and that don't have high base
162 * address bits set (devices can only access the first
163 * 32 bits of the memory).
161 */ 164 */
162 if (size & 1) { 165 if ((size & 1) && !(base & 0xF)) {
163 struct mbus_dram_window *w; 166 struct mbus_dram_window *w;
164 167
165 w = &orion_mbus_dram_info.cs[cs++]; 168 w = &orion_mbus_dram_info.cs[cs++];
diff --git a/arch/arm/plat-spear/Kconfig b/arch/arm/plat-spear/Kconfig
index 739d016eb273..8a08c31b5e20 100644
--- a/arch/arm/plat-spear/Kconfig
+++ b/arch/arm/plat-spear/Kconfig
@@ -10,7 +10,7 @@ choice
10 10
11config ARCH_SPEAR13XX 11config ARCH_SPEAR13XX
12 bool "ST SPEAr13xx with Device Tree" 12 bool "ST SPEAr13xx with Device Tree"
13 select ARCH_HAVE_CPUFREQ 13 select ARCH_HAS_CPUFREQ
14 select ARM_GIC 14 select ARM_GIC
15 select CPU_V7 15 select CPU_V7
16 select GPIO_SPEAR_SPICS 16 select GPIO_SPEAR_SPICS
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index fd70a68387eb..9b6d19f74078 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -9,7 +9,6 @@ config ARM64
9 select CLONE_BACKWARDS 9 select CLONE_BACKWARDS
10 select COMMON_CLK 10 select COMMON_CLK
11 select GENERIC_CLOCKEVENTS 11 select GENERIC_CLOCKEVENTS
12 select GENERIC_HARDIRQS_NO_DEPRECATED
13 select GENERIC_IOMAP 12 select GENERIC_IOMAP
14 select GENERIC_IRQ_PROBE 13 select GENERIC_IRQ_PROBE
15 select GENERIC_IRQ_SHOW 14 select GENERIC_IRQ_SHOW
diff --git a/arch/arm64/Kconfig.debug b/arch/arm64/Kconfig.debug
index 51493430f142..1a6bfe954d49 100644
--- a/arch/arm64/Kconfig.debug
+++ b/arch/arm64/Kconfig.debug
@@ -6,17 +6,6 @@ config FRAME_POINTER
6 bool 6 bool
7 default y 7 default y
8 8
9config DEBUG_ERRORS
10 bool "Verbose kernel error messages"
11 depends on DEBUG_KERNEL
12 help
13 This option controls verbose debugging information which can be
14 printed when the kernel detects an internal error. This debugging
15 information is useful to kernel hackers when tracking down problems,
16 but mostly meaningless to other people. It's safe to say Y unless
17 you are concerned with the code size or don't want to see these
18 messages.
19
20config DEBUG_STACK_USAGE 9config DEBUG_STACK_USAGE
21 bool "Enable stack utilization instrumentation" 10 bool "Enable stack utilization instrumentation"
22 depends on DEBUG_KERNEL 11 depends on DEBUG_KERNEL
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 9212c7880da7..09bef29f3a09 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -82,4 +82,3 @@ CONFIG_DEBUG_KERNEL=y
82CONFIG_DEBUG_INFO=y 82CONFIG_DEBUG_INFO=y
83# CONFIG_FTRACE is not set 83# CONFIG_FTRACE is not set
84CONFIG_ATOMIC64_SELFTEST=y 84CONFIG_ATOMIC64_SELFTEST=y
85CONFIG_DEBUG_ERRORS=y
diff --git a/arch/arm64/include/asm/ucontext.h b/arch/arm64/include/asm/ucontext.h
index bde960720892..42e04c877428 100644
--- a/arch/arm64/include/asm/ucontext.h
+++ b/arch/arm64/include/asm/ucontext.h
@@ -22,7 +22,7 @@ struct ucontext {
22 stack_t uc_stack; 22 stack_t uc_stack;
23 sigset_t uc_sigmask; 23 sigset_t uc_sigmask;
24 /* glibc uses a 1024-bit sigset_t */ 24 /* glibc uses a 1024-bit sigset_t */
25 __u8 __unused[(1024 - sizeof(sigset_t)) / 8]; 25 __u8 __unused[1024 / 8 - sizeof(sigset_t)];
26 /* last for future expansion */ 26 /* last for future expansion */
27 struct sigcontext uc_mcontext; 27 struct sigcontext uc_mcontext;
28}; 28};
diff --git a/arch/arm64/kernel/arm64ksyms.c b/arch/arm64/kernel/arm64ksyms.c
index cef3925eaf60..aa3e948f7885 100644
--- a/arch/arm64/kernel/arm64ksyms.c
+++ b/arch/arm64/kernel/arm64ksyms.c
@@ -40,7 +40,9 @@ EXPORT_SYMBOL(__copy_to_user);
40EXPORT_SYMBOL(__clear_user); 40EXPORT_SYMBOL(__clear_user);
41 41
42 /* bitops */ 42 /* bitops */
43#ifdef CONFIG_SMP
43EXPORT_SYMBOL(__atomic_hash); 44EXPORT_SYMBOL(__atomic_hash);
45#endif
44 46
45 /* physical memory */ 47 /* physical memory */
46EXPORT_SYMBOL(memstart_addr); 48EXPORT_SYMBOL(memstart_addr);
diff --git a/arch/arm64/kernel/signal32.c b/arch/arm64/kernel/signal32.c
index 7f4f3673f2bc..e393174fe859 100644
--- a/arch/arm64/kernel/signal32.c
+++ b/arch/arm64/kernel/signal32.c
@@ -549,7 +549,6 @@ int compat_setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info,
549 sigset_t *set, struct pt_regs *regs) 549 sigset_t *set, struct pt_regs *regs)
550{ 550{
551 struct compat_rt_sigframe __user *frame; 551 struct compat_rt_sigframe __user *frame;
552 compat_stack_t stack;
553 int err = 0; 552 int err = 0;
554 553
555 frame = compat_get_sigframe(ka, regs, sizeof(*frame)); 554 frame = compat_get_sigframe(ka, regs, sizeof(*frame));
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 9b89257b2cfd..c1a868d398bd 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -7,7 +7,7 @@ config AVR32
7 select HAVE_OPROFILE 7 select HAVE_OPROFILE
8 select HAVE_KPROBES 8 select HAVE_KPROBES
9 select HAVE_GENERIC_HARDIRQS 9 select HAVE_GENERIC_HARDIRQS
10 select HAVE_VIRT_TO_BUS 10 select VIRT_TO_BUS
11 select GENERIC_IRQ_PROBE 11 select GENERIC_IRQ_PROBE
12 select GENERIC_ATOMIC64 12 select GENERIC_ATOMIC64
13 select HARDIRQS_SW_RESEND 13 select HARDIRQS_SW_RESEND
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 600494c70e96..c3f2e0bc644a 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -33,7 +33,7 @@ config BLACKFIN
33 select ARCH_HAVE_CUSTOM_GPIO_H 33 select ARCH_HAVE_CUSTOM_GPIO_H
34 select ARCH_WANT_OPTIONAL_GPIOLIB 34 select ARCH_WANT_OPTIONAL_GPIOLIB
35 select HAVE_UID16 35 select HAVE_UID16
36 select HAVE_VIRT_TO_BUS 36 select VIRT_TO_BUS
37 select ARCH_WANT_IPC_PARSE_VERSION 37 select ARCH_WANT_IPC_PARSE_VERSION
38 select HAVE_GENERIC_HARDIRQS 38 select HAVE_GENERIC_HARDIRQS
39 select GENERIC_ATOMIC64 39 select GENERIC_ATOMIC64
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index bb0ac66cf533..06dd026533e3 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -43,7 +43,7 @@ config CRIS
43 select GENERIC_ATOMIC64 43 select GENERIC_ATOMIC64
44 select HAVE_GENERIC_HARDIRQS 44 select HAVE_GENERIC_HARDIRQS
45 select HAVE_UID16 45 select HAVE_UID16
46 select HAVE_VIRT_TO_BUS 46 select VIRT_TO_BUS
47 select ARCH_WANT_IPC_PARSE_VERSION 47 select ARCH_WANT_IPC_PARSE_VERSION
48 select GENERIC_IRQ_SHOW 48 select GENERIC_IRQ_SHOW
49 select GENERIC_IOMAP 49 select GENERIC_IOMAP
diff --git a/arch/frv/Kconfig b/arch/frv/Kconfig
index 12369b194c7b..2ce731f9aa4d 100644
--- a/arch/frv/Kconfig
+++ b/arch/frv/Kconfig
@@ -6,7 +6,7 @@ config FRV
6 select HAVE_PERF_EVENTS 6 select HAVE_PERF_EVENTS
7 select HAVE_UID16 7 select HAVE_UID16
8 select HAVE_GENERIC_HARDIRQS 8 select HAVE_GENERIC_HARDIRQS
9 select HAVE_VIRT_TO_BUS 9 select VIRT_TO_BUS
10 select GENERIC_IRQ_SHOW 10 select GENERIC_IRQ_SHOW
11 select HAVE_DEBUG_BUGVERBOSE 11 select HAVE_DEBUG_BUGVERBOSE
12 select ARCH_HAVE_NMI_SAFE_CMPXCHG 12 select ARCH_HAVE_NMI_SAFE_CMPXCHG
diff --git a/arch/h8300/Kconfig b/arch/h8300/Kconfig
index ae8551eb3736..79250de1b12a 100644
--- a/arch/h8300/Kconfig
+++ b/arch/h8300/Kconfig
@@ -5,7 +5,7 @@ config H8300
5 select HAVE_GENERIC_HARDIRQS 5 select HAVE_GENERIC_HARDIRQS
6 select GENERIC_ATOMIC64 6 select GENERIC_ATOMIC64
7 select HAVE_UID16 7 select HAVE_UID16
8 select HAVE_VIRT_TO_BUS 8 select VIRT_TO_BUS
9 select ARCH_WANT_IPC_PARSE_VERSION 9 select ARCH_WANT_IPC_PARSE_VERSION
10 select GENERIC_IRQ_SHOW 10 select GENERIC_IRQ_SHOW
11 select GENERIC_CPU_DEVICES 11 select GENERIC_CPU_DEVICES
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 33f3fdc0b214..9a02f71c6b1f 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -26,7 +26,7 @@ config IA64
26 select HAVE_MEMBLOCK 26 select HAVE_MEMBLOCK
27 select HAVE_MEMBLOCK_NODE_MAP 27 select HAVE_MEMBLOCK_NODE_MAP
28 select HAVE_VIRT_CPU_ACCOUNTING 28 select HAVE_VIRT_CPU_ACCOUNTING
29 select HAVE_VIRT_TO_BUS 29 select VIRT_TO_BUS
30 select ARCH_DISCARD_MEMBLOCK 30 select ARCH_DISCARD_MEMBLOCK
31 select GENERIC_IRQ_PROBE 31 select GENERIC_IRQ_PROBE
32 select GENERIC_PENDING_IRQ if SMP 32 select GENERIC_PENDING_IRQ if SMP
diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
index 92623818a1fe..bcd17b206571 100644
--- a/arch/m32r/Kconfig
+++ b/arch/m32r/Kconfig
@@ -10,7 +10,7 @@ config M32R
10 select ARCH_WANT_IPC_PARSE_VERSION 10 select ARCH_WANT_IPC_PARSE_VERSION
11 select HAVE_DEBUG_BUGVERBOSE 11 select HAVE_DEBUG_BUGVERBOSE
12 select HAVE_GENERIC_HARDIRQS 12 select HAVE_GENERIC_HARDIRQS
13 select HAVE_VIRT_TO_BUS 13 select VIRT_TO_BUS
14 select GENERIC_IRQ_PROBE 14 select GENERIC_IRQ_PROBE
15 select GENERIC_IRQ_SHOW 15 select GENERIC_IRQ_SHOW
16 select GENERIC_ATOMIC64 16 select GENERIC_ATOMIC64
diff --git a/arch/m32r/include/uapi/asm/stat.h b/arch/m32r/include/uapi/asm/stat.h
index da4518f82d6d..98470fe483b6 100644
--- a/arch/m32r/include/uapi/asm/stat.h
+++ b/arch/m32r/include/uapi/asm/stat.h
@@ -63,10 +63,10 @@ struct stat64 {
63 long long st_size; 63 long long st_size;
64 unsigned long st_blksize; 64 unsigned long st_blksize;
65 65
66#if defined(__BIG_ENDIAN) 66#if defined(__BYTE_ORDER) ? __BYTE_ORDER == __BIG_ENDIAN : defined(__BIG_ENDIAN)
67 unsigned long __pad4; /* future possible st_blocks high bits */ 67 unsigned long __pad4; /* future possible st_blocks high bits */
68 unsigned long st_blocks; /* Number 512-byte blocks allocated. */ 68 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
69#elif defined(__LITTLE_ENDIAN) 69#elif defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
70 unsigned long st_blocks; /* Number 512-byte blocks allocated. */ 70 unsigned long st_blocks; /* Number 512-byte blocks allocated. */
71 unsigned long __pad4; /* future possible st_blocks high bits */ 71 unsigned long __pad4; /* future possible st_blocks high bits */
72#else 72#else
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 0e708c78e01c..6de813370b8c 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -8,7 +8,7 @@ config M68K
8 select GENERIC_IRQ_SHOW 8 select GENERIC_IRQ_SHOW
9 select GENERIC_ATOMIC64 9 select GENERIC_ATOMIC64
10 select HAVE_UID16 10 select HAVE_UID16
11 select HAVE_VIRT_TO_BUS 11 select VIRT_TO_BUS
12 select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS 12 select ARCH_HAVE_NMI_SAFE_CMPXCHG if RMW_INSNS
13 select GENERIC_CPU_DEVICES 13 select GENERIC_CPU_DEVICES
14 select GENERIC_STRNCPY_FROM_USER if MMU 14 select GENERIC_STRNCPY_FROM_USER if MMU
diff --git a/arch/m68k/Kconfig.machine b/arch/m68k/Kconfig.machine
index 7cdf6b010381..7240584d3439 100644
--- a/arch/m68k/Kconfig.machine
+++ b/arch/m68k/Kconfig.machine
@@ -310,7 +310,6 @@ config COBRA5282
310config SOM5282EM 310config SOM5282EM
311 bool "EMAC.Inc SOM5282EM board support" 311 bool "EMAC.Inc SOM5282EM board support"
312 depends on M528x 312 depends on M528x
313 select EMAC_INC
314 help 313 help
315 Support for the EMAC.Inc SOM5282EM module. 314 Support for the EMAC.Inc SOM5282EM module.
316 315
diff --git a/arch/m68k/include/asm/MC68328.h b/arch/m68k/include/asm/MC68328.h
index a337e56d09bf..4ebf098b8a1f 100644
--- a/arch/m68k/include/asm/MC68328.h
+++ b/arch/m68k/include/asm/MC68328.h
@@ -293,7 +293,7 @@
293/* 293/*
294 * Here go the bitmasks themselves 294 * Here go the bitmasks themselves
295 */ 295 */
296#define IMR_MSPIM (1 << SPIM _IRQ_NUM) /* Mask SPI Master interrupt */ 296#define IMR_MSPIM (1 << SPIM_IRQ_NUM) /* Mask SPI Master interrupt */
297#define IMR_MTMR2 (1 << TMR2_IRQ_NUM) /* Mask Timer 2 interrupt */ 297#define IMR_MTMR2 (1 << TMR2_IRQ_NUM) /* Mask Timer 2 interrupt */
298#define IMR_MUART (1 << UART_IRQ_NUM) /* Mask UART interrupt */ 298#define IMR_MUART (1 << UART_IRQ_NUM) /* Mask UART interrupt */
299#define IMR_MWDT (1 << WDT_IRQ_NUM) /* Mask Watchdog Timer interrupt */ 299#define IMR_MWDT (1 << WDT_IRQ_NUM) /* Mask Watchdog Timer interrupt */
@@ -327,7 +327,7 @@
327#define IWR_ADDR 0xfffff308 327#define IWR_ADDR 0xfffff308
328#define IWR LONG_REF(IWR_ADDR) 328#define IWR LONG_REF(IWR_ADDR)
329 329
330#define IWR_SPIM (1 << SPIM _IRQ_NUM) /* SPI Master interrupt */ 330#define IWR_SPIM (1 << SPIM_IRQ_NUM) /* SPI Master interrupt */
331#define IWR_TMR2 (1 << TMR2_IRQ_NUM) /* Timer 2 interrupt */ 331#define IWR_TMR2 (1 << TMR2_IRQ_NUM) /* Timer 2 interrupt */
332#define IWR_UART (1 << UART_IRQ_NUM) /* UART interrupt */ 332#define IWR_UART (1 << UART_IRQ_NUM) /* UART interrupt */
333#define IWR_WDT (1 << WDT_IRQ_NUM) /* Watchdog Timer interrupt */ 333#define IWR_WDT (1 << WDT_IRQ_NUM) /* Watchdog Timer interrupt */
@@ -357,7 +357,7 @@
357#define ISR_ADDR 0xfffff30c 357#define ISR_ADDR 0xfffff30c
358#define ISR LONG_REF(ISR_ADDR) 358#define ISR LONG_REF(ISR_ADDR)
359 359
360#define ISR_SPIM (1 << SPIM _IRQ_NUM) /* SPI Master interrupt */ 360#define ISR_SPIM (1 << SPIM_IRQ_NUM) /* SPI Master interrupt */
361#define ISR_TMR2 (1 << TMR2_IRQ_NUM) /* Timer 2 interrupt */ 361#define ISR_TMR2 (1 << TMR2_IRQ_NUM) /* Timer 2 interrupt */
362#define ISR_UART (1 << UART_IRQ_NUM) /* UART interrupt */ 362#define ISR_UART (1 << UART_IRQ_NUM) /* UART interrupt */
363#define ISR_WDT (1 << WDT_IRQ_NUM) /* Watchdog Timer interrupt */ 363#define ISR_WDT (1 << WDT_IRQ_NUM) /* Watchdog Timer interrupt */
@@ -391,7 +391,7 @@
391#define IPR_ADDR 0xfffff310 391#define IPR_ADDR 0xfffff310
392#define IPR LONG_REF(IPR_ADDR) 392#define IPR LONG_REF(IPR_ADDR)
393 393
394#define IPR_SPIM (1 << SPIM _IRQ_NUM) /* SPI Master interrupt */ 394#define IPR_SPIM (1 << SPIM_IRQ_NUM) /* SPI Master interrupt */
395#define IPR_TMR2 (1 << TMR2_IRQ_NUM) /* Timer 2 interrupt */ 395#define IPR_TMR2 (1 << TMR2_IRQ_NUM) /* Timer 2 interrupt */
396#define IPR_UART (1 << UART_IRQ_NUM) /* UART interrupt */ 396#define IPR_UART (1 << UART_IRQ_NUM) /* UART interrupt */
397#define IPR_WDT (1 << WDT_IRQ_NUM) /* Watchdog Timer interrupt */ 397#define IPR_WDT (1 << WDT_IRQ_NUM) /* Watchdog Timer interrupt */
@@ -757,7 +757,7 @@
757 757
758/* 'EZ328-compatible definitions */ 758/* 'EZ328-compatible definitions */
759#define TCN_ADDR TCN1_ADDR 759#define TCN_ADDR TCN1_ADDR
760#define TCN TCN 760#define TCN TCN1
761 761
762/* 762/*
763 * Timer Unit 1 and 2 Status Registers 763 * Timer Unit 1 and 2 Status Registers
diff --git a/arch/m68k/kernel/setup_no.c b/arch/m68k/kernel/setup_no.c
index 71fb29938dba..911ba472e6c4 100644
--- a/arch/m68k/kernel/setup_no.c
+++ b/arch/m68k/kernel/setup_no.c
@@ -57,6 +57,9 @@ void (*mach_reset)(void);
57void (*mach_halt)(void); 57void (*mach_halt)(void);
58void (*mach_power_off)(void); 58void (*mach_power_off)(void);
59 59
60#ifdef CONFIG_M68000
61#define CPU_NAME "MC68000"
62#endif
60#ifdef CONFIG_M68328 63#ifdef CONFIG_M68328
61#define CPU_NAME "MC68328" 64#define CPU_NAME "MC68328"
62#endif 65#endif
diff --git a/arch/m68k/mm/init.c b/arch/m68k/mm/init.c
index afd8106fd83b..519aad8fa812 100644
--- a/arch/m68k/mm/init.c
+++ b/arch/m68k/mm/init.c
@@ -188,7 +188,7 @@ void __init mem_init(void)
188 } 188 }
189 } 189 }
190 190
191#if !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE) 191#if defined(CONFIG_MMU) && !defined(CONFIG_SUN3) && !defined(CONFIG_COLDFIRE)
192 /* insert pointer tables allocated so far into the tablelist */ 192 /* insert pointer tables allocated so far into the tablelist */
193 init_pointer_table((unsigned long)kernel_pg_dir); 193 init_pointer_table((unsigned long)kernel_pg_dir);
194 for (i = 0; i < PTRS_PER_PGD; i++) { 194 for (i = 0; i < PTRS_PER_PGD; i++) {
diff --git a/arch/m68k/platform/coldfire/m528x.c b/arch/m68k/platform/coldfire/m528x.c
index 83b7dad7a84e..b03a9d271837 100644
--- a/arch/m68k/platform/coldfire/m528x.c
+++ b/arch/m68k/platform/coldfire/m528x.c
@@ -69,7 +69,7 @@ static void __init m528x_uarts_init(void)
69 u8 port; 69 u8 port;
70 70
71 /* make sure PUAPAR is set for UART0 and UART1 */ 71 /* make sure PUAPAR is set for UART0 and UART1 */
72 port = readb(MCF5282_GPIO_PUAPAR); 72 port = readb(MCFGPIO_PUAPAR);
73 port |= 0x03 | (0x03 << 2); 73 port |= 0x03 | (0x03 << 2);
74 writeb(port, MCFGPIO_PUAPAR); 74 writeb(port, MCFGPIO_PUAPAR);
75} 75}
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 7843d11156e6..1323fa2530eb 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -19,7 +19,7 @@ config MICROBLAZE
19 select HAVE_DEBUG_KMEMLEAK 19 select HAVE_DEBUG_KMEMLEAK
20 select IRQ_DOMAIN 20 select IRQ_DOMAIN
21 select HAVE_GENERIC_HARDIRQS 21 select HAVE_GENERIC_HARDIRQS
22 select HAVE_VIRT_TO_BUS 22 select VIRT_TO_BUS
23 select GENERIC_IRQ_PROBE 23 select GENERIC_IRQ_PROBE
24 select GENERIC_IRQ_SHOW 24 select GENERIC_IRQ_SHOW
25 select GENERIC_PCI_IOMAP 25 select GENERIC_PCI_IOMAP
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index ae9c716c46bb..cd2e21ff562a 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -38,7 +38,7 @@ config MIPS
38 select GENERIC_CLOCKEVENTS 38 select GENERIC_CLOCKEVENTS
39 select GENERIC_CMOS_UPDATE 39 select GENERIC_CMOS_UPDATE
40 select HAVE_MOD_ARCH_SPECIFIC 40 select HAVE_MOD_ARCH_SPECIFIC
41 select HAVE_VIRT_TO_BUS 41 select VIRT_TO_BUS
42 select MODULES_USE_ELF_REL if MODULES 42 select MODULES_USE_ELF_REL if MODULES
43 select MODULES_USE_ELF_RELA if MODULES && 64BIT 43 select MODULES_USE_ELF_RELA if MODULES && 64BIT
44 select CLONE_BACKWARDS 44 select CLONE_BACKWARDS
diff --git a/arch/mn10300/Kconfig b/arch/mn10300/Kconfig
index b06c7360b1c6..428da175d073 100644
--- a/arch/mn10300/Kconfig
+++ b/arch/mn10300/Kconfig
@@ -8,7 +8,7 @@ config MN10300
8 select HAVE_ARCH_KGDB 8 select HAVE_ARCH_KGDB
9 select GENERIC_ATOMIC64 9 select GENERIC_ATOMIC64
10 select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER 10 select HAVE_NMI_WATCHDOG if MN10300_WD_TIMER
11 select HAVE_VIRT_TO_BUS 11 select VIRT_TO_BUS
12 select GENERIC_CLOCKEVENTS 12 select GENERIC_CLOCKEVENTS
13 select MODULES_USE_ELF_RELA 13 select MODULES_USE_ELF_RELA
14 select OLD_SIGSUSPEND3 14 select OLD_SIGSUSPEND3
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 014a6482ed4c..9ab3bf2eca8d 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -9,10 +9,9 @@ config OPENRISC
9 select OF_EARLY_FLATTREE 9 select OF_EARLY_FLATTREE
10 select IRQ_DOMAIN 10 select IRQ_DOMAIN
11 select HAVE_MEMBLOCK 11 select HAVE_MEMBLOCK
12 select ARCH_WANT_OPTIONAL_GPIOLIB 12 select ARCH_REQUIRE_GPIOLIB
13 select HAVE_ARCH_TRACEHOOK 13 select HAVE_ARCH_TRACEHOOK
14 select HAVE_GENERIC_HARDIRQS 14 select HAVE_GENERIC_HARDIRQS
15 select HAVE_VIRT_TO_BUS
16 select GENERIC_IRQ_CHIP 15 select GENERIC_IRQ_CHIP
17 select GENERIC_IRQ_PROBE 16 select GENERIC_IRQ_PROBE
18 select GENERIC_IRQ_SHOW 17 select GENERIC_IRQ_SHOW
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index a9ff712a2864..0339181bf3ac 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -21,7 +21,7 @@ config PARISC
21 select GENERIC_STRNCPY_FROM_USER 21 select GENERIC_STRNCPY_FROM_USER
22 select SYSCTL_ARCH_UNALIGN_ALLOW 22 select SYSCTL_ARCH_UNALIGN_ALLOW
23 select HAVE_MOD_ARCH_SPECIFIC 23 select HAVE_MOD_ARCH_SPECIFIC
24 select HAVE_VIRT_TO_BUS 24 select VIRT_TO_BUS
25 select MODULES_USE_ELF_RELA 25 select MODULES_USE_ELF_RELA
26 select CLONE_BACKWARDS 26 select CLONE_BACKWARDS
27 select TTY # Needed for pdc_cons.c 27 select TTY # Needed for pdc_cons.c
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index b89d7eb730a2..ea5bb045983a 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -90,6 +90,7 @@ config GENERIC_GPIO
90config PPC 90config PPC
91 bool 91 bool
92 default y 92 default y
93 select BINFMT_ELF
93 select OF 94 select OF
94 select OF_EARLY_FLATTREE 95 select OF_EARLY_FLATTREE
95 select HAVE_FTRACE_MCOUNT_RECORD 96 select HAVE_FTRACE_MCOUNT_RECORD
@@ -98,7 +99,7 @@ config PPC
98 select HAVE_FUNCTION_GRAPH_TRACER 99 select HAVE_FUNCTION_GRAPH_TRACER
99 select SYSCTL_EXCEPTION_TRACE 100 select SYSCTL_EXCEPTION_TRACE
100 select ARCH_WANT_OPTIONAL_GPIOLIB 101 select ARCH_WANT_OPTIONAL_GPIOLIB
101 select HAVE_VIRT_TO_BUS if !PPC64 102 select VIRT_TO_BUS if !PPC64
102 select HAVE_IDE 103 select HAVE_IDE
103 select HAVE_IOREMAP_PROT 104 select HAVE_IOREMAP_PROT
104 select HAVE_EFFICIENT_UNALIGNED_ACCESS 105 select HAVE_EFFICIENT_UNALIGNED_ACCESS
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index 2fdb47a19efd..b59e06f507ea 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -343,17 +343,16 @@ extern void slb_set_size(u16 size);
343/* 343/*
344 * VSID allocation (256MB segment) 344 * VSID allocation (256MB segment)
345 * 345 *
346 * We first generate a 38-bit "proto-VSID". For kernel addresses this 346 * We first generate a 37-bit "proto-VSID". Proto-VSIDs are generated
347 * is equal to the ESID | 1 << 37, for user addresses it is: 347 * from mmu context id and effective segment id of the address.
348 * (context << USER_ESID_BITS) | (esid & ((1U << USER_ESID_BITS) - 1)
349 * 348 *
350 * This splits the proto-VSID into the below range 349 * For user processes max context id is limited to ((1ul << 19) - 5)
351 * 0 - (2^(CONTEXT_BITS + USER_ESID_BITS) - 1) : User proto-VSID range 350 * for kernel space, we use the top 4 context ids to map address as below
352 * 2^(CONTEXT_BITS + USER_ESID_BITS) - 2^(VSID_BITS) : Kernel proto-VSID range 351 * NOTE: each context only support 64TB now.
353 * 352 * 0x7fffc - [ 0xc000000000000000 - 0xc0003fffffffffff ]
354 * We also have CONTEXT_BITS + USER_ESID_BITS = VSID_BITS - 1 353 * 0x7fffd - [ 0xd000000000000000 - 0xd0003fffffffffff ]
355 * That is, we assign half of the space to user processes and half 354 * 0x7fffe - [ 0xe000000000000000 - 0xe0003fffffffffff ]
356 * to the kernel. 355 * 0x7ffff - [ 0xf000000000000000 - 0xf0003fffffffffff ]
357 * 356 *
358 * The proto-VSIDs are then scrambled into real VSIDs with the 357 * The proto-VSIDs are then scrambled into real VSIDs with the
359 * multiplicative hash: 358 * multiplicative hash:
@@ -363,41 +362,49 @@ extern void slb_set_size(u16 size);
363 * VSID_MULTIPLIER is prime, so in particular it is 362 * VSID_MULTIPLIER is prime, so in particular it is
364 * co-prime to VSID_MODULUS, making this a 1:1 scrambling function. 363 * co-prime to VSID_MODULUS, making this a 1:1 scrambling function.
365 * Because the modulus is 2^n-1 we can compute it efficiently without 364 * Because the modulus is 2^n-1 we can compute it efficiently without
366 * a divide or extra multiply (see below). 365 * a divide or extra multiply (see below). The scramble function gives
367 * 366 * robust scattering in the hash table (at least based on some initial
368 * This scheme has several advantages over older methods: 367 * results).
369 *
370 * - We have VSIDs allocated for every kernel address
371 * (i.e. everything above 0xC000000000000000), except the very top
372 * segment, which simplifies several things.
373 * 368 *
374 * - We allow for USER_ESID_BITS significant bits of ESID and 369 * We also consider VSID 0 special. We use VSID 0 for slb entries mapping
375 * CONTEXT_BITS bits of context for user addresses. 370 * bad address. This enables us to consolidate bad address handling in
376 * i.e. 64T (46 bits) of address space for up to half a million contexts. 371 * hash_page.
377 * 372 *
378 * - The scramble function gives robust scattering in the hash 373 * We also need to avoid the last segment of the last context, because that
379 * table (at least based on some initial results). The previous 374 * would give a protovsid of 0x1fffffffff. That will result in a VSID 0
380 * method was more susceptible to pathological cases giving excessive 375 * because of the modulo operation in vsid scramble. But the vmemmap
381 * hash collisions. 376 * (which is what uses region 0xf) will never be close to 64TB in size
377 * (it's 56 bytes per page of system memory).
382 */ 378 */
383 379
380#define CONTEXT_BITS 19
381#define ESID_BITS 18
382#define ESID_BITS_1T 6
383
384/*
385 * 256MB segment
386 * The proto-VSID space has 2^(CONTEX_BITS + ESID_BITS) - 1 segments
387 * available for user + kernel mapping. The top 4 contexts are used for
388 * kernel mapping. Each segment contains 2^28 bytes. Each
389 * context maps 2^46 bytes (64TB) so we can support 2^19-1 contexts
390 * (19 == 37 + 28 - 46).
391 */
392#define MAX_USER_CONTEXT ((ASM_CONST(1) << CONTEXT_BITS) - 5)
393
384/* 394/*
385 * This should be computed such that protovosid * vsid_mulitplier 395 * This should be computed such that protovosid * vsid_mulitplier
386 * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus 396 * doesn't overflow 64 bits. It should also be co-prime to vsid_modulus
387 */ 397 */
388#define VSID_MULTIPLIER_256M ASM_CONST(12538073) /* 24-bit prime */ 398#define VSID_MULTIPLIER_256M ASM_CONST(12538073) /* 24-bit prime */
389#define VSID_BITS_256M 38 399#define VSID_BITS_256M (CONTEXT_BITS + ESID_BITS)
390#define VSID_MODULUS_256M ((1UL<<VSID_BITS_256M)-1) 400#define VSID_MODULUS_256M ((1UL<<VSID_BITS_256M)-1)
391 401
392#define VSID_MULTIPLIER_1T ASM_CONST(12538073) /* 24-bit prime */ 402#define VSID_MULTIPLIER_1T ASM_CONST(12538073) /* 24-bit prime */
393#define VSID_BITS_1T 26 403#define VSID_BITS_1T (CONTEXT_BITS + ESID_BITS_1T)
394#define VSID_MODULUS_1T ((1UL<<VSID_BITS_1T)-1) 404#define VSID_MODULUS_1T ((1UL<<VSID_BITS_1T)-1)
395 405
396#define CONTEXT_BITS 19
397#define USER_ESID_BITS 18
398#define USER_ESID_BITS_1T 6
399 406
400#define USER_VSID_RANGE (1UL << (USER_ESID_BITS + SID_SHIFT)) 407#define USER_VSID_RANGE (1UL << (ESID_BITS + SID_SHIFT))
401 408
402/* 409/*
403 * This macro generates asm code to compute the VSID scramble 410 * This macro generates asm code to compute the VSID scramble
@@ -421,7 +428,8 @@ extern void slb_set_size(u16 size);
421 srdi rx,rt,VSID_BITS_##size; \ 428 srdi rx,rt,VSID_BITS_##size; \
422 clrldi rt,rt,(64-VSID_BITS_##size); \ 429 clrldi rt,rt,(64-VSID_BITS_##size); \
423 add rt,rt,rx; /* add high and low bits */ \ 430 add rt,rt,rx; /* add high and low bits */ \
424 /* Now, r3 == VSID (mod 2^36-1), and lies between 0 and \ 431 /* NOTE: explanation based on VSID_BITS_##size = 36 \
432 * Now, r3 == VSID (mod 2^36-1), and lies between 0 and \
425 * 2^36-1+2^28-1. That in particular means that if r3 >= \ 433 * 2^36-1+2^28-1. That in particular means that if r3 >= \
426 * 2^36-1, then r3+1 has the 2^36 bit set. So, if r3+1 has \ 434 * 2^36-1, then r3+1 has the 2^36 bit set. So, if r3+1 has \
427 * the bit clear, r3 already has the answer we want, if it \ 435 * the bit clear, r3 already has the answer we want, if it \
@@ -513,34 +521,6 @@ typedef struct {
513 }) 521 })
514#endif /* 1 */ 522#endif /* 1 */
515 523
516/*
517 * This is only valid for addresses >= PAGE_OFFSET
518 * The proto-VSID space is divided into two class
519 * User: 0 to 2^(CONTEXT_BITS + USER_ESID_BITS) -1
520 * kernel: 2^(CONTEXT_BITS + USER_ESID_BITS) to 2^(VSID_BITS) - 1
521 *
522 * With KERNEL_START at 0xc000000000000000, the proto vsid for
523 * the kernel ends up with 0xc00000000 (36 bits). With 64TB
524 * support we need to have kernel proto-VSID in the
525 * [2^37 to 2^38 - 1] range due to the increased USER_ESID_BITS.
526 */
527static inline unsigned long get_kernel_vsid(unsigned long ea, int ssize)
528{
529 unsigned long proto_vsid;
530 /*
531 * We need to make sure proto_vsid for the kernel is
532 * >= 2^(CONTEXT_BITS + USER_ESID_BITS[_1T])
533 */
534 if (ssize == MMU_SEGSIZE_256M) {
535 proto_vsid = ea >> SID_SHIFT;
536 proto_vsid |= (1UL << (CONTEXT_BITS + USER_ESID_BITS));
537 return vsid_scramble(proto_vsid, 256M);
538 }
539 proto_vsid = ea >> SID_SHIFT_1T;
540 proto_vsid |= (1UL << (CONTEXT_BITS + USER_ESID_BITS_1T));
541 return vsid_scramble(proto_vsid, 1T);
542}
543
544/* Returns the segment size indicator for a user address */ 524/* Returns the segment size indicator for a user address */
545static inline int user_segment_size(unsigned long addr) 525static inline int user_segment_size(unsigned long addr)
546{ 526{
@@ -550,17 +530,41 @@ static inline int user_segment_size(unsigned long addr)
550 return MMU_SEGSIZE_256M; 530 return MMU_SEGSIZE_256M;
551} 531}
552 532
553/* This is only valid for user addresses (which are below 2^44) */
554static inline unsigned long get_vsid(unsigned long context, unsigned long ea, 533static inline unsigned long get_vsid(unsigned long context, unsigned long ea,
555 int ssize) 534 int ssize)
556{ 535{
536 /*
537 * Bad address. We return VSID 0 for that
538 */
539 if ((ea & ~REGION_MASK) >= PGTABLE_RANGE)
540 return 0;
541
557 if (ssize == MMU_SEGSIZE_256M) 542 if (ssize == MMU_SEGSIZE_256M)
558 return vsid_scramble((context << USER_ESID_BITS) 543 return vsid_scramble((context << ESID_BITS)
559 | (ea >> SID_SHIFT), 256M); 544 | (ea >> SID_SHIFT), 256M);
560 return vsid_scramble((context << USER_ESID_BITS_1T) 545 return vsid_scramble((context << ESID_BITS_1T)
561 | (ea >> SID_SHIFT_1T), 1T); 546 | (ea >> SID_SHIFT_1T), 1T);
562} 547}
563 548
549/*
550 * This is only valid for addresses >= PAGE_OFFSET
551 *
552 * For kernel space, we use the top 4 context ids to map address as below
553 * 0x7fffc - [ 0xc000000000000000 - 0xc0003fffffffffff ]
554 * 0x7fffd - [ 0xd000000000000000 - 0xd0003fffffffffff ]
555 * 0x7fffe - [ 0xe000000000000000 - 0xe0003fffffffffff ]
556 * 0x7ffff - [ 0xf000000000000000 - 0xf0003fffffffffff ]
557 */
558static inline unsigned long get_kernel_vsid(unsigned long ea, int ssize)
559{
560 unsigned long context;
561
562 /*
563 * kernel take the top 4 context from the available range
564 */
565 context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 1;
566 return get_vsid(context, ea, ssize);
567}
564#endif /* __ASSEMBLY__ */ 568#endif /* __ASSEMBLY__ */
565 569
566#endif /* _ASM_POWERPC_MMU_HASH64_H_ */ 570#endif /* _ASM_POWERPC_MMU_HASH64_H_ */
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 75a3d71b895d..19599ef352bc 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -275,7 +275,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
275 .cpu_features = CPU_FTRS_PPC970, 275 .cpu_features = CPU_FTRS_PPC970,
276 .cpu_user_features = COMMON_USER_POWER4 | 276 .cpu_user_features = COMMON_USER_POWER4 |
277 PPC_FEATURE_HAS_ALTIVEC_COMP, 277 PPC_FEATURE_HAS_ALTIVEC_COMP,
278 .mmu_features = MMU_FTR_HPTE_TABLE, 278 .mmu_features = MMU_FTRS_PPC970,
279 .icache_bsize = 128, 279 .icache_bsize = 128,
280 .dcache_bsize = 128, 280 .dcache_bsize = 128,
281 .num_pmcs = 8, 281 .num_pmcs = 8,
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 87ef8f5ee5bc..200afa5bcfb7 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1452,20 +1452,36 @@ do_ste_alloc:
1452_GLOBAL(do_stab_bolted) 1452_GLOBAL(do_stab_bolted)
1453 stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */ 1453 stw r9,PACA_EXSLB+EX_CCR(r13) /* save CR in exc. frame */
1454 std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */ 1454 std r11,PACA_EXSLB+EX_SRR0(r13) /* save SRR0 in exc. frame */
1455 mfspr r11,SPRN_DAR /* ea */
1455 1456
1457 /*
1458 * check for bad kernel/user address
1459 * (ea & ~REGION_MASK) >= PGTABLE_RANGE
1460 */
1461 rldicr. r9,r11,4,(63 - 46 - 4)
1462 li r9,0 /* VSID = 0 for bad address */
1463 bne- 0f
1464
1465 /*
1466 * Calculate VSID:
1467 * This is the kernel vsid, we take the top for context from
1468 * the range. context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 1
1469 * Here we know that (ea >> 60) == 0xc
1470 */
1471 lis r9,(MAX_USER_CONTEXT + 1)@ha
1472 addi r9,r9,(MAX_USER_CONTEXT + 1)@l
1473
1474 srdi r10,r11,SID_SHIFT
1475 rldimi r10,r9,ESID_BITS,0 /* proto vsid */
1476 ASM_VSID_SCRAMBLE(r10, r9, 256M)
1477 rldic r9,r10,12,16 /* r9 = vsid << 12 */
1478
14790:
1456 /* Hash to the primary group */ 1480 /* Hash to the primary group */
1457 ld r10,PACASTABVIRT(r13) 1481 ld r10,PACASTABVIRT(r13)
1458 mfspr r11,SPRN_DAR 1482 srdi r11,r11,SID_SHIFT
1459 srdi r11,r11,28
1460 rldimi r10,r11,7,52 /* r10 = first ste of the group */ 1483 rldimi r10,r11,7,52 /* r10 = first ste of the group */
1461 1484
1462 /* Calculate VSID */
1463 /* This is a kernel address, so protovsid = ESID | 1 << 37 */
1464 li r9,0x1
1465 rldimi r11,r9,(CONTEXT_BITS + USER_ESID_BITS),0
1466 ASM_VSID_SCRAMBLE(r11, r9, 256M)
1467 rldic r9,r11,12,16 /* r9 = vsid << 12 */
1468
1469 /* Search the primary group for a free entry */ 1485 /* Search the primary group for a free entry */
14701: ld r11,0(r10) /* Test valid bit of the current ste */ 14861: ld r11,0(r10) /* Test valid bit of the current ste */
1471 andi. r11,r11,0x80 1487 andi. r11,r11,0x80
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 7f7fb7fd991b..13f8d168b3f1 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2832,11 +2832,13 @@ static void unreloc_toc(void)
2832{ 2832{
2833} 2833}
2834#else 2834#else
2835static void __reloc_toc(void *tocstart, unsigned long offset, 2835static void __reloc_toc(unsigned long offset, unsigned long nr_entries)
2836 unsigned long nr_entries)
2837{ 2836{
2838 unsigned long i; 2837 unsigned long i;
2839 unsigned long *toc_entry = (unsigned long *)tocstart; 2838 unsigned long *toc_entry;
2839
2840 /* Get the start of the TOC by using r2 directly. */
2841 asm volatile("addi %0,2,-0x8000" : "=b" (toc_entry));
2840 2842
2841 for (i = 0; i < nr_entries; i++) { 2843 for (i = 0; i < nr_entries; i++) {
2842 *toc_entry = *toc_entry + offset; 2844 *toc_entry = *toc_entry + offset;
@@ -2850,8 +2852,7 @@ static void reloc_toc(void)
2850 unsigned long nr_entries = 2852 unsigned long nr_entries =
2851 (__prom_init_toc_end - __prom_init_toc_start) / sizeof(long); 2853 (__prom_init_toc_end - __prom_init_toc_start) / sizeof(long);
2852 2854
2853 /* Need to add offset to get at __prom_init_toc_start */ 2855 __reloc_toc(offset, nr_entries);
2854 __reloc_toc(__prom_init_toc_start + offset, offset, nr_entries);
2855 2856
2856 mb(); 2857 mb();
2857} 2858}
@@ -2864,8 +2865,7 @@ static void unreloc_toc(void)
2864 2865
2865 mb(); 2866 mb();
2866 2867
2867 /* __prom_init_toc_start has been relocated, no need to add offset */ 2868 __reloc_toc(-offset, nr_entries);
2868 __reloc_toc(__prom_init_toc_start, -offset, nr_entries);
2869} 2869}
2870#endif 2870#endif
2871#endif 2871#endif
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 245c1b6a0858..f9b30c68ba47 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -1428,6 +1428,7 @@ static long ppc_set_hwdebug(struct task_struct *child,
1428 1428
1429 brk.address = bp_info->addr & ~7UL; 1429 brk.address = bp_info->addr & ~7UL;
1430 brk.type = HW_BRK_TYPE_TRANSLATE; 1430 brk.type = HW_BRK_TYPE_TRANSLATE;
1431 brk.len = 8;
1431 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ) 1432 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_READ)
1432 brk.type |= HW_BRK_TYPE_READ; 1433 brk.type |= HW_BRK_TYPE_READ;
1433 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE) 1434 if (bp_info->trigger_type & PPC_BREAKPOINT_TRIGGER_WRITE)
diff --git a/arch/powerpc/kvm/book3s_64_mmu_host.c b/arch/powerpc/kvm/book3s_64_mmu_host.c
index ead58e317294..5d7d29a313eb 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_host.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_host.c
@@ -326,8 +326,8 @@ int kvmppc_mmu_init(struct kvm_vcpu *vcpu)
326 vcpu3s->context_id[0] = err; 326 vcpu3s->context_id[0] = err;
327 327
328 vcpu3s->proto_vsid_max = ((vcpu3s->context_id[0] + 1) 328 vcpu3s->proto_vsid_max = ((vcpu3s->context_id[0] + 1)
329 << USER_ESID_BITS) - 1; 329 << ESID_BITS) - 1;
330 vcpu3s->proto_vsid_first = vcpu3s->context_id[0] << USER_ESID_BITS; 330 vcpu3s->proto_vsid_first = vcpu3s->context_id[0] << ESID_BITS;
331 vcpu3s->proto_vsid_next = vcpu3s->proto_vsid_first; 331 vcpu3s->proto_vsid_next = vcpu3s->proto_vsid_first;
332 332
333 kvmppc_mmu_hpte_init(vcpu); 333 kvmppc_mmu_hpte_init(vcpu);
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index 1b6e1271719f..f410c3e12c1e 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -195,6 +195,11 @@ int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
195 unsigned long vpn = hpt_vpn(vaddr, vsid, ssize); 195 unsigned long vpn = hpt_vpn(vaddr, vsid, ssize);
196 unsigned long tprot = prot; 196 unsigned long tprot = prot;
197 197
198 /*
199 * If we hit a bad address return error.
200 */
201 if (!vsid)
202 return -1;
198 /* Make kernel text executable */ 203 /* Make kernel text executable */
199 if (overlaps_kernel_text(vaddr, vaddr + step)) 204 if (overlaps_kernel_text(vaddr, vaddr + step))
200 tprot &= ~HPTE_R_N; 205 tprot &= ~HPTE_R_N;
@@ -759,6 +764,8 @@ void __init early_init_mmu(void)
759 /* Initialize stab / SLB management */ 764 /* Initialize stab / SLB management */
760 if (mmu_has_feature(MMU_FTR_SLB)) 765 if (mmu_has_feature(MMU_FTR_SLB))
761 slb_initialize(); 766 slb_initialize();
767 else
768 stab_initialize(get_paca()->stab_real);
762} 769}
763 770
764#ifdef CONFIG_SMP 771#ifdef CONFIG_SMP
@@ -922,11 +929,6 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
922 DBG_LOW("hash_page(ea=%016lx, access=%lx, trap=%lx\n", 929 DBG_LOW("hash_page(ea=%016lx, access=%lx, trap=%lx\n",
923 ea, access, trap); 930 ea, access, trap);
924 931
925 if ((ea & ~REGION_MASK) >= PGTABLE_RANGE) {
926 DBG_LOW(" out of pgtable range !\n");
927 return 1;
928 }
929
930 /* Get region & vsid */ 932 /* Get region & vsid */
931 switch (REGION_ID(ea)) { 933 switch (REGION_ID(ea)) {
932 case USER_REGION_ID: 934 case USER_REGION_ID:
@@ -957,6 +959,11 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
957 } 959 }
958 DBG_LOW(" mm=%p, mm->pgdir=%p, vsid=%016lx\n", mm, mm->pgd, vsid); 960 DBG_LOW(" mm=%p, mm->pgdir=%p, vsid=%016lx\n", mm, mm->pgd, vsid);
959 961
962 /* Bad address. */
963 if (!vsid) {
964 DBG_LOW("Bad address!\n");
965 return 1;
966 }
960 /* Get pgdir */ 967 /* Get pgdir */
961 pgdir = mm->pgd; 968 pgdir = mm->pgd;
962 if (pgdir == NULL) 969 if (pgdir == NULL)
@@ -1126,6 +1133,8 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
1126 /* Get VSID */ 1133 /* Get VSID */
1127 ssize = user_segment_size(ea); 1134 ssize = user_segment_size(ea);
1128 vsid = get_vsid(mm->context.id, ea, ssize); 1135 vsid = get_vsid(mm->context.id, ea, ssize);
1136 if (!vsid)
1137 return;
1129 1138
1130 /* Hash doesn't like irqs */ 1139 /* Hash doesn't like irqs */
1131 local_irq_save(flags); 1140 local_irq_save(flags);
@@ -1233,6 +1242,9 @@ static void kernel_map_linear_page(unsigned long vaddr, unsigned long lmi)
1233 hash = hpt_hash(vpn, PAGE_SHIFT, mmu_kernel_ssize); 1242 hash = hpt_hash(vpn, PAGE_SHIFT, mmu_kernel_ssize);
1234 hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP); 1243 hpteg = ((hash & htab_hash_mask) * HPTES_PER_GROUP);
1235 1244
1245 /* Don't create HPTE entries for bad address */
1246 if (!vsid)
1247 return;
1236 ret = ppc_md.hpte_insert(hpteg, vpn, __pa(vaddr), 1248 ret = ppc_md.hpte_insert(hpteg, vpn, __pa(vaddr),
1237 mode, HPTE_V_BOLTED, 1249 mode, HPTE_V_BOLTED,
1238 mmu_linear_psize, mmu_kernel_ssize); 1250 mmu_linear_psize, mmu_kernel_ssize);
diff --git a/arch/powerpc/mm/mmu_context_hash64.c b/arch/powerpc/mm/mmu_context_hash64.c
index 40bc5b0ace54..d1d1b92c5b99 100644
--- a/arch/powerpc/mm/mmu_context_hash64.c
+++ b/arch/powerpc/mm/mmu_context_hash64.c
@@ -29,15 +29,6 @@
29static DEFINE_SPINLOCK(mmu_context_lock); 29static DEFINE_SPINLOCK(mmu_context_lock);
30static DEFINE_IDA(mmu_context_ida); 30static DEFINE_IDA(mmu_context_ida);
31 31
32/*
33 * 256MB segment
34 * The proto-VSID space has 2^(CONTEX_BITS + USER_ESID_BITS) - 1 segments
35 * available for user mappings. Each segment contains 2^28 bytes. Each
36 * context maps 2^46 bytes (64TB) so we can support 2^19-1 contexts
37 * (19 == 37 + 28 - 46).
38 */
39#define MAX_CONTEXT ((1UL << CONTEXT_BITS) - 1)
40
41int __init_new_context(void) 32int __init_new_context(void)
42{ 33{
43 int index; 34 int index;
@@ -56,7 +47,7 @@ again:
56 else if (err) 47 else if (err)
57 return err; 48 return err;
58 49
59 if (index > MAX_CONTEXT) { 50 if (index > MAX_USER_CONTEXT) {
60 spin_lock(&mmu_context_lock); 51 spin_lock(&mmu_context_lock);
61 ida_remove(&mmu_context_ida, index); 52 ida_remove(&mmu_context_ida, index);
62 spin_unlock(&mmu_context_lock); 53 spin_unlock(&mmu_context_lock);
diff --git a/arch/powerpc/mm/pgtable_64.c b/arch/powerpc/mm/pgtable_64.c
index e212a271c7a4..654258f165ae 100644
--- a/arch/powerpc/mm/pgtable_64.c
+++ b/arch/powerpc/mm/pgtable_64.c
@@ -61,7 +61,7 @@
61#endif 61#endif
62 62
63#ifdef CONFIG_PPC_STD_MMU_64 63#ifdef CONFIG_PPC_STD_MMU_64
64#if TASK_SIZE_USER64 > (1UL << (USER_ESID_BITS + SID_SHIFT)) 64#if TASK_SIZE_USER64 > (1UL << (ESID_BITS + SID_SHIFT))
65#error TASK_SIZE_USER64 exceeds user VSID range 65#error TASK_SIZE_USER64 exceeds user VSID range
66#endif 66#endif
67#endif 67#endif
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S
index 1a16ca227757..17aa6dfceb34 100644
--- a/arch/powerpc/mm/slb_low.S
+++ b/arch/powerpc/mm/slb_low.S
@@ -31,10 +31,15 @@
31 * No other registers are examined or changed. 31 * No other registers are examined or changed.
32 */ 32 */
33_GLOBAL(slb_allocate_realmode) 33_GLOBAL(slb_allocate_realmode)
34 /* r3 = faulting address */ 34 /*
35 * check for bad kernel/user address
36 * (ea & ~REGION_MASK) >= PGTABLE_RANGE
37 */
38 rldicr. r9,r3,4,(63 - 46 - 4)
39 bne- 8f
35 40
36 srdi r9,r3,60 /* get region */ 41 srdi r9,r3,60 /* get region */
37 srdi r10,r3,28 /* get esid */ 42 srdi r10,r3,SID_SHIFT /* get esid */
38 cmpldi cr7,r9,0xc /* cmp PAGE_OFFSET for later use */ 43 cmpldi cr7,r9,0xc /* cmp PAGE_OFFSET for later use */
39 44
40 /* r3 = address, r10 = esid, cr7 = <> PAGE_OFFSET */ 45 /* r3 = address, r10 = esid, cr7 = <> PAGE_OFFSET */
@@ -56,12 +61,14 @@ _GLOBAL(slb_allocate_realmode)
56 */ 61 */
57_GLOBAL(slb_miss_kernel_load_linear) 62_GLOBAL(slb_miss_kernel_load_linear)
58 li r11,0 63 li r11,0
59 li r9,0x1
60 /* 64 /*
61 * for 1T we shift 12 bits more. slb_finish_load_1T will do 65 * context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 1
62 * the necessary adjustment 66 * r9 = region id.
63 */ 67 */
64 rldimi r10,r9,(CONTEXT_BITS + USER_ESID_BITS),0 68 addis r9,r9,(MAX_USER_CONTEXT - 0xc + 1)@ha
69 addi r9,r9,(MAX_USER_CONTEXT - 0xc + 1)@l
70
71
65BEGIN_FTR_SECTION 72BEGIN_FTR_SECTION
66 b slb_finish_load 73 b slb_finish_load
67END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT) 74END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
@@ -91,24 +98,19 @@ _GLOBAL(slb_miss_kernel_load_vmemmap)
91 _GLOBAL(slb_miss_kernel_load_io) 98 _GLOBAL(slb_miss_kernel_load_io)
92 li r11,0 99 li r11,0
936: 1006:
94 li r9,0x1
95 /* 101 /*
96 * for 1T we shift 12 bits more. slb_finish_load_1T will do 102 * context = (MAX_USER_CONTEXT) + ((ea >> 60) - 0xc) + 1
97 * the necessary adjustment 103 * r9 = region id.
98 */ 104 */
99 rldimi r10,r9,(CONTEXT_BITS + USER_ESID_BITS),0 105 addis r9,r9,(MAX_USER_CONTEXT - 0xc + 1)@ha
106 addi r9,r9,(MAX_USER_CONTEXT - 0xc + 1)@l
107
100BEGIN_FTR_SECTION 108BEGIN_FTR_SECTION
101 b slb_finish_load 109 b slb_finish_load
102END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT) 110END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
103 b slb_finish_load_1T 111 b slb_finish_load_1T
104 112
1050: /* user address: proto-VSID = context << 15 | ESID. First check 1130:
106 * if the address is within the boundaries of the user region
107 */
108 srdi. r9,r10,USER_ESID_BITS
109 bne- 8f /* invalid ea bits set */
110
111
112 /* when using slices, we extract the psize off the slice bitmaps 114 /* when using slices, we extract the psize off the slice bitmaps
113 * and then we need to get the sllp encoding off the mmu_psize_defs 115 * and then we need to get the sllp encoding off the mmu_psize_defs
114 * array. 116 * array.
@@ -164,15 +166,13 @@ END_MMU_FTR_SECTION_IFCLR(MMU_FTR_1T_SEGMENT)
164 ld r9,PACACONTEXTID(r13) 166 ld r9,PACACONTEXTID(r13)
165BEGIN_FTR_SECTION 167BEGIN_FTR_SECTION
166 cmpldi r10,0x1000 168 cmpldi r10,0x1000
167END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
168 rldimi r10,r9,USER_ESID_BITS,0
169BEGIN_FTR_SECTION
170 bge slb_finish_load_1T 169 bge slb_finish_load_1T
171END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT) 170END_MMU_FTR_SECTION_IFSET(MMU_FTR_1T_SEGMENT)
172 b slb_finish_load 171 b slb_finish_load
173 172
1748: /* invalid EA */ 1738: /* invalid EA */
175 li r10,0 /* BAD_VSID */ 174 li r10,0 /* BAD_VSID */
175 li r9,0 /* BAD_VSID */
176 li r11,SLB_VSID_USER /* flags don't much matter */ 176 li r11,SLB_VSID_USER /* flags don't much matter */
177 b slb_finish_load 177 b slb_finish_load
178 178
@@ -221,8 +221,6 @@ _GLOBAL(slb_allocate_user)
221 221
222 /* get context to calculate proto-VSID */ 222 /* get context to calculate proto-VSID */
223 ld r9,PACACONTEXTID(r13) 223 ld r9,PACACONTEXTID(r13)
224 rldimi r10,r9,USER_ESID_BITS,0
225
226 /* fall through slb_finish_load */ 224 /* fall through slb_finish_load */
227 225
228#endif /* __DISABLED__ */ 226#endif /* __DISABLED__ */
@@ -231,9 +229,10 @@ _GLOBAL(slb_allocate_user)
231/* 229/*
232 * Finish loading of an SLB entry and return 230 * Finish loading of an SLB entry and return
233 * 231 *
234 * r3 = EA, r10 = proto-VSID, r11 = flags, clobbers r9, cr7 = <> PAGE_OFFSET 232 * r3 = EA, r9 = context, r10 = ESID, r11 = flags, clobbers r9, cr7 = <> PAGE_OFFSET
235 */ 233 */
236slb_finish_load: 234slb_finish_load:
235 rldimi r10,r9,ESID_BITS,0
237 ASM_VSID_SCRAMBLE(r10,r9,256M) 236 ASM_VSID_SCRAMBLE(r10,r9,256M)
238 /* 237 /*
239 * bits above VSID_BITS_256M need to be ignored from r10 238 * bits above VSID_BITS_256M need to be ignored from r10
@@ -298,10 +297,11 @@ _GLOBAL(slb_compare_rr_to_size)
298/* 297/*
299 * Finish loading of a 1T SLB entry (for the kernel linear mapping) and return. 298 * Finish loading of a 1T SLB entry (for the kernel linear mapping) and return.
300 * 299 *
301 * r3 = EA, r10 = proto-VSID, r11 = flags, clobbers r9 300 * r3 = EA, r9 = context, r10 = ESID(256MB), r11 = flags, clobbers r9
302 */ 301 */
303slb_finish_load_1T: 302slb_finish_load_1T:
304 srdi r10,r10,40-28 /* get 1T ESID */ 303 srdi r10,r10,(SID_SHIFT_1T - SID_SHIFT) /* get 1T ESID */
304 rldimi r10,r9,ESID_BITS_1T,0
305 ASM_VSID_SCRAMBLE(r10,r9,1T) 305 ASM_VSID_SCRAMBLE(r10,r9,1T)
306 /* 306 /*
307 * bits above VSID_BITS_1T need to be ignored from r10 307 * bits above VSID_BITS_1T need to be ignored from r10
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c
index 0d82ef50dc3f..023ec8a13f38 100644
--- a/arch/powerpc/mm/tlb_hash64.c
+++ b/arch/powerpc/mm/tlb_hash64.c
@@ -82,11 +82,11 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr,
82 if (!is_kernel_addr(addr)) { 82 if (!is_kernel_addr(addr)) {
83 ssize = user_segment_size(addr); 83 ssize = user_segment_size(addr);
84 vsid = get_vsid(mm->context.id, addr, ssize); 84 vsid = get_vsid(mm->context.id, addr, ssize);
85 WARN_ON(vsid == 0);
86 } else { 85 } else {
87 vsid = get_kernel_vsid(addr, mmu_kernel_ssize); 86 vsid = get_kernel_vsid(addr, mmu_kernel_ssize);
88 ssize = mmu_kernel_ssize; 87 ssize = mmu_kernel_ssize;
89 } 88 }
89 WARN_ON(vsid == 0);
90 vpn = hpt_vpn(addr, vsid, ssize); 90 vpn = hpt_vpn(addr, vsid, ssize);
91 rpte = __real_pte(__pte(pte), ptep); 91 rpte = __real_pte(__pte(pte), ptep);
92 92
diff --git a/arch/powerpc/perf/power7-pmu.c b/arch/powerpc/perf/power7-pmu.c
index b554879bd31e..3c475d6267c7 100644
--- a/arch/powerpc/perf/power7-pmu.c
+++ b/arch/powerpc/perf/power7-pmu.c
@@ -420,7 +420,20 @@ static struct attribute_group power7_pmu_events_group = {
420 .attrs = power7_events_attr, 420 .attrs = power7_events_attr,
421}; 421};
422 422
423PMU_FORMAT_ATTR(event, "config:0-19");
424
425static struct attribute *power7_pmu_format_attr[] = {
426 &format_attr_event.attr,
427 NULL,
428};
429
430struct attribute_group power7_pmu_format_group = {
431 .name = "format",
432 .attrs = power7_pmu_format_attr,
433};
434
423static const struct attribute_group *power7_pmu_attr_groups[] = { 435static const struct attribute_group *power7_pmu_attr_groups[] = {
436 &power7_pmu_format_group,
424 &power7_pmu_events_group, 437 &power7_pmu_events_group,
425 NULL, 438 NULL,
426}; 439};
diff --git a/arch/powerpc/platforms/85xx/sgy_cts1000.c b/arch/powerpc/platforms/85xx/sgy_cts1000.c
index 611e92f291c4..7179726ba5c5 100644
--- a/arch/powerpc/platforms/85xx/sgy_cts1000.c
+++ b/arch/powerpc/platforms/85xx/sgy_cts1000.c
@@ -69,7 +69,7 @@ static irqreturn_t gpio_halt_irq(int irq, void *__data)
69 return IRQ_HANDLED; 69 return IRQ_HANDLED;
70}; 70};
71 71
72static int __devinit gpio_halt_probe(struct platform_device *pdev) 72static int gpio_halt_probe(struct platform_device *pdev)
73{ 73{
74 enum of_gpio_flags flags; 74 enum of_gpio_flags flags;
75 struct device_node *node = pdev->dev.of_node; 75 struct device_node *node = pdev->dev.of_node;
@@ -128,7 +128,7 @@ static int __devinit gpio_halt_probe(struct platform_device *pdev)
128 return 0; 128 return 0;
129} 129}
130 130
131static int __devexit gpio_halt_remove(struct platform_device *pdev) 131static int gpio_halt_remove(struct platform_device *pdev)
132{ 132{
133 if (halt_node) { 133 if (halt_node) {
134 int gpio = of_get_gpio(halt_node, 0); 134 int gpio = of_get_gpio(halt_node, 0);
@@ -165,7 +165,7 @@ static struct platform_driver gpio_halt_driver = {
165 .of_match_table = gpio_halt_match, 165 .of_match_table = gpio_halt_match,
166 }, 166 },
167 .probe = gpio_halt_probe, 167 .probe = gpio_halt_probe,
168 .remove = __devexit_p(gpio_halt_remove), 168 .remove = gpio_halt_remove,
169}; 169};
170 170
171module_platform_driver(gpio_halt_driver); 171module_platform_driver(gpio_halt_driver);
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index cea2f09c4241..18e3b76c78d7 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -124,9 +124,8 @@ config 6xx
124 select PPC_HAVE_PMU_SUPPORT 124 select PPC_HAVE_PMU_SUPPORT
125 125
126config POWER3 126config POWER3
127 bool
128 depends on PPC64 && PPC_BOOK3S 127 depends on PPC64 && PPC_BOOK3S
129 default y if !POWER4_ONLY 128 def_bool y
130 129
131config POWER4 130config POWER4
132 depends on PPC64 && PPC_BOOK3S 131 depends on PPC64 && PPC_BOOK3S
@@ -145,8 +144,7 @@ config TUNE_CELL
145 but somewhat slower on other machines. This option only changes 144 but somewhat slower on other machines. This option only changes
146 the scheduling of instructions, not the selection of instructions 145 the scheduling of instructions, not the selection of instructions
147 itself, so the resulting kernel will keep running on all other 146 itself, so the resulting kernel will keep running on all other
148 machines. When building a kernel that is supposed to run only 147 machines.
149 on Cell, you should also select the POWER4_ONLY option.
150 148
151# this is temp to handle compat with arch=ppc 149# this is temp to handle compat with arch=ppc
152config 8xx 150config 8xx
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
index 4b505370a1d5..eb8fb629f00b 100644
--- a/arch/s390/Kconfig
+++ b/arch/s390/Kconfig
@@ -134,7 +134,7 @@ config S390
134 select HAVE_SYSCALL_WRAPPERS 134 select HAVE_SYSCALL_WRAPPERS
135 select HAVE_UID16 if 32BIT 135 select HAVE_UID16 if 32BIT
136 select HAVE_VIRT_CPU_ACCOUNTING 136 select HAVE_VIRT_CPU_ACCOUNTING
137 select HAVE_VIRT_TO_BUS 137 select VIRT_TO_BUS
138 select INIT_ALL_POSSIBLE 138 select INIT_ALL_POSSIBLE
139 select KTIME_SCALAR if 32BIT 139 select KTIME_SCALAR if 32BIT
140 select MODULES_USE_ELF_RELA 140 select MODULES_USE_ELF_RELA
diff --git a/arch/s390/include/asm/cpu_mf.h b/arch/s390/include/asm/cpu_mf.h
index f1eddd150dd7..c879fad404c8 100644
--- a/arch/s390/include/asm/cpu_mf.h
+++ b/arch/s390/include/asm/cpu_mf.h
@@ -12,6 +12,7 @@
12#ifndef _ASM_S390_CPU_MF_H 12#ifndef _ASM_S390_CPU_MF_H
13#define _ASM_S390_CPU_MF_H 13#define _ASM_S390_CPU_MF_H
14 14
15#include <linux/errno.h>
15#include <asm/facility.h> 16#include <asm/facility.h>
16 17
17#define CPU_MF_INT_SF_IAE (1 << 31) /* invalid entry address */ 18#define CPU_MF_INT_SF_IAE (1 << 31) /* invalid entry address */
diff --git a/arch/s390/include/asm/eadm.h b/arch/s390/include/asm/eadm.h
index 8d4847191ecc..dc9200ca32ed 100644
--- a/arch/s390/include/asm/eadm.h
+++ b/arch/s390/include/asm/eadm.h
@@ -34,6 +34,8 @@ struct arsb {
34 u32 reserved[4]; 34 u32 reserved[4];
35} __packed; 35} __packed;
36 36
37#define EQC_WR_PROHIBIT 22
38
37struct msb { 39struct msb {
38 u8 fmt:4; 40 u8 fmt:4;
39 u8 oc:4; 41 u8 oc:4;
@@ -96,11 +98,13 @@ struct scm_device {
96#define OP_STATE_TEMP_ERR 2 98#define OP_STATE_TEMP_ERR 2
97#define OP_STATE_PERM_ERR 3 99#define OP_STATE_PERM_ERR 3
98 100
101enum scm_event {SCM_CHANGE, SCM_AVAIL};
102
99struct scm_driver { 103struct scm_driver {
100 struct device_driver drv; 104 struct device_driver drv;
101 int (*probe) (struct scm_device *scmdev); 105 int (*probe) (struct scm_device *scmdev);
102 int (*remove) (struct scm_device *scmdev); 106 int (*remove) (struct scm_device *scmdev);
103 void (*notify) (struct scm_device *scmdev); 107 void (*notify) (struct scm_device *scmdev, enum scm_event event);
104 void (*handler) (struct scm_device *scmdev, void *data, int error); 108 void (*handler) (struct scm_device *scmdev, void *data, int error);
105}; 109};
106 110
diff --git a/arch/s390/include/asm/tlbflush.h b/arch/s390/include/asm/tlbflush.h
index 1d8fe2b17ef6..6b32af30878c 100644
--- a/arch/s390/include/asm/tlbflush.h
+++ b/arch/s390/include/asm/tlbflush.h
@@ -74,8 +74,6 @@ static inline void __tlb_flush_idte(unsigned long asce)
74 74
75static inline void __tlb_flush_mm(struct mm_struct * mm) 75static inline void __tlb_flush_mm(struct mm_struct * mm)
76{ 76{
77 if (unlikely(cpumask_empty(mm_cpumask(mm))))
78 return;
79 /* 77 /*
80 * If the machine has IDTE we prefer to do a per mm flush 78 * If the machine has IDTE we prefer to do a per mm flush
81 * on all cpus instead of doing a local flush if the mm 79 * on all cpus instead of doing a local flush if the mm
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 550228523267..94feff7d6132 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -636,7 +636,8 @@ ENTRY(mcck_int_handler)
636 UPDATE_VTIME %r14,%r15,__LC_MCCK_ENTER_TIMER 636 UPDATE_VTIME %r14,%r15,__LC_MCCK_ENTER_TIMER
637mcck_skip: 637mcck_skip:
638 SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+32,__LC_PANIC_STACK,PAGE_SHIFT 638 SWITCH_ASYNC __LC_GPREGS_SAVE_AREA+32,__LC_PANIC_STACK,PAGE_SHIFT
639 mvc __PT_R0(64,%r11),__LC_GPREGS_SAVE_AREA 639 stm %r0,%r7,__PT_R0(%r11)
640 mvc __PT_R8(32,%r11),__LC_GPREGS_SAVE_AREA+32
640 stm %r8,%r9,__PT_PSW(%r11) 641 stm %r8,%r9,__PT_PSW(%r11)
641 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) 642 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15)
642 l %r1,BASED(.Ldo_machine_check) 643 l %r1,BASED(.Ldo_machine_check)
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index 9c837c101297..2e6d60c55f90 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -678,8 +678,9 @@ ENTRY(mcck_int_handler)
678 UPDATE_VTIME %r14,__LC_MCCK_ENTER_TIMER 678 UPDATE_VTIME %r14,__LC_MCCK_ENTER_TIMER
679 LAST_BREAK %r14 679 LAST_BREAK %r14
680mcck_skip: 680mcck_skip:
681 lghi %r14,__LC_GPREGS_SAVE_AREA 681 lghi %r14,__LC_GPREGS_SAVE_AREA+64
682 mvc __PT_R0(128,%r11),0(%r14) 682 stmg %r0,%r7,__PT_R0(%r11)
683 mvc __PT_R8(64,%r11),0(%r14)
683 stmg %r8,%r9,__PT_PSW(%r11) 684 stmg %r8,%r9,__PT_PSW(%r11)
684 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) 685 xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15)
685 lgr %r2,%r11 # pass pointer to pt_regs 686 lgr %r2,%r11 # pass pointer to pt_regs
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index a5360de85ec7..29268859d8ee 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -571,6 +571,8 @@ static void __init setup_memory_end(void)
571 571
572 /* Split remaining virtual space between 1:1 mapping & vmemmap array */ 572 /* Split remaining virtual space between 1:1 mapping & vmemmap array */
573 tmp = VMALLOC_START / (PAGE_SIZE + sizeof(struct page)); 573 tmp = VMALLOC_START / (PAGE_SIZE + sizeof(struct page));
574 /* vmemmap contains a multiple of PAGES_PER_SECTION struct pages */
575 tmp = SECTION_ALIGN_UP(tmp);
574 tmp = VMALLOC_START - tmp * sizeof(struct page); 576 tmp = VMALLOC_START - tmp * sizeof(struct page);
575 tmp &= ~((vmax >> 11) - 1); /* align to page table level */ 577 tmp &= ~((vmax >> 11) - 1); /* align to page table level */
576 tmp = min(tmp, 1UL << MAX_PHYSMEM_BITS); 578 tmp = min(tmp, 1UL << MAX_PHYSMEM_BITS);
diff --git a/arch/score/Kconfig b/arch/score/Kconfig
index e569aa1fd2ba..c8def8bc9020 100644
--- a/arch/score/Kconfig
+++ b/arch/score/Kconfig
@@ -12,7 +12,7 @@ config SCORE
12 select GENERIC_CPU_DEVICES 12 select GENERIC_CPU_DEVICES
13 select GENERIC_CLOCKEVENTS 13 select GENERIC_CLOCKEVENTS
14 select HAVE_MOD_ARCH_SPECIFIC 14 select HAVE_MOD_ARCH_SPECIFIC
15 select HAVE_VIRT_TO_BUS 15 select VIRT_TO_BUS
16 select MODULES_USE_ELF_REL 16 select MODULES_USE_ELF_REL
17 select CLONE_BACKWARDS 17 select CLONE_BACKWARDS
18 18
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index 289127d5241c..3d361f236308 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -84,12 +84,6 @@ config ARCH_DEFCONFIG
84 default "arch/sparc/configs/sparc32_defconfig" if SPARC32 84 default "arch/sparc/configs/sparc32_defconfig" if SPARC32
85 default "arch/sparc/configs/sparc64_defconfig" if SPARC64 85 default "arch/sparc/configs/sparc64_defconfig" if SPARC64
86 86
87# CONFIG_BITS can be used at source level to get 32/64 bits
88config BITS
89 int
90 default 32 if SPARC32
91 default 64 if SPARC64
92
93config IOMMU_HELPER 87config IOMMU_HELPER
94 bool 88 bool
95 default y if SPARC64 89 default y if SPARC64
@@ -197,7 +191,7 @@ config RWSEM_XCHGADD_ALGORITHM
197 191
198config GENERIC_HWEIGHT 192config GENERIC_HWEIGHT
199 bool 193 bool
200 default y if !ULTRA_HAS_POPULATION_COUNT 194 default y
201 195
202config GENERIC_CALIBRATE_DELAY 196config GENERIC_CALIBRATE_DELAY
203 bool 197 bool
diff --git a/arch/sparc/include/asm/spitfire.h b/arch/sparc/include/asm/spitfire.h
index d06a26601753..6b67e50fb9b4 100644
--- a/arch/sparc/include/asm/spitfire.h
+++ b/arch/sparc/include/asm/spitfire.h
@@ -45,6 +45,7 @@
45#define SUN4V_CHIP_NIAGARA3 0x03 45#define SUN4V_CHIP_NIAGARA3 0x03
46#define SUN4V_CHIP_NIAGARA4 0x04 46#define SUN4V_CHIP_NIAGARA4 0x04
47#define SUN4V_CHIP_NIAGARA5 0x05 47#define SUN4V_CHIP_NIAGARA5 0x05
48#define SUN4V_CHIP_SPARC64X 0x8a
48#define SUN4V_CHIP_UNKNOWN 0xff 49#define SUN4V_CHIP_UNKNOWN 0xff
49 50
50#ifndef __ASSEMBLY__ 51#ifndef __ASSEMBLY__
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c
index a6c94a2bf9d4..5c5125895db8 100644
--- a/arch/sparc/kernel/cpu.c
+++ b/arch/sparc/kernel/cpu.c
@@ -493,6 +493,12 @@ static void __init sun4v_cpu_probe(void)
493 sparc_pmu_type = "niagara5"; 493 sparc_pmu_type = "niagara5";
494 break; 494 break;
495 495
496 case SUN4V_CHIP_SPARC64X:
497 sparc_cpu_type = "SPARC64-X";
498 sparc_fpu_type = "SPARC64-X integrated FPU";
499 sparc_pmu_type = "sparc64-x";
500 break;
501
496 default: 502 default:
497 printk(KERN_WARNING "CPU: Unknown sun4v cpu type [%s]\n", 503 printk(KERN_WARNING "CPU: Unknown sun4v cpu type [%s]\n",
498 prom_cpu_compatible); 504 prom_cpu_compatible);
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index 2feb15c35d9e..26b706a1867d 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -134,6 +134,8 @@ prom_niagara_prefix:
134 .asciz "SUNW,UltraSPARC-T" 134 .asciz "SUNW,UltraSPARC-T"
135prom_sparc_prefix: 135prom_sparc_prefix:
136 .asciz "SPARC-" 136 .asciz "SPARC-"
137prom_sparc64x_prefix:
138 .asciz "SPARC64-X"
137 .align 4 139 .align 4
138prom_root_compatible: 140prom_root_compatible:
139 .skip 64 141 .skip 64
@@ -412,7 +414,7 @@ sun4v_chip_type:
412 cmp %g2, 'T' 414 cmp %g2, 'T'
413 be,pt %xcc, 70f 415 be,pt %xcc, 70f
414 cmp %g2, 'M' 416 cmp %g2, 'M'
415 bne,pn %xcc, 4f 417 bne,pn %xcc, 49f
416 nop 418 nop
417 419
41870: ldub [%g1 + 7], %g2 42070: ldub [%g1 + 7], %g2
@@ -425,7 +427,7 @@ sun4v_chip_type:
425 cmp %g2, '5' 427 cmp %g2, '5'
426 be,pt %xcc, 5f 428 be,pt %xcc, 5f
427 mov SUN4V_CHIP_NIAGARA5, %g4 429 mov SUN4V_CHIP_NIAGARA5, %g4
428 ba,pt %xcc, 4f 430 ba,pt %xcc, 49f
429 nop 431 nop
430 432
43191: sethi %hi(prom_cpu_compatible), %g1 43391: sethi %hi(prom_cpu_compatible), %g1
@@ -439,6 +441,25 @@ sun4v_chip_type:
439 mov SUN4V_CHIP_NIAGARA2, %g4 441 mov SUN4V_CHIP_NIAGARA2, %g4
440 442
4414: 4434:
444 /* Athena */
445 sethi %hi(prom_cpu_compatible), %g1
446 or %g1, %lo(prom_cpu_compatible), %g1
447 sethi %hi(prom_sparc64x_prefix), %g7
448 or %g7, %lo(prom_sparc64x_prefix), %g7
449 mov 9, %g3
45041: ldub [%g7], %g2
451 ldub [%g1], %g4
452 cmp %g2, %g4
453 bne,pn %icc, 49f
454 add %g7, 1, %g7
455 subcc %g3, 1, %g3
456 bne,pt %xcc, 41b
457 add %g1, 1, %g1
458 mov SUN4V_CHIP_SPARC64X, %g4
459 ba,pt %xcc, 5f
460 nop
461
46249:
442 mov SUN4V_CHIP_UNKNOWN, %g4 463 mov SUN4V_CHIP_UNKNOWN, %g4
4435: sethi %hi(sun4v_chip_type), %g2 4645: sethi %hi(sun4v_chip_type), %g2
444 or %g2, %lo(sun4v_chip_type), %g2 465 or %g2, %lo(sun4v_chip_type), %g2
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c
index fc4320886a3a..4d1487138d26 100644
--- a/arch/sparc/kernel/leon_pci_grpci2.c
+++ b/arch/sparc/kernel/leon_pci_grpci2.c
@@ -186,6 +186,8 @@ struct grpci2_cap_first {
186#define CAP9_IOMAP_OFS 0x20 186#define CAP9_IOMAP_OFS 0x20
187#define CAP9_BARSIZE_OFS 0x24 187#define CAP9_BARSIZE_OFS 0x24
188 188
189#define TGT 256
190
189struct grpci2_priv { 191struct grpci2_priv {
190 struct leon_pci_info info; /* must be on top of this structure */ 192 struct leon_pci_info info; /* must be on top of this structure */
191 struct grpci2_regs *regs; 193 struct grpci2_regs *regs;
@@ -237,8 +239,12 @@ static int grpci2_cfg_r32(struct grpci2_priv *priv, unsigned int bus,
237 if (where & 0x3) 239 if (where & 0x3)
238 return -EINVAL; 240 return -EINVAL;
239 241
240 if (bus == 0 && PCI_SLOT(devfn) != 0) 242 if (bus == 0) {
241 devfn += (0x8 * 6); 243 devfn += (0x8 * 6); /* start at AD16=Device0 */
244 } else if (bus == TGT) {
245 bus = 0;
246 devfn = 0; /* special case: bridge controller itself */
247 }
242 248
243 /* Select bus */ 249 /* Select bus */
244 spin_lock_irqsave(&grpci2_dev_lock, flags); 250 spin_lock_irqsave(&grpci2_dev_lock, flags);
@@ -303,8 +309,12 @@ static int grpci2_cfg_w32(struct grpci2_priv *priv, unsigned int bus,
303 if (where & 0x3) 309 if (where & 0x3)
304 return -EINVAL; 310 return -EINVAL;
305 311
306 if (bus == 0 && PCI_SLOT(devfn) != 0) 312 if (bus == 0) {
307 devfn += (0x8 * 6); 313 devfn += (0x8 * 6); /* start at AD16=Device0 */
314 } else if (bus == TGT) {
315 bus = 0;
316 devfn = 0; /* special case: bridge controller itself */
317 }
308 318
309 /* Select bus */ 319 /* Select bus */
310 spin_lock_irqsave(&grpci2_dev_lock, flags); 320 spin_lock_irqsave(&grpci2_dev_lock, flags);
@@ -368,7 +378,7 @@ static int grpci2_read_config(struct pci_bus *bus, unsigned int devfn,
368 unsigned int busno = bus->number; 378 unsigned int busno = bus->number;
369 int ret; 379 int ret;
370 380
371 if (PCI_SLOT(devfn) > 15 || (PCI_SLOT(devfn) == 0 && busno == 0)) { 381 if (PCI_SLOT(devfn) > 15 || busno > 255) {
372 *val = ~0; 382 *val = ~0;
373 return 0; 383 return 0;
374 } 384 }
@@ -406,7 +416,7 @@ static int grpci2_write_config(struct pci_bus *bus, unsigned int devfn,
406 struct grpci2_priv *priv = grpci2priv; 416 struct grpci2_priv *priv = grpci2priv;
407 unsigned int busno = bus->number; 417 unsigned int busno = bus->number;
408 418
409 if (PCI_SLOT(devfn) > 15 || (PCI_SLOT(devfn) == 0 && busno == 0)) 419 if (PCI_SLOT(devfn) > 15 || busno > 255)
410 return 0; 420 return 0;
411 421
412#ifdef GRPCI2_DEBUG_CFGACCESS 422#ifdef GRPCI2_DEBUG_CFGACCESS
@@ -578,15 +588,15 @@ void grpci2_hw_init(struct grpci2_priv *priv)
578 REGSTORE(regs->ahbmst_map[i], priv->pci_area); 588 REGSTORE(regs->ahbmst_map[i], priv->pci_area);
579 589
580 /* Get the GRPCI2 Host PCI ID */ 590 /* Get the GRPCI2 Host PCI ID */
581 grpci2_cfg_r32(priv, 0, 0, PCI_VENDOR_ID, &priv->pciid); 591 grpci2_cfg_r32(priv, TGT, 0, PCI_VENDOR_ID, &priv->pciid);
582 592
583 /* Get address to first (always defined) capability structure */ 593 /* Get address to first (always defined) capability structure */
584 grpci2_cfg_r8(priv, 0, 0, PCI_CAPABILITY_LIST, &capptr); 594 grpci2_cfg_r8(priv, TGT, 0, PCI_CAPABILITY_LIST, &capptr);
585 595
586 /* Enable/Disable Byte twisting */ 596 /* Enable/Disable Byte twisting */
587 grpci2_cfg_r32(priv, 0, 0, capptr+CAP9_IOMAP_OFS, &io_map); 597 grpci2_cfg_r32(priv, TGT, 0, capptr+CAP9_IOMAP_OFS, &io_map);
588 io_map = (io_map & ~0x1) | (priv->bt_enabled ? 1 : 0); 598 io_map = (io_map & ~0x1) | (priv->bt_enabled ? 1 : 0);
589 grpci2_cfg_w32(priv, 0, 0, capptr+CAP9_IOMAP_OFS, io_map); 599 grpci2_cfg_w32(priv, TGT, 0, capptr+CAP9_IOMAP_OFS, io_map);
590 600
591 /* Setup the Host's PCI Target BARs for other peripherals to access, 601 /* Setup the Host's PCI Target BARs for other peripherals to access,
592 * and do DMA to the host's memory. The target BARs can be sized and 602 * and do DMA to the host's memory. The target BARs can be sized and
@@ -617,17 +627,18 @@ void grpci2_hw_init(struct grpci2_priv *priv)
617 pciadr = 0; 627 pciadr = 0;
618 } 628 }
619 } 629 }
620 grpci2_cfg_w32(priv, 0, 0, capptr+CAP9_BARSIZE_OFS+i*4, bar_sz); 630 grpci2_cfg_w32(priv, TGT, 0, capptr+CAP9_BARSIZE_OFS+i*4,
621 grpci2_cfg_w32(priv, 0, 0, PCI_BASE_ADDRESS_0+i*4, pciadr); 631 bar_sz);
622 grpci2_cfg_w32(priv, 0, 0, capptr+CAP9_BAR_OFS+i*4, ahbadr); 632 grpci2_cfg_w32(priv, TGT, 0, PCI_BASE_ADDRESS_0+i*4, pciadr);
633 grpci2_cfg_w32(priv, TGT, 0, capptr+CAP9_BAR_OFS+i*4, ahbadr);
623 printk(KERN_INFO " TGT BAR[%d]: 0x%08x (PCI)-> 0x%08x\n", 634 printk(KERN_INFO " TGT BAR[%d]: 0x%08x (PCI)-> 0x%08x\n",
624 i, pciadr, ahbadr); 635 i, pciadr, ahbadr);
625 } 636 }
626 637
627 /* set as bus master and enable pci memory responses */ 638 /* set as bus master and enable pci memory responses */
628 grpci2_cfg_r32(priv, 0, 0, PCI_COMMAND, &data); 639 grpci2_cfg_r32(priv, TGT, 0, PCI_COMMAND, &data);
629 data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER); 640 data |= (PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
630 grpci2_cfg_w32(priv, 0, 0, PCI_COMMAND, data); 641 grpci2_cfg_w32(priv, TGT, 0, PCI_COMMAND, data);
631 642
632 /* Enable Error respone (CPU-TRAP) on illegal memory access. */ 643 /* Enable Error respone (CPU-TRAP) on illegal memory access. */
633 REGSTORE(regs->ctrl, CTRL_ER | CTRL_PE); 644 REGSTORE(regs->ctrl, CTRL_ER | CTRL_PE);
diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
index ff496ab1e794..25877aebc685 100644
--- a/arch/tile/Kconfig
+++ b/arch/tile/Kconfig
@@ -17,7 +17,7 @@ config TILE
17 select GENERIC_IRQ_SHOW 17 select GENERIC_IRQ_SHOW
18 select HAVE_DEBUG_BUGVERBOSE 18 select HAVE_DEBUG_BUGVERBOSE
19 select HAVE_SYSCALL_WRAPPERS if TILEGX 19 select HAVE_SYSCALL_WRAPPERS if TILEGX
20 select HAVE_VIRT_TO_BUS 20 select VIRT_TO_BUS
21 select SYS_HYPERVISOR 21 select SYS_HYPERVISOR
22 select ARCH_HAVE_NMI_SAFE_CMPXCHG 22 select ARCH_HAVE_NMI_SAFE_CMPXCHG
23 select GENERIC_CLOCKEVENTS 23 select GENERIC_CLOCKEVENTS
diff --git a/arch/tile/configs/tilegx_defconfig b/arch/tile/configs/tilegx_defconfig
index 8c5eff6d6df5..47684815e5c8 100644
--- a/arch/tile/configs/tilegx_defconfig
+++ b/arch/tile/configs/tilegx_defconfig
@@ -330,7 +330,6 @@ CONFIG_MD_RAID0=m
330CONFIG_MD_RAID1=m 330CONFIG_MD_RAID1=m
331CONFIG_MD_RAID10=m 331CONFIG_MD_RAID10=m
332CONFIG_MD_RAID456=m 332CONFIG_MD_RAID456=m
333CONFIG_MULTICORE_RAID456=y
334CONFIG_MD_FAULTY=m 333CONFIG_MD_FAULTY=m
335CONFIG_BLK_DEV_DM=m 334CONFIG_BLK_DEV_DM=m
336CONFIG_DM_DEBUG=y 335CONFIG_DM_DEBUG=y
diff --git a/arch/tile/configs/tilepro_defconfig b/arch/tile/configs/tilepro_defconfig
index e7a3dfcbcda7..dd2b8f0c631f 100644
--- a/arch/tile/configs/tilepro_defconfig
+++ b/arch/tile/configs/tilepro_defconfig
@@ -324,7 +324,6 @@ CONFIG_MD_RAID0=m
324CONFIG_MD_RAID1=m 324CONFIG_MD_RAID1=m
325CONFIG_MD_RAID10=m 325CONFIG_MD_RAID10=m
326CONFIG_MD_RAID456=m 326CONFIG_MD_RAID456=m
327CONFIG_MULTICORE_RAID456=y
328CONFIG_MD_FAULTY=m 327CONFIG_MD_FAULTY=m
329CONFIG_BLK_DEV_DM=m 328CONFIG_BLK_DEV_DM=m
330CONFIG_DM_DEBUG=y 329CONFIG_DM_DEBUG=y
diff --git a/arch/um/drivers/chan.h b/arch/um/drivers/chan.h
index 78f1b8999964..c512b0306dd4 100644
--- a/arch/um/drivers/chan.h
+++ b/arch/um/drivers/chan.h
@@ -37,7 +37,7 @@ extern int console_write_chan(struct chan *chan, const char *buf,
37extern int console_open_chan(struct line *line, struct console *co); 37extern int console_open_chan(struct line *line, struct console *co);
38extern void deactivate_chan(struct chan *chan, int irq); 38extern void deactivate_chan(struct chan *chan, int irq);
39extern void reactivate_chan(struct chan *chan, int irq); 39extern void reactivate_chan(struct chan *chan, int irq);
40extern void chan_enable_winch(struct chan *chan, struct tty_struct *tty); 40extern void chan_enable_winch(struct chan *chan, struct tty_port *port);
41extern int enable_chan(struct line *line); 41extern int enable_chan(struct line *line);
42extern void close_chan(struct line *line); 42extern void close_chan(struct line *line);
43extern int chan_window_size(struct line *line, 43extern int chan_window_size(struct line *line,
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 15c553c239a1..80b47cb71e0a 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -122,10 +122,10 @@ static int open_chan(struct list_head *chans)
122 return err; 122 return err;
123} 123}
124 124
125void chan_enable_winch(struct chan *chan, struct tty_struct *tty) 125void chan_enable_winch(struct chan *chan, struct tty_port *port)
126{ 126{
127 if (chan && chan->primary && chan->ops->winch) 127 if (chan && chan->primary && chan->ops->winch)
128 register_winch(chan->fd, tty); 128 register_winch(chan->fd, port);
129} 129}
130 130
131static void line_timer_cb(struct work_struct *work) 131static void line_timer_cb(struct work_struct *work)
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index 9be670ad23b5..3fd7c3efdb18 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -216,7 +216,7 @@ static int winch_thread(void *arg)
216 } 216 }
217} 217}
218 218
219static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out, 219static int winch_tramp(int fd, struct tty_port *port, int *fd_out,
220 unsigned long *stack_out) 220 unsigned long *stack_out)
221{ 221{
222 struct winch_data data; 222 struct winch_data data;
@@ -271,7 +271,7 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out,
271 return err; 271 return err;
272} 272}
273 273
274void register_winch(int fd, struct tty_struct *tty) 274void register_winch(int fd, struct tty_port *port)
275{ 275{
276 unsigned long stack; 276 unsigned long stack;
277 int pid, thread, count, thread_fd = -1; 277 int pid, thread, count, thread_fd = -1;
@@ -281,17 +281,17 @@ void register_winch(int fd, struct tty_struct *tty)
281 return; 281 return;
282 282
283 pid = tcgetpgrp(fd); 283 pid = tcgetpgrp(fd);
284 if (is_skas_winch(pid, fd, tty)) { 284 if (is_skas_winch(pid, fd, port)) {
285 register_winch_irq(-1, fd, -1, tty, 0); 285 register_winch_irq(-1, fd, -1, port, 0);
286 return; 286 return;
287 } 287 }
288 288
289 if (pid == -1) { 289 if (pid == -1) {
290 thread = winch_tramp(fd, tty, &thread_fd, &stack); 290 thread = winch_tramp(fd, port, &thread_fd, &stack);
291 if (thread < 0) 291 if (thread < 0)
292 return; 292 return;
293 293
294 register_winch_irq(thread_fd, fd, thread, tty, stack); 294 register_winch_irq(thread_fd, fd, thread, port, stack);
295 295
296 count = write(thread_fd, &c, sizeof(c)); 296 count = write(thread_fd, &c, sizeof(c));
297 if (count != sizeof(c)) 297 if (count != sizeof(c))
diff --git a/arch/um/drivers/chan_user.h b/arch/um/drivers/chan_user.h
index dc693298eb8f..03f1b565c5f9 100644
--- a/arch/um/drivers/chan_user.h
+++ b/arch/um/drivers/chan_user.h
@@ -38,10 +38,10 @@ extern int generic_window_size(int fd, void *unused, unsigned short *rows_out,
38 unsigned short *cols_out); 38 unsigned short *cols_out);
39extern void generic_free(void *data); 39extern void generic_free(void *data);
40 40
41struct tty_struct; 41struct tty_port;
42extern void register_winch(int fd, struct tty_struct *tty); 42extern void register_winch(int fd, struct tty_port *port);
43extern void register_winch_irq(int fd, int tty_fd, int pid, 43extern void register_winch_irq(int fd, int tty_fd, int pid,
44 struct tty_struct *tty, unsigned long stack); 44 struct tty_port *port, unsigned long stack);
45 45
46#define __channel_help(fn, prefix) \ 46#define __channel_help(fn, prefix) \
47__uml_help(fn, prefix "[0-9]*=<channel description>\n" \ 47__uml_help(fn, prefix "[0-9]*=<channel description>\n" \
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c
index f1b38571f94e..be541cf69fd2 100644
--- a/arch/um/drivers/line.c
+++ b/arch/um/drivers/line.c
@@ -305,7 +305,7 @@ static int line_activate(struct tty_port *port, struct tty_struct *tty)
305 return ret; 305 return ret;
306 306
307 if (!line->sigio) { 307 if (!line->sigio) {
308 chan_enable_winch(line->chan_out, tty); 308 chan_enable_winch(line->chan_out, port);
309 line->sigio = 1; 309 line->sigio = 1;
310 } 310 }
311 311
@@ -315,8 +315,22 @@ static int line_activate(struct tty_port *port, struct tty_struct *tty)
315 return 0; 315 return 0;
316} 316}
317 317
318static void unregister_winch(struct tty_struct *tty);
319
320static void line_destruct(struct tty_port *port)
321{
322 struct tty_struct *tty = tty_port_tty_get(port);
323 struct line *line = tty->driver_data;
324
325 if (line->sigio) {
326 unregister_winch(tty);
327 line->sigio = 0;
328 }
329}
330
318static const struct tty_port_operations line_port_ops = { 331static const struct tty_port_operations line_port_ops = {
319 .activate = line_activate, 332 .activate = line_activate,
333 .destruct = line_destruct,
320}; 334};
321 335
322int line_open(struct tty_struct *tty, struct file *filp) 336int line_open(struct tty_struct *tty, struct file *filp)
@@ -340,18 +354,6 @@ int line_install(struct tty_driver *driver, struct tty_struct *tty,
340 return 0; 354 return 0;
341} 355}
342 356
343static void unregister_winch(struct tty_struct *tty);
344
345void line_cleanup(struct tty_struct *tty)
346{
347 struct line *line = tty->driver_data;
348
349 if (line->sigio) {
350 unregister_winch(tty);
351 line->sigio = 0;
352 }
353}
354
355void line_close(struct tty_struct *tty, struct file * filp) 357void line_close(struct tty_struct *tty, struct file * filp)
356{ 358{
357 struct line *line = tty->driver_data; 359 struct line *line = tty->driver_data;
@@ -601,7 +603,7 @@ struct winch {
601 int fd; 603 int fd;
602 int tty_fd; 604 int tty_fd;
603 int pid; 605 int pid;
604 struct tty_struct *tty; 606 struct tty_port *port;
605 unsigned long stack; 607 unsigned long stack;
606 struct work_struct work; 608 struct work_struct work;
607}; 609};
@@ -655,7 +657,7 @@ static irqreturn_t winch_interrupt(int irq, void *data)
655 goto out; 657 goto out;
656 } 658 }
657 } 659 }
658 tty = winch->tty; 660 tty = tty_port_tty_get(winch->port);
659 if (tty != NULL) { 661 if (tty != NULL) {
660 line = tty->driver_data; 662 line = tty->driver_data;
661 if (line != NULL) { 663 if (line != NULL) {
@@ -663,6 +665,7 @@ static irqreturn_t winch_interrupt(int irq, void *data)
663 &tty->winsize.ws_col); 665 &tty->winsize.ws_col);
664 kill_pgrp(tty->pgrp, SIGWINCH, 1); 666 kill_pgrp(tty->pgrp, SIGWINCH, 1);
665 } 667 }
668 tty_kref_put(tty);
666 } 669 }
667 out: 670 out:
668 if (winch->fd != -1) 671 if (winch->fd != -1)
@@ -670,7 +673,7 @@ static irqreturn_t winch_interrupt(int irq, void *data)
670 return IRQ_HANDLED; 673 return IRQ_HANDLED;
671} 674}
672 675
673void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty, 676void register_winch_irq(int fd, int tty_fd, int pid, struct tty_port *port,
674 unsigned long stack) 677 unsigned long stack)
675{ 678{
676 struct winch *winch; 679 struct winch *winch;
@@ -685,7 +688,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty,
685 .fd = fd, 688 .fd = fd,
686 .tty_fd = tty_fd, 689 .tty_fd = tty_fd,
687 .pid = pid, 690 .pid = pid,
688 .tty = tty, 691 .port = port,
689 .stack = stack }); 692 .stack = stack });
690 693
691 if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, 694 if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt,
@@ -714,15 +717,18 @@ static void unregister_winch(struct tty_struct *tty)
714{ 717{
715 struct list_head *ele, *next; 718 struct list_head *ele, *next;
716 struct winch *winch; 719 struct winch *winch;
720 struct tty_struct *wtty;
717 721
718 spin_lock(&winch_handler_lock); 722 spin_lock(&winch_handler_lock);
719 723
720 list_for_each_safe(ele, next, &winch_handlers) { 724 list_for_each_safe(ele, next, &winch_handlers) {
721 winch = list_entry(ele, struct winch, list); 725 winch = list_entry(ele, struct winch, list);
722 if (winch->tty == tty) { 726 wtty = tty_port_tty_get(winch->port);
727 if (wtty == tty) {
723 free_winch(winch); 728 free_winch(winch);
724 break; 729 break;
725 } 730 }
731 tty_kref_put(wtty);
726 } 732 }
727 spin_unlock(&winch_handler_lock); 733 spin_unlock(&winch_handler_lock);
728} 734}
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index d8926c303629..39f186252e02 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -218,6 +218,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev)
218 spin_lock_irqsave(&lp->lock, flags); 218 spin_lock_irqsave(&lp->lock, flags);
219 219
220 len = (*lp->write)(lp->fd, skb, lp); 220 len = (*lp->write)(lp->fd, skb, lp);
221 skb_tx_timestamp(skb);
221 222
222 if (len == skb->len) { 223 if (len == skb->len) {
223 dev->stats.tx_packets++; 224 dev->stats.tx_packets++;
@@ -281,6 +282,7 @@ static void uml_net_get_drvinfo(struct net_device *dev,
281static const struct ethtool_ops uml_net_ethtool_ops = { 282static const struct ethtool_ops uml_net_ethtool_ops = {
282 .get_drvinfo = uml_net_get_drvinfo, 283 .get_drvinfo = uml_net_get_drvinfo,
283 .get_link = ethtool_op_get_link, 284 .get_link = ethtool_op_get_link,
285 .get_ts_info = ethtool_op_get_ts_info,
284}; 286};
285 287
286static void uml_net_user_timer_expire(unsigned long _conn) 288static void uml_net_user_timer_expire(unsigned long _conn)
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c
index 16fdd0a0f9d6..b8d14fa52059 100644
--- a/arch/um/drivers/ssl.c
+++ b/arch/um/drivers/ssl.c
@@ -105,7 +105,6 @@ static const struct tty_operations ssl_ops = {
105 .throttle = line_throttle, 105 .throttle = line_throttle,
106 .unthrottle = line_unthrottle, 106 .unthrottle = line_unthrottle,
107 .install = ssl_install, 107 .install = ssl_install,
108 .cleanup = line_cleanup,
109 .hangup = line_hangup, 108 .hangup = line_hangup,
110}; 109};
111 110
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c
index 827777af3f6d..7b361f36ca96 100644
--- a/arch/um/drivers/stdio_console.c
+++ b/arch/um/drivers/stdio_console.c
@@ -110,7 +110,6 @@ static const struct tty_operations console_ops = {
110 .set_termios = line_set_termios, 110 .set_termios = line_set_termios,
111 .throttle = line_throttle, 111 .throttle = line_throttle,
112 .unthrottle = line_unthrottle, 112 .unthrottle = line_unthrottle,
113 .cleanup = line_cleanup,
114 .hangup = line_hangup, 113 .hangup = line_hangup,
115}; 114};
116 115
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c
index b1469fe93295..9d9f1b4bf826 100644
--- a/arch/um/os-Linux/signal.c
+++ b/arch/um/os-Linux/signal.c
@@ -15,7 +15,7 @@
15#include <sysdep/mcontext.h> 15#include <sysdep/mcontext.h>
16#include "internal.h" 16#include "internal.h"
17 17
18void (*sig_info[NSIG])(int, siginfo_t *, struct uml_pt_regs *) = { 18void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = {
19 [SIGTRAP] = relay_signal, 19 [SIGTRAP] = relay_signal,
20 [SIGFPE] = relay_signal, 20 [SIGFPE] = relay_signal,
21 [SIGILL] = relay_signal, 21 [SIGILL] = relay_signal,
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index da4b9e9999fd..337518c5042a 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -15,6 +15,8 @@
15#include <sys/mman.h> 15#include <sys/mman.h>
16#include <sys/stat.h> 16#include <sys/stat.h>
17#include <sys/wait.h> 17#include <sys/wait.h>
18#include <sys/time.h>
19#include <sys/resource.h>
18#include <asm/unistd.h> 20#include <asm/unistd.h>
19#include <init.h> 21#include <init.h>
20#include <os.h> 22#include <os.h>
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index dc50b157fc83..2943e3acdf0c 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -9,7 +9,7 @@ config UNICORE32
9 select GENERIC_ATOMIC64 9 select GENERIC_ATOMIC64
10 select HAVE_KERNEL_LZO 10 select HAVE_KERNEL_LZO
11 select HAVE_KERNEL_LZMA 11 select HAVE_KERNEL_LZMA
12 select HAVE_VIRT_TO_BUS 12 select VIRT_TO_BUS
13 select ARCH_HAVE_CUSTOM_GPIO_H 13 select ARCH_HAVE_CUSTOM_GPIO_H
14 select GENERIC_FIND_FIRST_BIT 14 select GENERIC_FIND_FIRST_BIT
15 select GENERIC_IRQ_PROBE 15 select GENERIC_IRQ_PROBE
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index a4f24f5b1218..70c0f3da0476 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -112,7 +112,7 @@ config X86
112 select GENERIC_STRNLEN_USER 112 select GENERIC_STRNLEN_USER
113 select HAVE_CONTEXT_TRACKING if X86_64 113 select HAVE_CONTEXT_TRACKING if X86_64
114 select HAVE_IRQ_TIME_ACCOUNTING 114 select HAVE_IRQ_TIME_ACCOUNTING
115 select HAVE_VIRT_TO_BUS 115 select VIRT_TO_BUS
116 select MODULES_USE_ELF_REL if X86_32 116 select MODULES_USE_ELF_REL if X86_32
117 select MODULES_USE_ELF_RELA if X86_64 117 select MODULES_USE_ELF_RELA if X86_64
118 select CLONE_BACKWARDS if X86_32 118 select CLONE_BACKWARDS if X86_32
diff --git a/arch/x86/include/asm/kprobes.h b/arch/x86/include/asm/kprobes.h
index d3ddd17405d0..5a6d2873f80e 100644
--- a/arch/x86/include/asm/kprobes.h
+++ b/arch/x86/include/asm/kprobes.h
@@ -77,6 +77,7 @@ struct arch_specific_insn {
77 * a post_handler or break_handler). 77 * a post_handler or break_handler).
78 */ 78 */
79 int boostable; 79 int boostable;
80 bool if_modifier;
80}; 81};
81 82
82struct arch_optimized_insn { 83struct arch_optimized_insn {
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 635a74d22409..4979778cc7fb 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -414,8 +414,8 @@ struct kvm_vcpu_arch {
414 gpa_t time; 414 gpa_t time;
415 struct pvclock_vcpu_time_info hv_clock; 415 struct pvclock_vcpu_time_info hv_clock;
416 unsigned int hw_tsc_khz; 416 unsigned int hw_tsc_khz;
417 unsigned int time_offset; 417 struct gfn_to_hva_cache pv_time;
418 struct page *time_page; 418 bool pv_time_enabled;
419 /* set guest stopped flag in pvclock flags field */ 419 /* set guest stopped flag in pvclock flags field */
420 bool pvclock_set_guest_stopped_request; 420 bool pvclock_set_guest_stopped_request;
421 421
diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 529c8931fc02..dab7580c47ae 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -101,6 +101,10 @@ static struct event_constraint intel_snb_event_constraints[] __read_mostly =
101 FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */ 101 FIXED_EVENT_CONSTRAINT(0x00c0, 0), /* INST_RETIRED.ANY */
102 FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */ 102 FIXED_EVENT_CONSTRAINT(0x003c, 1), /* CPU_CLK_UNHALTED.CORE */
103 FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */ 103 FIXED_EVENT_CONSTRAINT(0x0300, 2), /* CPU_CLK_UNHALTED.REF */
104 INTEL_UEVENT_CONSTRAINT(0x04a3, 0xf), /* CYCLE_ACTIVITY.CYCLES_NO_DISPATCH */
105 INTEL_UEVENT_CONSTRAINT(0x05a3, 0xf), /* CYCLE_ACTIVITY.STALLS_L2_PENDING */
106 INTEL_UEVENT_CONSTRAINT(0x02a3, 0x4), /* CYCLE_ACTIVITY.CYCLES_L1D_PENDING */
107 INTEL_UEVENT_CONSTRAINT(0x06a3, 0x4), /* CYCLE_ACTIVITY.STALLS_L1D_PENDING */
104 INTEL_EVENT_CONSTRAINT(0x48, 0x4), /* L1D_PEND_MISS.PENDING */ 108 INTEL_EVENT_CONSTRAINT(0x48, 0x4), /* L1D_PEND_MISS.PENDING */
105 INTEL_UEVENT_CONSTRAINT(0x01c0, 0x2), /* INST_RETIRED.PREC_DIST */ 109 INTEL_UEVENT_CONSTRAINT(0x01c0, 0x2), /* INST_RETIRED.PREC_DIST */
106 INTEL_EVENT_CONSTRAINT(0xcd, 0x8), /* MEM_TRANS_RETIRED.LOAD_LATENCY */ 110 INTEL_EVENT_CONSTRAINT(0xcd, 0x8), /* MEM_TRANS_RETIRED.LOAD_LATENCY */
diff --git a/arch/x86/kernel/cpu/perf_event_intel_ds.c b/arch/x86/kernel/cpu/perf_event_intel_ds.c
index 826054a4f2ee..b05a575d56f4 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_ds.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_ds.c
@@ -729,3 +729,13 @@ void intel_ds_init(void)
729 } 729 }
730 } 730 }
731} 731}
732
733void perf_restore_debug_store(void)
734{
735 struct debug_store *ds = __this_cpu_read(cpu_hw_events.ds);
736
737 if (!x86_pmu.bts && !x86_pmu.pebs)
738 return;
739
740 wrmsrl(MSR_IA32_DS_AREA, (unsigned long)ds);
741}
diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
index 3f06e6149981..7bfe318d3d8a 100644
--- a/arch/x86/kernel/kprobes/core.c
+++ b/arch/x86/kernel/kprobes/core.c
@@ -375,6 +375,9 @@ static void __kprobes arch_copy_kprobe(struct kprobe *p)
375 else 375 else
376 p->ainsn.boostable = -1; 376 p->ainsn.boostable = -1;
377 377
378 /* Check whether the instruction modifies Interrupt Flag or not */
379 p->ainsn.if_modifier = is_IF_modifier(p->ainsn.insn);
380
378 /* Also, displacement change doesn't affect the first byte */ 381 /* Also, displacement change doesn't affect the first byte */
379 p->opcode = p->ainsn.insn[0]; 382 p->opcode = p->ainsn.insn[0];
380} 383}
@@ -434,7 +437,7 @@ static void __kprobes set_current_kprobe(struct kprobe *p, struct pt_regs *regs,
434 __this_cpu_write(current_kprobe, p); 437 __this_cpu_write(current_kprobe, p);
435 kcb->kprobe_saved_flags = kcb->kprobe_old_flags 438 kcb->kprobe_saved_flags = kcb->kprobe_old_flags
436 = (regs->flags & (X86_EFLAGS_TF | X86_EFLAGS_IF)); 439 = (regs->flags & (X86_EFLAGS_TF | X86_EFLAGS_IF));
437 if (is_IF_modifier(p->ainsn.insn)) 440 if (p->ainsn.if_modifier)
438 kcb->kprobe_saved_flags &= ~X86_EFLAGS_IF; 441 kcb->kprobe_saved_flags &= ~X86_EFLAGS_IF;
439} 442}
440 443
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f71500af1f81..f19ac0aca60d 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1406,25 +1406,15 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
1406 unsigned long flags, this_tsc_khz; 1406 unsigned long flags, this_tsc_khz;
1407 struct kvm_vcpu_arch *vcpu = &v->arch; 1407 struct kvm_vcpu_arch *vcpu = &v->arch;
1408 struct kvm_arch *ka = &v->kvm->arch; 1408 struct kvm_arch *ka = &v->kvm->arch;
1409 void *shared_kaddr;
1410 s64 kernel_ns, max_kernel_ns; 1409 s64 kernel_ns, max_kernel_ns;
1411 u64 tsc_timestamp, host_tsc; 1410 u64 tsc_timestamp, host_tsc;
1412 struct pvclock_vcpu_time_info *guest_hv_clock; 1411 struct pvclock_vcpu_time_info guest_hv_clock;
1413 u8 pvclock_flags; 1412 u8 pvclock_flags;
1414 bool use_master_clock; 1413 bool use_master_clock;
1415 1414
1416 kernel_ns = 0; 1415 kernel_ns = 0;
1417 host_tsc = 0; 1416 host_tsc = 0;
1418 1417
1419 /* Keep irq disabled to prevent changes to the clock */
1420 local_irq_save(flags);
1421 this_tsc_khz = __get_cpu_var(cpu_tsc_khz);
1422 if (unlikely(this_tsc_khz == 0)) {
1423 local_irq_restore(flags);
1424 kvm_make_request(KVM_REQ_CLOCK_UPDATE, v);
1425 return 1;
1426 }
1427
1428 /* 1418 /*
1429 * If the host uses TSC clock, then passthrough TSC as stable 1419 * If the host uses TSC clock, then passthrough TSC as stable
1430 * to the guest. 1420 * to the guest.
@@ -1436,6 +1426,15 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
1436 kernel_ns = ka->master_kernel_ns; 1426 kernel_ns = ka->master_kernel_ns;
1437 } 1427 }
1438 spin_unlock(&ka->pvclock_gtod_sync_lock); 1428 spin_unlock(&ka->pvclock_gtod_sync_lock);
1429
1430 /* Keep irq disabled to prevent changes to the clock */
1431 local_irq_save(flags);
1432 this_tsc_khz = __get_cpu_var(cpu_tsc_khz);
1433 if (unlikely(this_tsc_khz == 0)) {
1434 local_irq_restore(flags);
1435 kvm_make_request(KVM_REQ_CLOCK_UPDATE, v);
1436 return 1;
1437 }
1439 if (!use_master_clock) { 1438 if (!use_master_clock) {
1440 host_tsc = native_read_tsc(); 1439 host_tsc = native_read_tsc();
1441 kernel_ns = get_kernel_ns(); 1440 kernel_ns = get_kernel_ns();
@@ -1463,7 +1462,7 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
1463 1462
1464 local_irq_restore(flags); 1463 local_irq_restore(flags);
1465 1464
1466 if (!vcpu->time_page) 1465 if (!vcpu->pv_time_enabled)
1467 return 0; 1466 return 0;
1468 1467
1469 /* 1468 /*
@@ -1525,12 +1524,12 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
1525 */ 1524 */
1526 vcpu->hv_clock.version += 2; 1525 vcpu->hv_clock.version += 2;
1527 1526
1528 shared_kaddr = kmap_atomic(vcpu->time_page); 1527 if (unlikely(kvm_read_guest_cached(v->kvm, &vcpu->pv_time,
1529 1528 &guest_hv_clock, sizeof(guest_hv_clock))))
1530 guest_hv_clock = shared_kaddr + vcpu->time_offset; 1529 return 0;
1531 1530
1532 /* retain PVCLOCK_GUEST_STOPPED if set in guest copy */ 1531 /* retain PVCLOCK_GUEST_STOPPED if set in guest copy */
1533 pvclock_flags = (guest_hv_clock->flags & PVCLOCK_GUEST_STOPPED); 1532 pvclock_flags = (guest_hv_clock.flags & PVCLOCK_GUEST_STOPPED);
1534 1533
1535 if (vcpu->pvclock_set_guest_stopped_request) { 1534 if (vcpu->pvclock_set_guest_stopped_request) {
1536 pvclock_flags |= PVCLOCK_GUEST_STOPPED; 1535 pvclock_flags |= PVCLOCK_GUEST_STOPPED;
@@ -1543,12 +1542,9 @@ static int kvm_guest_time_update(struct kvm_vcpu *v)
1543 1542
1544 vcpu->hv_clock.flags = pvclock_flags; 1543 vcpu->hv_clock.flags = pvclock_flags;
1545 1544
1546 memcpy(shared_kaddr + vcpu->time_offset, &vcpu->hv_clock, 1545 kvm_write_guest_cached(v->kvm, &vcpu->pv_time,
1547 sizeof(vcpu->hv_clock)); 1546 &vcpu->hv_clock,
1548 1547 sizeof(vcpu->hv_clock));
1549 kunmap_atomic(shared_kaddr);
1550
1551 mark_page_dirty(v->kvm, vcpu->time >> PAGE_SHIFT);
1552 return 0; 1548 return 0;
1553} 1549}
1554 1550
@@ -1837,10 +1833,7 @@ static int kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data)
1837 1833
1838static void kvmclock_reset(struct kvm_vcpu *vcpu) 1834static void kvmclock_reset(struct kvm_vcpu *vcpu)
1839{ 1835{
1840 if (vcpu->arch.time_page) { 1836 vcpu->arch.pv_time_enabled = false;
1841 kvm_release_page_dirty(vcpu->arch.time_page);
1842 vcpu->arch.time_page = NULL;
1843 }
1844} 1837}
1845 1838
1846static void accumulate_steal_time(struct kvm_vcpu *vcpu) 1839static void accumulate_steal_time(struct kvm_vcpu *vcpu)
@@ -1947,6 +1940,7 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
1947 break; 1940 break;
1948 case MSR_KVM_SYSTEM_TIME_NEW: 1941 case MSR_KVM_SYSTEM_TIME_NEW:
1949 case MSR_KVM_SYSTEM_TIME: { 1942 case MSR_KVM_SYSTEM_TIME: {
1943 u64 gpa_offset;
1950 kvmclock_reset(vcpu); 1944 kvmclock_reset(vcpu);
1951 1945
1952 vcpu->arch.time = data; 1946 vcpu->arch.time = data;
@@ -1956,14 +1950,17 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
1956 if (!(data & 1)) 1950 if (!(data & 1))
1957 break; 1951 break;
1958 1952
1959 /* ...but clean it before doing the actual write */ 1953 gpa_offset = data & ~(PAGE_MASK | 1);
1960 vcpu->arch.time_offset = data & ~(PAGE_MASK | 1);
1961 1954
1962 vcpu->arch.time_page = 1955 /* Check that the address is 32-byte aligned. */
1963 gfn_to_page(vcpu->kvm, data >> PAGE_SHIFT); 1956 if (gpa_offset & (sizeof(struct pvclock_vcpu_time_info) - 1))
1957 break;
1964 1958
1965 if (is_error_page(vcpu->arch.time_page)) 1959 if (kvm_gfn_to_hva_cache_init(vcpu->kvm,
1966 vcpu->arch.time_page = NULL; 1960 &vcpu->arch.pv_time, data & ~1ULL))
1961 vcpu->arch.pv_time_enabled = false;
1962 else
1963 vcpu->arch.pv_time_enabled = true;
1967 1964
1968 break; 1965 break;
1969 } 1966 }
@@ -2967,7 +2964,7 @@ static int kvm_vcpu_ioctl_x86_set_xcrs(struct kvm_vcpu *vcpu,
2967 */ 2964 */
2968static int kvm_set_guest_paused(struct kvm_vcpu *vcpu) 2965static int kvm_set_guest_paused(struct kvm_vcpu *vcpu)
2969{ 2966{
2970 if (!vcpu->arch.time_page) 2967 if (!vcpu->arch.pv_time_enabled)
2971 return -EINVAL; 2968 return -EINVAL;
2972 vcpu->arch.pvclock_set_guest_stopped_request = true; 2969 vcpu->arch.pvclock_set_guest_stopped_request = true;
2973 kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu); 2970 kvm_make_request(KVM_REQ_CLOCK_UPDATE, vcpu);
@@ -6718,6 +6715,7 @@ int kvm_arch_vcpu_init(struct kvm_vcpu *vcpu)
6718 goto fail_free_wbinvd_dirty_mask; 6715 goto fail_free_wbinvd_dirty_mask;
6719 6716
6720 vcpu->arch.ia32_tsc_adjust_msr = 0x0; 6717 vcpu->arch.ia32_tsc_adjust_msr = 0x0;
6718 vcpu->arch.pv_time_enabled = false;
6721 kvm_async_pf_hash_reset(vcpu); 6719 kvm_async_pf_hash_reset(vcpu);
6722 kvm_pmu_init(vcpu); 6720 kvm_pmu_init(vcpu);
6723 6721
diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 120cee1c3f8d..3c68768d7a75 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -11,6 +11,7 @@
11#include <linux/suspend.h> 11#include <linux/suspend.h>
12#include <linux/export.h> 12#include <linux/export.h>
13#include <linux/smp.h> 13#include <linux/smp.h>
14#include <linux/perf_event.h>
14 15
15#include <asm/pgtable.h> 16#include <asm/pgtable.h>
16#include <asm/proto.h> 17#include <asm/proto.h>
@@ -228,6 +229,7 @@ static void __restore_processor_state(struct saved_context *ctxt)
228 do_fpu_end(); 229 do_fpu_end();
229 x86_platform.restore_sched_clock_state(); 230 x86_platform.restore_sched_clock_state();
230 mtrr_bp_restore(); 231 mtrr_bp_restore();
232 perf_restore_debug_store();
231} 233}
232 234
233/* Needed by apm.c */ 235/* Needed by apm.c */
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 35876ffac11d..b09de49dbec5 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -9,7 +9,7 @@ config XTENSA
9 select HAVE_IDE 9 select HAVE_IDE
10 select GENERIC_ATOMIC64 10 select GENERIC_ATOMIC64
11 select HAVE_GENERIC_HARDIRQS 11 select HAVE_GENERIC_HARDIRQS
12 select HAVE_VIRT_TO_BUS 12 select VIRT_TO_BUS
13 select GENERIC_IRQ_SHOW 13 select GENERIC_IRQ_SHOW
14 select GENERIC_CPU_DEVICES 14 select GENERIC_CPU_DEVICES
15 select MODULES_USE_ELF_RELA 15 select MODULES_USE_ELF_RELA