Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3160847rdh; Thu, 28 Sep 2023 04:42:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEGB5guJ0o0+RxCo4kZ3/DcOdz0NaQulf0JuULkWf/gTlB8H7zLztth9qQI+aJtA0yvPREh X-Received: by 2002:a05:6871:60d:b0:1d6:790e:dacc with SMTP id w13-20020a056871060d00b001d6790edaccmr879104oan.6.1695901371179; Thu, 28 Sep 2023 04:42:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695901371; cv=none; d=google.com; s=arc-20160816; b=SXljQmQsVJlbTbdJeSm5qjSOAbGBcI7DnyFhWF34uQCx4rRKeLECwFQ2+8o+bJYS0b RxtUz/nuVTCjIdSzekFc2WiCah+eeErKJmntdMUNqkBthd8Zjl/cqvsaV3srrjSAvLUS abv5eXY71ESciKOCxuzPEf5oVI5wky9sIvDXah0hOKrV02cIBVzE7Eg9nLQ26jHGOzNP wFYiITidyPTJTISn5WX/utWuO+p+ImL0ygFPQWRHQ0MObh7/9qYh3y2LHR1C0kqmGWRs r6AxZk2p/LMNeJXLfn1yIzPPBticntUpWMaxy56OyxwXuDEJgiafLPc7BEEYlgm/f9KV oDzQ== 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=Kr1jAAeltLJ8vOBq/7LfnBIPQAvOE5oMMAWOVIUo+X0=; fh=/irOSSA52T9GnneJ+Fq61w4Fq1EIbWjdtYRwmhEvKN0=; b=xwThryAqu7ENAWWQblhjaGQDTTrUBF3U9gefLIJK8FQtVih3uRZzLXCURpDWy5n+w+ mqFbTx9yR6vE5Xwd88wtlMkAo3Bj+XTxWEljN5BMcwpIoy+yyVCSlPvJwVNKV5aFJPpn vMdVHRPoKL5fv1wSOca073qQKl5v+rLMHQKDKVX9gLF9rjdBKTwtVNpr+85sZBMzmq+i mJpiCbTfT1eNpw8t4KDZ6BRXeaZ+zsWjreRZg8djL368UitIqUenUTQKM1olz4ElqRhX 22+Y9tlM1J8zlNJU8yG13bMWmLo2NYzTaPtubKERfvkquraplKA7jkbFCxb53KyptToE 6qJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id cn4-20020a056a020a8400b00578acf1e8a0si6770691pgb.471.2023.09.28.04.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 04:42:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 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 agentk.vger.email (Postfix) with ESMTP id 6E9E0805ED1A; Thu, 28 Sep 2023 04:31:25 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231853AbjI1Lau (ORCPT + 99 others); Thu, 28 Sep 2023 07:30:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231167AbjI1Lat (ORCPT ); Thu, 28 Sep 2023 07:30:49 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 804539C; Thu, 28 Sep 2023 04:30:47 -0700 (PDT) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RxB4t2kDlztSyt; Thu, 28 Sep 2023 19:26:22 +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 19:30:44 +0800 Message-ID: <8689e2aa-5fbd-cf9d-d168-a72669aea5ed@huawei.com> Date: Thu, 28 Sep 2023 19:30:44 +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 v2 4/4] soc: kunpeng_hccs: Migrate to use generic PCC shmem related macros To: Sudeep Holla , , , , CC: "Rafael J. Wysocki" , Andi Shyti , Jean Delvare , Guenter Roeck References: <20230927-pcc_defines-v2-0-0b8ffeaef2e5@arm.com> <20230927-pcc_defines-v2-4-0b8ffeaef2e5@arm.com> From: "lihuisong (C)" In-Reply-To: <20230927-pcc_defines-v2-4-0b8ffeaef2e5@arm.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-2.2 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,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 agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 28 Sep 2023 04:31:25 -0700 (PDT) lgtm, Reviewed-by: Huisong Li 在 2023/9/28 0:26, Sudeep Holla 写道: > Use the newly defined common and generic PCC shared memory region > related macros in this driver to replace the locally defined ones. > > Cc: Huisong Li > Signed-off-by: Sudeep Holla > --- > drivers/soc/hisilicon/kunpeng_hccs.c | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/drivers/soc/hisilicon/kunpeng_hccs.c b/drivers/soc/hisilicon/kunpeng_hccs.c > index f3810d9d1caa..27a96cafd1ea 100644 > --- a/drivers/soc/hisilicon/kunpeng_hccs.c > +++ b/drivers/soc/hisilicon/kunpeng_hccs.c > @@ -31,10 +31,6 @@ > > #include "kunpeng_hccs.h" > > -/* PCC defines */ > -#define HCCS_PCC_SIGNATURE_MASK 0x50434300 > -#define HCCS_PCC_STATUS_CMD_COMPLETE BIT(0) > - > /* > * Arbitrary retries in case the remote processor is slow to respond > * to PCC commands > @@ -187,7 +183,7 @@ static int hccs_check_chan_cmd_complete(struct hccs_dev *hdev) > * deadline_us(timeout_us) until PCC command complete bit is set(cond) > */ > ret = readw_poll_timeout(&comm_base->status, status, > - status & HCCS_PCC_STATUS_CMD_COMPLETE, > + status & PCC_STATUS_CMD_COMPLETE, > HCCS_POLL_STATUS_TIME_INTERVAL_US, > cl_info->deadline_us); > if (unlikely(ret)) > @@ -208,7 +204,7 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd, > int ret; > > /* Write signature for this subspace */ > - tmp.signature = HCCS_PCC_SIGNATURE_MASK | hdev->chan_id; > + tmp.signature = PCC_SIGNATURE | hdev->chan_id; > /* Write to the shared command region */ > tmp.command = cmd; > /* Clear cmd complete bit */ >