Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2975585rdh; Wed, 27 Sep 2023 20:57:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHFDm9i6eI6lHZEKpPY1BnJtGS8/ZsD9Ke2v9ebdDFbcqyRHUaUWWCHE3pEgEVkgJ7XofV X-Received: by 2002:a17:902:c409:b0:1c5:ea60:85c1 with SMTP id k9-20020a170902c40900b001c5ea6085c1mr125764plk.12.1695873432130; Wed, 27 Sep 2023 20:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695873432; cv=none; d=google.com; s=arc-20160816; b=N3H1iHeXyxA+hX2uTLOwepfnyUXXFRydI4uZwOgeYpnuuSGPAiLKMduRrRbPWuvLKx vMWG6aWqT+erabvZe/2Sca7RfpCR9ycnpjhL7L6KGliB8bMoOrrM6xI3OU5X6A+votsD S/4FhDfODPWpZG1XTy4mLir80JlZ6bFEeIAD5bt+U/Msu97Q+JJShi0tHfZ8IeayAx1f vy0u+DZrA55fh8sSEklXcNGo13EOU45/4wV9UKigmBn5zGnZ+LkuGXnbAQdKMrigvDQ8 haspRy2CJGGdSn8FRQqgDCPJuVnw0EuWWFe4fBeg2DFxboS+NXu+NHt134GYZI7Q7Rfn 76gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=u0er+UB8VteP1D4bm0EwgdqBrUKjFaMmjXw6VW9vzNc=; fh=uHKEbAoyu7eE+wFTvtCKTf4V5I9oFisRPUm8ggCPjjQ=; b=tTdnuMbxOh/Y+4Wh4d6cJDITWYYYiQDzFSfMM8JZfI09EsXArRMTniOg/4ii5sIScy zhKPf7okcLgGlYmw6TQRapejjtSiK+JztiYEDfSMDvWTzJcctkfxzXqQgFnMHLajdF6k cX8UsEQ4qyhEtU0iYmHlRXZDqxng+yrtDM9u0fRIBJTCxoBr56I9qX6iaavnyUSTAiWZ /10Nw7FrJ2Tb/bdqJJ6XyNVkW/PcBM6rbcl2HGvB73kTz4S6Z2+Fdfie+Iy1tfCSYoKm 5cLpGjKtP6kVsjZmGSurv7zPfVn6vwIeyPDie/g28CjEpMVCpnTcsYIGFLtZ5wmubWZU y6fw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id w22-20020a1709026f1600b001c603cfb5fasi11554278plk.155.2023.09.27.20.57.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 20:57:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2665281B93F7; Wed, 27 Sep 2023 20:49:40 -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 S230083AbjI1Dtd (ORCPT + 99 others); Wed, 27 Sep 2023 23:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjI1Dtc (ORCPT ); Wed, 27 Sep 2023 23:49:32 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80BAC10A; Wed, 27 Sep 2023 20:49:29 -0700 (PDT) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RwzsM21YWzMltP; Thu, 28 Sep 2023 11:45:43 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Thu, 28 Sep 2023 11:49:26 +0800 Message-ID: Date: Thu, 28 Sep 2023 11:49:25 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH 1/3] ACPI: PCC: Add PCC shared memory region command and status bitfields To: Sudeep Holla CC: , , , , "Rafael J. Wysocki" , Andi Shyti , Jean Delvare , Guenter Roeck , References: <20230926-pcc_defines-v1-0-0f925a1658fd@arm.com> <20230926-pcc_defines-v1-1-0f925a1658fd@arm.com> <20230927135909.6rssuywmj4k3odex@bogus> From: "lihuisong (C)" In-Reply-To: <20230927135909.6rssuywmj4k3odex@bogus> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS 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]); Wed, 27 Sep 2023 20:49:40 -0700 (PDT) 在 2023/9/27 21:59, Sudeep Holla 写道: > On Wed, Sep 27, 2023 at 10:07:15AM +0800, lihuisong (C) wrote: >> Hi Sudeep, >> >> 在 2023/9/26 20:28, Sudeep Holla 写道: >>> Define the common macros to use when referring to various bitfields in >>> the PCC generic communications channel command and status fields. >> Can you define the bit0 macros in the "flags" for Extended PCC Subspace >> Shared Memory Region? > Sure I will take a look and include it in v2 if applicable. Thanks > >>> Currently different drivers that need to use these bitfields have defined >>> these locally. This common macro is intended to consolidate and replace >>> those. >>> >>> Cc: Rafael J. Wysocki >>> Signed-off-by: Sudeep Holla >>> --- >>> include/acpi/pcc.h | 11 +++++++++++ >>> 1 file changed, 11 insertions(+) >>> >>> diff --git a/include/acpi/pcc.h b/include/acpi/pcc.h >>> index 73e806fe7ce7..66d9934c2ee4 100644 >>> --- a/include/acpi/pcc.h >>> +++ b/include/acpi/pcc.h >>> @@ -18,7 +18,18 @@ struct pcc_mbox_chan { >>> u16 min_turnaround_time; >>> }; >>> +/* Generic Communications Channel Shared Memory Region */ >>> +#define PCC_SIGNATURE 0x50424300 >> Why is this signature 0x50424300? > It is as per the specification. > >> In ACPI spec, this signature is all 0x50434303. > No, not exactly. It is just an example. > The PCC signature - The signature of a subspace is computed by a bitwise-or > of the value 0x50434300 with the subspace ID. For example, subspace 3 has > signature 0x50434303 Sorry for my mistake. I know this. I mean, why doesn't the following macro follow spec and define this signature as 0x504*3*430. "#define PCC_SIGNATURE **0x504*2*4300*"* Because it seems that all version of ACPI spec is 0x5043430. > > And I see the driver you mentioned(drivers/soc/hisilicon/kunpeng_hccs.c) > is doing the right thing. I am bit confused as why you being the author > of the driver are now confused. I used 0x50424300 instead of 0x50424300 according to the spec. >