mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
Merge remote-tracking branch 'stable/linux-6.6.y' into rpi-6.6.y
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 77
|
||||
SUBLEVEL = 78
|
||||
EXTRAVERSION =
|
||||
NAME = Pinguïn Aangedreven
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
ranges = <0x00000000 0x4a000000 0x100000>, /* segment 0 */
|
||||
<0x00100000 0x4a100000 0x100000>, /* segment 1 */
|
||||
<0x00200000 0x4a200000 0x100000>; /* segment 2 */
|
||||
dma-ranges;
|
||||
|
||||
segment@0 { /* 0x4a000000 */
|
||||
compatible = "simple-pm-bus";
|
||||
@@ -557,6 +558,7 @@
|
||||
<0x0007e000 0x0017e000 0x001000>, /* ap 124 */
|
||||
<0x00059000 0x00159000 0x001000>, /* ap 125 */
|
||||
<0x0005a000 0x0015a000 0x001000>; /* ap 126 */
|
||||
dma-ranges;
|
||||
|
||||
target-module@2000 { /* 0x4a102000, ap 27 3c.0 */
|
||||
compatible = "ti,sysc";
|
||||
|
||||
@@ -446,6 +446,7 @@
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <
|
||||
&hsusb2_2_pins
|
||||
&mcspi3hog_pins
|
||||
>;
|
||||
|
||||
hsusb2_2_pins: hsusb2-2-pins {
|
||||
@@ -459,6 +460,15 @@
|
||||
>;
|
||||
};
|
||||
|
||||
mcspi3hog_pins: mcspi3hog-pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25dc, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d0 */
|
||||
OMAP3630_CORE2_IOPAD(0x25de, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d1 */
|
||||
OMAP3630_CORE2_IOPAD(0x25e0, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d2 */
|
||||
OMAP3630_CORE2_IOPAD(0x25e2, PIN_OUTPUT_PULLDOWN | MUX_MODE4) /* etk_d3 */
|
||||
>;
|
||||
};
|
||||
|
||||
spi_gpio_pins: spi-gpio-pinmux-pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25d8, PIN_OUTPUT | MUX_MODE4) /* clk */
|
||||
|
||||
@@ -1709,7 +1709,7 @@
|
||||
compatible = "nvidia,tegra234-sce-fabric";
|
||||
reg = <0x0 0xb600000 0x0 0x40000>;
|
||||
interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "okay";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
rce-fabric@be00000 {
|
||||
@@ -1889,7 +1889,7 @@
|
||||
};
|
||||
|
||||
dce-fabric@de00000 {
|
||||
compatible = "nvidia,tegra234-sce-fabric";
|
||||
compatible = "nvidia,tegra234-dce-fabric";
|
||||
reg = <0x0 0xde00000 0x0 0x40000>;
|
||||
interrupts = <GIC_SPI 381 IRQ_TYPE_LEVEL_HIGH>;
|
||||
status = "okay";
|
||||
@@ -1912,6 +1912,8 @@
|
||||
#redistributor-regions = <1>;
|
||||
#interrupt-cells = <3>;
|
||||
interrupt-controller;
|
||||
|
||||
#address-cells = <0>;
|
||||
};
|
||||
|
||||
smmu_iso: iommu@10000000 {
|
||||
|
||||
@@ -1667,7 +1667,7 @@
|
||||
|
||||
remoteproc_mpss: remoteproc@6080000 {
|
||||
compatible = "qcom,sm6115-mpss-pas";
|
||||
reg = <0x0 0x06080000 0x0 0x100>;
|
||||
reg = <0x0 0x06080000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 307 IRQ_TYPE_EDGE_RISING>,
|
||||
<&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -2310,9 +2310,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
remoteproc_adsp: remoteproc@ab00000 {
|
||||
remoteproc_adsp: remoteproc@a400000 {
|
||||
compatible = "qcom,sm6115-adsp-pas";
|
||||
reg = <0x0 0x0ab00000 0x0 0x100>;
|
||||
reg = <0x0 0x0a400000 0x0 0x4040>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 282 IRQ_TYPE_EDGE_RISING>,
|
||||
<&adsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -2384,7 +2384,7 @@
|
||||
|
||||
remoteproc_cdsp: remoteproc@b300000 {
|
||||
compatible = "qcom,sm6115-cdsp-pas";
|
||||
reg = <0x0 0x0b300000 0x0 0x100000>;
|
||||
reg = <0x0 0x0b300000 0x0 0x4040>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 265 IRQ_TYPE_EDGE_RISING>,
|
||||
<&cdsp_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
|
||||
@@ -935,7 +935,7 @@
|
||||
power-domains = <&rpmhpd SM6350_CX>;
|
||||
operating-points-v2 = <&qup_opp_table>;
|
||||
interconnects = <&clk_virt MASTER_QUP_CORE_0 0 &clk_virt SLAVE_QUP_CORE_0 0>,
|
||||
<&aggre1_noc MASTER_QUP_0 0 &clk_virt SLAVE_EBI_CH0 0>;
|
||||
<&gem_noc MASTER_AMPSS_M0 0 &config_noc SLAVE_QUP_0 0>;
|
||||
interconnect-names = "qup-core", "qup-config";
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -1259,7 +1259,7 @@
|
||||
|
||||
adsp: remoteproc@3000000 {
|
||||
compatible = "qcom,sm6350-adsp-pas";
|
||||
reg = <0 0x03000000 0 0x100>;
|
||||
reg = <0x0 0x03000000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&pdc 6 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -1480,7 +1480,7 @@
|
||||
|
||||
mpss: remoteproc@4080000 {
|
||||
compatible = "qcom,sm6350-mpss-pas";
|
||||
reg = <0x0 0x04080000 0x0 0x4040>;
|
||||
reg = <0x0 0x04080000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 136 IRQ_TYPE_EDGE_RISING>,
|
||||
<&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
|
||||
@@ -1471,9 +1471,9 @@
|
||||
#power-domain-cells = <1>;
|
||||
};
|
||||
|
||||
remoteproc_mss: remoteproc@6000000 {
|
||||
remoteproc_mss: remoteproc@6080000 {
|
||||
compatible = "qcom,sm6375-mpss-pas";
|
||||
reg = <0 0x06000000 0 0x4040>;
|
||||
reg = <0x0 0x06080000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 307 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -1514,7 +1514,7 @@
|
||||
|
||||
remoteproc_adsp: remoteproc@a400000 {
|
||||
compatible = "qcom,sm6375-adsp-pas";
|
||||
reg = <0 0x0a400000 0 0x100>;
|
||||
reg = <0 0x0a400000 0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 282 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -1550,9 +1550,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
remoteproc_cdsp: remoteproc@b000000 {
|
||||
remoteproc_cdsp: remoteproc@b300000 {
|
||||
compatible = "qcom,sm6375-cdsp-pas";
|
||||
reg = <0x0 0x0b000000 0x0 0x100000>;
|
||||
reg = <0x0 0x0b300000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 265 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
|
||||
@@ -1819,6 +1819,142 @@
|
||||
#hwlock-cells = <1>;
|
||||
};
|
||||
|
||||
adsp: remoteproc@3000000 {
|
||||
compatible = "qcom,sm8350-adsp-pas";
|
||||
reg = <0x0 0x03000000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "wdog", "fatal", "ready",
|
||||
"handover", "stop-ack";
|
||||
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "xo";
|
||||
|
||||
power-domains = <&rpmhpd RPMHPD_LCX>,
|
||||
<&rpmhpd RPMHPD_LMX>;
|
||||
power-domain-names = "lcx", "lmx";
|
||||
|
||||
memory-region = <&pil_adsp_mem>;
|
||||
|
||||
qcom,qmp = <&aoss_qmp>;
|
||||
|
||||
qcom,smem-states = <&smp2p_adsp_out 0>;
|
||||
qcom,smem-state-names = "stop";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
glink-edge {
|
||||
interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP
|
||||
IRQ_TYPE_EDGE_RISING>;
|
||||
mboxes = <&ipcc IPCC_CLIENT_LPASS
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP>;
|
||||
|
||||
label = "lpass";
|
||||
qcom,remote-pid = <2>;
|
||||
|
||||
apr {
|
||||
compatible = "qcom,apr-v2";
|
||||
qcom,glink-channels = "apr_audio_svc";
|
||||
qcom,domain = <APR_DOMAIN_ADSP>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
service@3 {
|
||||
reg = <APR_SVC_ADSP_CORE>;
|
||||
compatible = "qcom,q6core";
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
};
|
||||
|
||||
q6afe: service@4 {
|
||||
compatible = "qcom,q6afe";
|
||||
reg = <APR_SVC_AFE>;
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
|
||||
q6afedai: dais {
|
||||
compatible = "qcom,q6afe-dais";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#sound-dai-cells = <1>;
|
||||
};
|
||||
|
||||
q6afecc: clock-controller {
|
||||
compatible = "qcom,q6afe-clocks";
|
||||
#clock-cells = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
q6asm: service@7 {
|
||||
compatible = "qcom,q6asm";
|
||||
reg = <APR_SVC_ASM>;
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
|
||||
q6asmdai: dais {
|
||||
compatible = "qcom,q6asm-dais";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#sound-dai-cells = <1>;
|
||||
iommus = <&apps_smmu 0x1801 0x0>;
|
||||
|
||||
dai@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
dai@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
dai@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
q6adm: service@8 {
|
||||
compatible = "qcom,q6adm";
|
||||
reg = <APR_SVC_ADM>;
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
|
||||
q6routing: routing {
|
||||
compatible = "qcom,q6adm-routing";
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fastrpc {
|
||||
compatible = "qcom,fastrpc";
|
||||
qcom,glink-channels = "fastrpcglink-apps-dsp";
|
||||
label = "adsp";
|
||||
qcom,non-secure-domain;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
compute-cb@3 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <3>;
|
||||
iommus = <&apps_smmu 0x1803 0x0>;
|
||||
};
|
||||
|
||||
compute-cb@4 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <4>;
|
||||
iommus = <&apps_smmu 0x1804 0x0>;
|
||||
};
|
||||
|
||||
compute-cb@5 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <5>;
|
||||
iommus = <&apps_smmu 0x1805 0x0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
lpass_tlmm: pinctrl@33c0000 {
|
||||
compatible = "qcom,sm8350-lpass-lpi-pinctrl";
|
||||
reg = <0 0x033c0000 0 0x20000>,
|
||||
@@ -2020,7 +2156,7 @@
|
||||
|
||||
mpss: remoteproc@4080000 {
|
||||
compatible = "qcom,sm8350-mpss-pas";
|
||||
reg = <0x0 0x04080000 0x0 0x4040>;
|
||||
reg = <0x0 0x04080000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -2299,6 +2435,115 @@
|
||||
qcom,bcm-voters = <&apps_bcm_voter>;
|
||||
};
|
||||
|
||||
cdsp: remoteproc@a300000 {
|
||||
compatible = "qcom,sm8350-cdsp-pas";
|
||||
reg = <0x0 0x0a300000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 3 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "wdog", "fatal", "ready",
|
||||
"handover", "stop-ack";
|
||||
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "xo";
|
||||
|
||||
power-domains = <&rpmhpd RPMHPD_CX>,
|
||||
<&rpmhpd RPMHPD_MXC>;
|
||||
power-domain-names = "cx", "mxc";
|
||||
|
||||
interconnects = <&compute_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>;
|
||||
|
||||
memory-region = <&pil_cdsp_mem>;
|
||||
|
||||
qcom,qmp = <&aoss_qmp>;
|
||||
|
||||
qcom,smem-states = <&smp2p_cdsp_out 0>;
|
||||
qcom,smem-state-names = "stop";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
glink-edge {
|
||||
interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP
|
||||
IRQ_TYPE_EDGE_RISING>;
|
||||
mboxes = <&ipcc IPCC_CLIENT_CDSP
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP>;
|
||||
|
||||
label = "cdsp";
|
||||
qcom,remote-pid = <5>;
|
||||
|
||||
fastrpc {
|
||||
compatible = "qcom,fastrpc";
|
||||
qcom,glink-channels = "fastrpcglink-apps-dsp";
|
||||
label = "cdsp";
|
||||
qcom,non-secure-domain;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
compute-cb@1 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <1>;
|
||||
iommus = <&apps_smmu 0x2161 0x0400>,
|
||||
<&apps_smmu 0x1181 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@2 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <2>;
|
||||
iommus = <&apps_smmu 0x2162 0x0400>,
|
||||
<&apps_smmu 0x1182 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@3 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <3>;
|
||||
iommus = <&apps_smmu 0x2163 0x0400>,
|
||||
<&apps_smmu 0x1183 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@4 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <4>;
|
||||
iommus = <&apps_smmu 0x2164 0x0400>,
|
||||
<&apps_smmu 0x1184 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@5 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <5>;
|
||||
iommus = <&apps_smmu 0x2165 0x0400>,
|
||||
<&apps_smmu 0x1185 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@6 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <6>;
|
||||
iommus = <&apps_smmu 0x2166 0x0400>,
|
||||
<&apps_smmu 0x1186 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@7 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <7>;
|
||||
iommus = <&apps_smmu 0x2167 0x0400>,
|
||||
<&apps_smmu 0x1187 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@8 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <8>;
|
||||
iommus = <&apps_smmu 0x2168 0x0400>,
|
||||
<&apps_smmu 0x1188 0x0420>;
|
||||
};
|
||||
|
||||
/* note: secure cb9 in downstream */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
usb_1: usb@a6f8800 {
|
||||
compatible = "qcom,sm8350-dwc3", "qcom,dwc3";
|
||||
reg = <0 0x0a6f8800 0 0x400>;
|
||||
@@ -3204,142 +3449,6 @@
|
||||
<GIC_SPI 707 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
||||
|
||||
adsp: remoteproc@17300000 {
|
||||
compatible = "qcom,sm8350-adsp-pas";
|
||||
reg = <0 0x17300000 0 0x100>;
|
||||
|
||||
interrupts-extended = <&pdc 6 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 1 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 2 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_adsp_in 3 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "wdog", "fatal", "ready",
|
||||
"handover", "stop-ack";
|
||||
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "xo";
|
||||
|
||||
power-domains = <&rpmhpd RPMHPD_LCX>,
|
||||
<&rpmhpd RPMHPD_LMX>;
|
||||
power-domain-names = "lcx", "lmx";
|
||||
|
||||
memory-region = <&pil_adsp_mem>;
|
||||
|
||||
qcom,qmp = <&aoss_qmp>;
|
||||
|
||||
qcom,smem-states = <&smp2p_adsp_out 0>;
|
||||
qcom,smem-state-names = "stop";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
glink-edge {
|
||||
interrupts-extended = <&ipcc IPCC_CLIENT_LPASS
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP
|
||||
IRQ_TYPE_EDGE_RISING>;
|
||||
mboxes = <&ipcc IPCC_CLIENT_LPASS
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP>;
|
||||
|
||||
label = "lpass";
|
||||
qcom,remote-pid = <2>;
|
||||
|
||||
apr {
|
||||
compatible = "qcom,apr-v2";
|
||||
qcom,glink-channels = "apr_audio_svc";
|
||||
qcom,domain = <APR_DOMAIN_ADSP>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
service@3 {
|
||||
reg = <APR_SVC_ADSP_CORE>;
|
||||
compatible = "qcom,q6core";
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
};
|
||||
|
||||
q6afe: service@4 {
|
||||
compatible = "qcom,q6afe";
|
||||
reg = <APR_SVC_AFE>;
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
|
||||
q6afedai: dais {
|
||||
compatible = "qcom,q6afe-dais";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#sound-dai-cells = <1>;
|
||||
};
|
||||
|
||||
q6afecc: clock-controller {
|
||||
compatible = "qcom,q6afe-clocks";
|
||||
#clock-cells = <2>;
|
||||
};
|
||||
};
|
||||
|
||||
q6asm: service@7 {
|
||||
compatible = "qcom,q6asm";
|
||||
reg = <APR_SVC_ASM>;
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
|
||||
q6asmdai: dais {
|
||||
compatible = "qcom,q6asm-dais";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
#sound-dai-cells = <1>;
|
||||
iommus = <&apps_smmu 0x1801 0x0>;
|
||||
|
||||
dai@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
dai@1 {
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
dai@2 {
|
||||
reg = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
q6adm: service@8 {
|
||||
compatible = "qcom,q6adm";
|
||||
reg = <APR_SVC_ADM>;
|
||||
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
|
||||
|
||||
q6routing: routing {
|
||||
compatible = "qcom,q6adm-routing";
|
||||
#sound-dai-cells = <0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
fastrpc {
|
||||
compatible = "qcom,fastrpc";
|
||||
qcom,glink-channels = "fastrpcglink-apps-dsp";
|
||||
label = "adsp";
|
||||
qcom,non-secure-domain;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
compute-cb@3 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <3>;
|
||||
iommus = <&apps_smmu 0x1803 0x0>;
|
||||
};
|
||||
|
||||
compute-cb@4 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <4>;
|
||||
iommus = <&apps_smmu 0x1804 0x0>;
|
||||
};
|
||||
|
||||
compute-cb@5 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <5>;
|
||||
iommus = <&apps_smmu 0x1805 0x0>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
intc: interrupt-controller@17a00000 {
|
||||
compatible = "arm,gic-v3";
|
||||
#interrupt-cells = <3>;
|
||||
@@ -3508,115 +3617,6 @@
|
||||
#freq-domain-cells = <1>;
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
cdsp: remoteproc@98900000 {
|
||||
compatible = "qcom,sm8350-cdsp-pas";
|
||||
reg = <0 0x98900000 0 0x1400000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 1 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 2 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 3 IRQ_TYPE_EDGE_RISING>;
|
||||
interrupt-names = "wdog", "fatal", "ready",
|
||||
"handover", "stop-ack";
|
||||
|
||||
clocks = <&rpmhcc RPMH_CXO_CLK>;
|
||||
clock-names = "xo";
|
||||
|
||||
power-domains = <&rpmhpd RPMHPD_CX>,
|
||||
<&rpmhpd RPMHPD_MXC>;
|
||||
power-domain-names = "cx", "mxc";
|
||||
|
||||
interconnects = <&compute_noc MASTER_CDSP_PROC 0 &mc_virt SLAVE_EBI1 0>;
|
||||
|
||||
memory-region = <&pil_cdsp_mem>;
|
||||
|
||||
qcom,qmp = <&aoss_qmp>;
|
||||
|
||||
qcom,smem-states = <&smp2p_cdsp_out 0>;
|
||||
qcom,smem-state-names = "stop";
|
||||
|
||||
status = "disabled";
|
||||
|
||||
glink-edge {
|
||||
interrupts-extended = <&ipcc IPCC_CLIENT_CDSP
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP
|
||||
IRQ_TYPE_EDGE_RISING>;
|
||||
mboxes = <&ipcc IPCC_CLIENT_CDSP
|
||||
IPCC_MPROC_SIGNAL_GLINK_QMP>;
|
||||
|
||||
label = "cdsp";
|
||||
qcom,remote-pid = <5>;
|
||||
|
||||
fastrpc {
|
||||
compatible = "qcom,fastrpc";
|
||||
qcom,glink-channels = "fastrpcglink-apps-dsp";
|
||||
label = "cdsp";
|
||||
qcom,non-secure-domain;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
compute-cb@1 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <1>;
|
||||
iommus = <&apps_smmu 0x2161 0x0400>,
|
||||
<&apps_smmu 0x1181 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@2 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <2>;
|
||||
iommus = <&apps_smmu 0x2162 0x0400>,
|
||||
<&apps_smmu 0x1182 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@3 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <3>;
|
||||
iommus = <&apps_smmu 0x2163 0x0400>,
|
||||
<&apps_smmu 0x1183 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@4 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <4>;
|
||||
iommus = <&apps_smmu 0x2164 0x0400>,
|
||||
<&apps_smmu 0x1184 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@5 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <5>;
|
||||
iommus = <&apps_smmu 0x2165 0x0400>,
|
||||
<&apps_smmu 0x1185 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@6 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <6>;
|
||||
iommus = <&apps_smmu 0x2166 0x0400>,
|
||||
<&apps_smmu 0x1186 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@7 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <7>;
|
||||
iommus = <&apps_smmu 0x2167 0x0400>,
|
||||
<&apps_smmu 0x1187 0x0420>;
|
||||
};
|
||||
|
||||
compute-cb@8 {
|
||||
compatible = "qcom,fastrpc-compute-cb";
|
||||
reg = <8>;
|
||||
iommus = <&apps_smmu 0x2168 0x0400>,
|
||||
<&apps_smmu 0x1188 0x0420>;
|
||||
};
|
||||
|
||||
/* note: secure cb9 in downstream */
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
thermal_zones: thermal-zones {
|
||||
|
||||
@@ -2475,7 +2475,7 @@
|
||||
|
||||
remoteproc_cdsp: remoteproc@32300000 {
|
||||
compatible = "qcom,sm8450-cdsp-pas";
|
||||
reg = <0 0x32300000 0 0x1400000>;
|
||||
reg = <0 0x32300000 0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -2581,7 +2581,7 @@
|
||||
|
||||
remoteproc_mpss: remoteproc@4080000 {
|
||||
compatible = "qcom,sm8450-mpss-pas";
|
||||
reg = <0x0 0x04080000 0x0 0x4040>;
|
||||
reg = <0x0 0x04080000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
|
||||
@@ -1986,7 +1986,7 @@
|
||||
|
||||
remoteproc_mpss: remoteproc@4080000 {
|
||||
compatible = "qcom,sm8550-mpss-pas";
|
||||
reg = <0x0 0x04080000 0x0 0x4040>;
|
||||
reg = <0x0 0x04080000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 264 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_modem_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
@@ -2448,9 +2448,8 @@
|
||||
|
||||
power-domains = <&dispcc MDSS_GDSC>;
|
||||
|
||||
interconnects = <&mmss_noc MASTER_MDP 0 &gem_noc SLAVE_LLCC 0>,
|
||||
<&mc_virt MASTER_LLCC 0 &mc_virt SLAVE_EBI1 0>;
|
||||
interconnect-names = "mdp0-mem", "mdp1-mem";
|
||||
interconnects = <&mmss_noc MASTER_MDP 0 &mc_virt SLAVE_EBI1 0>;
|
||||
interconnect-names = "mdp0-mem";
|
||||
|
||||
iommus = <&apps_smmu 0x1c00 0x2>;
|
||||
|
||||
@@ -4089,7 +4088,7 @@
|
||||
|
||||
remoteproc_cdsp: remoteproc@32300000 {
|
||||
compatible = "qcom,sm8550-cdsp-pas";
|
||||
reg = <0x0 0x32300000 0x0 0x1400000>;
|
||||
reg = <0x0 0x32300000 0x0 0x10000>;
|
||||
|
||||
interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_EDGE_RISING>,
|
||||
<&smp2p_cdsp_in 0 IRQ_TYPE_EDGE_RISING>,
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
snps,reset-active-low;
|
||||
snps,reset-delays-us = <0 10000 50000>;
|
||||
tx_delay = <0x10>;
|
||||
rx_delay = <0x10>;
|
||||
rx_delay = <0x23>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
@@ -467,10 +467,8 @@ static void timer_emulate(struct arch_timer_context *ctx)
|
||||
|
||||
trace_kvm_timer_emulate(ctx, should_fire);
|
||||
|
||||
if (should_fire != ctx->irq.level) {
|
||||
if (should_fire != ctx->irq.level)
|
||||
kvm_timer_update_irq(ctx->vcpu, should_fire, ctx);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the timer can fire now, we don't need to have a soft timer
|
||||
|
||||
@@ -526,6 +526,18 @@ pte_t huge_ptep_clear_flush(struct vm_area_struct *vma,
|
||||
|
||||
static int __init hugetlbpage_init(void)
|
||||
{
|
||||
/*
|
||||
* HugeTLB pages are supported on maximum four page table
|
||||
* levels (PUD, CONT PMD, PMD, CONT PTE) for a given base
|
||||
* page size, corresponding to hugetlb_add_hstate() calls
|
||||
* here.
|
||||
*
|
||||
* HUGE_MAX_HSTATE should at least match maximum supported
|
||||
* HugeTLB page sizes on the platform. Any new addition to
|
||||
* supported HugeTLB page sizes will also require changing
|
||||
* HUGE_MAX_HSTATE as well.
|
||||
*/
|
||||
BUILD_BUG_ON(HUGE_MAX_HSTATE < 4);
|
||||
if (pud_sect_supported())
|
||||
hugetlb_add_hstate(PUD_SHIFT - PAGE_SHIFT);
|
||||
|
||||
|
||||
@@ -72,6 +72,16 @@ struct user_watch_state {
|
||||
} dbg_regs[8];
|
||||
};
|
||||
|
||||
struct user_watch_state_v2 {
|
||||
uint64_t dbg_info;
|
||||
struct {
|
||||
uint64_t addr;
|
||||
uint64_t mask;
|
||||
uint32_t ctrl;
|
||||
uint32_t pad;
|
||||
} dbg_regs[14];
|
||||
};
|
||||
|
||||
#define PTRACE_SYSEMU 0x1f
|
||||
#define PTRACE_SYSEMU_SINGLESTEP 0x20
|
||||
|
||||
|
||||
@@ -720,7 +720,7 @@ static int hw_break_set(struct task_struct *target,
|
||||
unsigned int note_type = regset->core_note_type;
|
||||
|
||||
/* Resource info */
|
||||
offset = offsetof(struct user_watch_state, dbg_regs);
|
||||
offset = offsetof(struct user_watch_state_v2, dbg_regs);
|
||||
user_regset_copyin_ignore(&pos, &count, &kbuf, &ubuf, 0, offset);
|
||||
|
||||
/* (address, mask, ctrl) registers */
|
||||
@@ -920,7 +920,7 @@ static const struct user_regset loongarch64_regsets[] = {
|
||||
#ifdef CONFIG_HAVE_HW_BREAKPOINT
|
||||
[REGSET_HW_BREAK] = {
|
||||
.core_note_type = NT_LOONGARCH_HW_BREAK,
|
||||
.n = sizeof(struct user_watch_state) / sizeof(u32),
|
||||
.n = sizeof(struct user_watch_state_v2) / sizeof(u32),
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
.regset_get = hw_break_get,
|
||||
@@ -928,7 +928,7 @@ static const struct user_regset loongarch64_regsets[] = {
|
||||
},
|
||||
[REGSET_HW_WATCH] = {
|
||||
.core_note_type = NT_LOONGARCH_HW_WATCH,
|
||||
.n = sizeof(struct user_watch_state) / sizeof(u32),
|
||||
.n = sizeof(struct user_watch_state_v2) / sizeof(u32),
|
||||
.size = sizeof(u32),
|
||||
.align = sizeof(u32),
|
||||
.regset_get = hw_break_get,
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
#ifndef CONFIG_PCI
|
||||
|
||||
#include <asm/raw_io.h>
|
||||
#include <asm/io.h>
|
||||
#include <asm/kmap.h>
|
||||
|
||||
/*
|
||||
@@ -29,9 +29,9 @@
|
||||
#define inw_p(port) 0
|
||||
#define outb_p(port, val) do { } while (0)
|
||||
#define outw(port, val) do { } while (0)
|
||||
#define readb raw_inb
|
||||
#define writeb raw_outb
|
||||
#define writew raw_outw
|
||||
#define readb __raw_readb
|
||||
#define writeb __raw_writeb
|
||||
#define writew __raw_writew
|
||||
|
||||
#endif /* CONFIG_PCI */
|
||||
#endif /* _ASM_M68K_VGA_H */
|
||||
|
||||
@@ -248,7 +248,7 @@ int ftrace_disable_ftrace_graph_caller(void)
|
||||
#define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */
|
||||
#define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */
|
||||
|
||||
unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
|
||||
static unsigned long ftrace_get_parent_ra_addr(unsigned long self_ra, unsigned long
|
||||
old_parent_ra, unsigned long parent_ra_addr, unsigned long fp)
|
||||
{
|
||||
unsigned long sp, ip, tmp;
|
||||
|
||||
@@ -21,13 +21,11 @@ static ssize_t boardinfo_show(struct kobject *kobj,
|
||||
"BIOS Info\n"
|
||||
"Vendor\t\t\t: %s\n"
|
||||
"Version\t\t\t: %s\n"
|
||||
"ROM Size\t\t: %d KB\n"
|
||||
"Release Date\t\t: %s\n",
|
||||
strsep(&tmp_board_manufacturer, "-"),
|
||||
eboard->name,
|
||||
strsep(&tmp_bios_vendor, "-"),
|
||||
einter->description,
|
||||
einter->size,
|
||||
especial->special_name);
|
||||
}
|
||||
static struct kobj_attribute boardinfo_attr = __ATTR(boardinfo, 0444,
|
||||
|
||||
@@ -1660,7 +1660,7 @@ static int fpux_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
|
||||
break;
|
||||
}
|
||||
|
||||
case 0x3:
|
||||
case 0x7:
|
||||
if (MIPSInst_FUNC(ir) != pfetch_op)
|
||||
return SIGILL;
|
||||
|
||||
|
||||
@@ -242,7 +242,7 @@ static inline int tlbe_is_writable(struct kvm_book3e_206_tlb_entry *tlbe)
|
||||
return tlbe->mas7_3 & (MAS3_SW|MAS3_UW);
|
||||
}
|
||||
|
||||
static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref,
|
||||
static inline bool kvmppc_e500_ref_setup(struct tlbe_ref *ref,
|
||||
struct kvm_book3e_206_tlb_entry *gtlbe,
|
||||
kvm_pfn_t pfn, unsigned int wimg)
|
||||
{
|
||||
@@ -252,11 +252,7 @@ static inline void kvmppc_e500_ref_setup(struct tlbe_ref *ref,
|
||||
/* Use guest supplied MAS2_G and MAS2_E */
|
||||
ref->flags |= (gtlbe->mas2 & MAS2_ATTRIB_MASK) | wimg;
|
||||
|
||||
/* Mark the page accessed */
|
||||
kvm_set_pfn_accessed(pfn);
|
||||
|
||||
if (tlbe_is_writable(gtlbe))
|
||||
kvm_set_pfn_dirty(pfn);
|
||||
return tlbe_is_writable(gtlbe);
|
||||
}
|
||||
|
||||
static inline void kvmppc_e500_ref_release(struct tlbe_ref *ref)
|
||||
@@ -326,6 +322,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
{
|
||||
struct kvm_memory_slot *slot;
|
||||
unsigned long pfn = 0; /* silence GCC warning */
|
||||
struct page *page = NULL;
|
||||
unsigned long hva;
|
||||
int pfnmap = 0;
|
||||
int tsize = BOOK3E_PAGESZ_4K;
|
||||
@@ -337,6 +334,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
unsigned int wimg = 0;
|
||||
pgd_t *pgdir;
|
||||
unsigned long flags;
|
||||
bool writable = false;
|
||||
|
||||
/* used to check for invalidations in progress */
|
||||
mmu_seq = kvm->mmu_invalidate_seq;
|
||||
@@ -446,7 +444,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
|
||||
if (likely(!pfnmap)) {
|
||||
tsize_pages = 1UL << (tsize + 10 - PAGE_SHIFT);
|
||||
pfn = gfn_to_pfn_memslot(slot, gfn);
|
||||
pfn = __kvm_faultin_pfn(slot, gfn, FOLL_WRITE, NULL, &page);
|
||||
if (is_error_noslot_pfn(pfn)) {
|
||||
if (printk_ratelimit())
|
||||
pr_err("%s: real page not found for gfn %lx\n",
|
||||
@@ -481,7 +479,6 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
if (pte_present(pte)) {
|
||||
wimg = (pte_val(pte) >> PTE_WIMGE_SHIFT) &
|
||||
MAS2_WIMGE_MASK;
|
||||
local_irq_restore(flags);
|
||||
} else {
|
||||
local_irq_restore(flags);
|
||||
pr_err_ratelimited("%s: pte not present: gfn %lx,pfn %lx\n",
|
||||
@@ -490,8 +487,9 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
|
||||
local_irq_restore(flags);
|
||||
|
||||
writable = kvmppc_e500_ref_setup(ref, gtlbe, pfn, wimg);
|
||||
kvmppc_e500_setup_stlbe(&vcpu_e500->vcpu, gtlbe, tsize,
|
||||
ref, gvaddr, stlbe);
|
||||
|
||||
@@ -499,11 +497,8 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
|
||||
kvmppc_mmu_flush_icache(pfn);
|
||||
|
||||
out:
|
||||
kvm_release_faultin_page(kvm, page, !!ret, writable);
|
||||
spin_unlock(&kvm->mmu_lock);
|
||||
|
||||
/* Drop refcount on page, so that mmu notifiers can clear it */
|
||||
kvm_release_pfn_clean(pfn);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -581,7 +581,9 @@ static int pseries_eeh_get_state(struct eeh_pe *pe, int *delay)
|
||||
switch(rets[0]) {
|
||||
case 0:
|
||||
result = EEH_STATE_MMIO_ACTIVE |
|
||||
EEH_STATE_DMA_ACTIVE;
|
||||
EEH_STATE_DMA_ACTIVE |
|
||||
EEH_STATE_MMIO_ENABLED |
|
||||
EEH_STATE_DMA_ENABLED;
|
||||
break;
|
||||
case 1:
|
||||
result = EEH_STATE_RESET_ACTIVE |
|
||||
|
||||
@@ -44,7 +44,7 @@ static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval,
|
||||
break;
|
||||
case FUTEX_OP_ANDN:
|
||||
__futex_atomic_op("lr %2,%1\nnr %2,%5\n",
|
||||
ret, oldval, newval, uaddr, oparg);
|
||||
ret, oldval, newval, uaddr, ~oparg);
|
||||
break;
|
||||
case FUTEX_OP_XOR:
|
||||
__futex_atomic_op("lr %2,%1\nxr %2,%5\n",
|
||||
|
||||
@@ -140,8 +140,7 @@ static __always_inline void __stackleak_poison(unsigned long erase_low,
|
||||
" la %[addr],256(%[addr])\n"
|
||||
" brctg %[tmp],0b\n"
|
||||
"1: stg %[poison],0(%[addr])\n"
|
||||
" larl %[tmp],3f\n"
|
||||
" ex %[count],0(%[tmp])\n"
|
||||
" exrl %[count],3f\n"
|
||||
" j 4f\n"
|
||||
"2: stg %[poison],0(%[addr])\n"
|
||||
" j 4f\n"
|
||||
|
||||
@@ -1335,8 +1335,14 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr)
|
||||
page = radix_tree_lookup(&kvm->arch.vsie.addr_to_page, addr >> 9);
|
||||
rcu_read_unlock();
|
||||
if (page) {
|
||||
if (page_ref_inc_return(page) == 2)
|
||||
if (page_ref_inc_return(page) == 2) {
|
||||
if (page->index == addr)
|
||||
return page_to_virt(page);
|
||||
/*
|
||||
* We raced with someone reusing + putting this vsie
|
||||
* page before we grabbed it.
|
||||
*/
|
||||
}
|
||||
page_ref_dec(page);
|
||||
}
|
||||
|
||||
@@ -1366,15 +1372,20 @@ static struct vsie_page *get_vsie_page(struct kvm *kvm, unsigned long addr)
|
||||
kvm->arch.vsie.next++;
|
||||
kvm->arch.vsie.next %= nr_vcpus;
|
||||
}
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->index >> 9);
|
||||
if (page->index != ULONG_MAX)
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page,
|
||||
page->index >> 9);
|
||||
}
|
||||
page->index = addr;
|
||||
/* double use of the same address */
|
||||
/* Mark it as invalid until it resides in the tree. */
|
||||
page->index = ULONG_MAX;
|
||||
|
||||
/* Double use of the same address or allocation failure. */
|
||||
if (radix_tree_insert(&kvm->arch.vsie.addr_to_page, addr >> 9, page)) {
|
||||
page_ref_dec(page);
|
||||
mutex_unlock(&kvm->arch.vsie.mutex);
|
||||
return NULL;
|
||||
}
|
||||
page->index = addr;
|
||||
mutex_unlock(&kvm->arch.vsie.mutex);
|
||||
|
||||
vsie_page = page_to_virt(page);
|
||||
@@ -1467,7 +1478,9 @@ void kvm_s390_vsie_destroy(struct kvm *kvm)
|
||||
vsie_page = page_to_virt(page);
|
||||
release_gmap_shadow(vsie_page);
|
||||
/* free the radix tree entry */
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page, page->index >> 9);
|
||||
if (page->index != ULONG_MAX)
|
||||
radix_tree_delete(&kvm->arch.vsie.addr_to_page,
|
||||
page->index >> 9);
|
||||
__free_page(page);
|
||||
}
|
||||
kvm->arch.vsie.page_count = 0;
|
||||
|
||||
@@ -34,6 +34,7 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
|
||||
# avoid errors with '-march=i386', and future flags may depend on the target to
|
||||
# be valid.
|
||||
KBUILD_CFLAGS := -m$(BITS) -O2 $(CLANG_FLAGS)
|
||||
KBUILD_CFLAGS += -std=gnu11
|
||||
KBUILD_CFLAGS += -fno-strict-aliasing -fPIE
|
||||
KBUILD_CFLAGS += -Wundef
|
||||
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
# define PAGES_NR 4
|
||||
#endif
|
||||
|
||||
# define KEXEC_CONTROL_PAGE_SIZE 4096
|
||||
# define KEXEC_CONTROL_CODE_MAX_SIZE 2048
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
@@ -44,7 +45,6 @@ struct kimage;
|
||||
/* Maximum address we can use for the control code buffer */
|
||||
# define KEXEC_CONTROL_MEMORY_LIMIT TASK_SIZE
|
||||
|
||||
# define KEXEC_CONTROL_PAGE_SIZE 4096
|
||||
|
||||
/* The native architecture */
|
||||
# define KEXEC_ARCH KEXEC_ARCH_386
|
||||
@@ -59,9 +59,6 @@ struct kimage;
|
||||
/* Maximum address we can use for the control pages */
|
||||
# define KEXEC_CONTROL_MEMORY_LIMIT (MAXMEM-1)
|
||||
|
||||
/* Allocate one page for the pdp and the second for the code */
|
||||
# define KEXEC_CONTROL_PAGE_SIZE (4096UL + 4096UL)
|
||||
|
||||
/* The native architecture */
|
||||
# define KEXEC_ARCH KEXEC_ARCH_X86_64
|
||||
#endif
|
||||
@@ -146,6 +143,19 @@ struct kimage_arch {
|
||||
};
|
||||
#else
|
||||
struct kimage_arch {
|
||||
/*
|
||||
* This is a kimage control page, as it must not overlap with either
|
||||
* source or destination address ranges.
|
||||
*/
|
||||
pgd_t *pgd;
|
||||
/*
|
||||
* The virtual mapping of the control code page itself is used only
|
||||
* during the transition, while the current kernel's pages are all
|
||||
* in place. Thus the intermediate page table pages used to map it
|
||||
* are not control pages, but instead just normal pages obtained
|
||||
* with get_zeroed_page(). And have to be tracked (below) so that
|
||||
* they can be freed.
|
||||
*/
|
||||
p4d_t *p4d;
|
||||
pud_t *pud;
|
||||
pmd_t *pmd;
|
||||
|
||||
@@ -1650,6 +1650,8 @@ struct kvm_x86_ops {
|
||||
void (*enable_irq_window)(struct kvm_vcpu *vcpu);
|
||||
void (*update_cr8_intercept)(struct kvm_vcpu *vcpu, int tpr, int irr);
|
||||
bool (*check_apicv_inhibit_reasons)(enum kvm_apicv_inhibit reason);
|
||||
|
||||
const bool x2apic_icr_is_split;
|
||||
const unsigned long required_apicv_inhibits;
|
||||
bool allow_apicv_in_x2apic_without_x2apic_virtualization;
|
||||
void (*refresh_apicv_exec_ctrl)(struct kvm_vcpu *vcpu);
|
||||
|
||||
@@ -537,6 +537,10 @@ static __init void fix_erratum_688(void)
|
||||
|
||||
static __init int init_amd_nbs(void)
|
||||
{
|
||||
if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD &&
|
||||
boot_cpu_data.x86_vendor != X86_VENDOR_HYGON)
|
||||
return 0;
|
||||
|
||||
amd_cache_northbridges();
|
||||
amd_cache_gart();
|
||||
|
||||
|
||||
@@ -149,7 +149,8 @@ static void free_transition_pgtable(struct kimage *image)
|
||||
image->arch.pte = NULL;
|
||||
}
|
||||
|
||||
static int init_transition_pgtable(struct kimage *image, pgd_t *pgd)
|
||||
static int init_transition_pgtable(struct kimage *image, pgd_t *pgd,
|
||||
unsigned long control_page)
|
||||
{
|
||||
pgprot_t prot = PAGE_KERNEL_EXEC_NOENC;
|
||||
unsigned long vaddr, paddr;
|
||||
@@ -160,7 +161,7 @@ static int init_transition_pgtable(struct kimage *image, pgd_t *pgd)
|
||||
pte_t *pte;
|
||||
|
||||
vaddr = (unsigned long)relocate_kernel;
|
||||
paddr = __pa(page_address(image->control_code_page)+PAGE_SIZE);
|
||||
paddr = control_page;
|
||||
pgd += pgd_index(vaddr);
|
||||
if (!pgd_present(*pgd)) {
|
||||
p4d = (p4d_t *)get_zeroed_page(GFP_KERNEL);
|
||||
@@ -219,7 +220,7 @@ static void *alloc_pgt_page(void *data)
|
||||
return p;
|
||||
}
|
||||
|
||||
static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
|
||||
static int init_pgtable(struct kimage *image, unsigned long control_page)
|
||||
{
|
||||
struct x86_mapping_info info = {
|
||||
.alloc_pgt_page = alloc_pgt_page,
|
||||
@@ -228,12 +229,12 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
|
||||
.kernpg_flag = _KERNPG_TABLE_NOENC,
|
||||
};
|
||||
unsigned long mstart, mend;
|
||||
pgd_t *level4p;
|
||||
int result;
|
||||
int i;
|
||||
|
||||
level4p = (pgd_t *)__va(start_pgtable);
|
||||
clear_page(level4p);
|
||||
image->arch.pgd = alloc_pgt_page(image);
|
||||
if (!image->arch.pgd)
|
||||
return -ENOMEM;
|
||||
|
||||
if (cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)) {
|
||||
info.page_flag |= _PAGE_ENC;
|
||||
@@ -247,8 +248,8 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
|
||||
mstart = pfn_mapped[i].start << PAGE_SHIFT;
|
||||
mend = pfn_mapped[i].end << PAGE_SHIFT;
|
||||
|
||||
result = kernel_ident_mapping_init(&info,
|
||||
level4p, mstart, mend);
|
||||
result = kernel_ident_mapping_init(&info, image->arch.pgd,
|
||||
mstart, mend);
|
||||
if (result)
|
||||
return result;
|
||||
}
|
||||
@@ -263,8 +264,8 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
|
||||
mstart = image->segment[i].mem;
|
||||
mend = mstart + image->segment[i].memsz;
|
||||
|
||||
result = kernel_ident_mapping_init(&info,
|
||||
level4p, mstart, mend);
|
||||
result = kernel_ident_mapping_init(&info, image->arch.pgd,
|
||||
mstart, mend);
|
||||
|
||||
if (result)
|
||||
return result;
|
||||
@@ -274,15 +275,19 @@ static int init_pgtable(struct kimage *image, unsigned long start_pgtable)
|
||||
* Prepare EFI systab and ACPI tables for kexec kernel since they are
|
||||
* not covered by pfn_mapped.
|
||||
*/
|
||||
result = map_efi_systab(&info, level4p);
|
||||
result = map_efi_systab(&info, image->arch.pgd);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
result = map_acpi_tables(&info, level4p);
|
||||
result = map_acpi_tables(&info, image->arch.pgd);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
return init_transition_pgtable(image, level4p);
|
||||
/*
|
||||
* This must be last because the intermediate page table pages it
|
||||
* allocates will not be control pages and may overlap the image.
|
||||
*/
|
||||
return init_transition_pgtable(image, image->arch.pgd, control_page);
|
||||
}
|
||||
|
||||
static void load_segments(void)
|
||||
@@ -299,14 +304,14 @@ static void load_segments(void)
|
||||
|
||||
int machine_kexec_prepare(struct kimage *image)
|
||||
{
|
||||
unsigned long start_pgtable;
|
||||
unsigned long control_page;
|
||||
int result;
|
||||
|
||||
/* Calculate the offsets */
|
||||
start_pgtable = page_to_pfn(image->control_code_page) << PAGE_SHIFT;
|
||||
control_page = page_to_pfn(image->control_code_page) << PAGE_SHIFT;
|
||||
|
||||
/* Setup the identity mapped 64bit page table */
|
||||
result = init_pgtable(image, start_pgtable);
|
||||
result = init_pgtable(image, control_page);
|
||||
if (result)
|
||||
return result;
|
||||
|
||||
@@ -360,13 +365,12 @@ void machine_kexec(struct kimage *image)
|
||||
#endif
|
||||
}
|
||||
|
||||
control_page = page_address(image->control_code_page) + PAGE_SIZE;
|
||||
control_page = page_address(image->control_code_page);
|
||||
__memcpy(control_page, relocate_kernel, KEXEC_CONTROL_CODE_MAX_SIZE);
|
||||
|
||||
page_list[PA_CONTROL_PAGE] = virt_to_phys(control_page);
|
||||
page_list[VA_CONTROL_PAGE] = (unsigned long)control_page;
|
||||
page_list[PA_TABLE_PAGE] =
|
||||
(unsigned long)__pa(page_address(image->control_code_page));
|
||||
page_list[PA_TABLE_PAGE] = (unsigned long)__pa(image->arch.pgd);
|
||||
|
||||
if (image->type == KEXEC_TYPE_DEFAULT)
|
||||
page_list[PA_SWAP_PAGE] = (page_to_pfn(image->swap_page)
|
||||
@@ -574,8 +578,7 @@ static void kexec_mark_crashkres(bool protect)
|
||||
|
||||
/* Don't touch the control code page used in crash_kexec().*/
|
||||
control = PFN_PHYS(page_to_pfn(kexec_crash_image->control_code_page));
|
||||
/* Control code page is located in the 2nd page. */
|
||||
kexec_mark_range(crashk_res.start, control + PAGE_SIZE - 1, protect);
|
||||
kexec_mark_range(crashk_res.start, control - 1, protect);
|
||||
control += KEXEC_CONTROL_PAGE_SIZE;
|
||||
kexec_mark_range(control, crashk_res.end, protect);
|
||||
}
|
||||
|
||||
@@ -338,10 +338,8 @@ static void kvm_recalculate_logical_map(struct kvm_apic_map *new,
|
||||
* reversing the LDR calculation to get cluster of APICs, i.e. no
|
||||
* additional work is required.
|
||||
*/
|
||||
if (apic_x2apic_mode(apic)) {
|
||||
WARN_ON_ONCE(ldr != kvm_apic_calc_x2apic_ldr(kvm_x2apic_id(apic)));
|
||||
if (apic_x2apic_mode(apic))
|
||||
return;
|
||||
}
|
||||
|
||||
if (WARN_ON_ONCE(!kvm_apic_map_get_logical_dest(new, ldr,
|
||||
&cluster, &mask))) {
|
||||
@@ -2461,11 +2459,25 @@ int kvm_x2apic_icr_write(struct kvm_lapic *apic, u64 data)
|
||||
data &= ~APIC_ICR_BUSY;
|
||||
|
||||
kvm_apic_send_ipi(apic, (u32)data, (u32)(data >> 32));
|
||||
if (kvm_x86_ops.x2apic_icr_is_split) {
|
||||
kvm_lapic_set_reg(apic, APIC_ICR, data);
|
||||
kvm_lapic_set_reg(apic, APIC_ICR2, data >> 32);
|
||||
} else {
|
||||
kvm_lapic_set_reg64(apic, APIC_ICR, data);
|
||||
}
|
||||
trace_kvm_apic_write(APIC_ICR, data);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u64 kvm_x2apic_icr_read(struct kvm_lapic *apic)
|
||||
{
|
||||
if (kvm_x86_ops.x2apic_icr_is_split)
|
||||
return (u64)kvm_lapic_get_reg(apic, APIC_ICR) |
|
||||
(u64)kvm_lapic_get_reg(apic, APIC_ICR2) << 32;
|
||||
|
||||
return kvm_lapic_get_reg64(apic, APIC_ICR);
|
||||
}
|
||||
|
||||
/* emulate APIC access in a trap manner */
|
||||
void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset)
|
||||
{
|
||||
@@ -2483,7 +2495,7 @@ void kvm_apic_write_nodecode(struct kvm_vcpu *vcpu, u32 offset)
|
||||
* maybe-unecessary write, and both are in the noise anyways.
|
||||
*/
|
||||
if (apic_x2apic_mode(apic) && offset == APIC_ICR)
|
||||
WARN_ON_ONCE(kvm_x2apic_icr_write(apic, kvm_lapic_get_reg64(apic, APIC_ICR)));
|
||||
WARN_ON_ONCE(kvm_x2apic_icr_write(apic, kvm_x2apic_icr_read(apic)));
|
||||
else
|
||||
kvm_lapic_reg_write(apic, offset, kvm_lapic_get_reg(apic, offset));
|
||||
}
|
||||
@@ -2964,28 +2976,41 @@ static int kvm_apic_state_fixup(struct kvm_vcpu *vcpu,
|
||||
struct kvm_lapic_state *s, bool set)
|
||||
{
|
||||
if (apic_x2apic_mode(vcpu->arch.apic)) {
|
||||
u32 x2apic_id = kvm_x2apic_id(vcpu->arch.apic);
|
||||
u32 *id = (u32 *)(s->regs + APIC_ID);
|
||||
u32 *ldr = (u32 *)(s->regs + APIC_LDR);
|
||||
u64 icr;
|
||||
|
||||
if (vcpu->kvm->arch.x2apic_format) {
|
||||
if (*id != vcpu->vcpu_id)
|
||||
if (*id != x2apic_id)
|
||||
return -EINVAL;
|
||||
} else {
|
||||
/*
|
||||
* Ignore the userspace value when setting APIC state.
|
||||
* KVM's model is that the x2APIC ID is readonly, e.g.
|
||||
* KVM only supports delivering interrupts to KVM's
|
||||
* version of the x2APIC ID. However, for backwards
|
||||
* compatibility, don't reject attempts to set a
|
||||
* mismatched ID for userspace that hasn't opted into
|
||||
* x2apic_format.
|
||||
*/
|
||||
if (set)
|
||||
*id >>= 24;
|
||||
*id = x2apic_id;
|
||||
else
|
||||
*id <<= 24;
|
||||
*id = x2apic_id << 24;
|
||||
}
|
||||
|
||||
/*
|
||||
* In x2APIC mode, the LDR is fixed and based on the id. And
|
||||
* ICR is internally a single 64-bit register, but needs to be
|
||||
* split to ICR+ICR2 in userspace for backwards compatibility.
|
||||
* if the ICR is _not_ split, ICR is internally a single 64-bit
|
||||
* register, but needs to be split to ICR+ICR2 in userspace for
|
||||
* backwards compatibility.
|
||||
*/
|
||||
if (set) {
|
||||
*ldr = kvm_apic_calc_x2apic_ldr(*id);
|
||||
if (set)
|
||||
*ldr = kvm_apic_calc_x2apic_ldr(x2apic_id);
|
||||
|
||||
if (!kvm_x86_ops.x2apic_icr_is_split) {
|
||||
if (set) {
|
||||
icr = __kvm_lapic_get_reg(s->regs, APIC_ICR) |
|
||||
(u64)__kvm_lapic_get_reg(s->regs, APIC_ICR2) << 32;
|
||||
__kvm_lapic_set_reg64(s->regs, APIC_ICR, icr);
|
||||
@@ -2994,6 +3019,7 @@ static int kvm_apic_state_fixup(struct kvm_vcpu *vcpu,
|
||||
__kvm_lapic_set_reg(s->regs, APIC_ICR2, icr >> 32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3188,7 +3214,7 @@ static int kvm_lapic_msr_read(struct kvm_lapic *apic, u32 reg, u64 *data)
|
||||
u32 low;
|
||||
|
||||
if (reg == APIC_ICR) {
|
||||
*data = kvm_lapic_get_reg64(apic, APIC_ICR);
|
||||
*data = kvm_x2apic_icr_read(apic);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -5014,6 +5014,8 @@ static struct kvm_x86_ops svm_x86_ops __initdata = {
|
||||
.enable_nmi_window = svm_enable_nmi_window,
|
||||
.enable_irq_window = svm_enable_irq_window,
|
||||
.update_cr8_intercept = svm_update_cr8_intercept,
|
||||
|
||||
.x2apic_icr_is_split = true,
|
||||
.set_virtual_apic_mode = avic_refresh_virtual_apic_mode,
|
||||
.refresh_apicv_exec_ctrl = avic_refresh_apicv_exec_ctrl,
|
||||
.apicv_post_state_restore = avic_apicv_post_state_restore,
|
||||
|
||||
@@ -8323,6 +8323,8 @@ static struct kvm_x86_ops vmx_x86_ops __initdata = {
|
||||
.enable_nmi_window = vmx_enable_nmi_window,
|
||||
.enable_irq_window = vmx_enable_irq_window,
|
||||
.update_cr8_intercept = vmx_update_cr8_intercept,
|
||||
|
||||
.x2apic_icr_is_split = false,
|
||||
.set_virtual_apic_mode = vmx_set_virtual_apic_mode,
|
||||
.set_apic_access_page_addr = vmx_set_apic_access_page_addr,
|
||||
.refresh_apicv_exec_ctrl = vmx_refresh_apicv_exec_ctrl,
|
||||
|
||||
@@ -26,18 +26,31 @@ static int ident_pud_init(struct x86_mapping_info *info, pud_t *pud_page,
|
||||
for (; addr < end; addr = next) {
|
||||
pud_t *pud = pud_page + pud_index(addr);
|
||||
pmd_t *pmd;
|
||||
bool use_gbpage;
|
||||
|
||||
next = (addr & PUD_MASK) + PUD_SIZE;
|
||||
if (next > end)
|
||||
next = end;
|
||||
|
||||
if (info->direct_gbpages) {
|
||||
pud_t pudval;
|
||||
|
||||
if (pud_present(*pud))
|
||||
/* if this is already a gbpage, this portion is already mapped */
|
||||
if (pud_leaf(*pud))
|
||||
continue;
|
||||
|
||||
addr &= PUD_MASK;
|
||||
/* Is using a gbpage allowed? */
|
||||
use_gbpage = info->direct_gbpages;
|
||||
|
||||
/* Don't use gbpage if it maps more than the requested region. */
|
||||
/* at the begining: */
|
||||
use_gbpage &= ((addr & ~PUD_MASK) == 0);
|
||||
/* ... or at the end: */
|
||||
use_gbpage &= ((next & ~PUD_MASK) == 0);
|
||||
|
||||
/* Never overwrite existing mappings */
|
||||
use_gbpage &= !pud_present(*pud);
|
||||
|
||||
if (use_gbpage) {
|
||||
pud_t pudval;
|
||||
|
||||
pudval = __pud((addr - info->offset) | info->page_flag);
|
||||
set_pud(pud, pudval);
|
||||
continue;
|
||||
|
||||
@@ -1010,4 +1010,34 @@ DECLARE_PCI_FIXUP_SUSPEND(PCI_VENDOR_ID_AMD, 0x1668, amd_rp_pme_suspend);
|
||||
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, 0x1668, amd_rp_pme_resume);
|
||||
DECLARE_PCI_FIXUP_SUSPEND(PCI_VENDOR_ID_AMD, 0x1669, amd_rp_pme_suspend);
|
||||
DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_AMD, 0x1669, amd_rp_pme_resume);
|
||||
|
||||
/*
|
||||
* Putting PCIe root ports on Ryzen SoCs with USB4 controllers into D3hot
|
||||
* may cause problems when the system attempts wake up from s2idle.
|
||||
*
|
||||
* On the TUXEDO Sirius 16 Gen 1 with a specific old BIOS this manifests as
|
||||
* a system hang.
|
||||
*/
|
||||
static const struct dmi_system_id quirk_tuxeo_rp_d3_dmi_table[] = {
|
||||
{
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "TUXEDO"),
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "APX958"),
|
||||
DMI_EXACT_MATCH(DMI_BIOS_VERSION, "V1.00A00_20240108"),
|
||||
},
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static void quirk_tuxeo_rp_d3(struct pci_dev *pdev)
|
||||
{
|
||||
struct pci_dev *root_pdev;
|
||||
|
||||
if (dmi_check_system(quirk_tuxeo_rp_d3_dmi_table)) {
|
||||
root_pdev = pcie_find_root_port(pdev);
|
||||
if (root_pdev)
|
||||
root_pdev->dev_flags |= PCI_DEV_FLAGS_NO_D3;
|
||||
}
|
||||
}
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD, 0x1502, quirk_tuxeo_rp_d3);
|
||||
#endif /* CONFIG_SUSPEND */
|
||||
|
||||
@@ -117,8 +117,8 @@ SYM_FUNC_START(xen_hypercall_hvm)
|
||||
pop %ebx
|
||||
pop %eax
|
||||
#else
|
||||
lea xen_hypercall_amd(%rip), %rbx
|
||||
cmp %rax, %rbx
|
||||
lea xen_hypercall_amd(%rip), %rcx
|
||||
cmp %rax, %rcx
|
||||
#ifdef CONFIG_FRAME_POINTER
|
||||
pop %rax /* Dummy pop. */
|
||||
#endif
|
||||
@@ -132,6 +132,7 @@ SYM_FUNC_START(xen_hypercall_hvm)
|
||||
pop %rcx
|
||||
pop %rax
|
||||
#endif
|
||||
FRAME_END
|
||||
/* Use correct hypercall function. */
|
||||
jz xen_hypercall_amd
|
||||
jmp xen_hypercall_intel
|
||||
|
||||
@@ -1139,6 +1139,7 @@ static void blkcg_fill_root_iostats(void)
|
||||
blkg_iostat_set(&blkg->iostat.cur, &tmp);
|
||||
u64_stats_update_end_irqrestore(&blkg->iostat.sync, flags);
|
||||
}
|
||||
class_dev_iter_exit(&iter);
|
||||
}
|
||||
|
||||
static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||
|
||||
@@ -718,10 +718,11 @@ static ssize_t blkdev_read_iter(struct kiocb *iocb, struct iov_iter *to)
|
||||
file_accessed(iocb->ki_filp);
|
||||
|
||||
ret = blkdev_direct_IO(iocb, to);
|
||||
if (ret >= 0) {
|
||||
if (ret > 0) {
|
||||
iocb->ki_pos += ret;
|
||||
count -= ret;
|
||||
}
|
||||
if (ret != -EIOCBQUEUED)
|
||||
iov_iter_revert(to, count - iov_iter_count(to));
|
||||
if (ret < 0 || !count)
|
||||
goto reexpand;
|
||||
|
||||
@@ -170,8 +170,6 @@ static struct gen_pool *ghes_estatus_pool;
|
||||
static struct ghes_estatus_cache __rcu *ghes_estatus_caches[GHES_ESTATUS_CACHES_SIZE];
|
||||
static atomic_t ghes_estatus_cache_alloced;
|
||||
|
||||
static int ghes_panic_timeout __read_mostly = 30;
|
||||
|
||||
static void __iomem *ghes_map(u64 pfn, enum fixed_addresses fixmap_idx)
|
||||
{
|
||||
phys_addr_t paddr;
|
||||
@@ -899,14 +897,16 @@ static void __ghes_panic(struct ghes *ghes,
|
||||
struct acpi_hest_generic_status *estatus,
|
||||
u64 buf_paddr, enum fixed_addresses fixmap_idx)
|
||||
{
|
||||
const char *msg = GHES_PFX "Fatal hardware error";
|
||||
|
||||
__ghes_print_estatus(KERN_EMERG, ghes->generic, estatus);
|
||||
|
||||
ghes_clear_estatus(ghes, estatus, buf_paddr, fixmap_idx);
|
||||
|
||||
/* reboot to log the error! */
|
||||
if (!panic_timeout)
|
||||
panic_timeout = ghes_panic_timeout;
|
||||
panic("Fatal hardware error!");
|
||||
pr_emerg("%s but panic disabled\n", msg);
|
||||
|
||||
panic(msg);
|
||||
}
|
||||
|
||||
static int ghes_proc(struct ghes *ghes)
|
||||
|
||||
@@ -263,9 +263,7 @@ static acpi_status acpi_platformrt_space_handler(u32 function,
|
||||
if (!handler || !module)
|
||||
goto invalid_guid;
|
||||
|
||||
if (!handler->handler_addr ||
|
||||
!handler->static_data_buffer_addr ||
|
||||
!handler->acpi_param_buffer_addr) {
|
||||
if (!handler->handler_addr) {
|
||||
buffer->prm_status = PRM_HANDLER_ERROR;
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
@@ -1116,8 +1116,6 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (nval == 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (obj->type == ACPI_TYPE_BUFFER) {
|
||||
if (proptype != DEV_PROP_U8)
|
||||
@@ -1141,9 +1139,11 @@ static int acpi_data_prop_read(const struct acpi_device_data *data,
|
||||
ret = acpi_copy_property_array_uint(items, (u64 *)val, nval);
|
||||
break;
|
||||
case DEV_PROP_STRING:
|
||||
ret = acpi_copy_property_array_string(
|
||||
items, (char **)val,
|
||||
min_t(u32, nval, obj->package.count));
|
||||
nval = min_t(u32, nval, obj->package.count);
|
||||
if (nval == 0)
|
||||
return -ENODATA;
|
||||
|
||||
ret = acpi_copy_property_array_string(items, (char **)val, nval);
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
||||
@@ -602,7 +602,7 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
|
||||
{
|
||||
struct ata_port *ap = qc->ap;
|
||||
struct page *page;
|
||||
unsigned int offset;
|
||||
unsigned int offset, count;
|
||||
|
||||
if (!qc->cursg) {
|
||||
qc->curbytes = qc->nbytes;
|
||||
@@ -618,25 +618,27 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)
|
||||
page = nth_page(page, (offset >> PAGE_SHIFT));
|
||||
offset %= PAGE_SIZE;
|
||||
|
||||
trace_ata_sff_pio_transfer_data(qc, offset, qc->sect_size);
|
||||
/* don't overrun current sg */
|
||||
count = min(qc->cursg->length - qc->cursg_ofs, qc->sect_size);
|
||||
|
||||
trace_ata_sff_pio_transfer_data(qc, offset, count);
|
||||
|
||||
/*
|
||||
* Split the transfer when it splits a page boundary. Note that the
|
||||
* split still has to be dword aligned like all ATA data transfers.
|
||||
*/
|
||||
WARN_ON_ONCE(offset % 4);
|
||||
if (offset + qc->sect_size > PAGE_SIZE) {
|
||||
if (offset + count > PAGE_SIZE) {
|
||||
unsigned int split_len = PAGE_SIZE - offset;
|
||||
|
||||
ata_pio_xfer(qc, page, offset, split_len);
|
||||
ata_pio_xfer(qc, nth_page(page, 1), 0,
|
||||
qc->sect_size - split_len);
|
||||
ata_pio_xfer(qc, nth_page(page, 1), 0, count - split_len);
|
||||
} else {
|
||||
ata_pio_xfer(qc, page, offset, qc->sect_size);
|
||||
ata_pio_xfer(qc, page, offset, count);
|
||||
}
|
||||
|
||||
qc->curbytes += qc->sect_size;
|
||||
qc->cursg_ofs += qc->sect_size;
|
||||
qc->curbytes += count;
|
||||
qc->cursg_ofs += count;
|
||||
|
||||
if (qc->cursg_ofs == qc->cursg->length) {
|
||||
qc->cursg = sg_next(qc->cursg);
|
||||
|
||||
@@ -63,10 +63,12 @@ static DEFINE_MUTEX(misc_mtx);
|
||||
#define DYNAMIC_MINORS 128 /* like dynamic majors */
|
||||
static DEFINE_IDA(misc_minors_ida);
|
||||
|
||||
static int misc_minor_alloc(void)
|
||||
static int misc_minor_alloc(int minor)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if (minor == MISC_DYNAMIC_MINOR) {
|
||||
/* allocate free id */
|
||||
ret = ida_alloc_max(&misc_minors_ida, DYNAMIC_MINORS - 1, GFP_KERNEL);
|
||||
if (ret >= 0) {
|
||||
ret = DYNAMIC_MINORS - ret - 1;
|
||||
@@ -74,6 +76,18 @@ static int misc_minor_alloc(void)
|
||||
ret = ida_alloc_range(&misc_minors_ida, MISC_DYNAMIC_MINOR + 1,
|
||||
MINORMASK, GFP_KERNEL);
|
||||
}
|
||||
} else {
|
||||
/* specific minor, check if it is in dynamic or misc dynamic range */
|
||||
if (minor < DYNAMIC_MINORS) {
|
||||
minor = DYNAMIC_MINORS - minor - 1;
|
||||
ret = ida_alloc_range(&misc_minors_ida, minor, minor, GFP_KERNEL);
|
||||
} else if (minor > MISC_DYNAMIC_MINOR) {
|
||||
ret = ida_alloc_range(&misc_minors_ida, minor, minor, GFP_KERNEL);
|
||||
} else {
|
||||
/* case of non-dynamic minors, no need to allocate id */
|
||||
ret = 0;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -219,7 +233,7 @@ int misc_register(struct miscdevice *misc)
|
||||
mutex_lock(&misc_mtx);
|
||||
|
||||
if (is_dynamic) {
|
||||
int i = misc_minor_alloc();
|
||||
int i = misc_minor_alloc(misc->minor);
|
||||
|
||||
if (i < 0) {
|
||||
err = -EBUSY;
|
||||
@@ -228,6 +242,7 @@ int misc_register(struct miscdevice *misc)
|
||||
misc->minor = i;
|
||||
} else {
|
||||
struct miscdevice *c;
|
||||
int i;
|
||||
|
||||
list_for_each_entry(c, &misc_list, list) {
|
||||
if (c->minor == misc->minor) {
|
||||
@@ -235,6 +250,12 @@ int misc_register(struct miscdevice *misc)
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
i = misc_minor_alloc(misc->minor);
|
||||
if (i < 0) {
|
||||
err = -EBUSY;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
dev = MKDEV(MISC_MAJOR, misc->minor);
|
||||
|
||||
@@ -63,6 +63,11 @@ static bool tpm_is_tpm2_log(void *bios_event_log, u64 len)
|
||||
return n == 0;
|
||||
}
|
||||
|
||||
static void tpm_bios_log_free(void *data)
|
||||
{
|
||||
kvfree(data);
|
||||
}
|
||||
|
||||
/* read binary bios log */
|
||||
int tpm_read_log_acpi(struct tpm_chip *chip)
|
||||
{
|
||||
@@ -136,7 +141,7 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
|
||||
}
|
||||
|
||||
/* malloc EventLog space */
|
||||
log->bios_event_log = devm_kmalloc(&chip->dev, len, GFP_KERNEL);
|
||||
log->bios_event_log = kvmalloc(len, GFP_KERNEL);
|
||||
if (!log->bios_event_log)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -162,10 +167,16 @@ int tpm_read_log_acpi(struct tpm_chip *chip)
|
||||
goto err;
|
||||
}
|
||||
|
||||
ret = devm_add_action(&chip->dev, tpm_bios_log_free, log->bios_event_log);
|
||||
if (ret) {
|
||||
log->bios_event_log = NULL;
|
||||
goto err;
|
||||
}
|
||||
|
||||
return format;
|
||||
|
||||
err:
|
||||
devm_kfree(&chip->dev, log->bios_event_log);
|
||||
tpm_bios_log_free(log->bios_event_log);
|
||||
log->bios_event_log = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -55,10 +55,16 @@ static const struct mtk_gate audio_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "aud_dummy"),
|
||||
/* AUDIO0 */
|
||||
GATE_AUDIO0(CLK_AUD_AFE, "audio_afe", "aud_intbus_sel", 2),
|
||||
GATE_DUMMY(CLK_AUD_LRCK_DETECT, "audio_lrck_detect_dummy"),
|
||||
GATE_DUMMY(CLK_AUD_I2S, "audio_i2c_dummy"),
|
||||
GATE_DUMMY(CLK_AUD_APLL_TUNER, "audio_apll_tuner_dummy"),
|
||||
GATE_AUDIO0(CLK_AUD_HDMI, "audio_hdmi", "audpll_sel", 20),
|
||||
GATE_AUDIO0(CLK_AUD_SPDF, "audio_spdf", "audpll_sel", 21),
|
||||
GATE_AUDIO0(CLK_AUD_SPDF2, "audio_spdf2", "audpll_sel", 22),
|
||||
GATE_AUDIO0(CLK_AUD_APLL, "audio_apll", "audpll_sel", 23),
|
||||
GATE_DUMMY(CLK_AUD_TML, "audio_tml_dummy"),
|
||||
GATE_DUMMY(CLK_AUD_AHB_IDLE_EXT, "audio_ahb_idle_ext_dummy"),
|
||||
GATE_DUMMY(CLK_AUD_AHB_IDLE_INT, "audio_ahb_idle_int_dummy"),
|
||||
/* AUDIO1 */
|
||||
GATE_AUDIO1(CLK_AUD_I2SIN1, "audio_i2sin1", "aud_mux1_sel", 0),
|
||||
GATE_AUDIO1(CLK_AUD_I2SIN2, "audio_i2sin2", "aud_mux1_sel", 1),
|
||||
@@ -76,10 +82,12 @@ static const struct mtk_gate audio_clks[] = {
|
||||
GATE_AUDIO1(CLK_AUD_ASRCI2, "audio_asrci2", "asm_h_sel", 13),
|
||||
GATE_AUDIO1(CLK_AUD_ASRCO1, "audio_asrco1", "asm_h_sel", 14),
|
||||
GATE_AUDIO1(CLK_AUD_ASRCO2, "audio_asrco2", "asm_h_sel", 15),
|
||||
GATE_DUMMY(CLK_AUD_HDMIRX, "audio_hdmirx_dummy"),
|
||||
GATE_AUDIO1(CLK_AUD_INTDIR, "audio_intdir", "intdir_sel", 20),
|
||||
GATE_AUDIO1(CLK_AUD_A1SYS, "audio_a1sys", "aud_mux1_sel", 21),
|
||||
GATE_AUDIO1(CLK_AUD_A2SYS, "audio_a2sys", "aud_mux2_sel", 22),
|
||||
GATE_AUDIO1(CLK_AUD_AFE_CONN, "audio_afe_conn", "aud_mux1_sel", 23),
|
||||
GATE_DUMMY(CLK_AUD_AFE_PCMIF, "audio_afe_pcmif_dummy"),
|
||||
GATE_AUDIO1(CLK_AUD_AFE_MRGIF, "audio_afe_mrgif", "aud_mux1_sel", 25),
|
||||
/* AUDIO2 */
|
||||
GATE_AUDIO2(CLK_AUD_MMIF_UL1, "audio_ul1", "aud_mux1_sel", 0),
|
||||
@@ -100,6 +108,8 @@ static const struct mtk_gate audio_clks[] = {
|
||||
GATE_AUDIO2(CLK_AUD_MMIF_AWB2, "audio_awb2", "aud_mux1_sel", 15),
|
||||
GATE_AUDIO2(CLK_AUD_MMIF_DAI, "audio_dai", "aud_mux1_sel", 16),
|
||||
/* AUDIO3 */
|
||||
GATE_DUMMY(CLK_AUD_DMIC1, "audio_dmic1_dummy"),
|
||||
GATE_DUMMY(CLK_AUD_DMIC2, "audio_dmic2_dummy"),
|
||||
GATE_AUDIO3(CLK_AUD_ASRCI3, "audio_asrci3", "asm_h_sel", 2),
|
||||
GATE_AUDIO3(CLK_AUD_ASRCI4, "audio_asrci4", "asm_h_sel", 3),
|
||||
GATE_AUDIO3(CLK_AUD_ASRCI5, "audio_asrci5", "asm_h_sel", 4),
|
||||
|
||||
@@ -31,6 +31,7 @@ static const struct mtk_gate_regs bdp1_cg_regs = {
|
||||
GATE_MTK(_id, _name, _parent, &bdp1_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
static const struct mtk_gate bdp_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "bdp_dummy"),
|
||||
GATE_BDP0(CLK_BDP_BRG_BA, "brg_baclk", "mm_sel", 0),
|
||||
GATE_BDP0(CLK_BDP_BRG_DRAM, "brg_dram", "mm_sel", 1),
|
||||
GATE_BDP0(CLK_BDP_LARB_DRAM, "larb_dram", "mm_sel", 2),
|
||||
|
||||
@@ -22,6 +22,7 @@ static const struct mtk_gate_regs img_cg_regs = {
|
||||
GATE_MTK(_id, _name, _parent, &img_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate img_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "img_dummy"),
|
||||
GATE_IMG(CLK_IMG_SMI_COMM, "img_smi_comm", "mm_sel", 0),
|
||||
GATE_IMG(CLK_IMG_RESZ, "img_resz", "mm_sel", 1),
|
||||
GATE_IMG(CLK_IMG_JPGDEC_SMI, "img_jpgdec_smi", "mm_sel", 5),
|
||||
|
||||
@@ -31,6 +31,7 @@ static const struct mtk_gate_regs disp1_cg_regs = {
|
||||
GATE_MTK(_id, _name, _parent, &disp1_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
|
||||
|
||||
static const struct mtk_gate mm_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "mm_dummy"),
|
||||
GATE_DISP0(CLK_MM_SMI_COMMON, "mm_smi_comm", "mm_sel", 0),
|
||||
GATE_DISP0(CLK_MM_SMI_LARB0, "mm_smi_larb0", "mm_sel", 1),
|
||||
GATE_DISP0(CLK_MM_CMDQ, "mm_cmdq", "mm_sel", 2),
|
||||
|
||||
@@ -31,6 +31,7 @@ static const struct mtk_gate_regs vdec1_cg_regs = {
|
||||
GATE_MTK(_id, _name, _parent, &vdec1_cg_regs, _shift, &mtk_clk_gate_ops_setclr_inv)
|
||||
|
||||
static const struct mtk_gate vdec_clks[] = {
|
||||
GATE_DUMMY(CLK_DUMMY, "vdec_dummy"),
|
||||
GATE_VDEC0(CLK_VDEC_CKGEN, "vdec_cken", "vdec_sel", 0),
|
||||
GATE_VDEC1(CLK_VDEC_LARB, "vdec_larb_cken", "mm_sel", 0),
|
||||
};
|
||||
|
||||
@@ -881,6 +881,7 @@ config SM_GCC_7150
|
||||
config SM_GCC_8150
|
||||
tristate "SM8150 Global Clock Controller"
|
||||
depends on ARM64 || COMPILE_TEST
|
||||
select QCOM_GDSC
|
||||
help
|
||||
Support for the global clock controller on SM8150 devices.
|
||||
Say Y if you want to use peripheral devices such as UART,
|
||||
|
||||
@@ -407,6 +407,8 @@ void clk_alpha_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
|
||||
mask |= config->pre_div_mask;
|
||||
mask |= config->post_div_mask;
|
||||
mask |= config->vco_mask;
|
||||
mask |= config->alpha_en_mask;
|
||||
mask |= config->alpha_mode_mask;
|
||||
|
||||
regmap_update_bits(regmap, PLL_USER_CTL(pll), mask, val);
|
||||
|
||||
|
||||
@@ -329,7 +329,7 @@ static unsigned long clk_rpmh_bcm_recalc_rate(struct clk_hw *hw,
|
||||
{
|
||||
struct clk_rpmh *c = to_clk_rpmh(hw);
|
||||
|
||||
return c->aggr_state * c->unit;
|
||||
return (unsigned long)c->aggr_state * c->unit;
|
||||
}
|
||||
|
||||
static const struct clk_ops clk_rpmh_bcm_ops = {
|
||||
|
||||
@@ -187,13 +187,12 @@ static struct clk_rcg2 disp_cc_mdss_dp_aux_clk_src = {
|
||||
.cmd_rcgr = 0x1144,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = disp_cc_parent_map_6,
|
||||
.freq_tbl = ftbl_disp_cc_mdss_dp_aux_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "disp_cc_mdss_dp_aux_clk_src",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.parent_data = disp_cc_parent_data_6,
|
||||
.num_parents = ARRAY_SIZE(disp_cc_parent_data_6),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -535,7 +535,7 @@ static struct clk_rcg2 blsp1_uart5_apps_clk_src = {
|
||||
};
|
||||
|
||||
static struct clk_rcg2 blsp1_uart6_apps_clk_src = {
|
||||
.cmd_rcgr = 0x6044,
|
||||
.cmd_rcgr = 0x7044,
|
||||
.mnd_width = 16,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_xo_gpll0_map,
|
||||
|
||||
@@ -182,6 +182,14 @@ static const struct clk_parent_data gcc_parent_data_2_ao[] = {
|
||||
{ .hw = &gpll0_out_odd.clkr.hw },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_3[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
};
|
||||
|
||||
static const struct clk_parent_data gcc_parent_data_3[] = {
|
||||
{ .fw_name = "bi_tcxo" },
|
||||
};
|
||||
|
||||
static const struct parent_map gcc_parent_map_4[] = {
|
||||
{ P_BI_TCXO, 0 },
|
||||
{ P_GPLL0_OUT_MAIN, 1 },
|
||||
@@ -701,13 +709,12 @@ static struct clk_rcg2 gcc_ufs_phy_phy_aux_clk_src = {
|
||||
.cmd_rcgr = 0x3a0b0,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_3,
|
||||
.freq_tbl = ftbl_gcc_ufs_phy_phy_aux_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "gcc_ufs_phy_phy_aux_clk_src",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_parent_data_3,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_3),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
@@ -764,13 +771,12 @@ static struct clk_rcg2 gcc_usb30_prim_mock_utmi_clk_src = {
|
||||
.cmd_rcgr = 0x1a034,
|
||||
.mnd_width = 0,
|
||||
.hid_width = 5,
|
||||
.parent_map = gcc_parent_map_3,
|
||||
.freq_tbl = ftbl_gcc_usb30_prim_mock_utmi_clk_src,
|
||||
.clkr.hw.init = &(struct clk_init_data){
|
||||
.name = "gcc_usb30_prim_mock_utmi_clk_src",
|
||||
.parent_data = &(const struct clk_parent_data){
|
||||
.fw_name = "bi_tcxo",
|
||||
},
|
||||
.num_parents = 1,
|
||||
.parent_data = gcc_parent_data_3,
|
||||
.num_parents = ARRAY_SIZE(gcc_parent_data_3),
|
||||
.ops = &clk_rcg2_ops,
|
||||
},
|
||||
};
|
||||
|
||||
@@ -3003,7 +3003,7 @@ static struct gdsc pcie_0_gdsc = {
|
||||
.pd = {
|
||||
.name = "pcie_0_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
@@ -3014,7 +3014,7 @@ static struct gdsc pcie_0_phy_gdsc = {
|
||||
.pd = {
|
||||
.name = "pcie_0_phy_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
@@ -3025,7 +3025,7 @@ static struct gdsc pcie_1_gdsc = {
|
||||
.pd = {
|
||||
.name = "pcie_1_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
@@ -3036,7 +3036,7 @@ static struct gdsc pcie_1_phy_gdsc = {
|
||||
.pd = {
|
||||
.name = "pcie_1_phy_gdsc",
|
||||
},
|
||||
.pwrsts = PWRSTS_OFF_ON,
|
||||
.pwrsts = PWRSTS_RET_ON,
|
||||
.flags = VOTABLE | POLL_CFG_GDSCR | RETAIN_FF_ENABLE,
|
||||
};
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@ static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc0_clk, "mmc0", mmc_parents, 0x830,
|
||||
24, 2, /* mux */
|
||||
BIT(31), /* gate */
|
||||
2, /* post-div */
|
||||
CLK_SET_RATE_NO_REPARENT);
|
||||
0);
|
||||
|
||||
static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1", mmc_parents, 0x834,
|
||||
0, 4, /* M */
|
||||
@@ -444,7 +444,7 @@ static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1", mmc_parents, 0x834,
|
||||
24, 2, /* mux */
|
||||
BIT(31), /* gate */
|
||||
2, /* post-div */
|
||||
CLK_SET_RATE_NO_REPARENT);
|
||||
0);
|
||||
|
||||
static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", mmc_parents, 0x838,
|
||||
0, 4, /* M */
|
||||
@@ -452,7 +452,7 @@ static SUNXI_CCU_MP_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", mmc_parents, 0x838,
|
||||
24, 2, /* mux */
|
||||
BIT(31), /* gate */
|
||||
2, /* post-div */
|
||||
CLK_SET_RATE_NO_REPARENT);
|
||||
0);
|
||||
|
||||
static SUNXI_CCU_GATE(bus_mmc0_clk, "bus-mmc0", "ahb3", 0x84c, BIT(0), 0);
|
||||
static SUNXI_CCU_GATE(bus_mmc1_clk, "bus-mmc1", "ahb3", 0x84c, BIT(1), 0);
|
||||
|
||||
@@ -24,6 +24,7 @@ struct s3c64xx_dvfs {
|
||||
unsigned int vddarm_max;
|
||||
};
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
static struct s3c64xx_dvfs s3c64xx_dvfs_table[] = {
|
||||
[0] = { 1000000, 1150000 },
|
||||
[1] = { 1050000, 1150000 },
|
||||
@@ -31,6 +32,7 @@ static struct s3c64xx_dvfs s3c64xx_dvfs_table[] = {
|
||||
[3] = { 1200000, 1350000 },
|
||||
[4] = { 1300000, 1350000 },
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct cpufreq_frequency_table s3c64xx_freq_table[] = {
|
||||
{ 0, 0, 66000 },
|
||||
@@ -51,15 +53,16 @@ static struct cpufreq_frequency_table s3c64xx_freq_table[] = {
|
||||
static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
|
||||
unsigned int index)
|
||||
{
|
||||
struct s3c64xx_dvfs *dvfs;
|
||||
unsigned int old_freq, new_freq;
|
||||
unsigned int new_freq = s3c64xx_freq_table[index].frequency;
|
||||
int ret;
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
struct s3c64xx_dvfs *dvfs;
|
||||
unsigned int old_freq;
|
||||
|
||||
old_freq = clk_get_rate(policy->clk) / 1000;
|
||||
new_freq = s3c64xx_freq_table[index].frequency;
|
||||
dvfs = &s3c64xx_dvfs_table[s3c64xx_freq_table[index].driver_data];
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
if (vddarm && new_freq > old_freq) {
|
||||
ret = regulator_set_voltage(vddarm,
|
||||
dvfs->vddarm_min,
|
||||
|
||||
@@ -786,7 +786,7 @@ static int qce_aead_register_one(const struct qce_aead_def *def, struct qce_devi
|
||||
alg->init = qce_aead_init;
|
||||
alg->exit = qce_aead_exit;
|
||||
|
||||
alg->base.cra_priority = 300;
|
||||
alg->base.cra_priority = 275;
|
||||
alg->base.cra_flags = CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_ALLOCATES_MEMORY |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY |
|
||||
|
||||
@@ -51,16 +51,19 @@ static void qce_unregister_algs(struct qce_device *qce)
|
||||
static int qce_register_algs(struct qce_device *qce)
|
||||
{
|
||||
const struct qce_algo_ops *ops;
|
||||
int i, ret = -ENODEV;
|
||||
int i, j, ret = -ENODEV;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(qce_ops); i++) {
|
||||
ops = qce_ops[i];
|
||||
ret = ops->register_algs(qce);
|
||||
if (ret)
|
||||
break;
|
||||
if (ret) {
|
||||
for (j = i - 1; j >= 0; j--)
|
||||
ops->unregister_algs(qce);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qce_handle_request(struct crypto_async_request *async_req)
|
||||
@@ -247,7 +250,7 @@ static int qce_crypto_probe(struct platform_device *pdev)
|
||||
|
||||
ret = qce_check_version(qce);
|
||||
if (ret)
|
||||
goto err_clks;
|
||||
goto err_dma;
|
||||
|
||||
spin_lock_init(&qce->lock);
|
||||
tasklet_init(&qce->done_tasklet, qce_tasklet_req_done,
|
||||
|
||||
@@ -482,7 +482,7 @@ static int qce_ahash_register_one(const struct qce_ahash_def *def,
|
||||
|
||||
base = &alg->halg.base;
|
||||
base->cra_blocksize = def->blocksize;
|
||||
base->cra_priority = 300;
|
||||
base->cra_priority = 175;
|
||||
base->cra_flags = CRYPTO_ALG_ASYNC | CRYPTO_ALG_KERN_DRIVER_ONLY;
|
||||
base->cra_ctxsize = sizeof(struct qce_sha_ctx);
|
||||
base->cra_alignmask = 0;
|
||||
|
||||
@@ -461,7 +461,7 @@ static int qce_skcipher_register_one(const struct qce_skcipher_def *def,
|
||||
alg->encrypt = qce_skcipher_encrypt;
|
||||
alg->decrypt = qce_skcipher_decrypt;
|
||||
|
||||
alg->base.cra_priority = 300;
|
||||
alg->base.cra_priority = 275;
|
||||
alg->base.cra_flags = CRYPTO_ALG_ASYNC |
|
||||
CRYPTO_ALG_ALLOCATES_MEMORY |
|
||||
CRYPTO_ALG_KERN_DRIVER_ONLY;
|
||||
|
||||
@@ -11,7 +11,7 @@ cflags-y := $(KBUILD_CFLAGS)
|
||||
|
||||
cflags-$(CONFIG_X86_32) := -march=i386
|
||||
cflags-$(CONFIG_X86_64) := -mcmodel=small
|
||||
cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ \
|
||||
cflags-$(CONFIG_X86) += -m$(BITS) -D__KERNEL__ -std=gnu11 \
|
||||
-fPIC -fno-strict-aliasing -mno-red-zone \
|
||||
-mno-mmx -mno-sse -fshort-wchar \
|
||||
-Wno-pointer-sign \
|
||||
|
||||
@@ -847,25 +847,6 @@ static bool pca953x_irq_pending(struct pca953x_chip *chip, unsigned long *pendin
|
||||
DECLARE_BITMAP(trigger, MAX_LINE);
|
||||
int ret;
|
||||
|
||||
if (chip->driver_data & PCA_PCAL) {
|
||||
/* Read the current interrupt status from the device */
|
||||
ret = pca953x_read_regs(chip, PCAL953X_INT_STAT, trigger);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
/* Check latched inputs and clear interrupt status */
|
||||
ret = pca953x_read_regs(chip, chip->regs->input, cur_stat);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
/* Apply filter for rising/falling edge selection */
|
||||
bitmap_replace(new_stat, chip->irq_trig_fall, chip->irq_trig_raise, cur_stat, gc->ngpio);
|
||||
|
||||
bitmap_and(pending, new_stat, trigger, gc->ngpio);
|
||||
|
||||
return !bitmap_empty(pending, gc->ngpio);
|
||||
}
|
||||
|
||||
ret = pca953x_read_regs(chip, chip->regs->input, cur_stat);
|
||||
if (ret)
|
||||
return false;
|
||||
|
||||
@@ -86,9 +86,12 @@ void kfd_process_dequeue_from_device(struct kfd_process_device *pdd)
|
||||
|
||||
if (pdd->already_dequeued)
|
||||
return;
|
||||
|
||||
/* The MES context flush needs to filter out the case which the
|
||||
* KFD process is created without setting up the MES context and
|
||||
* queue for creating a compute queue.
|
||||
*/
|
||||
dev->dqm->ops.process_termination(dev->dqm, &pdd->qpd);
|
||||
if (dev->kfd->shared_resources.enable_mes &&
|
||||
if (dev->kfd->shared_resources.enable_mes && !!pdd->proc_ctx_gpu_addr &&
|
||||
down_read_trylock(&dev->adev->reset_domain->sem)) {
|
||||
amdgpu_mes_flush_shader_debugger(dev->adev,
|
||||
pdd->proc_ctx_gpu_addr);
|
||||
|
||||
@@ -955,8 +955,10 @@ static int amdgpu_dm_audio_component_get_eld(struct device *kdev, int port,
|
||||
continue;
|
||||
|
||||
*enabled = true;
|
||||
mutex_lock(&connector->eld_mutex);
|
||||
ret = drm_eld_size(connector->eld);
|
||||
memcpy(buf, connector->eld, min(max_bytes, ret));
|
||||
mutex_unlock(&connector->eld_mutex);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1578,16 +1578,16 @@ clean_exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static unsigned int kbps_from_pbn(unsigned int pbn)
|
||||
static uint32_t kbps_from_pbn(unsigned int pbn)
|
||||
{
|
||||
unsigned int kbps = pbn;
|
||||
uint64_t kbps = (uint64_t)pbn;
|
||||
|
||||
kbps *= (1000000 / PEAK_FACTOR_X1000);
|
||||
kbps *= 8;
|
||||
kbps *= 54;
|
||||
kbps /= 64;
|
||||
|
||||
return kbps;
|
||||
return (uint32_t)kbps;
|
||||
}
|
||||
|
||||
static bool is_dsc_common_config_possible(struct dc_stream_state *stream,
|
||||
|
||||
@@ -63,8 +63,7 @@ void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,
|
||||
|
||||
bool should_use_dmub_lock(struct dc_link *link)
|
||||
{
|
||||
if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1 ||
|
||||
link->psr_settings.psr_version == DC_PSR_VERSION_1)
|
||||
if (link->psr_settings.psr_version == DC_PSR_VERSION_SU_1)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1752,7 +1752,6 @@ static ssize_t aldebaran_get_gpu_metrics(struct smu_context *smu,
|
||||
|
||||
gpu_metrics->average_gfx_activity = metrics.AverageGfxActivity;
|
||||
gpu_metrics->average_umc_activity = metrics.AverageUclkActivity;
|
||||
gpu_metrics->average_mm_activity = 0;
|
||||
|
||||
/* Valid power data is available only from primary die */
|
||||
if (aldebaran_is_primary(smu)) {
|
||||
|
||||
@@ -160,6 +160,10 @@ static int komeda_wb_connector_add(struct komeda_kms_dev *kms,
|
||||
formats = komeda_get_layer_fourcc_list(&mdev->fmt_tbl,
|
||||
kwb_conn->wb_layer->layer_type,
|
||||
&n_formats);
|
||||
if (!formats) {
|
||||
kfree(kwb_conn);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
err = drm_writeback_connector_init(&kms->base, wb_conn,
|
||||
&komeda_wb_connector_funcs,
|
||||
|
||||
@@ -2014,8 +2014,10 @@ static int anx7625_audio_get_eld(struct device *dev, void *data,
|
||||
memset(buf, 0, len);
|
||||
} else {
|
||||
dev_dbg(dev, "audio copy eld\n");
|
||||
mutex_lock(&ctx->connector->eld_mutex);
|
||||
memcpy(buf, ctx->connector->eld,
|
||||
min(sizeof(ctx->connector->eld), len));
|
||||
mutex_unlock(&ctx->connector->eld_mutex);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -295,7 +295,7 @@
|
||||
#define MAX_LANE_COUNT 4
|
||||
#define MAX_LINK_RATE HBR
|
||||
#define AUTO_TRAIN_RETRY 3
|
||||
#define MAX_HDCP_DOWN_STREAM_COUNT 10
|
||||
#define MAX_HDCP_DOWN_STREAM_COUNT 127
|
||||
#define MAX_CR_LEVEL 0x03
|
||||
#define MAX_EQ_LEVEL 0x03
|
||||
#define AUX_WAIT_TIMEOUT_MS 15
|
||||
@@ -2020,7 +2020,7 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = it6505->dev;
|
||||
u8 av[5][4], bv[5][4];
|
||||
int i, err;
|
||||
int i, err, retry;
|
||||
|
||||
i = it6505_setup_sha1_input(it6505, it6505->sha1_input);
|
||||
if (i <= 0) {
|
||||
@@ -2029,35 +2029,42 @@ static bool it6505_hdcp_part2_ksvlist_check(struct it6505 *it6505)
|
||||
}
|
||||
|
||||
it6505_sha1_digest(it6505, it6505->sha1_input, i, (u8 *)av);
|
||||
|
||||
/*1B-05 V' must retry 3 times */
|
||||
for (retry = 0; retry < 3; retry++) {
|
||||
err = it6505_get_dpcd(it6505, DP_AUX_HDCP_V_PRIME(0), (u8 *)bv,
|
||||
sizeof(bv));
|
||||
|
||||
if (err < 0) {
|
||||
dev_err(dev, "Read V' value Fail");
|
||||
return false;
|
||||
dev_err(dev, "Read V' value Fail %d", retry);
|
||||
continue;
|
||||
}
|
||||
|
||||
for (i = 0; i < 5; i++)
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (bv[i][3] != av[i][0] || bv[i][2] != av[i][1] ||
|
||||
bv[i][1] != av[i][2] || bv[i][0] != av[i][3])
|
||||
return false;
|
||||
av[i][1] != av[i][2] || bv[i][0] != av[i][3])
|
||||
break;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "V' all match!!");
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "V' all match!! %d, %d", retry, i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "V' NOT match!! %d", retry);
|
||||
return false;
|
||||
}
|
||||
|
||||
static void it6505_hdcp_wait_ksv_list(struct work_struct *work)
|
||||
{
|
||||
struct it6505 *it6505 = container_of(work, struct it6505,
|
||||
hdcp_wait_ksv_list);
|
||||
struct device *dev = it6505->dev;
|
||||
unsigned int timeout = 5000;
|
||||
u8 bstatus = 0;
|
||||
u8 bstatus;
|
||||
bool ksv_list_check;
|
||||
/* 1B-04 wait ksv list for 5s */
|
||||
unsigned long timeout = jiffies +
|
||||
msecs_to_jiffies(5000) + 1;
|
||||
|
||||
timeout /= 20;
|
||||
while (timeout > 0) {
|
||||
for (;;) {
|
||||
if (!it6505_get_sink_hpd_status(it6505))
|
||||
return;
|
||||
|
||||
@@ -2066,27 +2073,23 @@ static void it6505_hdcp_wait_ksv_list(struct work_struct *work)
|
||||
if (bstatus & DP_BSTATUS_READY)
|
||||
break;
|
||||
|
||||
msleep(20);
|
||||
timeout--;
|
||||
if (time_after(jiffies, timeout)) {
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "KSV list wait timeout");
|
||||
goto timeout;
|
||||
}
|
||||
|
||||
if (timeout == 0) {
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "timeout and ksv list wait failed");
|
||||
goto timeout;
|
||||
msleep(20);
|
||||
}
|
||||
|
||||
ksv_list_check = it6505_hdcp_part2_ksvlist_check(it6505);
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "ksv list ready, ksv list check %s",
|
||||
ksv_list_check ? "pass" : "fail");
|
||||
if (ksv_list_check) {
|
||||
it6505_set_bits(it6505, REG_HDCP_TRIGGER,
|
||||
HDCP_TRIGGER_KSV_DONE, HDCP_TRIGGER_KSV_DONE);
|
||||
|
||||
if (ksv_list_check)
|
||||
return;
|
||||
}
|
||||
|
||||
timeout:
|
||||
it6505_set_bits(it6505, REG_HDCP_TRIGGER,
|
||||
HDCP_TRIGGER_KSV_DONE | HDCP_TRIGGER_KSV_FAIL,
|
||||
HDCP_TRIGGER_KSV_DONE | HDCP_TRIGGER_KSV_FAIL);
|
||||
it6505_start_hdcp(it6505);
|
||||
}
|
||||
|
||||
static void it6505_hdcp_work(struct work_struct *work)
|
||||
@@ -2309,14 +2312,20 @@ static int it6505_process_hpd_irq(struct it6505 *it6505)
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "dp_irq_vector = 0x%02x", dp_irq_vector);
|
||||
|
||||
if (dp_irq_vector & DP_CP_IRQ) {
|
||||
it6505_set_bits(it6505, REG_HDCP_TRIGGER, HDCP_TRIGGER_CPIRQ,
|
||||
HDCP_TRIGGER_CPIRQ);
|
||||
|
||||
bstatus = it6505_dpcd_read(it6505, DP_AUX_HDCP_BSTATUS);
|
||||
if (bstatus < 0)
|
||||
return bstatus;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "Bstatus = 0x%02x", bstatus);
|
||||
|
||||
/*Check BSTATUS when recive CP_IRQ */
|
||||
if (bstatus & DP_BSTATUS_R0_PRIME_READY &&
|
||||
it6505->hdcp_status == HDCP_AUTH_GOING)
|
||||
it6505_set_bits(it6505, REG_HDCP_TRIGGER, HDCP_TRIGGER_CPIRQ,
|
||||
HDCP_TRIGGER_CPIRQ);
|
||||
else if (bstatus & (DP_BSTATUS_REAUTH_REQ | DP_BSTATUS_LINK_FAILURE) &&
|
||||
it6505->hdcp_status == HDCP_AUTH_DONE)
|
||||
it6505_start_hdcp(it6505);
|
||||
}
|
||||
|
||||
ret = drm_dp_dpcd_read_link_status(&it6505->aux, link_status);
|
||||
@@ -2453,7 +2462,11 @@ static void it6505_irq_hdcp_ksv_check(struct it6505 *it6505)
|
||||
{
|
||||
struct device *dev = it6505->dev;
|
||||
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "HDCP event Interrupt");
|
||||
DRM_DEV_DEBUG_DRIVER(dev, "HDCP repeater R0 event Interrupt");
|
||||
/* 1B01 HDCP encription should start when R0 is ready*/
|
||||
it6505_set_bits(it6505, REG_HDCP_TRIGGER,
|
||||
HDCP_TRIGGER_KSV_DONE, HDCP_TRIGGER_KSV_DONE);
|
||||
|
||||
schedule_work(&it6505->hdcp_wait_ksv_list);
|
||||
}
|
||||
|
||||
|
||||
@@ -1452,8 +1452,10 @@ static int it66121_audio_get_eld(struct device *dev, void *data,
|
||||
dev_dbg(dev, "No connector present, passing empty EDID data");
|
||||
memset(buf, 0, len);
|
||||
} else {
|
||||
mutex_lock(&ctx->connector->eld_mutex);
|
||||
memcpy(buf, ctx->connector->eld,
|
||||
min(sizeof(ctx->connector->eld), len));
|
||||
mutex_unlock(&ctx->connector->eld_mutex);
|
||||
}
|
||||
mutex_unlock(&ctx->lock);
|
||||
|
||||
|
||||
@@ -310,16 +310,6 @@ void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
|
||||
if (!aux->transfer)
|
||||
return;
|
||||
|
||||
#ifndef CONFIG_MEDIA_CEC_RC
|
||||
/*
|
||||
* CEC_CAP_RC is part of CEC_CAP_DEFAULTS, but it is stripped by
|
||||
* cec_allocate_adapter() if CONFIG_MEDIA_CEC_RC is undefined.
|
||||
*
|
||||
* Do this here as well to ensure the tests against cec_caps are
|
||||
* correct.
|
||||
*/
|
||||
cec_caps &= ~CEC_CAP_RC;
|
||||
#endif
|
||||
cancel_delayed_work_sync(&aux->cec.unregister_work);
|
||||
|
||||
mutex_lock(&aux->cec.lock);
|
||||
@@ -336,7 +326,9 @@ void drm_dp_cec_set_edid(struct drm_dp_aux *aux, const struct edid *edid)
|
||||
num_las = CEC_MAX_LOG_ADDRS;
|
||||
|
||||
if (aux->cec.adap) {
|
||||
if (aux->cec.adap->capabilities == cec_caps &&
|
||||
/* Check if the adapter properties have changed */
|
||||
if ((aux->cec.adap->capabilities & CEC_CAP_MONITOR_ALL) ==
|
||||
(cec_caps & CEC_CAP_MONITOR_ALL) &&
|
||||
aux->cec.adap->available_log_addrs == num_las) {
|
||||
/* Unchanged, so just set the phys addr */
|
||||
cec_s_phys_addr_from_edid(aux->cec.adap, edid);
|
||||
|
||||
@@ -330,6 +330,7 @@ static int __drm_connector_init(struct drm_device *dev,
|
||||
INIT_LIST_HEAD(&connector->probed_modes);
|
||||
INIT_LIST_HEAD(&connector->modes);
|
||||
mutex_init(&connector->mutex);
|
||||
mutex_init(&connector->eld_mutex);
|
||||
mutex_init(&connector->edid_override_mutex);
|
||||
connector->edid_blob_ptr = NULL;
|
||||
connector->epoch_counter = 0;
|
||||
|
||||
@@ -5499,7 +5499,9 @@ EXPORT_SYMBOL(drm_edid_get_monitor_name);
|
||||
|
||||
static void clear_eld(struct drm_connector *connector)
|
||||
{
|
||||
mutex_lock(&connector->eld_mutex);
|
||||
memset(connector->eld, 0, sizeof(connector->eld));
|
||||
mutex_unlock(&connector->eld_mutex);
|
||||
|
||||
connector->latency_present[0] = false;
|
||||
connector->latency_present[1] = false;
|
||||
@@ -5530,6 +5532,8 @@ static void drm_edid_to_eld(struct drm_connector *connector,
|
||||
if (!drm_edid)
|
||||
return;
|
||||
|
||||
mutex_lock(&connector->eld_mutex);
|
||||
|
||||
mnl = get_monitor_name(drm_edid, &eld[DRM_ELD_MONITOR_NAME_STRING]);
|
||||
drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] ELD monitor %s\n",
|
||||
connector->base.id, connector->name,
|
||||
@@ -5590,6 +5594,8 @@ static void drm_edid_to_eld(struct drm_connector *connector,
|
||||
drm_dbg_kms(connector->dev, "[CONNECTOR:%d:%s] ELD size %d, SAD count %d\n",
|
||||
connector->base.id, connector->name,
|
||||
drm_eld_size(eld), total_sad_count);
|
||||
|
||||
mutex_unlock(&connector->eld_mutex);
|
||||
}
|
||||
|
||||
static int _drm_edid_to_sad(const struct drm_edid *drm_edid,
|
||||
|
||||
@@ -1361,14 +1361,14 @@ int drm_fb_helper_set_par(struct fb_info *info)
|
||||
}
|
||||
EXPORT_SYMBOL(drm_fb_helper_set_par);
|
||||
|
||||
static void pan_set(struct drm_fb_helper *fb_helper, int x, int y)
|
||||
static void pan_set(struct drm_fb_helper *fb_helper, int dx, int dy)
|
||||
{
|
||||
struct drm_mode_set *mode_set;
|
||||
|
||||
mutex_lock(&fb_helper->client.modeset_mutex);
|
||||
drm_client_for_each_modeset(mode_set, &fb_helper->client) {
|
||||
mode_set->x = x;
|
||||
mode_set->y = y;
|
||||
mode_set->x += dx;
|
||||
mode_set->y += dy;
|
||||
}
|
||||
mutex_unlock(&fb_helper->client.modeset_mutex);
|
||||
}
|
||||
@@ -1377,16 +1377,18 @@ static int pan_display_atomic(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info)
|
||||
{
|
||||
struct drm_fb_helper *fb_helper = info->par;
|
||||
int ret;
|
||||
int ret, dx, dy;
|
||||
|
||||
pan_set(fb_helper, var->xoffset, var->yoffset);
|
||||
dx = var->xoffset - info->var.xoffset;
|
||||
dy = var->yoffset - info->var.yoffset;
|
||||
pan_set(fb_helper, dx, dy);
|
||||
|
||||
ret = drm_client_modeset_commit_locked(&fb_helper->client);
|
||||
if (!ret) {
|
||||
info->var.xoffset = var->xoffset;
|
||||
info->var.yoffset = var->yoffset;
|
||||
} else
|
||||
pan_set(fb_helper, info->var.xoffset, info->var.yoffset);
|
||||
pan_set(fb_helper, -dx, -dy);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1643,7 +1643,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf,
|
||||
struct hdmi_context *hdata = dev_get_drvdata(dev);
|
||||
struct drm_connector *connector = &hdata->connector;
|
||||
|
||||
mutex_lock(&connector->eld_mutex);
|
||||
memcpy(buf, connector->eld, min(sizeof(connector->eld), len));
|
||||
mutex_unlock(&connector->eld_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -102,8 +102,6 @@ static const u32 icl_sdr_y_plane_formats[] = {
|
||||
DRM_FORMAT_Y216,
|
||||
DRM_FORMAT_XYUV8888,
|
||||
DRM_FORMAT_XVYU2101010,
|
||||
DRM_FORMAT_XVYU12_16161616,
|
||||
DRM_FORMAT_XVYU16161616,
|
||||
};
|
||||
|
||||
static const u32 icl_sdr_uv_plane_formats[] = {
|
||||
@@ -130,8 +128,6 @@ static const u32 icl_sdr_uv_plane_formats[] = {
|
||||
DRM_FORMAT_Y216,
|
||||
DRM_FORMAT_XYUV8888,
|
||||
DRM_FORMAT_XVYU2101010,
|
||||
DRM_FORMAT_XVYU12_16161616,
|
||||
DRM_FORMAT_XVYU16161616,
|
||||
};
|
||||
|
||||
static const u32 icl_hdr_plane_formats[] = {
|
||||
|
||||
@@ -209,8 +209,6 @@ static int shmem_get_pages(struct drm_i915_gem_object *obj)
|
||||
struct address_space *mapping = obj->base.filp->f_mapping;
|
||||
unsigned int max_segment = i915_sg_segment_size(i915->drm.dev);
|
||||
struct sg_table *st;
|
||||
struct sgt_iter sgt_iter;
|
||||
struct page *page;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
@@ -239,9 +237,7 @@ rebuild_st:
|
||||
* for PAGE_SIZE chunks instead may be helpful.
|
||||
*/
|
||||
if (max_segment > PAGE_SIZE) {
|
||||
for_each_sgt_page(page, sgt_iter, st)
|
||||
put_page(page);
|
||||
sg_free_table(st);
|
||||
shmem_sg_free_table(st, mapping, false, false);
|
||||
kfree(st);
|
||||
|
||||
max_segment = PAGE_SIZE;
|
||||
|
||||
@@ -5154,12 +5154,20 @@ static inline void guc_log_context(struct drm_printer *p,
|
||||
{
|
||||
drm_printf(p, "GuC lrc descriptor %u:\n", ce->guc_id.id);
|
||||
drm_printf(p, "\tHW Context Desc: 0x%08x\n", ce->lrc.lrca);
|
||||
if (intel_context_pin_if_active(ce)) {
|
||||
drm_printf(p, "\t\tLRC Head: Internal %u, Memory %u\n",
|
||||
ce->ring->head,
|
||||
ce->lrc_reg_state[CTX_RING_HEAD]);
|
||||
drm_printf(p, "\t\tLRC Tail: Internal %u, Memory %u\n",
|
||||
ce->ring->tail,
|
||||
ce->lrc_reg_state[CTX_RING_TAIL]);
|
||||
intel_context_unpin(ce);
|
||||
} else {
|
||||
drm_printf(p, "\t\tLRC Head: Internal %u, Memory not pinned\n",
|
||||
ce->ring->head);
|
||||
drm_printf(p, "\t\tLRC Tail: Internal %u, Memory not pinned\n",
|
||||
ce->ring->tail);
|
||||
}
|
||||
drm_printf(p, "\t\tContext Pin Count: %u\n",
|
||||
atomic_read(&ce->pin_count));
|
||||
drm_printf(p, "\t\tGuC ID Ref Count: %u\n",
|
||||
|
||||
@@ -773,8 +773,10 @@ static int radeon_audio_component_get_eld(struct device *kdev, int port,
|
||||
if (!dig->pin || dig->pin->id != port)
|
||||
continue;
|
||||
*enabled = true;
|
||||
mutex_lock(&connector->eld_mutex);
|
||||
ret = drm_eld_size(connector->eld);
|
||||
memcpy(buf, connector->eld, min(max_bytes, ret));
|
||||
mutex_unlock(&connector->eld_mutex);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -946,9 +946,6 @@ static void cdn_dp_pd_event_work(struct work_struct *work)
|
||||
{
|
||||
struct cdn_dp_device *dp = container_of(work, struct cdn_dp_device,
|
||||
event_work);
|
||||
struct drm_connector *connector = &dp->connector;
|
||||
enum drm_connector_status old_status;
|
||||
|
||||
int ret;
|
||||
|
||||
mutex_lock(&dp->lock);
|
||||
@@ -1010,11 +1007,7 @@ static void cdn_dp_pd_event_work(struct work_struct *work)
|
||||
|
||||
out:
|
||||
mutex_unlock(&dp->lock);
|
||||
|
||||
old_status = connector->status;
|
||||
connector->status = connector->funcs->detect(connector, false);
|
||||
if (old_status != connector->status)
|
||||
drm_kms_helper_hotplug_event(dp->drm_dev);
|
||||
drm_connector_helper_hpd_irq_event(&dp->connector);
|
||||
}
|
||||
|
||||
static int cdn_dp_pd_event(struct notifier_block *nb,
|
||||
|
||||
@@ -1221,7 +1221,9 @@ static int hdmi_audio_get_eld(struct device *dev, void *data, uint8_t *buf, size
|
||||
struct drm_connector *connector = hdmi->drm_connector;
|
||||
|
||||
DRM_DEBUG_DRIVER("\n");
|
||||
mutex_lock(&connector->eld_mutex);
|
||||
memcpy(buf, connector->eld, min(sizeof(connector->eld), len));
|
||||
mutex_unlock(&connector->eld_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2768,9 +2768,9 @@ static int vc4_hdmi_audio_get_eld(struct device *dev, void *data,
|
||||
struct vc4_hdmi *vc4_hdmi = dev_get_drvdata(dev);
|
||||
struct drm_connector *connector = &vc4_hdmi->connector;
|
||||
|
||||
mutex_lock(&vc4_hdmi->mutex);
|
||||
mutex_lock(&connector->eld_mutex);
|
||||
memcpy(buf, connector->eld, min(sizeof(connector->eld), len));
|
||||
mutex_unlock(&vc4_hdmi->mutex);
|
||||
mutex_unlock(&connector->eld_mutex);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -191,6 +191,13 @@ struct virtio_gpu_framebuffer {
|
||||
#define to_virtio_gpu_framebuffer(x) \
|
||||
container_of(x, struct virtio_gpu_framebuffer, base)
|
||||
|
||||
struct virtio_gpu_plane_state {
|
||||
struct drm_plane_state base;
|
||||
struct virtio_gpu_fence *fence;
|
||||
};
|
||||
#define to_virtio_gpu_plane_state(x) \
|
||||
container_of(x, struct virtio_gpu_plane_state, base)
|
||||
|
||||
struct virtio_gpu_queue {
|
||||
struct virtqueue *vq;
|
||||
spinlock_t qlock;
|
||||
|
||||
@@ -66,11 +66,28 @@ uint32_t virtio_gpu_translate_format(uint32_t drm_fourcc)
|
||||
return format;
|
||||
}
|
||||
|
||||
static struct
|
||||
drm_plane_state *virtio_gpu_plane_duplicate_state(struct drm_plane *plane)
|
||||
{
|
||||
struct virtio_gpu_plane_state *new;
|
||||
|
||||
if (WARN_ON(!plane->state))
|
||||
return NULL;
|
||||
|
||||
new = kzalloc(sizeof(*new), GFP_KERNEL);
|
||||
if (!new)
|
||||
return NULL;
|
||||
|
||||
__drm_atomic_helper_plane_duplicate_state(plane, &new->base);
|
||||
|
||||
return &new->base;
|
||||
}
|
||||
|
||||
static const struct drm_plane_funcs virtio_gpu_plane_funcs = {
|
||||
.update_plane = drm_atomic_helper_update_plane,
|
||||
.disable_plane = drm_atomic_helper_disable_plane,
|
||||
.reset = drm_atomic_helper_plane_reset,
|
||||
.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
|
||||
.atomic_duplicate_state = virtio_gpu_plane_duplicate_state,
|
||||
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
|
||||
};
|
||||
|
||||
@@ -138,11 +155,13 @@ static void virtio_gpu_resource_flush(struct drm_plane *plane,
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct virtio_gpu_device *vgdev = dev->dev_private;
|
||||
struct virtio_gpu_framebuffer *vgfb;
|
||||
struct virtio_gpu_plane_state *vgplane_st;
|
||||
struct virtio_gpu_object *bo;
|
||||
|
||||
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
|
||||
vgplane_st = to_virtio_gpu_plane_state(plane->state);
|
||||
bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
|
||||
if (vgfb->fence) {
|
||||
if (vgplane_st->fence) {
|
||||
struct virtio_gpu_object_array *objs;
|
||||
|
||||
objs = virtio_gpu_array_alloc(1);
|
||||
@@ -151,13 +170,11 @@ static void virtio_gpu_resource_flush(struct drm_plane *plane,
|
||||
virtio_gpu_array_add_obj(objs, vgfb->base.obj[0]);
|
||||
virtio_gpu_array_lock_resv(objs);
|
||||
virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle, x, y,
|
||||
width, height, objs, vgfb->fence);
|
||||
width, height, objs,
|
||||
vgplane_st->fence);
|
||||
virtio_gpu_notify(vgdev);
|
||||
|
||||
dma_fence_wait_timeout(&vgfb->fence->f, true,
|
||||
dma_fence_wait_timeout(&vgplane_st->fence->f, true,
|
||||
msecs_to_jiffies(50));
|
||||
dma_fence_put(&vgfb->fence->f);
|
||||
vgfb->fence = NULL;
|
||||
} else {
|
||||
virtio_gpu_cmd_resource_flush(vgdev, bo->hw_res_handle, x, y,
|
||||
width, height, NULL, NULL);
|
||||
@@ -247,20 +264,23 @@ static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
|
||||
struct drm_device *dev = plane->dev;
|
||||
struct virtio_gpu_device *vgdev = dev->dev_private;
|
||||
struct virtio_gpu_framebuffer *vgfb;
|
||||
struct virtio_gpu_plane_state *vgplane_st;
|
||||
struct virtio_gpu_object *bo;
|
||||
|
||||
if (!new_state->fb)
|
||||
return 0;
|
||||
|
||||
vgfb = to_virtio_gpu_framebuffer(new_state->fb);
|
||||
vgplane_st = to_virtio_gpu_plane_state(new_state);
|
||||
bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
|
||||
if (!bo || (plane->type == DRM_PLANE_TYPE_PRIMARY && !bo->guest_blob))
|
||||
return 0;
|
||||
|
||||
if (bo->dumb && (plane->state->fb != new_state->fb)) {
|
||||
vgfb->fence = virtio_gpu_fence_alloc(vgdev, vgdev->fence_drv.context,
|
||||
if (bo->dumb) {
|
||||
vgplane_st->fence = virtio_gpu_fence_alloc(vgdev,
|
||||
vgdev->fence_drv.context,
|
||||
0);
|
||||
if (!vgfb->fence)
|
||||
if (!vgplane_st->fence)
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
@@ -270,15 +290,15 @@ static int virtio_gpu_plane_prepare_fb(struct drm_plane *plane,
|
||||
static void virtio_gpu_plane_cleanup_fb(struct drm_plane *plane,
|
||||
struct drm_plane_state *state)
|
||||
{
|
||||
struct virtio_gpu_framebuffer *vgfb;
|
||||
struct virtio_gpu_plane_state *vgplane_st;
|
||||
|
||||
if (!state->fb)
|
||||
return;
|
||||
|
||||
vgfb = to_virtio_gpu_framebuffer(state->fb);
|
||||
if (vgfb->fence) {
|
||||
dma_fence_put(&vgfb->fence->f);
|
||||
vgfb->fence = NULL;
|
||||
vgplane_st = to_virtio_gpu_plane_state(state);
|
||||
if (vgplane_st->fence) {
|
||||
dma_fence_put(&vgplane_st->fence->f);
|
||||
vgplane_st->fence = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,6 +311,7 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
|
||||
struct virtio_gpu_device *vgdev = dev->dev_private;
|
||||
struct virtio_gpu_output *output = NULL;
|
||||
struct virtio_gpu_framebuffer *vgfb;
|
||||
struct virtio_gpu_plane_state *vgplane_st;
|
||||
struct virtio_gpu_object *bo = NULL;
|
||||
uint32_t handle;
|
||||
|
||||
@@ -303,6 +324,7 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
|
||||
|
||||
if (plane->state->fb) {
|
||||
vgfb = to_virtio_gpu_framebuffer(plane->state->fb);
|
||||
vgplane_st = to_virtio_gpu_plane_state(plane->state);
|
||||
bo = gem_to_virtio_gpu_obj(vgfb->base.obj[0]);
|
||||
handle = bo->hw_res_handle;
|
||||
} else {
|
||||
@@ -322,11 +344,9 @@ static void virtio_gpu_cursor_plane_update(struct drm_plane *plane,
|
||||
(vgdev, 0,
|
||||
plane->state->crtc_w,
|
||||
plane->state->crtc_h,
|
||||
0, 0, objs, vgfb->fence);
|
||||
0, 0, objs, vgplane_st->fence);
|
||||
virtio_gpu_notify(vgdev);
|
||||
dma_fence_wait(&vgfb->fence->f, true);
|
||||
dma_fence_put(&vgfb->fence->f);
|
||||
vgfb->fence = NULL;
|
||||
dma_fence_wait(&vgplane_st->fence->f, true);
|
||||
}
|
||||
|
||||
if (plane->state->fb != old_state->fb) {
|
||||
|
||||
@@ -730,23 +730,30 @@ err_stop_hw:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int sensor_hub_finalize_pending_fn(struct device *dev, void *data)
|
||||
{
|
||||
struct hid_sensor_hub_device *hsdev = dev->platform_data;
|
||||
|
||||
if (hsdev->pending.status)
|
||||
complete(&hsdev->pending.ready);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sensor_hub_remove(struct hid_device *hdev)
|
||||
{
|
||||
struct sensor_hub_data *data = hid_get_drvdata(hdev);
|
||||
unsigned long flags;
|
||||
int i;
|
||||
|
||||
hid_dbg(hdev, " hardware removed\n");
|
||||
hid_hw_close(hdev);
|
||||
hid_hw_stop(hdev);
|
||||
|
||||
spin_lock_irqsave(&data->lock, flags);
|
||||
for (i = 0; i < data->hid_sensor_client_cnt; ++i) {
|
||||
struct hid_sensor_hub_device *hsdev =
|
||||
data->hid_sensor_hub_client_devs[i].platform_data;
|
||||
if (hsdev->pending.status)
|
||||
complete(&hsdev->pending.ready);
|
||||
}
|
||||
device_for_each_child(&hdev->dev, NULL,
|
||||
sensor_hub_finalize_pending_fn);
|
||||
spin_unlock_irqrestore(&data->lock, flags);
|
||||
|
||||
mfd_remove_devices(&hdev->dev);
|
||||
mutex_destroy(&data->mutex);
|
||||
}
|
||||
|
||||
@@ -4911,6 +4911,10 @@ static const struct wacom_features wacom_features_0x94 =
|
||||
HID_DEVICE(BUS_I2C, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
|
||||
.driver_data = (kernel_ulong_t)&wacom_features_##prod
|
||||
|
||||
#define PCI_DEVICE_WACOM(prod) \
|
||||
HID_DEVICE(BUS_PCI, HID_GROUP_WACOM, USB_VENDOR_ID_WACOM, prod),\
|
||||
.driver_data = (kernel_ulong_t)&wacom_features_##prod
|
||||
|
||||
#define USB_DEVICE_LENOVO(prod) \
|
||||
HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, prod), \
|
||||
.driver_data = (kernel_ulong_t)&wacom_features_##prod
|
||||
@@ -5080,6 +5084,7 @@ const struct hid_device_id wacom_ids[] = {
|
||||
|
||||
{ USB_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ I2C_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ PCI_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ BT_DEVICE_WACOM(HID_ANY_ID) },
|
||||
{ }
|
||||
};
|
||||
|
||||
@@ -355,6 +355,25 @@ static const struct acpi_device_id i2c_acpi_force_400khz_device_ids[] = {
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct acpi_device_id i2c_acpi_force_100khz_device_ids[] = {
|
||||
/*
|
||||
* When a 400KHz freq is used on this model of ELAN touchpad in Linux,
|
||||
* excessive smoothing (similar to when the touchpad's firmware detects
|
||||
* a noisy signal) is sometimes applied. As some devices' (e.g, Lenovo
|
||||
* V15 G4) ACPI tables specify a 400KHz frequency for this device and
|
||||
* some I2C busses (e.g, Designware I2C) default to a 400KHz freq,
|
||||
* force the speed to 100KHz as a workaround.
|
||||
*
|
||||
* For future investigation: This problem may be related to the default
|
||||
* HCNT/LCNT values given by some busses' drivers, because they are not
|
||||
* specified in the aforementioned devices' ACPI tables, and because
|
||||
* the device works without issues on Windows at what is expected to be
|
||||
* a 400KHz frequency. The root cause of the issue is not known.
|
||||
*/
|
||||
{ "ELAN06FA", 0 },
|
||||
{}
|
||||
};
|
||||
|
||||
static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
|
||||
void *data, void **return_value)
|
||||
{
|
||||
@@ -373,6 +392,9 @@ static acpi_status i2c_acpi_lookup_speed(acpi_handle handle, u32 level,
|
||||
if (acpi_match_device_ids(adev, i2c_acpi_force_400khz_device_ids) == 0)
|
||||
lookup->force_speed = I2C_MAX_FAST_MODE_FREQ;
|
||||
|
||||
if (acpi_match_device_ids(adev, i2c_acpi_force_100khz_device_ids) == 0)
|
||||
lookup->force_speed = I2C_MAX_STANDARD_MODE_FREQ;
|
||||
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -1878,7 +1878,7 @@ static int i3c_master_bus_init(struct i3c_master_controller *master)
|
||||
goto err_bus_cleanup;
|
||||
|
||||
if (master->ops->set_speed) {
|
||||
master->ops->set_speed(master, I3C_OPEN_DRAIN_NORMAL_SPEED);
|
||||
ret = master->ops->set_speed(master, I3C_OPEN_DRAIN_NORMAL_SPEED);
|
||||
if (ret)
|
||||
goto err_bus_cleanup;
|
||||
}
|
||||
|
||||
@@ -154,6 +154,12 @@ struct as73211_data {
|
||||
BIT(AS73211_SCAN_INDEX_TEMP) | \
|
||||
AS73211_SCAN_MASK_COLOR)
|
||||
|
||||
static const unsigned long as73211_scan_masks[] = {
|
||||
AS73211_SCAN_MASK_COLOR,
|
||||
AS73211_SCAN_MASK_ALL,
|
||||
0
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec as73211_channels[] = {
|
||||
{
|
||||
.type = IIO_TEMP,
|
||||
@@ -602,9 +608,12 @@ static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
|
||||
|
||||
/* AS73211 starts reading at address 2 */
|
||||
ret = i2c_master_recv(data->client,
|
||||
(char *)&scan.chan[1], 3 * sizeof(scan.chan[1]));
|
||||
(char *)&scan.chan[0], 3 * sizeof(scan.chan[0]));
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
|
||||
/* Avoid pushing uninitialized data */
|
||||
scan.chan[3] = 0;
|
||||
}
|
||||
|
||||
if (data_result) {
|
||||
@@ -612,9 +621,15 @@ static irqreturn_t as73211_trigger_handler(int irq __always_unused, void *p)
|
||||
* Saturate all channels (in case of overflows). Temperature channel
|
||||
* is not affected by overflows.
|
||||
*/
|
||||
if (*indio_dev->active_scan_mask == AS73211_SCAN_MASK_ALL) {
|
||||
scan.chan[1] = cpu_to_le16(U16_MAX);
|
||||
scan.chan[2] = cpu_to_le16(U16_MAX);
|
||||
scan.chan[3] = cpu_to_le16(U16_MAX);
|
||||
} else {
|
||||
scan.chan[0] = cpu_to_le16(U16_MAX);
|
||||
scan.chan[1] = cpu_to_le16(U16_MAX);
|
||||
scan.chan[2] = cpu_to_le16(U16_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
iio_push_to_buffers_with_timestamp(indio_dev, &scan, iio_get_time_ns(indio_dev));
|
||||
@@ -684,6 +699,7 @@ static int as73211_probe(struct i2c_client *client)
|
||||
indio_dev->channels = as73211_channels;
|
||||
indio_dev->num_channels = ARRAY_SIZE(as73211_channels);
|
||||
indio_dev->modes = INDIO_DIRECT_MODE;
|
||||
indio_dev->available_scan_masks = as73211_scan_masks;
|
||||
|
||||
ret = i2c_smbus_read_byte_data(data->client, AS73211_REG_OSR);
|
||||
if (ret < 0)
|
||||
|
||||
@@ -3875,7 +3875,7 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
|
||||
/* Initialise in-memory data structures */
|
||||
ret = arm_smmu_init_structures(smmu);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_free_iopf;
|
||||
|
||||
/* Record our private device structure */
|
||||
platform_set_drvdata(pdev, smmu);
|
||||
@@ -3886,22 +3886,29 @@ static int arm_smmu_device_probe(struct platform_device *pdev)
|
||||
/* Reset the device */
|
||||
ret = arm_smmu_device_reset(smmu, bypass);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_disable;
|
||||
|
||||
/* And we're up. Go go go! */
|
||||
ret = iommu_device_sysfs_add(&smmu->iommu, dev, NULL,
|
||||
"smmu3.%pa", &ioaddr);
|
||||
if (ret)
|
||||
return ret;
|
||||
goto err_disable;
|
||||
|
||||
ret = iommu_device_register(&smmu->iommu, &arm_smmu_ops, dev);
|
||||
if (ret) {
|
||||
dev_err(dev, "Failed to register iommu\n");
|
||||
iommu_device_sysfs_remove(&smmu->iommu);
|
||||
return ret;
|
||||
goto err_free_sysfs;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
err_free_sysfs:
|
||||
iommu_device_sysfs_remove(&smmu->iommu);
|
||||
err_disable:
|
||||
arm_smmu_device_disable(smmu);
|
||||
err_free_iopf:
|
||||
iopf_queue_free(smmu->evtq.iopf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void arm_smmu_device_remove(struct platform_device *pdev)
|
||||
|
||||
@@ -554,6 +554,7 @@ static const struct of_device_id __maybe_unused qcom_smmu_impl_of_match[] = {
|
||||
{ .compatible = "qcom,sc8180x-smmu-500", .data = &qcom_smmu_500_impl0_data },
|
||||
{ .compatible = "qcom,sc8280xp-smmu-500", .data = &qcom_smmu_500_impl0_data },
|
||||
{ .compatible = "qcom,sdm630-smmu-v2", .data = &qcom_smmu_v2_data },
|
||||
{ .compatible = "qcom,sdm670-smmu-v2", .data = &qcom_smmu_v2_data },
|
||||
{ .compatible = "qcom,sdm845-smmu-v2", .data = &qcom_smmu_v2_data },
|
||||
{ .compatible = "qcom,sdm845-smmu-500", .data = &sdm845_smmu_500_data },
|
||||
{ .compatible = "qcom,sm6115-smmu-500", .data = &qcom_smmu_500_impl0_data},
|
||||
|
||||
@@ -563,7 +563,8 @@ static void __exception_irq_entry aic_handle_fiq(struct pt_regs *regs)
|
||||
AIC_FIQ_HWIRQ(AIC_TMR_EL02_VIRT));
|
||||
}
|
||||
|
||||
if (read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & PMCR0_IACT) {
|
||||
if ((read_sysreg_s(SYS_IMP_APL_PMCR0_EL1) & (PMCR0_IMODE | PMCR0_IACT)) ==
|
||||
(FIELD_PREP(PMCR0_IMODE, PMCR0_IMODE_FIQ) | PMCR0_IACT)) {
|
||||
int irq;
|
||||
if (cpumask_test_cpu(smp_processor_id(),
|
||||
&aic_irqc->fiq_aff[AIC_CPU_PMU_P]->aff))
|
||||
|
||||
@@ -265,7 +265,7 @@ static int lp8860_init(struct lp8860_led *led)
|
||||
goto out;
|
||||
}
|
||||
|
||||
reg_count = ARRAY_SIZE(lp8860_eeprom_disp_regs) / sizeof(lp8860_eeprom_disp_regs[0]);
|
||||
reg_count = ARRAY_SIZE(lp8860_eeprom_disp_regs);
|
||||
for (i = 0; i < reg_count; i++) {
|
||||
ret = regmap_write(led->eeprom_regmap,
|
||||
lp8860_eeprom_disp_regs[i].reg,
|
||||
|
||||
@@ -388,7 +388,6 @@ static void tegra_hsp_sm_recv32(struct tegra_hsp_channel *channel)
|
||||
value = tegra_hsp_channel_readl(channel, HSP_SM_SHRD_MBOX);
|
||||
value &= ~HSP_SM_SHRD_MBOX_FULL;
|
||||
msg = (void *)(unsigned long)value;
|
||||
mbox_chan_received_data(channel->chan, msg);
|
||||
|
||||
/*
|
||||
* Need to clear all bits here since some producers, such as TCU, depend
|
||||
@@ -398,6 +397,8 @@ static void tegra_hsp_sm_recv32(struct tegra_hsp_channel *channel)
|
||||
* explicitly, so we have to make sure we cover all possible cases.
|
||||
*/
|
||||
tegra_hsp_channel_writel(channel, 0x0, HSP_SM_SHRD_MBOX);
|
||||
|
||||
mbox_chan_received_data(channel->chan, msg);
|
||||
}
|
||||
|
||||
static const struct tegra_hsp_sm_ops tegra_hsp_sm_32bit_ops = {
|
||||
@@ -433,7 +434,6 @@ static void tegra_hsp_sm_recv128(struct tegra_hsp_channel *channel)
|
||||
value[3] = tegra_hsp_channel_readl(channel, HSP_SHRD_MBOX_TYPE1_DATA3);
|
||||
|
||||
msg = (void *)(unsigned long)value;
|
||||
mbox_chan_received_data(channel->chan, msg);
|
||||
|
||||
/*
|
||||
* Clear data registers and tag.
|
||||
@@ -443,6 +443,8 @@ static void tegra_hsp_sm_recv128(struct tegra_hsp_channel *channel)
|
||||
tegra_hsp_channel_writel(channel, 0x0, HSP_SHRD_MBOX_TYPE1_DATA2);
|
||||
tegra_hsp_channel_writel(channel, 0x0, HSP_SHRD_MBOX_TYPE1_DATA3);
|
||||
tegra_hsp_channel_writel(channel, 0x0, HSP_SHRD_MBOX_TYPE1_TAG);
|
||||
|
||||
mbox_chan_received_data(channel->chan, msg);
|
||||
}
|
||||
|
||||
static const struct tegra_hsp_sm_ops tegra_hsp_sm_128bit_ops = {
|
||||
|
||||
@@ -57,6 +57,7 @@ struct convert_context {
|
||||
struct bio *bio_out;
|
||||
struct bvec_iter iter_out;
|
||||
atomic_t cc_pending;
|
||||
unsigned int tag_offset;
|
||||
u64 cc_sector;
|
||||
union {
|
||||
struct skcipher_request *req;
|
||||
@@ -1232,6 +1233,7 @@ static void crypt_convert_init(struct crypt_config *cc,
|
||||
if (bio_out)
|
||||
ctx->iter_out = bio_out->bi_iter;
|
||||
ctx->cc_sector = sector + cc->iv_offset;
|
||||
ctx->tag_offset = 0;
|
||||
init_completion(&ctx->restart);
|
||||
}
|
||||
|
||||
@@ -1564,7 +1566,6 @@ static void crypt_free_req(struct crypt_config *cc, void *req, struct bio *base_
|
||||
static blk_status_t crypt_convert(struct crypt_config *cc,
|
||||
struct convert_context *ctx, bool atomic, bool reset_pending)
|
||||
{
|
||||
unsigned int tag_offset = 0;
|
||||
unsigned int sector_step = cc->sector_size >> SECTOR_SHIFT;
|
||||
int r;
|
||||
|
||||
@@ -1587,9 +1588,9 @@ static blk_status_t crypt_convert(struct crypt_config *cc,
|
||||
atomic_inc(&ctx->cc_pending);
|
||||
|
||||
if (crypt_integrity_aead(cc))
|
||||
r = crypt_convert_block_aead(cc, ctx, ctx->r.req_aead, tag_offset);
|
||||
r = crypt_convert_block_aead(cc, ctx, ctx->r.req_aead, ctx->tag_offset);
|
||||
else
|
||||
r = crypt_convert_block_skcipher(cc, ctx, ctx->r.req, tag_offset);
|
||||
r = crypt_convert_block_skcipher(cc, ctx, ctx->r.req, ctx->tag_offset);
|
||||
|
||||
switch (r) {
|
||||
/*
|
||||
@@ -1609,8 +1610,8 @@ static blk_status_t crypt_convert(struct crypt_config *cc,
|
||||
* exit and continue processing in a workqueue
|
||||
*/
|
||||
ctx->r.req = NULL;
|
||||
ctx->tag_offset++;
|
||||
ctx->cc_sector += sector_step;
|
||||
tag_offset++;
|
||||
return BLK_STS_DEV_RESOURCE;
|
||||
}
|
||||
} else {
|
||||
@@ -1624,8 +1625,8 @@ static blk_status_t crypt_convert(struct crypt_config *cc,
|
||||
*/
|
||||
case -EINPROGRESS:
|
||||
ctx->r.req = NULL;
|
||||
ctx->tag_offset++;
|
||||
ctx->cc_sector += sector_step;
|
||||
tag_offset++;
|
||||
continue;
|
||||
/*
|
||||
* The request was already processed (synchronously).
|
||||
@@ -1633,7 +1634,7 @@ static blk_status_t crypt_convert(struct crypt_config *cc,
|
||||
case 0:
|
||||
atomic_dec(&ctx->cc_pending);
|
||||
ctx->cc_sector += sector_step;
|
||||
tag_offset++;
|
||||
ctx->tag_offset++;
|
||||
if (!atomic)
|
||||
cond_resched();
|
||||
continue;
|
||||
@@ -2068,7 +2069,6 @@ static void kcryptd_crypt_write_continue(struct work_struct *work)
|
||||
struct crypt_config *cc = io->cc;
|
||||
struct convert_context *ctx = &io->ctx;
|
||||
int crypt_finished;
|
||||
sector_t sector = io->sector;
|
||||
blk_status_t r;
|
||||
|
||||
wait_for_completion(&ctx->restart);
|
||||
@@ -2085,10 +2085,8 @@ static void kcryptd_crypt_write_continue(struct work_struct *work)
|
||||
}
|
||||
|
||||
/* Encryption was already finished, submit io now */
|
||||
if (crypt_finished) {
|
||||
if (crypt_finished)
|
||||
kcryptd_crypt_write_io_submit(io, 0);
|
||||
io->sector = sector;
|
||||
}
|
||||
|
||||
crypt_dec_pending(io);
|
||||
}
|
||||
@@ -2099,14 +2097,13 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
|
||||
struct convert_context *ctx = &io->ctx;
|
||||
struct bio *clone;
|
||||
int crypt_finished;
|
||||
sector_t sector = io->sector;
|
||||
blk_status_t r;
|
||||
|
||||
/*
|
||||
* Prevent io from disappearing until this function completes.
|
||||
*/
|
||||
crypt_inc_pending(io);
|
||||
crypt_convert_init(cc, ctx, NULL, io->base_bio, sector);
|
||||
crypt_convert_init(cc, ctx, NULL, io->base_bio, io->sector);
|
||||
|
||||
clone = crypt_alloc_buffer(io, io->base_bio->bi_iter.bi_size);
|
||||
if (unlikely(!clone)) {
|
||||
@@ -2123,8 +2120,6 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
|
||||
io->ctx.iter_in = clone->bi_iter;
|
||||
}
|
||||
|
||||
sector += bio_sectors(clone);
|
||||
|
||||
crypt_inc_pending(io);
|
||||
r = crypt_convert(cc, ctx,
|
||||
test_bit(DM_CRYPT_NO_WRITE_WORKQUEUE, &cc->flags), true);
|
||||
@@ -2148,10 +2143,8 @@ static void kcryptd_crypt_write_convert(struct dm_crypt_io *io)
|
||||
}
|
||||
|
||||
/* Encryption was already finished, submit io now */
|
||||
if (crypt_finished) {
|
||||
if (crypt_finished)
|
||||
kcryptd_crypt_write_io_submit(io, 0);
|
||||
io->sector = sector;
|
||||
}
|
||||
|
||||
dec:
|
||||
crypt_dec_pending(io);
|
||||
|
||||
@@ -3658,15 +3658,15 @@ out_media_entity_cleanup:
|
||||
out_cleanup:
|
||||
ccs_cleanup(sensor);
|
||||
|
||||
out_free_ccs_limits:
|
||||
kfree(sensor->ccs_limits);
|
||||
|
||||
out_release_mdata:
|
||||
kvfree(sensor->mdata.backing);
|
||||
|
||||
out_release_sdata:
|
||||
kvfree(sensor->sdata.backing);
|
||||
|
||||
out_free_ccs_limits:
|
||||
kfree(sensor->ccs_limits);
|
||||
|
||||
out_power_off:
|
||||
ccs_power_off(&client->dev);
|
||||
mutex_destroy(&sensor->mutex);
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <linux/limits.h>
|
||||
#include <linux/mm.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
|
||||
#include "ccs-data-defs.h"
|
||||
|
||||
@@ -97,7 +98,7 @@ ccs_data_parse_length_specifier(const struct __ccs_data_length_specifier *__len,
|
||||
plen = ((size_t)
|
||||
(__len3->length[0] &
|
||||
((1 << CCS_DATA_LENGTH_SPECIFIER_SIZE_SHIFT) - 1))
|
||||
<< 16) + (__len3->length[0] << 8) + __len3->length[1];
|
||||
<< 16) + (__len3->length[1] << 8) + __len3->length[2];
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@@ -948,15 +949,15 @@ int ccs_data_parse(struct ccs_data_container *ccsdata, const void *data,
|
||||
|
||||
rval = __ccs_data_parse(&bin, ccsdata, data, len, dev, verbose);
|
||||
if (rval)
|
||||
return rval;
|
||||
goto out_cleanup;
|
||||
|
||||
rval = bin_backing_alloc(&bin);
|
||||
if (rval)
|
||||
return rval;
|
||||
goto out_cleanup;
|
||||
|
||||
rval = __ccs_data_parse(&bin, ccsdata, data, len, dev, false);
|
||||
if (rval)
|
||||
goto out_free;
|
||||
goto out_cleanup;
|
||||
|
||||
if (verbose && ccsdata->version)
|
||||
print_ccs_data_version(dev, ccsdata->version);
|
||||
@@ -965,15 +966,16 @@ int ccs_data_parse(struct ccs_data_container *ccsdata, const void *data,
|
||||
rval = -EPROTO;
|
||||
dev_dbg(dev, "parsing mismatch; base %p; now %p; end %p\n",
|
||||
bin.base, bin.now, bin.end);
|
||||
goto out_free;
|
||||
goto out_cleanup;
|
||||
}
|
||||
|
||||
ccsdata->backing = bin.base;
|
||||
|
||||
return 0;
|
||||
|
||||
out_free:
|
||||
out_cleanup:
|
||||
kvfree(bin.base);
|
||||
memset(ccsdata, 0, sizeof(*ccsdata));
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
||||
@@ -792,7 +792,6 @@ static void ub913_subdev_uninit(struct ub913_data *priv)
|
||||
v4l2_async_unregister_subdev(&priv->sd);
|
||||
ub913_v4l2_nf_unregister(priv);
|
||||
v4l2_subdev_cleanup(&priv->sd);
|
||||
fwnode_handle_put(priv->sd.fwnode);
|
||||
media_entity_cleanup(&priv->sd.entity);
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user