From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B3D4C6FA82 for ; Wed, 21 Sep 2022 15:46:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbiIUPqb (ORCPT ); Wed, 21 Sep 2022 11:46:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230101AbiIUPq2 (ORCPT ); Wed, 21 Sep 2022 11:46:28 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38EBE7757A; Wed, 21 Sep 2022 08:46:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E1305B81D87; Wed, 21 Sep 2022 15:46:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EADFDC433C1; Wed, 21 Sep 2022 15:46:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775185; bh=DcbErEt2arJeJ4nhb+KOUORAtda2BXEm/JUMBvLmwVM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WVf+c+k89JSWTK2D1iAc61O/x/zigYjNO2tZJS9wWIi84mNfr+BnG/DrsHxBPMLvI BeH+QYe9oeQvZw2NzpdYsemy1/HWW85TV4y3Ca6dT4DdyzEvAGsVhN+swUftfQRIpx YuJBC6EErXnicqe6MMOFDBokYnYPKTHZ1BvHMqaA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sergey Shtylyov , Rob Herring , Sasha Levin Subject: [PATCH 5.19 01/38] of: fdt: fix off-by-one error in unflatten_dt_nodes() Date: Wed, 21 Sep 2022 17:45:45 +0200 Message-Id: <20220921153646.345032150@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sergey Shtylyov [ Upstream commit 2f945a792f67815abca26fa8a5e863ccf3fa1181 ] Commit 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") forgot to fix up the depth check in the loop body in unflatten_dt_nodes() which makes it possible to overflow the nps[] buffer... Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool. Fixes: 78c44d910d3e ("drivers/of: Fix depth when unflattening devicetree") Signed-off-by: Sergey Shtylyov Signed-off-by: Rob Herring Link: https://lore.kernel.org/r/7c354554-006f-6b31-c195-cdfe4caee392@omp.ru Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/of/fdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 520ed965bb7a..583ca847a39c 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -314,7 +314,7 @@ static int unflatten_dt_nodes(const void *blob, for (offset =3D 0; offset >=3D 0 && depth >=3D initial_depth; offset =3D fdt_next_node(blob, offset, &depth)) { - if (WARN_ON_ONCE(depth >=3D FDT_MAX_DEPTH)) + if (WARN_ON_ONCE(depth >=3D FDT_MAX_DEPTH - 1)) continue; =20 if (!IS_ENABLED(CONFIG_OF_KOBJ) && --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C7ACC6FA90 for ; Wed, 21 Sep 2022 15:47:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231628AbiIUPra (ORCPT ); Wed, 21 Sep 2022 11:47:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230500AbiIUPq6 (ORCPT ); Wed, 21 Sep 2022 11:46:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7952E83076; Wed, 21 Sep 2022 08:46:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 247F2B81D87; Wed, 21 Sep 2022 15:46:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 04E3AC433C1; Wed, 21 Sep 2022 15:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775214; bh=/2HbVTivqEb46PK8RhHXOVNhUdA6SbRUkyqJhXgxkCA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k+sL6qqrZv7t+H4c1SDJzrRIpS+E25LqQFU0NS3bt3OcgmPYOCbt9WjiqSAXKky5/ 1gE0rm7s0btSUmL/yYow4hJk9wjCZFyG4TO4OCgE4ucw4nKh0C/f4XVAISGGk/wr7b 0P0NlW+VRP8r871+o2TnrZVo7R6dEnETvwJX1p4k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Molly Sophia , Bjorn Andersson , Linus Walleij , Sasha Levin Subject: [PATCH 5.19 02/38] pinctrl: qcom: sc8180x: Fix gpio_wakeirq_map Date: Wed, 21 Sep 2022 17:45:46 +0200 Message-Id: <20220921153646.379439034@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Molly Sophia [ Upstream commit 6124cec530c7d8faab96d340ab2df5161e5d1c8a ] Currently in the wakeirq_map, gpio36 and gpio37 have the same wakeirq number, resulting in gpio37 being unable to trigger interrupts. It looks like that this is a typo in the wakeirq map. So fix it. Signed-off-by: Molly Sophia Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver") Tested-by: Bjorn Andersson Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220807122645.13830-2-mollysophia379@gmail= .com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/pinctrl/qcom/pinctrl-sc8180x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/= pinctrl-sc8180x.c index 6bec7f143134..b4bf009fe23e 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c +++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c @@ -1582,7 +1582,7 @@ static const int sc8180x_acpi_reserved_gpios[] =3D { static const struct msm_gpio_wakeirq_map sc8180x_pdc_map[] =3D { { 3, 31 }, { 5, 32 }, { 8, 33 }, { 9, 34 }, { 10, 100 }, { 12, 104 }, { 24, 37 }, { 26, 38 }, { 27, 41 }, { 28, 42 }, { 30, 39 }, { 36, 43 }, - { 37, 43 }, { 38, 45 }, { 39, 118 }, { 39, 125 }, { 41, 47 }, + { 37, 44 }, { 38, 45 }, { 39, 118 }, { 39, 125 }, { 41, 47 }, { 42, 48 }, { 46, 50 }, { 47, 49 }, { 48, 51 }, { 49, 53 }, { 50, 52 }, { 51, 116 }, { 51, 123 }, { 53, 54 }, { 54, 55 }, { 55, 56 }, { 56, 57 }, { 58, 58 }, { 60, 60 }, { 68, 62 }, { 70, 63 }, { 76, 86 }, --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8B2BC6FA82 for ; Wed, 21 Sep 2022 15:47:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbiIUPrd (ORCPT ); Wed, 21 Sep 2022 11:47:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230246AbiIUPrC (ORCPT ); Wed, 21 Sep 2022 11:47:02 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D82CA92F4F; Wed, 21 Sep 2022 08:47:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5BF87B82912; Wed, 21 Sep 2022 15:46:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E1C0C433D7; Wed, 21 Sep 2022 15:46:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775218; bh=8xqtOQLIJHmSa37FahNLXbW40Isx/pVyE1Otd7wZkj4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MynKv0Qce3PmnsFwZKcbxM11jjwTToUNXn/I+0/6Gi8tSO0dRwET/PV28cj03PrgR pKUCuFjUKOpgjOpwuT2fETitp5vPmOv0NSBNUExudhryhOTPpFZytDFKkXkpT6S9ey 6cIwwEyP4dXJ/jEDYxuGe0kdcP4b3FKys0A3G2UA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Molly Sophia , Bjorn Andersson , Linus Walleij , Sasha Levin Subject: [PATCH 5.19 03/38] pinctrl: qcom: sc8180x: Fix wrong pin numbers Date: Wed, 21 Sep 2022 17:45:47 +0200 Message-Id: <20220921153646.418905460@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Molly Sophia [ Upstream commit 48ec73395887694f13c9452b4dcfb43710451757 ] The pin numbers for UFS_RESET and SDC2_* are not consistent in the pinctrl driver for sc8180x. So fix it. Signed-off-by: Molly Sophia Fixes: 97423113ec4b ("pinctrl: qcom: Add sc8180x TLMM driver") Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20220807122645.13830-3-mollysophia379@gmail= .com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/pinctrl/qcom/pinctrl-sc8180x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/= pinctrl-sc8180x.c index b4bf009fe23e..704a99d2f93c 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c +++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c @@ -530,10 +530,10 @@ DECLARE_MSM_GPIO_PINS(187); DECLARE_MSM_GPIO_PINS(188); DECLARE_MSM_GPIO_PINS(189); =20 -static const unsigned int sdc2_clk_pins[] =3D { 190 }; -static const unsigned int sdc2_cmd_pins[] =3D { 191 }; -static const unsigned int sdc2_data_pins[] =3D { 192 }; -static const unsigned int ufs_reset_pins[] =3D { 193 }; +static const unsigned int ufs_reset_pins[] =3D { 190 }; +static const unsigned int sdc2_clk_pins[] =3D { 191 }; +static const unsigned int sdc2_cmd_pins[] =3D { 192 }; +static const unsigned int sdc2_data_pins[] =3D { 193 }; =20 enum sc8180x_functions { msm_mux_adsp_ext, --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C815FC6FA82 for ; Wed, 21 Sep 2022 15:47:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229929AbiIUPrg (ORCPT ); Wed, 21 Sep 2022 11:47:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231516AbiIUPrF (ORCPT ); Wed, 21 Sep 2022 11:47:05 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5E5E9323D; Wed, 21 Sep 2022 08:47:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C5AF06312E; Wed, 21 Sep 2022 15:47:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF019C433D6; Wed, 21 Sep 2022 15:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775221; bh=7r89XjSIqmxsdqJA11MBe+sbq2S+K17H1vE04rSMB7k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P1ZeQE2BXFDmWC/nmGKwJqL+vlkLg3v2ZG7eCy+aeLOcLScb8BaSQYOXTH4O0xGZ2 Pve2CnXbil351Tz0g9Rrh2K81/vO4SrN2K+vn9H8Z1jr/4i7rjDAcbkxIe9t2mPRjE 1qZ2x2jBnJ3jLB68Q/xwk9HhX90iM21n7eDWs1ek= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "=?UTF-8?q?Jo=C3=A3o=20H . =20Spies?=" , Linus Walleij , Sasha Levin Subject: [PATCH 5.19 04/38] pinctrl: rockchip: Enhance support for IRQ_TYPE_EDGE_BOTH Date: Wed, 21 Sep 2022 17:45:48 +0200 Message-Id: <20220921153646.447506473@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jo=C3=A3o H. Spies [ Upstream commit b871656aa4f54e04207f62bdd0d7572be1d86b36 ] Switching between falling/rising edges for IRQ_TYPE_EDGE_BOTH on pins that require debounce can cause the device to lose events due to a desync between pin state and irq type. This problem is resolved by switching between IRQ_TYPE_LEVEL_LOW and IRQ_TYPE_LEVEL_HIGH instead. Fixes: 936ee2675eee ("gpio/rockchip: add driver for rockchip gpio") Signed-off-by: Jo=C3=A3o H. Spies Link: https://lore.kernel.org/r/20220808025121.110223-1-jhlspies@gmail.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpio/gpio-rockchip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index e342a6dc4c6c..bb953f647864 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -418,11 +418,11 @@ static int rockchip_irq_set_type(struct irq_data *d, = unsigned int type) goto out; } else { bank->toggle_edge_mode |=3D mask; - level |=3D mask; + level &=3D ~mask; =20 /* * Determine gpio state. If 1 next interrupt should be - * falling otherwise rising. + * low otherwise high. */ data =3D readl(bank->reg_base + bank->gpio_regs->ext_port); if (data & mask) --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5E63C6FA8E for ; Wed, 21 Sep 2022 15:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231442AbiIUPrk (ORCPT ); Wed, 21 Sep 2022 11:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231561AbiIUPrI (ORCPT ); Wed, 21 Sep 2022 11:47:08 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6297A96FFB; Wed, 21 Sep 2022 08:47:06 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B5EB462C86; Wed, 21 Sep 2022 15:47:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1313C433D6; Wed, 21 Sep 2022 15:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775224; bh=APIfy+CENXuoyhydiMfxIatMOxxvZLvNCfx6BXp/sOo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QpZUP4kCfJw2uZJutoqqTahhJg79gt915tzmaVkj5wwuikIBHKB3NsM99P4IJtZD/ Xc8La9NRFfuSIvJd5505k+W/qf+oDcmR/kjA9CH7j/Bk8WhAusDoEAO39hPIkdQByY etOlpAZ77tfyNT52vcL29a3a17WE8gaOFi+/sL5I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Wu , Samuel Holland , Linus Walleij , Sasha Levin Subject: [PATCH 5.19 05/38] pinctrl: sunxi: Fix name for A100 R_PIO Date: Wed, 21 Sep 2022 17:45:49 +0200 Message-Id: <20220921153646.475718080@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Michael Wu [ Upstream commit 76648c867c6c03b8a468d9c9222025873ecc613d ] The name of A100 R_PIO driver should be sun50i-a100-r-pinctrl, not sun50iw10p1-r-pinctrl. Fixes: 473436e7647d6 ("pinctrl: sunxi: add support for the Allwinner A100 p= in controller") Signed-off-by: Michael Wu Acked-by: Samuel Holland Link: https://lore.kernel.org/r/20220819024541.74191-1-michael@allwinnertec= h.com Signed-off-by: Linus Walleij Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c b/drivers/pinctr= l/sunxi/pinctrl-sun50i-a100-r.c index 21054fcacd34..18088f6f44b2 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a100-r.c @@ -98,7 +98,7 @@ MODULE_DEVICE_TABLE(of, a100_r_pinctrl_match); static struct platform_driver a100_r_pinctrl_driver =3D { .probe =3D a100_r_pinctrl_probe, .driver =3D { - .name =3D "sun50iw10p1-r-pinctrl", + .name =3D "sun50i-a100-r-pinctrl", .of_match_table =3D a100_r_pinctrl_match, }, }; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5C4BC6FA82 for ; Wed, 21 Sep 2022 15:47:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231476AbiIUPr4 (ORCPT ); Wed, 21 Sep 2022 11:47:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231328AbiIUPr1 (ORCPT ); Wed, 21 Sep 2022 11:47:27 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F08D098CA3; Wed, 21 Sep 2022 08:47:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 0D5F9CE1DEC; Wed, 21 Sep 2022 15:47:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D42A8C433D6; Wed, 21 Sep 2022 15:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775227; bh=eDDVGGUZV6WZWx5bcgZ+MyeNahQyU8/MG6bbtAH7YN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CGlCOkPtQpW/hPa3IDC7mVSDPo7DiHvuoOrQSouvxO3x5jo9/CpwBSMHfh0X9hNX7 1aR4EZOUS4NMVTqokKr4wo6/W42jwXS/Kyw9sOSy1DIbFqKetCBW08e8XoVCXapNQK agJXNRLRRM3jOUnhsU8ceiJgPgUrjt4nwkrXfYFw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Coddington , Trond Myklebust , Sasha Levin Subject: [PATCH 5.19 06/38] SUNRPC: Fix call completion races with call_decode() Date: Wed, 21 Sep 2022 17:45:50 +0200 Message-Id: <20220921153646.503251236@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Trond Myklebust [ Upstream commit 17814819ac9829a437e06fbb5c7056a1f4f893da ] We need to make sure that the req->rq_private_buf is completely up to date before we make req->rq_reply_bytes_recvd visible to the call_decode() routine in order to avoid triggering the WARN_ON(). Reported-by: Benjamin Coddington Fixes: 72691a269f0b ("SUNRPC: Don't reuse bvec on retransmission of the req= uest") Tested-by: Benjamin Coddington Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- net/sunrpc/xprt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 53b024cea3b3..5ecafffe7ce5 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c @@ -1179,11 +1179,8 @@ xprt_request_dequeue_receive_locked(struct rpc_task = *task) { struct rpc_rqst *req =3D task->tk_rqstp; =20 - if (test_and_clear_bit(RPC_TASK_NEED_RECV, &task->tk_runstate)) { + if (test_and_clear_bit(RPC_TASK_NEED_RECV, &task->tk_runstate)) xprt_request_rb_remove(req->rq_xprt, req); - xdr_free_bvec(&req->rq_rcv_buf); - req->rq_private_buf.bvec =3D NULL; - } } =20 /** @@ -1221,6 +1218,8 @@ void xprt_complete_rqst(struct rpc_task *task, int co= pied) =20 xprt->stat.recvs++; =20 + xdr_free_bvec(&req->rq_rcv_buf); + req->rq_private_buf.bvec =3D NULL; req->rq_private_buf.len =3D copied; /* Ensure all writes are done before we update */ /* req->rq_reply_bytes_recvd */ @@ -1453,6 +1452,7 @@ xprt_request_dequeue_xprt(struct rpc_task *task) xprt_request_dequeue_transmit_locked(task); xprt_request_dequeue_receive_locked(task); spin_unlock(&xprt->queue_lock); + xdr_free_bvec(&req->rq_rcv_buf); } } =20 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08685ECAAD8 for ; Wed, 21 Sep 2022 15:48:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231158AbiIUPsC (ORCPT ); Wed, 21 Sep 2022 11:48:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbiIUPra (ORCPT ); Wed, 21 Sep 2022 11:47:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DB699A687; Wed, 21 Sep 2022 08:47:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C42E0B82714; Wed, 21 Sep 2022 15:47:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 07D99C433C1; Wed, 21 Sep 2022 15:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775230; bh=Z/e0vmhAC7XFBvq3h2gIDwjZB3brPLREn1+e+ct5G8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BlEO2isaoKMre5tBrh2E16fhHeTo/rV9wty89cfxCXVtdd9RcA8fegY4l/jK+fJRd RMzT1//mMCOEg33UyiKn37g+JjiyVqb2hY7oTPExrs+7cqKSRc8JiDOB8MivFrbTG3 jnsvIkZ8rjNuwuYxGWReM++ABzQq2/bkmy09Y10I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuck Lever III , Trond Myklebust , Sasha Levin Subject: [PATCH 5.19 07/38] NFSv4: Turn off open-by-filehandle and NFS re-export for NFSv4.0 Date: Wed, 21 Sep 2022 17:45:51 +0200 Message-Id: <20220921153646.531097048@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Trond Myklebust [ Upstream commit 2a9d683b48c8a87e61a4215792d44c90bcbbb536 ] The NFSv4.0 protocol only supports open() by name. It cannot therefore be used with open_by_handle() and friends, nor can it be re-exported by knfsd. Reported-by: Chuck Lever III Fixes: 20fa19027286 ("nfs: add export operations") Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- fs/nfs/super.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 6ab5eeb000dc..5e4bacb77bfc 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -1051,22 +1051,31 @@ static void nfs_fill_super(struct super_block *sb, = struct nfs_fs_context *ctx) if (ctx->bsize) sb->s_blocksize =3D nfs_block_size(ctx->bsize, &sb->s_blocksize_bits); =20 - if (server->nfs_client->rpc_ops->version !=3D 2) { - /* The VFS shouldn't apply the umask to mode bits. We will do - * so ourselves when necessary. + switch (server->nfs_client->rpc_ops->version) { + case 2: + sb->s_time_gran =3D 1000; + sb->s_time_min =3D 0; + sb->s_time_max =3D U32_MAX; + break; + case 3: + /* + * The VFS shouldn't apply the umask to mode bits. + * We will do so ourselves when necessary. */ sb->s_flags |=3D SB_POSIXACL; sb->s_time_gran =3D 1; - sb->s_export_op =3D &nfs_export_ops; - } else - sb->s_time_gran =3D 1000; - - if (server->nfs_client->rpc_ops->version !=3D 4) { sb->s_time_min =3D 0; sb->s_time_max =3D U32_MAX; - } else { + sb->s_export_op =3D &nfs_export_ops; + break; + case 4: + sb->s_flags |=3D SB_POSIXACL; + sb->s_time_gran =3D 1; sb->s_time_min =3D S64_MIN; sb->s_time_max =3D S64_MAX; + if (server->caps & NFS_CAP_ATOMIC_OPEN_V1) + sb->s_export_op =3D &nfs_export_ops; + break; } =20 sb->s_magic =3D NFS_SUPER_MAGIC; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF95FC6FA82 for ; Wed, 21 Sep 2022 15:48:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231633AbiIUPsR (ORCPT ); Wed, 21 Sep 2022 11:48:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231638AbiIUPrg (ORCPT ); Wed, 21 Sep 2022 11:47:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 276259A9EE; Wed, 21 Sep 2022 08:47:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 00344B830A1; Wed, 21 Sep 2022 15:47:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 337E4C433C1; Wed, 21 Sep 2022 15:47:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775233; bh=v90XGXtjV5KepYTypBN1Kkz6+3fOaoGS4G1/0MG3RGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g9V10HSGhdzEysDDcZBhlJLCxzXK9KY86BVwC/SqbmIOH9F766a4x9DNlLBc9LjbR 7UeTfU52fYlXjMcFOewGzQb+sskXlUd/hQftLmS4Kd86p7vwx8S+W5hdtrgmhAeOQc e7BnunW49lH/Zlw0wCeFZPe5EyypSMjp6taBldr8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Bartosz Golaszewski , Sasha Levin Subject: [PATCH 5.19 08/38] gpio: mpc8xxx: Fix support for IRQ_TYPE_LEVEL_LOW flow_type in mpc85xx Date: Wed, 21 Sep 2022 17:45:52 +0200 Message-Id: <20220921153646.560374153@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pali Roh=C3=A1r [ Upstream commit 279c12df8d2efb28def9d037f288cbfb97c30fe2 ] Commit e39d5ef67804 ("powerpc/5xxx: extend mpc8xxx_gpio driver to support mpc512x gpios") implemented support for IRQ_TYPE_LEVEL_LOW flow type in mpc512x via falling edge type. Do same for mpc85xx which support was added in commit 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio"). Fixes probing of lm90 hwmon driver on mpc85xx based board which use level interrupt. Without it kernel prints error and refuse lm90 to work: [ 15.258370] genirq: Setting trigger mode 8 for irq 49 failed (mpc8xx= x_irq_set_type+0x0/0xf8) [ 15.267168] lm90 0-004c: cannot request IRQ 49 [ 15.272708] lm90: probe of 0-004c failed with error -22 Fixes: 345e5c8a1cc3 ("powerpc: Add interrupt support to mpc8xxx_gpio") Signed-off-by: Pali Roh=C3=A1r Signed-off-by: Bartosz Golaszewski Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpio/gpio-mpc8xxx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-mpc8xxx.c b/drivers/gpio/gpio-mpc8xxx.c index a964e25ea620..763256efddc2 100644 --- a/drivers/gpio/gpio-mpc8xxx.c +++ b/drivers/gpio/gpio-mpc8xxx.c @@ -172,6 +172,7 @@ static int mpc8xxx_irq_set_type(struct irq_data *d, uns= igned int flow_type) =20 switch (flow_type) { case IRQ_TYPE_EDGE_FALLING: + case IRQ_TYPE_LEVEL_LOW: raw_spin_lock_irqsave(&mpc8xxx_gc->lock, flags); gc->write_reg(mpc8xxx_gc->regs + GPIO_ICR, gc->read_reg(mpc8xxx_gc->regs + GPIO_ICR) --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D45BAECAAD8 for ; Wed, 21 Sep 2022 15:48:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230466AbiIUPsX (ORCPT ); Wed, 21 Sep 2022 11:48:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231645AbiIUPrh (ORCPT ); Wed, 21 Sep 2022 11:47:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3ABE80F5C; Wed, 21 Sep 2022 08:47:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0F130B830A3; Wed, 21 Sep 2022 15:47:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4461FC433B5; Wed, 21 Sep 2022 15:47:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775236; bh=yNHMkSLrb9vN/yMd9ISBZTSflWXS1fggNsB3gjeKxJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nDwao/qTEIkc3ToyMIcRjINEjHTLFBN6iUFihHBOEyTIpRkO/aEv7c9if9AWIhOM4 uyogsabjUCdJK/54HO5IYIi3acAREoiUMqYeaANTYM0hmQ02u4k0YySHHQKAahE1qK piHxqfFmueJU4fVkMzp7Xb85/NdBmefJRPzK0J4k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yue Cui , Anna Schumaker , Trond Myklebust , Sasha Levin Subject: [PATCH 5.19 09/38] NFSv4.2: Update mode bits after ALLOCATE and DEALLOCATE Date: Wed, 21 Sep 2022 17:45:53 +0200 Message-Id: <20220921153646.597985540@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Anna Schumaker [ Upstream commit d7a5118635e725d195843bda80cc5c964d93ef31 ] The fallocate call invalidates suid and sgid bits as part of normal operation. We need to mark the mode bits as invalid when using fallocate with an suid so these will be updated the next time the user looks at them. This fixes xfstests generic/683 and generic/684. Reported-by: Yue Cui Fixes: 913eca1aea87 ("NFS: Fallocate should use the nfs4_fattr_bitmap") Signed-off-by: Anna Schumaker Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- fs/nfs/internal.h | 25 +++++++++++++++++++++++++ fs/nfs/nfs42proc.c | 9 +++++++-- fs/nfs/write.c | 25 ------------------------- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 8f8cd6e2d4db..597e3ce3f148 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -604,6 +604,31 @@ static inline gfp_t nfs_io_gfp_mask(void) return GFP_KERNEL; } =20 +/* + * Special version of should_remove_suid() that ignores capabilities. + */ +static inline int nfs_should_remove_suid(const struct inode *inode) +{ + umode_t mode =3D inode->i_mode; + int kill =3D 0; + + /* suid always must be killed */ + if (unlikely(mode & S_ISUID)) + kill =3D ATTR_KILL_SUID; + + /* + * sgid without any exec bits is just a mandatory locking mark; leave + * it alone. If some exec bits are set, it's a real sgid; kill it. + */ + if (unlikely((mode & S_ISGID) && (mode & S_IXGRP))) + kill |=3D ATTR_KILL_SGID; + + if (unlikely(kill && S_ISREG(mode))) + return kill; + + return 0; +} + /* unlink.c */ extern struct rpc_task * nfs_async_rename(struct inode *old_dir, struct inode *new_dir, diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 068c45b3bc1a..6dab9e408372 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -78,10 +78,15 @@ static int _nfs42_proc_fallocate(struct rpc_message *ms= g, struct file *filep, =20 status =3D nfs4_call_sync(server->client, server, msg, &args.seq_args, &res.seq_res, 0); - if (status =3D=3D 0) + if (status =3D=3D 0) { + if (nfs_should_remove_suid(inode)) { + spin_lock(&inode->i_lock); + nfs_set_cache_invalid(inode, NFS_INO_INVALID_MODE); + spin_unlock(&inode->i_lock); + } status =3D nfs_post_op_update_inode_force_wcc(inode, res.falloc_fattr); - + } if (msg->rpc_proc =3D=3D &nfs4_procedures[NFSPROC4_CLNT_ALLOCATE]) trace_nfs4_fallocate(inode, &args, status); else diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 5d7e1c206184..4212473c69ee 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1497,31 +1497,6 @@ void nfs_commit_prepare(struct rpc_task *task, void = *calldata) NFS_PROTO(data->inode)->commit_rpc_prepare(task, data); } =20 -/* - * Special version of should_remove_suid() that ignores capabilities. - */ -static int nfs_should_remove_suid(const struct inode *inode) -{ - umode_t mode =3D inode->i_mode; - int kill =3D 0; - - /* suid always must be killed */ - if (unlikely(mode & S_ISUID)) - kill =3D ATTR_KILL_SUID; - - /* - * sgid without any exec bits is just a mandatory locking mark; leave - * it alone. If some exec bits are set, it's a real sgid; kill it. - */ - if (unlikely((mode & S_ISGID) && (mode & S_IXGRP))) - kill |=3D ATTR_KILL_SGID; - - if (unlikely(kill && S_ISREG(mode))) - return kill; - - return 0; -} - static void nfs_writeback_check_extend(struct nfs_pgio_header *hdr, struct nfs_fattr *fattr) { --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 818E3ECAAD8 for ; Wed, 21 Sep 2022 15:46:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbiIUPqr (ORCPT ); Wed, 21 Sep 2022 11:46:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230474AbiIUPqg (ORCPT ); Wed, 21 Sep 2022 11:46:36 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2CE37A752; Wed, 21 Sep 2022 08:46:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6C924B81D4E; Wed, 21 Sep 2022 15:46:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDC60C433C1; Wed, 21 Sep 2022 15:46:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775193; bh=g1RKYksMN4B918rVOxEEsGtuG8Q/r3hPQIjUx2+npIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wARFgvBxwQwsRZnPahr88JTfdMM7OuLlVkUq8yORI9RIn2GigmXcbSi7nMfBrxv1m 1UM/Ov1FMcvoGOPR5DpOTp1bfa7hlg8cZsOzXdwuQGBl/9lZ4krtvhkn325seeVYp8 HnH9ugH5wzskatkj7pvnDXLYb7wGGuwgk7ijBcxA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Aloni , Trond Myklebust , Sasha Levin Subject: [PATCH 5.19 10/38] Revert "SUNRPC: Remove unreachable error condition" Date: Wed, 21 Sep 2022 17:45:54 +0200 Message-Id: <20220921153646.626147278@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Dan Aloni [ Upstream commit 13bd9014180425f5a35eaf3735971d582c299292 ] This reverts commit efe57fd58e1cb77f9186152ee12a8aa4ae3348e0. The assumption that it is impossible to return an ERR pointer from rpc_run_task() no longer holds due to commit 25cf32ad5dba ("SUNRPC: Handle allocation failure in rpc_new_task()"). Fixes: 25cf32ad5dba ('SUNRPC: Handle allocation failure in rpc_new_task()') Fixes: efe57fd58e1c ('SUNRPC: Remove unreachable error condition') Signed-off-by: Dan Aloni Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- net/sunrpc/clnt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index c1a01947530f..db8c0de1de42 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -2858,6 +2858,9 @@ int rpc_clnt_test_and_add_xprt(struct rpc_clnt *clnt, =20 task =3D rpc_call_null_helper(clnt, xprt, NULL, RPC_TASK_ASYNC, &rpc_cb_add_xprt_call_ops, data); + if (IS_ERR(task)) + return PTR_ERR(task); + data->xps->xps_nunique_destaddr_xprts++; rpc_put_task(task); success: --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 255F4ECAAD8 for ; Wed, 21 Sep 2022 15:46:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231250AbiIUPq4 (ORCPT ); Wed, 21 Sep 2022 11:46:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231171AbiIUPqo (ORCPT ); Wed, 21 Sep 2022 11:46:44 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D6A167C75E; Wed, 21 Sep 2022 08:46:38 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 61EEDB81D4E; Wed, 21 Sep 2022 15:46:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1DBAC433C1; Wed, 21 Sep 2022 15:46:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775196; bh=FVu0qOm7anUZ1Ub0CCc959D/nFP+NEmD3sIKL4tT7Yo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=br69lf3EcidKLQtmGnpvVwIMf6Mzwz0EuQwAoxxooiWNgwINNVQpQpA2DyjPw9OYr qgTnXkpFnaH4ExikcrNpRZOZcLqwlSOnoR6az6md/vN9EnQy0ShrlVKlawBOg+GB7+ 3PZYYANHrx/WTIaDZ+QDQkUuLg4YccovIjnUdTE0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Douglas Anderson , Chen-Yu Tsai , Sasha Levin Subject: [PATCH 5.19 11/38] drm/panel-edp: Fix delays for Innolux N116BCA-EA1 Date: Wed, 21 Sep 2022 17:45:55 +0200 Message-Id: <20220921153646.655164587@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Chen-Yu Tsai [ Upstream commit 8f7115c1923cd11146525f1615beb29018001964 ] Commit 52824ca4502d ("drm/panel-edp: Better describe eDP panel delays") clarified the various delays used for eDP panels, tying them to the eDP panel timing diagram. For Innolux N116BCA-EA1, .prepare_to_enable would be: t4_min + t5_min + t6_min + max(t7_max, t8_min) Since t4_min and t5_min are both 0, the panel can use either .enable or .prepare_to_enable. As .enable is better defined, switch to using .enable for this panel. Also add .disable =3D 50, based on the datasheet's t9_min value. This effectively makes the delays the same as delay_200_500_e80_d50. Cc: Douglas Anderson Fixes: 51d35631c970 ("drm/panel-simple: Add N116BCA-EA1") Signed-off-by: Chen-Yu Tsai Reviewed-by: Douglas Anderson Signed-off-by: Douglas Anderson Link: https://patchwork.freedesktop.org/patch/msgid/20220908085454.1024167-= 1-wenst@chromium.org Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/panel/panel-edp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/pane= l-edp.c index a189982601a4..e8040defe607 100644 --- a/drivers/gpu/drm/panel/panel-edp.c +++ b/drivers/gpu/drm/panel/panel-edp.c @@ -1270,7 +1270,8 @@ static const struct panel_desc innolux_n116bca_ea1 = =3D { }, .delay =3D { .hpd_absent =3D 200, - .prepare_to_enable =3D 80, + .enable =3D 80, + .disable =3D 50, .unprepare =3D 500, }, }; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ABA95C6FA82 for ; Wed, 21 Sep 2022 15:47:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231484AbiIUPrA (ORCPT ); Wed, 21 Sep 2022 11:47:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231285AbiIUPqr (ORCPT ); Wed, 21 Sep 2022 11:46:47 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F261D83045; Wed, 21 Sep 2022 08:46:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 94FDFB81D87; Wed, 21 Sep 2022 15:46:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DCF20C433D7; Wed, 21 Sep 2022 15:46:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775199; bh=6Cceott/YXODbjHwpzVuoUWmAECTmhrg0aAWRMZUg3U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hXL4irKtoyTCJBirKhLGAjc3+XlqYdWrPe9P0GzOLX7N9Sb7Rk4pzDki1r1uthikf AMZIobGeuFRfHdBDBTOlWA7mFnueN4BSsN+I3cxeh84sMqy9QygR8C66zsu77NpKCV G9jaQzSEvHNyu3dSTdnGeTxARDQ+RQ6X4I1U7JJw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stuart Menefy , Neil Armstrong , Sasha Levin Subject: [PATCH 5.19 12/38] drm/meson: Correct OSD1 global alpha value Date: Wed, 21 Sep 2022 17:45:56 +0200 Message-Id: <20220921153646.683296415@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stuart Menefy [ Upstream commit 6836829c8ea453c9e3e518e61539e35881c8ed5f ] VIU_OSD1_CTRL_STAT.GLOBAL_ALPHA is a 9 bit field, so the maximum value is 0x100 not 0xff. This matches the vendor kernel. Signed-off-by: Stuart Menefy Fixes: bbbe775ec5b5 ("drm: Add support for Amlogic Meson Graphic Controller= ") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220908155103.686904-1= -stuart.menefy@mathembedded.com Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/meson/meson_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_plane.c b/drivers/gpu/drm/meson/me= son_plane.c index 8640a8a8a469..44aa52629443 100644 --- a/drivers/gpu/drm/meson/meson_plane.c +++ b/drivers/gpu/drm/meson/meson_plane.c @@ -168,7 +168,7 @@ static void meson_plane_atomic_update(struct drm_plane = *plane, =20 /* Enable OSD and BLK0, set max global alpha */ priv->viu.osd1_ctrl_stat =3D OSD_ENABLE | - (0xFF << OSD_GLOBAL_ALPHA_SHIFT) | + (0x100 << OSD_GLOBAL_ALPHA_SHIFT) | OSD_BLK0_ENABLE; =20 priv->viu.osd1_ctrl_stat2 =3D readl(priv->io_base + --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 26D67ECAAD8 for ; Wed, 21 Sep 2022 15:47:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231546AbiIUPrG (ORCPT ); Wed, 21 Sep 2022 11:47:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbiIUPqx (ORCPT ); Wed, 21 Sep 2022 11:46:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCDB76E2EC; Wed, 21 Sep 2022 08:46:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7A29EB81D4E; Wed, 21 Sep 2022 15:46:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E194EC433D6; Wed, 21 Sep 2022 15:46:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775202; bh=8KchVOiklKldhDSmnwE9qC9ds7RMp8LSqO/hd4CFmxA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GrwoWYndGtJqjIroAnMNuX+ITi0yRi1tE/YK0mflp6hVqSg1KpfPkvGI9pj7/pLIY ZXiFhpWlfNUS07QJJzULA1NiLlgFnyLxAIPZQbLMH/1fwLSwRn2PIalCF+svd7Rg65 NwHiDXrgxCqyj3IKl9EqI6XJbUoBDi5wimeg3Xcw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stuart Menefy , Neil Armstrong , Sasha Levin Subject: [PATCH 5.19 13/38] drm/meson: Fix OSD1 RGB to YCbCr coefficient Date: Wed, 21 Sep 2022 17:45:57 +0200 Message-Id: <20220921153646.711370175@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stuart Menefy [ Upstream commit 6463d3930ba5b6addcfc8f80a4543976a2fc7656 ] VPP_WRAP_OSD1_MATRIX_COEF22.Coeff22 is documented as being bits 0-12, not 16-28. Without this the output tends to have a pink hue, changing it results in better color accuracy. The vendor kernel doesn't use this register. However the code which sets VIU2_OSD1_MATRIX_COEF22 also uses bits 0-12. There is a slightly different style of registers for configuring some of the other matrices, which do use bits 16-28 for this coefficient, but those have names ending in MATRIX_COEF22_30, and this is not one of those. Signed-off-by: Stuart Menefy Fixes: 728883948b0d ("drm/meson: Add G12A Support for VIU setup") Reviewed-by: Neil Armstrong Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20220908155243.687143-1= -stuart.menefy@mathembedded.com Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/meson/meson_viu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meso= n_viu.c index bb7e109534de..d4b907889a21 100644 --- a/drivers/gpu/drm/meson/meson_viu.c +++ b/drivers/gpu/drm/meson/meson_viu.c @@ -94,7 +94,7 @@ static void meson_viu_set_g12a_osd1_matrix(struct meson_d= rm *priv, priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF11_12)); writel(((m[9] & 0x1fff) << 16) | (m[10] & 0x1fff), priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF20_21)); - writel((m[11] & 0x1fff) << 16, + writel((m[11] & 0x1fff), priv->io_base + _REG(VPP_WRAP_OSD1_MATRIX_COEF22)); =20 writel(((m[18] & 0xfff) << 16) | (m[19] & 0xfff), --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C944C6FA82 for ; Wed, 21 Sep 2022 15:47:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231436AbiIUPrJ (ORCPT ); Wed, 21 Sep 2022 11:47:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231216AbiIUPqy (ORCPT ); Wed, 21 Sep 2022 11:46:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6820B77574; Wed, 21 Sep 2022 08:46:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 07122630B2; Wed, 21 Sep 2022 15:46:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6A35C433D6; Wed, 21 Sep 2022 15:46:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775205; bh=MOWdypYyqnky78kZC6msHskSNBx7xgN9K0cfvYK41j0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=t3M4hZWYZUvWwxzY47KrSCgtyzqPMWQAfjEEsUX09+fW/LXdlK54vhmVtGdjL4ila zyOIMXtNbRJ0trlXWlYcjE9VnBIwZZbd3VpKAf/p/LeJcH6St7TDkyBd9+E4Rdkfue 13XxBH2uvTv+Cey62NZYeA1HmRKtWsZImwBV3MRY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sascha Hauer , Michael Riesch , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.19 14/38] drm/rockchip: vop2: Fix eDP/HDMI sync polarities Date: Wed, 21 Sep 2022 17:45:58 +0200 Message-Id: <20220921153646.739629402@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sascha Hauer [ Upstream commit 35b513a74eabf09bd718e04fd9e62b09c022807f ] The hsync/vsync polarities were not honoured for the eDP and HDMI ports. Add the register settings to configure the polarities as requested by the DRM_MODE_FLAG_PHSYNC/DRM_MODE_FLAG_PVSYNC flags. Signed-off-by: Sascha Hauer Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Tested-by: Michael Riesch Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20220815133942.4051532-= 1-s.hauer@pengutronix.de Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm= /rockchip/rockchip_drm_vop2.c index d6e831576cd2..88271f04615b 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c @@ -1436,11 +1436,15 @@ static void rk3568_set_intf_mux(struct vop2_video_p= ort *vp, int id, die &=3D ~RK3568_SYS_DSP_INFACE_EN_HDMI_MUX; die |=3D RK3568_SYS_DSP_INFACE_EN_HDMI | FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_HDMI_MUX, vp->id); + dip &=3D ~RK3568_DSP_IF_POL__HDMI_PIN_POL; + dip |=3D FIELD_PREP(RK3568_DSP_IF_POL__HDMI_PIN_POL, polflags); break; case ROCKCHIP_VOP2_EP_EDP0: die &=3D ~RK3568_SYS_DSP_INFACE_EN_EDP_MUX; die |=3D RK3568_SYS_DSP_INFACE_EN_EDP | FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_EDP_MUX, vp->id); + dip &=3D ~RK3568_DSP_IF_POL__EDP_PIN_POL; + dip |=3D FIELD_PREP(RK3568_DSP_IF_POL__EDP_PIN_POL, polflags); break; case ROCKCHIP_VOP2_EP_MIPI0: die &=3D ~RK3568_SYS_DSP_INFACE_EN_MIPI0_MUX; --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B738C6FA82 for ; Wed, 21 Sep 2022 15:47:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230081AbiIUPrO (ORCPT ); Wed, 21 Sep 2022 11:47:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231236AbiIUPqy (ORCPT ); Wed, 21 Sep 2022 11:46:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AC7F81B39; Wed, 21 Sep 2022 08:46:49 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id EAE9B62C7F; Wed, 21 Sep 2022 15:46:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFAE4C433D7; Wed, 21 Sep 2022 15:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775208; bh=uRxN/pnkVBant0KUWFnWEcMugLocOezPnMpJaeG74Bg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YO4lh29I+1n/zEoR1Swl+q4nQymE1ch1VXnkzHh2g617TiZJK+8xI/z9Rx1GWxGSI A0pv1Pj4KmnnFhDiKi9wt3z9Iy9B+mGGmTbD75FSA2Hb9QbshL2E9VWe+sNLx0NT4a xrHbbczRdEh0U/GtCytyadSSEJj7QxBKI2M0B0Bw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Manasi Navare , Vandita Kulkarni , Matt Roper , Ankit Nautiyal , Rodrigo Vivi , Sasha Levin Subject: [PATCH 5.19 15/38] drm/i915/vdsc: Set VDSC PIC_HEIGHT before using for DP DSC Date: Wed, 21 Sep 2022 17:45:59 +0200 Message-Id: <20220921153646.768201725@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ankit Nautiyal [ Upstream commit 0785691f5711a8f210bb15a5177c2999ebd3702e ] Currently, pic_height of vdsc_cfg structure is being used to calculate slice_height, before it is set for DP. So taking out the lines to set pic_height from the helper intel_dp_dsc_compute_params() to individual encoders, and setting pic_height, before it is used to calculate slice_height for DP. Fixes: 5a6d866f8e1b ("drm/i915: Get slice height before computing rc params= ") Cc: Manasi Navare Cc: Vandita Kulkarni Cc: Matt Roper Signed-off-by: Ankit Nautiyal Reviewed-by: Vandita Kulkarni Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220902103219.1168781-= 1-ankit.k.nautiyal@intel.com (cherry picked from commit e72df53dcb01ec58e0410da353551adf94c8d0f1) Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/i915/display/icl_dsi.c | 2 ++ drivers/gpu/drm/i915/display/intel_dp.c | 1 + drivers/gpu/drm/i915/display/intel_vdsc.c | 1 - 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/= display/icl_dsi.c index 19bf717fd4cb..5508ebb9eb43 100644 --- a/drivers/gpu/drm/i915/display/icl_dsi.c +++ b/drivers/gpu/drm/i915/display/icl_dsi.c @@ -1629,6 +1629,8 @@ static int gen11_dsi_dsc_compute_config(struct intel_= encoder *encoder, /* FIXME: initialize from VBT */ vdsc_cfg->rc_model_size =3D DSC_RC_MODEL_SIZE_CONST; =20 + vdsc_cfg->pic_height =3D crtc_state->hw.adjusted_mode.crtc_vdisplay; + ret =3D intel_dsc_compute_params(crtc_state); if (ret) return ret; diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915= /display/intel_dp.c index 41aaa6c98114..fe8b6b72970a 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -1379,6 +1379,7 @@ static int intel_dp_dsc_compute_params(struct intel_e= ncoder *encoder, * DP_DSC_RC_BUF_SIZE for this. */ vdsc_cfg->rc_model_size =3D DSC_RC_MODEL_SIZE_CONST; + vdsc_cfg->pic_height =3D crtc_state->hw.adjusted_mode.crtc_vdisplay; =20 /* * Slice Height of 8 works for all currently available panels. So start diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c b/drivers/gpu/drm/i9= 15/display/intel_vdsc.c index 43e1bbc1e303..ca530f0733e0 100644 --- a/drivers/gpu/drm/i915/display/intel_vdsc.c +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c @@ -460,7 +460,6 @@ int intel_dsc_compute_params(struct intel_crtc_state *p= ipe_config) u8 i =3D 0; =20 vdsc_cfg->pic_width =3D pipe_config->hw.adjusted_mode.crtc_hdisplay; - vdsc_cfg->pic_height =3D pipe_config->hw.adjusted_mode.crtc_vdisplay; vdsc_cfg->slice_width =3D DIV_ROUND_UP(vdsc_cfg->pic_width, pipe_config->dsc.slice_count); =20 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C973FECAAD8 for ; Wed, 21 Sep 2022 15:47:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231601AbiIUPrT (ORCPT ); Wed, 21 Sep 2022 11:47:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbiIUPq4 (ORCPT ); Wed, 21 Sep 2022 11:46:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE6E27E329; Wed, 21 Sep 2022 08:46:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8C174B81D87; Wed, 21 Sep 2022 15:46:52 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F151FC433D7; Wed, 21 Sep 2022 15:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775211; bh=KGEIq67dvPNj2TD93txwrrk9cX4Fxe3xdIJc/dUsAdM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F/kEZG0QwzqWcah7TfjmJX37QgL1kQYZ+crEeEHDC1bl1w13E7dCuDfgBgE8svAD6 2X804N7Zi4+WN3eIwnU5xzgpMX8d/C9wW2z0erDRLtPgs3pUU8X53QMjLHWG1dN5DS QuBRgJiAiNGJeIyBMM8RxcVDYjlpcpTMd/VVPF9o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alan Previn , Umesh Nerlige Ramappa , Tvrtko Ursulin , John Harrison , Sasha Levin Subject: [PATCH 5.19 16/38] drm/i915/guc: Dont update engine busyness stats too frequently Date: Wed, 21 Sep 2022 17:46:00 +0200 Message-Id: <20220921153646.796421323@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Alan Previn [ Upstream commit 59bcdb564b3bac3e86cc274e5dec05d4647ce47f ] Using two different types of workoads, it was observed that guc_update_engine_gt_clks was being called too frequently and/or causing a CPU-to-lmem bandwidth hit over PCIE. Details on the workloads and numbers are in the notes below. Background: At the moment, guc_update_engine_gt_clks can be invoked via one of 3 ways. #1 and #2 are infrequent under normal operating conditions: 1.When a predefined "ping_delay" timer expires so that GuC- busyness can sample the GTPM clock counter to ensure it doesn't miss a wrap-around of the 32-bits of the HW counter. (The ping_delay is calculated based on 1/8th the time taken for the counter go from 0x0 to 0xffffffff based on the GT frequency. This comes to about once every 28 seconds at a GT frequency of 19.2Mhz). 2.In preparation for a gt reset. 3.In response to __gt_park events (as the gt power management puts the gt into a lower power state when there is no work being done). Root-cause: For both the workloads described farther below, it was observed that when user space calls IOCTLs that unparks the gt momentarily and repeats such calls many times in quick succession, it triggers calling guc_update_engine_gt_clks as many times. However, the primary purpose of guc_update_engine_gt_clks is to ensure we don't miss the wraparound while the counter is ticking. Thus, the solution is to ensure we skip that check if gt_park is calling this function earlier than necessary. Solution: Snapshot jiffies when we do actually update the busyness stats. Then get the new jiffies every time intel_guc_busyness_park is called and bail if we are being called too soon. Use half of the ping_delay as a safe threshold. NOTE1: Workload1: IGTs' gem_create was modified to create a file handle, allocate memory with sizes that range from a min of 4K to the max supported (in power of two step-sizes). Its maps, modifies and reads back the memory. Allocations and modification is repeated until total memory allocation reaches the max. Then the file handle is closed. With this workload, guc_update_engine_gt_clks was called over 188 thousand times in the span of 15 seconds while this test ran three times. With this patch, the number of calls reduced to 14. NOTE2: Workload2: 30 transcode sessions are created in quick succession. While these sessions are created, pcm-iio tool was used to measure I/O read operation bandwidth consumption sampled at 100 milisecond intervals over the course of 20 seconds. The total bandwidth consumed over 20 seconds without this patch was measured at average at 311KBps per sample. With this patch, the number went down to about 175Kbps which is about a 43% savings. Signed-off-by: Alan Previn Reviewed-by: Umesh Nerlige Ramappa Acked-by: Tvrtko Ursulin Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220623023157.211650-2= -alan.previn.teres.alexis@intel.com Stable-dep-of: aee5ae7c8492 ("drm/i915/guc: Cancel GuC engine busyness work= er synchronously") Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/i915/gt/uc/intel_guc.h | 8 ++++++++ drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 13 +++++++++++++ 2 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/= gt/uc/intel_guc.h index 9feda105f913..a7acffbf15d1 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h @@ -235,6 +235,14 @@ struct intel_guc { * @shift: Right shift value for the gpm timestamp */ u32 shift; + + /** + * @last_stat_jiffies: jiffies at last actual stats collection time + * We use this timestamp to ensure we don't oversample the + * stats because runtime power management events can trigger + * stats collection at much higher rates than required. + */ + unsigned long last_stat_jiffies; } timestamp; =20 #ifdef CONFIG_DRM_I915_SELFTEST diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gp= u/drm/i915/gt/uc/intel_guc_submission.c index 26a051ef119d..96022f49f9b5 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -1365,6 +1365,8 @@ static void __update_guc_busyness_stats(struct intel_= guc *guc) unsigned long flags; ktime_t unused; =20 + guc->timestamp.last_stat_jiffies =3D jiffies; + spin_lock_irqsave(&guc->timestamp.lock, flags); =20 guc_update_pm_timestamp(guc, &unused); @@ -1437,6 +1439,17 @@ void intel_guc_busyness_park(struct intel_gt *gt) return; =20 cancel_delayed_work(&guc->timestamp.work); + + /* + * Before parking, we should sample engine busyness stats if we need to. + * We can skip it if we are less than half a ping from the last time we + * sampled the busyness stats. + */ + if (guc->timestamp.last_stat_jiffies && + !time_after(jiffies, guc->timestamp.last_stat_jiffies + + (guc->timestamp.ping_delay / 2))) + return; + __update_guc_busyness_stats(guc); } =20 --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73F24C6FA82 for ; Wed, 21 Sep 2022 15:51:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231404AbiIUPvA (ORCPT ); Wed, 21 Sep 2022 11:51:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231561AbiIUPuD (ORCPT ); Wed, 21 Sep 2022 11:50:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E82AA9A9D7; Wed, 21 Sep 2022 08:48:26 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9D8A863126; Wed, 21 Sep 2022 15:48:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB80FC433C1; Wed, 21 Sep 2022 15:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775303; bh=oc6alvbrAk656ZrKOEIJJIun1IBR2lDaOl7X6JBRJKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XvBIlQ5wKlF777Yya+s6pik7O4LfNM6Sn0j3n/XLj/ClO6fOeR6CvkDodIXHRzLZK YuNodbMqnJdj2+HVwJEL1Vj4QL4b4tyI/VKlS2lP8tyVcCptOdMfjruL++3WivuezX uhEQRHpB/llICKr03wlbZmK8bpKweZVKXAFcAdZ8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Umesh Nerlige Ramappa , Ashutosh Dixit , John Harrison , Joonas Lahtinen , Rodrigo Vivi , Sasha Levin Subject: [PATCH 5.19 17/38] drm/i915/guc: Cancel GuC engine busyness worker synchronously Date: Wed, 21 Sep 2022 17:46:01 +0200 Message-Id: <20220921153646.824146216@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Umesh Nerlige Ramappa [ Upstream commit aee5ae7c8492eaca2be20d202887c9c716ffc86f ] The worker is canceled in gt_park path, but earlier it was assumed that gt_park path cannot sleep and the cancel is asynchronous. This caused a race with suspend flow where the worker runs after suspend and causes an unclaimed register access warning. Cancel the worker synchronously since the gt_park is indeed allowed to sleep. v2: Fix author name and sign-off mismatch Signed-off-by: Umesh Nerlige Ramappa Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4419 Fixes: 77cdd054dd2c ("drm/i915/pmu: Connect engine busyness stats from GuC = to pmu") Reviewed-by: Ashutosh Dixit Signed-off-by: John Harrison Link: https://patchwork.freedesktop.org/patch/msgid/20220827002135.139349-1= -umesh.nerlige.ramappa@intel.com Signed-off-by: Joonas Lahtinen (cherry picked from commit 31335aa8e08be3fe10c50aecd2f11aba77544a78) Signed-off-by: Rodrigo Vivi Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gp= u/drm/i915/gt/uc/intel_guc_submission.c index 96022f49f9b5..d7e4681d7297 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -1438,7 +1438,12 @@ void intel_guc_busyness_park(struct intel_gt *gt) if (!guc_submission_initialized(guc)) return; =20 - cancel_delayed_work(&guc->timestamp.work); + /* + * There is a race with suspend flow where the worker runs after suspend + * and causes an unclaimed register access warning. Cancel the worker + * synchronously here. + */ + cancel_delayed_work_sync(&guc->timestamp.work); =20 /* * Before parking, we should sample engine busyness stats if we need to. --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49CA8C6FA82 for ; Wed, 21 Sep 2022 15:48:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231296AbiIUPs1 (ORCPT ); Wed, 21 Sep 2022 11:48:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230267AbiIUPrq (ORCPT ); Wed, 21 Sep 2022 11:47:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B28D9AFA7; Wed, 21 Sep 2022 08:47:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 58999B82714; Wed, 21 Sep 2022 15:47:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56B70C433C1; Wed, 21 Sep 2022 15:47:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775240; bh=zUrlUQVEFx18nCMwuW+31UOkj8QSytBmKoHkPIYE3Ow=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JpKXCudiF/II7yzP7JQQ3jPgBT0aHi187BaMtnzw6025EfwR3rmiyp6v+nVWAySg5 /BWNrqsiSEZLTOPdSZbQvLWmEMF4BbJu6MRyaYjIhF15HQo9CZjm/sWbrQcDYRbnhE MvHkTUCEksBPu72cO3pBzkzW65B1rF9kjvTrldEs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Roesch , Jens Axboe , Sasha Levin Subject: [PATCH 5.19 18/38] block: blk_queue_enter() / __bio_queue_enter() must return -EAGAIN for nowait Date: Wed, 21 Sep 2022 17:46:02 +0200 Message-Id: <20220921153646.852112067@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stefan Roesch [ Upstream commit 56f99b8d06ef1ed1c9730948f9f05ac2b930a20b ] Today blk_queue_enter() and __bio_queue_enter() return -EBUSY for the nowait code path. This is not correct: they should return -EAGAIN instead. This problem was detected by fio. The following command exposed the above problem: t/io_uring -p0 -d128 -b4096 -s32 -c32 -F1 -B0 -R0 -X1 -n24 -P1 -u1 -O0 /dev= /ng0n1 By applying the patch, the retry case is handled correctly in the slow path. Signed-off-by: Stefan Roesch Fixes: bfd343aa1718 ("blk-mq: don't wait in blk_mq_queue_enter() if __GFP_W= AIT isn't set") Signed-off-by: Jens Axboe Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- block/blk-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index 27fb1357ad4b..cc6fbcb6d252 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -338,7 +338,7 @@ int blk_queue_enter(struct request_queue *q, blk_mq_req= _flags_t flags) =20 while (!blk_try_enter_queue(q, pm)) { if (flags & BLK_MQ_REQ_NOWAIT) - return -EBUSY; + return -EAGAIN; =20 /* * read pair of barrier in blk_freeze_queue_start(), we need to @@ -368,7 +368,7 @@ int __bio_queue_enter(struct request_queue *q, struct b= io *bio) if (test_bit(GD_DEAD, &disk->state)) goto dead; bio_wouldblock_error(bio); - return -EBUSY; + return -EAGAIN; } =20 /* --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 844E7C6FA8E for ; Wed, 21 Sep 2022 15:50:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230024AbiIUPue (ORCPT ); Wed, 21 Sep 2022 11:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230525AbiIUPtq (ORCPT ); Wed, 21 Sep 2022 11:49:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C67AE9DF9A; Wed, 21 Sep 2022 08:48:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 38E92B830A1; Wed, 21 Sep 2022 15:47:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DE39C433D6; Wed, 21 Sep 2022 15:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775273; bh=e4CTjNg0VHlzgBruGLyh0ezOhAX+QdTKZInHbKUri8o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gou3j0q5c2HnICQvPLUm0ZUPtww4TMNv360WQgdvg1i48vCplC3YH0LzpP6L23TDF +IkNdyI4H3+Cf1vSU90f9e7R6BEmNXlWY6B3SLIhudn6ROFu9jvBJF5XXf2yE/Xu5Y rp3/dBzPe9mwdewCNBqrKO7fWdjCPKq60N6xAFU8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yang Yingliang , Helge Deller , Sasha Levin Subject: [PATCH 5.19 19/38] parisc: ccio-dma: Add missing iounmap in error path in ccio_probe() Date: Wed, 21 Sep 2022 17:46:03 +0200 Message-Id: <20220921153646.880729410@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Yang Yingliang [ Upstream commit 38238be4e881a5d0abbe4872b4cd6ed790be06c8 ] Add missing iounmap() before return from ccio_probe(), if ccio_init_resourc= es() fails. Fixes: d46c742f827f ("parisc: ccio-dma: Handle kmalloc failure in ccio_init= _resources()") Signed-off-by: Yang Yingliang Signed-off-by: Helge Deller Signed-off-by: Sasha Levin Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/parisc/ccio-dma.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index f69ab90b5e22..6052f264bbb0 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -1546,6 +1546,7 @@ static int __init ccio_probe(struct parisc_device *de= v) } ccio_ioc_init(ioc); if (ccio_init_resources(ioc)) { + iounmap(ioc->ioc_regs); kfree(ioc); return -ENOMEM; } --=20 2.35.1 From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA46DC6FA8E for ; Wed, 21 Sep 2022 15:51:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231609AbiIUPvF (ORCPT ); Wed, 21 Sep 2022 11:51:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbiIUPuP (ORCPT ); Wed, 21 Sep 2022 11:50:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E31B9E2E9; Wed, 21 Sep 2022 08:48:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B70BF6312C; Wed, 21 Sep 2022 15:48:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9125BC433C1; Wed, 21 Sep 2022 15:48:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775282; bh=wCAQJ4eQrrJ3APQcolF3jIUnI0Y+3eKZnUZwa06m/G0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AuZuBt56E/Gs/r/Pd+IjwjVWUg5jnskpPtzdNdGCy+W9Nnba2Al0agFcksgyT2HNQ 9fD4NZBj+8ebgn03lk/xwk3ITDEVerTx7H4ilvL2w4SmrVtJDSVtM3DO61a0ZnnYmB 2qLNemZWgwHja3rP9RHshjBhR7f3TagG3/mAIuRc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thierry Reding , Frank Rowand , Lorenzo Pieralisi , Rob Herring Subject: [PATCH 5.19 20/38] of/device: Fix up of_dma_configure_id() stub Date: Wed, 21 Sep 2022 17:46:04 +0200 Message-Id: <20220921153646.910874595@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Thierry Reding commit 40bfe7a86d84cf08ac6a8fe2f0c8bf7a43edd110 upstream. Since the stub version of of_dma_configure_id() was added in commit a081bd4af4ce ("of/device: Add input id to of_dma_configure()"), it has not matched the signature of the full function, leading to build failure reports when code using this function is built on !OF configurations. Fixes: a081bd4af4ce ("of/device: Add input id to of_dma_configure()") Cc: stable@vger.kernel.org Signed-off-by: Thierry Reding Reviewed-by: Frank Rowand Acked-by: Lorenzo Pieralisi Link: https://lore.kernel.org/r/20220824153256.1437483-1-thierry.reding@gma= il.com Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- include/linux/of_device.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/include/linux/of_device.h +++ b/include/linux/of_device.h @@ -101,8 +101,9 @@ static inline struct device_node *of_cpu } =20 static inline int of_dma_configure_id(struct device *dev, - struct device_node *np, - bool force_dma) + struct device_node *np, + bool force_dma, + const u32 *id) { return 0; } From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93F63C6FA82 for ; Wed, 21 Sep 2022 15:50:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229968AbiIUPuV (ORCPT ); Wed, 21 Sep 2022 11:50:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231635AbiIUPto (ORCPT ); Wed, 21 Sep 2022 11:49:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DBC2F9E127; Wed, 21 Sep 2022 08:48:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B2A2063134; Wed, 21 Sep 2022 15:48:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9BC9CC433C1; Wed, 21 Sep 2022 15:48:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775285; bh=0jQRjovtLmJ+JpC0ZRGxXIXRjH2x78eKIRdqyG2/Io4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hEF0cqny+fk78/7qjfw0aP4Fn8xRNCBVclYz1zI3rZLRWM9Os1gYSib1BT8N8hHie 4j7szHyjhwIKiWt9tr+I2guhnvIGoI2ODlEoqGmaDmwmgLe5wU8LYDAbH5bNBsvlqS UCMoQSsUtoQ4LORv7VooBSqGoc2CnTYtr6EqdGwk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jens Axboe Subject: [PATCH 5.19 21/38] io_uring/msg_ring: check file type before putting Date: Wed, 21 Sep 2022 17:46:05 +0200 Message-Id: <20220921153646.939592037@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Jens Axboe commit fc7222c3a9f56271fba02aabbfbae999042f1679 upstream. If we're invoked with a fixed file, follow the normal rules of not calling io_fput_file(). Fixed files are permanently registered to the ring, and do not need putting separately. Cc: stable@vger.kernel.org Fixes: aa184e8671f0 ("io_uring: don't attempt to IOPOLL for MSG_RING reques= ts") Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- io_uring/io_uring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -5061,7 +5061,8 @@ done: req_set_fail(req); __io_req_complete(req, issue_flags, ret, 0); /* put file to avoid an attempt to IOPOLL the req */ - io_put_file(req->file); + if (!(req->flags & REQ_F_FIXED_FILE)) + io_put_file(req->file); req->file =3D NULL; return 0; } From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B9CBC6FA8E for ; Wed, 21 Sep 2022 15:51:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230280AbiIUPv0 (ORCPT ); Wed, 21 Sep 2022 11:51:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231434AbiIUPut (ORCPT ); Wed, 21 Sep 2022 11:50:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2071C9DB57; Wed, 21 Sep 2022 08:48:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 16F78B830A8; Wed, 21 Sep 2022 15:48:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AD4BC433C1; Wed, 21 Sep 2022 15:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775287; bh=opLlEzQAjs3Jcw7ovk47ACuCPcR3rqZlUfSTNBNXmao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0LzuPm0/WBQzxvqkM99ciHWK8F2Wqha0fOmYiKo+gYKcOQhK5W2HxVC62nga/eT0U cmAW+DzNoluEXjQGAJUKxkqeqGEY4kmuU6laQPTAV77MYXJ10SdIlfFS/8DuC5bZji Y9EmQGMLqJto7uMIJBJ/qOtavLUPDl5zocBbr6EY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Paulo Alcantara (SUSE)" , Ronnie Sahlberg , Steve French Subject: [PATCH 5.19 22/38] cifs: revalidate mapping when doing direct writes Date: Wed, 21 Sep 2022 17:46:06 +0200 Message-Id: <20220921153646.967361920@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ronnie Sahlberg commit 7500a99281dfed2d4a84771c933bcb9e17af279b upstream. Kernel bugzilla: 216301 When doing direct writes we need to also invalidate the mapping in case we have a cached copy of the affected page(s) in memory or else subsequent reads of the data might return the old/stale content before we wrote an update to the server. Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Ronnie Sahlberg Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- fs/cifs/file.c | 3 +++ 1 file changed, 3 insertions(+) --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -3327,6 +3327,9 @@ static ssize_t __cifs_writev( =20 ssize_t cifs_direct_writev(struct kiocb *iocb, struct iov_iter *from) { + struct file *file =3D iocb->ki_filp; + + cifs_revalidate_mapping(file->f_inode); return __cifs_writev(iocb, from, true); } From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3FD99C6FA8E for ; Wed, 21 Sep 2022 15:51:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231642AbiIUPvr (ORCPT ); Wed, 21 Sep 2022 11:51:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231674AbiIUPu5 (ORCPT ); Wed, 21 Sep 2022 11:50:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D3639E109; Wed, 21 Sep 2022 08:48:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id F1AF5B830A9; Wed, 21 Sep 2022 15:48:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46248C433C1; Wed, 21 Sep 2022 15:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775290; bh=VwfPmT+r4JBjMcl3dP6pVX8+6/2Px5nfAtk/MRLgww8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qwDc7y5c1X3VMqMVan9on0acJUAWuZQ+fW7jzsPdZoJMPW0jk9BKx4NyN10ytBIQI 8tdQWXJ8/h9dR7GrtjnfASr9QFlQKudsKq/XWaBKtpZtVuRm7A3Qls2yATFa7SmYWA r7S1mQE9eF4hnbtSjsGnk7ZD2HFyiEkYScwgNaq8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Metzmacher , Ronnie Sahlberg , "Paulo Alcantara (SUSE)" , Steve French Subject: [PATCH 5.19 23/38] cifs: dont send down the destination address to sendmsg for a SOCK_STREAM Date: Wed, 21 Sep 2022 17:46:07 +0200 Message-Id: <20220921153646.995429999@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stefan Metzmacher commit 17d3df38dc5f4cec9b0ac6eb79c1859b6e2693a4 upstream. This is ignored anyway by the tcp layer. Signed-off-by: Stefan Metzmacher Cc: stable@vger.kernel.org Reviewed-by: Ronnie Sahlberg Reviewed-by: Paulo Alcantara (SUSE) Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- fs/cifs/transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -196,8 +196,8 @@ smb_send_kvec(struct TCP_Server_Info *se =20 *sent =3D 0; =20 - smb_msg->msg_name =3D (struct sockaddr *) &server->dstaddr; - smb_msg->msg_namelen =3D sizeof(struct sockaddr); + smb_msg->msg_name =3D NULL; + smb_msg->msg_namelen =3D 0; smb_msg->msg_control =3D NULL; smb_msg->msg_controllen =3D 0; if (server->noblocksnd) From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F597C6FA90 for ; Wed, 21 Sep 2022 15:51:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229918AbiIUPv4 (ORCPT ); Wed, 21 Sep 2022 11:51:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbiIUPvR (ORCPT ); Wed, 21 Sep 2022 11:51:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E35429E6BD; Wed, 21 Sep 2022 08:48:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 34CCDB830A2; Wed, 21 Sep 2022 15:48:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DB76C433D6; Wed, 21 Sep 2022 15:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775294; bh=WqbU4bRX8dq5JfsA1AgVgblRWyx1f/Vw5GJBaC3Mdaw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cVPqRIh5Mvo7bjF3FAgoOVdKrAPZxxRglT8RsT0R8QtGzEfVq6kzUk9R7iyf49FEY VXhTzMbNxj7UEddi+Klbcu2LEP2sTgawvzq/qntS3YlelHwcK29ia8e8C0n0WS1GlO tSpe71/yZP+GybuYEFPwAXsFcxEnBjj9/L0ZK01c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Metzmacher , "Paulo Alcantara (SUSE)" , Ronnie Sahlberg , Steve French Subject: [PATCH 5.19 24/38] cifs: always initialize struct msghdr smb_msg completely Date: Wed, 21 Sep 2022 17:46:08 +0200 Message-Id: <20220921153647.023752565@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Stefan Metzmacher commit bedc8f76b3539ac4f952114b316bcc2251e808ce upstream. So far we were just lucky because the uninitialized members of struct msghdr are not used by default on a SOCK_STREAM tcp socket. But as new things like msg_ubuf and sg_from_iter where added recently, we should play on the safe side and avoid potention problems in future. Signed-off-by: Stefan Metzmacher Cc: stable@vger.kernel.org Reviewed-by: Paulo Alcantara (SUSE) Reviewed-by: Ronnie Sahlberg Signed-off-by: Steve French Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- fs/cifs/connect.c | 11 +++-------- fs/cifs/transport.c | 6 +----- 2 files changed, 4 insertions(+), 13 deletions(-) --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -707,9 +707,6 @@ cifs_readv_from_socket(struct TCP_Server int length =3D 0; int total_read; =20 - smb_msg->msg_control =3D NULL; - smb_msg->msg_controllen =3D 0; - for (total_read =3D 0; msg_data_left(smb_msg); total_read +=3D length) { try_to_freeze(); =20 @@ -765,7 +762,7 @@ int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, unsigned int to_read) { - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; struct kvec iov =3D {.iov_base =3D buf, .iov_len =3D to_read}; iov_iter_kvec(&smb_msg.msg_iter, READ, &iov, 1, to_read); =20 @@ -775,15 +772,13 @@ cifs_read_from_socket(struct TCP_Server_ ssize_t cifs_discard_from_socket(struct TCP_Server_Info *server, size_t to_read) { - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; =20 /* * iov_iter_discard already sets smb_msg.type and count and iov_offset * and cifs_readv_from_socket sets msg_control and msg_controllen * so little to initialize in struct msghdr */ - smb_msg.msg_name =3D NULL; - smb_msg.msg_namelen =3D 0; iov_iter_discard(&smb_msg.msg_iter, READ, to_read); =20 return cifs_readv_from_socket(server, &smb_msg); @@ -793,7 +788,7 @@ int cifs_read_page_from_socket(struct TCP_Server_Info *server, struct page *pa= ge, unsigned int page_offset, unsigned int to_read) { - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; struct bio_vec bv =3D { .bv_page =3D page, .bv_len =3D to_read, .bv_offset =3D page_offset}; iov_iter_bvec(&smb_msg.msg_iter, READ, &bv, 1, to_read); --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c @@ -196,10 +196,6 @@ smb_send_kvec(struct TCP_Server_Info *se =20 *sent =3D 0; =20 - smb_msg->msg_name =3D NULL; - smb_msg->msg_namelen =3D 0; - smb_msg->msg_control =3D NULL; - smb_msg->msg_controllen =3D 0; if (server->noblocksnd) smb_msg->msg_flags =3D MSG_DONTWAIT + MSG_NOSIGNAL; else @@ -311,7 +307,7 @@ __smb_send_rqst(struct TCP_Server_Info * sigset_t mask, oldmask; size_t total_len =3D 0, sent, size; struct socket *ssocket =3D server->ssocket; - struct msghdr smb_msg; + struct msghdr smb_msg =3D {}; __be32 rfc1002_marker; =20 if (cifs_rdma_enabled(server)) { From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96C97C6FA82 for ; Wed, 21 Sep 2022 15:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231671AbiIUPux (ORCPT ); Wed, 21 Sep 2022 11:50:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230217AbiIUPuB (ORCPT ); Wed, 21 Sep 2022 11:50:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F23BF9AFA1; Wed, 21 Sep 2022 08:48:18 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 61A06B82714; Wed, 21 Sep 2022 15:48:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90F89C433D7; Wed, 21 Sep 2022 15:48:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775297; bh=rUgipJmpjZh5pth/kIAQWW4Q0vsv4QZFp+a/XZ7EPeI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xhCj0dYD63JjkoqB05rLcPqpTKG+NGLMSQchwfclYTK3Jvh9BfzSllD848LCGCByl Uv0BzHPWQ8cAd56ZhFe2VTWdJ1jHt3Uuiqd65auDksK57cqBHY9utMo8IMuMLiu5v8 Cau3xy2htGC8J082KUupxHX0nPDGjYmb8hXoyvwM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikulas Patocka , Jens Axboe Subject: [PATCH 5.19 25/38] blk-lib: fix blkdev_issue_secure_erase Date: Wed, 21 Sep 2022 17:46:09 +0200 Message-Id: <20220921153647.052501707@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Mikulas Patocka commit c4fa368466cc1b60bb92f867741488930ddd6034 upstream. There's a bug in blkdev_issue_secure_erase. The statement "unsigned int len =3D min_t(sector_t, nr_sects, max_sectors);" sets the variable "len" to the length in sectors, but the statement "bio->bi_iter.bi_size =3D len" treats it as if it were in bytes. The statements "sector +=3D len << SECTOR_SHIFT" and "nr_sects -=3D len << SECTOR_SHIFT" are thinko. This patch fixes it. Signed-off-by: Mikulas Patocka Cc: stable@vger.kernel.org # v5.19 Fixes: 44abff2c0b97 ("block: decouple REQ_OP_SECURE_ERASE from REQ_OP_DISCA= RD") Link: https://lore.kernel.org/r/alpine.LRH.2.02.2209141549480.28100@file01.= intranet.prod.int.rdu2.redhat.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- block/blk-lib.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) --- a/block/blk-lib.c +++ b/block/blk-lib.c @@ -311,6 +311,11 @@ int blkdev_issue_secure_erase(struct blo struct blk_plug plug; int ret =3D 0; =20 + /* make sure that "len << SECTOR_SHIFT" doesn't overflow */ + if (max_sectors > UINT_MAX >> SECTOR_SHIFT) + max_sectors =3D UINT_MAX >> SECTOR_SHIFT; + max_sectors &=3D ~bs_mask; + if (max_sectors =3D=3D 0) return -EOPNOTSUPP; if ((sector | nr_sects) & bs_mask) @@ -324,10 +329,10 @@ int blkdev_issue_secure_erase(struct blo =20 bio =3D blk_next_bio(bio, bdev, 0, REQ_OP_SECURE_ERASE, gfp); bio->bi_iter.bi_sector =3D sector; - bio->bi_iter.bi_size =3D len; + bio->bi_iter.bi_size =3D len << SECTOR_SHIFT; =20 - sector +=3D len << SECTOR_SHIFT; - nr_sects -=3D len << SECTOR_SHIFT; + sector +=3D len; + nr_sects -=3D len; if (!nr_sects) { ret =3D submit_bio_wait(bio); bio_put(bio); From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DA29C6FA8E for ; Wed, 21 Sep 2022 15:51:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231688AbiIUPvH (ORCPT ); Wed, 21 Sep 2022 11:51:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiIUPuS (ORCPT ); Wed, 21 Sep 2022 11:50:18 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 418509C23D; Wed, 21 Sep 2022 08:48:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 730A4B830AC; Wed, 21 Sep 2022 15:48:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A310BC433D6; Wed, 21 Sep 2022 15:48:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775300; bh=5KUO50411rAj2jsiN5w6CxZ3fOpgl7KcLMMlqaAIV3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gvdjBk1GR81QuwNs1aKxO0eaYvgAeVu1e0c6aiSILDbchDLKkxy57FLluQINl2J2O FA8jzj8NBTYBBFZfkPHeoAd1ySvmtNK5PRCvlUgokr1fO3+o71z7xY6l1IASqiHvlq dMdPOjh31Rj6lj1S/9mVzB0b3tdzXkOnthU/BqIg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Helge Deller Subject: [PATCH 5.19 26/38] parisc: Allow CONFIG_64BIT with ARCH=parisc Date: Wed, 21 Sep 2022 17:46:10 +0200 Message-Id: <20220921153647.082807190@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Helge Deller commit 805ce8614958c925877ba6b6dc26cdf9f8800474 upstream. The previous patch triggered a build failure for the debian kernel, which has CONFIG_64BIT enabled, uses the CROSS_COMPILER environment variable and uses ARCH=3Dparisc to configure the kernel for 64-bit support. This patch weakens the previous patch while keeping the recommended way to configure the kernel with: ARCH=3Dparisc -> build 32-bit kernel ARCH=3Dparisc64 -> build 64-bit kernel while adding the possibility for debian to configure a 64-bit kernel even if ARCH=3Dparisc is set (PA8X00 CPU has to be selected and CONFIG_64BIT needs to be enabled). The downside of this patch is, that we now have a small window open again where people may get it wrong: if they enable CONFIG_64BIT and try to compile with a 32-bit compiler. Fixes: 3dcfb729b5f4 ("parisc: Make CONFIG_64BIT available for ARCH=3Dparisc= 64 only") Signed-off-by: Helge Deller Cc: # 5.15+ Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- arch/parisc/Kconfig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -225,8 +225,18 @@ config MLONGCALLS Enabling this option will probably slow down your kernel. =20 config 64BIT - def_bool "$(ARCH)" =3D "parisc64" + def_bool y if "$(ARCH)" =3D "parisc64" + bool "64-bit kernel" if "$(ARCH)" =3D "parisc" depends on PA8X00 + help + Enable this if you want to support 64bit kernel on PA-RISC platform. + + At the moment, only people willing to use more than 2GB of RAM, + or having a 64bit-only capable PA-RISC machine should say Y here. + + Since there is no 64bit userland on PA-RISC, there is no point to + enable this option otherwise. The 64bit kernel is significantly bigger + and slower than the 32bit one. =20 choice prompt "Kernel page size" From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F08ECAAD8 for ; Wed, 21 Sep 2022 15:48:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230147AbiIUPsc (ORCPT ); Wed, 21 Sep 2022 11:48:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230511AbiIUPrv (ORCPT ); Wed, 21 Sep 2022 11:47:51 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D41099C200; Wed, 21 Sep 2022 08:47:25 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4D380B827E7; Wed, 21 Sep 2022 15:47:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99CD8C433D6; Wed, 21 Sep 2022 15:47:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775243; bh=O4/u53JHf7gUmkfgGF2w+ePqacS+7zX57PDIn4KdBRQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Uw9T8NYOBCK2nE+ezrPNpBOJ234dE6SYH8FUa15cb/rke4Cz0W4ddi1vDElpEqMNV 5kiwJsRhPpQ20vFoXEr75E5u3Uuardsp6Z0kNycUUY4Wn9IyBpn5gRPi9Ce/mtLNZa v/BUXq/Nidjllnw7gSzGwCu3EeGtENUpkpgwHCXk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ben Hutchings , Salvatore Bonaccorso , Helge Deller Subject: [PATCH 5.19 27/38] tools/include/uapi: Fix for parisc and xtensa Date: Wed, 21 Sep 2022 17:46:11 +0200 Message-Id: <20220921153647.118390302@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ben Hutchings commit 95363747a6f39e88a3052fcf6ce6237769495ce0 upstream. tools/include/uapi/asm/errno.h currently attempts to include non-existent arch-specific errno.h header for xtensa. Remove this case so that is used instead, and add the missing arch-specific header for parisc. Signed-off-by: Ben Hutchings Signed-off-by: Salvatore Bonaccorso Cc: # 5.10+ Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- tools/include/uapi/asm/errno.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/tools/include/uapi/asm/errno.h +++ b/tools/include/uapi/asm/errno.h @@ -9,8 +9,8 @@ #include "../../../arch/alpha/include/uapi/asm/errno.h" #elif defined(__mips__) #include "../../../arch/mips/include/uapi/asm/errno.h" -#elif defined(__xtensa__) -#include "../../../arch/xtensa/include/uapi/asm/errno.h" +#elif defined(__hppa__) +#include "../../../arch/parisc/include/uapi/asm/errno.h" #else #include #endif From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 379E1C6FA8E for ; Wed, 21 Sep 2022 15:49:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231262AbiIUPtH (ORCPT ); Wed, 21 Sep 2022 11:49:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231610AbiIUPrz (ORCPT ); Wed, 21 Sep 2022 11:47:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4FA091D13; Wed, 21 Sep 2022 08:47:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6608FB82714; Wed, 21 Sep 2022 15:47:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB644C433D6; Wed, 21 Sep 2022 15:47:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775246; bh=ROmjALs2aLv+mU6hjgmn6dS843ULyMub8FPpmP4DHrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OSo/R639pqZVTsW+VBiAf702QNd8qOPx69MeadDxnaGfpdxKRJKobXNuhewY+ebz0 WOBzHzY3XOBPyRGRvxU0r62QQHgZrxKzNEKT4/LlC58C/CF8jdcttxjAnhaqafyfdq 1UXHWGWf5PecRReHlSSsfI+jB4a210T3D2924ZnA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ashutosh Dixit , Andi Shyti , Sujaritha Sundaresan , Matt Roper , Joonas Lahtinen , Rodrigo Vivi Subject: [PATCH 5.19 28/38] drm/i915/gt: Fix perf limit reasons bit positions Date: Wed, 21 Sep 2022 17:46:12 +0200 Message-Id: <20220921153647.157448691@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Ashutosh Dixit commit d654f60898d56ffda461ef4ffd7bbe15159feb8d upstream. Perf limit reasons bit positions were off by one. Fixes: fa68bff7cf27 ("drm/i915/gt: Add sysfs throttle frequency interfaces") Cc: stable@vger.kernel.org # v5.18+ Signed-off-by: Ashutosh Dixit Acked-by: Andi Shyti Reviewed-by: Sujaritha Sundaresan Signed-off-by: Matt Roper Link: https://patchwork.freedesktop.org/patch/msgid/20220908155821.1662110-= 1-ashutosh.dixit@intel.com Signed-off-by: Joonas Lahtinen (cherry picked from commit 60017f34fc334d1bb25476b0b0996b4073e76c90) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/i915/i915_reg.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -1849,14 +1849,14 @@ =20 #define GT0_PERF_LIMIT_REASONS _MMIO(0x1381a8) #define GT0_PERF_LIMIT_REASONS_MASK 0xde3 -#define PROCHOT_MASK REG_BIT(1) -#define THERMAL_LIMIT_MASK REG_BIT(2) -#define RATL_MASK REG_BIT(6) -#define VR_THERMALERT_MASK REG_BIT(7) -#define VR_TDC_MASK REG_BIT(8) -#define POWER_LIMIT_4_MASK REG_BIT(9) -#define POWER_LIMIT_1_MASK REG_BIT(11) -#define POWER_LIMIT_2_MASK REG_BIT(12) +#define PROCHOT_MASK REG_BIT(0) +#define THERMAL_LIMIT_MASK REG_BIT(1) +#define RATL_MASK REG_BIT(5) +#define VR_THERMALERT_MASK REG_BIT(6) +#define VR_TDC_MASK REG_BIT(7) +#define POWER_LIMIT_4_MASK REG_BIT(8) +#define POWER_LIMIT_1_MASK REG_BIT(10) +#define POWER_LIMIT_2_MASK REG_BIT(11) =20 #define CHV_CLK_CTL1 _MMIO(0x101100) #define VLV_CLK_CTL2 _MMIO(0x101104) From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B452ECAAD8 for ; Wed, 21 Sep 2022 15:49:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231191AbiIUPtC (ORCPT ); Wed, 21 Sep 2022 11:49:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231338AbiIUPr4 (ORCPT ); Wed, 21 Sep 2022 11:47:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9EE3923D3; Wed, 21 Sep 2022 08:47:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id CC50761BD5; Wed, 21 Sep 2022 15:47:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BD097C433C1; Wed, 21 Sep 2022 15:47:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775249; bh=ithr9k7O+nzM2l5y5r8KeGH+jQGPQyK/7KtGeFY4fJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zX1pcrUP5OwYv37JM7sjLeddSdUnE4HeIvRRURDmVHpiip4z5QZMeG2Ld2Kek3lbR b6gZsTPNFsK55nepBwISd3L6Dz41ILFhRPtC6je+ItUbR6EO4NS6uTORpWCtFXxbfx gJRw8mGb+7Wn95Np14V74hXNFbCjtZWqKXCAjryU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nirmoy Das , Matthew Auld , Andrzej Hajda , Rodrigo Vivi Subject: [PATCH 5.19 29/38] drm/i915: Set correct domains values at _i915_vma_move_to_active Date: Wed, 21 Sep 2022 17:46:13 +0200 Message-Id: <20220921153647.186661288@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Nirmoy Das commit 08b812985996924c0ccf79d54a31fc9757c0a6ca upstream. Fix regression introduced by commit: "drm/i915: Individualize fences before adding to dma_resv obj" which sets obj->read_domains to 0 for both read and write paths. Also set obj->write_domain to 0 on read path which was removed by the commit. Fixes: 420a07b841d0 ("drm/i915: Individualize fences before adding to dma_r= esv obj") Signed-off-by: Nirmoy Das Cc: # v5.16+ Cc: Matthew Auld Cc: Andrzej Hajda Reviewed-by: Andrzej Hajda Signed-off-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20220907172641.12555-1-= nirmoy.das@intel.com (cherry picked from commit 04f7eb3d4582a0a4da67c86e55fda7de2df86d91) Signed-off-by: Rodrigo Vivi Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/i915/i915_vma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/i915/i915_vma.c +++ b/drivers/gpu/drm/i915/i915_vma.c @@ -1870,12 +1870,13 @@ int _i915_vma_move_to_active(struct i915 enum dma_resv_usage usage; int idx; =20 - obj->read_domains =3D 0; if (flags & EXEC_OBJECT_WRITE) { usage =3D DMA_RESV_USAGE_WRITE; obj->write_domain =3D I915_GEM_DOMAIN_RENDER; + obj->read_domains =3D 0; } else { usage =3D DMA_RESV_USAGE_READ; + obj->write_domain =3D 0; } =20 dma_fence_array_for_each(curr, idx, fence) From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13997ECAAD8 for ; Wed, 21 Sep 2022 15:49:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbiIUPtL (ORCPT ); Wed, 21 Sep 2022 11:49:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231491AbiIUPr5 (ORCPT ); Wed, 21 Sep 2022 11:47:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22F589C219; Wed, 21 Sep 2022 08:47:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 84D0BB827E7; Wed, 21 Sep 2022 15:47:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEF28C433C1; Wed, 21 Sep 2022 15:47:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775252; bh=neDgFqJQedLTrvu33qRvZafzBeVoRZQpiACT/3OZZpQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZYhm+R4e1RN3jFGU3mM4n69Wk293reNJvd9LBW0kvM+JvwTqboGl4czWpuIj9vAes /L/eqUeA5lSZDGWMjYlZCnbMWxj5axER4xEI4raS4nIm0h7JCBF8WW4xogVs26K63M KYz39hKiyvddxpgq0pxP7veMp5cPmKR9rwS0SvwA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Lijo Lazar , Alex Deucher Subject: [PATCH 5.19 30/38] drm/amdgpu: make sure to init common IP before gmc Date: Wed, 21 Sep 2022 17:46:14 +0200 Message-Id: <20220921153647.216188400@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher commit a8671493d2074950553da3cf07d1be43185ef6c6 upstream. Move common IP init before GMC init so that HDP gets remapped before GMC init which uses it. This fixes the Unsupported Request error reported through AER during driver load. The error happens as a write happens to the remap offset before real remapping is done. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_= device_capability()") Acked-by: Christian K=C3=B6nig Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -2391,8 +2391,16 @@ static int amdgpu_device_ip_init(struct } adev->ip_blocks[i].status.sw =3D true; =20 - /* need to do gmc hw init early so we can allocate gpu mem */ - if (adev->ip_blocks[i].version->type =3D=3D AMD_IP_BLOCK_TYPE_GMC) { + if (adev->ip_blocks[i].version->type =3D=3D AMD_IP_BLOCK_TYPE_COMMON) { + /* need to do common hw init early so everything is set up for gmc */ + r =3D adev->ip_blocks[i].version->funcs->hw_init((void *)adev); + if (r) { + DRM_ERROR("hw_init %d failed %d\n", i, r); + goto init_failed; + } + adev->ip_blocks[i].status.hw =3D true; + } else if (adev->ip_blocks[i].version->type =3D=3D AMD_IP_BLOCK_TYPE_GMC= ) { + /* need to do gmc hw init early so we can allocate gpu mem */ /* Try to reserve bad pages early */ if (amdgpu_sriov_vf(adev)) amdgpu_virt_exchange_data(adev); @@ -3078,8 +3086,8 @@ static int amdgpu_device_ip_reinit_early int i, r; =20 static enum amd_ip_block_type ip_order[] =3D { - AMD_IP_BLOCK_TYPE_GMC, AMD_IP_BLOCK_TYPE_COMMON, + AMD_IP_BLOCK_TYPE_GMC, AMD_IP_BLOCK_TYPE_PSP, AMD_IP_BLOCK_TYPE_IH, }; From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12BC7C6FA8E for ; Wed, 21 Sep 2022 15:49:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230077AbiIUPs6 (ORCPT ); Wed, 21 Sep 2022 11:48:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231630AbiIUPsR (ORCPT ); Wed, 21 Sep 2022 11:48:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4530D96FD3; Wed, 21 Sep 2022 08:47:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8136EB830A0; Wed, 21 Sep 2022 15:47:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7459C433D6; Wed, 21 Sep 2022 15:47:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775255; bh=3ivMZ11AgPCuYA4AoxzTj/EVjww+87Beeoga76D963M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HmqKppku515muD6EuOaRDsK7dSp5SJe/Vcgp4aPtBu5/i+VhLevOB99hphlX3gS1Y HVBeLbmVLSR/sU0a8fMQfPT5x0T3Ii+shhIi0ZekvIbzbGAQ4SOYVN/eJ/6mBVjOLx 72rHtPEb3JrK4MDrXP+iuq2qvrkI03cvsy6uM9qY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gustaw Smolarczyk , Lijo Lazar , Alex Deucher Subject: [PATCH 5.19 31/38] drm/amdgpu: Dont enable LTR if not supported Date: Wed, 21 Sep 2022 17:46:15 +0200 Message-Id: <20220921153647.245053881@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Lijo Lazar commit 6c20490663553cd7e07d8de8af482012329ab9d6 upstream. As per PCIE Base Spec r4.0 Section 6.18 'Software must not enable LTR in an Endpoint unless the Root Complex and all intermediate Switches indicate support for LTR.' This fixes the Unsupported Request error reported through AER during ASPM enablement. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216455 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_= device_capability()") Reported-by: Gustaw Smolarczyk Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher Signed-off-by: Greg Kroah-Hartman Cc: stable@vger.kernel.org Signed-off-by: Alex Deucher Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c | 9 ++++++++- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 9 ++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c @@ -380,6 +380,7 @@ static void nbio_v2_3_enable_aspm(struct WREG32_PCIE(smnPCIE_LC_CNTL, data); } =20 +#ifdef CONFIG_PCIEASPM static void nbio_v2_3_program_ltr(struct amdgpu_device *adev) { uint32_t def, data; @@ -401,9 +402,11 @@ static void nbio_v2_3_program_ltr(struct if (def !=3D data) WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); } +#endif =20 static void nbio_v2_3_program_aspm(struct amdgpu_device *adev) { +#ifdef CONFIG_PCIEASPM uint32_t def, data; =20 def =3D data =3D RREG32_PCIE(smnPCIE_LC_CNTL); @@ -459,7 +462,10 @@ static void nbio_v2_3_program_aspm(struc if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL6, data); =20 - nbio_v2_3_program_ltr(adev); + /* Don't bother about LTR if LTR is not enabled + * in the path */ + if (adev->pdev->ltr_path) + nbio_v2_3_program_ltr(adev); =20 def =3D data =3D RREG32_SOC15(NBIO, 0, mmRCC_BIF_STRAP3); data |=3D 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; @@ -483,6 +489,7 @@ static void nbio_v2_3_program_aspm(struc data &=3D ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL3, data); +#endif } =20 static void nbio_v2_3_apply_lc_spc_mode_wa(struct amdgpu_device *adev) --- a/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v6_1.c @@ -282,6 +282,7 @@ static void nbio_v6_1_init_registers(str mmBIF_BX_DEV0_EPF0_VF0_HDP_MEM_COHERENCY_FLUSH_CNTL) << 2; } =20 +#ifdef CONFIG_PCIEASPM static void nbio_v6_1_program_ltr(struct amdgpu_device *adev) { uint32_t def, data; @@ -303,9 +304,11 @@ static void nbio_v6_1_program_ltr(struct if (def !=3D data) WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); } +#endif =20 static void nbio_v6_1_program_aspm(struct amdgpu_device *adev) { +#ifdef CONFIG_PCIEASPM uint32_t def, data; =20 def =3D data =3D RREG32_PCIE(smnPCIE_LC_CNTL); @@ -361,7 +364,10 @@ static void nbio_v6_1_program_aspm(struc if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL6, data); =20 - nbio_v6_1_program_ltr(adev); + /* Don't bother about LTR if LTR is not enabled + * in the path */ + if (adev->pdev->ltr_path) + nbio_v6_1_program_ltr(adev); =20 def =3D data =3D RREG32_PCIE(smnRCC_BIF_STRAP3); data |=3D 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; @@ -385,6 +391,7 @@ static void nbio_v6_1_program_aspm(struc data &=3D ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL3, data); +#endif } =20 const struct amdgpu_nbio_funcs nbio_v6_1_funcs =3D { --- a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +++ b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c @@ -673,6 +673,7 @@ struct amdgpu_nbio_ras nbio_v7_4_ras =3D { }; =20 =20 +#ifdef CONFIG_PCIEASPM static void nbio_v7_4_program_ltr(struct amdgpu_device *adev) { uint32_t def, data; @@ -694,9 +695,11 @@ static void nbio_v7_4_program_ltr(struct if (def !=3D data) WREG32_PCIE(smnBIF_CFG_DEV0_EPF0_DEVICE_CNTL2, data); } +#endif =20 static void nbio_v7_4_program_aspm(struct amdgpu_device *adev) { +#ifdef CONFIG_PCIEASPM uint32_t def, data; =20 if (adev->ip_versions[NBIO_HWIP][0] =3D=3D IP_VERSION(7, 4, 4)) @@ -755,7 +758,10 @@ static void nbio_v7_4_program_aspm(struc if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL6, data); =20 - nbio_v7_4_program_ltr(adev); + /* Don't bother about LTR if LTR is not enabled + * in the path */ + if (adev->pdev->ltr_path) + nbio_v7_4_program_ltr(adev); =20 def =3D data =3D RREG32_PCIE(smnRCC_BIF_STRAP3); data |=3D 0x5DE0 << RCC_BIF_STRAP3__STRAP_VLINK_ASPM_IDLE_TIMER__SHIFT; @@ -779,6 +785,7 @@ static void nbio_v7_4_program_aspm(struc data &=3D ~PCIE_LC_CNTL3__LC_DSC_DONT_ENTER_L23_AFTER_PME_ACK_MASK; if (def !=3D data) WREG32_PCIE(smnPCIE_LC_CNTL3, data); +#endif } =20 const struct amdgpu_nbio_funcs nbio_v7_4_funcs =3D { From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B0DC4ECAAD8 for ; Wed, 21 Sep 2022 15:49:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231319AbiIUPtQ (ORCPT ); Wed, 21 Sep 2022 11:49:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231666AbiIUPsi (ORCPT ); Wed, 21 Sep 2022 11:48:38 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D58F57C304; Wed, 21 Sep 2022 08:47:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2480C6312A; Wed, 21 Sep 2022 15:47:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16B24C433C1; Wed, 21 Sep 2022 15:47:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775258; bh=iqaezEEeiDG99/bBFyg4bCNJe4txiqLmFcEDC6sXYqc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WSAeoSkttwf9IK8i6N/Nq6wvBR+EKIbzYhaknuzJZLnqU1sc/RmihlPdEdhPoWi8B WIAOn99LBPa4bj7GWFc9C9r2JGdDhbu7i7zM1X9gHuCLuZby901YXcOEXruhfNTKVs GuhnYJAYbAvMHS6z6eZxZS9h000lbNvJVBbNhYGY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Lijo Lazar , Alex Deucher Subject: [PATCH 5.19 32/38] drm/amdgpu: move nbio ih_doorbell_range() into ih code for vega Date: Wed, 21 Sep 2022 17:46:16 +0200 Message-Id: <20220921153647.292908167@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher commit dc1d85cb790f2091eea074cee24a704b2d6c4a06 upstream. This mirrors what we do for other asics and this way we are sure the ih doorbell range is properly initialized. There is a comment about the way doorbells on gfx9 work that requires that they are initialized for other IPs before GFX is initialized. In this case IH is initialized before GFX, so there should be no issue. This is a prerequisite for fixing the Unsupported Request error reported through AER during driver load. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_= device_capability()") Acked-by: Christian K=C3=B6nig Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 4 ++++ drivers/gpu/drm/amd/amdgpu/vega20_ih.c | 4 ++++ 3 files changed, 8 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -1224,9 +1224,6 @@ static void soc15_doorbell_range_init(st ring->use_doorbell, ring->doorbell_index, adev->doorbell_index.sdma_doorbell_range); } - - adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, - adev->irq.ih.doorbell_index); } } =20 --- a/drivers/gpu/drm/amd/amdgpu/vega10_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/vega10_ih.c @@ -289,6 +289,10 @@ static int vega10_ih_irq_init(struct amd } } =20 + if (!amdgpu_sriov_vf(adev)) + adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, + adev->irq.ih.doorbell_index); + pci_set_master(adev->pdev); =20 /* enable interrupts */ --- a/drivers/gpu/drm/amd/amdgpu/vega20_ih.c +++ b/drivers/gpu/drm/amd/amdgpu/vega20_ih.c @@ -340,6 +340,10 @@ static int vega20_ih_irq_init(struct amd } } =20 + if (!amdgpu_sriov_vf(adev)) + adev->nbio.funcs->ih_doorbell_range(adev, adev->irq.ih.use_doorbell, + adev->irq.ih.doorbell_index); + pci_set_master(adev->pdev); =20 /* enable interrupts */ From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 96F7EC6FA82 for ; Wed, 21 Sep 2022 15:50:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbiIUPuB (ORCPT ); Wed, 21 Sep 2022 11:50:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231410AbiIUPtR (ORCPT ); Wed, 21 Sep 2022 11:49:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC4379DB71; Wed, 21 Sep 2022 08:47:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9E2B2B82DF4; Wed, 21 Sep 2022 15:47:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12F22C433D7; Wed, 21 Sep 2022 15:47:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775261; bh=mydkNH3nKlmwcuJ7kkDzlu/pTI9/TP0+hAPsjtCuyKg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0d17w9raxXdMcvNfOuIgSrKco7UiMEjO4EYIUpNB1nCfDkZ3HGFRSBPwUMw+BHf2o p4qEUcsCdgZk4S/owNo8i8byYVUix4rww4OcaOLYw13JW2pDrU2V4+ra3IkRwHxViI UlMtJixh6QWz+c6iQaaQPGKGB2EzycjzpQegqbK4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Christian=20K=C3=B6nig?= , Lijo Lazar , Alex Deucher Subject: [PATCH 5.19 33/38] drm/amdgpu: move nbio sdma_doorbell_range() into sdma code for vega Date: Wed, 21 Sep 2022 17:46:17 +0200 Message-Id: <20220921153647.321201114@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Deucher commit e3163bc8ffdfdb405e10530b140135b2ee487f89 upstream. This mirrors what we do for other asics and this way we are sure the sdma doorbell range is properly initialized. There is a comment about the way doorbells on gfx9 work that requires that they are initialized for other IPs before GFX is initialized. However, the statement says that it applies to multimedia as well, but the VCN code currently initializes doorbells after GFX and there are no known issues there. In my testing at least I don't see any problems on SDMA. This is a prerequisite for fixing the Unsupported Request error reported through AER during driver load. Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D216373 The error was unnoticed before and got visible because of the commit referenced below. This doesn't fix anything in the commit below, rather fixes the issue in amdgpu exposed by the commit. The reference is only to associate this commit with below one so that both go together. Fixes: 8795e182b02d ("PCI/portdrv: Don't disable AER reporting in get_port_= device_capability()") Acked-by: Christian K=C3=B6nig Reviewed-by: Lijo Lazar Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 5 +++++ drivers/gpu/drm/amd/amdgpu/soc15.c | 22 ---------------------- 2 files changed, 5 insertions(+), 22 deletions(-) --- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c @@ -1504,6 +1504,11 @@ static int sdma_v4_0_start(struct amdgpu WREG32_SDMA(i, mmSDMA0_CNTL, temp); =20 if (!amdgpu_sriov_vf(adev)) { + ring =3D &adev->sdma.instance[i].ring; + adev->nbio.funcs->sdma_doorbell_range(adev, i, + ring->use_doorbell, ring->doorbell_index, + adev->doorbell_index.sdma_doorbell_range); + /* unhalt engine */ temp =3D RREG32_SDMA(i, mmSDMA0_F32_CNTL); temp =3D REG_SET_FIELD(temp, SDMA0_F32_CNTL, HALT, 0); --- a/drivers/gpu/drm/amd/amdgpu/soc15.c +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c @@ -1211,22 +1211,6 @@ static int soc15_common_sw_fini(void *ha return 0; } =20 -static void soc15_doorbell_range_init(struct amdgpu_device *adev) -{ - int i; - struct amdgpu_ring *ring; - - /* sdma/ih doorbell range are programed by hypervisor */ - if (!amdgpu_sriov_vf(adev)) { - for (i =3D 0; i < adev->sdma.num_instances; i++) { - ring =3D &adev->sdma.instance[i].ring; - adev->nbio.funcs->sdma_doorbell_range(adev, i, - ring->use_doorbell, ring->doorbell_index, - adev->doorbell_index.sdma_doorbell_range); - } - } -} - static int soc15_common_hw_init(void *handle) { struct amdgpu_device *adev =3D (struct amdgpu_device *)handle; @@ -1246,12 +1230,6 @@ static int soc15_common_hw_init(void *ha =20 /* enable the doorbell aperture */ soc15_enable_doorbell_aperture(adev, true); - /* HW doorbell routing policy: doorbell writing not - * in SDMA/IH/MM/ACV range will be routed to CP. So - * we need to init SDMA/IH/MM/ACV doorbell range prior - * to CP ip block init and ring test. - */ - soc15_doorbell_range_init(adev); =20 return 0; } From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74F6AC6FA82 for ; Wed, 21 Sep 2022 15:50:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229947AbiIUPuH (ORCPT ); Wed, 21 Sep 2022 11:50:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231419AbiIUPtR (ORCPT ); Wed, 21 Sep 2022 11:49:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1AAE59674F; Wed, 21 Sep 2022 08:47:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 7D9E4B8309B; Wed, 21 Sep 2022 15:47:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDFC9C433D6; Wed, 21 Sep 2022 15:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775264; bh=SsEdW/I36cjV4rJXQdxAs8Ox9aG1oHlKZWjoATnSMP8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AyUaEc14yFgRdiJWuVka2Y5Tb6c5AkiNyIqTEj/Q3yQWjmD+i04tUBFUQELI9aJGg MsfsLpOQZEmQw4h5V8l/qZJFyBbFYwWqTx3QWY0SKbZLc5szdD/HG4GO2H7DHLdORv gxgtcixIqZ05ot7HEqGgPM8LSE2bBvGFiLtkO3Bo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Maciej=20=C5=BBenczykowski?= , Eric Dumazet , Steffen Klassert , Sehee Lee , Sewook Seo , "David S. Miller" Subject: [PATCH 5.19 34/38] net: Find dst with sks xfrm policy not ctl_sk Date: Wed, 21 Sep 2022 17:46:18 +0200 Message-Id: <20220921153647.348972877@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: sewookseo commit e22aa14866684f77b4f6b6cae98539e520ddb731 upstream. If we set XFRM security policy by calling setsockopt with option IPV6_XFRM_POLICY, the policy will be stored in 'sock_policy' in 'sock' struct. However tcp_v6_send_response doesn't look up dst_entry with the actual socket but looks up with tcp control socket. This may cause a problem that a RST packet is sent without ESP encryption & peer's TCP socket can't receive it. This patch will make the function look up dest_entry with actual socket, if the socket has XFRM policy(sock_policy), so that the TCP response packet via this function can be encrypted, & aligned on the encrypted TCP socket. Tested: We encountered this problem when a TCP socket which is encrypted in ESP transport mode encryption, receives challenge ACK at SYN_SENT state. After receiving challenge ACK, TCP needs to send RST to establish the socket at next SYN try. But the RST was not encrypted & peer TCP socket still remains on ESTABLISHED state. So we verified this with test step as below. [Test step] 1. Making a TCP state mismatch between client(IDLE) & server(ESTABLISHED). 2. Client tries a new connection on the same TCP ports(src & dst). 3. Server will return challenge ACK instead of SYN,ACK. 4. Client will send RST to server to clear the SOCKET. 5. Client will retransmit SYN to server on the same TCP ports. [Expected result] The TCP connection should be established. Cc: Maciej =C5=BBenczykowski Cc: Eric Dumazet Cc: Steffen Klassert Cc: Sehee Lee Signed-off-by: Sewook Seo Reviewed-by: Eric Dumazet Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- include/net/xfrm.h | 2 ++ net/ipv4/ip_output.c | 2 +- net/ipv4/tcp_ipv4.c | 2 ++ net/ipv6/tcp_ipv6.c | 5 ++++- 4 files changed, 9 insertions(+), 2 deletions(-) --- a/include/net/xfrm.h +++ b/include/net/xfrm.h @@ -1195,6 +1195,8 @@ int __xfrm_sk_clone_policy(struct sock * =20 static inline int xfrm_sk_clone_policy(struct sock *sk, const struct sock = *osk) { + if (!sk_fullsock(osk)) + return 0; sk->sk_policy[0] =3D NULL; sk->sk_policy[1] =3D NULL; if (unlikely(osk->sk_policy[0] || osk->sk_policy[1])) --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1704,7 +1704,7 @@ void ip_send_unicast_reply(struct sock * tcp_hdr(skb)->source, tcp_hdr(skb)->dest, arg->uid); security_skb_classify_flow(skb, flowi4_to_flowi_common(&fl4)); - rt =3D ip_route_output_key(net, &fl4); + rt =3D ip_route_output_flow(net, &fl4, sk); if (IS_ERR(rt)) return; =20 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -819,6 +819,7 @@ static void tcp_v4_send_reset(const stru ctl_sk->sk_priority =3D (sk->sk_state =3D=3D TCP_TIME_WAIT) ? inet_twsk(sk)->tw_priority : sk->sk_priority; transmit_time =3D tcp_transmit_time(sk); + xfrm_sk_clone_policy(ctl_sk, sk); } ip_send_unicast_reply(ctl_sk, skb, &TCP_SKB_CB(skb)->header.h4.opt, @@ -827,6 +828,7 @@ static void tcp_v4_send_reset(const stru transmit_time); =20 ctl_sk->sk_mark =3D 0; + xfrm_sk_free_policy(ctl_sk); sock_net_set(ctl_sk, &init_net); __TCP_INC_STATS(net, TCP_MIB_OUTSEGS); __TCP_INC_STATS(net, TCP_MIB_OUTRSTS); --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -952,7 +952,10 @@ static void tcp_v6_send_response(const s * Underlying function will use this to retrieve the network * namespace */ - dst =3D ip6_dst_lookup_flow(sock_net(ctl_sk), ctl_sk, &fl6, NULL); + if (sk && sk->sk_state !=3D TCP_TIME_WAIT) + dst =3D ip6_dst_lookup_flow(net, sk, &fl6, NULL); /*sk's xfrm_policy can= be referred*/ + else + dst =3D ip6_dst_lookup_flow(net, ctl_sk, &fl6, NULL); if (!IS_ERR(dst)) { skb_dst_set(buff, dst); ip6_xmit(ctl_sk, buff, &fl6, fl6.flowi6_mark, NULL, From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B56BC6FA82 for ; Wed, 21 Sep 2022 15:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231128AbiIUPtp (ORCPT ); Wed, 21 Sep 2022 11:49:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231750AbiIUPsw (ORCPT ); Wed, 21 Sep 2022 11:48:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CC6CE9DF95; Wed, 21 Sep 2022 08:47:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E5D406312F; Wed, 21 Sep 2022 15:47:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB75CC433C1; Wed, 21 Sep 2022 15:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775267; bh=spInQ7coVvtdxGMBzr2GLkS2P4ddh6lYh6Po0asyqQ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YP3mKAjYpbXm3D39Ln6M/o5x9hKzQqXntXdSQf+O5zLtdTPECnSzDZ02Qw5CEXxgQ 6lrCpR06UAveubQaKv8Ui9EfmjfDkLmGGYnzb8wAz25Ra4LEzM5OhPohJ2g0eC1Ac7 pMgSCdJfVcQ4p6hI9bx7UfWODzNzsDVZpb8II9TI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Janne Grunau , Marc Zyngier , Rob Herring Subject: [PATCH 5.19 35/38] dt-bindings: apple,aic: Fix required item "apple,fiq-index" in affinity description Date: Wed, 21 Sep 2022 17:46:19 +0200 Message-Id: <20220921153647.376565933@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Janne Grunau commit da3b1c294d470b2cf3c7046cc9e0d5c66f0a6c65 upstream. The required list used "fiq-index" instead of "apple,fiq-index" described as property and used in the dts. Add the missing "apple," prefix. Fixes: dba07ad11384 ("dt-bindings: apple,aic: Add affinity description for = per-cpu pseudo-interrupts") Signed-off-by: Janne Grunau Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20220909135103.98179-2-j@jannau.net Signed-off-by: Rob Herring Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml | = 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml +++ b/Documentation/devicetree/bindings/interrupt-controller/apple,aic.yaml @@ -96,7 +96,7 @@ properties: Documentation/devicetree/bindings/arm/cpus.yaml). =20 required: - - fiq-index + - apple,fiq-index - cpus =20 required: From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D1B8C6FA8E for ; Wed, 21 Sep 2022 15:50:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231660AbiIUPun (ORCPT ); Wed, 21 Sep 2022 11:50:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230326AbiIUPt4 (ORCPT ); Wed, 21 Sep 2022 11:49:56 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B39649DB5C; Wed, 21 Sep 2022 08:48:02 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C259162C83; Wed, 21 Sep 2022 15:47:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2D91C433C1; Wed, 21 Sep 2022 15:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775270; bh=yHOKXtx+Gl0du+lF7DmbIPAKD/iEhZIrQblOEAIr2F8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gjlCnA/EfpidfjZ39zx1hI63qDeVphgrlktMr9u59izWlhBbwHIxBB++bw80bOa9G /o26YSo84dwXwt2noZWE2VKIePa6Z1nXKvRrF3o0qw/Qx0PkcgLBUw5LaLhlHN8/PN vSod2FSo75mvMR5YSuGoFMgTcZAkJ60HYHpFZHWg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot , Tetsuo Handa , Tejun Heo Subject: [PATCH 5.19 36/38] cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all() Date: Wed, 21 Sep 2022 17:46:20 +0200 Message-Id: <20220921153647.405603171@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Tetsuo Handa commit 43626dade36fa74d3329046f4ae2d7fdefe401c6 upstream. syzbot is hitting percpu_rwsem_assert_held(&cpu_hotplug_lock) warning at cpuset_attach() [1], for commit 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock") missed that cpuset_attach() is also called from cgroup_attach_task_all(). Add cpus_read_lock() like what cgroup_procs_write_start() does. Link: https://syzkaller.appspot.com/bug?extid=3D29d3a3b4d86c8136ad9e [1] Reported-by: syzbot Signed-off-by: Tetsuo Handa Fixes: 4f7e7236435ca0ab ("cgroup: Fix threadgroup_rwsem <-> cpus_read_lock(= ) deadlock") Signed-off-by: Tejun Heo Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- kernel/cgroup/cgroup-v1.c | 2 ++ 1 file changed, 2 insertions(+) --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c @@ -59,6 +59,7 @@ int cgroup_attach_task_all(struct task_s int retval =3D 0; =20 mutex_lock(&cgroup_mutex); + cpus_read_lock(); percpu_down_write(&cgroup_threadgroup_rwsem); for_each_root(root) { struct cgroup *from_cgrp; @@ -72,6 +73,7 @@ int cgroup_attach_task_all(struct task_s break; } percpu_up_write(&cgroup_threadgroup_rwsem); + cpus_read_unlock(); mutex_unlock(&cgroup_mutex); =20 return retval; From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00763C6FA8E for ; Wed, 21 Sep 2022 15:50:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230110AbiIUPu3 (ORCPT ); Wed, 21 Sep 2022 11:50:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231646AbiIUPtq (ORCPT ); Wed, 21 Sep 2022 11:49:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 752069E0F0; Wed, 21 Sep 2022 08:48:07 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8B8B2B82714; Wed, 21 Sep 2022 15:47:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8DF67C433C1; Wed, 21 Sep 2022 15:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775276; bh=p7AcE94GDeZoBI612utIdrJxO7Yxftdd31a4ejR6FY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z4+j4idrMTRa3lBnyMSa7UMKJBvlNyOAfkxV3Qjkv0mos253xMPKxBu5qICaknSrX y0rz3FNpjHbFqLL2kbijLdMCNFXUB0A0laleCJ1o0XN07FZxutlyfgNrFs9vFzeyZC 7Gga0aQU6nOl+TkZ1V9shcPwhNLhtZ8qWGqvrhOM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Takashi Iwai Subject: [PATCH 5.19 37/38] ALSA: hda/sigmatel: Keep power up while beep is enabled Date: Wed, 21 Sep 2022 17:46:21 +0200 Message-Id: <20220921153647.433680621@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Takashi Iwai commit 414d38ba871092aeac4ed097ac4ced89486646f7 upstream. It seems that the beep playback doesn't work well on IDT codec devices when the codec auto-pm is enabled. Keep the power on while the beep switch is enabled. Link: https://bugzilla.suse.com/show_bug.cgi?id=3D1200544 Link: https://lore.kernel.org/r/20220904072750.26164-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- sound/pci/hda/patch_sigmatel.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -209,6 +209,7 @@ struct sigmatel_spec { =20 /* beep widgets */ hda_nid_t anabeep_nid; + bool beep_power_on; =20 /* SPDIF-out mux */ const char * const *spdif_labels; @@ -4443,6 +4444,26 @@ static int stac_suspend(struct hda_codec =20 return 0; } + +static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid) +{ + struct sigmatel_spec *spec =3D codec->spec; + int ret =3D snd_hda_gen_check_power_status(codec, nid); + +#ifdef CONFIG_SND_HDA_INPUT_BEEP + if (nid =3D=3D spec->gen.beep_nid && codec->beep) { + if (codec->beep->enabled !=3D spec->beep_power_on) { + spec->beep_power_on =3D codec->beep->enabled; + if (spec->beep_power_on) + snd_hda_power_up_pm(codec); + else + snd_hda_power_down_pm(codec); + } + ret |=3D spec->beep_power_on; + } +#endif + return ret; +} #else #define stac_suspend NULL #endif /* CONFIG_PM */ @@ -4455,6 +4476,7 @@ static const struct hda_codec_ops stac_p .unsol_event =3D snd_hda_jack_unsol_event, #ifdef CONFIG_PM .suspend =3D stac_suspend, + .check_power_status =3D stac_check_power_status, #endif }; From nobody Thu Apr 2 18:32:11 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94D06C6FA8E for ; Wed, 21 Sep 2022 15:50:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231339AbiIUPuj (ORCPT ); Wed, 21 Sep 2022 11:50:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230087AbiIUPtx (ORCPT ); Wed, 21 Sep 2022 11:49:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2398E9E0FB; Wed, 21 Sep 2022 08:48:08 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5BB48B830A7; Wed, 21 Sep 2022 15:48:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BF88BC433C1; Wed, 21 Sep 2022 15:47:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1663775279; bh=bRmbJyoukGDORNxxyNwdRx9+bZox2KdRIYgPsKDYFUM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tw1Pk3tpwmadfRZWmNk0lTsV2E5E7GcHsvm1CRLOR7g3bC7wuPvGuRQR/xciA+g5S /Whmc1obAjI5RmSd1TsEt8eiRGtTKUTZmUCtpK1uEU+6eXdThwBrGy/I3RME1SrSKN XHJm6A2ncXjGPeU6aCq8K3VR4Nknh4hiSXwndZCE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Takashi Iwai Subject: [PATCH 5.19 38/38] ALSA: hda/sigmatel: Fix unused variable warning for beep power change Date: Wed, 21 Sep 2022 17:46:22 +0200 Message-Id: <20220921153647.462505781@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220921153646.298361220@linuxfoundation.org> References: <20220921153646.298361220@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Takashi Iwai commit 51bdc8bb82525cd70feb92279c8b7660ad7948dd upstream. The newly added stac_check_power_status() caused a compile warning when CONFIG_SND_HDA_INPUT_BEEP is disabled. Fix it. Fixes: 414d38ba8710 ("ALSA: hda/sigmatel: Keep power up while beep is enabl= ed") Reported-by: kernel test robot Link: https://lore.kernel.org/r/20220905130630.2845-1-tiwai@suse.de Signed-off-by: Takashi Iwai Signed-off-by: Greg Kroah-Hartman Tested-by: Bagas Sanjaya Tested-by: Guenter Roeck --- sound/pci/hda/patch_sigmatel.c | 2 ++ 1 file changed, 2 insertions(+) --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c @@ -4447,7 +4447,9 @@ static int stac_suspend(struct hda_codec =20 static int stac_check_power_status(struct hda_codec *codec, hda_nid_t nid) { +#ifdef CONFIG_SND_HDA_INPUT_BEEP struct sigmatel_spec *spec =3D codec->spec; +#endif int ret =3D snd_hda_gen_check_power_status(codec, nid); =20 #ifdef CONFIG_SND_HDA_INPUT_BEEP