2020-11-25 21:03:19

by Punit Agrawal

[permalink] [raw]
Subject: [RFC PATCH 0/4] Add processor to the ignore PSD override list

Hi,

While looking into Giovanni's patches to enable frequency invariance
on AMD systems[0], I noticed an issue with initialising frequency
domain information on a recent AMD APU.

Patch 1 refactors the test to ignore firmware provided frequency
domain into a separate function.

Patch 2 adds said APU (Family: 0x17, Model: 0x60, Stepping: 0x01) to
the list of CPUs for which the PSD override is ignored. I am not quite
happy with having to special case a particular CPU but also couldn't
find any documentation to help identify the CPUs that don't need the
override.

Patch 3 and 4 are somewhat independent and a first step towards
improving the situation with regards to the use of raw identifiers for
AMD processors throughout the kernel.

All feedback welcome.

Thanks,
Punit

[0] https://lore.kernel.org/linux-acpi/[email protected]/

Punit Agrawal (4):
cpufreq: acpi-cpufreq: Re-factor overriding ACPI PSD
cpufreq: acpi-cpufreq: Add processor to the ignore PSD override list
x86/cpu: amd: Define processor families
cpufreq: acpi-cpufreq: Use identifiers for AMD processor family

arch/x86/include/asm/amd-family.h | 18 ++++++++++++++++++
arch/x86/include/asm/cpu_device_id.h | 2 ++
drivers/cpufreq/acpi-cpufreq.c | 24 +++++++++++++++++++++---
3 files changed, 41 insertions(+), 3 deletions(-)
create mode 100644 arch/x86/include/asm/amd-family.h

--
2.29.2


2020-12-04 22:49:54

by Punit Agrawal

[permalink] [raw]
Subject: Re: [RFC PATCH 0/4] Add processor to the ignore PSD override list

Hi Rafael,

Punit Agrawal <[email protected]> writes:

> Hi,
>
> While looking into Giovanni's patches to enable frequency invariance
> on AMD systems[0], I noticed an issue with initialising frequency
> domain information on a recent AMD APU.
>
> Patch 1 refactors the test to ignore firmware provided frequency
> domain into a separate function.
>
> Patch 2 adds said APU (Family: 0x17, Model: 0x60, Stepping: 0x01) to
> the list of CPUs for which the PSD override is ignored. I am not quite
> happy with having to special case a particular CPU but also couldn't
> find any documentation to help identify the CPUs that don't need the
> override.

Are you be OK to pick the first two patches if there are no issues?

Thanks,
Punit


> Patch 3 and 4 are somewhat independent and a first step towards
> improving the situation with regards to the use of raw identifiers for
> AMD processors throughout the kernel.
>
> All feedback welcome.
>
> Thanks,
> Punit
>
> [0] https://lore.kernel.org/linux-acpi/[email protected]/
>
> Punit Agrawal (4):
> cpufreq: acpi-cpufreq: Re-factor overriding ACPI PSD
> cpufreq: acpi-cpufreq: Add processor to the ignore PSD override list
> x86/cpu: amd: Define processor families
> cpufreq: acpi-cpufreq: Use identifiers for AMD processor family
>
> arch/x86/include/asm/amd-family.h | 18 ++++++++++++++++++
> arch/x86/include/asm/cpu_device_id.h | 2 ++
> drivers/cpufreq/acpi-cpufreq.c | 24 +++++++++++++++++++++---
> 3 files changed, 41 insertions(+), 3 deletions(-)
> create mode 100644 arch/x86/include/asm/amd-family.h

2020-12-07 14:00:46

by Rafael J. Wysocki

[permalink] [raw]
Subject: Re: [RFC PATCH 0/4] Add processor to the ignore PSD override list

On Fri, Dec 4, 2020 at 11:45 PM Punit Agrawal <[email protected]> wrote:
>
> Hi Rafael,
>
> Punit Agrawal <[email protected]> writes:
>
> > Hi,
> >
> > While looking into Giovanni's patches to enable frequency invariance
> > on AMD systems[0], I noticed an issue with initialising frequency
> > domain information on a recent AMD APU.
> >
> > Patch 1 refactors the test to ignore firmware provided frequency
> > domain into a separate function.
> >
> > Patch 2 adds said APU (Family: 0x17, Model: 0x60, Stepping: 0x01) to
> > the list of CPUs for which the PSD override is ignored. I am not quite
> > happy with having to special case a particular CPU but also couldn't
> > find any documentation to help identify the CPUs that don't need the
> > override.
>
> Are you be OK to pick the first two patches if there are no issues?

Please send them as non-RFC and change the name of override_acpi_psd()
to indicate that it is AMD-specific.

Thanks!

2020-12-08 23:28:31

by Punit Agrawal

[permalink] [raw]
Subject: Re: [RFC PATCH 0/4] Add processor to the ignore PSD override list

Hi Rafael,

"Rafael J. Wysocki" <[email protected]> writes:

> On Fri, Dec 4, 2020 at 11:45 PM Punit Agrawal <[email protected]> wrote:
>>
>> Hi Rafael,
>>
>> Punit Agrawal <[email protected]> writes:
>>
>> > Hi,
>> >
>> > While looking into Giovanni's patches to enable frequency invariance
>> > on AMD systems[0], I noticed an issue with initialising frequency
>> > domain information on a recent AMD APU.
>> >
>> > Patch 1 refactors the test to ignore firmware provided frequency
>> > domain into a separate function.
>> >
>> > Patch 2 adds said APU (Family: 0x17, Model: 0x60, Stepping: 0x01) to
>> > the list of CPUs for which the PSD override is ignored. I am not quite
>> > happy with having to special case a particular CPU but also couldn't
>> > find any documentation to help identify the CPUs that don't need the
>> > override.
>>
>> Are you be OK to pick the first two patches if there are no issues?
>
> Please send them as non-RFC and change the name of override_acpi_psd()
> to indicate that it is AMD-specific.

Ack - I will incorporate your comments in the next version (once the
ongoing discussion finishes).

Thanks.