Merge 3.11-rc6 into char-misc-next

We want these fixes in this tree.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2013-08-18 20:40:33 -07:00
commit 5bc0b123dc
711 changed files with 7294 additions and 4133 deletions

1
.gitignore vendored
View file

@ -29,6 +29,7 @@ modules.builtin
*.bz2 *.bz2
*.lzma *.lzma
*.xz *.xz
*.lz4
*.lzo *.lzo
*.patch *.patch
*.gcno *.gcno

View file

@ -84,7 +84,7 @@ X!Iinclude/linux/kobject.h
<sect1><title>Kernel utility functions</title> <sect1><title>Kernel utility functions</title>
!Iinclude/linux/kernel.h !Iinclude/linux/kernel.h
!Ekernel/printk.c !Ekernel/printk/printk.c
!Ekernel/panic.c !Ekernel/panic.c
!Ekernel/sys.c !Ekernel/sys.c
!Ekernel/rcupdate.c !Ekernel/rcupdate.c

View file

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
<!ENTITY % media-entities SYSTEM "./media-entities.tmpl"> %media-entities; <!ENTITY % media-entities SYSTEM "./media-entities.tmpl"> %media-entities;
<!ENTITY media-indices SYSTEM "./media-indices.tmpl"> <!ENTITY media-indices SYSTEM "./media-indices.tmpl">

View file

@ -4,7 +4,7 @@
Required properties : Required properties :
- reg : Offset and length of the register set for the device - reg : Offset and length of the register set for the device
- compatible : Should be "marvell,mv64xxx-i2c" - compatible : Should be "marvell,mv64xxx-i2c" or "allwinner,sun4i-i2c"
- interrupts : The interrupt number - interrupts : The interrupt number
Optional properties : Optional properties :

View file

@ -31,9 +31,8 @@ Optional nodes:
Optional sub-node properties: Optional sub-node properties:
ti,warm-reset - maintain voltage during warm reset(boolean) ti,warm-reset - maintain voltage during warm reset(boolean)
ti,roof-floor - control voltage selection by pin(boolean) ti,roof-floor - control voltage selection by pin(boolean)
ti,sleep-mode - mode to adopt in pmic sleep 0 - off, 1 - auto, ti,mode-sleep - mode to adopt in pmic sleep 0 - off, 1 - auto,
2 - eco, 3 - forced pwm 2 - eco, 3 - forced pwm
ti,tstep - slope control 0 - Jump, 1 10mV/us, 2 5mV/us, 3 2.5mV/us
ti,smps-range - OTP has the wrong range set for the hardware so override ti,smps-range - OTP has the wrong range set for the hardware so override
0 - low range, 1 - high range. 0 - low range, 1 - high range.
@ -59,7 +58,6 @@ pmic {
ti,warm-reset; ti,warm-reset;
ti,roof-floor; ti,roof-floor;
ti,mode-sleep = <0>; ti,mode-sleep = <0>;
ti,tstep = <0>;
ti,smps-range = <1>; ti,smps-range = <1>;
}; };

View file

@ -52,7 +52,7 @@ Default: 64
busy_read busy_read
---------------- ----------------
Low latency busy poll timeout for socket reads. (needs CONFIG_NET_LL_RX_POLL) Low latency busy poll timeout for socket reads. (needs CONFIG_NET_RX_BUSY_POLL)
Approximate time in us to busy loop waiting for packets on the device queue. Approximate time in us to busy loop waiting for packets on the device queue.
This sets the default value of the SO_BUSY_POLL socket option. This sets the default value of the SO_BUSY_POLL socket option.
Can be set or overridden per socket by setting socket option SO_BUSY_POLL, Can be set or overridden per socket by setting socket option SO_BUSY_POLL,
@ -63,7 +63,7 @@ Default: 0 (off)
busy_poll busy_poll
---------------- ----------------
Low latency busy poll timeout for poll and select. (needs CONFIG_NET_LL_RX_POLL) Low latency busy poll timeout for poll and select. (needs CONFIG_NET_RX_BUSY_POLL)
Approximate time in us to busy loop waiting for events. Approximate time in us to busy loop waiting for events.
Recommended value depends on the number of sockets you poll on. Recommended value depends on the number of sockets you poll on.
For several sockets 50, for several hundreds 100. For several sockets 50, for several hundreds 100.

View file

@ -965,6 +965,12 @@ M: Lennert Buytenhek <kernel@wantstofly.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
ARM/TEXAS INSTRUMENT KEYSTONE ARCHITECTURE
M: Santosh Shilimkar <santosh.shilimkar@ti.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
F: arch/arm/mach-keystone/
ARM/LOGICPD PXA270 MACHINE SUPPORT ARM/LOGICPD PXA270 MACHINE SUPPORT
M: Lennert Buytenhek <kernel@wantstofly.org> M: Lennert Buytenhek <kernel@wantstofly.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
@ -1259,7 +1265,6 @@ F: drivers/rtc/rtc-coh901331.c
T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson.git
ARM/Ux500 ARM ARCHITECTURE ARM/Ux500 ARM ARCHITECTURE
M: Srinidhi Kasagar <srinidhi.kasagar@stericsson.com>
M: Linus Walleij <linus.walleij@linaro.org> M: Linus Walleij <linus.walleij@linaro.org>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained S: Maintained
@ -1406,7 +1411,7 @@ ATHEROS ATH6KL WIRELESS DRIVER
M: Kalle Valo <kvalo@qca.qualcomm.com> M: Kalle Valo <kvalo@qca.qualcomm.com>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
W: http://wireless.kernel.org/en/users/Drivers/ath6kl W: http://wireless.kernel.org/en/users/Drivers/ath6kl
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath6kl.git T: git git://github.com/kvalo/ath.git
S: Supported S: Supported
F: drivers/net/wireless/ath/ath6kl/ F: drivers/net/wireless/ath/ath6kl/
@ -2871,7 +2876,7 @@ F: drivers/media/usb/dvb-usb-v2/dvb_usb*
F: drivers/media/usb/dvb-usb-v2/usb_urb.c F: drivers/media/usb/dvb-usb-v2/usb_urb.c
DYNAMIC DEBUG DYNAMIC DEBUG
M: Jason Baron <jbaron@redhat.com> M: Jason Baron <jbaron@akamai.com>
S: Maintained S: Maintained
F: lib/dynamic_debug.c F: lib/dynamic_debug.c
F: include/linux/dynamic_debug.h F: include/linux/dynamic_debug.h
@ -5576,9 +5581,9 @@ S: Maintained
F: drivers/media/tuners/mxl5007t.* F: drivers/media/tuners/mxl5007t.*
MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE) MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
M: Andrew Gallatin <gallatin@myri.com> M: Hyong-Youb Kim <hykim@myri.com>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
W: http://www.myri.com/scs/download-Myri10GE.html W: https://www.myricom.com/support/downloads/myri10ge.html
S: Supported S: Supported
F: drivers/net/ethernet/myricom/myri10ge/ F: drivers/net/ethernet/myricom/myri10ge/
@ -6726,6 +6731,14 @@ T: git git://linuxtv.org/anttip/media_tree.git
S: Maintained S: Maintained
F: drivers/media/tuners/qt1010* F: drivers/media/tuners/qt1010*
QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
M: Kalle Valo <kvalo@qca.qualcomm.com>
L: ath10k@lists.infradead.org
W: http://wireless.kernel.org/en/users/Drivers/ath10k
T: git git://github.com/kvalo/ath.git
S: Supported
F: drivers/net/wireless/ath/ath10k/
QUALCOMM HEXAGON ARCHITECTURE QUALCOMM HEXAGON ARCHITECTURE
M: Richard Kuo <rkuo@codeaurora.org> M: Richard Kuo <rkuo@codeaurora.org>
L: linux-hexagon@vger.kernel.org L: linux-hexagon@vger.kernel.org
@ -7353,7 +7366,6 @@ F: drivers/net/ethernet/sfc/
SGI GRU DRIVER SGI GRU DRIVER
M: Dimitri Sivanich <sivanich@sgi.com> M: Dimitri Sivanich <sivanich@sgi.com>
M: Robin Holt <holt@sgi.com>
S: Maintained S: Maintained
F: drivers/misc/sgi-gru/ F: drivers/misc/sgi-gru/
@ -7373,7 +7385,8 @@ S: Maintained for 2.6.
F: Documentation/sgi-visws.txt F: Documentation/sgi-visws.txt
SGI XP/XPC/XPNET DRIVER SGI XP/XPC/XPNET DRIVER
M: Robin Holt <holt@sgi.com> M: Cliff Whickman <cpw@sgi.com>
M: Robin Holt <robinmholt@gmail.com>
S: Maintained S: Maintained
F: drivers/misc/sgi-xp/ F: drivers/misc/sgi-xp/
@ -8270,7 +8283,7 @@ S: Maintained
F: sound/soc/codecs/twl4030* F: sound/soc/codecs/twl4030*
TI WILINK WIRELESS DRIVERS TI WILINK WIRELESS DRIVERS
M: Luciano Coelho <coelho@ti.com> M: Luciano Coelho <luca@coelho.fi>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
W: http://wireless.kernel.org/en/users/Drivers/wl12xx W: http://wireless.kernel.org/en/users/Drivers/wl12xx
W: http://wireless.kernel.org/en/users/Drivers/wl1251 W: http://wireless.kernel.org/en/users/Drivers/wl1251
@ -8656,6 +8669,11 @@ T: git git://git.alsa-project.org/alsa-kernel.git
S: Maintained S: Maintained
F: sound/usb/midi.* F: sound/usb/midi.*
USB NETWORKING DRIVERS
L: linux-usb@vger.kernel.org
S: Odd Fixes
F: drivers/net/usb/
USB OHCI DRIVER USB OHCI DRIVER
M: Alan Stern <stern@rowland.harvard.edu> M: Alan Stern <stern@rowland.harvard.edu>
L: linux-usb@vger.kernel.org L: linux-usb@vger.kernel.org

View file

@ -1,7 +1,7 @@
VERSION = 3 VERSION = 3
PATCHLEVEL = 11 PATCHLEVEL = 11
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc3 EXTRAVERSION = -rc6
NAME = Linux for Workgroups NAME = Linux for Workgroups
# *DOCUMENTATION* # *DOCUMENTATION*

View file

@ -407,6 +407,12 @@ config CLONE_BACKWARDS2
help help
Architecture has the first two arguments of clone(2) swapped. Architecture has the first two arguments of clone(2) swapped.
config CLONE_BACKWARDS3
bool
help
Architecture has tls passed as the 3rd argument of clone(2),
not the 5th one.
config ODD_RT_SIGACTION config ODD_RT_SIGACTION
bool bool
help help

View file

@ -38,6 +38,7 @@
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/processor.h> /* For VMALLOC_START */ #include <asm/processor.h> /* For VMALLOC_START */
#include <asm/thread_info.h> /* For THREAD_SIZE */ #include <asm/thread_info.h> /* For THREAD_SIZE */
#include <asm/mmu.h>
/* Note on the LD/ST addr modes with addr reg wback /* Note on the LD/ST addr modes with addr reg wback
* *

View file

@ -20,7 +20,6 @@ config ARM
select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNCPY_FROM_USER
select GENERIC_STRNLEN_USER select GENERIC_STRNLEN_USER
select HARDIRQS_SW_RESEND select HARDIRQS_SW_RESEND
select HAVE_AOUT
select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
select HAVE_ARCH_KGDB select HAVE_ARCH_KGDB
select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_SECCOMP_FILTER
@ -218,7 +217,8 @@ config VECTORS_BASE
default DRAM_BASE if REMAP_VECTORS_TO_RAM default DRAM_BASE if REMAP_VECTORS_TO_RAM
default 0x00000000 default 0x00000000
help help
The base address of exception vectors. The base address of exception vectors. This must be two pages
in size.
config ARM_PATCH_PHYS_VIRT config ARM_PATCH_PHYS_VIRT
bool "Patch physical to virtual translations at runtime" if EMBEDDED bool "Patch physical to virtual translations at runtime" if EMBEDDED

View file

@ -804,9 +804,19 @@ config DEBUG_LL_INCLUDE
config DEBUG_UNCOMPRESS config DEBUG_UNCOMPRESS
bool bool
default y if ARCH_MULTIPLATFORM && DEBUG_LL && \ depends on ARCH_MULTIPLATFORM
!DEBUG_OMAP2PLUS_UART && \ default y if DEBUG_LL && !DEBUG_OMAP2PLUS_UART && \
!DEBUG_TEGRA_UART !DEBUG_TEGRA_UART
help
This option influences the normal decompressor output for
multiplatform kernels. Normally, multiplatform kernels disable
decompressor output because it is not possible to know where to
send the decompressor output.
When this option is set, the selected DEBUG_LL output method
will be re-used for normal decompressor output on multiplatform
kernels.
config UNCOMPRESS_INCLUDE config UNCOMPRESS_INCLUDE
string string

View file

@ -153,6 +153,7 @@ machine-$(CONFIG_ARCH_DAVINCI) += davinci
machine-$(CONFIG_ARCH_DOVE) += dove machine-$(CONFIG_ARCH_DOVE) += dove
machine-$(CONFIG_ARCH_EBSA110) += ebsa110 machine-$(CONFIG_ARCH_EBSA110) += ebsa110
machine-$(CONFIG_ARCH_EP93XX) += ep93xx machine-$(CONFIG_ARCH_EP93XX) += ep93xx
machine-$(CONFIG_ARCH_EXYNOS) += exynos
machine-$(CONFIG_ARCH_GEMINI) += gemini machine-$(CONFIG_ARCH_GEMINI) += gemini
machine-$(CONFIG_ARCH_HIGHBANK) += highbank machine-$(CONFIG_ARCH_HIGHBANK) += highbank
machine-$(CONFIG_ARCH_INTEGRATOR) += integrator machine-$(CONFIG_ARCH_INTEGRATOR) += integrator
@ -160,15 +161,16 @@ machine-$(CONFIG_ARCH_IOP13XX) += iop13xx
machine-$(CONFIG_ARCH_IOP32X) += iop32x machine-$(CONFIG_ARCH_IOP32X) += iop32x
machine-$(CONFIG_ARCH_IOP33X) += iop33x machine-$(CONFIG_ARCH_IOP33X) += iop33x
machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx machine-$(CONFIG_ARCH_IXP4XX) += ixp4xx
machine-$(CONFIG_ARCH_KEYSTONE) += keystone
machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood machine-$(CONFIG_ARCH_KIRKWOOD) += kirkwood
machine-$(CONFIG_ARCH_KS8695) += ks8695 machine-$(CONFIG_ARCH_KS8695) += ks8695
machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
machine-$(CONFIG_ARCH_MMP) += mmp machine-$(CONFIG_ARCH_MMP) += mmp
machine-$(CONFIG_ARCH_MSM) += msm machine-$(CONFIG_ARCH_MSM) += msm
machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0 machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0
machine-$(CONFIG_ARCH_MVEBU) += mvebu
machine-$(CONFIG_ARCH_MXC) += imx machine-$(CONFIG_ARCH_MXC) += imx
machine-$(CONFIG_ARCH_MXS) += mxs machine-$(CONFIG_ARCH_MXS) += mxs
machine-$(CONFIG_ARCH_MVEBU) += mvebu
machine-$(CONFIG_ARCH_NETX) += netx machine-$(CONFIG_ARCH_NETX) += netx
machine-$(CONFIG_ARCH_NOMADIK) += nomadik machine-$(CONFIG_ARCH_NOMADIK) += nomadik
machine-$(CONFIG_ARCH_NSPIRE) += nspire machine-$(CONFIG_ARCH_NSPIRE) += nspire
@ -176,7 +178,6 @@ machine-$(CONFIG_ARCH_OMAP1) += omap1
machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2 machine-$(CONFIG_ARCH_OMAP2PLUS) += omap2
machine-$(CONFIG_ARCH_ORION5X) += orion5x machine-$(CONFIG_ARCH_ORION5X) += orion5x
machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell machine-$(CONFIG_ARCH_PICOXCELL) += picoxcell
machine-$(CONFIG_ARCH_SIRF) += prima2
machine-$(CONFIG_ARCH_PXA) += pxa machine-$(CONFIG_ARCH_PXA) += pxa
machine-$(CONFIG_ARCH_REALVIEW) += realview machine-$(CONFIG_ARCH_REALVIEW) += realview
machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip machine-$(CONFIG_ARCH_ROCKCHIP) += rockchip
@ -186,25 +187,24 @@ machine-$(CONFIG_ARCH_S3C64XX) += s3c64xx
machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0 machine-$(CONFIG_ARCH_S5P64X0) += s5p64x0
machine-$(CONFIG_ARCH_S5PC100) += s5pc100 machine-$(CONFIG_ARCH_S5PC100) += s5pc100
machine-$(CONFIG_ARCH_S5PV210) += s5pv210 machine-$(CONFIG_ARCH_S5PV210) += s5pv210
machine-$(CONFIG_ARCH_EXYNOS) += exynos
machine-$(CONFIG_ARCH_SA1100) += sa1100 machine-$(CONFIG_ARCH_SA1100) += sa1100
machine-$(CONFIG_ARCH_SHARK) += shark machine-$(CONFIG_ARCH_SHARK) += shark
machine-$(CONFIG_ARCH_SHMOBILE) += shmobile machine-$(CONFIG_ARCH_SHMOBILE) += shmobile
machine-$(CONFIG_ARCH_SIRF) += prima2
machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
machine-$(CONFIG_ARCH_STI) += sti
machine-$(CONFIG_ARCH_SUNXI) += sunxi
machine-$(CONFIG_ARCH_TEGRA) += tegra machine-$(CONFIG_ARCH_TEGRA) += tegra
machine-$(CONFIG_ARCH_U300) += u300 machine-$(CONFIG_ARCH_U300) += u300
machine-$(CONFIG_ARCH_U8500) += ux500 machine-$(CONFIG_ARCH_U8500) += ux500
machine-$(CONFIG_ARCH_VERSATILE) += versatile machine-$(CONFIG_ARCH_VERSATILE) += versatile
machine-$(CONFIG_ARCH_VEXPRESS) += vexpress machine-$(CONFIG_ARCH_VEXPRESS) += vexpress
machine-$(CONFIG_ARCH_VIRT) += virt
machine-$(CONFIG_ARCH_VT8500) += vt8500 machine-$(CONFIG_ARCH_VT8500) += vt8500
machine-$(CONFIG_ARCH_W90X900) += w90x900 machine-$(CONFIG_ARCH_W90X900) += w90x900
machine-$(CONFIG_FOOTBRIDGE) += footbridge
machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
machine-$(CONFIG_PLAT_SPEAR) += spear
machine-$(CONFIG_ARCH_STI) += sti
machine-$(CONFIG_ARCH_VIRT) += virt
machine-$(CONFIG_ARCH_ZYNQ) += zynq machine-$(CONFIG_ARCH_ZYNQ) += zynq
machine-$(CONFIG_ARCH_SUNXI) += sunxi machine-$(CONFIG_FOOTBRIDGE) += footbridge
machine-$(CONFIG_ARCH_KEYSTONE) += keystone machine-$(CONFIG_PLAT_SPEAR) += spear
# Platform directory name. This list is sorted alphanumerically # Platform directory name. This list is sorted alphanumerically
# by CONFIG_* macro name. # by CONFIG_* macro name.

View file

@ -26,7 +26,7 @@
cpu-offset = <0x80000>; cpu-offset = <0x80000>;
}; };
msmgpio: gpio@fd510000 { msmgpio: gpio@800000 {
compatible = "qcom,msm-gpio"; compatible = "qcom,msm-gpio";
gpio-controller; gpio-controller;
#gpio-cells = <2>; #gpio-cells = <2>;
@ -34,7 +34,7 @@
interrupts = <0 32 0x4>; interrupts = <0 32 0x4>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>; #interrupt-cells = <2>;
reg = <0xfd510000 0x4000>; reg = <0x800000 0x4000>;
}; };
serial@16440000 { serial@16440000 {

View file

@ -235,7 +235,7 @@
}; };
&mmc1 { &mmc1 {
vmmc-supply = <&vmmcsd_fixed>; vmmc-supply = <&ldo9_reg>;
bus-width = <4>; bus-width = <4>;
}; };
@ -282,6 +282,7 @@
regulators { regulators {
smps123_reg: smps123 { smps123_reg: smps123 {
/* VDD_OPP_MPU */
regulator-name = "smps123"; regulator-name = "smps123";
regulator-min-microvolt = < 600000>; regulator-min-microvolt = < 600000>;
regulator-max-microvolt = <1500000>; regulator-max-microvolt = <1500000>;
@ -290,6 +291,7 @@
}; };
smps45_reg: smps45 { smps45_reg: smps45 {
/* VDD_OPP_MM */
regulator-name = "smps45"; regulator-name = "smps45";
regulator-min-microvolt = < 600000>; regulator-min-microvolt = < 600000>;
regulator-max-microvolt = <1310000>; regulator-max-microvolt = <1310000>;
@ -298,6 +300,7 @@
}; };
smps6_reg: smps6 { smps6_reg: smps6 {
/* VDD_DDR3 - over VDD_SMPS6 */
regulator-name = "smps6"; regulator-name = "smps6";
regulator-min-microvolt = <1200000>; regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>; regulator-max-microvolt = <1200000>;
@ -306,6 +309,7 @@
}; };
smps7_reg: smps7 { smps7_reg: smps7 {
/* VDDS_1v8_OMAP over VDDS_1v8_MAIN */
regulator-name = "smps7"; regulator-name = "smps7";
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@ -314,6 +318,7 @@
}; };
smps8_reg: smps8 { smps8_reg: smps8 {
/* VDD_OPP_CORE */
regulator-name = "smps8"; regulator-name = "smps8";
regulator-min-microvolt = < 600000>; regulator-min-microvolt = < 600000>;
regulator-max-microvolt = <1310000>; regulator-max-microvolt = <1310000>;
@ -322,15 +327,15 @@
}; };
smps9_reg: smps9 { smps9_reg: smps9 {
/* VDDA_2v1_AUD over VDD_2v1 */
regulator-name = "smps9"; regulator-name = "smps9";
regulator-min-microvolt = <2100000>; regulator-min-microvolt = <2100000>;
regulator-max-microvolt = <2100000>; regulator-max-microvolt = <2100000>;
regulator-always-on;
regulator-boot-on;
ti,smps-range = <0x80>; ti,smps-range = <0x80>;
}; };
smps10_reg: smps10 { smps10_reg: smps10 {
/* VBUS_5V_OTG */
regulator-name = "smps10"; regulator-name = "smps10";
regulator-min-microvolt = <5000000>; regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>; regulator-max-microvolt = <5000000>;
@ -339,38 +344,40 @@
}; };
ldo1_reg: ldo1 { ldo1_reg: ldo1 {
/* VDDAPHY_CAM: vdda_csiport */
regulator-name = "ldo1"; regulator-name = "ldo1";
regulator-min-microvolt = <2800000>; regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <2800000>; regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
}; };
ldo2_reg: ldo2 { ldo2_reg: ldo2 {
/* VCC_2V8_DISP: Does not go anywhere */
regulator-name = "ldo2"; regulator-name = "ldo2";
regulator-min-microvolt = <2900000>; regulator-min-microvolt = <2800000>;
regulator-max-microvolt = <2900000>; regulator-max-microvolt = <2800000>;
regulator-always-on; /* Unused */
regulator-boot-on; status = "disabled";
}; };
ldo3_reg: ldo3 { ldo3_reg: ldo3 {
/* VDDAPHY_MDM: vdda_lli */
regulator-name = "ldo3"; regulator-name = "ldo3";
regulator-min-microvolt = <3000000>; regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <3000000>; regulator-max-microvolt = <1500000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
/* Only if Modem is used */
status = "disabled";
}; };
ldo4_reg: ldo4 { ldo4_reg: ldo4 {
/* VDDAPHY_DISP: vdda_dsiport/hdmi */
regulator-name = "ldo4"; regulator-name = "ldo4";
regulator-min-microvolt = <2200000>; regulator-min-microvolt = <1500000>;
regulator-max-microvolt = <2200000>; regulator-max-microvolt = <1800000>;
regulator-always-on;
regulator-boot-on;
}; };
ldo5_reg: ldo5 { ldo5_reg: ldo5 {
/* VDDA_1V8_PHY: usb/sata/hdmi.. */
regulator-name = "ldo5"; regulator-name = "ldo5";
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@ -379,38 +386,43 @@
}; };
ldo6_reg: ldo6 { ldo6_reg: ldo6 {
/* VDDS_1V2_WKUP: hsic/ldo_emu_wkup */
regulator-name = "ldo6"; regulator-name = "ldo6";
regulator-min-microvolt = <1500000>; regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1500000>; regulator-max-microvolt = <1200000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
}; };
ldo7_reg: ldo7 { ldo7_reg: ldo7 {
/* VDD_VPP: vpp1 */
regulator-name = "ldo7"; regulator-name = "ldo7";
regulator-min-microvolt = <1500000>; regulator-min-microvolt = <2000000>;
regulator-max-microvolt = <1500000>; regulator-max-microvolt = <2000000>;
regulator-always-on; /* Only for efuse reprograming! */
regulator-boot-on; status = "disabled";
}; };
ldo8_reg: ldo8 { ldo8_reg: ldo8 {
/* VDD_3v0: Does not go anywhere */
regulator-name = "ldo8"; regulator-name = "ldo8";
regulator-min-microvolt = <1500000>; regulator-min-microvolt = <3000000>;
regulator-max-microvolt = <1500000>; regulator-max-microvolt = <3000000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
/* Unused */
status = "disabled";
}; };
ldo9_reg: ldo9 { ldo9_reg: ldo9 {
/* VCC_DV_SDIO: vdds_sdcard */
regulator-name = "ldo9"; regulator-name = "ldo9";
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3000000>;
regulator-always-on;
regulator-boot-on; regulator-boot-on;
}; };
ldoln_reg: ldoln { ldoln_reg: ldoln {
/* VDDA_1v8_REF: vdds_osc/mm_l4per.. */
regulator-name = "ldoln"; regulator-name = "ldoln";
regulator-min-microvolt = <1800000>; regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@ -419,12 +431,20 @@
}; };
ldousb_reg: ldousb { ldousb_reg: ldousb {
/* VDDA_3V_USB: VDDA_USBHS33 */
regulator-name = "ldousb"; regulator-name = "ldousb";
regulator-min-microvolt = <3250000>; regulator-min-microvolt = <3250000>;
regulator-max-microvolt = <3250000>; regulator-max-microvolt = <3250000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
}; };
regen3_reg: regen3 {
/* REGEN3 controls LDO9 supply to card */
regulator-name = "regen3";
regulator-always-on;
regulator-boot-on;
};
}; };
}; };
}; };

View file

@ -6,10 +6,12 @@
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
cpu@0 { cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a9"; compatible = "arm,cortex-a9";
reg = <0>; reg = <0>;
}; };
cpu@1 { cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a9"; compatible = "arm,cortex-a9";
reg = <1>; reg = <1>;
}; };

View file

@ -457,6 +457,7 @@
}; };
usb-phy@c5004000 { usb-phy@c5004000 {
status = "okay";
nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1) nvidia,phy-reset-gpio = <&gpio TEGRA_GPIO(V, 1)
GPIO_ACTIVE_LOW>; GPIO_ACTIVE_LOW>;
}; };

View file

@ -1,45 +0,0 @@
/* a.out coredump register dumper
*
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
* Written by David Howells (dhowells@redhat.com)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Licence
* as published by the Free Software Foundation; either version
* 2 of the Licence, or (at your option) any later version.
*/
#ifndef _ASM_A_OUT_CORE_H
#define _ASM_A_OUT_CORE_H
#ifdef __KERNEL__
#include <linux/user.h>
#include <linux/elfcore.h>
/*
* fill in the user structure for an a.out core dump
*/
static inline void aout_dump_thread(struct pt_regs *regs, struct user *dump)
{
struct task_struct *tsk = current;
dump->magic = CMAGIC;
dump->start_code = tsk->mm->start_code;
dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1);
dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT;
dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;
dump->u_ssize = 0;
memset(dump->u_debugreg, 0, sizeof(dump->u_debugreg));
if (dump->start_stack < 0x04000000)
dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;
dump->regs = *regs;
dump->u_fpvalid = dump_fpu (regs, &dump->u_fp);
}
#endif /* __KERNEL__ */
#endif /* _ASM_A_OUT_CORE_H */

View file

@ -89,13 +89,18 @@ extern unsigned int processor_id;
__val; \ __val; \
}) })
/*
* The memory clobber prevents gcc 4.5 from reordering the mrc before
* any is_smp() tests, which can cause undefined instruction aborts on
* ARM1136 r0 due to the missing extended CP15 registers.
*/
#define read_cpuid_ext(ext_reg) \ #define read_cpuid_ext(ext_reg) \
({ \ ({ \
unsigned int __val; \ unsigned int __val; \
asm("mrc p15, 0, %0, c0, " ext_reg \ asm("mrc p15, 0, %0, c0, " ext_reg \
: "=r" (__val) \ : "=r" (__val) \
: \ : \
: "cc"); \ : "memory"); \
__val; \ __val; \
}) })

View file

@ -130,4 +130,10 @@ struct mm_struct;
extern unsigned long arch_randomize_brk(struct mm_struct *mm); extern unsigned long arch_randomize_brk(struct mm_struct *mm);
#define arch_randomize_brk arch_randomize_brk #define arch_randomize_brk arch_randomize_brk
#ifdef CONFIG_MMU
#define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1
struct linux_binprm;
int arch_setup_additional_pages(struct linux_binprm *, int);
#endif
#endif #endif

View file

@ -6,8 +6,11 @@
typedef struct { typedef struct {
#ifdef CONFIG_CPU_HAS_ASID #ifdef CONFIG_CPU_HAS_ASID
atomic64_t id; atomic64_t id;
#else
int switch_pending;
#endif #endif
unsigned int vmalloc_seq; unsigned int vmalloc_seq;
unsigned long sigpage;
} mm_context_t; } mm_context_t;
#ifdef CONFIG_CPU_HAS_ASID #ifdef CONFIG_CPU_HAS_ASID

View file

@ -56,7 +56,7 @@ static inline void check_and_switch_context(struct mm_struct *mm,
* on non-ASID CPUs, the old mm will remain valid until the * on non-ASID CPUs, the old mm will remain valid until the
* finish_arch_post_lock_switch() call. * finish_arch_post_lock_switch() call.
*/ */
set_ti_thread_flag(task_thread_info(tsk), TIF_SWITCH_MM); mm->context.switch_pending = 1;
else else
cpu_switch_mm(mm->pgd, mm); cpu_switch_mm(mm->pgd, mm);
} }
@ -65,9 +65,21 @@ static inline void check_and_switch_context(struct mm_struct *mm,
finish_arch_post_lock_switch finish_arch_post_lock_switch
static inline void finish_arch_post_lock_switch(void) static inline void finish_arch_post_lock_switch(void)
{ {
if (test_and_clear_thread_flag(TIF_SWITCH_MM)) { struct mm_struct *mm = current->mm;
struct mm_struct *mm = current->mm;
cpu_switch_mm(mm->pgd, mm); if (mm && mm->context.switch_pending) {
/*
* Preemption must be disabled during cpu_switch_mm() as we
* have some stateful cache flush implementations. Check
* switch_pending again in case we were preempted and the
* switch to this mm was already done.
*/
preempt_disable();
if (mm->context.switch_pending) {
mm->context.switch_pending = 0;
cpu_switch_mm(mm->pgd, mm);
}
preempt_enable_no_resched();
} }
} }

View file

@ -142,7 +142,9 @@ extern void __cpu_copy_user_highpage(struct page *to, struct page *from,
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE) #define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
extern void copy_page(void *to, const void *from); extern void copy_page(void *to, const void *from);
#ifdef CONFIG_KUSER_HELPERS
#define __HAVE_ARCH_GATE_AREA 1 #define __HAVE_ARCH_GATE_AREA 1
#endif
#ifdef CONFIG_ARM_LPAE #ifdef CONFIG_ARM_LPAE
#include <asm/pgtable-3level-types.h> #include <asm/pgtable-3level-types.h>

View file

@ -54,7 +54,6 @@ struct thread_struct {
#define start_thread(regs,pc,sp) \ #define start_thread(regs,pc,sp) \
({ \ ({ \
unsigned long *stack = (unsigned long *)sp; \
memset(regs->uregs, 0, sizeof(regs->uregs)); \ memset(regs->uregs, 0, sizeof(regs->uregs)); \
if (current->personality & ADDR_LIMIT_32BIT) \ if (current->personality & ADDR_LIMIT_32BIT) \
regs->ARM_cpsr = USR_MODE; \ regs->ARM_cpsr = USR_MODE; \
@ -65,9 +64,6 @@ struct thread_struct {
regs->ARM_cpsr |= PSR_ENDSTATE; \ regs->ARM_cpsr |= PSR_ENDSTATE; \
regs->ARM_pc = pc & ~1; /* pc */ \ regs->ARM_pc = pc & ~1; /* pc */ \
regs->ARM_sp = sp; /* sp */ \ regs->ARM_sp = sp; /* sp */ \
regs->ARM_r2 = stack[2]; /* r2 (envp) */ \
regs->ARM_r1 = stack[1]; /* r1 (argv) */ \
regs->ARM_r0 = stack[0]; /* r0 (argc) */ \
nommu_start_thread(regs); \ nommu_start_thread(regs); \
}) })

View file

@ -88,4 +88,7 @@ static inline u32 mpidr_hash_size(void)
{ {
return 1 << mpidr_hash.bits; return 1 << mpidr_hash.bits;
} }
extern int platform_can_cpu_hotplug(void);
#endif #endif

View file

@ -107,7 +107,7 @@ static inline int arch_spin_trylock(arch_spinlock_t *lock)
" subs %1, %0, %0, ror #16\n" " subs %1, %0, %0, ror #16\n"
" addeq %0, %0, %4\n" " addeq %0, %0, %4\n"
" strexeq %2, %0, [%3]" " strexeq %2, %0, [%3]"
: "=&r" (slock), "=&r" (contended), "=r" (res) : "=&r" (slock), "=&r" (contended), "=&r" (res)
: "r" (&lock->slock), "I" (1 << TICKET_SHIFT) : "r" (&lock->slock), "I" (1 << TICKET_SHIFT)
: "cc"); : "cc");
} while (res); } while (res);
@ -168,17 +168,20 @@ static inline void arch_write_lock(arch_rwlock_t *rw)
static inline int arch_write_trylock(arch_rwlock_t *rw) static inline int arch_write_trylock(arch_rwlock_t *rw)
{ {
unsigned long tmp; unsigned long contended, res;
__asm__ __volatile__( do {
" ldrex %0, [%1]\n" __asm__ __volatile__(
" teq %0, #0\n" " ldrex %0, [%2]\n"
" strexeq %0, %2, [%1]" " mov %1, #0\n"
: "=&r" (tmp) " teq %0, #0\n"
: "r" (&rw->lock), "r" (0x80000000) " strexeq %1, %3, [%2]"
: "cc"); : "=&r" (contended), "=&r" (res)
: "r" (&rw->lock), "r" (0x80000000)
: "cc");
} while (res);
if (tmp == 0) { if (!contended) {
smp_mb(); smp_mb();
return 1; return 1;
} else { } else {
@ -254,18 +257,26 @@ static inline void arch_read_unlock(arch_rwlock_t *rw)
static inline int arch_read_trylock(arch_rwlock_t *rw) static inline int arch_read_trylock(arch_rwlock_t *rw)
{ {
unsigned long tmp, tmp2 = 1; unsigned long contended, res;
__asm__ __volatile__( do {
" ldrex %0, [%2]\n" __asm__ __volatile__(
" adds %0, %0, #1\n" " ldrex %0, [%2]\n"
" strexpl %1, %0, [%2]\n" " mov %1, #0\n"
: "=&r" (tmp), "+r" (tmp2) " adds %0, %0, #1\n"
: "r" (&rw->lock) " strexpl %1, %0, [%2]"
: "cc"); : "=&r" (contended), "=&r" (res)
: "r" (&rw->lock)
: "cc");
} while (res);
smp_mb(); /* If the lock is negative, then it is already held for write. */
return tmp2 == 0; if (contended < 0x80000000) {
smp_mb();
return 1;
} else {
return 0;
}
} }
/* read_can_lock - would read_trylock() succeed? */ /* read_can_lock - would read_trylock() succeed? */

View file

@ -156,7 +156,6 @@ extern int vfp_restore_user_hwstate(struct user_vfp __user *,
#define TIF_USING_IWMMXT 17 #define TIF_USING_IWMMXT 17
#define TIF_MEMDIE 18 /* is terminating due to OOM killer */ #define TIF_MEMDIE 18 /* is terminating due to OOM killer */
#define TIF_RESTORE_SIGMASK 20 #define TIF_RESTORE_SIGMASK 20
#define TIF_SWITCH_MM 22 /* deferred switch_mm */
#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) #define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)

View file

@ -43,6 +43,7 @@ struct mmu_gather {
struct mm_struct *mm; struct mm_struct *mm;
unsigned int fullmm; unsigned int fullmm;
struct vm_area_struct *vma; struct vm_area_struct *vma;
unsigned long start, end;
unsigned long range_start; unsigned long range_start;
unsigned long range_end; unsigned long range_end;
unsigned int nr; unsigned int nr;
@ -107,10 +108,12 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb)
} }
static inline void static inline void
tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int fullmm) tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end)
{ {
tlb->mm = mm; tlb->mm = mm;
tlb->fullmm = fullmm; tlb->fullmm = !(start | (end+1));
tlb->start = start;
tlb->end = end;
tlb->vma = NULL; tlb->vma = NULL;
tlb->max = ARRAY_SIZE(tlb->local); tlb->max = ARRAY_SIZE(tlb->local);
tlb->pages = tlb->local; tlb->pages = tlb->local;

View file

@ -443,7 +443,18 @@ static inline void local_flush_bp_all(void)
isb(); isb();
} }
#include <asm/cputype.h>
#ifdef CONFIG_ARM_ERRATA_798181 #ifdef CONFIG_ARM_ERRATA_798181
static inline int erratum_a15_798181(void)
{
unsigned int midr = read_cpuid_id();
/* Cortex-A15 r0p0..r3p2 affected */
if ((midr & 0xff0ffff0) != 0x410fc0f0 || midr > 0x413fc0f2)
return 0;
return 1;
}
static inline void dummy_flush_tlb_a15_erratum(void) static inline void dummy_flush_tlb_a15_erratum(void)
{ {
/* /*
@ -453,6 +464,11 @@ static inline void dummy_flush_tlb_a15_erratum(void)
dsb(); dsb();
} }
#else #else
static inline int erratum_a15_798181(void)
{
return 0;
}
static inline void dummy_flush_tlb_a15_erratum(void) static inline void dummy_flush_tlb_a15_erratum(void)
{ {
} }

View file

@ -29,6 +29,7 @@
#define BOOT_CPU_MODE_MISMATCH PSR_N_BIT #define BOOT_CPU_MODE_MISMATCH PSR_N_BIT
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#include <asm/cacheflush.h>
#ifdef CONFIG_ARM_VIRT_EXT #ifdef CONFIG_ARM_VIRT_EXT
/* /*
@ -41,10 +42,21 @@
*/ */
extern int __boot_cpu_mode; extern int __boot_cpu_mode;
static inline void sync_boot_mode(void)
{
/*
* As secondaries write to __boot_cpu_mode with caches disabled, we
* must flush the corresponding cache entries to ensure the visibility
* of their writes.
*/
sync_cache_r(&__boot_cpu_mode);
}
void __hyp_set_vectors(unsigned long phys_vector_base); void __hyp_set_vectors(unsigned long phys_vector_base);
unsigned long __hyp_get_vectors(void); unsigned long __hyp_get_vectors(void);
#else #else
#define __boot_cpu_mode (SVC_MODE) #define __boot_cpu_mode (SVC_MODE)
#define sync_boot_mode()
#endif #endif
#ifndef ZIMAGE #ifndef ZIMAGE

View file

@ -1,7 +1,6 @@
# UAPI Header export list # UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
header-y += a.out.h
header-y += byteorder.h header-y += byteorder.h
header-y += fcntl.h header-y += fcntl.h
header-y += hwcap.h header-y += hwcap.h

View file

@ -1,34 +0,0 @@
#ifndef __ARM_A_OUT_H__
#define __ARM_A_OUT_H__
#include <linux/personality.h>
#include <linux/types.h>
struct exec
{
__u32 a_info; /* Use macros N_MAGIC, etc for access */
__u32 a_text; /* length of text, in bytes */
__u32 a_data; /* length of data, in bytes */
__u32 a_bss; /* length of uninitialized data area for file, in bytes */
__u32 a_syms; /* length of symbol table data in file, in bytes */
__u32 a_entry; /* start address */
__u32 a_trsize; /* length of relocation info for text, in bytes */
__u32 a_drsize; /* length of relocation info for data, in bytes */
};
/*
* This is always the same
*/
#define N_TXTADDR(a) (0x00008000)
#define N_TRSIZE(a) ((a).a_trsize)
#define N_DRSIZE(a) ((a).a_drsize)
#define N_SYMSIZE(a) ((a).a_syms)
#define M_ARM 103
#ifndef LIBRARY_START_TEXT
#define LIBRARY_START_TEXT (0x00c00000)
#endif
#endif /* __A_OUT_GNU_H__ */

View file

@ -357,7 +357,8 @@ ENDPROC(__pabt_svc)
.endm .endm
.macro kuser_cmpxchg_check .macro kuser_cmpxchg_check
#if !defined(CONFIG_CPU_32v6K) && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) #if !defined(CONFIG_CPU_32v6K) && defined(CONFIG_KUSER_HELPERS) && \
!defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG)
#ifndef CONFIG_MMU #ifndef CONFIG_MMU
#warning "NPTL on non MMU needs fixing" #warning "NPTL on non MMU needs fixing"
#else #else
@ -742,6 +743,18 @@ ENDPROC(__switch_to)
#endif #endif
.endm .endm
.macro kuser_pad, sym, size
.if (. - \sym) & 3
.rept 4 - (. - \sym) & 3
.byte 0
.endr
.endif
.rept (\size - (. - \sym)) / 4
.word 0xe7fddef1
.endr
.endm
#ifdef CONFIG_KUSER_HELPERS
.align 5 .align 5
.globl __kuser_helper_start .globl __kuser_helper_start
__kuser_helper_start: __kuser_helper_start:
@ -832,18 +845,13 @@ kuser_cmpxchg64_fixup:
#error "incoherent kernel configuration" #error "incoherent kernel configuration"
#endif #endif
/* pad to next slot */ kuser_pad __kuser_cmpxchg64, 64
.rept (16 - (. - __kuser_cmpxchg64)/4)
.word 0
.endr
.align 5
__kuser_memory_barrier: @ 0xffff0fa0 __kuser_memory_barrier: @ 0xffff0fa0
smp_dmb arm smp_dmb arm
usr_ret lr usr_ret lr
.align 5 kuser_pad __kuser_memory_barrier, 32
__kuser_cmpxchg: @ 0xffff0fc0 __kuser_cmpxchg: @ 0xffff0fc0
@ -916,13 +924,14 @@ kuser_cmpxchg32_fixup:
#endif #endif
.align 5 kuser_pad __kuser_cmpxchg, 32
__kuser_get_tls: @ 0xffff0fe0 __kuser_get_tls: @ 0xffff0fe0
ldr r0, [pc, #(16 - 8)] @ read TLS, set in kuser_get_tls_init ldr r0, [pc, #(16 - 8)] @ read TLS, set in kuser_get_tls_init
usr_ret lr usr_ret lr
mrc p15, 0, r0, c13, c0, 3 @ 0xffff0fe8 hardware TLS code mrc p15, 0, r0, c13, c0, 3 @ 0xffff0fe8 hardware TLS code
.rep 4 kuser_pad __kuser_get_tls, 16
.rep 3
.word 0 @ 0xffff0ff0 software TLS value, then .word 0 @ 0xffff0ff0 software TLS value, then
.endr @ pad up to __kuser_helper_version .endr @ pad up to __kuser_helper_version
@ -932,14 +941,16 @@ __kuser_helper_version: @ 0xffff0ffc
.globl __kuser_helper_end .globl __kuser_helper_end
__kuser_helper_end: __kuser_helper_end:
#endif
THUMB( .thumb ) THUMB( .thumb )
/* /*
* Vector stubs. * Vector stubs.
* *
* This code is copied to 0xffff0200 so we can use branches in the * This code is copied to 0xffff1000 so we can use branches in the
* vectors, rather than ldr's. Note that this code must not * vectors, rather than ldr's. Note that this code must not exceed
* exceed 0x300 bytes. * a page size.
* *
* Common stub entry macro: * Common stub entry macro:
* Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC
@ -986,8 +997,17 @@ ENDPROC(vector_\name)
1: 1:
.endm .endm
.globl __stubs_start .section .stubs, "ax", %progbits
__stubs_start: __stubs_start:
@ This must be the first word
.word vector_swi
vector_rst:
ARM( swi SYS_ERROR0 )
THUMB( svc #0 )
THUMB( nop )
b vector_und
/* /*
* Interrupt dispatcher * Interrupt dispatcher
*/ */
@ -1081,6 +1101,16 @@ __stubs_start:
.align 5 .align 5
/*=============================================================================
* Address exception handler
*-----------------------------------------------------------------------------
* These aren't too critical.
* (they're not supposed to happen, and won't happen in 32-bit data mode).
*/
vector_addrexcptn:
b vector_addrexcptn
/*============================================================================= /*=============================================================================
* Undefined FIQs * Undefined FIQs
*----------------------------------------------------------------------------- *-----------------------------------------------------------------------------
@ -1094,45 +1124,19 @@ __stubs_start:
vector_fiq: vector_fiq:
subs pc, lr, #4 subs pc, lr, #4
/*============================================================================= .globl vector_fiq_offset
* Address exception handler .equ vector_fiq_offset, vector_fiq
*-----------------------------------------------------------------------------
* These aren't too critical.
* (they're not supposed to happen, and won't happen in 32-bit data mode).
*/
vector_addrexcptn: .section .vectors, "ax", %progbits
b vector_addrexcptn
/*
* We group all the following data together to optimise
* for CPUs with separate I & D caches.
*/
.align 5
.LCvswi:
.word vector_swi
.globl __stubs_end
__stubs_end:
.equ stubs_offset, __vectors_start + 0x200 - __stubs_start
.globl __vectors_start
__vectors_start: __vectors_start:
ARM( swi SYS_ERROR0 ) W(b) vector_rst
THUMB( svc #0 ) W(b) vector_und
THUMB( nop ) W(ldr) pc, __vectors_start + 0x1000
W(b) vector_und + stubs_offset W(b) vector_pabt
W(ldr) pc, .LCvswi + stubs_offset W(b) vector_dabt
W(b) vector_pabt + stubs_offset W(b) vector_addrexcptn
W(b) vector_dabt + stubs_offset W(b) vector_irq
W(b) vector_addrexcptn + stubs_offset W(b) vector_fiq
W(b) vector_irq + stubs_offset
W(b) vector_fiq + stubs_offset
.globl __vectors_end
__vectors_end:
.data .data

View file

@ -49,7 +49,7 @@ __irq_entry:
mov r1, sp mov r1, sp
stmdb sp!, {lr} stmdb sp!, {lr}
@ routine called with r0 = irq number, r1 = struct pt_regs * @ routine called with r0 = irq number, r1 = struct pt_regs *
bl nvic_do_IRQ bl nvic_handle_irq
pop {lr} pop {lr}
@ @

View file

@ -47,6 +47,11 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/traps.h> #include <asm/traps.h>
#define FIQ_OFFSET ({ \
extern void *vector_fiq_offset; \
(unsigned)&vector_fiq_offset; \
})
static unsigned long no_fiq_insn; static unsigned long no_fiq_insn;
/* Default reacquire function /* Default reacquire function
@ -79,14 +84,13 @@ int show_fiq_list(struct seq_file *p, int prec)
void set_fiq_handler(void *start, unsigned int length) void set_fiq_handler(void *start, unsigned int length)
{ {
#if defined(CONFIG_CPU_USE_DOMAINS) void *base = vectors_page;
memcpy((void *)0xffff001c, start, length); unsigned offset = FIQ_OFFSET;
#else
memcpy(vectors_page + 0x1c, start, length); memcpy(base + offset, start, length);
#endif if (!cache_is_vipt_nonaliasing())
flush_icache_range(0xffff001c, 0xffff001c + length); flush_icache_range(base + offset, offset + length);
if (!vectors_high()) flush_icache_range(0xffff0000 + offset, 0xffff0000 + offset + length);
flush_icache_range(0x1c, 0x1c + length);
} }
int claim_fiq(struct fiq_handler *f) int claim_fiq(struct fiq_handler *f)
@ -144,6 +148,7 @@ EXPORT_SYMBOL(disable_fiq);
void __init init_FIQ(int start) void __init init_FIQ(int start)
{ {
no_fiq_insn = *(unsigned long *)0xffff001c; unsigned offset = FIQ_OFFSET;
no_fiq_insn = *(unsigned long *)(0xffff0000 + offset);
fiq_start = start; fiq_start = start;
} }

View file

@ -87,6 +87,7 @@ ENTRY(stext)
ENDPROC(stext) ENDPROC(stext)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.text
ENTRY(secondary_startup) ENTRY(secondary_startup)
/* /*
* Common entry point for secondary CPUs. * Common entry point for secondary CPUs.

View file

@ -343,6 +343,7 @@ __turn_mmu_on_loc:
.long __turn_mmu_on_end .long __turn_mmu_on_end
#if defined(CONFIG_SMP) #if defined(CONFIG_SMP)
.text
ENTRY(secondary_startup) ENTRY(secondary_startup)
/* /*
* Common entry point for secondary CPUs. * Common entry point for secondary CPUs.

View file

@ -56,8 +56,8 @@ ENTRY(__boot_cpu_mode)
ldr \reg3, [\reg2] ldr \reg3, [\reg2]
ldr \reg1, [\reg2, \reg3] ldr \reg1, [\reg2, \reg3]
cmp \mode, \reg1 @ matches primary CPU boot mode? cmp \mode, \reg1 @ matches primary CPU boot mode?
orrne r7, r7, #BOOT_CPU_MODE_MISMATCH orrne \reg1, \reg1, #BOOT_CPU_MODE_MISMATCH
strne r7, [r5, r6] @ record what happened and give up strne \reg1, [\reg2, \reg3] @ record what happened and give up
.endm .endm
#else /* ZIMAGE */ #else /* ZIMAGE */

View file

@ -15,6 +15,7 @@
#include <asm/mmu_context.h> #include <asm/mmu_context.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/smp_plat.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
extern const unsigned char relocate_new_kernel[]; extern const unsigned char relocate_new_kernel[];
@ -38,6 +39,14 @@ int machine_kexec_prepare(struct kimage *image)
__be32 header; __be32 header;
int i, err; int i, err;
/*
* Validate that if the current HW supports SMP, then the SW supports
* and implements CPU hotplug for the current HW. If not, we won't be
* able to kexec reliably, so fail the prepare operation.
*/
if (num_possible_cpus() > 1 && !platform_can_cpu_hotplug())
return -EINVAL;
/* /*
* No segment at default ATAGs address. try to locate * No segment at default ATAGs address. try to locate
* a dtb using magic. * a dtb using magic.
@ -134,10 +143,13 @@ void machine_kexec(struct kimage *image)
unsigned long reboot_code_buffer_phys; unsigned long reboot_code_buffer_phys;
void *reboot_code_buffer; void *reboot_code_buffer;
if (num_online_cpus() > 1) { /*
pr_err("kexec: error: multiple CPUs still online\n"); * This can only happen if machine_shutdown() failed to disable some
return; * CPU, and that can only happen if the checks in
} * machine_kexec_prepare() were not correct. If this fails, we can't
* reliably kexec anyway, so BUG_ON is appropriate.
*/
BUG_ON(num_online_cpus() > 1);
page_list = image->head & PAGE_MASK; page_list = image->head & PAGE_MASK;

View file

@ -53,7 +53,12 @@ armpmu_map_cache_event(const unsigned (*cache_map)
static int static int
armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config) armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config)
{ {
int mapping = (*event_map)[config]; int mapping;
if (config >= PERF_COUNT_HW_MAX)
return -EINVAL;
mapping = (*event_map)[config];
return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping; return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping;
} }
@ -253,6 +258,9 @@ validate_event(struct pmu_hw_events *hw_events,
struct arm_pmu *armpmu = to_arm_pmu(event->pmu); struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
struct pmu *leader_pmu = event->group_leader->pmu; struct pmu *leader_pmu = event->group_leader->pmu;
if (is_software_event(event))
return 1;
if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF) if (event->pmu != leader_pmu || event->state < PERF_EVENT_STATE_OFF)
return 1; return 1;

View file

@ -197,6 +197,7 @@ void machine_shutdown(void)
*/ */
void machine_halt(void) void machine_halt(void)
{ {
local_irq_disable();
smp_send_stop(); smp_send_stop();
local_irq_disable(); local_irq_disable();
@ -211,6 +212,7 @@ void machine_halt(void)
*/ */
void machine_power_off(void) void machine_power_off(void)
{ {
local_irq_disable();
smp_send_stop(); smp_send_stop();
if (pm_power_off) if (pm_power_off)
@ -230,6 +232,7 @@ void machine_power_off(void)
*/ */
void machine_restart(char *cmd) void machine_restart(char *cmd)
{ {
local_irq_disable();
smp_send_stop(); smp_send_stop();
arm_pm_restart(reboot_mode, cmd); arm_pm_restart(reboot_mode, cmd);
@ -426,10 +429,11 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
} }
#ifdef CONFIG_MMU #ifdef CONFIG_MMU
#ifdef CONFIG_KUSER_HELPERS
/* /*
* The vectors page is always readable from user space for the * The vectors page is always readable from user space for the
* atomic helpers and the signal restart code. Insert it into the * atomic helpers. Insert it into the gate_vma so that it is visible
* gate_vma so that it is visible through ptrace and /proc/<pid>/mem. * through ptrace and /proc/<pid>/mem.
*/ */
static struct vm_area_struct gate_vma = { static struct vm_area_struct gate_vma = {
.vm_start = 0xffff0000, .vm_start = 0xffff0000,
@ -458,9 +462,48 @@ int in_gate_area_no_mm(unsigned long addr)
{ {
return in_gate_area(NULL, addr); return in_gate_area(NULL, addr);
} }
#define is_gate_vma(vma) ((vma) == &gate_vma)
#else
#define is_gate_vma(vma) 0
#endif
const char *arch_vma_name(struct vm_area_struct *vma) const char *arch_vma_name(struct vm_area_struct *vma)
{ {
return (vma == &gate_vma) ? "[vectors]" : NULL; return is_gate_vma(vma) ? "[vectors]" :
(vma->vm_mm && vma->vm_start == vma->vm_mm->context.sigpage) ?
"[sigpage]" : NULL;
}
static struct page *signal_page;
extern struct page *get_signal_page(void);
int arch_setup_additional_pages(struct linux_binprm *bprm, int uses_interp)
{
struct mm_struct *mm = current->mm;
unsigned long addr;
int ret;
if (!signal_page)
signal_page = get_signal_page();
if (!signal_page)
return -ENOMEM;
down_write(&mm->mmap_sem);
addr = get_unmapped_area(NULL, 0, PAGE_SIZE, 0, 0);
if (IS_ERR_VALUE(addr)) {
ret = addr;
goto up_fail;
}
ret = install_special_mapping(mm, addr, PAGE_SIZE,
VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC,
&signal_page);
if (ret == 0)
mm->context.sigpage = addr;
up_fail:
up_write(&mm->mmap_sem);
return ret;
} }
#endif #endif

View file

@ -836,6 +836,8 @@ static int __init meminfo_cmp(const void *_a, const void *_b)
void __init hyp_mode_check(void) void __init hyp_mode_check(void)
{ {
#ifdef CONFIG_ARM_VIRT_EXT #ifdef CONFIG_ARM_VIRT_EXT
sync_boot_mode();
if (is_hyp_mode_available()) { if (is_hyp_mode_available()) {
pr_info("CPU: All CPU(s) started in HYP mode.\n"); pr_info("CPU: All CPU(s) started in HYP mode.\n");
pr_info("CPU: Virtualization extensions available.\n"); pr_info("CPU: Virtualization extensions available.\n");
@ -971,6 +973,7 @@ static const char *hwcap_str[] = {
"vfpv4", "vfpv4",
"idiva", "idiva",
"idivt", "idivt",
"vfpd32",
"lpae", "lpae",
NULL NULL
}; };

View file

@ -8,6 +8,7 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/random.h>
#include <linux/signal.h> #include <linux/signal.h>
#include <linux/personality.h> #include <linux/personality.h>
#include <linux/uaccess.h> #include <linux/uaccess.h>
@ -15,12 +16,11 @@
#include <asm/elf.h> #include <asm/elf.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/traps.h>
#include <asm/ucontext.h> #include <asm/ucontext.h>
#include <asm/unistd.h> #include <asm/unistd.h>
#include <asm/vfp.h> #include <asm/vfp.h>
#include "signal.h"
/* /*
* For ARM syscalls, we encode the syscall number into the instruction. * For ARM syscalls, we encode the syscall number into the instruction.
*/ */
@ -40,11 +40,13 @@
#define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE)) #define SWI_THUMB_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_sigreturn - __NR_SYSCALL_BASE))
#define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE)) #define SWI_THUMB_RT_SIGRETURN (0xdf00 << 16 | 0x2700 | (__NR_rt_sigreturn - __NR_SYSCALL_BASE))
const unsigned long sigreturn_codes[7] = { static const unsigned long sigreturn_codes[7] = {
MOV_R7_NR_SIGRETURN, SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN, MOV_R7_NR_SIGRETURN, SWI_SYS_SIGRETURN, SWI_THUMB_SIGRETURN,
MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN, MOV_R7_NR_RT_SIGRETURN, SWI_SYS_RT_SIGRETURN, SWI_THUMB_RT_SIGRETURN,
}; };
static unsigned long signal_return_offset;
#ifdef CONFIG_CRUNCH #ifdef CONFIG_CRUNCH
static int preserve_crunch_context(struct crunch_sigframe __user *frame) static int preserve_crunch_context(struct crunch_sigframe __user *frame)
{ {
@ -400,14 +402,20 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
__put_user(sigreturn_codes[idx+1], rc+1)) __put_user(sigreturn_codes[idx+1], rc+1))
return 1; return 1;
if ((cpsr & MODE32_BIT) && !IS_ENABLED(CONFIG_ARM_MPU)) { #ifdef CONFIG_MMU
if (cpsr & MODE32_BIT) {
struct mm_struct *mm = current->mm;
/* /*
* 32-bit code can use the new high-page * 32-bit code can use the signal return page
* signal return code support except when the MPU has * except when the MPU has protected the vectors
* protected the vectors page from PL0 * page from PL0
*/ */
retcode = KERN_SIGRETURN_CODE + (idx << 2) + thumb; retcode = mm->context.sigpage + signal_return_offset +
} else { (idx << 2) + thumb;
} else
#endif
{
/* /*
* Ensure that the instruction cache sees * Ensure that the instruction cache sees
* the return code written onto the stack. * the return code written onto the stack.
@ -608,3 +616,33 @@ do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
} while (thread_flags & _TIF_WORK_MASK); } while (thread_flags & _TIF_WORK_MASK);
return 0; return 0;
} }
struct page *get_signal_page(void)
{
unsigned long ptr;
unsigned offset;
struct page *page;
void *addr;
page = alloc_pages(GFP_KERNEL, 0);
if (!page)
return NULL;
addr = page_address(page);
/* Give the signal return code some randomness */
offset = 0x200 + (get_random_int() & 0x7fc);
signal_return_offset = offset;
/*
* Copy signal return handlers into the vector page, and
* set sigreturn to be a pointer to these.
*/
memcpy(addr + offset, sigreturn_codes, sizeof(sigreturn_codes));
ptr = (unsigned long)addr + offset;
flush_icache_range(ptr, ptr + sizeof(sigreturn_codes));
return page;
}

View file

@ -1,12 +0,0 @@
/*
* linux/arch/arm/kernel/signal.h
*
* Copyright (C) 2005-2009 Russell King.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#define KERN_SIGRETURN_CODE (CONFIG_VECTORS_BASE + 0x00000500)
extern const unsigned long sigreturn_codes[7];

View file

@ -145,6 +145,16 @@ int boot_secondary(unsigned int cpu, struct task_struct *idle)
return -ENOSYS; return -ENOSYS;
} }
int platform_can_cpu_hotplug(void)
{
#ifdef CONFIG_HOTPLUG_CPU
if (smp_ops.cpu_kill)
return 1;
#endif
return 0;
}
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
static void percpu_timer_stop(void); static void percpu_timer_stop(void);

View file

@ -70,23 +70,6 @@ static inline void ipi_flush_bp_all(void *ignored)
local_flush_bp_all(); local_flush_bp_all();
} }
#ifdef CONFIG_ARM_ERRATA_798181
static int erratum_a15_798181(void)
{
unsigned int midr = read_cpuid_id();
/* Cortex-A15 r0p0..r3p2 affected */
if ((midr & 0xff0ffff0) != 0x410fc0f0 || midr > 0x413fc0f2)
return 0;
return 1;
}
#else
static int erratum_a15_798181(void)
{
return 0;
}
#endif
static void ipi_flush_tlb_a15_erratum(void *arg) static void ipi_flush_tlb_a15_erratum(void *arg)
{ {
dmb(); dmb();

View file

@ -35,8 +35,6 @@
#include <asm/tls.h> #include <asm/tls.h>
#include <asm/system_misc.h> #include <asm/system_misc.h>
#include "signal.h"
static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" }; static const char *handler[]= { "prefetch abort", "data abort", "address exception", "interrupt" };
void *vectors_page; void *vectors_page;
@ -800,15 +798,26 @@ void __init trap_init(void)
return; return;
} }
static void __init kuser_get_tls_init(unsigned long vectors) #ifdef CONFIG_KUSER_HELPERS
static void __init kuser_init(void *vectors)
{ {
extern char __kuser_helper_start[], __kuser_helper_end[];
int kuser_sz = __kuser_helper_end - __kuser_helper_start;
memcpy(vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);
/* /*
* vectors + 0xfe0 = __kuser_get_tls * vectors + 0xfe0 = __kuser_get_tls
* vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8 * vectors + 0xfe8 = hardware TLS instruction at 0xffff0fe8
*/ */
if (tls_emu || has_tls_reg) if (tls_emu || has_tls_reg)
memcpy((void *)vectors + 0xfe0, (void *)vectors + 0xfe8, 4); memcpy(vectors + 0xfe0, vectors + 0xfe8, 4);
} }
#else
static void __init kuser_init(void *vectors)
{
}
#endif
void __init early_trap_init(void *vectors_base) void __init early_trap_init(void *vectors_base)
{ {
@ -816,33 +825,30 @@ void __init early_trap_init(void *vectors_base)
unsigned long vectors = (unsigned long)vectors_base; unsigned long vectors = (unsigned long)vectors_base;
extern char __stubs_start[], __stubs_end[]; extern char __stubs_start[], __stubs_end[];
extern char __vectors_start[], __vectors_end[]; extern char __vectors_start[], __vectors_end[];
extern char __kuser_helper_start[], __kuser_helper_end[]; unsigned i;
int kuser_sz = __kuser_helper_end - __kuser_helper_start;
vectors_page = vectors_base; vectors_page = vectors_base;
/*
* Poison the vectors page with an undefined instruction. This
* instruction is chosen to be undefined for both ARM and Thumb
* ISAs. The Thumb version is an undefined instruction with a
* branch back to the undefined instruction.
*/
for (i = 0; i < PAGE_SIZE / sizeof(u32); i++)
((u32 *)vectors_base)[i] = 0xe7fddef1;
/* /*
* Copy the vectors, stubs and kuser helpers (in entry-armv.S) * Copy the vectors, stubs and kuser helpers (in entry-armv.S)
* into the vector page, mapped at 0xffff0000, and ensure these * into the vector page, mapped at 0xffff0000, and ensure these
* are visible to the instruction stream. * are visible to the instruction stream.
*/ */
memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start); memcpy((void *)vectors, __vectors_start, __vectors_end - __vectors_start);
memcpy((void *)vectors + 0x200, __stubs_start, __stubs_end - __stubs_start); memcpy((void *)vectors + 0x1000, __stubs_start, __stubs_end - __stubs_start);
memcpy((void *)vectors + 0x1000 - kuser_sz, __kuser_helper_start, kuser_sz);
/* kuser_init(vectors_base);
* Do processor specific fixups for the kuser helpers
*/
kuser_get_tls_init(vectors);
/* flush_icache_range(vectors, vectors + PAGE_SIZE * 2);
* Copy signal return handlers into the vector page, and
* set sigreturn to be a pointer to these.
*/
memcpy((void *)(vectors + KERN_SIGRETURN_CODE - CONFIG_VECTORS_BASE),
sigreturn_codes, sizeof(sigreturn_codes));
flush_icache_range(vectors, vectors + PAGE_SIZE);
modify_domain(DOMAIN_USER, DOMAIN_CLIENT); modify_domain(DOMAIN_USER, DOMAIN_CLIENT);
#else /* ifndef CONFIG_CPU_V7M */ #else /* ifndef CONFIG_CPU_V7M */
/* /*

View file

@ -148,6 +148,23 @@ SECTIONS
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__init_begin = .; __init_begin = .;
#endif #endif
/*
* The vectors and stubs are relocatable code, and the
* only thing that matters is their relative offsets
*/
__vectors_start = .;
.vectors 0 : AT(__vectors_start) {
*(.vectors)
}
. = __vectors_start + SIZEOF(.vectors);
__vectors_end = .;
__stubs_start = .;
.stubs 0x1000 : AT(__stubs_start) {
*(.stubs)
}
. = __stubs_start + SIZEOF(.stubs);
__stubs_end = .;
INIT_TEXT_SECTION(8) INIT_TEXT_SECTION(8)
.exit.text : { .exit.text : {

View file

@ -121,8 +121,7 @@ config MSM_SMD
bool bool
config MSM_GPIOMUX config MSM_GPIOMUX
depends on !(ARCH_MSM8X60 || ARCH_MSM8960) bool
bool "MSM V1 TLMM GPIOMUX architecture"
help help
Support for MSM V1 TLMM GPIOMUX architecture. Support for MSM V1 TLMM GPIOMUX architecture.

View file

@ -1,33 +0,0 @@
/* Copyright (c) 2010, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
#include <linux/kernel.h>
#include "gpiomux.h"
#include "proc_comm.h"
void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val)
{
unsigned tlmm_config = (val & ~GPIOMUX_CTL_MASK) |
((gpio & 0x3ff) << 4);
unsigned tlmm_disable = 0;
int rc;
rc = msm_proc_comm(PCOM_RPC_GPIO_TLMM_CONFIG_EX,
&tlmm_config, &tlmm_disable);
if (rc)
pr_err("%s: unexpected proc_comm failure %d: %08x %08x\n",
__func__, rc, tlmm_config, tlmm_disable);
}

View file

@ -73,16 +73,6 @@ extern struct msm_gpiomux_config msm_gpiomux_configs[GPIOMUX_NGPIOS];
int msm_gpiomux_write(unsigned gpio, int msm_gpiomux_write(unsigned gpio,
gpiomux_config_t active, gpiomux_config_t active,
gpiomux_config_t suspended); gpiomux_config_t suspended);
/* Architecture-internal function for use by the framework only.
* This function can assume the following:
* - the gpio value has passed a bounds-check
* - the gpiomux spinlock has been obtained
*
* This function is not for public consumption. External users
* should use msm_gpiomux_write.
*/
void __msm_gpiomux_write(unsigned gpio, gpiomux_config_t val);
#else #else
static inline int msm_gpiomux_write(unsigned gpio, static inline int msm_gpiomux_write(unsigned gpio,
gpiomux_config_t active, gpiomux_config_t active,

View file

@ -42,7 +42,7 @@
/* Using generic display panel */ /* Using generic display panel */
static struct tfp410_platform_data omap4_dvi_panel = { static struct tfp410_platform_data omap4_dvi_panel = {
.i2c_bus_num = 3, .i2c_bus_num = 2,
.power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
}; };

View file

@ -129,6 +129,7 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
struct device_node *node = pdev->dev.of_node; struct device_node *node = pdev->dev.of_node;
const char *oh_name; const char *oh_name;
int oh_cnt, i, ret = 0; int oh_cnt, i, ret = 0;
bool device_active = false;
oh_cnt = of_property_count_strings(node, "ti,hwmods"); oh_cnt = of_property_count_strings(node, "ti,hwmods");
if (oh_cnt <= 0) { if (oh_cnt <= 0) {
@ -152,6 +153,8 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
goto odbfd_exit1; goto odbfd_exit1;
} }
hwmods[i] = oh; hwmods[i] = oh;
if (oh->flags & HWMOD_INIT_NO_IDLE)
device_active = true;
} }
od = omap_device_alloc(pdev, hwmods, oh_cnt); od = omap_device_alloc(pdev, hwmods, oh_cnt);
@ -172,6 +175,11 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
pdev->dev.pm_domain = &omap_device_pm_domain; pdev->dev.pm_domain = &omap_device_pm_domain;
if (device_active) {
omap_device_enable(pdev);
pm_runtime_set_active(&pdev->dev);
}
odbfd_exit1: odbfd_exit1:
kfree(hwmods); kfree(hwmods);
odbfd_exit: odbfd_exit:
@ -842,6 +850,7 @@ static int __init omap_device_late_idle(struct device *dev, void *data)
{ {
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct omap_device *od = to_omap_device(pdev); struct omap_device *od = to_omap_device(pdev);
int i;
if (!od) if (!od)
return 0; return 0;
@ -850,6 +859,15 @@ static int __init omap_device_late_idle(struct device *dev, void *data)
* If omap_device state is enabled, but has no driver bound, * If omap_device state is enabled, but has no driver bound,
* idle it. * idle it.
*/ */
/*
* Some devices (like memory controllers) are always kept
* enabled, and should not be idled even with no drivers.
*/
for (i = 0; i < od->hwmods_cnt; i++)
if (od->hwmods[i]->flags & HWMOD_INIT_NO_IDLE)
return 0;
if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) { if (od->_driver_status != BUS_NOTIFY_BOUND_DRIVER) {
if (od->_state == OMAP_DEVICE_STATE_ENABLED) { if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
dev_warn(dev, "%s: enabled but no driver. Idling\n", dev_warn(dev, "%s: enabled but no driver. Idling\n",

View file

@ -2386,7 +2386,7 @@ static void __init _init_mpu_rt_base(struct omap_hwmod *oh, void *data)
np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh); np = of_dev_hwmod_lookup(of_find_node_by_name(NULL, "ocp"), oh);
if (np) if (np)
va_start = of_iomap(np, 0); va_start = of_iomap(np, oh->mpu_rt_idx);
} else { } else {
va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start); va_start = ioremap(mem->pa_start, mem->pa_end - mem->pa_start);
} }

View file

@ -95,6 +95,54 @@ extern struct omap_hwmod_sysc_fields omap_hwmod_sysc_type3;
#define MODULEMODE_HWCTRL 1 #define MODULEMODE_HWCTRL 1
#define MODULEMODE_SWCTRL 2 #define MODULEMODE_SWCTRL 2
#define DEBUG_OMAP2UART1_FLAGS 0
#define DEBUG_OMAP2UART2_FLAGS 0
#define DEBUG_OMAP2UART3_FLAGS 0
#define DEBUG_OMAP3UART3_FLAGS 0
#define DEBUG_OMAP3UART4_FLAGS 0
#define DEBUG_OMAP4UART3_FLAGS 0
#define DEBUG_OMAP4UART4_FLAGS 0
#define DEBUG_TI81XXUART1_FLAGS 0
#define DEBUG_TI81XXUART2_FLAGS 0
#define DEBUG_TI81XXUART3_FLAGS 0
#define DEBUG_AM33XXUART1_FLAGS 0
#define DEBUG_OMAPUART_FLAGS (HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET)
#if defined(CONFIG_DEBUG_OMAP2UART1)
#undef DEBUG_OMAP2UART1_FLAGS
#define DEBUG_OMAP2UART1_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_OMAP2UART2)
#undef DEBUG_OMAP2UART2_FLAGS
#define DEBUG_OMAP2UART2_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_OMAP2UART3)
#undef DEBUG_OMAP2UART3_FLAGS
#define DEBUG_OMAP2UART3_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_OMAP3UART3)
#undef DEBUG_OMAP3UART3_FLAGS
#define DEBUG_OMAP3UART3_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_OMAP3UART4)
#undef DEBUG_OMAP3UART4_FLAGS
#define DEBUG_OMAP3UART4_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_OMAP4UART3)
#undef DEBUG_OMAP4UART3_FLAGS
#define DEBUG_OMAP4UART3_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_OMAP4UART4)
#undef DEBUG_OMAP4UART4_FLAGS
#define DEBUG_OMAP4UART4_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_TI81XXUART1)
#undef DEBUG_TI81XXUART1_FLAGS
#define DEBUG_TI81XXUART1_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_TI81XXUART2)
#undef DEBUG_TI81XXUART2_FLAGS
#define DEBUG_TI81XXUART2_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_TI81XXUART3)
#undef DEBUG_TI81XXUART3_FLAGS
#define DEBUG_TI81XXUART3_FLAGS DEBUG_OMAPUART_FLAGS
#elif defined(CONFIG_DEBUG_AM33XXUART1)
#undef DEBUG_AM33XXUART1_FLAGS
#define DEBUG_AM33XXUART1_FLAGS DEBUG_OMAPUART_FLAGS
#endif
/** /**
* struct omap_hwmod_mux_info - hwmod specific mux configuration * struct omap_hwmod_mux_info - hwmod specific mux configuration
@ -568,6 +616,7 @@ struct omap_hwmod_link {
* @voltdm: pointer to voltage domain (filled in at runtime) * @voltdm: pointer to voltage domain (filled in at runtime)
* @dev_attr: arbitrary device attributes that can be passed to the driver * @dev_attr: arbitrary device attributes that can be passed to the driver
* @_sysc_cache: internal-use hwmod flags * @_sysc_cache: internal-use hwmod flags
* @mpu_rt_idx: index of device address space for register target (for DT boot)
* @_mpu_rt_va: cached register target start address (internal use) * @_mpu_rt_va: cached register target start address (internal use)
* @_mpu_port: cached MPU register target slave (internal use) * @_mpu_port: cached MPU register target slave (internal use)
* @opt_clks_cnt: number of @opt_clks * @opt_clks_cnt: number of @opt_clks
@ -617,6 +666,7 @@ struct omap_hwmod {
struct list_head node; struct list_head node;
struct omap_hwmod_ocp_if *_mpu_port; struct omap_hwmod_ocp_if *_mpu_port;
u16 flags; u16 flags;
u8 mpu_rt_idx;
u8 response_lat; u8 response_lat;
u8 rst_lines_cnt; u8 rst_lines_cnt;
u8 opt_clks_cnt; u8 opt_clks_cnt;

View file

@ -512,7 +512,7 @@ struct omap_hwmod omap2xxx_uart1_hwmod = {
.mpu_irqs = omap2_uart1_mpu_irqs, .mpu_irqs = omap2_uart1_mpu_irqs,
.sdma_reqs = omap2_uart1_sdma_reqs, .sdma_reqs = omap2_uart1_sdma_reqs,
.main_clk = "uart1_fck", .main_clk = "uart1_fck",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_OMAP2UART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.prcm = { .prcm = {
.omap2 = { .omap2 = {
.module_offs = CORE_MOD, .module_offs = CORE_MOD,
@ -532,7 +532,7 @@ struct omap_hwmod omap2xxx_uart2_hwmod = {
.mpu_irqs = omap2_uart2_mpu_irqs, .mpu_irqs = omap2_uart2_mpu_irqs,
.sdma_reqs = omap2_uart2_sdma_reqs, .sdma_reqs = omap2_uart2_sdma_reqs,
.main_clk = "uart2_fck", .main_clk = "uart2_fck",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_OMAP2UART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.prcm = { .prcm = {
.omap2 = { .omap2 = {
.module_offs = CORE_MOD, .module_offs = CORE_MOD,
@ -552,7 +552,7 @@ struct omap_hwmod omap2xxx_uart3_hwmod = {
.mpu_irqs = omap2_uart3_mpu_irqs, .mpu_irqs = omap2_uart3_mpu_irqs,
.sdma_reqs = omap2_uart3_sdma_reqs, .sdma_reqs = omap2_uart3_sdma_reqs,
.main_clk = "uart3_fck", .main_clk = "uart3_fck",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_OMAP2UART3_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.prcm = { .prcm = {
.omap2 = { .omap2 = {
.module_offs = CORE_MOD, .module_offs = CORE_MOD,

View file

@ -562,6 +562,7 @@ static struct omap_hwmod am33xx_cpgmac0_hwmod = {
.clkdm_name = "cpsw_125mhz_clkdm", .clkdm_name = "cpsw_125mhz_clkdm",
.flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY), .flags = (HWMOD_SWSUP_SIDLE | HWMOD_SWSUP_MSTANDBY),
.main_clk = "cpsw_125mhz_gclk", .main_clk = "cpsw_125mhz_gclk",
.mpu_rt_idx = 1,
.prcm = { .prcm = {
.omap4 = { .omap4 = {
.clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET, .clkctrl_offs = AM33XX_CM_PER_CPGMAC0_CLKCTRL_OFFSET,
@ -1512,7 +1513,7 @@ static struct omap_hwmod am33xx_uart1_hwmod = {
.name = "uart1", .name = "uart1",
.class = &uart_class, .class = &uart_class,
.clkdm_name = "l4_wkup_clkdm", .clkdm_name = "l4_wkup_clkdm",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_AM33XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.main_clk = "dpll_per_m2_div4_wkupdm_ck", .main_clk = "dpll_per_m2_div4_wkupdm_ck",
.prcm = { .prcm = {
.omap4 = { .omap4 = {

View file

@ -490,7 +490,7 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
.mpu_irqs = omap2_uart1_mpu_irqs, .mpu_irqs = omap2_uart1_mpu_irqs,
.sdma_reqs = omap2_uart1_sdma_reqs, .sdma_reqs = omap2_uart1_sdma_reqs,
.main_clk = "uart1_fck", .main_clk = "uart1_fck",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_TI81XXUART1_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.prcm = { .prcm = {
.omap2 = { .omap2 = {
.module_offs = CORE_MOD, .module_offs = CORE_MOD,
@ -509,7 +509,7 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
.mpu_irqs = omap2_uart2_mpu_irqs, .mpu_irqs = omap2_uart2_mpu_irqs,
.sdma_reqs = omap2_uart2_sdma_reqs, .sdma_reqs = omap2_uart2_sdma_reqs,
.main_clk = "uart2_fck", .main_clk = "uart2_fck",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_TI81XXUART2_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.prcm = { .prcm = {
.omap2 = { .omap2 = {
.module_offs = CORE_MOD, .module_offs = CORE_MOD,
@ -528,7 +528,8 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
.mpu_irqs = omap2_uart3_mpu_irqs, .mpu_irqs = omap2_uart3_mpu_irqs,
.sdma_reqs = omap2_uart3_sdma_reqs, .sdma_reqs = omap2_uart3_sdma_reqs,
.main_clk = "uart3_fck", .main_clk = "uart3_fck",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_OMAP3UART3_FLAGS | DEBUG_TI81XXUART3_FLAGS |
HWMOD_SWSUP_SIDLE_ACT,
.prcm = { .prcm = {
.omap2 = { .omap2 = {
.module_offs = OMAP3430_PER_MOD, .module_offs = OMAP3430_PER_MOD,
@ -558,7 +559,7 @@ static struct omap_hwmod omap36xx_uart4_hwmod = {
.mpu_irqs = uart4_mpu_irqs, .mpu_irqs = uart4_mpu_irqs,
.sdma_reqs = uart4_sdma_reqs, .sdma_reqs = uart4_sdma_reqs,
.main_clk = "uart4_fck", .main_clk = "uart4_fck",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_OMAP3UART4_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.prcm = { .prcm = {
.omap2 = { .omap2 = {
.module_offs = OMAP3430_PER_MOD, .module_offs = OMAP3430_PER_MOD,

View file

@ -2858,8 +2858,7 @@ static struct omap_hwmod omap44xx_uart3_hwmod = {
.name = "uart3", .name = "uart3",
.class = &omap44xx_uart_hwmod_class, .class = &omap44xx_uart_hwmod_class,
.clkdm_name = "l4_per_clkdm", .clkdm_name = "l4_per_clkdm",
.flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET | .flags = DEBUG_OMAP4UART3_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
HWMOD_SWSUP_SIDLE_ACT,
.main_clk = "func_48m_fclk", .main_clk = "func_48m_fclk",
.prcm = { .prcm = {
.omap4 = { .omap4 = {
@ -2875,7 +2874,7 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
.name = "uart4", .name = "uart4",
.class = &omap44xx_uart_hwmod_class, .class = &omap44xx_uart_hwmod_class,
.clkdm_name = "l4_per_clkdm", .clkdm_name = "l4_per_clkdm",
.flags = HWMOD_SWSUP_SIDLE_ACT, .flags = DEBUG_OMAP4UART4_FLAGS | HWMOD_SWSUP_SIDLE_ACT,
.main_clk = "func_48m_fclk", .main_clk = "func_48m_fclk",
.prcm = { .prcm = {
.omap4 = { .omap4 = {

View file

@ -1375,7 +1375,7 @@ static struct omap_hwmod omap54xx_uart3_hwmod = {
.name = "uart3", .name = "uart3",
.class = &omap54xx_uart_hwmod_class, .class = &omap54xx_uart_hwmod_class,
.clkdm_name = "l4per_clkdm", .clkdm_name = "l4per_clkdm",
.flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET, .flags = DEBUG_OMAP4UART3_FLAGS,
.main_clk = "func_48m_fclk", .main_clk = "func_48m_fclk",
.prcm = { .prcm = {
.omap4 = { .omap4 = {
@ -1391,6 +1391,7 @@ static struct omap_hwmod omap54xx_uart4_hwmod = {
.name = "uart4", .name = "uart4",
.class = &omap54xx_uart_hwmod_class, .class = &omap54xx_uart_hwmod_class,
.clkdm_name = "l4per_clkdm", .clkdm_name = "l4per_clkdm",
.flags = DEBUG_OMAP4UART4_FLAGS,
.main_clk = "func_48m_fclk", .main_clk = "func_48m_fclk",
.prcm = { .prcm = {
.omap4 = { .omap4 = {

View file

@ -208,17 +208,6 @@ static int __init omap_serial_early_init(void)
pr_info("%s used as console in debug mode: uart%d clocks will not be gated", pr_info("%s used as console in debug mode: uart%d clocks will not be gated",
uart_name, uart->num); uart_name, uart->num);
} }
/*
* omap-uart can be used for earlyprintk logs
* So if omap-uart is used as console then prevent
* uart reset and idle to get logs from omap-uart
* until uart console driver is available to take
* care for console messages.
* Idling or resetting omap-uart while printing logs
* early boot logs can stall the boot-up.
*/
oh->flags |= HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET;
} }
} while (1); } while (1);

View file

@ -1162,9 +1162,6 @@ static void __init eva_init(void)
gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ gpio_request_one(61, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */
gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */ gpio_request_one(202, GPIOF_OUT_INIT_LOW, NULL); /* LCD0_LED_CONT */
/* Touchscreen */
gpio_request_one(166, GPIOF_OUT_INIT_HIGH, NULL); /* TP_RST_B */
/* GETHER */ /* GETHER */
gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */ gpio_request_one(18, GPIOF_OUT_INIT_HIGH, NULL); /* PHY_RST */

View file

@ -167,7 +167,13 @@ static const struct pinctrl_map bockw_pinctrl_map[] = {
"usb1", "usb1"), "usb1", "usb1"),
/* SDHI0 */ /* SDHI0 */
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
"sdhi0", "sdhi0"), "sdhi0_data4", "sdhi0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
"sdhi0_ctrl", "sdhi0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
"sdhi0_cd", "sdhi0"),
PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778",
"sdhi0_wp", "sdhi0"),
}; };
#define FPGA 0x18200000 #define FPGA 0x18200000

View file

@ -59,7 +59,7 @@ static __initdata struct gpio_led_platform_data lager_leds_pdata = {
#define GPIO_KEY(c, g, d, ...) \ #define GPIO_KEY(c, g, d, ...) \
{ .code = c, .gpio = g, .desc = d, .active_low = 1 } { .code = c, .gpio = g, .desc = d, .active_low = 1 }
static __initdata struct gpio_keys_button gpio_buttons[] = { static struct gpio_keys_button gpio_buttons[] = {
GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"),
GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"), GPIO_KEY(KEY_3, RCAR_GP_PIN(1, 26), "SW2-pin3"),
GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"), GPIO_KEY(KEY_2, RCAR_GP_PIN(1, 24), "SW2-pin2"),

View file

@ -16,8 +16,6 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h> #include <linux/init.h>
__INIT
/* /*
* ST specific entry point for secondary CPUs. This provides * ST specific entry point for secondary CPUs. This provides
* a "holding pen" into which all secondary cores are held until we're * a "holding pen" into which all secondary cores are held until we're

View file

@ -421,24 +421,28 @@ config CPU_32v3
select CPU_USE_DOMAINS if MMU select CPU_USE_DOMAINS if MMU
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
select TLS_REG_EMUL if SMP || !MMU select TLS_REG_EMUL if SMP || !MMU
select NEED_KUSER_HELPERS
config CPU_32v4 config CPU_32v4
bool bool
select CPU_USE_DOMAINS if MMU select CPU_USE_DOMAINS if MMU
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
select TLS_REG_EMUL if SMP || !MMU select TLS_REG_EMUL if SMP || !MMU
select NEED_KUSER_HELPERS
config CPU_32v4T config CPU_32v4T
bool bool
select CPU_USE_DOMAINS if MMU select CPU_USE_DOMAINS if MMU
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
select TLS_REG_EMUL if SMP || !MMU select TLS_REG_EMUL if SMP || !MMU
select NEED_KUSER_HELPERS
config CPU_32v5 config CPU_32v5
bool bool
select CPU_USE_DOMAINS if MMU select CPU_USE_DOMAINS if MMU
select NEEDS_SYSCALL_FOR_CMPXCHG if SMP select NEEDS_SYSCALL_FOR_CMPXCHG if SMP
select TLS_REG_EMUL if SMP || !MMU select TLS_REG_EMUL if SMP || !MMU
select NEED_KUSER_HELPERS
config CPU_32v6 config CPU_32v6
bool bool
@ -776,6 +780,7 @@ config CPU_BPREDICT_DISABLE
config TLS_REG_EMUL config TLS_REG_EMUL
bool bool
select NEED_KUSER_HELPERS
help help
An SMP system using a pre-ARMv6 processor (there are apparently An SMP system using a pre-ARMv6 processor (there are apparently
a few prototypes like that in existence) and therefore access to a few prototypes like that in existence) and therefore access to
@ -783,11 +788,40 @@ config TLS_REG_EMUL
config NEEDS_SYSCALL_FOR_CMPXCHG config NEEDS_SYSCALL_FOR_CMPXCHG
bool bool
select NEED_KUSER_HELPERS
help help
SMP on a pre-ARMv6 processor? Well OK then. SMP on a pre-ARMv6 processor? Well OK then.
Forget about fast user space cmpxchg support. Forget about fast user space cmpxchg support.
It is just not possible. It is just not possible.
config NEED_KUSER_HELPERS
bool
config KUSER_HELPERS
bool "Enable kuser helpers in vector page" if !NEED_KUSER_HELPERS
default y
help
Warning: disabling this option may break user programs.
Provide kuser helpers in the vector page. The kernel provides
helper code to userspace in read only form at a fixed location
in the high vector page to allow userspace to be independent of
the CPU type fitted to the system. This permits binaries to be
run on ARMv4 through to ARMv7 without modification.
However, the fixed address nature of these helpers can be used
by ROP (return orientated programming) authors when creating
exploits.
If all of the binaries and libraries which run on your platform
are built specifically for your platform, and make no use of
these helpers, then you can turn this option off. However,
when such an binary or library is run, it will receive a SIGILL
signal, which will terminate the program.
Say N here only if you are absolutely certain that you do not
need these helpers; otherwise, the safe option is to say Y.
config DMA_CACHE_RWFO config DMA_CACHE_RWFO
bool "Enable read/write for ownership DMA cache maintenance" bool "Enable read/write for ownership DMA cache maintenance"
depends on CPU_V6K && SMP depends on CPU_V6K && SMP

View file

@ -245,7 +245,8 @@ void check_and_switch_context(struct mm_struct *mm, struct task_struct *tsk)
if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) { if (cpumask_test_and_clear_cpu(cpu, &tlb_flush_pending)) {
local_flush_bp_all(); local_flush_bp_all();
local_flush_tlb_all(); local_flush_tlb_all();
dummy_flush_tlb_a15_erratum(); if (erratum_a15_798181())
dummy_flush_tlb_a15_erratum();
} }
atomic64_set(&per_cpu(active_asids, cpu), asid); atomic64_set(&per_cpu(active_asids, cpu), asid);

View file

@ -989,6 +989,7 @@ phys_addr_t arm_lowmem_limit __initdata = 0;
void __init sanity_check_meminfo(void) void __init sanity_check_meminfo(void)
{ {
phys_addr_t memblock_limit = 0;
int i, j, highmem = 0; int i, j, highmem = 0;
phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1;
@ -1052,9 +1053,32 @@ void __init sanity_check_meminfo(void)
bank->size = size_limit; bank->size = size_limit;
} }
#endif #endif
if (!bank->highmem && bank->start + bank->size > arm_lowmem_limit) if (!bank->highmem) {
arm_lowmem_limit = bank->start + bank->size; phys_addr_t bank_end = bank->start + bank->size;
if (bank_end > arm_lowmem_limit)
arm_lowmem_limit = bank_end;
/*
* Find the first non-section-aligned page, and point
* memblock_limit at it. This relies on rounding the
* limit down to be section-aligned, which happens at
* the end of this function.
*
* With this algorithm, the start or end of almost any
* bank can be non-section-aligned. The only exception
* is that the start of the bank 0 must be section-
* aligned, since otherwise memory would need to be
* allocated when mapping the start of bank 0, which
* occurs before any free memory is mapped.
*/
if (!memblock_limit) {
if (!IS_ALIGNED(bank->start, SECTION_SIZE))
memblock_limit = bank->start;
else if (!IS_ALIGNED(bank_end, SECTION_SIZE))
memblock_limit = bank_end;
}
}
j++; j++;
} }
#ifdef CONFIG_HIGHMEM #ifdef CONFIG_HIGHMEM
@ -1079,7 +1103,18 @@ void __init sanity_check_meminfo(void)
#endif #endif
meminfo.nr_banks = j; meminfo.nr_banks = j;
high_memory = __va(arm_lowmem_limit - 1) + 1; high_memory = __va(arm_lowmem_limit - 1) + 1;
memblock_set_current_limit(arm_lowmem_limit);
/*
* Round the memblock limit down to a section size. This
* helps to ensure that we will allocate memory from the
* last full section, which should be mapped.
*/
if (memblock_limit)
memblock_limit = round_down(memblock_limit, SECTION_SIZE);
if (!memblock_limit)
memblock_limit = arm_lowmem_limit;
memblock_set_current_limit(memblock_limit);
} }
static inline void prepare_page_table(void) static inline void prepare_page_table(void)
@ -1160,7 +1195,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
/* /*
* Allocate the vector page early. * Allocate the vector page early.
*/ */
vectors = early_alloc(PAGE_SIZE); vectors = early_alloc(PAGE_SIZE * 2);
early_trap_init(vectors); early_trap_init(vectors);
@ -1205,15 +1240,27 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
map.pfn = __phys_to_pfn(virt_to_phys(vectors)); map.pfn = __phys_to_pfn(virt_to_phys(vectors));
map.virtual = 0xffff0000; map.virtual = 0xffff0000;
map.length = PAGE_SIZE; map.length = PAGE_SIZE;
#ifdef CONFIG_KUSER_HELPERS
map.type = MT_HIGH_VECTORS; map.type = MT_HIGH_VECTORS;
#else
map.type = MT_LOW_VECTORS;
#endif
create_mapping(&map); create_mapping(&map);
if (!vectors_high()) { if (!vectors_high()) {
map.virtual = 0; map.virtual = 0;
map.length = PAGE_SIZE * 2;
map.type = MT_LOW_VECTORS; map.type = MT_LOW_VECTORS;
create_mapping(&map); create_mapping(&map);
} }
/* Now create a kernel read-only mapping */
map.pfn += 1;
map.virtual = 0xffff0000 + PAGE_SIZE;
map.length = PAGE_SIZE;
map.type = MT_LOW_VECTORS;
create_mapping(&map);
/* /*
* Ask the machine support to map in the statically mapped devices. * Ask the machine support to map in the statically mapped devices.
*/ */
@ -1276,8 +1323,6 @@ void __init paging_init(struct machine_desc *mdesc)
{ {
void *zero_page; void *zero_page;
memblock_set_current_limit(arm_lowmem_limit);
build_mem_type_table(); build_mem_type_table();
prepare_page_table(); prepare_page_table();
map_lowmem(); map_lowmem();

View file

@ -110,7 +110,7 @@ ENTRY(cpu_v7_set_pte_ext)
ARM( str r3, [r0, #2048]! ) ARM( str r3, [r0, #2048]! )
THUMB( add r0, r0, #2048 ) THUMB( add r0, r0, #2048 )
THUMB( str r3, [r0] ) THUMB( str r3, [r0] )
ALT_SMP(mov pc,lr) ALT_SMP(W(nop))
ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte
#endif #endif
mov pc, lr mov pc, lr

View file

@ -81,7 +81,7 @@ ENTRY(cpu_v7_set_pte_ext)
tst r3, #1 << (55 - 32) @ L_PTE_DIRTY tst r3, #1 << (55 - 32) @ L_PTE_DIRTY
orreq r2, #L_PTE_RDONLY orreq r2, #L_PTE_RDONLY
1: strd r2, r3, [r0] 1: strd r2, r3, [r0]
ALT_SMP(mov pc, lr) ALT_SMP(W(nop))
ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte ALT_UP (mcr p15, 0, r0, c7, c10, 1) @ flush_pte
#endif #endif
mov pc, lr mov pc, lr

View file

@ -75,13 +75,14 @@ ENTRY(cpu_v7_do_idle)
ENDPROC(cpu_v7_do_idle) ENDPROC(cpu_v7_do_idle)
ENTRY(cpu_v7_dcache_clean_area) ENTRY(cpu_v7_dcache_clean_area)
ALT_SMP(mov pc, lr) @ MP extensions imply L1 PTW ALT_SMP(W(nop)) @ MP extensions imply L1 PTW
ALT_UP(W(nop)) ALT_UP_B(1f)
dcache_line_size r2, r3 mov pc, lr
1: mcr p15, 0, r0, c7, c10, 1 @ clean D entry 1: dcache_line_size r2, r3
2: mcr p15, 0, r0, c7, c10, 1 @ clean D entry
add r0, r0, r2 add r0, r0, r2
subs r1, r1, r2 subs r1, r1, r2
bhi 1b bhi 2b
dsb dsb
mov pc, lr mov pc, lr
ENDPROC(cpu_v7_dcache_clean_area) ENDPROC(cpu_v7_dcache_clean_area)

View file

@ -172,7 +172,7 @@ static void __init xen_percpu_init(void *unused)
enable_percpu_irq(xen_events_irq, 0); enable_percpu_irq(xen_events_irq, 0);
} }
static void xen_restart(char str, const char *cmd) static void xen_restart(enum reboot_mode reboot_mode, const char *cmd)
{ {
struct sched_shutdown r = { .reason = SHUTDOWN_reboot }; struct sched_shutdown r = { .reason = SHUTDOWN_reboot };
int rc; int rc;

View file

@ -35,6 +35,7 @@ struct mmu_gather {
struct mm_struct *mm; struct mm_struct *mm;
unsigned int fullmm; unsigned int fullmm;
struct vm_area_struct *vma; struct vm_area_struct *vma;
unsigned long start, end;
unsigned long range_start; unsigned long range_start;
unsigned long range_end; unsigned long range_end;
unsigned int nr; unsigned int nr;
@ -97,10 +98,12 @@ static inline void tlb_flush_mmu(struct mmu_gather *tlb)
} }
static inline void static inline void
tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int fullmm) tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end)
{ {
tlb->mm = mm; tlb->mm = mm;
tlb->fullmm = fullmm; tlb->fullmm = !(start | (end+1));
tlb->start = start;
tlb->end = end;
tlb->vma = NULL; tlb->vma = NULL;
tlb->max = ARRAY_SIZE(tlb->local); tlb->max = ARRAY_SIZE(tlb->local);
tlb->pages = tlb->local; tlb->pages = tlb->local;

View file

@ -150,7 +150,6 @@ static struct ac97c_platform_data __initdata ac97c0_data = {
static struct platform_device rmt_ts_device = { static struct platform_device rmt_ts_device = {
.name = "ucb1400_ts", .name = "ucb1400_ts",
.id = -1, .id = -1,
}
}; };
#endif #endif

View file

@ -158,6 +158,7 @@ source "kernel/Kconfig.hz"
endmenu endmenu
source "init/Kconfig" source "init/Kconfig"
source "kernel/Kconfig.freezer"
source "drivers/Kconfig" source "drivers/Kconfig"
source "fs/Kconfig" source "fs/Kconfig"

View file

@ -31,7 +31,7 @@ CONFIG_ACPI_FAN=m
CONFIG_ACPI_DOCK=y CONFIG_ACPI_DOCK=y
CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_CONTAINER=m CONFIG_ACPI_CONTAINER=m
CONFIG_HOTPLUG_PCI=m CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=m CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y

View file

@ -25,7 +25,7 @@ CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_CONTAINER=m CONFIG_ACPI_CONTAINER=m
CONFIG_HOTPLUG_PCI=m CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=m CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y

View file

@ -31,7 +31,7 @@ CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_CONTAINER=m CONFIG_ACPI_CONTAINER=m
CONFIG_HOTPLUG_PCI=m CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=m CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y

View file

@ -32,7 +32,7 @@ CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_FAN=m CONFIG_ACPI_FAN=m
CONFIG_ACPI_PROCESSOR=m CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_CONTAINER=m CONFIG_ACPI_CONTAINER=m
CONFIG_HOTPLUG_PCI=m CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=m CONFIG_HOTPLUG_PCI_ACPI=m
CONFIG_PACKET=y CONFIG_PACKET=y
CONFIG_UNIX=y CONFIG_UNIX=y

View file

@ -22,7 +22,7 @@
* unmapping a portion of the virtual address space, these hooks are called according to * unmapping a portion of the virtual address space, these hooks are called according to
* the following template: * the following template:
* *
* tlb <- tlb_gather_mmu(mm, full_mm_flush); // start unmap for address space MM * tlb <- tlb_gather_mmu(mm, start, end); // start unmap for address space MM
* { * {
* for each vma that needs a shootdown do { * for each vma that needs a shootdown do {
* tlb_start_vma(tlb, vma); * tlb_start_vma(tlb, vma);
@ -58,6 +58,7 @@ struct mmu_gather {
unsigned int max; unsigned int max;
unsigned char fullmm; /* non-zero means full mm flush */ unsigned char fullmm; /* non-zero means full mm flush */
unsigned char need_flush; /* really unmapped some PTEs? */ unsigned char need_flush; /* really unmapped some PTEs? */
unsigned long start, end;
unsigned long start_addr; unsigned long start_addr;
unsigned long end_addr; unsigned long end_addr;
struct page **pages; struct page **pages;
@ -155,13 +156,15 @@ static inline void __tlb_alloc_page(struct mmu_gather *tlb)
static inline void static inline void
tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned int full_mm_flush) tlb_gather_mmu(struct mmu_gather *tlb, struct mm_struct *mm, unsigned long start, unsigned long end)
{ {
tlb->mm = mm; tlb->mm = mm;
tlb->max = ARRAY_SIZE(tlb->local); tlb->max = ARRAY_SIZE(tlb->local);
tlb->pages = tlb->local; tlb->pages = tlb->local;
tlb->nr = 0; tlb->nr = 0;
tlb->fullmm = full_mm_flush; tlb->fullmm = !(start | (end+1));
tlb->start = start;
tlb->end = end;
tlb->start_addr = ~0UL; tlb->start_addr = ~0UL;
} }

View file

@ -18,9 +18,11 @@
#include <asm/machdep.h> #include <asm/machdep.h>
#include <asm/natfeat.h> #include <asm/natfeat.h>
extern long nf_get_id2(const char *feature_name);
asm("\n" asm("\n"
" .global nf_get_id,nf_call\n" " .global nf_get_id2,nf_call\n"
"nf_get_id:\n" "nf_get_id2:\n"
" .short 0x7300\n" " .short 0x7300\n"
" rts\n" " rts\n"
"nf_call:\n" "nf_call:\n"
@ -29,12 +31,25 @@ asm("\n"
"1: moveq.l #0,%d0\n" "1: moveq.l #0,%d0\n"
" rts\n" " rts\n"
" .section __ex_table,\"a\"\n" " .section __ex_table,\"a\"\n"
" .long nf_get_id,1b\n" " .long nf_get_id2,1b\n"
" .long nf_call,1b\n" " .long nf_call,1b\n"
" .previous"); " .previous");
EXPORT_SYMBOL_GPL(nf_get_id);
EXPORT_SYMBOL_GPL(nf_call); EXPORT_SYMBOL_GPL(nf_call);
long nf_get_id(const char *feature_name)
{
/* feature_name may be in vmalloc()ed memory, so make a copy */
char name_copy[32];
size_t n;
n = strlcpy(name_copy, feature_name, sizeof(name_copy));
if (n >= sizeof(name_copy))
return 0;
return nf_get_id2(name_copy);
}
EXPORT_SYMBOL_GPL(nf_get_id);
void nfprint(const char *fmt, ...) void nfprint(const char *fmt, ...)
{ {
static char buf[256]; static char buf[256];

View file

@ -15,16 +15,17 @@
unsigned long long n64; \ unsigned long long n64; \
} __n; \ } __n; \
unsigned long __rem, __upper; \ unsigned long __rem, __upper; \
unsigned long __base = (base); \
\ \
__n.n64 = (n); \ __n.n64 = (n); \
if ((__upper = __n.n32[0])) { \ if ((__upper = __n.n32[0])) { \
asm ("divul.l %2,%1:%0" \ asm ("divul.l %2,%1:%0" \
: "=d" (__n.n32[0]), "=d" (__upper) \ : "=d" (__n.n32[0]), "=d" (__upper) \
: "d" (base), "0" (__n.n32[0])); \ : "d" (__base), "0" (__n.n32[0])); \
} \ } \
asm ("divu.l %2,%1:%0" \ asm ("divu.l %2,%1:%0" \
: "=d" (__n.n32[1]), "=d" (__rem) \ : "=d" (__n.n32[1]), "=d" (__rem) \
: "d" (base), "1" (__upper), "0" (__n.n32[1])); \ : "d" (__base), "1" (__upper), "0" (__n.n32[1])); \
(n) = __n.n64; \ (n) = __n.n64; \
__rem; \ __rem; \
}) })

View file

@ -28,7 +28,7 @@ config MICROBLAZE
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select GENERIC_IDLE_POLL_SETUP select GENERIC_IDLE_POLL_SETUP
select MODULES_USE_ELF_RELA select MODULES_USE_ELF_RELA
select CLONE_BACKWARDS select CLONE_BACKWARDS3
config SWAP config SWAP
def_bool n def_bool n

View file

@ -114,6 +114,7 @@ config BCM47XX
select FW_CFE select FW_CFE
select HW_HAS_PCI select HW_HAS_PCI
select IRQ_CPU select IRQ_CPU
select SYS_HAS_CPU_MIPS32_R1
select NO_EXCEPT_FILL select NO_EXCEPT_FILL
select SYS_SUPPORTS_32BIT_KERNEL select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN

View file

@ -2,7 +2,6 @@ if BCM47XX
config BCM47XX_SSB config BCM47XX_SSB
bool "SSB Support for Broadcom BCM47XX" bool "SSB Support for Broadcom BCM47XX"
select SYS_HAS_CPU_MIPS32_R1
select SSB select SSB
select SSB_DRIVER_MIPS select SSB_DRIVER_MIPS
select SSB_DRIVER_EXTIF select SSB_DRIVER_EXTIF

View file

@ -17,6 +17,8 @@
#define current_cpu_type() current_cpu_data.cputype #define current_cpu_type() current_cpu_data.cputype
#endif #endif
#define boot_cpu_type() cpu_data[0].cputype
/* /*
* SMP assumption: Options of CPU 0 are a superset of all processors. * SMP assumption: Options of CPU 0 are a superset of all processors.
* This is true for all known MIPS systems. * This is true for all known MIPS systems.

View file

@ -25,8 +25,12 @@
#else #else
#define CAC_BASE _AC(0x80000000, UL) #define CAC_BASE _AC(0x80000000, UL)
#endif #endif
#ifndef IO_BASE
#define IO_BASE _AC(0xa0000000, UL) #define IO_BASE _AC(0xa0000000, UL)
#endif
#ifndef UNCAC_BASE
#define UNCAC_BASE _AC(0xa0000000, UL) #define UNCAC_BASE _AC(0xa0000000, UL)
#endif
#ifndef MAP_BASE #ifndef MAP_BASE
#ifdef CONFIG_KVM_GUEST #ifdef CONFIG_KVM_GUEST

View file

@ -25,11 +25,12 @@ struct siginfo;
/* /*
* Careful to keep union _sifields from shifting ... * Careful to keep union _sifields from shifting ...
*/ */
#if __SIZEOF_LONG__ == 4 #if _MIPS_SZLONG == 32
#define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int))
#endif #elif _MIPS_SZLONG == 64
#if __SIZEOF_LONG__ == 8
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int))
#else
#error _MIPS_SZLONG neither 32 nor 64
#endif #endif
#include <asm-generic/siginfo.h> #include <asm-generic/siginfo.h>

View file

@ -54,7 +54,11 @@ LEAF(bmips_smp_movevec)
/* set up CPU1 CBR; move BASE to 0xa000_0000 */ /* set up CPU1 CBR; move BASE to 0xa000_0000 */
li k0, 0xff400000 li k0, 0xff400000
mtc0 k0, $22, 6 mtc0 k0, $22, 6
li k1, CKSEG1 | BMIPS_RELO_VECTOR_CONTROL_1 /* set up relocation vector address based on thread ID */
mfc0 k1, $22, 3
srl k1, 16
andi k1, 0x8000
or k1, CKSEG1 | BMIPS_RELO_VECTOR_CONTROL_0
or k0, k1 or k0, k1
li k1, 0xa0080000 li k1, 0xa0080000
sw k1, 0(k0) sw k1, 0(k0)

View file

@ -66,6 +66,8 @@ static void __init bmips_smp_setup(void)
int i, cpu = 1, boot_cpu = 0; int i, cpu = 1, boot_cpu = 0;
#if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380)
int cpu_hw_intr;
/* arbitration priority */ /* arbitration priority */
clear_c0_brcm_cmt_ctrl(0x30); clear_c0_brcm_cmt_ctrl(0x30);
@ -79,15 +81,13 @@ static void __init bmips_smp_setup(void)
* MIPS interrupts 0,1 (SW INT 0,1) cross over to the other thread * MIPS interrupts 0,1 (SW INT 0,1) cross over to the other thread
* MIPS interrupt 2 (HW INT 0) is the CPU0 L1 controller output * MIPS interrupt 2 (HW INT 0) is the CPU0 L1 controller output
* MIPS interrupt 3 (HW INT 1) is the CPU1 L1 controller output * MIPS interrupt 3 (HW INT 1) is the CPU1 L1 controller output
*
* If booting from TP1, leave the existing CMT interrupt routing
* such that TP0 responds to SW1 and TP1 responds to SW0.
*/ */
if (boot_cpu == 0) if (boot_cpu == 0)
change_c0_brcm_cmt_intr(0xf8018000, cpu_hw_intr = 0x02;
(0x02 << 27) | (0x03 << 15));
else else
change_c0_brcm_cmt_intr(0xf8018000, (0x1d << 27)); cpu_hw_intr = 0x1d;
change_c0_brcm_cmt_intr(0xf8018000, (cpu_hw_intr << 27) | (0x03 << 15));
/* single core, 2 threads (2 pipelines) */ /* single core, 2 threads (2 pipelines) */
max_cpus = 2; max_cpus = 2;
@ -202,9 +202,15 @@ static void bmips_init_secondary(void)
#if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380) #if defined(CONFIG_CPU_BMIPS4350) || defined(CONFIG_CPU_BMIPS4380)
void __iomem *cbr = BMIPS_GET_CBR(); void __iomem *cbr = BMIPS_GET_CBR();
unsigned long old_vec; unsigned long old_vec;
unsigned long relo_vector;
int boot_cpu;
old_vec = __raw_readl(cbr + BMIPS_RELO_VECTOR_CONTROL_1); boot_cpu = !!(read_c0_brcm_cmt_local() & (1 << 31));
__raw_writel(old_vec & ~0x20000000, cbr + BMIPS_RELO_VECTOR_CONTROL_1); relo_vector = boot_cpu ? BMIPS_RELO_VECTOR_CONTROL_0 :
BMIPS_RELO_VECTOR_CONTROL_1;
old_vec = __raw_readl(cbr + relo_vector);
__raw_writel(old_vec & ~0x20000000, cbr + relo_vector);
clear_c0_cause(smp_processor_id() ? C_SW1 : C_SW0); clear_c0_cause(smp_processor_id() ? C_SW1 : C_SW0);
#elif defined(CONFIG_CPU_BMIPS5000) #elif defined(CONFIG_CPU_BMIPS5000)

View file

@ -166,7 +166,7 @@ static void mipsxx_reg_setup(struct op_counter_config *ctr)
reg.control[i] |= M_PERFCTL_USER; reg.control[i] |= M_PERFCTL_USER;
if (ctr[i].exl) if (ctr[i].exl)
reg.control[i] |= M_PERFCTL_EXL; reg.control[i] |= M_PERFCTL_EXL;
if (current_cpu_type() == CPU_XLR) if (boot_cpu_type() == CPU_XLR)
reg.control[i] |= M_PERFCTL_COUNT_ALL_THREADS; reg.control[i] |= M_PERFCTL_COUNT_ALL_THREADS;
reg.counter[i] = 0x80000000 - ctr[i].count; reg.counter[i] = 0x80000000 - ctr[i].count;
} }

View file

@ -206,11 +206,13 @@ static struct resource pnx833x_ethernet_resources[] = {
.end = PNX8335_IP3902_PORTS_END, .end = PNX8335_IP3902_PORTS_END,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
#ifdef CONFIG_SOC_PNX8335
[1] = { [1] = {
.start = PNX8335_PIC_ETHERNET_INT, .start = PNX8335_PIC_ETHERNET_INT,
.end = PNX8335_PIC_ETHERNET_INT, .end = PNX8335_PIC_ETHERNET_INT,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
#endif
}; };
static struct platform_device pnx833x_ethernet_device = { static struct platform_device pnx833x_ethernet_device = {

View file

@ -529,8 +529,7 @@ EXPORT_SYMBOL(asic_resource_get);
*/ */
void platform_release_memory(void *ptr, int size) void platform_release_memory(void *ptr, int size)
{ {
free_reserved_area((unsigned long)ptr, (unsigned long)(ptr + size), free_reserved_area(ptr, ptr + size, -1, NULL);
-1, NULL);
} }
EXPORT_SYMBOL(platform_release_memory); EXPORT_SYMBOL(platform_release_memory);

View file

@ -55,6 +55,7 @@ config GENERIC_CSUM
source "init/Kconfig" source "init/Kconfig"
source "kernel/Kconfig.freezer"
menu "Processor type and features" menu "Processor type and features"

View file

@ -0,0 +1,279 @@
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_FHANDLE=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_LZO=y
CONFIG_EXPERT=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_PA8X00=y
CONFIG_MLONGCALLS=y
CONFIG_64BIT=y
CONFIG_SMP=y
CONFIG_PREEMPT=y
# CONFIG_CROSS_MEMORY_ATTACH is not set
CONFIG_IOMMU_CCIO=y
CONFIG_PCI=y
CONFIG_PCI_LBA=y
# CONFIG_SUPERIO is not set
# CONFIG_CHASSIS_LCD_LED is not set
# CONFIG_PDC_CHASSIS is not set
# CONFIG_PDC_CHASSIS_WARN is not set
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=m
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM_USER=m
CONFIG_XFRM_SUB_POLICY=y
CONFIG_NET_KEY=m
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_NET_IPIP=m
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
CONFIG_INET_AH=m
CONFIG_INET_ESP=m
CONFIG_INET_IPCOMP=m
CONFIG_INET_XFRM_MODE_BEET=m
CONFIG_INET_DIAG=m
# CONFIG_IPV6 is not set
CONFIG_IP_DCCP=m
# CONFIG_IP_DCCP_CCID3 is not set
CONFIG_TIPC=m
CONFIG_LLC2=m
CONFIG_DNS_RESOLVER=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
# CONFIG_STANDALONE is not set
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
CONFIG_PARPORT_PC_FIFO=y
CONFIG_BLK_DEV_UMEM=m
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_SX8=m
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=6144
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_WCACHE=y
CONFIG_ATA_OVER_ETH=m
CONFIG_IDE=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_PLATFORM=y
CONFIG_BLK_DEV_GENERIC=y
CONFIG_BLK_DEV_SIIMAGE=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=m
CONFIG_BLK_DEV_SR=m
CONFIG_CHR_DEV_SG=y
CONFIG_CHR_DEV_SCH=m
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_SAS_LIBSAS=m
CONFIG_ISCSI_TCP=m
CONFIG_ISCSI_BOOT_SYSFS=m
CONFIG_FUSION=y
CONFIG_FUSION_SPI=y
CONFIG_FUSION_SAS=y
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_NETCONSOLE=m
CONFIG_TUN=y
CONFIG_E1000=y
CONFIG_PPP=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
# CONFIG_WLAN is not set
CONFIG_INPUT_FF_MEMLESS=m
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_KEYBOARD_HIL_OLD is not set
# CONFIG_KEYBOARD_HIL is not set
CONFIG_MOUSE_PS2=m
CONFIG_INPUT_MISC=y
CONFIG_INPUT_CM109=m
CONFIG_SERIO_SERPORT=m
CONFIG_SERIO_PARKBD=m
CONFIG_SERIO_GSCPS2=m
# CONFIG_HP_SDC is not set
CONFIG_SERIO_PCIPS2=m
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=8
CONFIG_SERIAL_8250_RUNTIME_UARTS=8
CONFIG_SERIAL_8250_EXTENDED=y
# CONFIG_SERIAL_MUX is not set
CONFIG_SERIAL_JSM=m
CONFIG_PRINTER=y
CONFIG_HW_RANDOM=y
CONFIG_RAW_DRIVER=m
CONFIG_PTP_1588_CLOCK=y
CONFIG_SSB=m
CONFIG_SSB_DRIVER_PCICORE=y
CONFIG_AGP=y
CONFIG_AGP_PARISC=y
CONFIG_DRM=y
CONFIG_DRM_RADEON=y
CONFIG_FIRMWARE_EDID=y
CONFIG_FB_FOREIGN_ENDIAN=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
# CONFIG_FB_STI is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
# CONFIG_LCD_CLASS_DEVICE is not set
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_STI_CONSOLE is not set
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
CONFIG_SOUND=m
CONFIG_SND=m
CONFIG_SND_SEQUENCER=m
CONFIG_SND_SEQ_DUMMY=m
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_VERBOSE_PRINTK=y
CONFIG_SND_AD1889=m
# CONFIG_SND_USB is not set
# CONFIG_SND_GSC is not set
CONFIG_HID_A4TECH=m
CONFIG_HID_APPLE=m
CONFIG_HID_BELKIN=m
CONFIG_HID_CHERRY=m
CONFIG_HID_CHICONY=m
CONFIG_HID_CYPRESS=m
CONFIG_HID_DRAGONRISE=m
CONFIG_HID_EZKEY=m
CONFIG_HID_KYE=m
CONFIG_HID_GYRATION=m
CONFIG_HID_TWINHAN=m
CONFIG_HID_KENSINGTON=m
CONFIG_HID_LOGITECH=m
CONFIG_HID_LOGITECH_DJ=m
CONFIG_HID_MICROSOFT=m
CONFIG_HID_MONTEREY=m
CONFIG_HID_NTRIG=m
CONFIG_HID_ORTEK=m
CONFIG_HID_PANTHERLORD=m
CONFIG_HID_PETALYNX=m
CONFIG_HID_SAMSUNG=m
CONFIG_HID_SUNPLUS=m
CONFIG_HID_GREENASIA=m
CONFIG_HID_SMARTJOYPLUS=m
CONFIG_HID_TOPSEED=m
CONFIG_HID_THRUSTMASTER=m
CONFIG_HID_ZEROPLUS=m
CONFIG_USB_HID=m
CONFIG_USB=y
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT4_FS=m
CONFIG_REISERFS_FS=m
CONFIG_REISERFS_PROC_INFO=y
CONFIG_XFS_FS=m
CONFIG_XFS_POSIX_ACL=y
CONFIG_QUOTA=y
CONFIG_QFMT_V1=m
CONFIG_QFMT_V2=m
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_PROC_KCORE=y
CONFIG_TMPFS=y
CONFIG_TMPFS_XATTR=y
CONFIG_NFS_FS=m
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m
CONFIG_NLS_CODEPAGE_1251=m
CONFIG_NLS_ASCII=m
CONFIG_NLS_ISO8859_1=m
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_SLAB=y
CONFIG_DEBUG_SLAB_LEAK=y
CONFIG_DEBUG_MEMORY_INIT=y
CONFIG_DEBUG_STACKOVERFLOW=y
CONFIG_LOCKUP_DETECTOR=y
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
CONFIG_PANIC_ON_OOPS=y
CONFIG_DEBUG_RT_MUTEXES=y
CONFIG_RT_MUTEX_TESTER=y
CONFIG_PROVE_RCU_DELAY=y
CONFIG_DEBUG_BLOCK_EXT_DEVT=y
CONFIG_LATENCYTOP=y
CONFIG_DEBUG_STRICT_USER_COPY_CHECKS=y
CONFIG_KEYS=y
# CONFIG_CRYPTO_HW is not set
CONFIG_FONTS=y

View file

@ -23,6 +23,7 @@ struct parisc_device {
/* generic info returned from pdc_pat_cell_module() */ /* generic info returned from pdc_pat_cell_module() */
unsigned long mod_info; /* PAT specific - Misc Module info */ unsigned long mod_info; /* PAT specific - Misc Module info */
unsigned long pmod_loc; /* physical Module location */ unsigned long pmod_loc; /* physical Module location */
unsigned long mod0;
#endif #endif
u64 dma_mask; /* DMA mask for I/O */ u64 dma_mask; /* DMA mask for I/O */
struct device dev; struct device dev;
@ -61,4 +62,6 @@ parisc_get_drvdata(struct parisc_device *d)
extern struct bus_type parisc_bus_type; extern struct bus_type parisc_bus_type;
int iosapic_serial_irq(struct parisc_device *dev);
#endif /*_ASM_PARISC_PARISC_DEVICE_H_*/ #endif /*_ASM_PARISC_PARISC_DEVICE_H_*/

View file

@ -71,18 +71,27 @@ flush_cache_all_local(void)
} }
EXPORT_SYMBOL(flush_cache_all_local); EXPORT_SYMBOL(flush_cache_all_local);
/* Virtual address of pfn. */
#define pfn_va(pfn) __va(PFN_PHYS(pfn))
void void
update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep) update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep)
{ {
struct page *page = pte_page(*ptep); unsigned long pfn = pte_pfn(*ptep);
struct page *page;
if (pfn_valid(page_to_pfn(page)) && page_mapping(page) && /* We don't have pte special. As a result, we can be called with
test_bit(PG_dcache_dirty, &page->flags)) { an invalid pfn and we don't need to flush the kernel dcache page.
This occurs with FireGL card in C8000. */
if (!pfn_valid(pfn))
return;
flush_kernel_dcache_page(page); page = pfn_to_page(pfn);
if (page_mapping(page) && test_bit(PG_dcache_dirty, &page->flags)) {
flush_kernel_dcache_page_addr(pfn_va(pfn));
clear_bit(PG_dcache_dirty, &page->flags); clear_bit(PG_dcache_dirty, &page->flags);
} else if (parisc_requires_coherency()) } else if (parisc_requires_coherency())
flush_kernel_dcache_page(page); flush_kernel_dcache_page_addr(pfn_va(pfn));
} }
void void
@ -495,44 +504,42 @@ static inline pte_t *get_ptep(pgd_t *pgd, unsigned long addr)
void flush_cache_mm(struct mm_struct *mm) void flush_cache_mm(struct mm_struct *mm)
{ {
struct vm_area_struct *vma;
pgd_t *pgd;
/* Flushing the whole cache on each cpu takes forever on /* Flushing the whole cache on each cpu takes forever on
rp3440, etc. So, avoid it if the mm isn't too big. */ rp3440, etc. So, avoid it if the mm isn't too big. */
if (mm_total_size(mm) < parisc_cache_flush_threshold) { if (mm_total_size(mm) >= parisc_cache_flush_threshold) {
struct vm_area_struct *vma; flush_cache_all();
return;
}
if (mm->context == mfsp(3)) { if (mm->context == mfsp(3)) {
for (vma = mm->mmap; vma; vma = vma->vm_next) { for (vma = mm->mmap; vma; vma = vma->vm_next) {
flush_user_dcache_range_asm(vma->vm_start, flush_user_dcache_range_asm(vma->vm_start, vma->vm_end);
vma->vm_end); if ((vma->vm_flags & VM_EXEC) == 0)
if (vma->vm_flags & VM_EXEC) continue;
flush_user_icache_range_asm( flush_user_icache_range_asm(vma->vm_start, vma->vm_end);
vma->vm_start, vma->vm_end);
}
} else {
pgd_t *pgd = mm->pgd;
for (vma = mm->mmap; vma; vma = vma->vm_next) {
unsigned long addr;
for (addr = vma->vm_start; addr < vma->vm_end;
addr += PAGE_SIZE) {
pte_t *ptep = get_ptep(pgd, addr);
if (ptep != NULL) {
pte_t pte = *ptep;
__flush_cache_page(vma, addr,
page_to_phys(pte_page(pte)));
}
}
}
} }
return; return;
} }
#ifdef CONFIG_SMP pgd = mm->pgd;
flush_cache_all(); for (vma = mm->mmap; vma; vma = vma->vm_next) {
#else unsigned long addr;
flush_cache_all_local();
#endif for (addr = vma->vm_start; addr < vma->vm_end;
addr += PAGE_SIZE) {
unsigned long pfn;
pte_t *ptep = get_ptep(pgd, addr);
if (!ptep)
continue;
pfn = pte_pfn(*ptep);
if (!pfn_valid(pfn))
continue;
__flush_cache_page(vma, addr, PFN_PHYS(pfn));
}
}
} }
void void
@ -556,33 +563,32 @@ flush_user_icache_range(unsigned long start, unsigned long end)
void flush_cache_range(struct vm_area_struct *vma, void flush_cache_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end) unsigned long start, unsigned long end)
{ {
unsigned long addr;
pgd_t *pgd;
BUG_ON(!vma->vm_mm->context); BUG_ON(!vma->vm_mm->context);
if ((end - start) < parisc_cache_flush_threshold) { if ((end - start) >= parisc_cache_flush_threshold) {
if (vma->vm_mm->context == mfsp(3)) {
flush_user_dcache_range_asm(start, end);
if (vma->vm_flags & VM_EXEC)
flush_user_icache_range_asm(start, end);
} else {
unsigned long addr;
pgd_t *pgd = vma->vm_mm->pgd;
for (addr = start & PAGE_MASK; addr < end;
addr += PAGE_SIZE) {
pte_t *ptep = get_ptep(pgd, addr);
if (ptep != NULL) {
pte_t pte = *ptep;
flush_cache_page(vma,
addr, pte_pfn(pte));
}
}
}
} else {
#ifdef CONFIG_SMP
flush_cache_all(); flush_cache_all();
#else return;
flush_cache_all_local(); }
#endif
if (vma->vm_mm->context == mfsp(3)) {
flush_user_dcache_range_asm(start, end);
if (vma->vm_flags & VM_EXEC)
flush_user_icache_range_asm(start, end);
return;
}
pgd = vma->vm_mm->pgd;
for (addr = start & PAGE_MASK; addr < end; addr += PAGE_SIZE) {
unsigned long pfn;
pte_t *ptep = get_ptep(pgd, addr);
if (!ptep)
continue;
pfn = pte_pfn(*ptep);
if (pfn_valid(pfn))
__flush_cache_page(vma, addr, PFN_PHYS(pfn));
} }
} }
@ -591,9 +597,10 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long
{ {
BUG_ON(!vma->vm_mm->context); BUG_ON(!vma->vm_mm->context);
flush_tlb_page(vma, vmaddr); if (pfn_valid(pfn)) {
__flush_cache_page(vma, vmaddr, page_to_phys(pfn_to_page(pfn))); flush_tlb_page(vma, vmaddr);
__flush_cache_page(vma, vmaddr, PFN_PHYS(pfn));
}
} }
#ifdef CONFIG_PARISC_TMPALIAS #ifdef CONFIG_PARISC_TMPALIAS

View file

@ -211,6 +211,7 @@ pat_query_module(ulong pcell_loc, ulong mod_index)
/* REVISIT: who is the consumer of this? not sure yet... */ /* REVISIT: who is the consumer of this? not sure yet... */
dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */ dev->mod_info = pa_pdc_cell->mod_info; /* pass to PAT_GET_ENTITY() */
dev->pmod_loc = pa_pdc_cell->mod_location; dev->pmod_loc = pa_pdc_cell->mod_location;
dev->mod0 = pa_pdc_cell->mod[0];
register_parisc_device(dev); /* advertise device */ register_parisc_device(dev); /* advertise device */

View file

@ -55,13 +55,6 @@
* this. */ * this. */
#define A(__x) ((unsigned long)(__x)) #define A(__x) ((unsigned long)(__x))
/*
* Atomically swap in the new signal mask, and wait for a signal.
*/
#ifdef CONFIG_64BIT
#include "sys32.h"
#endif
/* /*
* Do a signal return - restore sigcontext. * Do a signal return - restore sigcontext.
*/ */

View file

@ -34,7 +34,6 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
#include "signal32.h" #include "signal32.h"
#include "sys32.h"
#define DEBUG_COMPAT_SIG 0 #define DEBUG_COMPAT_SIG 0
#define DEBUG_COMPAT_SIG_LEVEL 2 #define DEBUG_COMPAT_SIG_LEVEL 2

Some files were not shown because too many files have changed in this diff Show more