* [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling
@ 2023-06-16 10:24 Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 02/30] arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW Sasha Levin
` (28 more replies)
0 siblings, 29 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hans de Goede, Dmitry Torokhov, Sasha Levin, linux-input
From: Hans de Goede <hdegoede@redhat.com>
[ Upstream commit 20a99a291d564a559cc2fd013b4824a3bb3f1db7 ]
Some devices have a wrong entry in their button array which points to
a GPIO which is required in another driver, so soc_button_array must
not claim it.
A specific example of this is the Lenovo Yoga Book X90F / X90L,
where the PNP0C40 home button entry points to a GPIO which is not
a home button and which is required by the lenovo-yogabook driver.
Add a DMI quirk table which can specify an ACPI GPIO resource index which
should be skipped; and add an entry for the Lenovo Yoga Book X90F / X90L
to this new DMI quirk table.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230414072116.4497-1-hdegoede@redhat.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/input/misc/soc_button_array.c | 30 +++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c
index 09489380afda7..e79f5497948b8 100644
--- a/drivers/input/misc/soc_button_array.c
+++ b/drivers/input/misc/soc_button_array.c
@@ -108,6 +108,27 @@ static const struct dmi_system_id dmi_use_low_level_irq[] = {
{} /* Terminating entry */
};
+/*
+ * Some devices have a wrong entry which points to a GPIO which is
+ * required in another driver, so this driver must not claim it.
+ */
+static const struct dmi_system_id dmi_invalid_acpi_index[] = {
+ {
+ /*
+ * Lenovo Yoga Book X90F / X90L, the PNP0C40 home button entry
+ * points to a GPIO which is not a home button and which is
+ * required by the lenovo-yogabook driver.
+ */
+ .matches = {
+ DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
+ DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
+ },
+ .driver_data = (void *)1l,
+ },
+ {} /* Terminating entry */
+};
+
/*
* Get the Nth GPIO number from the ACPI object.
*/
@@ -137,6 +158,8 @@ soc_button_device_create(struct platform_device *pdev,
struct platform_device *pd;
struct gpio_keys_button *gpio_keys;
struct gpio_keys_platform_data *gpio_keys_pdata;
+ const struct dmi_system_id *dmi_id;
+ int invalid_acpi_index = -1;
int error, gpio, irq;
int n_buttons = 0;
@@ -154,10 +177,17 @@ soc_button_device_create(struct platform_device *pdev,
gpio_keys = (void *)(gpio_keys_pdata + 1);
n_buttons = 0;
+ dmi_id = dmi_first_match(dmi_invalid_acpi_index);
+ if (dmi_id)
+ invalid_acpi_index = (long)dmi_id->driver_data;
+
for (info = button_info; info->name; info++) {
if (info->autorepeat != autorepeat)
continue;
+ if (info->acpi_index == invalid_acpi_index)
+ continue;
+
error = soc_button_lookup_gpio(&pdev->dev, info->acpi_index, &gpio, &irq);
if (error || irq < 0) {
/*
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 02/30] arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 03/30] arm64: dts: qcom: sc7280-qcard: " Sasha Levin
` (27 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Krzysztof Kozlowski, Douglas Anderson, Konrad Dybcio,
Bjorn Andersson, Sasha Levin, agross, robh+dt,
krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[ Upstream commit ca8fc6814844d8787e7fec61b2544a871ea8b675 ]
The WCD938x audio codec Soundwire interface part is not a DAI and does
not allow sound-dai-cells:
sc7280-idp.dtb: codec@0,4: '#sound-dai-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230220095401.64196-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
index 8b5293e7fd2a3..a0e767ff252c5 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -480,7 +480,6 @@ &swr0 {
wcd_rx: codec@0,4 {
compatible = "sdw20217010d00";
reg = <0 4>;
- #sound-dai-cells = <1>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
@@ -491,7 +490,6 @@ &swr1 {
wcd_tx: codec@0,3 {
compatible = "sdw20217010d00";
reg = <0 3>;
- #sound-dai-cells = <1>;
qcom,tx-port-mapping = <1 2 3 4>;
};
};
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 03/30] arm64: dts: qcom: sc7280-qcard: drop incorrect dai-cells from WCD938x SDW
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 02/30] arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 04/30] s390/cio: unregister device when the only path is gone Sasha Levin
` (26 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Krzysztof Kozlowski, Douglas Anderson, Konrad Dybcio,
Bjorn Andersson, Sasha Levin, agross, robh+dt,
krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[ Upstream commit 16bd455d0897d1b8b7a9aee2ed51d75b14a34563 ]
The WCD938x audio codec Soundwire interface part is not a DAI and does
not allow sound-dai-cells:
sc7280-herobrine-crd.dtb: codec@0,4: '#sound-dai-cells' does not match any of the regexes: 'pinctrl-[0-9]+'
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230220095401.64196-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi b/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi
index 88204f794ccb7..1080d701d45a2 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-qcard.dtsi
@@ -419,7 +419,6 @@ &swr0 {
wcd_rx: codec@0,4 {
compatible = "sdw20217010d00";
reg = <0 4>;
- #sound-dai-cells = <1>;
qcom,rx-port-mapping = <1 2 3 4 5>;
};
};
@@ -428,7 +427,6 @@ &swr1 {
wcd_tx: codec@0,3 {
compatible = "sdw20217010d00";
reg = <0 3>;
- #sound-dai-cells = <1>;
qcom,tx-port-mapping = <1 2 3 4>;
};
};
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 04/30] s390/cio: unregister device when the only path is gone
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 02/30] arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 03/30] arm64: dts: qcom: sc7280-qcard: " Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 05/30] spi: lpspi: disable lpspi module irq in DMA mode Sasha Levin
` (25 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Vineeth Vijayan, Peter Oberparleiter, Alexander Gordeev,
Sasha Levin, hca, gor, linux-s390
From: Vineeth Vijayan <vneethv@linux.ibm.com>
[ Upstream commit 89c0c62e947a01e7a36b54582fd9c9e346170255 ]
Currently, if the device is offline and all the channel paths are
either configured or varied offline, the associated subchannel gets
unregistered. Don't unregister the subchannel, instead unregister
offline device.
Signed-off-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/s390/cio/device.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
index d5c43e9b51289..c0d620ffea618 100644
--- a/drivers/s390/cio/device.c
+++ b/drivers/s390/cio/device.c
@@ -1376,6 +1376,7 @@ void ccw_device_set_notoper(struct ccw_device *cdev)
enum io_sch_action {
IO_SCH_UNREG,
IO_SCH_ORPH_UNREG,
+ IO_SCH_UNREG_CDEV,
IO_SCH_ATTACH,
IO_SCH_UNREG_ATTACH,
IO_SCH_ORPH_ATTACH,
@@ -1408,7 +1409,7 @@ static enum io_sch_action sch_get_action(struct subchannel *sch)
}
if ((sch->schib.pmcw.pam & sch->opm) == 0) {
if (ccw_device_notify(cdev, CIO_NO_PATH) != NOTIFY_OK)
- return IO_SCH_UNREG;
+ return IO_SCH_UNREG_CDEV;
return IO_SCH_DISC;
}
if (device_is_disconnected(cdev))
@@ -1470,6 +1471,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
case IO_SCH_ORPH_ATTACH:
ccw_device_set_disconnected(cdev);
break;
+ case IO_SCH_UNREG_CDEV:
case IO_SCH_UNREG_ATTACH:
case IO_SCH_UNREG:
if (!cdev)
@@ -1503,6 +1505,7 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
if (rc)
goto out;
break;
+ case IO_SCH_UNREG_CDEV:
case IO_SCH_UNREG_ATTACH:
spin_lock_irqsave(sch->lock, flags);
sch_set_cdev(sch, NULL);
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 05/30] spi: lpspi: disable lpspi module irq in DMA mode
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (2 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 04/30] s390/cio: unregister device when the only path is gone Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 06/30] ASoC: codecs: wcd938x-sdw: do not set can_multi_write flag Sasha Levin
` (24 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: Clark Wang, Mark Brown, Sasha Levin, linux-spi
From: Clark Wang <xiaoning.wang@nxp.com>
[ Upstream commit 9728fb3ce11729aa8c276825ddf504edeb00611d ]
When all bits of IER are set to 0, we still can observe the lpspi irq events
when using DMA mode to transfer data.
So disable irq to avoid the too much irq events.
Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Link: https://lore.kernel.org/r/20230505063557.3962220-1-xiaoning.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/spi/spi-fsl-lpspi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/spi/spi-fsl-lpspi.c b/drivers/spi/spi-fsl-lpspi.c
index 34488de555871..457fe6bc7e41e 100644
--- a/drivers/spi/spi-fsl-lpspi.c
+++ b/drivers/spi/spi-fsl-lpspi.c
@@ -910,9 +910,14 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
ret = fsl_lpspi_dma_init(&pdev->dev, fsl_lpspi, controller);
if (ret == -EPROBE_DEFER)
goto out_pm_get;
-
if (ret < 0)
dev_err(&pdev->dev, "dma setup error %d, use pio\n", ret);
+ else
+ /*
+ * disable LPSPI module IRQ when enable DMA mode successfully,
+ * to prevent the unexpected LPSPI module IRQ events.
+ */
+ disable_irq(irq);
ret = devm_spi_register_controller(&pdev->dev, controller);
if (ret < 0) {
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 06/30] ASoC: codecs: wcd938x-sdw: do not set can_multi_write flag
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (3 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 05/30] spi: lpspi: disable lpspi module irq in DMA mode Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 07/30] ASoC: simple-card: Add missing of_node_put() in case of error Sasha Levin
` (23 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Srinivas Kandagatla, Mark Brown, Sasha Levin, lgirdwood, perex,
tiwai, krzysztof.kozlowski, pierre-louis.bossart, alsa-devel
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
[ Upstream commit 2d7c2f9272de6347a9cec0fc07708913692c0ae3 ]
regmap-sdw does not support multi register writes, so there is
no point in setting this flag. This also leads to incorrect
programming of WSA codecs with regmap_multi_reg_write() call.
This invalid configuration should have been rejected by regmap-sdw.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230523165414.14560-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/wcd938x-sdw.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/codecs/wcd938x-sdw.c b/sound/soc/codecs/wcd938x-sdw.c
index 402286dfaea44..9c10200ff34b2 100644
--- a/sound/soc/codecs/wcd938x-sdw.c
+++ b/sound/soc/codecs/wcd938x-sdw.c
@@ -1190,7 +1190,6 @@ static const struct regmap_config wcd938x_regmap_config = {
.readable_reg = wcd938x_readable_register,
.writeable_reg = wcd938x_writeable_register,
.volatile_reg = wcd938x_volatile_register,
- .can_multi_write = true,
};
static const struct sdw_slave_ops wcd9380_slave_ops = {
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 07/30] ASoC: simple-card: Add missing of_node_put() in case of error
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (4 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 06/30] ASoC: codecs: wcd938x-sdw: do not set can_multi_write flag Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 08/30] soundwire: dmi-quirks: add new mapping for HP Spectre x360 Sasha Levin
` (22 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Herve Codina, Kuninori Morimoto, Mark Brown, Sasha Levin,
lgirdwood, perex, tiwai, astrid.rost, spujar, aidanmacdonald.0x0,
alsa-devel
From: Herve Codina <herve.codina@bootlin.com>
[ Upstream commit 8938f75a5e35c597a647c28984a0304da7a33d63 ]
In the error path, a of_node_put() for platform is missing.
Just add it.
Signed-off-by: Herve Codina <herve.codina@bootlin.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20230523151223.109551-9-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/generic/simple-card.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index e98932c167542..5f8468ff36562 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -416,6 +416,7 @@ static int __simple_for_each_link(struct asoc_simple_priv *priv,
if (ret < 0) {
of_node_put(codec);
+ of_node_put(plat);
of_node_put(np);
goto error;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 08/30] soundwire: dmi-quirks: add new mapping for HP Spectre x360
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (5 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 07/30] ASoC: simple-card: Add missing of_node_put() in case of error Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 09/30] soundwire: qcom: add proper error paths in qcom_swrm_startup() Sasha Levin
` (21 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Pierre-Louis Bossart, Rander Wang, Bard Liao, Vinod Koul,
Sasha Levin, alsa-devel
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
[ Upstream commit 700581ede41d029403feec935df4616309696fd7 ]
A BIOS/DMI update seems to have broken some devices, let's add a new
mapping.
Link: https://github.com/thesofproject/linux/issues/4323
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230515074859.3097-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/soundwire/dmi-quirks.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/soundwire/dmi-quirks.c b/drivers/soundwire/dmi-quirks.c
index 58ea013fa918a..2a1096dab63d3 100644
--- a/drivers/soundwire/dmi-quirks.c
+++ b/drivers/soundwire/dmi-quirks.c
@@ -99,6 +99,13 @@ static const struct dmi_system_id adr_remap_quirk_table[] = {
},
.driver_data = (void *)intel_tgl_bios,
},
+ {
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "HP"),
+ DMI_MATCH(DMI_BOARD_NAME, "8709"),
+ },
+ .driver_data = (void *)intel_tgl_bios,
+ },
{
/* quirk used for NUC15 'Bishop County' LAPBC510 and LAPBC710 skews */
.matches = {
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 09/30] soundwire: qcom: add proper error paths in qcom_swrm_startup()
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (6 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 08/30] soundwire: dmi-quirks: add new mapping for HP Spectre x360 Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 10/30] platform/x86: int3472: Avoid crash in unregistering regulator gpio Sasha Levin
` (20 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Krzysztof Kozlowski, Pierre-Louis Bossart, Vinod Koul,
Sasha Levin, agross, andersson, yung-chuan.liao, linux-arm-msm,
alsa-devel
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[ Upstream commit 99e09b9c0ab43346c52f2787ca4e5c4b1798362e ]
Reverse actions in qcom_swrm_startup() error paths to avoid leaking
stream memory and keeping runtime PM unbalanced.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230517163736.997553-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/soundwire/qcom.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 30575ed20947e..0dcdbd4e1ec3a 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -1098,8 +1098,10 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
}
sruntime = sdw_alloc_stream(dai->name);
- if (!sruntime)
- return -ENOMEM;
+ if (!sruntime) {
+ ret = -ENOMEM;
+ goto err_alloc;
+ }
ctrl->sruntime[dai->id] = sruntime;
@@ -1109,12 +1111,19 @@ static int qcom_swrm_startup(struct snd_pcm_substream *substream,
if (ret < 0 && ret != -ENOTSUPP) {
dev_err(dai->dev, "Failed to set sdw stream on %s\n",
codec_dai->name);
- sdw_release_stream(sruntime);
- return ret;
+ goto err_set_stream;
}
}
return 0;
+
+err_set_stream:
+ sdw_release_stream(sruntime);
+err_alloc:
+ pm_runtime_mark_last_busy(ctrl->dev);
+ pm_runtime_put_autosuspend(ctrl->dev);
+
+ return ret;
}
static void qcom_swrm_shutdown(struct snd_pcm_substream *substream,
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 10/30] platform/x86: int3472: Avoid crash in unregistering regulator gpio
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (7 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 09/30] soundwire: qcom: add proper error paths in qcom_swrm_startup() Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 11/30] ASoC: nau8824: Add quirk to active-high jack-detect Sasha Levin
` (19 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hao Yao, Bingbu Cao, Hans de Goede, Sasha Levin, djrscally,
markgross, platform-driver-x86
From: Hao Yao <hao.yao@intel.com>
[ Upstream commit fb109fba728407fa4a84d659b5cb87cd8399d7b3 ]
When int3472 is loaded before GPIO driver, acpi_get_and_request_gpiod()
failed but the returned gpio descriptor is not NULL, it will cause panic
in later gpiod_put(), so set the gpio_desc to NULL in register error
handling to avoid such crash.
Signed-off-by: Hao Yao <hao.yao@intel.com>
Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
Link: https://lore.kernel.org/r/20230524035135.90315-1-bingbu.cao@intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
.../platform/x86/intel/int3472/clk_and_regulator.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/platform/x86/intel/int3472/clk_and_regulator.c b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
index 1086c3d834945..399f0623ca1b5 100644
--- a/drivers/platform/x86/intel/int3472/clk_and_regulator.c
+++ b/drivers/platform/x86/intel/int3472/clk_and_regulator.c
@@ -101,9 +101,11 @@ int skl_int3472_register_clock(struct int3472_discrete_device *int3472,
int3472->clock.ena_gpio = acpi_get_and_request_gpiod(path, agpio->pin_table[0],
"int3472,clk-enable");
- if (IS_ERR(int3472->clock.ena_gpio))
- return dev_err_probe(int3472->dev, PTR_ERR(int3472->clock.ena_gpio),
- "getting clk-enable GPIO\n");
+ if (IS_ERR(int3472->clock.ena_gpio)) {
+ ret = PTR_ERR(int3472->clock.ena_gpio);
+ int3472->clock.ena_gpio = NULL;
+ return dev_err_probe(int3472->dev, ret, "getting clk-enable GPIO\n");
+ }
if (polarity == GPIO_ACTIVE_LOW)
gpiod_toggle_active_low(int3472->clock.ena_gpio);
@@ -199,8 +201,9 @@ int skl_int3472_register_regulator(struct int3472_discrete_device *int3472,
int3472->regulator.gpio = acpi_get_and_request_gpiod(path, agpio->pin_table[0],
"int3472,regulator");
if (IS_ERR(int3472->regulator.gpio)) {
- dev_err(int3472->dev, "Failed to get regulator GPIO line\n");
- return PTR_ERR(int3472->regulator.gpio);
+ ret = PTR_ERR(int3472->regulator.gpio);
+ int3472->regulator.gpio = NULL;
+ return dev_err_probe(int3472->dev, ret, "getting regulator GPIO\n");
}
/* Ensure the pin is in output mode and non-active state */
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 11/30] ASoC: nau8824: Add quirk to active-high jack-detect
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (8 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 10/30] platform/x86: int3472: Avoid crash in unregistering regulator gpio Sasha Levin
@ 2023-06-16 10:24 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 12/30] ASoC: amd: yc: Add Thinkpad Neo14 to quirks list for acp6x Sasha Levin
` (18 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:24 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Edson Juliano Drosdeck, Mark Brown, Sasha Levin, lgirdwood, perex,
tiwai, ckeepax, savagecin, SJLIN0, alsa-devel
From: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
[ Upstream commit e384dba03e3294ce7ea69e4da558e9bf8f0e8946 ]
Add entries for Positivo laptops: CW14Q01P, K1424G, N14ZP74G to the
DMI table, so that active-high jack-detect will work properly on
these laptops.
Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com>
Link: https://lore.kernel.org/r/20230529181911.632851-1-edson.drosdeck@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/nau8824.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/sound/soc/codecs/nau8824.c b/sound/soc/codecs/nau8824.c
index 4f19fd9b65d11..5a4db8944d06a 100644
--- a/sound/soc/codecs/nau8824.c
+++ b/sound/soc/codecs/nau8824.c
@@ -1903,6 +1903,30 @@ static const struct dmi_system_id nau8824_quirk_table[] = {
},
.driver_data = (void *)(NAU8824_MONO_SPEAKER),
},
+ {
+ /* Positivo CW14Q01P */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
+ DMI_MATCH(DMI_BOARD_NAME, "CW14Q01P"),
+ },
+ .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH),
+ },
+ {
+ /* Positivo K1424G */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
+ DMI_MATCH(DMI_BOARD_NAME, "K1424G"),
+ },
+ .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH),
+ },
+ {
+ /* Positivo N14ZP74G */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Positivo Tecnologia SA"),
+ DMI_MATCH(DMI_BOARD_NAME, "N14ZP74G"),
+ },
+ .driver_data = (void *)(NAU8824_JD_ACTIVE_HIGH),
+ },
{}
};
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 12/30] ASoC: amd: yc: Add Thinkpad Neo14 to quirks list for acp6x
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (9 preceding siblings ...)
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 11/30] ASoC: nau8824: Add quirk to active-high jack-detect Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 13/30] drm/ast: Fix modeset failed on DisplayPort Sasha Levin
` (17 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sicong Jiang, Mark Brown, Sasha Levin, lgirdwood, perex, tiwai,
mario.limonciello, Syed.SabaKareem, xazrael, alsa-devel
From: Sicong Jiang <kevin.jiangsc@gmail.com>
[ Upstream commit 57d1e8900495cf1751cec74db16fe1a0fe47efbb ]
Thinkpad Neo14 Ryzen Edition uses Ryzen 6800H processor, and adding to
quirks list for acp6x will enable internal mic.
Signed-off-by: Sicong Jiang <kevin.jiangsc@gmail.com>
Link: https://lore.kernel.org/r/20230531090635.89565-1-kevin.jiangsc@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/amd/yc/acp6x-mach.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/sound/soc/amd/yc/acp6x-mach.c b/sound/soc/amd/yc/acp6x-mach.c
index 84b401b685f7f..c1ca3ceac5f2f 100644
--- a/sound/soc/amd/yc/acp6x-mach.c
+++ b/sound/soc/amd/yc/acp6x-mach.c
@@ -171,6 +171,13 @@ static const struct dmi_system_id yc_acp_quirk_table[] = {
DMI_MATCH(DMI_PRODUCT_NAME, "21CL"),
}
},
+ {
+ .driver_data = &acp6x_card,
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "21EF"),
+ }
+ },
{
.driver_data = &acp6x_card,
.matches = {
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 13/30] drm/ast: Fix modeset failed on DisplayPort
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (10 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 12/30] ASoC: amd: yc: Add Thinkpad Neo14 to quirks list for acp6x Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 14/30] gfs2: Don't get stuck writing page onto itself under direct I/O Sasha Levin
` (16 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Jammy Huang, Thomas Zimmermann, Sasha Levin, airlied, airlied,
daniel, dri-devel
From: Jammy Huang <jammy_huang@aspeedtech.com>
[ Upstream commit 3692ababa322b4d9ffbd973865bc88018e896fcd ]
If we switch display and update cursor together, it could lead to
modeset failed because of concurrent access to IO registers.
Add lock protection in DP's edid access to avoid this problem.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230601004847.1115-1-jammy_huang@aspeedtech.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/ast/ast_mode.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 984ec590a7e7d..e267cf9f505b9 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -1635,6 +1635,8 @@ static int ast_dp501_output_init(struct ast_private *ast)
static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector)
{
void *edid;
+ struct drm_device *dev = connector->dev;
+ struct ast_device *ast = to_ast_device(dev);
int succ;
int count;
@@ -1643,9 +1645,17 @@ static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector)
if (!edid)
goto err_drm_connector_update_edid_property;
+ /*
+ * Protect access to I/O registers from concurrent modesetting
+ * by acquiring the I/O-register lock.
+ */
+ mutex_lock(&ast->ioregs_lock);
+
succ = ast_astdp_read_edid(connector->dev, edid);
if (succ < 0)
- goto err_kfree;
+ goto err_mutex_unlock;
+
+ mutex_unlock(&ast->ioregs_lock);
drm_connector_update_edid_property(connector, edid);
count = drm_add_edid_modes(connector, edid);
@@ -1653,7 +1663,8 @@ static int ast_astdp_connector_helper_get_modes(struct drm_connector *connector)
return count;
-err_kfree:
+err_mutex_unlock:
+ mutex_unlock(&ast->ioregs_lock);
kfree(edid);
err_drm_connector_update_edid_property:
drm_connector_update_edid_property(connector, NULL);
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 14/30] gfs2: Don't get stuck writing page onto itself under direct I/O
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (11 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 13/30] drm/ast: Fix modeset failed on DisplayPort Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 15/30] s390/purgatory: disable branch profiling Sasha Levin
` (15 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Andreas Gruenbacher, Jan Kara, Sasha Levin, rpeterso,
cluster-devel
From: Andreas Gruenbacher <agruenba@redhat.com>
[ Upstream commit fa58cc888d67e640e354d8b3ceef877ea167b0cf ]
When a direct I/O write is performed, iomap_dio_rw() invalidates the
part of the page cache which the write is going to before carrying out
the write. In the odd case, the direct I/O write will be reading from
the same page it is writing to. gfs2 carries out writes with page
faults disabled, so it should have been obvious that this page
invalidation can cause iomap_dio_rw() to never make any progress.
Currently, gfs2 will end up in an endless retry loop in
gfs2_file_direct_write() instead, though.
Break this endless loop by limiting the number of retries and falling
back to buffered I/O after that.
Also simplify should_fault_in_pages() sightly and add a comment to make
the above case easier to understand.
Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/gfs2/file.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 300844f50dcd2..cb62c8f07d1e7 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -784,9 +784,13 @@ static inline bool should_fault_in_pages(struct iov_iter *i,
if (!user_backed_iter(i))
return false;
+ /*
+ * Try to fault in multiple pages initially. When that doesn't result
+ * in any progress, fall back to a single page.
+ */
size = PAGE_SIZE;
offs = offset_in_page(iocb->ki_pos);
- if (*prev_count != count || !*window_size) {
+ if (*prev_count != count) {
size_t nr_dirtied;
nr_dirtied = max(current->nr_dirtied_pause -
@@ -870,6 +874,7 @@ static ssize_t gfs2_file_direct_write(struct kiocb *iocb, struct iov_iter *from,
struct gfs2_inode *ip = GFS2_I(inode);
size_t prev_count = 0, window_size = 0;
size_t written = 0;
+ bool enough_retries;
ssize_t ret;
/*
@@ -913,11 +918,17 @@ static ssize_t gfs2_file_direct_write(struct kiocb *iocb, struct iov_iter *from,
if (ret > 0)
written = ret;
+ enough_retries = prev_count == iov_iter_count(from) &&
+ window_size <= PAGE_SIZE;
if (should_fault_in_pages(from, iocb, &prev_count, &window_size)) {
gfs2_glock_dq(gh);
window_size -= fault_in_iov_iter_readable(from, window_size);
- if (window_size)
- goto retry;
+ if (window_size) {
+ if (!enough_retries)
+ goto retry;
+ /* fall back to buffered I/O */
+ ret = 0;
+ }
}
out_unlock:
if (gfs2_holder_queued(gh))
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 15/30] s390/purgatory: disable branch profiling
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (12 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 14/30] gfs2: Don't get stuck writing page onto itself under direct I/O Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 16/30] ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted Sasha Levin
` (14 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Alexander Gordeev, Vasily Gorbik, Sasha Levin, hca, paul.walmsley,
palmer, aou, masahiroy, nathan, svens, linux-s390, linux-riscv
From: Alexander Gordeev <agordeev@linux.ibm.com>
[ Upstream commit 03c5c83b70dca3729a3eb488e668e5044bd9a5ea ]
Avoid linker error for randomly generated config file that
has CONFIG_BRANCH_PROFILE_NONE enabled and make it similar
to riscv, x86 and also to commit 4bf3ec384edf ("s390: disable
branch profiling for vdso").
Reviewed-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/s390/purgatory/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index 32573b4f9bd20..cc8cf5abea158 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -26,6 +26,7 @@ KBUILD_CFLAGS += -Wno-pointer-sign -Wno-sign-compare
KBUILD_CFLAGS += -fno-zero-initialized-in-bss -fno-builtin -ffreestanding
KBUILD_CFLAGS += -Os -m64 -msoft-float -fno-common
KBUILD_CFLAGS += -fno-stack-protector
+KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
KBUILD_CFLAGS += $(CLANG_FLAGS)
KBUILD_CFLAGS += $(call cc-option,-fno-PIE)
KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 16/30] ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (13 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 15/30] s390/purgatory: disable branch profiling Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 17/30] net: sched: wrap tc_skip_wrapper with CONFIG_RETPOLINE Sasha Levin
` (13 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Chancel Liu, Shengjiu Wang, Mark Brown, Sasha Levin, Xiubo.Lee,
lgirdwood, perex, tiwai, alsa-devel, linuxppc-dev
From: Chancel Liu <chancel.liu@nxp.com>
[ Upstream commit 32cf0046a652116d6a216d575f3049a9ff9dd80d ]
There's an issue on SAI synchronous mode that TX/RX side can't get BCLK
from RX/TX it sync with if BYP bit is asserted. It's a workaround to
fix it that enable SION of IOMUX pad control and assert BCI.
For example if TX sync with RX which means both TX and RX are using clk
form RX and BYP=1. TX can get BCLK only if the following two conditions
are valid:
1. SION of RX BCLK IOMUX pad is set to 1
2. BCI of TX is set to 1
Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20230530103012.3448838-1-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/fsl/fsl_sai.c | 11 +++++++++--
sound/soc/fsl/fsl_sai.h | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c
index 990bba0be1fb1..8a64f3c1d1556 100644
--- a/sound/soc/fsl/fsl_sai.c
+++ b/sound/soc/fsl/fsl_sai.c
@@ -491,14 +491,21 @@ static int fsl_sai_set_bclk(struct snd_soc_dai *dai, bool tx, u32 freq)
regmap_update_bits(sai->regmap, reg, FSL_SAI_CR2_MSEL_MASK,
FSL_SAI_CR2_MSEL(sai->mclk_id[tx]));
- if (savediv == 1)
+ if (savediv == 1) {
regmap_update_bits(sai->regmap, reg,
FSL_SAI_CR2_DIV_MASK | FSL_SAI_CR2_BYP,
FSL_SAI_CR2_BYP);
- else
+ if (fsl_sai_dir_is_synced(sai, adir))
+ regmap_update_bits(sai->regmap, FSL_SAI_xCR2(tx, ofs),
+ FSL_SAI_CR2_BCI, FSL_SAI_CR2_BCI);
+ else
+ regmap_update_bits(sai->regmap, FSL_SAI_xCR2(tx, ofs),
+ FSL_SAI_CR2_BCI, 0);
+ } else {
regmap_update_bits(sai->regmap, reg,
FSL_SAI_CR2_DIV_MASK | FSL_SAI_CR2_BYP,
savediv / 2 - 1);
+ }
if (sai->soc_data->max_register >= FSL_SAI_MCTL) {
/* SAI is in master mode at this point, so enable MCLK */
diff --git a/sound/soc/fsl/fsl_sai.h b/sound/soc/fsl/fsl_sai.h
index 197748a888d5f..a53c4f0e25faf 100644
--- a/sound/soc/fsl/fsl_sai.h
+++ b/sound/soc/fsl/fsl_sai.h
@@ -116,6 +116,7 @@
/* SAI Transmit and Receive Configuration 2 Register */
#define FSL_SAI_CR2_SYNC BIT(30)
+#define FSL_SAI_CR2_BCI BIT(28)
#define FSL_SAI_CR2_MSEL_MASK (0x3 << 26)
#define FSL_SAI_CR2_MSEL_BUS 0
#define FSL_SAI_CR2_MSEL_MCLK1 BIT(26)
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 17/30] net: sched: wrap tc_skip_wrapper with CONFIG_RETPOLINE
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (14 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 16/30] ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 18/30] ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256 Sasha Levin
` (12 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Min-Hua Chen, Pedro Tammela, David S . Miller, Sasha Levin, jhs,
xiyou.wangcong, jiri, edumazet, kuba, pabeni, netdev
From: Min-Hua Chen <minhuadotchen@gmail.com>
[ Upstream commit 8cde87b007dad2e461015ff70352af56ceb02c75 ]
This patch fixes the following sparse warning:
net/sched/sch_api.c:2305:1: sparse: warning: symbol 'tc_skip_wrapper' was not declared. Should it be static?
No functional change intended.
Signed-off-by: Min-Hua Chen <minhuadotchen@gmail.com>
Acked-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/sched/sch_api.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 7045b67b5533e..96c063a787b22 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -2300,7 +2300,9 @@ static struct pernet_operations psched_net_ops = {
.exit = psched_net_exit,
};
+#if IS_ENABLED(CONFIG_RETPOLINE)
DEFINE_STATIC_KEY_FALSE(tc_skip_wrapper);
+#endif
static int __init pktsched_init(void)
{
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 18/30] ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (15 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 17/30] net: sched: wrap tc_skip_wrapper with CONFIG_RETPOLINE Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 19/30] i2c: mchp-pci1xxxx: Avoid cast to incompatible function type Sasha Levin
` (11 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Sayed, Karimuddin, Kai Vehmanen, Sayed, Pierre-Louis Bossart,
Takashi Iwai, Sasha Levin, perex, tiwai, sbinding, tcrawford,
andy.chi, luke, tangmeng, p.jungkamp, kasper93, yangyuchi66,
yangyingliang, alsa-devel
From: "Sayed, Karimuddin" <karimuddin.sayed@intel.com>
[ Upstream commit 1a93f10c5b12bd766a537b24a50fca5373467303 ]
Add "Intel Reference boad" and "Intel NUC 13" SSID in the alc256.
Enable jack headset volume buttons
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Sayed, Karimuddin <karimuddin.sayed@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230602193812.66768-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/pci/hda/patch_realtek.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 7b5f194513c7b..42bd8ae5892b6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9588,6 +9588,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x10ec, 0x124c, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
SND_PCI_QUIRK(0x10ec, 0x1252, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
SND_PCI_QUIRK(0x10ec, 0x1254, "Intel Reference board", ALC295_FIXUP_CHROME_BOOK),
+ SND_PCI_QUIRK(0x10ec, 0x12cc, "Intel Reference board", ALC225_FIXUP_HEADSET_JACK),
SND_PCI_QUIRK(0x10f7, 0x8338, "Panasonic CF-SZ6", ALC269_FIXUP_HEADSET_MODE),
SND_PCI_QUIRK(0x144d, 0xc109, "Samsung Ativ book 9 (NP900X3G)", ALC269_FIXUP_INV_DMIC),
SND_PCI_QUIRK(0x144d, 0xc169, "Samsung Notebook 9 Pen (NP930SBE-K01US)", ALC298_FIXUP_SAMSUNG_AMP),
@@ -9807,6 +9808,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x8086, 0x2074, "Intel NUC 8", ALC233_FIXUP_INTEL_NUC8_DMIC),
SND_PCI_QUIRK(0x8086, 0x2080, "Intel NUC 8 Rugged", ALC256_FIXUP_INTEL_NUC8_RUGGED),
SND_PCI_QUIRK(0x8086, 0x2081, "Intel NUC 10", ALC256_FIXUP_INTEL_NUC10),
+ SND_PCI_QUIRK(0x8086, 0x3038, "Intel NUC 13", ALC225_FIXUP_HEADSET_JACK),
SND_PCI_QUIRK(0xf111, 0x0001, "Framework Laptop", ALC295_FIXUP_FRAMEWORK_LAPTOP_MIC_NO_PRESENCE),
#if 0
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 19/30] i2c: mchp-pci1xxxx: Avoid cast to incompatible function type
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (16 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 18/30] ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256 Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 20/30] i2c: designware: fix idx_write_cnt in read loop Sasha Levin
` (10 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Simon Horman, Horatiu Vultur, Andi Shyti, Tharun Kumar P,
Wolfram Sang, Sasha Levin, kumaravel.thiagarajan, UNGLinuxDriver,
nathan, ndesaulniers, linux-i2c, llvm
From: Simon Horman <horms@kernel.org>
[ Upstream commit 7ebfd881abe9e0ea9557b29dab6aa28d294fabb4 ]
Rather than casting pci1xxxx_i2c_shutdown to an incompatible function type,
update the type to match that expected by __devm_add_action.
Reported by clang-16 with W-1:
.../i2c-mchp-pci1xxxx.c:1159:29: error: cast from 'void (*)(struct pci1xxxx_i2c *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict]
ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/device.h:251:29: note: expanded from macro 'devm_add_action'
__devm_add_action(release, action, data, #action)
^~~~~~
No functional change intended.
Compile tested only.
Signed-off-by: Simon Horman <horms@kernel.org>
Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Tharun Kumar P<tharunkumar.pasumarthi@microchip.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/i2c/busses/i2c-mchp-pci1xxxx.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
index b21ffd6df9276..5ef136c3ecb12 100644
--- a/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
+++ b/drivers/i2c/busses/i2c-mchp-pci1xxxx.c
@@ -1118,8 +1118,10 @@ static int pci1xxxx_i2c_resume(struct device *dev)
static DEFINE_SIMPLE_DEV_PM_OPS(pci1xxxx_i2c_pm_ops, pci1xxxx_i2c_suspend,
pci1xxxx_i2c_resume);
-static void pci1xxxx_i2c_shutdown(struct pci1xxxx_i2c *i2c)
+static void pci1xxxx_i2c_shutdown(void *data)
{
+ struct pci1xxxx_i2c *i2c = data;
+
pci1xxxx_i2c_config_padctrl(i2c, false);
pci1xxxx_i2c_configure_core_reg(i2c, false);
}
@@ -1156,7 +1158,7 @@ static int pci1xxxx_i2c_probe_pci(struct pci_dev *pdev,
init_completion(&i2c->i2c_xfer_done);
pci1xxxx_i2c_init(i2c);
- ret = devm_add_action(dev, (void (*)(void *))pci1xxxx_i2c_shutdown, i2c);
+ ret = devm_add_action(dev, pci1xxxx_i2c_shutdown, i2c);
if (ret)
return ret;
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 20/30] i2c: designware: fix idx_write_cnt in read loop
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (17 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 19/30] i2c: mchp-pci1xxxx: Avoid cast to incompatible function type Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 21/30] ARM: dts: Fix erroneous ADS touchscreen polarities Sasha Levin
` (9 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: David Zheng, Jarkko Nikula, Wolfram Sang, Sasha Levin, andi.shyti,
linux-i2c
From: David Zheng <david.zheng@intel.com>
[ Upstream commit 1acfc6e753ed978b36d722f54e57fe4d1e8a6ffa ]
With IC_INTR_RX_FULL slave interrupt handler reads data in a loop until
RX FIFO is empty. When testing with the slave-eeprom, each transaction
has 2 bytes for address/index and 1 byte for value, the address byte
can be written as data byte due to dropping STOP condition.
In the test below, the master continuously writes to the slave, first 2
bytes are index, 3rd byte is value and follow by a STOP condition.
i2c_write: i2c-3 #0 a=04b f=0000 l=3 [00-D1-D1]
i2c_write: i2c-3 #0 a=04b f=0000 l=3 [00-D2-D2]
i2c_write: i2c-3 #0 a=04b f=0000 l=3 [00-D3-D3]
Upon receiving STOP condition slave eeprom would reset `idx_write_cnt` so
next 2 bytes can be treated as buffer index for upcoming transaction.
Supposedly the slave eeprom buffer would be written as
EEPROM[0x00D1] = 0xD1
EEPROM[0x00D2] = 0xD2
EEPROM[0x00D3] = 0xD3
When CPU load is high the slave irq handler may not read fast enough,
the interrupt status can be seen as 0x204 with both DW_IC_INTR_STOP_DET
(0x200) and DW_IC_INTR_RX_FULL (0x4) bits. The slave device may see
the transactions below.
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1794 : INTR_STAT=0x204
0x1 STATUS SLAVE_ACTIVITY=0x0 : RAW_INTR_STAT=0x1790 : INTR_STAT=0x200
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4
0x1 STATUS SLAVE_ACTIVITY=0x1 : RAW_INTR_STAT=0x1594 : INTR_STAT=0x4
After `D1` is received, read loop continues to read `00` which is the
first bype of next index. Since STOP condition is ignored by the loop,
eeprom buffer index increased to `D2` and `00` is written as value.
So the slave eeprom buffer becomes
EEPROM[0x00D1] = 0xD1
EEPROM[0x00D2] = 0x00
EEPROM[0x00D3] = 0xD3
The fix is to use `FIRST_DATA_BYTE` (bit 11) in `IC_DATA_CMD` to split
the transactions. The first index byte in this case would have bit 11
set. Check this indication to inject I2C_SLAVE_WRITE_REQUESTED event
which will reset `idx_write_cnt` in slave eeprom.
Signed-off-by: David Zheng <david.zheng@intel.com>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/i2c/busses/i2c-designware-core.h | 1 +
drivers/i2c/busses/i2c-designware-slave.c | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h
index 050d8c63ad3c5..0164d92163308 100644
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -40,6 +40,7 @@
#define DW_IC_CON_BUS_CLEAR_CTRL BIT(11)
#define DW_IC_DATA_CMD_DAT GENMASK(7, 0)
+#define DW_IC_DATA_CMD_FIRST_DATA_BYTE BIT(11)
/*
* Registers offset
diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
index cec25054bb244..2e079cf20bb5b 100644
--- a/drivers/i2c/busses/i2c-designware-slave.c
+++ b/drivers/i2c/busses/i2c-designware-slave.c
@@ -176,6 +176,10 @@ static irqreturn_t i2c_dw_isr_slave(int this_irq, void *dev_id)
do {
regmap_read(dev->map, DW_IC_DATA_CMD, &tmp);
+ if (tmp & DW_IC_DATA_CMD_FIRST_DATA_BYTE)
+ i2c_slave_event(dev->slave,
+ I2C_SLAVE_WRITE_REQUESTED,
+ &val);
val = tmp;
i2c_slave_event(dev->slave, I2C_SLAVE_WRITE_RECEIVED,
&val);
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 21/30] ARM: dts: Fix erroneous ADS touchscreen polarities
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (18 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 20/30] i2c: designware: fix idx_write_cnt in read loop Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 22/30] null_blk: Fix: memory release when memory_backed=1 Sasha Levin
` (8 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Linus Walleij, Arnd Bergmann, Sasha Levin, bcousson, tony,
robh+dt, krzysztof.kozlowski+dt, conor+dt, nicolas.ferre,
alexandre.belloni, claudiu.beznea, shawnguo, linux-omap,
devicetree, linux-arm-kernel
From: Linus Walleij <linus.walleij@linaro.org>
[ Upstream commit 4a672d500bfd6bb87092c33d5a2572c3d0a1cf83 ]
Several device tree files get the polarity of the pendown-gpios
wrong: this signal is active low. Fix up all incorrect flags, so
that operating systems can rely on the flag being correctly set.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230510105156.1134320-1-linus.walleij@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/arm/boot/dts/am57xx-cl-som-am57x.dts | 2 +-
arch/arm/boot/dts/at91sam9261ek.dts | 2 +-
arch/arm/boot/dts/imx7d-pico-hobbit.dts | 2 +-
arch/arm/boot/dts/imx7d-sdb.dts | 2 +-
arch/arm/boot/dts/omap3-cm-t3x.dtsi | 2 +-
arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi | 2 +-
arch/arm/boot/dts/omap3-lilly-a83x.dtsi | 2 +-
arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi | 2 +-
arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi | 2 +-
arch/arm/boot/dts/omap3-pandora-common.dtsi | 2 +-
arch/arm/boot/dts/omap5-cm-t54.dts | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/arch/arm/boot/dts/am57xx-cl-som-am57x.dts b/arch/arm/boot/dts/am57xx-cl-som-am57x.dts
index 2fc9a5d5e0c0d..625b9b311b49d 100644
--- a/arch/arm/boot/dts/am57xx-cl-som-am57x.dts
+++ b/arch/arm/boot/dts/am57xx-cl-som-am57x.dts
@@ -527,7 +527,7 @@ touchscreen@1 {
interrupt-parent = <&gpio1>;
interrupts = <31 0>;
- pendown-gpio = <&gpio1 31 0>;
+ pendown-gpio = <&gpio1 31 GPIO_ACTIVE_LOW>;
ti,x-min = /bits/ 16 <0x0>;
diff --git a/arch/arm/boot/dts/at91sam9261ek.dts b/arch/arm/boot/dts/at91sam9261ek.dts
index 88869ca874d1a..045cb253f23a6 100644
--- a/arch/arm/boot/dts/at91sam9261ek.dts
+++ b/arch/arm/boot/dts/at91sam9261ek.dts
@@ -156,7 +156,7 @@ tsc2046@2 {
compatible = "ti,ads7843";
interrupts-extended = <&pioC 2 IRQ_TYPE_EDGE_BOTH>;
spi-max-frequency = <3000000>;
- pendown-gpio = <&pioC 2 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&pioC 2 GPIO_ACTIVE_LOW>;
ti,x-min = /bits/ 16 <150>;
ti,x-max = /bits/ 16 <3830>;
diff --git a/arch/arm/boot/dts/imx7d-pico-hobbit.dts b/arch/arm/boot/dts/imx7d-pico-hobbit.dts
index d917dc4f2f227..6ad39dca70096 100644
--- a/arch/arm/boot/dts/imx7d-pico-hobbit.dts
+++ b/arch/arm/boot/dts/imx7d-pico-hobbit.dts
@@ -64,7 +64,7 @@ ads7846@0 {
interrupt-parent = <&gpio2>;
interrupts = <7 0>;
spi-max-frequency = <1000000>;
- pendown-gpio = <&gpio2 7 0>;
+ pendown-gpio = <&gpio2 7 GPIO_ACTIVE_LOW>;
vcc-supply = <®_3p3v>;
ti,x-min = /bits/ 16 <0>;
ti,x-max = /bits/ 16 <4095>;
diff --git a/arch/arm/boot/dts/imx7d-sdb.dts b/arch/arm/boot/dts/imx7d-sdb.dts
index f483bc0afe5ea..234e5fc647b22 100644
--- a/arch/arm/boot/dts/imx7d-sdb.dts
+++ b/arch/arm/boot/dts/imx7d-sdb.dts
@@ -205,7 +205,7 @@ tsc2046@0 {
pinctrl-0 = <&pinctrl_tsc2046_pendown>;
interrupt-parent = <&gpio2>;
interrupts = <29 0>;
- pendown-gpio = <&gpio2 29 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio2 29 GPIO_ACTIVE_LOW>;
touchscreen-max-pressure = <255>;
wakeup-source;
};
diff --git a/arch/arm/boot/dts/omap3-cm-t3x.dtsi b/arch/arm/boot/dts/omap3-cm-t3x.dtsi
index e61b8a2bfb7de..51baedf1603bd 100644
--- a/arch/arm/boot/dts/omap3-cm-t3x.dtsi
+++ b/arch/arm/boot/dts/omap3-cm-t3x.dtsi
@@ -227,7 +227,7 @@ ads7846@0 {
interrupt-parent = <&gpio2>;
interrupts = <25 0>; /* gpio_57 */
- pendown-gpio = <&gpio2 25 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio2 25 GPIO_ACTIVE_LOW>;
ti,x-min = /bits/ 16 <0x0>;
ti,x-max = /bits/ 16 <0x0fff>;
diff --git a/arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi b/arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi
index 3decc2d78a6ca..a7f99ae0c1fe9 100644
--- a/arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi
+++ b/arch/arm/boot/dts/omap3-devkit8000-lcd-common.dtsi
@@ -54,7 +54,7 @@ ads7846@0 {
interrupt-parent = <&gpio1>;
interrupts = <27 0>; /* gpio_27 */
- pendown-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio1 27 GPIO_ACTIVE_LOW>;
ti,x-min = /bits/ 16 <0x0>;
ti,x-max = /bits/ 16 <0x0fff>;
diff --git a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
index c595afe4181d7..d310b5c7bac36 100644
--- a/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
+++ b/arch/arm/boot/dts/omap3-lilly-a83x.dtsi
@@ -311,7 +311,7 @@ tsc2046@0 {
interrupt-parent = <&gpio1>;
interrupts = <8 0>; /* boot6 / gpio_8 */
spi-max-frequency = <1000000>;
- pendown-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio1 8 GPIO_ACTIVE_LOW>;
vcc-supply = <®_vcc3>;
pinctrl-names = "default";
pinctrl-0 = <&tsc2048_pins>;
diff --git a/arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi b/arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi
index 1d6e88f99eb31..c3570acc35fad 100644
--- a/arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-common-lcd35.dtsi
@@ -149,7 +149,7 @@ ads7846@0 {
interrupt-parent = <&gpio4>;
interrupts = <18 0>; /* gpio_114 */
- pendown-gpio = <&gpio4 18 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio4 18 GPIO_ACTIVE_LOW>;
ti,x-min = /bits/ 16 <0x0>;
ti,x-max = /bits/ 16 <0x0fff>;
diff --git a/arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi b/arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi
index 7e30f9d45790e..d95a0e130058c 100644
--- a/arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi
+++ b/arch/arm/boot/dts/omap3-overo-common-lcd43.dtsi
@@ -160,7 +160,7 @@ ads7846@0 {
interrupt-parent = <&gpio4>;
interrupts = <18 0>; /* gpio_114 */
- pendown-gpio = <&gpio4 18 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio4 18 GPIO_ACTIVE_LOW>;
ti,x-min = /bits/ 16 <0x0>;
ti,x-max = /bits/ 16 <0x0fff>;
diff --git a/arch/arm/boot/dts/omap3-pandora-common.dtsi b/arch/arm/boot/dts/omap3-pandora-common.dtsi
index 559853764487f..4c3b6bab179cc 100644
--- a/arch/arm/boot/dts/omap3-pandora-common.dtsi
+++ b/arch/arm/boot/dts/omap3-pandora-common.dtsi
@@ -651,7 +651,7 @@ tsc2046@0 {
pinctrl-0 = <&penirq_pins>;
interrupt-parent = <&gpio3>;
interrupts = <30 IRQ_TYPE_NONE>; /* GPIO_94 */
- pendown-gpio = <&gpio3 30 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio3 30 GPIO_ACTIVE_LOW>;
vcc-supply = <&vaux4>;
ti,x-min = /bits/ 16 <0>;
diff --git a/arch/arm/boot/dts/omap5-cm-t54.dts b/arch/arm/boot/dts/omap5-cm-t54.dts
index 2d87b9fc230ee..af288d63a26a4 100644
--- a/arch/arm/boot/dts/omap5-cm-t54.dts
+++ b/arch/arm/boot/dts/omap5-cm-t54.dts
@@ -354,7 +354,7 @@ ads7846@0 {
interrupt-parent = <&gpio1>;
interrupts = <15 0>; /* gpio1_wk15 */
- pendown-gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
+ pendown-gpio = <&gpio1 15 GPIO_ACTIVE_LOW>;
ti,x-min = /bits/ 16 <0x0>;
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 22/30] null_blk: Fix: memory release when memory_backed=1
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (19 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 21/30] ARM: dts: Fix erroneous ADS touchscreen polarities Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 23/30] drm/exynos: vidi: fix a wrong error return Sasha Levin
` (7 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Nitesh Shetty, Anuj Gupta, Jens Axboe, Sasha Levin, bvanassche,
kch, damien.lemoal, vincent.fu, error27, akinobu.mita,
shinichiro.kawasaki, linux-block
From: Nitesh Shetty <nj.shetty@samsung.com>
[ Upstream commit 8cfb98196cceec35416041c6b91212d2b99392e4 ]
Memory/pages are not freed, when unloading nullblk driver.
Steps to reproduce issue
1.free -h
total used free shared buff/cache available
Mem: 7.8Gi 260Mi 7.1Gi 3.0Mi 395Mi 7.3Gi
Swap: 0B 0B 0B
2.modprobe null_blk memory_backed=1
3.dd if=/dev/urandom of=/dev/nullb0 oflag=direct bs=1M count=1000
4.modprobe -r null_blk
5.free -h
total used free shared buff/cache available
Mem: 7.8Gi 1.2Gi 6.1Gi 3.0Mi 398Mi 6.3Gi
Swap: 0B 0B 0B
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Signed-off-by: Nitesh Shetty <nj.shetty@samsung.com>
Link: https://lore.kernel.org/r/20230605062354.24785-1-nj.shetty@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/block/null_blk/main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index 14491952047f5..3b6b4cb400f42 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -2212,6 +2212,7 @@ static void null_destroy_dev(struct nullb *nullb)
struct nullb_device *dev = nullb->dev;
null_del_dev(nullb);
+ null_free_device_storage(dev, false);
null_free_dev(dev);
}
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 23/30] drm/exynos: vidi: fix a wrong error return
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (20 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 22/30] null_blk: Fix: memory release when memory_backed=1 Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 24/30] drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl Sasha Levin
` (6 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Inki Dae, Andi Shyti, Sasha Levin, sw0312.kim, kyungmin.park,
airlied, daniel, krzysztof.kozlowski, dri-devel, linux-arm-kernel,
linux-samsung-soc
From: Inki Dae <inki.dae@samsung.com>
[ Upstream commit 4a059559809fd1ddbf16f847c4d2237309c08edf ]
Fix a wrong error return by dropping an error return.
When vidi driver is remvoed, if ctx->raw_edid isn't same as fake_edid_info
then only what we have to is to free ctx->raw_edid so that driver removing
can work correctly - it's not an error case.
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/exynos/exynos_drm_vidi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_vidi.c b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
index 4d56c8c799c5a..f5e1adfcaa514 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_vidi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_vidi.c
@@ -469,8 +469,6 @@ static int vidi_remove(struct platform_device *pdev)
if (ctx->raw_edid != (struct edid *)fake_edid_info) {
kfree(ctx->raw_edid);
ctx->raw_edid = NULL;
-
- return -EINVAL;
}
component_del(&pdev->dev, &vidi_component_ops);
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 24/30] drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (21 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 23/30] drm/exynos: vidi: fix a wrong error return Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 25/30] drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl Sasha Levin
` (5 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Min Li, Andi Shyti, Inki Dae, Sasha Levin, sw0312.kim,
kyungmin.park, airlied, daniel, krzysztof.kozlowski, dri-devel,
linux-arm-kernel, linux-samsung-soc
From: Min Li <lm0963hack@gmail.com>
[ Upstream commit 48bfd02569f5db49cc033f259e66d57aa6efc9a3 ]
If it is async, runqueue_node is freed in g2d_runqueue_worker on another
worker thread. So in extreme cases, if g2d_runqueue_worker runs first, and
then executes the following if statement, there will be use-after-free.
Signed-off-by: Min Li <lm0963hack@gmail.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/exynos/exynos_drm_g2d.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index ec784e58da5c1..414e585ec7dd0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -1335,7 +1335,7 @@ int exynos_g2d_exec_ioctl(struct drm_device *drm_dev, void *data,
/* Let the runqueue know that there is work to do. */
queue_work(g2d->g2d_workq, &g2d->runqueue_work);
- if (runqueue_node->async)
+ if (req->async)
goto out;
wait_for_completion(&runqueue_node->complete);
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 25/30] drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (22 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 24/30] drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 26/30] Revert "ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled" Sasha Levin
` (4 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Min Li, Christian König, Alex Deucher, Sasha Levin,
Xinhui.Pan, airlied, daniel, amd-gfx, dri-devel
From: Min Li <lm0963hack@gmail.com>
[ Upstream commit 982b173a6c6d9472730c3116051977e05d17c8c5 ]
Userspace can race to free the gobj(robj converted from), robj should not
be accessed again after drm_gem_object_put, otherwith it will result in
use-after-free.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Min Li <lm0963hack@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/radeon/radeon_gem.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_gem.c b/drivers/gpu/drm/radeon/radeon_gem.c
index 261fcbae88d78..75d79c3110389 100644
--- a/drivers/gpu/drm/radeon/radeon_gem.c
+++ b/drivers/gpu/drm/radeon/radeon_gem.c
@@ -459,7 +459,6 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,
struct radeon_device *rdev = dev->dev_private;
struct drm_radeon_gem_set_domain *args = data;
struct drm_gem_object *gobj;
- struct radeon_bo *robj;
int r;
/* for now if someone requests domain CPU -
@@ -472,13 +471,12 @@ int radeon_gem_set_domain_ioctl(struct drm_device *dev, void *data,
up_read(&rdev->exclusive_lock);
return -ENOENT;
}
- robj = gem_to_radeon_bo(gobj);
r = radeon_gem_set_domain(gobj, args->read_domains, args->write_domain);
drm_gem_object_put(gobj);
up_read(&rdev->exclusive_lock);
- r = radeon_gem_handle_lockup(robj->rdev, r);
+ r = radeon_gem_handle_lockup(rdev, r);
return r;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 26/30] Revert "ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled"
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (23 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 25/30] drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 27/30] ext4: only check dquot_initialize_needed() when debugging Sasha Levin
` (3 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Theodore Ts'o, Sasha Levin, adilger.kernel, linux-ext4
From: Theodore Ts'o <tytso@mit.edu>
[ Upstream commit 1b29243933098cdbc31b579b5616e183b4275e2f ]
This reverts commit a44be64bbecb15a452496f60db6eacfee2b59c79.
Link: https://lore.kernel.org/r/653b3359-2005-21b1-039d-c55ca4cffdcc@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/super.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 1f222c396932e..9c987bdbab334 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -6354,7 +6354,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
struct ext4_mount_options old_opts;
ext4_group_t g;
int err = 0;
- int enable_rw = 0;
#ifdef CONFIG_QUOTA
int enable_quota = 0;
int i, j;
@@ -6541,7 +6540,7 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
if (err)
goto restore_opts;
- enable_rw = 1;
+ sb->s_flags &= ~SB_RDONLY;
if (ext4_has_feature_mmp(sb)) {
err = ext4_multi_mount_protect(sb,
le64_to_cpu(es->s_mmp_block));
@@ -6588,9 +6587,6 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
if (!test_opt(sb, BLOCK_VALIDITY) && sbi->s_system_blks)
ext4_release_system_zone(sb);
- if (enable_rw)
- sb->s_flags &= ~SB_RDONLY;
-
/*
* Reinitialize lazy itable initialization thread based on
* current settings
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 27/30] ext4: only check dquot_initialize_needed() when debugging
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (24 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 26/30] Revert "ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled" Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 28/30] tools/virtio: Fix arm64 ringtest compilation error Sasha Levin
` (2 subsequent siblings)
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Theodore Ts'o, Sasha Levin, adilger.kernel, linux-ext4
From: Theodore Ts'o <tytso@mit.edu>
[ Upstream commit dea9d8f7643fab07bf89a1155f1f94f37d096a5e ]
ext4_xattr_block_set() relies on its caller to call dquot_initialize()
on the inode. To assure that this has happened there are WARN_ON
checks. Unfortunately, this is subject to false positives if there is
an antagonist thread which is flipping the file system at high rates
between r/o and rw. So only do the check if EXT4_XATTR_DEBUG is
enabled.
Link: https://lore.kernel.org/r/20230608044056.GA1418535@mit.edu
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/ext4/xattr.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c
index 6fa38707163b1..7421ca1d968b0 100644
--- a/fs/ext4/xattr.c
+++ b/fs/ext4/xattr.c
@@ -2057,8 +2057,9 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
else {
u32 ref;
+#ifdef EXT4_XATTR_DEBUG
WARN_ON_ONCE(dquot_initialize_needed(inode));
-
+#endif
/* The old block is released after updating
the inode. */
error = dquot_alloc_block(inode,
@@ -2121,8 +2122,9 @@ ext4_xattr_block_set(handle_t *handle, struct inode *inode,
/* We need to allocate a new block */
ext4_fsblk_t goal, block;
+#ifdef EXT4_XATTR_DEBUG
WARN_ON_ONCE(dquot_initialize_needed(inode));
-
+#endif
goal = ext4_group_first_block_no(sb,
EXT4_I(inode)->i_block_group);
block = ext4_new_meta_blocks(handle, inode, goal, 0,
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 28/30] tools/virtio: Fix arm64 ringtest compilation error
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (25 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 27/30] ext4: only check dquot_initialize_needed() when debugging Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 29/30] vhost_vdpa: tell vqs about the negotiated Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 30/30] vhost_net: revert upend_idx only on retriable error Sasha Levin
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Rong Tao, Michael S . Tsirkin, Sasha Levin, jasowang, xuanzhuo,
dave, virtualization
From: Rong Tao <rongtao@cestc.cn>
[ Upstream commit 57380fd1249b20ef772549af2c58ef57b21faba7 ]
Add cpu_relax() for arm64 instead of directly assert(), and add assert.h
header file. Also, add smp_wmb and smp_mb for arm64.
Compilation error as follows, avoid __always_inline undefined.
$ make
cc -Wall -pthread -O2 -ggdb -flto -fwhole-program -c -o ring.o ring.c
In file included from ring.c:10:
main.h: In function ‘busy_wait’:
main.h:99:21: warning: implicit declaration of function ‘assert’
[-Wimplicit-function-declaration]
99 | #define cpu_relax() assert(0)
| ^~~~~~
main.h:107:17: note: in expansion of macro ‘cpu_relax’
107 | cpu_relax();
| ^~~~~~~~~
main.h:12:1: note: ‘assert’ is defined in header ‘<assert.h>’; did you
forget to ‘#include <assert.h>’?
11 | #include <stdbool.h>
+++ |+#include <assert.h>
12 |
main.h: At top level:
main.h:143:23: error: expected ‘;’ before ‘void’
143 | static __always_inline
| ^
| ;
144 | void __read_once_size(const volatile void *p, void *res, int
size)
| ~~~~
main.h:158:23: error: expected ‘;’ before ‘void’
158 | static __always_inline void __write_once_size(volatile void *p,
void *res, int size)
| ^~~~~
| ;
make: *** [<builtin>: ring.o] Error 1
Signed-off-by: Rong Tao <rongtao@cestc.cn>
Message-Id: <tencent_F53E159DD7925174445D830DA19FACF44B07@qq.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/virtio/ringtest/main.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/tools/virtio/ringtest/main.h b/tools/virtio/ringtest/main.h
index b68920d527503..d18dd317e27f9 100644
--- a/tools/virtio/ringtest/main.h
+++ b/tools/virtio/ringtest/main.h
@@ -8,6 +8,7 @@
#ifndef MAIN_H
#define MAIN_H
+#include <assert.h>
#include <stdbool.h>
extern int param;
@@ -95,6 +96,8 @@ extern unsigned ring_size;
#define cpu_relax() asm ("rep; nop" ::: "memory")
#elif defined(__s390x__)
#define cpu_relax() barrier()
+#elif defined(__aarch64__)
+#define cpu_relax() asm ("yield" ::: "memory")
#else
#define cpu_relax() assert(0)
#endif
@@ -112,6 +115,8 @@ static inline void busy_wait(void)
#if defined(__x86_64__) || defined(__i386__)
#define smp_mb() asm volatile("lock; addl $0,-132(%%rsp)" ::: "memory", "cc")
+#elif defined(__aarch64__)
+#define smp_mb() asm volatile("dmb ish" ::: "memory")
#else
/*
* Not using __ATOMIC_SEQ_CST since gcc docs say they are only synchronized
@@ -136,10 +141,16 @@ static inline void busy_wait(void)
#if defined(__i386__) || defined(__x86_64__) || defined(__s390x__)
#define smp_wmb() barrier()
+#elif defined(__aarch64__)
+#define smp_wmb() asm volatile("dmb ishst" ::: "memory")
#else
#define smp_wmb() smp_release()
#endif
+#ifndef __always_inline
+#define __always_inline inline __attribute__((always_inline))
+#endif
+
static __always_inline
void __read_once_size(const volatile void *p, void *res, int size)
{
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 29/30] vhost_vdpa: tell vqs about the negotiated
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (26 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 28/30] tools/virtio: Fix arm64 ringtest compilation error Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 30/30] vhost_net: revert upend_idx only on retriable error Sasha Levin
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Shannon Nelson, Jason Wang, Michael S . Tsirkin, Sasha Levin, kvm,
virtualization, netdev
From: Shannon Nelson <shannon.nelson@amd.com>
[ Upstream commit 376daf317753ccb6b1ecbdece66018f7f6313a7f ]
As is done in the net, iscsi, and vsock vhost support, let the vdpa vqs
know about the features that have been negotiated. This allows vhost
to more safely make decisions based on the features, such as when using
PACKED vs split queues.
Signed-off-by: Shannon Nelson <shannon.nelson@amd.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20230424225031.18947-2-shannon.nelson@amd.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/vhost/vdpa.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c
index 74c7d1f978b75..a5e4722cbeda1 100644
--- a/drivers/vhost/vdpa.c
+++ b/drivers/vhost/vdpa.c
@@ -385,7 +385,10 @@ static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)
{
struct vdpa_device *vdpa = v->vdpa;
const struct vdpa_config_ops *ops = vdpa->config;
+ struct vhost_dev *d = &v->vdev;
+ u64 actual_features;
u64 features;
+ int i;
/*
* It's not allowed to change the features after they have
@@ -400,6 +403,16 @@ static long vhost_vdpa_set_features(struct vhost_vdpa *v, u64 __user *featurep)
if (vdpa_set_features(vdpa, features))
return -EINVAL;
+ /* let the vqs know what has been configured */
+ actual_features = ops->get_driver_features(vdpa);
+ for (i = 0; i < d->nvqs; ++i) {
+ struct vhost_virtqueue *vq = d->vqs[i];
+
+ mutex_lock(&vq->mutex);
+ vq->acked_features = actual_features;
+ mutex_unlock(&vq->mutex);
+ }
+
return 0;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH AUTOSEL 6.3 30/30] vhost_net: revert upend_idx only on retriable error
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
` (27 preceding siblings ...)
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 29/30] vhost_vdpa: tell vqs about the negotiated Sasha Levin
@ 2023-06-16 10:25 ` Sasha Levin
28 siblings, 0 replies; 30+ messages in thread
From: Sasha Levin @ 2023-06-16 10:25 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Andrey Smetanin, Michael S . Tsirkin, Jason Wang, Sasha Levin,
kvm, virtualization, netdev
From: Andrey Smetanin <asmetanin@yandex-team.ru>
[ Upstream commit 1f5d2e3bab16369d5d4b4020a25db4ab1f4f082c ]
Fix possible virtqueue used buffers leak and corresponding stuck
in case of temporary -EIO from sendmsg() which is produced by
tun driver while backend device is not up.
In case of no-retriable error and zcopy do not revert upend_idx
to pass packet data (that is update used_idx in corresponding
vhost_zerocopy_signal_used()) as if packet data has been
transferred successfully.
v2: set vq->heads[ubuf->desc].len equal to VHOST_DMA_DONE_LEN
in case of fake successful transmit.
Signed-off-by: Andrey Smetanin <asmetanin@yandex-team.ru>
Message-Id: <20230424204411.24888-1-asmetanin@yandex-team.ru>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Andrey Smetanin <asmetanin@yandex-team.ru>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/vhost/net.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
index 07181cd8d52e6..ae2273196b0c9 100644
--- a/drivers/vhost/net.c
+++ b/drivers/vhost/net.c
@@ -935,13 +935,18 @@ static void handle_tx_zerocopy(struct vhost_net *net, struct socket *sock)
err = sock->ops->sendmsg(sock, &msg, len);
if (unlikely(err < 0)) {
+ bool retry = err == -EAGAIN || err == -ENOMEM || err == -ENOBUFS;
+
if (zcopy_used) {
if (vq->heads[ubuf->desc].len == VHOST_DMA_IN_PROGRESS)
vhost_net_ubuf_put(ubufs);
- nvq->upend_idx = ((unsigned)nvq->upend_idx - 1)
- % UIO_MAXIOV;
+ if (retry)
+ nvq->upend_idx = ((unsigned)nvq->upend_idx - 1)
+ % UIO_MAXIOV;
+ else
+ vq->heads[ubuf->desc].len = VHOST_DMA_DONE_LEN;
}
- if (err == -EAGAIN || err == -ENOMEM || err == -ENOBUFS) {
+ if (retry) {
vhost_discard_vq_desc(vq, 1);
vhost_net_enable_vq(net, vq);
break;
--
2.39.2
^ permalink raw reply related [flat|nested] 30+ messages in thread
end of thread, other threads:[~2023-06-16 10:29 UTC | newest]
Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-16 10:24 [PATCH AUTOSEL 6.3 01/30] Input: soc_button_array - add invalid acpi_index DMI quirk handling Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 02/30] arm64: dts: qcom: sc7280-idp: drop incorrect dai-cells from WCD938x SDW Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 03/30] arm64: dts: qcom: sc7280-qcard: " Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 04/30] s390/cio: unregister device when the only path is gone Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 05/30] spi: lpspi: disable lpspi module irq in DMA mode Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 06/30] ASoC: codecs: wcd938x-sdw: do not set can_multi_write flag Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 07/30] ASoC: simple-card: Add missing of_node_put() in case of error Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 08/30] soundwire: dmi-quirks: add new mapping for HP Spectre x360 Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 09/30] soundwire: qcom: add proper error paths in qcom_swrm_startup() Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 10/30] platform/x86: int3472: Avoid crash in unregistering regulator gpio Sasha Levin
2023-06-16 10:24 ` [PATCH AUTOSEL 6.3 11/30] ASoC: nau8824: Add quirk to active-high jack-detect Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 12/30] ASoC: amd: yc: Add Thinkpad Neo14 to quirks list for acp6x Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 13/30] drm/ast: Fix modeset failed on DisplayPort Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 14/30] gfs2: Don't get stuck writing page onto itself under direct I/O Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 15/30] s390/purgatory: disable branch profiling Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 16/30] ASoC: fsl_sai: Enable BCI bit if SAI works on synchronous mode with BYP asserted Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 17/30] net: sched: wrap tc_skip_wrapper with CONFIG_RETPOLINE Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 18/30] ALSA: hda/realtek: Add "Intel Reference board" and "NUC 13" SSID in the ALC256 Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 19/30] i2c: mchp-pci1xxxx: Avoid cast to incompatible function type Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 20/30] i2c: designware: fix idx_write_cnt in read loop Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 21/30] ARM: dts: Fix erroneous ADS touchscreen polarities Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 22/30] null_blk: Fix: memory release when memory_backed=1 Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 23/30] drm/exynos: vidi: fix a wrong error return Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 24/30] drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 25/30] drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 26/30] Revert "ext4: don't clear SB_RDONLY when remounting r/w until quota is re-enabled" Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 27/30] ext4: only check dquot_initialize_needed() when debugging Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 28/30] tools/virtio: Fix arm64 ringtest compilation error Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 29/30] vhost_vdpa: tell vqs about the negotiated Sasha Levin
2023-06-16 10:25 ` [PATCH AUTOSEL 6.3 30/30] vhost_net: revert upend_idx only on retriable error Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).