From patchwork Mon Sep 27 17:01:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 514727 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp4149535ejj; Mon, 27 Sep 2021 10:20:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOax3SBpaf2+zw29uEcXLFumG2SV8x0JhnpANHtaYn4Rp3EOvp8PjokJWk2zvaCLWYEajW X-Received: by 2002:a05:6402:1598:: with SMTP id c24mr1260116edv.253.1632763217004; Mon, 27 Sep 2021 10:20:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632763216; cv=none; d=google.com; s=arc-20160816; b=EyBUpKkfIgcxkaizbZLMGhxVSJRfO8/fj2hWCSx/QxkAPinxyDiYzmn2cq0J562X0E QXHsKXpu3wLYcUPzugokOxYgszaigzP0KfD62fGTkMxCigZ6xUqHGHfKEKvSVzp/KBPh agq+5Qms9Mny74I0QtQfHzXYgUGmn7nptRqLkOeHpo+RTOBk2uAZR7dj1T4CDrYi41r7 iSCgCLRj2HiqNfCgSZjRiOxu8lqynHrA73JF6sk7OdKgzcpjcPt42ei6Yqr7Xa23nypv B3wNv1wb0WAs4ogNRxDmq9cl5pSonpwX2Q2ZG2i7vOTs5/YmMFRnaLlMo8ZSi6ImDivf mRTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YWcpdVZEpbJPI67XUWmuETFlDxggZ2zt6pJWh6VEYY4=; b=lL/siudxVnSbnpPO5XQFJIK+8vFVVIP0oygBL+VX2NCPestKZ9sOA5mxeyW8Z40GHy GcZfvD/Lr3ywWPLxaYb5UW6uf9lD/wahVmTtfiuQ/ROl73xNpd450/jeOSpuw8Wg43Kg Xp+bI8fqPFRmovDM9lwxwIVvZXvwdlZgpQbgfqi4JvZeoyWm+Llx+ydKNEGes4te6ERE 4zBsw9HCLVzsB9sajWDjduwGhf97WS8QnG8bemnNU2UFsewiIhvMRcaBhEgC5MWFTeKN LGRat549zplHim870cqd9WFEqF3J4+8PJnLMuXwwrSOxjyyUvpvqPgkgkJFAV2/EJL8+ zRug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Bnj1Kq3M; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si17671612eje.191.2021.09.27.10.20.16; Mon, 27 Sep 2021 10:20:16 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Bnj1Kq3M; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237036AbhI0RVt (ORCPT + 11 others); Mon, 27 Sep 2021 13:21:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:34432 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236997AbhI0RTr (ORCPT ); Mon, 27 Sep 2021 13:19:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4711F6120C; Mon, 27 Sep 2021 17:12:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762779; bh=9LRoE2px25O4HcnNQgzWjeuyz5NTiCYmeax5E52GbXQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bnj1Kq3M9T5sqEQwl/8t9OiFEpz2qrnTTxBwFSLj2D4gaFNj9KFmrESYJ4/1nK0ps GGFt3cQYZoDK8Y9FL2HZuVFYw9C12qyRFAXNLmF8WeXg1YuVsF8jJJdtVH7V9Im5S9 bVJ42Q9OIBkeX32U3vHpob3I1HwR1xbI4sCdY7zM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Rui Miguel Silva Subject: [PATCH 5.14 021/162] usb: isp1760: do not sleep in field register poll Date: Mon, 27 Sep 2021 19:01:07 +0200 Message-Id: <20210927170234.192519990@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170233.453060397@linuxfoundation.org> References: <20210927170233.453060397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Rui Miguel Silva commit 41f673183862a183d4ea0522c045fabfbd1b28c8 upstream. When polling for a setup or clear of a register field we were sleeping in atomic context but using a very tight sleep interval. Since the use cases for this poll mechanism are only in setup and stop paths, and in practice this poll is not used most of the times but needs to be there to comply to hardware setup times, remove the sleep time and make the poll loop tighter. Reported-by: Dan Carpenter Signed-off-by: Rui Miguel Silva Link: https://lore.kernel.org/r/20210727100516.4190681-3-rui.silva@linaro.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/isp1760/isp1760-hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/drivers/usb/isp1760/isp1760-hcd.c +++ b/drivers/usb/isp1760/isp1760-hcd.c @@ -251,7 +251,7 @@ static int isp1760_hcd_set_and_wait(stru isp1760_hcd_set(hcd, field); return regmap_field_read_poll_timeout(priv->fields[field], val, - val, 10, timeout_us); + val, 0, timeout_us); } static int isp1760_hcd_set_and_wait_swap(struct usb_hcd *hcd, u32 field, @@ -263,7 +263,7 @@ static int isp1760_hcd_set_and_wait_swap isp1760_hcd_set(hcd, field); return regmap_field_read_poll_timeout(priv->fields[field], val, - !val, 10, timeout_us); + !val, 0, timeout_us); } static int isp1760_hcd_clear_and_wait(struct usb_hcd *hcd, u32 field, @@ -275,7 +275,7 @@ static int isp1760_hcd_clear_and_wait(st isp1760_hcd_clear(hcd, field); return regmap_field_read_poll_timeout(priv->fields[field], val, - !val, 10, timeout_us); + !val, 0, timeout_us); } static bool isp1760_hcd_is_set(struct usb_hcd *hcd, u32 field) From patchwork Mon Sep 27 17:01:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 514726 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp4149317ejj; Mon, 27 Sep 2021 10:20:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0o/eWquz9D7z/SFia2iLRgxkGz3Y79vlVFXYv3dEE4QPZDFsitbx48iHk10HCEFLfkYen X-Received: by 2002:a17:906:850f:: with SMTP id i15mr1266136ejx.401.1632763200409; Mon, 27 Sep 2021 10:20:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632763200; cv=none; d=google.com; s=arc-20160816; b=QHZgEHN0d5vcPxiBg1e7l0m3wGkH2lDciQGthN6BChlvSJKaovJ3W5lWI4xZyaDI3r bs5AjjeXt/QK0JjTNJxGyjtGS0jU1dDUGPZyEF+GRltOoUNq45vNqymR7WhJk+8pjcr1 Qqy0olQFQVDyedATgYlIFKxKHfh1anqiILUZbE5bMXhQlkJlCCl4mpOQDDQ7INEiOl1L w4gthmAqw705ViIyQyS7Kr+L3vLBv4RIPibZ1cw4C77zKCw0/3sfkxz99OiAB6+JKzcW lkgh74sQKkF3qLe52Hm61pJiQhzdt27T6eg25m7YABDgGQd7Rz9N9jaxHChUKiocBHcU K2GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=byWVxYFRB2YJ3YxljFDDMuyKS2g5lPfemrA8RH7R/I0=; b=0pd9vOK5/2D8mpkXykqrk4zbHHTwXgiPnNxw4eqSq8F1ezsCj/ehb5l607f1wAqgil 1q80lsHhvOsMAoghIXMfjMlgJnITEVP1DOvgBqTkLFmSIlEEN+jvZQTpjKVYRwGZRYPN ACYEqqsx9Lhw+ZKMZNcnJJ7l2hOpe90ldwxFB3tJOhfVqYXrUdatbCDm4yLZ0cY9wCpk D9GgT0voOhOwceXNFRoB22nTUIad5oJXJ2QsbpvkdBMzmWewlq6N+rcRHCied6cMPfdm gAqFx0gB5VRcXOIU1eH5BLJ49CFUbLu7EdPNqJVXDS0v8KRcChsDPJPMYC3uqHFUUUw0 ziAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nV1KFb0i; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si17671612eje.191.2021.09.27.10.20.00; Mon, 27 Sep 2021 10:20:00 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nV1KFb0i; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236884AbhI0RVd (ORCPT + 11 others); Mon, 27 Sep 2021 13:21:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:34226 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236916AbhI0RTk (ORCPT ); Mon, 27 Sep 2021 13:19:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9AE43610E8; Mon, 27 Sep 2021 17:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762777; bh=lo2reoXgCgtAPcNhJj31DpCDLlXh3mqqTd+mLD9N984=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nV1KFb0iQ8t5QvLJm11Hnw4lk95HKGKeIlEHcNF/MMPh/jW5284pYciQl8ywMdn3R xM+hvBxTrNqBe5FNznCPvZwrEgGK830tPFEjk+XiURn7rgdOkCPEQRoAOSNXZeTHfQ UD8hcYLYmNlk6tq+nu/QIwLHVEGyCrF6Z+hq+pls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Baryshkov , Bjorn Andersson , Mark Brown , Sasha Levin Subject: [PATCH 5.14 047/162] regulator: qcom-rpmh-regulator: fix pm8009-1 ldo7 resource name Date: Mon, 27 Sep 2021 19:01:33 +0200 Message-Id: <20210927170235.128107549@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170233.453060397@linuxfoundation.org> References: <20210927170233.453060397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dmitry Baryshkov [ Upstream commit 863580418bc82062083be854355f2213d3d804f5 ] Fix a typo in the pm8009 LDO7 declaration, it uses resource name ldo%s6 instead of ldo%s7. Fixes: 951384cabc5d ("regulator: qcom-rpmh-regulator: add pm8009-1 chip revision") Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Link: https://lore.kernel.org/r/20210901114350.1106073-1-dmitry.baryshkov@linaro.org Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/regulator/qcom-rpmh-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.33.0 diff --git a/drivers/regulator/qcom-rpmh-regulator.c b/drivers/regulator/qcom-rpmh-regulator.c index 6cca910a76de..7f458d510483 100644 --- a/drivers/regulator/qcom-rpmh-regulator.c +++ b/drivers/regulator/qcom-rpmh-regulator.c @@ -991,7 +991,7 @@ static const struct rpmh_vreg_init_data pm8009_1_vreg_data[] = { RPMH_VREG("ldo4", "ldo%s4", &pmic5_nldo, "vdd-l4"), RPMH_VREG("ldo5", "ldo%s5", &pmic5_pldo, "vdd-l5-l6"), RPMH_VREG("ldo6", "ldo%s6", &pmic5_pldo, "vdd-l5-l6"), - RPMH_VREG("ldo7", "ldo%s6", &pmic5_pldo_lv, "vdd-l7"), + RPMH_VREG("ldo7", "ldo%s7", &pmic5_pldo_lv, "vdd-l7"), {} }; From patchwork Mon Sep 27 17:02:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 514729 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp4152587ejj; Mon, 27 Sep 2021 10:23:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4XlaeNYnwhrnwaIzJJsr6mTCoMRu82RhtNOjaRuSFtw1729sZBC8WDbIaKkNJNu/jH64C X-Received: by 2002:a05:6402:485:: with SMTP id k5mr432901edv.257.1632763422765; Mon, 27 Sep 2021 10:23:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632763422; cv=none; d=google.com; s=arc-20160816; b=A/xF7wkcO5czZFEfL7NcdIVCN3Xdo1LMUpFThM3t3UvvBysp7Cujm7TD6Jg9Xsola+ dDRu66OWdhi6IDGuuMtfz+Ot0aMASbVjFh3ndHJQnRlIUAkrb8IdQBhdSx55IY9s8coE s6Kyd/jrDyYo5XXNqBKx3/8r2VKPPyGTABADWbI1h3UpQjAk9Jege9aK9tQ4SIqoVnPr UcIjyG4LlEL7ZVyKb+bpQfXv8tetiwU4qjdNYq7Z+xKO5nztcbxeJdJ46ubR0Xa1BcMJ nwM1QEFu5T3Uc5Y/AK70ktWM2lZNSPd0M9on9vWWm9W/UAHPR2ZeAg1zgX69p6JKNB+I GOfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HvLWcuvZqsx1131urhCM5ooagYBgsoP7TEwmPDc9Dg8=; b=Bd6/EDI93TdP+SqM1sHUcBCDDHHHJOLfTQTq6TQ+92GiTcUIdj4bDphr5M5cWpT6pd xaZfJ2iQqNtw9kZgu0H2aaU9b+QlINikSDIuaBHBdsk/0p5hcyhk9RKHKL0S9abWrKIs RtvHI3p1NrnqbDT7WIqhJLibzBGIfg9z+uTag/Tfgw5/t0pHnH4V7xIN4oU58I81ndr4 PdCmL7XxT+tg/u5Dny/BoNshsk1PT0MFRrla2GecNxamAeswBhBAO/P1p0PH3WDJ6izO djN71DEXrs1e0yFM+5JNAZKWj3PwjHunZrPrcocGrPH0Wzb9jMXjIUgP5VaWjcw0CiGX AhgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mERd1w1F; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si20266732ejf.430.2021.09.27.10.23.42; Mon, 27 Sep 2021 10:23:42 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mERd1w1F; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236373AbhI0RZN (ORCPT + 11 others); Mon, 27 Sep 2021 13:25:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:35282 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237066AbhI0RWW (ORCPT ); Mon, 27 Sep 2021 13:22:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F2785613AC; Mon, 27 Sep 2021 17:14:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762852; bh=Jg/dchFRl2rrd7zTyH4d36yYuruokrwJB9U1vQ8Skvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mERd1w1FlG7wKlo/9QijHEp9BfzMjTsdGOkY/bISHkRgDJH858H+N0Jtcu+yqJk1A oneh1Mmx7c0UlokNz2c5VmoWvA+dhJBiCrb/PQtU2YmM3/Ub5hYQE/Ox7wDAR/89cV Lvz4PUWM3B2VJgXfvhQqMHIYfeIa63FuF4NnQuyA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown , Catalin Marinas , Sasha Levin Subject: [PATCH 5.14 075/162] kselftest/arm64: signal: Add SVE to the set of features we can check for Date: Mon, 27 Sep 2021 19:02:01 +0200 Message-Id: <20210927170236.052759270@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170233.453060397@linuxfoundation.org> References: <20210927170233.453060397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mark Brown [ Upstream commit d4e4dc4fab686c5f3f185272a19b83930664bef5 ] Allow testcases for SVE signal handling to flag the dependency and be skipped on systems without SVE support. Signed-off-by: Mark Brown Link: https://lore.kernel.org/r/20210819134245.13935-2-broonie@kernel.org Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- tools/testing/selftests/arm64/signal/test_signals.h | 2 ++ tools/testing/selftests/arm64/signal/test_signals_utils.c | 3 +++ 2 files changed, 5 insertions(+) -- 2.33.0 diff --git a/tools/testing/selftests/arm64/signal/test_signals.h b/tools/testing/selftests/arm64/signal/test_signals.h index f96baf1cef1a..ebe8694dbef0 100644 --- a/tools/testing/selftests/arm64/signal/test_signals.h +++ b/tools/testing/selftests/arm64/signal/test_signals.h @@ -33,10 +33,12 @@ */ enum { FSSBS_BIT, + FSVE_BIT, FMAX_END }; #define FEAT_SSBS (1UL << FSSBS_BIT) +#define FEAT_SVE (1UL << FSVE_BIT) /* * A descriptor used to describe and configure a test case. diff --git a/tools/testing/selftests/arm64/signal/test_signals_utils.c b/tools/testing/selftests/arm64/signal/test_signals_utils.c index 2de6e5ed5e25..6836510a522f 100644 --- a/tools/testing/selftests/arm64/signal/test_signals_utils.c +++ b/tools/testing/selftests/arm64/signal/test_signals_utils.c @@ -26,6 +26,7 @@ static int sig_copyctx = SIGTRAP; static char const *const feats_names[FMAX_END] = { " SSBS ", + " SVE ", }; #define MAX_FEATS_SZ 128 @@ -263,6 +264,8 @@ int test_init(struct tdescr *td) */ if (getauxval(AT_HWCAP) & HWCAP_SSBS) td->feats_supported |= FEAT_SSBS; + if (getauxval(AT_HWCAP) & HWCAP_SVE) + td->feats_supported |= FEAT_SVE; if (feats_ok(td)) fprintf(stderr, "Required Features: [%s] supported\n", From patchwork Mon Sep 27 17:02:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 514730 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp4152633ejj; Mon, 27 Sep 2021 10:23:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwoajvMogE//lxq/4FOG8RzJEp4JOgn/X1XfiT9scuFZtCph1U3+BfTFwOch+DZFUq7SdL X-Received: by 2002:a17:906:6948:: with SMTP id c8mr1318075ejs.187.1632763426368; Mon, 27 Sep 2021 10:23:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632763426; cv=none; d=google.com; s=arc-20160816; b=pRG4YKl58f4VafZT7kIG4STWVOjp22L+eO5+WKVtX5mO5WJnXaU5xUyc2V0e6nCL/b /lEzt9MacK/ModAc4y5qCpsT3sHnGPhpF7ry6dGFyMcsJ5rapRVVDolr7EmWv6nPWwhR ufBOeGwljsEd3RdYyxenKutWUORPpzFnVC/C7OSLvK/0RTdjyTt7a/BzjoQcCL/fvKdA b2gVeRgtEX8Au0TunJql2AdwXOk1JsW/lliuW34DWfHe/7IKNiL/eqv40gIc2P4JZoUR wJfC52OwIf6Xm+gx6rNakyYjsA9uTmzc4vBN/AH1qeQKTf8PE1pd758g0ggfQvBfDaqM sk6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=l/CHWl0pUuBovn8F4Lby+0ULFaH6n6ZWc5B5D2KdqIo=; b=05mBJgEp1E3Y7g3W3PquSljPfKMGSm0vTEL84O+uhd7eSqajfRiop/vFgU9NoBEJ/n tOXvkBrnFovP2noKh0HmJa1vh03MDeVBpPocRYpXFpFfwf2wgbQHQnL1B7saN5Vit7JR gCjAg/Pm3bIPJi5vwtpLtBlidc+YE51ZKsY2lrPG3nahU7ZO713BmtHy5ZhbljH9JNMj k8bAX6/339m9qpGdodt8GCy6UjIBCPuIfPUNT0Iq7TEO+Gm1j4HNbIyhHtLMqG3+d3Vm 76AkfiqbE2oAiTow1SHzBY6EzSfSm1KcvALQqQQhC05dz6Lfzr4IeKcm9KCgwGHmFbYb YGOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Cup//lAf"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a21si20266732ejf.430.2021.09.27.10.23.46; Mon, 27 Sep 2021 10:23:46 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Cup//lAf"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236019AbhI0RZU (ORCPT + 11 others); Mon, 27 Sep 2021 13:25:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237205AbhI0RWb (ORCPT ); Mon, 27 Sep 2021 13:22:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3531E613DB; Mon, 27 Sep 2021 17:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762857; bh=zt4hvOLZHDrFGgDXcjKuZKFvqo4FFHPtNctULI1Ifko=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cup//lAff67sdI+gFpxsc9iyCXrZRANcpI/5UNUFN8XOUhNG1XBp1LPjMDGoFLS9d z+1lPOzUV+4M/0Vv2jLKvL9Z2F6RCR8ySVHhZ9UWhMR26ZFjOpaW4MJXX236ugAkTa nlOdozuL9r5KjGZCqdMeZh4vGTIMwrBib2Z1S3Ro= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Russell King (Oracle)" , Mark Brown , "Russell King (Oracle)" , Andreas Schwab , Marco Felsch , Sasha Levin Subject: [PATCH 5.14 077/162] spi: Revert modalias changes Date: Mon, 27 Sep 2021 19:02:03 +0200 Message-Id: <20210927170236.125714829@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170233.453060397@linuxfoundation.org> References: <20210927170233.453060397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mark Brown [ Upstream commit 96c8395e2166efa86082f3b71567ffd84936439b ] During the v5.13 cycle we updated the SPI subsystem to generate OF style modaliases for SPI devices, replacing the old Linux style modalises we used to generate based on spi_device_id which are the DT style name with the vendor removed. Unfortunately this means that we start only reporting OF style modalises and not the old ones and there is nothing that ensures that drivers list every possible OF compatible string in their OF ID table. The result is that there are systems which have been relying on loading modules based on the old style that are now broken, as found by Russell King with spi-nor on Macchiatobin. spi-nor is a particularly problematic case for this, it only lists a single generic DT compatible jedec,spi-nor in the driver but supports a huge raft of device specific compatibles, with a large set of part numbers many of which are offered by multiple vendors. Russell's searches of upstream device trees has turned up examples with vendor names written in non-standard ways too. To make matters worse up until 8ff16cf77ce3 ("Documentation: devicetree: m25p80: add "nor-jedec" binding") the generic compatible was not part of the binding so there are device trees out there written to that binding version which don't list it all. The sheer number of parts supported together with our previous approach of ignoring the vendor ID makes robustly fixing this by adding compatibles to the spi-nor driver seem problematic, the current DT binding document does not list all the parts supported by the driver at the minute (further patches will fix this). I've also investigated supporting both formats of modalias simultaneously but that doesn't seem possible, especially without breaking our userspace ABI which is obviously not viable. Instead revert the relevant changes for now: e09f2ab8eecc ("spi: update modalias_show after of_device_uevent_modalias support") 3ce6c9e2617e ("spi: add of_device_uevent_modalias support") This will unfortunately mean that any system which had started having modules autoload based on the OF compatibles for drivers that list things there but not in the spi_device_ids will now not have those modules load which is itself a regression. Since it affects a narrower time window and the particularly problematic spi-nor driver may be critical to system boot on smaller systems this seems the best of a series of bad options. I will start an audit of SPI drivers to identify and fix cases where things won't autoload using spi_device_id, this is not great but seems to be the best way forward that anyone has been able to identify. Thanks to Russell for both his report and the additional diagnostic and analysis work he has done here, the detailed research above was his work. Fixes: e09f2ab8eecc ("spi: update modalias_show after of_device_uevent_modalias support") Fixes: 3ce6c9e2617e ("spi: add of_device_uevent_modalias support") Reported-by: Russell King (Oracle) Suggested-by: Russell King (Oracle) Signed-off-by: Mark Brown Tested-by: Russell King (Oracle) Cc: Andreas Schwab Cc: Marco Felsch Signed-off-by: Sasha Levin --- drivers/spi/spi.c | 8 -------- 1 file changed, 8 deletions(-) -- 2.33.0 diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index e4dc593b1f32..f95f7666cb5b 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -58,10 +58,6 @@ modalias_show(struct device *dev, struct device_attribute *a, char *buf) const struct spi_device *spi = to_spi_device(dev); int len; - len = of_device_modalias(dev, buf, PAGE_SIZE); - if (len != -ENODEV) - return len; - len = acpi_device_modalias(dev, buf, PAGE_SIZE - 1); if (len != -ENODEV) return len; @@ -367,10 +363,6 @@ static int spi_uevent(struct device *dev, struct kobj_uevent_env *env) const struct spi_device *spi = to_spi_device(dev); int rc; - rc = of_device_uevent_modalias(dev, env); - if (rc != -ENODEV) - return rc; - rc = acpi_device_uevent_modalias(dev, env); if (rc != -ENODEV) return rc; From patchwork Mon Sep 27 17:02:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 514728 Delivered-To: patch@linaro.org Received: by 2002:a17:906:f46:0:0:0:0 with SMTP id h6csp4152122ejj; Mon, 27 Sep 2021 10:23:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwTijjBuRBLBR74xCHdD6vfkyuTCRqUEOkv6qQHU9HcxI1cWnRAOdC3qBEgZMo6GDilxulh X-Received: by 2002:aa7:d64b:: with SMTP id v11mr1363209edr.57.1632763391350; Mon, 27 Sep 2021 10:23:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632763391; cv=none; d=google.com; s=arc-20160816; b=yiJc1MfXGN8sBaAUff4fF6tFiWIrLtWKAS6YNvCrj+JfaBzkjHduD6vtnKxdsEZMVP hUZyOgop2udfyLU7q25TONribA/Nz31REj5HNfnbx0O0KZzMB/CsAgAYycguXTWmSzLO 0xYGbz5QQgI4dhLetyBwhTw64gt0l0qLgmsJcFGoTMBZQP1z3ZuvKMmPuIgJ0hhc1YyM wgr4yTRekTkHFO8alxa/n1xFcxYvZEr6U2uZ50WZuVJ66WoCB5xHjS1DYXcaParvaJeq r+kkt8UDT6T7VWLmykIcap3QuHI15Bs67KQHu49PrzvYOGysfM32Re/f97Lvp/g1WzDf tqnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=M1R4MDcB0E5e3f2a97slYaPL8kmcCVEG+PHWcGJQuNs=; b=frtG0rFFdWHBRQJdbATinywfbb6jsjTduh9tC1UjRdF+/h9hmHJCWMCdX+njAg1rhr lntGITbOJmsyLyZ1Th4/tNz1c5LJgw7hAljDUI3tyIAjQqcqEUd2++ccrFhEMmQxYOMI M0mIucJsDN4QcDicmySIza/pHn4QaMPQbkynFI6UCsacMJ2YPlCKCEBbzzlFQs95nNkO iZ6YpauPhYdQA4B0ly8sT8BpVWEAqJ6pp/zhpwc7KoOXswyGomiAFawiLR9xDhbtac2O 2spwj1nCdyi+dl8HWXpaMMTxwTrkwLsQjZsVNOsvLo77gyNeFJ7ycdKyIqkEfJum2/Xo HkBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rBH01gNI; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e24si18054154ejy.112.2021.09.27.10.23.11; Mon, 27 Sep 2021 10:23:11 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rBH01gNI; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237209AbhI0RYq (ORCPT + 11 others); Mon, 27 Sep 2021 13:24:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:36854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237112AbhI0RXK (ORCPT ); Mon, 27 Sep 2021 13:23:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2CC296108E; Mon, 27 Sep 2021 17:14:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762881; bh=S5HE0XjUMBtW5wljJ8wi+/kxUx/2wg/1d1IAK8AAWiI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rBH01gNIxRX/yPu8rStqeP051d4iUIFQ7El6xeYxgtL8FljjioHEdamRkZ4oSWITJ G0ct9vyJE8WZhRAAn+NPcElfKZzzmFN+B6BazyRbRyvTxlI6P1uYhGMiM4FGX2My3Y sspQrDRc6v2HF8sBaMoBL52B4eSdMTZCF1m6wkdk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Brown , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 085/162] nfc: st-nci: Add SPI ID matching DT compatible Date: Mon, 27 Sep 2021 19:02:11 +0200 Message-Id: <20210927170236.378470281@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170233.453060397@linuxfoundation.org> References: <20210927170233.453060397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Mark Brown [ Upstream commit 31339440b2d0a4987030aac026adbaba44e22490 ] Currently autoloading for SPI devices does not use the DT ID table, it uses SPI modalises. Supporting OF modalises is going to be difficult if not impractical, an attempt was made but has been reverted, so ensure that module autoloading works for this driver by adding the part name used in the compatible to the list of SPI IDs. Fixes: 96c8395e2166 ("spi: Revert modalias changes") Signed-off-by: Mark Brown Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/nfc/st-nci/spi.c | 1 + 1 file changed, 1 insertion(+) -- 2.33.0 diff --git a/drivers/nfc/st-nci/spi.c b/drivers/nfc/st-nci/spi.c index 250d56f204c3..e62b1a0916d8 100644 --- a/drivers/nfc/st-nci/spi.c +++ b/drivers/nfc/st-nci/spi.c @@ -278,6 +278,7 @@ static int st_nci_spi_remove(struct spi_device *dev) static struct spi_device_id st_nci_spi_id_table[] = { {ST_NCI_SPI_DRIVER_NAME, 0}, + {"st21nfcb-spi", 0}, {} }; MODULE_DEVICE_TABLE(spi, st_nci_spi_id_table);