From patchwork Wed Feb 28 18:49:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Unnathi Chalicheemala X-Patchwork-Id: 207961 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3543101dyb; Wed, 28 Feb 2024 10:51:09 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX1Wj84PlCIl/ynozrIvye/rlkWsosJOa6bDUmWi8HZUL3JHaN5njizoQPPldeYtyJEta7IGTYs47xmZs19qRoJzItpnw== X-Google-Smtp-Source: AGHT+IEvvGfg781XSe0cqsLvB8fnk9qUNY8MGVvyddF5v88xbnhatYMGL9pJR4+T4y+iLjfu0HR/ X-Received: by 2002:aa7:df8e:0:b0:566:6e4e:cb8c with SMTP id b14-20020aa7df8e000000b005666e4ecb8cmr199042edy.38.1709146268944; Wed, 28 Feb 2024 10:51:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709146268; cv=pass; d=google.com; s=arc-20160816; b=WbkYBvAQ+g6LmSxtEvzRwugGmnz9pLKS6MSARZG4cMTsv6Mj8iGk+hwRA2HvybnQLj Po3r570tdGPYhxXMTvnzkFEpL62cVIVVbLw5RPpbKg1TQK74o3NoCMmgHC5+c2CvK6Gj Zj2MevIPeROVW1J+wFnI6CRSiwOxjG2dGo0e+H9gkcHgpy9DtymdI15lmpIlbtwvv3yo +F0D+1oLqoZTSkIc5wL37xehrvSEUcJ0r1Ktm513MEe7S7YfDSXRALSis5xoFU4NjcN1 JiJAY+90YmzsTME3UxxrCvj3FpdRa4FNoF9cOJex4T5TqgxuwEwwM/GMCa99rgfM3+bD e12w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=ZiPseMKtZy0y624G5s3+0Q/s+zXnRig0XH16Jeuxqkg=; fh=vnGxVO582uqsGFQHtEnueznKyoH172hkZ54rScNFH4g=; b=lkrPSn+F8GLt8Tpi1/zLE3K1yy6YGhFfYjAU/yBUGCLhkF96EQAeEFR+L7wWlaSdDl aWJDo99vMa64xeB4e1gzYTuuI/1XTp8bfcRNoygXSVwplH4xL7GcFmo0HAn8CKdN7EYv 782IKNXUsxloCeIubImW+BvPZlCq5K+0ekm3wGUorEUxU8lR5g8H50H4d8iI0STyLF2u lRpcM2ZZ5/p+y7N8jo9Y9X4yVDUa5FZXj9QLWfFhXSp9SqmdMWlMv0zj+8sNM8crfj8C w9fw28tQL+pfqHQUB3ZqZU4bvjK6srZpYiGTxBUlN4/3nT6CQasSU7P51iPFqJiBsVmu k9sQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mkLcwBt6; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85555-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85555-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id eb14-20020a0564020d0e00b005640639cc75si1966856edb.526.2024.02.28.10.51.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 10:51:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85555-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mkLcwBt6; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85555-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85555-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 771411F2A4C2 for ; Wed, 28 Feb 2024 18:51:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F2BE79B85; Wed, 28 Feb 2024 18:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="mkLcwBt6" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61E3571EB9; Wed, 28 Feb 2024 18:50:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709146226; cv=none; b=S1dc/kYHGasHTEeaO9rCrAADjaDAHSgso/B+DbKvZT9CUKZ3uLdB0pQhlW8CmvtCTopf1OJTsBCCQcuQL2aU51jbKxjg+GfPH7FRrzeV1/yVeHbjG0LHrno9/virZNG/FSSNEdGrJnlOXT03tpDzUpFiSoCGZuqvgu8re4HhYCY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709146226; c=relaxed/simple; bh=qJ7niq6CmCPHPuu7A+47NgDwyWhCk2+VCDD6NlHJYuE=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=ZRfVHbA2v2Xogu8Rjb9uP3tuNC+cMi3U9UaugWiIbINObR4x1tto+c+QZ/0Puck43OJuYlPxgQC3x/NNROlpKqndvh50H6QE+co8GEh3ljNVH/u+Ywj/fjMWrWKlgHAa9PeRnbhzWxn2jD27rxgXKnHBCt3NAKUz14e/Z/Nyt+U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=mkLcwBt6; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41SDd91q008523; Wed, 28 Feb 2024 18:50:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=ZiPseMKtZy0y624G5s3+0Q/s+zXnRig0XH16Jeuxqkg =; b=mkLcwBt6CFAfAmBrlkCBWPuJqpnIqdgEwRH5g4sPFw8gdgKOV4IlkF2u2T4 N3Uu7Dwpq57mxCb4pwmcLU0ZIk6oztdrBeLu5EwCJ9/TM1GtaHyWug97ApwONd5I AZxGkNgjuiDX22FOYh5ykUG6djqsPTgrV1KixdmrgmsrX65KjnsW3hxqTLmSHV/s g6hJRK/PTk+Zmzt15xLnjXEvpyJiKCsCo2O/M2batbHVZEk6ZkPVaizpXWUbOThM TJIsSjNRelGWJQ3ICzvQnDoYOecEkWiD3FDSh/4zT+JUk6VqBrWKVZK6Ca1WJ18L skJ0LY1J29MvUqQPDk4aaGsphhw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wj5wc8vaq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 18:50:17 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41SIoGtF013925 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 18:50:16 GMT Received: from [169.254.0.1] (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 28 Feb 2024 10:50:13 -0800 From: Unnathi Chalicheemala Date: Wed, 28 Feb 2024 10:49:59 -0800 Subject: [PATCH 1/3] firmware: qcom-scm: Initialize waitq before setting global __scm Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240228-multi_waitq-v1-1-ccb096419af0@quicinc.com> References: <20240228-multi_waitq-v1-0-ccb096419af0@quicinc.com> In-Reply-To: <20240228-multi_waitq-v1-0-ccb096419af0@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Sibi Sankar CC: , , , Prasad Sodagudi , "Murali Nalajala" , Satya Durga Srinivasu Prabhala , Unnathi Chalicheemala X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709146213; l=1041; i=quic_uchalich@quicinc.com; s=20240202; h=from:subject:message-id; bh=qJ7niq6CmCPHPuu7A+47NgDwyWhCk2+VCDD6NlHJYuE=; b=hWsqUODIsElXLLnHPgV45a2DNDpX3ki0ik9yy6Rva8e5+2NzYVgjN2a94fhzbtkB8CgkzFuU3 K5GgZuOWchgBGBqywpKGX0oufBWcXzjdh4pegc2BwxAEI9gkLAQ976y X-Developer-Key: i=quic_uchalich@quicinc.com; a=ed25519; pk=8n+IFmsCDcEIg91sUP/julv9kf7kmyIKT2sR+1yFd4A= X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: A_m_Gaiw4dbEE_OX5PsZztKmPbQwW90S X-Proofpoint-ORIG-GUID: A_m_Gaiw4dbEE_OX5PsZztKmPbQwW90S X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-28_08,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 clxscore=1015 priorityscore=1501 mlxlogscore=999 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402280148 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792169758229755010 X-GMAIL-MSGID: 1792169758229755010 Suppose there's another device probing at the same time as SCM driver. It calls into SCM and triggers WAITQ sleep but waitq completion structure may not be initialized yet. Fix this by moving initialization of waitq before setting global __scm. Fixes: 6bf325992236 ("firmware: qcom: scm: Add wait-queue handling logic") Signed-off-by: Unnathi Chalicheemala --- drivers/firmware/qcom/qcom_scm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c index 520de9b5633a..c1be8270ead1 100644 --- a/drivers/firmware/qcom/qcom_scm.c +++ b/drivers/firmware/qcom/qcom_scm.c @@ -1854,11 +1854,11 @@ static int qcom_scm_probe(struct platform_device *pdev) if (ret) return ret; + init_completion(&scm->waitq_comp); + __scm = scm; __scm->dev = &pdev->dev; - init_completion(&__scm->waitq_comp); - irq = platform_get_irq_optional(pdev, 0); if (irq < 0) { if (irq != -ENXIO) From patchwork Wed Feb 28 18:50:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Unnathi Chalicheemala X-Patchwork-Id: 207962 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3543407dyb; Wed, 28 Feb 2024 10:51:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXEmdmO4njqawTLhaPSLK8MsQWmU5fw6S5PRRhHVgkobOj5YSZ2sYphQD7Qvl05DVFycTpcO5BaQIQXTV0BAtR+akQcpA== X-Google-Smtp-Source: AGHT+IFgNQ1alk/wjS0C/Ts0lbCpZ9ut+yfbCYfzGtA9BekBk12alOnXqP/ap/TNQIDzu+4RNfhc X-Received: by 2002:a0c:971a:0:b0:68f:ef9b:44aa with SMTP id k26-20020a0c971a000000b0068fef9b44aamr5855343qvd.27.1709146305419; Wed, 28 Feb 2024 10:51:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709146305; cv=pass; d=google.com; s=arc-20160816; b=hCMrsMeF8I4xcucRXD5JieRanm4EJHT/M9oSl4hwC0FZN6OiSJvfSVqIYsx41SWhUW vSVf1Q+s5djtWPdQrKqrbfyLFYRuojy3BNEbdDbFuQx2G1k/UDoSGFgBonI6+5yMpdcp 0cEfZY9JqslXWKUd7klP06HIpj4FOjiz5zmZRfweHDHNUXYpj/8K3z27ozC672mBr+mU 9alr0ho8g6blhwTHipL6IC0RAl+efskoSUZKWtzKk+dM1/5BcE3g9sCe1unMMUIYpWik l2S5/B5DmbC+TcFYV88KejuCirAof/p2N3Bk/DgjJPLhLpriUTM7+ggs2ifGUr4sTrmQ bp/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=wwIB7Z+EF1d95ClqG/Iw6PuvjVju+1e3xeWmF1pn7HA=; fh=vnGxVO582uqsGFQHtEnueznKyoH172hkZ54rScNFH4g=; b=LbudIvxQzGSgZ4FEEi5oRR+Ev2IGty4a/QIBSmaY0IyceVN3pOsSRiuAPiRjiPI0lm WJFYqQuJEAJIIY0o+P8+zCrIVv6kSU8352lsuiNg/tW17L90YUSRm09LlGOJ0pgWOclY 7lHUCeiYJ+H2EhF7eJjeA4UBlpzOgGao9hJA/GE9CRBVw67ThHt1fyW+rJ4o6YeeyxLd CAK1VqgZ6NjjeTifJt7R/zi77gJylE2onYHeewXK7yrcqUf0v7TH5X7c4sQ0nroGIs2F W0biOXebe0FC7ndwIJWBPUnlMWQaa5YioRGXjmzjwLy7PRcEUst0/94xBvT3PRi1gUfR VnTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mbck3XZR; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85554-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85554-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 12-20020a05621420ac00b00690011ff09csi115994qvd.393.2024.02.28.10.51.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 10:51:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85554-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=mbck3XZR; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85554-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85554-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id C60A41C266E0 for ; Wed, 28 Feb 2024 18:51:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A2B377D406; Wed, 28 Feb 2024 18:50:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="mbck3XZR" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61DF271EB3; Wed, 28 Feb 2024 18:50:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709146226; cv=none; b=FTXwjq5Pau7+vAXlx3fOKBNMWmHCOcaS+xPbDB3LdPtYkfaMtBtDtPCSmDxnJqnkRmafn2XKXTzgl5mH1wtOPSLMs2sl4xvD3fjLRHjiOSzMi3LVp8w2/LRAG9rnjQi3yiuJ4+/YruMe+t1Z9/9L73AZLuahdEWg70ttWLXU52c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709146226; c=relaxed/simple; bh=eMm9aJv7SSxqr39wSNL3YYMZMz1HnjzBU+cyAH2AhDQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=KYJr/524AyUCRieondoJ+aUQiuEBtx2+cBIKjTHC/APNXd0BdEHDkn+OsTeOWprP+CUGr36EFnAG6fgWFFeuHDbvybL5WOjxU9LrOe2r+A54tTHTmP0HyAqk0KE/BHEObzHun8xmqMWTkmG95TWjeIL+JoJNQut5mxz2prpOIdo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=mbck3XZR; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41SBdYgb024776; Wed, 28 Feb 2024 18:50:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=wwIB7Z+EF1d95ClqG/Iw6PuvjVju+1e3xeWmF1pn7HA =; b=mbck3XZRVX37eRjJRPisyacMS0iuKNR8Zhw0QbNhyV4Uwv9fR9xCKn2W3F5 SJHtURtvp0b3KpXlhy8ynrcKkEFUD8qnevUprll8XnslaSNimjh1SVLJmkLgG668 RTjHxDhw2w/ZOEk1l54UylCwy3ihZ84Yn4qI4hnJnT3/Eg9MCkjJmzT5gpk+qcNf uPQskoWEyaGeYpaLXo6FQsu2klijYYYW9SsSTDp+mN3/GNAUSlYTbZgtoHNU9rBM qkuR7X3tmw6AEgkcYXcK11wAyfEAEcgpbUmUjBNr2xur9jzYgZOhx9Ktt++jO1oF mrI3fHYX/vpv5WIVRImqtDAA7AQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wj458h7nm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 18:50:18 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41SIoG6k008661 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 18:50:16 GMT Received: from [169.254.0.1] (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 28 Feb 2024 10:50:13 -0800 From: Unnathi Chalicheemala Date: Wed, 28 Feb 2024 10:50:00 -0800 Subject: [PATCH 2/3] firmware: qcom-scm: Support multiple waitq contexts Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240228-multi_waitq-v1-2-ccb096419af0@quicinc.com> References: <20240228-multi_waitq-v1-0-ccb096419af0@quicinc.com> In-Reply-To: <20240228-multi_waitq-v1-0-ccb096419af0@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Sibi Sankar CC: , , , Prasad Sodagudi , "Murali Nalajala" , Satya Durga Srinivasu Prabhala , Unnathi Chalicheemala X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709146213; l=5367; i=quic_uchalich@quicinc.com; s=20240202; h=from:subject:message-id; bh=eMm9aJv7SSxqr39wSNL3YYMZMz1HnjzBU+cyAH2AhDQ=; b=3ERQruRtRQniDNYtsv0fLSYf2/DIglBjHKOotYp3sEp6N8gvqj4pf/xlsXG0l8VXORLZ7Mjau +QQryaiT7E0A6vnUC8CT2O9MOXOVRwrWeRUi/5xHY2isfA20QNz3N3x X-Developer-Key: i=quic_uchalich@quicinc.com; a=ed25519; pk=8n+IFmsCDcEIg91sUP/julv9kf7kmyIKT2sR+1yFd4A= X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: YrJoN9xHW9ou1N2xNjSDPl_u0pP2-qTa X-Proofpoint-ORIG-GUID: YrJoN9xHW9ou1N2xNjSDPl_u0pP2-qTa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-28_08,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 adultscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402280148 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792169795947546150 X-GMAIL-MSGID: 1792169795947546150 Currently, only a single waitqueue context is supported, with waitqueue id zero. SM8650 firmware now supports multiple waitqueue contexts, so add support to dynamically create and support as many unique waitqueue contexts as firmware returns to the driver. Unique waitqueue contexts are supported using xarray to create a hash table for associating a unique wq_ctx with a struct completion variable for easy lookup. The waitqueue ids can be >=0 as now we have more than one waitqueue context. Signed-off-by: Unnathi Chalicheemala --- drivers/firmware/qcom/qcom_scm-smc.c | 7 +++- drivers/firmware/qcom/qcom_scm.c | 77 ++++++++++++++++++++++++++---------- drivers/firmware/qcom/qcom_scm.h | 3 +- 3 files changed, 64 insertions(+), 23 deletions(-) diff --git a/drivers/firmware/qcom/qcom_scm-smc.c b/drivers/firmware/qcom/qcom_scm-smc.c index 16cf88acfa8e..80083e3615b1 100644 --- a/drivers/firmware/qcom/qcom_scm-smc.c +++ b/drivers/firmware/qcom/qcom_scm-smc.c @@ -103,7 +103,12 @@ static int __scm_smc_do_quirk_handle_waitq(struct device *dev, struct arm_smccc_ wq_ctx = res->a1; smc_call_ctx = res->a2; - ret = qcom_scm_wait_for_wq_completion(wq_ctx); + if (!dev) { + /* Protect the dev_get_drvdata() call that follows */ + return -EPROBE_DEFER; + } + + ret = qcom_scm_wait_for_wq_completion(dev_get_drvdata(dev), wq_ctx); if (ret) return ret; diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c index c1be8270ead1..4606c49ef155 100644 --- a/drivers/firmware/qcom/qcom_scm.c +++ b/drivers/firmware/qcom/qcom_scm.c @@ -21,6 +21,7 @@ #include #include #include +#include #include "qcom_scm.h" @@ -33,7 +34,7 @@ struct qcom_scm { struct clk *iface_clk; struct clk *bus_clk; struct icc_path *path; - struct completion waitq_comp; + struct xarray waitq; struct reset_controller_dev reset; /* control access to the interconnect path */ @@ -1742,42 +1743,74 @@ bool qcom_scm_is_available(void) } EXPORT_SYMBOL_GPL(qcom_scm_is_available); -static int qcom_scm_assert_valid_wq_ctx(u32 wq_ctx) +static struct completion *qcom_scm_get_completion(struct qcom_scm *scm, u32 wq_ctx) { - /* FW currently only supports a single wq_ctx (zero). - * TODO: Update this logic to include dynamic allocation and lookup of - * completion structs when FW supports more wq_ctx values. + struct completion *wq; + struct completion *old; + int err; + + wq = xa_load(&scm->waitq, wq_ctx); + if (wq) { + /* + * Valid struct completion *wq found corresponding to + * given wq_ctx. We're done here. + */ + goto out; + } + + /* + * If a struct completion *wq does not exist for wq_ctx, create it. FW + * only uses a finite number of wq_ctx values, so we will be reaching + * here only a few times right at the beginning of the device's uptime + * and then early-exit from idr_find() above subsequently. */ - if (wq_ctx != 0) { - dev_err(__scm->dev, "Firmware unexpectedly passed non-zero wq_ctx\n"); - return -EINVAL; + wq = kzalloc(sizeof(*wq), GFP_ATOMIC); + if (!wq) { + wq = ERR_PTR(-ENOMEM); + goto out; } - return 0; + init_completion(wq); + + old = xa_store(&scm->waitq, wq_ctx, wq, GFP_ATOMIC); + err = xa_err(old); + if (err) { + kfree(wq); + wq = ERR_PTR(err); + } + +out: + return wq; } -int qcom_scm_wait_for_wq_completion(u32 wq_ctx) +int qcom_scm_wait_for_wq_completion(struct qcom_scm *scm, u32 wq_ctx) { - int ret; + struct completion *wq; - ret = qcom_scm_assert_valid_wq_ctx(wq_ctx); - if (ret) - return ret; + wq = qcom_scm_get_completion(scm, wq_ctx); + if (IS_ERR(wq)) { + pr_err("Unable to wait on invalid waitqueue for wq_ctx %d: %ld\n", + wq_ctx, PTR_ERR(wq)); + return PTR_ERR(wq); + } - wait_for_completion(&__scm->waitq_comp); + wait_for_completion(wq); return 0; } static int qcom_scm_waitq_wakeup(struct qcom_scm *scm, unsigned int wq_ctx) { - int ret; + struct completion *wq; - ret = qcom_scm_assert_valid_wq_ctx(wq_ctx); - if (ret) - return ret; + wq = qcom_scm_get_completion(scm, wq_ctx); + if (IS_ERR(wq)) { + pr_err("Unable to wake up invalid waitqueue for wq_ctx %d: %ld\n", + wq_ctx, PTR_ERR(wq)); + return PTR_ERR(wq); + } - complete(&__scm->waitq_comp); + complete(wq); return 0; } @@ -1854,7 +1887,9 @@ static int qcom_scm_probe(struct platform_device *pdev) if (ret) return ret; - init_completion(&scm->waitq_comp); + platform_set_drvdata(pdev, scm); + + xa_init(&scm->waitq); __scm = scm; __scm->dev = &pdev->dev; diff --git a/drivers/firmware/qcom/qcom_scm.h b/drivers/firmware/qcom/qcom_scm.h index 4532907e8489..d54df5a2b690 100644 --- a/drivers/firmware/qcom/qcom_scm.h +++ b/drivers/firmware/qcom/qcom_scm.h @@ -62,7 +62,8 @@ struct qcom_scm_res { u64 result[MAX_QCOM_SCM_RETS]; }; -int qcom_scm_wait_for_wq_completion(u32 wq_ctx); +struct qcom_scm; +int qcom_scm_wait_for_wq_completion(struct qcom_scm *scm, u32 wq_ctx); int scm_get_wq_ctx(u32 *wq_ctx, u32 *flags, u32 *more_pending); #define SCM_SMC_FNID(s, c) ((((s) & 0xFF) << 8) | ((c) & 0xFF)) From patchwork Wed Feb 28 18:50:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Unnathi Chalicheemala X-Patchwork-Id: 207963 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3543685dyb; Wed, 28 Feb 2024 10:52:28 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW8xiELdGhhIFUA1Rd9C7wl70Wex9SUXtukOOC13p5Tak4ncPKa8kEOxXPKeLROIC5b8l310qIxSwOigBR353NnYhCM+w== X-Google-Smtp-Source: AGHT+IFU1jBOk+g5jcjGLlUNY71TF4SwZ+IldSmOqjzjbSNXgBM3xyEpzuGtNn829bUQMUxlVNBM X-Received: by 2002:a05:6a00:2da0:b0:6e0:df2d:e7fe with SMTP id fb32-20020a056a002da000b006e0df2de7femr23398pfb.11.1709146347785; Wed, 28 Feb 2024 10:52:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709146347; cv=pass; d=google.com; s=arc-20160816; b=XPJuNoFQogGD1ljdC69TJ4Z/VmXUD/865CzAlzDSva57jD5P7hi4PZ3QI0kK0O/TXy 6PNNIf0fR8yTu2bCmoFmS9yVoCYI3Pvoczs8LVqCzCpCTnJD1xvc+5usANMJM1xrf4Dj SVRwki8B85XetkP5ahTmCW1sC/IJjLDvTaKoCBe0x8sxxvszsxCNGbWxtpMM+C9NkoSW q/0VtIbQORmH/oqWJX2ghL/fJNojyN2xYrGlJ7U44p6ZZ8M3yl8sErBHDENoyu3ptu1K fgE/X8WH2V6mlSBxUoZHfG+Gs4WPWvIUZwVKxqPqd+ct7lLPolIsOTohYH4/KPfj+bTg zMzg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=K7mkrfq1S60nScHf6Bg536eGqqIlIrdzYLJ933gbQoI=; fh=vnGxVO582uqsGFQHtEnueznKyoH172hkZ54rScNFH4g=; b=sY/GjRhCvL1BxleUn18NWcLSxagW0FRsiwkfixDmjpvlAzQYlPe5siN2LSuDShDIWG twMzrmti3wUJArbawup2PXyvYluPGQehYUPiLnx7uczguEHpTZYh1p/1YVBLNJkxJixG VtIQJrxClLEmXXPzCwQCcFGmJ25QRNNpag6F7BaOAp3YICSuel07x7oQeVyhMeO1d9Vg 9epWh8eVzZS4pdXnkvuxm6/gT0HmWH6HK+eZUNlhFr1gsxz4shN4h4a0gytZa9BU8qWO TXCazaLki7pvvRMICpOLJkvEzcvl+zXg+L3MHJrOHMRyqHVKBdiiqiWB+X5kCSIy01CC h2CQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Dwe/EJSs"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85556-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85556-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id fn6-20020a056a002fc600b006e4e40f5e2dsi36459pfb.242.2024.02.28.10.52.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 10:52:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85556-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="Dwe/EJSs"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-85556-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85556-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 13655287AEE for ; Wed, 28 Feb 2024 18:51:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F06415DBC4; Wed, 28 Feb 2024 18:50:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Dwe/EJSs" Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC58E71EB3; Wed, 28 Feb 2024 18:50:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709146232; cv=none; b=BV8Q+tOq1aqZPXZYK7WnppS7Xw/KLXZyxzN7VV7QANAp7yaKI6GTlFTYXZB9Xt9Xv9BnIsGnEBjN2dLgGQbq0fv3Bnn0WVMqUG9eezN8yJxpsJrtBhyqlPqyDIzkZeDdcKLBGibirEWcyzHtVkGnl8nSxrNf7YDEtBOh6eiOSP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709146232; c=relaxed/simple; bh=cCJNI83N6rsCRckXXH/moUQ8dBac6pWGN8ufZKJRRGw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=nVQ3+FNmyhY3gOG5O6wx2VwxrPXKnUAlMbaXj1eMlrGi93DcUpHu7VTBlWaX8zO0PTDaWGxHsq+fAEJR7WRGQTzSSFQwZooDqrWrDRZsDzB3XxB5vNbDtJeFuZFJLsZlavfWVcmIPZ8mgLxFmJj+/ZvMA/j/aQbBy34mOk5Sg94= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Dwe/EJSs; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41SEGGPM004022; Wed, 28 Feb 2024 18:50:18 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:date:subject:mime-version:content-type :content-transfer-encoding:message-id:references:in-reply-to:to :cc; s=qcppdkim1; bh=K7mkrfq1S60nScHf6Bg536eGqqIlIrdzYLJ933gbQoI =; b=Dwe/EJSsht/j49cLMs3k+I7onNNEiCy8sIBQro/76UUAfoNmZ7HUtU1OVSe 9vPkDQcI3lPn1lCSEtpzLBKRdXQG8gnsBOwKjekb3UFvid2y5jyM6jVXQJj7tcsM 1hO18p9rR4vHv6uJR11KZz0DmtVXgIp37Hnl+gSnhbUiE6eKDGuS0wbkLNVRw9r2 aqd6KDImf2jJ0K197Gu3a1RgwRbcvqZLUduO4/todG0bLX7GOSJjRbPFZBVyCOBE 9mNB/XeWguOtAayo+ygrAOY8JlvIM6G8U+xAm+T5be3GEymOpNfhPLNKNeov+HVm jWZTrMMeFZOXo3QeNX5s3lOR6SA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wj6en8sa0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 18:50:18 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41SIoHGd001964 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Feb 2024 18:50:17 GMT Received: from [169.254.0.1] (10.49.16.6) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 28 Feb 2024 10:50:13 -0800 From: Unnathi Chalicheemala Date: Wed, 28 Feb 2024 10:50:01 -0800 Subject: [PATCH 3/3] firmware: qcom-scm: Remove QCOM_SMC_WAITQ_FLAG_WAKE_ALL Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <20240228-multi_waitq-v1-3-ccb096419af0@quicinc.com> References: <20240228-multi_waitq-v1-0-ccb096419af0@quicinc.com> In-Reply-To: <20240228-multi_waitq-v1-0-ccb096419af0@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Sibi Sankar CC: , , , Prasad Sodagudi , "Murali Nalajala" , Satya Durga Srinivasu Prabhala , Unnathi Chalicheemala X-Mailer: b4 0.12.4 X-Developer-Signature: v=1; a=ed25519-sha256; t=1709146213; l=1197; i=quic_uchalich@quicinc.com; s=20240202; h=from:subject:message-id; bh=cCJNI83N6rsCRckXXH/moUQ8dBac6pWGN8ufZKJRRGw=; b=fujmx0xJs81Cd0KwcwbVJRKhGkmWMxmzdxkShvQ6Qlq92Ig1PwPVtvreDECwhV4SVtXucN11y noRAmOFVA6pARIybJDIhPL0rZdRbJxURJUR/ulj24j/10WIR3L6Vdn7 X-Developer-Key: i=quic_uchalich@quicinc.com; a=ed25519; pk=8n+IFmsCDcEIg91sUP/julv9kf7kmyIKT2sR+1yFd4A= X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 5kt6Ma8DwnAbiSFEPgjLQaly0GqUfnTh X-Proofpoint-ORIG-GUID: 5kt6Ma8DwnAbiSFEPgjLQaly0GqUfnTh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-28_08,2024-02-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 lowpriorityscore=0 mlxscore=0 suspectscore=0 impostorscore=0 bulkscore=0 mlxlogscore=993 phishscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402280148 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792169840654484646 X-GMAIL-MSGID: 1792169840654484646 This will not be supported by current firmware due to firmware limitations, so remove it. Signed-off-by: Unnathi Chalicheemala --- drivers/firmware/qcom/qcom_scm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c index 4606c49ef155..2657372f210f 100644 --- a/drivers/firmware/qcom/qcom_scm.c +++ b/drivers/firmware/qcom/qcom_scm.c @@ -113,7 +113,6 @@ static const u8 qcom_scm_cpu_warm_bits[QCOM_SCM_BOOT_MAX_CPUS] = { }; #define QCOM_SMC_WAITQ_FLAG_WAKE_ONE BIT(0) -#define QCOM_SMC_WAITQ_FLAG_WAKE_ALL BIT(1) static const char * const qcom_scm_convention_names[] = { [SMC_CONVENTION_UNKNOWN] = "unknown", @@ -1828,9 +1827,8 @@ static irqreturn_t qcom_scm_irq_handler(int irq, void *data) goto out; } - if (flags != QCOM_SMC_WAITQ_FLAG_WAKE_ONE && - flags != QCOM_SMC_WAITQ_FLAG_WAKE_ALL) { - dev_err(scm->dev, "Invalid flags found for wq_ctx: %u\n", flags); + if (flags != QCOM_SMC_WAITQ_FLAG_WAKE_ONE) { + dev_err(scm->dev, "Invalid flags received for wq_ctx: %u\n", flags); goto out; }