mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-02 02:34:05 +08:00
Linux 5.4-rc5
-----BEGIN PGP SIGNATURE----- iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAl210Z8eHHRvcnZhbGRz QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGv+kIAKRpO7EuDokQL4qp hxEEaCMJA1T055EMlNU6FVAq/ZbmapzreUyNYiRMpPWKGTWNMkhIcZQfysYeGZz5 y/KRxAiVxlcB+3v3yRmoZd/XoQmhgvJmqD4zhaGI2Utonow4f/SGSEFFZqqs9WND 4HJROjZHgQ4JBxg9Z+QMo0FxbV/DCZpEOUq51N9WJywyyDRb18zotE83stpU+pE2 fjqT7mk0NLrnYXuDRAbFC1Aau9ed4H6LlwLmxaqxq/Pt5Rz7wIKwKL9HIT4Dm/0a qpani6phhHWL7MwUpa2wkEonFCD03rJFl3DUVJo64Ijh4up5D/jyXQ+GKV2P4WKJ 275Rb5Q= =WiZZ -----END PGP SIGNATURE----- Merge tag 'v5.4-rc5' into devel Linux 5.4-rc5
This commit is contained in:
commit
1566a6a30b
4
.mailmap
4
.mailmap
@ -196,7 +196,8 @@ Oleksij Rempel <linux@rempel-privat.de> <o.rempel@pengutronix.de>
|
|||||||
Oleksij Rempel <linux@rempel-privat.de> <ore@pengutronix.de>
|
Oleksij Rempel <linux@rempel-privat.de> <ore@pengutronix.de>
|
||||||
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
|
Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
|
||||||
Patrick Mochel <mochel@digitalimplant.org>
|
Patrick Mochel <mochel@digitalimplant.org>
|
||||||
Paul Burton <paul.burton@mips.com> <paul.burton@imgtec.com>
|
Paul Burton <paulburton@kernel.org> <paul.burton@imgtec.com>
|
||||||
|
Paul Burton <paulburton@kernel.org> <paul.burton@mips.com>
|
||||||
Peter A Jonsson <pj@ludd.ltu.se>
|
Peter A Jonsson <pj@ludd.ltu.se>
|
||||||
Peter Oruba <peter@oruba.de>
|
Peter Oruba <peter@oruba.de>
|
||||||
Peter Oruba <peter.oruba@amd.com>
|
Peter Oruba <peter.oruba@amd.com>
|
||||||
@ -229,6 +230,7 @@ Shuah Khan <shuah@kernel.org> <shuahkhan@gmail.com>
|
|||||||
Shuah Khan <shuah@kernel.org> <shuah.khan@hp.com>
|
Shuah Khan <shuah@kernel.org> <shuah.khan@hp.com>
|
||||||
Shuah Khan <shuah@kernel.org> <shuahkh@osg.samsung.com>
|
Shuah Khan <shuah@kernel.org> <shuahkh@osg.samsung.com>
|
||||||
Shuah Khan <shuah@kernel.org> <shuah.kh@samsung.com>
|
Shuah Khan <shuah@kernel.org> <shuah.kh@samsung.com>
|
||||||
|
Simon Arlott <simon@octiron.net> <simon@fire.lp0.eu>
|
||||||
Simon Kelley <simon@thekelleys.org.uk>
|
Simon Kelley <simon@thekelleys.org.uk>
|
||||||
Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr>
|
Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr>
|
||||||
Stephen Hemminger <shemminger@osdl.org>
|
Stephen Hemminger <shemminger@osdl.org>
|
||||||
|
@ -496,12 +496,12 @@ properties:
|
|||||||
|
|
||||||
- description: Theobroma Systems RK3368-uQ7 with Haikou baseboard
|
- description: Theobroma Systems RK3368-uQ7 with Haikou baseboard
|
||||||
items:
|
items:
|
||||||
- const: tsd,rk3368-uq7-haikou
|
- const: tsd,rk3368-lion-haikou
|
||||||
- const: rockchip,rk3368
|
- const: rockchip,rk3368
|
||||||
|
|
||||||
- description: Theobroma Systems RK3399-Q7 with Haikou baseboard
|
- description: Theobroma Systems RK3399-Q7 with Haikou baseboard
|
||||||
items:
|
items:
|
||||||
- const: tsd,rk3399-q7-haikou
|
- const: tsd,rk3399-puma-haikou
|
||||||
- const: rockchip,rk3399
|
- const: rockchip,rk3399
|
||||||
|
|
||||||
- description: Tronsmart Orion R68 Meta
|
- description: Tronsmart Orion R68 Meta
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||||
%YAML 1.2
|
%YAML 1.2
|
||||||
---
|
---
|
||||||
$id: http://devicetree.org/schemas/arm/allwinner,sun4i-a10-csi.yaml#
|
$id: http://devicetree.org/schemas/media/allwinner,sun4i-a10-csi.yaml#
|
||||||
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings
|
title: Allwinner A10 CMOS Sensor Interface (CSI) Device Tree Bindings
|
||||||
@ -27,14 +27,12 @@ properties:
|
|||||||
clocks:
|
clocks:
|
||||||
items:
|
items:
|
||||||
- description: The CSI interface clock
|
- description: The CSI interface clock
|
||||||
- description: The CSI module clock
|
|
||||||
- description: The CSI ISP clock
|
- description: The CSI ISP clock
|
||||||
- description: The CSI DRAM clock
|
- description: The CSI DRAM clock
|
||||||
|
|
||||||
clock-names:
|
clock-names:
|
||||||
items:
|
items:
|
||||||
- const: bus
|
- const: bus
|
||||||
- const: mod
|
|
||||||
- const: isp
|
- const: isp
|
||||||
- const: ram
|
- const: ram
|
||||||
|
|
||||||
@ -89,9 +87,8 @@ examples:
|
|||||||
compatible = "allwinner,sun7i-a20-csi0";
|
compatible = "allwinner,sun7i-a20-csi0";
|
||||||
reg = <0x01c09000 0x1000>;
|
reg = <0x01c09000 0x1000>;
|
||||||
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI0>,
|
clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
|
||||||
<&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
|
clock-names = "bus", "isp", "ram";
|
||||||
clock-names = "bus", "mod", "isp", "ram";
|
|
||||||
resets = <&ccu RST_CSI0>;
|
resets = <&ccu RST_CSI0>;
|
||||||
|
|
||||||
port {
|
port {
|
||||||
|
@ -33,13 +33,13 @@ patternProperties:
|
|||||||
allOf:
|
allOf:
|
||||||
- $ref: "/schemas/types.yaml#/definitions/string"
|
- $ref: "/schemas/types.yaml#/definitions/string"
|
||||||
- enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
|
- enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
|
||||||
ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, ESPI,
|
ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMC,
|
||||||
ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID, FWSPIWP, GPIT0, GPIT1,
|
ESPI, ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID, FWSPIWP, GPIT0,
|
||||||
GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1, GPIU2,
|
GPIT1, GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1,
|
||||||
GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, I2C1, I2C10, I2C11, I2C12,
|
GPIU2, GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, I2C1, I2C10, I2C11,
|
||||||
I2C13, I2C14, I2C15, I2C16, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7,
|
I2C12, I2C13, I2C14, I2C15, I2C16, I2C2, I2C3, I2C4, I2C5, I2C6,
|
||||||
I2C8, I2C9, I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ, LPC,
|
I2C7, I2C8, I2C9, I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ,
|
||||||
LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2,
|
LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2,
|
||||||
MACLINK3, MACLINK4, MDIO1, MDIO2, MDIO3, MDIO4, NCTS1, NCTS2,
|
MACLINK3, MACLINK4, MDIO1, MDIO2, MDIO3, MDIO4, NCTS1, NCTS2,
|
||||||
NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4, NDSR1, NDSR2, NDSR3,
|
NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4, NDSR1, NDSR2, NDSR3,
|
||||||
NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4, NRTS1,
|
NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4, NRTS1,
|
||||||
@ -48,47 +48,45 @@ patternProperties:
|
|||||||
PWM8, PWM9, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3,
|
PWM8, PWM9, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3,
|
||||||
RMII4, RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12,
|
RMII4, RXD1, RXD2, RXD3, RXD4, SALT1, SALT10, SALT11, SALT12,
|
||||||
SALT13, SALT14, SALT15, SALT16, SALT2, SALT3, SALT4, SALT5,
|
SALT13, SALT14, SALT15, SALT16, SALT2, SALT3, SALT4, SALT5,
|
||||||
SALT6, SALT7, SALT8, SALT9, SD1, SD2, SD3, SD3DAT4, SD3DAT5,
|
SALT6, SALT7, SALT8, SALT9, SD1, SD2, SGPM1, SGPS1, SIOONCTRL,
|
||||||
SD3DAT6, SD3DAT7, SGPM1, SGPS1, SIOONCTRL, SIOPBI, SIOPBO,
|
SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1,
|
||||||
SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1,
|
SPI1ABR, SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1,
|
||||||
SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11,
|
TACH10, TACH11, TACH12, TACH13, TACH14, TACH15, TACH2, TACH3,
|
||||||
TACH12, TACH13, TACH14, TACH15, TACH2, TACH3, TACH4, TACH5,
|
TACH4, TACH5, TACH6, TACH7, TACH8, TACH9, THRU0, THRU1, THRU2,
|
||||||
TACH6, TACH7, TACH8, TACH9, THRU0, THRU1, THRU2, THRU3, TXD1,
|
THRU3, TXD1, TXD2, TXD3, TXD4, UART10, UART11, UART12, UART13,
|
||||||
TXD2, TXD3, TXD4, UART10, UART11, UART12, UART13, UART6, UART7,
|
UART6, UART7, UART8, UART9, VB, VGAHS, VGAVS, WDTRST1, WDTRST2,
|
||||||
UART8, UART9, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3,
|
WDTRST3, WDTRST4, ]
|
||||||
WDTRST4, ]
|
|
||||||
groups:
|
groups:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "/schemas/types.yaml#/definitions/string"
|
- $ref: "/schemas/types.yaml#/definitions/string"
|
||||||
- enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
|
- enum: [ ADC0, ADC1, ADC10, ADC11, ADC12, ADC13, ADC14, ADC15,
|
||||||
ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, ESPI,
|
ADC2, ADC3, ADC4, ADC5, ADC6, ADC7, ADC8, ADC9, BMCINT, EMMCG1,
|
||||||
ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID, FWQSPID, FWSPIWP, GPIT0,
|
EMMCG4, EMMCG8, ESPI, ESPIALT, FSI1, FSI2, FWSPIABR, FWSPID,
|
||||||
GPIT1, GPIT2, GPIT3, GPIT4, GPIT5, GPIT6, GPIT7, GPIU0, GPIU1,
|
FWQSPID, FWSPIWP, GPIT0, GPIT1, GPIT2, GPIT3, GPIT4, GPIT5,
|
||||||
GPIU2, GPIU3, GPIU4, GPIU5, GPIU6, GPIU7, HVI3C3, HVI3C4, I2C1,
|
GPIT6, GPIT7, GPIU0, GPIU1, GPIU2, GPIU3, GPIU4, GPIU5, GPIU6,
|
||||||
I2C10, I2C11, I2C12, I2C13, I2C14, I2C15, I2C16, I2C2, I2C3,
|
GPIU7, HVI3C3, HVI3C4, I2C1, I2C10, I2C11, I2C12, I2C13, I2C14,
|
||||||
I2C4, I2C5, I2C6, I2C7, I2C8, I2C9, I3C3, I3C4, I3C5, I3C6,
|
I2C15, I2C16, I2C2, I2C3, I2C4, I2C5, I2C6, I2C7, I2C8, I2C9,
|
||||||
JTAGM, LHPD, LHSIRQ, LPC, LPCHC, LPCPD, LPCPME, LPCSMI, LSIRQ,
|
I3C3, I3C4, I3C5, I3C6, JTAGM, LHPD, LHSIRQ, LPC, LPCHC, LPCPD,
|
||||||
MACLINK1, MACLINK2, MACLINK3, MACLINK4, MDIO1, MDIO2, MDIO3,
|
LPCPME, LPCSMI, LSIRQ, MACLINK1, MACLINK2, MACLINK3, MACLINK4,
|
||||||
MDIO4, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1, NDCD2, NDCD3, NDCD4,
|
MDIO1, MDIO2, MDIO3, MDIO4, NCTS1, NCTS2, NCTS3, NCTS4, NDCD1,
|
||||||
NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2, NDTR3, NDTR4, NRI1,
|
NDCD2, NDCD3, NDCD4, NDSR1, NDSR2, NDSR3, NDSR4, NDTR1, NDTR2,
|
||||||
NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4, OSCCLK, PEWAKE,
|
NDTR3, NDTR4, NRI1, NRI2, NRI3, NRI4, NRTS1, NRTS2, NRTS3, NRTS4,
|
||||||
PWM0, PWM1, PWM10G0, PWM10G1, PWM11G0, PWM11G1, PWM12G0, PWM12G1,
|
OSCCLK, PEWAKE, PWM0, PWM1, PWM10G0, PWM10G1, PWM11G0, PWM11G1,
|
||||||
PWM13G0, PWM13G1, PWM14G0, PWM14G1, PWM15G0, PWM15G1, PWM2, PWM3,
|
PWM12G0, PWM12G1, PWM13G0, PWM13G1, PWM14G0, PWM14G1, PWM15G0,
|
||||||
PWM4, PWM5, PWM6, PWM7, PWM8G0, PWM8G1, PWM9G0, PWM9G1, QSPI1,
|
PWM15G1, PWM2, PWM3, PWM4, PWM5, PWM6, PWM7, PWM8G0, PWM8G1,
|
||||||
QSPI2, RGMII1, RGMII2, RGMII3, RGMII4, RMII1, RMII2, RMII3,
|
PWM9G0, PWM9G1, QSPI1, QSPI2, RGMII1, RGMII2, RGMII3, RGMII4,
|
||||||
RMII4, RXD1, RXD2, RXD3, RXD4, SALT1, SALT10G0, SALT10G1,
|
RMII1, RMII2, RMII3, RMII4, RXD1, RXD2, RXD3, RXD4, SALT1,
|
||||||
SALT11G0, SALT11G1, SALT12G0, SALT12G1, SALT13G0, SALT13G1,
|
SALT10G0, SALT10G1, SALT11G0, SALT11G1, SALT12G0, SALT12G1,
|
||||||
SALT14G0, SALT14G1, SALT15G0, SALT15G1, SALT16G0, SALT16G1,
|
SALT13G0, SALT13G1, SALT14G0, SALT14G1, SALT15G0, SALT15G1,
|
||||||
SALT2, SALT3, SALT4, SALT5, SALT6, SALT7, SALT8, SALT9G0,
|
SALT16G0, SALT16G1, SALT2, SALT3, SALT4, SALT5, SALT6, SALT7,
|
||||||
SALT9G1, SD1, SD2, SD3, SD3DAT4, SD3DAT5, SD3DAT6, SD3DAT7,
|
SALT8, SALT9G0, SALT9G1, SD1, SD2, SD3, SGPM1, SGPS1, SIOONCTRL,
|
||||||
SGPM1, SGPS1, SIOONCTRL, SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD,
|
SIOPBI, SIOPBO, SIOPWREQ, SIOPWRGD, SIOS3, SIOS5, SIOSCI, SPI1,
|
||||||
SIOS3, SIOS5, SIOSCI, SPI1, SPI1ABR, SPI1CS1, SPI1WP, SPI2,
|
SPI1ABR, SPI1CS1, SPI1WP, SPI2, SPI2CS1, SPI2CS2, TACH0, TACH1,
|
||||||
SPI2CS1, SPI2CS2, TACH0, TACH1, TACH10, TACH11, TACH12, TACH13,
|
TACH10, TACH11, TACH12, TACH13, TACH14, TACH15, TACH2, TACH3,
|
||||||
TACH14, TACH15, TACH2, TACH3, TACH4, TACH5, TACH6, TACH7, TACH8,
|
TACH4, TACH5, TACH6, TACH7, TACH8, TACH9, THRU0, THRU1, THRU2,
|
||||||
TACH9, THRU0, THRU1, THRU2, THRU3, TXD1, TXD2, TXD3, TXD4,
|
THRU3, TXD1, TXD2, TXD3, TXD4, UART10, UART11, UART12G0,
|
||||||
UART10, UART11, UART12G0, UART12G1, UART13G0, UART13G1, UART6,
|
UART12G1, UART13G0, UART13G1, UART6, UART7, UART8, UART9, VB,
|
||||||
UART7, UART8, UART9, VB, VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3,
|
VGAHS, VGAVS, WDTRST1, WDTRST2, WDTRST3, WDTRST4, ]
|
||||||
WDTRST4, ]
|
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
|
@ -30,8 +30,8 @@ if:
|
|||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
enum:
|
enum:
|
||||||
- const: regulator-fixed
|
- regulator-fixed
|
||||||
- const: regulator-fixed-clock
|
- regulator-fixed-clock
|
||||||
|
|
||||||
regulator-name: true
|
regulator-name: true
|
||||||
|
|
||||||
|
@ -24,15 +24,17 @@ description: |
|
|||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
items:
|
oneOf:
|
||||||
- enum:
|
- items:
|
||||||
- sifive,rocket0
|
- enum:
|
||||||
- sifive,e5
|
- sifive,rocket0
|
||||||
- sifive,e51
|
- sifive,e5
|
||||||
- sifive,u54-mc
|
- sifive,e51
|
||||||
- sifive,u54
|
- sifive,u54-mc
|
||||||
- sifive,u5
|
- sifive,u54
|
||||||
- const: riscv
|
- sifive,u5
|
||||||
|
- const: riscv
|
||||||
|
- const: riscv # Simulator only
|
||||||
description:
|
description:
|
||||||
Identifies that the hart uses the RISC-V instruction set
|
Identifies that the hart uses the RISC-V instruction set
|
||||||
and identifies the type of the hart.
|
and identifies the type of the hart.
|
||||||
@ -66,12 +68,8 @@ properties:
|
|||||||
insensitive, letters in the riscv,isa string must be all
|
insensitive, letters in the riscv,isa string must be all
|
||||||
lowercase to simplify parsing.
|
lowercase to simplify parsing.
|
||||||
|
|
||||||
timebase-frequency:
|
# RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
|
||||||
type: integer
|
timebase-frequency: false
|
||||||
minimum: 1
|
|
||||||
description:
|
|
||||||
Specifies the clock frequency of the system timer in Hz.
|
|
||||||
This value is common to all harts on a single system image.
|
|
||||||
|
|
||||||
interrupt-controller:
|
interrupt-controller:
|
||||||
type: object
|
type: object
|
||||||
@ -93,7 +91,6 @@ properties:
|
|||||||
|
|
||||||
required:
|
required:
|
||||||
- riscv,isa
|
- riscv,isa
|
||||||
- timebase-frequency
|
|
||||||
- interrupt-controller
|
- interrupt-controller
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
|
19
MAINTAINERS
19
MAINTAINERS
@ -2323,11 +2323,13 @@ F: drivers/edac/altera_edac.
|
|||||||
|
|
||||||
ARM/SPREADTRUM SoC SUPPORT
|
ARM/SPREADTRUM SoC SUPPORT
|
||||||
M: Orson Zhai <orsonzhai@gmail.com>
|
M: Orson Zhai <orsonzhai@gmail.com>
|
||||||
M: Baolin Wang <baolin.wang@linaro.org>
|
M: Baolin Wang <baolin.wang7@gmail.com>
|
||||||
M: Chunyan Zhang <zhang.lyra@gmail.com>
|
M: Chunyan Zhang <zhang.lyra@gmail.com>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: arch/arm64/boot/dts/sprd
|
F: arch/arm64/boot/dts/sprd
|
||||||
N: sprd
|
N: sprd
|
||||||
|
N: sc27xx
|
||||||
|
N: sc2731
|
||||||
|
|
||||||
ARM/STI ARCHITECTURE
|
ARM/STI ARCHITECTURE
|
||||||
M: Patrice Chotard <patrice.chotard@st.com>
|
M: Patrice Chotard <patrice.chotard@st.com>
|
||||||
@ -3096,7 +3098,7 @@ S: Supported
|
|||||||
F: arch/arm64/net/
|
F: arch/arm64/net/
|
||||||
|
|
||||||
BPF JIT for MIPS (32-BIT AND 64-BIT)
|
BPF JIT for MIPS (32-BIT AND 64-BIT)
|
||||||
M: Paul Burton <paul.burton@mips.com>
|
M: Paul Burton <paulburton@kernel.org>
|
||||||
L: netdev@vger.kernel.org
|
L: netdev@vger.kernel.org
|
||||||
L: bpf@vger.kernel.org
|
L: bpf@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
@ -3183,7 +3185,7 @@ N: bcm216*
|
|||||||
N: kona
|
N: kona
|
||||||
F: arch/arm/mach-bcm/
|
F: arch/arm/mach-bcm/
|
||||||
|
|
||||||
BROADCOM BCM2835 ARM ARCHITECTURE
|
BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE
|
||||||
M: Eric Anholt <eric@anholt.net>
|
M: Eric Anholt <eric@anholt.net>
|
||||||
M: Stefan Wahren <wahrenst@gmx.net>
|
M: Stefan Wahren <wahrenst@gmx.net>
|
||||||
L: bcm-kernel-feedback-list@broadcom.com
|
L: bcm-kernel-feedback-list@broadcom.com
|
||||||
@ -3191,6 +3193,7 @@ L: linux-rpi-kernel@lists.infradead.org (moderated for non-subscribers)
|
|||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
T: git git://github.com/anholt/linux
|
T: git git://github.com/anholt/linux
|
||||||
S: Maintained
|
S: Maintained
|
||||||
|
N: bcm2711
|
||||||
N: bcm2835
|
N: bcm2835
|
||||||
F: drivers/staging/vc04_services
|
F: drivers/staging/vc04_services
|
||||||
|
|
||||||
@ -3237,8 +3240,6 @@ S: Maintained
|
|||||||
F: drivers/usb/gadget/udc/bcm63xx_udc.*
|
F: drivers/usb/gadget/udc/bcm63xx_udc.*
|
||||||
|
|
||||||
BROADCOM BCM7XXX ARM ARCHITECTURE
|
BROADCOM BCM7XXX ARM ARCHITECTURE
|
||||||
M: Brian Norris <computersforpeace@gmail.com>
|
|
||||||
M: Gregory Fong <gregory.0xf0@gmail.com>
|
|
||||||
M: Florian Fainelli <f.fainelli@gmail.com>
|
M: Florian Fainelli <f.fainelli@gmail.com>
|
||||||
M: bcm-kernel-feedback-list@broadcom.com
|
M: bcm-kernel-feedback-list@broadcom.com
|
||||||
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
|
||||||
@ -8001,7 +8002,7 @@ S: Maintained
|
|||||||
F: drivers/usb/atm/ueagle-atm.c
|
F: drivers/usb/atm/ueagle-atm.c
|
||||||
|
|
||||||
IMGTEC ASCII LCD DRIVER
|
IMGTEC ASCII LCD DRIVER
|
||||||
M: Paul Burton <paul.burton@mips.com>
|
M: Paul Burton <paulburton@kernel.org>
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt
|
F: Documentation/devicetree/bindings/auxdisplay/img-ascii-lcd.txt
|
||||||
F: drivers/auxdisplay/img-ascii-lcd.c
|
F: drivers/auxdisplay/img-ascii-lcd.c
|
||||||
@ -10828,7 +10829,7 @@ F: drivers/usb/image/microtek.*
|
|||||||
|
|
||||||
MIPS
|
MIPS
|
||||||
M: Ralf Baechle <ralf@linux-mips.org>
|
M: Ralf Baechle <ralf@linux-mips.org>
|
||||||
M: Paul Burton <paul.burton@mips.com>
|
M: Paul Burton <paulburton@kernel.org>
|
||||||
M: James Hogan <jhogan@kernel.org>
|
M: James Hogan <jhogan@kernel.org>
|
||||||
L: linux-mips@vger.kernel.org
|
L: linux-mips@vger.kernel.org
|
||||||
W: http://www.linux-mips.org/
|
W: http://www.linux-mips.org/
|
||||||
@ -10842,7 +10843,7 @@ F: arch/mips/
|
|||||||
F: drivers/platform/mips/
|
F: drivers/platform/mips/
|
||||||
|
|
||||||
MIPS BOSTON DEVELOPMENT BOARD
|
MIPS BOSTON DEVELOPMENT BOARD
|
||||||
M: Paul Burton <paul.burton@mips.com>
|
M: Paul Burton <paulburton@kernel.org>
|
||||||
L: linux-mips@vger.kernel.org
|
L: linux-mips@vger.kernel.org
|
||||||
S: Maintained
|
S: Maintained
|
||||||
F: Documentation/devicetree/bindings/clock/img,boston-clock.txt
|
F: Documentation/devicetree/bindings/clock/img,boston-clock.txt
|
||||||
@ -10852,7 +10853,7 @@ F: drivers/clk/imgtec/clk-boston.c
|
|||||||
F: include/dt-bindings/clock/boston-clock.h
|
F: include/dt-bindings/clock/boston-clock.h
|
||||||
|
|
||||||
MIPS GENERIC PLATFORM
|
MIPS GENERIC PLATFORM
|
||||||
M: Paul Burton <paul.burton@mips.com>
|
M: Paul Burton <paulburton@kernel.org>
|
||||||
L: linux-mips@vger.kernel.org
|
L: linux-mips@vger.kernel.org
|
||||||
S: Supported
|
S: Supported
|
||||||
F: Documentation/devicetree/bindings/power/mti,mips-cpc.txt
|
F: Documentation/devicetree/bindings/power/mti,mips-cpc.txt
|
||||||
|
4
Makefile
4
Makefile
@ -2,8 +2,8 @@
|
|||||||
VERSION = 5
|
VERSION = 5
|
||||||
PATCHLEVEL = 4
|
PATCHLEVEL = 4
|
||||||
SUBLEVEL = 0
|
SUBLEVEL = 0
|
||||||
EXTRAVERSION = -rc4
|
EXTRAVERSION = -rc5
|
||||||
NAME = Nesting Opossum
|
NAME = Kleptomaniac Octopus
|
||||||
|
|
||||||
# *DOCUMENTATION*
|
# *DOCUMENTATION*
|
||||||
# To see a list of typical targets execute "make help"
|
# To see a list of typical targets execute "make help"
|
||||||
|
@ -111,13 +111,13 @@
|
|||||||
reg = <0x70>;
|
reg = <0x70>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
i2c-mux-idle-disconnect;
|
||||||
|
|
||||||
i2c@0 {
|
i2c@0 {
|
||||||
/* FMC A */
|
/* FMC A */
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@1 {
|
i2c@1 {
|
||||||
@ -125,7 +125,6 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <1>;
|
reg = <1>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@2 {
|
i2c@2 {
|
||||||
@ -133,7 +132,6 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <2>;
|
reg = <2>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@3 {
|
i2c@3 {
|
||||||
@ -141,7 +139,6 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <3>;
|
reg = <3>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@4 {
|
i2c@4 {
|
||||||
@ -149,14 +146,12 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <4>;
|
reg = <4>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@5 {
|
i2c@5 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <5>;
|
reg = <5>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
|
|
||||||
ina230@40 { compatible = "ti,ina230"; reg = <0x40>; shunt-resistor = <5000>; };
|
ina230@40 { compatible = "ti,ina230"; reg = <0x40>; shunt-resistor = <5000>; };
|
||||||
ina230@41 { compatible = "ti,ina230"; reg = <0x41>; shunt-resistor = <5000>; };
|
ina230@41 { compatible = "ti,ina230"; reg = <0x41>; shunt-resistor = <5000>; };
|
||||||
@ -182,14 +177,12 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c@7 {
|
i2c@7 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <7>;
|
reg = <7>;
|
||||||
i2c-mux-idle-disconnect;
|
|
||||||
|
|
||||||
u41: pca9575@20 {
|
u41: pca9575@20 {
|
||||||
compatible = "nxp,pca9575";
|
compatible = "nxp,pca9575";
|
||||||
|
@ -113,6 +113,7 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
|
pinctrl-0 = <&emmc_gpio34 &gpclk2_gpio43>;
|
||||||
|
bus-width = <4>;
|
||||||
mmc-pwrseq = <&wifi_pwrseq>;
|
mmc-pwrseq = <&wifi_pwrseq>;
|
||||||
non-removable;
|
non-removable;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
@ -9,6 +9,14 @@
|
|||||||
reg = <0 0x40000000>;
|
reg = <0 0x40000000>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
/*
|
||||||
|
* Since there is no upstream GPIO driver yet,
|
||||||
|
* remove the incomplete node.
|
||||||
|
*/
|
||||||
|
/delete-node/ act;
|
||||||
|
};
|
||||||
|
|
||||||
reg_3v3: fixed-regulator {
|
reg_3v3: fixed-regulator {
|
||||||
compatible = "regulator-fixed";
|
compatible = "regulator-fixed";
|
||||||
regulator-name = "3V3";
|
regulator-name = "3V3";
|
||||||
|
@ -207,6 +207,10 @@
|
|||||||
vin-supply = <&sw1c_reg>;
|
vin-supply = <&sw1c_reg>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&snvs_poweroff {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&iomuxc {
|
&iomuxc {
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&pinctrl_hog>;
|
pinctrl-0 = <&pinctrl_hog>;
|
||||||
|
@ -448,7 +448,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x302d0000 0x10000>;
|
reg = <0x302d0000 0x10000>;
|
||||||
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT1_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT1_ROOT_CLK>;
|
<&clks IMX7D_GPT1_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
};
|
};
|
||||||
@ -457,7 +457,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x302e0000 0x10000>;
|
reg = <0x302e0000 0x10000>;
|
||||||
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT2_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT2_ROOT_CLK>;
|
<&clks IMX7D_GPT2_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
@ -467,7 +467,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x302f0000 0x10000>;
|
reg = <0x302f0000 0x10000>;
|
||||||
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT3_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT3_ROOT_CLK>;
|
<&clks IMX7D_GPT3_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
@ -477,7 +477,7 @@
|
|||||||
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
compatible = "fsl,imx7d-gpt", "fsl,imx6sx-gpt";
|
||||||
reg = <0x30300000 0x10000>;
|
reg = <0x30300000 0x10000>;
|
||||||
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clks IMX7D_CLK_DUMMY>,
|
clocks = <&clks IMX7D_GPT4_ROOT_CLK>,
|
||||||
<&clks IMX7D_GPT4_ROOT_CLK>;
|
<&clks IMX7D_GPT4_ROOT_CLK>;
|
||||||
clock-names = "ipg", "per";
|
clock-names = "ipg", "per";
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
|
@ -192,3 +192,7 @@
|
|||||||
&twl_gpio {
|
&twl_gpio {
|
||||||
ti,use-leds;
|
ti,use-leds;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&twl_keypad {
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
@ -369,7 +369,7 @@
|
|||||||
compatible = "ti,wl1285", "ti,wl1283";
|
compatible = "ti,wl1285", "ti,wl1283";
|
||||||
reg = <2>;
|
reg = <2>;
|
||||||
/* gpio_100 with gpmc_wait2 pad as wakeirq */
|
/* gpio_100 with gpmc_wait2 pad as wakeirq */
|
||||||
interrupts-extended = <&gpio4 4 IRQ_TYPE_EDGE_RISING>,
|
interrupts-extended = <&gpio4 4 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
<&omap4_pmx_core 0x4e>;
|
<&omap4_pmx_core 0x4e>;
|
||||||
interrupt-names = "irq", "wakeup";
|
interrupt-names = "irq", "wakeup";
|
||||||
ref-clock-frequency = <26000000>;
|
ref-clock-frequency = <26000000>;
|
||||||
|
@ -474,7 +474,7 @@
|
|||||||
compatible = "ti,wl1271";
|
compatible = "ti,wl1271";
|
||||||
reg = <2>;
|
reg = <2>;
|
||||||
/* gpio_53 with gpmc_ncs3 pad as wakeup */
|
/* gpio_53 with gpmc_ncs3 pad as wakeup */
|
||||||
interrupts-extended = <&gpio2 21 IRQ_TYPE_EDGE_RISING>,
|
interrupts-extended = <&gpio2 21 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
<&omap4_pmx_core 0x3a>;
|
<&omap4_pmx_core 0x3a>;
|
||||||
interrupt-names = "irq", "wakeup";
|
interrupt-names = "irq", "wakeup";
|
||||||
ref-clock-frequency = <38400000>;
|
ref-clock-frequency = <38400000>;
|
||||||
|
@ -512,7 +512,7 @@
|
|||||||
compatible = "ti,wl1281";
|
compatible = "ti,wl1281";
|
||||||
reg = <2>;
|
reg = <2>;
|
||||||
interrupt-parent = <&gpio1>;
|
interrupt-parent = <&gpio1>;
|
||||||
interrupts = <21 IRQ_TYPE_EDGE_RISING>; /* gpio 53 */
|
interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* gpio 53 */
|
||||||
ref-clock-frequency = <26000000>;
|
ref-clock-frequency = <26000000>;
|
||||||
tcxo-clock-frequency = <26000000>;
|
tcxo-clock-frequency = <26000000>;
|
||||||
};
|
};
|
||||||
|
@ -69,7 +69,7 @@
|
|||||||
compatible = "ti,wl1271";
|
compatible = "ti,wl1271";
|
||||||
reg = <2>;
|
reg = <2>;
|
||||||
interrupt-parent = <&gpio2>;
|
interrupt-parent = <&gpio2>;
|
||||||
interrupts = <9 IRQ_TYPE_EDGE_RISING>; /* gpio 41 */
|
interrupts = <9 IRQ_TYPE_LEVEL_HIGH>; /* gpio 41 */
|
||||||
ref-clock-frequency = <38400000>;
|
ref-clock-frequency = <38400000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -362,7 +362,7 @@
|
|||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
pinctrl-0 = <&wlcore_irq_pin>;
|
pinctrl-0 = <&wlcore_irq_pin>;
|
||||||
interrupt-parent = <&gpio1>;
|
interrupt-parent = <&gpio1>;
|
||||||
interrupts = <14 IRQ_TYPE_EDGE_RISING>; /* gpio 14 */
|
interrupts = <14 IRQ_TYPE_LEVEL_HIGH>; /* gpio 14 */
|
||||||
ref-clock-frequency = <26000000>;
|
ref-clock-frequency = <26000000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1146,7 +1146,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
gpu_cm: clock-controller@1500 {
|
gpu_cm: gpu_cm@1500 {
|
||||||
compatible = "ti,omap4-cm";
|
compatible = "ti,omap4-cm";
|
||||||
reg = <0x1500 0x100>;
|
reg = <0x1500 0x100>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -609,13 +609,13 @@
|
|||||||
<STM32_PINMUX('F', 6, AF9)>; /* QSPI_BK1_IO3 */
|
<STM32_PINMUX('F', 6, AF9)>; /* QSPI_BK1_IO3 */
|
||||||
bias-disable;
|
bias-disable;
|
||||||
drive-push-pull;
|
drive-push-pull;
|
||||||
slew-rate = <3>;
|
slew-rate = <1>;
|
||||||
};
|
};
|
||||||
pins2 {
|
pins2 {
|
||||||
pinmux = <STM32_PINMUX('B', 6, AF10)>; /* QSPI_BK1_NCS */
|
pinmux = <STM32_PINMUX('B', 6, AF10)>; /* QSPI_BK1_NCS */
|
||||||
bias-pull-up;
|
bias-pull-up;
|
||||||
drive-push-pull;
|
drive-push-pull;
|
||||||
slew-rate = <3>;
|
slew-rate = <1>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -637,13 +637,13 @@
|
|||||||
<STM32_PINMUX('G', 7, AF11)>; /* QSPI_BK2_IO3 */
|
<STM32_PINMUX('G', 7, AF11)>; /* QSPI_BK2_IO3 */
|
||||||
bias-disable;
|
bias-disable;
|
||||||
drive-push-pull;
|
drive-push-pull;
|
||||||
slew-rate = <3>;
|
slew-rate = <1>;
|
||||||
};
|
};
|
||||||
pins2 {
|
pins2 {
|
||||||
pinmux = <STM32_PINMUX('C', 0, AF10)>; /* QSPI_BK2_NCS */
|
pinmux = <STM32_PINMUX('C', 0, AF10)>; /* QSPI_BK2_NCS */
|
||||||
bias-pull-up;
|
bias-pull-up;
|
||||||
drive-push-pull;
|
drive-push-pull;
|
||||||
slew-rate = <3>;
|
slew-rate = <1>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -380,9 +380,8 @@
|
|||||||
compatible = "allwinner,sun7i-a20-csi0";
|
compatible = "allwinner,sun7i-a20-csi0";
|
||||||
reg = <0x01c09000 0x1000>;
|
reg = <0x01c09000 0x1000>;
|
||||||
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI0>,
|
clocks = <&ccu CLK_AHB_CSI0>, <&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
|
||||||
<&ccu CLK_CSI_SCLK>, <&ccu CLK_DRAM_CSI0>;
|
clock-names = "bus", "isp", "ram";
|
||||||
clock-names = "bus", "mod", "isp", "ram";
|
|
||||||
resets = <&ccu RST_CSI0>;
|
resets = <&ccu RST_CSI0>;
|
||||||
status = "disabled";
|
status = "disabled";
|
||||||
};
|
};
|
||||||
|
@ -602,6 +602,7 @@
|
|||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
reg = <0x70>;
|
reg = <0x70>;
|
||||||
|
i2c-mux-idle-disconnect;
|
||||||
|
|
||||||
sff0_i2c: i2c@1 {
|
sff0_i2c: i2c@1 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
@ -640,6 +641,7 @@
|
|||||||
reg = <0x71>;
|
reg = <0x71>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <0>;
|
#size-cells = <0>;
|
||||||
|
i2c-mux-idle-disconnect;
|
||||||
|
|
||||||
sff5_i2c: i2c@1 {
|
sff5_i2c: i2c@1 {
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
|
@ -167,6 +167,7 @@ CONFIG_FB=y
|
|||||||
CONFIG_FIRMWARE_EDID=y
|
CONFIG_FIRMWARE_EDID=y
|
||||||
CONFIG_FB_DA8XX=y
|
CONFIG_FB_DA8XX=y
|
||||||
CONFIG_BACKLIGHT_PWM=m
|
CONFIG_BACKLIGHT_PWM=m
|
||||||
|
CONFIG_BACKLIGHT_GPIO=m
|
||||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||||
CONFIG_LOGO=y
|
CONFIG_LOGO=y
|
||||||
CONFIG_SOUND=m
|
CONFIG_SOUND=m
|
||||||
|
@ -276,6 +276,7 @@ CONFIG_VIDEO_OV5640=m
|
|||||||
CONFIG_VIDEO_OV5645=m
|
CONFIG_VIDEO_OV5645=m
|
||||||
CONFIG_IMX_IPUV3_CORE=y
|
CONFIG_IMX_IPUV3_CORE=y
|
||||||
CONFIG_DRM=y
|
CONFIG_DRM=y
|
||||||
|
CONFIG_DRM_MSM=y
|
||||||
CONFIG_DRM_PANEL_LVDS=y
|
CONFIG_DRM_PANEL_LVDS=y
|
||||||
CONFIG_DRM_PANEL_SIMPLE=y
|
CONFIG_DRM_PANEL_SIMPLE=y
|
||||||
CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
|
CONFIG_DRM_PANEL_SEIKO_43WVF1G=y
|
||||||
|
@ -356,15 +356,15 @@ CONFIG_DRM_OMAP_CONNECTOR_HDMI=m
|
|||||||
CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=m
|
CONFIG_DRM_OMAP_CONNECTOR_ANALOG_TV=m
|
||||||
CONFIG_DRM_OMAP_PANEL_DPI=m
|
CONFIG_DRM_OMAP_PANEL_DPI=m
|
||||||
CONFIG_DRM_OMAP_PANEL_DSI_CM=m
|
CONFIG_DRM_OMAP_PANEL_DSI_CM=m
|
||||||
CONFIG_DRM_OMAP_PANEL_SONY_ACX565AKM=m
|
|
||||||
CONFIG_DRM_OMAP_PANEL_LGPHILIPS_LB035Q02=m
|
|
||||||
CONFIG_DRM_OMAP_PANEL_SHARP_LS037V7DW01=m
|
|
||||||
CONFIG_DRM_OMAP_PANEL_TPO_TD028TTEC1=m
|
|
||||||
CONFIG_DRM_OMAP_PANEL_TPO_TD043MTEA1=m
|
|
||||||
CONFIG_DRM_OMAP_PANEL_NEC_NL8048HL11=m
|
|
||||||
CONFIG_DRM_TILCDC=m
|
CONFIG_DRM_TILCDC=m
|
||||||
CONFIG_DRM_PANEL_SIMPLE=m
|
CONFIG_DRM_PANEL_SIMPLE=m
|
||||||
CONFIG_DRM_TI_TFP410=m
|
CONFIG_DRM_TI_TFP410=m
|
||||||
|
CONFIG_DRM_PANEL_LG_LB035Q02=m
|
||||||
|
CONFIG_DRM_PANEL_NEC_NL8048HL11=m
|
||||||
|
CONFIG_DRM_PANEL_SHARP_LS037V7DW01=m
|
||||||
|
CONFIG_DRM_PANEL_SONY_ACX565AKM=m
|
||||||
|
CONFIG_DRM_PANEL_TPO_TD028TTEC1=m
|
||||||
|
CONFIG_DRM_PANEL_TPO_TD043MTEA1=m
|
||||||
CONFIG_FB=y
|
CONFIG_FB=y
|
||||||
CONFIG_FIRMWARE_EDID=y
|
CONFIG_FIRMWARE_EDID=y
|
||||||
CONFIG_FB_MODE_HELPERS=y
|
CONFIG_FB_MODE_HELPERS=y
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLY__
|
||||||
|
|
||||||
#ifdef CONFIG_CPU_CP15_MMU
|
#ifdef CONFIG_CPU_CP15_MMU
|
||||||
static inline unsigned int get_domain(void)
|
static __always_inline unsigned int get_domain(void)
|
||||||
{
|
{
|
||||||
unsigned int domain;
|
unsigned int domain;
|
||||||
|
|
||||||
@ -94,7 +94,7 @@ static inline unsigned int get_domain(void)
|
|||||||
return domain;
|
return domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void set_domain(unsigned val)
|
static __always_inline void set_domain(unsigned int val)
|
||||||
{
|
{
|
||||||
asm volatile(
|
asm volatile(
|
||||||
"mcr p15, 0, %0, c3, c0 @ set domain"
|
"mcr p15, 0, %0, c3, c0 @ set domain"
|
||||||
@ -102,12 +102,12 @@ static inline void set_domain(unsigned val)
|
|||||||
isb();
|
isb();
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline unsigned int get_domain(void)
|
static __always_inline unsigned int get_domain(void)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void set_domain(unsigned val)
|
static __always_inline void set_domain(unsigned int val)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
* perform such accesses (eg, via list poison values) which could then
|
* perform such accesses (eg, via list poison values) which could then
|
||||||
* be exploited for priviledge escalation.
|
* be exploited for priviledge escalation.
|
||||||
*/
|
*/
|
||||||
static inline unsigned int uaccess_save_and_enable(void)
|
static __always_inline unsigned int uaccess_save_and_enable(void)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
|
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
|
||||||
unsigned int old_domain = get_domain();
|
unsigned int old_domain = get_domain();
|
||||||
@ -37,7 +37,7 @@ static inline unsigned int uaccess_save_and_enable(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void uaccess_restore(unsigned int flags)
|
static __always_inline void uaccess_restore(unsigned int flags)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
|
#ifdef CONFIG_CPU_SW_DOMAIN_PAN
|
||||||
/* Restore the user access mask */
|
/* Restore the user access mask */
|
||||||
|
@ -68,7 +68,7 @@ ENDPROC(__vet_atags)
|
|||||||
* The following fragment of code is executed with the MMU on in MMU mode,
|
* The following fragment of code is executed with the MMU on in MMU mode,
|
||||||
* and uses absolute addresses; this is not position independent.
|
* and uses absolute addresses; this is not position independent.
|
||||||
*
|
*
|
||||||
* r0 = cp#15 control register
|
* r0 = cp#15 control register (exc_ret for M-class)
|
||||||
* r1 = machine ID
|
* r1 = machine ID
|
||||||
* r2 = atags/dtb pointer
|
* r2 = atags/dtb pointer
|
||||||
* r9 = processor ID
|
* r9 = processor ID
|
||||||
@ -137,7 +137,8 @@ __mmap_switched_data:
|
|||||||
#ifdef CONFIG_CPU_CP15
|
#ifdef CONFIG_CPU_CP15
|
||||||
.long cr_alignment @ r3
|
.long cr_alignment @ r3
|
||||||
#else
|
#else
|
||||||
.long 0 @ r3
|
M_CLASS(.long exc_ret) @ r3
|
||||||
|
AR_CLASS(.long 0) @ r3
|
||||||
#endif
|
#endif
|
||||||
.size __mmap_switched_data, . - __mmap_switched_data
|
.size __mmap_switched_data, . - __mmap_switched_data
|
||||||
|
|
||||||
|
@ -201,6 +201,8 @@ M_CLASS(streq r3, [r12, #PMSAv8_MAIR1])
|
|||||||
bic r0, r0, #V7M_SCB_CCR_IC
|
bic r0, r0, #V7M_SCB_CCR_IC
|
||||||
#endif
|
#endif
|
||||||
str r0, [r12, V7M_SCB_CCR]
|
str r0, [r12, V7M_SCB_CCR]
|
||||||
|
/* Pass exc_ret to __mmap_switched */
|
||||||
|
mov r0, r10
|
||||||
#endif /* CONFIG_CPU_CP15 elif CONFIG_CPU_V7M */
|
#endif /* CONFIG_CPU_CP15 elif CONFIG_CPU_V7M */
|
||||||
ret lr
|
ret lr
|
||||||
ENDPROC(__after_proc_init)
|
ENDPROC(__after_proc_init)
|
||||||
|
@ -462,8 +462,8 @@ static s8 dm365_queue_priority_mapping[][2] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct dma_slave_map dm365_edma_map[] = {
|
static const struct dma_slave_map dm365_edma_map[] = {
|
||||||
{ "davinci-mcbsp.0", "tx", EDMA_FILTER_PARAM(0, 2) },
|
{ "davinci-mcbsp", "tx", EDMA_FILTER_PARAM(0, 2) },
|
||||||
{ "davinci-mcbsp.0", "rx", EDMA_FILTER_PARAM(0, 3) },
|
{ "davinci-mcbsp", "rx", EDMA_FILTER_PARAM(0, 3) },
|
||||||
{ "davinci_voicecodec", "tx", EDMA_FILTER_PARAM(0, 2) },
|
{ "davinci_voicecodec", "tx", EDMA_FILTER_PARAM(0, 2) },
|
||||||
{ "davinci_voicecodec", "rx", EDMA_FILTER_PARAM(0, 3) },
|
{ "davinci_voicecodec", "rx", EDMA_FILTER_PARAM(0, 3) },
|
||||||
{ "spi_davinci.2", "tx", EDMA_FILTER_PARAM(0, 10) },
|
{ "spi_davinci.2", "tx", EDMA_FILTER_PARAM(0, 10) },
|
||||||
|
@ -89,6 +89,13 @@ static struct iommu_platform_data omap3_iommu_pdata = {
|
|||||||
.reset_name = "mmu",
|
.reset_name = "mmu",
|
||||||
.assert_reset = omap_device_assert_hardreset,
|
.assert_reset = omap_device_assert_hardreset,
|
||||||
.deassert_reset = omap_device_deassert_hardreset,
|
.deassert_reset = omap_device_deassert_hardreset,
|
||||||
|
.device_enable = omap_device_enable,
|
||||||
|
.device_idle = omap_device_idle,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct iommu_platform_data omap3_iommu_isp_pdata = {
|
||||||
|
.device_enable = omap_device_enable,
|
||||||
|
.device_idle = omap_device_idle,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int omap3_sbc_t3730_twl_callback(struct device *dev,
|
static int omap3_sbc_t3730_twl_callback(struct device *dev,
|
||||||
@ -424,6 +431,8 @@ static struct iommu_platform_data omap4_iommu_pdata = {
|
|||||||
.reset_name = "mmu_cache",
|
.reset_name = "mmu_cache",
|
||||||
.assert_reset = omap_device_assert_hardreset,
|
.assert_reset = omap_device_assert_hardreset,
|
||||||
.deassert_reset = omap_device_deassert_hardreset,
|
.deassert_reset = omap_device_deassert_hardreset,
|
||||||
|
.device_enable = omap_device_enable,
|
||||||
|
.device_idle = omap_device_idle,
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -617,6 +626,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = {
|
|||||||
#ifdef CONFIG_ARCH_OMAP3
|
#ifdef CONFIG_ARCH_OMAP3
|
||||||
OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
|
OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
|
||||||
&omap3_iommu_pdata),
|
&omap3_iommu_pdata),
|
||||||
|
OF_DEV_AUXDATA("ti,omap2-iommu", 0x480bd400, "480bd400.mmu",
|
||||||
|
&omap3_iommu_isp_pdata),
|
||||||
OF_DEV_AUXDATA("ti,omap3-smartreflex-core", 0x480cb000,
|
OF_DEV_AUXDATA("ti,omap3-smartreflex-core", 0x480cb000,
|
||||||
"480cb000.smartreflex", &omap_sr_pdata[OMAP_SR_CORE]),
|
"480cb000.smartreflex", &omap_sr_pdata[OMAP_SR_CORE]),
|
||||||
OF_DEV_AUXDATA("ti,omap3-smartreflex-mpu-iva", 0x480c9000,
|
OF_DEV_AUXDATA("ti,omap3-smartreflex-mpu-iva", 0x480c9000,
|
||||||
|
@ -324,7 +324,7 @@ union offset_union {
|
|||||||
__put32_unaligned_check("strbt", val, addr)
|
__put32_unaligned_check("strbt", val, addr)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_alignment_finish_ldst(unsigned long addr, unsigned long instr, struct pt_regs *regs, union offset_union offset)
|
do_alignment_finish_ldst(unsigned long addr, u32 instr, struct pt_regs *regs, union offset_union offset)
|
||||||
{
|
{
|
||||||
if (!LDST_U_BIT(instr))
|
if (!LDST_U_BIT(instr))
|
||||||
offset.un = -offset.un;
|
offset.un = -offset.un;
|
||||||
@ -337,7 +337,7 @@ do_alignment_finish_ldst(unsigned long addr, unsigned long instr, struct pt_regs
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_alignment_ldrhstrh(unsigned long addr, unsigned long instr, struct pt_regs *regs)
|
do_alignment_ldrhstrh(unsigned long addr, u32 instr, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned int rd = RD_BITS(instr);
|
unsigned int rd = RD_BITS(instr);
|
||||||
|
|
||||||
@ -386,8 +386,7 @@ do_alignment_ldrhstrh(unsigned long addr, unsigned long instr, struct pt_regs *r
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_alignment_ldrdstrd(unsigned long addr, unsigned long instr,
|
do_alignment_ldrdstrd(unsigned long addr, u32 instr, struct pt_regs *regs)
|
||||||
struct pt_regs *regs)
|
|
||||||
{
|
{
|
||||||
unsigned int rd = RD_BITS(instr);
|
unsigned int rd = RD_BITS(instr);
|
||||||
unsigned int rd2;
|
unsigned int rd2;
|
||||||
@ -449,7 +448,7 @@ do_alignment_ldrdstrd(unsigned long addr, unsigned long instr,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_alignment_ldrstr(unsigned long addr, unsigned long instr, struct pt_regs *regs)
|
do_alignment_ldrstr(unsigned long addr, u32 instr, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned int rd = RD_BITS(instr);
|
unsigned int rd = RD_BITS(instr);
|
||||||
|
|
||||||
@ -498,7 +497,7 @@ do_alignment_ldrstr(unsigned long addr, unsigned long instr, struct pt_regs *reg
|
|||||||
* PU = 10 A B
|
* PU = 10 A B
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *regs)
|
do_alignment_ldmstm(unsigned long addr, u32 instr, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
unsigned int rd, rn, correction, nr_regs, regbits;
|
unsigned int rd, rn, correction, nr_regs, regbits;
|
||||||
unsigned long eaddr, newaddr;
|
unsigned long eaddr, newaddr;
|
||||||
@ -539,7 +538,7 @@ do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *reg
|
|||||||
* processor for us.
|
* processor for us.
|
||||||
*/
|
*/
|
||||||
if (addr != eaddr) {
|
if (addr != eaddr) {
|
||||||
pr_err("LDMSTM: PC = %08lx, instr = %08lx, "
|
pr_err("LDMSTM: PC = %08lx, instr = %08x, "
|
||||||
"addr = %08lx, eaddr = %08lx\n",
|
"addr = %08lx, eaddr = %08lx\n",
|
||||||
instruction_pointer(regs), instr, addr, eaddr);
|
instruction_pointer(regs), instr, addr, eaddr);
|
||||||
show_regs(regs);
|
show_regs(regs);
|
||||||
@ -716,10 +715,10 @@ thumb2arm(u16 tinstr)
|
|||||||
* 2. Register name Rt from ARMv7 is same as Rd from ARMv6 (Rd is Rt)
|
* 2. Register name Rt from ARMv7 is same as Rd from ARMv6 (Rd is Rt)
|
||||||
*/
|
*/
|
||||||
static void *
|
static void *
|
||||||
do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs,
|
do_alignment_t32_to_handler(u32 *pinstr, struct pt_regs *regs,
|
||||||
union offset_union *poffset)
|
union offset_union *poffset)
|
||||||
{
|
{
|
||||||
unsigned long instr = *pinstr;
|
u32 instr = *pinstr;
|
||||||
u16 tinst1 = (instr >> 16) & 0xffff;
|
u16 tinst1 = (instr >> 16) & 0xffff;
|
||||||
u16 tinst2 = instr & 0xffff;
|
u16 tinst2 = instr & 0xffff;
|
||||||
|
|
||||||
@ -767,17 +766,48 @@ do_alignment_t32_to_handler(unsigned long *pinstr, struct pt_regs *regs,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int alignment_get_arm(struct pt_regs *regs, u32 *ip, u32 *inst)
|
||||||
|
{
|
||||||
|
u32 instr = 0;
|
||||||
|
int fault;
|
||||||
|
|
||||||
|
if (user_mode(regs))
|
||||||
|
fault = get_user(instr, ip);
|
||||||
|
else
|
||||||
|
fault = probe_kernel_address(ip, instr);
|
||||||
|
|
||||||
|
*inst = __mem_to_opcode_arm(instr);
|
||||||
|
|
||||||
|
return fault;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int alignment_get_thumb(struct pt_regs *regs, u16 *ip, u16 *inst)
|
||||||
|
{
|
||||||
|
u16 instr = 0;
|
||||||
|
int fault;
|
||||||
|
|
||||||
|
if (user_mode(regs))
|
||||||
|
fault = get_user(instr, ip);
|
||||||
|
else
|
||||||
|
fault = probe_kernel_address(ip, instr);
|
||||||
|
|
||||||
|
*inst = __mem_to_opcode_thumb16(instr);
|
||||||
|
|
||||||
|
return fault;
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
union offset_union uninitialized_var(offset);
|
union offset_union uninitialized_var(offset);
|
||||||
unsigned long instr = 0, instrptr;
|
unsigned long instrptr;
|
||||||
int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs);
|
int (*handler)(unsigned long addr, u32 instr, struct pt_regs *regs);
|
||||||
unsigned int type;
|
unsigned int type;
|
||||||
unsigned int fault;
|
u32 instr = 0;
|
||||||
u16 tinstr = 0;
|
u16 tinstr = 0;
|
||||||
int isize = 4;
|
int isize = 4;
|
||||||
int thumb2_32b = 0;
|
int thumb2_32b = 0;
|
||||||
|
int fault;
|
||||||
|
|
||||||
if (interrupts_enabled(regs))
|
if (interrupts_enabled(regs))
|
||||||
local_irq_enable();
|
local_irq_enable();
|
||||||
@ -786,15 +816,14 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||||||
|
|
||||||
if (thumb_mode(regs)) {
|
if (thumb_mode(regs)) {
|
||||||
u16 *ptr = (u16 *)(instrptr & ~1);
|
u16 *ptr = (u16 *)(instrptr & ~1);
|
||||||
fault = probe_kernel_address(ptr, tinstr);
|
|
||||||
tinstr = __mem_to_opcode_thumb16(tinstr);
|
fault = alignment_get_thumb(regs, ptr, &tinstr);
|
||||||
if (!fault) {
|
if (!fault) {
|
||||||
if (cpu_architecture() >= CPU_ARCH_ARMv7 &&
|
if (cpu_architecture() >= CPU_ARCH_ARMv7 &&
|
||||||
IS_T32(tinstr)) {
|
IS_T32(tinstr)) {
|
||||||
/* Thumb-2 32-bit */
|
/* Thumb-2 32-bit */
|
||||||
u16 tinst2 = 0;
|
u16 tinst2;
|
||||||
fault = probe_kernel_address(ptr + 1, tinst2);
|
fault = alignment_get_thumb(regs, ptr + 1, &tinst2);
|
||||||
tinst2 = __mem_to_opcode_thumb16(tinst2);
|
|
||||||
instr = __opcode_thumb32_compose(tinstr, tinst2);
|
instr = __opcode_thumb32_compose(tinstr, tinst2);
|
||||||
thumb2_32b = 1;
|
thumb2_32b = 1;
|
||||||
} else {
|
} else {
|
||||||
@ -803,8 +832,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fault = probe_kernel_address((void *)instrptr, instr);
|
fault = alignment_get_arm(regs, (void *)instrptr, &instr);
|
||||||
instr = __mem_to_opcode_arm(instr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fault) {
|
if (fault) {
|
||||||
@ -926,7 +954,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||||||
* Oops, we didn't handle the instruction.
|
* Oops, we didn't handle the instruction.
|
||||||
*/
|
*/
|
||||||
pr_err("Alignment trap: not handling instruction "
|
pr_err("Alignment trap: not handling instruction "
|
||||||
"%0*lx at [<%08lx>]\n",
|
"%0*x at [<%08lx>]\n",
|
||||||
isize << 1,
|
isize << 1,
|
||||||
isize == 2 ? tinstr : instr, instrptr);
|
isize == 2 ? tinstr : instr, instrptr);
|
||||||
ai_skipped += 1;
|
ai_skipped += 1;
|
||||||
@ -936,7 +964,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||||||
ai_user += 1;
|
ai_user += 1;
|
||||||
|
|
||||||
if (ai_usermode & UM_WARN)
|
if (ai_usermode & UM_WARN)
|
||||||
printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx "
|
printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*x "
|
||||||
"Address=0x%08lx FSR 0x%03x\n", current->comm,
|
"Address=0x%08lx FSR 0x%03x\n", current->comm,
|
||||||
task_pid_nr(current), instrptr,
|
task_pid_nr(current), instrptr,
|
||||||
isize << 1,
|
isize << 1,
|
||||||
|
@ -132,13 +132,11 @@ __v7m_setup_cont:
|
|||||||
dsb
|
dsb
|
||||||
mov r6, lr @ save LR
|
mov r6, lr @ save LR
|
||||||
ldr sp, =init_thread_union + THREAD_START_SP
|
ldr sp, =init_thread_union + THREAD_START_SP
|
||||||
stmia sp, {r0-r3, r12}
|
|
||||||
cpsie i
|
cpsie i
|
||||||
svc #0
|
svc #0
|
||||||
1: cpsid i
|
1: cpsid i
|
||||||
ldr r0, =exc_ret
|
/* Calculate exc_ret */
|
||||||
orr lr, lr, #EXC_RET_THREADMODE_PROCESSSTACK
|
orr r10, lr, #EXC_RET_THREADMODE_PROCESSSTACK
|
||||||
str lr, [r0]
|
|
||||||
ldmia sp, {r0-r3, r12}
|
ldmia sp, {r0-r3, r12}
|
||||||
str r5, [r12, #11 * 4] @ restore the original SVC vector entry
|
str r5, [r12, #11 * 4] @ restore the original SVC vector entry
|
||||||
mov lr, r6 @ restore LR
|
mov lr, r6 @ restore LR
|
||||||
|
@ -63,3 +63,12 @@
|
|||||||
reg = <1>;
|
reg = <1>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
®_dc1sw {
|
||||||
|
/*
|
||||||
|
* Ethernet PHY needs 30ms to properly power up and some more
|
||||||
|
* to initialize. 100ms should be plenty of time to finish
|
||||||
|
* whole process.
|
||||||
|
*/
|
||||||
|
regulator-enable-ramp-delay = <100000>;
|
||||||
|
};
|
||||||
|
@ -159,6 +159,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
®_dc1sw {
|
®_dc1sw {
|
||||||
|
/*
|
||||||
|
* Ethernet PHY needs 30ms to properly power up and some more
|
||||||
|
* to initialize. 100ms should be plenty of time to finish
|
||||||
|
* whole process.
|
||||||
|
*/
|
||||||
|
regulator-enable-ramp-delay = <100000>;
|
||||||
regulator-name = "vcc-phy";
|
regulator-name = "vcc-phy";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -142,15 +142,6 @@
|
|||||||
clock-output-names = "ext-osc32k";
|
clock-output-names = "ext-osc32k";
|
||||||
};
|
};
|
||||||
|
|
||||||
pmu {
|
|
||||||
compatible = "arm,cortex-a53-pmu";
|
|
||||||
interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 154 IRQ_TYPE_LEVEL_HIGH>,
|
|
||||||
<GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>;
|
|
||||||
interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
|
|
||||||
};
|
|
||||||
|
|
||||||
psci {
|
psci {
|
||||||
compatible = "arm,psci-0.2";
|
compatible = "arm,psci-0.2";
|
||||||
method = "smc";
|
method = "smc";
|
||||||
|
@ -42,13 +42,14 @@
|
|||||||
|
|
||||||
pinmux: pinmux@14029c {
|
pinmux: pinmux@14029c {
|
||||||
compatible = "pinctrl-single";
|
compatible = "pinctrl-single";
|
||||||
reg = <0x0014029c 0x250>;
|
reg = <0x0014029c 0x26c>;
|
||||||
#address-cells = <1>;
|
#address-cells = <1>;
|
||||||
#size-cells = <1>;
|
#size-cells = <1>;
|
||||||
pinctrl-single,register-width = <32>;
|
pinctrl-single,register-width = <32>;
|
||||||
pinctrl-single,function-mask = <0xf>;
|
pinctrl-single,function-mask = <0xf>;
|
||||||
pinctrl-single,gpio-range = <
|
pinctrl-single,gpio-range = <
|
||||||
&range 0 154 MODE_GPIO
|
&range 0 91 MODE_GPIO
|
||||||
|
&range 95 60 MODE_GPIO
|
||||||
>;
|
>;
|
||||||
range: gpio-range {
|
range: gpio-range {
|
||||||
#pinctrl-single,gpio-range-cells = <3>;
|
#pinctrl-single,gpio-range-cells = <3>;
|
||||||
|
@ -464,8 +464,7 @@
|
|||||||
<&pinmux 108 16 27>,
|
<&pinmux 108 16 27>,
|
||||||
<&pinmux 135 77 6>,
|
<&pinmux 135 77 6>,
|
||||||
<&pinmux 141 67 4>,
|
<&pinmux 141 67 4>,
|
||||||
<&pinmux 145 149 6>,
|
<&pinmux 145 149 6>;
|
||||||
<&pinmux 151 91 4>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i2c1: i2c@e0000 {
|
i2c1: i2c@e0000 {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster0_l2>;
|
next-level-cache = <&cluster0_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@1 {
|
cpu@1 {
|
||||||
@ -49,7 +49,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster0_l2>;
|
next-level-cache = <&cluster0_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@100 {
|
cpu@100 {
|
||||||
@ -65,7 +65,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster1_l2>;
|
next-level-cache = <&cluster1_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@101 {
|
cpu@101 {
|
||||||
@ -81,7 +81,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster1_l2>;
|
next-level-cache = <&cluster1_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@200 {
|
cpu@200 {
|
||||||
@ -97,7 +97,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster2_l2>;
|
next-level-cache = <&cluster2_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@201 {
|
cpu@201 {
|
||||||
@ -113,7 +113,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster2_l2>;
|
next-level-cache = <&cluster2_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@300 {
|
cpu@300 {
|
||||||
@ -129,7 +129,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster3_l2>;
|
next-level-cache = <&cluster3_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@301 {
|
cpu@301 {
|
||||||
@ -145,7 +145,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster3_l2>;
|
next-level-cache = <&cluster3_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@400 {
|
cpu@400 {
|
||||||
@ -161,7 +161,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster4_l2>;
|
next-level-cache = <&cluster4_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@401 {
|
cpu@401 {
|
||||||
@ -177,7 +177,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster4_l2>;
|
next-level-cache = <&cluster4_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@500 {
|
cpu@500 {
|
||||||
@ -193,7 +193,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster5_l2>;
|
next-level-cache = <&cluster5_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@501 {
|
cpu@501 {
|
||||||
@ -209,7 +209,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster5_l2>;
|
next-level-cache = <&cluster5_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@600 {
|
cpu@600 {
|
||||||
@ -225,7 +225,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster6_l2>;
|
next-level-cache = <&cluster6_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@601 {
|
cpu@601 {
|
||||||
@ -241,7 +241,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster6_l2>;
|
next-level-cache = <&cluster6_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@700 {
|
cpu@700 {
|
||||||
@ -257,7 +257,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster7_l2>;
|
next-level-cache = <&cluster7_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu@701 {
|
cpu@701 {
|
||||||
@ -273,7 +273,7 @@
|
|||||||
i-cache-line-size = <64>;
|
i-cache-line-size = <64>;
|
||||||
i-cache-sets = <192>;
|
i-cache-sets = <192>;
|
||||||
next-level-cache = <&cluster7_l2>;
|
next-level-cache = <&cluster7_l2>;
|
||||||
cpu-idle-states = <&cpu_pw20>;
|
cpu-idle-states = <&cpu_pw15>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cluster0_l2: l2-cache0 {
|
cluster0_l2: l2-cache0 {
|
||||||
@ -340,9 +340,9 @@
|
|||||||
cache-level = <2>;
|
cache-level = <2>;
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu_pw20: cpu-pw20 {
|
cpu_pw15: cpu-pw15 {
|
||||||
compatible = "arm,idle-state";
|
compatible = "arm,idle-state";
|
||||||
idle-state-name = "PW20";
|
idle-state-name = "PW15";
|
||||||
arm,psci-suspend-param = <0x0>;
|
arm,psci-suspend-param = <0x0>;
|
||||||
entry-latency-us = <2000>;
|
entry-latency-us = <2000>;
|
||||||
exit-latency-us = <2000>;
|
exit-latency-us = <2000>;
|
||||||
|
@ -694,7 +694,7 @@
|
|||||||
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
||||||
reg = <0x30b40000 0x10000>;
|
reg = <0x30b40000 0x10000>;
|
||||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MM_CLK_DUMMY>,
|
clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MM_CLK_USDHC1_ROOT>;
|
<&clk IMX8MM_CLK_USDHC1_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
@ -710,7 +710,7 @@
|
|||||||
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
||||||
reg = <0x30b50000 0x10000>;
|
reg = <0x30b50000 0x10000>;
|
||||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MM_CLK_DUMMY>,
|
clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MM_CLK_USDHC2_ROOT>;
|
<&clk IMX8MM_CLK_USDHC2_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
@ -724,7 +724,7 @@
|
|||||||
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
compatible = "fsl,imx8mm-usdhc", "fsl,imx7d-usdhc";
|
||||||
reg = <0x30b60000 0x10000>;
|
reg = <0x30b60000 0x10000>;
|
||||||
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MM_CLK_DUMMY>,
|
clocks = <&clk IMX8MM_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MM_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MM_CLK_USDHC3_ROOT>;
|
<&clk IMX8MM_CLK_USDHC3_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
|
@ -569,7 +569,7 @@
|
|||||||
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
|
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
|
||||||
reg = <0x30b40000 0x10000>;
|
reg = <0x30b40000 0x10000>;
|
||||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MN_CLK_DUMMY>,
|
clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MN_CLK_USDHC1_ROOT>;
|
<&clk IMX8MN_CLK_USDHC1_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
@ -585,7 +585,7 @@
|
|||||||
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
|
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
|
||||||
reg = <0x30b50000 0x10000>;
|
reg = <0x30b50000 0x10000>;
|
||||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MN_CLK_DUMMY>,
|
clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MN_CLK_USDHC2_ROOT>;
|
<&clk IMX8MN_CLK_USDHC2_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
@ -599,7 +599,7 @@
|
|||||||
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
|
compatible = "fsl,imx8mn-usdhc", "fsl,imx7d-usdhc";
|
||||||
reg = <0x30b60000 0x10000>;
|
reg = <0x30b60000 0x10000>;
|
||||||
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MN_CLK_DUMMY>,
|
clocks = <&clk IMX8MN_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MN_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MN_CLK_USDHC3_ROOT>;
|
<&clk IMX8MN_CLK_USDHC3_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
|
@ -89,8 +89,8 @@
|
|||||||
regulator-min-microvolt = <900000>;
|
regulator-min-microvolt = <900000>;
|
||||||
regulator-max-microvolt = <1000000>;
|
regulator-max-microvolt = <1000000>;
|
||||||
gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
|
gpios = <&gpio3 19 GPIO_ACTIVE_HIGH>;
|
||||||
states = <1000000 0x0
|
states = <1000000 0x1
|
||||||
900000 0x1>;
|
900000 0x0>;
|
||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -850,7 +850,7 @@
|
|||||||
"fsl,imx7d-usdhc";
|
"fsl,imx7d-usdhc";
|
||||||
reg = <0x30b40000 0x10000>;
|
reg = <0x30b40000 0x10000>;
|
||||||
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MQ_CLK_DUMMY>,
|
clocks = <&clk IMX8MQ_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MQ_CLK_USDHC1_ROOT>;
|
<&clk IMX8MQ_CLK_USDHC1_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
@ -867,7 +867,7 @@
|
|||||||
"fsl,imx7d-usdhc";
|
"fsl,imx7d-usdhc";
|
||||||
reg = <0x30b50000 0x10000>;
|
reg = <0x30b50000 0x10000>;
|
||||||
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
interrupts = <GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
clocks = <&clk IMX8MQ_CLK_DUMMY>,
|
clocks = <&clk IMX8MQ_CLK_IPG_ROOT>,
|
||||||
<&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
|
<&clk IMX8MQ_CLK_NAND_USDHC_BUS>,
|
||||||
<&clk IMX8MQ_CLK_USDHC2_ROOT>;
|
<&clk IMX8MQ_CLK_USDHC2_ROOT>;
|
||||||
clock-names = "ipg", "ahb", "per";
|
clock-names = "ipg", "ahb", "per";
|
||||||
|
@ -60,11 +60,6 @@
|
|||||||
gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>;
|
gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>;
|
||||||
};
|
};
|
||||||
|
|
||||||
usb3_phy: usb3-phy {
|
|
||||||
compatible = "usb-nop-xceiv";
|
|
||||||
vcc-supply = <&exp_usb3_vbus>;
|
|
||||||
};
|
|
||||||
|
|
||||||
vsdc_reg: vsdc-reg {
|
vsdc_reg: vsdc-reg {
|
||||||
compatible = "regulator-gpio";
|
compatible = "regulator-gpio";
|
||||||
regulator-name = "vsdc";
|
regulator-name = "vsdc";
|
||||||
@ -255,10 +250,16 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&comphy2 {
|
||||||
|
connector {
|
||||||
|
compatible = "usb-a-connector";
|
||||||
|
phy-supply = <&exp_usb3_vbus>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
&usb3 {
|
&usb3 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
phys = <&comphy2 0>;
|
phys = <&comphy2 0>;
|
||||||
usb-phy = <&usb3_phy>;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
&mdio {
|
&mdio {
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
power-supply = <&pp3300_disp>;
|
power-supply = <&pp3300_disp>;
|
||||||
|
|
||||||
panel-timing {
|
panel-timing {
|
||||||
clock-frequency = <266604720>;
|
clock-frequency = <266666667>;
|
||||||
hactive = <2400>;
|
hactive = <2400>;
|
||||||
hfront-porch = <48>;
|
hfront-porch = <48>;
|
||||||
hback-porch = <84>;
|
hback-porch = <84>;
|
||||||
|
@ -644,7 +644,7 @@
|
|||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
u2phy0_host: host-port {
|
u2phy0_host: host-port {
|
||||||
phy-supply = <&vcc5v0_host>;
|
phy-supply = <&vcc5v0_typec>;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -712,7 +712,7 @@
|
|||||||
|
|
||||||
&usbdrd_dwc3_0 {
|
&usbdrd_dwc3_0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
dr_mode = "otg";
|
dr_mode = "host";
|
||||||
};
|
};
|
||||||
|
|
||||||
&usbdrd3_1 {
|
&usbdrd3_1 {
|
||||||
|
@ -173,7 +173,7 @@
|
|||||||
regulator-always-on;
|
regulator-always-on;
|
||||||
regulator-boot-on;
|
regulator-boot-on;
|
||||||
regulator-min-microvolt = <800000>;
|
regulator-min-microvolt = <800000>;
|
||||||
regulator-max-microvolt = <1400000>;
|
regulator-max-microvolt = <1700000>;
|
||||||
vin-supply = <&vcc5v0_sys>;
|
vin-supply = <&vcc5v0_sys>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -247,8 +247,8 @@
|
|||||||
rk808: pmic@1b {
|
rk808: pmic@1b {
|
||||||
compatible = "rockchip,rk808";
|
compatible = "rockchip,rk808";
|
||||||
reg = <0x1b>;
|
reg = <0x1b>;
|
||||||
interrupt-parent = <&gpio1>;
|
interrupt-parent = <&gpio3>;
|
||||||
interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
|
interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
|
||||||
#clock-cells = <1>;
|
#clock-cells = <1>;
|
||||||
clock-output-names = "xin32k", "rk808-clkout2";
|
clock-output-names = "xin32k", "rk808-clkout2";
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
@ -574,7 +574,7 @@
|
|||||||
|
|
||||||
pmic {
|
pmic {
|
||||||
pmic_int_l: pmic-int-l {
|
pmic_int_l: pmic-int-l {
|
||||||
rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
|
rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
|
||||||
};
|
};
|
||||||
|
|
||||||
vsel1_gpio: vsel1-gpio {
|
vsel1_gpio: vsel1-gpio {
|
||||||
@ -624,7 +624,6 @@
|
|||||||
|
|
||||||
&sdmmc {
|
&sdmmc {
|
||||||
bus-width = <4>;
|
bus-width = <4>;
|
||||||
cap-mmc-highspeed;
|
|
||||||
cap-sd-highspeed;
|
cap-sd-highspeed;
|
||||||
cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
|
cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
|
||||||
disable-wp;
|
disable-wp;
|
||||||
@ -636,8 +635,7 @@
|
|||||||
|
|
||||||
&sdhci {
|
&sdhci {
|
||||||
bus-width = <8>;
|
bus-width = <8>;
|
||||||
mmc-hs400-1_8v;
|
mmc-hs200-1_8v;
|
||||||
mmc-hs400-enhanced-strobe;
|
|
||||||
non-removable;
|
non-removable;
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
@ -632,6 +632,8 @@ static void reset_pmcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *r)
|
|||||||
*/
|
*/
|
||||||
val = ((pmcr & ~ARMV8_PMU_PMCR_MASK)
|
val = ((pmcr & ~ARMV8_PMU_PMCR_MASK)
|
||||||
| (ARMV8_PMU_PMCR_MASK & 0xdecafbad)) & (~ARMV8_PMU_PMCR_E);
|
| (ARMV8_PMU_PMCR_MASK & 0xdecafbad)) & (~ARMV8_PMU_PMCR_E);
|
||||||
|
if (!system_supports_32bit_el0())
|
||||||
|
val |= ARMV8_PMU_PMCR_LC;
|
||||||
__vcpu_sys_reg(vcpu, r->reg) = val;
|
__vcpu_sys_reg(vcpu, r->reg) = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -682,6 +684,8 @@ static bool access_pmcr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
|
|||||||
val = __vcpu_sys_reg(vcpu, PMCR_EL0);
|
val = __vcpu_sys_reg(vcpu, PMCR_EL0);
|
||||||
val &= ~ARMV8_PMU_PMCR_MASK;
|
val &= ~ARMV8_PMU_PMCR_MASK;
|
||||||
val |= p->regval & ARMV8_PMU_PMCR_MASK;
|
val |= p->regval & ARMV8_PMU_PMCR_MASK;
|
||||||
|
if (!system_supports_32bit_el0())
|
||||||
|
val |= ARMV8_PMU_PMCR_LC;
|
||||||
__vcpu_sys_reg(vcpu, PMCR_EL0) = val;
|
__vcpu_sys_reg(vcpu, PMCR_EL0) = val;
|
||||||
kvm_pmu_handle_pmcr(vcpu, val);
|
kvm_pmu_handle_pmcr(vcpu, val);
|
||||||
kvm_vcpu_pmu_restore_guest(vcpu);
|
kvm_vcpu_pmu_restore_guest(vcpu);
|
||||||
|
@ -84,7 +84,7 @@ void __init prom_init(void)
|
|||||||
* Here we will start up CPU1 in the background and ask it to
|
* Here we will start up CPU1 in the background and ask it to
|
||||||
* reconfigure itself then go back to sleep.
|
* reconfigure itself then go back to sleep.
|
||||||
*/
|
*/
|
||||||
memcpy((void *)0xa0000200, &bmips_smp_movevec, 0x20);
|
memcpy((void *)0xa0000200, bmips_smp_movevec, 0x20);
|
||||||
__sync();
|
__sync();
|
||||||
set_c0_cause(C_SW0);
|
set_c0_cause(C_SW0);
|
||||||
cpumask_set_cpu(1, &bmips_booted_mask);
|
cpumask_set_cpu(1, &bmips_booted_mask);
|
||||||
|
@ -75,11 +75,11 @@ static inline int register_bmips_smp_ops(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern char bmips_reset_nmi_vec;
|
extern char bmips_reset_nmi_vec[];
|
||||||
extern char bmips_reset_nmi_vec_end;
|
extern char bmips_reset_nmi_vec_end[];
|
||||||
extern char bmips_smp_movevec;
|
extern char bmips_smp_movevec[];
|
||||||
extern char bmips_smp_int_vec;
|
extern char bmips_smp_int_vec[];
|
||||||
extern char bmips_smp_int_vec_end;
|
extern char bmips_smp_int_vec_end[];
|
||||||
|
|
||||||
extern int bmips_smp_enabled;
|
extern int bmips_smp_enabled;
|
||||||
extern int bmips_cpu_offset;
|
extern int bmips_cpu_offset;
|
||||||
|
@ -24,6 +24,8 @@
|
|||||||
|
|
||||||
#define VDSO_HAS_CLOCK_GETRES 1
|
#define VDSO_HAS_CLOCK_GETRES 1
|
||||||
|
|
||||||
|
#define __VDSO_USE_SYSCALL ULLONG_MAX
|
||||||
|
|
||||||
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
|
#ifdef CONFIG_MIPS_CLOCK_VSYSCALL
|
||||||
|
|
||||||
static __always_inline long gettimeofday_fallback(
|
static __always_inline long gettimeofday_fallback(
|
||||||
@ -205,7 +207,7 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)
|
|||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
cycle_now = 0;
|
cycle_now = __VDSO_USE_SYSCALL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,10 +464,10 @@ static void bmips_wr_vec(unsigned long dst, char *start, char *end)
|
|||||||
|
|
||||||
static inline void bmips_nmi_handler_setup(void)
|
static inline void bmips_nmi_handler_setup(void)
|
||||||
{
|
{
|
||||||
bmips_wr_vec(BMIPS_NMI_RESET_VEC, &bmips_reset_nmi_vec,
|
bmips_wr_vec(BMIPS_NMI_RESET_VEC, bmips_reset_nmi_vec,
|
||||||
&bmips_reset_nmi_vec_end);
|
bmips_reset_nmi_vec_end);
|
||||||
bmips_wr_vec(BMIPS_WARM_RESTART_VEC, &bmips_smp_int_vec,
|
bmips_wr_vec(BMIPS_WARM_RESTART_VEC, bmips_smp_int_vec,
|
||||||
&bmips_smp_int_vec_end);
|
bmips_smp_int_vec_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct reset_vec_info {
|
struct reset_vec_info {
|
||||||
|
@ -653,6 +653,13 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
|
|||||||
int restore_scratch)
|
int restore_scratch)
|
||||||
{
|
{
|
||||||
if (restore_scratch) {
|
if (restore_scratch) {
|
||||||
|
/*
|
||||||
|
* Ensure the MFC0 below observes the value written to the
|
||||||
|
* KScratch register by the prior MTC0.
|
||||||
|
*/
|
||||||
|
if (scratch_reg >= 0)
|
||||||
|
uasm_i_ehb(p);
|
||||||
|
|
||||||
/* Reset default page size */
|
/* Reset default page size */
|
||||||
if (PM_DEFAULT_MASK >> 16) {
|
if (PM_DEFAULT_MASK >> 16) {
|
||||||
uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16);
|
uasm_i_lui(p, tmp, PM_DEFAULT_MASK >> 16);
|
||||||
@ -667,12 +674,10 @@ static void build_restore_pagemask(u32 **p, struct uasm_reloc **r,
|
|||||||
uasm_i_mtc0(p, 0, C0_PAGEMASK);
|
uasm_i_mtc0(p, 0, C0_PAGEMASK);
|
||||||
uasm_il_b(p, r, lid);
|
uasm_il_b(p, r, lid);
|
||||||
}
|
}
|
||||||
if (scratch_reg >= 0) {
|
if (scratch_reg >= 0)
|
||||||
uasm_i_ehb(p);
|
|
||||||
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
|
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
|
||||||
} else {
|
else
|
||||||
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
|
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/* Reset default page size */
|
/* Reset default page size */
|
||||||
if (PM_DEFAULT_MASK >> 16) {
|
if (PM_DEFAULT_MASK >> 16) {
|
||||||
@ -921,6 +926,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
|
|||||||
}
|
}
|
||||||
if (mode != not_refill && check_for_high_segbits) {
|
if (mode != not_refill && check_for_high_segbits) {
|
||||||
uasm_l_large_segbits_fault(l, *p);
|
uasm_l_large_segbits_fault(l, *p);
|
||||||
|
|
||||||
|
if (mode == refill_scratch && scratch_reg >= 0)
|
||||||
|
uasm_i_ehb(p);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We get here if we are an xsseg address, or if we are
|
* We get here if we are an xsseg address, or if we are
|
||||||
* an xuseg address above (PGDIR_SHIFT+PGDIR_BITS) boundary.
|
* an xuseg address above (PGDIR_SHIFT+PGDIR_BITS) boundary.
|
||||||
@ -939,12 +948,10 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
|
|||||||
uasm_i_jr(p, ptr);
|
uasm_i_jr(p, ptr);
|
||||||
|
|
||||||
if (mode == refill_scratch) {
|
if (mode == refill_scratch) {
|
||||||
if (scratch_reg >= 0) {
|
if (scratch_reg >= 0)
|
||||||
uasm_i_ehb(p);
|
|
||||||
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
|
UASM_i_MFC0(p, 1, c0_kscratch(), scratch_reg);
|
||||||
} else {
|
else
|
||||||
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
|
UASM_i_LW(p, 1, scratchpad_offset(0), 0);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
uasm_i_nop(p);
|
uasm_i_nop(p);
|
||||||
}
|
}
|
||||||
|
@ -1217,6 +1217,7 @@ int kvmppc_xive_connect_vcpu(struct kvm_device *dev,
|
|||||||
struct kvmppc_xive *xive = dev->private;
|
struct kvmppc_xive *xive = dev->private;
|
||||||
struct kvmppc_xive_vcpu *xc;
|
struct kvmppc_xive_vcpu *xc;
|
||||||
int i, r = -EBUSY;
|
int i, r = -EBUSY;
|
||||||
|
u32 vp_id;
|
||||||
|
|
||||||
pr_devel("connect_vcpu(cpu=%d)\n", cpu);
|
pr_devel("connect_vcpu(cpu=%d)\n", cpu);
|
||||||
|
|
||||||
@ -1228,25 +1229,32 @@ int kvmppc_xive_connect_vcpu(struct kvm_device *dev,
|
|||||||
return -EPERM;
|
return -EPERM;
|
||||||
if (vcpu->arch.irq_type != KVMPPC_IRQ_DEFAULT)
|
if (vcpu->arch.irq_type != KVMPPC_IRQ_DEFAULT)
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
if (kvmppc_xive_find_server(vcpu->kvm, cpu)) {
|
|
||||||
pr_devel("Duplicate !\n");
|
|
||||||
return -EEXIST;
|
|
||||||
}
|
|
||||||
if (cpu >= (KVM_MAX_VCPUS * vcpu->kvm->arch.emul_smt_mode)) {
|
if (cpu >= (KVM_MAX_VCPUS * vcpu->kvm->arch.emul_smt_mode)) {
|
||||||
pr_devel("Out of bounds !\n");
|
pr_devel("Out of bounds !\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
xc = kzalloc(sizeof(*xc), GFP_KERNEL);
|
|
||||||
if (!xc)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
/* We need to synchronize with queue provisioning */
|
/* We need to synchronize with queue provisioning */
|
||||||
mutex_lock(&xive->lock);
|
mutex_lock(&xive->lock);
|
||||||
|
|
||||||
|
vp_id = kvmppc_xive_vp(xive, cpu);
|
||||||
|
if (kvmppc_xive_vp_in_use(xive->kvm, vp_id)) {
|
||||||
|
pr_devel("Duplicate !\n");
|
||||||
|
r = -EEXIST;
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
|
|
||||||
|
xc = kzalloc(sizeof(*xc), GFP_KERNEL);
|
||||||
|
if (!xc) {
|
||||||
|
r = -ENOMEM;
|
||||||
|
goto bail;
|
||||||
|
}
|
||||||
|
|
||||||
vcpu->arch.xive_vcpu = xc;
|
vcpu->arch.xive_vcpu = xc;
|
||||||
xc->xive = xive;
|
xc->xive = xive;
|
||||||
xc->vcpu = vcpu;
|
xc->vcpu = vcpu;
|
||||||
xc->server_num = cpu;
|
xc->server_num = cpu;
|
||||||
xc->vp_id = kvmppc_xive_vp(xive, cpu);
|
xc->vp_id = vp_id;
|
||||||
xc->mfrr = 0xff;
|
xc->mfrr = 0xff;
|
||||||
xc->valid = true;
|
xc->valid = true;
|
||||||
|
|
||||||
|
@ -220,6 +220,18 @@ static inline u32 kvmppc_xive_vp(struct kvmppc_xive *xive, u32 server)
|
|||||||
return xive->vp_base + kvmppc_pack_vcpu_id(xive->kvm, server);
|
return xive->vp_base + kvmppc_pack_vcpu_id(xive->kvm, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool kvmppc_xive_vp_in_use(struct kvm *kvm, u32 vp_id)
|
||||||
|
{
|
||||||
|
struct kvm_vcpu *vcpu = NULL;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
kvm_for_each_vcpu(i, vcpu, kvm) {
|
||||||
|
if (vcpu->arch.xive_vcpu && vp_id == vcpu->arch.xive_vcpu->vp_id)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mapping between guest priorities and host priorities
|
* Mapping between guest priorities and host priorities
|
||||||
* is as follow.
|
* is as follow.
|
||||||
|
@ -106,6 +106,7 @@ int kvmppc_xive_native_connect_vcpu(struct kvm_device *dev,
|
|||||||
struct kvmppc_xive *xive = dev->private;
|
struct kvmppc_xive *xive = dev->private;
|
||||||
struct kvmppc_xive_vcpu *xc = NULL;
|
struct kvmppc_xive_vcpu *xc = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
|
u32 vp_id;
|
||||||
|
|
||||||
pr_devel("native_connect_vcpu(server=%d)\n", server_num);
|
pr_devel("native_connect_vcpu(server=%d)\n", server_num);
|
||||||
|
|
||||||
@ -124,7 +125,8 @@ int kvmppc_xive_native_connect_vcpu(struct kvm_device *dev,
|
|||||||
|
|
||||||
mutex_lock(&xive->lock);
|
mutex_lock(&xive->lock);
|
||||||
|
|
||||||
if (kvmppc_xive_find_server(vcpu->kvm, server_num)) {
|
vp_id = kvmppc_xive_vp(xive, server_num);
|
||||||
|
if (kvmppc_xive_vp_in_use(xive->kvm, vp_id)) {
|
||||||
pr_devel("Duplicate !\n");
|
pr_devel("Duplicate !\n");
|
||||||
rc = -EEXIST;
|
rc = -EEXIST;
|
||||||
goto bail;
|
goto bail;
|
||||||
@ -141,7 +143,7 @@ int kvmppc_xive_native_connect_vcpu(struct kvm_device *dev,
|
|||||||
xc->vcpu = vcpu;
|
xc->vcpu = vcpu;
|
||||||
xc->server_num = server_num;
|
xc->server_num = server_num;
|
||||||
|
|
||||||
xc->vp_id = kvmppc_xive_vp(xive, server_num);
|
xc->vp_id = vp_id;
|
||||||
xc->valid = true;
|
xc->valid = true;
|
||||||
vcpu->arch.irq_type = KVMPPC_IRQ_XIVE;
|
vcpu->arch.irq_type = KVMPPC_IRQ_XIVE;
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
|
|
||||||
#include <asm/asm.h>
|
#include <asm/asm.h>
|
||||||
|
|
||||||
#ifdef CONFIG_GENERIC_BUG
|
|
||||||
#define __INSN_LENGTH_MASK _UL(0x3)
|
#define __INSN_LENGTH_MASK _UL(0x3)
|
||||||
#define __INSN_LENGTH_32 _UL(0x3)
|
#define __INSN_LENGTH_32 _UL(0x3)
|
||||||
#define __COMPRESSED_INSN_MASK _UL(0xffff)
|
#define __COMPRESSED_INSN_MASK _UL(0xffff)
|
||||||
@ -20,7 +19,6 @@
|
|||||||
#define __BUG_INSN_32 _UL(0x00100073) /* ebreak */
|
#define __BUG_INSN_32 _UL(0x00100073) /* ebreak */
|
||||||
#define __BUG_INSN_16 _UL(0x9002) /* c.ebreak */
|
#define __BUG_INSN_16 _UL(0x9002) /* c.ebreak */
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
typedef u32 bug_insn_t;
|
typedef u32 bug_insn_t;
|
||||||
|
|
||||||
#ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
|
#ifdef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
|
||||||
@ -43,6 +41,7 @@ typedef u32 bug_insn_t;
|
|||||||
RISCV_SHORT " %2"
|
RISCV_SHORT " %2"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_GENERIC_BUG
|
||||||
#define __BUG_FLAGS(flags) \
|
#define __BUG_FLAGS(flags) \
|
||||||
do { \
|
do { \
|
||||||
__asm__ __volatile__ ( \
|
__asm__ __volatile__ ( \
|
||||||
@ -58,14 +57,10 @@ do { \
|
|||||||
"i" (flags), \
|
"i" (flags), \
|
||||||
"i" (sizeof(struct bug_entry))); \
|
"i" (sizeof(struct bug_entry))); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY__ */
|
|
||||||
#else /* CONFIG_GENERIC_BUG */
|
#else /* CONFIG_GENERIC_BUG */
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
#define __BUG_FLAGS(flags) do { \
|
#define __BUG_FLAGS(flags) do { \
|
||||||
__asm__ __volatile__ ("ebreak\n"); \
|
__asm__ __volatile__ ("ebreak\n"); \
|
||||||
} while (0)
|
} while (0)
|
||||||
#endif /* !__ASSEMBLY__ */
|
|
||||||
#endif /* CONFIG_GENERIC_BUG */
|
#endif /* CONFIG_GENERIC_BUG */
|
||||||
|
|
||||||
#define BUG() do { \
|
#define BUG() do { \
|
||||||
@ -79,15 +74,10 @@ do { \
|
|||||||
|
|
||||||
#include <asm-generic/bug.h>
|
#include <asm-generic/bug.h>
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
|
||||||
|
|
||||||
struct pt_regs;
|
struct pt_regs;
|
||||||
struct task_struct;
|
struct task_struct;
|
||||||
|
|
||||||
extern void die(struct pt_regs *regs, const char *str);
|
void die(struct pt_regs *regs, const char *str);
|
||||||
extern void do_trap(struct pt_regs *regs, int signo, int code,
|
void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr);
|
||||||
unsigned long addr);
|
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY__ */
|
|
||||||
|
|
||||||
#endif /* _ASM_RISCV_BUG_H */
|
#endif /* _ASM_RISCV_BUG_H */
|
||||||
|
@ -184,10 +184,7 @@ static inline pte_t pfn_pte(unsigned long pfn, pgprot_t prot)
|
|||||||
return __pte((pfn << _PAGE_PFN_SHIFT) | pgprot_val(prot));
|
return __pte((pfn << _PAGE_PFN_SHIFT) | pgprot_val(prot));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline pte_t mk_pte(struct page *page, pgprot_t prot)
|
#define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot)
|
||||||
{
|
|
||||||
return pfn_pte(page_to_pfn(page), prot);
|
|
||||||
}
|
|
||||||
|
|
||||||
#define pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
#define pte_index(addr) (((addr) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
|
||||||
|
|
||||||
@ -428,9 +425,7 @@ static inline int ptep_clear_flush_young(struct vm_area_struct *vma,
|
|||||||
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
#define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
|
||||||
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
#define __swp_entry_to_pte(x) ((pte_t) { (x).val })
|
||||||
|
|
||||||
#ifdef CONFIG_FLATMEM
|
|
||||||
#define kern_addr_valid(addr) (1) /* FIXME */
|
#define kern_addr_valid(addr) (1) /* FIXME */
|
||||||
#endif
|
|
||||||
|
|
||||||
extern void *dtb_early_va;
|
extern void *dtb_early_va;
|
||||||
extern void setup_bootmem(void);
|
extern void setup_bootmem(void);
|
||||||
|
@ -111,7 +111,6 @@ DO_ERROR_INFO(do_trap_ecall_s,
|
|||||||
DO_ERROR_INFO(do_trap_ecall_m,
|
DO_ERROR_INFO(do_trap_ecall_m,
|
||||||
SIGILL, ILL_ILLTRP, "environment call from M-mode");
|
SIGILL, ILL_ILLTRP, "environment call from M-mode");
|
||||||
|
|
||||||
#ifdef CONFIG_GENERIC_BUG
|
|
||||||
static inline unsigned long get_break_insn_length(unsigned long pc)
|
static inline unsigned long get_break_insn_length(unsigned long pc)
|
||||||
{
|
{
|
||||||
bug_insn_t insn;
|
bug_insn_t insn;
|
||||||
@ -120,28 +119,15 @@ static inline unsigned long get_break_insn_length(unsigned long pc)
|
|||||||
return 0;
|
return 0;
|
||||||
return (((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32) ? 4UL : 2UL);
|
return (((insn & __INSN_LENGTH_MASK) == __INSN_LENGTH_32) ? 4UL : 2UL);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_GENERIC_BUG */
|
|
||||||
|
|
||||||
asmlinkage void do_trap_break(struct pt_regs *regs)
|
asmlinkage void do_trap_break(struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
if (user_mode(regs)) {
|
if (user_mode(regs))
|
||||||
force_sig_fault(SIGTRAP, TRAP_BRKPT,
|
force_sig_fault(SIGTRAP, TRAP_BRKPT, (void __user *)regs->sepc);
|
||||||
(void __user *)(regs->sepc));
|
else if (report_bug(regs->sepc, regs) == BUG_TRAP_TYPE_WARN)
|
||||||
return;
|
regs->sepc += get_break_insn_length(regs->sepc);
|
||||||
}
|
else
|
||||||
#ifdef CONFIG_GENERIC_BUG
|
die(regs, "Kernel BUG");
|
||||||
{
|
|
||||||
enum bug_trap_type type;
|
|
||||||
|
|
||||||
type = report_bug(regs->sepc, regs);
|
|
||||||
if (type == BUG_TRAP_TYPE_WARN) {
|
|
||||||
regs->sepc += get_break_insn_length(regs->sepc);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* CONFIG_GENERIC_BUG */
|
|
||||||
|
|
||||||
die(regs, "Kernel BUG");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_GENERIC_BUG
|
#ifdef CONFIG_GENERIC_BUG
|
||||||
|
@ -458,7 +458,7 @@ void __init paging_init(void)
|
|||||||
zone_sizes_init();
|
zone_sizes_init();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_SPARSEMEM
|
#ifdef CONFIG_SPARSEMEM_VMEMMAP
|
||||||
int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
|
int __meminit vmemmap_populate(unsigned long start, unsigned long end, int node,
|
||||||
struct vmem_altmap *altmap)
|
struct vmem_altmap *altmap)
|
||||||
{
|
{
|
||||||
|
@ -101,10 +101,18 @@ static void handle_relocs(unsigned long offset)
|
|||||||
dynsym = (Elf64_Sym *) vmlinux.dynsym_start;
|
dynsym = (Elf64_Sym *) vmlinux.dynsym_start;
|
||||||
for (rela = rela_start; rela < rela_end; rela++) {
|
for (rela = rela_start; rela < rela_end; rela++) {
|
||||||
loc = rela->r_offset + offset;
|
loc = rela->r_offset + offset;
|
||||||
val = rela->r_addend + offset;
|
val = rela->r_addend;
|
||||||
r_sym = ELF64_R_SYM(rela->r_info);
|
r_sym = ELF64_R_SYM(rela->r_info);
|
||||||
if (r_sym)
|
if (r_sym) {
|
||||||
val += dynsym[r_sym].st_value;
|
if (dynsym[r_sym].st_shndx != SHN_UNDEF)
|
||||||
|
val += dynsym[r_sym].st_value + offset;
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* 0 == undefined symbol table index (STN_UNDEF),
|
||||||
|
* used for R_390_RELATIVE, only add KASLR offset
|
||||||
|
*/
|
||||||
|
val += offset;
|
||||||
|
}
|
||||||
r_type = ELF64_R_TYPE(rela->r_info);
|
r_type = ELF64_R_TYPE(rela->r_info);
|
||||||
rc = arch_kexec_do_relocs(r_type, (void *) loc, val, 0);
|
rc = arch_kexec_do_relocs(r_type, (void *) loc, val, 0);
|
||||||
if (rc)
|
if (rc)
|
||||||
|
@ -27,6 +27,7 @@ int arch_kexec_do_relocs(int r_type, void *loc, unsigned long val,
|
|||||||
*(u32 *)loc = val;
|
*(u32 *)loc = val;
|
||||||
break;
|
break;
|
||||||
case R_390_64: /* Direct 64 bit. */
|
case R_390_64: /* Direct 64 bit. */
|
||||||
|
case R_390_GLOB_DAT:
|
||||||
*(u64 *)loc = val;
|
*(u64 *)loc = val;
|
||||||
break;
|
break;
|
||||||
case R_390_PC16: /* PC relative 16 bit. */
|
case R_390_PC16: /* PC relative 16 bit. */
|
||||||
|
@ -627,7 +627,7 @@ static struct topa *topa_alloc(int cpu, gfp_t gfp)
|
|||||||
* link as the 2nd entry in the table
|
* link as the 2nd entry in the table
|
||||||
*/
|
*/
|
||||||
if (!intel_pt_validate_hw_cap(PT_CAP_topa_multiple_entries)) {
|
if (!intel_pt_validate_hw_cap(PT_CAP_topa_multiple_entries)) {
|
||||||
TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p);
|
TOPA_ENTRY(&tp->topa, 1)->base = page_to_phys(p) >> TOPA_SHIFT;
|
||||||
TOPA_ENTRY(&tp->topa, 1)->end = 1;
|
TOPA_ENTRY(&tp->topa, 1)->end = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1189,7 +1189,7 @@ struct kvm_x86_ops {
|
|||||||
int (*set_nested_state)(struct kvm_vcpu *vcpu,
|
int (*set_nested_state)(struct kvm_vcpu *vcpu,
|
||||||
struct kvm_nested_state __user *user_kvm_nested_state,
|
struct kvm_nested_state __user *user_kvm_nested_state,
|
||||||
struct kvm_nested_state *kvm_state);
|
struct kvm_nested_state *kvm_state);
|
||||||
void (*get_vmcs12_pages)(struct kvm_vcpu *vcpu);
|
bool (*get_vmcs12_pages)(struct kvm_vcpu *vcpu);
|
||||||
|
|
||||||
int (*smi_allowed)(struct kvm_vcpu *vcpu);
|
int (*smi_allowed)(struct kvm_vcpu *vcpu);
|
||||||
int (*pre_enter_smm)(struct kvm_vcpu *vcpu, char *smstate);
|
int (*pre_enter_smm)(struct kvm_vcpu *vcpu, char *smstate);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
#include <asm/cpufeatures.h>
|
#include <asm/cpufeatures.h>
|
||||||
#include <asm/alternative.h>
|
#include <asm/alternative.h>
|
||||||
|
#include <linux/stringify.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The hypercall definitions differ in the low word of the %edx argument
|
* The hypercall definitions differ in the low word of the %edx argument
|
||||||
@ -20,8 +21,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* Old port-based version */
|
/* Old port-based version */
|
||||||
#define VMWARE_HYPERVISOR_PORT "0x5658"
|
#define VMWARE_HYPERVISOR_PORT 0x5658
|
||||||
#define VMWARE_HYPERVISOR_PORT_HB "0x5659"
|
#define VMWARE_HYPERVISOR_PORT_HB 0x5659
|
||||||
|
|
||||||
/* Current vmcall / vmmcall version */
|
/* Current vmcall / vmmcall version */
|
||||||
#define VMWARE_HYPERVISOR_HB BIT(0)
|
#define VMWARE_HYPERVISOR_HB BIT(0)
|
||||||
@ -29,7 +30,8 @@
|
|||||||
|
|
||||||
/* The low bandwidth call. The low word of edx is presumed clear. */
|
/* The low bandwidth call. The low word of edx is presumed clear. */
|
||||||
#define VMWARE_HYPERCALL \
|
#define VMWARE_HYPERCALL \
|
||||||
ALTERNATIVE_2("movw $" VMWARE_HYPERVISOR_PORT ", %%dx; inl (%%dx)", \
|
ALTERNATIVE_2("movw $" __stringify(VMWARE_HYPERVISOR_PORT) ", %%dx; " \
|
||||||
|
"inl (%%dx), %%eax", \
|
||||||
"vmcall", X86_FEATURE_VMCALL, \
|
"vmcall", X86_FEATURE_VMCALL, \
|
||||||
"vmmcall", X86_FEATURE_VMW_VMMCALL)
|
"vmmcall", X86_FEATURE_VMW_VMMCALL)
|
||||||
|
|
||||||
@ -38,7 +40,8 @@
|
|||||||
* HB and OUT bits set.
|
* HB and OUT bits set.
|
||||||
*/
|
*/
|
||||||
#define VMWARE_HYPERCALL_HB_OUT \
|
#define VMWARE_HYPERCALL_HB_OUT \
|
||||||
ALTERNATIVE_2("movw $" VMWARE_HYPERVISOR_PORT_HB ", %%dx; rep outsb", \
|
ALTERNATIVE_2("movw $" __stringify(VMWARE_HYPERVISOR_PORT_HB) ", %%dx; " \
|
||||||
|
"rep outsb", \
|
||||||
"vmcall", X86_FEATURE_VMCALL, \
|
"vmcall", X86_FEATURE_VMCALL, \
|
||||||
"vmmcall", X86_FEATURE_VMW_VMMCALL)
|
"vmmcall", X86_FEATURE_VMW_VMMCALL)
|
||||||
|
|
||||||
@ -47,7 +50,8 @@
|
|||||||
* HB bit set.
|
* HB bit set.
|
||||||
*/
|
*/
|
||||||
#define VMWARE_HYPERCALL_HB_IN \
|
#define VMWARE_HYPERCALL_HB_IN \
|
||||||
ALTERNATIVE_2("movw $" VMWARE_HYPERVISOR_PORT_HB ", %%dx; rep insb", \
|
ALTERNATIVE_2("movw $" __stringify(VMWARE_HYPERVISOR_PORT_HB) ", %%dx; " \
|
||||||
|
"rep insb", \
|
||||||
"vmcall", X86_FEATURE_VMCALL, \
|
"vmcall", X86_FEATURE_VMCALL, \
|
||||||
"vmmcall", X86_FEATURE_VMW_VMMCALL)
|
"vmmcall", X86_FEATURE_VMW_VMMCALL)
|
||||||
#endif
|
#endif
|
||||||
|
@ -363,7 +363,7 @@ static inline void do_cpuid_7_mask(struct kvm_cpuid_entry2 *entry, int index)
|
|||||||
|
|
||||||
/* cpuid 7.0.ecx*/
|
/* cpuid 7.0.ecx*/
|
||||||
const u32 kvm_cpuid_7_0_ecx_x86_features =
|
const u32 kvm_cpuid_7_0_ecx_x86_features =
|
||||||
F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ |
|
F(AVX512VBMI) | F(LA57) | F(PKU) | 0 /*OSPKE*/ | F(RDPID) |
|
||||||
F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) |
|
F(AVX512_VPOPCNTDQ) | F(UMIP) | F(AVX512_VBMI2) | F(GFNI) |
|
||||||
F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) |
|
F(VAES) | F(VPCLMULQDQ) | F(AVX512_VNNI) | F(AVX512_BITALG) |
|
||||||
F(CLDEMOTE) | F(MOVDIRI) | F(MOVDIR64B) | 0 /*WAITPKG*/;
|
F(CLDEMOTE) | F(MOVDIRI) | F(MOVDIR64B) | 0 /*WAITPKG*/;
|
||||||
|
@ -111,11 +111,6 @@ static inline int apic_enabled(struct kvm_lapic *apic)
|
|||||||
(LVT_MASK | APIC_MODE_MASK | APIC_INPUT_POLARITY | \
|
(LVT_MASK | APIC_MODE_MASK | APIC_INPUT_POLARITY | \
|
||||||
APIC_LVT_REMOTE_IRR | APIC_LVT_LEVEL_TRIGGER)
|
APIC_LVT_REMOTE_IRR | APIC_LVT_LEVEL_TRIGGER)
|
||||||
|
|
||||||
static inline u8 kvm_xapic_id(struct kvm_lapic *apic)
|
|
||||||
{
|
|
||||||
return kvm_lapic_get_reg(apic, APIC_ID) >> 24;
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline u32 kvm_x2apic_id(struct kvm_lapic *apic)
|
static inline u32 kvm_x2apic_id(struct kvm_lapic *apic)
|
||||||
{
|
{
|
||||||
return apic->vcpu->vcpu_id;
|
return apic->vcpu->vcpu_id;
|
||||||
|
@ -242,4 +242,9 @@ static inline enum lapic_mode kvm_apic_mode(u64 apic_base)
|
|||||||
return apic_base & (MSR_IA32_APICBASE_ENABLE | X2APIC_ENABLE);
|
return apic_base & (MSR_IA32_APICBASE_ENABLE | X2APIC_ENABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline u8 kvm_xapic_id(struct kvm_lapic *apic)
|
||||||
|
{
|
||||||
|
return kvm_lapic_get_reg(apic, APIC_ID) >> 24;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -4591,6 +4591,7 @@ static int avic_handle_ldr_update(struct kvm_vcpu *vcpu)
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct vcpu_svm *svm = to_svm(vcpu);
|
struct vcpu_svm *svm = to_svm(vcpu);
|
||||||
u32 ldr = kvm_lapic_get_reg(vcpu->arch.apic, APIC_LDR);
|
u32 ldr = kvm_lapic_get_reg(vcpu->arch.apic, APIC_LDR);
|
||||||
|
u32 id = kvm_xapic_id(vcpu->arch.apic);
|
||||||
|
|
||||||
if (ldr == svm->ldr_reg)
|
if (ldr == svm->ldr_reg)
|
||||||
return 0;
|
return 0;
|
||||||
@ -4598,7 +4599,7 @@ static int avic_handle_ldr_update(struct kvm_vcpu *vcpu)
|
|||||||
avic_invalidate_logical_id_entry(vcpu);
|
avic_invalidate_logical_id_entry(vcpu);
|
||||||
|
|
||||||
if (ldr)
|
if (ldr)
|
||||||
ret = avic_ldr_write(vcpu, vcpu->vcpu_id, ldr);
|
ret = avic_ldr_write(vcpu, id, ldr);
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
svm->ldr_reg = ldr;
|
svm->ldr_reg = ldr;
|
||||||
@ -4610,8 +4611,7 @@ static int avic_handle_apic_id_update(struct kvm_vcpu *vcpu)
|
|||||||
{
|
{
|
||||||
u64 *old, *new;
|
u64 *old, *new;
|
||||||
struct vcpu_svm *svm = to_svm(vcpu);
|
struct vcpu_svm *svm = to_svm(vcpu);
|
||||||
u32 apic_id_reg = kvm_lapic_get_reg(vcpu->arch.apic, APIC_ID);
|
u32 id = kvm_xapic_id(vcpu->arch.apic);
|
||||||
u32 id = (apic_id_reg >> 24) & 0xff;
|
|
||||||
|
|
||||||
if (vcpu->vcpu_id == id)
|
if (vcpu->vcpu_id == id)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2917,7 +2917,7 @@ static int nested_vmx_check_vmentry_hw(struct kvm_vcpu *vcpu)
|
|||||||
static inline bool nested_vmx_prepare_msr_bitmap(struct kvm_vcpu *vcpu,
|
static inline bool nested_vmx_prepare_msr_bitmap(struct kvm_vcpu *vcpu,
|
||||||
struct vmcs12 *vmcs12);
|
struct vmcs12 *vmcs12);
|
||||||
|
|
||||||
static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu)
|
static bool nested_get_vmcs12_pages(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
|
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
|
||||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||||
@ -2937,19 +2937,18 @@ static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu)
|
|||||||
vmx->nested.apic_access_page = NULL;
|
vmx->nested.apic_access_page = NULL;
|
||||||
}
|
}
|
||||||
page = kvm_vcpu_gpa_to_page(vcpu, vmcs12->apic_access_addr);
|
page = kvm_vcpu_gpa_to_page(vcpu, vmcs12->apic_access_addr);
|
||||||
/*
|
|
||||||
* If translation failed, no matter: This feature asks
|
|
||||||
* to exit when accessing the given address, and if it
|
|
||||||
* can never be accessed, this feature won't do
|
|
||||||
* anything anyway.
|
|
||||||
*/
|
|
||||||
if (!is_error_page(page)) {
|
if (!is_error_page(page)) {
|
||||||
vmx->nested.apic_access_page = page;
|
vmx->nested.apic_access_page = page;
|
||||||
hpa = page_to_phys(vmx->nested.apic_access_page);
|
hpa = page_to_phys(vmx->nested.apic_access_page);
|
||||||
vmcs_write64(APIC_ACCESS_ADDR, hpa);
|
vmcs_write64(APIC_ACCESS_ADDR, hpa);
|
||||||
} else {
|
} else {
|
||||||
secondary_exec_controls_clearbit(vmx,
|
pr_debug_ratelimited("%s: no backing 'struct page' for APIC-access address in vmcs12\n",
|
||||||
SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES);
|
__func__);
|
||||||
|
vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
|
||||||
|
vcpu->run->internal.suberror =
|
||||||
|
KVM_INTERNAL_ERROR_EMULATION;
|
||||||
|
vcpu->run->internal.ndata = 0;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2994,6 +2993,7 @@ static void nested_get_vmcs12_pages(struct kvm_vcpu *vcpu)
|
|||||||
exec_controls_setbit(vmx, CPU_BASED_USE_MSR_BITMAPS);
|
exec_controls_setbit(vmx, CPU_BASED_USE_MSR_BITMAPS);
|
||||||
else
|
else
|
||||||
exec_controls_clearbit(vmx, CPU_BASED_USE_MSR_BITMAPS);
|
exec_controls_clearbit(vmx, CPU_BASED_USE_MSR_BITMAPS);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3032,13 +3032,15 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
|
|||||||
/*
|
/*
|
||||||
* If from_vmentry is false, this is being called from state restore (either RSM
|
* If from_vmentry is false, this is being called from state restore (either RSM
|
||||||
* or KVM_SET_NESTED_STATE). Otherwise it's called from vmlaunch/vmresume.
|
* or KVM_SET_NESTED_STATE). Otherwise it's called from vmlaunch/vmresume.
|
||||||
+ *
|
*
|
||||||
+ * Returns:
|
* Returns:
|
||||||
+ * 0 - success, i.e. proceed with actual VMEnter
|
* NVMX_ENTRY_SUCCESS: Entered VMX non-root mode
|
||||||
+ * 1 - consistency check VMExit
|
* NVMX_ENTRY_VMFAIL: Consistency check VMFail
|
||||||
+ * -1 - consistency check VMFail
|
* NVMX_ENTRY_VMEXIT: Consistency check VMExit
|
||||||
|
* NVMX_ENTRY_KVM_INTERNAL_ERROR: KVM internal error
|
||||||
*/
|
*/
|
||||||
int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, bool from_vmentry)
|
enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
|
||||||
|
bool from_vmentry)
|
||||||
{
|
{
|
||||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||||
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
|
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
|
||||||
@ -3081,11 +3083,12 @@ int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, bool from_vmentry)
|
|||||||
prepare_vmcs02_early(vmx, vmcs12);
|
prepare_vmcs02_early(vmx, vmcs12);
|
||||||
|
|
||||||
if (from_vmentry) {
|
if (from_vmentry) {
|
||||||
nested_get_vmcs12_pages(vcpu);
|
if (unlikely(!nested_get_vmcs12_pages(vcpu)))
|
||||||
|
return NVMX_VMENTRY_KVM_INTERNAL_ERROR;
|
||||||
|
|
||||||
if (nested_vmx_check_vmentry_hw(vcpu)) {
|
if (nested_vmx_check_vmentry_hw(vcpu)) {
|
||||||
vmx_switch_vmcs(vcpu, &vmx->vmcs01);
|
vmx_switch_vmcs(vcpu, &vmx->vmcs01);
|
||||||
return -1;
|
return NVMX_VMENTRY_VMFAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nested_vmx_check_guest_state(vcpu, vmcs12, &exit_qual))
|
if (nested_vmx_check_guest_state(vcpu, vmcs12, &exit_qual))
|
||||||
@ -3149,7 +3152,7 @@ int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, bool from_vmentry)
|
|||||||
* returned as far as L1 is concerned. It will only return (and set
|
* returned as far as L1 is concerned. It will only return (and set
|
||||||
* the success flag) when L2 exits (see nested_vmx_vmexit()).
|
* the success flag) when L2 exits (see nested_vmx_vmexit()).
|
||||||
*/
|
*/
|
||||||
return 0;
|
return NVMX_VMENTRY_SUCCESS;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* A failed consistency check that leads to a VMExit during L1's
|
* A failed consistency check that leads to a VMExit during L1's
|
||||||
@ -3165,14 +3168,14 @@ vmentry_fail_vmexit:
|
|||||||
vmx_switch_vmcs(vcpu, &vmx->vmcs01);
|
vmx_switch_vmcs(vcpu, &vmx->vmcs01);
|
||||||
|
|
||||||
if (!from_vmentry)
|
if (!from_vmentry)
|
||||||
return 1;
|
return NVMX_VMENTRY_VMEXIT;
|
||||||
|
|
||||||
load_vmcs12_host_state(vcpu, vmcs12);
|
load_vmcs12_host_state(vcpu, vmcs12);
|
||||||
vmcs12->vm_exit_reason = exit_reason | VMX_EXIT_REASONS_FAILED_VMENTRY;
|
vmcs12->vm_exit_reason = exit_reason | VMX_EXIT_REASONS_FAILED_VMENTRY;
|
||||||
vmcs12->exit_qualification = exit_qual;
|
vmcs12->exit_qualification = exit_qual;
|
||||||
if (enable_shadow_vmcs || vmx->nested.hv_evmcs)
|
if (enable_shadow_vmcs || vmx->nested.hv_evmcs)
|
||||||
vmx->nested.need_vmcs12_to_shadow_sync = true;
|
vmx->nested.need_vmcs12_to_shadow_sync = true;
|
||||||
return 1;
|
return NVMX_VMENTRY_VMEXIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -3182,9 +3185,9 @@ vmentry_fail_vmexit:
|
|||||||
static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
|
static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
|
||||||
{
|
{
|
||||||
struct vmcs12 *vmcs12;
|
struct vmcs12 *vmcs12;
|
||||||
|
enum nvmx_vmentry_status status;
|
||||||
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
struct vcpu_vmx *vmx = to_vmx(vcpu);
|
||||||
u32 interrupt_shadow = vmx_get_interrupt_shadow(vcpu);
|
u32 interrupt_shadow = vmx_get_interrupt_shadow(vcpu);
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!nested_vmx_check_permission(vcpu))
|
if (!nested_vmx_check_permission(vcpu))
|
||||||
return 1;
|
return 1;
|
||||||
@ -3244,13 +3247,9 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
|
|||||||
* the nested entry.
|
* the nested entry.
|
||||||
*/
|
*/
|
||||||
vmx->nested.nested_run_pending = 1;
|
vmx->nested.nested_run_pending = 1;
|
||||||
ret = nested_vmx_enter_non_root_mode(vcpu, true);
|
status = nested_vmx_enter_non_root_mode(vcpu, true);
|
||||||
vmx->nested.nested_run_pending = !ret;
|
if (unlikely(status != NVMX_VMENTRY_SUCCESS))
|
||||||
if (ret > 0)
|
goto vmentry_failed;
|
||||||
return 1;
|
|
||||||
else if (ret)
|
|
||||||
return nested_vmx_failValid(vcpu,
|
|
||||||
VMXERR_ENTRY_INVALID_CONTROL_FIELD);
|
|
||||||
|
|
||||||
/* Hide L1D cache contents from the nested guest. */
|
/* Hide L1D cache contents from the nested guest. */
|
||||||
vmx->vcpu.arch.l1tf_flush_l1d = true;
|
vmx->vcpu.arch.l1tf_flush_l1d = true;
|
||||||
@ -3281,6 +3280,15 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
|
|||||||
return kvm_vcpu_halt(vcpu);
|
return kvm_vcpu_halt(vcpu);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
vmentry_failed:
|
||||||
|
vmx->nested.nested_run_pending = 0;
|
||||||
|
if (status == NVMX_VMENTRY_KVM_INTERNAL_ERROR)
|
||||||
|
return 0;
|
||||||
|
if (status == NVMX_VMENTRY_VMEXIT)
|
||||||
|
return 1;
|
||||||
|
WARN_ON_ONCE(status != NVMX_VMENTRY_VMFAIL);
|
||||||
|
return nested_vmx_failValid(vcpu, VMXERR_ENTRY_INVALID_CONTROL_FIELD);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -6,6 +6,16 @@
|
|||||||
#include "vmcs12.h"
|
#include "vmcs12.h"
|
||||||
#include "vmx.h"
|
#include "vmx.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Status returned by nested_vmx_enter_non_root_mode():
|
||||||
|
*/
|
||||||
|
enum nvmx_vmentry_status {
|
||||||
|
NVMX_VMENTRY_SUCCESS, /* Entered VMX non-root mode */
|
||||||
|
NVMX_VMENTRY_VMFAIL, /* Consistency check VMFail */
|
||||||
|
NVMX_VMENTRY_VMEXIT, /* Consistency check VMExit */
|
||||||
|
NVMX_VMENTRY_KVM_INTERNAL_ERROR,/* KVM internal error */
|
||||||
|
};
|
||||||
|
|
||||||
void vmx_leave_nested(struct kvm_vcpu *vcpu);
|
void vmx_leave_nested(struct kvm_vcpu *vcpu);
|
||||||
void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps,
|
void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps,
|
||||||
bool apicv);
|
bool apicv);
|
||||||
@ -13,7 +23,8 @@ void nested_vmx_hardware_unsetup(void);
|
|||||||
__init int nested_vmx_hardware_setup(int (*exit_handlers[])(struct kvm_vcpu *));
|
__init int nested_vmx_hardware_setup(int (*exit_handlers[])(struct kvm_vcpu *));
|
||||||
void nested_vmx_vcpu_setup(void);
|
void nested_vmx_vcpu_setup(void);
|
||||||
void nested_vmx_free_vcpu(struct kvm_vcpu *vcpu);
|
void nested_vmx_free_vcpu(struct kvm_vcpu *vcpu);
|
||||||
int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu, bool from_vmentry);
|
enum nvmx_vmentry_status nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
|
||||||
|
bool from_vmentry);
|
||||||
bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason);
|
bool nested_vmx_exit_reflected(struct kvm_vcpu *vcpu, u32 exit_reason);
|
||||||
void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
|
void nested_vmx_vmexit(struct kvm_vcpu *vcpu, u32 exit_reason,
|
||||||
u32 exit_intr_info, unsigned long exit_qualification);
|
u32 exit_intr_info, unsigned long exit_qualification);
|
||||||
|
@ -5543,14 +5543,6 @@ static int handle_encls(struct kvm_vcpu *vcpu)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_unexpected_vmexit(struct kvm_vcpu *vcpu)
|
|
||||||
{
|
|
||||||
kvm_skip_emulated_instruction(vcpu);
|
|
||||||
WARN_ONCE(1, "Unexpected VM-Exit Reason = 0x%x",
|
|
||||||
vmcs_read32(VM_EXIT_REASON));
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The exit handlers return 1 if the exit was handled fully and guest execution
|
* The exit handlers return 1 if the exit was handled fully and guest execution
|
||||||
* may resume. Otherwise they set the kvm_run parameter to indicate what needs
|
* may resume. Otherwise they set the kvm_run parameter to indicate what needs
|
||||||
@ -5602,15 +5594,11 @@ static int (*kvm_vmx_exit_handlers[])(struct kvm_vcpu *vcpu) = {
|
|||||||
[EXIT_REASON_INVVPID] = handle_vmx_instruction,
|
[EXIT_REASON_INVVPID] = handle_vmx_instruction,
|
||||||
[EXIT_REASON_RDRAND] = handle_invalid_op,
|
[EXIT_REASON_RDRAND] = handle_invalid_op,
|
||||||
[EXIT_REASON_RDSEED] = handle_invalid_op,
|
[EXIT_REASON_RDSEED] = handle_invalid_op,
|
||||||
[EXIT_REASON_XSAVES] = handle_unexpected_vmexit,
|
|
||||||
[EXIT_REASON_XRSTORS] = handle_unexpected_vmexit,
|
|
||||||
[EXIT_REASON_PML_FULL] = handle_pml_full,
|
[EXIT_REASON_PML_FULL] = handle_pml_full,
|
||||||
[EXIT_REASON_INVPCID] = handle_invpcid,
|
[EXIT_REASON_INVPCID] = handle_invpcid,
|
||||||
[EXIT_REASON_VMFUNC] = handle_vmx_instruction,
|
[EXIT_REASON_VMFUNC] = handle_vmx_instruction,
|
||||||
[EXIT_REASON_PREEMPTION_TIMER] = handle_preemption_timer,
|
[EXIT_REASON_PREEMPTION_TIMER] = handle_preemption_timer,
|
||||||
[EXIT_REASON_ENCLS] = handle_encls,
|
[EXIT_REASON_ENCLS] = handle_encls,
|
||||||
[EXIT_REASON_UMWAIT] = handle_unexpected_vmexit,
|
|
||||||
[EXIT_REASON_TPAUSE] = handle_unexpected_vmexit,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int kvm_vmx_max_exit_handlers =
|
static const int kvm_vmx_max_exit_handlers =
|
||||||
|
@ -360,8 +360,7 @@ EXPORT_SYMBOL_GPL(kvm_set_apic_base);
|
|||||||
asmlinkage __visible void kvm_spurious_fault(void)
|
asmlinkage __visible void kvm_spurious_fault(void)
|
||||||
{
|
{
|
||||||
/* Fault while not rebooting. We want the trace. */
|
/* Fault while not rebooting. We want the trace. */
|
||||||
if (!kvm_rebooting)
|
BUG_ON(!kvm_rebooting);
|
||||||
BUG();
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(kvm_spurious_fault);
|
EXPORT_SYMBOL_GPL(kvm_spurious_fault);
|
||||||
|
|
||||||
@ -2537,6 +2536,7 @@ static int kvm_pv_enable_async_pf(struct kvm_vcpu *vcpu, u64 data)
|
|||||||
static void kvmclock_reset(struct kvm_vcpu *vcpu)
|
static void kvmclock_reset(struct kvm_vcpu *vcpu)
|
||||||
{
|
{
|
||||||
vcpu->arch.pv_time_enabled = false;
|
vcpu->arch.pv_time_enabled = false;
|
||||||
|
vcpu->arch.time = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void kvm_vcpu_flush_tlb(struct kvm_vcpu *vcpu, bool invalidate_gpa)
|
static void kvm_vcpu_flush_tlb(struct kvm_vcpu *vcpu, bool invalidate_gpa)
|
||||||
@ -2702,8 +2702,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
|||||||
case MSR_KVM_SYSTEM_TIME: {
|
case MSR_KVM_SYSTEM_TIME: {
|
||||||
struct kvm_arch *ka = &vcpu->kvm->arch;
|
struct kvm_arch *ka = &vcpu->kvm->arch;
|
||||||
|
|
||||||
kvmclock_reset(vcpu);
|
|
||||||
|
|
||||||
if (vcpu->vcpu_id == 0 && !msr_info->host_initiated) {
|
if (vcpu->vcpu_id == 0 && !msr_info->host_initiated) {
|
||||||
bool tmp = (msr == MSR_KVM_SYSTEM_TIME);
|
bool tmp = (msr == MSR_KVM_SYSTEM_TIME);
|
||||||
|
|
||||||
@ -2717,14 +2715,13 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
|||||||
kvm_make_request(KVM_REQ_GLOBAL_CLOCK_UPDATE, vcpu);
|
kvm_make_request(KVM_REQ_GLOBAL_CLOCK_UPDATE, vcpu);
|
||||||
|
|
||||||
/* we verify if the enable bit is set... */
|
/* we verify if the enable bit is set... */
|
||||||
|
vcpu->arch.pv_time_enabled = false;
|
||||||
if (!(data & 1))
|
if (!(data & 1))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (kvm_gfn_to_hva_cache_init(vcpu->kvm,
|
if (!kvm_gfn_to_hva_cache_init(vcpu->kvm,
|
||||||
&vcpu->arch.pv_time, data & ~1ULL,
|
&vcpu->arch.pv_time, data & ~1ULL,
|
||||||
sizeof(struct pvclock_vcpu_time_info)))
|
sizeof(struct pvclock_vcpu_time_info)))
|
||||||
vcpu->arch.pv_time_enabled = false;
|
|
||||||
else
|
|
||||||
vcpu->arch.pv_time_enabled = true;
|
vcpu->arch.pv_time_enabled = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -7941,8 +7938,12 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
|
|||||||
bool req_immediate_exit = false;
|
bool req_immediate_exit = false;
|
||||||
|
|
||||||
if (kvm_request_pending(vcpu)) {
|
if (kvm_request_pending(vcpu)) {
|
||||||
if (kvm_check_request(KVM_REQ_GET_VMCS12_PAGES, vcpu))
|
if (kvm_check_request(KVM_REQ_GET_VMCS12_PAGES, vcpu)) {
|
||||||
kvm_x86_ops->get_vmcs12_pages(vcpu);
|
if (unlikely(!kvm_x86_ops->get_vmcs12_pages(vcpu))) {
|
||||||
|
r = 0;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu))
|
if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu))
|
||||||
kvm_mmu_unload(vcpu);
|
kvm_mmu_unload(vcpu);
|
||||||
if (kvm_check_request(KVM_REQ_MIGRATE_TIMER, vcpu))
|
if (kvm_check_request(KVM_REQ_MIGRATE_TIMER, vcpu))
|
||||||
|
@ -117,6 +117,14 @@ static void __init xen_banner(void)
|
|||||||
printk(KERN_INFO "Xen version: %d.%d%s%s\n",
|
printk(KERN_INFO "Xen version: %d.%d%s%s\n",
|
||||||
version >> 16, version & 0xffff, extra.extraversion,
|
version >> 16, version & 0xffff, extra.extraversion,
|
||||||
xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
|
xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_32
|
||||||
|
pr_warn("WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!\n"
|
||||||
|
"Support for running as 32-bit PV-guest under Xen will soon be removed\n"
|
||||||
|
"from the Linux kernel!\n"
|
||||||
|
"Please use either a 64-bit kernel or switch to HVM or PVH mode!\n"
|
||||||
|
"WARNING! WARNING! WARNING! WARNING! WARNING! WARNING! WARNING!\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init xen_pv_init_platform(void)
|
static void __init xen_pv_init_platform(void)
|
||||||
|
@ -1322,7 +1322,7 @@ static ssize_t scrub_show(struct device *dev,
|
|||||||
nfit_device_lock(dev);
|
nfit_device_lock(dev);
|
||||||
nd_desc = dev_get_drvdata(dev);
|
nd_desc = dev_get_drvdata(dev);
|
||||||
if (!nd_desc) {
|
if (!nd_desc) {
|
||||||
device_unlock(dev);
|
nfit_device_unlock(dev);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
acpi_desc = to_acpi_desc(nd_desc);
|
acpi_desc = to_acpi_desc(nd_desc);
|
||||||
|
@ -290,14 +290,13 @@ static int acpi_processor_notifier(struct notifier_block *nb,
|
|||||||
unsigned long event, void *data)
|
unsigned long event, void *data)
|
||||||
{
|
{
|
||||||
struct cpufreq_policy *policy = data;
|
struct cpufreq_policy *policy = data;
|
||||||
int cpu = policy->cpu;
|
|
||||||
|
|
||||||
if (event == CPUFREQ_CREATE_POLICY) {
|
if (event == CPUFREQ_CREATE_POLICY) {
|
||||||
acpi_thermal_cpufreq_init(cpu);
|
acpi_thermal_cpufreq_init(policy);
|
||||||
acpi_processor_ppc_init(cpu);
|
acpi_processor_ppc_init(policy);
|
||||||
} else if (event == CPUFREQ_REMOVE_POLICY) {
|
} else if (event == CPUFREQ_REMOVE_POLICY) {
|
||||||
acpi_processor_ppc_exit(cpu);
|
acpi_processor_ppc_exit(policy);
|
||||||
acpi_thermal_cpufreq_exit(cpu);
|
acpi_thermal_cpufreq_exit(policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -81,10 +81,10 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr)
|
|||||||
pr->performance_platform_limit = (int)ppc;
|
pr->performance_platform_limit = (int)ppc;
|
||||||
|
|
||||||
if (ppc >= pr->performance->state_count ||
|
if (ppc >= pr->performance->state_count ||
|
||||||
unlikely(!dev_pm_qos_request_active(&pr->perflib_req)))
|
unlikely(!freq_qos_request_active(&pr->perflib_req)))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
ret = dev_pm_qos_update_request(&pr->perflib_req,
|
ret = freq_qos_update_request(&pr->perflib_req,
|
||||||
pr->performance->states[ppc].core_frequency * 1000);
|
pr->performance->states[ppc].core_frequency * 1000);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
pr_warn("Failed to update perflib freq constraint: CPU%d (%d)\n",
|
pr_warn("Failed to update perflib freq constraint: CPU%d (%d)\n",
|
||||||
@ -157,28 +157,28 @@ void acpi_processor_ignore_ppc_init(void)
|
|||||||
ignore_ppc = 0;
|
ignore_ppc = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void acpi_processor_ppc_init(int cpu)
|
void acpi_processor_ppc_init(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
|
int cpu = policy->cpu;
|
||||||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
struct acpi_processor *pr = per_cpu(processors, cpu);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!pr)
|
if (!pr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = dev_pm_qos_add_request(get_cpu_device(cpu),
|
ret = freq_qos_add_request(&policy->constraints, &pr->perflib_req,
|
||||||
&pr->perflib_req, DEV_PM_QOS_MAX_FREQUENCY,
|
FREQ_QOS_MAX, INT_MAX);
|
||||||
INT_MAX);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
|
pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
|
||||||
ret);
|
ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
void acpi_processor_ppc_exit(int cpu)
|
void acpi_processor_ppc_exit(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
struct acpi_processor *pr = per_cpu(processors, policy->cpu);
|
||||||
|
|
||||||
if (pr)
|
if (pr)
|
||||||
dev_pm_qos_remove_request(&pr->perflib_req);
|
freq_qos_remove_request(&pr->perflib_req);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
static int acpi_processor_get_performance_control(struct acpi_processor *pr)
|
||||||
|
@ -105,7 +105,7 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state)
|
|||||||
|
|
||||||
pr = per_cpu(processors, i);
|
pr = per_cpu(processors, i);
|
||||||
|
|
||||||
if (unlikely(!dev_pm_qos_request_active(&pr->thermal_req)))
|
if (unlikely(!freq_qos_request_active(&pr->thermal_req)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
policy = cpufreq_cpu_get(i);
|
policy = cpufreq_cpu_get(i);
|
||||||
@ -116,7 +116,7 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state)
|
|||||||
|
|
||||||
cpufreq_cpu_put(policy);
|
cpufreq_cpu_put(policy);
|
||||||
|
|
||||||
ret = dev_pm_qos_update_request(&pr->thermal_req, max_freq);
|
ret = freq_qos_update_request(&pr->thermal_req, max_freq);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
pr_warn("Failed to update thermal freq constraint: CPU%d (%d)\n",
|
pr_warn("Failed to update thermal freq constraint: CPU%d (%d)\n",
|
||||||
pr->id, ret);
|
pr->id, ret);
|
||||||
@ -125,28 +125,28 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void acpi_thermal_cpufreq_init(int cpu)
|
void acpi_thermal_cpufreq_init(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
|
int cpu = policy->cpu;
|
||||||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
struct acpi_processor *pr = per_cpu(processors, cpu);
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!pr)
|
if (!pr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = dev_pm_qos_add_request(get_cpu_device(cpu),
|
ret = freq_qos_add_request(&policy->constraints, &pr->thermal_req,
|
||||||
&pr->thermal_req, DEV_PM_QOS_MAX_FREQUENCY,
|
FREQ_QOS_MAX, INT_MAX);
|
||||||
INT_MAX);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
|
pr_err("Failed to add freq constraint for CPU%d (%d)\n", cpu,
|
||||||
ret);
|
ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
void acpi_thermal_cpufreq_exit(int cpu)
|
void acpi_thermal_cpufreq_exit(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
struct acpi_processor *pr = per_cpu(processors, cpu);
|
struct acpi_processor *pr = per_cpu(processors, policy->cpu);
|
||||||
|
|
||||||
if (pr)
|
if (pr)
|
||||||
dev_pm_qos_remove_request(&pr->thermal_req);
|
freq_qos_remove_request(&pr->thermal_req);
|
||||||
}
|
}
|
||||||
#else /* ! CONFIG_CPU_FREQ */
|
#else /* ! CONFIG_CPU_FREQ */
|
||||||
static int cpufreq_get_max_state(unsigned int cpu)
|
static int cpufreq_get_max_state(unsigned int cpu)
|
||||||
|
@ -409,9 +409,11 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
|
|||||||
*/
|
*/
|
||||||
rstc = of_reset_control_array_get_optional_shared(dev->dev.of_node);
|
rstc = of_reset_control_array_get_optional_shared(dev->dev.of_node);
|
||||||
if (IS_ERR(rstc)) {
|
if (IS_ERR(rstc)) {
|
||||||
if (PTR_ERR(rstc) != -EPROBE_DEFER)
|
ret = PTR_ERR(rstc);
|
||||||
dev_err(&dev->dev, "Can't get amba reset!\n");
|
if (ret != -EPROBE_DEFER)
|
||||||
return PTR_ERR(rstc);
|
dev_err(&dev->dev, "can't get reset: %d\n",
|
||||||
|
ret);
|
||||||
|
goto err_reset;
|
||||||
}
|
}
|
||||||
reset_control_deassert(rstc);
|
reset_control_deassert(rstc);
|
||||||
reset_control_put(rstc);
|
reset_control_put(rstc);
|
||||||
@ -472,6 +474,12 @@ static int amba_device_try_add(struct amba_device *dev, struct resource *parent)
|
|||||||
release_resource(&dev->res);
|
release_resource(&dev->res);
|
||||||
err_out:
|
err_out:
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
err_reset:
|
||||||
|
amba_put_disable_pclk(dev);
|
||||||
|
iounmap(tmp);
|
||||||
|
dev_pm_domain_detach(&dev->dev, true);
|
||||||
|
goto err_release;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -97,10 +97,6 @@ DEFINE_SHOW_ATTRIBUTE(proc);
|
|||||||
#define SZ_1K 0x400
|
#define SZ_1K 0x400
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SZ_4M
|
|
||||||
#define SZ_4M 0x400000
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FORBIDDEN_MMAP_FLAGS (VM_WRITE)
|
#define FORBIDDEN_MMAP_FLAGS (VM_WRITE)
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -5177,9 +5173,6 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
|
|||||||
if (proc->tsk != current->group_leader)
|
if (proc->tsk != current->group_leader)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if ((vma->vm_end - vma->vm_start) > SZ_4M)
|
|
||||||
vma->vm_end = vma->vm_start + SZ_4M;
|
|
||||||
|
|
||||||
binder_debug(BINDER_DEBUG_OPEN_CLOSE,
|
binder_debug(BINDER_DEBUG_OPEN_CLOSE,
|
||||||
"%s: %d %lx-%lx (%ld K) vma %lx pagep %lx\n",
|
"%s: %d %lx-%lx (%ld K) vma %lx pagep %lx\n",
|
||||||
__func__, proc->pid, vma->vm_start, vma->vm_end,
|
__func__, proc->pid, vma->vm_start, vma->vm_end,
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
|
#include <linux/sizes.h>
|
||||||
#include "binder_alloc.h"
|
#include "binder_alloc.h"
|
||||||
#include "binder_trace.h"
|
#include "binder_trace.h"
|
||||||
|
|
||||||
@ -689,7 +690,9 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
|
|||||||
alloc->buffer = (void __user *)vma->vm_start;
|
alloc->buffer = (void __user *)vma->vm_start;
|
||||||
mutex_unlock(&binder_alloc_mmap_lock);
|
mutex_unlock(&binder_alloc_mmap_lock);
|
||||||
|
|
||||||
alloc->pages = kcalloc((vma->vm_end - vma->vm_start) / PAGE_SIZE,
|
alloc->buffer_size = min_t(unsigned long, vma->vm_end - vma->vm_start,
|
||||||
|
SZ_4M);
|
||||||
|
alloc->pages = kcalloc(alloc->buffer_size / PAGE_SIZE,
|
||||||
sizeof(alloc->pages[0]),
|
sizeof(alloc->pages[0]),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (alloc->pages == NULL) {
|
if (alloc->pages == NULL) {
|
||||||
@ -697,7 +700,6 @@ int binder_alloc_mmap_handler(struct binder_alloc *alloc,
|
|||||||
failure_string = "alloc page array";
|
failure_string = "alloc page array";
|
||||||
goto err_alloc_pages_failed;
|
goto err_alloc_pages_failed;
|
||||||
}
|
}
|
||||||
alloc->buffer_size = vma->vm_end - vma->vm_start;
|
|
||||||
|
|
||||||
buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
|
buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
|
||||||
if (!buffer) {
|
if (!buffer) {
|
||||||
|
@ -153,17 +153,13 @@ int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv)
|
|||||||
{
|
{
|
||||||
int rc, i;
|
int rc, i;
|
||||||
|
|
||||||
if (hpriv->ahci_regulator) {
|
rc = regulator_enable(hpriv->ahci_regulator);
|
||||||
rc = regulator_enable(hpriv->ahci_regulator);
|
if (rc)
|
||||||
if (rc)
|
return rc;
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (hpriv->phy_regulator) {
|
rc = regulator_enable(hpriv->phy_regulator);
|
||||||
rc = regulator_enable(hpriv->phy_regulator);
|
if (rc)
|
||||||
if (rc)
|
goto disable_ahci_pwrs;
|
||||||
goto disable_ahci_pwrs;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < hpriv->nports; i++) {
|
for (i = 0; i < hpriv->nports; i++) {
|
||||||
if (!hpriv->target_pwrs[i])
|
if (!hpriv->target_pwrs[i])
|
||||||
@ -181,11 +177,9 @@ disable_target_pwrs:
|
|||||||
if (hpriv->target_pwrs[i])
|
if (hpriv->target_pwrs[i])
|
||||||
regulator_disable(hpriv->target_pwrs[i]);
|
regulator_disable(hpriv->target_pwrs[i]);
|
||||||
|
|
||||||
if (hpriv->phy_regulator)
|
regulator_disable(hpriv->phy_regulator);
|
||||||
regulator_disable(hpriv->phy_regulator);
|
|
||||||
disable_ahci_pwrs:
|
disable_ahci_pwrs:
|
||||||
if (hpriv->ahci_regulator)
|
regulator_disable(hpriv->ahci_regulator);
|
||||||
regulator_disable(hpriv->ahci_regulator);
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ahci_platform_enable_regulators);
|
EXPORT_SYMBOL_GPL(ahci_platform_enable_regulators);
|
||||||
@ -207,10 +201,8 @@ void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv)
|
|||||||
regulator_disable(hpriv->target_pwrs[i]);
|
regulator_disable(hpriv->target_pwrs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hpriv->ahci_regulator)
|
regulator_disable(hpriv->ahci_regulator);
|
||||||
regulator_disable(hpriv->ahci_regulator);
|
regulator_disable(hpriv->phy_regulator);
|
||||||
if (hpriv->phy_regulator)
|
|
||||||
regulator_disable(hpriv->phy_regulator);
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ahci_platform_disable_regulators);
|
EXPORT_SYMBOL_GPL(ahci_platform_disable_regulators);
|
||||||
/**
|
/**
|
||||||
@ -359,7 +351,7 @@ static int ahci_platform_get_regulator(struct ahci_host_priv *hpriv, u32 port,
|
|||||||
struct regulator *target_pwr;
|
struct regulator *target_pwr;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
target_pwr = regulator_get_optional(dev, "target");
|
target_pwr = regulator_get(dev, "target");
|
||||||
|
|
||||||
if (!IS_ERR(target_pwr))
|
if (!IS_ERR(target_pwr))
|
||||||
hpriv->target_pwrs[port] = target_pwr;
|
hpriv->target_pwrs[port] = target_pwr;
|
||||||
@ -436,16 +428,14 @@ struct ahci_host_priv *ahci_platform_get_resources(struct platform_device *pdev,
|
|||||||
hpriv->clks[i] = clk;
|
hpriv->clks[i] = clk;
|
||||||
}
|
}
|
||||||
|
|
||||||
hpriv->ahci_regulator = devm_regulator_get_optional(dev, "ahci");
|
hpriv->ahci_regulator = devm_regulator_get(dev, "ahci");
|
||||||
if (IS_ERR(hpriv->ahci_regulator)) {
|
if (IS_ERR(hpriv->ahci_regulator)) {
|
||||||
rc = PTR_ERR(hpriv->ahci_regulator);
|
rc = PTR_ERR(hpriv->ahci_regulator);
|
||||||
if (rc == -EPROBE_DEFER)
|
if (rc != 0)
|
||||||
goto err_out;
|
goto err_out;
|
||||||
rc = 0;
|
|
||||||
hpriv->ahci_regulator = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hpriv->phy_regulator = devm_regulator_get_optional(dev, "phy");
|
hpriv->phy_regulator = devm_regulator_get(dev, "phy");
|
||||||
if (IS_ERR(hpriv->phy_regulator)) {
|
if (IS_ERR(hpriv->phy_regulator)) {
|
||||||
rc = PTR_ERR(hpriv->phy_regulator);
|
rc = PTR_ERR(hpriv->phy_regulator);
|
||||||
if (rc == -EPROBE_DEFER)
|
if (rc == -EPROBE_DEFER)
|
||||||
|
@ -115,20 +115,10 @@ s32 dev_pm_qos_read_value(struct device *dev, enum dev_pm_qos_req_type type)
|
|||||||
|
|
||||||
spin_lock_irqsave(&dev->power.lock, flags);
|
spin_lock_irqsave(&dev->power.lock, flags);
|
||||||
|
|
||||||
switch (type) {
|
if (type == DEV_PM_QOS_RESUME_LATENCY) {
|
||||||
case DEV_PM_QOS_RESUME_LATENCY:
|
|
||||||
ret = IS_ERR_OR_NULL(qos) ? PM_QOS_RESUME_LATENCY_NO_CONSTRAINT
|
ret = IS_ERR_OR_NULL(qos) ? PM_QOS_RESUME_LATENCY_NO_CONSTRAINT
|
||||||
: pm_qos_read_value(&qos->resume_latency);
|
: pm_qos_read_value(&qos->resume_latency);
|
||||||
break;
|
} else {
|
||||||
case DEV_PM_QOS_MIN_FREQUENCY:
|
|
||||||
ret = IS_ERR_OR_NULL(qos) ? PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE
|
|
||||||
: pm_qos_read_value(&qos->min_frequency);
|
|
||||||
break;
|
|
||||||
case DEV_PM_QOS_MAX_FREQUENCY:
|
|
||||||
ret = IS_ERR_OR_NULL(qos) ? PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE
|
|
||||||
: pm_qos_read_value(&qos->max_frequency);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
}
|
}
|
||||||
@ -169,14 +159,6 @@ static int apply_constraint(struct dev_pm_qos_request *req,
|
|||||||
req->dev->power.set_latency_tolerance(req->dev, value);
|
req->dev->power.set_latency_tolerance(req->dev, value);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DEV_PM_QOS_MIN_FREQUENCY:
|
|
||||||
ret = pm_qos_update_target(&qos->min_frequency,
|
|
||||||
&req->data.pnode, action, value);
|
|
||||||
break;
|
|
||||||
case DEV_PM_QOS_MAX_FREQUENCY:
|
|
||||||
ret = pm_qos_update_target(&qos->max_frequency,
|
|
||||||
&req->data.pnode, action, value);
|
|
||||||
break;
|
|
||||||
case DEV_PM_QOS_FLAGS:
|
case DEV_PM_QOS_FLAGS:
|
||||||
ret = pm_qos_update_flags(&qos->flags, &req->data.flr,
|
ret = pm_qos_update_flags(&qos->flags, &req->data.flr,
|
||||||
action, value);
|
action, value);
|
||||||
@ -227,24 +209,6 @@ static int dev_pm_qos_constraints_allocate(struct device *dev)
|
|||||||
c->no_constraint_value = PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT;
|
c->no_constraint_value = PM_QOS_LATENCY_TOLERANCE_NO_CONSTRAINT;
|
||||||
c->type = PM_QOS_MIN;
|
c->type = PM_QOS_MIN;
|
||||||
|
|
||||||
c = &qos->min_frequency;
|
|
||||||
plist_head_init(&c->list);
|
|
||||||
c->target_value = PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE;
|
|
||||||
c->default_value = PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE;
|
|
||||||
c->no_constraint_value = PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE;
|
|
||||||
c->type = PM_QOS_MAX;
|
|
||||||
c->notifiers = ++n;
|
|
||||||
BLOCKING_INIT_NOTIFIER_HEAD(n);
|
|
||||||
|
|
||||||
c = &qos->max_frequency;
|
|
||||||
plist_head_init(&c->list);
|
|
||||||
c->target_value = PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE;
|
|
||||||
c->default_value = PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE;
|
|
||||||
c->no_constraint_value = PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE;
|
|
||||||
c->type = PM_QOS_MIN;
|
|
||||||
c->notifiers = ++n;
|
|
||||||
BLOCKING_INIT_NOTIFIER_HEAD(n);
|
|
||||||
|
|
||||||
INIT_LIST_HEAD(&qos->flags.list);
|
INIT_LIST_HEAD(&qos->flags.list);
|
||||||
|
|
||||||
spin_lock_irq(&dev->power.lock);
|
spin_lock_irq(&dev->power.lock);
|
||||||
@ -305,18 +269,6 @@ void dev_pm_qos_constraints_destroy(struct device *dev)
|
|||||||
memset(req, 0, sizeof(*req));
|
memset(req, 0, sizeof(*req));
|
||||||
}
|
}
|
||||||
|
|
||||||
c = &qos->min_frequency;
|
|
||||||
plist_for_each_entry_safe(req, tmp, &c->list, data.pnode) {
|
|
||||||
apply_constraint(req, PM_QOS_REMOVE_REQ, PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE);
|
|
||||||
memset(req, 0, sizeof(*req));
|
|
||||||
}
|
|
||||||
|
|
||||||
c = &qos->max_frequency;
|
|
||||||
plist_for_each_entry_safe(req, tmp, &c->list, data.pnode) {
|
|
||||||
apply_constraint(req, PM_QOS_REMOVE_REQ, PM_QOS_MAX_FREQUENCY_DEFAULT_VALUE);
|
|
||||||
memset(req, 0, sizeof(*req));
|
|
||||||
}
|
|
||||||
|
|
||||||
f = &qos->flags;
|
f = &qos->flags;
|
||||||
list_for_each_entry_safe(req, tmp, &f->list, data.flr.node) {
|
list_for_each_entry_safe(req, tmp, &f->list, data.flr.node) {
|
||||||
apply_constraint(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
|
apply_constraint(req, PM_QOS_REMOVE_REQ, PM_QOS_DEFAULT_VALUE);
|
||||||
@ -428,8 +380,6 @@ static int __dev_pm_qos_update_request(struct dev_pm_qos_request *req,
|
|||||||
switch(req->type) {
|
switch(req->type) {
|
||||||
case DEV_PM_QOS_RESUME_LATENCY:
|
case DEV_PM_QOS_RESUME_LATENCY:
|
||||||
case DEV_PM_QOS_LATENCY_TOLERANCE:
|
case DEV_PM_QOS_LATENCY_TOLERANCE:
|
||||||
case DEV_PM_QOS_MIN_FREQUENCY:
|
|
||||||
case DEV_PM_QOS_MAX_FREQUENCY:
|
|
||||||
curr_value = req->data.pnode.prio;
|
curr_value = req->data.pnode.prio;
|
||||||
break;
|
break;
|
||||||
case DEV_PM_QOS_FLAGS:
|
case DEV_PM_QOS_FLAGS:
|
||||||
@ -557,14 +507,6 @@ int dev_pm_qos_add_notifier(struct device *dev, struct notifier_block *notifier,
|
|||||||
ret = blocking_notifier_chain_register(dev->power.qos->resume_latency.notifiers,
|
ret = blocking_notifier_chain_register(dev->power.qos->resume_latency.notifiers,
|
||||||
notifier);
|
notifier);
|
||||||
break;
|
break;
|
||||||
case DEV_PM_QOS_MIN_FREQUENCY:
|
|
||||||
ret = blocking_notifier_chain_register(dev->power.qos->min_frequency.notifiers,
|
|
||||||
notifier);
|
|
||||||
break;
|
|
||||||
case DEV_PM_QOS_MAX_FREQUENCY:
|
|
||||||
ret = blocking_notifier_chain_register(dev->power.qos->max_frequency.notifiers,
|
|
||||||
notifier);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
@ -604,14 +546,6 @@ int dev_pm_qos_remove_notifier(struct device *dev,
|
|||||||
ret = blocking_notifier_chain_unregister(dev->power.qos->resume_latency.notifiers,
|
ret = blocking_notifier_chain_unregister(dev->power.qos->resume_latency.notifiers,
|
||||||
notifier);
|
notifier);
|
||||||
break;
|
break;
|
||||||
case DEV_PM_QOS_MIN_FREQUENCY:
|
|
||||||
ret = blocking_notifier_chain_unregister(dev->power.qos->min_frequency.notifiers,
|
|
||||||
notifier);
|
|
||||||
break;
|
|
||||||
case DEV_PM_QOS_MAX_FREQUENCY:
|
|
||||||
ret = blocking_notifier_chain_unregister(dev->power.qos->max_frequency.notifiers,
|
|
||||||
notifier);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
WARN_ON(1);
|
WARN_ON(1);
|
||||||
ret = -EINVAL;
|
ret = -EINVAL;
|
||||||
|
@ -385,17 +385,16 @@ static enum blk_eh_timer_return nbd_xmit_timeout(struct request *req,
|
|||||||
struct nbd_device *nbd = cmd->nbd;
|
struct nbd_device *nbd = cmd->nbd;
|
||||||
struct nbd_config *config;
|
struct nbd_config *config;
|
||||||
|
|
||||||
|
if (!mutex_trylock(&cmd->lock))
|
||||||
|
return BLK_EH_RESET_TIMER;
|
||||||
|
|
||||||
if (!refcount_inc_not_zero(&nbd->config_refs)) {
|
if (!refcount_inc_not_zero(&nbd->config_refs)) {
|
||||||
cmd->status = BLK_STS_TIMEOUT;
|
cmd->status = BLK_STS_TIMEOUT;
|
||||||
|
mutex_unlock(&cmd->lock);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
config = nbd->config;
|
config = nbd->config;
|
||||||
|
|
||||||
if (!mutex_trylock(&cmd->lock)) {
|
|
||||||
nbd_config_put(nbd);
|
|
||||||
return BLK_EH_RESET_TIMER;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config->num_connections > 1) {
|
if (config->num_connections > 1) {
|
||||||
dev_err_ratelimited(nbd_to_dev(nbd),
|
dev_err_ratelimited(nbd_to_dev(nbd),
|
||||||
"Connection timed out, retrying (%d/%d alive)\n",
|
"Connection timed out, retrying (%d/%d alive)\n",
|
||||||
@ -711,6 +710,12 @@ static struct nbd_cmd *nbd_read_stat(struct nbd_device *nbd, int index)
|
|||||||
ret = -ENOENT;
|
ret = -ENOENT;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
if (cmd->status != BLK_STS_OK) {
|
||||||
|
dev_err(disk_to_dev(nbd->disk), "Command already handled %p\n",
|
||||||
|
req);
|
||||||
|
ret = -ENOENT;
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
if (test_bit(NBD_CMD_REQUEUED, &cmd->flags)) {
|
if (test_bit(NBD_CMD_REQUEUED, &cmd->flags)) {
|
||||||
dev_err(disk_to_dev(nbd->disk), "Raced with timeout on req %p\n",
|
dev_err(disk_to_dev(nbd->disk), "Raced with timeout on req %p\n",
|
||||||
req);
|
req);
|
||||||
@ -792,7 +797,10 @@ static bool nbd_clear_req(struct request *req, void *data, bool reserved)
|
|||||||
{
|
{
|
||||||
struct nbd_cmd *cmd = blk_mq_rq_to_pdu(req);
|
struct nbd_cmd *cmd = blk_mq_rq_to_pdu(req);
|
||||||
|
|
||||||
|
mutex_lock(&cmd->lock);
|
||||||
cmd->status = BLK_STS_IOERR;
|
cmd->status = BLK_STS_IOERR;
|
||||||
|
mutex_unlock(&cmd->lock);
|
||||||
|
|
||||||
blk_mq_complete_request(req);
|
blk_mq_complete_request(req);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -972,6 +980,25 @@ static blk_status_t nbd_queue_rq(struct blk_mq_hw_ctx *hctx,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct socket *nbd_get_socket(struct nbd_device *nbd, unsigned long fd,
|
||||||
|
int *err)
|
||||||
|
{
|
||||||
|
struct socket *sock;
|
||||||
|
|
||||||
|
*err = 0;
|
||||||
|
sock = sockfd_lookup(fd, err);
|
||||||
|
if (!sock)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if (sock->ops->shutdown == sock_no_shutdown) {
|
||||||
|
dev_err(disk_to_dev(nbd->disk), "Unsupported socket: shutdown callout must be supported.\n");
|
||||||
|
*err = -EINVAL;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sock;
|
||||||
|
}
|
||||||
|
|
||||||
static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
||||||
bool netlink)
|
bool netlink)
|
||||||
{
|
{
|
||||||
@ -981,7 +1008,7 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,
|
|||||||
struct nbd_sock *nsock;
|
struct nbd_sock *nsock;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
sock = sockfd_lookup(arg, &err);
|
sock = nbd_get_socket(nbd, arg, &err);
|
||||||
if (!sock)
|
if (!sock)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
@ -1033,7 +1060,7 @@ static int nbd_reconnect_socket(struct nbd_device *nbd, unsigned long arg)
|
|||||||
int i;
|
int i;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
sock = sockfd_lookup(arg, &err);
|
sock = nbd_get_socket(nbd, arg, &err);
|
||||||
if (!sock)
|
if (!sock)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
@ -74,6 +74,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = {
|
|||||||
* @clk_disable_quirk: module specific clock disable quirk
|
* @clk_disable_quirk: module specific clock disable quirk
|
||||||
* @reset_done_quirk: module specific reset done quirk
|
* @reset_done_quirk: module specific reset done quirk
|
||||||
* @module_enable_quirk: module specific enable quirk
|
* @module_enable_quirk: module specific enable quirk
|
||||||
|
* @module_disable_quirk: module specific disable quirk
|
||||||
*/
|
*/
|
||||||
struct sysc {
|
struct sysc {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
@ -100,6 +101,7 @@ struct sysc {
|
|||||||
void (*clk_disable_quirk)(struct sysc *sysc);
|
void (*clk_disable_quirk)(struct sysc *sysc);
|
||||||
void (*reset_done_quirk)(struct sysc *sysc);
|
void (*reset_done_quirk)(struct sysc *sysc);
|
||||||
void (*module_enable_quirk)(struct sysc *sysc);
|
void (*module_enable_quirk)(struct sysc *sysc);
|
||||||
|
void (*module_disable_quirk)(struct sysc *sysc);
|
||||||
};
|
};
|
||||||
|
|
||||||
static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
|
static void sysc_parse_dts_quirks(struct sysc *ddata, struct device_node *np,
|
||||||
@ -959,6 +961,9 @@ static int sysc_disable_module(struct device *dev)
|
|||||||
if (ddata->offsets[SYSC_SYSCONFIG] == -ENODEV)
|
if (ddata->offsets[SYSC_SYSCONFIG] == -ENODEV)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (ddata->module_disable_quirk)
|
||||||
|
ddata->module_disable_quirk(ddata);
|
||||||
|
|
||||||
regbits = ddata->cap->regbits;
|
regbits = ddata->cap->regbits;
|
||||||
reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
|
reg = sysc_read(ddata, ddata->offsets[SYSC_SYSCONFIG]);
|
||||||
|
|
||||||
@ -1248,6 +1253,9 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = {
|
|||||||
SYSC_MODULE_QUIRK_SGX),
|
SYSC_MODULE_QUIRK_SGX),
|
||||||
SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
|
SYSC_QUIRK("wdt", 0, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
|
||||||
SYSC_MODULE_QUIRK_WDT),
|
SYSC_MODULE_QUIRK_WDT),
|
||||||
|
/* Watchdog on am3 and am4 */
|
||||||
|
SYSC_QUIRK("wdt", 0x44e35000, 0, 0x10, 0x14, 0x502a0500, 0xfffff0f0,
|
||||||
|
SYSC_MODULE_QUIRK_WDT | SYSC_QUIRK_SWSUP_SIDLE),
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
SYSC_QUIRK("adc", 0, 0, 0x10, -1, 0x47300001, 0xffffffff, 0),
|
SYSC_QUIRK("adc", 0, 0, 0x10, -1, 0x47300001, 0xffffffff, 0),
|
||||||
@ -1440,14 +1448,14 @@ static void sysc_reset_done_quirk_wdt(struct sysc *ddata)
|
|||||||
!(val & 0x10), 100,
|
!(val & 0x10), 100,
|
||||||
MAX_MODULE_SOFTRESET_WAIT);
|
MAX_MODULE_SOFTRESET_WAIT);
|
||||||
if (error)
|
if (error)
|
||||||
dev_warn(ddata->dev, "wdt disable spr failed\n");
|
dev_warn(ddata->dev, "wdt disable step1 failed\n");
|
||||||
|
|
||||||
sysc_write(ddata, wps, 0x5555);
|
sysc_write(ddata, spr, 0x5555);
|
||||||
error = readl_poll_timeout(ddata->module_va + wps, val,
|
error = readl_poll_timeout(ddata->module_va + wps, val,
|
||||||
!(val & 0x10), 100,
|
!(val & 0x10), 100,
|
||||||
MAX_MODULE_SOFTRESET_WAIT);
|
MAX_MODULE_SOFTRESET_WAIT);
|
||||||
if (error)
|
if (error)
|
||||||
dev_warn(ddata->dev, "wdt disable wps failed\n");
|
dev_warn(ddata->dev, "wdt disable step2 failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void sysc_init_module_quirks(struct sysc *ddata)
|
static void sysc_init_module_quirks(struct sysc *ddata)
|
||||||
@ -1471,8 +1479,10 @@ static void sysc_init_module_quirks(struct sysc *ddata)
|
|||||||
if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_SGX)
|
if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_SGX)
|
||||||
ddata->module_enable_quirk = sysc_module_enable_quirk_sgx;
|
ddata->module_enable_quirk = sysc_module_enable_quirk_sgx;
|
||||||
|
|
||||||
if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_WDT)
|
if (ddata->cfg.quirks & SYSC_MODULE_QUIRK_WDT) {
|
||||||
ddata->reset_done_quirk = sysc_reset_done_quirk_wdt;
|
ddata->reset_done_quirk = sysc_reset_done_quirk_wdt;
|
||||||
|
ddata->module_disable_quirk = sysc_reset_done_quirk_wdt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int sysc_clockdomain_init(struct sysc *ddata)
|
static int sysc_clockdomain_init(struct sysc *ddata)
|
||||||
|
@ -720,7 +720,7 @@ static ssize_t store_##file_name \
|
|||||||
if (ret != 1) \
|
if (ret != 1) \
|
||||||
return -EINVAL; \
|
return -EINVAL; \
|
||||||
\
|
\
|
||||||
ret = dev_pm_qos_update_request(policy->object##_freq_req, val);\
|
ret = freq_qos_update_request(policy->object##_freq_req, val);\
|
||||||
return ret >= 0 ? count : ret; \
|
return ret >= 0 ? count : ret; \
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1202,19 +1202,21 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
|||||||
goto err_free_real_cpus;
|
goto err_free_real_cpus;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
freq_constraints_init(&policy->constraints);
|
||||||
|
|
||||||
policy->nb_min.notifier_call = cpufreq_notifier_min;
|
policy->nb_min.notifier_call = cpufreq_notifier_min;
|
||||||
policy->nb_max.notifier_call = cpufreq_notifier_max;
|
policy->nb_max.notifier_call = cpufreq_notifier_max;
|
||||||
|
|
||||||
ret = dev_pm_qos_add_notifier(dev, &policy->nb_min,
|
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MIN,
|
||||||
DEV_PM_QOS_MIN_FREQUENCY);
|
&policy->nb_min);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
|
dev_err(dev, "Failed to register MIN QoS notifier: %d (%*pbl)\n",
|
||||||
ret, cpumask_pr_args(policy->cpus));
|
ret, cpumask_pr_args(policy->cpus));
|
||||||
goto err_kobj_remove;
|
goto err_kobj_remove;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = dev_pm_qos_add_notifier(dev, &policy->nb_max,
|
ret = freq_qos_add_notifier(&policy->constraints, FREQ_QOS_MAX,
|
||||||
DEV_PM_QOS_MAX_FREQUENCY);
|
&policy->nb_max);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
|
dev_err(dev, "Failed to register MAX QoS notifier: %d (%*pbl)\n",
|
||||||
ret, cpumask_pr_args(policy->cpus));
|
ret, cpumask_pr_args(policy->cpus));
|
||||||
@ -1232,8 +1234,8 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
|||||||
return policy;
|
return policy;
|
||||||
|
|
||||||
err_min_qos_notifier:
|
err_min_qos_notifier:
|
||||||
dev_pm_qos_remove_notifier(dev, &policy->nb_min,
|
freq_qos_remove_notifier(&policy->constraints, FREQ_QOS_MIN,
|
||||||
DEV_PM_QOS_MIN_FREQUENCY);
|
&policy->nb_min);
|
||||||
err_kobj_remove:
|
err_kobj_remove:
|
||||||
cpufreq_policy_put_kobj(policy);
|
cpufreq_policy_put_kobj(policy);
|
||||||
err_free_real_cpus:
|
err_free_real_cpus:
|
||||||
@ -1250,7 +1252,6 @@ err_free_policy:
|
|||||||
|
|
||||||
static void cpufreq_policy_free(struct cpufreq_policy *policy)
|
static void cpufreq_policy_free(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
struct device *dev = get_cpu_device(policy->cpu);
|
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int cpu;
|
int cpu;
|
||||||
|
|
||||||
@ -1262,10 +1263,13 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
|
|||||||
per_cpu(cpufreq_cpu_data, cpu) = NULL;
|
per_cpu(cpufreq_cpu_data, cpu) = NULL;
|
||||||
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||||
|
|
||||||
dev_pm_qos_remove_notifier(dev, &policy->nb_max,
|
freq_qos_remove_notifier(&policy->constraints, FREQ_QOS_MAX,
|
||||||
DEV_PM_QOS_MAX_FREQUENCY);
|
&policy->nb_max);
|
||||||
dev_pm_qos_remove_notifier(dev, &policy->nb_min,
|
freq_qos_remove_notifier(&policy->constraints, FREQ_QOS_MIN,
|
||||||
DEV_PM_QOS_MIN_FREQUENCY);
|
&policy->nb_min);
|
||||||
|
|
||||||
|
/* Cancel any pending policy->update work before freeing the policy. */
|
||||||
|
cancel_work_sync(&policy->update);
|
||||||
|
|
||||||
if (policy->max_freq_req) {
|
if (policy->max_freq_req) {
|
||||||
/*
|
/*
|
||||||
@ -1274,10 +1278,10 @@ static void cpufreq_policy_free(struct cpufreq_policy *policy)
|
|||||||
*/
|
*/
|
||||||
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
|
blocking_notifier_call_chain(&cpufreq_policy_notifier_list,
|
||||||
CPUFREQ_REMOVE_POLICY, policy);
|
CPUFREQ_REMOVE_POLICY, policy);
|
||||||
dev_pm_qos_remove_request(policy->max_freq_req);
|
freq_qos_remove_request(policy->max_freq_req);
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_pm_qos_remove_request(policy->min_freq_req);
|
freq_qos_remove_request(policy->min_freq_req);
|
||||||
kfree(policy->min_freq_req);
|
kfree(policy->min_freq_req);
|
||||||
|
|
||||||
cpufreq_policy_put_kobj(policy);
|
cpufreq_policy_put_kobj(policy);
|
||||||
@ -1357,8 +1361,6 @@ static int cpufreq_online(unsigned int cpu)
|
|||||||
cpumask_and(policy->cpus, policy->cpus, cpu_online_mask);
|
cpumask_and(policy->cpus, policy->cpus, cpu_online_mask);
|
||||||
|
|
||||||
if (new_policy) {
|
if (new_policy) {
|
||||||
struct device *dev = get_cpu_device(cpu);
|
|
||||||
|
|
||||||
for_each_cpu(j, policy->related_cpus) {
|
for_each_cpu(j, policy->related_cpus) {
|
||||||
per_cpu(cpufreq_cpu_data, j) = policy;
|
per_cpu(cpufreq_cpu_data, j) = policy;
|
||||||
add_cpu_dev_symlink(policy, j);
|
add_cpu_dev_symlink(policy, j);
|
||||||
@ -1369,36 +1371,31 @@ static int cpufreq_online(unsigned int cpu)
|
|||||||
if (!policy->min_freq_req)
|
if (!policy->min_freq_req)
|
||||||
goto out_destroy_policy;
|
goto out_destroy_policy;
|
||||||
|
|
||||||
ret = dev_pm_qos_add_request(dev, policy->min_freq_req,
|
ret = freq_qos_add_request(&policy->constraints,
|
||||||
DEV_PM_QOS_MIN_FREQUENCY,
|
policy->min_freq_req, FREQ_QOS_MIN,
|
||||||
policy->min);
|
policy->min);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
/*
|
/*
|
||||||
* So we don't call dev_pm_qos_remove_request() for an
|
* So we don't call freq_qos_remove_request() for an
|
||||||
* uninitialized request.
|
* uninitialized request.
|
||||||
*/
|
*/
|
||||||
kfree(policy->min_freq_req);
|
kfree(policy->min_freq_req);
|
||||||
policy->min_freq_req = NULL;
|
policy->min_freq_req = NULL;
|
||||||
|
|
||||||
dev_err(dev, "Failed to add min-freq constraint (%d)\n",
|
|
||||||
ret);
|
|
||||||
goto out_destroy_policy;
|
goto out_destroy_policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This must be initialized right here to avoid calling
|
* This must be initialized right here to avoid calling
|
||||||
* dev_pm_qos_remove_request() on uninitialized request in case
|
* freq_qos_remove_request() on uninitialized request in case
|
||||||
* of errors.
|
* of errors.
|
||||||
*/
|
*/
|
||||||
policy->max_freq_req = policy->min_freq_req + 1;
|
policy->max_freq_req = policy->min_freq_req + 1;
|
||||||
|
|
||||||
ret = dev_pm_qos_add_request(dev, policy->max_freq_req,
|
ret = freq_qos_add_request(&policy->constraints,
|
||||||
DEV_PM_QOS_MAX_FREQUENCY,
|
policy->max_freq_req, FREQ_QOS_MAX,
|
||||||
policy->max);
|
policy->max);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
policy->max_freq_req = NULL;
|
policy->max_freq_req = NULL;
|
||||||
dev_err(dev, "Failed to add max-freq constraint (%d)\n",
|
|
||||||
ret);
|
|
||||||
goto out_destroy_policy;
|
goto out_destroy_policy;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2374,7 +2371,6 @@ int cpufreq_set_policy(struct cpufreq_policy *policy,
|
|||||||
struct cpufreq_policy *new_policy)
|
struct cpufreq_policy *new_policy)
|
||||||
{
|
{
|
||||||
struct cpufreq_governor *old_gov;
|
struct cpufreq_governor *old_gov;
|
||||||
struct device *cpu_dev = get_cpu_device(policy->cpu);
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
pr_debug("setting new policy for CPU %u: %u - %u kHz\n",
|
pr_debug("setting new policy for CPU %u: %u - %u kHz\n",
|
||||||
@ -2386,8 +2382,8 @@ int cpufreq_set_policy(struct cpufreq_policy *policy,
|
|||||||
* PM QoS framework collects all the requests from users and provide us
|
* PM QoS framework collects all the requests from users and provide us
|
||||||
* the final aggregated value here.
|
* the final aggregated value here.
|
||||||
*/
|
*/
|
||||||
new_policy->min = dev_pm_qos_read_value(cpu_dev, DEV_PM_QOS_MIN_FREQUENCY);
|
new_policy->min = freq_qos_read_value(&policy->constraints, FREQ_QOS_MIN);
|
||||||
new_policy->max = dev_pm_qos_read_value(cpu_dev, DEV_PM_QOS_MAX_FREQUENCY);
|
new_policy->max = freq_qos_read_value(&policy->constraints, FREQ_QOS_MAX);
|
||||||
|
|
||||||
/* verify the cpu speed can be set within this limit */
|
/* verify the cpu speed can be set within this limit */
|
||||||
ret = cpufreq_driver->verify(new_policy);
|
ret = cpufreq_driver->verify(new_policy);
|
||||||
@ -2518,7 +2514,7 @@ static int cpufreq_boost_set_sw(int state)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = dev_pm_qos_update_request(policy->max_freq_req, policy->max);
|
ret = freq_qos_update_request(policy->max_freq_req, policy->max);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1088,10 +1088,10 @@ static ssize_t store_no_turbo(struct kobject *a, struct kobj_attribute *b,
|
|||||||
|
|
||||||
static struct cpufreq_driver intel_pstate;
|
static struct cpufreq_driver intel_pstate;
|
||||||
|
|
||||||
static void update_qos_request(enum dev_pm_qos_req_type type)
|
static void update_qos_request(enum freq_qos_req_type type)
|
||||||
{
|
{
|
||||||
int max_state, turbo_max, freq, i, perf_pct;
|
int max_state, turbo_max, freq, i, perf_pct;
|
||||||
struct dev_pm_qos_request *req;
|
struct freq_qos_request *req;
|
||||||
struct cpufreq_policy *policy;
|
struct cpufreq_policy *policy;
|
||||||
|
|
||||||
for_each_possible_cpu(i) {
|
for_each_possible_cpu(i) {
|
||||||
@ -1112,7 +1112,7 @@ static void update_qos_request(enum dev_pm_qos_req_type type)
|
|||||||
else
|
else
|
||||||
turbo_max = cpu->pstate.turbo_pstate;
|
turbo_max = cpu->pstate.turbo_pstate;
|
||||||
|
|
||||||
if (type == DEV_PM_QOS_MIN_FREQUENCY) {
|
if (type == FREQ_QOS_MIN) {
|
||||||
perf_pct = global.min_perf_pct;
|
perf_pct = global.min_perf_pct;
|
||||||
} else {
|
} else {
|
||||||
req++;
|
req++;
|
||||||
@ -1122,7 +1122,7 @@ static void update_qos_request(enum dev_pm_qos_req_type type)
|
|||||||
freq = DIV_ROUND_UP(turbo_max * perf_pct, 100);
|
freq = DIV_ROUND_UP(turbo_max * perf_pct, 100);
|
||||||
freq *= cpu->pstate.scaling;
|
freq *= cpu->pstate.scaling;
|
||||||
|
|
||||||
if (dev_pm_qos_update_request(req, freq) < 0)
|
if (freq_qos_update_request(req, freq) < 0)
|
||||||
pr_warn("Failed to update freq constraint: CPU%d\n", i);
|
pr_warn("Failed to update freq constraint: CPU%d\n", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1153,7 +1153,7 @@ static ssize_t store_max_perf_pct(struct kobject *a, struct kobj_attribute *b,
|
|||||||
if (intel_pstate_driver == &intel_pstate)
|
if (intel_pstate_driver == &intel_pstate)
|
||||||
intel_pstate_update_policies();
|
intel_pstate_update_policies();
|
||||||
else
|
else
|
||||||
update_qos_request(DEV_PM_QOS_MAX_FREQUENCY);
|
update_qos_request(FREQ_QOS_MAX);
|
||||||
|
|
||||||
mutex_unlock(&intel_pstate_driver_lock);
|
mutex_unlock(&intel_pstate_driver_lock);
|
||||||
|
|
||||||
@ -1187,7 +1187,7 @@ static ssize_t store_min_perf_pct(struct kobject *a, struct kobj_attribute *b,
|
|||||||
if (intel_pstate_driver == &intel_pstate)
|
if (intel_pstate_driver == &intel_pstate)
|
||||||
intel_pstate_update_policies();
|
intel_pstate_update_policies();
|
||||||
else
|
else
|
||||||
update_qos_request(DEV_PM_QOS_MIN_FREQUENCY);
|
update_qos_request(FREQ_QOS_MIN);
|
||||||
|
|
||||||
mutex_unlock(&intel_pstate_driver_lock);
|
mutex_unlock(&intel_pstate_driver_lock);
|
||||||
|
|
||||||
@ -2381,7 +2381,7 @@ static unsigned int intel_cpufreq_fast_switch(struct cpufreq_policy *policy,
|
|||||||
static int intel_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
static int intel_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
int max_state, turbo_max, min_freq, max_freq, ret;
|
int max_state, turbo_max, min_freq, max_freq, ret;
|
||||||
struct dev_pm_qos_request *req;
|
struct freq_qos_request *req;
|
||||||
struct cpudata *cpu;
|
struct cpudata *cpu;
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
@ -2416,15 +2416,15 @@ static int intel_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||||||
max_freq = DIV_ROUND_UP(turbo_max * global.max_perf_pct, 100);
|
max_freq = DIV_ROUND_UP(turbo_max * global.max_perf_pct, 100);
|
||||||
max_freq *= cpu->pstate.scaling;
|
max_freq *= cpu->pstate.scaling;
|
||||||
|
|
||||||
ret = dev_pm_qos_add_request(dev, req, DEV_PM_QOS_MIN_FREQUENCY,
|
ret = freq_qos_add_request(&policy->constraints, req, FREQ_QOS_MIN,
|
||||||
min_freq);
|
min_freq);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "Failed to add min-freq constraint (%d)\n", ret);
|
dev_err(dev, "Failed to add min-freq constraint (%d)\n", ret);
|
||||||
goto free_req;
|
goto free_req;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = dev_pm_qos_add_request(dev, req + 1, DEV_PM_QOS_MAX_FREQUENCY,
|
ret = freq_qos_add_request(&policy->constraints, req + 1, FREQ_QOS_MAX,
|
||||||
max_freq);
|
max_freq);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "Failed to add max-freq constraint (%d)\n", ret);
|
dev_err(dev, "Failed to add max-freq constraint (%d)\n", ret);
|
||||||
goto remove_min_req;
|
goto remove_min_req;
|
||||||
@ -2435,7 +2435,7 @@ static int intel_cpufreq_cpu_init(struct cpufreq_policy *policy)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
remove_min_req:
|
remove_min_req:
|
||||||
dev_pm_qos_remove_request(req);
|
freq_qos_remove_request(req);
|
||||||
free_req:
|
free_req:
|
||||||
kfree(req);
|
kfree(req);
|
||||||
pstate_exit:
|
pstate_exit:
|
||||||
@ -2446,12 +2446,12 @@ pstate_exit:
|
|||||||
|
|
||||||
static int intel_cpufreq_cpu_exit(struct cpufreq_policy *policy)
|
static int intel_cpufreq_cpu_exit(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
struct dev_pm_qos_request *req;
|
struct freq_qos_request *req;
|
||||||
|
|
||||||
req = policy->driver_data;
|
req = policy->driver_data;
|
||||||
|
|
||||||
dev_pm_qos_remove_request(req + 1);
|
freq_qos_remove_request(req + 1);
|
||||||
dev_pm_qos_remove_request(req);
|
freq_qos_remove_request(req);
|
||||||
kfree(req);
|
kfree(req);
|
||||||
|
|
||||||
return intel_pstate_cpu_exit(policy);
|
return intel_pstate_cpu_exit(policy);
|
||||||
|
@ -65,7 +65,7 @@ EXPORT_SYMBOL_GPL(cbe_cpufreq_set_pmode_pmi);
|
|||||||
static void cbe_cpufreq_handle_pmi(pmi_message_t pmi_msg)
|
static void cbe_cpufreq_handle_pmi(pmi_message_t pmi_msg)
|
||||||
{
|
{
|
||||||
struct cpufreq_policy *policy;
|
struct cpufreq_policy *policy;
|
||||||
struct dev_pm_qos_request *req;
|
struct freq_qos_request *req;
|
||||||
u8 node, slow_mode;
|
u8 node, slow_mode;
|
||||||
int cpu, ret;
|
int cpu, ret;
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ static void cbe_cpufreq_handle_pmi(pmi_message_t pmi_msg)
|
|||||||
|
|
||||||
req = policy->driver_data;
|
req = policy->driver_data;
|
||||||
|
|
||||||
ret = dev_pm_qos_update_request(req,
|
ret = freq_qos_update_request(req,
|
||||||
policy->freq_table[slow_mode].frequency);
|
policy->freq_table[slow_mode].frequency);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
pr_warn("Failed to update freq constraint: %d\n", ret);
|
pr_warn("Failed to update freq constraint: %d\n", ret);
|
||||||
@ -103,7 +103,7 @@ static struct pmi_handler cbe_pmi_handler = {
|
|||||||
|
|
||||||
void cbe_cpufreq_pmi_policy_init(struct cpufreq_policy *policy)
|
void cbe_cpufreq_pmi_policy_init(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
struct dev_pm_qos_request *req;
|
struct freq_qos_request *req;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (!cbe_cpufreq_has_pmi)
|
if (!cbe_cpufreq_has_pmi)
|
||||||
@ -113,9 +113,8 @@ void cbe_cpufreq_pmi_policy_init(struct cpufreq_policy *policy)
|
|||||||
if (!req)
|
if (!req)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ret = dev_pm_qos_add_request(get_cpu_device(policy->cpu), req,
|
ret = freq_qos_add_request(&policy->constraints, req, FREQ_QOS_MAX,
|
||||||
DEV_PM_QOS_MAX_FREQUENCY,
|
policy->freq_table[0].frequency);
|
||||||
policy->freq_table[0].frequency);
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
pr_err("Failed to add freq constraint (%d)\n", ret);
|
pr_err("Failed to add freq constraint (%d)\n", ret);
|
||||||
kfree(req);
|
kfree(req);
|
||||||
@ -128,10 +127,10 @@ EXPORT_SYMBOL_GPL(cbe_cpufreq_pmi_policy_init);
|
|||||||
|
|
||||||
void cbe_cpufreq_pmi_policy_exit(struct cpufreq_policy *policy)
|
void cbe_cpufreq_pmi_policy_exit(struct cpufreq_policy *policy)
|
||||||
{
|
{
|
||||||
struct dev_pm_qos_request *req = policy->driver_data;
|
struct freq_qos_request *req = policy->driver_data;
|
||||||
|
|
||||||
if (cbe_cpufreq_has_pmi) {
|
if (cbe_cpufreq_has_pmi) {
|
||||||
dev_pm_qos_remove_request(req);
|
freq_qos_remove_request(req);
|
||||||
kfree(req);
|
kfree(req);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,6 +95,10 @@ static int __init haltpoll_init(void)
|
|||||||
int ret;
|
int ret;
|
||||||
struct cpuidle_driver *drv = &haltpoll_driver;
|
struct cpuidle_driver *drv = &haltpoll_driver;
|
||||||
|
|
||||||
|
/* Do not load haltpoll if idle= is passed */
|
||||||
|
if (boot_option_idle_override != IDLE_NO_OVERRIDE)
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
cpuidle_poll_state_init(drv);
|
cpuidle_poll_state_init(drv);
|
||||||
|
|
||||||
if (!kvm_para_available() ||
|
if (!kvm_para_available() ||
|
||||||
|
@ -553,7 +553,11 @@ void ghes_edac_unregister(struct ghes *ghes)
|
|||||||
if (!ghes_pvt)
|
if (!ghes_pvt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (atomic_dec_return(&ghes_init))
|
||||||
|
return;
|
||||||
|
|
||||||
mci = ghes_pvt->mci;
|
mci = ghes_pvt->mci;
|
||||||
|
ghes_pvt = NULL;
|
||||||
edac_mc_del_mc(mci->pdev);
|
edac_mc_del_mc(mci->pdev);
|
||||||
edac_mc_free(mci);
|
edac_mc_free(mci);
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,12 @@ int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp,
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error_free:
|
error_free:
|
||||||
while (i--) {
|
for (i = 0; i < last_entry; ++i) {
|
||||||
|
struct amdgpu_bo *bo = ttm_to_amdgpu_bo(array[i].tv.bo);
|
||||||
|
|
||||||
|
amdgpu_bo_unref(&bo);
|
||||||
|
}
|
||||||
|
for (i = first_userptr; i < num_entries; ++i) {
|
||||||
struct amdgpu_bo *bo = ttm_to_amdgpu_bo(array[i].tv.bo);
|
struct amdgpu_bo *bo = ttm_to_amdgpu_bo(array[i].tv.bo);
|
||||||
|
|
||||||
amdgpu_bo_unref(&bo);
|
amdgpu_bo_unref(&bo);
|
||||||
|
@ -536,7 +536,6 @@ static int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
|
|||||||
|
|
||||||
list_for_each_entry(lobj, validated, tv.head) {
|
list_for_each_entry(lobj, validated, tv.head) {
|
||||||
struct amdgpu_bo *bo = ttm_to_amdgpu_bo(lobj->tv.bo);
|
struct amdgpu_bo *bo = ttm_to_amdgpu_bo(lobj->tv.bo);
|
||||||
bool binding_userptr = false;
|
|
||||||
struct mm_struct *usermm;
|
struct mm_struct *usermm;
|
||||||
|
|
||||||
usermm = amdgpu_ttm_tt_get_usermm(bo->tbo.ttm);
|
usermm = amdgpu_ttm_tt_get_usermm(bo->tbo.ttm);
|
||||||
@ -553,7 +552,6 @@ static int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
|
|||||||
|
|
||||||
amdgpu_ttm_tt_set_user_pages(bo->tbo.ttm,
|
amdgpu_ttm_tt_set_user_pages(bo->tbo.ttm,
|
||||||
lobj->user_pages);
|
lobj->user_pages);
|
||||||
binding_userptr = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->evictable == lobj)
|
if (p->evictable == lobj)
|
||||||
@ -563,10 +561,8 @@ static int amdgpu_cs_list_validate(struct amdgpu_cs_parser *p,
|
|||||||
if (r)
|
if (r)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
if (binding_userptr) {
|
kvfree(lobj->user_pages);
|
||||||
kvfree(lobj->user_pages);
|
lobj->user_pages = NULL;
|
||||||
lobj->user_pages = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -453,7 +453,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev,
|
|||||||
.interruptible = (bp->type != ttm_bo_type_kernel),
|
.interruptible = (bp->type != ttm_bo_type_kernel),
|
||||||
.no_wait_gpu = false,
|
.no_wait_gpu = false,
|
||||||
.resv = bp->resv,
|
.resv = bp->resv,
|
||||||
.flags = TTM_OPT_FLAG_ALLOW_RES_EVICT
|
.flags = bp->type != ttm_bo_type_kernel ?
|
||||||
|
TTM_OPT_FLAG_ALLOW_RES_EVICT : 0
|
||||||
};
|
};
|
||||||
struct amdgpu_bo *bo;
|
struct amdgpu_bo *bo;
|
||||||
unsigned long page_align, size = bp->size;
|
unsigned long page_align, size = bp->size;
|
||||||
|
@ -429,13 +429,14 @@ void amdgpu_vce_free_handles(struct amdgpu_device *adev, struct drm_file *filp)
|
|||||||
* Open up a stream for HW test
|
* Open up a stream for HW test
|
||||||
*/
|
*/
|
||||||
int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
|
struct amdgpu_bo *bo,
|
||||||
struct dma_fence **fence)
|
struct dma_fence **fence)
|
||||||
{
|
{
|
||||||
const unsigned ib_size_dw = 1024;
|
const unsigned ib_size_dw = 1024;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct dma_fence *f = NULL;
|
struct dma_fence *f = NULL;
|
||||||
uint64_t dummy;
|
uint64_t addr;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
||||||
@ -444,7 +445,7 @@ int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
|||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
|
|
||||||
dummy = ib->gpu_addr + 1024;
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
|
|
||||||
/* stitch together an VCE create msg */
|
/* stitch together an VCE create msg */
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
@ -476,8 +477,8 @@ int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
|||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014; /* len */
|
ib->ptr[ib->length_dw++] = 0x00000014; /* len */
|
||||||
ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */
|
ib->ptr[ib->length_dw++] = 0x05000005; /* feedback buffer */
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = upper_32_bits(addr);
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = addr;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001;
|
ib->ptr[ib->length_dw++] = 0x00000001;
|
||||||
|
|
||||||
for (i = ib->length_dw; i < ib_size_dw; ++i)
|
for (i = ib->length_dw; i < ib_size_dw; ++i)
|
||||||
@ -1110,13 +1111,20 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)
|
|||||||
int amdgpu_vce_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
int amdgpu_vce_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
||||||
{
|
{
|
||||||
struct dma_fence *fence = NULL;
|
struct dma_fence *fence = NULL;
|
||||||
|
struct amdgpu_bo *bo = NULL;
|
||||||
long r;
|
long r;
|
||||||
|
|
||||||
/* skip vce ring1/2 ib test for now, since it's not reliable */
|
/* skip vce ring1/2 ib test for now, since it's not reliable */
|
||||||
if (ring != &ring->adev->vce.ring[0])
|
if (ring != &ring->adev->vce.ring[0])
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
r = amdgpu_vce_get_create_msg(ring, 1, NULL);
|
r = amdgpu_bo_create_reserved(ring->adev, 512, PAGE_SIZE,
|
||||||
|
AMDGPU_GEM_DOMAIN_VRAM,
|
||||||
|
&bo, NULL, NULL);
|
||||||
|
if (r)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
r = amdgpu_vce_get_create_msg(ring, 1, bo, NULL);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -1132,5 +1140,7 @@ int amdgpu_vce_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
dma_fence_put(fence);
|
dma_fence_put(fence);
|
||||||
|
amdgpu_bo_unreserve(bo);
|
||||||
|
amdgpu_bo_unref(&bo);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,7 @@ int amdgpu_vce_entity_init(struct amdgpu_device *adev);
|
|||||||
int amdgpu_vce_suspend(struct amdgpu_device *adev);
|
int amdgpu_vce_suspend(struct amdgpu_device *adev);
|
||||||
int amdgpu_vce_resume(struct amdgpu_device *adev);
|
int amdgpu_vce_resume(struct amdgpu_device *adev);
|
||||||
int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
int amdgpu_vce_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
|
struct amdgpu_bo *bo,
|
||||||
struct dma_fence **fence);
|
struct dma_fence **fence);
|
||||||
int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
int amdgpu_vce_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
bool direct, struct dma_fence **fence);
|
bool direct, struct dma_fence **fence);
|
||||||
|
@ -569,13 +569,14 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int amdgpu_vcn_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
static int amdgpu_vcn_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
struct dma_fence **fence)
|
struct amdgpu_bo *bo,
|
||||||
|
struct dma_fence **fence)
|
||||||
{
|
{
|
||||||
const unsigned ib_size_dw = 16;
|
const unsigned ib_size_dw = 16;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct dma_fence *f = NULL;
|
struct dma_fence *f = NULL;
|
||||||
uint64_t dummy;
|
uint64_t addr;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
||||||
@ -583,14 +584,14 @@ static int amdgpu_vcn_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t hand
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
dummy = ib->gpu_addr + 1024;
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
|
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000018;
|
ib->ptr[ib->length_dw++] = 0x00000018;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
||||||
ib->ptr[ib->length_dw++] = handle;
|
ib->ptr[ib->length_dw++] = handle;
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = upper_32_bits(addr);
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = addr;
|
||||||
ib->ptr[ib->length_dw++] = 0x0000000b;
|
ib->ptr[ib->length_dw++] = 0x0000000b;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014;
|
ib->ptr[ib->length_dw++] = 0x00000014;
|
||||||
@ -621,13 +622,14 @@ err:
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int amdgpu_vcn_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
static int amdgpu_vcn_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
struct dma_fence **fence)
|
struct amdgpu_bo *bo,
|
||||||
|
struct dma_fence **fence)
|
||||||
{
|
{
|
||||||
const unsigned ib_size_dw = 16;
|
const unsigned ib_size_dw = 16;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct dma_fence *f = NULL;
|
struct dma_fence *f = NULL;
|
||||||
uint64_t dummy;
|
uint64_t addr;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
||||||
@ -635,14 +637,14 @@ static int amdgpu_vcn_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t han
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
dummy = ib->gpu_addr + 1024;
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
|
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000018;
|
ib->ptr[ib->length_dw++] = 0x00000018;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001;
|
ib->ptr[ib->length_dw++] = 0x00000001;
|
||||||
ib->ptr[ib->length_dw++] = handle;
|
ib->ptr[ib->length_dw++] = handle;
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = upper_32_bits(addr);
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = addr;
|
||||||
ib->ptr[ib->length_dw++] = 0x0000000b;
|
ib->ptr[ib->length_dw++] = 0x0000000b;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014;
|
ib->ptr[ib->length_dw++] = 0x00000014;
|
||||||
@ -675,13 +677,20 @@ err:
|
|||||||
int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
||||||
{
|
{
|
||||||
struct dma_fence *fence = NULL;
|
struct dma_fence *fence = NULL;
|
||||||
|
struct amdgpu_bo *bo = NULL;
|
||||||
long r;
|
long r;
|
||||||
|
|
||||||
r = amdgpu_vcn_enc_get_create_msg(ring, 1, NULL);
|
r = amdgpu_bo_create_reserved(ring->adev, 128 * 1024, PAGE_SIZE,
|
||||||
|
AMDGPU_GEM_DOMAIN_VRAM,
|
||||||
|
&bo, NULL, NULL);
|
||||||
|
if (r)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
r = amdgpu_vcn_enc_get_create_msg(ring, 1, bo, NULL);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
r = amdgpu_vcn_enc_get_destroy_msg(ring, 1, &fence);
|
r = amdgpu_vcn_enc_get_destroy_msg(ring, 1, bo, &fence);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -693,6 +702,8 @@ int amdgpu_vcn_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
dma_fence_put(fence);
|
dma_fence_put(fence);
|
||||||
|
amdgpu_bo_unreserve(bo);
|
||||||
|
amdgpu_bo_unref(&bo);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,13 +206,14 @@ static int uvd_v6_0_enc_ring_test_ring(struct amdgpu_ring *ring)
|
|||||||
* Open up a stream for HW test
|
* Open up a stream for HW test
|
||||||
*/
|
*/
|
||||||
static int uvd_v6_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
static int uvd_v6_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
|
struct amdgpu_bo *bo,
|
||||||
struct dma_fence **fence)
|
struct dma_fence **fence)
|
||||||
{
|
{
|
||||||
const unsigned ib_size_dw = 16;
|
const unsigned ib_size_dw = 16;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct dma_fence *f = NULL;
|
struct dma_fence *f = NULL;
|
||||||
uint64_t dummy;
|
uint64_t addr;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
||||||
@ -220,15 +221,15 @@ static int uvd_v6_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
dummy = ib->gpu_addr + 1024;
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
|
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000018;
|
ib->ptr[ib->length_dw++] = 0x00000018;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
||||||
ib->ptr[ib->length_dw++] = handle;
|
ib->ptr[ib->length_dw++] = handle;
|
||||||
ib->ptr[ib->length_dw++] = 0x00010000;
|
ib->ptr[ib->length_dw++] = 0x00010000;
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = upper_32_bits(addr);
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = addr;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014;
|
ib->ptr[ib->length_dw++] = 0x00000014;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000002; /* task info */
|
ib->ptr[ib->length_dw++] = 0x00000002; /* task info */
|
||||||
@ -268,13 +269,14 @@ err:
|
|||||||
*/
|
*/
|
||||||
static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
|
static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
|
||||||
uint32_t handle,
|
uint32_t handle,
|
||||||
|
struct amdgpu_bo *bo,
|
||||||
struct dma_fence **fence)
|
struct dma_fence **fence)
|
||||||
{
|
{
|
||||||
const unsigned ib_size_dw = 16;
|
const unsigned ib_size_dw = 16;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct dma_fence *f = NULL;
|
struct dma_fence *f = NULL;
|
||||||
uint64_t dummy;
|
uint64_t addr;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
||||||
@ -282,15 +284,15 @@ static int uvd_v6_0_enc_get_destroy_msg(struct amdgpu_ring *ring,
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
dummy = ib->gpu_addr + 1024;
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
|
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000018;
|
ib->ptr[ib->length_dw++] = 0x00000018;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
||||||
ib->ptr[ib->length_dw++] = handle;
|
ib->ptr[ib->length_dw++] = handle;
|
||||||
ib->ptr[ib->length_dw++] = 0x00010000;
|
ib->ptr[ib->length_dw++] = 0x00010000;
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = upper_32_bits(addr);
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = addr;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014;
|
ib->ptr[ib->length_dw++] = 0x00000014;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000002; /* task info */
|
ib->ptr[ib->length_dw++] = 0x00000002; /* task info */
|
||||||
@ -327,13 +329,20 @@ err:
|
|||||||
static int uvd_v6_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
static int uvd_v6_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
||||||
{
|
{
|
||||||
struct dma_fence *fence = NULL;
|
struct dma_fence *fence = NULL;
|
||||||
|
struct amdgpu_bo *bo = NULL;
|
||||||
long r;
|
long r;
|
||||||
|
|
||||||
r = uvd_v6_0_enc_get_create_msg(ring, 1, NULL);
|
r = amdgpu_bo_create_reserved(ring->adev, 128 * 1024, PAGE_SIZE,
|
||||||
|
AMDGPU_GEM_DOMAIN_VRAM,
|
||||||
|
&bo, NULL, NULL);
|
||||||
|
if (r)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
r = uvd_v6_0_enc_get_create_msg(ring, 1, bo, NULL);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
r = uvd_v6_0_enc_get_destroy_msg(ring, 1, &fence);
|
r = uvd_v6_0_enc_get_destroy_msg(ring, 1, bo, &fence);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -345,6 +354,8 @@ static int uvd_v6_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
dma_fence_put(fence);
|
dma_fence_put(fence);
|
||||||
|
amdgpu_bo_unreserve(bo);
|
||||||
|
amdgpu_bo_unref(&bo);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,13 +214,14 @@ static int uvd_v7_0_enc_ring_test_ring(struct amdgpu_ring *ring)
|
|||||||
* Open up a stream for HW test
|
* Open up a stream for HW test
|
||||||
*/
|
*/
|
||||||
static int uvd_v7_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
static int uvd_v7_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
|
struct amdgpu_bo *bo,
|
||||||
struct dma_fence **fence)
|
struct dma_fence **fence)
|
||||||
{
|
{
|
||||||
const unsigned ib_size_dw = 16;
|
const unsigned ib_size_dw = 16;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct dma_fence *f = NULL;
|
struct dma_fence *f = NULL;
|
||||||
uint64_t dummy;
|
uint64_t addr;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
||||||
@ -228,15 +229,15 @@ static int uvd_v7_0_enc_get_create_msg(struct amdgpu_ring *ring, uint32_t handle
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
dummy = ib->gpu_addr + 1024;
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
|
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000018;
|
ib->ptr[ib->length_dw++] = 0x00000018;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
ib->ptr[ib->length_dw++] = 0x00000001; /* session info */
|
||||||
ib->ptr[ib->length_dw++] = handle;
|
ib->ptr[ib->length_dw++] = handle;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000000;
|
ib->ptr[ib->length_dw++] = 0x00000000;
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = upper_32_bits(addr);
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = addr;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014;
|
ib->ptr[ib->length_dw++] = 0x00000014;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000002; /* task info */
|
ib->ptr[ib->length_dw++] = 0x00000002; /* task info */
|
||||||
@ -275,13 +276,14 @@ err:
|
|||||||
* Close up a stream for HW test or if userspace failed to do so
|
* Close up a stream for HW test or if userspace failed to do so
|
||||||
*/
|
*/
|
||||||
static int uvd_v7_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
static int uvd_v7_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handle,
|
||||||
struct dma_fence **fence)
|
struct amdgpu_bo *bo,
|
||||||
|
struct dma_fence **fence)
|
||||||
{
|
{
|
||||||
const unsigned ib_size_dw = 16;
|
const unsigned ib_size_dw = 16;
|
||||||
struct amdgpu_job *job;
|
struct amdgpu_job *job;
|
||||||
struct amdgpu_ib *ib;
|
struct amdgpu_ib *ib;
|
||||||
struct dma_fence *f = NULL;
|
struct dma_fence *f = NULL;
|
||||||
uint64_t dummy;
|
uint64_t addr;
|
||||||
int i, r;
|
int i, r;
|
||||||
|
|
||||||
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
r = amdgpu_job_alloc_with_ib(ring->adev, ib_size_dw * 4, &job);
|
||||||
@ -289,15 +291,15 @@ static int uvd_v7_0_enc_get_destroy_msg(struct amdgpu_ring *ring, uint32_t handl
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
ib = &job->ibs[0];
|
ib = &job->ibs[0];
|
||||||
dummy = ib->gpu_addr + 1024;
|
addr = amdgpu_bo_gpu_offset(bo);
|
||||||
|
|
||||||
ib->length_dw = 0;
|
ib->length_dw = 0;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000018;
|
ib->ptr[ib->length_dw++] = 0x00000018;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000001;
|
ib->ptr[ib->length_dw++] = 0x00000001;
|
||||||
ib->ptr[ib->length_dw++] = handle;
|
ib->ptr[ib->length_dw++] = handle;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000000;
|
ib->ptr[ib->length_dw++] = 0x00000000;
|
||||||
ib->ptr[ib->length_dw++] = upper_32_bits(dummy);
|
ib->ptr[ib->length_dw++] = upper_32_bits(addr);
|
||||||
ib->ptr[ib->length_dw++] = dummy;
|
ib->ptr[ib->length_dw++] = addr;
|
||||||
|
|
||||||
ib->ptr[ib->length_dw++] = 0x00000014;
|
ib->ptr[ib->length_dw++] = 0x00000014;
|
||||||
ib->ptr[ib->length_dw++] = 0x00000002;
|
ib->ptr[ib->length_dw++] = 0x00000002;
|
||||||
@ -334,13 +336,20 @@ err:
|
|||||||
static int uvd_v7_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
static int uvd_v7_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
||||||
{
|
{
|
||||||
struct dma_fence *fence = NULL;
|
struct dma_fence *fence = NULL;
|
||||||
|
struct amdgpu_bo *bo = NULL;
|
||||||
long r;
|
long r;
|
||||||
|
|
||||||
r = uvd_v7_0_enc_get_create_msg(ring, 1, NULL);
|
r = amdgpu_bo_create_reserved(ring->adev, 128 * 1024, PAGE_SIZE,
|
||||||
|
AMDGPU_GEM_DOMAIN_VRAM,
|
||||||
|
&bo, NULL, NULL);
|
||||||
|
if (r)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
r = uvd_v7_0_enc_get_create_msg(ring, 1, bo, NULL);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
r = uvd_v7_0_enc_get_destroy_msg(ring, 1, &fence);
|
r = uvd_v7_0_enc_get_destroy_msg(ring, 1, bo, &fence);
|
||||||
if (r)
|
if (r)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -352,6 +361,8 @@ static int uvd_v7_0_enc_ring_test_ib(struct amdgpu_ring *ring, long timeout)
|
|||||||
|
|
||||||
error:
|
error:
|
||||||
dma_fence_put(fence);
|
dma_fence_put(fence);
|
||||||
|
amdgpu_bo_unreserve(bo);
|
||||||
|
amdgpu_bo_unref(&bo);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,8 @@ static void komeda_kms_commit_tail(struct drm_atomic_state *old_state)
|
|||||||
|
|
||||||
drm_atomic_helper_commit_modeset_disables(dev, old_state);
|
drm_atomic_helper_commit_modeset_disables(dev, old_state);
|
||||||
|
|
||||||
drm_atomic_helper_commit_planes(dev, old_state, 0);
|
drm_atomic_helper_commit_planes(dev, old_state,
|
||||||
|
DRM_PLANE_COMMIT_ACTIVE_ONLY);
|
||||||
|
|
||||||
drm_atomic_helper_commit_modeset_enables(dev, old_state);
|
drm_atomic_helper_commit_modeset_enables(dev, old_state);
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user