Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp24667rdb; Thu, 5 Oct 2023 15:20:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+mhC0wEVqMLWGrvyaute6wUpXGcvhKEqHry0aOAcj8lCD20qOHXzW3KObUhHNFaun7eiM X-Received: by 2002:a17:902:db04:b0:1c6:2acc:62f3 with SMTP id m4-20020a170902db0400b001c62acc62f3mr8176386plx.9.1696544444396; Thu, 05 Oct 2023 15:20:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696544444; cv=none; d=google.com; s=arc-20160816; b=FSuLLeRFPHnjrJPqv5lLJB/SanE/2ijPZQmsyMZMiE8iBMXmxeseoSam9ikoNn7fkg Z8ta1vDr3rvTBPfWsmPdauQwYAcN3SDBlvnPFBRuFiwEpb9UFsd19LUrnnWpY6vwHbTy 2xRPnSnLJR9bYNlJnm++pgO/UW2AJOzG9SoWBRTstASTbyfMQrogn/U+yTk11476GSl3 x2F9hwvYORwBf4FBHUIPdVNhbsk8Djh6J7zl/wdtwcKWnsKxKes1qSCn9anWbbVoN1u5 08tz1qrmWHA+iqLWhDWc9uGPjSy0dfhKvHo0NfOfPBIM8DB27fFU3HvoTnqYfBOcdciu DVog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VtvUZyDxaVYZXARp1Fmae+hVYKfon/wKrJEtk7Yz5n0=; fh=blET0le607L/f2lfSRTxVJxX3pC4+a1pFQRzeawhlh4=; b=YSvSjl3yhILHYVtxQsT4E0V5FzIzYRYRalseLuspS7zsamBChVJJQBR1CBBtuFH3Ui HAERJDrZKWRhIts9YeU+jOHix3ITG8BJgut7/1LpjC/YZSvEIL0huJykbkNG/W1wJ+Xn d/hnbTdsSzfxKxxq0bbkCobDGQa28KrRQ9N7kiIXoD+qmFVDBr47ugXdBpZ0B8jgw0Yx W5l3gwakCOHlZVpCi/hhQTidbG6f/rDmLDpLZlWZiv0aI7MoRua09bzYyP/ptV+6JSP3 QpswY2nCzBxB7xQFHih9nRsnMYX8i3wSX7MEFCJa9waED1uGzg4ikJCqduazdNxnmaYd T4AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="R/W7+3H1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u11-20020a17090282cb00b001c60502ccd4si2177343plz.642.2023.10.05.15.20.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 15:20:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="R/W7+3H1"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 614DC8328FF2; Thu, 5 Oct 2023 15:20:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230444AbjJEWUk (ORCPT + 99 others); Thu, 5 Oct 2023 18:20:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229530AbjJEWUj (ORCPT ); Thu, 5 Oct 2023 18:20:39 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4DAC79E; Thu, 5 Oct 2023 15:20:38 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 395MCovx011432; Thu, 5 Oct 2023 22:20:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=qcppdkim1; bh=VtvUZyDxaVYZXARp1Fmae+hVYKfon/wKrJEtk7Yz5n0=; b=R/W7+3H1VDQnr9rMxOa3pi7dbl06gMlwgYgRlIh3CdwhFFt4vIyvwtoLhyNX/KwhDkjb BwE4Ze2/oQXahoKOxyoVSM1y8E0k2Vtmf5wXvi/SJx1781NunhrkLuDUUlNMoNHG4V8i yeU0OwcIgHo01OSMFQeke+OJ34VWL4hewOm6JyNKSS6zd0Lw66u4N6oQMVFyeliTNKIu ewrsjSzwXuM9lvDtIo1Ymqs40eC5J/extRj2CWfMJqFrhXhm6cdh9jEQ4PhNyR8eIo+a J4M1ospAJIMb0nW/waPvUYchgg76P14JsLZudE3Brdgjr9UCy37bJrNN0wKLr4Lyunsl 9g== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3thn05a3wu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 05 Oct 2023 22:20:18 +0000 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 395MKHlg017242 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 5 Oct 2023 22:20:17 GMT Received: from hu-bjorande-lv.qualcomm.com (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.30; Thu, 5 Oct 2023 15:20:17 -0700 Date: Thu, 5 Oct 2023 15:20:16 -0700 From: Bjorn Andersson To: Sudeep Holla CC: Nikunj Kela , , , , , , , , , , Subject: Re: [PATCH v4 4/4] firmware: arm_scmi: Add qcom hvc/shmem transport support Message-ID: <20231005222016.GI3553829@hu-bjorande-lv.qualcomm.com> References: <20230718160833.36397-1-quic_nkela@quicinc.com> <20230911194359.27547-1-quic_nkela@quicinc.com> <20230911194359.27547-5-quic_nkela@quicinc.com> <20231003111914.63z35sn3r3k7drtp@bogus> <6246714a-3b40-e1b6-640e-560ba55b6436@quicinc.com> <20231004160630.pxspafszlt6o7oj6@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20231004160630.pxspafszlt6o7oj6@bogus> X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) 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-ORIG-GUID: UDw0cKnzIBCJJ4L7j24wEV5YOwKBRLD4 X-Proofpoint-GUID: UDw0cKnzIBCJJ4L7j24wEV5YOwKBRLD4 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-05_16,2023-10-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 suspectscore=0 impostorscore=0 bulkscore=0 spamscore=0 mlxlogscore=999 priorityscore=1501 mlxscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 clxscore=1011 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310050169 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 05 Oct 2023 15:20:43 -0700 (PDT) On Wed, Oct 04, 2023 at 05:06:30PM +0100, Sudeep Holla wrote: > On Tue, Oct 03, 2023 at 09:16:27AM -0700, Nikunj Kela wrote: > > On 10/3/2023 4:19 AM, Sudeep Holla wrote: > > > On Mon, Sep 11, 2023 at 12:43:59PM -0700, Nikunj Kela wrote: > > > > diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c [..] > > > > @@ -63,6 +66,8 @@ struct scmi_smc { > > > > u32 func_id; > > > > u32 param_page; > > > > u32 param_offset; > > > > + u64 cap_id; > > > Can it be unsigned long instead so that it just works for both 32 and 64 bit. > > > > My first version of this patch was ulong but Bjorn suggested to make this > > structure size fixed i.e. architecture independent. Hence changed it to u64. > > If you are ok with ulong, I can change it back to ulong. > > > > SMCCC pre-v1.2 used the common structure in that way. I don't see any issue > with that. I haven't followed Bjorn suggestions/comments though. > My request was that funcId and capId is an ABI between the firmware and the OS, so I'd like for that to use well defined, fixed sized, data types - if nothing else just for documentation purpose. These values will be truncated when passed to arm_smccc_1_1_invoke() anyways, so I don't have any opinion against using unsigned long here... PS. I understand why func_id is u32, but why are param_page and param_offset u32? Regards, Bjorn