mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
Merge tag 'v6.1.9' into odroid-6.1.y
This is the 6.1.9 stable release Change-Id: I2309fe6a1706e8bb6f5d37c1ad6af492dbe525ce
This commit is contained in:
@@ -16,7 +16,7 @@ properties:
|
||||
compatible:
|
||||
items:
|
||||
- enum:
|
||||
- renesas,i2c-r9a09g011 # RZ/V2M
|
||||
- renesas,r9a09g011-i2c # RZ/V2M
|
||||
- const: renesas,rzv2m-i2c
|
||||
|
||||
reg:
|
||||
@@ -66,7 +66,7 @@ examples:
|
||||
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||
|
||||
i2c0: i2c@a4030000 {
|
||||
compatible = "renesas,i2c-r9a09g011", "renesas,rzv2m-i2c";
|
||||
compatible = "renesas,r9a09g011-i2c", "renesas,rzv2m-i2c";
|
||||
reg = <0xa4030000 0x80>;
|
||||
interrupts = <GIC_SPI 232 IRQ_TYPE_EDGE_RISING>,
|
||||
<GIC_SPI 236 IRQ_TYPE_EDGE_RISING>;
|
||||
|
||||
@@ -19,8 +19,8 @@ description: |
|
||||
additional information and example.
|
||||
|
||||
patternProperties:
|
||||
# 25 LDOs
|
||||
"^LDO([1-9]|[1][0-9]|2[0-5])$":
|
||||
# 25 LDOs, without LDO10-12
|
||||
"^LDO([1-9]|1[3-9]|2[0-5])$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
@@ -30,6 +30,23 @@ patternProperties:
|
||||
required:
|
||||
- regulator-name
|
||||
|
||||
"^LDO(1[0-2])$":
|
||||
type: object
|
||||
$ref: regulator.yaml#
|
||||
unevaluatedProperties: false
|
||||
description:
|
||||
Properties for single LDO regulator.
|
||||
|
||||
properties:
|
||||
samsung,ext-control-gpios:
|
||||
maxItems: 1
|
||||
description:
|
||||
LDO10, LDO11 and LDO12 can be configured to external control over
|
||||
GPIO.
|
||||
|
||||
required:
|
||||
- regulator-name
|
||||
|
||||
# 5 bucks
|
||||
"^BUCK[1-5]$":
|
||||
type: object
|
||||
|
||||
@@ -80,7 +80,7 @@ properties:
|
||||
insensitive, letters in the riscv,isa string must be all
|
||||
lowercase to simplify parsing.
|
||||
$ref: "/schemas/types.yaml#/definitions/string"
|
||||
pattern: ^rv(?:64|32)imaf?d?q?c?b?v?k?h?(?:_[hsxz](?:[a-z])+)*$
|
||||
pattern: ^rv(?:64|32)imaf?d?q?c?b?k?j?p?v?h?(?:[hsxz](?:[a-z])+)?(?:_[hsxz](?:[a-z])+)*$
|
||||
|
||||
# RISC-V requires 'timebase-frequency' in /cpus, so disallow it here
|
||||
timebase-frequency: false
|
||||
|
||||
0
Documentation/devicetree/bindings/sound/everest,es8326.yaml
Executable file → Normal file
0
Documentation/devicetree/bindings/sound/everest,es8326.yaml
Executable file → Normal file
@@ -95,3 +95,39 @@ by supplying mem_encrypt=on on the kernel command line. However, if BIOS does
|
||||
not enable SME, then Linux will not be able to activate memory encryption, even
|
||||
if configured to do so by default or the mem_encrypt=on command line parameter
|
||||
is specified.
|
||||
|
||||
Secure Nested Paging (SNP)
|
||||
==========================
|
||||
|
||||
SEV-SNP introduces new features (SEV_FEATURES[1:63]) which can be enabled
|
||||
by the hypervisor for security enhancements. Some of these features need
|
||||
guest side implementation to function correctly. The below table lists the
|
||||
expected guest behavior with various possible scenarios of guest/hypervisor
|
||||
SNP feature support.
|
||||
|
||||
+-----------------+---------------+---------------+------------------+
|
||||
| Feature Enabled | Guest needs | Guest has | Guest boot |
|
||||
| by the HV | implementation| implementation| behaviour |
|
||||
+=================+===============+===============+==================+
|
||||
| No | No | No | Boot |
|
||||
| | | | |
|
||||
+-----------------+---------------+---------------+------------------+
|
||||
| No | Yes | No | Boot |
|
||||
| | | | |
|
||||
+-----------------+---------------+---------------+------------------+
|
||||
| No | Yes | Yes | Boot |
|
||||
| | | | |
|
||||
+-----------------+---------------+---------------+------------------+
|
||||
| Yes | No | No | Boot with |
|
||||
| | | | feature enabled |
|
||||
+-----------------+---------------+---------------+------------------+
|
||||
| Yes | Yes | No | Graceful boot |
|
||||
| | | | failure |
|
||||
+-----------------+---------------+---------------+------------------+
|
||||
| Yes | Yes | Yes | Boot with |
|
||||
| | | | feature enabled |
|
||||
+-----------------+---------------+---------------+------------------+
|
||||
|
||||
More details in AMD64 APM[1] Vol 2: 15.34.10 SEV_STATUS MSR
|
||||
|
||||
[1] https://www.amd.com/system/files/TechDocs/40332.pdf
|
||||
|
||||
17
Makefile
17
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 8
|
||||
SUBLEVEL = 9
|
||||
EXTRAVERSION =
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
@@ -538,7 +538,7 @@ LDFLAGS_MODULE =
|
||||
CFLAGS_KERNEL =
|
||||
RUSTFLAGS_KERNEL =
|
||||
AFLAGS_KERNEL =
|
||||
export LDFLAGS_vmlinux =
|
||||
LDFLAGS_vmlinux =
|
||||
|
||||
# Use USERINCLUDE when you must reference the UAPI directories only.
|
||||
USERINCLUDE := \
|
||||
@@ -1232,6 +1232,18 @@ vmlinux.o modules.builtin.modinfo modules.builtin: vmlinux_o
|
||||
@:
|
||||
|
||||
PHONY += vmlinux
|
||||
# LDFLAGS_vmlinux in the top Makefile defines linker flags for the top vmlinux,
|
||||
# not for decompressors. LDFLAGS_vmlinux in arch/*/boot/compressed/Makefile is
|
||||
# unrelated; the decompressors just happen to have the same base name,
|
||||
# arch/*/boot/compressed/vmlinux.
|
||||
# Export LDFLAGS_vmlinux only to scripts/Makefile.vmlinux.
|
||||
#
|
||||
# _LDFLAGS_vmlinux is a workaround for the 'private export' bug:
|
||||
# https://savannah.gnu.org/bugs/?61463
|
||||
# For Make > 4.4, the following simple code will work:
|
||||
# vmlinux: private export LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
|
||||
vmlinux: private _LDFLAGS_vmlinux := $(LDFLAGS_vmlinux)
|
||||
vmlinux: export LDFLAGS_vmlinux = $(_LDFLAGS_vmlinux)
|
||||
vmlinux: vmlinux.o $(KBUILD_LDS) modpost
|
||||
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.vmlinux
|
||||
|
||||
@@ -1517,6 +1529,7 @@ endif
|
||||
# *.ko are usually independent of vmlinux, but CONFIG_DEBUG_INFOBTF_MODULES
|
||||
# is an exception.
|
||||
ifdef CONFIG_DEBUG_INFO_BTF_MODULES
|
||||
KBUILD_BUILTIN := 1
|
||||
modules: vmlinux
|
||||
endif
|
||||
|
||||
|
||||
@@ -632,7 +632,6 @@
|
||||
&uart1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_uart1>;
|
||||
uart-has-rtscts;
|
||||
rts-gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
clock_frequency = <100000>;
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c2>;
|
||||
status = "okay";
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
clock_frequency = <100000>;
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c1>;
|
||||
status = "okay";
|
||||
@@ -52,7 +52,7 @@
|
||||
};
|
||||
|
||||
&i2c4 {
|
||||
clock_frequency = <100000>;
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c1>;
|
||||
status = "okay";
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
clock_frequency = <100000>;
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c1>;
|
||||
status = "okay";
|
||||
@@ -64,7 +64,7 @@
|
||||
};
|
||||
|
||||
&i2c2 {
|
||||
clock_frequency = <100000>;
|
||||
clock-frequency = <100000>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_i2c2>;
|
||||
status = "okay";
|
||||
|
||||
@@ -564,7 +564,7 @@
|
||||
mpddrc: mpddrc@ffffe800 {
|
||||
compatible = "microchip,sam9x60-ddramc", "atmel,sama5d3-ddramc";
|
||||
reg = <0xffffe800 0x200>;
|
||||
clocks = <&pmc PMC_TYPE_SYSTEM 2>, <&pmc PMC_TYPE_CORE PMC_MCK>;
|
||||
clocks = <&pmc PMC_TYPE_SYSTEM 2>, <&pmc PMC_TYPE_PERIPHERAL 49>;
|
||||
clock-names = "ddrck", "mpddr";
|
||||
};
|
||||
|
||||
|
||||
@@ -101,8 +101,12 @@
|
||||
|
||||
&qspi {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
|
||||
pinctrl-0 = <&qspi_clk_pins_a
|
||||
&qspi_bk1_pins_a
|
||||
&qspi_cs1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a
|
||||
&qspi_bk1_sleep_pins_a
|
||||
&qspi_cs1_sleep_pins_a>;
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -391,8 +391,12 @@
|
||||
|
||||
&qspi {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
|
||||
pinctrl-0 = <&qspi_clk_pins_a
|
||||
&qspi_bk1_pins_a
|
||||
&qspi_cs1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a
|
||||
&qspi_bk1_sleep_pins_a
|
||||
&qspi_cs1_sleep_pins_a>;
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -428,8 +428,12 @@
|
||||
|
||||
&qspi {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
|
||||
pinctrl-0 = <&qspi_clk_pins_a
|
||||
&qspi_bk1_pins_a
|
||||
&qspi_cs1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a
|
||||
&qspi_bk1_sleep_pins_a
|
||||
&qspi_cs1_sleep_pins_a>;
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x4000000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -247,8 +247,12 @@
|
||||
|
||||
&qspi {
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&qspi_clk_pins_a &qspi_bk1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a &qspi_bk1_sleep_pins_a>;
|
||||
pinctrl-0 = <&qspi_clk_pins_a
|
||||
&qspi_bk1_pins_a
|
||||
&qspi_cs1_pins_a>;
|
||||
pinctrl-1 = <&qspi_clk_sleep_pins_a
|
||||
&qspi_bk1_sleep_pins_a
|
||||
&qspi_cs1_sleep_pins_a>;
|
||||
reg = <0x58003000 0x1000>, <0x70000000 0x200000>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
@@ -23,6 +23,7 @@ static int mx25_read_cpu_rev(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx25-iim");
|
||||
iim_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
BUG_ON(!iim_base);
|
||||
rev = readl(iim_base + MXC_IIMSREV);
|
||||
iounmap(iim_base);
|
||||
|
||||
@@ -28,6 +28,7 @@ static int mx27_read_cpu_rev(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx27-ccm");
|
||||
ccm_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
BUG_ON(!ccm_base);
|
||||
/*
|
||||
* now we have access to the IO registers. As we need
|
||||
|
||||
@@ -39,6 +39,7 @@ static int mx31_read_cpu_rev(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx31-iim");
|
||||
iim_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
BUG_ON(!iim_base);
|
||||
|
||||
/* read SREV register from IIM module */
|
||||
|
||||
@@ -21,6 +21,7 @@ static int mx35_read_cpu_rev(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "fsl,imx35-iim");
|
||||
iim_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
BUG_ON(!iim_base);
|
||||
|
||||
rev = imx_readl(iim_base + MXC_IIMSREV);
|
||||
|
||||
@@ -28,6 +28,7 @@ static u32 imx5_read_srev_reg(const char *compat)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, compat);
|
||||
iim_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!iim_base);
|
||||
|
||||
srev = readl(iim_base + IIM_SREV) & 0xff;
|
||||
|
||||
@@ -161,7 +161,7 @@ void __init paging_init(const struct machine_desc *mdesc)
|
||||
mpu_setup();
|
||||
|
||||
/* allocate the zero page. */
|
||||
zero_page = memblock_alloc(PAGE_SIZE, PAGE_SIZE);
|
||||
zero_page = (void *)memblock_alloc(PAGE_SIZE, PAGE_SIZE);
|
||||
if (!zero_page)
|
||||
panic("%s: Failed to allocate %lu bytes align=0x%lx\n",
|
||||
__func__, PAGE_SIZE, PAGE_SIZE);
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
&ecspi2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_espi2>;
|
||||
cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
|
||||
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
|
||||
status = "okay";
|
||||
|
||||
eeprom@0 {
|
||||
@@ -316,7 +316,7 @@
|
||||
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x82
|
||||
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x82
|
||||
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x82
|
||||
MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x41
|
||||
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x41
|
||||
>;
|
||||
};
|
||||
|
||||
|
||||
@@ -759,6 +759,7 @@
|
||||
&usbotg2 {
|
||||
dr_mode = "host";
|
||||
vbus-supply = <®_usb2_vbus>;
|
||||
over-current-active-low;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
simple-audio-card,bitclock-master = <&dailink_master>;
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,frame-master = <&dailink_master>;
|
||||
simple-audio-card,mclk-fs = <256>;
|
||||
simple-audio-card,name = "imx8mm-wm8904";
|
||||
simple-audio-card,routing =
|
||||
"Headphone Jack", "HPOUTL",
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
simple-audio-card,bitclock-master = <&dailink_master>;
|
||||
simple-audio-card,format = "i2s";
|
||||
simple-audio-card,frame-master = <&dailink_master>;
|
||||
simple-audio-card,mclk-fs = <256>;
|
||||
simple-audio-card,name = "imx8mm-nau8822";
|
||||
simple-audio-card,routing =
|
||||
"Headphones", "LHP",
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
pcie0_refclk: pcie0-refclk {
|
||||
compatible = "fixed-clock";
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <100000000>;
|
||||
#clock-cells = <0>;
|
||||
clock-frequency = <100000000>;
|
||||
};
|
||||
|
||||
reg_can1_stby: regulator-can1-stby {
|
||||
|
||||
@@ -99,7 +99,6 @@
|
||||
|
||||
regulators {
|
||||
buck1: BUCK1 {
|
||||
regulator-compatible = "BUCK1";
|
||||
regulator-min-microvolt = <600000>;
|
||||
regulator-max-microvolt = <2187500>;
|
||||
regulator-boot-on;
|
||||
@@ -108,7 +107,6 @@
|
||||
};
|
||||
|
||||
buck2: BUCK2 {
|
||||
regulator-compatible = "BUCK2";
|
||||
regulator-min-microvolt = <600000>;
|
||||
regulator-max-microvolt = <2187500>;
|
||||
regulator-boot-on;
|
||||
@@ -119,7 +117,6 @@
|
||||
};
|
||||
|
||||
buck4: BUCK4 {
|
||||
regulator-compatible = "BUCK4";
|
||||
regulator-min-microvolt = <600000>;
|
||||
regulator-max-microvolt = <3400000>;
|
||||
regulator-boot-on;
|
||||
@@ -127,7 +124,6 @@
|
||||
};
|
||||
|
||||
buck5: BUCK5 {
|
||||
regulator-compatible = "BUCK5";
|
||||
regulator-min-microvolt = <600000>;
|
||||
regulator-max-microvolt = <3400000>;
|
||||
regulator-boot-on;
|
||||
@@ -135,7 +131,6 @@
|
||||
};
|
||||
|
||||
buck6: BUCK6 {
|
||||
regulator-compatible = "BUCK6";
|
||||
regulator-min-microvolt = <600000>;
|
||||
regulator-max-microvolt = <3400000>;
|
||||
regulator-boot-on;
|
||||
@@ -143,7 +138,6 @@
|
||||
};
|
||||
|
||||
ldo1: LDO1 {
|
||||
regulator-compatible = "LDO1";
|
||||
regulator-min-microvolt = <1600000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
@@ -151,7 +145,6 @@
|
||||
};
|
||||
|
||||
ldo2: LDO2 {
|
||||
regulator-compatible = "LDO2";
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <1150000>;
|
||||
regulator-boot-on;
|
||||
@@ -159,7 +152,6 @@
|
||||
};
|
||||
|
||||
ldo3: LDO3 {
|
||||
regulator-compatible = "LDO3";
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
@@ -167,13 +159,11 @@
|
||||
};
|
||||
|
||||
ldo4: LDO4 {
|
||||
regulator-compatible = "LDO4";
|
||||
regulator-min-microvolt = <800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
};
|
||||
|
||||
ldo5: LDO5 {
|
||||
regulator-compatible = "LDO5";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-boot-on;
|
||||
|
||||
@@ -523,6 +523,7 @@
|
||||
compatible = "fsl,imx8mp-gpc";
|
||||
reg = <0x303a0000 0x1000>;
|
||||
interrupt-parent = <&gic>;
|
||||
interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-controller;
|
||||
#interrupt-cells = <3>;
|
||||
|
||||
@@ -589,7 +590,7 @@
|
||||
reg = <IMX8MP_POWER_DOMAIN_MIPI_PHY2>;
|
||||
};
|
||||
|
||||
pgc_hsiomix: power-domains@17 {
|
||||
pgc_hsiomix: power-domain@17 {
|
||||
#power-domain-cells = <0>;
|
||||
reg = <IMX8MP_POWER_DOMAIN_HSIOMIX>;
|
||||
clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
pinctrl_usdhc1: usdhc1grp {
|
||||
fsl,pins = <
|
||||
MX93_PAD_SD1_CLK__USDHC1_CLK 0x17fe
|
||||
MX93_PAD_SD1_CLK__USDHC1_CLK 0x15fe
|
||||
MX93_PAD_SD1_CMD__USDHC1_CMD 0x13fe
|
||||
MX93_PAD_SD1_DATA0__USDHC1_DATA0 0x13fe
|
||||
MX93_PAD_SD1_DATA1__USDHC1_DATA1 0x13fe
|
||||
@@ -84,7 +84,7 @@
|
||||
MX93_PAD_SD1_DATA5__USDHC1_DATA5 0x13fe
|
||||
MX93_PAD_SD1_DATA6__USDHC1_DATA6 0x13fe
|
||||
MX93_PAD_SD1_DATA7__USDHC1_DATA7 0x13fe
|
||||
MX93_PAD_SD1_STROBE__USDHC1_STROBE 0x17fe
|
||||
MX93_PAD_SD1_STROBE__USDHC1_STROBE 0x15fe
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
pinctrl_usdhc2: usdhc2grp {
|
||||
fsl,pins = <
|
||||
MX93_PAD_SD2_CLK__USDHC2_CLK 0x17fe
|
||||
MX93_PAD_SD2_CLK__USDHC2_CLK 0x15fe
|
||||
MX93_PAD_SD2_CMD__USDHC2_CMD 0x13fe
|
||||
MX93_PAD_SD2_DATA0__USDHC2_DATA0 0x13fe
|
||||
MX93_PAD_SD2_DATA1__USDHC2_DATA1 0x13fe
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
uart1: serial@12100 {
|
||||
compatible = "snps,dw-apb-uart";
|
||||
reg = <0x11000 0x100>;
|
||||
reg = <0x12100 0x100>;
|
||||
reg-shift = <2>;
|
||||
interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg-io-width = <1>;
|
||||
|
||||
@@ -11,6 +11,12 @@
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
#include <dt-bindings/input/gpio-keys.h>
|
||||
|
||||
/delete-node/ &adsp_mem;
|
||||
/delete-node/ &audio_mem;
|
||||
/delete-node/ &mpss_mem;
|
||||
/delete-node/ &peripheral_region;
|
||||
/delete-node/ &rmtfs_mem;
|
||||
|
||||
/ {
|
||||
model = "Xiaomi Mi 4C";
|
||||
compatible = "xiaomi,libra", "qcom,msm8992";
|
||||
@@ -70,25 +76,67 @@
|
||||
#size-cells = <2>;
|
||||
ranges;
|
||||
|
||||
/* This is for getting crash logs using Android downstream kernels */
|
||||
memory_hole: hole@6400000 {
|
||||
reg = <0 0x06400000 0 0x600000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
memory_hole2: hole2@6c00000 {
|
||||
reg = <0 0x06c00000 0 0x2400000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
mpss_mem: mpss@9000000 {
|
||||
reg = <0 0x09000000 0 0x5a00000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
tzapp: tzapp@ea00000 {
|
||||
reg = <0 0x0ea00000 0 0x1900000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
mdm_rfsa_mem: mdm-rfsa@ca0b0000 {
|
||||
reg = <0 0xca0b0000 0 0x10000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
rmtfs_mem: rmtfs@ca100000 {
|
||||
compatible = "qcom,rmtfs-mem";
|
||||
reg = <0 0xca100000 0 0x180000>;
|
||||
no-map;
|
||||
|
||||
qcom,client-id = <1>;
|
||||
};
|
||||
|
||||
audio_mem: audio@cb400000 {
|
||||
reg = <0 0xcb000000 0 0x400000>;
|
||||
no-mem;
|
||||
};
|
||||
|
||||
qseecom_mem: qseecom@cb400000 {
|
||||
reg = <0 0xcb400000 0 0x1c00000>;
|
||||
no-mem;
|
||||
};
|
||||
|
||||
adsp_rfsa_mem: adsp-rfsa@cd000000 {
|
||||
reg = <0 0xcd000000 0 0x10000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
sensor_rfsa_mem: sensor-rfsa@cd010000 {
|
||||
reg = <0 0xcd010000 0 0x10000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
ramoops@dfc00000 {
|
||||
compatible = "ramoops";
|
||||
reg = <0x0 0xdfc00000 0x0 0x40000>;
|
||||
reg = <0 0xdfc00000 0 0x40000>;
|
||||
console-size = <0x10000>;
|
||||
record-size = <0x10000>;
|
||||
ftrace-size = <0x10000>;
|
||||
pmsg-size = <0x20000>;
|
||||
};
|
||||
|
||||
modem_region: modem_region@9000000 {
|
||||
reg = <0x0 0x9000000 0x0 0x5a00000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
tzapp: modem_region@ea00000 {
|
||||
reg = <0x0 0xea00000 0x0 0x1900000>;
|
||||
no-map;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -130,11 +178,6 @@
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&peripheral_region {
|
||||
reg = <0x0 0x7400000 0x0 0x1c00000>;
|
||||
no-map;
|
||||
};
|
||||
|
||||
&pm8994_spmi_regulators {
|
||||
VDD_APC0: s8 {
|
||||
regulator-min-microvolt = <680000>;
|
||||
|
||||
@@ -36,10 +36,6 @@
|
||||
compatible = "qcom,rpmcc-msm8992", "qcom,rpmcc";
|
||||
};
|
||||
|
||||
&tcsr_mutex {
|
||||
compatible = "qcom,sfpb-mutex";
|
||||
};
|
||||
|
||||
&timer {
|
||||
interrupts = <GIC_PPI 2 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
<GIC_PPI 3 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
|
||||
|
||||
@@ -1173,7 +1173,7 @@
|
||||
clock-names = "aux", "ref_clk_src", "ref", "com_aux";
|
||||
|
||||
resets = <&gcc GCC_USB3_PHY_PRIM_BCR>,
|
||||
<&gcc GCC_USB3_DP_PHY_PRIM_BCR>;
|
||||
<&gcc GCC_USB4_DP_PHY_PRIM_BCR>;
|
||||
reset-names = "phy", "common";
|
||||
|
||||
power-domains = <&gcc USB30_PRIM_GDSC>;
|
||||
|
||||
@@ -14,8 +14,16 @@
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
extern void efi_init(void);
|
||||
|
||||
bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg);
|
||||
#else
|
||||
#define efi_init()
|
||||
|
||||
static inline
|
||||
bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
int efi_create_mapping(struct mm_struct *mm, efi_memory_desc_t *md);
|
||||
@@ -40,8 +48,17 @@ int efi_set_mapping_permissions(struct mm_struct *mm, efi_memory_desc_t *md);
|
||||
})
|
||||
|
||||
extern spinlock_t efi_rt_lock;
|
||||
extern u64 *efi_rt_stack_top;
|
||||
efi_status_t __efi_rt_asm_wrapper(void *, const char *, ...);
|
||||
|
||||
/*
|
||||
* efi_rt_stack_top[-1] contains the value the stack pointer had before
|
||||
* switching to the EFI runtime stack.
|
||||
*/
|
||||
#define current_in_efi() \
|
||||
(!preemptible() && efi_rt_stack_top != NULL && \
|
||||
on_task_stack(current, READ_ONCE(efi_rt_stack_top[-1]), 1))
|
||||
|
||||
#define ARCH_EFI_IRQ_FLAGS_MASK (PSR_D_BIT | PSR_A_BIT | PSR_I_BIT | PSR_F_BIT)
|
||||
|
||||
/*
|
||||
|
||||
@@ -104,4 +104,19 @@ static inline struct stack_info stackinfo_get_sdei_critical(void)
|
||||
#define stackinfo_get_sdei_critical() stackinfo_get_unknown()
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_EFI
|
||||
extern u64 *efi_rt_stack_top;
|
||||
|
||||
static inline struct stack_info stackinfo_get_efi(void)
|
||||
{
|
||||
unsigned long high = (u64)efi_rt_stack_top;
|
||||
unsigned long low = high - THREAD_SIZE;
|
||||
|
||||
return (struct stack_info) {
|
||||
.low = low,
|
||||
.high = high,
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __ASM_STACKTRACE_H */
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <asm/assembler.h>
|
||||
|
||||
SYM_FUNC_START(__efi_rt_asm_wrapper)
|
||||
stp x29, x30, [sp, #-32]!
|
||||
stp x29, x30, [sp, #-112]!
|
||||
mov x29, sp
|
||||
|
||||
/*
|
||||
@@ -17,11 +17,21 @@ SYM_FUNC_START(__efi_rt_asm_wrapper)
|
||||
*/
|
||||
stp x1, x18, [sp, #16]
|
||||
|
||||
/*
|
||||
* Preserve all callee saved registers and preserve the stack pointer
|
||||
* value at the base of the EFI runtime stack so we can recover from
|
||||
* synchronous exceptions occurring while executing the firmware
|
||||
* routines.
|
||||
*/
|
||||
stp x19, x20, [sp, #32]
|
||||
stp x21, x22, [sp, #48]
|
||||
stp x23, x24, [sp, #64]
|
||||
stp x25, x26, [sp, #80]
|
||||
stp x27, x28, [sp, #96]
|
||||
|
||||
ldr_l x16, efi_rt_stack_top
|
||||
mov sp, x16
|
||||
#ifdef CONFIG_SHADOW_CALL_STACK
|
||||
str x18, [sp, #-16]!
|
||||
#endif
|
||||
stp x18, x29, [sp, #-16]!
|
||||
|
||||
/*
|
||||
* We are lucky enough that no EFI runtime services take more than
|
||||
@@ -36,10 +46,13 @@ SYM_FUNC_START(__efi_rt_asm_wrapper)
|
||||
mov x4, x6
|
||||
blr x8
|
||||
|
||||
mov x16, sp
|
||||
mov sp, x29
|
||||
str xzr, [x16, #8] // clear recorded task SP value
|
||||
|
||||
ldp x1, x2, [sp, #16]
|
||||
cmp x2, x18
|
||||
ldp x29, x30, [sp], #32
|
||||
ldp x29, x30, [sp], #112
|
||||
b.ne 0f
|
||||
ret
|
||||
0:
|
||||
@@ -57,3 +70,18 @@ SYM_FUNC_START(__efi_rt_asm_wrapper)
|
||||
|
||||
b efi_handle_corrupted_x18 // tail call
|
||||
SYM_FUNC_END(__efi_rt_asm_wrapper)
|
||||
|
||||
SYM_CODE_START(__efi_rt_asm_recover)
|
||||
mov sp, x30
|
||||
|
||||
ldr_l x16, efi_rt_stack_top // clear recorded task SP value
|
||||
str xzr, [x16, #-8]
|
||||
|
||||
ldp x19, x20, [sp, #32]
|
||||
ldp x21, x22, [sp, #48]
|
||||
ldp x23, x24, [sp, #64]
|
||||
ldp x25, x26, [sp, #80]
|
||||
ldp x27, x28, [sp, #96]
|
||||
ldp x29, x30, [sp], #112
|
||||
ret
|
||||
SYM_CODE_END(__efi_rt_asm_recover)
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/efi.h>
|
||||
#include <asm/stacktrace.h>
|
||||
|
||||
static bool region_is_misaligned(const efi_memory_desc_t *md)
|
||||
{
|
||||
@@ -149,6 +150,28 @@ DEFINE_SPINLOCK(efi_rt_lock);
|
||||
|
||||
asmlinkage u64 *efi_rt_stack_top __ro_after_init;
|
||||
|
||||
asmlinkage efi_status_t __efi_rt_asm_recover(void);
|
||||
|
||||
bool efi_runtime_fixup_exception(struct pt_regs *regs, const char *msg)
|
||||
{
|
||||
/* Check whether the exception occurred while running the firmware */
|
||||
if (!current_in_efi() || regs->pc >= TASK_SIZE_64)
|
||||
return false;
|
||||
|
||||
pr_err(FW_BUG "Unable to handle %s in EFI runtime service\n", msg);
|
||||
add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
|
||||
clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);
|
||||
|
||||
regs->regs[0] = EFI_ABORTED;
|
||||
regs->regs[30] = efi_rt_stack_top[-1];
|
||||
regs->pc = (u64)__efi_rt_asm_recover;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SHADOW_CALL_STACK))
|
||||
regs->regs[18] = efi_rt_stack_top[-2];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* EFI requires 8 KiB of stack space for runtime services */
|
||||
static_assert(THREAD_SIZE >= SZ_8K);
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/efi.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/ftrace.h>
|
||||
#include <linux/sched.h>
|
||||
@@ -12,6 +13,7 @@
|
||||
#include <linux/sched/task_stack.h>
|
||||
#include <linux/stacktrace.h>
|
||||
|
||||
#include <asm/efi.h>
|
||||
#include <asm/irq.h>
|
||||
#include <asm/stack_pointer.h>
|
||||
#include <asm/stacktrace.h>
|
||||
@@ -186,6 +188,13 @@ void show_stack(struct task_struct *tsk, unsigned long *sp, const char *loglvl)
|
||||
: stackinfo_get_unknown(); \
|
||||
})
|
||||
|
||||
#define STACKINFO_EFI \
|
||||
({ \
|
||||
((task == current) && current_in_efi()) \
|
||||
? stackinfo_get_efi() \
|
||||
: stackinfo_get_unknown(); \
|
||||
})
|
||||
|
||||
noinline noinstr void arch_stack_walk(stack_trace_consume_fn consume_entry,
|
||||
void *cookie, struct task_struct *task,
|
||||
struct pt_regs *regs)
|
||||
@@ -199,6 +208,9 @@ noinline noinstr void arch_stack_walk(stack_trace_consume_fn consume_entry,
|
||||
#if defined(CONFIG_VMAP_STACK) && defined(CONFIG_ARM_SDE_INTERFACE)
|
||||
STACKINFO_SDEI(normal),
|
||||
STACKINFO_SDEI(critical),
|
||||
#endif
|
||||
#ifdef CONFIG_EFI
|
||||
STACKINFO_EFI,
|
||||
#endif
|
||||
};
|
||||
struct unwind_state state = {
|
||||
|
||||
@@ -350,26 +350,23 @@ retry:
|
||||
* The deactivation of the doorbell interrupt will trigger the
|
||||
* unmapping of the associated vPE.
|
||||
*/
|
||||
static void unmap_all_vpes(struct vgic_dist *dist)
|
||||
static void unmap_all_vpes(struct kvm *kvm)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
struct vgic_dist *dist = &kvm->arch.vgic;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++) {
|
||||
desc = irq_to_desc(dist->its_vm.vpes[i]->irq);
|
||||
irq_domain_deactivate_irq(irq_desc_get_irq_data(desc));
|
||||
}
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++)
|
||||
free_irq(dist->its_vm.vpes[i]->irq, kvm_get_vcpu(kvm, i));
|
||||
}
|
||||
|
||||
static void map_all_vpes(struct vgic_dist *dist)
|
||||
static void map_all_vpes(struct kvm *kvm)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
struct vgic_dist *dist = &kvm->arch.vgic;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++) {
|
||||
desc = irq_to_desc(dist->its_vm.vpes[i]->irq);
|
||||
irq_domain_activate_irq(irq_desc_get_irq_data(desc), false);
|
||||
}
|
||||
for (i = 0; i < dist->its_vm.nr_vpes; i++)
|
||||
WARN_ON(vgic_v4_request_vpe_irq(kvm_get_vcpu(kvm, i),
|
||||
dist->its_vm.vpes[i]->irq));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -394,7 +391,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
|
||||
* and enabling of the doorbells have already been done.
|
||||
*/
|
||||
if (kvm_vgic_global_state.has_gicv4_1) {
|
||||
unmap_all_vpes(dist);
|
||||
unmap_all_vpes(kvm);
|
||||
vlpi_avail = true;
|
||||
}
|
||||
|
||||
@@ -444,7 +441,7 @@ int vgic_v3_save_pending_tables(struct kvm *kvm)
|
||||
|
||||
out:
|
||||
if (vlpi_avail)
|
||||
map_all_vpes(dist);
|
||||
map_all_vpes(kvm);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -222,6 +222,11 @@ void vgic_v4_get_vlpi_state(struct vgic_irq *irq, bool *val)
|
||||
*val = !!(*ptr & mask);
|
||||
}
|
||||
|
||||
int vgic_v4_request_vpe_irq(struct kvm_vcpu *vcpu, int irq)
|
||||
{
|
||||
return request_irq(irq, vgic_v4_doorbell_handler, 0, "vcpu", vcpu);
|
||||
}
|
||||
|
||||
/**
|
||||
* vgic_v4_init - Initialize the GICv4 data structures
|
||||
* @kvm: Pointer to the VM being initialized
|
||||
@@ -283,8 +288,7 @@ int vgic_v4_init(struct kvm *kvm)
|
||||
irq_flags &= ~IRQ_NOAUTOEN;
|
||||
irq_set_status_flags(irq, irq_flags);
|
||||
|
||||
ret = request_irq(irq, vgic_v4_doorbell_handler,
|
||||
0, "vcpu", vcpu);
|
||||
ret = vgic_v4_request_vpe_irq(vcpu, irq);
|
||||
if (ret) {
|
||||
kvm_err("failed to allocate vcpu IRQ%d\n", irq);
|
||||
/*
|
||||
|
||||
@@ -331,5 +331,6 @@ int vgic_v4_init(struct kvm *kvm);
|
||||
void vgic_v4_teardown(struct kvm *kvm);
|
||||
void vgic_v4_configure_vsgis(struct kvm *kvm);
|
||||
void vgic_v4_get_vlpi_state(struct vgic_irq *irq, bool *val);
|
||||
int vgic_v4_request_vpe_irq(struct kvm_vcpu *vcpu, int irq);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <asm/bug.h>
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/efi.h>
|
||||
#include <asm/exception.h>
|
||||
#include <asm/daifflags.h>
|
||||
#include <asm/debug-monitors.h>
|
||||
@@ -397,6 +398,9 @@ static void __do_kernel_fault(unsigned long addr, unsigned long esr,
|
||||
msg = "paging request";
|
||||
}
|
||||
|
||||
if (efi_runtime_fixup_exception(regs, msg))
|
||||
return;
|
||||
|
||||
die_kernel_fault(msg, addr, esr, regs);
|
||||
}
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@ clear_bss_done:
|
||||
call soc_early_init
|
||||
tail start_kernel
|
||||
|
||||
#if CONFIG_RISCV_BOOT_SPINWAIT
|
||||
#ifdef CONFIG_RISCV_BOOT_SPINWAIT
|
||||
.Lsecondary_start:
|
||||
/* Set trap vector to spin forever to help debug */
|
||||
la a3, .Lsecondary_park
|
||||
|
||||
@@ -71,11 +71,11 @@ bool __kprobes simulate_jalr(u32 opcode, unsigned long addr, struct pt_regs *reg
|
||||
u32 rd_index = (opcode >> 7) & 0x1f;
|
||||
u32 rs1_index = (opcode >> 15) & 0x1f;
|
||||
|
||||
ret = rv_insn_reg_set_val(regs, rd_index, addr + 4);
|
||||
ret = rv_insn_reg_get_val(regs, rs1_index, &base_addr);
|
||||
if (!ret)
|
||||
return ret;
|
||||
|
||||
ret = rv_insn_reg_get_val(regs, rs1_index, &base_addr);
|
||||
ret = rv_insn_reg_set_val(regs, rd_index, addr + 4);
|
||||
if (!ret)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -39,7 +39,6 @@ static DECLARE_COMPLETION(cpu_running);
|
||||
|
||||
void __init smp_prepare_boot_cpu(void)
|
||||
{
|
||||
init_cpu_topology();
|
||||
}
|
||||
|
||||
void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
@@ -48,6 +47,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
||||
int ret;
|
||||
unsigned int curr_cpuid;
|
||||
|
||||
init_cpu_topology();
|
||||
|
||||
curr_cpuid = smp_processor_id();
|
||||
store_cpu_topology(curr_cpuid);
|
||||
numa_store_cpu_info(curr_cpuid);
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
*
|
||||
* Copyright IBM Corp. 1999, 2020
|
||||
*/
|
||||
#ifndef DEBUG_H
|
||||
#define DEBUG_H
|
||||
#ifndef _ASM_S390_DEBUG_H
|
||||
#define _ASM_S390_DEBUG_H
|
||||
|
||||
#include <linux/string.h>
|
||||
#include <linux/spinlock.h>
|
||||
@@ -487,4 +487,4 @@ void debug_register_static(debug_info_t *id, int pages_per_area, int nr_areas);
|
||||
|
||||
#endif /* MODULE */
|
||||
|
||||
#endif /* DEBUG_H */
|
||||
#endif /* _ASM_S390_DEBUG_H */
|
||||
|
||||
@@ -79,6 +79,7 @@ SECTIONS
|
||||
_end_amode31_refs = .;
|
||||
}
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
_edata = .; /* End of data section */
|
||||
|
||||
/* will be freed after init */
|
||||
@@ -193,6 +194,7 @@ SECTIONS
|
||||
|
||||
BSS_SECTION(PAGE_SIZE, 4 * PAGE_SIZE, PAGE_SIZE)
|
||||
|
||||
. = ALIGN(PAGE_SIZE);
|
||||
_end = . ;
|
||||
|
||||
/*
|
||||
|
||||
@@ -83,8 +83,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)
|
||||
struct esca_block *sca = vcpu->kvm->arch.sca;
|
||||
union esca_sigp_ctrl *sigp_ctrl =
|
||||
&(sca->cpu[vcpu->vcpu_id].sigp_ctrl);
|
||||
union esca_sigp_ctrl new_val = {0}, old_val = *sigp_ctrl;
|
||||
union esca_sigp_ctrl new_val = {0}, old_val;
|
||||
|
||||
old_val = READ_ONCE(*sigp_ctrl);
|
||||
new_val.scn = src_id;
|
||||
new_val.c = 1;
|
||||
old_val.c = 0;
|
||||
@@ -95,8 +96,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)
|
||||
struct bsca_block *sca = vcpu->kvm->arch.sca;
|
||||
union bsca_sigp_ctrl *sigp_ctrl =
|
||||
&(sca->cpu[vcpu->vcpu_id].sigp_ctrl);
|
||||
union bsca_sigp_ctrl new_val = {0}, old_val = *sigp_ctrl;
|
||||
union bsca_sigp_ctrl new_val = {0}, old_val;
|
||||
|
||||
old_val = READ_ONCE(*sigp_ctrl);
|
||||
new_val.scn = src_id;
|
||||
new_val.c = 1;
|
||||
old_val.c = 0;
|
||||
@@ -126,16 +128,18 @@ static void sca_clear_ext_call(struct kvm_vcpu *vcpu)
|
||||
struct esca_block *sca = vcpu->kvm->arch.sca;
|
||||
union esca_sigp_ctrl *sigp_ctrl =
|
||||
&(sca->cpu[vcpu->vcpu_id].sigp_ctrl);
|
||||
union esca_sigp_ctrl old = *sigp_ctrl;
|
||||
union esca_sigp_ctrl old;
|
||||
|
||||
old = READ_ONCE(*sigp_ctrl);
|
||||
expect = old.value;
|
||||
rc = cmpxchg(&sigp_ctrl->value, old.value, 0);
|
||||
} else {
|
||||
struct bsca_block *sca = vcpu->kvm->arch.sca;
|
||||
union bsca_sigp_ctrl *sigp_ctrl =
|
||||
&(sca->cpu[vcpu->vcpu_id].sigp_ctrl);
|
||||
union bsca_sigp_ctrl old = *sigp_ctrl;
|
||||
union bsca_sigp_ctrl old;
|
||||
|
||||
old = READ_ONCE(*sigp_ctrl);
|
||||
expect = old.value;
|
||||
rc = cmpxchg(&sigp_ctrl->value, old.value, 0);
|
||||
}
|
||||
|
||||
@@ -180,6 +180,12 @@ void initialize_identity_maps(void *rmode)
|
||||
|
||||
/* Load the new page-table. */
|
||||
write_cr3(top_level_pgt);
|
||||
|
||||
/*
|
||||
* Now that the required page table mappings are established and a
|
||||
* GHCB can be used, check for SNP guest/HV feature compatibility.
|
||||
*/
|
||||
snp_check_features();
|
||||
}
|
||||
|
||||
static pte_t *split_large_pmd(struct x86_mapping_info *info,
|
||||
|
||||
@@ -126,6 +126,7 @@ static inline void console_init(void)
|
||||
|
||||
#ifdef CONFIG_AMD_MEM_ENCRYPT
|
||||
void sev_enable(struct boot_params *bp);
|
||||
void snp_check_features(void);
|
||||
void sev_es_shutdown_ghcb(void);
|
||||
extern bool sev_es_check_ghcb_fault(unsigned long address);
|
||||
void snp_set_page_private(unsigned long paddr);
|
||||
@@ -143,6 +144,7 @@ static inline void sev_enable(struct boot_params *bp)
|
||||
if (bp)
|
||||
bp->cc_blob_address = 0;
|
||||
}
|
||||
static inline void snp_check_features(void) { }
|
||||
static inline void sev_es_shutdown_ghcb(void) { }
|
||||
static inline bool sev_es_check_ghcb_fault(unsigned long address)
|
||||
{
|
||||
|
||||
@@ -208,6 +208,23 @@ void sev_es_shutdown_ghcb(void)
|
||||
error("Can't unmap GHCB page");
|
||||
}
|
||||
|
||||
static void __noreturn sev_es_ghcb_terminate(struct ghcb *ghcb, unsigned int set,
|
||||
unsigned int reason, u64 exit_info_2)
|
||||
{
|
||||
u64 exit_info_1 = SVM_VMGEXIT_TERM_REASON(set, reason);
|
||||
|
||||
vc_ghcb_invalidate(ghcb);
|
||||
ghcb_set_sw_exit_code(ghcb, SVM_VMGEXIT_TERM_REQUEST);
|
||||
ghcb_set_sw_exit_info_1(ghcb, exit_info_1);
|
||||
ghcb_set_sw_exit_info_2(ghcb, exit_info_2);
|
||||
|
||||
sev_es_wr_ghcb_msr(__pa(ghcb));
|
||||
VMGEXIT();
|
||||
|
||||
while (true)
|
||||
asm volatile("hlt\n" : : : "memory");
|
||||
}
|
||||
|
||||
bool sev_es_check_ghcb_fault(unsigned long address)
|
||||
{
|
||||
/* Check whether the fault was on the GHCB page */
|
||||
@@ -270,6 +287,59 @@ static void enforce_vmpl0(void)
|
||||
sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_NOT_VMPL0);
|
||||
}
|
||||
|
||||
/*
|
||||
* SNP_FEATURES_IMPL_REQ is the mask of SNP features that will need
|
||||
* guest side implementation for proper functioning of the guest. If any
|
||||
* of these features are enabled in the hypervisor but are lacking guest
|
||||
* side implementation, the behavior of the guest will be undefined. The
|
||||
* guest could fail in non-obvious way making it difficult to debug.
|
||||
*
|
||||
* As the behavior of reserved feature bits is unknown to be on the
|
||||
* safe side add them to the required features mask.
|
||||
*/
|
||||
#define SNP_FEATURES_IMPL_REQ (MSR_AMD64_SNP_VTOM | \
|
||||
MSR_AMD64_SNP_REFLECT_VC | \
|
||||
MSR_AMD64_SNP_RESTRICTED_INJ | \
|
||||
MSR_AMD64_SNP_ALT_INJ | \
|
||||
MSR_AMD64_SNP_DEBUG_SWAP | \
|
||||
MSR_AMD64_SNP_VMPL_SSS | \
|
||||
MSR_AMD64_SNP_SECURE_TSC | \
|
||||
MSR_AMD64_SNP_VMGEXIT_PARAM | \
|
||||
MSR_AMD64_SNP_VMSA_REG_PROTECTION | \
|
||||
MSR_AMD64_SNP_RESERVED_BIT13 | \
|
||||
MSR_AMD64_SNP_RESERVED_BIT15 | \
|
||||
MSR_AMD64_SNP_RESERVED_MASK)
|
||||
|
||||
/*
|
||||
* SNP_FEATURES_PRESENT is the mask of SNP features that are implemented
|
||||
* by the guest kernel. As and when a new feature is implemented in the
|
||||
* guest kernel, a corresponding bit should be added to the mask.
|
||||
*/
|
||||
#define SNP_FEATURES_PRESENT (0)
|
||||
|
||||
void snp_check_features(void)
|
||||
{
|
||||
u64 unsupported;
|
||||
|
||||
if (!(sev_status & MSR_AMD64_SEV_SNP_ENABLED))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Terminate the boot if hypervisor has enabled any feature lacking
|
||||
* guest side implementation. Pass on the unsupported features mask through
|
||||
* EXIT_INFO_2 of the GHCB protocol so that those features can be reported
|
||||
* as part of the guest boot failure.
|
||||
*/
|
||||
unsupported = sev_status & SNP_FEATURES_IMPL_REQ & ~SNP_FEATURES_PRESENT;
|
||||
if (unsupported) {
|
||||
if (ghcb_version < 2 || (!boot_ghcb && !early_setup_ghcb()))
|
||||
sev_es_terminate(SEV_TERM_SET_GEN, GHCB_SNP_UNSUPPORTED);
|
||||
|
||||
sev_es_ghcb_terminate(boot_ghcb, SEV_TERM_SET_GEN,
|
||||
GHCB_SNP_UNSUPPORTED, unsupported);
|
||||
}
|
||||
}
|
||||
|
||||
void sev_enable(struct boot_params *bp)
|
||||
{
|
||||
unsigned int eax, ebx, ecx, edx;
|
||||
|
||||
@@ -1387,7 +1387,7 @@ static int __init amd_core_pmu_init(void)
|
||||
* numbered counter following it.
|
||||
*/
|
||||
for (i = 0; i < x86_pmu.num_counters - 1; i += 2)
|
||||
even_ctr_mask |= 1 << i;
|
||||
even_ctr_mask |= BIT_ULL(i);
|
||||
|
||||
pair_constraint = (struct event_constraint)
|
||||
__EVENT_CONSTRAINT(0, even_ctr_mask, 0,
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
* MSR_CORE_C1_RES: CORE C1 Residency Counter
|
||||
* perf code: 0x00
|
||||
* Available model: SLM,AMT,GLM,CNL,ICX,TNT,ADL,RPL
|
||||
* MTL
|
||||
* Scope: Core (each processor core has a MSR)
|
||||
* MSR_CORE_C3_RESIDENCY: CORE C3 Residency Counter
|
||||
* perf code: 0x01
|
||||
@@ -51,50 +52,50 @@
|
||||
* perf code: 0x02
|
||||
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
|
||||
* SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
|
||||
* TGL,TNT,RKL,ADL,RPL,SPR
|
||||
* TGL,TNT,RKL,ADL,RPL,SPR,MTL
|
||||
* Scope: Core
|
||||
* MSR_CORE_C7_RESIDENCY: CORE C7 Residency Counter
|
||||
* perf code: 0x03
|
||||
* Available model: SNB,IVB,HSW,BDW,SKL,CNL,KBL,CML,
|
||||
* ICL,TGL,RKL,ADL,RPL
|
||||
* ICL,TGL,RKL,ADL,RPL,MTL
|
||||
* Scope: Core
|
||||
* MSR_PKG_C2_RESIDENCY: Package C2 Residency Counter.
|
||||
* perf code: 0x00
|
||||
* Available model: SNB,IVB,HSW,BDW,SKL,KNL,GLM,CNL,
|
||||
* KBL,CML,ICL,ICX,TGL,TNT,RKL,ADL,
|
||||
* RPL,SPR
|
||||
* RPL,SPR,MTL
|
||||
* Scope: Package (physical package)
|
||||
* MSR_PKG_C3_RESIDENCY: Package C3 Residency Counter.
|
||||
* perf code: 0x01
|
||||
* Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,KNL,
|
||||
* GLM,CNL,KBL,CML,ICL,TGL,TNT,RKL,
|
||||
* ADL,RPL
|
||||
* ADL,RPL,MTL
|
||||
* Scope: Package (physical package)
|
||||
* MSR_PKG_C6_RESIDENCY: Package C6 Residency Counter.
|
||||
* perf code: 0x02
|
||||
* Available model: SLM,AMT,NHM,WSM,SNB,IVB,HSW,BDW,
|
||||
* SKL,KNL,GLM,CNL,KBL,CML,ICL,ICX,
|
||||
* TGL,TNT,RKL,ADL,RPL,SPR
|
||||
* TGL,TNT,RKL,ADL,RPL,SPR,MTL
|
||||
* Scope: Package (physical package)
|
||||
* MSR_PKG_C7_RESIDENCY: Package C7 Residency Counter.
|
||||
* perf code: 0x03
|
||||
* Available model: NHM,WSM,SNB,IVB,HSW,BDW,SKL,CNL,
|
||||
* KBL,CML,ICL,TGL,RKL,ADL,RPL
|
||||
* KBL,CML,ICL,TGL,RKL,ADL,RPL,MTL
|
||||
* Scope: Package (physical package)
|
||||
* MSR_PKG_C8_RESIDENCY: Package C8 Residency Counter.
|
||||
* perf code: 0x04
|
||||
* Available model: HSW ULT,KBL,CNL,CML,ICL,TGL,RKL,
|
||||
* ADL,RPL
|
||||
* ADL,RPL,MTL
|
||||
* Scope: Package (physical package)
|
||||
* MSR_PKG_C9_RESIDENCY: Package C9 Residency Counter.
|
||||
* perf code: 0x05
|
||||
* Available model: HSW ULT,KBL,CNL,CML,ICL,TGL,RKL,
|
||||
* ADL,RPL
|
||||
* ADL,RPL,MTL
|
||||
* Scope: Package (physical package)
|
||||
* MSR_PKG_C10_RESIDENCY: Package C10 Residency Counter.
|
||||
* perf code: 0x06
|
||||
* Available model: HSW ULT,KBL,GLM,CNL,CML,ICL,TGL,
|
||||
* TNT,RKL,ADL,RPL
|
||||
* TNT,RKL,ADL,RPL,MTL
|
||||
* Scope: Package (physical package)
|
||||
*
|
||||
*/
|
||||
@@ -686,6 +687,8 @@ static const struct x86_cpu_id intel_cstates_match[] __initconst = {
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &adl_cstates),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &adl_cstates),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, &adl_cstates),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE, &adl_cstates),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(METEORLAKE_L, &adl_cstates),
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(x86cpu, intel_cstates_match);
|
||||
|
||||
@@ -1833,6 +1833,7 @@ static const struct x86_cpu_id intel_uncore_match[] __initconst = {
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &adl_uncore_init),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, &adl_uncore_init),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(SAPPHIRERAPIDS_X, &spr_uncore_init),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(EMERALDRAPIDS_X, &spr_uncore_init),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ATOM_TREMONT_D, &snr_uncore_init),
|
||||
{},
|
||||
};
|
||||
|
||||
@@ -69,6 +69,7 @@ static bool test_intel(int idx, void *data)
|
||||
case INTEL_FAM6_BROADWELL_G:
|
||||
case INTEL_FAM6_BROADWELL_X:
|
||||
case INTEL_FAM6_SAPPHIRERAPIDS_X:
|
||||
case INTEL_FAM6_EMERALDRAPIDS_X:
|
||||
|
||||
case INTEL_FAM6_ATOM_SILVERMONT:
|
||||
case INTEL_FAM6_ATOM_SILVERMONT_D:
|
||||
@@ -107,6 +108,8 @@ static bool test_intel(int idx, void *data)
|
||||
case INTEL_FAM6_RAPTORLAKE:
|
||||
case INTEL_FAM6_RAPTORLAKE_P:
|
||||
case INTEL_FAM6_RAPTORLAKE_S:
|
||||
case INTEL_FAM6_METEORLAKE:
|
||||
case INTEL_FAM6_METEORLAKE_L:
|
||||
if (idx == PERF_MSR_SMI || idx == PERF_MSR_PPERF)
|
||||
return true;
|
||||
break;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <asm/mmu.h>
|
||||
#include <asm/mpspec.h>
|
||||
#include <asm/x86_init.h>
|
||||
#include <asm/cpufeature.h>
|
||||
|
||||
#ifdef CONFIG_ACPI_APEI
|
||||
# include <asm/pgtable_types.h>
|
||||
@@ -63,6 +64,13 @@ extern int (*acpi_suspend_lowlevel)(void);
|
||||
/* Physical address to resume after wakeup */
|
||||
unsigned long acpi_get_wakeup_address(void);
|
||||
|
||||
static inline bool acpi_skip_set_wakeup_address(void)
|
||||
{
|
||||
return cpu_feature_enabled(X86_FEATURE_XENPV);
|
||||
}
|
||||
|
||||
#define acpi_skip_set_wakeup_address acpi_skip_set_wakeup_address
|
||||
|
||||
/*
|
||||
* Check if the CPU can handle C2 and deeper
|
||||
*/
|
||||
|
||||
@@ -571,6 +571,26 @@
|
||||
#define MSR_AMD64_SEV_ES_ENABLED BIT_ULL(MSR_AMD64_SEV_ES_ENABLED_BIT)
|
||||
#define MSR_AMD64_SEV_SNP_ENABLED BIT_ULL(MSR_AMD64_SEV_SNP_ENABLED_BIT)
|
||||
|
||||
/* SNP feature bits enabled by the hypervisor */
|
||||
#define MSR_AMD64_SNP_VTOM BIT_ULL(3)
|
||||
#define MSR_AMD64_SNP_REFLECT_VC BIT_ULL(4)
|
||||
#define MSR_AMD64_SNP_RESTRICTED_INJ BIT_ULL(5)
|
||||
#define MSR_AMD64_SNP_ALT_INJ BIT_ULL(6)
|
||||
#define MSR_AMD64_SNP_DEBUG_SWAP BIT_ULL(7)
|
||||
#define MSR_AMD64_SNP_PREVENT_HOST_IBS BIT_ULL(8)
|
||||
#define MSR_AMD64_SNP_BTB_ISOLATION BIT_ULL(9)
|
||||
#define MSR_AMD64_SNP_VMPL_SSS BIT_ULL(10)
|
||||
#define MSR_AMD64_SNP_SECURE_TSC BIT_ULL(11)
|
||||
#define MSR_AMD64_SNP_VMGEXIT_PARAM BIT_ULL(12)
|
||||
#define MSR_AMD64_SNP_IBS_VIRT BIT_ULL(14)
|
||||
#define MSR_AMD64_SNP_VMSA_REG_PROTECTION BIT_ULL(16)
|
||||
#define MSR_AMD64_SNP_SMT_PROTECTION BIT_ULL(17)
|
||||
|
||||
/* SNP feature bits reserved for future use. */
|
||||
#define MSR_AMD64_SNP_RESERVED_BIT13 BIT_ULL(13)
|
||||
#define MSR_AMD64_SNP_RESERVED_BIT15 BIT_ULL(15)
|
||||
#define MSR_AMD64_SNP_RESERVED_MASK GENMASK_ULL(63, 18)
|
||||
|
||||
#define MSR_AMD64_VIRT_SPEC_CTRL 0xc001011f
|
||||
|
||||
/* AMD Collaborative Processor Performance Control MSRs */
|
||||
|
||||
@@ -116,6 +116,12 @@
|
||||
#define SVM_VMGEXIT_AP_CREATE 1
|
||||
#define SVM_VMGEXIT_AP_DESTROY 2
|
||||
#define SVM_VMGEXIT_HV_FEATURES 0x8000fffd
|
||||
#define SVM_VMGEXIT_TERM_REQUEST 0x8000fffe
|
||||
#define SVM_VMGEXIT_TERM_REASON(reason_set, reason_code) \
|
||||
/* SW_EXITINFO1[3:0] */ \
|
||||
(((((u64)reason_set) & 0xf)) | \
|
||||
/* SW_EXITINFO1[11:4] */ \
|
||||
((((u64)reason_code) & 0xff) << 4))
|
||||
#define SVM_VMGEXIT_UNSUPPORTED_EVENT 0x8000ffff
|
||||
|
||||
/* Exit code reserved for hypervisor/software use */
|
||||
|
||||
@@ -114,6 +114,7 @@ static void make_8259A_irq(unsigned int irq)
|
||||
disable_irq_nosync(irq);
|
||||
io_apic_irqs &= ~(1<<irq);
|
||||
irq_set_chip_and_handler(irq, &i8259A_chip, handle_level_irq);
|
||||
irq_set_status_flags(irq, IRQ_LEVEL);
|
||||
enable_irq(irq);
|
||||
lapic_assign_legacy_vector(irq, true);
|
||||
}
|
||||
|
||||
@@ -65,8 +65,10 @@ void __init init_ISA_irqs(void)
|
||||
|
||||
legacy_pic->init(0);
|
||||
|
||||
for (i = 0; i < nr_legacy_irqs(); i++)
|
||||
for (i = 0; i < nr_legacy_irqs(); i++) {
|
||||
irq_set_chip_and_handler(i, chip, handle_level_irq);
|
||||
irq_set_status_flags(i, IRQ_LEVEL);
|
||||
}
|
||||
}
|
||||
|
||||
void __init init_IRQ(void)
|
||||
|
||||
@@ -3412,18 +3412,15 @@ static u32 vmx_segment_access_rights(struct kvm_segment *var)
|
||||
{
|
||||
u32 ar;
|
||||
|
||||
if (var->unusable || !var->present)
|
||||
ar = 1 << 16;
|
||||
else {
|
||||
ar = var->type & 15;
|
||||
ar |= (var->s & 1) << 4;
|
||||
ar |= (var->dpl & 3) << 5;
|
||||
ar |= (var->present & 1) << 7;
|
||||
ar |= (var->avl & 1) << 12;
|
||||
ar |= (var->l & 1) << 13;
|
||||
ar |= (var->db & 1) << 14;
|
||||
ar |= (var->g & 1) << 15;
|
||||
}
|
||||
ar = var->type & 15;
|
||||
ar |= (var->s & 1) << 4;
|
||||
ar |= (var->dpl & 3) << 5;
|
||||
ar |= (var->present & 1) << 7;
|
||||
ar |= (var->avl & 1) << 12;
|
||||
ar |= (var->l & 1) << 13;
|
||||
ar |= (var->db & 1) << 14;
|
||||
ar |= (var->g & 1) << 15;
|
||||
ar |= (var->unusable || !var->present) << 16;
|
||||
|
||||
return ar;
|
||||
}
|
||||
|
||||
@@ -432,6 +432,13 @@ static const struct dmi_system_id asus_laptop[] = {
|
||||
DMI_MATCH(DMI_BOARD_NAME, "S5602ZA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Asus ExpertBook B2402CBA",
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "B2402CBA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.ident = "Asus ExpertBook B2502",
|
||||
.matches = {
|
||||
|
||||
@@ -60,13 +60,17 @@ static struct notifier_block tts_notifier = {
|
||||
.priority = 0,
|
||||
};
|
||||
|
||||
#ifndef acpi_skip_set_wakeup_address
|
||||
#define acpi_skip_set_wakeup_address() false
|
||||
#endif
|
||||
|
||||
static int acpi_sleep_prepare(u32 acpi_state)
|
||||
{
|
||||
#ifdef CONFIG_ACPI_SLEEP
|
||||
unsigned long acpi_wakeup_address;
|
||||
|
||||
/* do we have a wakeup address for S2 and S3? */
|
||||
if (acpi_state == ACPI_STATE_S3) {
|
||||
if (acpi_state == ACPI_STATE_S3 && !acpi_skip_set_wakeup_address()) {
|
||||
acpi_wakeup_address = acpi_get_wakeup_address();
|
||||
if (!acpi_wakeup_address)
|
||||
return -EFAULT;
|
||||
|
||||
@@ -110,26 +110,6 @@ static bool nvidia_wmi_ec_supported(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool apple_gmux_backlight_present(void)
|
||||
{
|
||||
struct acpi_device *adev;
|
||||
struct device *dev;
|
||||
|
||||
adev = acpi_dev_get_first_match_dev(GMUX_ACPI_HID, NULL, -1);
|
||||
if (!adev)
|
||||
return false;
|
||||
|
||||
dev = acpi_get_first_physical_node(adev);
|
||||
if (!dev)
|
||||
return false;
|
||||
|
||||
/*
|
||||
* drivers/platform/x86/apple-gmux.c only supports old style
|
||||
* Apple GMUX with an IO-resource.
|
||||
*/
|
||||
return pnp_get_resource(to_pnp_dev(dev), IORESOURCE_IO, 0) != NULL;
|
||||
}
|
||||
|
||||
/* Force to use vendor driver when the ACPI device is known to be
|
||||
* buggy */
|
||||
static int video_detect_force_vendor(const struct dmi_system_id *d)
|
||||
@@ -600,6 +580,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "GA503"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
/* Asus U46E */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "U46E"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
/* Asus UX303UB */
|
||||
@@ -608,6 +596,23 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "UX303UB"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
/* HP EliteBook 8460p */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8460p"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
/* HP Pavilion g6-1d80nr / B4U19UA */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
|
||||
DMI_MATCH(DMI_PRODUCT_SKU, "B4U19UA"),
|
||||
},
|
||||
},
|
||||
{
|
||||
.callback = video_detect_force_native,
|
||||
/* Samsung N150P */
|
||||
@@ -756,6 +761,7 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
|
||||
{
|
||||
static DEFINE_MUTEX(init_mutex);
|
||||
static bool nvidia_wmi_ec_present;
|
||||
static bool apple_gmux_present;
|
||||
static bool native_available;
|
||||
static bool init_done;
|
||||
static long video_caps;
|
||||
@@ -769,6 +775,7 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
|
||||
ACPI_UINT32_MAX, find_video, NULL,
|
||||
&video_caps, NULL);
|
||||
nvidia_wmi_ec_present = nvidia_wmi_ec_supported();
|
||||
apple_gmux_present = apple_gmux_detect(NULL, NULL);
|
||||
init_done = true;
|
||||
}
|
||||
if (native)
|
||||
@@ -790,7 +797,7 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
|
||||
if (nvidia_wmi_ec_present)
|
||||
return acpi_backlight_nvidia_wmi_ec;
|
||||
|
||||
if (apple_gmux_backlight_present())
|
||||
if (apple_gmux_present)
|
||||
return acpi_backlight_apple_gmux;
|
||||
|
||||
/* Use ACPI video if available, except when native should be preferred. */
|
||||
|
||||
@@ -650,6 +650,7 @@ config PATA_CS5530
|
||||
config PATA_CS5535
|
||||
tristate "CS5535 PATA support (Experimental)"
|
||||
depends on PCI && (X86_32 || (X86_64 && COMPILE_TEST))
|
||||
depends on !UML
|
||||
help
|
||||
This option enables support for the NatSemi/AMD CS5535
|
||||
companion chip used with the Geode processor family.
|
||||
|
||||
@@ -989,26 +989,32 @@ struct fwnode_handle *
|
||||
fwnode_graph_get_next_endpoint(const struct fwnode_handle *fwnode,
|
||||
struct fwnode_handle *prev)
|
||||
{
|
||||
struct fwnode_handle *ep, *port_parent = NULL;
|
||||
const struct fwnode_handle *parent;
|
||||
struct fwnode_handle *ep;
|
||||
|
||||
/*
|
||||
* If this function is in a loop and the previous iteration returned
|
||||
* an endpoint from fwnode->secondary, then we need to use the secondary
|
||||
* as parent rather than @fwnode.
|
||||
*/
|
||||
if (prev)
|
||||
parent = fwnode_graph_get_port_parent(prev);
|
||||
else
|
||||
if (prev) {
|
||||
port_parent = fwnode_graph_get_port_parent(prev);
|
||||
parent = port_parent;
|
||||
} else {
|
||||
parent = fwnode;
|
||||
}
|
||||
if (IS_ERR_OR_NULL(parent))
|
||||
return NULL;
|
||||
|
||||
ep = fwnode_call_ptr_op(parent, graph_get_next_endpoint, prev);
|
||||
if (ep)
|
||||
return ep;
|
||||
goto out_put_port_parent;
|
||||
|
||||
return fwnode_graph_get_next_endpoint(parent->secondary, NULL);
|
||||
ep = fwnode_graph_get_next_endpoint(parent->secondary, NULL);
|
||||
|
||||
out_put_port_parent:
|
||||
fwnode_handle_put(port_parent);
|
||||
return ep;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fwnode_graph_get_next_endpoint);
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ static int __init test_async_probe_init(void)
|
||||
calltime = ktime_get();
|
||||
for_each_online_cpu(cpu) {
|
||||
nid = cpu_to_node(cpu);
|
||||
pdev = &sync_dev[sync_id];
|
||||
pdev = &async_dev[async_id];
|
||||
|
||||
*pdev = test_platform_device_register_node("test_async_driver",
|
||||
async_id,
|
||||
|
||||
@@ -1440,7 +1440,7 @@ static struct rnbd_clt_dev *init_dev(struct rnbd_clt_session *sess,
|
||||
goto out_alloc;
|
||||
}
|
||||
|
||||
ret = ida_alloc_max(&index_ida, 1 << (MINORBITS - RNBD_PART_BITS),
|
||||
ret = ida_alloc_max(&index_ida, (1 << (MINORBITS - RNBD_PART_BITS)) - 1,
|
||||
GFP_KERNEL);
|
||||
if (ret < 0) {
|
||||
pr_err("Failed to initialize device '%s' from session %s, allocating idr failed, err: %d\n",
|
||||
|
||||
@@ -2092,13 +2092,12 @@ static void __exit ublk_exit(void)
|
||||
struct ublk_device *ub;
|
||||
int id;
|
||||
|
||||
class_destroy(ublk_chr_class);
|
||||
|
||||
misc_deregister(&ublk_misc);
|
||||
|
||||
idr_for_each_entry(&ublk_index_idr, ub, id)
|
||||
ublk_remove(ub);
|
||||
|
||||
class_destroy(ublk_chr_class);
|
||||
misc_deregister(&ublk_misc);
|
||||
|
||||
idr_destroy(&ublk_index_idr);
|
||||
unregister_chrdev_region(ublk_chr_devt, UBLK_MINORS);
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ static int __init armada37xx_cpufreq_driver_init(void)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
clk = clk_get(cpu_dev, 0);
|
||||
clk = clk_get(cpu_dev, NULL);
|
||||
if (IS_ERR(clk)) {
|
||||
dev_err(cpu_dev, "Cannot get clock for CPU0\n");
|
||||
return PTR_ERR(clk);
|
||||
|
||||
@@ -487,7 +487,8 @@ static unsigned int get_perf_level_count(struct cpufreq_policy *policy)
|
||||
cpu_data = policy->driver_data;
|
||||
perf_caps = &cpu_data->perf_caps;
|
||||
max_cap = arch_scale_cpu_capacity(cpu);
|
||||
min_cap = div_u64(max_cap * perf_caps->lowest_perf, perf_caps->highest_perf);
|
||||
min_cap = div_u64((u64)max_cap * perf_caps->lowest_perf,
|
||||
perf_caps->highest_perf);
|
||||
if ((min_cap == 0) || (max_cap < min_cap))
|
||||
return 0;
|
||||
return 1 + max_cap / CPPC_EM_CAP_STEP - min_cap / CPPC_EM_CAP_STEP;
|
||||
@@ -519,10 +520,10 @@ static int cppc_get_cpu_power(struct device *cpu_dev,
|
||||
cpu_data = policy->driver_data;
|
||||
perf_caps = &cpu_data->perf_caps;
|
||||
max_cap = arch_scale_cpu_capacity(cpu_dev->id);
|
||||
min_cap = div_u64(max_cap * perf_caps->lowest_perf,
|
||||
perf_caps->highest_perf);
|
||||
|
||||
perf_step = CPPC_EM_CAP_STEP * perf_caps->highest_perf / max_cap;
|
||||
min_cap = div_u64((u64)max_cap * perf_caps->lowest_perf,
|
||||
perf_caps->highest_perf);
|
||||
perf_step = div_u64((u64)CPPC_EM_CAP_STEP * perf_caps->highest_perf,
|
||||
max_cap);
|
||||
min_step = min_cap / CPPC_EM_CAP_STEP;
|
||||
max_step = max_cap / CPPC_EM_CAP_STEP;
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ static const struct of_device_id blocklist[] __initconst = {
|
||||
{ .compatible = "nvidia,tegra30", },
|
||||
{ .compatible = "nvidia,tegra124", },
|
||||
{ .compatible = "nvidia,tegra210", },
|
||||
{ .compatible = "nvidia,tegra234", },
|
||||
|
||||
{ .compatible = "qcom,apq8096", },
|
||||
{ .compatible = "qcom,msm8996", },
|
||||
@@ -148,6 +149,7 @@ static const struct of_device_id blocklist[] __initconst = {
|
||||
{ .compatible = "qcom,sdm845", },
|
||||
{ .compatible = "qcom,sm6115", },
|
||||
{ .compatible = "qcom,sm6350", },
|
||||
{ .compatible = "qcom,sm6375", },
|
||||
{ .compatible = "qcom,sm8150", },
|
||||
{ .compatible = "qcom,sm8250", },
|
||||
{ .compatible = "qcom,sm8350", },
|
||||
|
||||
@@ -451,7 +451,8 @@ static int dma_chan_get(struct dma_chan *chan)
|
||||
/* The channel is already in use, update client count */
|
||||
if (chan->client_count) {
|
||||
__module_get(owner);
|
||||
goto out;
|
||||
chan->client_count++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!try_module_get(owner))
|
||||
@@ -470,11 +471,11 @@ static int dma_chan_get(struct dma_chan *chan)
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
chan->client_count++;
|
||||
|
||||
if (!dma_has_cap(DMA_PRIVATE, chan->device->cap_mask))
|
||||
balance_ref_count(chan);
|
||||
|
||||
out:
|
||||
chan->client_count++;
|
||||
return 0;
|
||||
|
||||
err_out:
|
||||
|
||||
@@ -71,12 +71,13 @@ static int pt_core_execute_cmd(struct ptdma_desc *desc, struct pt_cmd_queue *cmd
|
||||
bool soc = FIELD_GET(DWORD0_SOC, desc->dw0);
|
||||
u8 *q_desc = (u8 *)&cmd_q->qbase[cmd_q->qidx];
|
||||
u32 tail;
|
||||
unsigned long flags;
|
||||
|
||||
if (soc) {
|
||||
desc->dw0 |= FIELD_PREP(DWORD0_IOC, desc->dw0);
|
||||
desc->dw0 &= ~DWORD0_SOC;
|
||||
}
|
||||
mutex_lock(&cmd_q->q_mutex);
|
||||
spin_lock_irqsave(&cmd_q->q_lock, flags);
|
||||
|
||||
/* Copy 32-byte command descriptor to hw queue. */
|
||||
memcpy(q_desc, desc, 32);
|
||||
@@ -91,7 +92,7 @@ static int pt_core_execute_cmd(struct ptdma_desc *desc, struct pt_cmd_queue *cmd
|
||||
|
||||
/* Turn the queue back on using our cached control register */
|
||||
pt_start_queue(cmd_q);
|
||||
mutex_unlock(&cmd_q->q_mutex);
|
||||
spin_unlock_irqrestore(&cmd_q->q_lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -199,7 +200,7 @@ int pt_core_init(struct pt_device *pt)
|
||||
|
||||
cmd_q->pt = pt;
|
||||
cmd_q->dma_pool = dma_pool;
|
||||
mutex_init(&cmd_q->q_mutex);
|
||||
spin_lock_init(&cmd_q->q_lock);
|
||||
|
||||
/* Page alignment satisfies our needs for N <= 128 */
|
||||
cmd_q->qsize = Q_SIZE(Q_DESC_SIZE);
|
||||
|
||||
@@ -196,7 +196,7 @@ struct pt_cmd_queue {
|
||||
struct ptdma_desc *qbase;
|
||||
|
||||
/* Aligned queue start address (per requirement) */
|
||||
struct mutex q_mutex ____cacheline_aligned;
|
||||
spinlock_t q_lock ____cacheline_aligned;
|
||||
unsigned int qidx;
|
||||
|
||||
unsigned int qsize;
|
||||
|
||||
@@ -1756,6 +1756,7 @@ static int gpi_create_spi_tre(struct gchan *chan, struct gpi_desc *desc,
|
||||
tre->dword[3] = u32_encode_bits(TRE_TYPE_GO, TRE_FLAGS_TYPE);
|
||||
if (spi->cmd == SPI_RX) {
|
||||
tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOB);
|
||||
tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_LINK);
|
||||
} else if (spi->cmd == SPI_TX) {
|
||||
tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN);
|
||||
} else { /* SPI_DUPLEX */
|
||||
|
||||
@@ -707,6 +707,7 @@ static int tegra_dma_terminate_all(struct dma_chan *dc)
|
||||
return err;
|
||||
}
|
||||
|
||||
vchan_terminate_vdesc(&tdc->dma_desc->vd);
|
||||
tegra_dma_disable(tdc);
|
||||
tdc->dma_desc = NULL;
|
||||
}
|
||||
|
||||
@@ -761,11 +761,12 @@ static void udma_decrement_byte_counters(struct udma_chan *uc, u32 val)
|
||||
if (uc->desc->dir == DMA_DEV_TO_MEM) {
|
||||
udma_rchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val);
|
||||
udma_rchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val);
|
||||
udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val);
|
||||
if (uc->config.ep_type != PSIL_EP_NATIVE)
|
||||
udma_rchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val);
|
||||
} else {
|
||||
udma_tchanrt_write(uc, UDMA_CHAN_RT_BCNT_REG, val);
|
||||
udma_tchanrt_write(uc, UDMA_CHAN_RT_SBCNT_REG, val);
|
||||
if (!uc->bchan)
|
||||
if (!uc->bchan && uc->config.ep_type != PSIL_EP_NATIVE)
|
||||
udma_tchanrt_write(uc, UDMA_CHAN_RT_PEER_BCNT_REG, val);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3141,8 +3141,10 @@ static int xilinx_dma_probe(struct platform_device *pdev)
|
||||
/* Initialize the channels */
|
||||
for_each_child_of_node(node, child) {
|
||||
err = xilinx_dma_child_probe(xdev, child);
|
||||
if (err < 0)
|
||||
if (err < 0) {
|
||||
of_node_put(child);
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
if (xdev->dma_config->dmatype == XDMA_TYPE_VDMA) {
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
static DEFINE_MUTEX(device_ctls_mutex);
|
||||
static LIST_HEAD(edac_device_list);
|
||||
|
||||
/* Default workqueue processing interval on this instance, in msecs */
|
||||
#define DEFAULT_POLL_INTERVAL 1000
|
||||
|
||||
#ifdef CONFIG_EDAC_DEBUG
|
||||
static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev)
|
||||
{
|
||||
@@ -336,7 +339,7 @@ static void edac_device_workq_function(struct work_struct *work_req)
|
||||
* whole one second to save timers firing all over the period
|
||||
* between integral seconds
|
||||
*/
|
||||
if (edac_dev->poll_msec == 1000)
|
||||
if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)
|
||||
edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
|
||||
else
|
||||
edac_queue_work(&edac_dev->work, edac_dev->delay);
|
||||
@@ -366,7 +369,7 @@ static void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev,
|
||||
* timers firing on sub-second basis, while they are happy
|
||||
* to fire together on the 1 second exactly
|
||||
*/
|
||||
if (edac_dev->poll_msec == 1000)
|
||||
if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)
|
||||
edac_queue_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
|
||||
else
|
||||
edac_queue_work(&edac_dev->work, edac_dev->delay);
|
||||
@@ -400,7 +403,7 @@ void edac_device_reset_delay_period(struct edac_device_ctl_info *edac_dev,
|
||||
edac_dev->delay = msecs_to_jiffies(msec);
|
||||
|
||||
/* See comment in edac_device_workq_setup() above */
|
||||
if (edac_dev->poll_msec == 1000)
|
||||
if (edac_dev->poll_msec == DEFAULT_POLL_INTERVAL)
|
||||
edac_mod_work(&edac_dev->work, round_jiffies_relative(edac_dev->delay));
|
||||
else
|
||||
edac_mod_work(&edac_dev->work, edac_dev->delay);
|
||||
@@ -442,11 +445,7 @@ int edac_device_add_device(struct edac_device_ctl_info *edac_dev)
|
||||
/* This instance is NOW RUNNING */
|
||||
edac_dev->op_state = OP_RUNNING_POLL;
|
||||
|
||||
/*
|
||||
* enable workq processing on this instance,
|
||||
* default = 1000 msec
|
||||
*/
|
||||
edac_device_workq_setup(edac_dev, 1000);
|
||||
edac_device_workq_setup(edac_dev, edac_dev->poll_msec ?: DEFAULT_POLL_INTERVAL);
|
||||
} else {
|
||||
edac_dev->op_state = OP_RUNNING_INTERRUPT;
|
||||
}
|
||||
|
||||
@@ -174,8 +174,10 @@ static int highbank_mc_probe(struct platform_device *pdev)
|
||||
drvdata = mci->pvt_info;
|
||||
platform_set_drvdata(pdev, mci);
|
||||
|
||||
if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL))
|
||||
return -ENOMEM;
|
||||
if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) {
|
||||
res = -ENOMEM;
|
||||
goto free;
|
||||
}
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!r) {
|
||||
@@ -243,6 +245,7 @@ err2:
|
||||
edac_mc_del_mc(&pdev->dev);
|
||||
err:
|
||||
devres_release_group(&pdev->dev, NULL);
|
||||
free:
|
||||
edac_mc_free(mci);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ clear:
|
||||
static int
|
||||
dump_syn_reg(struct edac_device_ctl_info *edev_ctl, int err_type, u32 bank)
|
||||
{
|
||||
struct llcc_drv_data *drv = edev_ctl->pvt_info;
|
||||
struct llcc_drv_data *drv = edev_ctl->dev->platform_data;
|
||||
int ret;
|
||||
|
||||
ret = dump_syn_reg_values(drv, bank, err_type);
|
||||
@@ -289,7 +289,7 @@ static irqreturn_t
|
||||
llcc_ecc_irq_handler(int irq, void *edev_ctl)
|
||||
{
|
||||
struct edac_device_ctl_info *edac_dev_ctl = edev_ctl;
|
||||
struct llcc_drv_data *drv = edac_dev_ctl->pvt_info;
|
||||
struct llcc_drv_data *drv = edac_dev_ctl->dev->platform_data;
|
||||
irqreturn_t irq_rc = IRQ_NONE;
|
||||
u32 drp_error, trp_error, i;
|
||||
int ret;
|
||||
@@ -358,7 +358,6 @@ static int qcom_llcc_edac_probe(struct platform_device *pdev)
|
||||
edev_ctl->dev_name = dev_name(dev);
|
||||
edev_ctl->ctl_name = "llcc";
|
||||
edev_ctl->panic_on_ue = LLCC_ERP_PANIC_ON_UE;
|
||||
edev_ctl->pvt_info = llcc_driv_data;
|
||||
|
||||
rc = edac_device_add_device(edev_ctl);
|
||||
if (rc)
|
||||
|
||||
@@ -81,10 +81,11 @@ u32 shmem_read_header(struct scmi_shared_mem __iomem *shmem)
|
||||
void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem,
|
||||
struct scmi_xfer *xfer)
|
||||
{
|
||||
size_t len = ioread32(&shmem->length);
|
||||
|
||||
xfer->hdr.status = ioread32(shmem->msg_payload);
|
||||
/* Skip the length of header and status in shmem area i.e 8 bytes */
|
||||
xfer->rx.len = min_t(size_t, xfer->rx.len,
|
||||
ioread32(&shmem->length) - 8);
|
||||
xfer->rx.len = min_t(size_t, xfer->rx.len, len > 8 ? len - 8 : 0);
|
||||
|
||||
/* Take a copy to the rx buffer.. */
|
||||
memcpy_fromio(xfer->rx.buf, shmem->msg_payload + 4, xfer->rx.len);
|
||||
@@ -93,8 +94,10 @@ void shmem_fetch_response(struct scmi_shared_mem __iomem *shmem,
|
||||
void shmem_fetch_notification(struct scmi_shared_mem __iomem *shmem,
|
||||
size_t max_len, struct scmi_xfer *xfer)
|
||||
{
|
||||
size_t len = ioread32(&shmem->length);
|
||||
|
||||
/* Skip only the length of header in shmem area i.e 4 bytes */
|
||||
xfer->rx.len = min_t(size_t, max_len, ioread32(&shmem->length) - 4);
|
||||
xfer->rx.len = min_t(size_t, max_len, len > 4 ? len - 4 : 0);
|
||||
|
||||
/* Take a copy to the rx buffer.. */
|
||||
memcpy_fromio(xfer->rx.buf, shmem->msg_payload, xfer->rx.len);
|
||||
|
||||
@@ -160,7 +160,6 @@ static void scmi_vio_channel_cleanup_sync(struct scmi_vio_channel *vioch)
|
||||
}
|
||||
|
||||
vioch->shutdown_done = &vioch_shutdown_done;
|
||||
virtio_break_device(vioch->vqueue->vdev);
|
||||
if (!vioch->is_rx && vioch->deferred_tx_wq)
|
||||
/* Cannot be kicked anymore after this...*/
|
||||
vioch->deferred_tx_wq = NULL;
|
||||
@@ -482,6 +481,12 @@ static int virtio_chan_free(int id, void *p, void *data)
|
||||
struct scmi_chan_info *cinfo = p;
|
||||
struct scmi_vio_channel *vioch = cinfo->transport_info;
|
||||
|
||||
/*
|
||||
* Break device to inhibit further traffic flowing while shutting down
|
||||
* the channels: doing it later holding vioch->lock creates unsafe
|
||||
* locking dependency chains as reported by LOCKDEP.
|
||||
*/
|
||||
virtio_break_device(vioch->vqueue->vdev);
|
||||
scmi_vio_channel_cleanup_sync(vioch);
|
||||
|
||||
scmi_free_channel(cinfo, data, id);
|
||||
|
||||
@@ -84,6 +84,7 @@ struct efi_runtime_work efi_rts_work;
|
||||
else \
|
||||
pr_err("Failed to queue work to efi_rts_wq.\n"); \
|
||||
\
|
||||
WARN_ON_ONCE(efi_rts_work.status == EFI_ABORTED); \
|
||||
exit: \
|
||||
efi_rts_work.efi_rts_id = EFI_NONE; \
|
||||
efi_rts_work.status; \
|
||||
|
||||
@@ -93,7 +93,12 @@ static int coreboot_table_populate(struct device *dev, void *ptr)
|
||||
for (i = 0; i < header->table_entries; i++) {
|
||||
entry = ptr_entry;
|
||||
|
||||
device = kzalloc(sizeof(struct device) + entry->size, GFP_KERNEL);
|
||||
if (entry->size < sizeof(*entry)) {
|
||||
dev_warn(dev, "coreboot table entry too small!\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
device = kzalloc(sizeof(device->dev) + entry->size, GFP_KERNEL);
|
||||
if (!device)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -101,7 +106,7 @@ static int coreboot_table_populate(struct device *dev, void *ptr)
|
||||
device->dev.parent = dev;
|
||||
device->dev.bus = &coreboot_bus_type;
|
||||
device->dev.release = coreboot_device_release;
|
||||
memcpy(&device->entry, ptr_entry, entry->size);
|
||||
memcpy(device->raw, ptr_entry, entry->size);
|
||||
|
||||
ret = device_register(&device->dev);
|
||||
if (ret) {
|
||||
|
||||
@@ -66,6 +66,7 @@ struct coreboot_device {
|
||||
struct coreboot_table_entry entry;
|
||||
struct lb_cbmem_ref cbmem_ref;
|
||||
struct lb_framebuffer framebuffer;
|
||||
DECLARE_FLEX_ARRAY(u8, raw);
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ static void ep93xx_gpio_f_irq_handler(struct irq_desc *desc)
|
||||
*/
|
||||
struct irq_chip *irqchip = irq_desc_get_chip(desc);
|
||||
unsigned int irq = irq_desc_get_irq(desc);
|
||||
int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */
|
||||
int port_f_idx = (irq & 7) ^ 4; /* {20..23,48..51} -> {0..7} */
|
||||
int gpio_irq = EP93XX_GPIO_F_IRQ_BASE + port_f_idx;
|
||||
|
||||
chained_irq_enter(irqchip, desc);
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/module.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/syscore_ops.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
#include <linux/of.h>
|
||||
@@ -147,6 +148,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)
|
||||
{
|
||||
struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
|
||||
struct mxc_gpio_port *port = gc->private;
|
||||
unsigned long flags;
|
||||
u32 bit, val;
|
||||
u32 gpio_idx = d->hwirq;
|
||||
int edge;
|
||||
@@ -185,6 +187,8 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
raw_spin_lock_irqsave(&port->gc.bgpio_lock, flags);
|
||||
|
||||
if (GPIO_EDGE_SEL >= 0) {
|
||||
val = readl(port->base + GPIO_EDGE_SEL);
|
||||
if (edge == GPIO_INT_BOTH_EDGES)
|
||||
@@ -204,15 +208,20 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)
|
||||
|
||||
writel(1 << gpio_idx, port->base + GPIO_ISR);
|
||||
|
||||
return 0;
|
||||
raw_spin_unlock_irqrestore(&port->gc.bgpio_lock, flags);
|
||||
|
||||
return port->gc.direction_input(&port->gc, gpio_idx);
|
||||
}
|
||||
|
||||
static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio)
|
||||
{
|
||||
void __iomem *reg = port->base;
|
||||
unsigned long flags;
|
||||
u32 bit, val;
|
||||
int edge;
|
||||
|
||||
raw_spin_lock_irqsave(&port->gc.bgpio_lock, flags);
|
||||
|
||||
reg += GPIO_ICR1 + ((gpio & 0x10) >> 2); /* lower or upper register */
|
||||
bit = gpio & 0xf;
|
||||
val = readl(reg);
|
||||
@@ -227,9 +236,12 @@ static void mxc_flip_edge(struct mxc_gpio_port *port, u32 gpio)
|
||||
} else {
|
||||
pr_err("mxc: invalid configuration for GPIO %d: %x\n",
|
||||
gpio, edge);
|
||||
return;
|
||||
goto unlock;
|
||||
}
|
||||
writel(val | (edge << (bit << 1)), reg);
|
||||
|
||||
unlock:
|
||||
raw_spin_unlock_irqrestore(&port->gc.bgpio_lock, flags);
|
||||
}
|
||||
|
||||
/* handle 32 interrupts in one status register */
|
||||
|
||||
@@ -2130,7 +2130,7 @@ int amdgpu_amdkfd_map_gtt_bo_to_gart(struct amdgpu_device *adev, struct amdgpu_b
|
||||
}
|
||||
|
||||
amdgpu_amdkfd_remove_eviction_fence(
|
||||
bo, bo->kfd_bo->process_info->eviction_fence);
|
||||
bo, bo->vm_bo->vm->process_info->eviction_fence);
|
||||
|
||||
amdgpu_bo_unreserve(bo);
|
||||
|
||||
|
||||
@@ -586,10 +586,14 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device *adev, bool enable)
|
||||
if (adev->gfx.gfx_off_req_count == 0 &&
|
||||
!adev->gfx.gfx_off_state) {
|
||||
/* If going to s2idle, no need to wait */
|
||||
if (adev->in_s0ix)
|
||||
delay = GFX_OFF_NO_DELAY;
|
||||
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
|
||||
if (adev->in_s0ix) {
|
||||
if (!amdgpu_dpm_set_powergating_by_smu(adev,
|
||||
AMD_IP_BLOCK_TYPE_GFX, true))
|
||||
adev->gfx.gfx_off_state = true;
|
||||
} else {
|
||||
schedule_delayed_work(&adev->gfx.gfx_off_delay_work,
|
||||
delay);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (adev->gfx.gfx_off_req_count == 0) {
|
||||
|
||||
@@ -192,7 +192,6 @@ static int mes_v11_0_add_hw_queue(struct amdgpu_mes *mes,
|
||||
mes_add_queue_pkt.trap_handler_addr = input->tba_addr;
|
||||
mes_add_queue_pkt.tma_addr = input->tma_addr;
|
||||
mes_add_queue_pkt.is_kfd_process = input->is_kfd_process;
|
||||
mes_add_queue_pkt.trap_en = 1;
|
||||
|
||||
/* For KFD, gds_size is re-used for queue size (needed in MES for AQL queues) */
|
||||
mes_add_queue_pkt.is_aql_queue = input->is_aql_queue;
|
||||
|
||||
@@ -200,7 +200,7 @@ static int add_queue_mes(struct device_queue_manager *dqm, struct queue *q,
|
||||
queue_input.wptr_addr = (uint64_t)q->properties.write_ptr;
|
||||
|
||||
if (q->wptr_bo) {
|
||||
wptr_addr_off = (uint64_t)q->properties.write_ptr - (uint64_t)q->wptr_bo->kfd_bo->va;
|
||||
wptr_addr_off = (uint64_t)q->properties.write_ptr & (PAGE_SIZE - 1);
|
||||
queue_input.wptr_mc_addr = ((uint64_t)q->wptr_bo->tbo.resource->start << PAGE_SHIFT) + wptr_addr_off;
|
||||
}
|
||||
|
||||
|
||||
@@ -570,6 +570,15 @@ svm_range_vram_node_new(struct amdgpu_device *adev, struct svm_range *prange,
|
||||
goto reserve_bo_failed;
|
||||
}
|
||||
|
||||
if (clear) {
|
||||
r = amdgpu_bo_sync_wait(bo, AMDGPU_FENCE_OWNER_KFD, false);
|
||||
if (r) {
|
||||
pr_debug("failed %d to sync bo\n", r);
|
||||
amdgpu_bo_unreserve(bo);
|
||||
goto reserve_bo_failed;
|
||||
}
|
||||
}
|
||||
|
||||
r = dma_resv_reserve_fences(bo->tbo.base.resv, 1);
|
||||
if (r) {
|
||||
pr_debug("failed %d to reserve bo\n", r);
|
||||
|
||||
@@ -1737,10 +1737,6 @@ static void amdgpu_dm_fini(struct amdgpu_device *adev)
|
||||
adev->dm.vblank_control_workqueue = NULL;
|
||||
}
|
||||
|
||||
for (i = 0; i < adev->dm.display_indexes_num; i++) {
|
||||
drm_encoder_cleanup(&adev->dm.mst_encoders[i].base);
|
||||
}
|
||||
|
||||
amdgpu_dm_destroy_drm_device(&adev->dm);
|
||||
|
||||
#if defined(CONFIG_DRM_AMD_SECURE_DISPLAY)
|
||||
@@ -9404,6 +9400,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||
bool lock_and_validation_needed = false;
|
||||
struct dm_crtc_state *dm_old_crtc_state, *dm_new_crtc_state;
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
struct drm_dp_mst_topology_mgr *mgr;
|
||||
struct drm_dp_mst_topology_state *mst_state;
|
||||
struct dsc_mst_fairness_vars vars[MAX_PIPES];
|
||||
#endif
|
||||
|
||||
@@ -9652,6 +9650,28 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
|
||||
lock_and_validation_needed = true;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
/* set the slot info for each mst_state based on the link encoding format */
|
||||
for_each_new_mst_mgr_in_state(state, mgr, mst_state, i) {
|
||||
struct amdgpu_dm_connector *aconnector;
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_list_iter iter;
|
||||
u8 link_coding_cap;
|
||||
|
||||
drm_connector_list_iter_begin(dev, &iter);
|
||||
drm_for_each_connector_iter(connector, &iter) {
|
||||
if (connector->index == mst_state->mgr->conn_base_id) {
|
||||
aconnector = to_amdgpu_dm_connector(connector);
|
||||
link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
|
||||
drm_dp_mst_update_slots(mst_state, link_coding_cap);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
drm_connector_list_iter_end(&iter);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Streams and planes are reset when there are changes that affect
|
||||
* bandwidth. Anything that affects bandwidth needs to go through
|
||||
|
||||
@@ -120,23 +120,50 @@ enum dc_edid_status dm_helpers_parse_edid_caps(
|
||||
}
|
||||
|
||||
static void
|
||||
fill_dc_mst_payload_table_from_drm(struct drm_dp_mst_topology_state *mst_state,
|
||||
struct amdgpu_dm_connector *aconnector,
|
||||
fill_dc_mst_payload_table_from_drm(struct dc_link *link,
|
||||
bool enable,
|
||||
struct drm_dp_mst_atomic_payload *target_payload,
|
||||
struct dc_dp_mst_stream_allocation_table *table)
|
||||
{
|
||||
struct dc_dp_mst_stream_allocation_table new_table = { 0 };
|
||||
struct dc_dp_mst_stream_allocation *sa;
|
||||
struct drm_dp_mst_atomic_payload *payload;
|
||||
struct link_mst_stream_allocation_table copy_of_link_table =
|
||||
link->mst_stream_alloc_table;
|
||||
|
||||
int i;
|
||||
int current_hw_table_stream_cnt = copy_of_link_table.stream_count;
|
||||
struct link_mst_stream_allocation *dc_alloc;
|
||||
|
||||
/* TODO: refactor to set link->mst_stream_alloc_table directly if possible.*/
|
||||
if (enable) {
|
||||
dc_alloc =
|
||||
©_of_link_table.stream_allocations[current_hw_table_stream_cnt];
|
||||
dc_alloc->vcp_id = target_payload->vcpi;
|
||||
dc_alloc->slot_count = target_payload->time_slots;
|
||||
} else {
|
||||
for (i = 0; i < copy_of_link_table.stream_count; i++) {
|
||||
dc_alloc =
|
||||
©_of_link_table.stream_allocations[i];
|
||||
|
||||
if (dc_alloc->vcp_id == target_payload->vcpi) {
|
||||
dc_alloc->vcp_id = 0;
|
||||
dc_alloc->slot_count = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
ASSERT(i != copy_of_link_table.stream_count);
|
||||
}
|
||||
|
||||
/* Fill payload info*/
|
||||
list_for_each_entry(payload, &mst_state->payloads, next) {
|
||||
if (payload->delete)
|
||||
continue;
|
||||
|
||||
sa = &new_table.stream_allocations[new_table.stream_count];
|
||||
sa->slot_count = payload->time_slots;
|
||||
sa->vcp_id = payload->vcpi;
|
||||
new_table.stream_count++;
|
||||
for (i = 0; i < MAX_CONTROLLER_NUM; i++) {
|
||||
dc_alloc =
|
||||
©_of_link_table.stream_allocations[i];
|
||||
if (dc_alloc->vcp_id > 0 && dc_alloc->slot_count > 0) {
|
||||
sa = &new_table.stream_allocations[new_table.stream_count];
|
||||
sa->slot_count = dc_alloc->slot_count;
|
||||
sa->vcp_id = dc_alloc->vcp_id;
|
||||
new_table.stream_count++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Overwrite the old table */
|
||||
@@ -185,7 +212,7 @@ bool dm_helpers_dp_mst_write_payload_allocation_table(
|
||||
* AUX message. The sequence is slot 1-63 allocated sequence for each
|
||||
* stream. AMD ASIC stream slot allocation should follow the same
|
||||
* sequence. copy DRM MST allocation to dc */
|
||||
fill_dc_mst_payload_table_from_drm(mst_state, aconnector, proposed_table);
|
||||
fill_dc_mst_payload_table_from_drm(stream->link, enable, payload, proposed_table);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -468,7 +468,6 @@ static const struct drm_connector_helper_funcs dm_dp_mst_connector_helper_funcs
|
||||
static void amdgpu_dm_encoder_destroy(struct drm_encoder *encoder)
|
||||
{
|
||||
drm_encoder_cleanup(encoder);
|
||||
kfree(encoder);
|
||||
}
|
||||
|
||||
static const struct drm_encoder_funcs amdgpu_dm_encoder_funcs = {
|
||||
@@ -897,11 +896,6 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
|
||||
if (IS_ERR(mst_state))
|
||||
return PTR_ERR(mst_state);
|
||||
|
||||
mst_state->pbn_div = dm_mst_get_pbn_divider(dc_link);
|
||||
#if defined(CONFIG_DRM_AMD_DC_DCN)
|
||||
drm_dp_mst_update_slots(mst_state, dc_link_dp_mst_decide_link_encoding_format(dc_link));
|
||||
#endif
|
||||
|
||||
/* Set up params */
|
||||
for (i = 0; i < dc_state->stream_count; i++) {
|
||||
struct dc_dsc_policy dsc_policy = {0};
|
||||
|
||||
@@ -3995,10 +3995,13 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
|
||||
struct fixed31_32 avg_time_slots_per_mtp = dc_fixpt_from_int(0);
|
||||
int i;
|
||||
bool mst_mode = (link->type == dc_connection_mst_branch);
|
||||
/* adjust for drm changes*/
|
||||
bool update_drm_mst_state = true;
|
||||
const struct link_hwss *link_hwss = get_link_hwss(link, &pipe_ctx->link_res);
|
||||
const struct dc_link_settings empty_link_settings = {0};
|
||||
DC_LOGGER_INIT(link->ctx->logger);
|
||||
|
||||
|
||||
/* deallocate_mst_payload is called before disable link. When mode or
|
||||
* disable/enable monitor, new stream is created which is not in link
|
||||
* stream[] yet. For this, payload is not allocated yet, so de-alloc
|
||||
@@ -4014,7 +4017,7 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
|
||||
&empty_link_settings,
|
||||
avg_time_slots_per_mtp);
|
||||
|
||||
if (mst_mode) {
|
||||
if (mst_mode || update_drm_mst_state) {
|
||||
/* when link is in mst mode, reply on mst manager to remove
|
||||
* payload
|
||||
*/
|
||||
@@ -4077,11 +4080,18 @@ static enum dc_status deallocate_mst_payload(struct pipe_ctx *pipe_ctx)
|
||||
stream->ctx,
|
||||
stream);
|
||||
|
||||
if (!update_drm_mst_state)
|
||||
dm_helpers_dp_mst_send_payload_allocation(
|
||||
stream->ctx,
|
||||
stream,
|
||||
false);
|
||||
}
|
||||
|
||||
if (update_drm_mst_state)
|
||||
dm_helpers_dp_mst_send_payload_allocation(
|
||||
stream->ctx,
|
||||
stream,
|
||||
false);
|
||||
}
|
||||
|
||||
return DC_OK;
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_0_message_map[SMU_MSG_MAX_COUNT] =
|
||||
MSG_MAP(SetBadMemoryPagesRetiredFlagsPerChannel,
|
||||
PPSMC_MSG_SetBadMemoryPagesRetiredFlagsPerChannel, 0),
|
||||
MSG_MAP(AllowGpo, PPSMC_MSG_SetGpoAllow, 0),
|
||||
MSG_MAP(AllowIHHostInterrupt, PPSMC_MSG_AllowIHHostInterrupt, 0),
|
||||
};
|
||||
|
||||
static struct cmn2asic_mapping smu_v13_0_0_clk_map[SMU_CLK_COUNT] = {
|
||||
|
||||
@@ -3372,6 +3372,9 @@ void drm_dp_remove_payload(struct drm_dp_mst_topology_mgr *mgr,
|
||||
|
||||
mgr->payload_count--;
|
||||
mgr->next_start_slot -= payload->time_slots;
|
||||
|
||||
if (payload->delete)
|
||||
drm_dp_mst_put_port_malloc(payload->port);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_dp_remove_payload);
|
||||
|
||||
@@ -4327,7 +4330,6 @@ int drm_dp_atomic_release_time_slots(struct drm_atomic_state *state,
|
||||
|
||||
drm_dbg_atomic(mgr->dev, "[MST PORT:%p] TU %d -> 0\n", port, payload->time_slots);
|
||||
if (!payload->delete) {
|
||||
drm_dp_mst_put_port_malloc(port);
|
||||
payload->pbn = 0;
|
||||
payload->delete = true;
|
||||
topology_state->payload_mask &= ~BIT(payload->vcpi - 1);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user