Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp788399rdb; Thu, 18 Jan 2024 21:20:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IGBa560A6wisBw+WVS29vl3VJBVvVUFhv90w8/1Wqfh7AMT2COIZKrTL8a4lC0AjcSTde3f X-Received: by 2002:a05:6a00:2315:b0:6db:5a5:186c with SMTP id h21-20020a056a00231500b006db05a5186cmr2845001pfh.59.1705641616247; Thu, 18 Jan 2024 21:20:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705641616; cv=pass; d=google.com; s=arc-20160816; b=Rqm9a5QJJ7MN8GR4K2g+F6b8ZEbC1gO2lGOdSxvg+2qTJOHBmxz2SDoFImPxLHGPsq mtPSqz0uez/yvS6+GVTAcJ8MH2DEyOsbELShMi/gzF/8OQCJSZ2b5l/nYlO2SmwfKRBD 9xo09HJp9Yk0tc3gc3QUDu/heZzPTUpevek5wJ7BrrFdhlRLydmLaLUnJf+dT6tihlHE UEwE6F6Lpxc+WU5d43rEZ+XMfk3tC3UGG6vcXYlw4STWK4HkIZWCPclbEGPC4rIRujP4 5iAbW10cF6mWwBqr2sNvnuuVeZRG2H12P+qnkTr0yDbN6FAUjdt3pvtdSmLAngbt2WCL gMjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=C7riFBU11nnzW4T8MmC9s11SawHSKgNA/p3lIimK/XM=; fh=TYeSDjzJSalJsSDCUaa5jKr/OlPrwxcKl51yQhpV4vY=; b=p6AQdeWWKM4Blq0IV9Txuolo1JMuZAPl7N7T5/fetTM0zhgb2pUlGUMJXpBxoadRhF 5LBo0x4hczwOgdBXqywkpryPGcE6C3QiC+e0W2ayHUT+85fkcM6/bAQ4F1J4G2KlPDqv 8Q9YIebee3tZFMtBhRCR+XIkVCniIhaA3xEfe0AGQyMe9x6jSwy1kNNrHIk5XFSNAII8 h7FeJi8xFmTOhb0+9z+LNZygqBx5kZbh+aFnNgETAPidqEZ5vTQYIgwNL+a1dB99bgS4 CQ9DrgNwfV0VS8TG8NV0aC4LPotPErTIHNS16bkxItud8lLS/l52pIqUvU87f1kGE/lm j3Ww== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=eo3UVTdv; 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-30771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30771-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r10-20020a63ce4a000000b005cdffd0ec5esi2601394pgi.477.2024.01.18.21.20.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 21:20:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30771-linux.lists.archive=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=eo3UVTdv; 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-30771-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30771-linux.lists.archive=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 84E4E284C09 for ; Fri, 19 Jan 2024 05:20:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7760C4A15; Fri, 19 Jan 2024 05:20:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="eo3UVTdv" 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 2CAB64691; Fri, 19 Jan 2024 05:20:05 +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=1705641607; cv=none; b=L9B2X18NsA1SBO/s0CpDIvRaHBxBlZiVsstnIHXNTeBHbqhOKLBt2boG6ToA/5yxoHENr2RZcHlBM2Pllde1GprkyU41z6eWh1gfI5LDNgIodPKsymy/w4/1dDhjYgIItZjXJBZ/4LilSoNYxCCyeBGc21dze1OH2zdA0M0Y8tM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705641607; c=relaxed/simple; bh=LTCKdtnUk4+lLsKQhuLrP0dxI8tJhkUKERYLhzyYJe0=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=adPTekeLxyMtYT12PTZZ7uiMTHRVP+aPYQ6EQ/uXO5YT8KQWDJWmyBz/4t3H3RhHQok/6g4Ufm3MY0aRAAqAMCmO3n1IQFZb6Cb2UiEhwqF6iI8NKukzu4JV60z7OPC09HRtLUsk9xZCxYyCFg4s/gLVNEEPTaaUH7mhYxT66rI= 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=eo3UVTdv; 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 40J4pOvN010390; Fri, 19 Jan 2024 05:20:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=C7riFBU11nnzW4T8MmC9s11SawHSKgNA/p3lIimK/XM=; b=eo 3UVTdvbCdK3WKOlc4cFwn9fzCMMKwE4ISGTK4hERSwAZitPfeakrewelFDRM54By HDol4hYutP2xJ+EBe8GcAXsJAVpD9bFndOm5dqPxnOvPdEyijVR/tiB5HG3RjVWi HXakt4q+AIQyLdCacVcIhgs3R/oX75xm41xO1zhmTS5Tg5pf+rbofzreabaRDF3a UxbGHPkkbtRlLtieSL+havg9fmhEyLOx4YA4dmV+KW4JSTjESrDhjJ9TR90Y7sfP wyeeGJKhc8xqjin8XH38Mk/WpuM7Sr/lywYpaSE+yW/tIevb11/WS2VNMiKwcptM 2t8mrgGGx5lG1I0QMYYw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vq2d0jck3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jan 2024 05:19:59 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 40J5Jwec011031 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 19 Jan 2024 05:19:58 GMT Received: from [10.217.198.224] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 18 Jan 2024 21:19:56 -0800 Message-ID: <7649dd92-4e73-470a-921a-2420bf521537@quicinc.com> Date: Fri, 19 Jan 2024 10:49:53 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] soc: qcom: rpmh-rsc: Enhance check for VREG in-flight request To: Konrad Dybcio , Bjorn Andersson CC: , , , , References: <20240117-rpmh-rsc-fixes-v1-1-71ee4f8f72a4@quicinc.com> <9b177f7b-8dbf-4193-9a70-94f7b80f0a87@linaro.org> Content-Language: en-US From: "Maulik Shah (mkshah)" In-Reply-To: <9b177f7b-8dbf-4193-9a70-94f7b80f0a87@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: iUAOo7-oncuFgMQKA_iJY4Sau_xUpq5c X-Proofpoint-GUID: iUAOo7-oncuFgMQKA_iJY4Sau_xUpq5c X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-19_02,2024-01-17_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 impostorscore=0 priorityscore=1501 mlxscore=0 adultscore=0 bulkscore=0 spamscore=0 mlxlogscore=628 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401190012 Hi, On 1/17/2024 5:19 PM, Konrad Dybcio wrote: >> diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c >> index a021dc71807b..5371d7e3090a 100644 >> --- a/drivers/soc/qcom/rpmh-rsc.c >> +++ b/drivers/soc/qcom/rpmh-rsc.c >> @@ -1,6 +1,7 @@ >>   // SPDX-License-Identifier: GPL-2.0 >>   /* >>    * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved. >> + * Copyright (c) 2023-2024, Qualcomm Innovation Center, Inc. All >> rights reserved. >>    */ >>   #define pr_fmt(fmt) "%s " fmt, KBUILD_MODNAME >> @@ -91,6 +92,15 @@ enum { >>   #define CMD_STATUS_ISSUED        BIT(8) >>   #define CMD_STATUS_COMPL        BIT(16) >> +#define ACCL_TYPE(addr)            ((addr >> 16) & 0xF) >> +#define VREG_ADDR(addr)            (addr & ~0xF) > > It would be nice to add some #define FNAME GENMASK(x, y) accessed > with FIELD_GET(FNAME, foobar), so that the code is a bit more > self-explanatory > > Konrad Thanks for the review. Updates in v2 to use GENMASK() and FIELD_GET(). Thanks, Maulik