Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp235164lqb; Tue, 28 May 2024 14:06:50 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWJ2k6OBrbOIqZe3bSLpJm43/yMoE7PUKWG4dk6sqPxqe4aTbXZ8sb91isQv16I1uMA/ltJU+78QQyd4MlGlj/sizQFaHGQ47xbled0yw== X-Google-Smtp-Source: AGHT+IE+wSmVymFGxF1kTEoKROEDIX04MsneWLZ/VQ70YSMKZHi+wHLVJo4NZqNhmx55bNN4I2cm X-Received: by 2002:a05:6214:5781:b0:6ad:9f8e:4fb6 with SMTP id 6a1803df08f44-6ad9f8e5079mr3017426d6.24.1716930410588; Tue, 28 May 2024 14:06:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716930410; cv=pass; d=google.com; s=arc-20160816; b=Z6myYQZL1wPJYUh3Mj1yrQiJvUAvlv34uZfnPSl5zDZs+mOA6Ll1FEGCc8TJK7/WCN XmmCGNEp2JoY9tHSpBMXEq2CDtNa4Hu3RJsJsfTTs+AB9l4Hqqg5+DJbBMnGGBOXWxIv y1+osEhc1QC3WmwUo3mVWqS6mbzSjU4vCt9jnoMxc2zeJXufNXYukjtYgb0J8fpKHesZ 0MquKudaqFnVgg5DMZkzHXZuJrfFrFrQF9pJ+OaXDzqq3VGgBDy9lIALbqg36R5bkcQz Z0hqMI+FvbzuHTvF9YnzdFpVBCW/EOZK+93nG3a8ryJAnXZWbPlYfHfnd989zN1e982A VBdQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=I111+bxoLmx1H5tJnlJmawpqIaGqPmkIF+kNyD/p4Q4=; fh=4DxdGbcdo/YhimTLzoXwbDgirlW0UShbY5TthJmv8wM=; b=aJQ/SKwTq2aclLXYnO5WjUlb1Cn3YD75oHO8aWtrCcEC3TpnjUmZj3iogqnJewZMmw vjc+uiods+wOT+roq2srp71+zL6zX3MmnRJKkKMgQpOynA+0wtIkXesjY40pi6It8r1u Ovuc/3nSeurAkdg5vN/gJDBkt+j1GQPXVAGRSva+RJQaJRTzt0QBJs6DrLMz7xv6AfAS NTQ3ZUnczZr6ufm+OxNYcZ+V5oAPPYIN7v8w9T8nsUwaW/k1LAo4ewme+hOWHXp1LPjX S4G+hZelmsrhB9hIDeaywbKtL9cPgNNA2sEkwdA3IAXJg/qcLGZZSvkkeHh0HVaGg9Wf xaCw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bQlGt4Jo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193092-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6ac16286ac4si112770586d6.423.2024.05.28.14.06.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 14:06:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bQlGt4Jo; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-193092-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193092-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 4F9821C26A03 for ; Tue, 28 May 2024 21:06:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B1E0617B434; Tue, 28 May 2024 21:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bQlGt4Jo" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 CEEEB224D1; Tue, 28 May 2024 21:06:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716930401; cv=none; b=R50fWftv0rdfnGRGylfJ+5fKt1IpNwZwBZ/8NZRmolnjKW6dCSg2fZZ0uX/vv25ElzN+AT7SKBTj1wjlCutO6QQD8ewxpORbL/Mc+YzN5Hv7uHgNqSuH8qAqrWxyechLihnHRHeswGp0XCL/GMWreM85rYyKsKf3BaJrp/qddEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716930401; c=relaxed/simple; bh=ZSJQyl9M2teS5Qx+/nF2zTSPDI8GKe5B/XcPj6W/pxc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AwwOB1i62h8TA/Fmcg5UorwI7/unGP+XL1gaFhU6qOtLN5R9WXKrQeD2GHGflxdzroQz8N7lpQUP3als766AFt6sPtpqN0yknt+5YGb2koxFaNBmelvRtIixFWbh5RDbwITMA1PELAfEmV2XNdmfk0QXQi9McRZ+IY6kBhxtgMY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bQlGt4Jo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 620DEC32781; Tue, 28 May 2024 21:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716930401; bh=ZSJQyl9M2teS5Qx+/nF2zTSPDI8GKe5B/XcPj6W/pxc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bQlGt4JoOroymoDj15TKOYMq4CvoZ95q+35EHLFFNL+YjPWebxr8s94joLUHbNk4c 8D9YTkiisAAoUEHc4u6X/ThU9e91TDphV3FwDirx+SeSajrtXdjDlFhIAs/8sd5wSE y0+miW1vGQ6vBvXX4cgnf3WeL/K4iOEzD0h2aB2AEsOEWL5qKn9jrfDbhxtsqfbS6/ fJsjjc62b1N+Cq6sixjlEx52JuDxHG6vY0+j4ogPYHm6WojgLxBv1OODtL1tfUl/0M WLehtaA9506TQNPj5gQbNZTwYJWG3j6pQfrFsQpuffKtTeAbCf/od89ZBpwGUm67/w dq27GJKSPFj/g== Date: Tue, 28 May 2024 16:06:38 -0500 From: Bjorn Andersson To: Konrad Dybcio Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, Neil Armstrong Subject: Re: [PATCH v2 2/7] soc: qcom: smem: Add a feature code getter Message-ID: References: <20240404-topic-smem_speedbin-v2-0-c84f820b7e5b@linaro.org> <20240404-topic-smem_speedbin-v2-2-c84f820b7e5b@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240404-topic-smem_speedbin-v2-2-c84f820b7e5b@linaro.org> On Wed, Apr 17, 2024 at 10:02:54PM GMT, Konrad Dybcio wrote: [..] > diff --git a/include/linux/soc/qcom/socinfo.h b/include/linux/soc/qcom/socinfo.h > index 10e0a4c287f4..52439f48428f 100644 > --- a/include/linux/soc/qcom/socinfo.h > +++ b/include/linux/soc/qcom/socinfo.h > @@ -3,6 +3,8 @@ > #ifndef __QCOM_SOCINFO_H__ > #define __QCOM_SOCINFO_H__ > > +#include > + > /* > * SMEM item id, used to acquire handles to respective > * SMEM region. > @@ -82,4 +84,28 @@ struct socinfo { > __le32 boot_core; > }; > > +/* Internal feature codes */ > +enum qcom_socinfo_feature_code { > + /* External feature codes */ > + SOCINFO_FC_UNKNOWN = 0x0, > + SOCINFO_FC_AA, > + SOCINFO_FC_AB, > + SOCINFO_FC_AC, > + SOCINFO_FC_AD, > + SOCINFO_FC_AE, > + SOCINFO_FC_AF, > + SOCINFO_FC_AG, > + SOCINFO_FC_AH, > +}; > + > +/* Internal feature codes */ > +/* Valid values: 0 <= n <= 0xf */ > +#define SOCINFO_FC_Yn(n) (0xf1 + n) Please wrap that 'n' in some () here and below... > +#define SOCINFO_FC_INT_MAX SOCINFO_FC_Yn(0x10) "MAX" sounds inclusive, but the value is exclusive. Regards, Bjorn > + > +/* Product codes */ > +#define SOCINFO_PC_UNKNOWN 0 > +#define SOCINFO_PCn(n) (n + 1) > +#define SOCINFO_PC_RESERVE (BIT(31) - 1) > + > #endif > > -- > 2.44.0 >