Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp2587080lqo; Tue, 14 May 2024 03:25:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXV0aPSQBUD29OE2iaPbf5tDdnap4bgZoDRuzZpQD09h635Ea3E6jry/l6lXIpfR4S7dpoXjzluttRf+EZfGj8T3RXz38UTwhQb9Ii6Gw== X-Google-Smtp-Source: AGHT+IG+QKyjsmfCrenUdk8CbPwNF8VMizUh/sfmiY+EOkg+/dboOFQ02Ff20MxCt5i/GYcClnk8 X-Received: by 2002:a17:906:af0c:b0:a5a:2737:a3e8 with SMTP id a640c23a62f3a-a5a2d65989emr1171245666b.59.1715682356028; Tue, 14 May 2024 03:25:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715682356; cv=pass; d=google.com; s=arc-20160816; b=jcBqSNtTkMYQouHwXbkboIaubtr16J9316N1S/aW5v8v0RZvi+9syRVOAzyMBSGQ7/ JomP5rUTs9u69a7R9rZfAafjJPljiM7LkDIktZ2BHUh3K6SMvnz/EIb86K0K1GlFo4kk snb3ghpq3oe6rwjv1b8KmCP/pgr6Ac1Co995XBZDgyt75D0veMAkL2EJW/RhJNWST12c VU+m6uKS29g/9Gy988pvcoBzpkpFit6z/JeekUyHj6t/QTqkdfSRZYeNiMnTi+52rjA/ 50KMjWNqtiR5ukSS6Wzb5YuZ1ZB4MT7Lq4jlbBdgjl2HJzZ0xtz2lHpAHDoNcc8DAPsa zwsw== 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=8uUkafmgXXMUT8WTcpQ4QYtKIX13jsJ7pq+c+B0mXb4=; fh=gxEOXKjK2v7YTP+slLyfDSLNSIjqBMwKJQpiJs3zcLE=; b=qhpbRxwJaQ8cD7Twi+58aQJGRMv0LdD0Y9bvCosLZJ/XROZr72Su1EW2gB4QfloNcf iujXbOfXWOA93498aYioso1E1qGwdFqEVq27ydReytz40mtyIHGQrMyjrP0g+grxkk+m +X7CZf376D7+aVthtWvfET0Uhr5rPM3DjRd/SxO9Tvw2vqa3y4ywKHvAaSPl9fIzimvo +I4zZ5K1ULVzWm56W17CNsGWSpTqa0FX6Fu4sVT9GEGClfhLEO9WeTEUx5NLMjfowQHh mlzK9o+hzJNUZU0knHpKvLlBAZ7d+qIT5eMq5YQ5axyYov4kgLg3b6lZ9mJ23RInZumu C2EA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=bAQdHfQi; 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-178520-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178520-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17be6d2fsi635807866b.839.2024.05.14.03.25.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 May 2024 03:25:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-178520-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=bAQdHfQi; 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-178520-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-178520-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 76BF81F223BC for ; Tue, 14 May 2024 10:25:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A58DE130A6A; Tue, 14 May 2024 09:41:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="bAQdHfQi" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 8832441C92; Tue, 14 May 2024 09:41:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715679696; cv=none; b=moezDdbqlVH3AUVaIIBAHN636As9U6V940iRhieg9t3Xblll6NOa3qBKLvrIUrWPYF5i1AKHhxqNHcAS6hebSBpvu10mybmXddD79br48QSJwtc7X8NEiE4FPKhjlTVfyNYjrdzbWN1EAvTt1DtCix//JZeWQ5SGV75V4BAKwZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715679696; c=relaxed/simple; bh=6Mpki/jgyWpWWGGJV4ESw5IWm8xrmEmTKvIk5CIA3rE=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=HhnmJdlRpytHXVJ2IU+bW8dga6Mvc5qjsLEm/TozZOoHXJXUtAVJEmHDXNl4sSrphw8J0RhGcZMy6Sl+IUyD3JngHt15WcC5NBv9Qbv2cOyYd71KObsS6AByNAygZFcCappoh0SvxgyW5TALsgIbuYMs+8gYTUxy9MHYiDh9ROE= 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=bAQdHfQi; arc=none smtp.client-ip=205.220.168.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 (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44E8vN45017392; Tue, 14 May 2024 09:37:06 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=8uUkafmgXXMUT8WTcpQ4QYtKIX13jsJ7pq+c+B0mXb4=; b=bA QdHfQi8a2Mp7Nv6q2UxTjxaCSVHTCNzYSKzlQ+SD2gqrjNnLcujUC4WzjC7TbKtO LzMNEk4cpcm6wvYv9IwZXPR9rg6bxLKEw5pJzPFc+y4SLESNQj8QBV0l7kdg5W2O CmGHOiD4RfHchZE/59EStLQmSLXQTFu0Sa1budO0xpJwSJ+TKY5mhaK546Al1jJv SQssEewYAaXhc+1M10gkNnAOuT86lJdJ5M2yEMmWJfpplHvlKEhLufPM+UK7C9P1 /c2STcmc3pJ9iqvNvnZ7LHmDbXv4vY5PRuKDPhQQkKkCU2L0N/QIisJSpo4S7bGg RWY/f/IVE0bN6EONKoSA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3y20w1wskt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 May 2024 09:37:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 44E9b5Co018515 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 May 2024 09:37:05 GMT Received: from [10.131.33.37] (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.1544.9; Tue, 14 May 2024 02:36:59 -0700 Message-ID: <7e398958-7272-5812-6115-e866fa18af4b@quicinc.com> Date: Tue, 14 May 2024 15:06:25 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH V4 2/5] mailbox: Add support for QTI CPUCP mailbox controller To: Jassi Brar CC: , , , , , , , , , , , , , , , , References: <20240422164035.1045501-1-quic_sibis@quicinc.com> <20240422164035.1045501-3-quic_sibis@quicinc.com> Content-Language: en-US From: Sibi Sankar In-Reply-To: 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: 6xCsEPTOMxKUPq3n0eV9utPfC0RbPWfQ X-Proofpoint-GUID: 6xCsEPTOMxKUPq3n0eV9utPfC0RbPWfQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-14_04,2024-05-10_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=879 mlxscore=0 phishscore=0 adultscore=0 suspectscore=0 clxscore=1011 priorityscore=1501 bulkscore=0 spamscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405010000 definitions=main-2405140067 On 5/1/24 07:44, Jassi Brar wrote: > On Mon, Apr 22, 2024 at 11:41 AM Sibi Sankar wrote: >> >> Add support for CPUSS Control Processor (CPUCP) mailbox controller, >> this driver enables communication between AP and CPUCP by acting as >> a doorbell between them. >> Hey Jassi, Thanks for taking time to review the series :). >> Reviewed-by: Dmitry Baryshkov >> Signed-off-by: Sibi Sankar >> --- > > Do you want to add an entry in the MAINTAINERS ? Thanks will add in the next re-spin. > >> diff --git a/drivers/mailbox/qcom-cpucp-mbox.c b/drivers/mailbox/qcom-cpucp-mbox.c > ..... >> +static irqreturn_t qcom_cpucp_mbox_irq_fn(int irq, void *data) >> +{ >> + struct qcom_cpucp_mbox *cpucp = data; >> + struct mbox_chan *chan; >> + unsigned long flags; >> + u64 status; >> + u32 val; >> + int i; >> + > The variables flags, val and chan are better inside the for loop below. Ack. -Sibi > >> + status = readq(cpucp->rx_base + APSS_CPUCP_RX_MBOX_STAT); >> + >> + for_each_set_bit(i, (unsigned long *)&status, APSS_CPUCP_IPC_CHAN_SUPPORTED) { >> + val = readl(cpucp->rx_base + APSS_CPUCP_RX_MBOX_CMD(i) + APSS_CPUCP_MBOX_CMD_OFF); >> + chan = &cpucp->chans[i]; >> + /* Provide mutual exclusion with changes to chan->cl */ >> + spin_lock_irqsave(&chan->lock, flags); >> + if (chan->cl) >> + mbox_chan_received_data(chan, &val); >> + writeq(BIT(i), cpucp->rx_base + APSS_CPUCP_RX_MBOX_CLEAR); >> + spin_unlock_irqrestore(&chan->lock, flags); >> + } >> + >> + return IRQ_HANDLED; >> +} >> + > > Thanks > Jassi