diff mbox series

[RFC] powercap: Add Hygon Fam18h RAPL support

Message ID 20210225130129.21512-1-puwen@hygon.cn (mailing list archive)
State RFC, archived
Headers show
Series [RFC] powercap: Add Hygon Fam18h RAPL support | expand

Commit Message

Wen Pu Feb. 25, 2021, 1:01 p.m. UTC
Enable Hygon Fam18h RAPL support for the power capping framework.

Signed-off-by: Pu Wen <puwen@hygon.cn>
---
 drivers/powercap/intel_rapl_common.c | 1 +
 drivers/powercap/intel_rapl_msr.c    | 1 +
 2 files changed, 2 insertions(+)

Comments

Srinivas Pandruvada Feb. 28, 2021, 3:42 p.m. UTC | #1
On Thu, 2021-02-25 at 21:01 +0800, Pu Wen wrote:
> Enable Hygon Fam18h RAPL support for the power capping framework.
> 
If this patch is tested and works on this processor, not sure why this
is RFC?

Thanks,
Srinivas

> Signed-off-by: Pu Wen <puwen@hygon.cn>
> ---
>  drivers/powercap/intel_rapl_common.c | 1 +
>  drivers/powercap/intel_rapl_msr.c    | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/drivers/powercap/intel_rapl_common.c
> b/drivers/powercap/intel_rapl_common.c
> index fdda2a737186..73cf68af9770 100644
> --- a/drivers/powercap/intel_rapl_common.c
> +++ b/drivers/powercap/intel_rapl_common.c
> @@ -1069,6 +1069,7 @@ static const struct x86_cpu_id rapl_ids[]
> __initconst = {
>  
>  	X86_MATCH_VENDOR_FAM(AMD, 0x17, &rapl_defaults_amd),
>  	X86_MATCH_VENDOR_FAM(AMD, 0x19, &rapl_defaults_amd),
> +	X86_MATCH_VENDOR_FAM(HYGON, 0x18, &rapl_defaults_amd),
>  	{}
>  };
>  MODULE_DEVICE_TABLE(x86cpu, rapl_ids);
> diff --git a/drivers/powercap/intel_rapl_msr.c
> b/drivers/powercap/intel_rapl_msr.c
> index 78213d4b5b16..cc3b22881bfe 100644
> --- a/drivers/powercap/intel_rapl_msr.c
> +++ b/drivers/powercap/intel_rapl_msr.c
> @@ -150,6 +150,7 @@ static int rapl_msr_probe(struct platform_device
> *pdev)
>  	case X86_VENDOR_INTEL:
>  		rapl_msr_priv = &rapl_msr_priv_intel;
>  		break;
> +	case X86_VENDOR_HYGON:
>  	case X86_VENDOR_AMD:
>  		rapl_msr_priv = &rapl_msr_priv_amd;
>  		break;
Wen Pu March 1, 2021, 2:16 a.m. UTC | #2
On 2021/2/28 23:42, Srinivas Pandruvada wrote:
> On Thu, 2021-02-25 at 21:01 +0800, Pu Wen wrote:
>> Enable Hygon Fam18h RAPL support for the power capping framework.
>>
> If this patch is tested and works on this processor, not sure why this
> is RFC?

This patch is tested and works on Hygon processor. The 'RFC' is automated
generated by my script ;)

Thanks,
Pu Wen

> Thanks,
> Srinivas
> 
>> Signed-off-by: Pu Wen <puwen@hygon.cn>
>> ---
>>  drivers/powercap/intel_rapl_common.c | 1 +
>>  drivers/powercap/intel_rapl_msr.c    | 1 +
>>  2 files changed, 2 insertions(+)
>>
>> diff --git a/drivers/powercap/intel_rapl_common.c
>> b/drivers/powercap/intel_rapl_common.c
>> index fdda2a737186..73cf68af9770 100644
>> --- a/drivers/powercap/intel_rapl_common.c
>> +++ b/drivers/powercap/intel_rapl_common.c
>> @@ -1069,6 +1069,7 @@ static const struct x86_cpu_id rapl_ids[]
>> __initconst = {
>>  
>>  	X86_MATCH_VENDOR_FAM(AMD, 0x17, &rapl_defaults_amd),
>>  	X86_MATCH_VENDOR_FAM(AMD, 0x19, &rapl_defaults_amd),
>> +	X86_MATCH_VENDOR_FAM(HYGON, 0x18, &rapl_defaults_amd),
>>  	{}
>>  };
>>  MODULE_DEVICE_TABLE(x86cpu, rapl_ids);
>> diff --git a/drivers/powercap/intel_rapl_msr.c
>> b/drivers/powercap/intel_rapl_msr.c
>> index 78213d4b5b16..cc3b22881bfe 100644
>> --- a/drivers/powercap/intel_rapl_msr.c
>> +++ b/drivers/powercap/intel_rapl_msr.c
>> @@ -150,6 +150,7 @@ static int rapl_msr_probe(struct platform_device
>> *pdev)
>>  	case X86_VENDOR_INTEL:
>>  		rapl_msr_priv = &rapl_msr_priv_intel;
>>  		break;
>> +	case X86_VENDOR_HYGON:
>>  	case X86_VENDOR_AMD:
>>  		rapl_msr_priv = &rapl_msr_priv_amd;
>>  		break;
>
Rafael J. Wysocki March 1, 2021, 2:20 p.m. UTC | #3
On Mon, Mar 1, 2021 at 3:18 AM Wen Pu <puwen@hygon.cn> wrote:
>
> On 2021/2/28 23:42, Srinivas Pandruvada wrote:
> > On Thu, 2021-02-25 at 21:01 +0800, Pu Wen wrote:
> >> Enable Hygon Fam18h RAPL support for the power capping framework.
> >>
> > If this patch is tested and works on this processor, not sure why this
> > is RFC?
>
> This patch is tested and works on Hygon processor. The 'RFC' is automated
> generated by my script ;)

Well, care to resend as non-RFC, then?
Wen Pu March 2, 2021, 2:04 a.m. UTC | #4
On 2021/3/1 22:20, Rafael J. Wysocki wrote:
> On Mon, Mar 1, 2021 at 3:18 AM Wen Pu <puwen@hygon.cn> wrote:
>>
>> On 2021/2/28 23:42, Srinivas Pandruvada wrote:
>>> On Thu, 2021-02-25 at 21:01 +0800, Pu Wen wrote:
>>>> Enable Hygon Fam18h RAPL support for the power capping framework.
>>>>
>>> If this patch is tested and works on this processor, not sure why this
>>> is RFC?
>>
>> This patch is tested and works on Hygon processor. The 'RFC' is automated
>> generated by my script ;)
> 
> Well, care to resend as non-RFC, then?

OK, already resend. Thanks!
diff mbox series

Patch

diff --git a/drivers/powercap/intel_rapl_common.c b/drivers/powercap/intel_rapl_common.c
index fdda2a737186..73cf68af9770 100644
--- a/drivers/powercap/intel_rapl_common.c
+++ b/drivers/powercap/intel_rapl_common.c
@@ -1069,6 +1069,7 @@  static const struct x86_cpu_id rapl_ids[] __initconst = {
 
 	X86_MATCH_VENDOR_FAM(AMD, 0x17, &rapl_defaults_amd),
 	X86_MATCH_VENDOR_FAM(AMD, 0x19, &rapl_defaults_amd),
+	X86_MATCH_VENDOR_FAM(HYGON, 0x18, &rapl_defaults_amd),
 	{}
 };
 MODULE_DEVICE_TABLE(x86cpu, rapl_ids);
diff --git a/drivers/powercap/intel_rapl_msr.c b/drivers/powercap/intel_rapl_msr.c
index 78213d4b5b16..cc3b22881bfe 100644
--- a/drivers/powercap/intel_rapl_msr.c
+++ b/drivers/powercap/intel_rapl_msr.c
@@ -150,6 +150,7 @@  static int rapl_msr_probe(struct platform_device *pdev)
 	case X86_VENDOR_INTEL:
 		rapl_msr_priv = &rapl_msr_priv_intel;
 		break;
+	case X86_VENDOR_HYGON:
 	case X86_VENDOR_AMD:
 		rapl_msr_priv = &rapl_msr_priv_amd;
 		break;