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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CFB70ECAAD4 for ; Mon, 29 Aug 2022 22:40:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbiH2WkH (ORCPT ); Mon, 29 Aug 2022 18:40:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbiH2WkG (ORCPT ); Mon, 29 Aug 2022 18:40:06 -0400 Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BB694A13F for ; Mon, 29 Aug 2022 15:40:05 -0700 (PDT) Received: by mail-io1-xd2b.google.com with SMTP id 62so7847958iov.5 for ; Mon, 29 Aug 2022 15:40:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=fw+ukfTmSDZ4o4Npq5CqO1EVfxOQHxJ/NRVgEA2WF2o=; b=N1+B+9nfF7dnXX6XxaEQI2D6eSozQ1HfiQxykqXx4Ep/uxrayNrjT4hSBxVmO68dNe iaVfVWeYS0CMI1wFd5HUVONwdodzUyUwy3DdL6OlpuGdityGGUvpMrQPHHlW+x+snXOT vLcg9hjtw0IQUBa9URRNdI/eZKEs9jb+YBrSo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=fw+ukfTmSDZ4o4Npq5CqO1EVfxOQHxJ/NRVgEA2WF2o=; b=J7pu6fTvFobIDRyT7LP9k/n6HHZc/SO0GNsj+WDzjysCgFyOSMmuUbM9aG4fl7AAKI Q8SB8ukQG+XtiBJP3z2CvDTMDO/rzF19qKwuhk4WT+nqe3YPwyRtfPsY/7+v+0RWeOY3 Up03E1WiXN8yTuDulxsr7gIT/fHnF/qrrvq62FilCL6DZqH9fiYTn7B3f4J2RskKf2Wh 0N8lYlk625V3JYgQw6oAWrHB6nHKQxYcWpTaq/0boy484RhahUKDnbW0HNJzSNmhwI7s 6O3vxG2tDKsrvZZOL1IkvANZh2rQmeQfFXElyo66XpeP32yvj5lBbvZKra+rqYf77eRA /8Xg== X-Gm-Message-State: ACgBeo16QRRv1AlaQ8L+OdX0PgseOluYg3vkqDysB8TDzAoCYqaVV/eR miH/wLPsyBUClMGymjagKHnIeg== X-Google-Smtp-Source: AA6agR7HOuqqT15KXU+HhoZ8GbnT+QCR/MNEB5cDE1FNcZcfWB5CJOSQBZNP/ie/iWyGlQflkt93Lg== X-Received: by 2002:a6b:7b41:0:b0:689:2648:9ce9 with SMTP id m1-20020a6b7b41000000b0068926489ce9mr9647222iop.185.1661812804772; Mon, 29 Aug 2022 15:40:04 -0700 (PDT) Received: from [192.168.1.128] ([38.15.45.1]) by smtp.gmail.com with ESMTPSA id w1-20020a056638378100b00349d2d52f6asm4905185jal.37.2022.08.29.15.40.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Aug 2022 15:40:04 -0700 (PDT) Message-ID: <3b5b12b3-e999-e097-40e8-ad2fb4a92bb5@linuxfoundation.org> Date: Mon, 29 Aug 2022 16:40:02 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [RESEND PATCH 2/4] cpufreq: amd-pstate: Add test module for amd-pstate driver Content-Language: en-US To: Huang Rui Cc: "Meng, Li (Jassmine)" , "linux-pm@vger.kernel.org" , "Rafael J . Wysocki" , "Fontenot, Nathan" , "Sharma, Deepak" , "Deucher, Alexander" , "Limonciello, Mario" , "Su, Jinzhou (Joe)" , "Yuan, Perry" , "Du, Xiaojian" , Viresh Kumar , Borislav Petkov , "linux-kernel@vger.kernel.org" , Shuah Khan References: <20220817034630.1172065-1-li.meng@amd.com> <20220817034630.1172065-3-li.meng@amd.com> <0f9706b7-6dd5-663d-70cf-7221b5a1bfc5@linuxfoundation.org> From: Shuah Khan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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 >>>> Acked-by: Huang Rui >>>> Reviewed-by: Shuah Khan >>>> --- >>>>   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