From: Marc Zyngier <maz@kernel.org>
To: Pierre Gondois <pierre.gondois@arm.com>
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 <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Ard Biesheuvel <ardb@kernel.org>, Fuad Tabba <tabba@google.com>,
Rob Herring <robh@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v1 2/3] cpufreq: CPPC: Add per_cpu efficiency_class
Date: Thu, 17 Mar 2022 16:31:30 +0000 [thread overview]
Message-ID: <87o824y1zx.wl-maz@kernel.org> (raw)
In-Reply-To: <d8502879-104e-c1c9-d735-d9de5769da41@arm.com>
On Thu, 17 Mar 2022 16:07:01 +0000,
Pierre Gondois <pierre.gondois@arm.com> 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.
WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: Pierre Gondois <pierre.gondois@arm.com>
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 <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
Ard Biesheuvel <ardb@kernel.org>, Fuad Tabba <tabba@google.com>,
Rob Herring <robh@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v1 2/3] cpufreq: CPPC: Add per_cpu efficiency_class
Date: Thu, 17 Mar 2022 16:31:30 +0000 [thread overview]
Message-ID: <87o824y1zx.wl-maz@kernel.org> (raw)
In-Reply-To: <d8502879-104e-c1c9-d735-d9de5769da41@arm.com>
On Thu, 17 Mar 2022 16:07:01 +0000,
Pierre Gondois <pierre.gondois@arm.com> 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
next prev parent reply other threads:[~2022-03-17 16:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 13:34 [PATCH v1 0/3] Enable EAS for CPPC/ACPI based systems Pierre Gondois
2022-03-17 13:34 ` Pierre Gondois
2022-03-17 13:34 ` [PATCH v1 1/3] cpufreq: CPPC: Add cppc_cpufreq_search_cpu_data Pierre Gondois
2022-03-17 13:34 ` Pierre Gondois
2022-03-17 14:20 ` Marc Zyngier
2022-03-17 14:20 ` Marc Zyngier
2022-03-17 14:44 ` Pierre Gondois
2022-03-17 14:44 ` Pierre Gondois
2022-03-17 15:17 ` Marc Zyngier
2022-03-17 15:17 ` Marc Zyngier
2022-03-17 13:34 ` [PATCH v1 2/3] cpufreq: CPPC: Add per_cpu efficiency_class Pierre Gondois
2022-03-17 13:34 ` Pierre Gondois
2022-03-17 15:13 ` Marc Zyngier
2022-03-17 15:13 ` Marc Zyngier
2022-03-17 16:07 ` Pierre Gondois
2022-03-17 16:07 ` Pierre Gondois
2022-03-17 16:31 ` Marc Zyngier [this message]
2022-03-17 16:31 ` Marc Zyngier
2022-03-17 13:34 ` [PATCH v1 3/3] cpufreq: CPPC: Register EM based on efficiency class information Pierre Gondois
2022-03-17 13:34 ` Pierre Gondois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o824y1zx.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=Dietmar.Eggemann@arm.com \
--cc=Ionela.Voinescu@arm.com \
--cc=Lukasz.Luba@arm.com \
--cc=Morten.Rasmussen@arm.com \
--cc=ardb@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mka@chromium.org \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=tabba@google.com \
--cc=viresh.kumar@linaro.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.