Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2315307rdh; Tue, 26 Sep 2023 21:23:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHDtnRTTnMfKb0f2seypMxA1AcMw9eShpuMfz6VszhI9l3krux5P/Qm3ZBfL4b2H+dxXTp8 X-Received: by 2002:a05:6870:a2ca:b0:1b0:189c:87a0 with SMTP id w10-20020a056870a2ca00b001b0189c87a0mr1285078oak.41.1695788621124; Tue, 26 Sep 2023 21:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695788621; cv=none; d=google.com; s=arc-20160816; b=kYECY5lkYBV83g/jWC+sZp8QRwFOrYh6bvoebMbulz5Um7qUK41BdeWvQTDl4ZGkTj 3z529ucyi1JyUPXDuIbiLDnGdzd7hMnmEjW9UyqYqbQly2NJhGBn9sCYmVf7gic5WDeV SttCfuDTnjJ0oyvWr90Nx2dkMH5xWLdocw3QWT5IXVtLy3LIktLF0+Jz7hWgWT118wOy iZ+8p/hxonfpuAhFAMh/yRVPGWb8Kt62Ynt74LNSYEdsv899Hm8D/dUMtGKx3sVQ2oR1 s/RjBFCC9TegdJ7qhk0L8NpmsmTtZfEPTrdXT+CbcJzgNv0Wzmec81S+TMiMKkthwLFP FisQ== 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=z8o6qNhrUJenKCM2x8wRAhzNpgfwJasdqk4129PWNBM=; fh=TrAzLbuJU7aHTiLlDnJBclB11d6QItV4Od8EOR1icLg=; b=AaXztz8zJe+P58lU+nuznt2G2nmzoWaNy2vxlmlsTfjk9kMqD2R/Tr5ZZsHgYSTzVo F/ZS3ic5OiCDNP+XJF+d9afzesAN+rk0DtpS8JOKGbPV/S6ZCtBr8rpEPZTLNw7/J2bs uGLNZJJplk9VRmwvZA0AgsoGmSqFe6/ezUkKEFEA+YRj/wioQkMRLWniRjky5Nxo/D0r Zz6/8YNOTXCfV03ZLjtN8adyuA7tgxiDwOlKYoSNnuatru7enq/2lxcwpfLqlgs0yC92 Wdl640gIFCfa9SUuP64q8+tNRLnSWAX3VAlQdhTv8Hl57vlWYugXdNRK0a9Aykw3pHuc Thsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id a5-20020a655c85000000b0056fa1bc208esi250012pgt.722.2023.09.26.21.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 21:23:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (Postfix) with ESMTP id BF7FC80ECFA8; Tue, 26 Sep 2023 21:14:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229682AbjI0EOX (ORCPT + 99 others); Wed, 27 Sep 2023 00:14:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229509AbjI0ENK (ORCPT ); Wed, 27 Sep 2023 00:13:10 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6919910CB; Tue, 26 Sep 2023 19:07:20 -0700 (PDT) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RwKgf4SGhzrSsV; Wed, 27 Sep 2023 10:05:02 +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; Wed, 27 Sep 2023 10:07:16 +0800 Message-ID: Date: Wed, 27 Sep 2023 10:07:15 +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> From: "lihuisong (C)" In-Reply-To: <20230926-pcc_defines-v1-1-0f925a1658fd@arm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) 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 (howler.vger.email [0.0.0.0]); Tue, 26 Sep 2023 21:14:35 -0700 (PDT) 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? > > 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? In ACPI spec, this signature is all 0x50434303. > +/* Generic Communications Channel Command Field */ > +#define PCC_CMD_GENERATE_DB_INTR BIT(15) > +/* Generic Communications Channel Status Field */ > +#define PCC_STATUS_CMD_COMPLETE BIT(0) > +#define PCC_STATUS_SCI_DOORBELL BIT(1) > +#define PCC_STATUS_ERROR BIT(2) > +#define PCC_STATUS_PLATFORM_NOTIFY BIT(3) > + > #define MAX_PCC_SUBSPACES 256 > + > #ifdef CONFIG_PCC > extern struct pcc_mbox_chan * > pcc_mbox_request_channel(struct mbox_client *cl, int subspace_id); >