Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2602551rdh; Wed, 27 Sep 2023 07:27:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGgcDzHbH1Z8/+xBIQKOHwU/K+8iAmgJjAD4HaxdsUomf9wNFDs5S7MV07PRZ/B6cIB6Sf6 X-Received: by 2002:a17:902:ec83:b0:1c3:749f:6a5d with SMTP id x3-20020a170902ec8300b001c3749f6a5dmr2136090plg.4.1695824869743; Wed, 27 Sep 2023 07:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695824869; cv=none; d=google.com; s=arc-20160816; b=D+uTeo4ElIX+KyM3/v/1UO+W6WjzojDVNzFEJoMiUjHUalrZnGPCcdJ5oz/ZFJsbZl NYgHyFmIstFaHa9DI7B/sOhWyx/XUU+8zOCE8vP88oV4PtLEiyXx7WzRD3w3u9E7d4zx lxvtH8IbjKLccElPAVBKAVbZz8/DqvZWtjaWMXpzlHb/oq1HM1wgAI3zrrdblT9Zm4bm CZnNX4VKLKSJ4ajJDlOCnffrzsLioXQn8yOUkoXVoiaTxDVyRym0Pufuig8rcLZUM64O +RRk8GGhPta4uHoJpuhBFyDD4EvqB56pyhUWOQNr1vXKdlj21GDQm0dnTT50KFA92W9R hzrQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=m5xYS13SjJRrCENRwp+O4nTSzZGq/ih9jV2oE3FEFHQ=; fh=cUy/MkWYXZBhdfwl0IAxBiRiVJ59Fsu/VPMr0ZblZG8=; b=aFMAndUCCCDjGbiIMQSTmE4v4b8lgy41fyq6NjFnzt0cpalI+hCBGRMgP4OxrzfDqI d4KaXvB11I9G8j7pEDvwaulOk6rqn00ewxearRvk94shVgkQ9C5lAPZGO2BhR9zHka2E rY743Y5ffPoXH0c6ZJm/mT3e19uVm7UDFTqelL4ZTH3lMuu8pHfqHc6KTtEF9tz8sOIr rEfRAQhcObubHKcSCPIcf5Y43IDVlXjQ52TiRNuyBTDKPL/fEBWS/e6+atpLNSfLejIl tr144uWXNRQkl/vx6qbsV0DqCaJ6C1oUvFdvrYOnsTV5ShTm8Rh5lx5jfaeOsk2uTGWB Sa8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id u15-20020a170902e80f00b001bd949bcd75si17360711plg.575.2023.09.27.07.27.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 07:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 268C781A9A5E; Wed, 27 Sep 2023 07:01:15 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232011AbjI0OAe (ORCPT + 99 others); Wed, 27 Sep 2023 10:00:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40816 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231758AbjI0OAc (ORCPT ); Wed, 27 Sep 2023 10:00:32 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7734AFC; Wed, 27 Sep 2023 07:00:31 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 54CB31FB; Wed, 27 Sep 2023 07:01:09 -0700 (PDT) Received: from bogus (unknown [10.57.37.227]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B9D0A3F59C; Wed, 27 Sep 2023 07:00:29 -0700 (PDT) Date: Wed, 27 Sep 2023 14:59:09 +0100 From: Sudeep Holla To: "lihuisong (C)" Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, Sudeep Holla , "Rafael J. Wysocki" , Andi Shyti , Jean Delvare , Guenter Roeck Subject: Re: [PATCH 1/3] ACPI: PCC: Add PCC shared memory region command and status bitfields Message-ID: <20230927135909.6rssuywmj4k3odex@bogus> References: <20230926-pcc_defines-v1-0-0f925a1658fd@arm.com> <20230926-pcc_defines-v1-1-0f925a1658fd@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 27 Sep 2023 07:01:15 -0700 (PDT) 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. > > > > 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 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. -- Regards, Sudeep