Merge commit '7ed6fb9b5a5510e4ef78ab27419184741169978a' into x86/espfix

Merge in Linus' tree with:

fa81511bb0 x86-64, modify_ldt: Make support for 16-bit segments a runtime option

... reverted, to avoid a conflict.  This commit is no longer necessary
with the proper fix in place.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2014-05-21 15:23:19 -07:00
Родитель 34273f41d5 7ed6fb9b5a
Коммит e6ab9a20e7
542 изменённых файлов: 5777 добавлений и 3615 удалений

Просмотреть файл

@ -19,6 +19,9 @@ to deliver its interrupts via SPIs.
- clock-frequency : The frequency of the main counter, in Hz. Optional. - clock-frequency : The frequency of the main counter, in Hz. Optional.
- always-on : a boolean property. If present, the timer is powered through an
always-on power domain, therefore it never loses context.
Example: Example:
timer { timer {

Просмотреть файл

@ -24,6 +24,7 @@ Required properties:
* "sata-phy" for the SATA 6.0Gbps PHY * "sata-phy" for the SATA 6.0Gbps PHY
Optional properties: Optional properties:
- dma-coherent : Present if dma operations are coherent
- status : Shall be "ok" if enabled or "disabled" if disabled. - status : Shall be "ok" if enabled or "disabled" if disabled.
Default is "ok". Default is "ok".
@ -55,6 +56,7 @@ Example:
<0x0 0x1f22e000 0x0 0x1000>, <0x0 0x1f22e000 0x0 0x1000>,
<0x0 0x1f227000 0x0 0x1000>; <0x0 0x1f227000 0x0 0x1000>;
interrupts = <0x0 0x87 0x4>; interrupts = <0x0 0x87 0x4>;
dma-coherent;
status = "ok"; status = "ok";
clocks = <&sataclk 0>; clocks = <&sataclk 0>;
phys = <&phy2 0>; phys = <&phy2 0>;
@ -69,6 +71,7 @@ Example:
<0x0 0x1f23e000 0x0 0x1000>, <0x0 0x1f23e000 0x0 0x1000>,
<0x0 0x1f237000 0x0 0x1000>; <0x0 0x1f237000 0x0 0x1000>;
interrupts = <0x0 0x88 0x4>; interrupts = <0x0 0x88 0x4>;
dma-coherent;
status = "ok"; status = "ok";
clocks = <&sataclk 0>; clocks = <&sataclk 0>;
phys = <&phy3 0>; phys = <&phy3 0>;

Просмотреть файл

@ -62,7 +62,7 @@ Required properties for PMC node:
- interrupt-controller : tell that the PMC is an interrupt controller. - interrupt-controller : tell that the PMC is an interrupt controller.
- #interrupt-cells : must be set to 1. The first cell encodes the interrupt id, - #interrupt-cells : must be set to 1. The first cell encodes the interrupt id,
and reflect the bit position in the PMC_ER/DR/SR registers. and reflect the bit position in the PMC_ER/DR/SR registers.
You can use the dt macros defined in dt-bindings/clk/at91.h. You can use the dt macros defined in dt-bindings/clock/at91.h.
0 (AT91_PMC_MOSCS) -> main oscillator ready 0 (AT91_PMC_MOSCS) -> main oscillator ready
1 (AT91_PMC_LOCKA) -> PLL A ready 1 (AT91_PMC_LOCKA) -> PLL A ready
2 (AT91_PMC_LOCKB) -> PLL B ready 2 (AT91_PMC_LOCKB) -> PLL B ready

Просмотреть файл

@ -29,6 +29,6 @@ edma: edma@49000000 {
dma-channels = <64>; dma-channels = <64>;
ti,edma-regions = <4>; ti,edma-regions = <4>;
ti,edma-slots = <256>; ti,edma-slots = <256>;
ti,edma-xbar-event-map = <1 12 ti,edma-xbar-event-map = /bits/ 16 <1 12
2 13>; 2 13>;
}; };

Просмотреть файл

@ -4,11 +4,15 @@ Required properties:
- compatible: Should be "snps,arc-emac" - compatible: Should be "snps,arc-emac"
- reg: Address and length of the register set for the device - reg: Address and length of the register set for the device
- interrupts: Should contain the EMAC interrupts - interrupts: Should contain the EMAC interrupts
- clock-frequency: CPU frequency. It is needed to calculate and set polling
period of EMAC.
- max-speed: see ethernet.txt file in the same directory. - max-speed: see ethernet.txt file in the same directory.
- phy: see ethernet.txt file in the same directory. - phy: see ethernet.txt file in the same directory.
Clock handling:
The clock frequency is needed to calculate and set polling period of EMAC.
It must be provided by one of:
- clock-frequency: CPU frequency.
- clocks: reference to the clock supplying the EMAC.
Child nodes of the driver are the individual PHY devices connected to the Child nodes of the driver are the individual PHY devices connected to the
MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus. MDIO bus. They must have a "reg" property given the PHY address on the MDIO bus.
@ -19,7 +23,11 @@ Examples:
reg = <0xc0fc2000 0x3c>; reg = <0xc0fc2000 0x3c>;
interrupts = <6>; interrupts = <6>;
mac-address = [ 00 11 22 33 44 55 ]; mac-address = [ 00 11 22 33 44 55 ];
clock-frequency = <80000000>; clock-frequency = <80000000>;
/* or */
clocks = <&emac_clock>;
max-speed = <100>; max-speed = <100>;
phy = <&phy0>; phy = <&phy0>;

Просмотреть файл

@ -23,5 +23,5 @@ gmac0: ethernet@ff700000 {
interrupt-names = "macirq"; interrupt-names = "macirq";
mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */ mac-address = [00 00 00 00 00 00];/* Filled in by U-Boot */
clocks = <&emac_0_clk>; clocks = <&emac_0_clk>;
clocks-names = "stmmaceth"; clock-names = "stmmaceth";
}; };

Просмотреть файл

@ -33,7 +33,7 @@ Optional properties:
- max-frame-size: See ethernet.txt file in the same directory - max-frame-size: See ethernet.txt file in the same directory
- clocks: If present, the first clock should be the GMAC main clock, - clocks: If present, the first clock should be the GMAC main clock,
further clocks may be specified in derived bindings. further clocks may be specified in derived bindings.
- clocks-names: One name for each entry in the clocks property, the - clock-names: One name for each entry in the clocks property, the
first one should be "stmmaceth". first one should be "stmmaceth".
Examples: Examples:

Просмотреть файл

@ -83,7 +83,7 @@ Example:
reg = <0xfe61f080 0x4>; reg = <0xfe61f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfe610000 0x5000>; ranges = <0 0xfe610000 0x5000>;
PIO0: gpio@fe610000 { PIO0: gpio@fe610000 {
@ -165,7 +165,7 @@ sdhci0:sdhci@fe810000{
interrupt-parent = <&PIO3>; interrupt-parent = <&PIO3>;
#interrupt-cells = <2>; #interrupt-cells = <2>;
interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; /* Interrupt line via PIO3-3 */ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>; /* Interrupt line via PIO3-3 */
interrupts-names = "card-detect"; interrupt-names = "card-detect";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pinctrl_mmc>; pinctrl-0 = <&pinctrl_mmc>;
}; };

Просмотреть файл

@ -47,7 +47,7 @@ mcasp0: mcasp0@1d00000 {
reg = <0x100000 0x3000>; reg = <0x100000 0x3000>;
reg-names "mpu"; reg-names "mpu";
interrupts = <82>, <83>; interrupts = <82>, <83>;
interrupts-names = "tx", "rx"; interrupt-names = "tx", "rx";
op-mode = <0>; /* MCASP_IIS_MODE */ op-mode = <0>; /* MCASP_IIS_MODE */
tdm-slots = <2>; tdm-slots = <2>;
serial-dir = < serial-dir = <

Просмотреть файл

@ -13,6 +13,9 @@ Required properties:
"ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP) "ti,tlv320aic3111" - TLV320AIC3111 (stereo speaker amp, MiniDSP)
- reg - <int> - I2C slave address - reg - <int> - I2C slave address
- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply,
DVDD-supply : power supplies for the device as covered in
Documentation/devicetree/bindings/regulator/regulator.txt
Optional properties: Optional properties:
@ -24,9 +27,6 @@ Optional properties:
3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD 3 or MICBIAS_AVDD - MICBIAS output is connected to AVDD
If this node is not mentioned or if the value is unknown, then If this node is not mentioned or if the value is unknown, then
micbias is set to 2.0V. micbias is set to 2.0V.
- HPVDD-supply, SPRVDD-supply, SPLVDD-supply, AVDD-supply, IOVDD-supply,
DVDD-supply : power supplies for the device as covered in
Documentation/devicetree/bindings/regulator/regulator.txt
CODEC output pins: CODEC output pins:
* HPL * HPL

Просмотреть файл

@ -504,9 +504,12 @@ byte 5:
* reg_10 * reg_10
bit 7 6 5 4 3 2 1 0 bit 7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 A 0 0 0 0 R F T A
A: 1 = enable absolute tracking A: 1 = enable absolute tracking
T: 1 = enable two finger mode auto correct
F: 1 = disable ABS Position Filter
R: 1 = enable real hardware resolution
6.2 Native absolute mode 6 byte packet format 6.2 Native absolute mode 6 byte packet format
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Просмотреть файл

@ -2218,10 +2218,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
noreplace-smp [X86-32,SMP] Don't replace SMP instructions noreplace-smp [X86-32,SMP] Don't replace SMP instructions
with UP alternatives with UP alternatives
nordrand [X86] Disable the direct use of the RDRAND nordrand [X86] Disable kernel use of the RDRAND and
instruction even if it is supported by the RDSEED instructions even if they are supported
processor. RDRAND is still available to user by the processor. RDRAND and RDSEED are still
space applications. available to user space applications.
noresume [SWSUSP] Disables resume and restores original swap noresume [SWSUSP] Disables resume and restores original swap
space. space.

Просмотреть файл

@ -429,7 +429,7 @@ RPS and RFS were introduced in kernel 2.6.35. XPS was incorporated into
(therbert@google.com) (therbert@google.com)
Accelerated RFS was introduced in 2.6.35. Original patches were Accelerated RFS was introduced in 2.6.35. Original patches were
submitted by Ben Hutchings (bhutchings@solarflare.com) submitted by Ben Hutchings (bwh@kernel.org)
Authors: Authors:
Tom Herbert (therbert@google.com) Tom Herbert (therbert@google.com)

Просмотреть файл

@ -1893,14 +1893,15 @@ L: netdev@vger.kernel.org
S: Supported S: Supported
F: drivers/net/ethernet/broadcom/bnx2x/ F: drivers/net/ethernet/broadcom/bnx2x/
BROADCOM BCM281XX/BCM11XXX ARM ARCHITECTURE BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITECTURE
M: Christian Daudt <bcm@fixthebug.org> M: Christian Daudt <bcm@fixthebug.org>
M: Matt Porter <mporter@linaro.org> M: Matt Porter <mporter@linaro.org>
L: bcm-kernel-feedback-list@broadcom.com L: bcm-kernel-feedback-list@broadcom.com
T: git git://git.github.com/broadcom/bcm11351 T: git git://github.com/broadcom/mach-bcm
S: Maintained S: Maintained
F: arch/arm/mach-bcm/ F: arch/arm/mach-bcm/
F: arch/arm/boot/dts/bcm113* F: arch/arm/boot/dts/bcm113*
F: arch/arm/boot/dts/bcm216*
F: arch/arm/boot/dts/bcm281* F: arch/arm/boot/dts/bcm281*
F: arch/arm/configs/bcm_defconfig F: arch/arm/configs/bcm_defconfig
F: drivers/mmc/host/sdhci_bcm_kona.c F: drivers/mmc/host/sdhci_bcm_kona.c
@ -3485,6 +3486,12 @@ S: Maintained
F: drivers/extcon/ F: drivers/extcon/
F: Documentation/extcon/ F: Documentation/extcon/
EXYNOS DP DRIVER
M: Jingoo Han <jg1.han@samsung.com>
L: dri-devel@lists.freedesktop.org
S: Maintained
F: drivers/gpu/drm/exynos/exynos_dp*
EXYNOS MIPI DISPLAY DRIVERS EXYNOS MIPI DISPLAY DRIVERS
M: Inki Dae <inki.dae@samsung.com> M: Inki Dae <inki.dae@samsung.com>
M: Donghwa Lee <dh09.lee@samsung.com> M: Donghwa Lee <dh09.lee@samsung.com>
@ -3550,7 +3557,7 @@ F: include/scsi/libfcoe.h
F: include/uapi/scsi/fc/ F: include/uapi/scsi/fc/
FILE LOCKING (flock() and fcntl()/lockf()) FILE LOCKING (flock() and fcntl()/lockf())
M: Jeff Layton <jlayton@redhat.com> M: Jeff Layton <jlayton@poochiereds.net>
M: J. Bruce Fields <bfields@fieldses.org> M: J. Bruce Fields <bfields@fieldses.org>
L: linux-fsdevel@vger.kernel.org L: linux-fsdevel@vger.kernel.org
S: Maintained S: Maintained
@ -4812,6 +4819,14 @@ L: linux-kernel@vger.kernel.org
S: Maintained S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
F: kernel/irq/ F: kernel/irq/
IRQCHIP DRIVERS
M: Thomas Gleixner <tglx@linutronix.de>
M: Jason Cooper <jason@lakedaemon.net>
L: linux-kernel@vger.kernel.org
S: Maintained
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
T: git git://git.infradead.org/users/jcooper/linux.git irqchip/core
F: drivers/irqchip/ F: drivers/irqchip/
IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY) IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
@ -5108,14 +5123,19 @@ F: drivers/s390/kvm/
KERNEL VIRTUAL MACHINE (KVM) FOR ARM KERNEL VIRTUAL MACHINE (KVM) FOR ARM
M: Christoffer Dall <christoffer.dall@linaro.org> M: Christoffer Dall <christoffer.dall@linaro.org>
M: Marc Zyngier <marc.zyngier@arm.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: kvmarm@lists.cs.columbia.edu L: kvmarm@lists.cs.columbia.edu
W: http://systems.cs.columbia.edu/projects/kvm-arm W: http://systems.cs.columbia.edu/projects/kvm-arm
S: Supported S: Supported
F: arch/arm/include/uapi/asm/kvm* F: arch/arm/include/uapi/asm/kvm*
F: arch/arm/include/asm/kvm* F: arch/arm/include/asm/kvm*
F: arch/arm/kvm/ F: arch/arm/kvm/
F: virt/kvm/arm/
F: include/kvm/arm_*
KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64) KERNEL VIRTUAL MACHINE FOR ARM64 (KVM/arm64)
M: Christoffer Dall <christoffer.dall@linaro.org>
M: Marc Zyngier <marc.zyngier@arm.com> M: Marc Zyngier <marc.zyngier@arm.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L: kvmarm@lists.cs.columbia.edu L: kvmarm@lists.cs.columbia.edu
@ -5479,15 +5499,15 @@ F: Documentation/hwmon/ltc4261
F: drivers/hwmon/ltc4261.c F: drivers/hwmon/ltc4261.c
LTP (Linux Test Project) LTP (Linux Test Project)
M: Shubham Goyal <shubham@linux.vnet.ibm.com>
M: Mike Frysinger <vapier@gentoo.org> M: Mike Frysinger <vapier@gentoo.org>
M: Cyril Hrubis <chrubis@suse.cz> M: Cyril Hrubis <chrubis@suse.cz>
M: Caspar Zhang <caspar@casparzhang.com>
M: Wanlong Gao <gaowanlong@cn.fujitsu.com> M: Wanlong Gao <gaowanlong@cn.fujitsu.com>
M: Jan Stancek <jstancek@redhat.com>
M: Stanislav Kholmanskikh <stanislav.kholmanskikh@oracle.com>
M: Alexey Kodanev <alexey.kodanev@oracle.com>
L: ltp-list@lists.sourceforge.net (subscribers-only) L: ltp-list@lists.sourceforge.net (subscribers-only)
W: http://ltp.sourceforge.net/ W: http://linux-test-project.github.io/
T: git git://github.com/linux-test-project/ltp.git T: git git://github.com/linux-test-project/ltp.git
T: git git://ltp.git.sourceforge.net/gitroot/ltp/ltp-dev
S: Maintained S: Maintained
M32R ARCHITECTURE M32R ARCHITECTURE
@ -7277,7 +7297,6 @@ F: drivers/video/aty/aty128fb.c
RALINK RT2X00 WIRELESS LAN DRIVER RALINK RT2X00 WIRELESS LAN DRIVER
P: rt2x00 project P: rt2x00 project
M: Ivo van Doorn <IvDoorn@gmail.com> M: Ivo van Doorn <IvDoorn@gmail.com>
M: Gertjan van Wingerde <gwingerde@gmail.com>
M: Helmut Schaa <helmut.schaa@googlemail.com> M: Helmut Schaa <helmut.schaa@googlemail.com>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
L: users@rt2x00.serialmonkey.com (moderated for non-subscribers) L: users@rt2x00.serialmonkey.com (moderated for non-subscribers)
@ -7293,7 +7312,7 @@ F: Documentation/blockdev/ramdisk.txt
F: drivers/block/brd.c F: drivers/block/brd.c
RANDOM NUMBER DRIVER RANDOM NUMBER DRIVER
M: Theodore Ts'o" <tytso@mit.edu> M: "Theodore Ts'o" <tytso@mit.edu>
S: Maintained S: Maintained
F: drivers/char/random.c F: drivers/char/random.c
@ -7674,7 +7693,6 @@ F: drivers/clk/samsung/
SAMSUNG SXGBE DRIVERS SAMSUNG SXGBE DRIVERS
M: Byungho An <bh74.an@samsung.com> M: Byungho An <bh74.an@samsung.com>
M: Girish K S <ks.giri@samsung.com> M: Girish K S <ks.giri@samsung.com>
M: Siva Reddy Kallam <siva.kallam@samsung.com>
M: Vipul Pandya <vipul.pandya@samsung.com> M: Vipul Pandya <vipul.pandya@samsung.com>
S: Supported S: Supported
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
@ -9951,7 +9969,7 @@ F: drivers/net/hamradio/*scc.c
F: drivers/net/hamradio/z8530.h F: drivers/net/hamradio/z8530.h
ZBUD COMPRESSED PAGE ALLOCATOR ZBUD COMPRESSED PAGE ALLOCATOR
M: Seth Jennings <sjenning@linux.vnet.ibm.com> M: Seth Jennings <sjennings@variantweb.net>
L: linux-mm@kvack.org L: linux-mm@kvack.org
S: Maintained S: Maintained
F: mm/zbud.c F: mm/zbud.c
@ -9996,7 +10014,7 @@ F: mm/zsmalloc.c
F: include/linux/zsmalloc.h F: include/linux/zsmalloc.h
ZSWAP COMPRESSED SWAP CACHING ZSWAP COMPRESSED SWAP CACHING
M: Seth Jennings <sjenning@linux.vnet.ibm.com> M: Seth Jennings <sjennings@variantweb.net>
L: linux-mm@kvack.org L: linux-mm@kvack.org
S: Maintained S: Maintained
F: mm/zswap.c F: mm/zswap.c

Просмотреть файл

@ -1,7 +1,7 @@
VERSION = 3 VERSION = 3
PATCHLEVEL = 15 PATCHLEVEL = 15
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc3 EXTRAVERSION = -rc5
NAME = Shuffling Zombie Juror NAME = Shuffling Zombie Juror
# *DOCUMENTATION* # *DOCUMENTATION*

Просмотреть файл

@ -614,11 +614,13 @@ resume_user_mode_begin:
resume_kernel_mode: resume_kernel_mode:
#ifdef CONFIG_PREEMPT ; Disable Interrupts from this point on
; CONFIG_PREEMPT: This is a must for preempt_schedule_irq()
; This is a must for preempt_schedule_irq() ; !CONFIG_PREEMPT: To ensure restore_regs is intr safe
IRQ_DISABLE r9 IRQ_DISABLE r9
#ifdef CONFIG_PREEMPT
; Can't preempt if preemption disabled ; Can't preempt if preemption disabled
GET_CURR_THR_INFO_FROM_SP r10 GET_CURR_THR_INFO_FROM_SP r10
ld r8, [r10, THREAD_INFO_PREEMPT_COUNT] ld r8, [r10, THREAD_INFO_PREEMPT_COUNT]

Просмотреть файл

@ -144,7 +144,7 @@
compatible = "ti,edma3"; compatible = "ti,edma3";
ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2"; ti,hwmods = "tpcc", "tptc0", "tptc1", "tptc2";
reg = <0x49000000 0x10000>, reg = <0x49000000 0x10000>,
<0x44e10f90 0x10>; <0x44e10f90 0x40>;
interrupts = <12 13 14>; interrupts = <12 13 14>;
#dma-cells = <1>; #dma-cells = <1>;
dma-channels = <64>; dma-channels = <64>;
@ -802,7 +802,7 @@
<0x46000000 0x400000>; <0x46000000 0x400000>;
reg-names = "mpu", "dat"; reg-names = "mpu", "dat";
interrupts = <80>, <81>; interrupts = <80>, <81>;
interrupts-names = "tx", "rx"; interrupt-names = "tx", "rx";
status = "disabled"; status = "disabled";
dmas = <&edma 8>, dmas = <&edma 8>,
<&edma 9>; <&edma 9>;
@ -816,7 +816,7 @@
<0x46400000 0x400000>; <0x46400000 0x400000>;
reg-names = "mpu", "dat"; reg-names = "mpu", "dat";
interrupts = <82>, <83>; interrupts = <82>, <83>;
interrupts-names = "tx", "rx"; interrupt-names = "tx", "rx";
status = "disabled"; status = "disabled";
dmas = <&edma 10>, dmas = <&edma 10>,
<&edma 11>; <&edma 11>;

Просмотреть файл

@ -62,5 +62,21 @@
}; };
}; };
&iva {
status = "disabled";
};
&mailbox {
status = "disabled";
};
&mmu_isp {
status = "disabled";
};
&smartreflex_mpu_iva {
status = "disabled";
};
/include/ "am35xx-clocks.dtsi" /include/ "am35xx-clocks.dtsi"
/include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi" /include/ "omap36xx-am35xx-omap3430es2plus-clocks.dtsi"

Просмотреть файл

@ -691,7 +691,7 @@
<0x46000000 0x400000>; <0x46000000 0x400000>;
reg-names = "mpu", "dat"; reg-names = "mpu", "dat";
interrupts = <80>, <81>; interrupts = <80>, <81>;
interrupts-names = "tx", "rx"; interrupt-names = "tx", "rx";
status = "disabled"; status = "disabled";
dmas = <&edma 8>, dmas = <&edma 8>,
<&edma 9>; <&edma 9>;
@ -705,7 +705,7 @@
<0x46400000 0x400000>; <0x46400000 0x400000>;
reg-names = "mpu", "dat"; reg-names = "mpu", "dat";
interrupts = <82>, <83>; interrupts = <82>, <83>;
interrupts-names = "tx", "rx"; interrupt-names = "tx", "rx";
status = "disabled"; status = "disabled";
dmas = <&edma 10>, dmas = <&edma 10>,
<&edma 11>; <&edma 11>;

Просмотреть файл

@ -117,6 +117,11 @@
status = "okay"; status = "okay";
}; };
&gpio5 {
status = "okay";
ti,no-reset-on-init;
};
&mmc1 { &mmc1 {
status = "okay"; status = "okay";
vmmc-supply = <&vmmcsd_fixed>; vmmc-supply = <&vmmcsd_fixed>;

Просмотреть файл

@ -67,6 +67,7 @@
i2c@11000 { i2c@11000 {
pinctrl-0 = <&i2c0_pins>; pinctrl-0 = <&i2c0_pins>;
pinctrl-names = "default"; pinctrl-names = "default";
clock-frequency = <100000>;
status = "okay"; status = "okay";
audio_codec: audio-codec@4a { audio_codec: audio-codec@4a {
compatible = "cirrus,cs42l51"; compatible = "cirrus,cs42l51";

Просмотреть файл

@ -79,6 +79,11 @@
}; };
}; };
sata@a0000 {
status = "okay";
nr-ports = <2>;
};
nand: nand@d0000 { nand: nand@d0000 {
pinctrl-0 = <&nand_pins>; pinctrl-0 = <&nand_pins>;
pinctrl-names = "default"; pinctrl-names = "default";

Просмотреть файл

@ -49,7 +49,7 @@
/* Device Bus parameters are required */ /* Device Bus parameters are required */
/* Read parameters */ /* Read parameters */
devbus,bus-width = <8>; devbus,bus-width = <16>;
devbus,turn-off-ps = <60000>; devbus,turn-off-ps = <60000>;
devbus,badr-skew-ps = <0>; devbus,badr-skew-ps = <0>;
devbus,acc-first-ps = <124000>; devbus,acc-first-ps = <124000>;

Просмотреть файл

@ -59,7 +59,7 @@
/* Device Bus parameters are required */ /* Device Bus parameters are required */
/* Read parameters */ /* Read parameters */
devbus,bus-width = <8>; devbus,bus-width = <16>;
devbus,turn-off-ps = <60000>; devbus,turn-off-ps = <60000>;
devbus,badr-skew-ps = <0>; devbus,badr-skew-ps = <0>;
devbus,acc-first-ps = <124000>; devbus,acc-first-ps = <124000>;
@ -146,22 +146,22 @@
ethernet@70000 { ethernet@70000 {
status = "okay"; status = "okay";
phy = <&phy0>; phy = <&phy0>;
phy-mode = "rgmii-id"; phy-mode = "qsgmii";
}; };
ethernet@74000 { ethernet@74000 {
status = "okay"; status = "okay";
phy = <&phy1>; phy = <&phy1>;
phy-mode = "rgmii-id"; phy-mode = "qsgmii";
}; };
ethernet@30000 { ethernet@30000 {
status = "okay"; status = "okay";
phy = <&phy2>; phy = <&phy2>;
phy-mode = "rgmii-id"; phy-mode = "qsgmii";
}; };
ethernet@34000 { ethernet@34000 {
status = "okay"; status = "okay";
phy = <&phy3>; phy = <&phy3>;
phy-mode = "rgmii-id"; phy-mode = "qsgmii";
}; };
/* Front-side USB slot */ /* Front-side USB slot */

Просмотреть файл

@ -39,7 +39,7 @@
/* Device Bus parameters are required */ /* Device Bus parameters are required */
/* Read parameters */ /* Read parameters */
devbus,bus-width = <8>; devbus,bus-width = <16>;
devbus,turn-off-ps = <60000>; devbus,turn-off-ps = <60000>;
devbus,badr-skew-ps = <0>; devbus,badr-skew-ps = <0>;
devbus,acc-first-ps = <124000>; devbus,acc-first-ps = <124000>;

Просмотреть файл

@ -34,7 +34,7 @@
}; };
spi0: spi@f0004000 { spi0: spi@f0004000 {
cs-gpios = <&pioD 13 0>; cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
status = "okay"; status = "okay";
}; };
@ -79,7 +79,7 @@
}; };
spi1: spi@f8008000 { spi1: spi@f8008000 {
cs-gpios = <&pioC 25 0>, <0>, <0>, <&pioD 16 0>; cs-gpios = <&pioC 25 0>;
status = "okay"; status = "okay";
}; };

Просмотреть файл

@ -10,7 +10,7 @@
#include <dt-bindings/pinctrl/at91.h> #include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/clk/at91.h> #include <dt-bindings/clock/at91.h>
/ { / {
model = "Atmel AT91SAM9261 family SoC"; model = "Atmel AT91SAM9261 family SoC";

Просмотреть файл

@ -8,7 +8,7 @@
#include "skeleton.dtsi" #include "skeleton.dtsi"
#include <dt-bindings/pinctrl/at91.h> #include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/clk/at91.h> #include <dt-bindings/clock/at91.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>

Просмотреть файл

@ -115,7 +115,7 @@
#address-cells = <1>; #address-cells = <1>;
#size-cells = <0>; #size-cells = <0>;
compatible = "fsl,imx53-ipu"; compatible = "fsl,imx53-ipu";
reg = <0x18000000 0x080000000>; reg = <0x18000000 0x08000000>;
interrupts = <11 10>; interrupts = <11 10>;
clocks = <&clks IMX5_CLK_IPU_GATE>, clocks = <&clks IMX5_CLK_IPU_GATE>,
<&clks IMX5_CLK_IPU_DI0_GATE>, <&clks IMX5_CLK_IPU_DI0_GATE>,

Просмотреть файл

@ -30,6 +30,16 @@
bootargs = "console=ttyS0,115200n8 earlyprintk"; bootargs = "console=ttyS0,115200n8 earlyprintk";
}; };
mbus {
pcie-controller {
status = "okay";
pcie@1,0 {
status = "okay";
};
};
};
ocp@f1000000 { ocp@f1000000 {
pinctrl@10000 { pinctrl@10000 {
pmx_usb_led: pmx-usb-led { pmx_usb_led: pmx-usb-led {
@ -73,14 +83,6 @@
ehci@50000 { ehci@50000 {
status = "okay"; status = "okay";
}; };
pcie-controller {
status = "okay";
pcie@1,0 {
status = "okay";
};
};
}; };
gpio-leds { gpio-leds {

Просмотреть файл

@ -4,6 +4,16 @@
/ { / {
model = "ZyXEL NSA310"; model = "ZyXEL NSA310";
mbus {
pcie-controller {
status = "okay";
pcie@1,0 {
status = "okay";
};
};
};
ocp@f1000000 { ocp@f1000000 {
pinctrl: pinctrl@10000 { pinctrl: pinctrl@10000 {
@ -26,14 +36,6 @@
status = "okay"; status = "okay";
nr-ports = <2>; nr-ports = <2>;
}; };
pcie-controller {
status = "okay";
pcie@1,0 {
status = "okay";
};
};
}; };
gpio_poweroff { gpio_poweroff {

Просмотреть файл

@ -127,11 +127,6 @@
i2c@11000 { i2c@11000 {
status = "okay"; status = "okay";
alc5621: alc5621@1a {
compatible = "realtek,alc5621";
reg = <0x1a>;
};
}; };
serial@12000 { serial@12000 {

Просмотреть файл

@ -24,11 +24,10 @@
compatible = "smsc,lan9221", "smsc,lan9115"; compatible = "smsc,lan9221", "smsc,lan9115";
bank-width = <2>; bank-width = <2>;
gpmc,mux-add-data; gpmc,mux-add-data;
gpmc,cs-on-ns = <0>; gpmc,cs-on-ns = <1>;
gpmc,cs-rd-off-ns = <186>; gpmc,cs-rd-off-ns = <180>;
gpmc,cs-wr-off-ns = <186>; gpmc,cs-wr-off-ns = <180>;
gpmc,adv-on-ns = <12>; gpmc,adv-rd-off-ns = <18>;
gpmc,adv-rd-off-ns = <48>;
gpmc,adv-wr-off-ns = <48>; gpmc,adv-wr-off-ns = <48>;
gpmc,oe-on-ns = <54>; gpmc,oe-on-ns = <54>;
gpmc,oe-off-ns = <168>; gpmc,oe-off-ns = <168>;
@ -36,12 +35,10 @@
gpmc,we-off-ns = <168>; gpmc,we-off-ns = <168>;
gpmc,rd-cycle-ns = <186>; gpmc,rd-cycle-ns = <186>;
gpmc,wr-cycle-ns = <186>; gpmc,wr-cycle-ns = <186>;
gpmc,access-ns = <114>; gpmc,access-ns = <144>;
gpmc,page-burst-access-ns = <6>; gpmc,page-burst-access-ns = <24>;
gpmc,bus-turnaround-ns = <12>; gpmc,bus-turnaround-ns = <90>;
gpmc,cycle2cycle-delay-ns = <18>; gpmc,cycle2cycle-delay-ns = <90>;
gpmc,wr-data-mux-bus-ns = <90>;
gpmc,wr-access-ns = <186>;
gpmc,cycle2cycle-samecsen; gpmc,cycle2cycle-samecsen;
gpmc,cycle2cycle-diffcsen; gpmc,cycle2cycle-diffcsen;
vddvario-supply = <&vddvario>; vddvario-supply = <&vddvario>;

Просмотреть файл

@ -71,13 +71,6 @@
interrupts = <58>; interrupts = <58>;
}; };
mailbox: mailbox@48094000 {
compatible = "ti,omap2-mailbox";
ti,hwmods = "mailbox";
reg = <0x48094000 0x200>;
interrupts = <26>;
};
intc: interrupt-controller@1 { intc: interrupt-controller@1 {
compatible = "ti,omap2-intc"; compatible = "ti,omap2-intc";
interrupt-controller; interrupt-controller;

Просмотреть файл

@ -125,6 +125,14 @@
dma-names = "tx", "rx"; dma-names = "tx", "rx";
}; };
mailbox: mailbox@48094000 {
compatible = "ti,omap2-mailbox";
reg = <0x48094000 0x200>;
interrupts = <26>, <34>;
interrupt-names = "dsp", "iva";
ti,hwmods = "mailbox";
};
timer1: timer@48028000 { timer1: timer@48028000 {
compatible = "ti,omap2420-timer"; compatible = "ti,omap2420-timer";
reg = <0x48028000 0x400>; reg = <0x48028000 0x400>;

Просмотреть файл

@ -216,6 +216,13 @@
dma-names = "tx", "rx"; dma-names = "tx", "rx";
}; };
mailbox: mailbox@48094000 {
compatible = "ti,omap2-mailbox";
reg = <0x48094000 0x200>;
interrupts = <26>;
ti,hwmods = "mailbox";
};
timer1: timer@49018000 { timer1: timer@49018000 {
compatible = "ti,omap2420-timer"; compatible = "ti,omap2420-timer";
reg = <0x49018000 0x400>; reg = <0x49018000 0x400>;

Просмотреть файл

@ -10,18 +10,6 @@
cpu0-supply = <&vcc>; cpu0-supply = <&vcc>;
}; };
}; };
vddvario: regulator-vddvario {
compatible = "regulator-fixed";
regulator-name = "vddvario";
regulator-always-on;
};
vdd33a: regulator-vdd33a {
compatible = "regulator-fixed";
regulator-name = "vdd33a";
regulator-always-on;
};
}; };
&omap3_pmx_core { &omap3_pmx_core {
@ -35,58 +23,34 @@
hsusb0_pins: pinmux_hsusb0_pins { hsusb0_pins: pinmux_hsusb0_pins {
pinctrl-single,pins = < pinctrl-single,pins = <
OMAP3_CORE1_IOPAD(0x21a0, PIN_OUTPUT | MUX_MODE0) /* hsusb0_clk.hsusb0_clk */ OMAP3_CORE1_IOPAD(0x21a2, PIN_OUTPUT | MUX_MODE0) /* hsusb0_clk.hsusb0_clk */
OMAP3_CORE1_IOPAD(0x21a2, PIN_OUTPUT | MUX_MODE0) /* hsusb0_stp.hsusb0_stp */ OMAP3_CORE1_IOPAD(0x21a4, PIN_OUTPUT | MUX_MODE0) /* hsusb0_stp.hsusb0_stp */
OMAP3_CORE1_IOPAD(0x21a4, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_dir.hsusb0_dir */ OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_dir.hsusb0_dir */
OMAP3_CORE1_IOPAD(0x21a6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_nxt.hsusb0_nxt */ OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_nxt.hsusb0_nxt */
OMAP3_CORE1_IOPAD(0x21a8, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data0.hsusb2_data0 */ OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data0.hsusb2_data0 */
OMAP3_CORE1_IOPAD(0x21aa, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data1.hsusb0_data1 */ OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data1.hsusb0_data1 */
OMAP3_CORE1_IOPAD(0x21ac, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data2.hsusb0_data2 */ OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data2.hsusb0_data2 */
OMAP3_CORE1_IOPAD(0x21ae, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data3 */ OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data3 */
OMAP3_CORE1_IOPAD(0x21b0, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data4 */ OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data4 */
OMAP3_CORE1_IOPAD(0x21b2, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data5 */ OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data5 */
OMAP3_CORE1_IOPAD(0x21b4, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data6 */ OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data6 */
OMAP3_CORE1_IOPAD(0x21b6, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data7 */ OMAP3_CORE1_IOPAD(0x21b8, PIN_INPUT_PULLDOWN | MUX_MODE0) /* hsusb0_data7.hsusb0_data7 */
>; >;
}; };
}; };
#include "omap-gpmc-smsc911x.dtsi"
&gpmc { &gpmc {
ranges = <5 0 0x2c000000 0x01000000>; ranges = <5 0 0x2c000000 0x01000000>;
smsc1: ethernet@5,0 { smsc1: ethernet@gpmc {
compatible = "smsc,lan9221", "smsc,lan9115"; compatible = "smsc,lan9221", "smsc,lan9115";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&smsc1_pins>; pinctrl-0 = <&smsc1_pins>;
interrupt-parent = <&gpio6>; interrupt-parent = <&gpio6>;
interrupts = <3 IRQ_TYPE_LEVEL_LOW>; interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
reg = <5 0 0xff>; reg = <5 0 0xff>;
bank-width = <2>;
gpmc,mux-add-data;
gpmc,cs-on-ns = <0>;
gpmc,cs-rd-off-ns = <186>;
gpmc,cs-wr-off-ns = <186>;
gpmc,adv-on-ns = <12>;
gpmc,adv-rd-off-ns = <48>;
gpmc,adv-wr-off-ns = <48>;
gpmc,oe-on-ns = <54>;
gpmc,oe-off-ns = <168>;
gpmc,we-on-ns = <54>;
gpmc,we-off-ns = <168>;
gpmc,rd-cycle-ns = <186>;
gpmc,wr-cycle-ns = <186>;
gpmc,access-ns = <114>;
gpmc,page-burst-access-ns = <6>;
gpmc,bus-turnaround-ns = <12>;
gpmc,cycle2cycle-delay-ns = <18>;
gpmc,wr-data-mux-bus-ns = <90>;
gpmc,wr-access-ns = <186>;
gpmc,cycle2cycle-samecsen;
gpmc,cycle2cycle-diffcsen;
vddvario-supply = <&vddvario>;
vdd33a-supply = <&vdd33a>;
reg-io-width = <4>;
smsc,save-mac-address;
}; };
}; };

Просмотреть файл

@ -107,7 +107,7 @@
>; >;
}; };
smsc911x_pins: pinmux_smsc911x_pins { smsc9221_pins: pinmux_smsc9221_pins {
pinctrl-single,pins = < pinctrl-single,pins = <
0x1a2 (PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */ 0x1a2 (PIN_INPUT | MUX_MODE4) /* mcspi1_cs2.gpio_176 */
>; >;

Просмотреть файл

@ -10,7 +10,7 @@
*/ */
#include "omap3-igep.dtsi" #include "omap3-igep.dtsi"
#include "omap-gpmc-smsc911x.dtsi" #include "omap-gpmc-smsc9221.dtsi"
/ { / {
model = "IGEPv2 (TI OMAP AM/DM37x)"; model = "IGEPv2 (TI OMAP AM/DM37x)";
@ -248,7 +248,7 @@
ethernet@gpmc { ethernet@gpmc {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&smsc911x_pins>; pinctrl-0 = <&smsc9221_pins>;
reg = <5 0 0xff>; reg = <5 0 0xff>;
interrupt-parent = <&gpio6>; interrupt-parent = <&gpio6>;
interrupts = <16 IRQ_TYPE_LEVEL_LOW>; interrupts = <16 IRQ_TYPE_LEVEL_LOW>;

Просмотреть файл

@ -2,20 +2,6 @@
* Common support for CompuLab SB-T35 used on SBC-T3530, SBC-T3517 and SBC-T3730 * Common support for CompuLab SB-T35 used on SBC-T3530, SBC-T3517 and SBC-T3730
*/ */
/ {
vddvario_sb_t35: regulator-vddvario-sb-t35 {
compatible = "regulator-fixed";
regulator-name = "vddvario";
regulator-always-on;
};
vdd33a_sb_t35: regulator-vdd33a-sb-t35 {
compatible = "regulator-fixed";
regulator-name = "vdd33a";
regulator-always-on;
};
};
&omap3_pmx_core { &omap3_pmx_core {
smsc2_pins: pinmux_smsc2_pins { smsc2_pins: pinmux_smsc2_pins {
pinctrl-single,pins = < pinctrl-single,pins = <
@ -37,11 +23,10 @@
reg = <4 0 0xff>; reg = <4 0 0xff>;
bank-width = <2>; bank-width = <2>;
gpmc,mux-add-data; gpmc,mux-add-data;
gpmc,cs-on-ns = <0>; gpmc,cs-on-ns = <1>;
gpmc,cs-rd-off-ns = <186>; gpmc,cs-rd-off-ns = <180>;
gpmc,cs-wr-off-ns = <186>; gpmc,cs-wr-off-ns = <180>;
gpmc,adv-on-ns = <12>; gpmc,adv-rd-off-ns = <18>;
gpmc,adv-rd-off-ns = <48>;
gpmc,adv-wr-off-ns = <48>; gpmc,adv-wr-off-ns = <48>;
gpmc,oe-on-ns = <54>; gpmc,oe-on-ns = <54>;
gpmc,oe-off-ns = <168>; gpmc,oe-off-ns = <168>;
@ -49,16 +34,14 @@
gpmc,we-off-ns = <168>; gpmc,we-off-ns = <168>;
gpmc,rd-cycle-ns = <186>; gpmc,rd-cycle-ns = <186>;
gpmc,wr-cycle-ns = <186>; gpmc,wr-cycle-ns = <186>;
gpmc,access-ns = <114>; gpmc,access-ns = <144>;
gpmc,page-burst-access-ns = <6>; gpmc,page-burst-access-ns = <24>;
gpmc,bus-turnaround-ns = <12>; gpmc,bus-turnaround-ns = <90>;
gpmc,cycle2cycle-delay-ns = <18>; gpmc,cycle2cycle-delay-ns = <90>;
gpmc,wr-data-mux-bus-ns = <90>;
gpmc,wr-access-ns = <186>;
gpmc,cycle2cycle-samecsen; gpmc,cycle2cycle-samecsen;
gpmc,cycle2cycle-diffcsen; gpmc,cycle2cycle-diffcsen;
vddvario-supply = <&vddvario_sb_t35>; vddvario-supply = <&vddvario>;
vdd33a-supply = <&vdd33a_sb_t35>; vdd33a-supply = <&vdd33a>;
reg-io-width = <4>; reg-io-width = <4>;
smsc,save-mac-address; smsc,save-mac-address;
}; };

Просмотреть файл

@ -8,6 +8,19 @@
/ { / {
model = "CompuLab SBC-T3517 with CM-T3517"; model = "CompuLab SBC-T3517 with CM-T3517";
compatible = "compulab,omap3-sbc-t3517", "compulab,omap3-cm-t3517", "ti,am3517", "ti,omap3"; compatible = "compulab,omap3-sbc-t3517", "compulab,omap3-cm-t3517", "ti,am3517", "ti,omap3";
/* Only one GPMC smsc9220 on SBC-T3517, CM-T3517 uses am35x Ethernet */
vddvario: regulator-vddvario-sb-t35 {
compatible = "regulator-fixed";
regulator-name = "vddvario";
regulator-always-on;
};
vdd33a: regulator-vdd33a-sb-t35 {
compatible = "regulator-fixed";
regulator-name = "vdd33a";
regulator-always-on;
};
}; };
&omap3_pmx_core { &omap3_pmx_core {

Просмотреть файл

@ -61,7 +61,7 @@
ti,hwmods = "mpu"; ti,hwmods = "mpu";
}; };
iva { iva: iva {
compatible = "ti,iva2.2"; compatible = "ti,iva2.2";
ti,hwmods = "iva"; ti,hwmods = "iva";

Просмотреть файл

@ -630,6 +630,13 @@
status = "disabled"; status = "disabled";
}; };
mailbox: mailbox@4a0f4000 {
compatible = "ti,omap4-mailbox";
reg = <0x4a0f4000 0x200>;
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
ti,hwmods = "mailbox";
};
timer1: timer@4ae18000 { timer1: timer@4ae18000 {
compatible = "ti,omap5430-timer"; compatible = "ti,omap5430-timer";
reg = <0x4ae18000 0x80>; reg = <0x4ae18000 0x80>;

Просмотреть файл

@ -13,7 +13,7 @@
#include <dt-bindings/pinctrl/at91.h> #include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h> #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/clk/at91.h> #include <dt-bindings/clock/at91.h>
/ { / {
model = "Atmel SAMA5D3 family SoC"; model = "Atmel SAMA5D3 family SoC";

Просмотреть файл

@ -9,7 +9,7 @@
#include <dt-bindings/pinctrl/at91.h> #include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clk/at91.h> #include <dt-bindings/clock/at91.h>
/ { / {
ahb { ahb {

Просмотреть файл

@ -9,7 +9,7 @@
#include <dt-bindings/pinctrl/at91.h> #include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clk/at91.h> #include <dt-bindings/clock/at91.h>
/ { / {
aliases { aliases {

Просмотреть файл

@ -9,7 +9,7 @@
#include <dt-bindings/pinctrl/at91.h> #include <dt-bindings/pinctrl/at91.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clk/at91.h> #include <dt-bindings/clock/at91.h>
/ { / {
aliases { aliases {

Просмотреть файл

@ -49,7 +49,7 @@
reg = <0xfe61f080 0x4>; reg = <0xfe61f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfe610000 0x5000>; ranges = <0 0xfe610000 0x5000>;
PIO0: gpio@fe610000 { PIO0: gpio@fe610000 {
@ -187,7 +187,7 @@
reg = <0xfee0f080 0x4>; reg = <0xfee0f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 181 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfee00000 0x8000>; ranges = <0 0xfee00000 0x8000>;
PIO5: gpio@fee00000 { PIO5: gpio@fee00000 {
@ -282,7 +282,7 @@
reg = <0xfe82f080 0x4>; reg = <0xfe82f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfe820000 0x8000>; ranges = <0 0xfe820000 0x8000>;
PIO13: gpio@fe820000 { PIO13: gpio@fe820000 {
@ -423,7 +423,7 @@
reg = <0xfd6bf080 0x4>; reg = <0xfd6bf080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfd6b0000 0x3000>; ranges = <0 0xfd6b0000 0x3000>;
PIO100: gpio@fd6b0000 { PIO100: gpio@fd6b0000 {
@ -460,7 +460,7 @@
reg = <0xfd33f080 0x4>; reg = <0xfd33f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfd330000 0x5000>; ranges = <0 0xfd330000 0x5000>;
PIO103: gpio@fd330000 { PIO103: gpio@fd330000 {

Просмотреть файл

@ -53,7 +53,7 @@
reg = <0xfe61f080 0x4>; reg = <0xfe61f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 182 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfe610000 0x6000>; ranges = <0 0xfe610000 0x6000>;
PIO0: gpio@fe610000 { PIO0: gpio@fe610000 {
@ -201,7 +201,7 @@
reg = <0xfee0f080 0x4>; reg = <0xfee0f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfee00000 0x10000>; ranges = <0 0xfee00000 0x10000>;
PIO5: gpio@fee00000 { PIO5: gpio@fee00000 {
@ -333,7 +333,7 @@
reg = <0xfe82f080 0x4>; reg = <0xfe82f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfe820000 0x6000>; ranges = <0 0xfe820000 0x6000>;
PIO13: gpio@fe820000 { PIO13: gpio@fe820000 {
@ -461,7 +461,7 @@
reg = <0xfd6bf080 0x4>; reg = <0xfd6bf080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfd6b0000 0x3000>; ranges = <0 0xfd6b0000 0x3000>;
PIO100: gpio@fd6b0000 { PIO100: gpio@fd6b0000 {
@ -498,7 +498,7 @@
reg = <0xfd33f080 0x4>; reg = <0xfd33f080 0x4>;
reg-names = "irqmux"; reg-names = "irqmux";
interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
interrupts-names = "irqmux"; interrupt-names = "irqmux";
ranges = <0 0xfd330000 0x5000>; ranges = <0 0xfd330000 0x5000>;
PIO103: gpio@fd330000 { PIO103: gpio@fd330000 {

Просмотреть файл

@ -87,7 +87,7 @@
pll4: clk@01c20018 { pll4: clk@01c20018 {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "allwinner,sun4i-a10-pll1-clk"; compatible = "allwinner,sun7i-a20-pll4-clk";
reg = <0x01c20018 0x4>; reg = <0x01c20018 0x4>;
clocks = <&osc24M>; clocks = <&osc24M>;
clock-output-names = "pll4"; clock-output-names = "pll4";
@ -109,6 +109,14 @@
clock-output-names = "pll6_sata", "pll6_other", "pll6"; clock-output-names = "pll6_sata", "pll6_other", "pll6";
}; };
pll8: clk@01c20040 {
#clock-cells = <0>;
compatible = "allwinner,sun7i-a20-pll4-clk";
reg = <0x01c20040 0x4>;
clocks = <&osc24M>;
clock-output-names = "pll8";
};
cpu: cpu@01c20054 { cpu: cpu@01c20054 {
#clock-cells = <0>; #clock-cells = <0>;
compatible = "allwinner,sun4i-a10-cpu-clk"; compatible = "allwinner,sun4i-a10-cpu-clk";
@ -805,9 +813,9 @@
status = "disabled"; status = "disabled";
}; };
i2c4: i2c@01c2bc00 { i2c4: i2c@01c2c000 {
compatible = "allwinner,sun4i-i2c"; compatible = "allwinner,sun4i-i2c";
reg = <0x01c2bc00 0x400>; reg = <0x01c2c000 0x400>;
interrupts = <0 89 4>; interrupts = <0 89 4>;
clocks = <&apb1_gates 15>; clocks = <&apb1_gates 15>;
clock-frequency = <100000>; clock-frequency = <100000>;

Просмотреть файл

@ -1423,55 +1423,38 @@ EXPORT_SYMBOL(edma_clear_event);
#if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DMADEVICES) #if IS_ENABLED(CONFIG_OF) && IS_ENABLED(CONFIG_DMADEVICES)
static int edma_of_read_u32_to_s16_array(const struct device_node *np, static int edma_xbar_event_map(struct device *dev, struct device_node *node,
const char *propname, s16 *out_values, struct edma_soc_info *pdata, size_t sz)
size_t sz)
{ {
int ret; const char pname[] = "ti,edma-xbar-event-map";
ret = of_property_read_u16_array(np, propname, out_values, sz);
if (ret)
return ret;
/* Terminate it */
*out_values++ = -1;
*out_values++ = -1;
return 0;
}
static int edma_xbar_event_map(struct device *dev,
struct device_node *node,
struct edma_soc_info *pdata, int len)
{
int ret, i;
struct resource res; struct resource res;
void __iomem *xbar; void __iomem *xbar;
const s16 (*xbar_chans)[2]; s16 (*xbar_chans)[2];
size_t nelm = sz / sizeof(s16);
u32 shift, offset, mux; u32 shift, offset, mux;
int ret, i;
xbar_chans = devm_kzalloc(dev, xbar_chans = devm_kzalloc(dev, (nelm + 2) * sizeof(s16), GFP_KERNEL);
len/sizeof(s16) + 2*sizeof(s16),
GFP_KERNEL);
if (!xbar_chans) if (!xbar_chans)
return -ENOMEM; return -ENOMEM;
ret = of_address_to_resource(node, 1, &res); ret = of_address_to_resource(node, 1, &res);
if (ret) if (ret)
return -EIO; return -ENOMEM;
xbar = devm_ioremap(dev, res.start, resource_size(&res)); xbar = devm_ioremap(dev, res.start, resource_size(&res));
if (!xbar) if (!xbar)
return -ENOMEM; return -ENOMEM;
ret = edma_of_read_u32_to_s16_array(node, ret = of_property_read_u16_array(node, pname, (u16 *)xbar_chans, nelm);
"ti,edma-xbar-event-map",
(s16 *)xbar_chans,
len/sizeof(u32));
if (ret) if (ret)
return -EIO; return -EIO;
for (i = 0; xbar_chans[i][0] != -1; i++) { /* Invalidate last entry for the other user of this mess */
nelm >>= 1;
xbar_chans[nelm][0] = xbar_chans[nelm][1] = -1;
for (i = 0; i < nelm; i++) {
shift = (xbar_chans[i][1] & 0x03) << 3; shift = (xbar_chans[i][1] & 0x03) << 3;
offset = xbar_chans[i][1] & 0xfffffffc; offset = xbar_chans[i][1] & 0xfffffffc;
mux = readl(xbar + offset); mux = readl(xbar + offset);
@ -1480,8 +1463,7 @@ static int edma_xbar_event_map(struct device *dev,
writel(mux, (xbar + offset)); writel(mux, (xbar + offset));
} }
pdata->xbar_chans = xbar_chans; pdata->xbar_chans = (const s16 (*)[2]) xbar_chans;
return 0; return 0;
} }

Просмотреть файл

@ -37,7 +37,7 @@ CONFIG_SUN4I_EMAC=y
# CONFIG_NET_VENDOR_NATSEMI is not set # CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_SEEQ is not set # CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SMSC is not set # CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set CONFIG_STMMAC_ETH=y
# CONFIG_NET_VENDOR_WIZNET is not set # CONFIG_NET_VENDOR_WIZNET is not set
# CONFIG_WLAN is not set # CONFIG_WLAN is not set
CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250=y

Просмотреть файл

@ -77,7 +77,6 @@ static inline xpaddr_t machine_to_phys(xmaddr_t machine)
} }
/* VIRT <-> MACHINE conversion */ /* VIRT <-> MACHINE conversion */
#define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v)))) #define virt_to_machine(v) (phys_to_machine(XPADDR(__pa(v))))
#define virt_to_pfn(v) (PFN_DOWN(__pa(v)))
#define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v))) #define virt_to_mfn(v) (pfn_to_mfn(virt_to_pfn(v)))
#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))

Просмотреть файл

@ -23,7 +23,7 @@ config KVM
select HAVE_KVM_CPU_RELAX_INTERCEPT select HAVE_KVM_CPU_RELAX_INTERCEPT
select KVM_MMIO select KVM_MMIO
select KVM_ARM_HOST select KVM_ARM_HOST
depends on ARM_VIRT_EXT && ARM_LPAE depends on ARM_VIRT_EXT && ARM_LPAE && !CPU_BIG_ENDIAN
---help--- ---help---
Support hosting virtualized guest machines. You will also Support hosting virtualized guest machines. You will also
need to select one or more of the processor modules below. need to select one or more of the processor modules below.

Просмотреть файл

@ -42,6 +42,8 @@ static unsigned long hyp_idmap_start;
static unsigned long hyp_idmap_end; static unsigned long hyp_idmap_end;
static phys_addr_t hyp_idmap_vector; static phys_addr_t hyp_idmap_vector;
#define pgd_order get_order(PTRS_PER_PGD * sizeof(pgd_t))
#define kvm_pmd_huge(_x) (pmd_huge(_x) || pmd_trans_huge(_x)) #define kvm_pmd_huge(_x) (pmd_huge(_x) || pmd_trans_huge(_x))
static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) static void kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa)
@ -293,14 +295,14 @@ void free_boot_hyp_pgd(void)
if (boot_hyp_pgd) { if (boot_hyp_pgd) {
unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE); unmap_range(NULL, boot_hyp_pgd, hyp_idmap_start, PAGE_SIZE);
unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE); unmap_range(NULL, boot_hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
kfree(boot_hyp_pgd); free_pages((unsigned long)boot_hyp_pgd, pgd_order);
boot_hyp_pgd = NULL; boot_hyp_pgd = NULL;
} }
if (hyp_pgd) if (hyp_pgd)
unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE); unmap_range(NULL, hyp_pgd, TRAMPOLINE_VA, PAGE_SIZE);
kfree(init_bounce_page); free_page((unsigned long)init_bounce_page);
init_bounce_page = NULL; init_bounce_page = NULL;
mutex_unlock(&kvm_hyp_pgd_mutex); mutex_unlock(&kvm_hyp_pgd_mutex);
@ -330,7 +332,7 @@ void free_hyp_pgds(void)
for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE) for (addr = VMALLOC_START; is_vmalloc_addr((void*)addr); addr += PGDIR_SIZE)
unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE); unmap_range(NULL, hyp_pgd, KERN_TO_HYP(addr), PGDIR_SIZE);
kfree(hyp_pgd); free_pages((unsigned long)hyp_pgd, pgd_order);
hyp_pgd = NULL; hyp_pgd = NULL;
} }
@ -1024,7 +1026,7 @@ int kvm_mmu_init(void)
size_t len = __hyp_idmap_text_end - __hyp_idmap_text_start; size_t len = __hyp_idmap_text_end - __hyp_idmap_text_start;
phys_addr_t phys_base; phys_addr_t phys_base;
init_bounce_page = kmalloc(PAGE_SIZE, GFP_KERNEL); init_bounce_page = (void *)__get_free_page(GFP_KERNEL);
if (!init_bounce_page) { if (!init_bounce_page) {
kvm_err("Couldn't allocate HYP init bounce page\n"); kvm_err("Couldn't allocate HYP init bounce page\n");
err = -ENOMEM; err = -ENOMEM;
@ -1050,8 +1052,9 @@ int kvm_mmu_init(void)
(unsigned long)phys_base); (unsigned long)phys_base);
} }
hyp_pgd = kzalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL); hyp_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, pgd_order);
boot_hyp_pgd = kzalloc(PTRS_PER_PGD * sizeof(pgd_t), GFP_KERNEL); boot_hyp_pgd = (pgd_t *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, pgd_order);
if (!hyp_pgd || !boot_hyp_pgd) { if (!hyp_pgd || !boot_hyp_pgd) {
kvm_err("Hyp mode PGD not allocated\n"); kvm_err("Hyp mode PGD not allocated\n");
err = -ENOMEM; err = -ENOMEM;

Просмотреть файл

@ -1,7 +1,7 @@
/* /*
* Secondary CPU startup routine source file. * Secondary CPU startup routine source file.
* *
* Copyright (C) 2009 Texas Instruments, Inc. * Copyright (C) 2009-2014 Texas Instruments, Inc.
* *
* Author: * Author:
* Santosh Shilimkar <santosh.shilimkar@ti.com> * Santosh Shilimkar <santosh.shilimkar@ti.com>
@ -28,9 +28,13 @@
* code. This routine also provides a holding flag into which * code. This routine also provides a holding flag into which
* secondary core is held until we're ready for it to initialise. * secondary core is held until we're ready for it to initialise.
* The primary core will update this flag using a hardware * The primary core will update this flag using a hardware
+ * register AuxCoreBoot0. * register AuxCoreBoot0.
*/ */
ENTRY(omap5_secondary_startup) ENTRY(omap5_secondary_startup)
.arm
THUMB( adr r9, BSYM(wait) ) @ CPU may be entered in ARM mode.
THUMB( bx r9 ) @ If this is a Thumb-2 kernel,
THUMB( .thumb ) @ switch to Thumb now.
wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0 wait: ldr r2, =AUX_CORE_BOOT0_PA @ read from AuxCoreBoot0
ldr r0, [r2] ldr r0, [r2]
mov r0, r0, lsr #5 mov r0, r0, lsr #5

Просмотреть файл

@ -21,7 +21,7 @@ struct mv_sata_platform_data;
#define ORION_MBUS_DEVBUS_BOOT_ATTR 0x0f #define ORION_MBUS_DEVBUS_BOOT_ATTR 0x0f
#define ORION_MBUS_DEVBUS_TARGET(cs) 0x01 #define ORION_MBUS_DEVBUS_TARGET(cs) 0x01
#define ORION_MBUS_DEVBUS_ATTR(cs) (~(1 << cs)) #define ORION_MBUS_DEVBUS_ATTR(cs) (~(1 << cs))
#define ORION_MBUS_SRAM_TARGET 0x00 #define ORION_MBUS_SRAM_TARGET 0x09
#define ORION_MBUS_SRAM_ATTR 0x00 #define ORION_MBUS_SRAM_ATTR 0x00
/* /*

Просмотреть файл

@ -307,6 +307,7 @@
<0x0 0x1f21e000 0x0 0x1000>, <0x0 0x1f21e000 0x0 0x1000>,
<0x0 0x1f217000 0x0 0x1000>; <0x0 0x1f217000 0x0 0x1000>;
interrupts = <0x0 0x86 0x4>; interrupts = <0x0 0x86 0x4>;
dma-coherent;
status = "disabled"; status = "disabled";
clocks = <&sata01clk 0>; clocks = <&sata01clk 0>;
phys = <&phy1 0>; phys = <&phy1 0>;
@ -321,6 +322,7 @@
<0x0 0x1f22e000 0x0 0x1000>, <0x0 0x1f22e000 0x0 0x1000>,
<0x0 0x1f227000 0x0 0x1000>; <0x0 0x1f227000 0x0 0x1000>;
interrupts = <0x0 0x87 0x4>; interrupts = <0x0 0x87 0x4>;
dma-coherent;
status = "ok"; status = "ok";
clocks = <&sata23clk 0>; clocks = <&sata23clk 0>;
phys = <&phy2 0>; phys = <&phy2 0>;
@ -334,6 +336,7 @@
<0x0 0x1f23d000 0x0 0x1000>, <0x0 0x1f23d000 0x0 0x1000>,
<0x0 0x1f23e000 0x0 0x1000>; <0x0 0x1f23e000 0x0 0x1000>;
interrupts = <0x0 0x88 0x4>; interrupts = <0x0 0x88 0x4>;
dma-coherent;
status = "ok"; status = "ok";
clocks = <&sata45clk 0>; clocks = <&sata45clk 0>;
phys = <&phy3 0>; phys = <&phy3 0>;

Просмотреть файл

@ -138,6 +138,7 @@ static inline void *phys_to_virt(phys_addr_t x)
#define __pa(x) __virt_to_phys((unsigned long)(x)) #define __pa(x) __virt_to_phys((unsigned long)(x))
#define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x))) #define __va(x) ((void *)__phys_to_virt((phys_addr_t)(x)))
#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) #define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
#define virt_to_pfn(x) __phys_to_pfn(__virt_to_phys(x))
/* /*
* virt_to_page(k) convert a _valid_ virtual address to struct page * * virt_to_page(k) convert a _valid_ virtual address to struct page *

Просмотреть файл

@ -143,10 +143,8 @@ static int __init setup_early_printk(char *buf)
} }
/* no options parsing yet */ /* no options parsing yet */
if (paddr) { if (paddr)
set_fixmap_io(FIX_EARLYCON_MEM_BASE, paddr); early_base = (void __iomem *)set_fixmap_offset_io(FIX_EARLYCON_MEM_BASE, paddr);
early_base = (void __iomem *)fix_to_virt(FIX_EARLYCON_MEM_BASE);
}
printch = match->printch; printch = match->printch;
early_console = &early_console_dev; early_console = &early_console_dev;

Просмотреть файл

@ -396,7 +396,7 @@ static int __init arm64_device_init(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
return 0; return 0;
} }
arch_initcall(arm64_device_init); arch_initcall_sync(arm64_device_init);
static DEFINE_PER_CPU(struct cpu, cpu_data); static DEFINE_PER_CPU(struct cpu, cpu_data);

Просмотреть файл

@ -22,8 +22,11 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
#include <linux/dma-contiguous.h> #include <linux/dma-contiguous.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/swiotlb.h> #include <linux/swiotlb.h>
#include <linux/amba/bus.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
@ -305,17 +308,45 @@ struct dma_map_ops coherent_swiotlb_dma_ops = {
}; };
EXPORT_SYMBOL(coherent_swiotlb_dma_ops); EXPORT_SYMBOL(coherent_swiotlb_dma_ops);
static int dma_bus_notifier(struct notifier_block *nb,
unsigned long event, void *_dev)
{
struct device *dev = _dev;
if (event != BUS_NOTIFY_ADD_DEVICE)
return NOTIFY_DONE;
if (of_property_read_bool(dev->of_node, "dma-coherent"))
set_dma_ops(dev, &coherent_swiotlb_dma_ops);
return NOTIFY_OK;
}
static struct notifier_block platform_bus_nb = {
.notifier_call = dma_bus_notifier,
};
static struct notifier_block amba_bus_nb = {
.notifier_call = dma_bus_notifier,
};
extern int swiotlb_late_init_with_default_size(size_t default_size); extern int swiotlb_late_init_with_default_size(size_t default_size);
static int __init swiotlb_late_init(void) static int __init swiotlb_late_init(void)
{ {
size_t swiotlb_size = min(SZ_64M, MAX_ORDER_NR_PAGES << PAGE_SHIFT); size_t swiotlb_size = min(SZ_64M, MAX_ORDER_NR_PAGES << PAGE_SHIFT);
dma_ops = &coherent_swiotlb_dma_ops; /*
* These must be registered before of_platform_populate().
*/
bus_register_notifier(&platform_bus_type, &platform_bus_nb);
bus_register_notifier(&amba_bustype, &amba_bus_nb);
dma_ops = &noncoherent_swiotlb_dma_ops;
return swiotlb_late_init_with_default_size(swiotlb_size); return swiotlb_late_init_with_default_size(swiotlb_size);
} }
subsys_initcall(swiotlb_late_init); arch_initcall(swiotlb_late_init);
#define PREALLOC_DMA_DEBUG_ENTRIES 4096 #define PREALLOC_DMA_DEBUG_ENTRIES 4096

Просмотреть файл

@ -374,6 +374,9 @@ int kern_addr_valid(unsigned long addr)
if (pmd_none(*pmd)) if (pmd_none(*pmd))
return 0; return 0;
if (pmd_sect(*pmd))
return pfn_valid(pmd_pfn(*pmd));
pte = pte_offset_kernel(pmd, addr); pte = pte_offset_kernel(pmd, addr);
if (pte_none(*pte)) if (pte_none(*pte))
return 0; return 0;

Просмотреть файл

@ -1,37 +0,0 @@
/*
* Memory barrier definitions for the Hexagon architecture
*
* Copyright (c) 2010-2011, The Linux Foundation. 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.
*/
#ifndef _ASM_BARRIER_H
#define _ASM_BARRIER_H
#define rmb() barrier()
#define read_barrier_depends() barrier()
#define wmb() barrier()
#define mb() barrier()
#define smp_rmb() barrier()
#define smp_read_barrier_depends() barrier()
#define smp_wmb() barrier()
#define smp_mb() barrier()
/* Set a value and use a memory barrier. Used by the scheduler somewhere. */
#define set_mb(var, value) \
do { var = value; mb(); } while (0)
#endif /* _ASM_BARRIER_H */

Просмотреть файл

@ -1,6 +1,8 @@
# UAPI Header export list # UAPI Header export list
include include/uapi/asm-generic/Kbuild.asm include include/uapi/asm-generic/Kbuild.asm
generic-y += resource.h
header-y += bitsperlong.h header-y += bitsperlong.h
header-y += byteorder.h header-y += byteorder.h
header-y += errno.h header-y += errno.h
@ -13,7 +15,6 @@ header-y += msgbuf.h
header-y += pdc.h header-y += pdc.h
header-y += posix_types.h header-y += posix_types.h
header-y += ptrace.h header-y += ptrace.h
header-y += resource.h
header-y += sembuf.h header-y += sembuf.h
header-y += setup.h header-y += setup.h
header-y += shmbuf.h header-y += shmbuf.h

Просмотреть файл

@ -1,7 +0,0 @@
#ifndef _ASM_PARISC_RESOURCE_H
#define _ASM_PARISC_RESOURCE_H
#define _STK_LIM_MAX 10 * _STK_LIM
#include <asm-generic/resource.h>
#endif

Просмотреть файл

@ -139,18 +139,18 @@ static struct addr_range prep_initrd(struct addr_range vmlinux, void *chosen,
* edit the command line passed to vmlinux (by setting /chosen/bootargs). * edit the command line passed to vmlinux (by setting /chosen/bootargs).
* The buffer is put in it's own section so that tools may locate it easier. * The buffer is put in it's own section so that tools may locate it easier.
*/ */
static char cmdline[COMMAND_LINE_SIZE] static char cmdline[BOOT_COMMAND_LINE_SIZE]
__attribute__((__section__("__builtin_cmdline"))); __attribute__((__section__("__builtin_cmdline")));
static void prep_cmdline(void *chosen) static void prep_cmdline(void *chosen)
{ {
if (cmdline[0] == '\0') if (cmdline[0] == '\0')
getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1); getprop(chosen, "bootargs", cmdline, BOOT_COMMAND_LINE_SIZE-1);
printf("\n\rLinux/PowerPC load: %s", cmdline); printf("\n\rLinux/PowerPC load: %s", cmdline);
/* If possible, edit the command line */ /* If possible, edit the command line */
if (console_ops.edit_cmdline) if (console_ops.edit_cmdline)
console_ops.edit_cmdline(cmdline, COMMAND_LINE_SIZE); console_ops.edit_cmdline(cmdline, BOOT_COMMAND_LINE_SIZE);
printf("\n\r"); printf("\n\r");
/* Put the command line back into the devtree for the kernel */ /* Put the command line back into the devtree for the kernel */
@ -174,7 +174,7 @@ void start(void)
* built-in command line wasn't set by an external tool */ * built-in command line wasn't set by an external tool */
if ((loader_info.cmdline_len > 0) && (cmdline[0] == '\0')) if ((loader_info.cmdline_len > 0) && (cmdline[0] == '\0'))
memmove(cmdline, loader_info.cmdline, memmove(cmdline, loader_info.cmdline,
min(loader_info.cmdline_len, COMMAND_LINE_SIZE-1)); min(loader_info.cmdline_len, BOOT_COMMAND_LINE_SIZE-1));
if (console_ops.open && (console_ops.open() < 0)) if (console_ops.open && (console_ops.open() < 0))
exit(); exit();

Просмотреть файл

@ -15,7 +15,7 @@
#include "types.h" #include "types.h"
#include "string.h" #include "string.h"
#define COMMAND_LINE_SIZE 512 #define BOOT_COMMAND_LINE_SIZE 2048
#define MAX_PATH_LEN 256 #define MAX_PATH_LEN 256
#define MAX_PROP_LEN 256 /* What should this be? */ #define MAX_PROP_LEN 256 /* What should this be? */

Просмотреть файл

@ -47,13 +47,13 @@ BSS_STACK(4096);
* The buffer is put in it's own section so that tools may locate it easier. * The buffer is put in it's own section so that tools may locate it easier.
*/ */
static char cmdline[COMMAND_LINE_SIZE] static char cmdline[BOOT_COMMAND_LINE_SIZE]
__attribute__((__section__("__builtin_cmdline"))); __attribute__((__section__("__builtin_cmdline")));
static void prep_cmdline(void *chosen) static void prep_cmdline(void *chosen)
{ {
if (cmdline[0] == '\0') if (cmdline[0] == '\0')
getprop(chosen, "bootargs", cmdline, COMMAND_LINE_SIZE-1); getprop(chosen, "bootargs", cmdline, BOOT_COMMAND_LINE_SIZE-1);
else else
setprop_str(chosen, "bootargs", cmdline); setprop_str(chosen, "bootargs", cmdline);

Просмотреть файл

@ -41,14 +41,14 @@ struct opal_takeover_args {
* size except the last one in the list to be as well. * size except the last one in the list to be as well.
*/ */
struct opal_sg_entry { struct opal_sg_entry {
void *data; __be64 data;
long length; __be64 length;
}; };
/* sg list */ /* SG list */
struct opal_sg_list { struct opal_sg_list {
unsigned long num_entries; __be64 length;
struct opal_sg_list *next; __be64 next;
struct opal_sg_entry entry[]; struct opal_sg_entry entry[];
}; };
@ -858,8 +858,8 @@ int64_t opal_lpc_write(uint32_t chip_id, enum OpalLPCAddressType addr_type,
int64_t opal_lpc_read(uint32_t chip_id, enum OpalLPCAddressType addr_type, int64_t opal_lpc_read(uint32_t chip_id, enum OpalLPCAddressType addr_type,
uint32_t addr, __be32 *data, uint32_t sz); uint32_t addr, __be32 *data, uint32_t sz);
int64_t opal_read_elog(uint64_t buffer, size_t size, uint64_t log_id); int64_t opal_read_elog(uint64_t buffer, uint64_t size, uint64_t log_id);
int64_t opal_get_elog_size(uint64_t *log_id, size_t *size, uint64_t *elog_type); int64_t opal_get_elog_size(__be64 *log_id, __be64 *size, __be64 *elog_type);
int64_t opal_write_elog(uint64_t buffer, uint64_t size, uint64_t offset); int64_t opal_write_elog(uint64_t buffer, uint64_t size, uint64_t offset);
int64_t opal_send_ack_elog(uint64_t log_id); int64_t opal_send_ack_elog(uint64_t log_id);
void opal_resend_pending_logs(void); void opal_resend_pending_logs(void);
@ -868,23 +868,24 @@ int64_t opal_validate_flash(uint64_t buffer, uint32_t *size, uint32_t *result);
int64_t opal_manage_flash(uint8_t op); int64_t opal_manage_flash(uint8_t op);
int64_t opal_update_flash(uint64_t blk_list); int64_t opal_update_flash(uint64_t blk_list);
int64_t opal_dump_init(uint8_t dump_type); int64_t opal_dump_init(uint8_t dump_type);
int64_t opal_dump_info(uint32_t *dump_id, uint32_t *dump_size); int64_t opal_dump_info(__be32 *dump_id, __be32 *dump_size);
int64_t opal_dump_info2(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type); int64_t opal_dump_info2(__be32 *dump_id, __be32 *dump_size, __be32 *dump_type);
int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer); int64_t opal_dump_read(uint32_t dump_id, uint64_t buffer);
int64_t opal_dump_ack(uint32_t dump_id); int64_t opal_dump_ack(uint32_t dump_id);
int64_t opal_dump_resend_notification(void); int64_t opal_dump_resend_notification(void);
int64_t opal_get_msg(uint64_t buffer, size_t size); int64_t opal_get_msg(uint64_t buffer, uint64_t size);
int64_t opal_check_completion(uint64_t buffer, size_t size, uint64_t token); int64_t opal_check_completion(uint64_t buffer, uint64_t size, uint64_t token);
int64_t opal_sync_host_reboot(void); int64_t opal_sync_host_reboot(void);
int64_t opal_get_param(uint64_t token, uint32_t param_id, uint64_t buffer, int64_t opal_get_param(uint64_t token, uint32_t param_id, uint64_t buffer,
size_t length); uint64_t length);
int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer, int64_t opal_set_param(uint64_t token, uint32_t param_id, uint64_t buffer,
size_t length); uint64_t length);
int64_t opal_sensor_read(uint32_t sensor_hndl, int token, __be32 *sensor_data); int64_t opal_sensor_read(uint32_t sensor_hndl, int token, __be32 *sensor_data);
/* Internal functions */ /* Internal functions */
extern int early_init_dt_scan_opal(unsigned long node, const char *uname, int depth, void *data); extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
int depth, void *data);
extern int early_init_dt_scan_recoverable_ranges(unsigned long node, extern int early_init_dt_scan_recoverable_ranges(unsigned long node,
const char *uname, int depth, void *data); const char *uname, int depth, void *data);
@ -893,10 +894,6 @@ extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len);
extern void hvc_opal_init_early(void); extern void hvc_opal_init_early(void);
/* Internal functions */
extern int early_init_dt_scan_opal(unsigned long node, const char *uname,
int depth, void *data);
extern int opal_notifier_register(struct notifier_block *nb); extern int opal_notifier_register(struct notifier_block *nb);
extern int opal_notifier_unregister(struct notifier_block *nb); extern int opal_notifier_unregister(struct notifier_block *nb);
@ -906,9 +903,6 @@ extern void opal_notifier_enable(void);
extern void opal_notifier_disable(void); extern void opal_notifier_disable(void);
extern void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val); extern void opal_notifier_update_evt(uint64_t evt_mask, uint64_t evt_val);
extern int opal_get_chars(uint32_t vtermno, char *buf, int count);
extern int opal_put_chars(uint32_t vtermno, const char *buf, int total_len);
extern int __opal_async_get_token(void); extern int __opal_async_get_token(void);
extern int opal_async_get_token_interruptible(void); extern int opal_async_get_token_interruptible(void);
extern int __opal_async_release_token(int token); extern int __opal_async_release_token(int token);
@ -916,8 +910,6 @@ extern int opal_async_release_token(int token);
extern int opal_async_wait_response(uint64_t token, struct opal_msg *msg); extern int opal_async_wait_response(uint64_t token, struct opal_msg *msg);
extern int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data); extern int opal_get_sensor_data(u32 sensor_hndl, u32 *sensor_data);
extern void hvc_opal_init_early(void);
struct rtc_time; struct rtc_time;
extern int opal_set_rtc_time(struct rtc_time *tm); extern int opal_set_rtc_time(struct rtc_time *tm);
extern void opal_get_rtc_time(struct rtc_time *tm); extern void opal_get_rtc_time(struct rtc_time *tm);
@ -937,6 +929,10 @@ extern int opal_resync_timebase(void);
extern void opal_lpc_init(void); extern void opal_lpc_init(void);
struct opal_sg_list *opal_vmalloc_to_sg_list(void *vmalloc_addr,
unsigned long vmalloc_size);
void opal_free_sg_list(struct opal_sg_list *sg);
#endif /* __ASSEMBLY__ */ #endif /* __ASSEMBLY__ */
#endif /* __OPAL_H */ #endif /* __OPAL_H */

Просмотреть файл

@ -1 +1,6 @@
#include <asm-generic/setup.h> #ifndef _UAPI_ASM_POWERPC_SETUP_H
#define _UAPI_ASM_POWERPC_SETUP_H
#define COMMAND_LINE_SIZE 2048
#endif /* _UAPI_ASM_POWERPC_SETUP_H */

Просмотреть файл

@ -120,6 +120,7 @@ EXPORT_SYMBOL(giveup_spe);
EXPORT_SYMBOL(flush_instruction_cache); EXPORT_SYMBOL(flush_instruction_cache);
#endif #endif
EXPORT_SYMBOL(flush_dcache_range); EXPORT_SYMBOL(flush_dcache_range);
EXPORT_SYMBOL(flush_icache_range);
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#ifdef CONFIG_PPC32 #ifdef CONFIG_PPC32

Просмотреть файл

@ -705,7 +705,7 @@ static int __init rtas_flash_init(void)
if (rtas_token("ibm,update-flash-64-and-reboot") == if (rtas_token("ibm,update-flash-64-and-reboot") ==
RTAS_UNKNOWN_SERVICE) { RTAS_UNKNOWN_SERVICE) {
pr_info("rtas_flash: no firmware flash support\n"); pr_info("rtas_flash: no firmware flash support\n");
return 1; return -EINVAL;
} }
rtas_validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL); rtas_validate_flash_data.buf = kzalloc(VALIDATE_BUF_SIZE, GFP_KERNEL);

Просмотреть файл

@ -242,6 +242,12 @@ kvm_novcpu_exit:
*/ */
.globl kvm_start_guest .globl kvm_start_guest
kvm_start_guest: kvm_start_guest:
/* Set runlatch bit the minute you wake up from nap */
mfspr r1, SPRN_CTRLF
ori r1, r1, 1
mtspr SPRN_CTRLT, r1
ld r2,PACATOC(r13) ld r2,PACATOC(r13)
li r0,KVM_HWTHREAD_IN_KVM li r0,KVM_HWTHREAD_IN_KVM
@ -309,6 +315,11 @@ kvm_no_guest:
li r0, KVM_HWTHREAD_IN_NAP li r0, KVM_HWTHREAD_IN_NAP
stb r0, HSTATE_HWTHREAD_STATE(r13) stb r0, HSTATE_HWTHREAD_STATE(r13)
kvm_do_nap: kvm_do_nap:
/* Clear the runlatch bit before napping */
mfspr r2, SPRN_CTRLF
clrrdi r2, r2, 1
mtspr SPRN_CTRLT, r2
li r3, LPCR_PECE0 li r3, LPCR_PECE0
mfspr r4, SPRN_LPCR mfspr r4, SPRN_LPCR
rlwimi r4, r3, 0, LPCR_PECE0 | LPCR_PECE1 rlwimi r4, r3, 0, LPCR_PECE0 | LPCR_PECE1
@ -1999,8 +2010,13 @@ END_FTR_SECTION_IFCLR(CPU_FTR_ARCH_206)
/* /*
* Take a nap until a decrementer or external or doobell interrupt * Take a nap until a decrementer or external or doobell interrupt
* occurs, with PECE1, PECE0 and PECEDP set in LPCR * occurs, with PECE1, PECE0 and PECEDP set in LPCR. Also clear the
* runlatch bit before napping.
*/ */
mfspr r2, SPRN_CTRLF
clrrdi r2, r2, 1
mtspr SPRN_CTRLT, r2
li r0,1 li r0,1
stb r0,HSTATE_HWTHREAD_REQ(r13) stb r0,HSTATE_HWTHREAD_REQ(r13)
mfspr r5,SPRN_LPCR mfspr r5,SPRN_LPCR

Просмотреть файл

@ -82,17 +82,14 @@ static inline void __tlbie(unsigned long vpn, int psize, int apsize, int ssize)
va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1); va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1);
va |= penc << 12; va |= penc << 12;
va |= ssize << 8; va |= ssize << 8;
/* Add AVAL part */ /*
if (psize != apsize) { * AVAL bits:
/* * We don't need all the bits, but rest of the bits
* MPSS, 64K base page size and 16MB parge page size * must be ignored by the processor.
* We don't need all the bits, but rest of the bits * vpn cover upto 65 bits of va. (0...65) and we need
* must be ignored by the processor. * 58..64 bits of va.
* vpn cover upto 65 bits of va. (0...65) and we need */
* 58..64 bits of va. va |= (vpn & 0xfe); /* AVAL */
*/
va |= (vpn & 0xfe);
}
va |= 1; /* L */ va |= 1; /* L */
asm volatile(ASM_FTR_IFCLR("tlbie %0,1", PPC_TLBIE(%1,%0), %2) asm volatile(ASM_FTR_IFCLR("tlbie %0,1", PPC_TLBIE(%1,%0), %2)
: : "r" (va), "r"(0), "i" (CPU_FTR_ARCH_206) : : "r" (va), "r"(0), "i" (CPU_FTR_ARCH_206)
@ -133,17 +130,14 @@ static inline void __tlbiel(unsigned long vpn, int psize, int apsize, int ssize)
va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1); va &= ~((1ul << mmu_psize_defs[apsize].shift) - 1);
va |= penc << 12; va |= penc << 12;
va |= ssize << 8; va |= ssize << 8;
/* Add AVAL part */ /*
if (psize != apsize) { * AVAL bits:
/* * We don't need all the bits, but rest of the bits
* MPSS, 64K base page size and 16MB parge page size * must be ignored by the processor.
* We don't need all the bits, but rest of the bits * vpn cover upto 65 bits of va. (0...65) and we need
* must be ignored by the processor. * 58..64 bits of va.
* vpn cover upto 65 bits of va. (0...65) and we need */
* 58..64 bits of va. va |= (vpn & 0xfe);
*/
va |= (vpn & 0xfe);
}
va |= 1; /* L */ va |= 1; /* L */
asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)" asm volatile(".long 0x7c000224 | (%0 << 11) | (1 << 21)"
: : "r"(va) : "memory"); : : "r"(va) : "memory");

Просмотреть файл

@ -155,14 +155,26 @@ static ssize_t read_offset_data(void *dest, size_t dest_len,
return copy_len; return copy_len;
} }
static unsigned long h_get_24x7_catalog_page(char page[static 4096], static unsigned long h_get_24x7_catalog_page_(unsigned long phys_4096,
u32 version, u32 index) unsigned long version,
unsigned long index)
{ {
WARN_ON(!IS_ALIGNED((unsigned long)page, 4096)); pr_devel("h_get_24x7_catalog_page(0x%lx, %lu, %lu)",
return plpar_hcall_norets(H_GET_24X7_CATALOG_PAGE, phys_4096,
virt_to_phys(page),
version, version,
index); index);
WARN_ON(!IS_ALIGNED(phys_4096, 4096));
return plpar_hcall_norets(H_GET_24X7_CATALOG_PAGE,
phys_4096,
version,
index);
}
static unsigned long h_get_24x7_catalog_page(char page[],
u64 version, u32 index)
{
return h_get_24x7_catalog_page_(virt_to_phys(page),
version, index);
} }
static ssize_t catalog_read(struct file *filp, struct kobject *kobj, static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
@ -173,7 +185,7 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
ssize_t ret = 0; ssize_t ret = 0;
size_t catalog_len = 0, catalog_page_len = 0, page_count = 0; size_t catalog_len = 0, catalog_page_len = 0, page_count = 0;
loff_t page_offset = 0; loff_t page_offset = 0;
uint32_t catalog_version_num = 0; uint64_t catalog_version_num = 0;
void *page = kmem_cache_alloc(hv_page_cache, GFP_USER); void *page = kmem_cache_alloc(hv_page_cache, GFP_USER);
struct hv_24x7_catalog_page_0 *page_0 = page; struct hv_24x7_catalog_page_0 *page_0 = page;
if (!page) if (!page)
@ -185,7 +197,7 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
goto e_free; goto e_free;
} }
catalog_version_num = be32_to_cpu(page_0->version); catalog_version_num = be64_to_cpu(page_0->version);
catalog_page_len = be32_to_cpu(page_0->length); catalog_page_len = be32_to_cpu(page_0->length);
catalog_len = catalog_page_len * 4096; catalog_len = catalog_page_len * 4096;
@ -208,8 +220,9 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
page, 4096, page_offset * 4096); page, 4096, page_offset * 4096);
e_free: e_free:
if (hret) if (hret)
pr_err("h_get_24x7_catalog_page(ver=%d, page=%lld) failed: rc=%ld\n", pr_err("h_get_24x7_catalog_page(ver=%lld, page=%lld) failed:"
catalog_version_num, page_offset, hret); " rc=%ld\n",
catalog_version_num, page_offset, hret);
kfree(page); kfree(page);
pr_devel("catalog_read: offset=%lld(%lld) count=%zu(%zu) catalog_len=%zu(%zu) => %zd\n", pr_devel("catalog_read: offset=%lld(%lld) count=%zu(%zu) catalog_len=%zu(%zu) => %zd\n",
@ -243,7 +256,7 @@ e_free: \
static DEVICE_ATTR_RO(_name) static DEVICE_ATTR_RO(_name)
PAGE_0_ATTR(catalog_version, "%lld\n", PAGE_0_ATTR(catalog_version, "%lld\n",
(unsigned long long)be32_to_cpu(page_0->version)); (unsigned long long)be64_to_cpu(page_0->version));
PAGE_0_ATTR(catalog_len, "%lld\n", PAGE_0_ATTR(catalog_len, "%lld\n",
(unsigned long long)be32_to_cpu(page_0->length) * 4096); (unsigned long long)be32_to_cpu(page_0->length) * 4096);
static BIN_ATTR_RO(catalog, 0/* real length varies */); static BIN_ATTR_RO(catalog, 0/* real length varies */);
@ -485,13 +498,13 @@ static int hv_24x7_init(void)
struct hv_perf_caps caps; struct hv_perf_caps caps;
if (!firmware_has_feature(FW_FEATURE_LPAR)) { if (!firmware_has_feature(FW_FEATURE_LPAR)) {
pr_info("not a virtualized system, not enabling\n"); pr_debug("not a virtualized system, not enabling\n");
return -ENODEV; return -ENODEV;
} }
hret = hv_perf_caps_get(&caps); hret = hv_perf_caps_get(&caps);
if (hret) { if (hret) {
pr_info("could not obtain capabilities, error 0x%80lx, not enabling\n", pr_debug("could not obtain capabilities, not enabling, rc=%ld\n",
hret); hret);
return -ENODEV; return -ENODEV;
} }

Просмотреть файл

@ -78,7 +78,7 @@ static ssize_t kernel_version_show(struct device *dev,
return sprintf(page, "0x%x\n", COUNTER_INFO_VERSION_CURRENT); return sprintf(page, "0x%x\n", COUNTER_INFO_VERSION_CURRENT);
} }
DEVICE_ATTR_RO(kernel_version); static DEVICE_ATTR_RO(kernel_version);
HV_CAPS_ATTR(version, "0x%x\n"); HV_CAPS_ATTR(version, "0x%x\n");
HV_CAPS_ATTR(ga, "%d\n"); HV_CAPS_ATTR(ga, "%d\n");
HV_CAPS_ATTR(expanded, "%d\n"); HV_CAPS_ATTR(expanded, "%d\n");
@ -273,13 +273,13 @@ static int hv_gpci_init(void)
struct hv_perf_caps caps; struct hv_perf_caps caps;
if (!firmware_has_feature(FW_FEATURE_LPAR)) { if (!firmware_has_feature(FW_FEATURE_LPAR)) {
pr_info("not a virtualized system, not enabling\n"); pr_debug("not a virtualized system, not enabling\n");
return -ENODEV; return -ENODEV;
} }
hret = hv_perf_caps_get(&caps); hret = hv_perf_caps_get(&caps);
if (hret) { if (hret) {
pr_info("could not obtain capabilities, error 0x%80lx, not enabling\n", pr_debug("could not obtain capabilities, not enabling, rc=%ld\n",
hret); hret);
return -ENODEV; return -ENODEV;
} }

Просмотреть файл

@ -209,89 +209,20 @@ static struct kobj_type dump_ktype = {
.default_attrs = dump_default_attrs, .default_attrs = dump_default_attrs,
}; };
static void free_dump_sg_list(struct opal_sg_list *list) static int64_t dump_read_info(uint32_t *dump_id, uint32_t *dump_size, uint32_t *dump_type)
{
struct opal_sg_list *sg1;
while (list) {
sg1 = list->next;
kfree(list);
list = sg1;
}
list = NULL;
}
static struct opal_sg_list *dump_data_to_sglist(struct dump_obj *dump)
{
struct opal_sg_list *sg1, *list = NULL;
void *addr;
int64_t size;
addr = dump->buffer;
size = dump->size;
sg1 = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!sg1)
goto nomem;
list = sg1;
sg1->num_entries = 0;
while (size > 0) {
/* Translate virtual address to physical address */
sg1->entry[sg1->num_entries].data =
(void *)(vmalloc_to_pfn(addr) << PAGE_SHIFT);
if (size > PAGE_SIZE)
sg1->entry[sg1->num_entries].length = PAGE_SIZE;
else
sg1->entry[sg1->num_entries].length = size;
sg1->num_entries++;
if (sg1->num_entries >= SG_ENTRIES_PER_NODE) {
sg1->next = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!sg1->next)
goto nomem;
sg1 = sg1->next;
sg1->num_entries = 0;
}
addr += PAGE_SIZE;
size -= PAGE_SIZE;
}
return list;
nomem:
pr_err("%s : Failed to allocate memory\n", __func__);
free_dump_sg_list(list);
return NULL;
}
static void sglist_to_phy_addr(struct opal_sg_list *list)
{
struct opal_sg_list *sg, *next;
for (sg = list; sg; sg = next) {
next = sg->next;
/* Don't translate NULL pointer for last entry */
if (sg->next)
sg->next = (struct opal_sg_list *)__pa(sg->next);
else
sg->next = NULL;
/* Convert num_entries to length */
sg->num_entries =
sg->num_entries * sizeof(struct opal_sg_entry) + 16;
}
}
static int64_t dump_read_info(uint32_t *id, uint32_t *size, uint32_t *type)
{ {
__be32 id, size, type;
int rc; int rc;
*type = 0xffffffff;
rc = opal_dump_info2(id, size, type); type = cpu_to_be32(0xffffffff);
rc = opal_dump_info2(&id, &size, &type);
if (rc == OPAL_PARAMETER) if (rc == OPAL_PARAMETER)
rc = opal_dump_info(id, size); rc = opal_dump_info(&id, &size);
*dump_id = be32_to_cpu(id);
*dump_size = be32_to_cpu(size);
*dump_type = be32_to_cpu(type);
if (rc) if (rc)
pr_warn("%s: Failed to get dump info (%d)\n", pr_warn("%s: Failed to get dump info (%d)\n",
@ -314,15 +245,12 @@ static int64_t dump_read_data(struct dump_obj *dump)
} }
/* Generate SG list */ /* Generate SG list */
list = dump_data_to_sglist(dump); list = opal_vmalloc_to_sg_list(dump->buffer, dump->size);
if (!list) { if (!list) {
rc = -ENOMEM; rc = -ENOMEM;
goto out; goto out;
} }
/* Translate sg list addr to real address */
sglist_to_phy_addr(list);
/* First entry address */ /* First entry address */
addr = __pa(list); addr = __pa(list);
@ -341,7 +269,7 @@ static int64_t dump_read_data(struct dump_obj *dump)
__func__, dump->id); __func__, dump->id);
/* Free SG list */ /* Free SG list */
free_dump_sg_list(list); opal_free_sg_list(list);
out: out:
return rc; return rc;

Просмотреть файл

@ -238,18 +238,25 @@ static struct elog_obj *create_elog_obj(uint64_t id, size_t size, uint64_t type)
static void elog_work_fn(struct work_struct *work) static void elog_work_fn(struct work_struct *work)
{ {
size_t elog_size; __be64 size;
__be64 id;
__be64 type;
uint64_t elog_size;
uint64_t log_id; uint64_t log_id;
uint64_t elog_type; uint64_t elog_type;
int rc; int rc;
char name[2+16+1]; char name[2+16+1];
rc = opal_get_elog_size(&log_id, &elog_size, &elog_type); rc = opal_get_elog_size(&id, &size, &type);
if (rc != OPAL_SUCCESS) { if (rc != OPAL_SUCCESS) {
pr_err("ELOG: Opal log read failed\n"); pr_err("ELOG: Opal log read failed\n");
return; return;
} }
elog_size = be64_to_cpu(size);
log_id = be64_to_cpu(id);
elog_type = be64_to_cpu(type);
BUG_ON(elog_size > OPAL_MAX_ERRLOG_SIZE); BUG_ON(elog_size > OPAL_MAX_ERRLOG_SIZE);
if (elog_size >= OPAL_MAX_ERRLOG_SIZE) if (elog_size >= OPAL_MAX_ERRLOG_SIZE)

Просмотреть файл

@ -79,9 +79,6 @@
/* XXX: Assume candidate image size is <= 1GB */ /* XXX: Assume candidate image size is <= 1GB */
#define MAX_IMAGE_SIZE 0x40000000 #define MAX_IMAGE_SIZE 0x40000000
/* Flash sg list version */
#define SG_LIST_VERSION (1UL)
/* Image status */ /* Image status */
enum { enum {
IMAGE_INVALID, IMAGE_INVALID,
@ -131,11 +128,15 @@ static DEFINE_MUTEX(image_data_mutex);
*/ */
static inline void opal_flash_validate(void) static inline void opal_flash_validate(void)
{ {
struct validate_flash_t *args_buf = &validate_flash_data; long ret;
void *buf = validate_flash_data.buf;
__be32 size, result;
args_buf->status = opal_validate_flash(__pa(args_buf->buf), ret = opal_validate_flash(__pa(buf), &size, &result);
&(args_buf->buf_size),
&(args_buf->result)); validate_flash_data.status = ret;
validate_flash_data.buf_size = be32_to_cpu(size);
validate_flash_data.result = be32_to_cpu(result);
} }
/* /*
@ -267,94 +268,12 @@ static ssize_t manage_store(struct kobject *kobj,
return count; return count;
} }
/*
* Free sg list
*/
static void free_sg_list(struct opal_sg_list *list)
{
struct opal_sg_list *sg1;
while (list) {
sg1 = list->next;
kfree(list);
list = sg1;
}
list = NULL;
}
/*
* Build candidate image scatter gather list
*
* list format:
* -----------------------------------
* | VER (8) | Entry length in bytes |
* -----------------------------------
* | Pointer to next entry |
* -----------------------------------
* | Address of memory area 1 |
* -----------------------------------
* | Length of memory area 1 |
* -----------------------------------
* | ......... |
* -----------------------------------
* | ......... |
* -----------------------------------
* | Address of memory area N |
* -----------------------------------
* | Length of memory area N |
* -----------------------------------
*/
static struct opal_sg_list *image_data_to_sglist(void)
{
struct opal_sg_list *sg1, *list = NULL;
void *addr;
int size;
addr = image_data.data;
size = image_data.size;
sg1 = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!sg1)
return NULL;
list = sg1;
sg1->num_entries = 0;
while (size > 0) {
/* Translate virtual address to physical address */
sg1->entry[sg1->num_entries].data =
(void *)(vmalloc_to_pfn(addr) << PAGE_SHIFT);
if (size > PAGE_SIZE)
sg1->entry[sg1->num_entries].length = PAGE_SIZE;
else
sg1->entry[sg1->num_entries].length = size;
sg1->num_entries++;
if (sg1->num_entries >= SG_ENTRIES_PER_NODE) {
sg1->next = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!sg1->next) {
pr_err("%s : Failed to allocate memory\n",
__func__);
goto nomem;
}
sg1 = sg1->next;
sg1->num_entries = 0;
}
addr += PAGE_SIZE;
size -= PAGE_SIZE;
}
return list;
nomem:
free_sg_list(list);
return NULL;
}
/* /*
* OPAL update flash * OPAL update flash
*/ */
static int opal_flash_update(int op) static int opal_flash_update(int op)
{ {
struct opal_sg_list *sg, *list, *next; struct opal_sg_list *list;
unsigned long addr; unsigned long addr;
int64_t rc = OPAL_PARAMETER; int64_t rc = OPAL_PARAMETER;
@ -364,30 +283,13 @@ static int opal_flash_update(int op)
goto flash; goto flash;
} }
list = image_data_to_sglist(); list = opal_vmalloc_to_sg_list(image_data.data, image_data.size);
if (!list) if (!list)
goto invalid_img; goto invalid_img;
/* First entry address */ /* First entry address */
addr = __pa(list); addr = __pa(list);
/* Translate sg list address to absolute */
for (sg = list; sg; sg = next) {
next = sg->next;
/* Don't translate NULL pointer for last entry */
if (sg->next)
sg->next = (struct opal_sg_list *)__pa(sg->next);
else
sg->next = NULL;
/*
* Convert num_entries to version/length format
* to satisfy OPAL.
*/
sg->num_entries = (SG_LIST_VERSION << 56) |
(sg->num_entries * sizeof(struct opal_sg_entry) + 16);
}
pr_alert("FLASH: Image is %u bytes\n", image_data.size); pr_alert("FLASH: Image is %u bytes\n", image_data.size);
pr_alert("FLASH: Image update requested\n"); pr_alert("FLASH: Image update requested\n");
pr_alert("FLASH: Image will be updated during system reboot\n"); pr_alert("FLASH: Image will be updated during system reboot\n");

Просмотреть файл

@ -39,10 +39,11 @@ struct param_attr {
struct kobj_attribute kobj_attr; struct kobj_attribute kobj_attr;
}; };
static int opal_get_sys_param(u32 param_id, u32 length, void *buffer) static ssize_t opal_get_sys_param(u32 param_id, u32 length, void *buffer)
{ {
struct opal_msg msg; struct opal_msg msg;
int ret, token; ssize_t ret;
int token;
token = opal_async_get_token_interruptible(); token = opal_async_get_token_interruptible();
if (token < 0) { if (token < 0) {
@ -59,7 +60,7 @@ static int opal_get_sys_param(u32 param_id, u32 length, void *buffer)
ret = opal_async_wait_response(token, &msg); ret = opal_async_wait_response(token, &msg);
if (ret) { if (ret) {
pr_err("%s: Failed to wait for the async response, %d\n", pr_err("%s: Failed to wait for the async response, %zd\n",
__func__, ret); __func__, ret);
goto out_token; goto out_token;
} }
@ -111,7 +112,7 @@ static ssize_t sys_param_show(struct kobject *kobj,
{ {
struct param_attr *attr = container_of(kobj_attr, struct param_attr, struct param_attr *attr = container_of(kobj_attr, struct param_attr,
kobj_attr); kobj_attr);
int ret; ssize_t ret;
mutex_lock(&opal_sysparam_mutex); mutex_lock(&opal_sysparam_mutex);
ret = opal_get_sys_param(attr->param_id, attr->param_size, ret = opal_get_sys_param(attr->param_id, attr->param_size,
@ -121,9 +122,10 @@ static ssize_t sys_param_show(struct kobject *kobj,
memcpy(buf, param_data_buf, attr->param_size); memcpy(buf, param_data_buf, attr->param_size);
ret = attr->param_size;
out: out:
mutex_unlock(&opal_sysparam_mutex); mutex_unlock(&opal_sysparam_mutex);
return ret ? ret : attr->param_size; return ret;
} }
static ssize_t sys_param_store(struct kobject *kobj, static ssize_t sys_param_store(struct kobject *kobj,
@ -131,14 +133,20 @@ static ssize_t sys_param_store(struct kobject *kobj,
{ {
struct param_attr *attr = container_of(kobj_attr, struct param_attr, struct param_attr *attr = container_of(kobj_attr, struct param_attr,
kobj_attr); kobj_attr);
int ret; ssize_t ret;
/* MAX_PARAM_DATA_LEN is sizeof(param_data_buf) */
if (count > MAX_PARAM_DATA_LEN)
count = MAX_PARAM_DATA_LEN;
mutex_lock(&opal_sysparam_mutex); mutex_lock(&opal_sysparam_mutex);
memcpy(param_data_buf, buf, count); memcpy(param_data_buf, buf, count);
ret = opal_set_sys_param(attr->param_id, attr->param_size, ret = opal_set_sys_param(attr->param_id, attr->param_size,
param_data_buf); param_data_buf);
mutex_unlock(&opal_sysparam_mutex); mutex_unlock(&opal_sysparam_mutex);
return ret ? ret : count; if (!ret)
ret = count;
return ret;
} }
void __init opal_sys_param_init(void) void __init opal_sys_param_init(void)
@ -214,13 +222,13 @@ void __init opal_sys_param_init(void)
} }
if (of_property_read_u32_array(sysparam, "param-len", size, count)) { if (of_property_read_u32_array(sysparam, "param-len", size, count)) {
pr_err("SYSPARAM: Missing propery param-len in the DT\n"); pr_err("SYSPARAM: Missing property param-len in the DT\n");
goto out_free_perm; goto out_free_perm;
} }
if (of_property_read_u8_array(sysparam, "param-perm", perm, count)) { if (of_property_read_u8_array(sysparam, "param-perm", perm, count)) {
pr_err("SYSPARAM: Missing propery param-perm in the DT\n"); pr_err("SYSPARAM: Missing property param-perm in the DT\n");
goto out_free_perm; goto out_free_perm;
} }
@ -233,6 +241,12 @@ void __init opal_sys_param_init(void)
/* For each of the parameters, populate the parameter attributes */ /* For each of the parameters, populate the parameter attributes */
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
if (size[i] > MAX_PARAM_DATA_LEN) {
pr_warn("SYSPARAM: Not creating parameter %d as size "
"exceeds buffer length\n", i);
continue;
}
sysfs_attr_init(&attr[i].kobj_attr.attr); sysfs_attr_init(&attr[i].kobj_attr.attr);
attr[i].param_id = id[i]; attr[i].param_id = id[i];
attr[i].param_size = size[i]; attr[i].param_size = size[i];

Просмотреть файл

@ -242,14 +242,14 @@ void opal_notifier_update_evt(uint64_t evt_mask,
void opal_notifier_enable(void) void opal_notifier_enable(void)
{ {
int64_t rc; int64_t rc;
uint64_t evt = 0; __be64 evt = 0;
atomic_set(&opal_notifier_hold, 0); atomic_set(&opal_notifier_hold, 0);
/* Process pending events */ /* Process pending events */
rc = opal_poll_events(&evt); rc = opal_poll_events(&evt);
if (rc == OPAL_SUCCESS && evt) if (rc == OPAL_SUCCESS && evt)
opal_do_notifier(evt); opal_do_notifier(be64_to_cpu(evt));
} }
void opal_notifier_disable(void) void opal_notifier_disable(void)
@ -529,7 +529,7 @@ static irqreturn_t opal_interrupt(int irq, void *data)
opal_handle_interrupt(virq_to_hw(irq), &events); opal_handle_interrupt(virq_to_hw(irq), &events);
opal_do_notifier(events); opal_do_notifier(be64_to_cpu(events));
return IRQ_HANDLED; return IRQ_HANDLED;
} }
@ -638,3 +638,66 @@ void opal_shutdown(void)
/* Export this so that test modules can use it */ /* Export this so that test modules can use it */
EXPORT_SYMBOL_GPL(opal_invalid_call); EXPORT_SYMBOL_GPL(opal_invalid_call);
/* Convert a region of vmalloc memory to an opal sg list */
struct opal_sg_list *opal_vmalloc_to_sg_list(void *vmalloc_addr,
unsigned long vmalloc_size)
{
struct opal_sg_list *sg, *first = NULL;
unsigned long i = 0;
sg = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!sg)
goto nomem;
first = sg;
while (vmalloc_size > 0) {
uint64_t data = vmalloc_to_pfn(vmalloc_addr) << PAGE_SHIFT;
uint64_t length = min(vmalloc_size, PAGE_SIZE);
sg->entry[i].data = cpu_to_be64(data);
sg->entry[i].length = cpu_to_be64(length);
i++;
if (i >= SG_ENTRIES_PER_NODE) {
struct opal_sg_list *next;
next = kzalloc(PAGE_SIZE, GFP_KERNEL);
if (!next)
goto nomem;
sg->length = cpu_to_be64(
i * sizeof(struct opal_sg_entry) + 16);
i = 0;
sg->next = cpu_to_be64(__pa(next));
sg = next;
}
vmalloc_addr += length;
vmalloc_size -= length;
}
sg->length = cpu_to_be64(i * sizeof(struct opal_sg_entry) + 16);
return first;
nomem:
pr_err("%s : Failed to allocate memory\n", __func__);
opal_free_sg_list(first);
return NULL;
}
void opal_free_sg_list(struct opal_sg_list *sg)
{
while (sg) {
uint64_t next = be64_to_cpu(sg->next);
kfree(sg);
if (next)
sg = __va(next);
else
sg = NULL;
}
}

Просмотреть файл

@ -343,7 +343,6 @@ static void pnv_ioda_setup_same_PE(struct pci_bus *bus, struct pnv_ioda_pe *pe)
pci_name(dev)); pci_name(dev));
continue; continue;
} }
pci_dev_get(dev);
pdn->pcidev = dev; pdn->pcidev = dev;
pdn->pe_number = pe->pe_number; pdn->pe_number = pe->pe_number;
pe->dma_weight += pnv_ioda_dma_weight(dev); pe->dma_weight += pnv_ioda_dma_weight(dev);
@ -462,7 +461,7 @@ static void pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, struct pci_dev *pdev
pe = &phb->ioda.pe_array[pdn->pe_number]; pe = &phb->ioda.pe_array[pdn->pe_number];
WARN_ON(get_dma_ops(&pdev->dev) != &dma_iommu_ops); WARN_ON(get_dma_ops(&pdev->dev) != &dma_iommu_ops);
set_iommu_table_base_and_group(&pdev->dev, &pe->tce32_table); set_iommu_table_base(&pdev->dev, &pe->tce32_table);
} }
static int pnv_pci_ioda_dma_set_mask(struct pnv_phb *phb, static int pnv_pci_ioda_dma_set_mask(struct pnv_phb *phb,

Просмотреть файл

@ -162,18 +162,62 @@ static void pnv_shutdown(void)
} }
#ifdef CONFIG_KEXEC #ifdef CONFIG_KEXEC
static void pnv_kexec_wait_secondaries_down(void)
{
int my_cpu, i, notified = -1;
my_cpu = get_cpu();
for_each_online_cpu(i) {
uint8_t status;
int64_t rc;
if (i == my_cpu)
continue;
for (;;) {
rc = opal_query_cpu_status(get_hard_smp_processor_id(i),
&status);
if (rc != OPAL_SUCCESS || status != OPAL_THREAD_STARTED)
break;
barrier();
if (i != notified) {
printk(KERN_INFO "kexec: waiting for cpu %d "
"(physical %d) to enter OPAL\n",
i, paca[i].hw_cpu_id);
notified = i;
}
}
}
}
static void pnv_kexec_cpu_down(int crash_shutdown, int secondary) static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
{ {
xics_kexec_teardown_cpu(secondary); xics_kexec_teardown_cpu(secondary);
/* Return secondary CPUs to firmware on OPAL v3 */ /* On OPAL v3, we return all CPUs to firmware */
if (firmware_has_feature(FW_FEATURE_OPALv3) && secondary) {
if (!firmware_has_feature(FW_FEATURE_OPALv3))
return;
if (secondary) {
/* Return secondary CPUs to firmware on OPAL v3 */
mb(); mb();
get_paca()->kexec_state = KEXEC_STATE_REAL_MODE; get_paca()->kexec_state = KEXEC_STATE_REAL_MODE;
mb(); mb();
/* Return the CPU to OPAL */ /* Return the CPU to OPAL */
opal_return_cpu(); opal_return_cpu();
} else if (crash_shutdown) {
/*
* On crash, we don't wait for secondaries to go
* down as they might be unreachable or hung, so
* instead we just wait a bit and move on.
*/
mdelay(1);
} else {
/* Primary waits for the secondaries to have reached OPAL */
pnv_kexec_wait_secondaries_down();
} }
} }
#endif /* CONFIG_KEXEC */ #endif /* CONFIG_KEXEC */

Просмотреть файл

@ -30,6 +30,7 @@
#include <asm/cputhreads.h> #include <asm/cputhreads.h>
#include <asm/xics.h> #include <asm/xics.h>
#include <asm/opal.h> #include <asm/opal.h>
#include <asm/runlatch.h>
#include "powernv.h" #include "powernv.h"
@ -156,7 +157,9 @@ static void pnv_smp_cpu_kill_self(void)
*/ */
mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1); mtspr(SPRN_LPCR, mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1);
while (!generic_check_cpu_restart(cpu)) { while (!generic_check_cpu_restart(cpu)) {
ppc64_runlatch_off();
power7_nap(); power7_nap();
ppc64_runlatch_on();
if (!generic_check_cpu_restart(cpu)) { if (!generic_check_cpu_restart(cpu)) {
DBG("CPU%d Unexpected exit while offline !\n", cpu); DBG("CPU%d Unexpected exit while offline !\n", cpu);
/* We may be getting an IPI, so we re-enable /* We may be getting an IPI, so we re-enable

Просмотреть файл

@ -88,13 +88,14 @@ void set_default_offline_state(int cpu)
static void rtas_stop_self(void) static void rtas_stop_self(void)
{ {
struct rtas_args args = { static struct rtas_args args = {
.token = cpu_to_be32(rtas_stop_self_token),
.nargs = 0, .nargs = 0,
.nret = 1, .nret = 1,
.rets = &args.args[0], .rets = &args.args[0],
}; };
args.token = cpu_to_be32(rtas_stop_self_token);
local_irq_disable(); local_irq_disable();
BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE); BUG_ON(rtas_stop_self_token == RTAS_UNKNOWN_SERVICE);

Просмотреть файл

@ -100,10 +100,10 @@ static int pseries_remove_memblock(unsigned long base, unsigned int memblock_siz
start_pfn = base >> PAGE_SHIFT; start_pfn = base >> PAGE_SHIFT;
if (!pfn_valid(start_pfn)) { lock_device_hotplug();
memblock_remove(base, memblock_size);
return 0; if (!pfn_valid(start_pfn))
} goto out;
block_sz = memory_block_size_bytes(); block_sz = memory_block_size_bytes();
sections_per_block = block_sz / MIN_MEMORY_BLOCK_SIZE; sections_per_block = block_sz / MIN_MEMORY_BLOCK_SIZE;
@ -114,8 +114,10 @@ static int pseries_remove_memblock(unsigned long base, unsigned int memblock_siz
base += MIN_MEMORY_BLOCK_SIZE; base += MIN_MEMORY_BLOCK_SIZE;
} }
out:
/* Update memory regions for memory remove */ /* Update memory regions for memory remove */
memblock_remove(base, memblock_size); memblock_remove(base, memblock_size);
unlock_device_hotplug();
return 0; return 0;
} }

Просмотреть файл

@ -1058,7 +1058,7 @@ static int __init apm821xx_pciex_core_init(struct device_node *np)
return 1; return 1;
} }
static int apm821xx_pciex_init_port_hw(struct ppc4xx_pciex_port *port) static int __init apm821xx_pciex_init_port_hw(struct ppc4xx_pciex_port *port)
{ {
u32 val; u32 val;

Просмотреть файл

@ -276,7 +276,6 @@ static void bpf_jit_noleaks(struct bpf_jit *jit, struct sock_filter *filter)
case BPF_S_LD_W_IND: case BPF_S_LD_W_IND:
case BPF_S_LD_H_IND: case BPF_S_LD_H_IND:
case BPF_S_LD_B_IND: case BPF_S_LD_B_IND:
case BPF_S_LDX_B_MSH:
case BPF_S_LD_IMM: case BPF_S_LD_IMM:
case BPF_S_LD_MEM: case BPF_S_LD_MEM:
case BPF_S_MISC_TXA: case BPF_S_MISC_TXA:

Просмотреть файл

@ -71,6 +71,23 @@
#include <linux/sched.h> #include <linux/sched.h>
extern unsigned long sparc64_valid_addr_bitmap[];
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
static inline bool __kern_addr_valid(unsigned long paddr)
{
if ((paddr >> MAX_PHYS_ADDRESS_BITS) != 0UL)
return false;
return test_bit(paddr >> ILOG2_4MB, sparc64_valid_addr_bitmap);
}
static inline bool kern_addr_valid(unsigned long addr)
{
unsigned long paddr = __pa(addr);
return __kern_addr_valid(paddr);
}
/* Entries per page directory level. */ /* Entries per page directory level. */
#define PTRS_PER_PTE (1UL << (PAGE_SHIFT-3)) #define PTRS_PER_PTE (1UL << (PAGE_SHIFT-3))
#define PTRS_PER_PMD (1UL << PMD_BITS) #define PTRS_PER_PMD (1UL << PMD_BITS)
@ -79,9 +96,12 @@
/* Kernel has a separate 44bit address space. */ /* Kernel has a separate 44bit address space. */
#define FIRST_USER_ADDRESS 0 #define FIRST_USER_ADDRESS 0
#define pte_ERROR(e) __builtin_trap() #define pmd_ERROR(e) \
#define pmd_ERROR(e) __builtin_trap() pr_err("%s:%d: bad pmd %p(%016lx) seen at (%pS)\n", \
#define pgd_ERROR(e) __builtin_trap() __FILE__, __LINE__, &(e), pmd_val(e), __builtin_return_address(0))
#define pgd_ERROR(e) \
pr_err("%s:%d: bad pgd %p(%016lx) seen at (%pS)\n", \
__FILE__, __LINE__, &(e), pgd_val(e), __builtin_return_address(0))
#endif /* !(__ASSEMBLY__) */ #endif /* !(__ASSEMBLY__) */
@ -258,8 +278,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t prot)
{ {
unsigned long mask, tmp; unsigned long mask, tmp;
/* SUN4U: 0x600307ffffffecb8 (negated == 0x9ffcf80000001347) /* SUN4U: 0x630107ffffffec38 (negated == 0x9cfef800000013c7)
* SUN4V: 0x30ffffffffffee17 (negated == 0xcf000000000011e8) * SUN4V: 0x33ffffffffffee07 (negated == 0xcc000000000011f8)
* *
* Even if we use negation tricks the result is still a 6 * Even if we use negation tricks the result is still a 6
* instruction sequence, so don't try to play fancy and just * instruction sequence, so don't try to play fancy and just
@ -289,10 +309,10 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t prot)
" .previous\n" " .previous\n"
: "=r" (mask), "=r" (tmp) : "=r" (mask), "=r" (tmp)
: "i" (_PAGE_PADDR_4U | _PAGE_MODIFIED_4U | _PAGE_ACCESSED_4U | : "i" (_PAGE_PADDR_4U | _PAGE_MODIFIED_4U | _PAGE_ACCESSED_4U |
_PAGE_CP_4U | _PAGE_CV_4U | _PAGE_E_4U | _PAGE_PRESENT_4U | _PAGE_CP_4U | _PAGE_CV_4U | _PAGE_E_4U |
_PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4U), _PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4U),
"i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V | "i" (_PAGE_PADDR_4V | _PAGE_MODIFIED_4V | _PAGE_ACCESSED_4V |
_PAGE_CP_4V | _PAGE_CV_4V | _PAGE_E_4V | _PAGE_PRESENT_4V | _PAGE_CP_4V | _PAGE_CV_4V | _PAGE_E_4V |
_PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V)); _PAGE_SPECIAL | _PAGE_PMD_HUGE | _PAGE_SZALL_4V));
return __pte((pte_val(pte) & mask) | (pgprot_val(prot) & ~mask)); return __pte((pte_val(pte) & mask) | (pgprot_val(prot) & ~mask));
@ -633,7 +653,7 @@ static inline unsigned long pmd_large(pmd_t pmd)
{ {
pte_t pte = __pte(pmd_val(pmd)); pte_t pte = __pte(pmd_val(pmd));
return (pte_val(pte) & _PAGE_PMD_HUGE) && pte_present(pte); return pte_val(pte) & _PAGE_PMD_HUGE;
} }
#ifdef CONFIG_TRANSPARENT_HUGEPAGE #ifdef CONFIG_TRANSPARENT_HUGEPAGE
@ -719,20 +739,6 @@ static inline pmd_t pmd_mkwrite(pmd_t pmd)
return __pmd(pte_val(pte)); return __pmd(pte_val(pte));
} }
static inline pmd_t pmd_mknotpresent(pmd_t pmd)
{
unsigned long mask;
if (tlb_type == hypervisor)
mask = _PAGE_PRESENT_4V;
else
mask = _PAGE_PRESENT_4U;
pmd_val(pmd) &= ~mask;
return pmd;
}
static inline pmd_t pmd_mksplitting(pmd_t pmd) static inline pmd_t pmd_mksplitting(pmd_t pmd)
{ {
pte_t pte = __pte(pmd_val(pmd)); pte_t pte = __pte(pmd_val(pmd));
@ -757,6 +763,20 @@ static inline int pmd_present(pmd_t pmd)
#define pmd_none(pmd) (!pmd_val(pmd)) #define pmd_none(pmd) (!pmd_val(pmd))
/* pmd_bad() is only called on non-trans-huge PMDs. Our encoding is
* very simple, it's just the physical address. PTE tables are of
* size PAGE_SIZE so make sure the sub-PAGE_SIZE bits are clear and
* the top bits outside of the range of any physical address size we
* support are clear as well. We also validate the physical itself.
*/
#define pmd_bad(pmd) ((pmd_val(pmd) & ~PAGE_MASK) || \
!__kern_addr_valid(pmd_val(pmd)))
#define pud_none(pud) (!pud_val(pud))
#define pud_bad(pud) ((pud_val(pud) & ~PAGE_MASK) || \
!__kern_addr_valid(pud_val(pud)))
#ifdef CONFIG_TRANSPARENT_HUGEPAGE #ifdef CONFIG_TRANSPARENT_HUGEPAGE
extern void set_pmd_at(struct mm_struct *mm, unsigned long addr, extern void set_pmd_at(struct mm_struct *mm, unsigned long addr,
pmd_t *pmdp, pmd_t pmd); pmd_t *pmdp, pmd_t pmd);
@ -790,10 +810,7 @@ static inline unsigned long __pmd_page(pmd_t pmd)
#define pud_page_vaddr(pud) \ #define pud_page_vaddr(pud) \
((unsigned long) __va(pud_val(pud))) ((unsigned long) __va(pud_val(pud)))
#define pud_page(pud) virt_to_page((void *)pud_page_vaddr(pud)) #define pud_page(pud) virt_to_page((void *)pud_page_vaddr(pud))
#define pmd_bad(pmd) (0)
#define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0UL) #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0UL)
#define pud_none(pud) (!pud_val(pud))
#define pud_bad(pud) (0)
#define pud_present(pud) (pud_val(pud) != 0U) #define pud_present(pud) (pud_val(pud) != 0U)
#define pud_clear(pudp) (pud_val(*(pudp)) = 0UL) #define pud_clear(pudp) (pud_val(*(pudp)) = 0UL)
@ -893,6 +910,10 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t *);
extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, extern void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
pmd_t *pmd); pmd_t *pmd);
#define __HAVE_ARCH_PMDP_INVALIDATE
extern void pmdp_invalidate(struct vm_area_struct *vma, unsigned long address,
pmd_t *pmdp);
#define __HAVE_ARCH_PGTABLE_DEPOSIT #define __HAVE_ARCH_PGTABLE_DEPOSIT
extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp,
pgtable_t pgtable); pgtable_t pgtable);
@ -919,18 +940,6 @@ extern unsigned long pte_file(pte_t);
extern pte_t pgoff_to_pte(unsigned long); extern pte_t pgoff_to_pte(unsigned long);
#define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL) #define PTE_FILE_MAX_BITS (64UL - PAGE_SHIFT - 1UL)
extern unsigned long sparc64_valid_addr_bitmap[];
/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */
static inline bool kern_addr_valid(unsigned long addr)
{
unsigned long paddr = __pa(addr);
if ((paddr >> 41UL) != 0UL)
return false;
return test_bit(paddr >> 22, sparc64_valid_addr_bitmap);
}
extern int page_in_phys_avail(unsigned long paddr); extern int page_in_phys_avail(unsigned long paddr);
/* /*

Просмотреть файл

@ -171,7 +171,8 @@ extern struct tsb_phys_patch_entry __tsb_phys_patch, __tsb_phys_patch_end;
andcc REG1, REG2, %g0; \ andcc REG1, REG2, %g0; \
be,pt %xcc, 700f; \ be,pt %xcc, 700f; \
sethi %hi(4 * 1024 * 1024), REG2; \ sethi %hi(4 * 1024 * 1024), REG2; \
andn REG1, REG2, REG1; \ brgez,pn REG1, FAIL_LABEL; \
andn REG1, REG2, REG1; \
and VADDR, REG2, REG2; \ and VADDR, REG2, REG2; \
brlz,pt REG1, PTE_LABEL; \ brlz,pt REG1, PTE_LABEL; \
or REG1, REG2, REG1; \ or REG1, REG2, REG1; \

Просмотреть файл

@ -282,8 +282,8 @@ sun4v_chip_type:
stx %l2, [%l4 + 0x0] stx %l2, [%l4 + 0x0]
ldx [%sp + 2047 + 128 + 0x50], %l3 ! physaddr low ldx [%sp + 2047 + 128 + 0x50], %l3 ! physaddr low
/* 4MB align */ /* 4MB align */
srlx %l3, 22, %l3 srlx %l3, ILOG2_4MB, %l3
sllx %l3, 22, %l3 sllx %l3, ILOG2_4MB, %l3
stx %l3, [%l4 + 0x8] stx %l3, [%l4 + 0x8]
/* Leave service as-is, "call-method" */ /* Leave service as-is, "call-method" */

Просмотреть файл

@ -277,7 +277,7 @@ kvmap_dtlb_load:
#ifdef CONFIG_SPARSEMEM_VMEMMAP #ifdef CONFIG_SPARSEMEM_VMEMMAP
kvmap_vmemmap: kvmap_vmemmap:
sub %g4, %g5, %g5 sub %g4, %g5, %g5
srlx %g5, 22, %g5 srlx %g5, ILOG2_4MB, %g5
sethi %hi(vmemmap_table), %g1 sethi %hi(vmemmap_table), %g1
sllx %g5, 3, %g5 sllx %g5, 3, %g5
or %g1, %lo(vmemmap_table), %g1 or %g1, %lo(vmemmap_table), %g1

Просмотреть файл

@ -68,27 +68,16 @@ EXPORT_SYMBOL(touch_nmi_watchdog);
static void die_nmi(const char *str, struct pt_regs *regs, int do_panic) static void die_nmi(const char *str, struct pt_regs *regs, int do_panic)
{ {
int this_cpu = smp_processor_id();
if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, if (notify_die(DIE_NMIWATCHDOG, str, regs, 0,
pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP)
return; return;
console_verbose();
bust_spinlocks(1);
printk(KERN_EMERG "%s", str);
printk(" on CPU%d, ip %08lx, registers:\n",
smp_processor_id(), regs->tpc);
show_regs(regs);
dump_stack();
bust_spinlocks(0);
if (do_panic || panic_on_oops) if (do_panic || panic_on_oops)
panic("Non maskable interrupt"); panic("Watchdog detected hard LOCKUP on cpu %d", this_cpu);
else
nmi_exit(); WARN(1, "Watchdog detected hard LOCKUP on cpu %d", this_cpu);
local_irq_enable();
do_exit(SIGBUS);
} }
notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs)

Просмотреть файл

@ -149,7 +149,7 @@ void cpu_panic(void)
#define NUM_ROUNDS 64 /* magic value */ #define NUM_ROUNDS 64 /* magic value */
#define NUM_ITERS 5 /* likewise */ #define NUM_ITERS 5 /* likewise */
static DEFINE_SPINLOCK(itc_sync_lock); static DEFINE_RAW_SPINLOCK(itc_sync_lock);
static unsigned long go[SLAVE + 1]; static unsigned long go[SLAVE + 1];
#define DEBUG_TICK_SYNC 0 #define DEBUG_TICK_SYNC 0
@ -257,7 +257,7 @@ static void smp_synchronize_one_tick(int cpu)
go[MASTER] = 0; go[MASTER] = 0;
membar_safe("#StoreLoad"); membar_safe("#StoreLoad");
spin_lock_irqsave(&itc_sync_lock, flags); raw_spin_lock_irqsave(&itc_sync_lock, flags);
{ {
for (i = 0; i < NUM_ROUNDS*NUM_ITERS; i++) { for (i = 0; i < NUM_ROUNDS*NUM_ITERS; i++) {
while (!go[MASTER]) while (!go[MASTER])
@ -268,7 +268,7 @@ static void smp_synchronize_one_tick(int cpu)
membar_safe("#StoreLoad"); membar_safe("#StoreLoad");
} }
} }
spin_unlock_irqrestore(&itc_sync_lock, flags); raw_spin_unlock_irqrestore(&itc_sync_lock, flags);
} }
#if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU) #if defined(CONFIG_SUN_LDOMS) && defined(CONFIG_HOTPLUG_CPU)

Просмотреть файл

@ -44,7 +44,7 @@ SIGN1(sys32_timer_settime, compat_sys_timer_settime, %o1)
SIGN1(sys32_io_submit, compat_sys_io_submit, %o1) SIGN1(sys32_io_submit, compat_sys_io_submit, %o1)
SIGN1(sys32_mq_open, compat_sys_mq_open, %o1) SIGN1(sys32_mq_open, compat_sys_mq_open, %o1)
SIGN1(sys32_select, compat_sys_select, %o0) SIGN1(sys32_select, compat_sys_select, %o0)
SIGN3(sys32_futex, compat_sys_futex, %o1, %o2, %o5) SIGN1(sys32_futex, compat_sys_futex, %o1)
SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0) SIGN1(sys32_recvfrom, compat_sys_recvfrom, %o0)
SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0) SIGN1(sys32_recvmsg, compat_sys_recvmsg, %o0)
SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0) SIGN1(sys32_sendmsg, compat_sys_sendmsg, %o0)

Просмотреть файл

@ -166,17 +166,23 @@ static unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs)
unsigned long compute_effective_address(struct pt_regs *regs, unsigned long compute_effective_address(struct pt_regs *regs,
unsigned int insn, unsigned int rd) unsigned int insn, unsigned int rd)
{ {
int from_kernel = (regs->tstate & TSTATE_PRIV) != 0;
unsigned int rs1 = (insn >> 14) & 0x1f; unsigned int rs1 = (insn >> 14) & 0x1f;
unsigned int rs2 = insn & 0x1f; unsigned int rs2 = insn & 0x1f;
int from_kernel = (regs->tstate & TSTATE_PRIV) != 0; unsigned long addr;
if (insn & 0x2000) { if (insn & 0x2000) {
maybe_flush_windows(rs1, 0, rd, from_kernel); maybe_flush_windows(rs1, 0, rd, from_kernel);
return (fetch_reg(rs1, regs) + sign_extend_imm13(insn)); addr = (fetch_reg(rs1, regs) + sign_extend_imm13(insn));
} else { } else {
maybe_flush_windows(rs1, rs2, rd, from_kernel); maybe_flush_windows(rs1, rs2, rd, from_kernel);
return (fetch_reg(rs1, regs) + fetch_reg(rs2, regs)); addr = (fetch_reg(rs1, regs) + fetch_reg(rs2, regs));
} }
if (!from_kernel && test_thread_flag(TIF_32BIT))
addr &= 0xffffffff;
return addr;
} }
/* This is just to make gcc think die_if_kernel does return... */ /* This is just to make gcc think die_if_kernel does return... */

Просмотреть файл

@ -96,38 +96,51 @@ static unsigned int get_user_insn(unsigned long tpc)
pte_t *ptep, pte; pte_t *ptep, pte;
unsigned long pa; unsigned long pa;
u32 insn = 0; u32 insn = 0;
unsigned long pstate;
if (pgd_none(*pgdp)) if (pgd_none(*pgdp) || unlikely(pgd_bad(*pgdp)))
goto outret; goto out;
pudp = pud_offset(pgdp, tpc); pudp = pud_offset(pgdp, tpc);
if (pud_none(*pudp)) if (pud_none(*pudp) || unlikely(pud_bad(*pudp)))
goto outret;
pmdp = pmd_offset(pudp, tpc);
if (pmd_none(*pmdp))
goto outret;
/* This disables preemption for us as well. */
__asm__ __volatile__("rdpr %%pstate, %0" : "=r" (pstate));
__asm__ __volatile__("wrpr %0, %1, %%pstate"
: : "r" (pstate), "i" (PSTATE_IE));
ptep = pte_offset_map(pmdp, tpc);
pte = *ptep;
if (!pte_present(pte))
goto out; goto out;
pa = (pte_pfn(pte) << PAGE_SHIFT); /* This disables preemption for us as well. */
pa += (tpc & ~PAGE_MASK); local_irq_disable();
/* Use phys bypass so we don't pollute dtlb/dcache. */ pmdp = pmd_offset(pudp, tpc);
__asm__ __volatile__("lduwa [%1] %2, %0" if (pmd_none(*pmdp) || unlikely(pmd_bad(*pmdp)))
: "=r" (insn) goto out_irq_enable;
: "r" (pa), "i" (ASI_PHYS_USE_EC));
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
if (pmd_trans_huge(*pmdp)) {
if (pmd_trans_splitting(*pmdp))
goto out_irq_enable;
pa = pmd_pfn(*pmdp) << PAGE_SHIFT;
pa += tpc & ~HPAGE_MASK;
/* Use phys bypass so we don't pollute dtlb/dcache. */
__asm__ __volatile__("lduwa [%1] %2, %0"
: "=r" (insn)
: "r" (pa), "i" (ASI_PHYS_USE_EC));
} else
#endif
{
ptep = pte_offset_map(pmdp, tpc);
pte = *ptep;
if (pte_present(pte)) {
pa = (pte_pfn(pte) << PAGE_SHIFT);
pa += (tpc & ~PAGE_MASK);
/* Use phys bypass so we don't pollute dtlb/dcache. */
__asm__ __volatile__("lduwa [%1] %2, %0"
: "=r" (insn)
: "r" (pa), "i" (ASI_PHYS_USE_EC));
}
pte_unmap(ptep);
}
out_irq_enable:
local_irq_enable();
out: out:
pte_unmap(ptep);
__asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate));
outret:
return insn; return insn;
} }
@ -153,7 +166,8 @@ show_signal_msg(struct pt_regs *regs, int sig, int code,
} }
static void do_fault_siginfo(int code, int sig, struct pt_regs *regs, static void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
unsigned int insn, int fault_code) unsigned long fault_addr, unsigned int insn,
int fault_code)
{ {
unsigned long addr; unsigned long addr;
siginfo_t info; siginfo_t info;
@ -161,10 +175,18 @@ static void do_fault_siginfo(int code, int sig, struct pt_regs *regs,
info.si_code = code; info.si_code = code;
info.si_signo = sig; info.si_signo = sig;
info.si_errno = 0; info.si_errno = 0;
if (fault_code & FAULT_CODE_ITLB) if (fault_code & FAULT_CODE_ITLB) {
addr = regs->tpc; addr = regs->tpc;
else } else {
addr = compute_effective_address(regs, insn, 0); /* If we were able to probe the faulting instruction, use it
* to compute a precise fault address. Otherwise use the fault
* time provided address which may only have page granularity.
*/
if (insn)
addr = compute_effective_address(regs, insn, 0);
else
addr = fault_addr;
}
info.si_addr = (void __user *) addr; info.si_addr = (void __user *) addr;
info.si_trapno = 0; info.si_trapno = 0;
@ -239,7 +261,7 @@ static void __kprobes do_kernel_fault(struct pt_regs *regs, int si_code,
/* The si_code was set to make clear whether /* The si_code was set to make clear whether
* this was a SEGV_MAPERR or SEGV_ACCERR fault. * this was a SEGV_MAPERR or SEGV_ACCERR fault.
*/ */
do_fault_siginfo(si_code, SIGSEGV, regs, insn, fault_code); do_fault_siginfo(si_code, SIGSEGV, regs, address, insn, fault_code);
return; return;
} }
@ -525,7 +547,7 @@ do_sigbus:
* Send a sigbus, regardless of whether we were in kernel * Send a sigbus, regardless of whether we were in kernel
* or user mode. * or user mode.
*/ */
do_fault_siginfo(BUS_ADRERR, SIGBUS, regs, insn, fault_code); do_fault_siginfo(BUS_ADRERR, SIGBUS, regs, address, insn, fault_code);
/* Kernel mode? Handle exceptions or die */ /* Kernel mode? Handle exceptions or die */
if (regs->tstate & TSTATE_PRIV) if (regs->tstate & TSTATE_PRIV)

Просмотреть файл

@ -73,7 +73,7 @@ static int gup_huge_pmd(pmd_t *pmdp, pmd_t pmd, unsigned long addr,
struct page *head, *page, *tail; struct page *head, *page, *tail;
int refs; int refs;
if (!pmd_large(pmd)) if (!(pmd_val(pmd) & _PAGE_VALID))
return 0; return 0;
if (write && !pmd_write(pmd)) if (write && !pmd_write(pmd))

Просмотреть файл

@ -588,7 +588,7 @@ static void __init remap_kernel(void)
int i, tlb_ent = sparc64_highest_locked_tlbent(); int i, tlb_ent = sparc64_highest_locked_tlbent();
tte_vaddr = (unsigned long) KERNBASE; tte_vaddr = (unsigned long) KERNBASE;
phys_page = (prom_boot_mapping_phys_low >> 22UL) << 22UL; phys_page = (prom_boot_mapping_phys_low >> ILOG2_4MB) << ILOG2_4MB;
tte_data = kern_large_tte(phys_page); tte_data = kern_large_tte(phys_page);
kern_locked_tte_data = tte_data; kern_locked_tte_data = tte_data;
@ -1881,7 +1881,7 @@ void __init paging_init(void)
BUILD_BUG_ON(NR_CPUS > 4096); BUILD_BUG_ON(NR_CPUS > 4096);
kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL; kern_base = (prom_boot_mapping_phys_low >> ILOG2_4MB) << ILOG2_4MB;
kern_size = (unsigned long)&_end - (unsigned long)KERNBASE; kern_size = (unsigned long)&_end - (unsigned long)KERNBASE;
/* Invalidate both kernel TSBs. */ /* Invalidate both kernel TSBs. */
@ -1937,7 +1937,7 @@ void __init paging_init(void)
shift = kern_base + PAGE_OFFSET - ((unsigned long)KERNBASE); shift = kern_base + PAGE_OFFSET - ((unsigned long)KERNBASE);
real_end = (unsigned long)_end; real_end = (unsigned long)_end;
num_kernel_image_mappings = DIV_ROUND_UP(real_end - KERNBASE, 1 << 22); num_kernel_image_mappings = DIV_ROUND_UP(real_end - KERNBASE, 1 << ILOG2_4MB);
printk("Kernel: Using %d locked TLB entries for main kernel image.\n", printk("Kernel: Using %d locked TLB entries for main kernel image.\n",
num_kernel_image_mappings); num_kernel_image_mappings);
@ -2094,7 +2094,7 @@ static void __init setup_valid_addr_bitmap_from_pavail(unsigned long *bitmap)
if (new_start <= old_start && if (new_start <= old_start &&
new_end >= (old_start + PAGE_SIZE)) { new_end >= (old_start + PAGE_SIZE)) {
set_bit(old_start >> 22, bitmap); set_bit(old_start >> ILOG2_4MB, bitmap);
goto do_next_page; goto do_next_page;
} }
} }
@ -2143,7 +2143,7 @@ void __init mem_init(void)
addr = PAGE_OFFSET + kern_base; addr = PAGE_OFFSET + kern_base;
last = PAGE_ALIGN(kern_size) + addr; last = PAGE_ALIGN(kern_size) + addr;
while (addr < last) { while (addr < last) {
set_bit(__pa(addr) >> 22, sparc64_valid_addr_bitmap); set_bit(__pa(addr) >> ILOG2_4MB, sparc64_valid_addr_bitmap);
addr += PAGE_SIZE; addr += PAGE_SIZE;
} }
@ -2267,7 +2267,7 @@ int __meminit vmemmap_populate(unsigned long vstart, unsigned long vend,
void *block; void *block;
if (!(*vmem_pp & _PAGE_VALID)) { if (!(*vmem_pp & _PAGE_VALID)) {
block = vmemmap_alloc_block(1UL << 22, node); block = vmemmap_alloc_block(1UL << ILOG2_4MB, node);
if (!block) if (!block)
return -ENOMEM; return -ENOMEM;

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше