Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8643259rwb; Thu, 24 Nov 2022 02:17:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5qvA/9rcPyYSGgTxKd0OycFOmH2BYg++F8WV8BVVCovHgM6iwmp0L9OgXy8e6JG3HdKOht X-Received: by 2002:a63:4944:0:b0:46f:ec9f:dcb0 with SMTP id y4-20020a634944000000b0046fec9fdcb0mr13751048pgk.202.1669285077072; Thu, 24 Nov 2022 02:17:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669285077; cv=none; d=google.com; s=arc-20160816; b=jjt6FDd89B/lTXnXkNeR0lYRdT3kaksNZ8FJk+AzfD91H+xd0piwDR0I+ROf7LohR/ J+/4rBdEv/FBII2qUEz5uSzY1JuFjTXlcXmvZyzFDV7iTB8pz5+g71AfWKmEWqnsCpS5 Fi2uUqvelohcpI6fCMdKDnC5Q8woYqnHWH20PXnShB0p+Wnk+bO8WLC3IEom2JoyEUvB C8WrJCLLIIBRDZpfjARmjdspRTAV/l4fsuQim8CiZEme8AXpATHlwUx7KtNgvgrqJJVl FOtuLG3/reiQ/4iV7yD/YyQ4cr+H1J2P4bdkFgaohnXnkvPGMR5OU7Ei8iz9BaqIDh0o mUYg== 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:content-language:subject:user-agent:mime-version :date:message-id; bh=dAYAW+w0W4dPQXLk/x4KzKPPkvGprV16UfdcbuVcoic=; b=tWqhRbPk1UEuKxMTwILONAxTltAxNXE2QAhWvl44RwMAwdKt2xU8P25f9M1lJGBD5x 18fMqd3KYi1jcuytW8ig0dfGJGinQHX10uLmPUip4z2PAdGK85uIXCx6L1mTSSSe9fkm wgFU5I2E3+AGtd6MbqU9tJwpCn2/wPbe7yhnJpTzTMvmgHKR9YkfC02fRYMqDDJ+DyuQ iWsp05ROPJTOHvmpG8M3PN21kolg5tJLm821TDAToctFOKVg3AGFCMZ+71iVbhgYBlre QYbz1/UBF0jjSCjHDKy/eOCQ9CjG3fNGPuklNA9PuO3P910KSeDE24+/6XK8EGuI0TTJ M/0w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a170903228800b00186f22a06absi757303plh.253.2022.11.24.02.17.44; Thu, 24 Nov 2022 02:17:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229949AbiKXJoT (ORCPT + 87 others); Thu, 24 Nov 2022 04:44:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbiKXJoT (ORCPT ); Thu, 24 Nov 2022 04:44:19 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1478654CD; Thu, 24 Nov 2022 01:44:16 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 0F58D24E2E7; Thu, 24 Nov 2022 17:44:15 +0800 (CST) Received: from EXMBX068.cuchost.com (172.16.6.68) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 24 Nov 2022 17:44:15 +0800 Received: from [192.168.125.96] (183.27.97.81) by EXMBX068.cuchost.com (172.16.6.68) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 24 Nov 2022 17:44:14 +0800 Message-ID: Date: Thu, 24 Nov 2022 17:44:14 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.2 Subject: Re: [PATCH v1 3/4] soc: starfive: Add StarFive JH71XX pmu driver Content-Language: en-US To: Conor Dooley CC: Emil Renner Berthing , , , , Rob Herring , "Krzysztof Kozlowski" , "Rafael J . Wysocki" , References: <20221118133216.17037-1-walker.chen@starfivetech.com> <20221118133216.17037-4-walker.chen@starfivetech.com> <6303c341-a691-fd52-2861-74e9d3ea09c9@starfivetech.com> From: Walker Chen In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [183.27.97.81] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX068.cuchost.com (172.16.6.68) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 On 2022/11/24 17:28, Conor Dooley wrote: > Hey Walker, > Just jumping in here... > > On Thu, Nov 24, 2022 at 05:08:57PM +0800, Walker Chen wrote: >> On 2022/11/19 2:31, Emil Renner Berthing wrote: >> > On Fri, 18 Nov 2022 at 14:35, Walker Chen wrote: > >> >> diff --git a/include/soc/starfive/pm_domains.h b/include/soc/starfive/pm_domains.h >> >> new file mode 100644 >> >> index 000000000000..a20e28e9baf3 >> >> --- /dev/null >> >> +++ b/include/soc/starfive/pm_domains.h >> >> @@ -0,0 +1,15 @@ >> >> +/* SPDX-License-Identifier: GPL-2.0 */ >> >> +/* >> >> + * Copyright (C) 2022 StarFive Technology Co., Ltd. >> >> + * Author: Walker Chen >> >> + */ >> >> + >> >> +#ifndef __SOC_STARFIVE_PMDOMAINS_H__ >> >> +#define __SOC_STARFIVE_PMDOMAINS_H__ >> >> + >> >> +#include >> >> + >> >> +void starfive_pmu_hw_event_turn_on(u32 mask); >> >> +void starfive_pmu_hw_event_turn_off(u32 mask); >> >> + >> >> +#endif /* __SOC_STARFIVE_PMDOMAINS_H__ */ >> > >> > The header and functions within are named very generic, but >> > implemented by the jh71xx-specific driver. >> > >> > Also who should use this header? These functions are never called by >> > anything in this series. >> >> These two functions will be used by the GPU module. Only the power-off >> of the GPU is not controlled by the software through PMU module. So >> here the functions are needed to export. > > ...the general policy is to avoid adding things without users. I think > they should be kept as static functions for now & when your GPU driver > is being upstreamed you can expose these functions. That way your usage > of them can be reviewed with the appropriate context. > OK, thank you for your advice. I will modify the code according to your suggestion in the next version of patch. Best Regards, Walker Chen