aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/Kconfig3
-rw-r--r--arch/arm/Kconfig5
-rw-r--r--arch/arm/boot/dts/Makefile4
-rw-r--r--arch/arm/boot/dts/cros5250-common.dtsi8
-rw-r--r--arch/arm/boot/dts/xenvm-4.2.dts13
-rw-r--r--arch/arm/configs/omap2plus_defconfig4
-rw-r--r--arch/arm/include/asm/xen/hypercall.h1
-rw-r--r--arch/arm/kernel/devtree.c7
-rw-r--r--arch/arm/kernel/setup.c13
-rw-r--r--arch/arm/mach-imx/Kconfig5
-rw-r--r--arch/arm/mach-imx/Makefile1
-rw-r--r--arch/arm/mach-imx/common.h1
-rw-r--r--arch/arm/mach-imx/headsmp.S2
-rw-r--r--arch/arm/mach-imx/hotplug.c2
-rw-r--r--arch/arm/mach-imx/iram_alloc.c73
-rw-r--r--arch/arm/mach-msm/last_radio_log.c2
-rw-r--r--arch/arm/mach-omap1/dma.c8
-rw-r--r--arch/arm/mach-omap2/Kconfig2
-rw-r--r--arch/arm/mach-omap2/Makefile8
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c6
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c4
-rw-r--r--arch/arm/mach-omap2/dma.c4
-rw-r--r--arch/arm/mach-omap2/gpmc.c38
-rw-r--r--arch/arm/mach-omap2/id.c13
-rw-r--r--arch/arm/mach-omap2/mux34xx.h6
-rw-r--r--arch/arm/mach-omap2/omap_device.c2
-rw-r--r--arch/arm/mach-omap2/soc.h2
-rw-r--r--arch/arm/mach-omap2/timer.c4
-rw-r--r--arch/arm/mach-prima2/Kconfig2
-rw-r--r--arch/arm/mach-pxa/Kconfig1
-rw-r--r--arch/arm/mach-spear/spear13xx.c2
-rw-r--r--arch/arm/mach-tegra/Kconfig1
-rw-r--r--arch/arm/mach-ux500/Kconfig2
-rw-r--r--arch/arm/mach-ux500/board-mop500.c4
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c2
-rw-r--r--arch/arm/mach-vexpress/v2m.c1
-rw-r--r--arch/arm/mach-virt/virt.c1
-rw-r--r--arch/arm/plat-orion/Makefile2
-rw-r--r--arch/arm/plat-orion/gpio.c2
-rw-r--r--arch/arm/xen/enlighten.c74
-rw-r--r--arch/arm/xen/hypercall.S1
-rw-r--r--arch/arm64/Kconfig7
-rw-r--r--arch/arm64/boot/dts/foundation-v8.dts2
-rw-r--r--arch/arm64/include/asm/system_misc.h2
-rw-r--r--arch/arm64/kernel/process.c8
-rw-r--r--arch/arm64/lib/bitops.S10
-rw-r--r--arch/arm64/mm/fault.c3
-rw-r--r--arch/avr32/Kconfig3
-rw-r--r--arch/blackfin/Kconfig5
-rw-r--r--arch/cris/Kconfig1
-rw-r--r--arch/cris/arch-v32/drivers/Kconfig1
-rw-r--r--arch/cris/kernel/profile.c2
-rw-r--r--arch/hexagon/Kconfig5
-rw-r--r--arch/hexagon/kernel/vm_entry.S12
-rw-r--r--arch/ia64/Kconfig3
-rw-r--r--arch/m68k/Kconfig3
-rw-r--r--arch/m68k/Kconfig.cpu3
-rw-r--r--arch/metag/Kconfig3
-rw-r--r--arch/microblaze/Kconfig3
-rw-r--r--arch/mips/Kconfig10
-rw-r--r--arch/mips/loongson/common/Makefile2
-rw-r--r--arch/mips/txx9/generic/setup.c2
-rw-r--r--arch/openrisc/Kconfig3
-rw-r--r--arch/parisc/Kconfig9
-rw-r--r--arch/parisc/Kconfig.debug11
-rw-r--r--arch/parisc/Makefile4
-rw-r--r--arch/parisc/include/asm/atomic.h23
-rw-r--r--arch/parisc/include/asm/dma-mapping.h3
-rw-r--r--arch/parisc/include/asm/hardirq.h32
-rw-r--r--arch/parisc/include/asm/processor.h20
-rw-r--r--arch/parisc/include/asm/thread_info.h2
-rw-r--r--arch/parisc/include/asm/tlbflush.h2
-rw-r--r--arch/parisc/kernel/cache.c6
-rw-r--r--arch/parisc/kernel/entry.S68
-rw-r--r--arch/parisc/kernel/hpmc.S4
-rw-r--r--arch/parisc/kernel/irq.c104
-rw-r--r--arch/parisc/kernel/pacache.S33
-rw-r--r--arch/parisc/kernel/setup.c2
-rw-r--r--arch/parisc/kernel/smp.c14
-rw-r--r--arch/parisc/kernel/syscall.S34
-rw-r--r--arch/parisc/kernel/traps.c24
-rw-r--r--arch/parisc/kernel/vmlinux.lds.S2
-rw-r--r--arch/parisc/mm/init.c2
-rw-r--r--arch/powerpc/Kconfig5
-rw-r--r--arch/powerpc/platforms/40x/Kconfig1
-rw-r--r--arch/powerpc/platforms/44x/Kconfig1
-rw-r--r--arch/powerpc/platforms/85xx/Kconfig3
-rw-r--r--arch/powerpc/platforms/86xx/Kconfig3
-rw-r--r--arch/powerpc/platforms/8xx/Kconfig1
-rw-r--r--arch/powerpc/platforms/Kconfig4
-rw-r--r--arch/s390/hypfs/inode.c1
-rw-r--r--arch/sh/Kconfig3
-rw-r--r--arch/sh/boards/mach-sdk7786/Makefile2
-rw-r--r--arch/sh/boards/mach-x3proto/Makefile2
-rw-r--r--arch/sh/kernel/cpu/sh2a/Makefile2
-rw-r--r--arch/sh/kernel/cpu/sh3/Makefile2
-rw-r--r--arch/sh/kernel/cpu/sh4a/Makefile2
-rw-r--r--arch/sparc/Kconfig5
-rw-r--r--arch/sparc/kernel/leon_smp.c15
-rw-r--r--arch/sparc/mm/init_32.c37
-rw-r--r--arch/sparc/mm/init_64.c28
-rw-r--r--arch/um/drivers/ubd_kern.c5
-rw-r--r--arch/unicore32/Kconfig6
-rw-r--r--arch/x86/Kconfig3
-rw-r--r--arch/x86/pci/mrst.c10
-rw-r--r--arch/xtensa/Kconfig3
-rw-r--r--arch/xtensa/configs/iss_defconfig1
-rw-r--r--arch/xtensa/configs/s6105_defconfig1
-rw-r--r--arch/xtensa/platforms/iss/simdisk.c3
109 files changed, 574 insertions, 403 deletions
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig
index 8629127640cf..837a1f2d8b96 100644
--- a/arch/alpha/Kconfig
+++ b/arch/alpha/Kconfig
@@ -55,9 +55,6 @@ config GENERIC_CALIBRATE_DELAY
55 bool 55 bool
56 default y 56 default y
57 57
58config GENERIC_GPIO
59 bool
60
61config ZONE_DMA 58config ZONE_DMA
62 bool 59 bool
63 default y 60 default y
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 34ef016626ff..d423d58f938d 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -109,9 +109,6 @@ config MIGHT_HAVE_PCI
109config SYS_SUPPORTS_APM_EMULATION 109config SYS_SUPPORTS_APM_EMULATION
110 bool 110 bool
111 111
112config GENERIC_GPIO
113 bool
114
115config HAVE_TCM 112config HAVE_TCM
116 bool 113 bool
117 select GENERIC_ALLOCATOR 114 select GENERIC_ALLOCATOR
@@ -900,7 +897,6 @@ config ARCH_MULTI_V7
900 bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)" 897 bool "ARMv7 based platforms (Cortex-A, PJ4, Scorpion, Krait)"
901 default y 898 default y
902 select ARCH_MULTI_V6_V7 899 select ARCH_MULTI_V6_V7
903 select ARCH_VEXPRESS
904 select CPU_V7 900 select CPU_V7
905 901
906config ARCH_MULTI_V6_V7 902config ARCH_MULTI_V6_V7
@@ -1794,6 +1790,7 @@ config XEN
1794 depends on ARM && AEABI && OF 1790 depends on ARM && AEABI && OF
1795 depends on CPU_V7 && !CPU_V6 1791 depends on CPU_V7 && !CPU_V6
1796 depends on !GENERIC_ATOMIC64 1792 depends on !GENERIC_ATOMIC64
1793 select ARM_PSCI
1797 help 1794 help
1798 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM. 1795 Say Y if you want to run Linux in a Virtual Machine on Xen on ARM.
1799 1796
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 8562af4fe8fd..b9f7121e6ecf 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -200,8 +200,8 @@ dtb-$(CONFIG_ARCH_VERSATILE) += versatile-ab.dtb \
200dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \ 200dtb-$(CONFIG_ARCH_VEXPRESS) += vexpress-v2p-ca5s.dtb \
201 vexpress-v2p-ca9.dtb \ 201 vexpress-v2p-ca9.dtb \
202 vexpress-v2p-ca15-tc1.dtb \ 202 vexpress-v2p-ca15-tc1.dtb \
203 vexpress-v2p-ca15_a7.dtb \ 203 vexpress-v2p-ca15_a7.dtb
204 xenvm-4.2.dtb 204dtb-$(CONFIG_ARCH_VIRT) += xenvm-4.2.dtb
205dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \ 205dtb-$(CONFIG_ARCH_VT8500) += vt8500-bv07.dtb \
206 wm8505-ref.dtb \ 206 wm8505-ref.dtb \
207 wm8650-mid.dtb \ 207 wm8650-mid.dtb \
diff --git a/arch/arm/boot/dts/cros5250-common.dtsi b/arch/arm/boot/dts/cros5250-common.dtsi
index 0a61bbb9102f..3f0239ec1bc5 100644
--- a/arch/arm/boot/dts/cros5250-common.dtsi
+++ b/arch/arm/boot/dts/cros5250-common.dtsi
@@ -175,6 +175,14 @@
175 i2c@12C70000 { 175 i2c@12C70000 {
176 samsung,i2c-sda-delay = <100>; 176 samsung,i2c-sda-delay = <100>;
177 samsung,i2c-max-bus-freq = <378000>; 177 samsung,i2c-max-bus-freq = <378000>;
178
179 trackpad {
180 reg = <0x67>;
181 compatible = "cypress,cyapa";
182 interrupts = <2 0>;
183 interrupt-parent = <&gpx1>;
184 wakeup-source;
185 };
178 }; 186 };
179 187
180 i2c@12C80000 { 188 i2c@12C80000 {
diff --git a/arch/arm/boot/dts/xenvm-4.2.dts b/arch/arm/boot/dts/xenvm-4.2.dts
index ec3f9528e180..336915151398 100644
--- a/arch/arm/boot/dts/xenvm-4.2.dts
+++ b/arch/arm/boot/dts/xenvm-4.2.dts
@@ -29,6 +29,19 @@
29 compatible = "arm,cortex-a15"; 29 compatible = "arm,cortex-a15";
30 reg = <0>; 30 reg = <0>;
31 }; 31 };
32
33 cpu@1 {
34 device_type = "cpu";
35 compatible = "arm,cortex-a15";
36 reg = <1>;
37 };
38 };
39
40 psci {
41 compatible = "arm,psci";
42 method = "hvc";
43 cpu_off = <1>;
44 cpu_on = <2>;
32 }; 45 };
33 46
34 memory@80000000 { 47 memory@80000000 {
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 33903ca0d879..c1ef64bc5abd 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -137,6 +137,8 @@ CONFIG_SERIAL_8250_DETECT_IRQ=y
137CONFIG_SERIAL_8250_RSA=y 137CONFIG_SERIAL_8250_RSA=y
138CONFIG_SERIAL_AMBA_PL011=y 138CONFIG_SERIAL_AMBA_PL011=y
139CONFIG_SERIAL_AMBA_PL011_CONSOLE=y 139CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
140CONFIG_SERIAL_OMAP=y
141CONFIG_SERIAL_OMAP_CONSOLE=y
140CONFIG_HW_RANDOM=y 142CONFIG_HW_RANDOM=y
141CONFIG_I2C_CHARDEV=y 143CONFIG_I2C_CHARDEV=y
142CONFIG_SPI=y 144CONFIG_SPI=y
@@ -153,6 +155,7 @@ CONFIG_OMAP_WATCHDOG=y
153CONFIG_TWL4030_WATCHDOG=y 155CONFIG_TWL4030_WATCHDOG=y
154CONFIG_MFD_TPS65217=y 156CONFIG_MFD_TPS65217=y
155CONFIG_MFD_TPS65910=y 157CONFIG_MFD_TPS65910=y
158CONFIG_TWL6040_CORE=y
156CONFIG_REGULATOR_TWL4030=y 159CONFIG_REGULATOR_TWL4030=y
157CONFIG_REGULATOR_TPS65023=y 160CONFIG_REGULATOR_TPS65023=y
158CONFIG_REGULATOR_TPS6507X=y 161CONFIG_REGULATOR_TPS6507X=y
@@ -195,6 +198,7 @@ CONFIG_SND_USB_AUDIO=m
195CONFIG_SND_SOC=m 198CONFIG_SND_SOC=m
196CONFIG_SND_OMAP_SOC=m 199CONFIG_SND_OMAP_SOC=m
197CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m 200CONFIG_SND_OMAP_SOC_OMAP_TWL4030=m
201CONFIG_SND_OMAP_SOC_OMAP_ABE_TWL6040=m
198CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m 202CONFIG_SND_OMAP_SOC_OMAP3_PANDORA=m
199CONFIG_USB=y 203CONFIG_USB=y
200CONFIG_USB_DEBUG=y 204CONFIG_USB_DEBUG=y
diff --git a/arch/arm/include/asm/xen/hypercall.h b/arch/arm/include/asm/xen/hypercall.h
index 8a823253d775..799f42ecca63 100644
--- a/arch/arm/include/asm/xen/hypercall.h
+++ b/arch/arm/include/asm/xen/hypercall.h
@@ -46,6 +46,7 @@ int HYPERVISOR_event_channel_op(int cmd, void *arg);
46unsigned long HYPERVISOR_hvm_op(int op, void *arg); 46unsigned long HYPERVISOR_hvm_op(int op, void *arg);
47int HYPERVISOR_memory_op(unsigned int cmd, void *arg); 47int HYPERVISOR_memory_op(unsigned int cmd, void *arg);
48int HYPERVISOR_physdev_op(int cmd, void *arg); 48int HYPERVISOR_physdev_op(int cmd, void *arg);
49int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args);
49 50
50static inline void 51static inline void
51MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, 52MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va,
diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 70f1bdeb241b..5af04f6daa33 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -180,6 +180,13 @@ struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
180 unsigned long dt_root; 180 unsigned long dt_root;
181 const char *model; 181 const char *model;
182 182
183#ifdef CONFIG_ARCH_MULTIPLATFORM
184 DT_MACHINE_START(GENERIC_DT, "Generic DT based system")
185 MACHINE_END
186
187 mdesc_best = (struct machine_desc *)&__mach_desc_GENERIC_DT;
188#endif
189
183 if (!dt_phys) 190 if (!dt_phys)
184 return NULL; 191 return NULL;
185 192
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 728007c4a2b7..1522c7ae31b0 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -18,6 +18,7 @@
18#include <linux/bootmem.h> 18#include <linux/bootmem.h>
19#include <linux/seq_file.h> 19#include <linux/seq_file.h>
20#include <linux/screen_info.h> 20#include <linux/screen_info.h>
21#include <linux/of_platform.h>
21#include <linux/init.h> 22#include <linux/init.h>
22#include <linux/kexec.h> 23#include <linux/kexec.h>
23#include <linux/of_fdt.h> 24#include <linux/of_fdt.h>
@@ -659,9 +660,19 @@ struct screen_info screen_info = {
659 660
660static int __init customize_machine(void) 661static int __init customize_machine(void)
661{ 662{
662 /* customizes platform devices, or adds new ones */ 663 /*
664 * customizes platform devices, or adds new ones
665 * On DT based machines, we fall back to populating the
666 * machine from the device tree, if no callback is provided,
667 * otherwise we would always need an init_machine callback.
668 */
663 if (machine_desc->init_machine) 669 if (machine_desc->init_machine)
664 machine_desc->init_machine(); 670 machine_desc->init_machine();
671#ifdef CONFIG_OF
672 else
673 of_platform_populate(NULL, of_default_bus_match_table,
674 NULL, NULL);
675#endif
665 return 0; 676 return 0;
666} 677}
667arch_initcall(customize_machine); 678arch_initcall(customize_machine);
diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
index 78f795d73cb6..ba44328464f3 100644
--- a/arch/arm/mach-imx/Kconfig
+++ b/arch/arm/mach-imx/Kconfig
@@ -5,6 +5,7 @@ config ARCH_MXC
5 select AUTO_ZRELADDR if !ZBOOT_ROM 5 select AUTO_ZRELADDR if !ZBOOT_ROM
6 select CLKDEV_LOOKUP 6 select CLKDEV_LOOKUP
7 select CLKSRC_MMIO 7 select CLKSRC_MMIO
8 select GENERIC_ALLOCATOR
8 select GENERIC_CLOCKEVENTS 9 select GENERIC_CLOCKEVENTS
9 select GENERIC_IRQ_CHIP 10 select GENERIC_IRQ_CHIP
10 select MULTI_IRQ_HANDLER 11 select MULTI_IRQ_HANDLER
@@ -61,10 +62,6 @@ config MXC_ULPI
61config ARCH_HAS_RNGA 62config ARCH_HAS_RNGA
62 bool 63 bool
63 64
64config IRAM_ALLOC
65 bool
66 select GENERIC_ALLOCATOR
67
68config HAVE_IMX_ANATOP 65config HAVE_IMX_ANATOP
69 bool 66 bool
70 67
diff --git a/arch/arm/mach-imx/Makefile b/arch/arm/mach-imx/Makefile
index 930958973f81..70ae7c490ac0 100644
--- a/arch/arm/mach-imx/Makefile
+++ b/arch/arm/mach-imx/Makefile
@@ -23,7 +23,6 @@ obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o
23obj-$(CONFIG_MXC_TZIC) += tzic.o 23obj-$(CONFIG_MXC_TZIC) += tzic.o
24obj-$(CONFIG_MXC_AVIC) += avic.o 24obj-$(CONFIG_MXC_AVIC) += avic.o
25 25
26obj-$(CONFIG_IRAM_ALLOC) += iram_alloc.o
27obj-$(CONFIG_MXC_ULPI) += ulpi.o 26obj-$(CONFIG_MXC_ULPI) += ulpi.o
28obj-$(CONFIG_MXC_USE_EPIT) += epit.o 27obj-$(CONFIG_MXC_USE_EPIT) += epit.o
29obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o 28obj-$(CONFIG_MXC_DEBUG_BOARD) += 3ds_debugboard.o
diff --git a/arch/arm/mach-imx/common.h b/arch/arm/mach-imx/common.h
index 4cba7dbb079f..c08ae3f99cee 100644
--- a/arch/arm/mach-imx/common.h
+++ b/arch/arm/mach-imx/common.h
@@ -12,6 +12,7 @@
12#define __ASM_ARCH_MXC_COMMON_H__ 12#define __ASM_ARCH_MXC_COMMON_H__
13 13
14struct platform_device; 14struct platform_device;
15struct pt_regs;
15struct clk; 16struct clk;
16enum mxc_cpu_pwr_mode; 17enum mxc_cpu_pwr_mode;
17 18
diff --git a/arch/arm/mach-imx/headsmp.S b/arch/arm/mach-imx/headsmp.S
index a58c8b0527cc..67b9c48dcafe 100644
--- a/arch/arm/mach-imx/headsmp.S
+++ b/arch/arm/mach-imx/headsmp.S
@@ -24,7 +24,7 @@ ENTRY(v7_secondary_startup)
24ENDPROC(v7_secondary_startup) 24ENDPROC(v7_secondary_startup)
25#endif 25#endif
26 26
27#ifdef CONFIG_PM 27#ifdef CONFIG_ARM_CPU_SUSPEND
28/* 28/*
29 * The following code must assume it is running from physical address 29 * The following code must assume it is running from physical address
30 * where absolute virtual addresses to the data section have to be 30 * where absolute virtual addresses to the data section have to be
diff --git a/arch/arm/mach-imx/hotplug.c b/arch/arm/mach-imx/hotplug.c
index 5e91112dcbee..3daf1ed90579 100644
--- a/arch/arm/mach-imx/hotplug.c
+++ b/arch/arm/mach-imx/hotplug.c
@@ -11,7 +11,9 @@
11 */ 11 */
12 12
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/jiffies.h>
14#include <asm/cp15.h> 15#include <asm/cp15.h>
16#include <asm/proc-fns.h>
15 17
16#include "common.h" 18#include "common.h"
17 19
diff --git a/arch/arm/mach-imx/iram_alloc.c b/arch/arm/mach-imx/iram_alloc.c
deleted file mode 100644
index e05cf407db65..000000000000
--- a/arch/arm/mach-imx/iram_alloc.c
+++ /dev/null
@@ -1,73 +0,0 @@
1/*
2 * Copyright (C) 2010 Freescale Semiconductor, Inc. All Rights Reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301, USA.
18 */
19
20#include <linux/kernel.h>
21#include <linux/io.h>
22#include <linux/module.h>
23#include <linux/spinlock.h>
24#include <linux/genalloc.h>
25#include "linux/platform_data/imx-iram.h"
26
27static unsigned long iram_phys_base;
28static void __iomem *iram_virt_base;
29static struct gen_pool *iram_pool;
30
31static inline void __iomem *iram_phys_to_virt(unsigned long p)
32{
33 return iram_virt_base + (p - iram_phys_base);
34}
35
36void __iomem *iram_alloc(unsigned int size, unsigned long *dma_addr)
37{
38 if (!iram_pool)
39 return NULL;
40
41 *dma_addr = gen_pool_alloc(iram_pool, size);
42 pr_debug("iram alloc - %dB@0x%lX\n", size, *dma_addr);
43 if (!*dma_addr)
44 return NULL;
45 return iram_phys_to_virt(*dma_addr);
46}
47EXPORT_SYMBOL(iram_alloc);
48
49void iram_free(unsigned long addr, unsigned int size)
50{
51 if (!iram_pool)
52 return;
53
54 gen_pool_free(iram_pool, addr, size);
55}
56EXPORT_SYMBOL(iram_free);
57
58int __init iram_init(unsigned long base, unsigned long size)
59{
60 iram_phys_base = base;
61
62 iram_pool = gen_pool_create(PAGE_SHIFT, -1);
63 if (!iram_pool)
64 return -ENOMEM;
65
66 gen_pool_add(iram_pool, base, size, -1);
67 iram_virt_base = ioremap(iram_phys_base, size);
68 if (!iram_virt_base)
69 return -EIO;
70
71 pr_debug("i.MX IRAM pool: %ld KB@0x%p\n", size / 1024, iram_virt_base);
72 return 0;
73}
diff --git a/arch/arm/mach-msm/last_radio_log.c b/arch/arm/mach-msm/last_radio_log.c
index 7777767ee89a..9c392a29fc7e 100644
--- a/arch/arm/mach-msm/last_radio_log.c
+++ b/arch/arm/mach-msm/last_radio_log.c
@@ -66,6 +66,6 @@ void msm_init_last_radio_log(struct module *owner)
66 pr_err("%s: last radio log is %d bytes long\n", __func__, 66 pr_err("%s: last radio log is %d bytes long\n", __func__,
67 radio_log_size); 67 radio_log_size);
68 last_radio_log_fops.owner = owner; 68 last_radio_log_fops.owner = owner;
69 entry->size = radio_log_size; 69 proc_set_size(entry, radio_log_size);
70} 70}
71EXPORT_SYMBOL(msm_init_last_radio_log); 71EXPORT_SYMBOL(msm_init_last_radio_log);
diff --git a/arch/arm/mach-omap1/dma.c b/arch/arm/mach-omap1/dma.c
index 1a4e887f028d..68ab858e27b7 100644
--- a/arch/arm/mach-omap1/dma.c
+++ b/arch/arm/mach-omap1/dma.c
@@ -301,7 +301,7 @@ static int __init omap1_system_dma_init(void)
301 if (ret) { 301 if (ret) {
302 dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n", 302 dev_err(&pdev->dev, "%s: Unable to add resources for %s%d\n",
303 __func__, pdev->name, pdev->id); 303 __func__, pdev->name, pdev->id);
304 goto exit_device_put; 304 goto exit_iounmap;
305 } 305 }
306 306
307 p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL); 307 p = kzalloc(sizeof(struct omap_system_dma_plat_info), GFP_KERNEL);
@@ -309,7 +309,7 @@ static int __init omap1_system_dma_init(void)
309 dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n", 309 dev_err(&pdev->dev, "%s: Unable to allocate 'p' for %s\n",
310 __func__, pdev->name); 310 __func__, pdev->name);
311 ret = -ENOMEM; 311 ret = -ENOMEM;
312 goto exit_device_del; 312 goto exit_iounmap;
313 } 313 }
314 314
315 d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL); 315 d = kzalloc(sizeof(struct omap_dma_dev_attr), GFP_KERNEL);
@@ -402,8 +402,8 @@ exit_release_d:
402 kfree(d); 402 kfree(d);
403exit_release_p: 403exit_release_p:
404 kfree(p); 404 kfree(p);
405exit_device_del: 405exit_iounmap:
406 platform_device_del(pdev); 406 iounmap(dma_base);
407exit_device_put: 407exit_device_put:
408 platform_device_put(pdev); 408 platform_device_put(pdev);
409 409
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index 857b1f097fd8..f49cd51e162a 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -37,8 +37,6 @@ config ARCH_OMAP2PLUS_TYPICAL
37 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 37 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5
38 select PM_RUNTIME 38 select PM_RUNTIME
39 select REGULATOR 39 select REGULATOR
40 select SERIAL_OMAP
41 select SERIAL_OMAP_CONSOLE
42 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4 40 select TWL4030_CORE if ARCH_OMAP3 || ARCH_OMAP4
43 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4 41 select TWL4030_POWER if ARCH_OMAP3 || ARCH_OMAP4
44 select VFP 42 select VFP
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 62bb352c2d37..55a9d6777683 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -32,12 +32,12 @@ obj-$(CONFIG_SOC_HAS_OMAP2_SDRC) += sdrc.o
32 32
33# SMP support ONLY available for OMAP4 33# SMP support ONLY available for OMAP4
34 34
35obj-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o 35smp-$(CONFIG_SMP) += omap-smp.o omap-headsmp.o
36obj-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o 36smp-$(CONFIG_HOTPLUG_CPU) += omap-hotplug.o
37omap-4-5-common = omap4-common.o omap-wakeupgen.o \ 37omap-4-5-common = omap4-common.o omap-wakeupgen.o \
38 sleep44xx.o 38 sleep44xx.o
39obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) 39obj-$(CONFIG_ARCH_OMAP4) += $(omap-4-5-common) $(smp-y)
40obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) 40obj-$(CONFIG_SOC_OMAP5) += $(omap-4-5-common) $(smp-y)
41 41
42plus_sec := $(call as-instr,.arch_extension sec,+sec) 42plus_sec := $(call as-instr,.arch_extension sec,+sec)
43AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec) 43AFLAGS_omap-headsmp.o :=-Wa,-march=armv7-a$(plus_sec)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 6de78605c0af..04c116555412 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -112,13 +112,13 @@ static u8 omap3_beagle_version;
112 */ 112 */
113static struct { 113static struct {
114 int mmc1_gpio_wp; 114 int mmc1_gpio_wp;
115 int usb_pwr_level; 115 bool usb_pwr_level; /* 0 - Active Low, 1 - Active High */
116 int dvi_pd_gpio; 116 int dvi_pd_gpio;
117 int usr_button_gpio; 117 int usr_button_gpio;
118 int mmc_caps; 118 int mmc_caps;
119} beagle_config = { 119} beagle_config = {
120 .mmc1_gpio_wp = -EINVAL, 120 .mmc1_gpio_wp = -EINVAL,
121 .usb_pwr_level = GPIOF_OUT_INIT_LOW, 121 .usb_pwr_level = 0,
122 .dvi_pd_gpio = -EINVAL, 122 .dvi_pd_gpio = -EINVAL,
123 .usr_button_gpio = 4, 123 .usr_button_gpio = 4,
124 .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 124 .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
@@ -178,7 +178,7 @@ static void __init omap3_beagle_init_rev(void)
178 case 0: 178 case 0:
179 printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n"); 179 printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
180 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; 180 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
181 beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH; 181 beagle_config.usb_pwr_level = 1;
182 beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA; 182 beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
183 break; 183 break;
184 case 2: 184 case 2:
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 1a884670a6c4..18ca61e300b3 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -73,11 +73,11 @@
73#define LIS302_IRQ1_GPIO 181 73#define LIS302_IRQ1_GPIO 181
74#define LIS302_IRQ2_GPIO 180 /* Not yet in use */ 74#define LIS302_IRQ2_GPIO 180 /* Not yet in use */
75 75
76/* list all spi devices here */ 76/* List all SPI devices here. Note that the list/probe order seems to matter! */
77enum { 77enum {
78 RX51_SPI_WL1251, 78 RX51_SPI_WL1251,
79 RX51_SPI_MIPID, /* LCD panel */
80 RX51_SPI_TSC2005, /* Touch Controller */ 79 RX51_SPI_TSC2005, /* Touch Controller */
80 RX51_SPI_MIPID, /* LCD panel */
81}; 81};
82 82
83static struct wl12xx_platform_data wl1251_pdata; 83static struct wl12xx_platform_data wl1251_pdata;
diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c
index dab9fc014b97..49fd0d501c9b 100644
--- a/arch/arm/mach-omap2/dma.c
+++ b/arch/arm/mach-omap2/dma.c
@@ -28,6 +28,7 @@
28#include <linux/init.h> 28#include <linux/init.h>
29#include <linux/device.h> 29#include <linux/device.h>
30#include <linux/dma-mapping.h> 30#include <linux/dma-mapping.h>
31#include <linux/of.h>
31#include <linux/omap-dma.h> 32#include <linux/omap-dma.h>
32 33
33#include "soc.h" 34#include "soc.h"
@@ -304,6 +305,9 @@ static int __init omap2_system_dma_init(void)
304 if (res) 305 if (res)
305 return res; 306 return res;
306 307
308 if (of_have_populated_dt())
309 return res;
310
307 pdev = platform_device_register_full(&omap_dma_dev_info); 311 pdev = platform_device_register_full(&omap_dma_dev_info);
308 if (IS_ERR(pdev)) 312 if (IS_ERR(pdev))
309 return PTR_ERR(pdev); 313 return PTR_ERR(pdev);
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c
index ed946df5ad8a..6c4da1254f53 100644
--- a/arch/arm/mach-omap2/gpmc.c
+++ b/arch/arm/mach-omap2/gpmc.c
@@ -1520,36 +1520,22 @@ static int gpmc_probe_dt(struct platform_device *pdev)
1520 return ret; 1520 return ret;
1521 } 1521 }
1522 1522
1523 for_each_node_by_name(child, "nand") { 1523 for_each_child_of_node(pdev->dev.of_node, child) {
1524 ret = gpmc_probe_nand_child(pdev, child);
1525 if (ret < 0) {
1526 of_node_put(child);
1527 return ret;
1528 }
1529 }
1530 1524
1531 for_each_node_by_name(child, "onenand") { 1525 if (!child->name)
1532 ret = gpmc_probe_onenand_child(pdev, child); 1526 continue;
1533 if (ret < 0) {
1534 of_node_put(child);
1535 return ret;
1536 }
1537 }
1538 1527
1539 for_each_node_by_name(child, "nor") { 1528 if (of_node_cmp(child->name, "nand") == 0)
1540 ret = gpmc_probe_generic_child(pdev, child); 1529 ret = gpmc_probe_nand_child(pdev, child);
1541 if (ret < 0) { 1530 else if (of_node_cmp(child->name, "onenand") == 0)
1542 of_node_put(child); 1531 ret = gpmc_probe_onenand_child(pdev, child);
1543 return ret; 1532 else if (of_node_cmp(child->name, "ethernet") == 0 ||
1544 } 1533 of_node_cmp(child->name, "nor") == 0)
1545 } 1534 ret = gpmc_probe_generic_child(pdev, child);
1546 1535
1547 for_each_node_by_name(child, "ethernet") { 1536 if (WARN(ret < 0, "%s: probing gpmc child %s failed\n",
1548 ret = gpmc_probe_generic_child(pdev, child); 1537 __func__, child->full_name))
1549 if (ret < 0) {
1550 of_node_put(child); 1538 of_node_put(child);
1551 return ret;
1552 }
1553 } 1539 }
1554 1540
1555 return 0; 1541 return 0;
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 0f4c18e6e60c..1272c41d4749 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -419,11 +419,15 @@ void __init omap3xxx_check_revision(void)
419 cpu_rev = "1.0"; 419 cpu_rev = "1.0";
420 break; 420 break;
421 case 1: 421 case 1:
422 /* FALLTHROUGH */
423 default:
424 omap_revision = AM335X_REV_ES2_0; 422 omap_revision = AM335X_REV_ES2_0;
425 cpu_rev = "2.0"; 423 cpu_rev = "2.0";
426 break; 424 break;
425 case 2:
426 /* FALLTHROUGH */
427 default:
428 omap_revision = AM335X_REV_ES2_1;
429 cpu_rev = "2.1";
430 break;
427 } 431 }
428 break; 432 break;
429 case 0xb8f2: 433 case 0xb8f2:
@@ -644,13 +648,12 @@ void __init omap_soc_device_init(void)
644 soc_dev_attr->revision = soc_rev; 648 soc_dev_attr->revision = soc_rev;
645 649
646 soc_dev = soc_device_register(soc_dev_attr); 650 soc_dev = soc_device_register(soc_dev_attr);
647 if (IS_ERR_OR_NULL(soc_dev)) { 651 if (IS_ERR(soc_dev)) {
648 kfree(soc_dev_attr); 652 kfree(soc_dev_attr);
649 return; 653 return;
650 } 654 }
651 655
652 parent = soc_device_to_device(soc_dev); 656 parent = soc_device_to_device(soc_dev);
653 if (!IS_ERR_OR_NULL(parent)) 657 device_create_file(parent, &omap_soc_attr);
654 device_create_file(parent, &omap_soc_attr);
655} 658}
656#endif /* CONFIG_SOC_BUS */ 659#endif /* CONFIG_SOC_BUS */
diff --git a/arch/arm/mach-omap2/mux34xx.h b/arch/arm/mach-omap2/mux34xx.h
index 6543ebf8ecfc..3f26d297c082 100644
--- a/arch/arm/mach-omap2/mux34xx.h
+++ b/arch/arm/mach-omap2/mux34xx.h
@@ -393,6 +393,10 @@
393#define OMAP3_CONTROL_PADCONF_SAD2D_SWAKEUP_OFFSET 0xa1c 393#define OMAP3_CONTROL_PADCONF_SAD2D_SWAKEUP_OFFSET 0xa1c
394#define OMAP3_CONTROL_PADCONF_JTAG_RTCK_OFFSET 0xa1e 394#define OMAP3_CONTROL_PADCONF_JTAG_RTCK_OFFSET 0xa1e
395#define OMAP3_CONTROL_PADCONF_JTAG_TDO_OFFSET 0xa20 395#define OMAP3_CONTROL_PADCONF_JTAG_TDO_OFFSET 0xa20
396#define OMAP3_CONTROL_PADCONF_GPIO_127 0xa24
397#define OMAP3_CONTROL_PADCONF_GPIO_126 0xa26
398#define OMAP3_CONTROL_PADCONF_GPIO_128 0xa28
399#define OMAP3_CONTROL_PADCONF_GPIO_129 0xa2a
396 400
397#define OMAP3_CONTROL_PADCONF_MUX_SIZE \ 401#define OMAP3_CONTROL_PADCONF_MUX_SIZE \
398 (OMAP3_CONTROL_PADCONF_JTAG_TDO_OFFSET + 0x2) 402 (OMAP3_CONTROL_PADCONF_GPIO_129 + 0x2)
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index eeea4fa28fbc..e6d230700b2b 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -876,4 +876,4 @@ static int __init omap_device_late_init(void)
876 bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle); 876 bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle);
877 return 0; 877 return 0;
878} 878}
879omap_late_initcall(omap_device_late_init); 879omap_late_initcall_sync(omap_device_late_init);
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 18fdeeb3a44a..197cc16870d9 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -396,6 +396,7 @@ IS_OMAP_TYPE(3430, 0x3430)
396#define AM335X_CLASS 0x33500033 396#define AM335X_CLASS 0x33500033
397#define AM335X_REV_ES1_0 AM335X_CLASS 397#define AM335X_REV_ES1_0 AM335X_CLASS
398#define AM335X_REV_ES2_0 (AM335X_CLASS | (0x1 << 8)) 398#define AM335X_REV_ES2_0 (AM335X_CLASS | (0x1 << 8))
399#define AM335X_REV_ES2_1 (AM335X_CLASS | (0x2 << 8))
399 400
400#define OMAP443X_CLASS 0x44300044 401#define OMAP443X_CLASS 0x44300044
401#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8)) 402#define OMAP4430_REV_ES1_0 (OMAP443X_CLASS | (0x10 << 8))
@@ -496,6 +497,7 @@ level(__##fn);
496#define omap_subsys_initcall(fn) omap_initcall(subsys_initcall, fn) 497#define omap_subsys_initcall(fn) omap_initcall(subsys_initcall, fn)
497#define omap_device_initcall(fn) omap_initcall(device_initcall, fn) 498#define omap_device_initcall(fn) omap_initcall(device_initcall, fn)
498#define omap_late_initcall(fn) omap_initcall(late_initcall, fn) 499#define omap_late_initcall(fn) omap_initcall(late_initcall, fn)
500#define omap_late_initcall_sync(fn) omap_initcall(late_initcall_sync, fn)
499 501
500#endif /* __ASSEMBLY__ */ 502#endif /* __ASSEMBLY__ */
501 503
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 05481490a508..f8b23b8040d9 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -553,6 +553,8 @@ static inline void __init realtime_counter_init(void)
553 clksrc_nr, clksrc_src, clksrc_prop) \ 553 clksrc_nr, clksrc_src, clksrc_prop) \
554void __init omap##name##_gptimer_timer_init(void) \ 554void __init omap##name##_gptimer_timer_init(void) \
555{ \ 555{ \
556 if (omap_clk_init) \
557 omap_clk_init(); \
556 omap_dmtimer_init(); \ 558 omap_dmtimer_init(); \
557 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 559 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
558 omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src, \ 560 omap2_gptimer_clocksource_init((clksrc_nr), clksrc_src, \
@@ -563,6 +565,8 @@ void __init omap##name##_gptimer_timer_init(void) \
563 clksrc_nr, clksrc_src, clksrc_prop) \ 565 clksrc_nr, clksrc_src, clksrc_prop) \
564void __init omap##name##_sync32k_timer_init(void) \ 566void __init omap##name##_sync32k_timer_init(void) \
565{ \ 567{ \
568 if (omap_clk_init) \
569 omap_clk_init(); \
566 omap_dmtimer_init(); \ 570 omap_dmtimer_init(); \
567 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \ 571 omap2_gp_clockevent_init((clkev_nr), clkev_src, clkev_prop); \
568 /* Enable the use of clocksource="gp_timer" kernel parameter */ \ 572 /* Enable the use of clocksource="gp_timer" kernel parameter */ \
diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig
index 80ca974b2f82..6988b117fc17 100644
--- a/arch/arm/mach-prima2/Kconfig
+++ b/arch/arm/mach-prima2/Kconfig
@@ -38,7 +38,7 @@ config ARCH_MARCO
38 select CPU_V7 38 select CPU_V7
39 select HAVE_ARM_SCU if SMP 39 select HAVE_ARM_SCU if SMP
40 select HAVE_SMP 40 select HAVE_SMP
41 select SMP_ON_UP 41 select SMP_ON_UP if SMP
42 help 42 help
43 Support for CSR SiRFSoC ARM Cortex A9 Platform 43 Support for CSR SiRFSoC ARM Cortex A9 Platform
44 44
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
index 9075461999c1..96100dbf5a2e 100644
--- a/arch/arm/mach-pxa/Kconfig
+++ b/arch/arm/mach-pxa/Kconfig
@@ -162,7 +162,6 @@ config MACH_XCEP
162 select MTD 162 select MTD
163 select MTD_CFI 163 select MTD_CFI
164 select MTD_CFI_INTELEXT 164 select MTD_CFI_INTELEXT
165 select MTD_CHAR
166 select MTD_PHYSMAP 165 select MTD_PHYSMAP
167 select PXA25x 166 select PXA25x
168 select SMC91X 167 select SMC91X
diff --git a/arch/arm/mach-spear/spear13xx.c b/arch/arm/mach-spear/spear13xx.c
index 3621599c38ad..7aa6e8cf830f 100644
--- a/arch/arm/mach-spear/spear13xx.c
+++ b/arch/arm/mach-spear/spear13xx.c
@@ -35,6 +35,8 @@ void __init spear13xx_l2x0_init(void)
35 * write alloc and 'Full line of zero' options 35 * write alloc and 'Full line of zero' options
36 * 36 *
37 */ 37 */
38 if (!IS_ENABLED(CONFIG_CACHE_L2X0))
39 return;
38 40
39 writel_relaxed(0x06, VA_L2CC_BASE + L2X0_PREFETCH_CTRL); 41 writel_relaxed(0x06, VA_L2CC_BASE + L2X0_PREFETCH_CTRL);
40 42
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 20c3b372cdf5..84d72fc36dfe 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -63,6 +63,7 @@ config ARCH_TEGRA_114_SOC
63 select ARM_ARCH_TIMER 63 select ARM_ARCH_TIMER
64 select ARM_GIC 64 select ARM_GIC
65 select ARM_L1_CACHE_SHIFT_6 65 select ARM_L1_CACHE_SHIFT_6
66 select CPU_FREQ_TABLE if CPU_FREQ
66 select CPU_V7 67 select CPU_V7
67 select PINCTRL 68 select PINCTRL
68 select PINCTRL_TEGRA114 69 select PINCTRL_TEGRA114
diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
index f66d7deae46d..6a4387e39df8 100644
--- a/arch/arm/mach-ux500/Kconfig
+++ b/arch/arm/mach-ux500/Kconfig
@@ -19,6 +19,8 @@ if ARCH_U8500
19config UX500_SOC_COMMON 19config UX500_SOC_COMMON
20 bool 20 bool
21 default y 21 default y
22 select ABX500_CORE
23 select AB8500_CORE
22 select ARM_ERRATA_754322 24 select ARM_ERRATA_754322
23 select ARM_ERRATA_764369 if SMP 25 select ARM_ERRATA_764369 if SMP
24 select ARM_GIC 26 select ARM_GIC
diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c
index a15dd6b63a8f..3cd555ac6d0a 100644
--- a/arch/arm/mach-ux500/board-mop500.c
+++ b/arch/arm/mach-ux500/board-mop500.c
@@ -403,8 +403,8 @@ static int mop500_prox_activate(struct device *dev)
403 "no regulator\n"); 403 "no regulator\n");
404 return PTR_ERR(prox_regulator); 404 return PTR_ERR(prox_regulator);
405 } 405 }
406 regulator_enable(prox_regulator); 406
407 return 0; 407 return regulator_enable(prox_regulator);
408} 408}
409 409
410static void mop500_prox_deactivate(struct device *dev) 410static void mop500_prox_deactivate(struct device *dev)
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index 995928ba22fd..e90b5ab23b6d 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -191,7 +191,7 @@ static const char *db8500_read_soc_id(void)
191 /* Throw these device-specific numbers into the entropy pool */ 191 /* Throw these device-specific numbers into the entropy pool */
192 add_device_randomness(uid, 0x14); 192 add_device_randomness(uid, 0x14);
193 return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x", 193 return kasprintf(GFP_KERNEL, "%08x%08x%08x%08x%08x",
194 readl((u32 *)uid+1), 194 readl((u32 *)uid+0),
195 readl((u32 *)uid+1), readl((u32 *)uid+2), 195 readl((u32 *)uid+1), readl((u32 *)uid+2),
196 readl((u32 *)uid+3), readl((u32 *)uid+4)); 196 readl((u32 *)uid+3), readl((u32 *)uid+4));
197} 197}
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index b6083bb1eb8c..8802030df98d 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -450,7 +450,6 @@ static void __init v2m_dt_init(void)
450 450
451static const char * const v2m_dt_match[] __initconst = { 451static const char * const v2m_dt_match[] __initconst = {
452 "arm,vexpress", 452 "arm,vexpress",
453 "xen,xenvm",
454 NULL, 453 NULL,
455}; 454};
456 455
diff --git a/arch/arm/mach-virt/virt.c b/arch/arm/mach-virt/virt.c
index adc0945255ae..061f283f579e 100644
--- a/arch/arm/mach-virt/virt.c
+++ b/arch/arm/mach-virt/virt.c
@@ -32,6 +32,7 @@ static void __init virt_init(void)
32 32
33static const char *virt_dt_match[] = { 33static const char *virt_dt_match[] = {
34 "linux,dummy-virt", 34 "linux,dummy-virt",
35 "xen,xenvm",
35 NULL 36 NULL
36}; 37};
37 38
diff --git a/arch/arm/plat-orion/Makefile b/arch/arm/plat-orion/Makefile
index 2eca54b65906..9433605cd290 100644
--- a/arch/arm/plat-orion/Makefile
+++ b/arch/arm/plat-orion/Makefile
@@ -3,6 +3,6 @@
3# 3#
4ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include 4ccflags-$(CONFIG_ARCH_MULTIPLATFORM) := -I$(srctree)/$(src)/include
5 5
6orion-gpio-$(CONFIG_GENERIC_GPIO) += gpio.o 6orion-gpio-$(CONFIG_GPIOLIB) += gpio.o
7obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o 7obj-$(CONFIG_PLAT_ORION_LEGACY) += irq.o pcie.o time.o common.o mpp.o
8obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y) 8obj-$(CONFIG_PLAT_ORION_LEGACY) += $(orion-gpio-y)
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index e39c2ba6e2fb..249fe6333e18 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -150,7 +150,7 @@ err_out:
150} 150}
151 151
152/* 152/*
153 * GENERIC_GPIO primitives. 153 * GPIO primitives.
154 */ 154 */
155static int orion_gpio_request(struct gpio_chip *chip, unsigned pin) 155static int orion_gpio_request(struct gpio_chip *chip, unsigned pin)
156{ 156{
diff --git a/arch/arm/xen/enlighten.c b/arch/arm/xen/enlighten.c
index 8dc0605a9ce9..d30042e39974 100644
--- a/arch/arm/xen/enlighten.c
+++ b/arch/arm/xen/enlighten.c
@@ -2,6 +2,7 @@
2#include <xen/events.h> 2#include <xen/events.h>
3#include <xen/grant_table.h> 3#include <xen/grant_table.h>
4#include <xen/hvm.h> 4#include <xen/hvm.h>
5#include <xen/interface/vcpu.h>
5#include <xen/interface/xen.h> 6#include <xen/interface/xen.h>
6#include <xen/interface/memory.h> 7#include <xen/interface/memory.h>
7#include <xen/interface/hvm/params.h> 8#include <xen/interface/hvm/params.h>
@@ -9,9 +10,11 @@
9#include <xen/platform_pci.h> 10#include <xen/platform_pci.h>
10#include <xen/xenbus.h> 11#include <xen/xenbus.h>
11#include <xen/page.h> 12#include <xen/page.h>
13#include <xen/interface/sched.h>
12#include <xen/xen-ops.h> 14#include <xen/xen-ops.h>
13#include <asm/xen/hypervisor.h> 15#include <asm/xen/hypervisor.h>
14#include <asm/xen/hypercall.h> 16#include <asm/xen/hypercall.h>
17#include <asm/system_misc.h>
15#include <linux/interrupt.h> 18#include <linux/interrupt.h>
16#include <linux/irqreturn.h> 19#include <linux/irqreturn.h>
17#include <linux/module.h> 20#include <linux/module.h>
@@ -32,6 +35,7 @@ struct shared_info xen_dummy_shared_info;
32struct shared_info *HYPERVISOR_shared_info = (void *)&xen_dummy_shared_info; 35struct shared_info *HYPERVISOR_shared_info = (void *)&xen_dummy_shared_info;
33 36
34DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); 37DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
38static struct vcpu_info __percpu *xen_vcpu_info;
35 39
36/* These are unused until we support booting "pre-ballooned" */ 40/* These are unused until we support booting "pre-ballooned" */
37unsigned long xen_released_pages; 41unsigned long xen_released_pages;
@@ -148,6 +152,47 @@ int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
148} 152}
149EXPORT_SYMBOL_GPL(xen_unmap_domain_mfn_range); 153EXPORT_SYMBOL_GPL(xen_unmap_domain_mfn_range);
150 154
155static int __init xen_secondary_init(unsigned int cpu)
156{
157 struct vcpu_register_vcpu_info info;
158 struct vcpu_info *vcpup;
159 int err;
160
161 pr_info("Xen: initializing cpu%d\n", cpu);
162 vcpup = per_cpu_ptr(xen_vcpu_info, cpu);
163
164 info.mfn = __pa(vcpup) >> PAGE_SHIFT;
165 info.offset = offset_in_page(vcpup);
166
167 err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, cpu, &info);
168 if (err) {
169 pr_debug("register_vcpu_info failed: err=%d\n", err);
170 } else {
171 /* This cpu is using the registered vcpu info, even if
172 later ones fail to. */
173 per_cpu(xen_vcpu, cpu) = vcpup;
174 }
175 return 0;
176}
177
178static void xen_restart(char str, const char *cmd)
179{
180 struct sched_shutdown r = { .reason = SHUTDOWN_reboot };
181 int rc;
182 rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
183 if (rc)
184 BUG();
185}
186
187static void xen_power_off(void)
188{
189 struct sched_shutdown r = { .reason = SHUTDOWN_poweroff };
190 int rc;
191 rc = HYPERVISOR_sched_op(SCHEDOP_shutdown, &r);
192 if (rc)
193 BUG();
194}
195
151/* 196/*
152 * see Documentation/devicetree/bindings/arm/xen.txt for the 197 * see Documentation/devicetree/bindings/arm/xen.txt for the
153 * documentation of the Xen Device Tree format. 198 * documentation of the Xen Device Tree format.
@@ -163,6 +208,7 @@ static int __init xen_guest_init(void)
163 const char *version = NULL; 208 const char *version = NULL;
164 const char *xen_prefix = "xen,xen-"; 209 const char *xen_prefix = "xen,xen-";
165 struct resource res; 210 struct resource res;
211 int i;
166 212
167 node = of_find_compatible_node(NULL, NULL, "xen,xen"); 213 node = of_find_compatible_node(NULL, NULL, "xen,xen");
168 if (!node) { 214 if (!node) {
@@ -209,18 +255,26 @@ static int __init xen_guest_init(void)
209 255
210 /* xen_vcpu is a pointer to the vcpu_info struct in the shared_info 256 /* xen_vcpu is a pointer to the vcpu_info struct in the shared_info
211 * page, we use it in the event channel upcall and in some pvclock 257 * page, we use it in the event channel upcall and in some pvclock
212 * related functions. We don't need the vcpu_info placement 258 * related functions.
213 * optimizations because we don't use any pv_mmu or pv_irq op on
214 * HVM.
215 * The shared info contains exactly 1 CPU (the boot CPU). The guest 259 * The shared info contains exactly 1 CPU (the boot CPU). The guest
216 * is required to use VCPUOP_register_vcpu_info to place vcpu info 260 * is required to use VCPUOP_register_vcpu_info to place vcpu info
217 * for secondary CPUs as they are brought up. */ 261 * for secondary CPUs as they are brought up.
218 per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; 262 * For uniformity we use VCPUOP_register_vcpu_info even on cpu0.
263 */
264 xen_vcpu_info = __alloc_percpu(sizeof(struct vcpu_info),
265 sizeof(struct vcpu_info));
266 if (xen_vcpu_info == NULL)
267 return -ENOMEM;
268 for_each_online_cpu(i)
269 xen_secondary_init(i);
219 270
220 gnttab_init(); 271 gnttab_init();
221 if (!xen_initial_domain()) 272 if (!xen_initial_domain())
222 xenbus_probe(NULL); 273 xenbus_probe(NULL);
223 274
275 pm_power_off = xen_power_off;
276 arm_pm_restart = xen_restart;
277
224 return 0; 278 return 0;
225} 279}
226core_initcall(xen_guest_init); 280core_initcall(xen_guest_init);
@@ -231,6 +285,11 @@ static irqreturn_t xen_arm_callback(int irq, void *arg)
231 return IRQ_HANDLED; 285 return IRQ_HANDLED;
232} 286}
233 287
288static __init void xen_percpu_enable_events(void *unused)
289{
290 enable_percpu_irq(xen_events_irq, 0);
291}
292
234static int __init xen_init_events(void) 293static int __init xen_init_events(void)
235{ 294{
236 if (!xen_domain() || xen_events_irq < 0) 295 if (!xen_domain() || xen_events_irq < 0)
@@ -239,12 +298,12 @@ static int __init xen_init_events(void)
239 xen_init_IRQ(); 298 xen_init_IRQ();
240 299
241 if (request_percpu_irq(xen_events_irq, xen_arm_callback, 300 if (request_percpu_irq(xen_events_irq, xen_arm_callback,
242 "events", xen_vcpu)) { 301 "events", &xen_vcpu)) {
243 pr_err("Error requesting IRQ %d\n", xen_events_irq); 302 pr_err("Error requesting IRQ %d\n", xen_events_irq);
244 return -EINVAL; 303 return -EINVAL;
245 } 304 }
246 305
247 enable_percpu_irq(xen_events_irq, 0); 306 on_each_cpu(xen_percpu_enable_events, NULL, 0);
248 307
249 return 0; 308 return 0;
250} 309}
@@ -259,4 +318,5 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_sched_op);
259EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op); 318EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op);
260EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op); 319EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op);
261EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op); 320EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op);
321EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op);
262EXPORT_SYMBOL_GPL(privcmd_call); 322EXPORT_SYMBOL_GPL(privcmd_call);
diff --git a/arch/arm/xen/hypercall.S b/arch/arm/xen/hypercall.S
index 71f723984cbd..199cb2da7663 100644
--- a/arch/arm/xen/hypercall.S
+++ b/arch/arm/xen/hypercall.S
@@ -87,6 +87,7 @@ HYPERCALL2(event_channel_op);
87HYPERCALL2(hvm_op); 87HYPERCALL2(hvm_op);
88HYPERCALL2(memory_op); 88HYPERCALL2(memory_op);
89HYPERCALL2(physdev_op); 89HYPERCALL2(physdev_op);
90HYPERCALL3(vcpu_op);
90 91
91ENTRY(privcmd_call) 92ENTRY(privcmd_call)
92 stmdb sp!, {r4} 93 stmdb sp!, {r4}
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index 73b6e764034c..48347dcf0566 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -6,6 +6,7 @@ config ARM64
6 select ARCH_WANT_FRAME_POINTERS 6 select ARCH_WANT_FRAME_POINTERS
7 select ARM_AMBA 7 select ARM_AMBA
8 select ARM_ARCH_TIMER 8 select ARM_ARCH_TIMER
9 select ARM_GIC
9 select CLONE_BACKWARDS 10 select CLONE_BACKWARDS
10 select COMMON_CLK 11 select COMMON_CLK
11 select GENERIC_CLOCKEVENTS 12 select GENERIC_CLOCKEVENTS
@@ -31,6 +32,8 @@ config ARM64
31 select OF 32 select OF
32 select OF_EARLY_FLATTREE 33 select OF_EARLY_FLATTREE
33 select PERF_USE_VMALLOC 34 select PERF_USE_VMALLOC
35 select POWER_RESET
36 select POWER_SUPPLY
34 select RTC_LIB 37 select RTC_LIB
35 select SPARSE_IRQ 38 select SPARSE_IRQ
36 select SYSCTL_EXCEPTION_TRACE 39 select SYSCTL_EXCEPTION_TRACE
@@ -92,9 +95,6 @@ config SWIOTLB
92config IOMMU_HELPER 95config IOMMU_HELPER
93 def_bool SWIOTLB 96 def_bool SWIOTLB
94 97
95config GENERIC_GPIO
96 bool
97
98source "init/Kconfig" 98source "init/Kconfig"
99 99
100source "kernel/Kconfig.freezer" 100source "kernel/Kconfig.freezer"
@@ -105,6 +105,7 @@ config ARCH_VEXPRESS
105 bool "ARMv8 software model (Versatile Express)" 105 bool "ARMv8 software model (Versatile Express)"
106 select ARCH_REQUIRE_GPIOLIB 106 select ARCH_REQUIRE_GPIOLIB
107 select COMMON_CLK_VERSATILE 107 select COMMON_CLK_VERSATILE
108 select POWER_RESET_VEXPRESS
108 select VEXPRESS_CONFIG 109 select VEXPRESS_CONFIG
109 help 110 help
110 This enables support for the ARMv8 software model (Versatile 111 This enables support for the ARMv8 software model (Versatile
diff --git a/arch/arm64/boot/dts/foundation-v8.dts b/arch/arm64/boot/dts/foundation-v8.dts
index 198682b6de31..84fcc5018284 100644
--- a/arch/arm64/boot/dts/foundation-v8.dts
+++ b/arch/arm64/boot/dts/foundation-v8.dts
@@ -23,7 +23,7 @@
23 }; 23 };
24 24
25 cpus { 25 cpus {
26 #address-cells = <1>; 26 #address-cells = <2>;
27 #size-cells = <0>; 27 #size-cells = <0>;
28 28
29 cpu@0 { 29 cpu@0 {
diff --git a/arch/arm64/include/asm/system_misc.h b/arch/arm64/include/asm/system_misc.h
index 95e407255347..a6e1750369ef 100644
--- a/arch/arm64/include/asm/system_misc.h
+++ b/arch/arm64/include/asm/system_misc.h
@@ -41,7 +41,7 @@ extern void show_pte(struct mm_struct *mm, unsigned long addr);
41extern void __show_regs(struct pt_regs *); 41extern void __show_regs(struct pt_regs *);
42 42
43void soft_restart(unsigned long); 43void soft_restart(unsigned long);
44extern void (*pm_restart)(const char *cmd); 44extern void (*arm_pm_restart)(char str, const char *cmd);
45 45
46#define UDBG_UNDEFINED (1 << 0) 46#define UDBG_UNDEFINED (1 << 0)
47#define UDBG_SYSCALL (1 << 1) 47#define UDBG_SYSCALL (1 << 1)
diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c
index f4919721f7dd..46f02c3b5015 100644
--- a/arch/arm64/kernel/process.c
+++ b/arch/arm64/kernel/process.c
@@ -81,8 +81,8 @@ void soft_restart(unsigned long addr)
81void (*pm_power_off)(void); 81void (*pm_power_off)(void);
82EXPORT_SYMBOL_GPL(pm_power_off); 82EXPORT_SYMBOL_GPL(pm_power_off);
83 83
84void (*pm_restart)(const char *cmd); 84void (*arm_pm_restart)(char str, const char *cmd);
85EXPORT_SYMBOL_GPL(pm_restart); 85EXPORT_SYMBOL_GPL(arm_pm_restart);
86 86
87void arch_cpu_idle_prepare(void) 87void arch_cpu_idle_prepare(void)
88{ 88{
@@ -131,8 +131,8 @@ void machine_restart(char *cmd)
131 local_fiq_disable(); 131 local_fiq_disable();
132 132
133 /* Now call the architecture specific reboot code. */ 133 /* Now call the architecture specific reboot code. */
134 if (pm_restart) 134 if (arm_pm_restart)
135 pm_restart(cmd); 135 arm_pm_restart('h', cmd);
136 136
137 /* 137 /*
138 * Whoops - the architecture was unable to reboot. 138 * Whoops - the architecture was unable to reboot.
diff --git a/arch/arm64/lib/bitops.S b/arch/arm64/lib/bitops.S
index 36216d30cb9a..e5db797790d3 100644
--- a/arch/arm64/lib/bitops.S
+++ b/arch/arm64/lib/bitops.S
@@ -21,13 +21,13 @@
21 21
22/* 22/*
23 * x0: bits 5:0 bit offset 23 * x0: bits 5:0 bit offset
24 * bits 63:6 word offset 24 * bits 31:6 word offset
25 * x1: address 25 * x1: address
26 */ 26 */
27 .macro bitop, name, instr 27 .macro bitop, name, instr
28ENTRY( \name ) 28ENTRY( \name )
29 and x3, x0, #63 // Get bit offset 29 and w3, w0, #63 // Get bit offset
30 eor x0, x0, x3 // Clear low bits 30 eor w0, w0, w3 // Clear low bits
31 mov x2, #1 31 mov x2, #1
32 add x1, x1, x0, lsr #3 // Get word offset 32 add x1, x1, x0, lsr #3 // Get word offset
33 lsl x3, x2, x3 // Create mask 33 lsl x3, x2, x3 // Create mask
@@ -41,8 +41,8 @@ ENDPROC(\name )
41 41
42 .macro testop, name, instr 42 .macro testop, name, instr
43ENTRY( \name ) 43ENTRY( \name )
44 and x3, x0, #63 // Get bit offset 44 and w3, w0, #63 // Get bit offset
45 eor x0, x0, x3 // Clear low bits 45 eor w0, w0, w3 // Clear low bits
46 mov x2, #1 46 mov x2, #1
47 add x1, x1, x0, lsr #3 // Get word offset 47 add x1, x1, x0, lsr #3 // Get word offset
48 lsl x4, x2, x3 // Create mask 48 lsl x4, x2, x3 // Create mask
diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c
index 52638171d6fd..98af6e760cce 100644
--- a/arch/arm64/mm/fault.c
+++ b/arch/arm64/mm/fault.c
@@ -148,6 +148,7 @@ void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs)
148#define VM_FAULT_BADACCESS 0x020000 148#define VM_FAULT_BADACCESS 0x020000
149 149
150#define ESR_WRITE (1 << 6) 150#define ESR_WRITE (1 << 6)
151#define ESR_CM (1 << 8)
151#define ESR_LNX_EXEC (1 << 24) 152#define ESR_LNX_EXEC (1 << 24)
152 153
153/* 154/*
@@ -206,7 +207,7 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,
206 struct task_struct *tsk; 207 struct task_struct *tsk;
207 struct mm_struct *mm; 208 struct mm_struct *mm;
208 int fault, sig, code; 209 int fault, sig, code;
209 int write = esr & ESR_WRITE; 210 bool write = (esr & ESR_WRITE) && !(esr & ESR_CM);
210 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | 211 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
211 (write ? FAULT_FLAG_WRITE : 0); 212 (write ? FAULT_FLAG_WRITE : 0);
212 213
diff --git a/arch/avr32/Kconfig b/arch/avr32/Kconfig
index 22c40308360b..bdc35589277f 100644
--- a/arch/avr32/Kconfig
+++ b/arch/avr32/Kconfig
@@ -26,9 +26,6 @@ config AVR32
26 There is an AVR32 Linux project with a web page at 26 There is an AVR32 Linux project with a web page at
27 http://avr32linux.org/. 27 http://avr32linux.org/.
28 28
29config GENERIC_GPIO
30 def_bool y
31
32config STACKTRACE_SUPPORT 29config STACKTRACE_SUPPORT
33 def_bool y 30 def_bool y
34 31
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index 453ebe46b065..a117652b5fea 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -27,7 +27,7 @@ config BLACKFIN
27 select HAVE_OPROFILE 27 select HAVE_OPROFILE
28 select HAVE_PERF_EVENTS 28 select HAVE_PERF_EVENTS
29 select ARCH_HAVE_CUSTOM_GPIO_H 29 select ARCH_HAVE_CUSTOM_GPIO_H
30 select ARCH_WANT_OPTIONAL_GPIOLIB 30 select ARCH_REQUIRE_GPIOLIB
31 select HAVE_UID16 31 select HAVE_UID16
32 select HAVE_UNDERSCORE_SYMBOL_PREFIX 32 select HAVE_UNDERSCORE_SYMBOL_PREFIX
33 select VIRT_TO_BUS 33 select VIRT_TO_BUS
@@ -52,9 +52,6 @@ config GENERIC_BUG
52config ZONE_DMA 52config ZONE_DMA
53 def_bool y 53 def_bool y
54 54
55config GENERIC_GPIO
56 def_bool y
57
58config FORCE_MAX_ZONEORDER 55config FORCE_MAX_ZONEORDER
59 int 56 int
60 default "14" 57 default "14"
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
index 06dd026533e3..8769a9045a54 100644
--- a/arch/cris/Kconfig
+++ b/arch/cris/Kconfig
@@ -264,7 +264,6 @@ config ETRAX_AXISFLASHMAP
264 select MTD_CFI 264 select MTD_CFI
265 select MTD_CFI_AMDSTD 265 select MTD_CFI_AMDSTD
266 select MTD_JEDECPROBE if ETRAX_ARCH_V32 266 select MTD_JEDECPROBE if ETRAX_ARCH_V32
267 select MTD_CHAR
268 select MTD_BLOCK 267 select MTD_BLOCK
269 select MTD_COMPLEX_MAPPINGS 268 select MTD_COMPLEX_MAPPINGS
270 help 269 help
diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig
index af4a486dadcd..c55971a40c34 100644
--- a/arch/cris/arch-v32/drivers/Kconfig
+++ b/arch/cris/arch-v32/drivers/Kconfig
@@ -404,7 +404,6 @@ config ETRAX_AXISFLASHMAP
404 select MTD_CFI 404 select MTD_CFI
405 select MTD_CFI_AMDSTD 405 select MTD_CFI_AMDSTD
406 select MTD_JEDECPROBE 406 select MTD_JEDECPROBE
407 select MTD_CHAR
408 select MTD_BLOCK 407 select MTD_BLOCK
409 select MTD_COMPLEX_MAPPINGS 408 select MTD_COMPLEX_MAPPINGS
410 help 409 help
diff --git a/arch/cris/kernel/profile.c b/arch/cris/kernel/profile.c
index b82e08615d1b..cd9f15b92f8f 100644
--- a/arch/cris/kernel/profile.c
+++ b/arch/cris/kernel/profile.c
@@ -76,7 +76,7 @@ static int __init init_cris_profile(void)
76 entry = proc_create("system_profile", S_IWUSR | S_IRUGO, NULL, 76 entry = proc_create("system_profile", S_IWUSR | S_IRUGO, NULL,
77 &cris_proc_profile_operations); 77 &cris_proc_profile_operations);
78 if (entry) { 78 if (entry) {
79 entry->size = SAMPLE_BUFFER_SIZE; 79 proc_set_size(entry, SAMPLE_BUFFER_SIZE);
80 } 80 }
81 prof_running = 1; 81 prof_running = 1;
82 82
diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
index 04dff5bdcbf7..33a97929d055 100644
--- a/arch/hexagon/Kconfig
+++ b/arch/hexagon/Kconfig
@@ -30,8 +30,6 @@ config HEXAGON
30 select GENERIC_CLOCKEVENTS_BROADCAST 30 select GENERIC_CLOCKEVENTS_BROADCAST
31 select MODULES_USE_ELF_RELA 31 select MODULES_USE_ELF_RELA
32 select GENERIC_CPU_DEVICES 32 select GENERIC_CPU_DEVICES
33 select GENERIC_KERNEL_THREAD
34 select GENERIC_KERNEL_EXECVE
35 ---help--- 33 ---help---
36 Qualcomm Hexagon is a processor architecture designed for high 34 Qualcomm Hexagon is a processor architecture designed for high
37 performance and low power across a wide variety of applications. 35 performance and low power across a wide variety of applications.
@@ -157,9 +155,6 @@ source "mm/Kconfig"
157 155
158source "kernel/Kconfig.hz" 156source "kernel/Kconfig.hz"
159 157
160config GENERIC_GPIO
161 def_bool n
162
163endmenu 158endmenu
164 159
165source "init/Kconfig" 160source "init/Kconfig"
diff --git a/arch/hexagon/kernel/vm_entry.S b/arch/hexagon/kernel/vm_entry.S
index e3086185fc9f..67c6ccc14770 100644
--- a/arch/hexagon/kernel/vm_entry.S
+++ b/arch/hexagon/kernel/vm_entry.S
@@ -291,12 +291,12 @@ event_dispatch:
291 /* "Nested control path" -- if the previous mode was kernel */ 291 /* "Nested control path" -- if the previous mode was kernel */
292 { 292 {
293 R0 = memw(R29 + #_PT_ER_VMEST); 293 R0 = memw(R29 + #_PT_ER_VMEST);
294 R16.L = #LO(do_work_pending); 294 R26.L = #LO(do_work_pending);
295 } 295 }
296 { 296 {
297 P0 = tstbit(R0, #HVM_VMEST_UM_SFT); 297 P0 = tstbit(R0, #HVM_VMEST_UM_SFT);
298 if (!P0.new) jump:nt restore_all; 298 if (!P0.new) jump:nt restore_all;
299 R16.H = #HI(do_work_pending); 299 R26.H = #HI(do_work_pending);
300 R0 = #VM_INT_DISABLE; 300 R0 = #VM_INT_DISABLE;
301 } 301 }
302 302
@@ -304,7 +304,7 @@ event_dispatch:
304 * Check also the return from fork/system call, normally coming back from 304 * Check also the return from fork/system call, normally coming back from
305 * user mode 305 * user mode
306 * 306 *
307 * R16 needs to have do_work_pending, and R0 should have VM_INT_DISABLE 307 * R26 needs to have do_work_pending, and R0 should have VM_INT_DISABLE
308 */ 308 */
309 309
310check_work_pending: 310check_work_pending:
@@ -313,7 +313,7 @@ check_work_pending:
313 { 313 {
314 R0 = R29; /* regs should still be at top of stack */ 314 R0 = R29; /* regs should still be at top of stack */
315 R1 = memw(THREADINFO_REG + #_THREAD_INFO_FLAGS); 315 R1 = memw(THREADINFO_REG + #_THREAD_INFO_FLAGS);
316 callr R16; 316 callr R26;
317 } 317 }
318 318
319 { 319 {
@@ -375,11 +375,11 @@ _K_enter_debug:
375ret_from_fork: 375ret_from_fork:
376 { 376 {
377 call schedule_tail 377 call schedule_tail
378 R16.H = #HI(do_work_pending); 378 R26.H = #HI(do_work_pending);
379 } 379 }
380 { 380 {
381 P0 = cmp.eq(R24, #0); 381 P0 = cmp.eq(R24, #0);
382 R16.L = #LO(do_work_pending); 382 R26.L = #LO(do_work_pending);
383 R0 = #VM_INT_DISABLE; 383 R0 = #VM_INT_DISABLE;
384 } 384 }
385 if P0 jump check_work_pending 385 if P0 jump check_work_pending
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index d393f841ff5a..1a2b7749b047 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -101,9 +101,6 @@ config GENERIC_CALIBRATE_DELAY
101config HAVE_SETUP_PER_CPU_AREA 101config HAVE_SETUP_PER_CPU_AREA
102 def_bool y 102 def_bool y
103 103
104config GENERIC_GPIO
105 bool
106
107config DMI 104config DMI
108 bool 105 bool
109 default y 106 default y
diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
index 6de813370b8c..821170e5f6ed 100644
--- a/arch/m68k/Kconfig
+++ b/arch/m68k/Kconfig
@@ -35,9 +35,6 @@ config ARCH_HAS_ILOG2_U32
35config ARCH_HAS_ILOG2_U64 35config ARCH_HAS_ILOG2_U64
36 bool 36 bool
37 37
38config GENERIC_GPIO
39 bool
40
41config GENERIC_HWEIGHT 38config GENERIC_HWEIGHT
42 bool 39 bool
43 default y 40 default y
diff --git a/arch/m68k/Kconfig.cpu b/arch/m68k/Kconfig.cpu
index b1cfff832fb5..d266787725b4 100644
--- a/arch/m68k/Kconfig.cpu
+++ b/arch/m68k/Kconfig.cpu
@@ -22,8 +22,7 @@ config M68KCLASSIC
22 22
23config COLDFIRE 23config COLDFIRE
24 bool "Coldfire CPU family support" 24 bool "Coldfire CPU family support"
25 select GENERIC_GPIO 25 select ARCH_REQUIRE_GPIOLIB
26 select ARCH_WANT_OPTIONAL_GPIOLIB
27 select ARCH_HAVE_CUSTOM_GPIO_H 26 select ARCH_HAVE_CUSTOM_GPIO_H
28 select CPU_HAS_NO_BITFIELDS 27 select CPU_HAS_NO_BITFIELDS
29 select CPU_HAS_NO_MULDIV64 28 select CPU_HAS_NO_MULDIV64
diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
index 6f16c1469327..dcd94406030e 100644
--- a/arch/metag/Kconfig
+++ b/arch/metag/Kconfig
@@ -52,9 +52,6 @@ config GENERIC_HWEIGHT
52config GENERIC_CALIBRATE_DELAY 52config GENERIC_CALIBRATE_DELAY
53 def_bool y 53 def_bool y
54 54
55config GENERIC_GPIO
56 def_bool n
57
58config NO_IOPORT 55config NO_IOPORT
59 def_bool y 56 def_bool y
60 57
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index 54237af0b07c..d22a4ecffff4 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -54,9 +54,6 @@ config GENERIC_HWEIGHT
54config GENERIC_CALIBRATE_DELAY 54config GENERIC_CALIBRATE_DELAY
55 def_bool y 55 def_bool y
56 56
57config GENERIC_GPIO
58 bool
59
60config GENERIC_CSUM 57config GENERIC_CSUM
61 def_bool y 58 def_bool y
62 59
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index e5f3794744f1..a90cfc702bb1 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -61,8 +61,7 @@ config MIPS_ALCHEMY
61 select SYS_HAS_CPU_MIPS32_R1 61 select SYS_HAS_CPU_MIPS32_R1
62 select SYS_SUPPORTS_32BIT_KERNEL 62 select SYS_SUPPORTS_32BIT_KERNEL
63 select SYS_SUPPORTS_APM_EMULATION 63 select SYS_SUPPORTS_APM_EMULATION
64 select GENERIC_GPIO 64 select ARCH_REQUIRE_GPIOLIB
65 select ARCH_WANT_OPTIONAL_GPIOLIB
66 select SYS_SUPPORTS_ZBOOT 65 select SYS_SUPPORTS_ZBOOT
67 select USB_ARCH_HAS_OHCI 66 select USB_ARCH_HAS_OHCI
68 select USB_ARCH_HAS_EHCI 67 select USB_ARCH_HAS_EHCI
@@ -225,7 +224,6 @@ config MACH_JZ4740
225 select SYS_SUPPORTS_ZBOOT_UART16550 224 select SYS_SUPPORTS_ZBOOT_UART16550
226 select DMA_NONCOHERENT 225 select DMA_NONCOHERENT
227 select IRQ_CPU 226 select IRQ_CPU
228 select GENERIC_GPIO
229 select ARCH_REQUIRE_GPIOLIB 227 select ARCH_REQUIRE_GPIOLIB
230 select SYS_HAS_EARLY_PRINTK 228 select SYS_HAS_EARLY_PRINTK
231 select HAVE_PWM 229 select HAVE_PWM
@@ -937,7 +935,6 @@ config CSRC_SB1250
937 bool 935 bool
938 936
939config GPIO_TXX9 937config GPIO_TXX9
940 select GENERIC_GPIO
941 select ARCH_REQUIRE_GPIOLIB 938 select ARCH_REQUIRE_GPIOLIB
942 bool 939 bool
943 940
@@ -1009,9 +1006,6 @@ config GENERIC_ISA_DMA_SUPPORT_BROKEN
1009config ISA_DMA_API 1006config ISA_DMA_API
1010 bool 1007 bool
1011 1008
1012config GENERIC_GPIO
1013 bool
1014
1015config HOLES_IN_ZONE 1009config HOLES_IN_ZONE
1016 bool 1010 bool
1017 1011
@@ -1112,7 +1106,6 @@ config SOC_PNX833X
1112 select SYS_SUPPORTS_32BIT_KERNEL 1106 select SYS_SUPPORTS_32BIT_KERNEL
1113 select SYS_SUPPORTS_LITTLE_ENDIAN 1107 select SYS_SUPPORTS_LITTLE_ENDIAN
1114 select SYS_SUPPORTS_BIG_ENDIAN 1108 select SYS_SUPPORTS_BIG_ENDIAN
1115 select GENERIC_GPIO
1116 select CPU_MIPSR2_IRQ_VI 1109 select CPU_MIPSR2_IRQ_VI
1117 1110
1118config SOC_PNX8335 1111config SOC_PNX8335
@@ -1203,7 +1196,6 @@ config CPU_LOONGSON2F
1203 bool "Loongson 2F" 1196 bool "Loongson 2F"
1204 depends on SYS_HAS_CPU_LOONGSON2F 1197 depends on SYS_HAS_CPU_LOONGSON2F
1205 select CPU_LOONGSON2 1198 select CPU_LOONGSON2
1206 select GENERIC_GPIO
1207 select ARCH_REQUIRE_GPIOLIB 1199 select ARCH_REQUIRE_GPIOLIB
1208 help 1200 help
1209 The Loongson 2F processor implements the MIPS III instruction set 1201 The Loongson 2F processor implements the MIPS III instruction set
diff --git a/arch/mips/loongson/common/Makefile b/arch/mips/loongson/common/Makefile
index e526488df655..4c57b3e5743f 100644
--- a/arch/mips/loongson/common/Makefile
+++ b/arch/mips/loongson/common/Makefile
@@ -4,7 +4,7 @@
4 4
5obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \ 5obj-y += setup.o init.o cmdline.o env.o time.o reset.o irq.o \
6 pci.o bonito-irq.o mem.o machtype.o platform.o 6 pci.o bonito-irq.o mem.o machtype.o platform.o
7obj-$(CONFIG_GENERIC_GPIO) += gpio.o 7obj-$(CONFIG_GPIOLIB) += gpio.o
8 8
9# 9#
10# Serial port support 10# Serial port support
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c
index 5524f2c7b05c..5364aabc2102 100644
--- a/arch/mips/txx9/generic/setup.c
+++ b/arch/mips/txx9/generic/setup.c
@@ -118,7 +118,7 @@ EXPORT_SYMBOL(clk_put);
118 118
119/* GPIO support */ 119/* GPIO support */
120 120
121#ifdef CONFIG_GENERIC_GPIO 121#ifdef CONFIG_GPIOLIB
122int gpio_to_irq(unsigned gpio) 122int gpio_to_irq(unsigned gpio)
123{ 123{
124 return -EINVAL; 124 return -EINVAL;
diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
index 81b9ddbc9166..1072bfd18c50 100644
--- a/arch/openrisc/Kconfig
+++ b/arch/openrisc/Kconfig
@@ -44,9 +44,6 @@ config GENERIC_HWEIGHT
44config NO_IOPORT 44config NO_IOPORT
45 def_bool y 45 def_bool y
46 46
47config GENERIC_GPIO
48 def_bool y
49
50config TRACE_IRQFLAGS_SUPPORT 47config TRACE_IRQFLAGS_SUPPORT
51 def_bool y 48 def_bool y
52 49
diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig
index 433e75a2ee9a..cad060f288cf 100644
--- a/arch/parisc/Kconfig
+++ b/arch/parisc/Kconfig
@@ -13,6 +13,7 @@ config PARISC
13 select BUG 13 select BUG
14 select HAVE_PERF_EVENTS 14 select HAVE_PERF_EVENTS
15 select GENERIC_ATOMIC64 if !64BIT 15 select GENERIC_ATOMIC64 if !64BIT
16 select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
16 select HAVE_GENERIC_HARDIRQS 17 select HAVE_GENERIC_HARDIRQS
17 select BROKEN_RODATA 18 select BROKEN_RODATA
18 select GENERIC_IRQ_PROBE 19 select GENERIC_IRQ_PROBE
@@ -242,6 +243,14 @@ config SMP
242 243
243 If you don't know what to do here, say N. 244 If you don't know what to do here, say N.
244 245
246config IRQSTACKS
247 bool "Use separate kernel stacks when processing interrupts"
248 default n
249 help
250 If you say Y here the kernel will use separate kernel stacks
251 for handling hard and soft interrupts. This can help avoid
252 overflowing the process kernel stacks.
253
245config HOTPLUG_CPU 254config HOTPLUG_CPU
246 bool 255 bool
247 default y if SMP 256 default y if SMP
diff --git a/arch/parisc/Kconfig.debug b/arch/parisc/Kconfig.debug
index bc989e522a04..08a332f6ee87 100644
--- a/arch/parisc/Kconfig.debug
+++ b/arch/parisc/Kconfig.debug
@@ -13,3 +13,14 @@ config DEBUG_RODATA
13 If in doubt, say "N". 13 If in doubt, say "N".
14 14
15endmenu 15endmenu
16
17config DEBUG_STACKOVERFLOW
18 bool "Check for stack overflows"
19 default y
20 depends on DEBUG_KERNEL
21 ---help---
22 Say Y here if you want to check the overflows of kernel, IRQ
23 and exception stacks. This option will cause messages of the
24 stacks in detail when free stack space drops below a certain
25 limit.
26 If in doubt, say "N".
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile
index 113e28206503..2f967cc6649e 100644
--- a/arch/parisc/Makefile
+++ b/arch/parisc/Makefile
@@ -24,9 +24,7 @@ CHECKFLAGS += -D__hppa__=1
24LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 24LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
25 25
26MACHINE := $(shell uname -m) 26MACHINE := $(shell uname -m)
27ifeq ($(MACHINE),parisc*) 27NATIVE := $(if $(filter parisc%,$(MACHINE)),1,0)
28NATIVE := 1
29endif
30 28
31ifdef CONFIG_64BIT 29ifdef CONFIG_64BIT
32UTS_MACHINE := parisc64 30UTS_MACHINE := parisc64
diff --git a/arch/parisc/include/asm/atomic.h b/arch/parisc/include/asm/atomic.h
index f38e1984b242..472886ceab1d 100644
--- a/arch/parisc/include/asm/atomic.h
+++ b/arch/parisc/include/asm/atomic.h
@@ -229,6 +229,29 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
229 229
230#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) 230#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
231 231
232/*
233 * atomic64_dec_if_positive - decrement by 1 if old value positive
234 * @v: pointer of type atomic_t
235 *
236 * The function returns the old value of *v minus 1, even if
237 * the atomic variable, v, was not decremented.
238 */
239static inline long atomic64_dec_if_positive(atomic64_t *v)
240{
241 long c, old, dec;
242 c = atomic64_read(v);
243 for (;;) {
244 dec = c - 1;
245 if (unlikely(dec < 0))
246 break;
247 old = atomic64_cmpxchg((v), c, dec);
248 if (likely(old == c))
249 break;
250 c = old;
251 }
252 return dec;
253}
254
232#endif /* !CONFIG_64BIT */ 255#endif /* !CONFIG_64BIT */
233 256
234 257
diff --git a/arch/parisc/include/asm/dma-mapping.h b/arch/parisc/include/asm/dma-mapping.h
index 106b395688e1..d0eae5f2bd87 100644
--- a/arch/parisc/include/asm/dma-mapping.h
+++ b/arch/parisc/include/asm/dma-mapping.h
@@ -46,6 +46,9 @@ extern struct hppa_dma_ops pcx_dma_ops;
46 46
47extern struct hppa_dma_ops *hppa_dma_ops; 47extern struct hppa_dma_ops *hppa_dma_ops;
48 48
49#define dma_alloc_attrs(d, s, h, f, a) dma_alloc_coherent(d, s, h, f)
50#define dma_free_attrs(d, s, h, f, a) dma_free_coherent(d, s, h, f)
51
49static inline void * 52static inline void *
50dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 53dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
51 gfp_t flag) 54 gfp_t flag)
diff --git a/arch/parisc/include/asm/hardirq.h b/arch/parisc/include/asm/hardirq.h
index 0d68184a76cb..12373c4dabab 100644
--- a/arch/parisc/include/asm/hardirq.h
+++ b/arch/parisc/include/asm/hardirq.h
@@ -1,11 +1,41 @@
1/* hardirq.h: PA-RISC hard IRQ support. 1/* hardirq.h: PA-RISC hard IRQ support.
2 * 2 *
3 * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx> 3 * Copyright (C) 2001 Matthew Wilcox <matthew@wil.cx>
4 * Copyright (C) 2013 Helge Deller <deller@gmx.de>
4 */ 5 */
5 6
6#ifndef _PARISC_HARDIRQ_H 7#ifndef _PARISC_HARDIRQ_H
7#define _PARISC_HARDIRQ_H 8#define _PARISC_HARDIRQ_H
8 9
9#include <asm-generic/hardirq.h> 10#include <linux/cache.h>
11#include <linux/threads.h>
12#include <linux/irq.h>
13
14typedef struct {
15 unsigned int __softirq_pending;
16#ifdef CONFIG_DEBUG_STACKOVERFLOW
17 unsigned int kernel_stack_usage;
18#endif
19#ifdef CONFIG_SMP
20 unsigned int irq_resched_count;
21 unsigned int irq_call_count;
22#endif
23 unsigned int irq_tlb_count;
24} ____cacheline_aligned irq_cpustat_t;
25
26DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
27
28#define __ARCH_IRQ_STAT
29#define __IRQ_STAT(cpu, member) (irq_stat[cpu].member)
30#define inc_irq_stat(member) this_cpu_inc(irq_stat.member)
31#define local_softirq_pending() this_cpu_read(irq_stat.__softirq_pending)
32
33#define __ARCH_SET_SOFTIRQ_PENDING
34
35#define set_softirq_pending(x) \
36 this_cpu_write(irq_stat.__softirq_pending, (x))
37#define or_softirq_pending(x) this_cpu_or(irq_stat.__softirq_pending, (x))
38
39#define ack_bad_irq(irq) WARN(1, "unexpected IRQ trap at vector %02x\n", irq)
10 40
11#endif /* _PARISC_HARDIRQ_H */ 41#endif /* _PARISC_HARDIRQ_H */
diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h
index 09b54a57a48d..064015547d1e 100644
--- a/arch/parisc/include/asm/processor.h
+++ b/arch/parisc/include/asm/processor.h
@@ -20,8 +20,6 @@
20 20
21#endif /* __ASSEMBLY__ */ 21#endif /* __ASSEMBLY__ */
22 22
23#define KERNEL_STACK_SIZE (4*PAGE_SIZE)
24
25/* 23/*
26 * Default implementation of macro that returns current 24 * Default implementation of macro that returns current
27 * instruction pointer ("program counter"). 25 * instruction pointer ("program counter").
@@ -61,6 +59,23 @@
61#ifndef __ASSEMBLY__ 59#ifndef __ASSEMBLY__
62 60
63/* 61/*
62 * IRQ STACK - used for irq handler
63 */
64#ifdef __KERNEL__
65
66#define IRQ_STACK_SIZE (4096 << 2) /* 16k irq stack size */
67
68union irq_stack_union {
69 unsigned long stack[IRQ_STACK_SIZE/sizeof(unsigned long)];
70};
71
72DECLARE_PER_CPU(union irq_stack_union, irq_stack_union);
73
74void call_on_stack(unsigned long p1, void *func, unsigned long new_stack);
75
76#endif /* __KERNEL__ */
77
78/*
64 * Data detected about CPUs at boot time which is the same for all CPU's. 79 * Data detected about CPUs at boot time which is the same for all CPU's.
65 * HP boxes are SMP - ie identical processors. 80 * HP boxes are SMP - ie identical processors.
66 * 81 *
@@ -97,7 +112,6 @@ struct cpuinfo_parisc {
97 unsigned long txn_addr; /* MMIO addr of EIR or id_eid */ 112 unsigned long txn_addr; /* MMIO addr of EIR or id_eid */
98#ifdef CONFIG_SMP 113#ifdef CONFIG_SMP
99 unsigned long pending_ipi; /* bitmap of type ipi_message_type */ 114 unsigned long pending_ipi; /* bitmap of type ipi_message_type */
100 unsigned long ipi_count; /* number ipi Interrupts */
101#endif 115#endif
102 unsigned long bh_count; /* number of times bh was invoked */ 116 unsigned long bh_count; /* number of times bh was invoked */
103 unsigned long prof_counter; /* per CPU profiling support */ 117 unsigned long prof_counter; /* per CPU profiling support */
diff --git a/arch/parisc/include/asm/thread_info.h b/arch/parisc/include/asm/thread_info.h
index 6182832e5b6c..540c88fa8f86 100644
--- a/arch/parisc/include/asm/thread_info.h
+++ b/arch/parisc/include/asm/thread_info.h
@@ -40,7 +40,7 @@ struct thread_info {
40 40
41/* thread information allocation */ 41/* thread information allocation */
42 42
43#define THREAD_SIZE_ORDER 2 43#define THREAD_SIZE_ORDER 2 /* PA-RISC requires at least 16k stack */
44/* Be sure to hunt all references to this down when you change the size of 44/* Be sure to hunt all references to this down when you change the size of
45 * the kernel stack */ 45 * the kernel stack */
46#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER) 46#define THREAD_SIZE (PAGE_SIZE << THREAD_SIZE_ORDER)
diff --git a/arch/parisc/include/asm/tlbflush.h b/arch/parisc/include/asm/tlbflush.h
index 8f1a8100bf2d..5273da991e06 100644
--- a/arch/parisc/include/asm/tlbflush.h
+++ b/arch/parisc/include/asm/tlbflush.h
@@ -22,6 +22,8 @@ extern spinlock_t pa_tlb_lock;
22extern void flush_tlb_all(void); 22extern void flush_tlb_all(void);
23extern void flush_tlb_all_local(void *); 23extern void flush_tlb_all_local(void *);
24 24
25#define smp_flush_tlb_all() flush_tlb_all()
26
25/* 27/*
26 * flush_tlb_mm() 28 * flush_tlb_mm()
27 * 29 *
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 83ded26cad06..65fb4cbc3a0f 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -606,7 +606,7 @@ void clear_user_highpage(struct page *page, unsigned long vaddr)
606 /* Clear using TMPALIAS region. The page doesn't need to 606 /* Clear using TMPALIAS region. The page doesn't need to
607 be flushed but the kernel mapping needs to be purged. */ 607 be flushed but the kernel mapping needs to be purged. */
608 608
609 vto = kmap_atomic(page, KM_USER0); 609 vto = kmap_atomic(page);
610 610
611 /* The PA-RISC 2.0 Architecture book states on page F-6: 611 /* The PA-RISC 2.0 Architecture book states on page F-6:
612 "Before a write-capable translation is enabled, *all* 612 "Before a write-capable translation is enabled, *all*
@@ -641,8 +641,8 @@ void copy_user_highpage(struct page *to, struct page *from,
641 the `to' page must be flushed in copy_user_page_asm since 641 the `to' page must be flushed in copy_user_page_asm since
642 it can be used to bring in executable code. */ 642 it can be used to bring in executable code. */
643 643
644 vfrom = kmap_atomic(from, KM_USER0); 644 vfrom = kmap_atomic(from);
645 vto = kmap_atomic(to, KM_USER1); 645 vto = kmap_atomic(to);
646 646
647 purge_kernel_dcache_page_asm((unsigned long)vto); 647 purge_kernel_dcache_page_asm((unsigned long)vto);
648 purge_tlb_start(flags); 648 purge_tlb_start(flags);
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S
index f33201bf8977..4bb96ad9b0b1 100644
--- a/arch/parisc/kernel/entry.S
+++ b/arch/parisc/kernel/entry.S
@@ -400,7 +400,15 @@
400#if PT_NLEVELS == 3 400#if PT_NLEVELS == 3
401 extru \va,31-ASM_PMD_SHIFT,ASM_BITS_PER_PMD,\index 401 extru \va,31-ASM_PMD_SHIFT,ASM_BITS_PER_PMD,\index
402#else 402#else
403# if defined(CONFIG_64BIT)
404 extrd,u \va,63-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
405 #else
406 # if PAGE_SIZE > 4096
407 extru \va,31-ASM_PGDIR_SHIFT,32-ASM_PGDIR_SHIFT,\index
408 # else
403 extru \va,31-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index 409 extru \va,31-ASM_PGDIR_SHIFT,ASM_BITS_PER_PGD,\index
410 # endif
411# endif
404#endif 412#endif
405 dep %r0,31,PAGE_SHIFT,\pmd /* clear offset */ 413 dep %r0,31,PAGE_SHIFT,\pmd /* clear offset */
406 copy %r0,\pte 414 copy %r0,\pte
@@ -615,7 +623,7 @@
615 623
616 .text 624 .text
617 625
618 .align PAGE_SIZE 626 .align 4096
619 627
620ENTRY(fault_vector_20) 628ENTRY(fault_vector_20)
621 /* First vector is invalid (0) */ 629 /* First vector is invalid (0) */
@@ -825,11 +833,6 @@ ENTRY(syscall_exit_rfi)
825 STREG %r19,PT_SR7(%r16) 833 STREG %r19,PT_SR7(%r16)
826 834
827intr_return: 835intr_return:
828 /* NOTE: Need to enable interrupts incase we schedule. */
829 ssm PSW_SM_I, %r0
830
831intr_check_resched:
832
833 /* check for reschedule */ 836 /* check for reschedule */
834 mfctl %cr30,%r1 837 mfctl %cr30,%r1
835 LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_NEED_RESCHED */ 838 LDREG TI_FLAGS(%r1),%r19 /* sched.h: TIF_NEED_RESCHED */
@@ -856,6 +859,11 @@ intr_check_sig:
856 LDREG PT_IASQ1(%r16), %r20 859 LDREG PT_IASQ1(%r16), %r20
857 cmpib,COND(=),n 0,%r20,intr_restore /* backward */ 860 cmpib,COND(=),n 0,%r20,intr_restore /* backward */
858 861
862 /* NOTE: We need to enable interrupts if we have to deliver
863 * signals. We used to do this earlier but it caused kernel
864 * stack overflows. */
865 ssm PSW_SM_I, %r0
866
859 copy %r0, %r25 /* long in_syscall = 0 */ 867 copy %r0, %r25 /* long in_syscall = 0 */
860#ifdef CONFIG_64BIT 868#ifdef CONFIG_64BIT
861 ldo -16(%r30),%r29 /* Reference param save area */ 869 ldo -16(%r30),%r29 /* Reference param save area */
@@ -907,6 +915,10 @@ intr_do_resched:
907 cmpib,COND(=) 0, %r20, intr_do_preempt 915 cmpib,COND(=) 0, %r20, intr_do_preempt
908 nop 916 nop
909 917
918 /* NOTE: We need to enable interrupts if we schedule. We used
919 * to do this earlier but it caused kernel stack overflows. */
920 ssm PSW_SM_I, %r0
921
910#ifdef CONFIG_64BIT 922#ifdef CONFIG_64BIT
911 ldo -16(%r30),%r29 /* Reference param save area */ 923 ldo -16(%r30),%r29 /* Reference param save area */
912#endif 924#endif
@@ -1694,7 +1706,8 @@ ENTRY(sys_\name\()_wrapper)
1694 ldo TASK_REGS(%r1),%r1 1706 ldo TASK_REGS(%r1),%r1
1695 reg_save %r1 1707 reg_save %r1
1696 mfctl %cr27, %r28 1708 mfctl %cr27, %r28
1697 b sys_\name 1709 ldil L%sys_\name, %r31
1710 be R%sys_\name(%sr4,%r31)
1698 STREG %r28, PT_CR27(%r1) 1711 STREG %r28, PT_CR27(%r1)
1699ENDPROC(sys_\name\()_wrapper) 1712ENDPROC(sys_\name\()_wrapper)
1700 .endm 1713 .endm
@@ -1997,6 +2010,47 @@ ftrace_stub:
1997ENDPROC(return_to_handler) 2010ENDPROC(return_to_handler)
1998#endif /* CONFIG_FUNCTION_TRACER */ 2011#endif /* CONFIG_FUNCTION_TRACER */
1999 2012
2013#ifdef CONFIG_IRQSTACKS
2014/* void call_on_stack(unsigned long param1, void *func,
2015 unsigned long new_stack) */
2016ENTRY(call_on_stack)
2017 copy %sp, %r1
2018
2019 /* Regarding the HPPA calling conventions for function pointers,
2020 we assume the PIC register is not changed across call. For
2021 CONFIG_64BIT, the argument pointer is left to point at the
2022 argument region allocated for the call to call_on_stack. */
2023# ifdef CONFIG_64BIT
2024 /* Switch to new stack. We allocate two 128 byte frames. */
2025 ldo 256(%arg2), %sp
2026 /* Save previous stack pointer and return pointer in frame marker */
2027 STREG %rp, -144(%sp)
2028 /* Calls always use function descriptor */
2029 LDREG 16(%arg1), %arg1
2030 bve,l (%arg1), %rp
2031 STREG %r1, -136(%sp)
2032 LDREG -144(%sp), %rp
2033 bve (%rp)
2034 LDREG -136(%sp), %sp
2035# else
2036 /* Switch to new stack. We allocate two 64 byte frames. */
2037 ldo 128(%arg2), %sp
2038 /* Save previous stack pointer and return pointer in frame marker */
2039 STREG %r1, -68(%sp)
2040 STREG %rp, -84(%sp)
2041 /* Calls use function descriptor if PLABEL bit is set */
2042 bb,>=,n %arg1, 30, 1f
2043 depwi 0,31,2, %arg1
2044 LDREG 0(%arg1), %arg1
20451:
2046 be,l 0(%sr4,%arg1), %sr0, %r31
2047 copy %r31, %rp
2048 LDREG -84(%sp), %rp
2049 bv (%rp)
2050 LDREG -68(%sp), %sp
2051# endif /* CONFIG_64BIT */
2052ENDPROC(call_on_stack)
2053#endif /* CONFIG_IRQSTACKS */
2000 2054
2001get_register: 2055get_register:
2002 /* 2056 /*
diff --git a/arch/parisc/kernel/hpmc.S b/arch/parisc/kernel/hpmc.S
index 5595a2f31181..e158b6fbf1b4 100644
--- a/arch/parisc/kernel/hpmc.S
+++ b/arch/parisc/kernel/hpmc.S
@@ -55,13 +55,13 @@
55 * IODC requires 7K byte stack. That leaves 1K byte for os_hpmc. 55 * IODC requires 7K byte stack. That leaves 1K byte for os_hpmc.
56 */ 56 */
57 57
58 .align PAGE_SIZE 58 .align 4096
59hpmc_stack: 59hpmc_stack:
60 .block 16384 60 .block 16384
61 61
62#define HPMC_IODC_BUF_SIZE 0x8000 62#define HPMC_IODC_BUF_SIZE 0x8000
63 63
64 .align PAGE_SIZE 64 .align 4096
65hpmc_iodc_buf: 65hpmc_iodc_buf:
66 .block HPMC_IODC_BUF_SIZE 66 .block HPMC_IODC_BUF_SIZE
67 67
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 8094d3ed3b64..e255db0bb761 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -152,6 +152,39 @@ static struct irq_chip cpu_interrupt_type = {
152 .irq_retrigger = NULL, 152 .irq_retrigger = NULL,
153}; 153};
154 154
155DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
156#define irq_stats(x) (&per_cpu(irq_stat, x))
157
158/*
159 * /proc/interrupts printing for arch specific interrupts
160 */
161int arch_show_interrupts(struct seq_file *p, int prec)
162{
163 int j;
164
165#ifdef CONFIG_DEBUG_STACKOVERFLOW
166 seq_printf(p, "%*s: ", prec, "STK");
167 for_each_online_cpu(j)
168 seq_printf(p, "%10u ", irq_stats(j)->kernel_stack_usage);
169 seq_printf(p, " Kernel stack usage\n");
170#endif
171#ifdef CONFIG_SMP
172 seq_printf(p, "%*s: ", prec, "RES");
173 for_each_online_cpu(j)
174 seq_printf(p, "%10u ", irq_stats(j)->irq_resched_count);
175 seq_printf(p, " Rescheduling interrupts\n");
176 seq_printf(p, "%*s: ", prec, "CAL");
177 for_each_online_cpu(j)
178 seq_printf(p, "%10u ", irq_stats(j)->irq_call_count);
179 seq_printf(p, " Function call interrupts\n");
180#endif
181 seq_printf(p, "%*s: ", prec, "TLB");
182 for_each_online_cpu(j)
183 seq_printf(p, "%10u ", irq_stats(j)->irq_tlb_count);
184 seq_printf(p, " TLB shootdowns\n");
185 return 0;
186}
187
155int show_interrupts(struct seq_file *p, void *v) 188int show_interrupts(struct seq_file *p, void *v)
156{ 189{
157 int i = *(loff_t *) v, j; 190 int i = *(loff_t *) v, j;
@@ -219,6 +252,9 @@ int show_interrupts(struct seq_file *p, void *v)
219 raw_spin_unlock_irqrestore(&desc->lock, flags); 252 raw_spin_unlock_irqrestore(&desc->lock, flags);
220 } 253 }
221 254
255 if (i == NR_IRQS)
256 arch_show_interrupts(p, 3);
257
222 return 0; 258 return 0;
223} 259}
224 260
@@ -330,6 +366,66 @@ static inline int eirr_to_irq(unsigned long eirr)
330 return (BITS_PER_LONG - bit) + TIMER_IRQ; 366 return (BITS_PER_LONG - bit) + TIMER_IRQ;
331} 367}
332 368
369int sysctl_panic_on_stackoverflow = 1;
370
371static inline void stack_overflow_check(struct pt_regs *regs)
372{
373#ifdef CONFIG_DEBUG_STACKOVERFLOW
374 #define STACK_MARGIN (256*6)
375
376 /* Our stack starts directly behind the thread_info struct. */
377 unsigned long stack_start = (unsigned long) current_thread_info();
378 unsigned long sp = regs->gr[30];
379 unsigned long stack_usage;
380 unsigned int *last_usage;
381
382 /* if sr7 != 0, we interrupted a userspace process which we do not want
383 * to check for stack overflow. We will only check the kernel stack. */
384 if (regs->sr[7])
385 return;
386
387 /* calculate kernel stack usage */
388 stack_usage = sp - stack_start;
389 last_usage = &per_cpu(irq_stat.kernel_stack_usage, smp_processor_id());
390
391 if (unlikely(stack_usage > *last_usage))
392 *last_usage = stack_usage;
393
394 if (likely(stack_usage < (THREAD_SIZE - STACK_MARGIN)))
395 return;
396
397 pr_emerg("stackcheck: %s will most likely overflow kernel stack "
398 "(sp:%lx, stk bottom-top:%lx-%lx)\n",
399 current->comm, sp, stack_start, stack_start + THREAD_SIZE);
400
401 if (sysctl_panic_on_stackoverflow)
402 panic("low stack detected by irq handler - check messages\n");
403#endif
404}
405
406#ifdef CONFIG_IRQSTACKS
407DEFINE_PER_CPU(union irq_stack_union, irq_stack_union);
408
409static void execute_on_irq_stack(void *func, unsigned long param1)
410{
411 unsigned long *irq_stack_start;
412 unsigned long irq_stack;
413 int cpu = smp_processor_id();
414
415 irq_stack_start = &per_cpu(irq_stack_union, cpu).stack[0];
416 irq_stack = (unsigned long) irq_stack_start;
417 irq_stack = ALIGN(irq_stack, 16); /* align for stack frame usage */
418
419 BUG_ON(*irq_stack_start); /* report bug if we were called recursive. */
420 *irq_stack_start = 1;
421
422 /* This is where we switch to the IRQ stack. */
423 call_on_stack(param1, func, irq_stack);
424
425 *irq_stack_start = 0;
426}
427#endif /* CONFIG_IRQSTACKS */
428
333/* ONLY called from entry.S:intr_extint() */ 429/* ONLY called from entry.S:intr_extint() */
334void do_cpu_irq_mask(struct pt_regs *regs) 430void do_cpu_irq_mask(struct pt_regs *regs)
335{ 431{
@@ -364,7 +460,13 @@ void do_cpu_irq_mask(struct pt_regs *regs)
364 goto set_out; 460 goto set_out;
365 } 461 }
366#endif 462#endif
463 stack_overflow_check(regs);
464
465#ifdef CONFIG_IRQSTACKS
466 execute_on_irq_stack(&generic_handle_irq, irq);
467#else
367 generic_handle_irq(irq); 468 generic_handle_irq(irq);
469#endif /* CONFIG_IRQSTACKS */
368 470
369 out: 471 out:
370 irq_exit(); 472 irq_exit();
@@ -420,6 +522,4 @@ void __init init_IRQ(void)
420 cpu_eiem = EIEM_MASK(TIMER_IRQ); 522 cpu_eiem = EIEM_MASK(TIMER_IRQ);
421#endif 523#endif
422 set_eiem(cpu_eiem); /* EIEM : enable all external intr */ 524 set_eiem(cpu_eiem); /* EIEM : enable all external intr */
423
424} 525}
425
diff --git a/arch/parisc/kernel/pacache.S b/arch/parisc/kernel/pacache.S
index 312b48422a56..5e1de6072be5 100644
--- a/arch/parisc/kernel/pacache.S
+++ b/arch/parisc/kernel/pacache.S
@@ -563,6 +563,15 @@ ENDPROC(copy_page_asm)
563 * %r23 physical page (shifted for tlb insert) of "from" translation 563 * %r23 physical page (shifted for tlb insert) of "from" translation
564 */ 564 */
565 565
566 /* Drop prot bits and convert to page addr for iitlbt and idtlbt */
567 #define PAGE_ADD_SHIFT (PAGE_SHIFT-12)
568 .macro convert_phys_for_tlb_insert20 phys
569 extrd,u \phys, 56-PAGE_ADD_SHIFT, 32-PAGE_ADD_SHIFT, \phys
570#if _PAGE_SIZE_ENCODING_DEFAULT
571 depdi _PAGE_SIZE_ENCODING_DEFAULT, 63, (63-58), \phys
572#endif
573 .endm
574
566 /* 575 /*
567 * We can't do this since copy_user_page is used to bring in 576 * We can't do this since copy_user_page is used to bring in
568 * file data that might have instructions. Since the data would 577 * file data that might have instructions. Since the data would
@@ -589,15 +598,14 @@ ENTRY(copy_user_page_asm)
589 sub %r25, %r1, %r23 598 sub %r25, %r1, %r23
590 599
591 ldil L%(TMPALIAS_MAP_START), %r28 600 ldil L%(TMPALIAS_MAP_START), %r28
592 /* FIXME for different page sizes != 4k */
593#ifdef CONFIG_64BIT 601#ifdef CONFIG_64BIT
594#if (TMPALIAS_MAP_START >= 0x80000000) 602#if (TMPALIAS_MAP_START >= 0x80000000)
595 depdi 0, 31,32, %r28 /* clear any sign extension */ 603 depdi 0, 31,32, %r28 /* clear any sign extension */
596#endif 604#endif
597 extrd,u %r26,56,32, %r26 /* convert phys addr to tlb insert format */ 605 convert_phys_for_tlb_insert20 %r26 /* convert phys addr to tlb insert format */
598 extrd,u %r23,56,32, %r23 /* convert phys addr to tlb insert format */ 606 convert_phys_for_tlb_insert20 %r23 /* convert phys addr to tlb insert format */
599 depd %r24,63,22, %r28 /* Form aliased virtual address 'to' */ 607 depd %r24,63,22, %r28 /* Form aliased virtual address 'to' */
600 depdi 0, 63,12, %r28 /* Clear any offset bits */ 608 depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */
601 copy %r28, %r29 609 copy %r28, %r29
602 depdi 1, 41,1, %r29 /* Form aliased virtual address 'from' */ 610 depdi 1, 41,1, %r29 /* Form aliased virtual address 'from' */
603#else 611#else
@@ -747,11 +755,10 @@ ENTRY(clear_user_page_asm)
747#ifdef CONFIG_64BIT 755#ifdef CONFIG_64BIT
748#if (TMPALIAS_MAP_START >= 0x80000000) 756#if (TMPALIAS_MAP_START >= 0x80000000)
749 depdi 0, 31,32, %r28 /* clear any sign extension */ 757 depdi 0, 31,32, %r28 /* clear any sign extension */
750 /* FIXME: page size dependend */
751#endif 758#endif
752 extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ 759 convert_phys_for_tlb_insert20 %r26 /* convert phys addr to tlb insert format */
753 depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ 760 depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */
754 depdi 0, 63,12, %r28 /* Clear any offset bits */ 761 depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */
755#else 762#else
756 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ 763 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */
757 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ 764 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */
@@ -832,11 +839,10 @@ ENTRY(flush_dcache_page_asm)
832#ifdef CONFIG_64BIT 839#ifdef CONFIG_64BIT
833#if (TMPALIAS_MAP_START >= 0x80000000) 840#if (TMPALIAS_MAP_START >= 0x80000000)
834 depdi 0, 31,32, %r28 /* clear any sign extension */ 841 depdi 0, 31,32, %r28 /* clear any sign extension */
835 /* FIXME: page size dependend */
836#endif 842#endif
837 extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ 843 convert_phys_for_tlb_insert20 %r26 /* convert phys addr to tlb insert format */
838 depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ 844 depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */
839 depdi 0, 63,12, %r28 /* Clear any offset bits */ 845 depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */
840#else 846#else
841 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ 847 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */
842 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ 848 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */
@@ -909,11 +915,10 @@ ENTRY(flush_icache_page_asm)
909#ifdef CONFIG_64BIT 915#ifdef CONFIG_64BIT
910#if (TMPALIAS_MAP_START >= 0x80000000) 916#if (TMPALIAS_MAP_START >= 0x80000000)
911 depdi 0, 31,32, %r28 /* clear any sign extension */ 917 depdi 0, 31,32, %r28 /* clear any sign extension */
912 /* FIXME: page size dependend */
913#endif 918#endif
914 extrd,u %r26, 56,32, %r26 /* convert phys addr to tlb insert format */ 919 convert_phys_for_tlb_insert20 %r26 /* convert phys addr to tlb insert format */
915 depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */ 920 depd %r25, 63,22, %r28 /* Form aliased virtual address 'to' */
916 depdi 0, 63,12, %r28 /* Clear any offset bits */ 921 depdi 0, 63,PAGE_SHIFT, %r28 /* Clear any offset bits */
917#else 922#else
918 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */ 923 extrw,u %r26, 24,25, %r26 /* convert phys addr to tlb insert format */
919 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */ 924 depw %r25, 31,22, %r28 /* Form aliased virtual address 'to' */
@@ -959,7 +964,7 @@ ENTRY(flush_icache_page_asm)
959 fic,m %r1(%sr4,%r28) 964 fic,m %r1(%sr4,%r28)
960 fic,m %r1(%sr4,%r28) 965 fic,m %r1(%sr4,%r28)
961 fic,m %r1(%sr4,%r28) 966 fic,m %r1(%sr4,%r28)
962 cmpb,COND(<<) %r28, %r25,1b 967 cmpb,COND(<<) %r28, %r25,1b
963 fic,m %r1(%sr4,%r28) 968 fic,m %r1(%sr4,%r28)
964 969
965 sync 970 sync
diff --git a/arch/parisc/kernel/setup.c b/arch/parisc/kernel/setup.c
index a3328c2616b0..76b63e726a53 100644
--- a/arch/parisc/kernel/setup.c
+++ b/arch/parisc/kernel/setup.c
@@ -129,6 +129,8 @@ void __init setup_arch(char **cmdline_p)
129 printk(KERN_INFO "The 32-bit Kernel has started...\n"); 129 printk(KERN_INFO "The 32-bit Kernel has started...\n");
130#endif 130#endif
131 131
132 printk(KERN_INFO "Default page size is %dKB.\n", (int)(PAGE_SIZE / 1024));
133
132 pdc_console_init(); 134 pdc_console_init();
133 135
134#ifdef CONFIG_64BIT 136#ifdef CONFIG_64BIT
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index fd1bb1519c2b..e3614fb343e5 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -127,7 +127,7 @@ ipi_interrupt(int irq, void *dev_id)
127 unsigned long flags; 127 unsigned long flags;
128 128
129 /* Count this now; we may make a call that never returns. */ 129 /* Count this now; we may make a call that never returns. */
130 p->ipi_count++; 130 inc_irq_stat(irq_call_count);
131 131
132 mb(); /* Order interrupt and bit testing. */ 132 mb(); /* Order interrupt and bit testing. */
133 133
@@ -155,6 +155,7 @@ ipi_interrupt(int irq, void *dev_id)
155 155
156 case IPI_RESCHEDULE: 156 case IPI_RESCHEDULE:
157 smp_debug(100, KERN_DEBUG "CPU%d IPI_RESCHEDULE\n", this_cpu); 157 smp_debug(100, KERN_DEBUG "CPU%d IPI_RESCHEDULE\n", this_cpu);
158 inc_irq_stat(irq_resched_count);
158 scheduler_ipi(); 159 scheduler_ipi();
159 break; 160 break;
160 161
@@ -263,17 +264,6 @@ void arch_send_call_function_single_ipi(int cpu)
263} 264}
264 265
265/* 266/*
266 * Flush all other CPU's tlb and then mine. Do this with on_each_cpu()
267 * as we want to ensure all TLB's flushed before proceeding.
268 */
269
270void
271smp_flush_tlb_all(void)
272{
273 on_each_cpu(flush_tlb_all_local, NULL, 1);
274}
275
276/*
277 * Called by secondaries to update state and initialize CPU registers. 267 * Called by secondaries to update state and initialize CPU registers.
278 */ 268 */
279static void __init 269static void __init
diff --git a/arch/parisc/kernel/syscall.S b/arch/parisc/kernel/syscall.S
index 5e055240f00b..e767ab733e32 100644
--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -1,12 +1,35 @@
1/* 1/*
2 * Linux/PA-RISC Project (http://www.parisc-linux.org/) 2 * Linux/PA-RISC Project (http://www.parisc-linux.org/)
3 * 3 *
4 * System call entry code Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai> 4 * System call entry code / Linux gateway page
5 * Copyright (c) Matthew Wilcox 1999 <willy@bofh.ai>
5 * Licensed under the GNU GPL. 6 * Licensed under the GNU GPL.
6 * thanks to Philipp Rumpf, Mike Shaver and various others 7 * thanks to Philipp Rumpf, Mike Shaver and various others
7 * sorry about the wall, puffin.. 8 * sorry about the wall, puffin..
8 */ 9 */
9 10
11/*
12How does the Linux gateway page on PA-RISC work?
13------------------------------------------------
14The Linux gateway page on PA-RISC is "special".
15It actually has PAGE_GATEWAY bits set (this is linux terminology; in parisc
16terminology it's Execute, promote to PL0) in the page map. So anything
17executing on this page executes with kernel level privilege (there's more to it
18than that: to have this happen, you also have to use a branch with a ,gate
19completer to activate the privilege promotion). The upshot is that everything
20that runs on the gateway page runs at kernel privilege but with the current
21user process address space (although you have access to kernel space via %sr2).
22For the 0x100 syscall entry, we redo the space registers to point to the kernel
23address space (preserving the user address space in %sr3), move to wide mode if
24required, save the user registers and branch into the kernel syscall entry
25point. For all the other functions, we execute at kernel privilege but don't
26flip address spaces. The basic upshot of this is that these code snippets are
27executed atomically (because the kernel can't be pre-empted) and they may
28perform architecturally forbidden (to PL3) operations (like setting control
29registers).
30*/
31
32
10#include <asm/asm-offsets.h> 33#include <asm/asm-offsets.h>
11#include <asm/unistd.h> 34#include <asm/unistd.h>
12#include <asm/errno.h> 35#include <asm/errno.h>
@@ -15,6 +38,7 @@
15#include <asm/thread_info.h> 38#include <asm/thread_info.h>
16#include <asm/assembly.h> 39#include <asm/assembly.h>
17#include <asm/processor.h> 40#include <asm/processor.h>
41#include <asm/cache.h>
18 42
19#include <linux/linkage.h> 43#include <linux/linkage.h>
20 44
@@ -643,7 +667,7 @@ ENTRY(end_linux_gateway_page)
643 667
644 .section .rodata,"a" 668 .section .rodata,"a"
645 669
646 .align PAGE_SIZE 670 .align 8
647 /* Light-weight-syscall table */ 671 /* Light-weight-syscall table */
648 /* Start of lws table. */ 672 /* Start of lws table. */
649ENTRY(lws_table) 673ENTRY(lws_table)
@@ -652,13 +676,13 @@ ENTRY(lws_table)
652END(lws_table) 676END(lws_table)
653 /* End of lws table */ 677 /* End of lws table */
654 678
655 .align PAGE_SIZE 679 .align 8
656ENTRY(sys_call_table) 680ENTRY(sys_call_table)
657#include "syscall_table.S" 681#include "syscall_table.S"
658END(sys_call_table) 682END(sys_call_table)
659 683
660#ifdef CONFIG_64BIT 684#ifdef CONFIG_64BIT
661 .align PAGE_SIZE 685 .align 8
662ENTRY(sys_call_table64) 686ENTRY(sys_call_table64)
663#define SYSCALL_TABLE_64BIT 687#define SYSCALL_TABLE_64BIT
664#include "syscall_table.S" 688#include "syscall_table.S"
@@ -674,7 +698,7 @@ END(sys_call_table64)
674 with ldcw. 698 with ldcw.
675 */ 699 */
676 .section .data 700 .section .data
677 .align PAGE_SIZE 701 .align L1_CACHE_BYTES
678ENTRY(lws_lock_start) 702ENTRY(lws_lock_start)
679 /* lws locks */ 703 /* lws locks */
680 .rept 16 704 .rept 16
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index f702bff0bed9..fe41a98043bb 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -522,10 +522,10 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
522 */ 522 */
523 if (((unsigned long)regs->iaoq[0] & 3) && 523 if (((unsigned long)regs->iaoq[0] & 3) &&
524 ((unsigned long)regs->iasq[0] != (unsigned long)regs->sr[7])) { 524 ((unsigned long)regs->iasq[0] != (unsigned long)regs->sr[7])) {
525 /* Kill the user process later */ 525 /* Kill the user process later */
526 regs->iaoq[0] = 0 | 3; 526 regs->iaoq[0] = 0 | 3;
527 regs->iaoq[1] = regs->iaoq[0] + 4; 527 regs->iaoq[1] = regs->iaoq[0] + 4;
528 regs->iasq[0] = regs->iasq[1] = regs->sr[7]; 528 regs->iasq[0] = regs->iasq[1] = regs->sr[7];
529 regs->gr[0] &= ~PSW_B; 529 regs->gr[0] &= ~PSW_B;
530 return; 530 return;
531 } 531 }
@@ -541,8 +541,8 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
541 541
542 /* set up a new led state on systems shipped with a LED State panel */ 542 /* set up a new led state on systems shipped with a LED State panel */
543 pdc_chassis_send_status(PDC_CHASSIS_DIRECT_HPMC); 543 pdc_chassis_send_status(PDC_CHASSIS_DIRECT_HPMC);
544 544
545 parisc_terminate("High Priority Machine Check (HPMC)", 545 parisc_terminate("High Priority Machine Check (HPMC)",
546 regs, code, 0); 546 regs, code, 0);
547 /* NOT REACHED */ 547 /* NOT REACHED */
548 548
@@ -584,13 +584,13 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
584 /* Break instruction trap */ 584 /* Break instruction trap */
585 handle_break(regs); 585 handle_break(regs);
586 return; 586 return;
587 587
588 case 10: 588 case 10:
589 /* Privileged operation trap */ 589 /* Privileged operation trap */
590 die_if_kernel("Privileged operation", regs, code); 590 die_if_kernel("Privileged operation", regs, code);
591 si.si_code = ILL_PRVOPC; 591 si.si_code = ILL_PRVOPC;
592 goto give_sigill; 592 goto give_sigill;
593 593
594 case 11: 594 case 11:
595 /* Privileged register trap */ 595 /* Privileged register trap */
596 if ((regs->iir & 0xffdfffe0) == 0x034008a0) { 596 if ((regs->iir & 0xffdfffe0) == 0x034008a0) {
@@ -634,7 +634,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
634 if(user_mode(regs)){ 634 if(user_mode(regs)){
635 si.si_signo = SIGFPE; 635 si.si_signo = SIGFPE;
636 /* Set to zero, and let the userspace app figure it out from 636 /* Set to zero, and let the userspace app figure it out from
637 the insn pointed to by si_addr */ 637 the insn pointed to by si_addr */
638 si.si_code = 0; 638 si.si_code = 0;
639 si.si_addr = (void __user *) regs->iaoq[0]; 639 si.si_addr = (void __user *) regs->iaoq[0];
640 force_sig_info(SIGFPE, &si, current); 640 force_sig_info(SIGFPE, &si, current);
@@ -648,7 +648,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
648 die_if_kernel("Floating point exception", regs, 0); /* quiet */ 648 die_if_kernel("Floating point exception", regs, 0); /* quiet */
649 handle_fpe(regs); 649 handle_fpe(regs);
650 return; 650 return;
651 651
652 case 15: 652 case 15:
653 /* Data TLB miss fault/Data page fault */ 653 /* Data TLB miss fault/Data page fault */
654 /* Fall through */ 654 /* Fall through */
@@ -660,15 +660,15 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
660 case 17: 660 case 17:
661 /* Non-access data TLB miss fault/Non-access data page fault */ 661 /* Non-access data TLB miss fault/Non-access data page fault */
662 /* FIXME: 662 /* FIXME:
663 Still need to add slow path emulation code here! 663 Still need to add slow path emulation code here!
664 If the insn used a non-shadow register, then the tlb 664 If the insn used a non-shadow register, then the tlb
665 handlers could not have their side-effect (e.g. probe 665 handlers could not have their side-effect (e.g. probe
666 writing to a target register) emulated since rfir would 666 writing to a target register) emulated since rfir would
667 erase the changes to said register. Instead we have to 667 erase the changes to said register. Instead we have to
668 setup everything, call this function we are in, and emulate 668 setup everything, call this function we are in, and emulate
669 by hand. Technically we need to emulate: 669 by hand. Technically we need to emulate:
670 fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw 670 fdc,fdce,pdc,"fic,4f",prober,probeir,probew, probeiw
671 */ 671 */
672 fault_address = regs->ior; 672 fault_address = regs->ior;
673 fault_space = regs->isr; 673 fault_space = regs->isr;
674 break; 674 break;
diff --git a/arch/parisc/kernel/vmlinux.lds.S b/arch/parisc/kernel/vmlinux.lds.S
index 64a999882e4f..4bb095a2f6fc 100644
--- a/arch/parisc/kernel/vmlinux.lds.S
+++ b/arch/parisc/kernel/vmlinux.lds.S
@@ -95,7 +95,7 @@ SECTIONS
95 NOTES 95 NOTES
96 96
97 /* Data */ 97 /* Data */
98 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, THREAD_SIZE) 98 RW_DATA_SECTION(L1_CACHE_BYTES, PAGE_SIZE, PAGE_SIZE)
99 99
100 /* PA-RISC locks requires 16-byte alignment */ 100 /* PA-RISC locks requires 16-byte alignment */
101 . = ALIGN(16); 101 . = ALIGN(16);
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 157b931e7b09..ce939ac8622b 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -1069,6 +1069,7 @@ void flush_tlb_all(void)
1069{ 1069{
1070 int do_recycle; 1070 int do_recycle;
1071 1071
1072 inc_irq_stat(irq_tlb_count);
1072 do_recycle = 0; 1073 do_recycle = 0;
1073 spin_lock(&sid_lock); 1074 spin_lock(&sid_lock);
1074 if (dirty_space_ids > RECYCLE_THRESHOLD) { 1075 if (dirty_space_ids > RECYCLE_THRESHOLD) {
@@ -1089,6 +1090,7 @@ void flush_tlb_all(void)
1089#else 1090#else
1090void flush_tlb_all(void) 1091void flush_tlb_all(void)
1091{ 1092{
1093 inc_irq_stat(irq_tlb_count);
1092 spin_lock(&sid_lock); 1094 spin_lock(&sid_lock);
1093 flush_tlb_all_local(NULL); 1095 flush_tlb_all_local(NULL);
1094 recycle_sids(); 1096 recycle_sids();
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index bbbe02197afb..c33e3ad2c8fd 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -82,11 +82,6 @@ config GENERIC_HWEIGHT
82 bool 82 bool
83 default y 83 default y
84 84
85config GENERIC_GPIO
86 bool
87 help
88 Generic GPIO API support
89
90config PPC 85config PPC
91 bool 86 bool
92 default y 87 default y
diff --git a/arch/powerpc/platforms/40x/Kconfig b/arch/powerpc/platforms/40x/Kconfig
index bd40bbb15e14..6e287f1294fa 100644
--- a/arch/powerpc/platforms/40x/Kconfig
+++ b/arch/powerpc/platforms/40x/Kconfig
@@ -138,7 +138,6 @@ config PPC4xx_GPIO
138 bool "PPC4xx GPIO support" 138 bool "PPC4xx GPIO support"
139 depends on 40x 139 depends on 40x
140 select ARCH_REQUIRE_GPIOLIB 140 select ARCH_REQUIRE_GPIOLIB
141 select GENERIC_GPIO
142 help 141 help
143 Enable gpiolib support for ppc40x based boards 142 Enable gpiolib support for ppc40x based boards
144 143
diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
index 7be93367d92f..d6c7506ec7d9 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -248,7 +248,6 @@ config PPC4xx_GPIO
248 bool "PPC4xx GPIO support" 248 bool "PPC4xx GPIO support"
249 depends on 44x 249 depends on 44x
250 select ARCH_REQUIRE_GPIOLIB 250 select ARCH_REQUIRE_GPIOLIB
251 select GENERIC_GPIO
252 help 251 help
253 Enable gpiolib support for ppc440 based boards 252 Enable gpiolib support for ppc440 based boards
254 253
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig
index 8f02b05f4c96..efdd37c775ad 100644
--- a/arch/powerpc/platforms/85xx/Kconfig
+++ b/arch/powerpc/platforms/85xx/Kconfig
@@ -203,7 +203,6 @@ config GE_IMP3A
203 select DEFAULT_UIMAGE 203 select DEFAULT_UIMAGE
204 select SWIOTLB 204 select SWIOTLB
205 select MMIO_NVRAM 205 select MMIO_NVRAM
206 select GENERIC_GPIO
207 select ARCH_REQUIRE_GPIOLIB 206 select ARCH_REQUIRE_GPIOLIB
208 select GE_FPGA 207 select GE_FPGA
209 help 208 help
@@ -328,7 +327,7 @@ config B4_QDS
328 select PPC_E500MC 327 select PPC_E500MC
329 select PHYS_64BIT 328 select PHYS_64BIT
330 select SWIOTLB 329 select SWIOTLB
331 select GENERIC_GPIO 330 select GPIOLIB
332 select ARCH_REQUIRE_GPIOLIB 331 select ARCH_REQUIRE_GPIOLIB
333 select HAS_RAPIDIO 332 select HAS_RAPIDIO
334 select PPC_EPAPR_HV_PIC 333 select PPC_EPAPR_HV_PIC
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig
index 7a6279e38213..1afd1e4a2dd2 100644
--- a/arch/powerpc/platforms/86xx/Kconfig
+++ b/arch/powerpc/platforms/86xx/Kconfig
@@ -37,7 +37,6 @@ config GEF_PPC9A
37 bool "GE PPC9A" 37 bool "GE PPC9A"
38 select DEFAULT_UIMAGE 38 select DEFAULT_UIMAGE
39 select MMIO_NVRAM 39 select MMIO_NVRAM
40 select GENERIC_GPIO
41 select ARCH_REQUIRE_GPIOLIB 40 select ARCH_REQUIRE_GPIOLIB
42 select GE_FPGA 41 select GE_FPGA
43 help 42 help
@@ -47,7 +46,6 @@ config GEF_SBC310
47 bool "GE SBC310" 46 bool "GE SBC310"
48 select DEFAULT_UIMAGE 47 select DEFAULT_UIMAGE
49 select MMIO_NVRAM 48 select MMIO_NVRAM
50 select GENERIC_GPIO
51 select ARCH_REQUIRE_GPIOLIB 49 select ARCH_REQUIRE_GPIOLIB
52 select GE_FPGA 50 select GE_FPGA
53 help 51 help
@@ -57,7 +55,6 @@ config GEF_SBC610
57 bool "GE SBC610" 55 bool "GE SBC610"
58 select DEFAULT_UIMAGE 56 select DEFAULT_UIMAGE
59 select MMIO_NVRAM 57 select MMIO_NVRAM
60 select GENERIC_GPIO
61 select ARCH_REQUIRE_GPIOLIB 58 select ARCH_REQUIRE_GPIOLIB
62 select GE_FPGA 59 select GE_FPGA
63 select HAS_RAPIDIO 60 select HAS_RAPIDIO
diff --git a/arch/powerpc/platforms/8xx/Kconfig b/arch/powerpc/platforms/8xx/Kconfig
index 1fb0b3cddeb3..8dec3c0911ad 100644
--- a/arch/powerpc/platforms/8xx/Kconfig
+++ b/arch/powerpc/platforms/8xx/Kconfig
@@ -114,7 +114,6 @@ config 8xx_COPYBACK
114 114
115config 8xx_GPIO 115config 8xx_GPIO
116 bool "GPIO API Support" 116 bool "GPIO API Support"
117 select GENERIC_GPIO
118 select ARCH_REQUIRE_GPIOLIB 117 select ARCH_REQUIRE_GPIOLIB
119 help 118 help
120 Saying Y here will cause the ports on an MPC8xx processor to be used 119 Saying Y here will cause the ports on an MPC8xx processor to be used
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig
index 34d224be93ba..a881232a3cce 100644
--- a/arch/powerpc/platforms/Kconfig
+++ b/arch/powerpc/platforms/Kconfig
@@ -302,7 +302,6 @@ config QUICC_ENGINE
302config QE_GPIO 302config QE_GPIO
303 bool "QE GPIO support" 303 bool "QE GPIO support"
304 depends on QUICC_ENGINE 304 depends on QUICC_ENGINE
305 select GENERIC_GPIO
306 select ARCH_REQUIRE_GPIOLIB 305 select ARCH_REQUIRE_GPIOLIB
307 help 306 help
308 Say Y here if you're going to use hardware that connects to the 307 Say Y here if you're going to use hardware that connects to the
@@ -315,7 +314,6 @@ config CPM2
315 select PPC_LIB_RHEAP 314 select PPC_LIB_RHEAP
316 select PPC_PCI_CHOICE 315 select PPC_PCI_CHOICE
317 select ARCH_REQUIRE_GPIOLIB 316 select ARCH_REQUIRE_GPIOLIB
318 select GENERIC_GPIO
319 help 317 help
320 The CPM2 (Communications Processor Module) is a coprocessor on 318 The CPM2 (Communications Processor Module) is a coprocessor on
321 embedded CPUs made by Freescale. Selecting this option means that 319 embedded CPUs made by Freescale. Selecting this option means that
@@ -353,7 +351,6 @@ config OF_RTC
353config SIMPLE_GPIO 351config SIMPLE_GPIO
354 bool "Support for simple, memory-mapped GPIO controllers" 352 bool "Support for simple, memory-mapped GPIO controllers"
355 depends on PPC 353 depends on PPC
356 select GENERIC_GPIO
357 select ARCH_REQUIRE_GPIOLIB 354 select ARCH_REQUIRE_GPIOLIB
358 help 355 help
359 Say Y here to support simple, memory-mapped GPIO controllers. 356 Say Y here to support simple, memory-mapped GPIO controllers.
@@ -364,7 +361,6 @@ config SIMPLE_GPIO
364config MCU_MPC8349EMITX 361config MCU_MPC8349EMITX
365 bool "MPC8349E-mITX MCU driver" 362 bool "MPC8349E-mITX MCU driver"
366 depends on I2C=y && PPC_83xx 363 depends on I2C=y && PPC_83xx
367 select GENERIC_GPIO
368 select ARCH_REQUIRE_GPIOLIB 364 select ARCH_REQUIRE_GPIOLIB
369 help 365 help
370 Say Y here to enable soft power-off functionality on the Freescale 366 Say Y here to enable soft power-off functionality on the Freescale
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 5f7d7ba2874c..7a539f4f5e30 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -21,6 +21,7 @@
21#include <linux/module.h> 21#include <linux/module.h>
22#include <linux/seq_file.h> 22#include <linux/seq_file.h>
23#include <linux/mount.h> 23#include <linux/mount.h>
24#include <linux/aio.h>
24#include <asm/ebcdic.h> 25#include <asm/ebcdic.h>
25#include "hypfs.h" 26#include "hypfs.h"
26 27
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 78d8ace57272..8c868cf2cf93 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -93,9 +93,6 @@ config GENERIC_CSUM
93config GENERIC_HWEIGHT 93config GENERIC_HWEIGHT
94 def_bool y 94 def_bool y
95 95
96config GENERIC_GPIO
97 def_bool n
98
99config GENERIC_CALIBRATE_DELAY 96config GENERIC_CALIBRATE_DELAY
100 bool 97 bool
101 98
diff --git a/arch/sh/boards/mach-sdk7786/Makefile b/arch/sh/boards/mach-sdk7786/Makefile
index 8ae56e9560ac..45d32e3590b9 100644
--- a/arch/sh/boards/mach-sdk7786/Makefile
+++ b/arch/sh/boards/mach-sdk7786/Makefile
@@ -1,4 +1,4 @@
1obj-y := fpga.o irq.o nmi.o setup.o 1obj-y := fpga.o irq.o nmi.o setup.o
2 2
3obj-$(CONFIG_GENERIC_GPIO) += gpio.o 3obj-$(CONFIG_GPIOLIB) += gpio.o
4obj-$(CONFIG_HAVE_SRAM_POOL) += sram.o 4obj-$(CONFIG_HAVE_SRAM_POOL) += sram.o
diff --git a/arch/sh/boards/mach-x3proto/Makefile b/arch/sh/boards/mach-x3proto/Makefile
index 708c21c919ff..0cbe3d02dea3 100644
--- a/arch/sh/boards/mach-x3proto/Makefile
+++ b/arch/sh/boards/mach-x3proto/Makefile
@@ -1,3 +1,3 @@
1obj-y += setup.o ilsel.o 1obj-y += setup.o ilsel.o
2 2
3obj-$(CONFIG_GENERIC_GPIO) += gpio.o 3obj-$(CONFIG_GPIOLIB) += gpio.o
diff --git a/arch/sh/kernel/cpu/sh2a/Makefile b/arch/sh/kernel/cpu/sh2a/Makefile
index 7fdc102d0dd6..990195d98456 100644
--- a/arch/sh/kernel/cpu/sh2a/Makefile
+++ b/arch/sh/kernel/cpu/sh2a/Makefile
@@ -21,4 +21,4 @@ pinmux-$(CONFIG_CPU_SUBTYPE_SH7203) := pinmux-sh7203.o
21pinmux-$(CONFIG_CPU_SUBTYPE_SH7264) := pinmux-sh7264.o 21pinmux-$(CONFIG_CPU_SUBTYPE_SH7264) := pinmux-sh7264.o
22pinmux-$(CONFIG_CPU_SUBTYPE_SH7269) := pinmux-sh7269.o 22pinmux-$(CONFIG_CPU_SUBTYPE_SH7269) := pinmux-sh7269.o
23 23
24obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y) 24obj-$(CONFIG_GPIOLIB) += $(pinmux-y)
diff --git a/arch/sh/kernel/cpu/sh3/Makefile b/arch/sh/kernel/cpu/sh3/Makefile
index 6f13f33a35ff..d3634ae7b71a 100644
--- a/arch/sh/kernel/cpu/sh3/Makefile
+++ b/arch/sh/kernel/cpu/sh3/Makefile
@@ -30,4 +30,4 @@ clock-$(CONFIG_CPU_SUBTYPE_SH7712) := clock-sh7712.o
30pinmux-$(CONFIG_CPU_SUBTYPE_SH7720) := pinmux-sh7720.o 30pinmux-$(CONFIG_CPU_SUBTYPE_SH7720) := pinmux-sh7720.o
31 31
32obj-y += $(clock-y) 32obj-y += $(clock-y)
33obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y) 33obj-$(CONFIG_GPIOLIB) += $(pinmux-y)
diff --git a/arch/sh/kernel/cpu/sh4a/Makefile b/arch/sh/kernel/cpu/sh4a/Makefile
index 8fc6ec2be2fa..0705df775208 100644
--- a/arch/sh/kernel/cpu/sh4a/Makefile
+++ b/arch/sh/kernel/cpu/sh4a/Makefile
@@ -47,6 +47,6 @@ pinmux-$(CONFIG_CPU_SUBTYPE_SHX3) := pinmux-shx3.o
47 47
48obj-y += $(clock-y) 48obj-y += $(clock-y)
49obj-$(CONFIG_SMP) += $(smp-y) 49obj-$(CONFIG_SMP) += $(smp-y)
50obj-$(CONFIG_GENERIC_GPIO) += $(pinmux-y) 50obj-$(CONFIG_GPIOLIB) += $(pinmux-y)
51obj-$(CONFIG_PERF_EVENTS) += perf_event.o 51obj-$(CONFIG_PERF_EVENTS) += perf_event.o
52obj-$(CONFIG_HAVE_HW_BREAKPOINT) += ubc.o 52obj-$(CONFIG_HAVE_HW_BREAKPOINT) += ubc.o
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig
index a639c0d07b8b..9ac9f1666339 100644
--- a/arch/sparc/Kconfig
+++ b/arch/sparc/Kconfig
@@ -137,11 +137,6 @@ config GENERIC_ISA_DMA
137 bool 137 bool
138 default y if SPARC32 138 default y if SPARC32
139 139
140config GENERIC_GPIO
141 bool
142 help
143 Generic GPIO API support
144
145config ARCH_SUPPORTS_DEBUG_PAGEALLOC 140config ARCH_SUPPORTS_DEBUG_PAGEALLOC
146 def_bool y if SPARC64 141 def_bool y if SPARC64
147 142
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c
index 9b40c9c12a0c..6cfc1b09ec25 100644
--- a/arch/sparc/kernel/leon_smp.c
+++ b/arch/sparc/kernel/leon_smp.c
@@ -253,24 +253,15 @@ void __init leon_smp_done(void)
253 253
254 /* Free unneeded trap tables */ 254 /* Free unneeded trap tables */
255 if (!cpu_present(1)) { 255 if (!cpu_present(1)) {
256 ClearPageReserved(virt_to_page(&trapbase_cpu1)); 256 free_reserved_page(virt_to_page(&trapbase_cpu1));
257 init_page_count(virt_to_page(&trapbase_cpu1));
258 free_page((unsigned long)&trapbase_cpu1);
259 totalram_pages++;
260 num_physpages++; 257 num_physpages++;
261 } 258 }
262 if (!cpu_present(2)) { 259 if (!cpu_present(2)) {
263 ClearPageReserved(virt_to_page(&trapbase_cpu2)); 260 free_reserved_page(virt_to_page(&trapbase_cpu2));
264 init_page_count(virt_to_page(&trapbase_cpu2));
265 free_page((unsigned long)&trapbase_cpu2);
266 totalram_pages++;
267 num_physpages++; 261 num_physpages++;
268 } 262 }
269 if (!cpu_present(3)) { 263 if (!cpu_present(3)) {
270 ClearPageReserved(virt_to_page(&trapbase_cpu3)); 264 free_reserved_page(virt_to_page(&trapbase_cpu3));
271 init_page_count(virt_to_page(&trapbase_cpu3));
272 free_page((unsigned long)&trapbase_cpu3);
273 totalram_pages++;
274 num_physpages++; 265 num_physpages++;
275 } 266 }
276 /* Ok, they are spinning and ready to go. */ 267 /* Ok, they are spinning and ready to go. */
diff --git a/arch/sparc/mm/init_32.c b/arch/sparc/mm/init_32.c
index 4490c397bb5b..af472cf7c69a 100644
--- a/arch/sparc/mm/init_32.c
+++ b/arch/sparc/mm/init_32.c
@@ -366,45 +366,14 @@ void __init mem_init(void)
366 366
367void free_initmem (void) 367void free_initmem (void)
368{ 368{
369 unsigned long addr; 369 num_physpages += free_initmem_default(POISON_FREE_INITMEM);
370 unsigned long freed;
371
372 addr = (unsigned long)(&__init_begin);
373 freed = (unsigned long)(&__init_end) - addr;
374 for (; addr < (unsigned long)(&__init_end); addr += PAGE_SIZE) {
375 struct page *p;
376
377 memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE);
378 p = virt_to_page(addr);
379
380 ClearPageReserved(p);
381 init_page_count(p);
382 __free_page(p);
383 totalram_pages++;
384 num_physpages++;
385 }
386 printk(KERN_INFO "Freeing unused kernel memory: %ldk freed\n",
387 freed >> 10);
388} 370}
389 371
390#ifdef CONFIG_BLK_DEV_INITRD 372#ifdef CONFIG_BLK_DEV_INITRD
391void free_initrd_mem(unsigned long start, unsigned long end) 373void free_initrd_mem(unsigned long start, unsigned long end)
392{ 374{
393 if (start < end) 375 num_physpages += free_reserved_area(start, end, POISON_FREE_INITMEM,
394 printk(KERN_INFO "Freeing initrd memory: %ldk freed\n", 376 "initrd");
395 (end - start) >> 10);
396 for (; start < end; start += PAGE_SIZE) {
397 struct page *p;
398
399 memset((void *)start, POISON_FREE_INITMEM, PAGE_SIZE);
400 p = virt_to_page(start);
401
402 ClearPageReserved(p);
403 init_page_count(p);
404 __free_page(p);
405 totalram_pages++;
406 num_physpages++;
407 }
408} 377}
409#endif 378#endif
410 379
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index cf72a8a5b3aa..a7171997adfd 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -2059,8 +2059,7 @@ void __init mem_init(void)
2059 /* We subtract one to account for the mem_map_zero page 2059 /* We subtract one to account for the mem_map_zero page
2060 * allocated below. 2060 * allocated below.
2061 */ 2061 */
2062 totalram_pages -= 1; 2062 num_physpages = totalram_pages - 1;
2063 num_physpages = totalram_pages;
2064 2063
2065 /* 2064 /*
2066 * Set up the zero page, mark it reserved, so that page count 2065 * Set up the zero page, mark it reserved, so that page count
@@ -2071,7 +2070,7 @@ void __init mem_init(void)
2071 prom_printf("paging_init: Cannot alloc zero page.\n"); 2070 prom_printf("paging_init: Cannot alloc zero page.\n");
2072 prom_halt(); 2071 prom_halt();
2073 } 2072 }
2074 SetPageReserved(mem_map_zero); 2073 mark_page_reserved(mem_map_zero);
2075 2074
2076 codepages = (((unsigned long) _etext) - ((unsigned long) _start)); 2075 codepages = (((unsigned long) _etext) - ((unsigned long) _start));
2077 codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT; 2076 codepages = PAGE_ALIGN(codepages) >> PAGE_SHIFT;
@@ -2111,37 +2110,22 @@ void free_initmem(void)
2111 initend = (unsigned long)(__init_end) & PAGE_MASK; 2110 initend = (unsigned long)(__init_end) & PAGE_MASK;
2112 for (; addr < initend; addr += PAGE_SIZE) { 2111 for (; addr < initend; addr += PAGE_SIZE) {
2113 unsigned long page; 2112 unsigned long page;
2114 struct page *p;
2115 2113
2116 page = (addr + 2114 page = (addr +
2117 ((unsigned long) __va(kern_base)) - 2115 ((unsigned long) __va(kern_base)) -
2118 ((unsigned long) KERNBASE)); 2116 ((unsigned long) KERNBASE));
2119 memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE); 2117 memset((void *)addr, POISON_FREE_INITMEM, PAGE_SIZE);
2120 2118
2121 if (do_free) { 2119 if (do_free)
2122 p = virt_to_page(page); 2120 free_reserved_page(virt_to_page(page));
2123
2124 ClearPageReserved(p);
2125 init_page_count(p);
2126 __free_page(p);
2127 totalram_pages++;
2128 }
2129 } 2121 }
2130} 2122}
2131 2123
2132#ifdef CONFIG_BLK_DEV_INITRD 2124#ifdef CONFIG_BLK_DEV_INITRD
2133void free_initrd_mem(unsigned long start, unsigned long end) 2125void free_initrd_mem(unsigned long start, unsigned long end)
2134{ 2126{
2135 if (start < end) 2127 num_physpages += free_reserved_area(start, end, POISON_FREE_INITMEM,
2136 printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10); 2128 "initrd");
2137 for (; start < end; start += PAGE_SIZE) {
2138 struct page *p = virt_to_page(start);
2139
2140 ClearPageReserved(p);
2141 init_page_count(p);
2142 __free_page(p);
2143 totalram_pages++;
2144 }
2145} 2129}
2146#endif 2130#endif
2147 2131
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 41bf72073ccc..879990cb66c6 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -87,7 +87,7 @@ static DEFINE_MUTEX(ubd_lock);
87static DEFINE_MUTEX(ubd_mutex); /* replaces BKL, might not be needed */ 87static DEFINE_MUTEX(ubd_mutex); /* replaces BKL, might not be needed */
88 88
89static int ubd_open(struct block_device *bdev, fmode_t mode); 89static int ubd_open(struct block_device *bdev, fmode_t mode);
90static int ubd_release(struct gendisk *disk, fmode_t mode); 90static void ubd_release(struct gendisk *disk, fmode_t mode);
91static int ubd_ioctl(struct block_device *bdev, fmode_t mode, 91static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
92 unsigned int cmd, unsigned long arg); 92 unsigned int cmd, unsigned long arg);
93static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); 93static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
@@ -1138,7 +1138,7 @@ out:
1138 return err; 1138 return err;
1139} 1139}
1140 1140
1141static int ubd_release(struct gendisk *disk, fmode_t mode) 1141static void ubd_release(struct gendisk *disk, fmode_t mode)
1142{ 1142{
1143 struct ubd *ubd_dev = disk->private_data; 1143 struct ubd *ubd_dev = disk->private_data;
1144 1144
@@ -1146,7 +1146,6 @@ static int ubd_release(struct gendisk *disk, fmode_t mode)
1146 if(--ubd_dev->count == 0) 1146 if(--ubd_dev->count == 0)
1147 ubd_close_dev(ubd_dev); 1147 ubd_close_dev(ubd_dev);
1148 mutex_unlock(&ubd_mutex); 1148 mutex_unlock(&ubd_mutex);
1149 return 0;
1150} 1149}
1151 1150
1152static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask, 1151static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask,
diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
index 2943e3acdf0c..41bcc0013442 100644
--- a/arch/unicore32/Kconfig
+++ b/arch/unicore32/Kconfig
@@ -23,9 +23,6 @@ config UNICORE32
23 designs licensed by PKUnity Ltd. 23 designs licensed by PKUnity Ltd.
24 Please see web page at <http://www.pkunity.com/>. 24 Please see web page at <http://www.pkunity.com/>.
25 25
26config GENERIC_GPIO
27 def_bool y
28
29config GENERIC_CSUM 26config GENERIC_CSUM
30 def_bool y 27 def_bool y
31 28
@@ -156,7 +153,7 @@ source "mm/Kconfig"
156 153
157config LEDS 154config LEDS
158 def_bool y 155 def_bool y
159 depends on GENERIC_GPIO 156 depends on GPIOLIB
160 157
161config ALIGNMENT_TRAP 158config ALIGNMENT_TRAP
162 def_bool y 159 def_bool y
@@ -219,7 +216,6 @@ if ARCH_PUV3
219config PUV3_GPIO 216config PUV3_GPIO
220 bool 217 bool
221 depends on !ARCH_FPGA 218 depends on !ARCH_FPGA
222 select GENERIC_GPIO
223 select GPIO_SYSFS 219 select GPIO_SYSFS
224 default y 220 default y
225 221
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5db2117ae288..6a154a91c7e7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -174,9 +174,6 @@ config GENERIC_BUG_RELATIVE_POINTERS
174config GENERIC_HWEIGHT 174config GENERIC_HWEIGHT
175 def_bool y 175 def_bool y
176 176
177config GENERIC_GPIO
178 bool
179
180config ARCH_MAY_HAVE_PC_FDC 177config ARCH_MAY_HAVE_PC_FDC
181 def_bool y 178 def_bool y
182 depends on ISA_DMA_API 179 depends on ISA_DMA_API
diff --git a/arch/x86/pci/mrst.c b/arch/x86/pci/mrst.c
index 6eb18c42a28a..0e0fabf17342 100644
--- a/arch/x86/pci/mrst.c
+++ b/arch/x86/pci/mrst.c
@@ -141,6 +141,11 @@ static int pci_device_update_fixed(struct pci_bus *bus, unsigned int devfn,
141 */ 141 */
142static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg) 142static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg)
143{ 143{
144 if (bus == 0 && (devfn == PCI_DEVFN(2, 0)
145 || devfn == PCI_DEVFN(0, 0)
146 || devfn == PCI_DEVFN(3, 0)))
147 return 1;
148
144 /* This is a workaround for A0 LNC bug where PCI status register does 149 /* This is a workaround for A0 LNC bug where PCI status register does
145 * not have new CAP bit set. can not be written by SW either. 150 * not have new CAP bit set. can not be written by SW either.
146 * 151 *
@@ -150,10 +155,7 @@ static bool type1_access_ok(unsigned int bus, unsigned int devfn, int reg)
150 */ 155 */
151 if (reg >= 0x100 || reg == PCI_STATUS || reg == PCI_HEADER_TYPE) 156 if (reg >= 0x100 || reg == PCI_STATUS || reg == PCI_HEADER_TYPE)
152 return 0; 157 return 0;
153 if (bus == 0 && (devfn == PCI_DEVFN(2, 0) 158
154 || devfn == PCI_DEVFN(0, 0)
155 || devfn == PCI_DEVFN(3, 0)))
156 return 1;
157 return 0; /* langwell on others */ 159 return 0; /* langwell on others */
158} 160}
159 161
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index b09de49dbec5..acdfc615cca2 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -33,9 +33,6 @@ config RWSEM_XCHGADD_ALGORITHM
33config GENERIC_HWEIGHT 33config GENERIC_HWEIGHT
34 def_bool y 34 def_bool y
35 35
36config GENERIC_GPIO
37 bool
38
39config ARCH_HAS_ILOG2_U32 36config ARCH_HAS_ILOG2_U32
40 def_bool n 37 def_bool n
41 38
diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig
index ddab37b24741..77c52f80187a 100644
--- a/arch/xtensa/configs/iss_defconfig
+++ b/arch/xtensa/configs/iss_defconfig
@@ -10,7 +10,6 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10CONFIG_GENERIC_FIND_NEXT_BIT=y 10CONFIG_GENERIC_FIND_NEXT_BIT=y
11CONFIG_GENERIC_HWEIGHT=y 11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_HARDIRQS=y 12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_GPIO=y
14# CONFIG_ARCH_HAS_ILOG2_U32 is not set 13# CONFIG_ARCH_HAS_ILOG2_U32 is not set
15# CONFIG_ARCH_HAS_ILOG2_U64 is not set 14# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_NO_IOPORT=y 15CONFIG_NO_IOPORT=y
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
index eaf1b8fc6556..4799c6a526b5 100644
--- a/arch/xtensa/configs/s6105_defconfig
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -10,7 +10,6 @@ CONFIG_RWSEM_XCHGADD_ALGORITHM=y
10CONFIG_GENERIC_FIND_NEXT_BIT=y 10CONFIG_GENERIC_FIND_NEXT_BIT=y
11CONFIG_GENERIC_HWEIGHT=y 11CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_HARDIRQS=y 12CONFIG_GENERIC_HARDIRQS=y
13CONFIG_GENERIC_GPIO=y
14# CONFIG_ARCH_HAS_ILOG2_U32 is not set 13# CONFIG_ARCH_HAS_ILOG2_U32 is not set
15# CONFIG_ARCH_HAS_ILOG2_U64 is not set 14# CONFIG_ARCH_HAS_ILOG2_U64 is not set
16CONFIG_NO_IOPORT=y 15CONFIG_NO_IOPORT=y
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c
index 88608cc11b8c..0345f43d34f3 100644
--- a/arch/xtensa/platforms/iss/simdisk.c
+++ b/arch/xtensa/platforms/iss/simdisk.c
@@ -139,13 +139,12 @@ static int simdisk_open(struct block_device *bdev, fmode_t mode)
139 return 0; 139 return 0;
140} 140}
141 141
142static int simdisk_release(struct gendisk *disk, fmode_t mode) 142static void simdisk_release(struct gendisk *disk, fmode_t mode)
143{ 143{
144 struct simdisk *dev = disk->private_data; 144 struct simdisk *dev = disk->private_data;
145 spin_lock(&dev->lock); 145 spin_lock(&dev->lock);
146 --dev->users; 146 --dev->users;
147 spin_unlock(&dev->lock); 147 spin_unlock(&dev->lock);
148 return 0;
149} 148}
150 149
151static const struct block_device_operations simdisk_ops = { 150static const struct block_device_operations simdisk_ops = {