Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

No conflicts.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2021-12-16 16:13:19 -08:00
commit 7cd2802d74
342 changed files with 3141 additions and 1195 deletions

View File

@ -126,6 +126,8 @@ Greg Kroah-Hartman <gregkh@suse.de>
Greg Kroah-Hartman <greg@kroah.com> Greg Kroah-Hartman <greg@kroah.com>
Greg Kurz <groug@kaod.org> <gkurz@linux.vnet.ibm.com> Greg Kurz <groug@kaod.org> <gkurz@linux.vnet.ibm.com>
Gregory CLEMENT <gregory.clement@bootlin.com> <gregory.clement@free-electrons.com> Gregory CLEMENT <gregory.clement@bootlin.com> <gregory.clement@free-electrons.com>
Guo Ren <guoren@kernel.org> <guoren@linux.alibaba.com>
Guo Ren <guoren@kernel.org> <ren_guo@c-sky.com>
Gustavo Padovan <gustavo@las.ic.unicamp.br> Gustavo Padovan <gustavo@las.ic.unicamp.br>
Gustavo Padovan <padovan@profusion.mobi> Gustavo Padovan <padovan@profusion.mobi>
Hanjun Guo <guohanjun@huawei.com> <hanjun.guo@linaro.org> Hanjun Guo <guohanjun@huawei.com> <hanjun.guo@linaro.org>

View File

@ -20,9 +20,9 @@ allOf:
properties: properties:
compatible: compatible:
enum: items:
- apple,t8103-i2c - const: apple,t8103-i2c
- apple,i2c - const: apple,i2c
reg: reg:
maxItems: 1 maxItems: 1
@ -51,7 +51,7 @@ unevaluatedProperties: false
examples: examples:
- | - |
i2c@35010000 { i2c@35010000 {
compatible = "apple,t8103-i2c"; compatible = "apple,t8103-i2c", "apple,i2c";
reg = <0x35010000 0x4000>; reg = <0x35010000 0x4000>;
interrupt-parent = <&aic>; interrupt-parent = <&aic>;
interrupts = <0 627 4>; interrupts = <0 627 4>;

View File

@ -136,7 +136,7 @@ examples:
samsung,syscon-phandle = <&pmu_system_controller>; samsung,syscon-phandle = <&pmu_system_controller>;
/* NTC thermistor is a hwmon device */ /* NTC thermistor is a hwmon device */
ncp15wb473 { thermistor {
compatible = "murata,ncp15wb473"; compatible = "murata,ncp15wb473";
pullup-uv = <1800000>; pullup-uv = <1800000>;
pullup-ohm = <47000>; pullup-ohm = <47000>;

View File

@ -142,7 +142,7 @@ examples:
down { down {
label = "GPIO Key DOWN"; label = "GPIO Key DOWN";
linux,code = <108>; linux,code = <108>;
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>; interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
}; };
}; };

View File

@ -79,6 +79,8 @@ properties:
properties: properties:
data-lanes: data-lanes:
description:
Note that 'fsl,imx7-mipi-csi2' only supports up to 2 data lines.
items: items:
minItems: 1 minItems: 1
maxItems: 4 maxItems: 4
@ -91,18 +93,6 @@ properties:
required: required:
- data-lanes - data-lanes
allOf:
- if:
properties:
compatible:
contains:
const: fsl,imx7-mipi-csi2
then:
properties:
data-lanes:
items:
maxItems: 2
port@1: port@1:
$ref: /schemas/graph.yaml#/properties/port $ref: /schemas/graph.yaml#/properties/port
description: description:

View File

@ -91,6 +91,14 @@ properties:
compensate for the board being designed with the lanes compensate for the board being designed with the lanes
swapped. swapped.
enet-phy-lane-no-swap:
$ref: /schemas/types.yaml#/definitions/flag
description:
If set, indicates that PHY will disable swap of the
TX/RX lanes. This property allows the PHY to work correcly after
e.g. wrong bootstrap configuration caused by issues in PCB
layout design.
eee-broken-100tx: eee-broken-100tx:
$ref: /schemas/types.yaml#/definitions/flag $ref: /schemas/types.yaml#/definitions/flag
description: description:

View File

@ -29,7 +29,7 @@ properties:
- PHY_TYPE_PCIE - PHY_TYPE_PCIE
- PHY_TYPE_SATA - PHY_TYPE_SATA
- PHY_TYPE_SGMII - PHY_TYPE_SGMII
- PHY_TYPE_USB - PHY_TYPE_USB3
- description: The PHY instance - description: The PHY instance
minimum: 0 minimum: 0
maximum: 1 # for DP, SATA or USB maximum: 1 # for DP, SATA or USB

View File

@ -105,7 +105,7 @@ examples:
reg = <0x65>; reg = <0x65>;
interrupt-parent = <&gpio1>; interrupt-parent = <&gpio1>;
interrupts = <16 IRQ_TYPE_EDGE_FALLING>; interrupts = <16 IRQ_TYPE_EDGE_FALLING>;
ti,watchdog-timer = <0>; ti,watchdog-timeout-ms = <0>;
ti,sc-ocp-limit-microamp = <2000000>; ti,sc-ocp-limit-microamp = <2000000>;
ti,sc-ovp-limit-microvolt = <17800000>; ti,sc-ovp-limit-microvolt = <17800000>;
monitored-battery = <&bat>; monitored-battery = <&bat>;

View File

@ -19,6 +19,9 @@ properties:
clocks: clocks:
maxItems: 1 maxItems: 1
interrupts:
maxItems: 1
"#sound-dai-cells": "#sound-dai-cells":
const: 0 const: 0

View File

@ -440,6 +440,22 @@ NOTE: For 82599-based network connections, if you are enabling jumbo frames in
a virtual function (VF), jumbo frames must first be enabled in the physical a virtual function (VF), jumbo frames must first be enabled in the physical
function (PF). The VF MTU setting cannot be larger than the PF MTU. function (PF). The VF MTU setting cannot be larger than the PF MTU.
NBASE-T Support
---------------
The ixgbe driver supports NBASE-T on some devices. However, the advertisement
of NBASE-T speeds is suppressed by default, to accommodate broken network
switches which cannot cope with advertised NBASE-T speeds. Use the ethtool
command to enable advertising NBASE-T speeds on devices which support it::
ethtool -s eth? advertise 0x1800000001028
On Linux systems with INTERFACES(5), this can be specified as a pre-up command
in /etc/network/interfaces so that the interface is always brought up with
NBASE-T support, e.g.::
iface eth? inet dhcp
pre-up ethtool -s eth? advertise 0x1800000001028 || true
Generic Receive Offload, aka GRO Generic Receive Offload, aka GRO
-------------------------------- --------------------------------
The driver supports the in-kernel software implementation of GRO. GRO has The driver supports the in-kernel software implementation of GRO. GRO has

View File

@ -3066,7 +3066,7 @@ F: Documentation/devicetree/bindings/phy/phy-ath79-usb.txt
F: drivers/phy/qualcomm/phy-ath79-usb.c F: drivers/phy/qualcomm/phy-ath79-usb.c
ATHEROS ATH GENERIC UTILITIES ATHEROS ATH GENERIC UTILITIES
M: Kalle Valo <kvalo@codeaurora.org> M: Kalle Valo <kvalo@kernel.org>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
S: Supported S: Supported
F: drivers/net/wireless/ath/* F: drivers/net/wireless/ath/*
@ -3081,7 +3081,7 @@ W: https://wireless.wiki.kernel.org/en/users/Drivers/ath5k
F: drivers/net/wireless/ath/ath5k/ F: drivers/net/wireless/ath/ath5k/
ATHEROS ATH6KL WIRELESS DRIVER ATHEROS ATH6KL WIRELESS DRIVER
M: Kalle Valo <kvalo@codeaurora.org> M: Kalle Valo <kvalo@kernel.org>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
S: Supported S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl W: https://wireless.wiki.kernel.org/en/users/Drivers/ath6kl
@ -9329,7 +9329,6 @@ S: Maintained
F: drivers/iio/pressure/dps310.c F: drivers/iio/pressure/dps310.c
INFINIBAND SUBSYSTEM INFINIBAND SUBSYSTEM
M: Doug Ledford <dledford@redhat.com>
M: Jason Gunthorpe <jgg@nvidia.com> M: Jason Gunthorpe <jgg@nvidia.com>
L: linux-rdma@vger.kernel.org L: linux-rdma@vger.kernel.org
S: Supported S: Supported
@ -10280,9 +10279,9 @@ F: lib/Kconfig.kcsan
F: scripts/Makefile.kcsan F: scripts/Makefile.kcsan
KDUMP KDUMP
M: Dave Young <dyoung@redhat.com>
M: Baoquan He <bhe@redhat.com> M: Baoquan He <bhe@redhat.com>
R: Vivek Goyal <vgoyal@redhat.com> R: Vivek Goyal <vgoyal@redhat.com>
R: Dave Young <dyoung@redhat.com>
L: kexec@lists.infradead.org L: kexec@lists.infradead.org
S: Maintained S: Maintained
W: http://lse.sourceforge.net/kdump/ W: http://lse.sourceforge.net/kdump/
@ -13256,7 +13255,7 @@ F: include/uapi/linux/if_*
F: include/uapi/linux/netdevice.h F: include/uapi/linux/netdevice.h
NETWORKING DRIVERS (WIRELESS) NETWORKING DRIVERS (WIRELESS)
M: Kalle Valo <kvalo@codeaurora.org> M: Kalle Valo <kvalo@kernel.org>
L: linux-wireless@vger.kernel.org L: linux-wireless@vger.kernel.org
S: Maintained S: Maintained
Q: http://patchwork.kernel.org/project/linux-wireless/list/ Q: http://patchwork.kernel.org/project/linux-wireless/list/
@ -15712,7 +15711,7 @@ T: git git://linuxtv.org/anttip/media_tree.git
F: drivers/media/tuners/qt1010* F: drivers/media/tuners/qt1010*
QUALCOMM ATHEROS ATH10K WIRELESS DRIVER QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
M: Kalle Valo <kvalo@codeaurora.org> M: Kalle Valo <kvalo@kernel.org>
L: ath10k@lists.infradead.org L: ath10k@lists.infradead.org
S: Supported S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k W: https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
@ -15720,7 +15719,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
F: drivers/net/wireless/ath/ath10k/ F: drivers/net/wireless/ath/ath10k/
QUALCOMM ATHEROS ATH11K WIRELESS DRIVER QUALCOMM ATHEROS ATH11K WIRELESS DRIVER
M: Kalle Valo <kvalo@codeaurora.org> M: Kalle Valo <kvalo@kernel.org>
L: ath11k@lists.infradead.org L: ath11k@lists.infradead.org
S: Supported S: Supported
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
@ -15786,6 +15785,15 @@ S: Maintained
F: Documentation/devicetree/bindings/net/qcom,ethqos.txt F: Documentation/devicetree/bindings/net/qcom,ethqos.txt
F: drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c F: drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
QUALCOMM FASTRPC DRIVER
M: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
M: Amol Maheshwari <amahesh@qti.qualcomm.com>
L: linux-arm-msm@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/misc/qcom,fastrpc.txt
F: drivers/misc/fastrpc.c
F: include/uapi/misc/fastrpc.h
QUALCOMM GENERIC INTERFACE I2C DRIVER QUALCOMM GENERIC INTERFACE I2C DRIVER
M: Akash Asthana <akashast@codeaurora.org> M: Akash Asthana <akashast@codeaurora.org>
M: Mukesh Savaliya <msavaliy@codeaurora.org> M: Mukesh Savaliya <msavaliy@codeaurora.org>
@ -15892,7 +15900,7 @@ F: Documentation/devicetree/bindings/media/*venus*
F: drivers/media/platform/qcom/venus/ F: drivers/media/platform/qcom/venus/
QUALCOMM WCN36XX WIRELESS DRIVER QUALCOMM WCN36XX WIRELESS DRIVER
M: Kalle Valo <kvalo@codeaurora.org> M: Kalle Valo <kvalo@kernel.org>
L: wcn36xx@lists.infradead.org L: wcn36xx@lists.infradead.org
S: Supported S: Supported
W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx W: https://wireless.wiki.kernel.org/en/users/Drivers/wcn36xx

View File

@ -2,7 +2,7 @@
VERSION = 5 VERSION = 5
PATCHLEVEL = 16 PATCHLEVEL = 16
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc4 EXTRAVERSION = -rc5
NAME = Gobble Gobble NAME = Gobble Gobble
# *DOCUMENTATION* # *DOCUMENTATION*
@ -1374,17 +1374,17 @@ endif
ifneq ($(dtstree),) ifneq ($(dtstree),)
%.dtb: dt_binding_check include/config/kernel.release scripts_dtc %.dtb: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
%.dtbo: dt_binding_check include/config/kernel.release scripts_dtc %.dtbo: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ $(dtstree)/$*.dt.yaml $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
PHONY += dtbs dtbs_install dtbs_check PHONY += dtbs dtbs_install dtbs_check
dtbs: include/config/kernel.release scripts_dtc dtbs: include/config/kernel.release scripts_dtc
$(Q)$(MAKE) $(build)=$(dtstree) $(Q)$(MAKE) $(build)=$(dtstree)
ifneq ($(filter dtbs_check %.dtb %.dtbo, $(MAKECMDGOALS)),) ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),)
export CHECK_DTBS=y export CHECK_DTBS=y
dtbs: dt_binding_check dtbs: dt_binding_check
endif endif

View File

@ -178,6 +178,8 @@
label = "cpu"; label = "cpu";
ethernet = <&fec>; ethernet = <&fec>;
phy-mode = "rgmii-id"; phy-mode = "rgmii-id";
rx-internal-delay-ps = <2000>;
tx-internal-delay-ps = <2000>;
fixed-link { fixed-link {
speed = <100>; speed = <100>;

View File

@ -82,6 +82,6 @@
#define MX6ULL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0 #define MX6ULL_PAD_CSI_DATA04__ESAI_TX_FS 0x01F4 0x0480 0x0000 0x9 0x0
#define MX6ULL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0 #define MX6ULL_PAD_CSI_DATA05__ESAI_TX_CLK 0x01F8 0x0484 0x0000 0x9 0x0
#define MX6ULL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0 #define MX6ULL_PAD_CSI_DATA06__ESAI_TX5_RX0 0x01FC 0x0488 0x0000 0x9 0x0
#define MX6ULL_PAD_CSI_DATA07__ESAI_T0 0x0200 0x048C 0x0000 0x9 0x0 #define MX6ULL_PAD_CSI_DATA07__ESAI_TX0 0x0200 0x048C 0x0000 0x9 0x0
#endif /* __DTS_IMX6ULL_PINFUNC_H */ #endif /* __DTS_IMX6ULL_PINFUNC_H */

View File

@ -91,6 +91,8 @@
/* Internal port connected to eth2 */ /* Internal port connected to eth2 */
ethernet = <&enet2>; ethernet = <&enet2>;
phy-mode = "rgmii"; phy-mode = "rgmii";
rx-internal-delay-ps = <0>;
tx-internal-delay-ps = <0>;
reg = <4>; reg = <4>;
fixed-link { fixed-link {

View File

@ -12,7 +12,7 @@
flash0: n25q00@0 { flash0: n25q00@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q00aa"; compatible = "micron,mt25qu02g", "jedec,spi-nor";
reg = <0>; reg = <0>;
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;

View File

@ -119,7 +119,7 @@
flash: flash@0 { flash: flash@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q256a"; compatible = "micron,n25q256a", "jedec,spi-nor";
reg = <0>; reg = <0>;
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;

View File

@ -124,7 +124,7 @@
flash0: n25q00@0 { flash0: n25q00@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q00"; compatible = "micron,mt25qu02g", "jedec,spi-nor";
reg = <0>; /* chip select */ reg = <0>; /* chip select */
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;

View File

@ -169,7 +169,7 @@
flash: flash@0 { flash: flash@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q00"; compatible = "micron,mt25qu02g", "jedec,spi-nor";
reg = <0>; reg = <0>;
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;

View File

@ -80,7 +80,7 @@
flash: flash@0 { flash: flash@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q256a"; compatible = "micron,n25q256a", "jedec,spi-nor";
reg = <0>; reg = <0>;
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;
m25p,fast-read; m25p,fast-read;

View File

@ -116,7 +116,7 @@
flash0: n25q512a@0 { flash0: n25q512a@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q512a"; compatible = "micron,n25q512a", "jedec,spi-nor";
reg = <0>; reg = <0>;
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;

View File

@ -224,7 +224,7 @@
n25q128@0 { n25q128@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q128"; compatible = "micron,n25q128", "jedec,spi-nor";
reg = <0>; /* chip select */ reg = <0>; /* chip select */
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;
m25p,fast-read; m25p,fast-read;
@ -241,7 +241,7 @@
n25q00@1 { n25q00@1 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "n25q00"; compatible = "micron,mt25qu02g", "jedec,spi-nor";
reg = <1>; /* chip select */ reg = <1>; /* chip select */
spi-max-frequency = <100000000>; spi-max-frequency = <100000000>;
m25p,fast-read; m25p,fast-read;

View File

@ -189,7 +189,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
rockchip_boot_fn = __pa_symbol(secondary_startup); rockchip_boot_fn = __pa_symbol(secondary_startup);
/* copy the trampoline to sram, that runs during startup of the core */ /* copy the trampoline to sram, that runs during startup of the core */
memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz); memcpy_toio(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
flush_cache_all(); flush_cache_all();
outer_clean_range(0, trampoline_sz); outer_clean_range(0, trampoline_sz);

View File

@ -161,7 +161,6 @@ config ARCH_MEDIATEK
config ARCH_MESON config ARCH_MESON
bool "Amlogic Platforms" bool "Amlogic Platforms"
select COMMON_CLK
help help
This enables support for the arm64 based Amlogic SoCs This enables support for the arm64 based Amlogic SoCs
such as the s905, S905X/D, S912, A113X/D or S905X/D2 such as the s905, S905X/D, S912, A113X/D or S905X/D2

View File

@ -134,23 +134,23 @@
type = "critical"; type = "critical";
}; };
}; };
};
cpu_cooling_maps: cooling-maps { cpu_cooling_maps: cooling-maps {
map0 { map0 {
trip = <&cpu_passive>; trip = <&cpu_passive>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
}; };
map1 { map1 {
trip = <&cpu_hot>; trip = <&cpu_hot>;
cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
}; };
}; };
}; };

View File

@ -60,7 +60,7 @@
&port02 { &port02 {
bus-range = <3 3>; bus-range = <3 3>;
ethernet0: pci@0,0 { ethernet0: ethernet@0,0 {
reg = <0x30000 0x0 0x0 0x0 0x0>; reg = <0x30000 0x0 0x0 0x0 0x0>;
/* To be filled by the loader */ /* To be filled by the loader */
local-mac-address = [00 10 18 00 00 00]; local-mac-address = [00 10 18 00 00 00];

View File

@ -7,6 +7,7 @@
* Copyright The Asahi Linux Contributors * Copyright The Asahi Linux Contributors
*/ */
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/apple-aic.h> #include <dt-bindings/interrupt-controller/apple-aic.h>
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/pinctrl/apple.h> #include <dt-bindings/pinctrl/apple.h>
@ -143,6 +144,7 @@
apple,npins = <212>; apple,npins = <212>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>; interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>, interrupts = <AIC_IRQ 190 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 191 IRQ_TYPE_LEVEL_HIGH>,
@ -169,6 +171,7 @@
apple,npins = <42>; apple,npins = <42>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>; interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>, interrupts = <AIC_IRQ 268 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 269 IRQ_TYPE_LEVEL_HIGH>,
@ -189,6 +192,7 @@
apple,npins = <23>; apple,npins = <23>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>; interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>, interrupts = <AIC_IRQ 330 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 331 IRQ_TYPE_LEVEL_HIGH>,
@ -209,6 +213,7 @@
apple,npins = <16>; apple,npins = <16>;
interrupt-controller; interrupt-controller;
#interrupt-cells = <2>;
interrupt-parent = <&aic>; interrupt-parent = <&aic>;
interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>, interrupts = <AIC_IRQ 391 IRQ_TYPE_LEVEL_HIGH>,
<AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>, <AIC_IRQ 392 IRQ_TYPE_LEVEL_HIGH>,
@ -281,7 +286,7 @@
port00: pci@0,0 { port00: pci@0,0 {
device_type = "pci"; device_type = "pci";
reg = <0x0 0x0 0x0 0x0 0x0>; reg = <0x0 0x0 0x0 0x0 0x0>;
reset-gpios = <&pinctrl_ap 152 0>; reset-gpios = <&pinctrl_ap 152 GPIO_ACTIVE_LOW>;
max-link-speed = <2>; max-link-speed = <2>;
#address-cells = <3>; #address-cells = <3>;
@ -301,7 +306,7 @@
port01: pci@1,0 { port01: pci@1,0 {
device_type = "pci"; device_type = "pci";
reg = <0x800 0x0 0x0 0x0 0x0>; reg = <0x800 0x0 0x0 0x0 0x0>;
reset-gpios = <&pinctrl_ap 153 0>; reset-gpios = <&pinctrl_ap 153 GPIO_ACTIVE_LOW>;
max-link-speed = <2>; max-link-speed = <2>;
#address-cells = <3>; #address-cells = <3>;
@ -321,7 +326,7 @@
port02: pci@2,0 { port02: pci@2,0 {
device_type = "pci"; device_type = "pci";
reg = <0x1000 0x0 0x0 0x0 0x0>; reg = <0x1000 0x0 0x0 0x0 0x0>;
reset-gpios = <&pinctrl_ap 33 0>; reset-gpios = <&pinctrl_ap 33 GPIO_ACTIVE_LOW>;
max-link-speed = <1>; max-link-speed = <1>;
#address-cells = <3>; #address-cells = <3>;

View File

@ -38,7 +38,6 @@
powerdn { powerdn {
label = "External Power Down"; label = "External Power Down";
gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
interrupts = <&gpio1 17 IRQ_TYPE_EDGE_FALLING>;
linux,code = <KEY_POWER>; linux,code = <KEY_POWER>;
}; };
@ -46,7 +45,6 @@
admin { admin {
label = "ADMIN button"; label = "ADMIN button";
gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>; gpios = <&gpio3 8 GPIO_ACTIVE_HIGH>;
interrupts = <&gpio3 8 IRQ_TYPE_EDGE_RISING>;
linux,code = <KEY_WPS_BUTTON>; linux,code = <KEY_WPS_BUTTON>;
}; };
}; };

View File

@ -386,6 +386,8 @@
reg = <2>; reg = <2>;
ethernet = <&dpmac17>; ethernet = <&dpmac17>;
phy-mode = "rgmii-id"; phy-mode = "rgmii-id";
rx-internal-delay-ps = <2000>;
tx-internal-delay-ps = <2000>;
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;
@ -529,6 +531,8 @@
reg = <2>; reg = <2>;
ethernet = <&dpmac18>; ethernet = <&dpmac18>;
phy-mode = "rgmii-id"; phy-mode = "rgmii-id";
rx-internal-delay-ps = <2000>;
tx-internal-delay-ps = <2000>;
fixed-link { fixed-link {
speed = <1000>; speed = <1000>;

View File

@ -524,8 +524,6 @@
<&clk IMX8MQ_VIDEO_PLL1>, <&clk IMX8MQ_VIDEO_PLL1>,
<&clk IMX8MQ_VIDEO_PLL1_OUT>; <&clk IMX8MQ_VIDEO_PLL1_OUT>;
assigned-clock-rates = <0>, <0>, <0>, <594000000>; assigned-clock-rates = <0>, <0>, <0>, <594000000>;
interconnects = <&noc IMX8MQ_ICM_LCDIF &noc IMX8MQ_ICS_DRAM>;
interconnect-names = "dram";
status = "disabled"; status = "disabled";
port@0 { port@0 {

View File

@ -97,7 +97,7 @@
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
regulator-always-on; regulator-always-on;
regulator-boot-on; regulator-boot-on;
vim-supply = <&vcc_io>; vin-supply = <&vcc_io>;
}; };
vdd_core: vdd-core { vdd_core: vdd-core {

View File

@ -705,7 +705,6 @@
&sdhci { &sdhci {
bus-width = <8>; bus-width = <8>;
mmc-hs400-1_8v; mmc-hs400-1_8v;
mmc-hs400-enhanced-strobe;
non-removable; non-removable;
status = "okay"; status = "okay";
}; };

View File

@ -276,6 +276,7 @@
clock-output-names = "xin32k", "rk808-clkout2"; clock-output-names = "xin32k", "rk808-clkout2";
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&pmic_int_l>; pinctrl-0 = <&pmic_int_l>;
rockchip,system-power-controller;
vcc1-supply = <&vcc5v0_sys>; vcc1-supply = <&vcc5v0_sys>;
vcc2-supply = <&vcc5v0_sys>; vcc2-supply = <&vcc5v0_sys>;
vcc3-supply = <&vcc5v0_sys>; vcc3-supply = <&vcc5v0_sys>;

View File

@ -55,7 +55,7 @@
regulator-boot-on; regulator-boot-on;
regulator-min-microvolt = <3300000>; regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
vim-supply = <&vcc3v3_sys>; vin-supply = <&vcc3v3_sys>;
}; };
vcc3v3_sys: vcc3v3-sys { vcc3v3_sys: vcc3v3-sys {

View File

@ -502,7 +502,7 @@
status = "okay"; status = "okay";
bt656-supply = <&vcc_3v0>; bt656-supply = <&vcc_3v0>;
audio-supply = <&vcc_3v0>; audio-supply = <&vcc1v8_codec>;
sdmmc-supply = <&vcc_sdio>; sdmmc-supply = <&vcc_sdio>;
gpio1830-supply = <&vcc_3v0>; gpio1830-supply = <&vcc_3v0>;
}; };

View File

@ -149,6 +149,7 @@ int load_other_segments(struct kimage *image,
initrd_len, cmdline, 0); initrd_len, cmdline, 0);
if (!dtb) { if (!dtb) {
pr_err("Preparing for new dtb failed\n"); pr_err("Preparing for new dtb failed\n");
ret = -EINVAL;
goto out_err; goto out_err;
} }

View File

@ -209,7 +209,7 @@ asmlinkage void do_trap_illinsn(struct pt_regs *regs)
asmlinkage void do_trap_fpe(struct pt_regs *regs) asmlinkage void do_trap_fpe(struct pt_regs *regs)
{ {
#ifdef CONFIG_CPU_HAS_FP #ifdef CONFIG_CPU_HAS_FPU
return fpu_fpe(regs); return fpu_fpe(regs);
#else #else
do_trap_error(regs, SIGILL, ILL_ILLOPC, regs->pc, do_trap_error(regs, SIGILL, ILL_ILLOPC, regs->pc,
@ -219,7 +219,7 @@ asmlinkage void do_trap_fpe(struct pt_regs *regs)
asmlinkage void do_trap_priv(struct pt_regs *regs) asmlinkage void do_trap_priv(struct pt_regs *regs)
{ {
#ifdef CONFIG_CPU_HAS_FP #ifdef CONFIG_CPU_HAS_FPU
if (user_mode(regs) && fpu_libc_helper(regs)) if (user_mode(regs) && fpu_libc_helper(regs))
return; return;
#endif #endif

View File

@ -117,6 +117,7 @@ CONFIG_UNIX=y
CONFIG_UNIX_DIAG=m CONFIG_UNIX_DIAG=m
CONFIG_XFRM_USER=m CONFIG_XFRM_USER=m
CONFIG_NET_KEY=m CONFIG_NET_KEY=m
CONFIG_NET_SWITCHDEV=y
CONFIG_SMC=m CONFIG_SMC=m
CONFIG_SMC_DIAG=m CONFIG_SMC_DIAG=m
CONFIG_INET=y CONFIG_INET=y
@ -511,6 +512,7 @@ CONFIG_NLMON=m
CONFIG_MLX4_EN=m CONFIG_MLX4_EN=m
CONFIG_MLX5_CORE=m CONFIG_MLX5_CORE=m
CONFIG_MLX5_CORE_EN=y CONFIG_MLX5_CORE_EN=y
CONFIG_MLX5_ESWITCH=y
# CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set # CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MICROSEMI is not set # CONFIG_NET_VENDOR_MICROSEMI is not set

View File

@ -109,6 +109,7 @@ CONFIG_UNIX=y
CONFIG_UNIX_DIAG=m CONFIG_UNIX_DIAG=m
CONFIG_XFRM_USER=m CONFIG_XFRM_USER=m
CONFIG_NET_KEY=m CONFIG_NET_KEY=m
CONFIG_NET_SWITCHDEV=y
CONFIG_SMC=m CONFIG_SMC=m
CONFIG_SMC_DIAG=m CONFIG_SMC_DIAG=m
CONFIG_INET=y CONFIG_INET=y
@ -502,6 +503,7 @@ CONFIG_NLMON=m
CONFIG_MLX4_EN=m CONFIG_MLX4_EN=m
CONFIG_MLX5_CORE=m CONFIG_MLX5_CORE=m
CONFIG_MLX5_CORE_EN=y CONFIG_MLX5_CORE_EN=y
CONFIG_MLX5_ESWITCH=y
# CONFIG_NET_VENDOR_MICREL is not set # CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set # CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MICROSEMI is not set # CONFIG_NET_VENDOR_MICROSEMI is not set

View File

@ -290,7 +290,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
return; return;
regs = ftrace_get_regs(fregs); regs = ftrace_get_regs(fregs);
preempt_disable_notrace();
p = get_kprobe((kprobe_opcode_t *)ip); p = get_kprobe((kprobe_opcode_t *)ip);
if (unlikely(!p) || kprobe_disabled(p)) if (unlikely(!p) || kprobe_disabled(p))
goto out; goto out;
@ -318,7 +317,6 @@ void kprobe_ftrace_handler(unsigned long ip, unsigned long parent_ip,
} }
__this_cpu_write(current_kprobe, NULL); __this_cpu_write(current_kprobe, NULL);
out: out:
preempt_enable_notrace();
ftrace_test_recursion_unlock(bit); ftrace_test_recursion_unlock(bit);
} }
NOKPROBE_SYMBOL(kprobe_ftrace_handler); NOKPROBE_SYMBOL(kprobe_ftrace_handler);

View File

@ -138,7 +138,7 @@ void noinstr do_io_irq(struct pt_regs *regs)
struct pt_regs *old_regs = set_irq_regs(regs); struct pt_regs *old_regs = set_irq_regs(regs);
int from_idle; int from_idle;
irq_enter(); irq_enter_rcu();
if (user_mode(regs)) { if (user_mode(regs)) {
update_timer_sys(); update_timer_sys();
@ -158,7 +158,8 @@ void noinstr do_io_irq(struct pt_regs *regs)
do_irq_async(regs, IO_INTERRUPT); do_irq_async(regs, IO_INTERRUPT);
} while (MACHINE_IS_LPAR && irq_pending(regs)); } while (MACHINE_IS_LPAR && irq_pending(regs));
irq_exit(); irq_exit_rcu();
set_irq_regs(old_regs); set_irq_regs(old_regs);
irqentry_exit(regs, state); irqentry_exit(regs, state);
@ -172,7 +173,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
struct pt_regs *old_regs = set_irq_regs(regs); struct pt_regs *old_regs = set_irq_regs(regs);
int from_idle; int from_idle;
irq_enter(); irq_enter_rcu();
if (user_mode(regs)) { if (user_mode(regs)) {
update_timer_sys(); update_timer_sys();
@ -190,7 +191,7 @@ void noinstr do_ext_irq(struct pt_regs *regs)
do_irq_async(regs, EXT_INTERRUPT); do_irq_async(regs, EXT_INTERRUPT);
irq_exit(); irq_exit_rcu();
set_irq_regs(old_regs); set_irq_regs(old_regs);
irqentry_exit(regs, state); irqentry_exit(regs, state);

View File

@ -7,6 +7,8 @@
* Author(s): Philipp Rudo <prudo@linux.vnet.ibm.com> * Author(s): Philipp Rudo <prudo@linux.vnet.ibm.com>
*/ */
#define pr_fmt(fmt) "kexec: " fmt
#include <linux/elf.h> #include <linux/elf.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/kexec.h> #include <linux/kexec.h>
@ -290,8 +292,16 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
const Elf_Shdr *relsec, const Elf_Shdr *relsec,
const Elf_Shdr *symtab) const Elf_Shdr *symtab)
{ {
const char *strtab, *name, *shstrtab;
const Elf_Shdr *sechdrs;
Elf_Rela *relas; Elf_Rela *relas;
int i, r_type; int i, r_type;
int ret;
/* String & section header string table */
sechdrs = (void *)pi->ehdr + pi->ehdr->e_shoff;
strtab = (char *)pi->ehdr + sechdrs[symtab->sh_link].sh_offset;
shstrtab = (char *)pi->ehdr + sechdrs[pi->ehdr->e_shstrndx].sh_offset;
relas = (void *)pi->ehdr + relsec->sh_offset; relas = (void *)pi->ehdr + relsec->sh_offset;
@ -304,15 +314,27 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
sym = (void *)pi->ehdr + symtab->sh_offset; sym = (void *)pi->ehdr + symtab->sh_offset;
sym += ELF64_R_SYM(relas[i].r_info); sym += ELF64_R_SYM(relas[i].r_info);
if (sym->st_shndx == SHN_UNDEF) if (sym->st_name)
return -ENOEXEC; name = strtab + sym->st_name;
else
name = shstrtab + sechdrs[sym->st_shndx].sh_name;
if (sym->st_shndx == SHN_COMMON) if (sym->st_shndx == SHN_UNDEF) {
pr_err("Undefined symbol: %s\n", name);
return -ENOEXEC; return -ENOEXEC;
}
if (sym->st_shndx == SHN_COMMON) {
pr_err("symbol '%s' in common section\n", name);
return -ENOEXEC;
}
if (sym->st_shndx >= pi->ehdr->e_shnum && if (sym->st_shndx >= pi->ehdr->e_shnum &&
sym->st_shndx != SHN_ABS) sym->st_shndx != SHN_ABS) {
pr_err("Invalid section %d for symbol %s\n",
sym->st_shndx, name);
return -ENOEXEC; return -ENOEXEC;
}
loc = pi->purgatory_buf; loc = pi->purgatory_buf;
loc += section->sh_offset; loc += section->sh_offset;
@ -326,7 +348,15 @@ int arch_kexec_apply_relocations_add(struct purgatory_info *pi,
addr = section->sh_addr + relas[i].r_offset; addr = section->sh_addr + relas[i].r_offset;
r_type = ELF64_R_TYPE(relas[i].r_info); r_type = ELF64_R_TYPE(relas[i].r_info);
arch_kexec_do_relocs(r_type, loc, val, addr);
if (r_type == R_390_PLT32DBL)
r_type = R_390_PC32DBL;
ret = arch_kexec_do_relocs(r_type, loc, val, addr);
if (ret) {
pr_err("Unknown rela relocation: %d\n", r_type);
return -ENOEXEC;
}
} }
return 0; return 0;
} }

View File

@ -97,7 +97,7 @@
KVM_ARCH_REQ_FLAGS(25, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP) KVM_ARCH_REQ_FLAGS(25, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
#define KVM_REQ_TLB_FLUSH_CURRENT KVM_ARCH_REQ(26) #define KVM_REQ_TLB_FLUSH_CURRENT KVM_ARCH_REQ(26)
#define KVM_REQ_TLB_FLUSH_GUEST \ #define KVM_REQ_TLB_FLUSH_GUEST \
KVM_ARCH_REQ_FLAGS(27, KVM_REQUEST_NO_WAKEUP) KVM_ARCH_REQ_FLAGS(27, KVM_REQUEST_WAIT | KVM_REQUEST_NO_WAKEUP)
#define KVM_REQ_APF_READY KVM_ARCH_REQ(28) #define KVM_REQ_APF_READY KVM_ARCH_REQ(28)
#define KVM_REQ_MSR_FILTER_CHANGED KVM_ARCH_REQ(29) #define KVM_REQ_MSR_FILTER_CHANGED KVM_ARCH_REQ(29)
#define KVM_REQ_UPDATE_CPU_DIRTY_LOGGING \ #define KVM_REQ_UPDATE_CPU_DIRTY_LOGGING \

View File

@ -579,6 +579,17 @@ static struct sched_domain_topology_level x86_numa_in_package_topology[] = {
{ NULL, }, { NULL, },
}; };
static struct sched_domain_topology_level x86_hybrid_topology[] = {
#ifdef CONFIG_SCHED_SMT
{ cpu_smt_mask, x86_smt_flags, SD_INIT_NAME(SMT) },
#endif
#ifdef CONFIG_SCHED_MC
{ cpu_coregroup_mask, x86_core_flags, SD_INIT_NAME(MC) },
#endif
{ cpu_cpu_mask, SD_INIT_NAME(DIE) },
{ NULL, },
};
static struct sched_domain_topology_level x86_topology[] = { static struct sched_domain_topology_level x86_topology[] = {
#ifdef CONFIG_SCHED_SMT #ifdef CONFIG_SCHED_SMT
{ cpu_smt_mask, x86_smt_flags, SD_INIT_NAME(SMT) }, { cpu_smt_mask, x86_smt_flags, SD_INIT_NAME(SMT) },
@ -1469,8 +1480,11 @@ void __init native_smp_cpus_done(unsigned int max_cpus)
calculate_max_logical_packages(); calculate_max_logical_packages();
/* XXX for now assume numa-in-package and hybrid don't overlap */
if (x86_has_numa_in_package) if (x86_has_numa_in_package)
set_sched_topology(x86_numa_in_package_topology); set_sched_topology(x86_numa_in_package_topology);
if (cpu_feature_enabled(X86_FEATURE_HYBRID_CPU))
set_sched_topology(x86_hybrid_topology);
nmi_selftest(); nmi_selftest();
impress_friends(); impress_friends();

View File

@ -1922,11 +1922,13 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc, bool
all_cpus = send_ipi_ex.vp_set.format == HV_GENERIC_SET_ALL; all_cpus = send_ipi_ex.vp_set.format == HV_GENERIC_SET_ALL;
if (all_cpus)
goto check_and_send_ipi;
if (!sparse_banks_len) if (!sparse_banks_len)
goto ret_success; goto ret_success;
if (!all_cpus && if (kvm_read_guest(kvm,
kvm_read_guest(kvm,
hc->ingpa + offsetof(struct hv_send_ipi_ex, hc->ingpa + offsetof(struct hv_send_ipi_ex,
vp_set.bank_contents), vp_set.bank_contents),
sparse_banks, sparse_banks,
@ -1934,6 +1936,7 @@ static u64 kvm_hv_send_ipi(struct kvm_vcpu *vcpu, struct kvm_hv_hcall *hc, bool
return HV_STATUS_INVALID_HYPERCALL_INPUT; return HV_STATUS_INVALID_HYPERCALL_INPUT;
} }
check_and_send_ipi:
if ((vector < HV_IPI_LOW_VECTOR) || (vector > HV_IPI_HIGH_VECTOR)) if ((vector < HV_IPI_LOW_VECTOR) || (vector > HV_IPI_HIGH_VECTOR))
return HV_STATUS_INVALID_HYPERCALL_INPUT; return HV_STATUS_INVALID_HYPERCALL_INPUT;

View File

@ -2646,15 +2646,6 @@ int alloc_loaded_vmcs(struct loaded_vmcs *loaded_vmcs)
if (!loaded_vmcs->msr_bitmap) if (!loaded_vmcs->msr_bitmap)
goto out_vmcs; goto out_vmcs;
memset(loaded_vmcs->msr_bitmap, 0xff, PAGE_SIZE); memset(loaded_vmcs->msr_bitmap, 0xff, PAGE_SIZE);
if (IS_ENABLED(CONFIG_HYPERV) &&
static_branch_unlikely(&enable_evmcs) &&
(ms_hyperv.nested_features & HV_X64_NESTED_MSR_BITMAP)) {
struct hv_enlightened_vmcs *evmcs =
(struct hv_enlightened_vmcs *)loaded_vmcs->vmcs;
evmcs->hv_enlightenments_control.msr_bitmap = 1;
}
} }
memset(&loaded_vmcs->host_state, 0, sizeof(struct vmcs_host_state)); memset(&loaded_vmcs->host_state, 0, sizeof(struct vmcs_host_state));
@ -6842,6 +6833,19 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu)
if (err < 0) if (err < 0)
goto free_pml; goto free_pml;
/*
* Use Hyper-V 'Enlightened MSR Bitmap' feature when KVM runs as a
* nested (L1) hypervisor and Hyper-V in L0 supports it. Enable the
* feature only for vmcs01, KVM currently isn't equipped to realize any
* performance benefits from enabling it for vmcs02.
*/
if (IS_ENABLED(CONFIG_HYPERV) && static_branch_unlikely(&enable_evmcs) &&
(ms_hyperv.nested_features & HV_X64_NESTED_MSR_BITMAP)) {
struct hv_enlightened_vmcs *evmcs = (void *)vmx->vmcs01.vmcs;
evmcs->hv_enlightenments_control.msr_bitmap = 1;
}
/* The MSR bitmap starts with all ones */ /* The MSR bitmap starts with all ones */
bitmap_fill(vmx->shadow_msr_intercept.read, MAX_POSSIBLE_PASSTHROUGH_MSRS); bitmap_fill(vmx->shadow_msr_intercept.read, MAX_POSSIBLE_PASSTHROUGH_MSRS);
bitmap_fill(vmx->shadow_msr_intercept.write, MAX_POSSIBLE_PASSTHROUGH_MSRS); bitmap_fill(vmx->shadow_msr_intercept.write, MAX_POSSIBLE_PASSTHROUGH_MSRS);

View File

@ -890,7 +890,8 @@ int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
!load_pdptrs(vcpu, vcpu->arch.walk_mmu, kvm_read_cr3(vcpu))) !load_pdptrs(vcpu, vcpu->arch.walk_mmu, kvm_read_cr3(vcpu)))
return 1; return 1;
if (!(cr0 & X86_CR0_PG) && kvm_read_cr4_bits(vcpu, X86_CR4_PCIDE)) if (!(cr0 & X86_CR0_PG) &&
(is_64_bit_mode(vcpu) || kvm_read_cr4_bits(vcpu, X86_CR4_PCIDE)))
return 1; return 1;
static_call(kvm_x86_set_cr0)(vcpu, cr0); static_call(kvm_x86_set_cr0)(vcpu, cr0);
@ -7121,7 +7122,13 @@ static int emulator_pio_in(struct kvm_vcpu *vcpu, int size,
unsigned short port, void *val, unsigned int count) unsigned short port, void *val, unsigned int count)
{ {
if (vcpu->arch.pio.count) { if (vcpu->arch.pio.count) {
/* Complete previous iteration. */ /*
* Complete a previous iteration that required userspace I/O.
* Note, @count isn't guaranteed to match pio.count as userspace
* can modify ECX before rerunning the vCPU. Ignore any such
* shenanigans as KVM doesn't support modifying the rep count,
* and the emulator ensures @count doesn't overflow the buffer.
*/
} else { } else {
int r = __emulator_pio_in(vcpu, size, port, count); int r = __emulator_pio_in(vcpu, size, port, count);
if (!r) if (!r)
@ -7130,7 +7137,6 @@ static int emulator_pio_in(struct kvm_vcpu *vcpu, int size,
/* Results already available, fall through. */ /* Results already available, fall through. */
} }
WARN_ON(count != vcpu->arch.pio.count);
complete_emulator_pio_in(vcpu, val); complete_emulator_pio_in(vcpu, val);
return 1; return 1;
} }

View File

@ -1252,19 +1252,54 @@ st: if (is_imm8(insn->off))
case BPF_LDX | BPF_MEM | BPF_DW: case BPF_LDX | BPF_MEM | BPF_DW:
case BPF_LDX | BPF_PROBE_MEM | BPF_DW: case BPF_LDX | BPF_PROBE_MEM | BPF_DW:
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) { if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
/* test src_reg, src_reg */ /* Though the verifier prevents negative insn->off in BPF_PROBE_MEM
maybe_emit_mod(&prog, src_reg, src_reg, true); /* always 1 byte */ * add abs(insn->off) to the limit to make sure that negative
EMIT2(0x85, add_2reg(0xC0, src_reg, src_reg)); * offset won't be an issue.
/* jne start_of_ldx */ * insn->off is s16, so it won't affect valid pointers.
EMIT2(X86_JNE, 0); */
u64 limit = TASK_SIZE_MAX + PAGE_SIZE + abs(insn->off);
u8 *end_of_jmp1, *end_of_jmp2;
/* Conservatively check that src_reg + insn->off is a kernel address:
* 1. src_reg + insn->off >= limit
* 2. src_reg + insn->off doesn't become small positive.
* Cannot do src_reg + insn->off >= limit in one branch,
* since it needs two spare registers, but JIT has only one.
*/
/* movabsq r11, limit */
EMIT2(add_1mod(0x48, AUX_REG), add_1reg(0xB8, AUX_REG));
EMIT((u32)limit, 4);
EMIT(limit >> 32, 4);
/* cmp src_reg, r11 */
maybe_emit_mod(&prog, src_reg, AUX_REG, true);
EMIT2(0x39, add_2reg(0xC0, src_reg, AUX_REG));
/* if unsigned '<' goto end_of_jmp2 */
EMIT2(X86_JB, 0);
end_of_jmp1 = prog;
/* mov r11, src_reg */
emit_mov_reg(&prog, true, AUX_REG, src_reg);
/* add r11, insn->off */
maybe_emit_1mod(&prog, AUX_REG, true);
EMIT2_off32(0x81, add_1reg(0xC0, AUX_REG), insn->off);
/* jmp if not carry to start_of_ldx
* Otherwise ERR_PTR(-EINVAL) + 128 will be the user addr
* that has to be rejected.
*/
EMIT2(0x73 /* JNC */, 0);
end_of_jmp2 = prog;
/* xor dst_reg, dst_reg */ /* xor dst_reg, dst_reg */
emit_mov_imm32(&prog, false, dst_reg, 0); emit_mov_imm32(&prog, false, dst_reg, 0);
/* jmp byte_after_ldx */ /* jmp byte_after_ldx */
EMIT2(0xEB, 0); EMIT2(0xEB, 0);
/* populate jmp_offset for JNE above */ /* populate jmp_offset for JB above to jump to xor dst_reg */
temp[4] = prog - temp - 5 /* sizeof(test + jne) */; end_of_jmp1[-1] = end_of_jmp2 - end_of_jmp1;
/* populate jmp_offset for JNC above to jump to start_of_ldx */
start_of_ldx = prog; start_of_ldx = prog;
end_of_jmp2[-1] = start_of_ldx - end_of_jmp2;
} }
emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off); emit_ldx(&prog, BPF_SIZE(insn->code), dst_reg, src_reg, insn->off);
if (BPF_MODE(insn->code) == BPF_PROBE_MEM) { if (BPF_MODE(insn->code) == BPF_PROBE_MEM) {
@ -1305,7 +1340,7 @@ st: if (is_imm8(insn->off))
* End result: x86 insn "mov rbx, qword ptr [rax+0x14]" * End result: x86 insn "mov rbx, qword ptr [rax+0x14]"
* of 4 bytes will be ignored and rbx will be zero inited. * of 4 bytes will be ignored and rbx will be zero inited.
*/ */
ex->fixup = (prog - temp) | (reg2pt_regs[dst_reg] << 8); ex->fixup = (prog - start_of_ldx) | (reg2pt_regs[dst_reg] << 8);
} }
break; break;

View File

@ -341,8 +341,7 @@ static ssize_t __blkdev_direct_IO_async(struct kiocb *iocb,
} else { } else {
ret = bio_iov_iter_get_pages(bio, iter); ret = bio_iov_iter_get_pages(bio, iter);
if (unlikely(ret)) { if (unlikely(ret)) {
bio->bi_status = BLK_STS_IOERR; bio_put(bio);
bio_endio(bio);
return ret; return ret;
} }
} }

View File

@ -220,6 +220,7 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
pgrp = task_pgrp(current); pgrp = task_pgrp(current);
else else
pgrp = find_vpid(who); pgrp = find_vpid(who);
read_lock(&tasklist_lock);
do_each_pid_thread(pgrp, PIDTYPE_PGID, p) { do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
tmpio = get_task_ioprio(p); tmpio = get_task_ioprio(p);
if (tmpio < 0) if (tmpio < 0)
@ -229,6 +230,8 @@ SYSCALL_DEFINE2(ioprio_get, int, which, int, who)
else else
ret = ioprio_best(ret, tmpio); ret = ioprio_best(ret, tmpio);
} while_each_pid_thread(pgrp, PIDTYPE_PGID, p); } while_each_pid_thread(pgrp, PIDTYPE_PGID, p);
read_unlock(&tasklist_lock);
break; break;
case IOPRIO_WHO_USER: case IOPRIO_WHO_USER:
uid = make_kuid(current_user_ns(), who); uid = make_kuid(current_user_ns(), who);

View File

@ -41,8 +41,7 @@ obj-$(CONFIG_DMADEVICES) += dma/
# SOC specific infrastructure drivers. # SOC specific infrastructure drivers.
obj-y += soc/ obj-y += soc/
obj-$(CONFIG_VIRTIO) += virtio/ obj-y += virtio/
obj-$(CONFIG_VIRTIO_PCI_LIB) += virtio/
obj-$(CONFIG_VDPA) += vdpa/ obj-$(CONFIG_VDPA) += vdpa/
obj-$(CONFIG_XEN) += xen/ obj-$(CONFIG_XEN) += xen/

View File

@ -4422,23 +4422,20 @@ static int binder_thread_release(struct binder_proc *proc,
__release(&t->lock); __release(&t->lock);
/* /*
* If this thread used poll, make sure we remove the waitqueue * If this thread used poll, make sure we remove the waitqueue from any
* from any epoll data structures holding it with POLLFREE. * poll data structures holding it.
* waitqueue_active() is safe to use here because we're holding
* the inner lock.
*/ */
if ((thread->looper & BINDER_LOOPER_STATE_POLL) && if (thread->looper & BINDER_LOOPER_STATE_POLL)
waitqueue_active(&thread->wait)) { wake_up_pollfree(&thread->wait);
wake_up_poll(&thread->wait, EPOLLHUP | POLLFREE);
}
binder_inner_proc_unlock(thread->proc); binder_inner_proc_unlock(thread->proc);
/* /*
* This is needed to avoid races between wake_up_poll() above and * This is needed to avoid races between wake_up_pollfree() above and
* and ep_remove_waitqueue() called for other reasons (eg the epoll file * someone else removing the last entry from the queue for other reasons
* descriptor being closed); ep_remove_waitqueue() holds an RCU read * (e.g. ep_remove_wait_queue() being called due to an epoll file
* lock, so we can be sure it's done after calling synchronize_rcu(). * descriptor being closed). Such other users hold an RCU read lock, so
* we can be sure they're done after we call synchronize_rcu().
*/ */
if (thread->looper & BINDER_LOOPER_STATE_POLL) if (thread->looper & BINDER_LOOPER_STATE_POLL)
synchronize_rcu(); synchronize_rcu();

View File

@ -94,6 +94,7 @@ struct ceva_ahci_priv {
static unsigned int ceva_ahci_read_id(struct ata_device *dev, static unsigned int ceva_ahci_read_id(struct ata_device *dev,
struct ata_taskfile *tf, u16 *id) struct ata_taskfile *tf, u16 *id)
{ {
__le16 *__id = (__le16 *)id;
u32 err_mask; u32 err_mask;
err_mask = ata_do_dev_read_id(dev, tf, id); err_mask = ata_do_dev_read_id(dev, tf, id);
@ -103,7 +104,7 @@ static unsigned int ceva_ahci_read_id(struct ata_device *dev,
* Since CEVA controller does not support device sleep feature, we * Since CEVA controller does not support device sleep feature, we
* need to clear DEVSLP (bit 8) in word78 of the IDENTIFY DEVICE data. * need to clear DEVSLP (bit 8) in word78 of the IDENTIFY DEVICE data.
*/ */
id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8)); __id[ATA_ID_FEATURE_SUPP] &= cpu_to_le16(~(1 << 8));
return 0; return 0;
} }

View File

@ -3920,6 +3920,8 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "VRFDFC22048UCHC-TE*", NULL, ATA_HORKAGE_NODMA }, { "VRFDFC22048UCHC-TE*", NULL, ATA_HORKAGE_NODMA },
/* Odd clown on sil3726/4726 PMPs */ /* Odd clown on sil3726/4726 PMPs */
{ "Config Disk", NULL, ATA_HORKAGE_DISABLE }, { "Config Disk", NULL, ATA_HORKAGE_DISABLE },
/* Similar story with ASMedia 1092 */
{ "ASMT109x- Config", NULL, ATA_HORKAGE_DISABLE },
/* Weird ATAPI devices */ /* Weird ATAPI devices */
{ "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 }, { "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 },

View File

@ -881,7 +881,7 @@ int mhi_pm_suspend(struct mhi_controller *mhi_cntrl)
} }
EXPORT_SYMBOL_GPL(mhi_pm_suspend); EXPORT_SYMBOL_GPL(mhi_pm_suspend);
int mhi_pm_resume(struct mhi_controller *mhi_cntrl) static int __mhi_pm_resume(struct mhi_controller *mhi_cntrl, bool force)
{ {
struct mhi_chan *itr, *tmp; struct mhi_chan *itr, *tmp;
struct device *dev = &mhi_cntrl->mhi_dev->dev; struct device *dev = &mhi_cntrl->mhi_dev->dev;
@ -898,8 +898,12 @@ int mhi_pm_resume(struct mhi_controller *mhi_cntrl)
if (MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state)) if (MHI_PM_IN_ERROR_STATE(mhi_cntrl->pm_state))
return -EIO; return -EIO;
if (mhi_get_mhi_state(mhi_cntrl) != MHI_STATE_M3) if (mhi_get_mhi_state(mhi_cntrl) != MHI_STATE_M3) {
return -EINVAL; dev_warn(dev, "Resuming from non M3 state (%s)\n",
TO_MHI_STATE_STR(mhi_get_mhi_state(mhi_cntrl)));
if (!force)
return -EINVAL;
}
/* Notify clients about exiting LPM */ /* Notify clients about exiting LPM */
list_for_each_entry_safe(itr, tmp, &mhi_cntrl->lpm_chans, node) { list_for_each_entry_safe(itr, tmp, &mhi_cntrl->lpm_chans, node) {
@ -940,8 +944,19 @@ int mhi_pm_resume(struct mhi_controller *mhi_cntrl)
return 0; return 0;
} }
int mhi_pm_resume(struct mhi_controller *mhi_cntrl)
{
return __mhi_pm_resume(mhi_cntrl, false);
}
EXPORT_SYMBOL_GPL(mhi_pm_resume); EXPORT_SYMBOL_GPL(mhi_pm_resume);
int mhi_pm_resume_force(struct mhi_controller *mhi_cntrl)
{
return __mhi_pm_resume(mhi_cntrl, true);
}
EXPORT_SYMBOL_GPL(mhi_pm_resume_force);
int __mhi_device_get_sync(struct mhi_controller *mhi_cntrl) int __mhi_device_get_sync(struct mhi_controller *mhi_cntrl)
{ {
int ret; int ret;

View File

@ -20,7 +20,7 @@
#define MHI_PCI_DEFAULT_BAR_NUM 0 #define MHI_PCI_DEFAULT_BAR_NUM 0
#define MHI_POST_RESET_DELAY_MS 500 #define MHI_POST_RESET_DELAY_MS 2000
#define HEALTH_CHECK_PERIOD (HZ * 2) #define HEALTH_CHECK_PERIOD (HZ * 2)

View File

@ -3418,6 +3418,14 @@ static int __clk_core_init(struct clk_core *core)
clk_prepare_lock(); clk_prepare_lock();
/*
* Set hw->core after grabbing the prepare_lock to synchronize with
* callers of clk_core_fill_parent_index() where we treat hw->core
* being NULL as the clk not being registered yet. This is crucial so
* that clks aren't parented until their parent is fully registered.
*/
core->hw->core = core;
ret = clk_pm_runtime_get(core); ret = clk_pm_runtime_get(core);
if (ret) if (ret)
goto unlock; goto unlock;
@ -3582,8 +3590,10 @@ static int __clk_core_init(struct clk_core *core)
out: out:
clk_pm_runtime_put(core); clk_pm_runtime_put(core);
unlock: unlock:
if (ret) if (ret) {
hlist_del_init(&core->child_node); hlist_del_init(&core->child_node);
core->hw->core = NULL;
}
clk_prepare_unlock(); clk_prepare_unlock();
@ -3847,7 +3857,6 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
core->num_parents = init->num_parents; core->num_parents = init->num_parents;
core->min_rate = 0; core->min_rate = 0;
core->max_rate = ULONG_MAX; core->max_rate = ULONG_MAX;
hw->core = core;
ret = clk_core_populate_parent_map(core, init); ret = clk_core_populate_parent_map(core, init);
if (ret) if (ret)
@ -3865,7 +3874,7 @@ __clk_register(struct device *dev, struct device_node *np, struct clk_hw *hw)
goto fail_create_clk; goto fail_create_clk;
} }
clk_core_link_consumer(hw->core, hw->clk); clk_core_link_consumer(core, hw->clk);
ret = __clk_core_init(core); ret = __clk_core_init(core);
if (!ret) if (!ret)

View File

@ -370,7 +370,7 @@ static struct platform_driver imx8qxp_lpcg_clk_driver = {
.probe = imx8qxp_lpcg_clk_probe, .probe = imx8qxp_lpcg_clk_probe,
}; };
builtin_platform_driver(imx8qxp_lpcg_clk_driver); module_platform_driver(imx8qxp_lpcg_clk_driver);
MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>"); MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>");
MODULE_DESCRIPTION("NXP i.MX8QXP LPCG clock driver"); MODULE_DESCRIPTION("NXP i.MX8QXP LPCG clock driver");

View File

@ -308,7 +308,7 @@ static struct platform_driver imx8qxp_clk_driver = {
}, },
.probe = imx8qxp_clk_probe, .probe = imx8qxp_clk_probe,
}; };
builtin_platform_driver(imx8qxp_clk_driver); module_platform_driver(imx8qxp_clk_driver);
MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>"); MODULE_AUTHOR("Aisheng Dong <aisheng.dong@nxp.com>");
MODULE_DESCRIPTION("NXP i.MX8QXP clock driver"); MODULE_DESCRIPTION("NXP i.MX8QXP clock driver");

View File

@ -1429,6 +1429,15 @@ EXPORT_SYMBOL_GPL(clk_alpha_pll_postdiv_fabia_ops);
void clk_trion_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap, void clk_trion_pll_configure(struct clk_alpha_pll *pll, struct regmap *regmap,
const struct alpha_pll_config *config) const struct alpha_pll_config *config)
{ {
/*
* If the bootloader left the PLL enabled it's likely that there are
* RCGs that will lock up if we disable the PLL below.
*/
if (trion_pll_is_enabled(pll, regmap)) {
pr_debug("Trion PLL is already enabled, skipping configuration\n");
return;
}
clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l); clk_alpha_pll_write_config(regmap, PLL_L_VAL(pll), config->l);
regmap_write(regmap, PLL_CAL_L_VAL(pll), TRION_PLL_CAL_VAL); regmap_write(regmap, PLL_CAL_L_VAL(pll), TRION_PLL_CAL_VAL);
clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha); clk_alpha_pll_write_config(regmap, PLL_ALPHA_VAL(pll), config->alpha);

View File

@ -28,7 +28,7 @@ static u8 mux_get_parent(struct clk_hw *hw)
val &= mask; val &= mask;
if (mux->parent_map) if (mux->parent_map)
return qcom_find_src_index(hw, mux->parent_map, val); return qcom_find_cfg_index(hw, mux->parent_map, val);
return val; return val;
} }

View File

@ -69,6 +69,18 @@ int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, u8 src)
} }
EXPORT_SYMBOL_GPL(qcom_find_src_index); EXPORT_SYMBOL_GPL(qcom_find_src_index);
int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map, u8 cfg)
{
int i, num_parents = clk_hw_get_num_parents(hw);
for (i = 0; i < num_parents; i++)
if (cfg == map[i].cfg)
return i;
return -ENOENT;
}
EXPORT_SYMBOL_GPL(qcom_find_cfg_index);
struct regmap * struct regmap *
qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc) qcom_cc_map(struct platform_device *pdev, const struct qcom_cc_desc *desc)
{ {

View File

@ -49,6 +49,8 @@ extern void
qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count); qcom_pll_set_fsm_mode(struct regmap *m, u32 reg, u8 bias_count, u8 lock_count);
extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map,
u8 src); u8 src);
extern int qcom_find_cfg_index(struct clk_hw *hw, const struct parent_map *map,
u8 cfg);
extern int qcom_cc_register_board_clk(struct device *dev, const char *path, extern int qcom_cc_register_board_clk(struct device *dev, const char *path,
const char *name, unsigned long rate); const char *name, unsigned long rate);

View File

@ -1121,7 +1121,7 @@ static struct clk_rcg2 gcc_sdcc1_apps_clk_src = {
.name = "gcc_sdcc1_apps_clk_src", .name = "gcc_sdcc1_apps_clk_src",
.parent_data = gcc_parent_data_1, .parent_data = gcc_parent_data_1,
.num_parents = ARRAY_SIZE(gcc_parent_data_1), .num_parents = ARRAY_SIZE(gcc_parent_data_1),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_floor_ops,
}, },
}; };
@ -1143,7 +1143,7 @@ static struct clk_rcg2 gcc_sdcc1_ice_core_clk_src = {
.name = "gcc_sdcc1_ice_core_clk_src", .name = "gcc_sdcc1_ice_core_clk_src",
.parent_data = gcc_parent_data_0, .parent_data = gcc_parent_data_0,
.num_parents = ARRAY_SIZE(gcc_parent_data_0), .num_parents = ARRAY_SIZE(gcc_parent_data_0),
.ops = &clk_rcg2_floor_ops, .ops = &clk_rcg2_ops,
}, },
}; };

View File

@ -543,8 +543,8 @@ static void __init of_syscon_icst_setup(struct device_node *np)
regclk = icst_clk_setup(NULL, &icst_desc, name, parent_name, map, ctype); regclk = icst_clk_setup(NULL, &icst_desc, name, parent_name, map, ctype);
if (IS_ERR(regclk)) { if (IS_ERR(regclk)) {
kfree(name);
pr_err("error setting up syscon ICST clock %s\n", name); pr_err("error setting up syscon ICST clock %s\n", name);
kfree(name);
return; return;
} }
of_clk_add_provider(np, of_clk_src_simple_get, regclk); of_clk_add_provider(np, of_clk_src_simple_get, regclk);

View File

@ -394,8 +394,13 @@ EXPORT_SYMBOL_GPL(timer_unstable_counter_workaround);
static atomic_t timer_unstable_counter_workaround_in_use = ATOMIC_INIT(0); static atomic_t timer_unstable_counter_workaround_in_use = ATOMIC_INIT(0);
static void erratum_set_next_event_generic(const int access, unsigned long evt, /*
struct clock_event_device *clk) * Force the inlining of this function so that the register accesses
* can be themselves correctly inlined.
*/
static __always_inline
void erratum_set_next_event_generic(const int access, unsigned long evt,
struct clock_event_device *clk)
{ {
unsigned long ctrl; unsigned long ctrl;
u64 cval; u64 cval;

View File

@ -47,7 +47,7 @@ static int __init timer_get_base_and_rate(struct device_node *np,
pr_warn("pclk for %pOFn is present, but could not be activated\n", pr_warn("pclk for %pOFn is present, but could not be activated\n",
np); np);
if (!of_property_read_u32(np, "clock-freq", rate) && if (!of_property_read_u32(np, "clock-freq", rate) ||
!of_property_read_u32(np, "clock-frequency", rate)) !of_property_read_u32(np, "clock-frequency", rate))
return 0; return 0;

View File

@ -16,7 +16,6 @@ struct scpi_pm_domain {
struct generic_pm_domain genpd; struct generic_pm_domain genpd;
struct scpi_ops *ops; struct scpi_ops *ops;
u32 domain; u32 domain;
char name[30];
}; };
/* /*
@ -110,8 +109,13 @@ static int scpi_pm_domain_probe(struct platform_device *pdev)
scpi_pd->domain = i; scpi_pd->domain = i;
scpi_pd->ops = scpi_ops; scpi_pd->ops = scpi_ops;
sprintf(scpi_pd->name, "%pOFn.%d", np, i); scpi_pd->genpd.name = devm_kasprintf(dev, GFP_KERNEL,
scpi_pd->genpd.name = scpi_pd->name; "%pOFn.%d", np, i);
if (!scpi_pd->genpd.name) {
dev_err(dev, "Failed to allocate genpd name:%pOFn.%d\n",
np, i);
continue;
}
scpi_pd->genpd.power_off = scpi_pd_power_off; scpi_pd->genpd.power_off = scpi_pd_power_off;
scpi_pd->genpd.power_on = scpi_pd_power_on; scpi_pd->genpd.power_on = scpi_pd_power_on;

View File

@ -77,13 +77,14 @@ static const char *get_filename(struct tegra_bpmp *bpmp,
const char *root_path, *filename = NULL; const char *root_path, *filename = NULL;
char *root_path_buf; char *root_path_buf;
size_t root_len; size_t root_len;
size_t root_path_buf_len = 512;
root_path_buf = kzalloc(512, GFP_KERNEL); root_path_buf = kzalloc(root_path_buf_len, GFP_KERNEL);
if (!root_path_buf) if (!root_path_buf)
goto out; goto out;
root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf, root_path = dentry_path(bpmp->debugfs_mirror, root_path_buf,
sizeof(root_path_buf)); root_path_buf_len);
if (IS_ERR(root_path)) if (IS_ERR(root_path))
goto out; goto out;

View File

@ -2576,7 +2576,8 @@ static int dm_resume(void *handle)
*/ */
link_enc_cfg_init(dm->dc, dc_state); link_enc_cfg_init(dm->dc, dc_state);
amdgpu_dm_outbox_init(adev); if (dc_enable_dmub_notifications(adev->dm.dc))
amdgpu_dm_outbox_init(adev);
r = dm_dmub_hw_init(adev); r = dm_dmub_hw_init(adev);
if (r) if (r)
@ -2625,6 +2626,10 @@ static int dm_resume(void *handle)
/* TODO: Remove dc_state->dccg, use dc->dccg directly. */ /* TODO: Remove dc_state->dccg, use dc->dccg directly. */
dc_resource_state_construct(dm->dc, dm_state->context); dc_resource_state_construct(dm->dc, dm_state->context);
/* Re-enable outbox interrupts for DPIA. */
if (dc_enable_dmub_notifications(adev->dm.dc))
amdgpu_dm_outbox_init(adev);
/* Before powering on DC we need to re-initialize DMUB. */ /* Before powering on DC we need to re-initialize DMUB. */
r = dm_dmub_hw_init(adev); r = dm_dmub_hw_init(adev);
if (r) if (r)

View File

@ -226,6 +226,8 @@ static inline void get_edp_links(const struct dc *dc,
*edp_num = 0; *edp_num = 0;
for (i = 0; i < dc->link_count; i++) { for (i = 0; i < dc->link_count; i++) {
// report any eDP links, even unconnected DDI's // report any eDP links, even unconnected DDI's
if (!dc->links[i])
continue;
if (dc->links[i]->connector_signal == SIGNAL_TYPE_EDP) { if (dc->links[i]->connector_signal == SIGNAL_TYPE_EDP) {
edp_links[*edp_num] = dc->links[i]; edp_links[*edp_num] = dc->links[i];
if (++(*edp_num) == MAX_NUM_EDP) if (++(*edp_num) == MAX_NUM_EDP)

View File

@ -404,8 +404,17 @@ int drm_syncobj_find_fence(struct drm_file *file_private,
if (*fence) { if (*fence) {
ret = dma_fence_chain_find_seqno(fence, point); ret = dma_fence_chain_find_seqno(fence, point);
if (!ret) if (!ret) {
/* If the requested seqno is already signaled
* drm_syncobj_find_fence may return a NULL
* fence. To make sure the recipient gets
* signalled, use a new fence instead.
*/
if (!*fence)
*fence = dma_fence_get_stub();
goto out; goto out;
}
dma_fence_put(*fence); dma_fence_put(*fence);
} else { } else {
ret = -EINVAL; ret = -EINVAL;

View File

@ -3277,6 +3277,7 @@ i915_gem_do_execbuffer(struct drm_device *dev,
out_fence = eb_requests_create(&eb, in_fence, out_fence_fd); out_fence = eb_requests_create(&eb, in_fence, out_fence_fd);
if (IS_ERR(out_fence)) { if (IS_ERR(out_fence)) {
err = PTR_ERR(out_fence); err = PTR_ERR(out_fence);
out_fence = NULL;
if (eb.requests[0]) if (eb.requests[0])
goto err_request; goto err_request;
else else

View File

@ -1127,6 +1127,15 @@ icl_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
GAMT_CHKN_BIT_REG, GAMT_CHKN_BIT_REG,
GAMT_CHKN_DISABLE_L3_COH_PIPE); GAMT_CHKN_DISABLE_L3_COH_PIPE);
/* Wa_1407352427:icl,ehl */
wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2,
PSDUNIT_CLKGATE_DIS);
/* Wa_1406680159:icl,ehl */
wa_write_or(wal,
SUBSLICE_UNIT_LEVEL_CLKGATE,
GWUNIT_CLKGATE_DIS);
/* Wa_1607087056:icl,ehl,jsl */ /* Wa_1607087056:icl,ehl,jsl */
if (IS_ICELAKE(i915) || if (IS_ICELAKE(i915) ||
IS_JSL_EHL_GT_STEP(i915, STEP_A0, STEP_B0)) IS_JSL_EHL_GT_STEP(i915, STEP_A0, STEP_B0))
@ -1852,15 +1861,6 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)
wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE, wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE,
VSUNIT_CLKGATE_DIS | HSUNIT_CLKGATE_DIS); VSUNIT_CLKGATE_DIS | HSUNIT_CLKGATE_DIS);
/* Wa_1407352427:icl,ehl */
wa_write_or(wal, UNSLICE_UNIT_LEVEL_CLKGATE2,
PSDUNIT_CLKGATE_DIS);
/* Wa_1406680159:icl,ehl */
wa_write_or(wal,
SUBSLICE_UNIT_LEVEL_CLKGATE,
GWUNIT_CLKGATE_DIS);
/* /*
* Wa_1408767742:icl[a2..forever],ehl[all] * Wa_1408767742:icl[a2..forever],ehl[all]
* Wa_1605460711:icl[a0..c0] * Wa_1605460711:icl[a0..c0]

View File

@ -1103,7 +1103,7 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
* as an indication that we're about to swap out. * as an indication that we're about to swap out.
*/ */
memset(&place, 0, sizeof(place)); memset(&place, 0, sizeof(place));
place.mem_type = TTM_PL_SYSTEM; place.mem_type = bo->resource->mem_type;
if (!ttm_bo_evict_swapout_allowable(bo, ctx, &place, &locked, NULL)) if (!ttm_bo_evict_swapout_allowable(bo, ctx, &place, &locked, NULL))
return -EBUSY; return -EBUSY;
@ -1135,6 +1135,7 @@ int ttm_bo_swapout(struct ttm_buffer_object *bo, struct ttm_operation_ctx *ctx,
struct ttm_place hop; struct ttm_place hop;
memset(&hop, 0, sizeof(hop)); memset(&hop, 0, sizeof(hop));
place.mem_type = TTM_PL_SYSTEM;
ret = ttm_resource_alloc(bo, &place, &evict_mem); ret = ttm_resource_alloc(bo, &place, &evict_mem);
if (unlikely(ret)) if (unlikely(ret))
goto out; goto out;

View File

@ -19,6 +19,7 @@ config HYPERV_TIMER
config HYPERV_UTILS config HYPERV_UTILS
tristate "Microsoft Hyper-V Utilities driver" tristate "Microsoft Hyper-V Utilities driver"
depends on HYPERV && CONNECTOR && NLS depends on HYPERV && CONNECTOR && NLS
depends on PTP_1588_CLOCK_OPTIONAL
help help
Select this option to enable the Hyper-V Utilities. Select this option to enable the Hyper-V Utilities.

View File

@ -729,7 +729,7 @@ static int corsairpsu_probe(struct hid_device *hdev, const struct hid_device_id
corsairpsu_check_cmd_support(priv); corsairpsu_check_cmd_support(priv);
priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv, priv->hwmon_dev = hwmon_device_register_with_info(&hdev->dev, "corsairpsu", priv,
&corsairpsu_chip_info, 0); &corsairpsu_chip_info, NULL);
if (IS_ERR(priv->hwmon_dev)) { if (IS_ERR(priv->hwmon_dev)) {
ret = PTR_ERR(priv->hwmon_dev); ret = PTR_ERR(priv->hwmon_dev);

View File

@ -627,10 +627,9 @@ static void __init i8k_init_procfs(struct device *dev)
{ {
struct dell_smm_data *data = dev_get_drvdata(dev); struct dell_smm_data *data = dev_get_drvdata(dev);
/* Register the proc entry */ /* Only register exit function if creation was successful */
proc_create_data("i8k", 0, NULL, &i8k_proc_ops, data); if (proc_create_data("i8k", 0, NULL, &i8k_proc_ops, data))
devm_add_action_or_reset(dev, i8k_exit_procfs, NULL);
devm_add_action_or_reset(dev, i8k_exit_procfs, NULL);
} }
#else #else

View File

@ -1527,7 +1527,7 @@ static u16 nct6775_wmi_read_value(struct nct6775_data *data, u16 reg)
nct6775_wmi_set_bank(data, reg); nct6775_wmi_set_bank(data, reg);
err = nct6775_asuswmi_read(data->bank, reg, &tmp); err = nct6775_asuswmi_read(data->bank, reg & 0xff, &tmp);
if (err) if (err)
return 0; return 0;

View File

@ -336,8 +336,6 @@ static int pwm_fan_probe(struct platform_device *pdev)
return ret; return ret;
} }
ctx->pwm_value = MAX_PWM;
pwm_init_state(ctx->pwm, &ctx->pwm_state); pwm_init_state(ctx->pwm, &ctx->pwm_state);
/* /*

View File

@ -23,7 +23,7 @@
/* /*
* I2C command delays (in microseconds) * I2C command delays (in microseconds)
*/ */
#define SHT4X_MEAS_DELAY 1000 #define SHT4X_MEAS_DELAY_HPM 8200 /* see t_MEAS,h in datasheet */
#define SHT4X_DELAY_EXTRA 10000 #define SHT4X_DELAY_EXTRA 10000
/* /*
@ -90,7 +90,7 @@ static int sht4x_read_values(struct sht4x_data *data)
if (ret < 0) if (ret < 0)
goto unlock; goto unlock;
usleep_range(SHT4X_MEAS_DELAY, SHT4X_MEAS_DELAY + SHT4X_DELAY_EXTRA); usleep_range(SHT4X_MEAS_DELAY_HPM, SHT4X_MEAS_DELAY_HPM + SHT4X_DELAY_EXTRA);
ret = i2c_master_recv(client, raw_data, SHT4X_RESPONSE_LENGTH); ret = i2c_master_recv(client, raw_data, SHT4X_RESPONSE_LENGTH);
if (ret != SHT4X_RESPONSE_LENGTH) { if (ret != SHT4X_RESPONSE_LENGTH) {

View File

@ -636,7 +636,7 @@ static irqreturn_t mpc_i2c_isr(int irq, void *dev_id)
status = readb(i2c->base + MPC_I2C_SR); status = readb(i2c->base + MPC_I2C_SR);
if (status & CSR_MIF) { if (status & CSR_MIF) {
/* Wait up to 100us for transfer to properly complete */ /* Wait up to 100us for transfer to properly complete */
readb_poll_timeout(i2c->base + MPC_I2C_SR, status, !(status & CSR_MCF), 0, 100); readb_poll_timeout_atomic(i2c->base + MPC_I2C_SR, status, status & CSR_MCF, 0, 100);
writeb(0, i2c->base + MPC_I2C_SR); writeb(0, i2c->base + MPC_I2C_SR);
mpc_i2c_do_intr(i2c, status); mpc_i2c_do_intr(i2c, status);
return IRQ_HANDLED; return IRQ_HANDLED;

View File

@ -22,24 +22,24 @@
/** /**
* struct virtio_i2c - virtio I2C data * struct virtio_i2c - virtio I2C data
* @vdev: virtio device for this controller * @vdev: virtio device for this controller
* @completion: completion of virtio I2C message
* @adap: I2C adapter for this controller * @adap: I2C adapter for this controller
* @vq: the virtio virtqueue for communication * @vq: the virtio virtqueue for communication
*/ */
struct virtio_i2c { struct virtio_i2c {
struct virtio_device *vdev; struct virtio_device *vdev;
struct completion completion;
struct i2c_adapter adap; struct i2c_adapter adap;
struct virtqueue *vq; struct virtqueue *vq;
}; };
/** /**
* struct virtio_i2c_req - the virtio I2C request structure * struct virtio_i2c_req - the virtio I2C request structure
* @completion: completion of virtio I2C message
* @out_hdr: the OUT header of the virtio I2C message * @out_hdr: the OUT header of the virtio I2C message
* @buf: the buffer into which data is read, or from which it's written * @buf: the buffer into which data is read, or from which it's written
* @in_hdr: the IN header of the virtio I2C message * @in_hdr: the IN header of the virtio I2C message
*/ */
struct virtio_i2c_req { struct virtio_i2c_req {
struct completion completion;
struct virtio_i2c_out_hdr out_hdr ____cacheline_aligned; struct virtio_i2c_out_hdr out_hdr ____cacheline_aligned;
uint8_t *buf ____cacheline_aligned; uint8_t *buf ____cacheline_aligned;
struct virtio_i2c_in_hdr in_hdr ____cacheline_aligned; struct virtio_i2c_in_hdr in_hdr ____cacheline_aligned;
@ -47,9 +47,11 @@ struct virtio_i2c_req {
static void virtio_i2c_msg_done(struct virtqueue *vq) static void virtio_i2c_msg_done(struct virtqueue *vq)
{ {
struct virtio_i2c *vi = vq->vdev->priv; struct virtio_i2c_req *req;
unsigned int len;
complete(&vi->completion); while ((req = virtqueue_get_buf(vq, &len)))
complete(&req->completion);
} }
static int virtio_i2c_prepare_reqs(struct virtqueue *vq, static int virtio_i2c_prepare_reqs(struct virtqueue *vq,
@ -62,6 +64,8 @@ static int virtio_i2c_prepare_reqs(struct virtqueue *vq,
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
int outcnt = 0, incnt = 0; int outcnt = 0, incnt = 0;
init_completion(&reqs[i].completion);
/* /*
* Only 7-bit mode supported for this moment. For the address * Only 7-bit mode supported for this moment. For the address
* format, Please check the Virtio I2C Specification. * format, Please check the Virtio I2C Specification.
@ -106,21 +110,15 @@ static int virtio_i2c_complete_reqs(struct virtqueue *vq,
struct virtio_i2c_req *reqs, struct virtio_i2c_req *reqs,
struct i2c_msg *msgs, int num) struct i2c_msg *msgs, int num)
{ {
struct virtio_i2c_req *req;
bool failed = false; bool failed = false;
unsigned int len;
int i, j = 0; int i, j = 0;
for (i = 0; i < num; i++) { for (i = 0; i < num; i++) {
/* Detach the ith request from the vq */ struct virtio_i2c_req *req = &reqs[i];
req = virtqueue_get_buf(vq, &len);
/* wait_for_completion(&req->completion);
* Condition req == &reqs[i] should always meet since we have
* total num requests in the vq. reqs[i] can never be NULL here. if (!failed && req->in_hdr.status != VIRTIO_I2C_MSG_OK)
*/
if (!failed && (WARN_ON(req != &reqs[i]) ||
req->in_hdr.status != VIRTIO_I2C_MSG_OK))
failed = true; failed = true;
i2c_put_dma_safe_msg_buf(reqs[i].buf, &msgs[i], !failed); i2c_put_dma_safe_msg_buf(reqs[i].buf, &msgs[i], !failed);
@ -156,12 +154,8 @@ static int virtio_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
* remote here to clear the virtqueue, so we can try another set of * remote here to clear the virtqueue, so we can try another set of
* messages later on. * messages later on.
*/ */
reinit_completion(&vi->completion);
virtqueue_kick(vq); virtqueue_kick(vq);
wait_for_completion(&vi->completion);
count = virtio_i2c_complete_reqs(vq, reqs, msgs, count); count = virtio_i2c_complete_reqs(vq, reqs, msgs, count);
err_free: err_free:
@ -210,8 +204,6 @@ static int virtio_i2c_probe(struct virtio_device *vdev)
vdev->priv = vi; vdev->priv = vi;
vi->vdev = vdev; vi->vdev = vdev;
init_completion(&vi->completion);
ret = virtio_i2c_setup_vqs(vi); ret = virtio_i2c_setup_vqs(vi);
if (ret) if (ret)
return ret; return ret;

View File

@ -1595,8 +1595,7 @@ static int kxcjk1013_probe(struct i2c_client *client,
return 0; return 0;
err_buffer_cleanup: err_buffer_cleanup:
if (data->dready_trig) iio_triggered_buffer_cleanup(indio_dev);
iio_triggered_buffer_cleanup(indio_dev);
err_trigger_unregister: err_trigger_unregister:
if (data->dready_trig) if (data->dready_trig)
iio_trigger_unregister(data->dready_trig); iio_trigger_unregister(data->dready_trig);
@ -1618,8 +1617,8 @@ static int kxcjk1013_remove(struct i2c_client *client)
pm_runtime_disable(&client->dev); pm_runtime_disable(&client->dev);
pm_runtime_set_suspended(&client->dev); pm_runtime_set_suspended(&client->dev);
iio_triggered_buffer_cleanup(indio_dev);
if (data->dready_trig) { if (data->dready_trig) {
iio_triggered_buffer_cleanup(indio_dev);
iio_trigger_unregister(data->dready_trig); iio_trigger_unregister(data->dready_trig);
iio_trigger_unregister(data->motion_trig); iio_trigger_unregister(data->motion_trig);
} }

View File

@ -224,14 +224,14 @@ static irqreturn_t kxsd9_trigger_handler(int irq, void *p)
hw_values.chan, hw_values.chan,
sizeof(hw_values.chan)); sizeof(hw_values.chan));
if (ret) { if (ret) {
dev_err(st->dev, dev_err(st->dev, "error reading data: %d\n", ret);
"error reading data\n"); goto out;
return ret;
} }
iio_push_to_buffers_with_timestamp(indio_dev, iio_push_to_buffers_with_timestamp(indio_dev,
&hw_values, &hw_values,
iio_get_time_ns(indio_dev)); iio_get_time_ns(indio_dev));
out:
iio_trigger_notify_done(indio_dev->trig); iio_trigger_notify_done(indio_dev->trig);
return IRQ_HANDLED; return IRQ_HANDLED;

View File

@ -1470,7 +1470,7 @@ static int mma8452_trigger_setup(struct iio_dev *indio_dev)
if (ret) if (ret)
return ret; return ret;
indio_dev->trig = trig; indio_dev->trig = iio_trigger_get(trig);
return 0; return 0;
} }

View File

@ -532,7 +532,7 @@ config IMX7D_ADC
config IMX8QXP_ADC config IMX8QXP_ADC
tristate "NXP IMX8QXP ADC driver" tristate "NXP IMX8QXP ADC driver"
depends on ARCH_MXC_ARM64 || COMPILE_TEST depends on ARCH_MXC || COMPILE_TEST
depends on HAS_IOMEM depends on HAS_IOMEM
help help
Say yes here to build support for IMX8QXP ADC. Say yes here to build support for IMX8QXP ADC.

View File

@ -480,8 +480,8 @@ static irqreturn_t ad7768_trigger_handler(int irq, void *p)
iio_push_to_buffers_with_timestamp(indio_dev, &st->data.scan, iio_push_to_buffers_with_timestamp(indio_dev, &st->data.scan,
iio_get_time_ns(indio_dev)); iio_get_time_ns(indio_dev));
iio_trigger_notify_done(indio_dev->trig);
err_unlock: err_unlock:
iio_trigger_notify_done(indio_dev->trig);
mutex_unlock(&st->lock); mutex_unlock(&st->lock);
return IRQ_HANDLED; return IRQ_HANDLED;

View File

@ -1586,7 +1586,8 @@ static int at91_adc_read_info_raw(struct iio_dev *indio_dev,
*val = st->conversion_value; *val = st->conversion_value;
ret = at91_adc_adjust_val_osr(st, val); ret = at91_adc_adjust_val_osr(st, val);
if (chan->scan_type.sign == 's') if (chan->scan_type.sign == 's')
*val = sign_extend32(*val, 11); *val = sign_extend32(*val,
chan->scan_type.realbits - 1);
st->conversion_done = false; st->conversion_done = false;
} }

View File

@ -251,19 +251,8 @@ static int axp22x_adc_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val) struct iio_chan_spec const *chan, int *val)
{ {
struct axp20x_adc_iio *info = iio_priv(indio_dev); struct axp20x_adc_iio *info = iio_priv(indio_dev);
int size;
/* *val = axp20x_read_variable_width(info->regmap, chan->address, 12);
* N.B.: Unlike the Chinese datasheets tell, the charging current is
* stored on 12 bits, not 13 bits. Only discharging current is on 13
* bits.
*/
if (chan->type == IIO_CURRENT && chan->channel == AXP22X_BATT_DISCHRG_I)
size = 13;
else
size = 12;
*val = axp20x_read_variable_width(info->regmap, chan->address, size);
if (*val < 0) if (*val < 0)
return *val; return *val;
@ -386,9 +375,8 @@ static int axp22x_adc_scale(struct iio_chan_spec const *chan, int *val,
return IIO_VAL_INT_PLUS_MICRO; return IIO_VAL_INT_PLUS_MICRO;
case IIO_CURRENT: case IIO_CURRENT:
*val = 0; *val = 1;
*val2 = 500000; return IIO_VAL_INT;
return IIO_VAL_INT_PLUS_MICRO;
case IIO_TEMP: case IIO_TEMP:
*val = 100; *val = 100;

View File

@ -248,7 +248,6 @@ static int dln2_adc_set_chan_period(struct dln2_adc *dln2,
static int dln2_adc_read(struct dln2_adc *dln2, unsigned int channel) static int dln2_adc_read(struct dln2_adc *dln2, unsigned int channel)
{ {
int ret, i; int ret, i;
struct iio_dev *indio_dev = platform_get_drvdata(dln2->pdev);
u16 conflict; u16 conflict;
__le16 value; __le16 value;
int olen = sizeof(value); int olen = sizeof(value);
@ -257,13 +256,9 @@ static int dln2_adc_read(struct dln2_adc *dln2, unsigned int channel)
.chan = channel, .chan = channel,
}; };
ret = iio_device_claim_direct_mode(indio_dev);
if (ret < 0)
return ret;
ret = dln2_adc_set_chan_enabled(dln2, channel, true); ret = dln2_adc_set_chan_enabled(dln2, channel, true);
if (ret < 0) if (ret < 0)
goto release_direct; return ret;
ret = dln2_adc_set_port_enabled(dln2, true, &conflict); ret = dln2_adc_set_port_enabled(dln2, true, &conflict);
if (ret < 0) { if (ret < 0) {
@ -300,8 +295,6 @@ disable_port:
dln2_adc_set_port_enabled(dln2, false, NULL); dln2_adc_set_port_enabled(dln2, false, NULL);
disable_chan: disable_chan:
dln2_adc_set_chan_enabled(dln2, channel, false); dln2_adc_set_chan_enabled(dln2, channel, false);
release_direct:
iio_device_release_direct_mode(indio_dev);
return ret; return ret;
} }
@ -337,10 +330,16 @@ static int dln2_adc_read_raw(struct iio_dev *indio_dev,
switch (mask) { switch (mask) {
case IIO_CHAN_INFO_RAW: case IIO_CHAN_INFO_RAW:
ret = iio_device_claim_direct_mode(indio_dev);
if (ret < 0)
return ret;
mutex_lock(&dln2->mutex); mutex_lock(&dln2->mutex);
ret = dln2_adc_read(dln2, chan->channel); ret = dln2_adc_read(dln2, chan->channel);
mutex_unlock(&dln2->mutex); mutex_unlock(&dln2->mutex);
iio_device_release_direct_mode(indio_dev);
if (ret < 0) if (ret < 0)
return ret; return ret;
@ -656,7 +655,11 @@ static int dln2_adc_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
iio_trigger_set_drvdata(dln2->trig, dln2); iio_trigger_set_drvdata(dln2->trig, dln2);
devm_iio_trigger_register(dev, dln2->trig); ret = devm_iio_trigger_register(dev, dln2->trig);
if (ret) {
dev_err(dev, "failed to register trigger: %d\n", ret);
return ret;
}
iio_trigger_set_immutable(indio_dev, dln2->trig); iio_trigger_set_immutable(indio_dev, dln2->trig);
ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL, ret = devm_iio_triggered_buffer_setup(dev, indio_dev, NULL,

View File

@ -1117,6 +1117,7 @@ static void stm32h7_adc_unprepare(struct iio_dev *indio_dev)
{ {
struct stm32_adc *adc = iio_priv(indio_dev); struct stm32_adc *adc = iio_priv(indio_dev);
stm32_adc_writel(adc, STM32H7_ADC_PCSEL, 0);
stm32h7_adc_disable(indio_dev); stm32h7_adc_disable(indio_dev);
stm32_adc_int_ch_disable(adc); stm32_adc_int_ch_disable(adc);
stm32h7_adc_enter_pwr_down(adc); stm32h7_adc_enter_pwr_down(adc);
@ -1986,7 +1987,7 @@ static int stm32_adc_populate_int_ch(struct iio_dev *indio_dev, const char *ch_n
/* Get calibration data for vrefint channel */ /* Get calibration data for vrefint channel */
ret = nvmem_cell_read_u16(&indio_dev->dev, "vrefint", &vrefint); ret = nvmem_cell_read_u16(&indio_dev->dev, "vrefint", &vrefint);
if (ret && ret != -ENOENT) { if (ret && ret != -ENOENT) {
return dev_err_probe(&indio_dev->dev, ret, return dev_err_probe(indio_dev->dev.parent, ret,
"nvmem access error\n"); "nvmem access error\n");
} }
if (ret == -ENOENT) if (ret == -ENOENT)

View File

@ -7,6 +7,7 @@
*/ */
#include <linux/bitfield.h> #include <linux/bitfield.h>
#include <linux/bitops.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/kernel.h> #include <linux/kernel.h>
@ -124,7 +125,7 @@ static int adxrs290_get_rate_data(struct iio_dev *indio_dev, const u8 cmd, int *
goto err_unlock; goto err_unlock;
} }
*val = temp; *val = sign_extend32(temp, 15);
err_unlock: err_unlock:
mutex_unlock(&st->lock); mutex_unlock(&st->lock);
@ -146,7 +147,7 @@ static int adxrs290_get_temp_data(struct iio_dev *indio_dev, int *val)
} }
/* extract lower 12 bits temperature reading */ /* extract lower 12 bits temperature reading */
*val = temp & 0x0FFF; *val = sign_extend32(temp, 11);
err_unlock: err_unlock:
mutex_unlock(&st->lock); mutex_unlock(&st->lock);

View File

@ -61,9 +61,9 @@ static irqreturn_t itg3200_trigger_handler(int irq, void *p)
iio_push_to_buffers_with_timestamp(indio_dev, &scan, pf->timestamp); iio_push_to_buffers_with_timestamp(indio_dev, &scan, pf->timestamp);
error_ret:
iio_trigger_notify_done(indio_dev->trig); iio_trigger_notify_done(indio_dev->trig);
error_ret:
return IRQ_HANDLED; return IRQ_HANDLED;
} }

View File

@ -556,7 +556,6 @@ struct iio_trigger *viio_trigger_alloc(struct device *parent,
irq_modify_status(trig->subirq_base + i, irq_modify_status(trig->subirq_base + i,
IRQ_NOREQUEST | IRQ_NOAUTOEN, IRQ_NOPROBE); IRQ_NOREQUEST | IRQ_NOAUTOEN, IRQ_NOPROBE);
} }
get_device(&trig->dev);
return trig; return trig;

View File

@ -1275,7 +1275,7 @@ static irqreturn_t ltr501_trigger_handler(int irq, void *p)
ret = regmap_bulk_read(data->regmap, LTR501_ALS_DATA1, ret = regmap_bulk_read(data->regmap, LTR501_ALS_DATA1,
als_buf, sizeof(als_buf)); als_buf, sizeof(als_buf));
if (ret < 0) if (ret < 0)
return ret; goto done;
if (test_bit(0, indio_dev->active_scan_mask)) if (test_bit(0, indio_dev->active_scan_mask))
scan.channels[j++] = le16_to_cpu(als_buf[1]); scan.channels[j++] = le16_to_cpu(als_buf[1]);
if (test_bit(1, indio_dev->active_scan_mask)) if (test_bit(1, indio_dev->active_scan_mask))

View File

@ -546,9 +546,8 @@ static irqreturn_t stk3310_irq_event_handler(int irq, void *private)
mutex_lock(&data->lock); mutex_lock(&data->lock);
ret = regmap_field_read(data->reg_flag_nf, &dir); ret = regmap_field_read(data->reg_flag_nf, &dir);
if (ret < 0) { if (ret < 0) {
dev_err(&data->client->dev, "register read failed\n"); dev_err(&data->client->dev, "register read failed: %d\n", ret);
mutex_unlock(&data->lock); goto out;
return ret;
} }
event = IIO_UNMOD_EVENT_CODE(IIO_PROXIMITY, 1, event = IIO_UNMOD_EVENT_CODE(IIO_PROXIMITY, 1,
IIO_EV_TYPE_THRESH, IIO_EV_TYPE_THRESH,
@ -560,6 +559,7 @@ static irqreturn_t stk3310_irq_event_handler(int irq, void *private)
ret = regmap_field_write(data->reg_flag_psint, 0); ret = regmap_field_write(data->reg_flag_psint, 0);
if (ret < 0) if (ret < 0)
dev_err(&data->client->dev, "failed to reset interrupts\n"); dev_err(&data->client->dev, "failed to reset interrupts\n");
out:
mutex_unlock(&data->lock); mutex_unlock(&data->lock);
return IRQ_HANDLED; return IRQ_HANDLED;

View File

@ -912,6 +912,6 @@ static struct platform_driver stm32_timer_trigger_driver = {
}; };
module_platform_driver(stm32_timer_trigger_driver); module_platform_driver(stm32_timer_trigger_driver);
MODULE_ALIAS("platform: stm32-timer-trigger"); MODULE_ALIAS("platform:stm32-timer-trigger");
MODULE_DESCRIPTION("STMicroelectronics STM32 Timer Trigger driver"); MODULE_DESCRIPTION("STMicroelectronics STM32 Timer Trigger driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");

View File

@ -8415,6 +8415,8 @@ static void receive_interrupt_common(struct hfi1_ctxtdata *rcd)
*/ */
static void __hfi1_rcd_eoi_intr(struct hfi1_ctxtdata *rcd) static void __hfi1_rcd_eoi_intr(struct hfi1_ctxtdata *rcd)
{ {
if (!rcd->rcvhdrq)
return;
clear_recv_intr(rcd); clear_recv_intr(rcd);
if (check_packet_present(rcd)) if (check_packet_present(rcd))
force_recv_intr(rcd); force_recv_intr(rcd);

View File

@ -1012,6 +1012,8 @@ int handle_receive_interrupt(struct hfi1_ctxtdata *rcd, int thread)
struct hfi1_packet packet; struct hfi1_packet packet;
int skip_pkt = 0; int skip_pkt = 0;
if (!rcd->rcvhdrq)
return RCV_PKT_OK;
/* Control context will always use the slow path interrupt handler */ /* Control context will always use the slow path interrupt handler */
needset = (rcd->ctxt == HFI1_CTRL_CTXT) ? 0 : 1; needset = (rcd->ctxt == HFI1_CTRL_CTXT) ? 0 : 1;

Some files were not shown because too many files have changed in this diff Show More