Linux v5.8.17

Signed-off-by: Justin M. Forbes <jforbes@fedoraproject.org>
This commit is contained in:
Justin M. Forbes 2020-10-29 08:04:17 -05:00
parent d354708b54
commit 011aad74d2
5 changed files with 5 additions and 346 deletions

View File

@ -1,121 +0,0 @@
From b0697932d03bd78bd4db6466939680c0fbdd8589 Mon Sep 17 00:00:00 2001
From: Mark Salter <msalter@redhat.com>
Date: Tue, 15 Sep 2020 16:41:09 -0400
Subject: [PATCH] drivers/perf: xgene_pmu: Fix uninitialized resource struct
This splat was reported on newer Fedora kernels booting on certain
X-gene based machines:
xgene-pmu APMC0D83:00: X-Gene PMU version 3
Unable to handle kernel read from unreadable memory at virtual \
address 0000000000004006
...
Call trace:
string+0x50/0x100
vsnprintf+0x160/0x750
devm_kvasprintf+0x5c/0xb4
devm_kasprintf+0x54/0x60
__devm_ioremap_resource+0xdc/0x1a0
devm_ioremap_resource+0x14/0x20
acpi_get_pmu_hw_inf.isra.0+0x84/0x15c
acpi_pmu_dev_add+0xbc/0x21c
acpi_ns_walk_namespace+0x16c/0x1e4
acpi_walk_namespace+0xb4/0xfc
xgene_pmu_probe_pmu_dev+0x7c/0xe0
xgene_pmu_probe.part.0+0x2c0/0x310
xgene_pmu_probe+0x54/0x64
platform_drv_probe+0x60/0xb4
really_probe+0xe8/0x4a0
driver_probe_device+0xe4/0x100
device_driver_attach+0xcc/0xd4
__driver_attach+0xb0/0x17c
bus_for_each_dev+0x6c/0xb0
driver_attach+0x30/0x40
bus_add_driver+0x154/0x250
driver_register+0x84/0x140
__platform_driver_register+0x54/0x60
xgene_pmu_driver_init+0x28/0x34
do_one_initcall+0x40/0x204
do_initcalls+0x104/0x144
kernel_init_freeable+0x198/0x210
kernel_init+0x20/0x12c
ret_from_fork+0x10/0x18
Code: 91000400 110004e1 eb08009f 540000c0 (38646846)
---[ end trace f08c10566496a703 ]---
This is due to use of an uninitialized local resource struct in the xgene
pmu driver. The thunderx2_pmu driver avoids this by using the resource list
constructed by acpi_dev_get_resources() rather than using a callback from
that function. The callback in the xgene driver didn't fully initialize
the resource. So get rid of the callback and search the resource list as
done by thunderx2.
Fixes: 832c927d119b ("perf: xgene: Add APM X-Gene SoC Performance Monitoring Unit driver")
Signed-off-by: Mark Salter <msalter@redhat.com>
Link: https://lore.kernel.org/r/20200915204110.326138-1-msalter@redhat.com
Signed-off-by: Will Deacon <will@kernel.org>
---
drivers/perf/xgene_pmu.c | 32 +++++++++++++++++---------------
1 file changed, 17 insertions(+), 15 deletions(-)
diff --git a/drivers/perf/xgene_pmu.c b/drivers/perf/xgene_pmu.c
index edac28cd25dd..633cf07ba672 100644
--- a/drivers/perf/xgene_pmu.c
+++ b/drivers/perf/xgene_pmu.c
@@ -1453,17 +1453,6 @@ static char *xgene_pmu_dev_name(struct device *dev, u32 type, int id)
}
#if defined(CONFIG_ACPI)
-static int acpi_pmu_dev_add_resource(struct acpi_resource *ares, void *data)
-{
- struct resource *res = data;
-
- if (ares->type == ACPI_RESOURCE_TYPE_FIXED_MEMORY32)
- acpi_dev_resource_memory(ares, res);
-
- /* Always tell the ACPI core to skip this resource */
- return 1;
-}
-
static struct
xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu,
struct acpi_device *adev, u32 type)
@@ -1475,6 +1464,7 @@ xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu,
struct hw_pmu_info *inf;
void __iomem *dev_csr;
struct resource res;
+ struct resource_entry *rentry;
int enable_bit;
int rc;
@@ -1483,11 +1473,23 @@ xgene_pmu_dev_ctx *acpi_get_pmu_hw_inf(struct xgene_pmu *xgene_pmu,
return NULL;
INIT_LIST_HEAD(&resource_list);
- rc = acpi_dev_get_resources(adev, &resource_list,
- acpi_pmu_dev_add_resource, &res);
+ rc = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
+ if (rc <= 0) {
+ dev_err(dev, "PMU type %d: No resources found\n", type);
+ return NULL;
+ }
+
+ list_for_each_entry(rentry, &resource_list, node) {
+ if (resource_type(rentry->res) == IORESOURCE_MEM) {
+ res = *rentry->res;
+ rentry = NULL;
+ break;
+ }
+ }
acpi_dev_free_resource_list(&resource_list);
- if (rc < 0) {
- dev_err(dev, "PMU type %d: No resource address found\n", type);
+
+ if (rentry) {
+ dev_err(dev, "PMU type %d: No memory resource found\n", type);
return NULL;
}
--
2.26.2

View File

@ -1,70 +0,0 @@
From c342deae0807d249020e1edda9920255d76b58a1 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 14 Oct 2020 13:59:06 +0200
Subject: [PATCH] i2c: core: Restore acpi_walk_dep_device_list() getting called
after registering the ACPI i2c devs
Commit 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler()
before i2c_acpi_register_devices()")'s intention was to only move the
acpi_install_address_space_handler() call to the point before where
the ACPI declared i2c-children of the adapter where instantiated by
i2c_acpi_register_devices().
But i2c_acpi_install_space_handler() had a call to
acpi_walk_dep_device_list() hidden (that is I missed it) at the end
of it, so as an unwanted side-effect now acpi_walk_dep_device_list()
was also being called before i2c_acpi_register_devices().
Move the acpi_walk_dep_device_list() call to the end of
i2c_acpi_register_devices(), so that it is once again called *after*
the i2c_client-s hanging of the adapter have been created.
This fixes the Microsoft Surface Go 2 hanging at boot.
Fixes: 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()")
Suggested-by: Maximilian Luz <luzmaximilian@gmail.com>
Reported-and-tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/i2c/i2c-core-acpi.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
index 2ade99b..bbf8dd4 100644
--- a/drivers/i2c/i2c-core-acpi.c
+++ b/drivers/i2c/i2c-core-acpi.c
@@ -264,6 +264,7 @@ static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
void i2c_acpi_register_devices(struct i2c_adapter *adap)
{
acpi_status status;
+ acpi_handle handle;
if (!has_acpi_companion(&adap->dev))
return;
@@ -274,6 +275,15 @@ void i2c_acpi_register_devices(struct i2c_adapter *adap)
adap, NULL);
if (ACPI_FAILURE(status))
dev_warn(&adap->dev, "failed to enumerate I2C slaves\n");
+
+ if (!adap->dev.parent)
+ return;
+
+ handle = ACPI_HANDLE(adap->dev.parent);
+ if (!handle)
+ return;
+
+ acpi_walk_dep_device_list(handle);
}
const struct acpi_device_id *
@@ -729,7 +739,6 @@ int i2c_acpi_install_space_handler(struct i2c_adapter *adapter)
return -ENOMEM;
}
- acpi_walk_dep_device_list(handle);
return 0;
}
--
2.28.0

View File

@ -1,141 +0,0 @@
From patchwork Sat Sep 19 19:33:06 2020
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Patchwork-Submitter: Simon South <simon@simonsouth.net>
X-Patchwork-Id: 11787259
Return-Path:
<SRS0=uBh2=C4=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org>
Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org
[172.30.200.123])
by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0780618
for <patchwork-linux-arm@patchwork.kernel.org>;
Sat, 19 Sep 2020 19:33:55 +0000 (UTC)
Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by mail.kernel.org (Postfix) with ESMTPS id 9DF4C21707
for <patchwork-linux-arm@patchwork.kernel.org>;
Sat, 19 Sep 2020 19:33:55 +0000 (UTC)
Authentication-Results: mail.kernel.org;
dkim=pass (2048-bit key) header.d=lists.infradead.org
header.i=@lists.infradead.org header.b="tXxoe57q"
DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9DF4C21707
Authentication-Results: mail.kernel.org;
dmarc=none (p=none dis=none) header.from=simonsouth.net
Authentication-Results: mail.kernel.org;
spf=none
smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding:
Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive:
List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From:
Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender
:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner;
bh=rTFhR4wE/kksRMBhCZanM50Dz/U+ohZU+WFgqGfznMQ=; b=tXxoe57qQlrQ18QBvKs3JZ7wYU
mFyPVtA2yDfFfGESvkL1Xa44HehjqPoeSxNBAyejg6YfozEgeDKKVZsBEex5hw6LE56H8Iofj0pZV
AFM98+vh4tydKA7vxhGl0cm7jMVq3N68wqcikUkcdCEs3bp+5dHpOowzZaj3sm51gw/g6pD3ut1+V
IYlRTF/VuDd3IDW4o27pNrgIqWx9f+/eO1gUdxwCa4i0VNLAHXCt5ysGE+CSwVWMEcp5YN5K1iO8b
sFKtjMiOcg9wrJdEoYpiFbcHETgUGNj5wdbwRvJR2qZ36gSImyUqJobYqSUyVHCJI2JRUch3UDFtt
yDQgQ99A==;
Received: from localhost ([::1] helo=merlin.infradead.org)
by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux))
id 1kJic9-0004AL-NX; Sat, 19 Sep 2020 19:33:41 +0000
Received: from mailout.easymail.ca ([64.68.200.34])
by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux))
id 1kJic6-00049d-Ia; Sat, 19 Sep 2020 19:33:39 +0000
Received: from localhost (localhost [127.0.0.1])
by mailout.easymail.ca (Postfix) with ESMTP id C7C54A05B3;
Sat, 19 Sep 2020 19:33:37 +0000 (UTC)
X-Virus-Scanned: Debian amavisd-new at emo05-pco.easydns.vpn
Received: from mailout.easymail.ca ([127.0.0.1])
by localhost (emo05-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id G6RbiLyf29ms; Sat, 19 Sep 2020 19:33:37 +0000 (UTC)
Received: from jupiter.simonsouth.net (unknown [108.162.141.195])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by mailout.easymail.ca (Postfix) with ESMTPSA id 77C83A025D;
Sat, 19 Sep 2020 19:33:27 +0000 (UTC)
From: Simon South <simon@simonsouth.net>
To: thierry.reding@gmail.com, u.kleine-koenig@pengutronix.de,
lee.jones@linaro.org, heiko@sntech.de, linux-pwm@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org
Subject: [PATCH v2] pwm: rockchip: Keep enabled PWMs running while probing
Date: Sat, 19 Sep 2020 15:33:06 -0400
Message-Id: <20200919193306.1023-1-simon@simonsouth.net>
X-Mailer: git-send-email 2.28.0
MIME-Version: 1.0
X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3
X-CRM114-CacheID: sfid-20200919_153338_624271_ABEEE8C4
X-CRM114-Status: GOOD ( 16.76 )
X-Spam-Score: -2.3 (--)
X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary:
Content analysis details: (-2.3 points)
pts rule name description
---- ----------------------
--------------------------------------------------
-2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/,
medium trust [64.68.200.34 listed in list.dnswl.org]
0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record
-0.0 SPF_PASS SPF: sender matches SPF record
X-BeenThere: linux-arm-kernel@lists.infradead.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: <linux-arm-kernel.lists.infradead.org>
List-Unsubscribe:
<http://lists.infradead.org/mailman/options/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe>
List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/>
List-Post: <mailto:linux-arm-kernel@lists.infradead.org>
List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help>
List-Subscribe:
<http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>,
<mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe>
Cc: Simon South <simon@simonsouth.net>
Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org>
Errors-To:
linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org
Following commit cfc4c189bc70 ("pwm: Read initial hardware state at
request time") the Rockchip PWM driver can no longer assume a device's
pwm_state structure has been populated after a call to pwmchip_add().
Consequently, the test in rockchip_pwm_probe() intended to prevent the
driver from stopping PWM devices already enabled by the bootloader no
longer functions reliably and this can lead to the kernel hanging
during startup, particularly on devices like the Pinebook Pro that use
a PWM-controlled backlight for their display.
Avoid this by querying the device directly at probe time to determine
whether or not it is enabled.
Fixes: cfc4c189bc70 ("pwm: Read initial hardware state at request time")
Signed-off-by: Simon South <simon@simonsouth.net>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
---
drivers/pwm/pwm-rockchip.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pwm/pwm-rockchip.c b/drivers/pwm/pwm-rockchip.c
index eb8c9cb645a6..098e94335cb5 100644
--- a/drivers/pwm/pwm-rockchip.c
+++ b/drivers/pwm/pwm-rockchip.c
@@ -288,6 +288,7 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
const struct of_device_id *id;
struct rockchip_pwm_chip *pc;
struct resource *r;
+ u32 enable_conf, ctrl;
int ret, count;
id = of_match_device(rockchip_pwm_dt_ids, &pdev->dev);
@@ -362,7 +363,9 @@ static int rockchip_pwm_probe(struct platform_device *pdev)
}
/* Keep the PWM clk enabled if the PWM appears to be up and running. */
- if (!pwm_is_enabled(pc->chip.pwms))
+ enable_conf = pc->data->enable_conf;
+ ctrl = readl_relaxed(pc->base + pc->data->regs.ctrl);
+ if ((ctrl & enable_conf) != enable_conf)
clk_disable(pc->clk);
return 0;

View File

@ -92,7 +92,7 @@ Summary: The Linux kernel
%if 0%{?released_kernel}
# Do we have a -stable update to apply?
%define stable_update 16
%define stable_update 17
# Set rpm version accordingly
%if 0%{?stable_update}
%define stablerev %{stable_update}
@ -864,9 +864,6 @@ Patch103: arm64-tegra-Use-valid-PWM-period-for-VDD_GPU-on-Tegra210.patch
# Goes away with 5.9
Patch105: 0001-platform-x86-thinkpad_acpi-lap-or-desk-mode-interfac.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1874117
Patch107: 0001-drivers-perf-xgene_pmu-Fix-uninitialized-resource-st.patch
# https://patchwork.kernel.org/patch/11745283/
Patch108: brcmfmac-BCM4329-Fixes-and-improvement.patch
@ -878,9 +875,6 @@ Patch112: memory-tegra-Remove-GPU-from-DRM-IOMMU-group.patch
# https://patchwork.kernel.org/patch/11796255/
Patch116: arm64-dts-rockchip-disable-USB-type-c-DisplayPort.patch
# https://patchwork.kernel.org/patch/11787259/
Patch117: arm64-pwm-rockchip-Keep-enabled-PWMs-running-while-probing.patch
# Backport from 5.9
Patch118: arm64-rockchip-pinebookpro-add-fuel-gauge.patch
Patch119: arm64-tegra-enable-dfll-on-jetson-nano.patch
@ -891,12 +885,6 @@ Patch120: iommu-tegra-smmu-Fix-TLB-line-for-Tegra210.patch
# CVE-2020-16119 rhbz 1886374 1888083
Patch121: CVE-2020-16119-DCCP-CCID-structure-use-after-free.patch
# Surface Go series not booting regression fix (rhbz 1886249)
# Also fixes some touchscreen regressions:
# https://bugzilla.kernel.org/show_bug.cgi?id=209627
# Pending for inclusion into stable series
Patch123: 0001-i2c-core-Restore-acpi_walk_dep_device_list-getting-c.patch
# A patch to fix some undocumented things broke a bunch of Allwinner networks due to wrong assumptions
Patch124: 0001-update-phy-on-pine64-a64-devices.patch
# https://patchwork.kernel.org/project/linux-arm-kernel/patch/20201024162515.30032-2-wens@kernel.org/
@ -3027,6 +3015,9 @@ fi
#
#
%changelog
* Thu Oct 29 07:55:15 CDT 2020 Justin M. Forbes <jforbes@fedoraproject.org> - 5.8.17-300
- Linux v5.8.17
* Wed Oct 28 2020 Peter Robinson <pbrobinson@fedoraproject.org>
- Fixes for AllWinner wired network issues due to Realtek PHY driver change (rhbz 1889090)

View File

@ -1,2 +1,2 @@
SHA512 (linux-5.8.tar.xz) = 19c8694bda4533464877e2d976aca95f48c2c40c11efcc1dce0ca91cc5f9826110e277c7de2a49ff99af8ae1c76e275b7c463abf71fbf410956d63066dc4ee53
SHA512 (patch-5.8.16.xz) = b9f00c9aa0998e1db72ef2f3301c0082ec21e6d439394ea61876312634713ece2ca9ecce70a00af0c618dc6acbae4efb7a1b75df4d4564a672e6b8439ef13f97
SHA512 (patch-5.8.17.xz) = bdd9d37c227e605f52ccbb24715ffbc449a4b993e1afce676216e7a4f47354227c904e40f9afe70a7b85bdf25659a33eca07a224f53dbde1781222c66756d53a