From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9645C433F5 for ; Wed, 27 Oct 2021 08:58:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83C0060D43 for ; Wed, 27 Oct 2021 08:58:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 83C0060D43 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sLRTBCFihQXxw3LEzysuVWeXZMndQwc0r8KRNaBalTk=; b=UlYbOEojMMWXIe/PDzokpck8ba 8o2Z7TFNWxv706UEKVEJ3aFKvYEaA6nkwNztZ/D5VGwXtD6O0E8D8pvUe7PFObkkDSfjUHpPkBxjP b5ARnnH0dobNy8GnbdHBdIc5ro6kT2YSIYe/MzM7OP2yh6Pv6OllZeAlsMLIVx4nAg65F0LDNkkPa rcqM770xPKbEgUoPS4IMLbsXahJYV9w0ZbetDMeQ8qxzx1cp9loWHElUBP85MzJWwhaT0HtjCikwX ssVT/7MCRMKYi9+La2UzIVBrHK3UVmqekBIR1qZ7CAHDhbjSUuv9wW8dDzQ3hkW7iKK0NVK27Sene mKwzkf3w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfejo-004NF2-Gs; Wed, 27 Oct 2021 08:56:48 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfejk-004NDT-OJ for linux-arm-kernel@lists.infradead.org; Wed, 27 Oct 2021 08:56:46 +0000 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 2D9B41063; Wed, 27 Oct 2021 01:56:34 -0700 (PDT) Received: from [10.57.24.210] (unknown [10.57.24.210]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E7D13F70D; Wed, 27 Oct 2021 01:56:31 -0700 (PDT) Subject: Re: [PATCH v2 1/5] arch_topology: Introduce thermal pressure update function To: Dietmar Eggemann Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, sudeep.holla@arm.com, will@kernel.org, catalin.marinas@arm.com, linux@armlinux.org.uk, gregkh@linuxfoundation.org, rafael@kernel.org, viresh.kumar@linaro.org, amitk@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, thara.gopinath@linaro.org, bjorn.andersson@linaro.org, agross@kernel.org References: <20211015144550.23719-1-lukasz.luba@arm.com> <20211015144550.23719-2-lukasz.luba@arm.com> <431230a5-00e9-0211-0731-035eab5fa3f6@arm.com> From: Lukasz Luba Message-ID: Date: Wed, 27 Oct 2021 09:56:28 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <431230a5-00e9-0211-0731-035eab5fa3f6@arm.com> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211027_015644_891087_D44C6986 X-CRM114-Status: GOOD ( 20.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Dietmar, Thank you for having a look at this. On 10/26/21 5:51 PM, Dietmar Eggemann wrote: > On 15/10/2021 16:45, Lukasz Luba wrote: [snip] >> +#define arch_thermal_pressure_update topology_thermal_pressure_update > > s/thermal_pressure_update/update_thermal_pressure ? I can reorder that naming. > > The scheme seems to be {arch|topology}_*foo*_thermal_pressure > > But ... > >> [snip] >> +void topology_thermal_pressure_update(const struct cpumask *cpus, >> + unsigned long capped_freq) >> +{ > > ... why not just s/unsigned long th_pressure/unsigned long capped_freq > in existing topology_set_thermal_pressure() and move code the > frequency/capacity conversion in there? The patch set will become > considerably smaller. I've been trying to avoid confusion when changing actually behavior of the API function. Thus, introducing new would IMO opinion make sure the old 'set' function was expecting proper pressure value, while the new 'update' expects frequency. I agree that the patch set would be smaller in that case, but I'm not sure if that would not hide some issues. This one would definitely break compilation of some vendor modules (or drivers queuing or under review), not silently passing them through (with wrong argument). > > void topology_set_thermal_pressure(const struct cpumask *cpus, > - unsigned long th_pressure) > + unsigned long capped_freq) [snip] > EXPORT_SYMBOL_GPL(topology_set_thermal_pressure); > > And a user like [drivers/thermal/cpufreq_cooling.c] can call > arch_set_thermal_pressure(cpus, frequency). > > [...] > I'm not sure if that is a safe way. Regards, Lukasz _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel