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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B3745C433F5 for ; Thu, 17 Mar 2022 16:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Subject:Cc:To:From:Message-ID:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=G+az0x4ZtX8DnN1ft5HzdTfG88Fcz4+fPGe7oRH7bgo=; b=W7tEhoXdFio9JH qkSaWjKmktcH6iDg/KneonzjMN9p1ecUBMwG1nMll1Btq9+mls8mO7w6YYIvPNAed9ZdeyxJk2xjR gH6OKsQw/53MxS5NnnAINObGvYJ1MnABxO1HNidtLr+pgpj4uC0zvtlCIH/UpUmUYcofT8MfMenQt RrVQCxr1LsWQKzdA6hn0eTlPICUgsplIw7a4OnLvqHrKi+kvk6wnNwUhvG5bdyihzijD1++NWcs1H EkVooTCZaTl6Bs5YtptCdSqyXsJ4KxN3NK0n6+JhbBkC+YMKq50TIuTdWVCrq0h6J4zThzIAW4/g8 yW9PW+tHFvsmZls1o07g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUt2K-00Gntp-Rr; Thu, 17 Mar 2022 16:31:41 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUt2F-00GnrO-RT for linux-arm-kernel@lists.infradead.org; Thu, 17 Mar 2022 16:31:37 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 68EE5B81F26; Thu, 17 Mar 2022 16:31:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BFBFC340ED; Thu, 17 Mar 2022 16:31:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647534693; bh=0O5d6Rq04+Hr+h8yNHQmWUz6ISqWFrwjXOw3xNpfpwg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VesdbL1bhztzrqSXkwiaWVU6oxT6ntFA9FuVl3Ix7yrUdBiYmpgAkZsmilhXhwAjo JU4Xm9+KsQsb1FnXqhtaPDJfoUMBq6G7oQhJ20pzTaSHisWH2itMf2nGgGXwd5iA2G UBbkraPcmjt0MG+ovONtq8Nay3hYRIkapEH7/3aYA9RAGJgwHK0FGLJ42XPfKBGMmg hvhvi3LF1SyPIqtY64qVHfoK4m3SEzTSy2BCMkirGb7FsMXdbpPdg3ob1bFt4ubQFY p4EOb+YB88y5PI/gm4o5meBIyG2Hk/W/UOYvTEfbV5wynLcqNFiboIBRa19AhtlhoN LVbVStRbdJEgg== Received: from sofa.misterjones.org ([185.219.108.64] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nUt2A-00FEoy-Nl; Thu, 17 Mar 2022 16:31:30 +0000 Date: Thu, 17 Mar 2022 16:31:30 +0000 Message-ID: <87o824y1zx.wl-maz@kernel.org> From: Marc Zyngier To: Pierre Gondois Cc: linux-kernel@vger.kernel.org, Ionela.Voinescu@arm.com, Lukasz.Luba@arm.com, Morten.Rasmussen@arm.com, Dietmar.Eggemann@arm.com, mka@chromium.org, daniel.lezcano@linaro.org, Catalin Marinas , Will Deacon , "Rafael J. Wysocki" , Viresh Kumar , Mark Rutland , Ard Biesheuvel , Fuad Tabba , Rob Herring , linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: Re: [PATCH v1 2/3] cpufreq: CPPC: Add per_cpu efficiency_class In-Reply-To: References: <20220317133419.3901736-1-Pierre.Gondois@arm.com> <20220317133419.3901736-3-Pierre.Gondois@arm.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: pierre.gondois@arm.com, linux-kernel@vger.kernel.org, Ionela.Voinescu@arm.com, Lukasz.Luba@arm.com, Morten.Rasmussen@arm.com, Dietmar.Eggemann@arm.com, mka@chromium.org, daniel.lezcano@linaro.org, catalin.marinas@arm.com, will@kernel.org, rafael@kernel.org, viresh.kumar@linaro.org, mark.rutland@arm.com, ardb@kernel.org, tabba@google.com, robh@kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220317_093136_222180_7287E126 X-CRM114-Status: GOOD ( 24.20 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 17 Mar 2022 16:07:01 +0000, Pierre Gondois wrote: > > >> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c > >> index 27df5c1e6baa..56637cbea5d6 100644 > >> --- a/arch/arm64/kernel/smp.c > >> +++ b/arch/arm64/kernel/smp.c > >> @@ -512,6 +512,7 @@ struct acpi_madt_generic_interrupt > >> *acpi_cpu_get_madt_gicc(int cpu) > >> { > >> return &cpu_madt_gicc[cpu]; > >> } > >> +EXPORT_SYMBOL(acpi_cpu_get_madt_gicc); > > > > Why not EXPORT_SYMBOL_GPL()? > > From what I understand, this could be made EXPORT_SYMBOL_GPL(). > The only reason was that the other symbol exportation in the > file wasn't restricted to GPL. I'm personally keen on keeping this for GPL code only, just like the current code is. If there is a further need to relax this, we can discuss it separately. > > > > >> > >> /* > >> * acpi_map_gic_cpu_interface - parse processor MADT entry > >> diff --git a/drivers/cpufreq/cppc_cpufreq.c > >> b/drivers/cpufreq/cppc_cpufreq.c > >> index 8f950fe72765..a6cd95c3b474 100644 > >> --- a/drivers/cpufreq/cppc_cpufreq.c > >> +++ b/drivers/cpufreq/cppc_cpufreq.c > >> @@ -422,12 +422,66 @@ static unsigned int > >> cppc_cpufreq_get_transition_delay_us(unsigned int cpu) > >> return cppc_get_transition_latency(cpu) / NSEC_PER_USEC; > >> } > >> > >> +static bool efficiency_class_populated; > >> +static DEFINE_PER_CPU(unsigned int, efficiency_class); > >> + > >> +static int populate_efficiency_class(void) > >> +{ > >> + unsigned int min = UINT_MAX, max = 0, class; > >> + struct acpi_madt_generic_interrupt *gicc; > >> + int cpu; > >> + > >> + for_each_possible_cpu(cpu) { > >> + gicc = acpi_cpu_get_madt_gicc(cpu); > >> + if (!gicc) > >> + return -ENODEV; > > > > How can that happen if you made it here using ACPI? > > This is effectively an extra check. This could be removed. Please do. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel