All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <skhan@linuxfoundation.org>
To: Huang Rui <ray.huang@amd.com>
Cc: "Meng, Li (Jassmine)" <Li.Meng@amd.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Fontenot, Nathan" <Nathan.Fontenot@amd.com>,
	"Sharma, Deepak" <Deepak.Sharma@amd.com>,
	"Deucher, Alexander" <Alexander.Deucher@amd.com>,
	"Limonciello, Mario" <Mario.Limonciello@amd.com>,
	"Su, Jinzhou (Joe)" <Jinzhou.Su@amd.com>,
	"Yuan, Perry" <Perry.Yuan@amd.com>,
	"Du, Xiaojian" <Xiaojian.Du@amd.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Borislav Petkov <bp@alien8.de>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [RESEND PATCH 2/4] cpufreq: amd-pstate: Add test module for amd-pstate driver
Date: Mon, 29 Aug 2022 16:40:02 -0600	[thread overview]
Message-ID: <3b5b12b3-e999-e097-40e8-ad2fb4a92bb5@linuxfoundation.org> (raw)
In-Reply-To: <YwwDzcNMQnMcPOU5@amd.com>

On 8/28/22 18:09, Huang Rui wrote:
> On Sat, Aug 27, 2022 at 06:36:30AM +0800, Shuah Khan wrote:
>> On 8/26/22 3:47 PM, Shuah Khan wrote:
>>> On 8/16/22 9:46 PM, Meng Li wrote:
>>>> Add amd-pstate-ut test module, this module is used by kselftest
>>>> to unit test amd-pstate functionality. This module will be
>>>> expected by some of selftests to be present and loaded.
>>>>
>>>> Signed-off-by: Meng Li <li.meng@amd.com>
>>>> Acked-by: Huang Rui <ray.huang@amd.com>
>>>> Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>
>>>> ---
>>>>    drivers/cpufreq/Kconfig.x86     |   7 +
>>>>    drivers/cpufreq/Makefile        |   1 +
>>>>    drivers/cpufreq/amd-pstate-ut.c | 293 ++++++++++++++++++++++++++++++++
>>>>    3 files changed, 301 insertions(+)
>>>>    create mode 100644 drivers/cpufreq/amd-pstate-ut.c
>>>>
>>>> diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
>>>> index 55516043b656..fdd819069d72 100644
>>>> --- a/drivers/cpufreq/Kconfig.x86
>>>> +++ b/drivers/cpufreq/Kconfig.x86
>>>> @@ -51,6 +51,13 @@ config X86_AMD_PSTATE
>>>>          If in doubt, say N.
>>>> +config X86_AMD_PSTATE_UT
>>>> +    tristate "selftest for AMD Processor P-State driver"
>>>> +    depends on X86 && ACPI_PROCESSOR
>>
>> This has to specify dependency on X86_AMD_PSTATE
>>
>>>> +    default n
>>>> +    help
>>>> +      This kernel module is used for testing. It's safe to say M here.
>>>> +
>>>
>>> Shouldn't this X86_AMD_PSTATE_UT depend on X86_AMD_PSTATE?
>>> I am running a few tests and when I have X86_AMD_PSTATE_UT
>>> enabled as built-in and X86_AMD_PSTATE is disabled, test
>>> fails saying incorrect cpufreq driver?
>>>
>>> Skipped: Test can only run on amd-pstate driver.
>>>
>>> So it sounds like X86_AMD_PSTATE_UT depends on X86_AMD_PSTATE.
>>>
>>
>> Once I enabled X86_AMD_PSTATE and X86_AMD_PSTATE_UT=m, the test
>> ran correctly.
>>
>> Please fix the dependencies and send me a new version. Send all
>> the patches so it is easier to apply them all at once.
>>
> 
> Hi Shuah,
> 
> Thanks to accept the patch series. Actually, we want amd-pstate-ut can be
> modprobed even without amd-pstate module, because it can tell the users
> they loaded a wrong module like "acpi-cpufreq" and needs to replace it with
> amd-pstate. :-)
> 

I see. The message could be expanded to let the user know which
config option needs to be enabled to run the test.

You can send this change as a separate patch. I will apply this series
as is.

thanks,
-- Shuah


  reply	other threads:[~2022-08-29 22:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17  3:46 [RESEND PATCH 0/4] Add unit test module for AMD P-State driver Meng Li
2022-08-17  3:46 ` [RESEND PATCH 1/4] cpufreq: amd-pstate: Expose struct amd_cpudata Meng Li
2022-08-17  3:46 ` [RESEND PATCH 2/4] cpufreq: amd-pstate: Add test module for amd-pstate driver Meng Li
2022-08-26 21:47   ` Shuah Khan
2022-08-26 22:36     ` Shuah Khan
2022-08-29  0:09       ` Huang Rui
2022-08-29 22:40         ` Shuah Khan [this message]
2022-08-17  3:46 ` [RESEND PATCH 3/4] selftests: amd-pstate: Add test trigger " Meng Li
2022-08-17  3:46 ` [RESEND PATCH 4/4] Documentation: amd-pstate: Add unit test introduction Meng Li
2022-08-24 21:58 ` [RESEND PATCH 0/4] Add unit test module for AMD P-State driver Shuah Khan

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=3b5b12b3-e999-e097-40e8-ad2fb4a92bb5@linuxfoundation.org \
    --to=skhan@linuxfoundation.org \
    --cc=Alexander.Deucher@amd.com \
    --cc=Deepak.Sharma@amd.com \
    --cc=Jinzhou.Su@amd.com \
    --cc=Li.Meng@amd.com \
    --cc=Mario.Limonciello@amd.com \
    --cc=Nathan.Fontenot@amd.com \
    --cc=Perry.Yuan@amd.com \
    --cc=Xiaojian.Du@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ray.huang@amd.com \
    --cc=viresh.kumar@linaro.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.