Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR. Conflicts: include/net/inet_sock.hf866fbc842
("ipv4: fix data-races around inet->inet_id")c274af2242
("inet: introduce inet->inet_flags") https://lore.kernel.org/all/679ddff6-db6e-4ff6-b177-574e90d0103d@tessares.net/ Adjacent changes: drivers/net/bonding/bond_alb.ce74216b8de
("bonding: fix macvlan over alb bond support")f11e5bd159
("bonding: support balance-alb with openvswitch") drivers/net/ethernet/broadcom/bgmac.cd6499f0b7c
("net: bgmac: Return PTR_ERR() for fixed_phy_register()")23a14488ea
("net: bgmac: Fix return value check for fixed_phy_register()") drivers/net/ethernet/broadcom/genet/bcmmii.c32bbe64a13
("net: bcmgenet: Fix return value check for fixed_phy_register()")acf50d1adb
("net: bcmgenet: Return PTR_ERR() for fixed_phy_register()") net/sctp/socket.cf866fbc842
("ipv4: fix data-races around inet->inet_id")b09bde5c35
("inet: move inet->mc_loop to inet->inet_frags") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
57ce6427e0
|
@ -13,7 +13,7 @@ Description:
|
|||
Specifies the duration of the LED blink in milliseconds.
|
||||
Defaults to 50 ms.
|
||||
|
||||
With hw_control ON, the interval value MUST be set to the
|
||||
When offloaded is true, the interval value MUST be set to the
|
||||
default value and cannot be changed.
|
||||
Trying to set any value in this specific mode will return
|
||||
an EINVAL error.
|
||||
|
@ -44,8 +44,8 @@ Description:
|
|||
If set to 1, the LED will blink for the milliseconds specified
|
||||
in interval to signal transmission.
|
||||
|
||||
With hw_control ON, the blink interval is controlled by hardware
|
||||
and won't reflect the value set in interval.
|
||||
When offloaded is true, the blink interval is controlled by
|
||||
hardware and won't reflect the value set in interval.
|
||||
|
||||
What: /sys/class/leds/<led>/rx
|
||||
Date: Dec 2017
|
||||
|
@ -59,21 +59,21 @@ Description:
|
|||
If set to 1, the LED will blink for the milliseconds specified
|
||||
in interval to signal reception.
|
||||
|
||||
With hw_control ON, the blink interval is controlled by hardware
|
||||
and won't reflect the value set in interval.
|
||||
When offloaded is true, the blink interval is controlled by
|
||||
hardware and won't reflect the value set in interval.
|
||||
|
||||
What: /sys/class/leds/<led>/hw_control
|
||||
What: /sys/class/leds/<led>/offloaded
|
||||
Date: Jun 2023
|
||||
KernelVersion: 6.5
|
||||
Contact: linux-leds@vger.kernel.org
|
||||
Description:
|
||||
Communicate whether the LED trigger modes are driven by hardware
|
||||
or software fallback is used.
|
||||
Communicate whether the LED trigger modes are offloaded to
|
||||
hardware or whether software fallback is used.
|
||||
|
||||
If 0, the LED is using software fallback to blink.
|
||||
|
||||
If 1, the LED is using hardware control to blink and signal the
|
||||
requested modes.
|
||||
If 1, the LED blinking in requested mode is offloaded to
|
||||
hardware.
|
||||
|
||||
What: /sys/class/leds/<led>/link_10
|
||||
Date: Jun 2023
|
||||
|
|
|
@ -141,8 +141,8 @@ sequence.
|
|||
To ensure the safety of this mitigation, the kernel must ensure that the
|
||||
safe return sequence is itself free from attacker interference. In Zen3
|
||||
and Zen4, this is accomplished by creating a BTB alias between the
|
||||
untraining function srso_untrain_ret_alias() and the safe return
|
||||
function srso_safe_ret_alias() which results in evicting a potentially
|
||||
untraining function srso_alias_untrain_ret() and the safe return
|
||||
function srso_alias_safe_ret() which results in evicting a potentially
|
||||
poisoned BTB entry and using that safe one for all function returns.
|
||||
|
||||
In older Zen1 and Zen2, this is accomplished using a reinterpretation
|
||||
|
|
|
@ -87,7 +87,7 @@ $defs:
|
|||
emac0_mdc, emac0_mdio, emac0_ptp_aux, emac0_ptp_pps, emac1_mcg0,
|
||||
emac1_mcg1, emac1_mcg2, emac1_mcg3, emac1_mdc, emac1_mdio,
|
||||
emac1_ptp_aux, emac1_ptp_pps, gcc_gp1, gcc_gp2, gcc_gp3,
|
||||
gcc_gp4, gcc_gp5, hs0_mi2s, hs1_mi2s, hs2_mi2s, ibi_i3c,
|
||||
gcc_gp4, gcc_gp5, gpio, hs0_mi2s, hs1_mi2s, hs2_mi2s, ibi_i3c,
|
||||
jitter_bist, mdp0_vsync0, mdp0_vsync1, mdp0_vsync2, mdp0_vsync3,
|
||||
mdp0_vsync4, mdp0_vsync5, mdp0_vsync6, mdp0_vsync7, mdp0_vsync8,
|
||||
mdp1_vsync0, mdp1_vsync1, mdp1_vsync2, mdp1_vsync3, mdp1_vsync4,
|
||||
|
|
|
@ -46,7 +46,7 @@ driver model device node, and its I2C address.
|
|||
},
|
||||
|
||||
.id_table = foo_idtable,
|
||||
.probe_new = foo_probe,
|
||||
.probe = foo_probe,
|
||||
.remove = foo_remove,
|
||||
/* if device autodetection is needed: */
|
||||
.class = I2C_CLASS_SOMETHING,
|
||||
|
|
26
MAINTAINERS
26
MAINTAINERS
|
@ -8831,6 +8831,7 @@ R: Michael Walle <michael@walle.cc>
|
|||
S: Maintained
|
||||
F: drivers/gpio/gpio-regmap.c
|
||||
F: include/linux/gpio/regmap.h
|
||||
K: (devm_)?gpio_regmap_(un)?register
|
||||
|
||||
GPIO SUBSYSTEM
|
||||
M: Linus Walleij <linus.walleij@linaro.org>
|
||||
|
@ -14821,6 +14822,16 @@ F: net/netfilter/xt_CONNSECMARK.c
|
|||
F: net/netfilter/xt_SECMARK.c
|
||||
F: net/netlabel/
|
||||
|
||||
NETWORKING [MACSEC]
|
||||
M: Sabrina Dubroca <sd@queasysnail.net>
|
||||
L: netdev@vger.kernel.org
|
||||
S: Maintained
|
||||
F: drivers/net/macsec.c
|
||||
F: include/net/macsec.h
|
||||
F: include/uapi/linux/if_macsec.h
|
||||
K: macsec
|
||||
K: \bmdo_
|
||||
|
||||
NETWORKING [MPTCP]
|
||||
M: Matthieu Baerts <matthieu.baerts@tessares.net>
|
||||
M: Mat Martineau <martineau@kernel.org>
|
||||
|
@ -19249,13 +19260,6 @@ F: Documentation/devicetree/bindings/serial/serial.yaml
|
|||
F: drivers/tty/serdev/
|
||||
F: include/linux/serdev.h
|
||||
|
||||
SERIAL DRIVERS
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
L: linux-serial@vger.kernel.org
|
||||
S: Maintained
|
||||
F: Documentation/devicetree/bindings/serial/
|
||||
F: drivers/tty/serial/
|
||||
|
||||
SERIAL IR RECEIVER
|
||||
M: Sean Young <sean@mess.org>
|
||||
L: linux-media@vger.kernel.org
|
||||
|
@ -21660,20 +21664,16 @@ W: https://github.com/srcres258/linux-doc
|
|||
T: git git://github.com/srcres258/linux-doc.git doc-zh-tw
|
||||
F: Documentation/translations/zh_TW/
|
||||
|
||||
TTY LAYER
|
||||
TTY LAYER AND SERIAL DRIVERS
|
||||
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
M: Jiri Slaby <jirislaby@kernel.org>
|
||||
L: linux-kernel@vger.kernel.org
|
||||
L: linux-serial@vger.kernel.org
|
||||
S: Supported
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git
|
||||
F: Documentation/devicetree/bindings/serial/
|
||||
F: Documentation/driver-api/serial/
|
||||
F: drivers/tty/
|
||||
F: drivers/tty/serial/serial_base.h
|
||||
F: drivers/tty/serial/serial_base_bus.c
|
||||
F: drivers/tty/serial/serial_core.c
|
||||
F: drivers/tty/serial/serial_ctrl.c
|
||||
F: drivers/tty/serial/serial_port.c
|
||||
F: include/linux/selection.h
|
||||
F: include/linux/serial.h
|
||||
F: include/linux/serial_core.h
|
||||
|
|
2
Makefile
2
Makefile
|
@ -2,7 +2,7 @@
|
|||
VERSION = 6
|
||||
PATCHLEVEL = 5
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc6
|
||||
EXTRAVERSION = -rc7
|
||||
NAME = Hurr durr I'ma ninja sloth
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
|
|
@ -158,7 +158,7 @@
|
|||
valid-mask = <0x003fffff>;
|
||||
};
|
||||
|
||||
pci: pciv3@62000000 {
|
||||
pci: pci@62000000 {
|
||||
compatible = "arm,integrator-ap-pci", "v3,v360epc-pci";
|
||||
device_type = "pci";
|
||||
#interrupt-cells = <1>;
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
pinctrl-0 = <&pinctrl_rtc_int>;
|
||||
reg = <0x68>;
|
||||
interrupt-parent = <&gpio7>;
|
||||
interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -863,7 +863,6 @@
|
|||
reg = <0>;
|
||||
|
||||
ldb_from_lcdif1: endpoint {
|
||||
remote-endpoint = <&lcdif1_to_ldb>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1010,6 +1009,8 @@
|
|||
<&clks IMX6SX_CLK_USDHC1>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
bus-width = <4>;
|
||||
fsl,tuning-start-tap = <20>;
|
||||
fsl,tuning-step= <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -1022,6 +1023,8 @@
|
|||
<&clks IMX6SX_CLK_USDHC2>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
bus-width = <4>;
|
||||
fsl,tuning-start-tap = <20>;
|
||||
fsl,tuning-step= <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -1034,6 +1037,8 @@
|
|||
<&clks IMX6SX_CLK_USDHC3>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
bus-width = <4>;
|
||||
fsl,tuning-start-tap = <20>;
|
||||
fsl,tuning-step= <2>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -1309,11 +1314,8 @@
|
|||
power-domains = <&pd_disp>;
|
||||
status = "disabled";
|
||||
|
||||
ports {
|
||||
port {
|
||||
lcdif1_to_ldb: endpoint {
|
||||
remote-endpoint = <&ldb_from_lcdif1>;
|
||||
};
|
||||
port {
|
||||
lcdif1_to_ldb: endpoint {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1184,6 +1184,8 @@
|
|||
<&clks IMX7D_USDHC1_ROOT_CLK>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
bus-width = <4>;
|
||||
fsl,tuning-step = <2>;
|
||||
fsl,tuning-start-tap = <20>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -1196,6 +1198,8 @@
|
|||
<&clks IMX7D_USDHC2_ROOT_CLK>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
bus-width = <4>;
|
||||
fsl,tuning-step = <2>;
|
||||
fsl,tuning-start-tap = <20>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -1208,6 +1212,8 @@
|
|||
<&clks IMX7D_USDHC3_ROOT_CLK>;
|
||||
clock-names = "ipg", "ahb", "per";
|
||||
bus-width = <4>;
|
||||
fsl,tuning-step = <2>;
|
||||
fsl,tuning-start-tap = <20>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
|
|
@ -145,6 +145,8 @@
|
|||
/* MDIO */
|
||||
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLUP | SLEWCTRL_FAST, MUX_MODE0)
|
||||
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_OUTPUT_PULLUP, MUX_MODE0)
|
||||
/* Added to support GPIO controlled PHY reset */
|
||||
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_OUTPUT_PULLUP, MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -153,6 +155,8 @@
|
|||
/* MDIO reset value */
|
||||
AM33XX_PADCONF(AM335X_PIN_MDIO, PIN_INPUT_PULLDOWN, MUX_MODE7)
|
||||
AM33XX_PADCONF(AM335X_PIN_MDC, PIN_INPUT_PULLDOWN, MUX_MODE7)
|
||||
/* Added to support GPIO controlled PHY reset */
|
||||
AM33XX_PADCONF(AM335X_PIN_UART0_CTSN, PIN_INPUT_PULLDOWN, MUX_MODE7)
|
||||
>;
|
||||
};
|
||||
|
||||
|
@ -215,6 +219,7 @@
|
|||
baseboard_eeprom: baseboard_eeprom@50 {
|
||||
compatible = "atmel,24c256";
|
||||
reg = <0x50>;
|
||||
vcc-supply = <&ldo4_reg>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
@ -377,6 +382,10 @@
|
|||
|
||||
ethphy0: ethernet-phy@0 {
|
||||
reg = <0>;
|
||||
/* Support GPIO reset on revision C3 boards */
|
||||
reset-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;
|
||||
reset-assert-us = <300>;
|
||||
reset-deassert-us = <6500>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
*/
|
||||
|
||||
#include <linux/io.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_device.h>
|
||||
#include "common.h"
|
||||
|
||||
/* register offsets */
|
||||
|
|
|
@ -1221,10 +1221,9 @@
|
|||
compatible = "fsl,imx8mm-mipi-csi2";
|
||||
reg = <0x32e30000 0x1000>;
|
||||
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
assigned-clocks = <&clk IMX8MM_CLK_CSI1_CORE>,
|
||||
<&clk IMX8MM_CLK_CSI1_PHY_REF>;
|
||||
assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_1000M>,
|
||||
<&clk IMX8MM_SYS_PLL2_1000M>;
|
||||
assigned-clocks = <&clk IMX8MM_CLK_CSI1_CORE>;
|
||||
assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_1000M>;
|
||||
|
||||
clock-frequency = <333000000>;
|
||||
clocks = <&clk IMX8MM_CLK_DISP_APB_ROOT>,
|
||||
<&clk IMX8MM_CLK_CSI1_ROOT>,
|
||||
|
|
|
@ -1175,10 +1175,8 @@
|
|||
compatible = "fsl,imx8mm-mipi-csi2";
|
||||
reg = <0x32e30000 0x1000>;
|
||||
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
|
||||
assigned-clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>,
|
||||
<&clk IMX8MN_CLK_CSI1_PHY_REF>;
|
||||
assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>,
|
||||
<&clk IMX8MN_SYS_PLL2_1000M>;
|
||||
assigned-clocks = <&clk IMX8MN_CLK_CAMERA_PIXEL>;
|
||||
assigned-clock-parents = <&clk IMX8MN_SYS_PLL2_1000M>;
|
||||
assigned-clock-rates = <333000000>;
|
||||
clock-frequency = <333000000>;
|
||||
clocks = <&clk IMX8MN_CLK_DISP_APB_ROOT>,
|
||||
|
|
|
@ -340,7 +340,7 @@
|
|||
|
||||
anatop: anatop@44480000 {
|
||||
compatible = "fsl,imx93-anatop", "syscon";
|
||||
reg = <0x44480000 0x10000>;
|
||||
reg = <0x44480000 0x2000>;
|
||||
};
|
||||
|
||||
adc1: adc@44530000 {
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
pm8150l-thermal {
|
||||
pm8150l-pcb-thermal {
|
||||
polling-delay-passive = <0>;
|
||||
polling-delay = <0>;
|
||||
thermal-sensors = <&pm8150l_adc_tm 1>;
|
||||
|
|
|
@ -153,8 +153,8 @@
|
|||
|
||||
vreg_l4c: ldo4 {
|
||||
regulator-name = "vreg_l4c";
|
||||
regulator-min-microvolt = <1100000>;
|
||||
regulator-max-microvolt = <1300000>;
|
||||
regulator-min-microvolt = <1200000>;
|
||||
regulator-max-microvolt = <1200000>;
|
||||
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
|
||||
/*
|
||||
* FIXME: This should have regulator-allow-set-load but
|
||||
|
|
|
@ -3120,8 +3120,8 @@
|
|||
reg = <0 0x0ae94400 0 0x200>,
|
||||
<0 0x0ae94600 0 0x280>,
|
||||
<0 0x0ae94a00 0 0x1e0>;
|
||||
reg-names = "dsi0_phy",
|
||||
"dsi0_phy_lane",
|
||||
reg-names = "dsi_phy",
|
||||
"dsi_phy_lane",
|
||||
"dsi_pll";
|
||||
|
||||
#clock-cells = <1>;
|
||||
|
|
|
@ -3561,7 +3561,7 @@
|
|||
};
|
||||
|
||||
osm_l3: interconnect@18321000 {
|
||||
compatible = "qcom,sc8180x-osm-l3";
|
||||
compatible = "qcom,sc8180x-osm-l3", "qcom,osm-l3";
|
||||
reg = <0 0x18321000 0 0x1400>;
|
||||
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD0>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -85,7 +85,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD1>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -109,7 +109,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD2>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -133,7 +133,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD3>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -157,7 +157,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD4>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -181,7 +181,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD5>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -205,7 +205,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD6>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -229,7 +229,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 2>;
|
||||
operating-points-v2 = <&cpu7_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&osm_l3 MASTER_OSM_L3_APPS 0 &osm_l3 SLAVE_OSM_L3 0>;
|
||||
<&osm_l3 MASTER_OSM_L3_APPS &osm_l3 SLAVE_OSM_L3>;
|
||||
power-domains = <&CPU_PD7>;
|
||||
power-domain-names = "psci";
|
||||
#cooling-cells = <2>;
|
||||
|
@ -4342,7 +4342,7 @@
|
|||
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
|
||||
clock-names = "xo", "alternate";
|
||||
|
||||
#interconnect-cells = <2>;
|
||||
#interconnect-cells = <1>;
|
||||
};
|
||||
|
||||
cpufreq_hw: cpufreq@18323000 {
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_0: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -138,7 +138,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_100: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -163,7 +163,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_200: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -188,7 +188,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 0>;
|
||||
operating-points-v2 = <&cpu0_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_300: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -213,7 +213,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_400: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -238,7 +238,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_500: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -263,7 +263,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 1>;
|
||||
operating-points-v2 = <&cpu4_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_600: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -288,7 +288,7 @@
|
|||
qcom,freq-domain = <&cpufreq_hw 2>;
|
||||
operating-points-v2 = <&cpu7_opp_table>;
|
||||
interconnects = <&gem_noc MASTER_AMPSS_M0 0 &mc_virt SLAVE_EBI_CH0 0>,
|
||||
<&epss_l3 MASTER_OSM_L3_APPS 0 &epss_l3 SLAVE_OSM_L3 0>;
|
||||
<&epss_l3 MASTER_OSM_L3_APPS &epss_l3 SLAVE_OSM_L3>;
|
||||
#cooling-cells = <2>;
|
||||
L2_700: l2-cache {
|
||||
compatible = "cache";
|
||||
|
@ -5679,7 +5679,7 @@
|
|||
clocks = <&rpmhcc RPMH_CXO_CLK>, <&gcc GPLL0>;
|
||||
clock-names = "xo", "alternate";
|
||||
|
||||
#interconnect-cells = <2>;
|
||||
#interconnect-cells = <1>;
|
||||
};
|
||||
|
||||
cpufreq_hw: cpufreq@18591000 {
|
||||
|
|
|
@ -1744,6 +1744,8 @@
|
|||
qcom,controlled-remotely;
|
||||
iommus = <&apps_smmu 0x594 0x0011>,
|
||||
<&apps_smmu 0x596 0x0011>;
|
||||
/* FIXME: Probing BAM DMA causes some abort and system hang */
|
||||
status = "fail";
|
||||
};
|
||||
|
||||
crypto: crypto@1dfa000 {
|
||||
|
@ -1755,6 +1757,8 @@
|
|||
<&apps_smmu 0x596 0x0011>;
|
||||
interconnects = <&aggre2_noc MASTER_CRYPTO 0 &mc_virt SLAVE_EBI1 0>;
|
||||
interconnect-names = "memory";
|
||||
/* FIXME: dependency BAM DMA is disabled */
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
ipa: ipa@1e40000 {
|
||||
|
|
|
@ -291,14 +291,14 @@
|
|||
};
|
||||
power-domain@PX30_PD_MMC_NAND {
|
||||
reg = <PX30_PD_MMC_NAND>;
|
||||
clocks = <&cru HCLK_NANDC>,
|
||||
<&cru HCLK_EMMC>,
|
||||
<&cru HCLK_SDIO>,
|
||||
<&cru HCLK_SFC>,
|
||||
<&cru SCLK_EMMC>,
|
||||
<&cru SCLK_NANDC>,
|
||||
<&cru SCLK_SDIO>,
|
||||
<&cru SCLK_SFC>;
|
||||
clocks = <&cru HCLK_NANDC>,
|
||||
<&cru HCLK_EMMC>,
|
||||
<&cru HCLK_SDIO>,
|
||||
<&cru HCLK_SFC>,
|
||||
<&cru SCLK_EMMC>,
|
||||
<&cru SCLK_NANDC>,
|
||||
<&cru SCLK_SDIO>,
|
||||
<&cru SCLK_SFC>;
|
||||
pm_qos = <&qos_emmc>, <&qos_nand>,
|
||||
<&qos_sdio>, <&qos_sfc>;
|
||||
#power-domain-cells = <0>;
|
||||
|
|
|
@ -106,7 +106,6 @@
|
|||
regulator-name = "vdd_core";
|
||||
regulator-min-microvolt = <827000>;
|
||||
regulator-max-microvolt = <1340000>;
|
||||
regulator-init-microvolt = <1015000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
|
|
@ -105,7 +105,6 @@
|
|||
regulator-name = "vdd_core";
|
||||
regulator-min-microvolt = <827000>;
|
||||
regulator-max-microvolt = <1340000>;
|
||||
regulator-init-microvolt = <1015000>;
|
||||
regulator-settling-time-up-us = <250>;
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
|
|
|
@ -773,7 +773,7 @@
|
|||
compatible = "brcm,bcm4329-fmac";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_host_wake_l>;
|
||||
|
|
|
@ -375,7 +375,6 @@
|
|||
vcc_sdio: LDO_REG4 {
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <3000000>;
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
regulator-name = "vcc_sdio";
|
||||
|
|
|
@ -548,9 +548,8 @@
|
|||
&sdhci {
|
||||
max-frequency = <150000000>;
|
||||
bus-width = <8>;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs200-1_8v;
|
||||
non-removable;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
sdio_pwrseq: sdio-pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
clocks = <&rk808 1>;
|
||||
clock-names = "ext_clock";
|
||||
clock-names = "lpo";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_enable_h>;
|
||||
reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
|
||||
|
@ -645,9 +645,9 @@
|
|||
};
|
||||
|
||||
&sdhci {
|
||||
max-frequency = <150000000>;
|
||||
bus-width = <8>;
|
||||
mmc-hs400-1_8v;
|
||||
mmc-hs400-enhanced-strobe;
|
||||
mmc-hs200-1_8v;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
compatible = "brcm,bcm4329-fmac";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio0>;
|
||||
interrupts = <RK_PA3 GPIO_ACTIVE_HIGH>;
|
||||
interrupts = <RK_PA3 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_host_wake_l>;
|
||||
|
|
|
@ -356,7 +356,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-name = "vdd_logic";
|
||||
|
@ -371,7 +370,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-name = "vdd_gpu";
|
||||
|
@ -533,7 +531,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <712500>;
|
||||
regulator-max-microvolt = <1390000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-name = "vdd_cpu";
|
||||
regulator-ramp-delay = <2300>;
|
||||
vin-supply = <&vcc_sys>;
|
||||
|
|
|
@ -239,7 +239,7 @@
|
|||
|
||||
&gmac1 {
|
||||
assigned-clocks = <&cru SCLK_GMAC1_RX_TX>, <&cru SCLK_GMAC1>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
|
||||
assigned-clock-parents = <&cru SCLK_GMAC1_RGMII_SPEED>, <&gmac1_clkin>;
|
||||
phy-mode = "rgmii";
|
||||
clock_in_out = "input";
|
||||
pinctrl-names = "default";
|
||||
|
@ -416,7 +416,7 @@
|
|||
compatible = "brcm,bcm4329-fmac";
|
||||
reg = <1>;
|
||||
interrupt-parent = <&gpio2>;
|
||||
interrupts = <RK_PB2 GPIO_ACTIVE_HIGH>;
|
||||
interrupts = <RK_PB2 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "host-wake";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&wifi_host_wake_h>;
|
||||
|
|
|
@ -218,7 +218,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
@ -233,7 +232,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
@ -259,7 +257,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
|
|
@ -264,7 +264,6 @@
|
|||
regulator-always-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
@ -278,7 +277,6 @@
|
|||
regulator-name = "vdd_gpu_npu";
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
|
|
@ -366,7 +366,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-name = "vdd_logic";
|
||||
|
@ -381,7 +380,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-name = "vdd_gpu";
|
||||
|
|
|
@ -277,7 +277,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
|
@ -292,7 +291,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
|
|
|
@ -137,8 +137,8 @@
|
|||
|
||||
&mdio1 {
|
||||
rgmii_phy1: ethernet-phy@0 {
|
||||
compatible="ethernet-phy-ieee802.3-c22";
|
||||
reg= <0x0>;
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <0x0>;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -278,7 +278,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
|
@ -291,7 +290,6 @@
|
|||
regulator-name = "vdd_gpu";
|
||||
regulator-min-microvolt = <900000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
|
||||
regulator-state-mem {
|
||||
|
|
|
@ -234,7 +234,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-state-mem {
|
||||
|
@ -249,7 +248,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-state-mem {
|
||||
|
@ -272,7 +270,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-state-mem {
|
||||
|
|
|
@ -308,7 +308,6 @@
|
|||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -322,7 +321,6 @@
|
|||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -346,7 +344,6 @@
|
|||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
|
@ -293,7 +293,6 @@
|
|||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -307,7 +306,6 @@
|
|||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -331,7 +329,6 @@
|
|||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
|
@ -173,7 +173,6 @@
|
|||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -187,7 +186,6 @@
|
|||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -211,7 +209,6 @@
|
|||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -330,7 +327,6 @@
|
|||
|
||||
vcca1v8_image: LDO_REG9 {
|
||||
regulator-name = "vcca1v8_image";
|
||||
regulator-init-microvolt = <950000>;
|
||||
regulator-min-microvolt = <950000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
|
||||
|
|
|
@ -243,7 +243,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
@ -258,7 +257,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
@ -284,7 +282,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-ramp-delay = <6001>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
|
||||
|
|
|
@ -232,7 +232,6 @@
|
|||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -246,7 +245,6 @@
|
|||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -270,7 +268,6 @@
|
|||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
|
@ -291,7 +291,6 @@
|
|||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -305,7 +304,6 @@
|
|||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -329,7 +327,6 @@
|
|||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
|
@ -163,7 +163,6 @@
|
|||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -177,7 +176,6 @@
|
|||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -201,7 +199,6 @@
|
|||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
|
@ -350,7 +350,6 @@
|
|||
regulator-name = "vdd_logic";
|
||||
regulator-always-on;
|
||||
regulator-boot-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -364,7 +363,6 @@
|
|||
vdd_gpu: DCDC_REG2 {
|
||||
regulator-name = "vdd_gpu";
|
||||
regulator-always-on;
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
@ -388,7 +386,6 @@
|
|||
|
||||
vdd_npu: DCDC_REG4 {
|
||||
regulator-name = "vdd_npu";
|
||||
regulator-init-microvolt = <900000>;
|
||||
regulator-initial-mode = <0x2>;
|
||||
regulator-min-microvolt = <500000>;
|
||||
regulator-max-microvolt = <1350000>;
|
||||
|
|
|
@ -337,7 +337,6 @@
|
|||
regulator-boot-on;
|
||||
regulator-min-microvolt = <550000>;
|
||||
regulator-max-microvolt = <950000>;
|
||||
regulator-init-microvolt = <750000>;
|
||||
regulator-ramp-delay = <12500>;
|
||||
regulator-name = "vdd_vdenc_s0";
|
||||
|
||||
|
|
|
@ -125,19 +125,19 @@
|
|||
cpu-supply = <&vdd_cpu_lit_s0>;
|
||||
};
|
||||
|
||||
&cpu_b0{
|
||||
&cpu_b0 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b1{
|
||||
&cpu_b1 {
|
||||
cpu-supply = <&vdd_cpu_big0_s0>;
|
||||
};
|
||||
|
||||
&cpu_b2{
|
||||
&cpu_b2 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
&cpu_b3{
|
||||
&cpu_b3 {
|
||||
cpu-supply = <&vdd_cpu_big1_s0>;
|
||||
};
|
||||
|
||||
|
|
|
@ -356,7 +356,7 @@ static inline int sme_max_virtualisable_vl(void)
|
|||
return vec_max_virtualisable_vl(ARM64_VEC_SME);
|
||||
}
|
||||
|
||||
extern void sme_alloc(struct task_struct *task);
|
||||
extern void sme_alloc(struct task_struct *task, bool flush);
|
||||
extern unsigned int sme_get_vl(void);
|
||||
extern int sme_set_current_vl(unsigned long arg);
|
||||
extern int sme_get_current_vl(void);
|
||||
|
@ -388,7 +388,7 @@ static inline void sme_smstart_sm(void) { }
|
|||
static inline void sme_smstop_sm(void) { }
|
||||
static inline void sme_smstop(void) { }
|
||||
|
||||
static inline void sme_alloc(struct task_struct *task) { }
|
||||
static inline void sme_alloc(struct task_struct *task, bool flush) { }
|
||||
static inline void sme_setup(void) { }
|
||||
static inline unsigned int sme_get_vl(void) { return 0; }
|
||||
static inline int sme_max_vl(void) { return 0; }
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef __ASM_BITSPERLONG_H
|
||||
#define __ASM_BITSPERLONG_H
|
||||
|
||||
#define __BITS_PER_LONG 64
|
||||
|
||||
#include <asm-generic/bitsperlong.h>
|
||||
|
||||
#endif /* __ASM_BITSPERLONG_H */
|
|
@ -1285,9 +1285,9 @@ void fpsimd_release_task(struct task_struct *dead_task)
|
|||
* the interest of testability and predictability, the architecture
|
||||
* guarantees that when ZA is enabled it will be zeroed.
|
||||
*/
|
||||
void sme_alloc(struct task_struct *task)
|
||||
void sme_alloc(struct task_struct *task, bool flush)
|
||||
{
|
||||
if (task->thread.sme_state) {
|
||||
if (task->thread.sme_state && flush) {
|
||||
memset(task->thread.sme_state, 0, sme_state_size(task));
|
||||
return;
|
||||
}
|
||||
|
@ -1515,7 +1515,7 @@ void do_sme_acc(unsigned long esr, struct pt_regs *regs)
|
|||
}
|
||||
|
||||
sve_alloc(current, false);
|
||||
sme_alloc(current);
|
||||
sme_alloc(current, true);
|
||||
if (!current->thread.sve_state || !current->thread.sme_state) {
|
||||
force_sig(SIGKILL);
|
||||
return;
|
||||
|
|
|
@ -881,6 +881,13 @@ static int sve_set_common(struct task_struct *target,
|
|||
break;
|
||||
case ARM64_VEC_SME:
|
||||
target->thread.svcr |= SVCR_SM_MASK;
|
||||
|
||||
/*
|
||||
* Disable traps and ensure there is SME storage but
|
||||
* preserve any currently set values in ZA/ZT.
|
||||
*/
|
||||
sme_alloc(target, false);
|
||||
set_tsk_thread_flag(target, TIF_SME);
|
||||
break;
|
||||
default:
|
||||
WARN_ON_ONCE(1);
|
||||
|
@ -1100,7 +1107,7 @@ static int za_set(struct task_struct *target,
|
|||
}
|
||||
|
||||
/* Allocate/reinit ZA storage */
|
||||
sme_alloc(target);
|
||||
sme_alloc(target, true);
|
||||
if (!target->thread.sme_state) {
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
|
@ -1170,8 +1177,13 @@ static int zt_set(struct task_struct *target,
|
|||
if (!system_supports_sme2())
|
||||
return -EINVAL;
|
||||
|
||||
/* Ensure SVE storage in case this is first use of SME */
|
||||
sve_alloc(target, false);
|
||||
if (!target->thread.sve_state)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!thread_za_enabled(&target->thread)) {
|
||||
sme_alloc(target);
|
||||
sme_alloc(target, true);
|
||||
if (!target->thread.sme_state)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -1179,8 +1191,10 @@ static int zt_set(struct task_struct *target,
|
|||
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
|
||||
thread_zt_state(&target->thread),
|
||||
0, ZT_SIG_REG_BYTES);
|
||||
if (ret == 0)
|
||||
if (ret == 0) {
|
||||
target->thread.svcr |= SVCR_ZA_MASK;
|
||||
set_tsk_thread_flag(target, TIF_SME);
|
||||
}
|
||||
|
||||
fpsimd_flush_task_state(target);
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ static int restore_za_context(struct user_ctxs *user)
|
|||
fpsimd_flush_task_state(current);
|
||||
/* From now, fpsimd_thread_switch() won't touch thread.sve_state */
|
||||
|
||||
sme_alloc(current);
|
||||
sme_alloc(current, true);
|
||||
if (!current->thread.sme_state) {
|
||||
current->thread.svcr &= ~SVCR_ZA_MASK;
|
||||
clear_thread_flag(TIF_SME);
|
||||
|
|
|
@ -709,9 +709,9 @@ static int __init rtas_flash_init(void)
|
|||
if (!rtas_validate_flash_data.buf)
|
||||
return -ENOMEM;
|
||||
|
||||
flash_block_cache = kmem_cache_create("rtas_flash_cache",
|
||||
RTAS_BLK_SIZE, RTAS_BLK_SIZE, 0,
|
||||
NULL);
|
||||
flash_block_cache = kmem_cache_create_usercopy("rtas_flash_cache",
|
||||
RTAS_BLK_SIZE, RTAS_BLK_SIZE,
|
||||
0, 0, RTAS_BLK_SIZE, NULL);
|
||||
if (!flash_block_cache) {
|
||||
printk(KERN_ERR "%s: failed to create block cache\n",
|
||||
__func__);
|
||||
|
|
|
@ -570,24 +570,30 @@ config TOOLCHAIN_HAS_ZIHINTPAUSE
|
|||
config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||
def_bool y
|
||||
# https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
|
||||
depends on AS_IS_GNU && AS_VERSION >= 23800
|
||||
# https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=98416dbb0a62579d4a7a4a76bab51b5b52fec2cd
|
||||
depends on AS_IS_GNU && AS_VERSION >= 23600
|
||||
help
|
||||
Newer binutils versions default to ISA spec version 20191213 which
|
||||
moves some instructions from the I extension to the Zicsr and Zifencei
|
||||
extensions.
|
||||
Binutils-2.38 and GCC-12.1.0 bumped the default ISA spec to the newer
|
||||
20191213 version, which moves some instructions from the I extension to
|
||||
the Zicsr and Zifencei extensions. This requires explicitly specifying
|
||||
Zicsr and Zifencei when binutils >= 2.38 or GCC >= 12.1.0. Zicsr
|
||||
and Zifencei are supported in binutils from version 2.36 onwards.
|
||||
To make life easier, and avoid forcing toolchains that default to a
|
||||
newer ISA spec to version 2.2, relax the check to binutils >= 2.36.
|
||||
For clang < 17 or GCC < 11.1.0, for which this is not possible, this is
|
||||
dealt with in CONFIG_TOOLCHAIN_NEEDS_OLD_ISA_SPEC.
|
||||
|
||||
config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
|
||||
def_bool y
|
||||
depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||
# https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
|
||||
depends on CC_IS_CLANG && CLANG_VERSION < 170000
|
||||
# https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=b03be74bad08c382da47e048007a78fa3fb4ef49
|
||||
depends on (CC_IS_CLANG && CLANG_VERSION < 170000) || (CC_IS_GCC && GCC_VERSION < 110100)
|
||||
help
|
||||
Certain versions of clang do not support zicsr and zifencei via -march
|
||||
but newer versions of binutils require it for the reasons noted in the
|
||||
help text of CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI. This
|
||||
option causes an older ISA spec compatible with these older versions
|
||||
of clang to be passed to GAS, which has the same result as passing zicsr
|
||||
and zifencei to -march.
|
||||
Certain versions of clang and GCC do not support zicsr and zifencei via
|
||||
-march. This option causes an older ISA spec compatible with these older
|
||||
versions of clang and GCC to be passed to GAS, which has the same result
|
||||
as passing zicsr and zifencei to -march.
|
||||
|
||||
config FPU
|
||||
bool "FPU support"
|
||||
|
|
|
@ -110,6 +110,7 @@
|
|||
#define RVC_INSN_FUNCT4_OPOFF 12
|
||||
#define RVC_INSN_FUNCT3_MASK GENMASK(15, 13)
|
||||
#define RVC_INSN_FUNCT3_OPOFF 13
|
||||
#define RVC_INSN_J_RS1_MASK GENMASK(11, 7)
|
||||
#define RVC_INSN_J_RS2_MASK GENMASK(6, 2)
|
||||
#define RVC_INSN_OPCODE_MASK GENMASK(1, 0)
|
||||
#define RVC_ENCODE_FUNCT3(f_) (RVC_FUNCT3_##f_ << RVC_INSN_FUNCT3_OPOFF)
|
||||
|
@ -245,8 +246,6 @@ __RISCV_INSN_FUNCS(c_jal, RVC_MASK_C_JAL, RVC_MATCH_C_JAL)
|
|||
__RISCV_INSN_FUNCS(auipc, RVG_MASK_AUIPC, RVG_MATCH_AUIPC)
|
||||
__RISCV_INSN_FUNCS(jalr, RVG_MASK_JALR, RVG_MATCH_JALR)
|
||||
__RISCV_INSN_FUNCS(jal, RVG_MASK_JAL, RVG_MATCH_JAL)
|
||||
__RISCV_INSN_FUNCS(c_jr, RVC_MASK_C_JR, RVC_MATCH_C_JR)
|
||||
__RISCV_INSN_FUNCS(c_jalr, RVC_MASK_C_JALR, RVC_MATCH_C_JALR)
|
||||
__RISCV_INSN_FUNCS(c_j, RVC_MASK_C_J, RVC_MATCH_C_J)
|
||||
__RISCV_INSN_FUNCS(beq, RVG_MASK_BEQ, RVG_MATCH_BEQ)
|
||||
__RISCV_INSN_FUNCS(bne, RVG_MASK_BNE, RVG_MATCH_BNE)
|
||||
|
@ -273,6 +272,18 @@ static __always_inline bool riscv_insn_is_branch(u32 code)
|
|||
return (code & RV_INSN_OPCODE_MASK) == RVG_OPCODE_BRANCH;
|
||||
}
|
||||
|
||||
static __always_inline bool riscv_insn_is_c_jr(u32 code)
|
||||
{
|
||||
return (code & RVC_MASK_C_JR) == RVC_MATCH_C_JR &&
|
||||
(code & RVC_INSN_J_RS1_MASK) != 0;
|
||||
}
|
||||
|
||||
static __always_inline bool riscv_insn_is_c_jalr(u32 code)
|
||||
{
|
||||
return (code & RVC_MASK_C_JALR) == RVC_MATCH_C_JALR &&
|
||||
(code & RVC_INSN_J_RS1_MASK) != 0;
|
||||
}
|
||||
|
||||
#define RV_IMM_SIGN(x) (-(((x) >> 31) & 1))
|
||||
#define RVC_IMM_SIGN(x) (-(((x) >> 12) & 1))
|
||||
#define RV_X(X, s, mask) (((X) >> (s)) & (mask))
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
|
||||
/*
|
||||
* Copyright (C) 2012 ARM Ltd.
|
||||
* Copyright (C) 2015 Regents of the University of California
|
||||
*/
|
||||
|
||||
#ifndef _UAPI_ASM_RISCV_BITSPERLONG_H
|
||||
#define _UAPI_ASM_RISCV_BITSPERLONG_H
|
||||
|
||||
#define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8)
|
||||
|
||||
#include <asm-generic/bitsperlong.h>
|
||||
|
||||
#endif /* _UAPI_ASM_RISCV_BITSPERLONG_H */
|
|
@ -11,7 +11,13 @@ compat_vdso-syms += flush_icache
|
|||
COMPAT_CC := $(CC)
|
||||
COMPAT_LD := $(LD)
|
||||
|
||||
COMPAT_CC_FLAGS := -march=rv32g -mabi=ilp32
|
||||
# binutils 2.35 does not support the zifencei extension, but in the ISA
|
||||
# spec 20191213, G stands for IMAFD_ZICSR_ZIFENCEI.
|
||||
ifdef CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
|
||||
COMPAT_CC_FLAGS := -march=rv32g -mabi=ilp32
|
||||
else
|
||||
COMPAT_CC_FLAGS := -march=rv32imafd -mabi=ilp32
|
||||
endif
|
||||
COMPAT_LD_FLAGS := -melf32lriscv
|
||||
|
||||
# Disable attributes, as they're useless and break the build.
|
||||
|
|
|
@ -84,6 +84,9 @@ void do_softirq_own_stack(void)
|
|||
: [sp] "r" (sp)
|
||||
: "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
|
||||
"t0", "t1", "t2", "t3", "t4", "t5", "t6",
|
||||
#ifndef CONFIG_FRAME_POINTER
|
||||
"s0",
|
||||
#endif
|
||||
"memory");
|
||||
} else
|
||||
#endif
|
||||
|
|
|
@ -297,7 +297,7 @@ asmlinkage __visible __trap_section void do_trap_break(struct pt_regs *regs)
|
|||
asmlinkage __visible __trap_section void do_trap_ecall_u(struct pt_regs *regs)
|
||||
{
|
||||
if (user_mode(regs)) {
|
||||
ulong syscall = regs->a7;
|
||||
long syscall = regs->a7;
|
||||
|
||||
regs->epc += 4;
|
||||
regs->orig_a0 = regs->a0;
|
||||
|
@ -306,9 +306,9 @@ asmlinkage __visible __trap_section void do_trap_ecall_u(struct pt_regs *regs)
|
|||
|
||||
syscall = syscall_enter_from_user_mode(regs, syscall);
|
||||
|
||||
if (syscall < NR_syscalls)
|
||||
if (syscall >= 0 && syscall < NR_syscalls)
|
||||
syscall_handler(regs, syscall);
|
||||
else
|
||||
else if (syscall != -1)
|
||||
regs->a0 = -ENOSYS;
|
||||
|
||||
syscall_exit_to_user_mode(regs);
|
||||
|
@ -372,6 +372,9 @@ asmlinkage void noinstr do_irq(struct pt_regs *regs)
|
|||
: [sp] "r" (sp), [regs] "r" (regs)
|
||||
: "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
|
||||
"t0", "t1", "t2", "t3", "t4", "t5", "t6",
|
||||
#ifndef CONFIG_FRAME_POINTER
|
||||
"s0",
|
||||
#endif
|
||||
"memory");
|
||||
} else
|
||||
#endif
|
||||
|
|
|
@ -17,8 +17,11 @@ ENTRY(__asm_copy_from_user)
|
|||
li t6, SR_SUM
|
||||
csrs CSR_STATUS, t6
|
||||
|
||||
/* Save for return value */
|
||||
mv t5, a2
|
||||
/*
|
||||
* Save the terminal address which will be used to compute the number
|
||||
* of bytes copied in case of a fixup exception.
|
||||
*/
|
||||
add t5, a0, a2
|
||||
|
||||
/*
|
||||
* Register allocation for code below:
|
||||
|
@ -176,7 +179,7 @@ ENTRY(__asm_copy_from_user)
|
|||
10:
|
||||
/* Disable access to user memory */
|
||||
csrc CSR_STATUS, t6
|
||||
mv a0, t5
|
||||
sub a0, t5, a0
|
||||
ret
|
||||
ENDPROC(__asm_copy_to_user)
|
||||
ENDPROC(__asm_copy_from_user)
|
||||
|
@ -228,7 +231,7 @@ ENTRY(__clear_user)
|
|||
11:
|
||||
/* Disable access to user memory */
|
||||
csrc CSR_STATUS, t6
|
||||
mv a0, a1
|
||||
sub a0, a3, a0
|
||||
ret
|
||||
ENDPROC(__clear_user)
|
||||
EXPORT_SYMBOL(__clear_user)
|
||||
|
|
|
@ -92,6 +92,7 @@ static inline void arch_exit_to_user_mode_prepare(struct pt_regs *regs,
|
|||
static __always_inline void arch_exit_to_user_mode(void)
|
||||
{
|
||||
mds_user_clear_cpu_buffers();
|
||||
amd_clear_divider();
|
||||
}
|
||||
#define arch_exit_to_user_mode arch_exit_to_user_mode
|
||||
|
||||
|
|
|
@ -272,9 +272,9 @@
|
|||
.endm
|
||||
|
||||
#ifdef CONFIG_CPU_UNRET_ENTRY
|
||||
#define CALL_ZEN_UNTRAIN_RET "call zen_untrain_ret"
|
||||
#define CALL_UNTRAIN_RET "call entry_untrain_ret"
|
||||
#else
|
||||
#define CALL_ZEN_UNTRAIN_RET ""
|
||||
#define CALL_UNTRAIN_RET ""
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -282,7 +282,7 @@
|
|||
* return thunk isn't mapped into the userspace tables (then again, AMD
|
||||
* typically has NO_MELTDOWN).
|
||||
*
|
||||
* While zen_untrain_ret() doesn't clobber anything but requires stack,
|
||||
* While retbleed_untrain_ret() doesn't clobber anything but requires stack,
|
||||
* entry_ibpb() will clobber AX, CX, DX.
|
||||
*
|
||||
* As such, this must be placed after every *SWITCH_TO_KERNEL_CR3 at a point
|
||||
|
@ -293,14 +293,20 @@
|
|||
defined(CONFIG_CALL_DEPTH_TRACKING) || defined(CONFIG_CPU_SRSO)
|
||||
VALIDATE_UNRET_END
|
||||
ALTERNATIVE_3 "", \
|
||||
CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET, \
|
||||
CALL_UNTRAIN_RET, X86_FEATURE_UNRET, \
|
||||
"call entry_ibpb", X86_FEATURE_ENTRY_IBPB, \
|
||||
__stringify(RESET_CALL_DEPTH), X86_FEATURE_CALL_DEPTH
|
||||
#endif
|
||||
.endm
|
||||
|
||||
#ifdef CONFIG_CPU_SRSO
|
||||
ALTERNATIVE_2 "", "call srso_untrain_ret", X86_FEATURE_SRSO, \
|
||||
"call srso_untrain_ret_alias", X86_FEATURE_SRSO_ALIAS
|
||||
.macro UNTRAIN_RET_VM
|
||||
#if defined(CONFIG_CPU_UNRET_ENTRY) || defined(CONFIG_CPU_IBPB_ENTRY) || \
|
||||
defined(CONFIG_CALL_DEPTH_TRACKING) || defined(CONFIG_CPU_SRSO)
|
||||
VALIDATE_UNRET_END
|
||||
ALTERNATIVE_3 "", \
|
||||
CALL_UNTRAIN_RET, X86_FEATURE_UNRET, \
|
||||
"call entry_ibpb", X86_FEATURE_IBPB_ON_VMEXIT, \
|
||||
__stringify(RESET_CALL_DEPTH), X86_FEATURE_CALL_DEPTH
|
||||
#endif
|
||||
.endm
|
||||
|
||||
|
@ -309,15 +315,10 @@
|
|||
defined(CONFIG_CALL_DEPTH_TRACKING)
|
||||
VALIDATE_UNRET_END
|
||||
ALTERNATIVE_3 "", \
|
||||
CALL_ZEN_UNTRAIN_RET, X86_FEATURE_UNRET, \
|
||||
CALL_UNTRAIN_RET, X86_FEATURE_UNRET, \
|
||||
"call entry_ibpb", X86_FEATURE_ENTRY_IBPB, \
|
||||
__stringify(RESET_CALL_DEPTH_FROM_CALL), X86_FEATURE_CALL_DEPTH
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CPU_SRSO
|
||||
ALTERNATIVE_2 "", "call srso_untrain_ret", X86_FEATURE_SRSO, \
|
||||
"call srso_untrain_ret_alias", X86_FEATURE_SRSO_ALIAS
|
||||
#endif
|
||||
.endm
|
||||
|
||||
|
||||
|
@ -341,17 +342,24 @@ extern retpoline_thunk_t __x86_indirect_thunk_array[];
|
|||
extern retpoline_thunk_t __x86_indirect_call_thunk_array[];
|
||||
extern retpoline_thunk_t __x86_indirect_jump_thunk_array[];
|
||||
|
||||
#ifdef CONFIG_RETHUNK
|
||||
extern void __x86_return_thunk(void);
|
||||
extern void zen_untrain_ret(void);
|
||||
#else
|
||||
static inline void __x86_return_thunk(void) {}
|
||||
#endif
|
||||
|
||||
extern void retbleed_return_thunk(void);
|
||||
extern void srso_return_thunk(void);
|
||||
extern void srso_alias_return_thunk(void);
|
||||
|
||||
extern void retbleed_untrain_ret(void);
|
||||
extern void srso_untrain_ret(void);
|
||||
extern void srso_untrain_ret_alias(void);
|
||||
extern void srso_alias_untrain_ret(void);
|
||||
|
||||
extern void entry_untrain_ret(void);
|
||||
extern void entry_ibpb(void);
|
||||
|
||||
#ifdef CONFIG_CALL_THUNKS
|
||||
extern void (*x86_return_thunk)(void);
|
||||
#else
|
||||
#define x86_return_thunk (&__x86_return_thunk)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CALL_DEPTH_TRACKING
|
||||
extern void __x86_return_skl(void);
|
||||
|
@ -478,9 +486,6 @@ enum ssb_mitigation {
|
|||
SPEC_STORE_BYPASS_SECCOMP,
|
||||
};
|
||||
|
||||
extern char __indirect_thunk_start[];
|
||||
extern char __indirect_thunk_end[];
|
||||
|
||||
static __always_inline
|
||||
void alternative_msr_write(unsigned int msr, u64 val, unsigned int feature)
|
||||
{
|
||||
|
|
|
@ -687,10 +687,6 @@ void __init_or_module noinline apply_retpolines(s32 *start, s32 *end)
|
|||
|
||||
#ifdef CONFIG_RETHUNK
|
||||
|
||||
#ifdef CONFIG_CALL_THUNKS
|
||||
void (*x86_return_thunk)(void) __ro_after_init = &__x86_return_thunk;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Rewrite the compiler generated return thunk tail-calls.
|
||||
*
|
||||
|
|
|
@ -1329,3 +1329,4 @@ void noinstr amd_clear_divider(void)
|
|||
asm volatile(ALTERNATIVE("", "div %2\n\t", X86_BUG_DIV0)
|
||||
:: "a" (0), "d" (0), "r" (1));
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(amd_clear_divider);
|
||||
|
|
|
@ -63,6 +63,8 @@ EXPORT_SYMBOL_GPL(x86_pred_cmd);
|
|||
|
||||
static DEFINE_MUTEX(spec_ctrl_mutex);
|
||||
|
||||
void (*x86_return_thunk)(void) __ro_after_init = &__x86_return_thunk;
|
||||
|
||||
/* Update SPEC_CTRL MSR and its cached copy unconditionally */
|
||||
static void update_spec_ctrl(u64 val)
|
||||
{
|
||||
|
@ -165,6 +167,11 @@ void __init cpu_select_mitigations(void)
|
|||
md_clear_select_mitigation();
|
||||
srbds_select_mitigation();
|
||||
l1d_flush_select_mitigation();
|
||||
|
||||
/*
|
||||
* srso_select_mitigation() depends and must run after
|
||||
* retbleed_select_mitigation().
|
||||
*/
|
||||
srso_select_mitigation();
|
||||
gds_select_mitigation();
|
||||
}
|
||||
|
@ -1035,6 +1042,9 @@ do_cmd_auto:
|
|||
setup_force_cpu_cap(X86_FEATURE_RETHUNK);
|
||||
setup_force_cpu_cap(X86_FEATURE_UNRET);
|
||||
|
||||
if (IS_ENABLED(CONFIG_RETHUNK))
|
||||
x86_return_thunk = retbleed_return_thunk;
|
||||
|
||||
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
|
||||
boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
|
||||
pr_err(RETBLEED_UNTRAIN_MSG);
|
||||
|
@ -1044,6 +1054,7 @@ do_cmd_auto:
|
|||
|
||||
case RETBLEED_MITIGATION_IBPB:
|
||||
setup_force_cpu_cap(X86_FEATURE_ENTRY_IBPB);
|
||||
setup_force_cpu_cap(X86_FEATURE_IBPB_ON_VMEXIT);
|
||||
mitigate_smt = true;
|
||||
break;
|
||||
|
||||
|
@ -2417,9 +2428,10 @@ static void __init srso_select_mitigation(void)
|
|||
* Zen1/2 with SMT off aren't vulnerable after the right
|
||||
* IBPB microcode has been applied.
|
||||
*/
|
||||
if ((boot_cpu_data.x86 < 0x19) &&
|
||||
(!cpu_smt_possible() || (cpu_smt_control == CPU_SMT_DISABLED)))
|
||||
if (boot_cpu_data.x86 < 0x19 && !cpu_smt_possible()) {
|
||||
setup_force_cpu_cap(X86_FEATURE_SRSO_NO);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (retbleed_mitigation == RETBLEED_MITIGATION_IBPB) {
|
||||
|
@ -2448,11 +2460,15 @@ static void __init srso_select_mitigation(void)
|
|||
* like ftrace, static_call, etc.
|
||||
*/
|
||||
setup_force_cpu_cap(X86_FEATURE_RETHUNK);
|
||||
setup_force_cpu_cap(X86_FEATURE_UNRET);
|
||||
|
||||
if (boot_cpu_data.x86 == 0x19)
|
||||
if (boot_cpu_data.x86 == 0x19) {
|
||||
setup_force_cpu_cap(X86_FEATURE_SRSO_ALIAS);
|
||||
else
|
||||
x86_return_thunk = srso_alias_return_thunk;
|
||||
} else {
|
||||
setup_force_cpu_cap(X86_FEATURE_SRSO);
|
||||
x86_return_thunk = srso_return_thunk;
|
||||
}
|
||||
srso_mitigation = SRSO_MITIGATION_SAFE_RET;
|
||||
} else {
|
||||
pr_err("WARNING: kernel not compiled with CPU_SRSO.\n");
|
||||
|
@ -2696,6 +2712,9 @@ static ssize_t retbleed_show_state(char *buf)
|
|||
|
||||
static ssize_t srso_show_state(char *buf)
|
||||
{
|
||||
if (boot_cpu_has(X86_FEATURE_SRSO_NO))
|
||||
return sysfs_emit(buf, "Mitigation: SMT disabled\n");
|
||||
|
||||
return sysfs_emit(buf, "%s%s\n",
|
||||
srso_strings[srso_mitigation],
|
||||
(cpu_has_ibpb_brtype_microcode() ? "" : ", no microcode"));
|
||||
|
|
|
@ -226,7 +226,7 @@ static int copy_optimized_instructions(u8 *dest, u8 *src, u8 *real)
|
|||
}
|
||||
|
||||
/* Check whether insn is indirect jump */
|
||||
static int __insn_is_indirect_jump(struct insn *insn)
|
||||
static int insn_is_indirect_jump(struct insn *insn)
|
||||
{
|
||||
return ((insn->opcode.bytes[0] == 0xff &&
|
||||
(X86_MODRM_REG(insn->modrm.value) & 6) == 4) || /* Jump */
|
||||
|
@ -260,26 +260,6 @@ static int insn_jump_into_range(struct insn *insn, unsigned long start, int len)
|
|||
return (start <= target && target <= start + len);
|
||||
}
|
||||
|
||||
static int insn_is_indirect_jump(struct insn *insn)
|
||||
{
|
||||
int ret = __insn_is_indirect_jump(insn);
|
||||
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
/*
|
||||
* Jump to x86_indirect_thunk_* is treated as an indirect jump.
|
||||
* Note that even with CONFIG_RETPOLINE=y, the kernel compiled with
|
||||
* older gcc may use indirect jump. So we add this check instead of
|
||||
* replace indirect-jump check.
|
||||
*/
|
||||
if (!ret)
|
||||
ret = insn_jump_into_range(insn,
|
||||
(unsigned long)__indirect_thunk_start,
|
||||
(unsigned long)__indirect_thunk_end -
|
||||
(unsigned long)__indirect_thunk_start);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Decode whole function to ensure any instructions don't jump into target */
|
||||
static int can_optimize(unsigned long paddr)
|
||||
{
|
||||
|
@ -334,9 +314,21 @@ static int can_optimize(unsigned long paddr)
|
|||
/* Recover address */
|
||||
insn.kaddr = (void *)addr;
|
||||
insn.next_byte = (void *)(addr + insn.length);
|
||||
/* Check any instructions don't jump into target */
|
||||
if (insn_is_indirect_jump(&insn) ||
|
||||
insn_jump_into_range(&insn, paddr + INT3_INSN_SIZE,
|
||||
/*
|
||||
* Check any instructions don't jump into target, indirectly or
|
||||
* directly.
|
||||
*
|
||||
* The indirect case is present to handle a code with jump
|
||||
* tables. When the kernel uses retpolines, the check should in
|
||||
* theory additionally look for jumps to indirect thunks.
|
||||
* However, the kernel built with retpolines or IBT has jump
|
||||
* tables disabled so the check can be skipped altogether.
|
||||
*/
|
||||
if (!IS_ENABLED(CONFIG_RETPOLINE) &&
|
||||
!IS_ENABLED(CONFIG_X86_KERNEL_IBT) &&
|
||||
insn_is_indirect_jump(&insn))
|
||||
return 0;
|
||||
if (insn_jump_into_range(&insn, paddr + INT3_INSN_SIZE,
|
||||
DISP32_SIZE))
|
||||
return 0;
|
||||
addr += insn.length;
|
||||
|
|
|
@ -186,6 +186,19 @@ EXPORT_SYMBOL_GPL(arch_static_call_transform);
|
|||
*/
|
||||
bool __static_call_fixup(void *tramp, u8 op, void *dest)
|
||||
{
|
||||
unsigned long addr = (unsigned long)tramp;
|
||||
/*
|
||||
* Not all .return_sites are a static_call trampoline (most are not).
|
||||
* Check if the 3 bytes after the return are still kernel text, if not,
|
||||
* then this definitely is not a trampoline and we need not worry
|
||||
* further.
|
||||
*
|
||||
* This avoids the memcmp() below tripping over pagefaults etc..
|
||||
*/
|
||||
if (((addr >> PAGE_SHIFT) != ((addr + 7) >> PAGE_SHIFT)) &&
|
||||
!kernel_text_address(addr + 7))
|
||||
return false;
|
||||
|
||||
if (memcmp(tramp+5, tramp_ud, 3)) {
|
||||
/* Not a trampoline site, not our problem. */
|
||||
return false;
|
||||
|
|
|
@ -206,8 +206,6 @@ DEFINE_IDTENTRY(exc_divide_error)
|
|||
{
|
||||
do_error_trap(regs, 0, "divide error", X86_TRAP_DE, SIGFPE,
|
||||
FPE_INTDIV, error_get_trap_addr(regs));
|
||||
|
||||
amd_clear_divider();
|
||||
}
|
||||
|
||||
DEFINE_IDTENTRY(exc_overflow)
|
||||
|
|
|
@ -133,27 +133,25 @@ SECTIONS
|
|||
KPROBES_TEXT
|
||||
SOFTIRQENTRY_TEXT
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
__indirect_thunk_start = .;
|
||||
*(.text.__x86.indirect_thunk)
|
||||
*(.text.__x86.return_thunk)
|
||||
__indirect_thunk_end = .;
|
||||
*(.text..__x86.indirect_thunk)
|
||||
*(.text..__x86.return_thunk)
|
||||
#endif
|
||||
STATIC_CALL_TEXT
|
||||
|
||||
ALIGN_ENTRY_TEXT_BEGIN
|
||||
#ifdef CONFIG_CPU_SRSO
|
||||
*(.text.__x86.rethunk_untrain)
|
||||
*(.text..__x86.rethunk_untrain)
|
||||
#endif
|
||||
|
||||
ENTRY_TEXT
|
||||
|
||||
#ifdef CONFIG_CPU_SRSO
|
||||
/*
|
||||
* See the comment above srso_untrain_ret_alias()'s
|
||||
* See the comment above srso_alias_untrain_ret()'s
|
||||
* definition.
|
||||
*/
|
||||
. = srso_untrain_ret_alias | (1 << 2) | (1 << 8) | (1 << 14) | (1 << 20);
|
||||
*(.text.__x86.rethunk_safe)
|
||||
. = srso_alias_untrain_ret | (1 << 2) | (1 << 8) | (1 << 14) | (1 << 20);
|
||||
*(.text..__x86.rethunk_safe)
|
||||
#endif
|
||||
ALIGN_ENTRY_TEXT_END
|
||||
*(.gnu.warning)
|
||||
|
@ -523,7 +521,7 @@ INIT_PER_CPU(irq_stack_backing_store);
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_RETHUNK
|
||||
. = ASSERT((__ret & 0x3f) == 0, "__ret not cacheline-aligned");
|
||||
. = ASSERT((retbleed_return_thunk & 0x3f) == 0, "retbleed_return_thunk not cacheline-aligned");
|
||||
. = ASSERT((srso_safe_ret & 0x3f) == 0, "srso_safe_ret not cacheline-aligned");
|
||||
#endif
|
||||
|
||||
|
@ -538,8 +536,8 @@ INIT_PER_CPU(irq_stack_backing_store);
|
|||
* Instead do: (A | B) - (A & B) in order to compute the XOR
|
||||
* of the two function addresses:
|
||||
*/
|
||||
. = ASSERT(((ABSOLUTE(srso_untrain_ret_alias) | srso_safe_ret_alias) -
|
||||
(ABSOLUTE(srso_untrain_ret_alias) & srso_safe_ret_alias)) == ((1 << 2) | (1 << 8) | (1 << 14) | (1 << 20)),
|
||||
. = ASSERT(((ABSOLUTE(srso_alias_untrain_ret) | srso_alias_safe_ret) -
|
||||
(ABSOLUTE(srso_alias_untrain_ret) & srso_alias_safe_ret)) == ((1 << 2) | (1 << 8) | (1 << 14) | (1 << 20)),
|
||||
"SRSO function pair won't alias");
|
||||
#endif
|
||||
|
||||
|
|
|
@ -4006,6 +4006,8 @@ static noinstr void svm_vcpu_enter_exit(struct kvm_vcpu *vcpu, bool spec_ctrl_in
|
|||
|
||||
guest_state_enter_irqoff();
|
||||
|
||||
amd_clear_divider();
|
||||
|
||||
if (sev_es_guest(vcpu->kvm))
|
||||
__svm_sev_es_vcpu_run(svm, spec_ctrl_intercepted);
|
||||
else
|
||||
|
|
|
@ -222,10 +222,7 @@ SYM_FUNC_START(__svm_vcpu_run)
|
|||
* because interrupt handlers won't sanitize 'ret' if the return is
|
||||
* from the kernel.
|
||||
*/
|
||||
UNTRAIN_RET
|
||||
|
||||
/* SRSO */
|
||||
ALTERNATIVE "", "call entry_ibpb", X86_FEATURE_IBPB_ON_VMEXIT
|
||||
UNTRAIN_RET_VM
|
||||
|
||||
/*
|
||||
* Clear all general purpose registers except RSP and RAX to prevent
|
||||
|
@ -362,7 +359,7 @@ SYM_FUNC_START(__svm_sev_es_vcpu_run)
|
|||
* because interrupt handlers won't sanitize RET if the return is
|
||||
* from the kernel.
|
||||
*/
|
||||
UNTRAIN_RET
|
||||
UNTRAIN_RET_VM
|
||||
|
||||
/* "Pop" @spec_ctrl_intercepted. */
|
||||
pop %_ASM_BX
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include <asm/frame.h>
|
||||
#include <asm/nops.h>
|
||||
|
||||
.section .text.__x86.indirect_thunk
|
||||
.section .text..__x86.indirect_thunk
|
||||
|
||||
|
||||
.macro POLINE reg
|
||||
|
@ -133,75 +133,106 @@ SYM_CODE_END(__x86_indirect_jump_thunk_array)
|
|||
#ifdef CONFIG_RETHUNK
|
||||
|
||||
/*
|
||||
* srso_untrain_ret_alias() and srso_safe_ret_alias() are placed at
|
||||
* srso_alias_untrain_ret() and srso_alias_safe_ret() are placed at
|
||||
* special addresses:
|
||||
*
|
||||
* - srso_untrain_ret_alias() is 2M aligned
|
||||
* - srso_safe_ret_alias() is also in the same 2M page but bits 2, 8, 14
|
||||
* - srso_alias_untrain_ret() is 2M aligned
|
||||
* - srso_alias_safe_ret() is also in the same 2M page but bits 2, 8, 14
|
||||
* and 20 in its virtual address are set (while those bits in the
|
||||
* srso_untrain_ret_alias() function are cleared).
|
||||
* srso_alias_untrain_ret() function are cleared).
|
||||
*
|
||||
* This guarantees that those two addresses will alias in the branch
|
||||
* target buffer of Zen3/4 generations, leading to any potential
|
||||
* poisoned entries at that BTB slot to get evicted.
|
||||
*
|
||||
* As a result, srso_safe_ret_alias() becomes a safe return.
|
||||
* As a result, srso_alias_safe_ret() becomes a safe return.
|
||||
*/
|
||||
#ifdef CONFIG_CPU_SRSO
|
||||
.section .text.__x86.rethunk_untrain
|
||||
.section .text..__x86.rethunk_untrain
|
||||
|
||||
SYM_START(srso_untrain_ret_alias, SYM_L_GLOBAL, SYM_A_NONE)
|
||||
SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
|
||||
UNWIND_HINT_FUNC
|
||||
ANNOTATE_NOENDBR
|
||||
ASM_NOP2
|
||||
lfence
|
||||
jmp __x86_return_thunk
|
||||
SYM_FUNC_END(srso_untrain_ret_alias)
|
||||
__EXPORT_THUNK(srso_untrain_ret_alias)
|
||||
jmp srso_alias_return_thunk
|
||||
SYM_FUNC_END(srso_alias_untrain_ret)
|
||||
__EXPORT_THUNK(srso_alias_untrain_ret)
|
||||
|
||||
.section .text.__x86.rethunk_safe
|
||||
#endif
|
||||
|
||||
/* Needs a definition for the __x86_return_thunk alternative below. */
|
||||
SYM_START(srso_safe_ret_alias, SYM_L_GLOBAL, SYM_A_NONE)
|
||||
#ifdef CONFIG_CPU_SRSO
|
||||
add $8, %_ASM_SP
|
||||
UNWIND_HINT_FUNC
|
||||
#endif
|
||||
.section .text..__x86.rethunk_safe
|
||||
#else
|
||||
/* dummy definition for alternatives */
|
||||
SYM_START(srso_alias_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
|
||||
ANNOTATE_UNRET_SAFE
|
||||
ret
|
||||
int3
|
||||
SYM_FUNC_END(srso_safe_ret_alias)
|
||||
SYM_FUNC_END(srso_alias_untrain_ret)
|
||||
#endif
|
||||
|
||||
.section .text.__x86.return_thunk
|
||||
SYM_START(srso_alias_safe_ret, SYM_L_GLOBAL, SYM_A_NONE)
|
||||
lea 8(%_ASM_SP), %_ASM_SP
|
||||
UNWIND_HINT_FUNC
|
||||
ANNOTATE_UNRET_SAFE
|
||||
ret
|
||||
int3
|
||||
SYM_FUNC_END(srso_alias_safe_ret)
|
||||
|
||||
.section .text..__x86.return_thunk
|
||||
|
||||
SYM_CODE_START(srso_alias_return_thunk)
|
||||
UNWIND_HINT_FUNC
|
||||
ANNOTATE_NOENDBR
|
||||
call srso_alias_safe_ret
|
||||
ud2
|
||||
SYM_CODE_END(srso_alias_return_thunk)
|
||||
|
||||
/*
|
||||
* Some generic notes on the untraining sequences:
|
||||
*
|
||||
* They are interchangeable when it comes to flushing potentially wrong
|
||||
* RET predictions from the BTB.
|
||||
*
|
||||
* The SRSO Zen1/2 (MOVABS) untraining sequence is longer than the
|
||||
* Retbleed sequence because the return sequence done there
|
||||
* (srso_safe_ret()) is longer and the return sequence must fully nest
|
||||
* (end before) the untraining sequence. Therefore, the untraining
|
||||
* sequence must fully overlap the return sequence.
|
||||
*
|
||||
* Regarding alignment - the instructions which need to be untrained,
|
||||
* must all start at a cacheline boundary for Zen1/2 generations. That
|
||||
* is, instruction sequences starting at srso_safe_ret() and
|
||||
* the respective instruction sequences at retbleed_return_thunk()
|
||||
* must start at a cacheline boundary.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Safety details here pertain to the AMD Zen{1,2} microarchitecture:
|
||||
* 1) The RET at __x86_return_thunk must be on a 64 byte boundary, for
|
||||
* 1) The RET at retbleed_return_thunk must be on a 64 byte boundary, for
|
||||
* alignment within the BTB.
|
||||
* 2) The instruction at zen_untrain_ret must contain, and not
|
||||
* 2) The instruction at retbleed_untrain_ret must contain, and not
|
||||
* end with, the 0xc3 byte of the RET.
|
||||
* 3) STIBP must be enabled, or SMT disabled, to prevent the sibling thread
|
||||
* from re-poisioning the BTB prediction.
|
||||
*/
|
||||
.align 64
|
||||
.skip 64 - (__ret - zen_untrain_ret), 0xcc
|
||||
SYM_START(zen_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
|
||||
.skip 64 - (retbleed_return_thunk - retbleed_untrain_ret), 0xcc
|
||||
SYM_START(retbleed_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
|
||||
ANNOTATE_NOENDBR
|
||||
/*
|
||||
* As executed from zen_untrain_ret, this is:
|
||||
* As executed from retbleed_untrain_ret, this is:
|
||||
*
|
||||
* TEST $0xcc, %bl
|
||||
* LFENCE
|
||||
* JMP __x86_return_thunk
|
||||
* JMP retbleed_return_thunk
|
||||
*
|
||||
* Executing the TEST instruction has a side effect of evicting any BTB
|
||||
* prediction (potentially attacker controlled) attached to the RET, as
|
||||
* __x86_return_thunk + 1 isn't an instruction boundary at the moment.
|
||||
* retbleed_return_thunk + 1 isn't an instruction boundary at the moment.
|
||||
*/
|
||||
.byte 0xf6
|
||||
|
||||
/*
|
||||
* As executed from __x86_return_thunk, this is a plain RET.
|
||||
* As executed from retbleed_return_thunk, this is a plain RET.
|
||||
*
|
||||
* As part of the TEST above, RET is the ModRM byte, and INT3 the imm8.
|
||||
*
|
||||
|
@ -213,13 +244,13 @@ SYM_START(zen_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
|
|||
* With SMT enabled and STIBP active, a sibling thread cannot poison
|
||||
* RET's prediction to a type of its choice, but can evict the
|
||||
* prediction due to competitive sharing. If the prediction is
|
||||
* evicted, __x86_return_thunk will suffer Straight Line Speculation
|
||||
* evicted, retbleed_return_thunk will suffer Straight Line Speculation
|
||||
* which will be contained safely by the INT3.
|
||||
*/
|
||||
SYM_INNER_LABEL(__ret, SYM_L_GLOBAL)
|
||||
SYM_INNER_LABEL(retbleed_return_thunk, SYM_L_GLOBAL)
|
||||
ret
|
||||
int3
|
||||
SYM_CODE_END(__ret)
|
||||
SYM_CODE_END(retbleed_return_thunk)
|
||||
|
||||
/*
|
||||
* Ensure the TEST decoding / BTB invalidation is complete.
|
||||
|
@ -230,16 +261,16 @@ SYM_CODE_END(__ret)
|
|||
* Jump back and execute the RET in the middle of the TEST instruction.
|
||||
* INT3 is for SLS protection.
|
||||
*/
|
||||
jmp __ret
|
||||
jmp retbleed_return_thunk
|
||||
int3
|
||||
SYM_FUNC_END(zen_untrain_ret)
|
||||
__EXPORT_THUNK(zen_untrain_ret)
|
||||
SYM_FUNC_END(retbleed_untrain_ret)
|
||||
__EXPORT_THUNK(retbleed_untrain_ret)
|
||||
|
||||
/*
|
||||
* SRSO untraining sequence for Zen1/2, similar to zen_untrain_ret()
|
||||
* SRSO untraining sequence for Zen1/2, similar to retbleed_untrain_ret()
|
||||
* above. On kernel entry, srso_untrain_ret() is executed which is a
|
||||
*
|
||||
* movabs $0xccccccc308c48348,%rax
|
||||
* movabs $0xccccc30824648d48,%rax
|
||||
*
|
||||
* and when the return thunk executes the inner label srso_safe_ret()
|
||||
* later, it is a stack manipulation and a RET which is mispredicted and
|
||||
|
@ -251,22 +282,44 @@ SYM_START(srso_untrain_ret, SYM_L_GLOBAL, SYM_A_NONE)
|
|||
ANNOTATE_NOENDBR
|
||||
.byte 0x48, 0xb8
|
||||
|
||||
/*
|
||||
* This forces the function return instruction to speculate into a trap
|
||||
* (UD2 in srso_return_thunk() below). This RET will then mispredict
|
||||
* and execution will continue at the return site read from the top of
|
||||
* the stack.
|
||||
*/
|
||||
SYM_INNER_LABEL(srso_safe_ret, SYM_L_GLOBAL)
|
||||
add $8, %_ASM_SP
|
||||
lea 8(%_ASM_SP), %_ASM_SP
|
||||
ret
|
||||
int3
|
||||
int3
|
||||
int3
|
||||
/* end of movabs */
|
||||
lfence
|
||||
call srso_safe_ret
|
||||
int3
|
||||
ud2
|
||||
SYM_CODE_END(srso_safe_ret)
|
||||
SYM_FUNC_END(srso_untrain_ret)
|
||||
__EXPORT_THUNK(srso_untrain_ret)
|
||||
|
||||
SYM_FUNC_START(__x86_return_thunk)
|
||||
ALTERNATIVE_2 "jmp __ret", "call srso_safe_ret", X86_FEATURE_SRSO, \
|
||||
"call srso_safe_ret_alias", X86_FEATURE_SRSO_ALIAS
|
||||
SYM_CODE_START(srso_return_thunk)
|
||||
UNWIND_HINT_FUNC
|
||||
ANNOTATE_NOENDBR
|
||||
call srso_safe_ret
|
||||
ud2
|
||||
SYM_CODE_END(srso_return_thunk)
|
||||
|
||||
SYM_FUNC_START(entry_untrain_ret)
|
||||
ALTERNATIVE_2 "jmp retbleed_untrain_ret", \
|
||||
"jmp srso_untrain_ret", X86_FEATURE_SRSO, \
|
||||
"jmp srso_alias_untrain_ret", X86_FEATURE_SRSO_ALIAS
|
||||
SYM_FUNC_END(entry_untrain_ret)
|
||||
__EXPORT_THUNK(entry_untrain_ret)
|
||||
|
||||
SYM_CODE_START(__x86_return_thunk)
|
||||
UNWIND_HINT_FUNC
|
||||
ANNOTATE_NOENDBR
|
||||
ANNOTATE_UNRET_SAFE
|
||||
ret
|
||||
int3
|
||||
SYM_CODE_END(__x86_return_thunk)
|
||||
EXPORT_SYMBOL(__x86_return_thunk)
|
||||
|
|
|
@ -136,7 +136,9 @@ static void blkg_free_workfn(struct work_struct *work)
|
|||
blkcg_policy[i]->pd_free_fn(blkg->pd[i]);
|
||||
if (blkg->parent)
|
||||
blkg_put(blkg->parent);
|
||||
spin_lock_irq(&q->queue_lock);
|
||||
list_del_init(&blkg->q_node);
|
||||
spin_unlock_irq(&q->queue_lock);
|
||||
mutex_unlock(&q->blkcg_mutex);
|
||||
|
||||
blk_put_queue(q);
|
||||
|
|
|
@ -78,7 +78,7 @@ static struct blk_crypto_fallback_keyslot {
|
|||
struct crypto_skcipher *tfms[BLK_ENCRYPTION_MODE_MAX];
|
||||
} *blk_crypto_keyslots;
|
||||
|
||||
static struct blk_crypto_profile blk_crypto_fallback_profile;
|
||||
static struct blk_crypto_profile *blk_crypto_fallback_profile;
|
||||
static struct workqueue_struct *blk_crypto_wq;
|
||||
static mempool_t *blk_crypto_bounce_page_pool;
|
||||
static struct bio_set crypto_bio_split;
|
||||
|
@ -292,7 +292,7 @@ static bool blk_crypto_fallback_encrypt_bio(struct bio **bio_ptr)
|
|||
* Get a blk-crypto-fallback keyslot that contains a crypto_skcipher for
|
||||
* this bio's algorithm and key.
|
||||
*/
|
||||
blk_st = blk_crypto_get_keyslot(&blk_crypto_fallback_profile,
|
||||
blk_st = blk_crypto_get_keyslot(blk_crypto_fallback_profile,
|
||||
bc->bc_key, &slot);
|
||||
if (blk_st != BLK_STS_OK) {
|
||||
src_bio->bi_status = blk_st;
|
||||
|
@ -395,7 +395,7 @@ static void blk_crypto_fallback_decrypt_bio(struct work_struct *work)
|
|||
* Get a blk-crypto-fallback keyslot that contains a crypto_skcipher for
|
||||
* this bio's algorithm and key.
|
||||
*/
|
||||
blk_st = blk_crypto_get_keyslot(&blk_crypto_fallback_profile,
|
||||
blk_st = blk_crypto_get_keyslot(blk_crypto_fallback_profile,
|
||||
bc->bc_key, &slot);
|
||||
if (blk_st != BLK_STS_OK) {
|
||||
bio->bi_status = blk_st;
|
||||
|
@ -499,7 +499,7 @@ bool blk_crypto_fallback_bio_prep(struct bio **bio_ptr)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!__blk_crypto_cfg_supported(&blk_crypto_fallback_profile,
|
||||
if (!__blk_crypto_cfg_supported(blk_crypto_fallback_profile,
|
||||
&bc->bc_key->crypto_cfg)) {
|
||||
bio->bi_status = BLK_STS_NOTSUPP;
|
||||
return false;
|
||||
|
@ -526,7 +526,7 @@ bool blk_crypto_fallback_bio_prep(struct bio **bio_ptr)
|
|||
|
||||
int blk_crypto_fallback_evict_key(const struct blk_crypto_key *key)
|
||||
{
|
||||
return __blk_crypto_evict_key(&blk_crypto_fallback_profile, key);
|
||||
return __blk_crypto_evict_key(blk_crypto_fallback_profile, key);
|
||||
}
|
||||
|
||||
static bool blk_crypto_fallback_inited;
|
||||
|
@ -534,7 +534,6 @@ static int blk_crypto_fallback_init(void)
|
|||
{
|
||||
int i;
|
||||
int err;
|
||||
struct blk_crypto_profile *profile = &blk_crypto_fallback_profile;
|
||||
|
||||
if (blk_crypto_fallback_inited)
|
||||
return 0;
|
||||
|
@ -545,18 +544,27 @@ static int blk_crypto_fallback_init(void)
|
|||
if (err)
|
||||
goto out;
|
||||
|
||||
err = blk_crypto_profile_init(profile, blk_crypto_num_keyslots);
|
||||
if (err)
|
||||
/* Dynamic allocation is needed because of lockdep_register_key(). */
|
||||
blk_crypto_fallback_profile =
|
||||
kzalloc(sizeof(*blk_crypto_fallback_profile), GFP_KERNEL);
|
||||
if (!blk_crypto_fallback_profile) {
|
||||
err = -ENOMEM;
|
||||
goto fail_free_bioset;
|
||||
}
|
||||
|
||||
err = blk_crypto_profile_init(blk_crypto_fallback_profile,
|
||||
blk_crypto_num_keyslots);
|
||||
if (err)
|
||||
goto fail_free_profile;
|
||||
err = -ENOMEM;
|
||||
|
||||
profile->ll_ops = blk_crypto_fallback_ll_ops;
|
||||
profile->max_dun_bytes_supported = BLK_CRYPTO_MAX_IV_SIZE;
|
||||
blk_crypto_fallback_profile->ll_ops = blk_crypto_fallback_ll_ops;
|
||||
blk_crypto_fallback_profile->max_dun_bytes_supported = BLK_CRYPTO_MAX_IV_SIZE;
|
||||
|
||||
/* All blk-crypto modes have a crypto API fallback. */
|
||||
for (i = 0; i < BLK_ENCRYPTION_MODE_MAX; i++)
|
||||
profile->modes_supported[i] = 0xFFFFFFFF;
|
||||
profile->modes_supported[BLK_ENCRYPTION_MODE_INVALID] = 0;
|
||||
blk_crypto_fallback_profile->modes_supported[i] = 0xFFFFFFFF;
|
||||
blk_crypto_fallback_profile->modes_supported[BLK_ENCRYPTION_MODE_INVALID] = 0;
|
||||
|
||||
blk_crypto_wq = alloc_workqueue("blk_crypto_wq",
|
||||
WQ_UNBOUND | WQ_HIGHPRI |
|
||||
|
@ -597,7 +605,9 @@ fail_free_keyslots:
|
|||
fail_free_wq:
|
||||
destroy_workqueue(blk_crypto_wq);
|
||||
fail_destroy_profile:
|
||||
blk_crypto_profile_destroy(profile);
|
||||
blk_crypto_profile_destroy(blk_crypto_fallback_profile);
|
||||
fail_free_profile:
|
||||
kfree(blk_crypto_fallback_profile);
|
||||
fail_free_bioset:
|
||||
bioset_exit(&crypto_bio_split);
|
||||
out:
|
||||
|
|
|
@ -681,6 +681,21 @@ out_queue_exit:
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(blk_mq_alloc_request_hctx);
|
||||
|
||||
static void blk_mq_finish_request(struct request *rq)
|
||||
{
|
||||
struct request_queue *q = rq->q;
|
||||
|
||||
if (rq->rq_flags & RQF_USE_SCHED) {
|
||||
q->elevator->type->ops.finish_request(rq);
|
||||
/*
|
||||
* For postflush request that may need to be
|
||||
* completed twice, we should clear this flag
|
||||
* to avoid double finish_request() on the rq.
|
||||
*/
|
||||
rq->rq_flags &= ~RQF_USE_SCHED;
|
||||
}
|
||||
}
|
||||
|
||||
static void __blk_mq_free_request(struct request *rq)
|
||||
{
|
||||
struct request_queue *q = rq->q;
|
||||
|
@ -707,9 +722,7 @@ void blk_mq_free_request(struct request *rq)
|
|||
{
|
||||
struct request_queue *q = rq->q;
|
||||
|
||||
if ((rq->rq_flags & RQF_USE_SCHED) &&
|
||||
q->elevator->type->ops.finish_request)
|
||||
q->elevator->type->ops.finish_request(rq);
|
||||
blk_mq_finish_request(rq);
|
||||
|
||||
if (unlikely(laptop_mode && !blk_rq_is_passthrough(rq)))
|
||||
laptop_io_completion(q->disk->bdi);
|
||||
|
@ -1020,6 +1033,8 @@ inline void __blk_mq_end_request(struct request *rq, blk_status_t error)
|
|||
if (blk_mq_need_time_stamp(rq))
|
||||
__blk_mq_end_request_acct(rq, ktime_get_ns());
|
||||
|
||||
blk_mq_finish_request(rq);
|
||||
|
||||
if (rq->end_io) {
|
||||
rq_qos_done(rq->q, rq);
|
||||
if (rq->end_io(rq, error) == RQ_END_IO_FREE)
|
||||
|
@ -1074,6 +1089,8 @@ void blk_mq_end_request_batch(struct io_comp_batch *iob)
|
|||
if (iob->need_ts)
|
||||
__blk_mq_end_request_acct(rq, now);
|
||||
|
||||
blk_mq_finish_request(rq);
|
||||
|
||||
rq_qos_done(rq->q, rq);
|
||||
|
||||
/*
|
||||
|
|
|
@ -499,6 +499,9 @@ void elv_unregister_queue(struct request_queue *q)
|
|||
|
||||
int elv_register(struct elevator_type *e)
|
||||
{
|
||||
/* finish request is mandatory */
|
||||
if (WARN_ON_ONCE(!e->ops.finish_request))
|
||||
return -EINVAL;
|
||||
/* insert_requests and dispatch_request are mandatory */
|
||||
if (WARN_ON_ONCE(!e->ops.insert_requests || !e->ops.dispatch_request))
|
||||
return -EINVAL;
|
||||
|
|
|
@ -1241,6 +1241,8 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
rsgl->sgl.need_unpin =
|
||||
iov_iter_extract_will_pin(&msg->msg_iter);
|
||||
rsgl->sgl.sgt.sgl = rsgl->sgl.sgl;
|
||||
rsgl->sgl.sgt.nents = 0;
|
||||
rsgl->sgl.sgt.orig_nents = 0;
|
||||
|
@ -1255,8 +1257,6 @@ int af_alg_get_rsgl(struct sock *sk, struct msghdr *msg, int flags,
|
|||
}
|
||||
|
||||
sg_mark_end(rsgl->sgl.sgt.sgl + rsgl->sgl.sgt.nents - 1);
|
||||
rsgl->sgl.need_unpin =
|
||||
iov_iter_extract_will_pin(&msg->msg_iter);
|
||||
|
||||
/* chain the new scatterlist with previous one */
|
||||
if (areq->last_rsgl)
|
||||
|
|
|
@ -501,9 +501,13 @@ static const struct dmi_system_id maingear_laptop[] = {
|
|||
static const struct dmi_system_id pcspecialist_laptop[] = {
|
||||
{
|
||||
.ident = "PCSpecialist Elimina Pro 16 M",
|
||||
/*
|
||||
* Some models have product-name "Elimina Pro 16 M",
|
||||
* others "GM6BGEQ". Match on board-name to match both.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "PCSpecialist"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Elimina Pro 16 M"),
|
||||
DMI_MATCH(DMI_BOARD_NAME, "GM6BGEQ"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
static struct device *rnbd_dev;
|
||||
static const struct class rnbd_dev_class = {
|
||||
.name = "rnbd_client",
|
||||
.name = "rnbd-client",
|
||||
};
|
||||
static struct kobject *rnbd_devs_kobj;
|
||||
|
||||
|
|
|
@ -2142,6 +2142,8 @@ static int sysc_reset(struct sysc *ddata)
|
|||
sysc_val = sysc_read_sysconfig(ddata);
|
||||
sysc_val |= sysc_mask;
|
||||
sysc_write(ddata, sysc_offset, sysc_val);
|
||||
/* Flush posted write */
|
||||
sysc_val = sysc_read_sysconfig(ddata);
|
||||
}
|
||||
|
||||
if (ddata->cfg.srst_udelay)
|
||||
|
|
|
@ -382,8 +382,8 @@ static void kick_trng(struct device *dev, int ent_delay)
|
|||
val = ent_delay;
|
||||
/* min. freq. count, equal to 1/4 of the entropy sample length */
|
||||
wr_reg32(&r4tst->rtfrqmin, val >> 2);
|
||||
/* max. freq. count, equal to 16 times the entropy sample length */
|
||||
wr_reg32(&r4tst->rtfrqmax, val << 4);
|
||||
/* disable maximum frequency count */
|
||||
wr_reg32(&r4tst->rtfrqmax, RTFRQMAX_DISABLE);
|
||||
}
|
||||
|
||||
wr_reg32(&r4tst->rtsdctl, (val << RTSDCTL_ENT_DLY_SHIFT) |
|
||||
|
|
|
@ -515,8 +515,9 @@ static ssize_t unexport_store(const struct class *class,
|
|||
* they may be undone on its behalf too.
|
||||
*/
|
||||
if (test_and_clear_bit(FLAG_SYSFS, &desc->flags)) {
|
||||
status = 0;
|
||||
gpiod_unexport(desc);
|
||||
gpiod_free(desc);
|
||||
status = 0;
|
||||
}
|
||||
done:
|
||||
if (status)
|
||||
|
@ -781,8 +782,10 @@ void gpiochip_sysfs_unregister(struct gpio_device *gdev)
|
|||
mutex_unlock(&sysfs_lock);
|
||||
|
||||
/* unregister gpiod class devices owned by sysfs */
|
||||
for_each_gpio_desc_with_flag(chip, desc, FLAG_SYSFS)
|
||||
for_each_gpio_desc_with_flag(chip, desc, FLAG_SYSFS) {
|
||||
gpiod_unexport(desc);
|
||||
gpiod_free(desc);
|
||||
}
|
||||
}
|
||||
|
||||
static int __init gpiolib_sysfs_init(void)
|
||||
|
|
|
@ -2167,12 +2167,18 @@ static bool gpiod_free_commit(struct gpio_desc *desc)
|
|||
|
||||
void gpiod_free(struct gpio_desc *desc)
|
||||
{
|
||||
if (desc && desc->gdev && gpiod_free_commit(desc)) {
|
||||
module_put(desc->gdev->owner);
|
||||
gpio_device_put(desc->gdev);
|
||||
} else {
|
||||
/*
|
||||
* We must not use VALIDATE_DESC_VOID() as the underlying gdev->chip
|
||||
* may already be NULL but we still want to put the references.
|
||||
*/
|
||||
if (!desc)
|
||||
return;
|
||||
|
||||
if (!gpiod_free_commit(desc))
|
||||
WARN_ON(extra_checks);
|
||||
}
|
||||
|
||||
module_put(desc->gdev->owner);
|
||||
gpio_device_put(desc->gdev);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -233,13 +233,14 @@ static inline u32 iproc_i2c_rd_reg(struct bcm_iproc_i2c_dev *iproc_i2c,
|
|||
u32 offset)
|
||||
{
|
||||
u32 val;
|
||||
unsigned long flags;
|
||||
|
||||
if (iproc_i2c->idm_base) {
|
||||
spin_lock(&iproc_i2c->idm_lock);
|
||||
spin_lock_irqsave(&iproc_i2c->idm_lock, flags);
|
||||
writel(iproc_i2c->ape_addr_mask,
|
||||
iproc_i2c->idm_base + IDM_CTRL_DIRECT_OFFSET);
|
||||
val = readl(iproc_i2c->base + offset);
|
||||
spin_unlock(&iproc_i2c->idm_lock);
|
||||
spin_unlock_irqrestore(&iproc_i2c->idm_lock, flags);
|
||||
} else {
|
||||
val = readl(iproc_i2c->base + offset);
|
||||
}
|
||||
|
@ -250,12 +251,14 @@ static inline u32 iproc_i2c_rd_reg(struct bcm_iproc_i2c_dev *iproc_i2c,
|
|||
static inline void iproc_i2c_wr_reg(struct bcm_iproc_i2c_dev *iproc_i2c,
|
||||
u32 offset, u32 val)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (iproc_i2c->idm_base) {
|
||||
spin_lock(&iproc_i2c->idm_lock);
|
||||
spin_lock_irqsave(&iproc_i2c->idm_lock, flags);
|
||||
writel(iproc_i2c->ape_addr_mask,
|
||||
iproc_i2c->idm_base + IDM_CTRL_DIRECT_OFFSET);
|
||||
writel(val, iproc_i2c->base + offset);
|
||||
spin_unlock(&iproc_i2c->idm_lock);
|
||||
spin_unlock_irqrestore(&iproc_i2c->idm_lock, flags);
|
||||
} else {
|
||||
writel(val, iproc_i2c->base + offset);
|
||||
}
|
||||
|
|
|
@ -588,9 +588,21 @@ i2c_dw_read(struct dw_i2c_dev *dev)
|
|||
u32 flags = msgs[dev->msg_read_idx].flags;
|
||||
|
||||
regmap_read(dev->map, DW_IC_DATA_CMD, &tmp);
|
||||
tmp &= DW_IC_DATA_CMD_DAT;
|
||||
/* Ensure length byte is a valid value */
|
||||
if (flags & I2C_M_RECV_LEN &&
|
||||
(tmp & DW_IC_DATA_CMD_DAT) <= I2C_SMBUS_BLOCK_MAX && tmp > 0) {
|
||||
if (flags & I2C_M_RECV_LEN) {
|
||||
/*
|
||||
* if IC_EMPTYFIFO_HOLD_MASTER_EN is set, which cannot be
|
||||
* detected from the registers, the controller can be
|
||||
* disabled if the STOP bit is set. But it is only set
|
||||
* after receiving block data response length in
|
||||
* I2C_FUNC_SMBUS_BLOCK_DATA case. That needs to read
|
||||
* another byte with STOP bit set when the block data
|
||||
* response length is invalid to complete the transaction.
|
||||
*/
|
||||
if (!tmp || tmp > I2C_SMBUS_BLOCK_MAX)
|
||||
tmp = 1;
|
||||
|
||||
len = i2c_dw_recv_len(dev, tmp);
|
||||
}
|
||||
*buf++ = tmp;
|
||||
|
|
|
@ -330,6 +330,14 @@ static irqreturn_t hisi_i2c_irq(int irq, void *context)
|
|||
struct hisi_i2c_controller *ctlr = context;
|
||||
u32 int_stat;
|
||||
|
||||
/*
|
||||
* Don't handle the interrupt if cltr->completion is NULL. We may
|
||||
* reach here because the interrupt is spurious or the transfer is
|
||||
* started by another port (e.g. firmware) rather than us.
|
||||
*/
|
||||
if (!ctlr->completion)
|
||||
return IRQ_NONE;
|
||||
|
||||
int_stat = readl(ctlr->iobase + HISI_I2C_INT_MSTAT);
|
||||
hisi_i2c_clear_int(ctlr, int_stat);
|
||||
if (!(int_stat & HISI_I2C_INT_ALL))
|
||||
|
|
|
@ -209,6 +209,9 @@ static int lpi2c_imx_config(struct lpi2c_imx_struct *lpi2c_imx)
|
|||
lpi2c_imx_set_mode(lpi2c_imx);
|
||||
|
||||
clk_rate = clk_get_rate(lpi2c_imx->clks[0].clk);
|
||||
if (!clk_rate)
|
||||
return -EINVAL;
|
||||
|
||||
if (lpi2c_imx->mode == HS || lpi2c_imx->mode == ULTRA_FAST)
|
||||
filt = 0;
|
||||
else
|
||||
|
|
|
@ -250,7 +250,8 @@ static int p2wi_probe(struct platform_device *pdev)
|
|||
|
||||
p2wi->rstc = devm_reset_control_get_exclusive(dev, NULL);
|
||||
if (IS_ERR(p2wi->rstc)) {
|
||||
dev_err(dev, "failed to retrieve reset controller: %d\n", ret);
|
||||
dev_err(dev, "failed to retrieve reset controller: %pe\n",
|
||||
p2wi->rstc);
|
||||
return PTR_ERR(p2wi->rstc);
|
||||
}
|
||||
|
||||
|
|
|
@ -442,7 +442,7 @@ static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
|
|||
if (IS_VI(i2c_dev))
|
||||
return 0;
|
||||
|
||||
if (!i2c_dev->hw->has_apb_dma) {
|
||||
if (i2c_dev->hw->has_apb_dma) {
|
||||
if (!IS_ENABLED(CONFIG_TEGRA20_APB_DMA)) {
|
||||
dev_dbg(i2c_dev->dev, "APB DMA support not enabled\n");
|
||||
return 0;
|
||||
|
@ -460,6 +460,7 @@ static int tegra_i2c_init_dma(struct tegra_i2c_dev *i2c_dev)
|
|||
i2c_dev->dma_chan = dma_request_chan(i2c_dev->dev, "tx");
|
||||
if (IS_ERR(i2c_dev->dma_chan)) {
|
||||
err = PTR_ERR(i2c_dev->dma_chan);
|
||||
i2c_dev->dma_chan = NULL;
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
|
|
|
@ -406,15 +406,15 @@ static ssize_t interval_store(struct device *dev,
|
|||
|
||||
static DEVICE_ATTR_RW(interval);
|
||||
|
||||
static ssize_t hw_control_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
static ssize_t offloaded_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct led_netdev_data *trigger_data = led_trigger_get_drvdata(dev);
|
||||
|
||||
return sprintf(buf, "%d\n", trigger_data->hw_control);
|
||||
}
|
||||
|
||||
static DEVICE_ATTR_RO(hw_control);
|
||||
static DEVICE_ATTR_RO(offloaded);
|
||||
|
||||
static struct attribute *netdev_trig_attrs[] = {
|
||||
&dev_attr_device_name.attr,
|
||||
|
@ -427,7 +427,7 @@ static struct attribute *netdev_trig_attrs[] = {
|
|||
&dev_attr_rx.attr,
|
||||
&dev_attr_tx.attr,
|
||||
&dev_attr_interval.attr,
|
||||
&dev_attr_hw_control.attr,
|
||||
&dev_attr_offloaded.attr,
|
||||
NULL
|
||||
};
|
||||
ATTRIBUTE_GROUPS(netdev_trig);
|
||||
|
|
|
@ -1310,6 +1310,8 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
|
|||
jpeg->dev = &pdev->dev;
|
||||
jpeg->variant = of_device_get_match_data(jpeg->dev);
|
||||
|
||||
platform_set_drvdata(pdev, jpeg);
|
||||
|
||||
ret = devm_of_platform_populate(&pdev->dev);
|
||||
if (ret) {
|
||||
v4l2_err(&jpeg->v4l2_dev, "Master of platform populate failed.");
|
||||
|
@ -1381,8 +1383,6 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
|
|||
jpeg->variant->dev_name, jpeg->vdev->num,
|
||||
VIDEO_MAJOR, jpeg->vdev->minor);
|
||||
|
||||
platform_set_drvdata(pdev, jpeg);
|
||||
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#include <linux/clk.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/math.h>
|
||||
#include <linux/mfd/syscon.h>
|
||||
#include <linux/minmax.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/of_device.h>
|
||||
#include <linux/of_graph.h>
|
||||
|
@ -1137,8 +1139,9 @@ __imx7_csi_video_try_fmt(struct v4l2_pix_format *pixfmt,
|
|||
* TODO: Implement configurable stride support.
|
||||
*/
|
||||
walign = 8 * 8 / cc->bpp;
|
||||
v4l_bound_align_image(&pixfmt->width, 1, 0xffff, walign,
|
||||
&pixfmt->height, 1, 0xffff, 1, 0);
|
||||
pixfmt->width = clamp(round_up(pixfmt->width, walign), walign,
|
||||
round_down(65535U, walign));
|
||||
pixfmt->height = clamp(pixfmt->height, 1U, 65535U);
|
||||
|
||||
pixfmt->bytesperline = pixfmt->width * cc->bpp / 8;
|
||||
pixfmt->sizeimage = pixfmt->bytesperline * pixfmt->height;
|
||||
|
|
|
@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
|
|||
map->menu_names = NULL;
|
||||
map->menu_mapping = NULL;
|
||||
|
||||
map->menu_mask = BIT_MASK(xmap->menu_count);
|
||||
map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
|
||||
|
||||
size = xmap->menu_count * sizeof(*map->menu_mapping);
|
||||
map->menu_mapping = kzalloc(size, GFP_KERNEL);
|
||||
|
|
|
@ -2097,14 +2097,14 @@ static void mmc_blk_mq_poll_completion(struct mmc_queue *mq,
|
|||
mmc_blk_urgent_bkops(mq, mqrq);
|
||||
}
|
||||
|
||||
static void mmc_blk_mq_dec_in_flight(struct mmc_queue *mq, struct request *req)
|
||||
static void mmc_blk_mq_dec_in_flight(struct mmc_queue *mq, enum mmc_issue_type issue_type)
|
||||
{
|
||||
unsigned long flags;
|
||||
bool put_card;
|
||||
|
||||
spin_lock_irqsave(&mq->lock, flags);
|
||||
|
||||
mq->in_flight[mmc_issue_type(mq, req)] -= 1;
|
||||
mq->in_flight[issue_type] -= 1;
|
||||
|
||||
put_card = (mmc_tot_in_flight(mq) == 0);
|
||||
|
||||
|
@ -2117,6 +2117,7 @@ static void mmc_blk_mq_dec_in_flight(struct mmc_queue *mq, struct request *req)
|
|||
static void mmc_blk_mq_post_req(struct mmc_queue *mq, struct request *req,
|
||||
bool can_sleep)
|
||||
{
|
||||
enum mmc_issue_type issue_type = mmc_issue_type(mq, req);
|
||||
struct mmc_queue_req *mqrq = req_to_mmc_queue_req(req);
|
||||
struct mmc_request *mrq = &mqrq->brq.mrq;
|
||||
struct mmc_host *host = mq->card->host;
|
||||
|
@ -2136,7 +2137,7 @@ static void mmc_blk_mq_post_req(struct mmc_queue *mq, struct request *req,
|
|||
blk_mq_complete_request(req);
|
||||
}
|
||||
|
||||
mmc_blk_mq_dec_in_flight(mq, req);
|
||||
mmc_blk_mq_dec_in_flight(mq, issue_type);
|
||||
}
|
||||
|
||||
void mmc_blk_mq_recovery(struct mmc_queue *mq)
|
||||
|
|
|
@ -210,13 +210,16 @@ static int sdhci_f_sdh30_remove(struct platform_device *pdev)
|
|||
{
|
||||
struct sdhci_host *host = platform_get_drvdata(pdev);
|
||||
struct f_sdhost_priv *priv = sdhci_f_sdhost_priv(host);
|
||||
|
||||
reset_control_assert(priv->rst);
|
||||
clk_disable_unprepare(priv->clk);
|
||||
clk_disable_unprepare(priv->clk_iface);
|
||||
struct clk *clk_iface = priv->clk_iface;
|
||||
struct reset_control *rst = priv->rst;
|
||||
struct clk *clk = priv->clk;
|
||||
|
||||
sdhci_pltfm_unregister(pdev);
|
||||
|
||||
reset_control_assert(rst);
|
||||
clk_disable_unprepare(clk);
|
||||
clk_disable_unprepare(clk_iface);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -863,11 +863,9 @@ static int spmmc_drv_probe(struct platform_device *pdev)
|
|||
struct spmmc_host *host;
|
||||
int ret = 0;
|
||||
|
||||
mmc = mmc_alloc_host(sizeof(*host), &pdev->dev);
|
||||
if (!mmc) {
|
||||
ret = -ENOMEM;
|
||||
goto probe_free_host;
|
||||
}
|
||||
mmc = devm_mmc_alloc_host(&pdev->dev, sizeof(struct spmmc_host));
|
||||
if (!mmc)
|
||||
return -ENOMEM;
|
||||
|
||||
host = mmc_priv(mmc);
|
||||
host->mmc = mmc;
|
||||
|
@ -902,7 +900,7 @@ static int spmmc_drv_probe(struct platform_device *pdev)
|
|||
|
||||
ret = mmc_of_parse(mmc);
|
||||
if (ret)
|
||||
goto probe_free_host;
|
||||
goto clk_disable;
|
||||
|
||||
mmc->ops = &spmmc_ops;
|
||||
mmc->f_min = SPMMC_MIN_CLK;
|
||||
|
@ -911,7 +909,7 @@ static int spmmc_drv_probe(struct platform_device *pdev)
|
|||
|
||||
ret = mmc_regulator_get_supply(mmc);
|
||||
if (ret)
|
||||
goto probe_free_host;
|
||||
goto clk_disable;
|
||||
|
||||
if (!mmc->ocr_avail)
|
||||
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
|
||||
|
@ -927,14 +925,17 @@ static int spmmc_drv_probe(struct platform_device *pdev)
|
|||
host->tuning_info.enable_tuning = 1;
|
||||
pm_runtime_set_active(&pdev->dev);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
mmc_add_host(mmc);
|
||||
ret = mmc_add_host(mmc);
|
||||
if (ret)
|
||||
goto pm_disable;
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
|
||||
probe_free_host:
|
||||
if (mmc)
|
||||
mmc_free_host(mmc);
|
||||
pm_disable:
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
|
||||
clk_disable:
|
||||
clk_disable_unprepare(host->clk);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -948,7 +949,6 @@ static int spmmc_drv_remove(struct platform_device *dev)
|
|||
pm_runtime_put_noidle(&dev->dev);
|
||||
pm_runtime_disable(&dev->dev);
|
||||
platform_set_drvdata(dev, NULL);
|
||||
mmc_free_host(host->mmc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -1705,8 +1705,6 @@ static int wbsd_init(struct device *dev, int base, int irq, int dma,
|
|||
|
||||
wbsd_release_resources(host);
|
||||
wbsd_free_mmc(dev);
|
||||
|
||||
mmc_free_host(mmc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -660,10 +660,10 @@ static struct slave *rlb_arp_xmit(struct sk_buff *skb, struct bonding *bond)
|
|||
return NULL;
|
||||
arp = (struct arp_pkt *)skb_network_header(skb);
|
||||
|
||||
/* Don't modify or load balance ARPs that do not originate locally
|
||||
* (e.g.,arrive via a bridge).
|
||||
/* Don't modify or load balance ARPs that do not originate
|
||||
* from the bond itself or a VLAN directly above the bond.
|
||||
*/
|
||||
if (!bond_slave_has_mac_rx(bond, arp->mac_src))
|
||||
if (!bond_slave_has_mac_rcu(bond, arp->mac_src))
|
||||
return NULL;
|
||||
|
||||
dev = ip_dev_find(dev_net(bond->dev), arp->ip_src);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue